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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef9c05689874bd714de2a00b908a1fffeda8964a34b6f491a0e0f0b02efbd511
4
- data.tar.gz: 5a5f03e89bc90ba272a7f16a1a7695106bf786c387cb41e687cc3278bfd89c76
3
+ metadata.gz: 4cbf02ae22de8dee11e7aacb7aaeb45e29463c55f472e7a577da11e9b6ec1b42
4
+ data.tar.gz: cebeef7a54475049a8b125cf273c3b73edaf52834b65b5dcd1d0794d65debfd8
5
5
  SHA512:
6
- metadata.gz: 59d199b2ba89ee134ecd4b18b4c6e3b26929733d8c3f1fbe093af5544c096476e27e473351ff7a637d912c5fd49e809ebb0ec6a08e8474eb96663b4440fffda1
7
- data.tar.gz: 4aced757dab415c650cb9324f37ec1c4a18d94d3b53bf1ec5736d712a2b8ceac80d23bd5fdf9e70844ed908cb860afa24a6d868bd9c8a1a9d32be37f82deccdc
6
+ metadata.gz: 61a735a799131522fdc30d7f4c692fe46d96186d54d305c4b0855cea430a01b6b92350d99c32f128699415178ccdcc8e73afbdeec57d7dca354d3868158bf3f0
7
+ data.tar.gz: 0be8674ad1f97cb154a90d3f13e8466ae6e01051cdcb5df42b50d721e5440ed45eeb43ff5e656dfbca147d0edad8d89b207eedc4384979e2da5d598fe1f22ebd
data/Gemfile CHANGED
@@ -11,5 +11,5 @@ group :test do
11
11
  gem "rails"
12
12
  gem "simplecov"
13
13
  gem "sprockets-rails"
14
- gem "sqlite3", "~> 1.3"
14
+ gem "sqlite3"
15
15
  end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- turbo_power (0.6.2)
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.7)
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 (~> 1.3)
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 * as Turbo from '@hotwired/turbo'
51
+ import { Turbo } from "@hotwired/turbo-rails";
52
+ import TurboPower from "turbo_power";
52
53
 
53
- +import TurboPower from 'turbo_power'
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TurboPower
4
- VERSION = "0.6.2"
4
+ VERSION = "0.8.0"
5
5
  end
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.6.2
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: 2024-06-09 00:00:00.000000000 Z
11
+ date: 2026-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: turbo-rails