turbo_power 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c9df9b4805eb75df7767c66ca573d21ef4bcd94203f19cc7be3982aa2a55e5f
4
- data.tar.gz: d343c3de805f702633fe5dfc8935bee4117e935bb2d604ff651fe5cf46736fb6
3
+ metadata.gz: 73bf4679bb4712b484fa9d001b22bfb2e57876cf017e0d35558861f876a89e11
4
+ data.tar.gz: f5bdffd12145b20b8af6082fcbf6a192a577bdb18f9398ec13462c14bb415443
5
5
  SHA512:
6
- metadata.gz: fd57269d083dda4a54dc1aba8dea27fd967c98a8c7aae31661178645cd97bc89a3a86b15b4140a73057a2181e77e53db2d21a236a88047990bb109515bf3ae87
7
- data.tar.gz: eb2d9e17097ceb48da7f11caf084073c062787f198d38d04994124c245ed2466ceacc5ca377db584539993ba10829e7481835190ba7037a9177d6a4e42b9a426
6
+ metadata.gz: 01474ffee50a0511a12b57f0c5e8447103a5b3d7970b50497091bd181c2e7427e251e2c3163f2456ce76cff01d7ba790a75babdb97f02c165233ee15a9159c42
7
+ data.tar.gz: 063b9f28b2996276dde7ce83faa87fabcc25ebcf6bf658987721e591df5572a9e5aa5656c0bcff94fcf2bbfe529266dca5524ee7c8b2715fc08a134b36c6ede9
data/Gemfile CHANGED
@@ -6,6 +6,9 @@ gemspec
6
6
 
7
7
  gem "rake", "~> 13.0"
8
8
 
9
- gem "minitest", "~> 5.0"
10
-
11
9
  gem "rubocop", "~> 1.21"
10
+
11
+ group :test do
12
+ gem "sprockets-rails"
13
+ gem "sqlite3"
14
+ end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- turbo_power (0.1.2)
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
- # TurboPower Rails
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: 'beforeend', **attributes, &block)
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: 'beforebegin', **attributes)
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, detail: detail)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TurboPower
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
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.2
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-24 00:00:00.000000000 Z
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
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
4
-
5
- require "turbo_power"
6
- require "minitest/autorun"
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "test_helper"
4
-
5
- module TurboPower
6
- class StreamHelperTest < Minitest::Test
7
- def test_that_it_has_a_version_number
8
- refute_nil ::TurboPower::VERSION
9
- end
10
- end
11
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "test_helper"
4
-
5
- class TestTurboPower < Minitest::Test
6
- def test_that_it_has_a_version_number
7
- refute_nil ::TurboPower::VERSION
8
- end
9
- end