1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Align the GemfileEntry API with stable branches

See 63462ec
This commit is contained in:
Godfrey Chan 2014-12-12 11:23:13 -08:00
parent 4b3792562a
commit 46617f02c6

View file

@ -181,8 +181,12 @@ module Rails
super super
end end
def self.github(name, github, comment = nil) def self.github(name, github, branch = nil, comment = nil)
new(name, nil, comment, github: github) if branch
new(name, nil, comment, github: github, branch: branch)
else
new(name, nil, comment, github: github)
end
end end
def self.version(name, version, comment = nil) def self.version(name, version, comment = nil)
@ -238,7 +242,7 @@ module Rails
gems = [] gems = []
if options.dev? || options.edge? 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') 'Use SCSS for stylesheets')
else else
gems << GemfileEntry.version('sass-rails', '~> 4.0', gems << GemfileEntry.version('sass-rails', '~> 4.0',
@ -265,7 +269,7 @@ module Rails
def console_gemfile_entry def console_gemfile_entry
comment = 'Use Rails Console on the Browser' comment = 'Use Rails Console on the Browser'
if options.dev? || options.edge? if options.dev? || options.edge?
GemfileEntry.github 'web-console', 'rails/web-console', comment GemfileEntry.github 'web-console', 'rails/web-console', nil, comment
else else
[] []
end end
@ -274,7 +278,7 @@ module Rails
def coffee_gemfile_entry def coffee_gemfile_entry
comment = 'Use CoffeeScript for .coffee assets and views' comment = 'Use CoffeeScript for .coffee assets and views'
if options.dev? || options.edge? if options.dev? || options.edge?
GemfileEntry.github 'coffee-rails', 'rails/coffee-rails', comment GemfileEntry.github 'coffee-rails', 'rails/coffee-rails', nil, comment
else else
GemfileEntry.version 'coffee-rails', '~> 4.1.0', comment GemfileEntry.version 'coffee-rails', '~> 4.1.0', comment
end end