Sha256: 8f3f5931eb4cab3254b39e3fd83f6ebbf33a0541fdc5412df801bd6b991c45f5

Contents?: true

Size: 874 Bytes

Versions: 3

Compression:

Stored size: 874 Bytes

Contents

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

module Cucumber
  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) #:nodoc:
    RUBY_1_9 ? "#{m}:UTF-8" : m
  end
end

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
aslakhellesoy-cucumber-0.3.97 lib/cucumber/platform.rb
kosmas58-cucumber-0.3.97 lib/cucumber/platform.rb
cucumber-0.3.97 lib/cucumber/platform.rb