Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tag: v2.0.0
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (37 sloc) 1.018 kB
class Rails < Thor
VERSIONS = {
:rails => {
"3.0.0" => "v3.0.0",
"master" => "master",
"3-0-stable" => "origin/3-0-stable"
},
:arel => {
"3.0.0" => "v1.0.0",
"master" => "master",
"3-0-stable" => "master"
}
}
desc "checkout VERSION", "checks it out (and arel)"
def checkout(version)
unless VERSIONS[:rails].has_key?(version)
raise "\n#{"*"*50}\nvalid versions are: #{VERSIONS[:rails].keys.join(", ")}\n#{"*"*50}\n"
end
puts "***** checking out rails at #{VERSIONS[:rails][version]} ..."
Dir.chdir("vendor/rails") do
`git checkout #{VERSIONS[:rails][version]}`
end
puts "***** checking out arel at #{VERSIONS[:arel][version]} ..."
Dir.chdir("vendor/arel") do
`git checkout #{VERSIONS[:arel][version]}`
end
end
desc "fetch", "update vendor/rails and vendor/arel"
def fetch
Dir.chdir("vendor/rails") do
`git fetch`
end
Dir.chdir("vendor/arel") do
`git fetch`
end
end
end
Jump to Line
Something went wrong with that request. Please try again.