Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 15 lines (15 sloc) 0.467 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
class Rails < Thor
  desc "use VERSION", "configures the Gemfile and runs 'bundle install'"
  def use(version)
    `rm Gemfile.lock` if File.exist?('./Gemfile.lock')
    `rm Gemfile` if File.exist?('./Gemfile')
    case version
    when /^\d\.\d/
      `echo 'instance_eval(File.read("./Gemfile-base"))' >> Gemfile`
      `echo 'gem "rails", "#{version}"' >> Gemfile`
    else
      `cp Gemfile-#{version} Gemfile`
    end
    system "bundle install"
  end
end
Something went wrong with that request. Please try again.