Sha256: 883345c8dcbe07b745a27552ab8790ea452bd2979efd239fb1a7d837e7e786df

Contents?: true

Size: 1.21 KB

Versions: 8

Compression:

Stored size: 1.21 KB

Contents

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

module Cucumber
  version       = YAML.load_file(File.dirname(__FILE__) + '/../../VERSION.yml')
  VERSION       = "#{version[:major]}.#{version[:minor]}.#{version[:patch]}"
  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      = defined?(RUBY_ENGINE) && RUBY_ENGINE == "ironruby"
  WINDOWS       = Config::CONFIG['host_os'] =~ /mswin|mingw/
  OS_X          = Config::CONFIG['host_os'] =~ /darwin/
  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/
  RUBY_1_8_7    = RUBY_VERSION =~ /^1\.8\.7/

  class << self
    attr_accessor :use_full_backtrace

    def file_mode(m) #:nodoc:
      RUBY_1_9 ? "#{m}:UTF-8" : m
    end
  end
  self.use_full_backtrace = false
end

Version data entries

8 entries across 8 versions & 4 rubygems

Version Path
kbaum-cucumber-0.4.5.pre lib/cucumber/platform.rb
cucumber-0.4.5.rc1 lib/cucumber/platform.rb
middleman-0.10.17 vendor/gems/gems/cucumber-0.4.4/lib/cucumber/platform.rb
middleman-0.10.16 vendor/gems/gems/cucumber-0.4.4/lib/cucumber/platform.rb
middleman-0.10.15 vendor/gems/gems/cucumber-0.4.4/lib/cucumber/platform.rb
rackjour-0.1.8 vendor/gems/gems/cucumber-0.4.4/lib/cucumber/platform.rb
middleman-0.10.14 vendor/gems/gems/cucumber-0.4.4/lib/cucumber/platform.rb
cucumber-0.4.4 lib/cucumber/platform.rb