Sha256: ca6443105c7fa3c3c380c903ea6713f05a564651dfaaa2fcc3ab184f2693e4c1

Contents?: true

Size: 813 Bytes

Versions: 9

Compression:

Stored size: 813 Bytes

Contents

plugin_root = File.join(File.dirname(__FILE__), '..')
version = ENV['RAILS_VERSION']
version = nil if version and version == ""

# first look for a symlink to a copy of the framework
if !version and framework_root = ["#{plugin_root}/rails", "#{plugin_root}/../../rails"].find { |p| File.directory? p }
  puts "found framework root: #{framework_root}"
  # this allows for a plugin to be tested outside of an app and without Rails gems
  $:.unshift "#{framework_root}/activesupport/lib", "#{framework_root}/activerecord/lib", "#{framework_root}/actionpack/lib"
else
  # simply use installed gems if available
  puts "using Rails#{version ? ' ' + version : nil} gems"
  require 'rubygems'
  
  if version
    gem 'rails', version
  else
    gem 'actionpack', '< 3.0.0.a'
    gem 'activerecord', '< 3.0.0.a'
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ar_to_html_table-0.2.0 test/boot.rb
ar_to_html_table-0.1.9 test/boot.rb
ar_to_html_table-0.1.8 test/boot.rb
ar_to_html_table-0.1.7 test/boot.rb
ar_to_html_table-0.1.6 test/boot.rb
ar_to_html_table-0.1.5 test/boot.rb
ar_to_html_table-0.1.4 test/boot.rb
ar_to_html_table-0.1.3 test/boot.rb
ar_to_html_table-0.1.2 test/boot.rb