Class: SalesforceHttpClient::Configuration
- Inherits:
-
Object
- Object
- SalesforceHttpClient::Configuration
- Includes:
- Singleton
- Defined in:
- lib/salesforce_http_client/configuration.rb
Instance Attribute Summary collapse
-
#http_timeout ⇒ Object
Returns the value of attribute http_timeout.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#salesforce_login_id ⇒ Object
Returns the value of attribute salesforce_login_id.
-
#salesforce_login_url ⇒ Object
Returns the value of attribute salesforce_login_url.
-
#salesforce_logout_url ⇒ Object
Returns the value of attribute salesforce_logout_url.
-
#salesforce_password ⇒ Object
Returns the value of attribute salesforce_password.
-
#salesforce_report_id_param ⇒ Object
Returns the value of attribute salesforce_report_id_param.
-
#salesforce_report_url_format ⇒ Object
Returns the value of attribute salesforce_report_url_format.
-
#tmp_dir ⇒ Object
Returns the value of attribute tmp_dir.
Class Method Summary collapse
Instance Method Summary collapse
- #cookie_store_file_path ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #report_url(report_id) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/salesforce_http_client/configuration.rb', line 31 def initialize @salesforce_login_url = "https://login.salesforce.com/" @salesforce_logout_url = "https://ap.salesforce.com/secur/logout.jsp" @salesforce_report_url_format = 'https://ap.salesforce.com/#{report_id}?export=1&enc=UTF-8&xf=csv' @salesforce_report_id_param = '#{report_id}' @http_timeout = 5 * 60 * 1000 @tmp_dir = './tmp' init_logger end |
Instance Attribute Details
#http_timeout ⇒ Object
Returns the value of attribute http_timeout.
21 22 23 |
# File 'lib/salesforce_http_client/configuration.rb', line 21 def http_timeout @http_timeout end |
#log_level ⇒ Object
Returns the value of attribute log_level.
25 26 27 |
# File 'lib/salesforce_http_client/configuration.rb', line 25 def log_level @log_level end |
#logger ⇒ Object
Returns the value of attribute logger.
24 25 26 |
# File 'lib/salesforce_http_client/configuration.rb', line 24 def logger @logger end |
#salesforce_login_id ⇒ Object
Returns the value of attribute salesforce_login_id.
15 16 17 |
# File 'lib/salesforce_http_client/configuration.rb', line 15 def salesforce_login_id @salesforce_login_id end |
#salesforce_login_url ⇒ Object
Returns the value of attribute salesforce_login_url.
12 13 14 |
# File 'lib/salesforce_http_client/configuration.rb', line 12 def salesforce_login_url @salesforce_login_url end |
#salesforce_logout_url ⇒ Object
Returns the value of attribute salesforce_logout_url.
13 14 15 |
# File 'lib/salesforce_http_client/configuration.rb', line 13 def salesforce_logout_url @salesforce_logout_url end |
#salesforce_password ⇒ Object
Returns the value of attribute salesforce_password.
16 17 18 |
# File 'lib/salesforce_http_client/configuration.rb', line 16 def salesforce_password @salesforce_password end |
#salesforce_report_id_param ⇒ Object
Returns the value of attribute salesforce_report_id_param.
19 20 21 |
# File 'lib/salesforce_http_client/configuration.rb', line 19 def salesforce_report_id_param @salesforce_report_id_param end |
#salesforce_report_url_format ⇒ Object
Returns the value of attribute salesforce_report_url_format.
18 19 20 |
# File 'lib/salesforce_http_client/configuration.rb', line 18 def salesforce_report_url_format @salesforce_report_url_format end |
#tmp_dir ⇒ Object
Returns the value of attribute tmp_dir.
22 23 24 |
# File 'lib/salesforce_http_client/configuration.rb', line 22 def tmp_dir @tmp_dir end |
Class Method Details
.configure {|instance| ... } ⇒ Object
27 28 29 |
# File 'lib/salesforce_http_client/configuration.rb', line 27 def self.configure yield instance end |
Instance Method Details
#cookie_store_file_path ⇒ Object
48 49 50 |
# File 'lib/salesforce_http_client/configuration.rb', line 48 def File.join(@tmp_dir, 'cookie_store.dat') end |
#report_url(report_id) ⇒ Object
44 45 46 |
# File 'lib/salesforce_http_client/configuration.rb', line 44 def report_url(report_id) @salesforce_report_url_format.gsub(@salesforce_report_id_param, report_id) end |