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.
- checksums.yaml +4 -4
- data/README.md +69 -1
- data/app/assets/javascripts/turbo.js +1991 -1914
- data/app/assets/javascripts/turbo.min.js +6 -6
- data/app/assets/javascripts/turbo.min.js.map +1 -1
- data/app/helpers/turbo/streams_helper.rb +6 -0
- data/app/javascript/turbo/cable_stream_source_element.js +10 -0
- data/app/models/concerns/turbo/broadcastable.rb +32 -22
- data/app/models/turbo/streams/tag_builder.rb +26 -34
- data/config/routes.rb +3 -3
- data/lib/tasks/turbo_tasks.rake +0 -22
- data/lib/turbo/engine.rb +51 -6
- data/lib/turbo/system_test_helper.rb +128 -0
- data/lib/turbo/version.rb +1 -1
- metadata +3 -17
- data/lib/install/turbo_needs_redis.rb +0 -20
@@ -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
|