stimulus_reflex 3.5.0.rc4 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +19 -13
- data/app/assets/javascripts/stimulus_reflex.js +1 -1
- data/app/assets/javascripts/stimulus_reflex.umd.js +1 -1
- data/lib/generators/stimulus_reflex/stimulus_reflex_generator.rb +2 -2
- data/lib/generators/stimulus_reflex/templates/app/javascript/config/cable_ready.js.tt +1 -1
- data/lib/generators/stimulus_reflex/templates/app/javascript/config/index.js.tt +1 -1
- data/lib/generators/stimulus_reflex/templates/app/javascript/config/stimulus_reflex.js.tt +1 -1
- data/lib/generators/stimulus_reflex/templates/app/javascript/controllers/%file_name%_controller.js.tt +1 -1
- data/lib/generators/stimulus_reflex/templates/app/javascript/controllers/application.js.tt +1 -1
- data/lib/install/action_cable.rb +30 -30
- data/lib/install/broadcaster.rb +11 -11
- data/lib/install/bundle.rb +9 -9
- data/lib/install/compression.rb +5 -5
- data/lib/install/config.rb +22 -22
- data/lib/install/development.rb +19 -19
- data/lib/install/esbuild.rb +28 -28
- data/lib/install/example.rb +3 -3
- data/lib/install/importmap.rb +29 -29
- data/lib/install/initializers.rb +3 -3
- data/lib/install/mrujs.rb +25 -25
- data/lib/install/npm_packages.rb +7 -7
- data/lib/install/reflexes.rb +2 -2
- data/lib/install/shakapacker.rb +23 -23
- data/lib/install/spring.rb +7 -7
- data/lib/install/updatable.rb +7 -7
- data/lib/install/vite.rb +22 -22
- data/lib/install/webpacker.rb +27 -27
- data/lib/install/yarn.rb +9 -9
- data/lib/stimulus_reflex/html/document_fragment.rb +5 -3
- data/lib/stimulus_reflex/installer.rb +303 -277
- data/lib/stimulus_reflex/version.rb +1 -1
- data/lib/stimulus_reflex.rb +2 -0
- data/lib/tasks/stimulus_reflex/stimulus_reflex.rake +8 -8
- data/package.json +1 -1
- data/stimulus_reflex.gemspec +2 -0
- data/yarn.lock +7 -7
- metadata +30 -2
data/lib/stimulus_reflex.rb
CHANGED
@@ -3,11 +3,13 @@
|
|
3
3
|
require "uri"
|
4
4
|
require "open-uri"
|
5
5
|
require "rack"
|
6
|
+
require "ostruct"
|
6
7
|
require "active_support/all"
|
7
8
|
require "action_dispatch"
|
8
9
|
require "action_cable"
|
9
10
|
require "action_view"
|
10
11
|
require "nokogiri"
|
12
|
+
require "nokogiri/html5/inference"
|
11
13
|
require "cable_ready"
|
12
14
|
require "stimulus_reflex/version"
|
13
15
|
require "stimulus_reflex/open_struct_fix"
|
@@ -53,8 +53,8 @@ end
|
|
53
53
|
namespace :stimulus_reflex do
|
54
54
|
desc "✨ Install StimulusReflex and CableReady ✨"
|
55
55
|
task :install do
|
56
|
-
create_dir_if_not_exists(Rails.root.join("tmp/stimulus_reflex_installer/templates"))
|
57
|
-
create_dir_if_not_exists(Rails.root.join("tmp/stimulus_reflex_installer/working"))
|
56
|
+
StimulusReflex::Installer.create_dir_if_not_exists(Rails.root.join("tmp/stimulus_reflex_installer/templates"))
|
57
|
+
StimulusReflex::Installer.create_dir_if_not_exists(Rails.root.join("tmp/stimulus_reflex_installer/working"))
|
58
58
|
|
59
59
|
install_complete = Rails.root.join("tmp/stimulus_reflex_installer/complete")
|
60
60
|
|
@@ -93,8 +93,8 @@ namespace :stimulus_reflex do
|
|
93
93
|
end
|
94
94
|
|
95
95
|
# if there is an installation in progress, continue where we left off
|
96
|
-
if installer_entrypoint_path.exist?
|
97
|
-
entrypoint = installer_entrypoint_path.read
|
96
|
+
if StimulusReflex::Installer.installer_entrypoint_path.exist?
|
97
|
+
entrypoint = StimulusReflex::Installer.installer_entrypoint_path.read
|
98
98
|
|
99
99
|
puts "✨ Resuming \e[38;5;220mStimulusReflex\e[0m and \e[38;5;220mCableReady\e[0m installation ✨"
|
100
100
|
puts
|
@@ -118,18 +118,18 @@ namespace :stimulus_reflex do
|
|
118
118
|
entrypoint = if options.key? "entrypoint"
|
119
119
|
options["entrypoint"]
|
120
120
|
else
|
121
|
-
auto_detect_entrypoint
|
121
|
+
StimulusReflex::Installer.auto_detect_entrypoint
|
122
122
|
end
|
123
123
|
|
124
|
-
installer_entrypoint_path.write(entrypoint)
|
124
|
+
StimulusReflex::Installer.installer_entrypoint_path.write(entrypoint)
|
125
125
|
end
|
126
126
|
|
127
127
|
# verify their bundler before starting, unless they explicitly specified on CLI
|
128
128
|
if !used_bundler
|
129
|
-
used_bundler = bundler
|
129
|
+
used_bundler = StimulusReflex::Installer.bundler
|
130
130
|
end
|
131
131
|
|
132
|
-
installer_bundler_path.write(used_bundler)
|
132
|
+
StimulusReflex::Installer.installer_bundler_path.write(used_bundler)
|
133
133
|
|
134
134
|
FileUtils.touch("tmp/stimulus_reflex_installer/backups")
|
135
135
|
File.write("tmp/stimulus_reflex_installer/template_src", File.expand_path("../../generators/stimulus_reflex/templates/", __dir__))
|
data/package.json
CHANGED
data/stimulus_reflex.gemspec
CHANGED
@@ -50,6 +50,7 @@ Gem::Specification.new do |gem|
|
|
50
50
|
gem.add_dependency "nokogiri", "~> 1.0"
|
51
51
|
gem.add_dependency "rack", ">= 2", "< 4"
|
52
52
|
gem.add_dependency "redis", ">= 4.0", "< 6.0"
|
53
|
+
gem.add_dependency "nokogiri-html5-inference", "~> 0.3"
|
53
54
|
|
54
55
|
gem.add_development_dependency "bundler", "~> 2.0"
|
55
56
|
gem.add_development_dependency "magic_frozen_string_literal", "~> 1.2"
|
@@ -57,4 +58,5 @@ Gem::Specification.new do |gem|
|
|
57
58
|
gem.add_development_dependency "rails", *rails_version
|
58
59
|
gem.add_development_dependency "rake", "~> 13.0"
|
59
60
|
gem.add_development_dependency "standard", "~> 1.24"
|
61
|
+
gem.add_development_dependency "minitest", "5.18.1"
|
60
62
|
end
|
data/yarn.lock
CHANGED
@@ -1452,10 +1452,10 @@ bytes@3.1.2:
|
|
1452
1452
|
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
|
1453
1453
|
integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==
|
1454
1454
|
|
1455
|
-
cable_ready@^5.0.
|
1456
|
-
version "5.0.
|
1457
|
-
resolved "https://registry.yarnpkg.com/cable_ready/-/cable_ready-5.0.
|
1458
|
-
integrity sha512
|
1455
|
+
cable_ready@^5.0.4:
|
1456
|
+
version "5.0.4"
|
1457
|
+
resolved "https://registry.yarnpkg.com/cable_ready/-/cable_ready-5.0.4.tgz#88b5bff27871be402f6ea049d65126bb1995d147"
|
1458
|
+
integrity sha512-HZLj3SjgEDB4H2GqtKHmg2lOu8YCti0hsPR9XC2mMfz6WOkHK4FWt1/NJ0OIKAcQAEnxEJEtlIgBv6tP1m958g==
|
1459
1459
|
dependencies:
|
1460
1460
|
morphdom "2.6.1"
|
1461
1461
|
|
@@ -4966,9 +4966,9 @@ vfile@^4.0.0:
|
|
4966
4966
|
vfile-message "^2.0.0"
|
4967
4967
|
|
4968
4968
|
vite@^4.3.8:
|
4969
|
-
version "4.5.
|
4970
|
-
resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.
|
4971
|
-
integrity sha512-
|
4969
|
+
version "4.5.3"
|
4970
|
+
resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.3.tgz#d88a4529ea58bae97294c7e2e6f0eab39a50fb1a"
|
4971
|
+
integrity sha512-kQL23kMeX92v3ph7IauVkXkikdDRsYMGTVl5KY2E9OY4ONLvkHf04MDTbnfo6NKxZiDLWzVpP5oTa8hQD8U3dg==
|
4972
4972
|
dependencies:
|
4973
4973
|
esbuild "^0.18.10"
|
4974
4974
|
postcss "^8.4.27"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stimulus_reflex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.0
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Hopkins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actioncable
|
@@ -178,6 +178,20 @@ dependencies:
|
|
178
178
|
- - "<"
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '6.0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: nokogiri-html5-inference
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0.3'
|
188
|
+
type: :runtime
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0.3'
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
196
|
name: bundler
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -268,6 +282,20 @@ dependencies:
|
|
268
282
|
- - "~>"
|
269
283
|
- !ruby/object:Gem::Version
|
270
284
|
version: '1.24'
|
285
|
+
- !ruby/object:Gem::Dependency
|
286
|
+
name: minitest
|
287
|
+
requirement: !ruby/object:Gem::Requirement
|
288
|
+
requirements:
|
289
|
+
- - '='
|
290
|
+
- !ruby/object:Gem::Version
|
291
|
+
version: 5.18.1
|
292
|
+
type: :development
|
293
|
+
prerelease: false
|
294
|
+
version_requirements: !ruby/object:Gem::Requirement
|
295
|
+
requirements:
|
296
|
+
- - '='
|
297
|
+
- !ruby/object:Gem::Version
|
298
|
+
version: 5.18.1
|
271
299
|
description:
|
272
300
|
email:
|
273
301
|
- natehop@gmail.com
|