turbo_power 0.1.2 → 0.1.3
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 +5 -2
- data/Gemfile.lock +15 -2
- data/README.md +22 -1
- data/Rakefile +2 -0
- data/lib/turbo_power/stream_helper.rb +3 -3
- data/lib/turbo_power/version.rb +1 -1
- data/turbo_power.gemspec +1 -2
- metadata +4 -9
- data/test/test_helper.rb +0 -6
- data/test/turbo_power/stream_helper_test.rb +0 -11
- data/test/turbo_power_test.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73bf4679bb4712b484fa9d001b22bfb2e57876cf017e0d35558861f876a89e11
|
4
|
+
data.tar.gz: f5bdffd12145b20b8af6082fcbf6a192a577bdb18f9398ec13462c14bb415443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01474ffee50a0511a12b57f0c5e8447103a5b3d7970b50497091bd181c2e7427e251e2c3163f2456ce76cff01d7ba790a75babdb97f02c165233ee15a9159c42
|
7
|
+
data.tar.gz: 063b9f28b2996276dde7ce83faa87fabcc25ebcf6bf658987721e591df5572a9e5aa5656c0bcff94fcf2bbfe529266dca5524ee7c8b2715fc08a134b36c6ede9
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
turbo_power (0.1.
|
4
|
+
turbo_power (0.1.3)
|
5
5
|
turbo-rails (~> 1.3.0)
|
6
6
|
turbo_ready
|
7
7
|
|
@@ -110,6 +110,8 @@ GEM
|
|
110
110
|
nio4r (2.5.8)
|
111
111
|
nokogiri (1.13.8-x86_64-darwin)
|
112
112
|
racc (~> 1.4)
|
113
|
+
nokogiri (1.13.8-x86_64-linux)
|
114
|
+
racc (~> 1.4)
|
113
115
|
parallel (1.22.1)
|
114
116
|
parser (3.1.2.1)
|
115
117
|
ast (~> 2.4.1)
|
@@ -160,6 +162,15 @@ GEM
|
|
160
162
|
rubocop-ast (1.21.0)
|
161
163
|
parser (>= 3.1.1.0)
|
162
164
|
ruby-progressbar (1.11.0)
|
165
|
+
sprockets (4.1.1)
|
166
|
+
concurrent-ruby (~> 1.0)
|
167
|
+
rack (> 1, < 3)
|
168
|
+
sprockets-rails (3.4.2)
|
169
|
+
actionpack (>= 5.2)
|
170
|
+
activesupport (>= 5.2)
|
171
|
+
sprockets (>= 3.0.0)
|
172
|
+
sqlite3 (1.5.0-x86_64-darwin)
|
173
|
+
sqlite3 (1.5.0-x86_64-linux)
|
163
174
|
strscan (3.0.4)
|
164
175
|
thor (1.2.1)
|
165
176
|
timeout (0.3.0)
|
@@ -180,11 +191,13 @@ GEM
|
|
180
191
|
|
181
192
|
PLATFORMS
|
182
193
|
x86_64-darwin-19
|
194
|
+
x86_64-linux
|
183
195
|
|
184
196
|
DEPENDENCIES
|
185
|
-
minitest (~> 5.0)
|
186
197
|
rake (~> 13.0)
|
187
198
|
rubocop (~> 1.21)
|
199
|
+
sprockets-rails
|
200
|
+
sqlite3
|
188
201
|
turbo_power!
|
189
202
|
|
190
203
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -1,4 +1,25 @@
|
|
1
|
-
|
1
|
+
<p align="center">
|
2
|
+
<picture>
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/hero-dark.png">
|
4
|
+
<img src="assets/hero.png" height="340px">
|
5
|
+
</picture>
|
6
|
+
</p>
|
7
|
+
|
8
|
+
<h1 align="center">TurboPower for Rails</h1>
|
9
|
+
|
10
|
+
<p align="center">
|
11
|
+
<a href="https://github.com/marcoroth/turbo_power">
|
12
|
+
<img src="https://github.com/marcoroth/turbo_power-rails/actions/workflows/tests.yml/badge.svg">
|
13
|
+
</a>
|
14
|
+
<a href="https://rubygems.org/gems/turbo_power">
|
15
|
+
<img alt="GEM Version" src="https://img.shields.io/gem/v/turbo_power?color=38C160&logo=ruby&logoColor=FE1616">
|
16
|
+
</a>
|
17
|
+
<a href="https://rubygems.org/gems/turbo_power">
|
18
|
+
<img alt="Gem Downloads" src="https://img.shields.io/gem/dt/turbo_power?color=38C160&logo=ruby&logoColor=FE1616">
|
19
|
+
</a>
|
20
|
+
</p>
|
21
|
+
|
22
|
+
## Getting Started
|
2
23
|
|
3
24
|
TurboPower Rails is a power-pack for Turbo Streams. This gem provides server-side Ruby helpers for the NPM package [`turbo_power`](https://github.com/marcoroth/turbo_power).
|
4
25
|
|
data/Rakefile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "bundler/setup"
|
3
4
|
require "bundler/gem_tasks"
|
4
5
|
require "rake/testtask"
|
5
6
|
|
@@ -7,6 +8,7 @@ Rake::TestTask.new(:test) do |t|
|
|
7
8
|
t.libs << "test"
|
8
9
|
t.libs << "lib"
|
9
10
|
t.test_files = FileList["test/**/*_test.rb"]
|
11
|
+
t.warning = false
|
10
12
|
end
|
11
13
|
|
12
14
|
require "rubocop/rake_task"
|
@@ -29,11 +29,11 @@ module TurboPower
|
|
29
29
|
custom_action_all :inner_html, targets: target, content: html, attributes: attributes, &block
|
30
30
|
end
|
31
31
|
|
32
|
-
def insert_adjacent_html(target, html = nil, position:
|
32
|
+
def insert_adjacent_html(target, html = nil, position: "beforeend", **attributes, &block)
|
33
33
|
custom_action_all :insert_adjacent_html, targets: target, content: html, attributes: attributes.merge(position: position), &block
|
34
34
|
end
|
35
35
|
|
36
|
-
def insert_adjacent_text(target, text, position:
|
36
|
+
def insert_adjacent_text(target, text, position: "beforebegin", **attributes)
|
37
37
|
custom_action_all :insert_adjacent_text, targets: target, content: "", attributes: attributes.merge(text: text, position: position)
|
38
38
|
end
|
39
39
|
|
@@ -94,7 +94,7 @@ module TurboPower
|
|
94
94
|
# Event Actions
|
95
95
|
|
96
96
|
def dispatch_event(target, name, detail: {}, **attributes)
|
97
|
-
custom_action_all :dispatch_event, targets: target, attributes: attributes.merge(name: name,
|
97
|
+
custom_action_all :dispatch_event, targets: target, attributes: attributes.merge(name: name), content: detail.to_json
|
98
98
|
end
|
99
99
|
|
100
100
|
# Storage Actions
|
data/lib/turbo_power/version.rb
CHANGED
data/turbo_power.gemspec
CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
18
|
spec.metadata["source_code_uri"] = "https://github.com/marcoroth/turbo_power-rails"
|
19
19
|
spec.metadata["changelog_uri"] = "https://github.com/marcoroth/turbo_power-rails/blob/main/CHANGELOG.md"
|
20
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
20
21
|
|
21
22
|
spec.files = Dir[
|
22
23
|
"lib/**/*.{rb,rake}",
|
@@ -26,8 +27,6 @@ Gem::Specification.new do |spec|
|
|
26
27
|
"[A-Z]*"
|
27
28
|
]
|
28
29
|
|
29
|
-
spec.test_files = Dir["test/**/*.rb"]
|
30
|
-
|
31
30
|
spec.add_dependency "turbo-rails", "~> 1.3.0"
|
32
31
|
spec.add_dependency "turbo_ready"
|
33
32
|
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.
|
4
|
+
version: 0.1.3
|
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-
|
11
|
+
date: 2022-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: turbo-rails
|
@@ -58,9 +58,6 @@ files:
|
|
58
58
|
- lib/turbo_power/engine.rb
|
59
59
|
- lib/turbo_power/stream_helper.rb
|
60
60
|
- lib/turbo_power/version.rb
|
61
|
-
- test/test_helper.rb
|
62
|
-
- test/turbo_power/stream_helper_test.rb
|
63
|
-
- test/turbo_power_test.rb
|
64
61
|
- turbo_power.gemspec
|
65
62
|
homepage: https://github.com/marcoroth/turbo_power-rails
|
66
63
|
licenses:
|
@@ -69,6 +66,7 @@ metadata:
|
|
69
66
|
homepage_uri: https://github.com/marcoroth/turbo_power-rails
|
70
67
|
source_code_uri: https://github.com/marcoroth/turbo_power-rails
|
71
68
|
changelog_uri: https://github.com/marcoroth/turbo_power-rails/blob/main/CHANGELOG.md
|
69
|
+
rubygems_mfa_required: 'true'
|
72
70
|
post_install_message:
|
73
71
|
rdoc_options: []
|
74
72
|
require_paths:
|
@@ -88,7 +86,4 @@ rubygems_version: 3.3.3
|
|
88
86
|
signing_key:
|
89
87
|
specification_version: 4
|
90
88
|
summary: Power-pack for Turbo Streams
|
91
|
-
test_files:
|
92
|
-
- test/test_helper.rb
|
93
|
-
- test/turbo_power/stream_helper_test.rb
|
94
|
-
- test/turbo_power_test.rb
|
89
|
+
test_files: []
|
data/test/test_helper.rb
DELETED