Sha256: 6b246aedd90e2325914561ae99313c54e4adee6982d1293a2ef6f00a560c4cdc

Contents?: true

Size: 937 Bytes

Versions: 15

Compression:

Stored size: 937 Bytes

Contents

# Detect the platform we're running on so we can tweak behaviour
# in various places.
require 'rbconfig'

module Cucumber
  LANGUAGE_FILE = File.expand_path(File.dirname(__FILE__) + '/languages.yml')
  BINARY        = File.expand_path(File.dirname(__FILE__) + '/../../bin/cucumber')
  JRUBY         = defined?(JRUBY_VERSION)
  IRONRUBY      = Config::CONFIG['sitedir'] =~ /IronRuby/
  WINDOWS       = Config::CONFIG['host_os'] =~ /mswin|mingw/
  WINDOWS_MRI   = WINDOWS && !JRUBY && !IRONRUBY
  RAILS         = defined?(Rails)
  RUBY_BINARY   = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name'])
  RUBY_1_9      = RUBY_VERSION =~ /^1\.9/

  class << self
    attr_reader :language
    
    def load_language(lang)
      @language = config[lang]
    end
    
    def languages
      config.keys.sort
    end
    
    def config
      require 'yaml'
      @config ||= YAML.load_file(LANGUAGE_FILE)
    end
  end  
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
aslakhellesoy-cucumber-0.1.14.1 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.1.14.2 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.1.15 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.1.16.1 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.1.16.2 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.1.16.3 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.1.16.4 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.1.16 lib/cucumber/platform.rb
kosmas58-cucumber-0.1.16.5 lib/cucumber/platform.rb
kosmas58-cucumber-0.1.16.6 lib/cucumber/platform.rb
cucumber-0.1.14 lib/cucumber/platform.rb
cucumber-0.1.15 lib/cucumber/platform.rb
cucumber-0.1.16 lib/cucumber/platform.rb
mack-0.8.3.1 lib/gems/cucumber-0.1.15/lib/cucumber/platform.rb
mack-0.8.3 lib/gems/cucumber-0.1.15/lib/cucumber/platform.rb