mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-10 14:42:35 +01:00
Updated to svn tags/tracks-1.6
This commit is contained in:
parent
103fcb8049
commit
02496f2d44
2274 changed files with 0 additions and 0 deletions
23
vendor/plugins/will_paginate/test/boot.rb
vendored
Normal file
23
vendor/plugins/will_paginate/test/boot.rb
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue