class RkRspec::Config
Public Class Methods
config()
click to toggle source
# File lib/results_keeper_rspec/config.rb, line 17 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(RkRspec::Messages.no_secret_key) default.merge!(opts) end
default()
click to toggle source
# File lib/results_keeper_rspec/config.rb, line 5 def default { project_name: 'Default', report_server_host: 'results-keeper.com', report_server_port: 80, api: { revision_path: 'revisions', test_path: 'tests' } } end
Private Class Methods
default_project_name()
click to toggle source
# File lib/results_keeper_rspec/config.rb, line 29 def default_project_name begin `pwd`.strip.split('/').last rescue 'Default' end end