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
Bug Report
Describe the bug
Rubocop v1.63.0 updates json to v2.7.2.
jsonv2.7.2 makes OpenStruct optional.StimulusReflexrelies onOpenStructin both the Dataset and the Element models. Attempting to run rails, ie arails console, results in the errorTo Reproduce
using
rubocop v1.63.0or above, attempt to run rails console or start a rails serverExpected 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 suggestiona longer term fix would be to stop using
OpenStructaltogether as its use is discouragedVersions
StimulusReflex
3.5.0.rc4yarn 1.22.19External tools
3.2.2p537.0.8.118.19.01.63.02.7.2