aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-12-12 11:23:13 -0800
committerGodfrey Chan <godfreykfc@gmail.com>2014-12-12 11:23:17 -0800
commit46617f02c6e473b7e695330076d2039de1c9aff2 (patch)
treef44155d2aad3e7d89a63f1d4c021f3887b2d0e64
parent4b3792562a90595b33c2ce13cb3fb51949277008 (diff)
downloadrails-46617f02c6e473b7e695330076d2039de1c9aff2.tar.gz
rails-46617f02c6e473b7e695330076d2039de1c9aff2.tar.bz2
rails-46617f02c6e473b7e695330076d2039de1c9aff2.zip
Align the GemfileEntry API with stable branches
See 63462ec
-rw-r--r--railties/lib/rails/generators/app_base.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index 3ea50607a5..4ed7f8ddf5 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -181,8 +181,12 @@ module Rails
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)
@@ -238,7 +242,7 @@ module Rails
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',
@@ -265,7 +269,7 @@ module Rails
def console_gemfile_entry
comment = 'Use Rails Console on the Browser'
if options.dev? || options.edge?
- GemfileEntry.github 'web-console', 'rails/web-console', comment
+ GemfileEntry.github 'web-console', 'rails/web-console', nil, comment
else
[]
end
@@ -274,7 +278,7 @@ module Rails
def coffee_gemfile_entry
comment = 'Use CoffeeScript for .coffee assets and views'
if options.dev? || options.edge?
- GemfileEntry.github 'coffee-rails', 'rails/coffee-rails', comment
+ GemfileEntry.github 'coffee-rails', 'rails/coffee-rails', nil, comment
else
GemfileEntry.version 'coffee-rails', '~> 4.1.0', comment
end