turbo_power 0.6.2 → 0.8.0
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 +1 -1
- data/Gemfile.lock +4 -3
- data/README.md +3 -3
- data/lib/turbo_power/stream_helper.rb +7 -0
- data/lib/turbo_power/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4cbf02ae22de8dee11e7aacb7aaeb45e29463c55f472e7a577da11e9b6ec1b42
|
|
4
|
+
data.tar.gz: cebeef7a54475049a8b125cf273c3b73edaf52834b65b5dcd1d0794d65debfd8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 61a735a799131522fdc30d7f4c692fe46d96186d54d305c4b0855cea430a01b6b92350d99c32f128699415178ccdcc8e73afbdeec57d7dca354d3868158bf3f0
|
|
7
|
+
data.tar.gz: 0be8674ad1f97cb154a90d3f13e8466ae6e01051cdcb5df42b50d721e5440ed45eeb43ff5e656dfbca147d0edad8d89b207eedc4384979e2da5d598fe1f22ebd
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
turbo_power (0.
|
|
4
|
+
turbo_power (0.8.0)
|
|
5
5
|
turbo-rails (>= 1.3.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -116,7 +116,7 @@ GEM
|
|
|
116
116
|
net-smtp
|
|
117
117
|
marcel (1.0.4)
|
|
118
118
|
mini_mime (1.1.5)
|
|
119
|
-
mini_portile2 (2.8.
|
|
119
|
+
mini_portile2 (2.8.8)
|
|
120
120
|
minitest (5.23.1)
|
|
121
121
|
mutex_m (0.2.0)
|
|
122
122
|
net-imap (0.4.12)
|
|
@@ -234,6 +234,7 @@ GEM
|
|
|
234
234
|
zeitwerk (2.6.15)
|
|
235
235
|
|
|
236
236
|
PLATFORMS
|
|
237
|
+
arm64-darwin-24
|
|
237
238
|
java
|
|
238
239
|
x64-mingw32
|
|
239
240
|
x86-mingw32
|
|
@@ -248,7 +249,7 @@ DEPENDENCIES
|
|
|
248
249
|
rubocop (~> 1.21)
|
|
249
250
|
simplecov
|
|
250
251
|
sprockets-rails
|
|
251
|
-
sqlite3
|
|
252
|
+
sqlite3
|
|
252
253
|
turbo_power!
|
|
253
254
|
|
|
254
255
|
BUNDLED WITH
|
data/README.md
CHANGED
|
@@ -48,10 +48,10 @@ Initialize TurboPower in `application.js`:
|
|
|
48
48
|
|
|
49
49
|
```diff
|
|
50
50
|
// application.js
|
|
51
|
-
import
|
|
51
|
+
import { Turbo } from "@hotwired/turbo-rails";
|
|
52
|
+
import TurboPower from "turbo_power";
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
+TurboPower.initialize(Turbo.StreamActions)
|
|
54
|
+
TurboPower.initialize(Turbo.StreamActions);
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
### Installation on a stock Rails 7 install with importmaps
|
|
@@ -113,6 +113,13 @@ module TurboPower
|
|
|
113
113
|
custom_action_all :toggle_css_class, targets: targets, attributes: attributes.merge(classes: classes)
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
+
def toggle_attribute(targets = nil, attribute = "", force = "false", **attributes)
|
|
117
|
+
attribute = attributes[:attribute] || attribute
|
|
118
|
+
force = attributes[:force] || force
|
|
119
|
+
|
|
120
|
+
custom_action_all :toggle_attribute, targets: targets, attributes: attributes.merge(attribute: attribute, force: force)
|
|
121
|
+
end
|
|
122
|
+
|
|
116
123
|
def replace_css_class(targets = nil, from = "", to = "", **attributes)
|
|
117
124
|
from = attributes[:from] || from
|
|
118
125
|
to = attributes[:to] || to
|
data/lib/turbo_power/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: turbo_power
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marco Roth
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-07-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: turbo-rails
|