Class: RSpec::Hive::Configuration
- Inherits:
-
Object
- Object
- RSpec::Hive::Configuration
- Defined in:
- lib/rspec/hive/configuration.rb
Constant Summary collapse
- DEFAULT_VERSION =
10- DEFAULT_TIMEOUT =
120
Instance Attribute Summary collapse
-
#connection_timeout ⇒ Object
Returns the value of attribute connection_timeout.
-
#docker_shared_directory_path ⇒ Object
Returns the value of attribute docker_shared_directory_path.
-
#hive_options ⇒ Object
Returns the value of attribute hive_options.
-
#hive_version ⇒ Object
Returns the value of attribute hive_version.
-
#host ⇒ Object
Returns the value of attribute host.
-
#host_shared_directory_path ⇒ Object
Returns the value of attribute host_shared_directory_path.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#port ⇒ Object
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(path_to_config_file = nil) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(path_to_config_file = nil) ⇒ Configuration
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rspec/hive/configuration.rb', line 20 def initialize(path_to_config_file = nil) if path_to_config_file.nil? load_default_variables else interpolated = ERB.new(File.read(path_to_config_file)).result config = YAML.safe_load(interpolated)['hive'] load_variables_from_config(config) end @logger = Logger.new(STDOUT) end |
Instance Attribute Details
#connection_timeout ⇒ Object
Returns the value of attribute connection_timeout.
11 12 13 |
# File 'lib/rspec/hive/configuration.rb', line 11 def connection_timeout @connection_timeout end |
#docker_shared_directory_path ⇒ Object
Returns the value of attribute docker_shared_directory_path.
11 12 13 |
# File 'lib/rspec/hive/configuration.rb', line 11 def docker_shared_directory_path @docker_shared_directory_path end |
#hive_options ⇒ Object
Returns the value of attribute hive_options.
11 12 13 |
# File 'lib/rspec/hive/configuration.rb', line 11 def @hive_options end |
#hive_version ⇒ Object
Returns the value of attribute hive_version.
11 12 13 |
# File 'lib/rspec/hive/configuration.rb', line 11 def hive_version @hive_version end |
#host ⇒ Object
Returns the value of attribute host.
11 12 13 |
# File 'lib/rspec/hive/configuration.rb', line 11 def host @host end |
#host_shared_directory_path ⇒ Object
Returns the value of attribute host_shared_directory_path.
11 12 13 |
# File 'lib/rspec/hive/configuration.rb', line 11 def host_shared_directory_path @host_shared_directory_path end |
#logger ⇒ Object
Returns the value of attribute logger.
11 12 13 |
# File 'lib/rspec/hive/configuration.rb', line 11 def logger @logger end |
#port ⇒ Object
Returns the value of attribute port.
11 12 13 |
# File 'lib/rspec/hive/configuration.rb', line 11 def port @port end |