-
-
Notifications
You must be signed in to change notification settings - Fork 170
Closed
Description
Bug Report
Describe the bug
Rubocop v1.63.0 updates json to v2.7.2. json v2.7.2 makes OpenStruct optional. StimulusReflex relies on OpenStruct in both the Dataset and the Element models. Attempting to run rails, ie a rails console, results in the error
/.rvm/gems/ruby-3.2.2/gems/stimulus_reflex-3.5.0.rc4/lib/stimulus_reflex/dataset.rb:5:in `<main>': uninitialized constant OpenStruct (NameError)
To Reproduce
using rubocop v1.63.0 or above, attempt to run rails console or start a rails server
Expected behavior
the rails action can be performed without an error that causes it to exit
it seems a quick fix would be to explicitly requiring ostruct, like this suggestion
a longer term fix would be to stop using OpenStruct altogether as its use is discouraged
Versions
StimulusReflex
- Gem:
3.5.0.rc4 - Node package:
yarn 1.22.19
External tools
- Ruby:
3.2.2p53 - Rails:
7.0.8.1 - Node:
18.19.0 - Rubocop:
1.63.0 - Json:
2.7.2
ReyRod, markzalar and kdonovan
Metadata
Metadata
Assignees
Labels
No labels