turbo_ready 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +3 -5
- data/bin/loc +1 -1
- data/lib/turbo_ready/string_wrapper.rb +1 -5
- data/lib/turbo_ready/version.rb +1 -1
- data/package.json +1 -1
- data/yarn-error.log +3003 -11
- data/yarn.lock +133 -133
- metadata +2 -3
- data/README.md.orig +0 -292
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90b6b125376b6d0688698f1c71ef81d37c6bd5b83e757bd8f1d3bc015a2875ef
|
4
|
+
data.tar.gz: 84490323da9ab4dfa60deffb52835c66dc83f15d816ecb55c3ec8d515120fffc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c4807de70378922dffad48924b4c5f276f7c85301be6917545bc44707675e6f8a0751d9a73c78d302dfd2c6444aed9df837cc883ca4ac4c06a03e1135a4a1dc
|
7
|
+
data.tar.gz: 5a4e86fbf74a8baa4d175e79167c7283e6d8a839fad197f8b2196a9fd87947a1c0daf59b283c899208d82b3e71e95bbdd871b90c83dec0dda00a066754371771
|
data/Gemfile.lock
CHANGED
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-
|
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: "
|
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":"
|
260
|
+
<template>{"id":"123ABC","receiver":"console","method":"log","args":["Hello World!"]}</template>
|
263
261
|
</turbo-stream>
|
264
262
|
```
|
265
263
|
|
data/bin/loc
CHANGED
@@ -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
|
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
|
data/lib/turbo_ready/version.rb
CHANGED
data/package.json
CHANGED