From d90f24f85bc4dbdf6381ac191330e2bf2d7260d0 Mon Sep 17 00:00:00 2001 From: Vladimir Dementyev Date: Fri, 10 Jan 2025 09:20:26 -0800 Subject: [PATCH] - fix ruby warnings --- lib/nats/io/jetstream.rb | 3 --- lib/nats/io/jetstream/msg.rb | 5 +++++ lib/nats/io/msg.rb | 5 ----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/nats/io/jetstream.rb b/lib/nats/io/jetstream.rb index 10e051f..91c4c69 100644 --- a/lib/nats/io/jetstream.rb +++ b/lib/nats/io/jetstream.rb @@ -13,9 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require_relative "msg" -require_relative "client" -require_relative "errors" require_relative "kv" require_relative "jetstream/api" require_relative "jetstream/errors" diff --git a/lib/nats/io/jetstream/msg.rb b/lib/nats/io/jetstream/msg.rb index bd5748d..a34e559 100644 --- a/lib/nats/io/jetstream/msg.rb +++ b/lib/nats/io/jetstream/msg.rb @@ -25,4 +25,9 @@ class JetStream module Msg end end + + class Msg + # Enhance it with ack related methods from JetStream to ack msgs. + include JetStream::Msg::AckMethods + end end diff --git a/lib/nats/io/msg.rb b/lib/nats/io/msg.rb index 5324347..a62fd5f 100644 --- a/lib/nats/io/msg.rb +++ b/lib/nats/io/msg.rb @@ -12,16 +12,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# -require_relative "jetstream" module NATS class Msg attr_accessor :subject, :reply, :data, :header - # Enhance it with ack related methods from JetStream to ack msgs. - include JetStream::Msg::AckMethods - def initialize(opts = {}) @subject = opts[:subject] @reply = opts[:reply]