turbo-rails 1.0.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +15 -2
- data/app/assets/javascripts/turbo.js +1235 -557
- data/app/assets/javascripts/turbo.min.js +6 -6
- data/app/assets/javascripts/turbo.min.js.map +1 -1
- data/app/channels/turbo/streams/broadcasts.rb +1 -1
- data/app/controllers/turbo/frames/frame_request.rb +15 -7
- data/app/controllers/turbo/native/navigation.rb +3 -1
- data/app/helpers/turbo/drive_helper.rb +16 -3
- data/app/helpers/turbo/frames_helper.rb +14 -2
- data/app/helpers/turbo/streams/action_helper.rb +8 -6
- data/app/helpers/turbo/streams_helper.rb +5 -0
- data/app/javascript/turbo/cable_stream_source_element.js +19 -3
- data/app/javascript/turbo/fetch_requests.js +50 -0
- data/app/javascript/turbo/index.js +4 -0
- data/app/javascript/turbo/snakeize.js +31 -0
- data/app/models/concerns/turbo/broadcastable.rb +38 -13
- data/app/models/turbo/streams/tag_builder.rb +6 -4
- data/app/views/layouts/turbo_rails/frame.html.erb +8 -0
- data/lib/tasks/turbo_tasks.rake +3 -1
- data/lib/turbo/engine.rb +6 -4
- data/lib/turbo/test_assertions.rb +10 -4
- data/lib/turbo/version.rb +1 -1
- metadata +20 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40ccdc123db34929af83c559e6bf6c65ca3027b5fd765546143f6093d34662a7
|
4
|
+
data.tar.gz: 7236691e0dbf00c61fb51039212c9316b7d0fc5d03370e939c5c318b56ab70c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7b6bdb711d3e712ac96bd52fc6f909d2ea5beaa2ba664d10e4678792afc58bb61ecce45ccb9b745e8f3706e5221917c754c2a461caff4be864e294050aba10d
|
7
|
+
data.tar.gz: a6d86dc5249f31161e4f7c3e31cfcda725b1173f0c63348c81f0cd62135688408b4b963540f80564d5eec1fb86f7601090e24c00ed5a55fa5e9c5277a18d75a4
|
data/README.md
CHANGED
@@ -32,7 +32,7 @@ Turbo reinvents the old HTML technique of frames without any of the drawbacks th
|
|
32
32
|
|
33
33
|
It also makes it dead easy to carve a single page into smaller pieces that can all live on their own cache timeline. While the bulk of the page might easily be cached between users, a small personalized toolbar perhaps cannot. With Turbo::Frames, you can designate the toolbar as a frame, which will be **lazy-loaded automatically** by the publicly-cached root page. This means simpler pages, easier caching schemes with fewer dependent keys, and all without needing to write a lick of custom JavaScript.
|
34
34
|
|
35
|
-
This gem provides a `turbo_frame_tag` helper to create those
|
35
|
+
This gem provides a `turbo_frame_tag` helper to create those frames.
|
36
36
|
|
37
37
|
For instance:
|
38
38
|
```erb
|
data/Rakefile
CHANGED
@@ -9,7 +9,20 @@ load "rails/tasks/statistics.rake"
|
|
9
9
|
Rake::TestTask.new do |test|
|
10
10
|
test.libs << "test"
|
11
11
|
test.test_files = FileList["test/**/*_test.rb"]
|
12
|
-
test.warning = false
|
13
12
|
end
|
14
13
|
|
15
|
-
task
|
14
|
+
task :test_prereq do
|
15
|
+
puts "Installing Ruby dependencies"
|
16
|
+
`bundle install`
|
17
|
+
|
18
|
+
puts "Installing JavaScript dependencies"
|
19
|
+
`yarn install`
|
20
|
+
|
21
|
+
puts "Building JavaScript"
|
22
|
+
`yarn build`
|
23
|
+
|
24
|
+
puts "Preparing test database"
|
25
|
+
`cd test/dummy; ./bin/rails db:test:prepare; cd ../..`
|
26
|
+
end
|
27
|
+
|
28
|
+
task default: [:test_prereq, :test]
|