react_on_rails 16.2.0.beta.16 → 16.2.0.beta.19
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/.rubocop.yml +7 -81
- data/Gemfile.development_dependencies +2 -3
- data/Gemfile.lock +1 -1
- data/lib/generators/react_on_rails/templates/base/base/bin/switch-bundler +0 -4
- data/lib/react_on_rails/doctor.rb +0 -8
- data/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb +0 -2
- data/lib/react_on_rails/system_checker.rb +1 -5
- data/lib/react_on_rails/utils.rb +0 -2
- data/lib/react_on_rails/version.rb +1 -1
- data/lib/react_on_rails/version_checker.rb +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bc82f618c4e99601993bf2fc7b0c16aa65eee60c93eaac3c3a9d3855ce8c50c8
|
|
4
|
+
data.tar.gz: dc71739ffb1be25458a4fa81d4eda56ad115b54a3260a99bdfdbf4aacaa55896
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b294b8f8b9da19885a0ef132f2e0f5316af1d25c68a0d38ea6fe3cccfb397c42397752c74cf32a88b01365cfe996f3736f91d2c541c1178e64467839075f36be
|
|
7
|
+
data.tar.gz: 475f7e4ef619059b8d552428d8575008975a9e9008d7e188ab9ea1d2e8e6ed5c7210cbcd87e64cc9e7666b92140f28ba4772f034b4672ba7fac70c528deece4e
|
data/.rubocop.yml
CHANGED
|
@@ -1,36 +1,16 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
# Inherits from root config
|
|
2
|
+
inherit_from: ../.rubocop.yml
|
|
3
|
+
|
|
4
|
+
# Merge Exclude arrays with parent instead of replacing them
|
|
5
|
+
inherit_mode:
|
|
6
|
+
merge:
|
|
7
|
+
- Exclude
|
|
6
8
|
|
|
7
9
|
AllCops:
|
|
8
|
-
NewCops: enable
|
|
9
|
-
DisplayCopNames: true
|
|
10
|
-
TargetRubyVersion: 3.0.0
|
|
11
10
|
SuggestExtensions: false
|
|
12
11
|
|
|
13
|
-
Include:
|
|
14
|
-
- '**/Rakefile'
|
|
15
|
-
- '**/config.ru'
|
|
16
|
-
- 'Gemfile'
|
|
17
|
-
- '**/*.rb'
|
|
18
|
-
- '**/*.rake'
|
|
19
|
-
|
|
20
12
|
Exclude:
|
|
21
|
-
- '**/*.js'
|
|
22
|
-
- '**/node_modules/**/*'
|
|
23
|
-
- '**/public/**/*'
|
|
24
|
-
- '**/tmp/**/*'
|
|
25
|
-
- 'coverage/**/*'
|
|
26
|
-
- 'gen-examples/examples/**/*'
|
|
27
|
-
- 'node_modules/**/*'
|
|
28
|
-
- '../react_on_rails_pro/**/*' # Exclude pro package (has its own linting)
|
|
29
13
|
- 'spec/dummy/bin/*'
|
|
30
|
-
- 'spec/fixtures/**/*'
|
|
31
|
-
- 'spec/react_on_rails/dummy-for-generators/**/*'
|
|
32
|
-
- 'tmp/**/*'
|
|
33
|
-
- 'vendor/**/*'
|
|
34
14
|
|
|
35
15
|
Naming/FileName:
|
|
36
16
|
Exclude:
|
|
@@ -38,24 +18,6 @@ Naming/FileName:
|
|
|
38
18
|
- '**/Rakefile'
|
|
39
19
|
- '**/Steepfile'
|
|
40
20
|
|
|
41
|
-
Layout/LineLength:
|
|
42
|
-
Max: 120
|
|
43
|
-
|
|
44
|
-
Style/StringLiterals:
|
|
45
|
-
EnforcedStyle: double_quotes
|
|
46
|
-
|
|
47
|
-
Style/Documentation:
|
|
48
|
-
Enabled: false
|
|
49
|
-
|
|
50
|
-
Style/HashEachMethods:
|
|
51
|
-
Enabled: true
|
|
52
|
-
|
|
53
|
-
Style/HashTransformKeys:
|
|
54
|
-
Enabled: true
|
|
55
|
-
|
|
56
|
-
Style/HashTransformValues:
|
|
57
|
-
Enabled: true
|
|
58
|
-
|
|
59
21
|
Lint/AssignmentInCondition:
|
|
60
22
|
Exclude:
|
|
61
23
|
- 'spec/dummy/bin/spring'
|
|
@@ -66,33 +28,19 @@ Lint/SuppressedException:
|
|
|
66
28
|
- 'spec/dummy/bin/rake'
|
|
67
29
|
|
|
68
30
|
Metrics/AbcSize:
|
|
69
|
-
Max: 28
|
|
70
31
|
Exclude:
|
|
71
32
|
- 'lib/generators/react_on_rails/install_generator.rb' # Generator setup methods require comprehensive error handling
|
|
72
33
|
|
|
73
|
-
Metrics/CyclomaticComplexity:
|
|
74
|
-
Max: 7
|
|
75
|
-
|
|
76
|
-
Metrics/PerceivedComplexity:
|
|
77
|
-
Max: 10
|
|
78
|
-
|
|
79
34
|
Metrics/ClassLength:
|
|
80
|
-
Max: 150
|
|
81
35
|
Exclude:
|
|
82
36
|
- 'lib/generators/react_on_rails/base_generator.rb' # Generator complexity justified
|
|
83
37
|
- 'lib/react_on_rails/dev/server_manager.rb' # Dev tool with comprehensive help system
|
|
84
38
|
|
|
85
|
-
Metrics/ParameterLists:
|
|
86
|
-
Max: 5
|
|
87
|
-
CountKeywordArgs: false
|
|
88
|
-
|
|
89
39
|
Metrics/MethodLength:
|
|
90
|
-
Max: 41
|
|
91
40
|
Exclude:
|
|
92
41
|
- 'lib/generators/react_on_rails/install_generator.rb' # Generator setup methods require comprehensive error handling
|
|
93
42
|
|
|
94
43
|
Metrics/ModuleLength:
|
|
95
|
-
Max: 180
|
|
96
44
|
Exclude:
|
|
97
45
|
- 'spec/react_on_rails/engine_spec.rb' # Comprehensive engine tests require many examples
|
|
98
46
|
|
|
@@ -107,18 +55,6 @@ RSpec/AnyInstance:
|
|
|
107
55
|
- 'spec/react_on_rails/binstubs/dev_static_spec.rb'
|
|
108
56
|
- 'spec/react_on_rails/dev/**/*_spec.rb' # Dev module tests require system mocking
|
|
109
57
|
|
|
110
|
-
RSpec/DescribeClass:
|
|
111
|
-
Enabled: false
|
|
112
|
-
|
|
113
|
-
RSpec/ExampleLength:
|
|
114
|
-
Enabled: false
|
|
115
|
-
|
|
116
|
-
RSpec/MessageSpies:
|
|
117
|
-
Enabled: false
|
|
118
|
-
|
|
119
|
-
RSpec/NestedGroups:
|
|
120
|
-
Max: 4
|
|
121
|
-
|
|
122
58
|
RSpec/BeforeAfterAll:
|
|
123
59
|
Exclude:
|
|
124
60
|
- 'spec/react_on_rails/generators/dev_tests_generator_spec.rb'
|
|
@@ -127,19 +63,10 @@ RSpec/BeforeAfterAll:
|
|
|
127
63
|
- 'spec/react_on_rails/binstubs/dev_static_spec.rb'
|
|
128
64
|
- 'spec/react_on_rails/dev/**/*_spec.rb' # Dev module tests require global setup
|
|
129
65
|
|
|
130
|
-
RSpec/MessageChain:
|
|
131
|
-
Enabled: false
|
|
132
|
-
|
|
133
|
-
RSpec/MultipleExpectations:
|
|
134
|
-
Enabled: false
|
|
135
|
-
|
|
136
66
|
RSpec/MultipleDescribes:
|
|
137
67
|
Exclude:
|
|
138
68
|
- 'spec/dummy/spec/system/integration_spec.rb'
|
|
139
69
|
|
|
140
|
-
RSpec/MultipleMemoizedHelpers:
|
|
141
|
-
Max: 12
|
|
142
|
-
|
|
143
70
|
Style/GlobalVars:
|
|
144
71
|
Exclude:
|
|
145
72
|
- 'spec/dummy/config/environments/development.rb'
|
|
@@ -156,4 +83,3 @@ RSpec/InstanceVariable:
|
|
|
156
83
|
RSpec/StubbedMock:
|
|
157
84
|
Exclude:
|
|
158
85
|
- 'spec/react_on_rails/dev/**/*_spec.rb' # Dev module tests use mixed stub/mock patterns
|
|
159
|
-
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
eval_gemfile File.expand_path("../Gemfile.shared_dev_dependencies", __dir__)
|
|
4
|
+
|
|
3
5
|
gem "shakapacker", "9.4.0"
|
|
4
6
|
gem "bootsnap", require: false
|
|
5
7
|
gem "rails", "~> 7.1"
|
|
@@ -35,9 +37,6 @@ group :development, :test do
|
|
|
35
37
|
gem "pry-rescue"
|
|
36
38
|
gem "rbs", require: false
|
|
37
39
|
gem "steep", require: false
|
|
38
|
-
gem "rubocop", "1.61.0", require: false
|
|
39
|
-
gem "rubocop-performance", "~>1.20.0", require: false
|
|
40
|
-
gem "rubocop-rspec", "~>2.26", require: false
|
|
41
40
|
gem "spring", "~> 4.0"
|
|
42
41
|
gem "lefthook", require: false
|
|
43
42
|
# Added for Ruby 3.5+ compatibility to silence warnings
|
data/Gemfile.lock
CHANGED
|
@@ -61,7 +61,6 @@ class BundlerSwitcher
|
|
|
61
61
|
puts "✅ Updated assets_bundler to '#{@target_bundler}'"
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
65
64
|
def update_dependencies
|
|
66
65
|
puts "📦 Updating package.json dependencies..."
|
|
67
66
|
|
|
@@ -86,9 +85,7 @@ class BundlerSwitcher
|
|
|
86
85
|
puts "✅ Removed #{@target_bundler == 'rspack' ? 'webpack' : 'rspack'} dependencies"
|
|
87
86
|
File.write(package_json_path, JSON.pretty_generate(package_json))
|
|
88
87
|
end
|
|
89
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
90
88
|
|
|
91
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
92
89
|
def install_dependencies
|
|
93
90
|
puts "📥 Installing #{@target_bundler} dependencies..."
|
|
94
91
|
|
|
@@ -123,7 +120,6 @@ class BundlerSwitcher
|
|
|
123
120
|
|
|
124
121
|
puts "✅ Installed #{@target_bundler} dependencies"
|
|
125
122
|
end
|
|
126
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
127
123
|
|
|
128
124
|
def detect_package_manager
|
|
129
125
|
return "yarn" if File.exist?("yarn.lock")
|
|
@@ -468,7 +468,6 @@ module ReactOnRails
|
|
|
468
468
|
check_npm_wildcards
|
|
469
469
|
end
|
|
470
470
|
|
|
471
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
472
471
|
def check_gem_wildcards
|
|
473
472
|
gemfile_path = ENV["BUNDLE_GEMFILE"] || "Gemfile"
|
|
474
473
|
return unless File.exist?(gemfile_path)
|
|
@@ -490,9 +489,7 @@ module ReactOnRails
|
|
|
490
489
|
# Ignore errors reading Gemfile
|
|
491
490
|
end
|
|
492
491
|
end
|
|
493
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
494
492
|
|
|
495
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
496
493
|
def check_npm_wildcards
|
|
497
494
|
return unless File.exist?("package.json")
|
|
498
495
|
|
|
@@ -514,7 +511,6 @@ module ReactOnRails
|
|
|
514
511
|
# Ignore other errors
|
|
515
512
|
end
|
|
516
513
|
end
|
|
517
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
518
514
|
|
|
519
515
|
def check_key_configuration_files
|
|
520
516
|
files_to_check = {
|
|
@@ -538,7 +534,6 @@ module ReactOnRails
|
|
|
538
534
|
check_server_rendering_engine
|
|
539
535
|
end
|
|
540
536
|
|
|
541
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
542
537
|
def check_layout_files
|
|
543
538
|
layout_files = Dir.glob("app/views/layouts/**/*.erb")
|
|
544
539
|
return if layout_files.empty?
|
|
@@ -565,7 +560,6 @@ module ReactOnRails
|
|
|
565
560
|
end
|
|
566
561
|
end
|
|
567
562
|
end
|
|
568
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
569
563
|
|
|
570
564
|
# rubocop:disable Metrics/CyclomaticComplexity
|
|
571
565
|
def check_server_rendering_engine
|
|
@@ -603,7 +597,6 @@ module ReactOnRails
|
|
|
603
597
|
end
|
|
604
598
|
# rubocop:enable Metrics/CyclomaticComplexity
|
|
605
599
|
|
|
606
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
607
600
|
def check_shakapacker_configuration_details
|
|
608
601
|
return unless File.exist?("config/shakapacker.yml")
|
|
609
602
|
|
|
@@ -632,7 +625,6 @@ module ReactOnRails
|
|
|
632
625
|
checker.add_warning(" ⚠️ Could not run 'rake shakapacker:info': #{e.message}")
|
|
633
626
|
end
|
|
634
627
|
end
|
|
635
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
636
628
|
|
|
637
629
|
def check_react_on_rails_configuration_details
|
|
638
630
|
check_react_on_rails_initializer
|
|
@@ -49,7 +49,6 @@ module ReactOnRails
|
|
|
49
49
|
# Note, js_code does not have to be based on React.
|
|
50
50
|
# js_code MUST RETURN json stringify Object
|
|
51
51
|
# Calling code will probably call 'html_safe' on return value before rendering to the view.
|
|
52
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
53
52
|
def exec_server_render_js(js_code, render_options, js_evaluator = nil)
|
|
54
53
|
js_evaluator ||= self
|
|
55
54
|
if render_options.trace
|
|
@@ -86,7 +85,6 @@ module ReactOnRails
|
|
|
86
85
|
# We need to parse each chunk and replay the console messages.
|
|
87
86
|
result.transform { |chunk| parse_result_and_replay_console_messages(chunk, render_options) }
|
|
88
87
|
end
|
|
89
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
90
88
|
|
|
91
89
|
def trace_js_code_used(msg, js_code, file_name = "tmp/server-generated.js", force: false)
|
|
92
90
|
return unless ReactOnRails.configuration.trace || force
|
|
@@ -203,7 +203,7 @@ module ReactOnRails
|
|
|
203
203
|
add_warning("⚠️ Could not parse package.json")
|
|
204
204
|
end
|
|
205
205
|
|
|
206
|
-
def check_package_version_sync
|
|
206
|
+
def check_package_version_sync
|
|
207
207
|
return unless File.exist?("package.json")
|
|
208
208
|
|
|
209
209
|
begin
|
|
@@ -540,7 +540,6 @@ module ReactOnRails
|
|
|
540
540
|
MSG
|
|
541
541
|
end
|
|
542
542
|
|
|
543
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
544
543
|
def check_gemfile_version_patterns
|
|
545
544
|
gemfile_path = ENV["BUNDLE_GEMFILE"] || "Gemfile"
|
|
546
545
|
return unless File.exist?(gemfile_path)
|
|
@@ -571,9 +570,7 @@ module ReactOnRails
|
|
|
571
570
|
# Ignore errors reading Gemfile
|
|
572
571
|
end
|
|
573
572
|
end
|
|
574
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
575
573
|
|
|
576
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
577
574
|
def report_dependency_versions(package_json)
|
|
578
575
|
all_deps = package_json["dependencies"]&.merge(package_json["devDependencies"] || {}) || {}
|
|
579
576
|
|
|
@@ -590,7 +587,6 @@ module ReactOnRails
|
|
|
590
587
|
add_success("✅ React DOM #{react_dom_version}")
|
|
591
588
|
end
|
|
592
589
|
end
|
|
593
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
594
590
|
|
|
595
591
|
def report_shakapacker_version
|
|
596
592
|
return unless File.exist?("Gemfile.lock")
|
data/lib/react_on_rails/utils.rb
CHANGED
|
@@ -470,7 +470,6 @@ module ReactOnRails
|
|
|
470
470
|
#
|
|
471
471
|
# @example Absolute paths outside Rails.root (edge case)
|
|
472
472
|
# normalize_to_relative_path("/other/path/bundles") # => "/other/path/bundles"
|
|
473
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
474
473
|
def self.normalize_to_relative_path(path)
|
|
475
474
|
return nil if path.nil?
|
|
476
475
|
|
|
@@ -498,7 +497,6 @@ module ReactOnRails
|
|
|
498
497
|
path_str
|
|
499
498
|
end
|
|
500
499
|
end
|
|
501
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
502
500
|
|
|
503
501
|
def self.default_troubleshooting_section
|
|
504
502
|
<<~DEFAULT
|
|
@@ -338,7 +338,6 @@ module ReactOnRails
|
|
|
338
338
|
private
|
|
339
339
|
|
|
340
340
|
# Resolve version from lockfiles if available, otherwise use package.json version
|
|
341
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
342
341
|
def resolve_version(package_json_version, package_name)
|
|
343
342
|
# If package.json specifies a local path or URL, don't try to resolve from lockfiles
|
|
344
343
|
# Lockfiles may contain placeholder versions like "0.0.0" for local links
|
|
@@ -359,7 +358,6 @@ module ReactOnRails
|
|
|
359
358
|
# Fall back to package.json version
|
|
360
359
|
package_json_version
|
|
361
360
|
end
|
|
362
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
363
361
|
|
|
364
362
|
# Check if a version string represents a local path or URL
|
|
365
363
|
def local_path_or_url_version?(version)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: react_on_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 16.2.0.beta.
|
|
4
|
+
version: 16.2.0.beta.19
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Gordon
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-12-
|
|
11
|
+
date: 2025-12-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|