Sha256: a5a6e18daecc9b19fad0735130d9a4895951b44c1c011fb171469ec907419afd

Contents?: true

Size: 821 Bytes

Versions: 45

Compression:

Stored size: 821 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'
    gem 'activerecord'
  end
end

$:.unshift "#{plugin_root}/lib"

Version data entries

45 entries across 45 versions & 3 rubygems

Version Path
backlog-0.37.2 vendor/plugins/will_paginate/test/boot.rb
backlog-0.37.1 vendor/plugins/will_paginate/test/boot.rb
backlog-0.36.2 vendor/plugins/will_paginate/test/boot.rb
amrita2-2.0.1 sample/depot/vendor/plugins/will_paginate/test/boot.rb
amrita2-2.0.2 sample/depot/vendor/plugins/will_paginate/test/boot.rb
backlog-0.17.0 vendor/plugins/will_paginate/test/boot.rb
backlog-0.17.2 vendor/plugins/will_paginate/test/boot.rb
backlog-0.17.1 vendor/plugins/will_paginate/test/boot.rb
backlog-0.17.3 vendor/plugins/will_paginate/test/boot.rb
backlog-0.17.4 vendor/plugins/will_paginate/test/boot.rb
backlog-0.17.5 vendor/plugins/will_paginate/test/boot.rb
backlog-0.17.6 vendor/plugins/will_paginate/test/boot.rb
backlog-0.18.0 vendor/plugins/will_paginate/test/boot.rb
backlog-0.19.0 vendor/plugins/will_paginate/test/boot.rb
backlog-0.20.0 vendor/plugins/will_paginate/test/boot.rb
backlog-0.20.1 vendor/plugins/will_paginate/test/boot.rb
backlog-0.21.0 vendor/plugins/will_paginate/test/boot.rb
backlog-0.21.1 vendor/plugins/will_paginate/test/boot.rb
backlog-0.21.2 vendor/plugins/will_paginate/test/boot.rb
backlog-0.21.3 vendor/plugins/will_paginate/test/boot.rb