Sha256: 693f130080f5cc630f7825988a0e9eea38059600fea685ddc6fff8bc2fa2a74f

Contents?: true

Size: 1002 Bytes

Versions: 13

Compression:

Stored size: 1002 Bytes

Contents

# Detects the current version of Rails that is being used
#
#
# RAILS_VERSION_FILE ||= File.expand_path("../../../.rails-version", __FILE__)

# unless defined? TRAVIS_CONFIG
#   require 'yaml'
#   filename = File.expand_path("../../../.travis.yml", __FILE__)
#   TRAVIS_CONFIG = YAML.load_file filename
#   TRAVIS_RAILS_VERSIONS = TRAVIS_CONFIG['env']['matrix'].grep(/RAILS=(.*)/){ $1 }
# end

# DEFAULT_RAILS_VERSION ||= TRAVIS_RAILS_VERSIONS.first

# def detect_rails_version
#   version = version_from_file || ENV['RAILS'] || DEFAULT_RAILS_VERSION
# ensure
#   puts "Detected Rails: #{version}" if ENV['DEBUG']
# end

# def detect_rails_version!
#   detect_rails_version or raise "can't find a version of Rails to use!"
# end

# def version_from_file
#   if File.exists?(RAILS_VERSION_FILE)
#     version = File.read(RAILS_VERSION_FILE).chomp.strip
#     version unless version == ''
#   end
# end

# def write_rails_version(version)
#   File.open(RAILS_VERSION_FILE, "w+"){|f| f << version }
# end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
yousty-activeadmin-1.0.17.pre spec/support/detect_rails_version.rb
yousty-activeadmin-1.0.16.pre spec/support/detect_rails_version.rb
yousty-activeadmin-1.0.15.pre spec/support/detect_rails_version.rb
yousty-activeadmin-1.0.14.pre spec/support/detect_rails_version.rb
yousty-activeadmin-1.0.13.pre spec/support/detect_rails_version.rb
yousty-activeadmin-1.0.12.pre spec/support/detect_rails_version.rb
yousty-activeadmin-1.0.11.pre spec/support/detect_rails_version.rb
yousty-activeadmin-1.0.10.pre spec/support/detect_rails_version.rb
yousty-activeadmin-1.0.9.pre spec/support/detect_rails_version.rb
yousty-activeadmin-1.0.8.pre spec/support/detect_rails_version.rb
yousty-activeadmin-1.0.7.pre spec/support/detect_rails_version.rb
yousty-activeadmin-1.0.6.pre spec/support/detect_rails_version.rb
yousty-activeadmin-1.0.5.pre spec/support/detect_rails_version.rb