Skip to content

Commit

Permalink
dependencies, deschmendencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Oct 31, 2010
1 parent 49c87d5 commit deffa66
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 46 deletions.
5 changes: 2 additions & 3 deletions Gemfile
@@ -1,8 +1,7 @@
source "http://rubygems.org"

%w[arel rails].each do |lib|
gem lib, :path => File.expand_path("../vendor/#{lib}", __FILE__)
end
gem 'rails', :path => File.expand_path("../vendor/rails", __FILE__)
gem "rack", :git => "git://github.com/rack/rack.git"

%w[rspec-rails rspec rspec-core rspec-expectations rspec-mocks].each do |lib|
gem lib, :path => File.expand_path("../../#{lib}", __FILE__)
Expand Down
7 changes: 3 additions & 4 deletions Rakefile
@@ -1,9 +1,8 @@
unless File.directory?("vendor/rails") && File.directory?("vendor/arel")
unless File.directory?("vendor/rails")
raise <<-MESSAGE
You need to clone the rails and arel git repositories into ./vendor
before you can use any of the rake tasks.
You need to clone the rails git repository into ./vendor before you can use any
of the rake tasks.
git clone git://github.com/rails/arel.git vendor/arel
git clone git://github.com/rails/rails.git vendor/rails
MESSAGE
Expand Down
37 changes: 6 additions & 31 deletions Thorfile
@@ -1,43 +1,18 @@
class Rails < Thor
VERSIONS = {
:rails => {
"master" => "master",
"3.0.0" => "v3.0.0",
"3.0.1" => "v3.0.1",
"3-0-stable" => "origin/3-0-stable"
},
:arel => {
"master" => "master",
"3.0.0" => "v1.0.0",
"3.0.1" => "v1.0.0",
"3-0-stable" => "master"
}
}

desc "checkout VERSION", "checks it out (and arel)"
desc "checkout VERSION", "checks it out"
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]} ..."
puts "***** checking out rails at #{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]}`
`git checkout #{version}`
`rm Gemfile.lock` if File.exist?('Gemfile.lock')
puts `bundle show`
end
end

desc "fetch", "update vendor/rails and vendor/arel"
desc "fetch", "update vendor/rails"
def fetch
Dir.chdir("vendor/rails") do
`git fetch`
end
Dir.chdir("vendor/arel") do
`git fetch`
end
end
end
12 changes: 4 additions & 8 deletions templates/Gemfile
@@ -1,16 +1,12 @@
source 'http://rubygems.org'

gem 'arel', :path => "../../vendor/arel"
gem 'rails', :path => "../../vendor/rails"

gem 'rails', :path => File.expand_path("../../../vendor/rails", __FILE__)
gem 'sqlite3-ruby', :require => 'sqlite3'

group :development, :test do
gem "rspec-rails", :path => "../../../rspec-rails"
gem "rspec", :path => "../../../rspec"
gem "rspec-core", :path => "../../../rspec-core"
gem "rspec-expectations", :path => "../../../rspec-expectations"
gem "rspec-mocks", :path => "../../../rspec-mocks"
%w[rspec rspec-core rspec-expectations rspec-mocks rspec-rails].each do |lib|
gem lib, :path => File.expand_path("../../../../#{lib}", __FILE__)
end
gem "rcov"
gem "webrat"
gem "autotest"
Expand Down

0 comments on commit deffa66

Please sign in to comment.