turbo-rails 2.0.6 → 2.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,20 +0,0 @@
1
- if (cable_config_path = Rails.root.join("config/cable.yml")).exist?
2
- say "Enable redis in bundle"
3
-
4
- gemfile_content = File.read(Rails.root.join("Gemfile"))
5
- pattern = /gem ['"]redis['"]/
6
-
7
- if gemfile_content.match?(pattern)
8
- uncomment_lines "Gemfile", pattern
9
- else
10
- append_file "Gemfile", "\n# Use Redis for Action Cable"
11
- gem 'redis', '~> 4.0'
12
- end
13
-
14
- run_bundle
15
-
16
- say "Switch development cable to use redis"
17
- gsub_file cable_config_path.to_s, /development:\n\s+adapter: async/, "development:\n adapter: redis\n url: redis://localhost:6379/1"
18
- else
19
- say 'ActionCable config file (config/cable.yml) is missing. Uncomment "gem \'redis\'" in your Gemfile and create config/cable.yml to use the Turbo Streams broadcast feature.'
20
- end