Sha256: 2f0a76288ff9251478fbd75931411e5d8c3e98a9ef6d845296edf37637459863

Contents?: true

Size: 604 Bytes

Versions: 21

Compression:

Stored size: 604 Bytes

Contents

module Cucumber
  module WireSupport
    class Configuration
      attr_reader :host, :port
      
      def initialize(wire_file)
        params = YAML.load_file(wire_file)
        @host = params['host']
        @port = params['port']
        @timeouts = default_timeouts.merge(params['timeout'] || {})
      end
      
      def timeout(message = nil)
        return @timeouts[message.to_s] || 3
      end
      
      private
      
      def default_timeouts
        {
          'invoke' => 120,
          'begin_scenario' => 120,
          'end_scenario' => 120
        }
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
cucumber-0.8.7 lib/cucumber/wire_support/configuration.rb
cucumber-0.8.5 lib/cucumber/wire_support/configuration.rb
cucumber-0.8.4 lib/cucumber/wire_support/configuration.rb
cucumber-0.8.3 lib/cucumber/wire_support/configuration.rb
cucumber-0.8.2 lib/cucumber/wire_support/configuration.rb
cucumber-0.8.1 lib/cucumber/wire_support/configuration.rb
cucumber-0.8.0 lib/cucumber/wire_support/configuration.rb
cucumber-0.7.3 lib/cucumber/wire_support/configuration.rb
cucumber-0.7.2 lib/cucumber/wire_support/configuration.rb
cucumber-0.7.1 lib/cucumber/wire_support/configuration.rb
cucumber-0.7.0 lib/cucumber/wire_support/configuration.rb
cucumber-0.7.0.beta.8 lib/cucumber/wire_support/configuration.rb
cucumber-0.7.0.beta.7 lib/cucumber/wire_support/configuration.rb
cucumber-0.7.0.beta.6 lib/cucumber/wire_support/configuration.rb
cucumber-0.7.0.beta.5 lib/cucumber/wire_support/configuration.rb
cucumber-0.7.0.beta.4 lib/cucumber/wire_support/configuration.rb
cucumber-0.7.0.beta.3 lib/cucumber/wire_support/configuration.rb
cucumber-0.7.0.beta.2 lib/cucumber/wire_support/configuration.rb
cucumber-0.7.0.beta.1 lib/cucumber/wire_support/configuration.rb
cucumber-0.6.4 lib/cucumber/wire_support/configuration.rb