Class: Tester::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/tester/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

Class Method Summary collapse

Class Attribute Details

.array_serializationObject

Returns the value of attribute array_serialization.



59
60
61
# File 'lib/tester/configuration.rb', line 59

def array_serialization
  @array_serialization
end

.environmentObject

Returns the value of attribute environment.



60
61
62
# File 'lib/tester/configuration.rb', line 60

def environment
  @environment
end

.environmentsObject

Returns the value of attribute environments.



61
62
63
# File 'lib/tester/configuration.rb', line 61

def environments
  @environments
end

.portObject

Returns the value of attribute port.



62
63
64
# File 'lib/tester/configuration.rb', line 62

def port
  @port
end

.suitesObject

Returns the value of attribute suites.



63
64
65
# File 'lib/tester/configuration.rb', line 63

def suites
  @suites
end

Class Method Details

.get_base_uri(server = Server::DEFAULT) ⇒ String

Generates the appropriate base URI for the environment and the server. required.

Parameters:

Returns:



47
48
49
50
51
52
53
54
55
# File 'lib/tester/configuration.rb', line 47

def self.get_base_uri(server = Server::DEFAULT)
  parameters = {
    'port' => port,
    'suites' => suites
  }
  APIHelper.append_url_with_template_parameters(
    environments[environment][server], parameters
  )
end