提交 63462ec9 编写于 作者: G Godfrey Chan

--edge on 4-2-stable should track the 4-2-stable branch

See 24e1fff7
上级 02e11e05
......@@ -180,8 +180,12 @@ def initialize(name, version, comment, options = {}, commented_out = false)
super
end
def self.github(name, github, comment = nil)
new(name, nil, comment, github: github)
def self.github(name, github, branch = nil, comment = nil)
if branch
new(name, nil, comment, github: github, branch: branch)
else
new(name, nil, comment, github: github)
end
end
def self.version(name, version, comment = nil)
......@@ -197,7 +201,7 @@ def rails_gemfile_entry
if options.dev?
[GemfileEntry.path('rails', Rails::Generators::RAILS_DEV_PATH)]
elsif options.edge?
[GemfileEntry.github('rails', 'rails/rails')]
[GemfileEntry.github('rails', 'rails/rails', '4-2-stable')]
else
[GemfileEntry.version('rails',
Rails::VERSION::STRING,
......@@ -237,7 +241,7 @@ def assets_gemfile_entry
gems = []
if options.dev? || options.edge?
gems << GemfileEntry.github('sass-rails', 'rails/sass-rails',
gems << GemfileEntry.github('sass-rails', 'rails/sass-rails', nil,
'Use SCSS for stylesheets')
else
gems << GemfileEntry.version('sass-rails', '~> 4.0',
......
......@@ -112,7 +112,7 @@ def test_dev_option
def test_edge_option
assert_generates_with_bundler edge: true
assert_file 'Gemfile', %r{^gem\s+["']rails["'],\s+github:\s+["']#{Regexp.escape("rails/rails")}["']$}
assert_file 'Gemfile', %r{^gem\s+["']rails["'],\s+github:\s+["']#{Regexp.escape("rails/rails")}["'],\s+branch:\s+["']#{Regexp.escape("4-2-stable")}["']$$}
end
def test_skip_gemfile
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册