Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 16 lines (15 sloc) 0.467 kb
5aba0cd @dchelimsky add some thor tasks to help with development
dchelimsky authored
1 class Rails < Thor
15edeb4 @dchelimsky dev: make the rails version setup more generic
dchelimsky authored
2 desc "use VERSION", "configures the Gemfile and runs 'bundle install'"
25407a8 @dchelimsky separate Gemfiles for different versions of rails
dchelimsky authored
3 def use(version)
15edeb4 @dchelimsky dev: make the rails version setup more generic
dchelimsky authored
4 `rm Gemfile.lock` if File.exist?('./Gemfile.lock')
5 `rm Gemfile` if File.exist?('./Gemfile')
6 case version
7 when /^\d\.\d/
8 `echo 'instance_eval(File.read("./Gemfile-base"))' >> Gemfile`
9 `echo 'gem "rails", "#{version}"' >> Gemfile`
10 else
11 `cp Gemfile-#{version} Gemfile`
12 end
00b7ed1 @dchelimsky dev: add bundle install to thor rails:use
dchelimsky authored
13 system "bundle install"
25407a8 @dchelimsky separate Gemfiles for different versions of rails
dchelimsky authored
14 end
5aba0cd @dchelimsky add some thor tasks to help with development
dchelimsky authored
15 end
Something went wrong with that request. Please try again.