提交 485f12fe 编写于 作者: M Mikel Lindsaar

Fixed --dev flag for new bundler

上级 d1eed079
......@@ -181,7 +181,7 @@ def apply_rails_template
end
def bundle_if_dev_or_edge
run "gem bundle" if dev_or_edge?
run "bundle install" if dev_or_edge?
end
protected
......
......@@ -7,7 +7,7 @@ gem "rails", "<%= Rails::VERSION::STRING %>"
## Bundle edge rails:
<%- if options.dev? -%>
directory "<%= Rails::Generators::RAILS_DEV_PATH %>", :glob => "{*/,}*.gemspec"
path "<%= Rails::Generators::RAILS_DEV_PATH %>", :glob => "{*/,}*.gemspec"
gem "rails", "<%= Rails::VERSION::STRING %>"
<%- else -%>
<%= "# " unless options.edge? %>gem "rails", :git => "git://github.com/rails/rails.git"
......
......@@ -168,15 +168,15 @@ def test_file_is_added_for_backwards_compatibility
end
def test_dev_option
generator([destination_root], :dev => true).expects(:run).with("gem bundle")
generator([destination_root], :dev => true).expects(:run).with("bundle install")
silence(:stdout){ generator.invoke }
rails_path = File.expand_path('../../..', Rails.root)
dev_gem = %(directory #{rails_path.inspect}, :glob => "{*/,}*.gemspec")
dev_gem = %(path #{rails_path.inspect}, :glob => "{*/,}*.gemspec")
assert_file 'Gemfile', /^#{Regexp.escape(dev_gem)}$/
end
def test_edge_option
generator([destination_root], :edge => true).expects(:run).with("gem bundle")
generator([destination_root], :edge => true).expects(:run).with("bundle install")
silence(:stdout){ generator.invoke }
edge_gem = %(gem "rails", :git => "git://github.com/rails/rails.git")
assert_file 'Gemfile', /^#{Regexp.escape(edge_gem)}$/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册