From 7327344880a534449ce63bd17639c2317a2ce36b Mon Sep 17 00:00:00 2001 From: Rustam Sharshenov Date: Tue, 7 May 2024 23:41:25 +0100 Subject: [PATCH] Require ostruct explicitly `OpenStruct` is optional since `JSON` v 2.7.2 References: - https://github.com/flori/json/pull/565 - https://github.com/ruby/ostruct/blob/master/lib/ostruct.rb#L136 This commit fixes error: ``` Hutch.connect gems/hutch-1.2.0/lib/hutch/broker.rb:272:in `api_config': uninitialized constant Hutch::Broker::OpenStruct (NameError) @api_config ||= OpenStruct.new.tap do |config| ^^^^^^^^^^ ``` --- lib/hutch/broker.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/hutch/broker.rb b/lib/hutch/broker.rb index dc534b5..aa23e11 100644 --- a/lib/hutch/broker.rb +++ b/lib/hutch/broker.rb @@ -1,6 +1,7 @@ require 'active_support/core_ext/object/blank' require 'carrot-top' +require 'ostruct' require 'hutch/logging' require 'hutch/exceptions' require 'hutch/publisher'