Sha256: 45189b390ff9af3d586cd8633cc4bbf46d89a85a4fe9d3b2c2e87030931392c2

Contents?: true

Size: 934 Bytes

Versions: 33

Compression:

Stored size: 934 Bytes

Contents

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

module Cucumber
  # TODO: Move these constants and the file to Language. Update wiki
  LANGUAGE_FILE = File.expand_path(File.dirname(__FILE__) + '/languages.yml')
  LANGUAGES     = YAML.load_file(LANGUAGE_FILE)
  BINARY        = File.expand_path(File.dirname(__FILE__) + '/../../bin/cucumber')
  LIBDIR        = File.expand_path(File.dirname(__FILE__) + '/../../lib')
  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/
  
  def self.file_mode(m)
    RUBY_1_9 ? "#{m}:UTF-8" : m
  end
end

Version data entries

33 entries across 33 versions & 7 rubygems

Version Path
aslakhellesoy-cucumber-0.3.11.200907091518 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.3.11.5 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.3.11.6 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.3.90 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.3.92 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.3.93.1 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.3.93 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.3.94.1 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.3.94 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.3.95 lib/cucumber/platform.rb
aslakhellesoy-cucumber-0.3.96 lib/cucumber/platform.rb
jwilger-cucumber-0.3.11.200906161550 lib/cucumber/platform.rb
jwilger-cucumber-0.3.11.200907091518 lib/cucumber/platform.rb
kosmas58-cucumber-0.3.11.6 lib/cucumber/platform.rb
kosmas58-cucumber-0.3.90 lib/cucumber/platform.rb
kosmas58-cucumber-0.3.92 lib/cucumber/platform.rb
kosmas58-cucumber-0.3.93.1 lib/cucumber/platform.rb
kosmas58-cucumber-0.3.94 lib/cucumber/platform.rb
kosmas58-cucumber-0.3.95 lib/cucumber/platform.rb
kosmas58-cucumber-0.3.96 lib/cucumber/platform.rb