Class: RkCucumber::Config
- Inherits:
-
Object
- Object
- RkCucumber::Config
- Defined in:
- lib/results_keeper/config.rb
Class Method Summary collapse
Class Method Details
.config ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/results_keeper/config.rb', line 19 def config opts = {} opts[:report_server_host] = ENV['RK_REPORT_SERVER_HOST'] if ENV['RK_REPORT_SERVER_HOST'] opts[:report_server_port] = ENV['RK_REPORT_SERVER_PORT'] if ENV['RK_REPORT_SERVER_PORT'] opts[:project_name] = ENV['RK_PROJECT_NAME'] || default_project_name opts[:revision_name] = ENV['RK_REVISION_NAME'] || ENV['RK_REVISION_NAME'] = "Result for #{Time.now}" opts[:secret_key] = ENV['RK_SECRET_KEY'] || raise(RkCucumber::Messages.no_secret_key) default.merge!(opts) end |
.default ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/results_keeper/config.rb', line 7 def default { project_name: 'Default', report_server_host: 'results-keeper.com', report_server_port: 80, api: { revision_path: 'revisions', test_path: 'tests' } } end |