turbo_power 0.1.3 → 0.1.5

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: 73bf4679bb4712b484fa9d001b22bfb2e57876cf017e0d35558861f876a89e11
4
- data.tar.gz: f5bdffd12145b20b8af6082fcbf6a192a577bdb18f9398ec13462c14bb415443
3
+ metadata.gz: 379fda8d863682b5df68a6327c7938bd613c432dd1e5c97306e7d9e8ad28463b
4
+ data.tar.gz: 678bdcad96b093b5684a04a07bff8394941adb079bff5210774cb436fb87d6f4
5
5
  SHA512:
6
- metadata.gz: 01474ffee50a0511a12b57f0c5e8447103a5b3d7970b50497091bd181c2e7427e251e2c3163f2456ce76cff01d7ba790a75babdb97f02c165233ee15a9159c42
7
- data.tar.gz: 063b9f28b2996276dde7ce83faa87fabcc25ebcf6bf658987721e591df5572a9e5aa5656c0bcff94fcf2bbfe529266dca5524ee7c8b2715fc08a134b36c6ede9
6
+ metadata.gz: 1aed7e3e61ce36fd5b973fe5bd1f61bfadf0be2e736f8409a970a46364fffcbbfcb43ff3819538fe996ce8293399f986d21b1c3a790423032b5f77a3012e3ed1
7
+ data.tar.gz: 49da0daa9678e58cbdcd76184bda70a8bdc7d7a086bba04de6e3dd1c258410b486f69d5d389333c5889c41bce2c1b807ddd3b1723a9b6a41701906208dace606
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- turbo_power (0.1.3)
4
+ turbo_power (0.1.5)
5
5
  turbo-rails (~> 1.3.0)
6
6
  turbo_ready
7
7
 
@@ -77,7 +77,6 @@ GEM
77
77
  builder (3.2.4)
78
78
  concurrent-ruby (1.1.10)
79
79
  crass (1.0.6)
80
- digest (3.1.0)
81
80
  erubi (1.11.0)
82
81
  globalid (1.0.0)
83
82
  activesupport (>= 5.0)
@@ -93,24 +92,16 @@ GEM
93
92
  method_source (1.0.0)
94
93
  mini_mime (1.1.2)
95
94
  minitest (5.16.3)
96
- net-imap (0.2.3)
97
- digest
95
+ net-imap (0.3.1)
98
96
  net-protocol
99
- strscan
100
- net-pop (0.1.1)
101
- digest
97
+ net-pop (0.1.2)
102
98
  net-protocol
103
- timeout
104
99
  net-protocol (0.1.3)
105
100
  timeout
106
- net-smtp (0.3.1)
107
- digest
101
+ net-smtp (0.3.3)
108
102
  net-protocol
109
- timeout
110
103
  nio4r (2.5.8)
111
- nokogiri (1.13.8-x86_64-darwin)
112
- racc (~> 1.4)
113
- nokogiri (1.13.8-x86_64-linux)
104
+ nokogiri (1.13.9-x86_64-darwin)
114
105
  racc (~> 1.4)
115
106
  parallel (1.22.1)
116
107
  parser (3.1.2.1)
@@ -147,19 +138,19 @@ GEM
147
138
  zeitwerk (~> 2.5)
148
139
  rainbow (3.1.1)
149
140
  rake (13.0.6)
150
- regexp_parser (2.5.0)
141
+ regexp_parser (2.6.0)
151
142
  rexml (3.2.5)
152
- rubocop (1.35.1)
143
+ rubocop (1.38.0)
153
144
  json (~> 2.3)
154
145
  parallel (~> 1.10)
155
146
  parser (>= 3.1.2.1)
156
147
  rainbow (>= 2.2.2, < 4.0)
157
148
  regexp_parser (>= 1.8, < 3.0)
158
149
  rexml (>= 3.2.5, < 4.0)
159
- rubocop-ast (>= 1.20.1, < 2.0)
150
+ rubocop-ast (>= 1.23.0, < 2.0)
160
151
  ruby-progressbar (~> 1.7)
161
152
  unicode-display_width (>= 1.4.0, < 3.0)
162
- rubocop-ast (1.21.0)
153
+ rubocop-ast (1.23.0)
163
154
  parser (>= 3.1.1.0)
164
155
  ruby-progressbar (1.11.0)
165
156
  sprockets (4.1.1)
@@ -169,29 +160,26 @@ GEM
169
160
  actionpack (>= 5.2)
170
161
  activesupport (>= 5.2)
171
162
  sprockets (>= 3.0.0)
172
- sqlite3 (1.5.0-x86_64-darwin)
173
- sqlite3 (1.5.0-x86_64-linux)
174
- strscan (3.0.4)
163
+ sqlite3 (1.5.3-x86_64-darwin)
175
164
  thor (1.2.1)
176
165
  timeout (0.3.0)
177
- turbo-rails (1.3.0)
166
+ turbo-rails (1.3.2)
178
167
  actionpack (>= 6.0.0)
179
168
  activejob (>= 6.0.0)
180
169
  railties (>= 6.0.0)
181
- turbo_ready (0.1.0)
170
+ turbo_ready (0.1.2)
182
171
  rails (>= 6.1)
183
172
  turbo-rails (>= 1.1)
184
173
  tzinfo (2.0.5)
185
174
  concurrent-ruby (~> 1.0)
186
- unicode-display_width (2.2.0)
175
+ unicode-display_width (2.3.0)
187
176
  websocket-driver (0.7.5)
188
177
  websocket-extensions (>= 0.1.0)
189
178
  websocket-extensions (0.1.5)
190
- zeitwerk (2.6.0)
179
+ zeitwerk (2.6.4)
191
180
 
192
181
  PLATFORMS
193
182
  x86_64-darwin-19
194
- x86_64-linux
195
183
 
196
184
  DEPENDENCIES
197
185
  rake (~> 13.0)
@@ -201,4 +189,4 @@ DEPENDENCIES
201
189
  turbo_power!
202
190
 
203
191
  BUNDLED WITH
204
- 2.3.19
192
+ 2.3.22
data/README.md CHANGED
@@ -54,6 +54,37 @@ import * as Turbo from '@hotwired/turbo'
54
54
  +TurboPower.initialize(Turbo.StreamActions)
55
55
  ```
56
56
 
57
+ ### Installation on a stock Rails 7 install with importmaps
58
+
59
+ 1. `./bin/importmap pin turbo_power`
60
+
61
+ 2. You'll then have to make sure the following files are modified as such:
62
+
63
+ **config/importmaps.rb**
64
+ ```diff
65
+ pin "application", preload: true
66
+ - pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
67
+ + pin "@hotwired/turbo", to: "turbo.min.js", preload: true
68
+ pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
69
+ pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
70
+ - pin "@hotwired/turbo", to: "https://ga.jspm.io/npm:@hotwired/turbo@7.2.0/dist/turbo.es2017-esm.js"
71
+ pin "turbo_power", to: "https://ga.jspm.io/npm:turbo_power@0.1.4/dist/index.js"
72
+ + // or use the bundled script shipped with the `turbo_power` gem
73
+ + pin "turbo_power", to: "turbo_power.js"
74
+ ```
75
+
76
+ **app/javascript/application.js**
77
+ ```diff
78
+ - import '@hotwired/turbo-rails'
79
+ + import { Turbo } from '@hotwired/turbo'
80
+ import 'controllers'
81
+ + import TurboPower from 'turbo_power'
82
+ + TurboPower.initialize(Turbo.StreamActions)
83
+ ```
84
+
85
+ **Note:** These modifications will continue to work when upgrading Turbo via the [turbo-rails](https://github.com/hotwired/turbo-rails) gem. You can [read more](https://github.com/marcoroth/turbo_power-rails/issues/2) for the reasoning behind these adjustments.
86
+
87
+
57
88
  ## Usage
58
89
 
59
90
  ### Actions from `turbo_ready`
@@ -202,7 +202,7 @@ module TurboPower
202
202
  end
203
203
 
204
204
  def set_turbo_frame_src(frame_id, src, **attributes)
205
- custom_action :reload_turbo_frame, target: frame_id, attributes: attributes.merge(src: src)
205
+ custom_action :set_turbo_frame_src, target: frame_id, attributes: attributes.merge(src: src)
206
206
  end
207
207
  end
208
208
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TurboPower
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.5"
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.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Roth
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-25 00:00:00.000000000 Z
11
+ date: 2022-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: turbo-rails
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  requirements: []
85
- rubygems_version: 3.3.3
85
+ rubygems_version: 3.3.7
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Power-pack for Turbo Streams