If you try to require 'graphiti' you end up with the following error:
...gems/graphiti-1.7.2/lib/graphiti/resource/remote.rb:8:in `block in <module:Remote>': uninitialized constant Graphiti::Resource::Remote::OpenStruct (NameError)
self.model = OpenStruct
^^^^^^^^^^
from ...gems/activesupport-7.1.3.4/lib/active_support/concern.rb:138:in `class_eval'
from ...gems/activesupport-7.1.3.4/lib/active_support/concern.rb:138:in `append_features'
from ...gems/graphiti-1.7.2/lib/graphiti/resource/configuration.rb:48:in `include'
from ...gems/graphiti-1.7.2/lib/graphiti/resource/configuration.rb:48:in `remote='
This PR simply requires OpenStruct explicitly (if not already loaded).
Stdlib's
json.rb
now (since version 2.7.2) relies onGenericObject
which is autoloaded later (see https://github.com/ruby/ruby/blob/9d69619623ec6b86c464b7cac911b7201f74dab7/ext/json/lib/json/common.rb#L5).This change makes Graphiti unable to be
require
d.If you try to
require 'graphiti'
you end up with the following error:This PR simply
require
sOpenStruct
explicitly (if not already loaded).