Class: Propagate::Configuration
- Inherits:
-
Object
- Object
- Propagate::Configuration
- Defined in:
- lib/propagate/configuration.rb
Overview
This class enables detailed configuration of the propagate services.
By calling
Propagate.configuration # => instance of Propagate::Configuration
or
Propagate.configure do |config|
config # => instance of Propagate::Configuration
end
you are able to perform configuration updates.
Your are able to customize all attributes listed below. All values have sensitive default and will very likely not need to be changed.
Please note that the public and private key for the Propagate API Access have no useful default value. The keys may be set via the Shell enviroment or using this configuration. Settings within this configuration always take precedence.
Setting the keys with this Configuration
Propagate.configure do |config|
config.public_key = '6Lc6BAAAAAAAAChqRbQZcn_yyyyyyyyyyyyyyyyy'
config.private_key = '6Lc6BAAAAAAAAKN3DRm6VA_xxxxxxxxxxxxxxxxx'
end
Instance Attribute Summary collapse
-
#handle_timeouts_gracefully ⇒ Object
Returns the value of attribute handle_timeouts_gracefully.
-
#nonssl_api_server_url ⇒ Object
Returns the value of attribute nonssl_api_server_url.
-
#private_key ⇒ Object
Returns the value of attribute private_key.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#public_key ⇒ Object
Returns the value of attribute public_key.
-
#skip_verify_env ⇒ Object
Returns the value of attribute skip_verify_env.
-
#ssl_api_server_url ⇒ Object
Returns the value of attribute ssl_api_server_url.
-
#verify_url ⇒ Object
Returns the value of attribute verify_url.
Instance Method Summary collapse
-
#api_server_url(ssl = false) ⇒ Object
:nodoc:.
-
#initialize ⇒ Configuration
constructor
:nodoc:.
Constructor Details
#initialize ⇒ Configuration
:nodoc:
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/propagate/configuration.rb', line 40 def initialize #:nodoc: @nonssl_api_server_url = PROPAGATE_API_SERVER_URL @ssl_api_server_url = PROPAGATE_API_SECURE_SERVER_URL @verify_url = PROPAGATE_VERIFY_URL @skip_verify_env = SKIP_VERIFY_ENV @handle_timeouts_gracefully = HANDLE_TIMEOUTS_GRACEFULLY @private_key = ENV['PROPAGATE_PRIVATE_KEY'] @public_key = ENV['PROPAGATE_PUBLIC_KEY'] end |
Instance Attribute Details
#handle_timeouts_gracefully ⇒ Object
Returns the value of attribute handle_timeouts_gracefully.
31 32 33 |
# File 'lib/propagate/configuration.rb', line 31 def handle_timeouts_gracefully @handle_timeouts_gracefully end |
#nonssl_api_server_url ⇒ Object
Returns the value of attribute nonssl_api_server_url.
31 32 33 |
# File 'lib/propagate/configuration.rb', line 31 def nonssl_api_server_url @nonssl_api_server_url end |
#private_key ⇒ Object
Returns the value of attribute private_key.
31 32 33 |
# File 'lib/propagate/configuration.rb', line 31 def private_key @private_key end |
#proxy ⇒ Object
Returns the value of attribute proxy.
31 32 33 |
# File 'lib/propagate/configuration.rb', line 31 def proxy @proxy end |
#public_key ⇒ Object
Returns the value of attribute public_key.
31 32 33 |
# File 'lib/propagate/configuration.rb', line 31 def public_key @public_key end |
#skip_verify_env ⇒ Object
Returns the value of attribute skip_verify_env.
31 32 33 |
# File 'lib/propagate/configuration.rb', line 31 def skip_verify_env @skip_verify_env end |
#ssl_api_server_url ⇒ Object
Returns the value of attribute ssl_api_server_url.
31 32 33 |
# File 'lib/propagate/configuration.rb', line 31 def ssl_api_server_url @ssl_api_server_url end |
#verify_url ⇒ Object
Returns the value of attribute verify_url.
31 32 33 |
# File 'lib/propagate/configuration.rb', line 31 def verify_url @verify_url end |
Instance Method Details
#api_server_url(ssl = false) ⇒ Object
:nodoc:
51 52 53 |
# File 'lib/propagate/configuration.rb', line 51 def api_server_url(ssl = false) #:nodoc: ssl ? ssl_api_server_url : nonssl_api_server_url end |