aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/app_base.rb
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2016-01-15 21:28:13 -0500
committerJon Moss <me@jonathanmoss.me>2016-01-18 18:59:31 -0500
commit980e01eb100b38e39791f7f930a038ecaf7c02da (patch)
treed79a7b9e65f68aba58cf2e5291cbe4075c186aa8 /railties/lib/rails/generators/app_base.rb
parent67af248d51e9f5f56911c80855d4b14642582ea8 (diff)
downloadrails-980e01eb100b38e39791f7f930a038ecaf7c02da.tar.gz
rails-980e01eb100b38e39791f7f930a038ecaf7c02da.tar.bz2
rails-980e01eb100b38e39791f7f930a038ecaf7c02da.zip
Add em-hiredis and redis as default Gems for new applications
Diffstat (limited to 'railties/lib/rails/generators/app_base.rb')
-rw-r--r--railties/lib/rails/generators/app_base.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index 297ccb1dbf..c629459d95 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -117,6 +117,7 @@ module Rails
javascript_gemfile_entry,
jbuilder_gemfile_entry,
psych_gemfile_entry,
+ cable_gemfile_entry,
@extra_entries].flatten.find_all(&@gem_filter)
end
@@ -339,6 +340,15 @@ module Rails
GemfileEntry.new('psych', '~> 2.0', comment, platforms: :rbx)
end
+ def cable_gemfile_entry
+ return [] if options[:skip_action_cable]
+ comment = 'Action Cable dependencies for the Redis adapter'
+ gems = []
+ gems << GemfileEntry.new("em-hiredis", '~> 0.3.0', comment)
+ gems << GemfileEntry.new("redis", '~> 3.0', comment)
+ gems
+ end
+
def bundle_command(command)
say_status :run, "bundle #{command}"