turbo_ready 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b07e0ce9c51b2f3bc6fab5d95f97266115e1faa7347aae49650e3218f21c9d65
4
- data.tar.gz: 589586d61a2c1845dbbabdf19a5ab13b03ef3c06b9ebe7522edab8cdfa9ac9dd
3
+ metadata.gz: 49adf06ca42cd8446e06096b63f685f0ccd145309e0b7a3a44b3f6a3814888cf
4
+ data.tar.gz: '01680461dbe9c06341d3f37e7376ead03a961edcd5793d121db60c436f768352'
5
5
  SHA512:
6
- metadata.gz: 1c49feb4f8599ce6cd57021fca945fc72df43b9e71202a6c03f4bd7b64f948d09eb8bb7788e5a0fb43a614a37f4ddc210fa919ae79e8437f178a1ced9a76edf2
7
- data.tar.gz: b2ad53e8b8799c804f5cfd87dbb5920166943029d524da9a48df8b91f2e23d31fda431e89a047763301ef205d0930bf56e12402b5dfaaa919a366cf702fca1c9
6
+ metadata.gz: 22bf305821c44a16923d89bbd7a5844a15a6e39b331d76011199ee062cfcbfd32fa06b44bbbaaa8f794fbffbec733aef44e07d14dcbf81146f208b8ec2238bc0
7
+ data.tar.gz: c7b3acb2078e06f0455f17d068796550304c2989a8d3c03d1d1e8c729a90f4811eec9dc854a7d195abf9da02c4e0b6237a1474550b79453ace208e1cea1510cb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- turbo_ready (0.0.4)
4
+ turbo_ready (0.0.5)
5
5
  rails (>= 6.1)
6
6
  turbo-rails (>= 1.1)
7
7
 
data/README.md CHANGED
@@ -99,13 +99,7 @@ yarn add "turbo_ready@VERSION --exact"
99
99
 
100
100
  ## Setup
101
101
 
102
- 1. Create a Rails intializer and patch Turbo.
103
-
104
- ```ruby
105
- # config/initializers/turbo_ready.rb
106
- TurboReady.patch! # Adds TurboReady stream actions to Turbo
107
- ```
108
- 2. Import and intialize TurboReady in your JavaScript application.
102
+ 1. Import and intialize TurboReady in your JavaScript application.
109
103
 
110
104
  ```js
111
105
  // app/javascript/application.js
@@ -228,7 +222,7 @@ and [StimulusReflex](https://github.com/stimulusreflex/stimulus_reflex).
228
222
 
229
223
  Restrict your direct application usage to DOM manipulation that falls outside the purview of
230
224
  [Turbo's official actions](https://turbo.hotwired.dev/reference/streams#the-seven-actions)...
231
- *and for Pete's sake, don't overdo it and find yourself maintaining spaghetti code reminiscent of the jQuery days.*
225
+ *don't overdo it and find yourself maintaining spaghetti code reminiscent of the jQuery days.*
232
226
 
233
227
  ## Releasing
234
228
 
@@ -2,5 +2,11 @@
2
2
 
3
3
  module TurboReady
4
4
  class Railtie < ::Rails::Railtie
5
+ initializer "turbo_ready.patch" do
6
+ ::ActiveSupport.on_load(:action_cable) do
7
+ # Adds TurboReady stream actions to Turbo
8
+ TurboReady.patch!
9
+ end
10
+ end
5
11
  end
6
12
  end
@@ -5,7 +5,6 @@ module TurboReady
5
5
  attr_reader :ruby_string, :turbo_ready_tag_builder
6
6
 
7
7
  delegate_missing_to :ruby_string
8
- delegate :to_s, to: :ruby_string
9
8
 
10
9
  def initialize(ruby_string, turbo_ready_tag_builder:)
11
10
  @ruby_string = ruby_string
@@ -32,5 +31,7 @@ module TurboReady
32
31
  ensure
33
32
  turbo_ready_tags.clear
34
33
  end
34
+
35
+ alias_method :to_s, :flush
35
36
  end
36
37
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TurboReady
4
- VERSION = "0.0.4"
4
+ VERSION = "0.0.5"
5
5
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turbo_ready",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Take full control of the DOM with Turbo Streams",
5
5
  "main": "app/assets/builds/turbo_ready.js",
6
6
  "repository": "https://github.com/hopsoft/turbo_ready",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbo_ready
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Hopkins (hopsoft)