Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
2 contributors

Users who have contributed to this file

@ij @dshafer
42 lines (42 sloc) 1.2 KB
require "restforce"
require "sf/version"
require "sf/base"
require "sf/account"
require "sf/contact"
require "sf/contact_affiliation"
require "sf/reg_event"
require "sf/reg_meeting"
require "sf/reg_option"
require "sf/reg_rate"
require "sf/reg_registration"
require "sf/reg_item"
require "sf/reg_meeting_option_association.rb"
require "sf/session"
require "sf/session_type"
require "sf/track"
require "sf/presenter"
require "sf/sponsorship"
require "sf/room"
require "sf/venue"
require "sf/opportunity"
require "sf/service_institution"
require "sf/report"
module Sf
class << self
def client
if @client.nil?
if File.exist?("#{::Rails.root.to_s}/config/restforce.yml")
sfdc_auth_config = YAML.load(ERB.new(File.read("#{::Rails.root.to_s}/config/restforce.yml")).result)
@client = Restforce.new :host => sfdc_auth_config['host'],
:username => sfdc_auth_config['username'],
:password => sfdc_auth_config['password'],
:security_token => sfdc_auth_config['security_token'],
:client_id => sfdc_auth_config['client_id'],
:client_secret => sfdc_auth_config['client_secret']
end
else
@client
end
end
end
end