Skip to content

Commit

Permalink
We need to have 1-0-stable for joureny gem in edge
Browse files Browse the repository at this point in the history
Problem : Edge rails can't bundle
Fixes #7437
  • Loading branch information
arunagw committed Aug 24, 2012
1 parent d5fe242 commit 0ec7b35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions railties/lib/rails/generators/app_base.rb
Expand Up @@ -138,13 +138,13 @@ def rails_gemfile_entry
if options.dev? if options.dev?
<<-GEMFILE.strip_heredoc <<-GEMFILE.strip_heredoc
gem 'rails', :path => '#{Rails::Generators::RAILS_DEV_PATH}' gem 'rails', :path => '#{Rails::Generators::RAILS_DEV_PATH}'
gem 'journey', :git => 'git://github.com/rails/journey.git' gem 'journey', :git => 'git://github.com/rails/journey.git', :branch => '1-0-stable'
gem 'arel', :git => 'git://github.com/rails/arel.git', :branch => '3-0-stable' gem 'arel', :git => 'git://github.com/rails/arel.git', :branch => '3-0-stable'
GEMFILE GEMFILE
elsif options.edge? elsif options.edge?
<<-GEMFILE.strip_heredoc <<-GEMFILE.strip_heredoc
gem 'rails', :git => 'git://github.com/rails/rails.git', :branch => '3-2-stable' gem 'rails', :git => 'git://github.com/rails/rails.git', :branch => '3-2-stable'
gem 'journey', :git => 'git://github.com/rails/journey.git' gem 'journey', :git => 'git://github.com/rails/journey.git', :branch => '1-0-stable'
gem 'arel', :git => 'git://github.com/rails/arel.git', :branch => '3-0-stable' gem 'arel', :git => 'git://github.com/rails/arel.git', :branch => '3-0-stable'
GEMFILE GEMFILE
else else
Expand Down
3 changes: 2 additions & 1 deletion railties/test/generators/shared_generator_tests.rb
Expand Up @@ -120,13 +120,14 @@ def test_dev_option
quietly { generator.invoke_all } quietly { generator.invoke_all }
rails_path = File.expand_path('../../..', Rails.root) rails_path = File.expand_path('../../..', Rails.root)
assert_file 'Gemfile', /^gem\s+["']rails["'],\s+:path\s+=>\s+["']#{Regexp.escape(rails_path)}["']$/ assert_file 'Gemfile', /^gem\s+["']rails["'],\s+:path\s+=>\s+["']#{Regexp.escape(rails_path)}["']$/
assert_file 'Gemfile', %r{^gem\s+["']journey["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/journey.git")}["'],\s+:branch\s+=>\s+["']1-0-stable["']$}
end end


def test_edge_option def test_edge_option
generator([destination_root], :edge => true).expects(:bundle_command).with('install').once generator([destination_root], :edge => true).expects(:bundle_command).with('install').once
quietly { generator.invoke_all } quietly { generator.invoke_all }
assert_file 'Gemfile', %r{^gem\s+["']rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/rails.git")}["'],\s+:branch\s+=>\s+["']3-2-stable["']$} assert_file 'Gemfile', %r{^gem\s+["']rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/rails.git")}["'],\s+:branch\s+=>\s+["']3-2-stable["']$}
assert_file 'Gemfile', %r{^gem\s+["']journey["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/journey.git")}["']$} assert_file 'Gemfile', %r{^gem\s+["']journey["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/journey.git")}["'],\s+:branch\s+=>\s+["']1-0-stable["']$}
assert_file 'Gemfile', %r{^gem\s+["']arel["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/arel.git")}["'].*$} assert_file 'Gemfile', %r{^gem\s+["']arel["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/arel.git")}["'].*$}
end end


Expand Down

0 comments on commit 0ec7b35

Please sign in to comment.