Class: TestPack1::Configuration
- Inherits:
-
Object
- Object
- TestPack1::Configuration
- Defined in:
- lib/test_pack_1/configuration.rb
Overview
All configuration including auth info and base URI for the API access are configured in this class.
Defined Under Namespace
Classes: Environment, Server
Class Attribute Summary collapse
-
.api_token ⇒ Object
Returns the value of attribute api_token.
-
.array_serialization ⇒ Object
Returns the value of attribute array_serialization.
-
.customer ⇒ Object
Returns the value of attribute customer.
-
.environment ⇒ Object
Returns the value of attribute environment.
-
.environments ⇒ Object
Returns the value of attribute environments.
Class Method Summary collapse
-
.get_base_uri(server = Server::DEFAULT) ⇒ String
Generates the appropriate base URI for the environment and the server.
Class Attribute Details
.api_token ⇒ Object
Returns the value of attribute api_token.
60 61 62 |
# File 'lib/test_pack_1/configuration.rb', line 60 def api_token @api_token end |
.array_serialization ⇒ Object
Returns the value of attribute array_serialization.
56 57 58 |
# File 'lib/test_pack_1/configuration.rb', line 56 def array_serialization @array_serialization end |
.customer ⇒ Object
Returns the value of attribute customer.
59 60 61 |
# File 'lib/test_pack_1/configuration.rb', line 59 def customer @customer end |
.environment ⇒ Object
Returns the value of attribute environment.
57 58 59 |
# File 'lib/test_pack_1/configuration.rb', line 57 def environment @environment end |
.environments ⇒ Object
Returns the value of attribute environments.
58 59 60 |
# File 'lib/test_pack_1/configuration.rb', line 58 def environments @environments end |
Class Method Details
.get_base_uri(server = Server::DEFAULT) ⇒ String
Generates the appropriate base URI for the environment and the server. required.
45 46 47 48 49 50 51 52 |
# File 'lib/test_pack_1/configuration.rb', line 45 def self.get_base_uri(server = Server::DEFAULT) parameters = { 'customer' => customer } APIHelper.append_url_with_template_parameters( environments[environment][server], parameters ) end |