Permalink
Browse files

Add thor task for installing bundle with rails-version-specific-gemfile

  • Loading branch information...
1 parent cdf69d0 commit aa1a079f7a198e2eb63ddf0de280707c31eb9edb @dchelimsky dchelimsky committed Apr 16, 2011
Showing with 11 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +9 −0 Thorfile
View
2 .gitignore
@@ -7,5 +7,7 @@ vendor
Gemfile
Gemfile.lock
gemfiles/*.lock
+gemfiles/bin/*
+bin
.rvmrc
*.rbc
View
9 Thorfile
@@ -0,0 +1,9 @@
+class Rails < Thor
+ desc "use VERSION", "installs the bundle using gemfiles/rails-VERSION"
+ def use(version)
+ gemfile = "--gemfile gemfiles/rails-#{version}"
+ say `bundle install #{gemfile} --binstubs`
+ say `bundle #{gemfile} update rails` unless version =~ /^\d\.\d\.\d$/
+ say `ln -s gemfiles/bin` unless File.exist?('bin')
+ end
+end

0 comments on commit aa1a079

Please sign in to comment.