Skip to content

Commit

Permalink
Bump version and fix examples
Browse files Browse the repository at this point in the history
Signed-off-by: Waldemar Quevedo <[email protected]>
  • Loading branch information
wallyqs committed Jul 25, 2022
1 parent 1a0a7cd commit 23c2014
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
nats-pure (2.1.0)
nats-pure (2.1.1)

GEM
remote: https://rubygems.org/
Expand Down
6 changes: 3 additions & 3 deletions examples/basic-usage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
nats.publish('foo.bar.baz', 'Hello World!')

# Unsubscribing
sid = nats.subscribe('bar') { |msg| puts "Received : '#{msg}'" }
nats.unsubscribe(sid)
sub = nats.subscribe('bar') { |msg| puts "Received : '#{msg}'" }
sub.unsubscribe(2)

# Subscribers which reply to requests
nats.subscribe('help') do |msg, reply, subject|
Expand All @@ -42,7 +42,7 @@

# Requests happens asynchronously if given a callback
nats.request('help', 'world', max: 2) do |response|
puts "[Response] '#{response}'"
puts "[Response] to '#{response.subject}': #{response.data}'"
end

# Request without a callback waits for the response or times out.
Expand Down
2 changes: 1 addition & 1 deletion lib/nats/io/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
module NATS
module IO
# VERSION is the version of the client announced on CONNECT to the server.
VERSION = "2.1.0".freeze
VERSION = "2.1.1".freeze

# LANG is the lang runtime of the client announced on CONNECT to the server.
LANG = "#{RUBY_ENGINE}#{RUBY_VERSION}".freeze
Expand Down

0 comments on commit 23c2014

Please sign in to comment.