turbo_ready 0.0.6 → 0.0.7

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: af0b62fe8b2388d16d3618854cc9d1b00dd1024d3769f5e87c92dce3682586c4
4
- data.tar.gz: 06d53211b87dd4bda3ee292a91860d99c374ffd190dd08650ff8fbe9ad54cfbe
3
+ metadata.gz: 90b6b125376b6d0688698f1c71ef81d37c6bd5b83e757bd8f1d3bc015a2875ef
4
+ data.tar.gz: 84490323da9ab4dfa60deffb52835c66dc83f15d816ecb55c3ec8d515120fffc
5
5
  SHA512:
6
- metadata.gz: 114bd5e422668cf663a9848c499efb350cfacc907b2008f00a2cb55c82d76c9b505e296a68dbc34e8fdaa08a7f13f4da56a1ea6f678a99bead74d854cd6a7f0b
7
- data.tar.gz: 4ca3ba3dc2f673b9dd7d71b5c4ebdd635fca0097c942b7b51718a4eefbe205f3285380b9f6bb9dfe08ec6363a3837417bb3e43106d8c033d021b9d20299bb98d
6
+ metadata.gz: 5c4807de70378922dffad48924b4c5f276f7c85301be6917545bc44707675e6f8a0751d9a73c78d302dfd2c6444aed9df837cc883ca4ac4c06a03e1135a4a1dc
7
+ data.tar.gz: 5a4e86fbf74a8baa4d175e79167c7283e6d8a839fad197f8b2196a9fd87947a1c0daf59b283c899208d82b3e71e95bbdd871b90c83dec0dda00a066754371771
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- turbo_ready (0.0.6)
4
+ turbo_ready (0.0.7)
5
5
  rails (>= 6.1)
6
6
  turbo-rails (>= 1.1)
7
7
 
data/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  </h1>
12
12
  <p align="center">
13
13
  <a href="http://blog.codinghorror.com/the-best-code-is-no-code-at-all/">
14
- <img alt="Lines of Code" src="https://img.shields.io/badge/loc-143-47d299.svg" />
14
+ <img alt="Lines of Code" src="https://img.shields.io/badge/loc-139-47d299.svg" />
15
15
  </a>
16
16
  <a href="https://codeclimate.com/github/hopsoft/turbo_ready/maintainability">
17
17
  <img src="https://api.codeclimate.com/v1/badges/a69b6f73abc3ccd49261/maintainability" />
@@ -169,7 +169,6 @@ turbo_stream
169
169
  .invoke("document.body.insertAdjacentHTML", args: ["afterbegin", "<h1>Hello World!</h1>"]) # dot notation
170
170
  .invoke("setAttribute", args: ["data-turbo-ready", true], selector: ".button") # selector
171
171
  .invoke("classList.add", args: ["turbo-ready"], selector: "a") # dot notation + selector
172
- .flush # call flush when chaining invocations
173
172
  ```
174
173
 
175
174
  ### Dispatching Events
@@ -182,7 +181,6 @@ turbo_stream
182
181
  .invoke("document.dispatchEvent", args: ["turbo-ready:demo"]) # fires on document
183
182
  .invoke("dispatchEvent", args: ["turbo-ready:demo"], selector: "#my-element") # fires on matching element(s)
184
183
  .invoke("dispatchEvent", args: ["turbo-ready:demo", {bubbles: true, detail: {...}}]) # set event options
185
- .flush
186
184
  ```
187
185
 
188
186
  ### Syntax Styles
@@ -252,14 +250,14 @@ turbo_stream
252
250
  The following Ruby code,
253
251
 
254
252
  ```ruby
255
- turbo_stream.invoke "console.log", args: ["Hello World!"], id: "1"
253
+ turbo_stream.invoke "console.log", args: ["Hello World!"], id: "123ABC"
256
254
  ```
257
255
 
258
256
  emits this HTML markup.
259
257
 
260
258
  ```html
261
259
  <turbo-stream action="invoke" target="DOM">
262
- <template>{"id":"1","receiver":"console","method":"log","args":["Hello World!"]}</template>
260
+ <template>{"id":"123ABC","receiver":"console","method":"log","args":["Hello World!"]}</template>
263
261
  </turbo-stream>
264
262
  ```
265
263
 
data/bin/loc CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/bin/bash
2
2
 
3
- cloc --exclude-ext=svg app lib
3
+ cloc --exclude-dir=assets app lib
@@ -16,14 +16,10 @@ class TurboReady::StringWrapper
16
16
  TurboReady::StringWrapper.new turbo_stream_invoke_tag(...), turbo_stream_strings: turbo_stream_strings
17
17
  end
18
18
 
19
- def flush
19
+ def to_s
20
20
  turbo_stream_strings.to_a.join("\n").html_safe
21
- ensure
22
- turbo_stream_strings.clear
23
21
  end
24
22
 
25
- alias_method :to_s, :flush
26
-
27
23
  private
28
24
 
29
25
  def turbo_stream_strings
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TurboReady
4
- VERSION = "0.0.6"
4
+ VERSION = "0.0.7"
5
5
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turbo_ready",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
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",