-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
source "http://rubygems.org" | ||
|
||
%w[rspec rspec-core rspec-expectations rspec-mocks rspec-rails].each do |lib| | ||
library_path = File.expand_path("../../#{lib}", __FILE__) | ||
if File.exist?(library_path) | ||
gem lib, :path => library_path | ||
elsif ENV["CI"] || ENV["USE_GIT_REPOS"] | ||
gem lib, :git => "git://github.com/rspec/#{lib}.git" | ||
else | ||
gem lib | ||
end | ||
end | ||
|
||
gem 'rake', '0.9.2' | ||
gem 'rdoc' | ||
gem 'sqlite3-ruby', :require => 'sqlite3' | ||
gem "cucumber", "1.0.0" | ||
gem "aruba", "0.4.2" | ||
gem "ZenTest", "~> 4.4.2" | ||
gem 'ammeter', '~> 0.1' | ||
|
||
platforms :jruby do | ||
gem "jruby-openssl" | ||
end | ||
|
||
# gem "webrat", "0.7.3" | ||
# gem "capybara", "~> 0.4" | ||
# gem "capybara", "1.0.0.beta1" | ||
|
||
group :development do | ||
gem 'gherkin', '2.4.5' | ||
gem "rcov", "0.9.9" | ||
gem "relish", "~> 0.5.0" | ||
gem "guard-rspec", "0.1.9" | ||
|
||
if RUBY_PLATFORM =~ /darwin/ | ||
gem "growl", "1.0.3" | ||
gem "autotest-fsevent", "~> 0.2.4" | ||
gem "autotest-growl", "~> 0.2.9" | ||
end | ||
|
||
platforms :mri_18 do | ||
gem 'ruby-debug' | ||
end | ||
|
||
platforms :mri_19 do | ||
if RUBY_VERSION == '1.9.2' | ||
gem 'linecache19', '~> 0.5.12' | ||
gem 'ruby-debug19', '~> 0.11.6' | ||
gem 'ruby-debug-base19', '~> 0.11.25' | ||
end | ||
end | ||
|
||
platforms :ruby_18, :ruby_19 do | ||
gem "rb-fsevent", "~> 0.3.9" | ||
gem "ruby-prof", "~> 0.9.2" | ||
end | ||
end | ||
|
||
case version = File.read(".rails-version").chomp | ||
when /master/ | ||
gem "rails", :git => "git://github.com/rails/rails.git" | ||
gem "journey", :git => "git://github.com/rails/journey.git" | ||
when /3-0-stable/ | ||
gem "rails", :git => "git://github.com/rails/rails.git", :branch => "3-0-stable" | ||
gem "arel", :git => "git://github.com/rails/arel.git", :branch => "2-0-stable" | ||
when /3-1-stable/ | ||
gem "rails", :git => "git://github.com/rails/rails.git", :branch => "3-1-stable" | ||
else | ||
gem "rails", version | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,16 @@ | ||
class Gemfile < Thor | ||
desc "use VERSION", "installs the bundle using gemfiles/rails-VERSION" | ||
class Version < Thor | ||
desc "use VERSION", "installs the bundle the rails-VERSION" | ||
def use(version) | ||
"rm #{lockfile(version)}".tap do |m| | ||
`rm Gemfile.lock` | ||
`echo #{version} > ./.rails-version` | ||
"bundle install --binstubs".tap do |m| | ||
say m | ||
system m | ||
end | ||
with(version, %w[bundle install --binstubs]) | ||
say `ln -s gemfiles/bin` unless File.exist?('bin') | ||
`echo rails-#{version} > ./.gemfile` | ||
end | ||
|
||
desc "with VERSION COMMAND", "executes COMMAND with the gemfile for VERSION" | ||
def with(version, *command) | ||
gemfile(version).tap do |gemfile| | ||
ENV["BUNDLE_GEMFILE"] = File.expand_path(gemfile) | ||
say "BUNDLE_GEMFILE=#{gemfile}" | ||
end | ||
command.join(' ').tap do |m| | ||
say m | ||
system m | ||
end | ||
end | ||
|
||
desc "which", "print out the configured gemfile" | ||
desc "which", "print out the configured rails version" | ||
def which | ||
say `cat ./.gemfile` | ||
end | ||
|
||
desc "list", "list the available options for 'thor gemfile:use'" | ||
def list | ||
all = `ls gemfiles`.chomp.split.grep(/^rails/).reject {|i| i =~ /lock$/} | ||
|
||
versions = all.grep(/^rails-\d\.\d/) | ||
branches = all - versions | ||
|
||
puts "releases:" | ||
versions.sort.reverse.each {|i| puts i} | ||
puts | ||
puts "branches:" | ||
branches.sort.reverse.each {|i| puts i} | ||
end | ||
|
||
private | ||
|
||
def gemfile(version) | ||
"gemfiles/rails-#{version}" | ||
end | ||
|
||
def lockfile(version) | ||
gemfile(version) + ".lock" | ||
say `cat ./.rails-version` | ||
end | ||
end |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.