From bb617626839902086c2a112bc3972ca8e707e9e4 Mon Sep 17 00:00:00 2001 From: Serhii Mamontov Date: Fri, 3 Oct 2025 20:48:04 +0300 Subject: [PATCH 1/7] feat(here-now): add `limit` and `offset` parameters Add 'limit' and 'offset' parameters for 'here_now' for pagination support. BREAKING CHANGES: `here_now` by default will return `1000` users at once. --- .../vcr_cassettes/examples/here_now/36.yml | 39 +++++ .../vcr_cassettes/examples/here_now/37.yml | 39 +++++ .../vcr_cassettes/examples/here_now/38.yml | 111 ++++++++++++++ lib/pubnub/constants.rb | 1 + lib/pubnub/event.rb | 2 +- lib/pubnub/events/here_now.rb | 56 +++++-- spec/examples/here_now_examples_spec.rb | 142 +++++++++++++++++- 7 files changed, 374 insertions(+), 16 deletions(-) create mode 100644 fixtures/vcr_cassettes/examples/here_now/36.yml create mode 100644 fixtures/vcr_cassettes/examples/here_now/37.yml create mode 100644 fixtures/vcr_cassettes/examples/here_now/38.yml diff --git a/fixtures/vcr_cassettes/examples/here_now/36.yml b/fixtures/vcr_cassettes/examples/here_now/36.yml new file mode 100644 index 000000000..297901d4e --- /dev/null +++ b/fixtures/vcr_cassettes/examples/here_now/36.yml @@ -0,0 +1,39 @@ +--- +http_interactions: +- request: + method: get + uri: http://ps.pndsn.com/v2/presence/sub-key/demo/channel/here-now-test-channel?auth=ruby-test-auth-client-one&limit=2&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one + body: + encoding: UTF-8 + string: '' + headers: + User-Agent: + - HTTPClient/1.0 (2.8.3, ruby 3.2.2 (2023-03-30)) + Accept: + - "*/*" + Date: + - Fri, 19 Sep 2025 07:18:06 GMT + response: + status: + code: 200 + message: OK + headers: + Date: + - Fri, 19 Sep 2025 07:18:06 GMT + Content-Type: + - text/javascript; charset="UTF-8" + Content-Length: + - '131' + Connection: + - keep-alive + Access-Control-Allow-Methods: + - OPTIONS, GET, POST + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - "*" + body: + encoding: UTF-8 + string: '{"message":"OK","occupancy":4,"service":"Presence","status":200,"uuids":["ruby-test-auth-client-two","ruby-test-auth-client-four"]}' + recorded_at: Fri, 19 Sep 2025 07:18:06 GMT +recorded_with: VCR 6.3.1 diff --git a/fixtures/vcr_cassettes/examples/here_now/37.yml b/fixtures/vcr_cassettes/examples/here_now/37.yml new file mode 100644 index 000000000..68e151244 --- /dev/null +++ b/fixtures/vcr_cassettes/examples/here_now/37.yml @@ -0,0 +1,39 @@ +--- +http_interactions: +- request: + method: get + uri: http://ps.pndsn.com/v2/presence/sub-key/demo/channel/here-now-test-channel?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one + body: + encoding: UTF-8 + string: '' + headers: + User-Agent: + - HTTPClient/1.0 (2.8.3, ruby 3.2.2 (2023-03-30)) + Accept: + - "*/*" + Date: + - Fri, 19 Sep 2025 07:18:14 GMT + response: + status: + code: 200 + message: OK + headers: + Date: + - Fri, 19 Sep 2025 07:18:14 GMT + Content-Type: + - text/javascript; charset="UTF-8" + Content-Length: + - '189' + Connection: + - keep-alive + Access-Control-Allow-Methods: + - OPTIONS, GET, POST + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - "*" + body: + encoding: UTF-8 + string: '{"message":"OK","occupancy":4,"service":"Presence","status":200,"uuids":["ruby-test-auth-client-two","ruby-test-auth-client-four","ruby-test-auth-client-one","ruby-test-auth-client-three"]}' + recorded_at: Fri, 19 Sep 2025 07:18:14 GMT +recorded_with: VCR 6.3.1 diff --git a/fixtures/vcr_cassettes/examples/here_now/38.yml b/fixtures/vcr_cassettes/examples/here_now/38.yml new file mode 100644 index 000000000..f14164683 --- /dev/null +++ b/fixtures/vcr_cassettes/examples/here_now/38.yml @@ -0,0 +1,111 @@ +--- +http_interactions: +- request: + method: get + uri: http://ps.pndsn.com/v2/presence/sub-key/demo/channel/test-channel-514,test-channel-56,test-channel-195?auth=ruby-test-auth-client-one&limit=3&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one + body: + encoding: UTF-8 + string: '' + headers: + User-Agent: + - HTTPClient/1.0 (2.8.3, ruby 3.2.2 (2023-03-30)) + Accept: + - "*/*" + Date: + - Fri, 03 Oct 2025 12:29:56 GMT + response: + status: + code: 200 + message: OK + headers: + Date: + - Fri, 03 Oct 2025 12:29:57 GMT + Content-Type: + - text/javascript; charset="UTF-8" + Content-Length: + - '354' + Connection: + - keep-alive + Access-Control-Allow-Methods: + - OPTIONS, GET, POST + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - "*" + body: + encoding: UTF-8 + string: '{"message":"OK","payload":{"channels":{"test-channel-195":{"occupancy":1,"uuids":["web-user-704"]},"test-channel-514":{"occupancy":7,"uuids":["web-user-239","web-user-308","web-user-401"]},"test-channel-56":{"occupancy":4,"uuids":["web-user-281","web-user-849","web-user-771"]}},"total_channels":3,"total_occupancy":12},"service":"Presence","status":200}' + recorded_at: Fri, 03 Oct 2025 12:29:56 GMT +- request: + method: get + uri: http://ps.pndsn.com/v2/presence/sub-key/demo/channel/test-channel-514,test-channel-56,test-channel-195?auth=ruby-test-auth-client-one&l_pres=0.482&limit=3&offset=3&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one + body: + encoding: UTF-8 + string: '' + headers: + User-Agent: + - HTTPClient/1.0 (2.8.3, ruby 3.2.2 (2023-03-30)) + Accept: + - "*/*" + Date: + - Fri, 03 Oct 2025 12:29:56 GMT + response: + status: + code: 200 + message: OK + headers: + Date: + - Fri, 03 Oct 2025 12:29:57 GMT + Content-Type: + - text/javascript; charset="UTF-8" + Content-Length: + - '310' + Connection: + - keep-alive + Access-Control-Allow-Methods: + - OPTIONS, GET, POST + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - "*" + body: + encoding: UTF-8 + string: '{"message":"OK","payload":{"channels":{"test-channel-195":{"occupancy":1,"uuids":[]},"test-channel-514":{"occupancy":7,"uuids":["web-user-322","web-user-605","web-user-598"]},"test-channel-56":{"occupancy":4,"uuids":["web-user-848"]}},"total_channels":3,"total_occupancy":12},"service":"Presence","status":200}' + recorded_at: Fri, 03 Oct 2025 12:29:56 GMT +- request: + method: get + uri: http://ps.pndsn.com/v2/presence/sub-key/demo/channel/test-channel-514,test-channel-56,test-channel-195?auth=ruby-test-auth-client-one&l_pres=0.051&limit=3&offset=6&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one + body: + encoding: UTF-8 + string: '' + headers: + User-Agent: + - HTTPClient/1.0 (2.8.3, ruby 3.2.2 (2023-03-30)) + Accept: + - "*/*" + Date: + - Fri, 03 Oct 2025 12:29:56 GMT + response: + status: + code: 200 + message: OK + headers: + Date: + - Fri, 03 Oct 2025 12:29:57 GMT + Content-Type: + - text/javascript; charset="UTF-8" + Content-Length: + - '266' + Connection: + - keep-alive + Access-Control-Allow-Methods: + - OPTIONS, GET, POST + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - "*" + body: + encoding: UTF-8 + string: '{"message":"OK","payload":{"channels":{"test-channel-195":{"occupancy":1,"uuids":[]},"test-channel-514":{"occupancy":7,"uuids":["web-user-360"]},"test-channel-56":{"occupancy":4,"uuids":[]}},"total_channels":3,"total_occupancy":12},"service":"Presence","status":200}' + recorded_at: Fri, 03 Oct 2025 12:29:56 GMT +recorded_with: VCR 6.3.1 diff --git a/lib/pubnub/constants.rb b/lib/pubnub/constants.rb index 3d7c9cd77..dace30ac4 100644 --- a/lib/pubnub/constants.rb +++ b/lib/pubnub/constants.rb @@ -22,6 +22,7 @@ module Constants DEFAULT_USE_RANDOM_IV = true DEFAULT_SSL = false REQUEST_MESSAGE_COUNT_THRESHOLD = 0 + MAXIMUM_HERE_NOW_COUNT = 1000 # Envelope values # Errors diff --git a/lib/pubnub/event.rb b/lib/pubnub/event.rb index 9f684e1f7..6eb72f9d1 100644 --- a/lib/pubnub/event.rb +++ b/lib/pubnub/event.rb @@ -173,7 +173,7 @@ def create_variables_from_options(options) crypto_module secret_key auth_key publish_key subscribe_key timetoken action_timetoken message_timetoken open_timeout read_timeout idle_timeout heartbeat group action read write delete manage ttl presence start end count - limit max reverse presence_callback store skip_validate state channel_group + offset limit max reverse presence_callback store skip_validate state channel_group channel_groups compressed meta customs custom_message_type include_token include_custom_message_type include_message_actions include_message_type replicate with_presence cipher_key_selector include_meta include_uuid join diff --git a/lib/pubnub/events/here_now.rb b/lib/pubnub/events/here_now.rb index 2968c98ca..a15d6fd75 100644 --- a/lib/pubnub/events/here_now.rb +++ b/lib/pubnub/events/here_now.rb @@ -50,26 +50,56 @@ def global_path def parameters(*_args) parameters = super parameters['channel-group'] = @group.join(',') unless @group.blank? + + if current_operation == Pubnub::Constants::OPERATION_HERE_NOW + @limit = if !@limit&.positive? + Pubnub::Constants::MAXIMUM_HERE_NOW_COUNT + else + [Pubnub::Constants::MAXIMUM_HERE_NOW_COUNT, @limit].min + end + @offset = 0 if @offset.nil? + + parameters['limit'] = @limit + parameters['offset'] = @offset if @offset&.positive? + end + parameters end def valid_envelope(parsed_response, req_res_objects) + occupancy = parsed_response['payload'] ? parsed_response['payload']['total_occupancy'] : parsed_response['occupancy'] + limit_reached = false + + result = { + code: req_res_objects[:response].code, + operation: get_operation, + client_request: req_res_objects[:request], + server_response: req_res_objects[:response], + data: { + uuids: parsed_response['uuids'], + occupancy: occupancy, + total_occupancy: (parsed_response['payload'] ? parsed_response['payload']['total_occupancy'] : nil), + total_channels: (parsed_response['payload'] ? parsed_response['payload']['total_channels'] : nil), + channels: (parsed_response['payload'] ? parsed_response['payload']['channels'] : nil) + } + } + + if occupancy >= @limit + if !parsed_response.include?('payload') + limit_reached = result[:data][:uuids].length == @limit + else + result[:data][:channels].values.each do |channel| + limit_reached = channel['uuids'].length == @limit + break if limit_reached + end + end + end + result[:data][:nextOffset] = limit_reached ? @offset + @limit : nil + Pubnub::Envelope.new( event: @event, event_options: @given_options, - result: { - code: req_res_objects[:response].code, - operation: get_operation, - client_request: req_res_objects[:request], - server_response: req_res_objects[:response], - data: { - uuids: parsed_response['uuids'], - occupancy: parsed_response['occupancy'], - total_occupancy: (parsed_response['payload'] ? parsed_response['payload']['total_occupancy'] : nil), - total_channels: (parsed_response['payload'] ? parsed_response['payload']['total_channels'] : nil), - channels: (parsed_response['payload'] ? parsed_response['payload']['channels'] : nil) - } - }, + result: result, status: { code: req_res_objects[:response].code, client_request: req_res_objects[:request], diff --git a/spec/examples/here_now_examples_spec.rb b/spec/examples/here_now_examples_spec.rb index 0bf6877be..0a75573cc 100644 --- a/spec/examples/here_now_examples_spec.rb +++ b/spec/examples/here_now_examples_spec.rb @@ -9,8 +9,8 @@ end @pubnub = Pubnub.new( - publish_key: "pub-a-mock-key", - subscribe_key: "sub-a-mock-key", + publish_key: "demo", + subscribe_key: "demo", user_id: "ruby-test-uuid-client-one", auth_key: "ruby-test-auth-client-one", ) @@ -611,4 +611,142 @@ expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end + + it "__channel__here_now_test_channel___group__nil___limit__2___http_sync__true_" do + VCR.use_cassette("examples/here_now/36", record: :once) do + envelope = @pubnub.here_now(channel: "here-now-test-channel", limit: 2, http_sync: true) + expect(envelope.is_a?(Pubnub::Envelope)).to eq true + expect(envelope.error?).to eq false + + expect(envelope.status[:code]).to eq(200) + expect(envelope.status[:category]).to eq(:ack) + expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"}) + expect(envelope.status[:client_request].query).to include("limit=2") + expect(envelope.status[:client_request].query).to_not include("offset=0") + + expect(envelope.result[:code]).to eq(200) + expect(envelope.result[:operation]).to eq(:here_now) + expect(envelope.result[:data]).to eq({ + :occupancy => 4, + :nextOffset => 2, + :total_occupancy => nil, + :total_channels => nil, + :channels => nil, + :uuids => envelope.result[:data][:uuids] + }) + end + end + + it "__channel__here_now_test_channel___group__nil___limit__10000___http_sync__true_" do + VCR.use_cassette("examples/here_now/37", record: :once) do + envelope = @pubnub.here_now(channel: "here-now-test-channel", limit: 10000, http_sync: true) + expect(envelope.is_a?(Pubnub::Envelope)).to eq true + expect(envelope.error?).to eq false + + expect(envelope.status[:code]).to eq(200) + expect(envelope.status[:category]).to eq(:ack) + expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"}) + expect(envelope.status[:client_request].query).to include("limit=1000") + expect(envelope.status[:client_request].query).to_not include("offset=0") + + expect(envelope.result[:code]).to eq(200) + expect(envelope.result[:operation]).to eq(:here_now) + expect(envelope.result[:data]).to eq({ + :occupancy => 4, + :nextOffset => nil, + :total_occupancy => nil, + :total_channels => nil, + :channels => nil, + :uuids => envelope.result[:data][:uuids] + }) + end + end + + it "__channels_test_channel_514_test_channel_56_test_channel_195___group__nil___limit__3___offset__2_4___http_sync__true_" do + VCR.use_cassette("examples/here_now/38", record: :once) do + channels_list = %w[test-channel-514 test-channel-56 test-channel-195] + # Fetching first page. + envelope = @pubnub.here_now(channels: channels_list, limit: 3, http_sync: true) + expect(envelope.is_a?(Pubnub::Envelope)).to eq true + expect(envelope.error?).to eq false + + expect(envelope.status[:code]).to eq(200) + expect(envelope.status[:category]).to eq(:ack) + expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"}) + expect(envelope.status[:client_request].query).to include("limit=3") + expect(envelope.status[:client_request].query).to_not include("offset=0") + + expect(envelope.result[:code]).to eq(200) + expect(envelope.result[:operation]).to eq(:here_now) + expect(envelope.result[:data]).to eq({ + :occupancy => 12, + :nextOffset => 3, + :total_occupancy => 12, + :total_channels => 3, + :channels => envelope.result[:data][:channels], + :uuids => nil + }) + offset = envelope.result[:data][:nextOffset] + channels = envelope.result[:data][:channels] + + # Fetching next page + expect(offset).to eq(3) + envelope = @pubnub.here_now(channels: channels_list, limit: 3, offset: offset, http_sync: true) + expect(envelope.is_a?(Pubnub::Envelope)).to eq true + expect(envelope.error?).to eq false + + expect(envelope.status[:code]).to eq(200) + expect(envelope.status[:category]).to eq(:ack) + expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"}) + expect(envelope.status[:client_request].query).to include("limit=3") + expect(envelope.status[:client_request].query).to include("offset=#{offset}") + + expect(envelope.result[:code]).to eq(200) + expect(envelope.result[:operation]).to eq(:here_now) + expect(envelope.result[:data]).to eq({ + :occupancy => 12, + :nextOffset => 6, + :total_occupancy => 12, + :total_channels => 3, + :channels => envelope.result[:data][:channels], + :uuids => nil + }) + channels.each_pair do |channel_name, channel_data| + channel_data['uuids'].each do |uuid| + expect(envelope.result[:data][:channels][channel_name]['uuids']).not_to include(uuid) + end + end + offset = envelope.result[:data][:nextOffset] + channels = envelope.result[:data][:channels] + + + # Fetching last page + expect(offset).to eq(6) + envelope = @pubnub.here_now(channels: channels_list, limit: 3, offset: offset, http_sync: true) + expect(envelope.is_a?(Pubnub::Envelope)).to eq true + expect(envelope.error?).to eq false + + expect(envelope.status[:code]).to eq(200) + expect(envelope.status[:category]).to eq(:ack) + expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"}) + expect(envelope.status[:client_request].query).to include("limit=3") + expect(envelope.status[:client_request].query).to include("offset=#{offset}") + + expect(envelope.result[:code]).to eq(200) + expect(envelope.result[:operation]).to eq(:here_now) + expect(envelope.result[:data]).to eq({ + :occupancy => 12, + :nextOffset => nil, + :total_occupancy => 12, + :total_channels => 3, + :channels => envelope.result[:data][:channels], + :uuids => nil + }) + channels.each_pair do |channel_name, channel_data| + channel_data['uuids'].each do |uuid| + expect(envelope.result[:data][:channels][channel_name]['uuids']).not_to include(uuid) + end + end + end + end end From d2aa0f4845f0db8bbe1a199b10e20a30a06465f9 Mon Sep 17 00:00:00 2001 From: Serhii Mamontov Date: Fri, 3 Oct 2025 21:17:47 +0300 Subject: [PATCH 2/7] test(fixtures): add new required query parameter for here_now fixtures --- .../vcr_cassettes/examples/here_now/0.yml | 2 +- .../vcr_cassettes/examples/here_now/1.yml | 2 +- .../vcr_cassettes/examples/here_now/10.yml | 2 +- .../vcr_cassettes/examples/here_now/11.yml | 2 +- .../vcr_cassettes/examples/here_now/12.yml | 2 +- .../vcr_cassettes/examples/here_now/13.yml | 2 +- .../vcr_cassettes/examples/here_now/14.yml | 2 +- .../vcr_cassettes/examples/here_now/15.yml | 2 +- .../vcr_cassettes/examples/here_now/16.yml | 2 +- .../vcr_cassettes/examples/here_now/17.yml | 2 +- .../vcr_cassettes/examples/here_now/18.yml | 2 +- .../vcr_cassettes/examples/here_now/19.yml | 2 +- .../vcr_cassettes/examples/here_now/2.yml | 2 +- .../vcr_cassettes/examples/here_now/20.yml | 2 +- .../vcr_cassettes/examples/here_now/21.yml | 2 +- .../vcr_cassettes/examples/here_now/22.yml | 2 +- .../vcr_cassettes/examples/here_now/23.yml | 2 +- .../vcr_cassettes/examples/here_now/24.yml | 2 +- .../vcr_cassettes/examples/here_now/25.yml | 2 +- .../vcr_cassettes/examples/here_now/26.yml | 2 +- .../vcr_cassettes/examples/here_now/27.yml | 2 +- .../vcr_cassettes/examples/here_now/28.yml | 2 +- .../vcr_cassettes/examples/here_now/29.yml | 2 +- .../vcr_cassettes/examples/here_now/3.yml | 2 +- .../vcr_cassettes/examples/here_now/30.yml | 2 +- .../vcr_cassettes/examples/here_now/31.yml | 2 +- .../vcr_cassettes/examples/here_now/32.yml | 2 +- .../vcr_cassettes/examples/here_now/33.yml | 2 +- .../vcr_cassettes/examples/here_now/34.yml | 2 +- .../vcr_cassettes/examples/here_now/35.yml | 2 +- .../vcr_cassettes/examples/here_now/36.yml | 2 +- .../vcr_cassettes/examples/here_now/37.yml | 2 +- .../vcr_cassettes/examples/here_now/38.yml | 6 +- .../vcr_cassettes/examples/here_now/4.yml | 2 +- .../vcr_cassettes/examples/here_now/5.yml | 2 +- .../vcr_cassettes/examples/here_now/6.yml | 2 +- .../vcr_cassettes/examples/here_now/7.yml | 2 +- .../vcr_cassettes/examples/here_now/8.yml | 2 +- .../vcr_cassettes/examples/here_now/9.yml | 2 +- lib/pubnub/events/here_now.rb | 2 +- spec/examples/here_now_examples_spec.rb | 82 +++++++++---------- 41 files changed, 83 insertions(+), 83 deletions(-) diff --git a/fixtures/vcr_cassettes/examples/here_now/0.yml b/fixtures/vcr_cassettes/examples/here_now/0.yml index 51d292797..24998ad6f 100644 --- a/fixtures/vcr_cassettes/examples/here_now/0.yml +++ b/fixtures/vcr_cassettes/examples/here_now/0.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/1.yml b/fixtures/vcr_cassettes/examples/here_now/1.yml index d50b506de..ca987522e 100644 --- a/fixtures/vcr_cassettes/examples/here_now/1.yml +++ b/fixtures/vcr_cassettes/examples/here_now/1.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/10.yml b/fixtures/vcr_cassettes/examples/here_now/10.yml index 8c0bc8923..6f2b53b79 100644 --- a/fixtures/vcr_cassettes/examples/here_now/10.yml +++ b/fixtures/vcr_cassettes/examples/here_now/10.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/11.yml b/fixtures/vcr_cassettes/examples/here_now/11.yml index ecc48c37e..3f4e78267 100644 --- a/fixtures/vcr_cassettes/examples/here_now/11.yml +++ b/fixtures/vcr_cassettes/examples/here_now/11.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/12.yml b/fixtures/vcr_cassettes/examples/here_now/12.yml index fd7de19a4..106ee843a 100644 --- a/fixtures/vcr_cassettes/examples/here_now/12.yml +++ b/fixtures/vcr_cassettes/examples/here_now/12.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/13.yml b/fixtures/vcr_cassettes/examples/here_now/13.yml index 067500e9c..87ac1070b 100644 --- a/fixtures/vcr_cassettes/examples/here_now/13.yml +++ b/fixtures/vcr_cassettes/examples/here_now/13.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/14.yml b/fixtures/vcr_cassettes/examples/here_now/14.yml index 9c5713fbb..ca62cff34 100644 --- a/fixtures/vcr_cassettes/examples/here_now/14.yml +++ b/fixtures/vcr_cassettes/examples/here_now/14.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/15.yml b/fixtures/vcr_cassettes/examples/here_now/15.yml index 7b39e8879..e6e16b961 100644 --- a/fixtures/vcr_cassettes/examples/here_now/15.yml +++ b/fixtures/vcr_cassettes/examples/here_now/15.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/16.yml b/fixtures/vcr_cassettes/examples/here_now/16.yml index b68a70fda..b2c2b4747 100644 --- a/fixtures/vcr_cassettes/examples/here_now/16.yml +++ b/fixtures/vcr_cassettes/examples/here_now/16.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/17.yml b/fixtures/vcr_cassettes/examples/here_now/17.yml index 1cb174605..04061f863 100644 --- a/fixtures/vcr_cassettes/examples/here_now/17.yml +++ b/fixtures/vcr_cassettes/examples/here_now/17.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/18.yml b/fixtures/vcr_cassettes/examples/here_now/18.yml index f97b7dca2..fed583939 100644 --- a/fixtures/vcr_cassettes/examples/here_now/18.yml +++ b/fixtures/vcr_cassettes/examples/here_now/18.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/19.yml b/fixtures/vcr_cassettes/examples/here_now/19.yml index f97b7dca2..fed583939 100644 --- a/fixtures/vcr_cassettes/examples/here_now/19.yml +++ b/fixtures/vcr_cassettes/examples/here_now/19.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/2.yml b/fixtures/vcr_cassettes/examples/here_now/2.yml index 51d292797..24998ad6f 100644 --- a/fixtures/vcr_cassettes/examples/here_now/2.yml +++ b/fixtures/vcr_cassettes/examples/here_now/2.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/20.yml b/fixtures/vcr_cassettes/examples/here_now/20.yml index 1fb3073bc..75772c9ca 100644 --- a/fixtures/vcr_cassettes/examples/here_now/20.yml +++ b/fixtures/vcr_cassettes/examples/here_now/20.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/21.yml b/fixtures/vcr_cassettes/examples/here_now/21.yml index cb55b60b0..530a467dc 100644 --- a/fixtures/vcr_cassettes/examples/here_now/21.yml +++ b/fixtures/vcr_cassettes/examples/here_now/21.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/22.yml b/fixtures/vcr_cassettes/examples/here_now/22.yml index cb55b60b0..530a467dc 100644 --- a/fixtures/vcr_cassettes/examples/here_now/22.yml +++ b/fixtures/vcr_cassettes/examples/here_now/22.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/23.yml b/fixtures/vcr_cassettes/examples/here_now/23.yml index cb55b60b0..530a467dc 100644 --- a/fixtures/vcr_cassettes/examples/here_now/23.yml +++ b/fixtures/vcr_cassettes/examples/here_now/23.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/24.yml b/fixtures/vcr_cassettes/examples/here_now/24.yml index d5d93605f..547fbdb60 100644 --- a/fixtures/vcr_cassettes/examples/here_now/24.yml +++ b/fixtures/vcr_cassettes/examples/here_now/24.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/25.yml b/fixtures/vcr_cassettes/examples/here_now/25.yml index 1edfddee2..b464fa72b 100644 --- a/fixtures/vcr_cassettes/examples/here_now/25.yml +++ b/fixtures/vcr_cassettes/examples/here_now/25.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/26.yml b/fixtures/vcr_cassettes/examples/here_now/26.yml index 97ddbe9a9..7a674cca7 100644 --- a/fixtures/vcr_cassettes/examples/here_now/26.yml +++ b/fixtures/vcr_cassettes/examples/here_now/26.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/27.yml b/fixtures/vcr_cassettes/examples/here_now/27.yml index 9131a19b7..1a31c2f7b 100644 --- a/fixtures/vcr_cassettes/examples/here_now/27.yml +++ b/fixtures/vcr_cassettes/examples/here_now/27.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/28.yml b/fixtures/vcr_cassettes/examples/here_now/28.yml index 2e8157751..43a7704ac 100644 --- a/fixtures/vcr_cassettes/examples/here_now/28.yml +++ b/fixtures/vcr_cassettes/examples/here_now/28.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/29.yml b/fixtures/vcr_cassettes/examples/here_now/29.yml index 9131a19b7..1a31c2f7b 100644 --- a/fixtures/vcr_cassettes/examples/here_now/29.yml +++ b/fixtures/vcr_cassettes/examples/here_now/29.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/3.yml b/fixtures/vcr_cassettes/examples/here_now/3.yml index 26e3498a9..92f6fea72 100644 --- a/fixtures/vcr_cassettes/examples/here_now/3.yml +++ b/fixtures/vcr_cassettes/examples/here_now/3.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/30.yml b/fixtures/vcr_cassettes/examples/here_now/30.yml index 7fed627b3..56123d59f 100644 --- a/fixtures/vcr_cassettes/examples/here_now/30.yml +++ b/fixtures/vcr_cassettes/examples/here_now/30.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/31.yml b/fixtures/vcr_cassettes/examples/here_now/31.yml index 99f575ddd..072809e93 100644 --- a/fixtures/vcr_cassettes/examples/here_now/31.yml +++ b/fixtures/vcr_cassettes/examples/here_now/31.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/32.yml b/fixtures/vcr_cassettes/examples/here_now/32.yml index 4d56f9954..749756792 100644 --- a/fixtures/vcr_cassettes/examples/here_now/32.yml +++ b/fixtures/vcr_cassettes/examples/here_now/32.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/33.yml b/fixtures/vcr_cassettes/examples/here_now/33.yml index 1b5bc30c1..42c1191da 100644 --- a/fixtures/vcr_cassettes/examples/here_now/33.yml +++ b/fixtures/vcr_cassettes/examples/here_now/33.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/34.yml b/fixtures/vcr_cassettes/examples/here_now/34.yml index 4d56f9954..749756792 100644 --- a/fixtures/vcr_cassettes/examples/here_now/34.yml +++ b/fixtures/vcr_cassettes/examples/here_now/34.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/35.yml b/fixtures/vcr_cassettes/examples/here_now/35.yml index 1b5bc30c1..42c1191da 100644 --- a/fixtures/vcr_cassettes/examples/here_now/35.yml +++ b/fixtures/vcr_cassettes/examples/here_now/35.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/36.yml b/fixtures/vcr_cassettes/examples/here_now/36.yml index 297901d4e..8f8df8e8d 100644 --- a/fixtures/vcr_cassettes/examples/here_now/36.yml +++ b/fixtures/vcr_cassettes/examples/here_now/36.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/demo/channel/here-now-test-channel?auth=ruby-test-auth-client-one&limit=2&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/here-now-test-channel?auth=ruby-test-auth-client-one&limit=2&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/37.yml b/fixtures/vcr_cassettes/examples/here_now/37.yml index 68e151244..ba984e853 100644 --- a/fixtures/vcr_cassettes/examples/here_now/37.yml +++ b/fixtures/vcr_cassettes/examples/here_now/37.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/demo/channel/here-now-test-channel?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/here-now-test-channel?auth=ruby-test-auth-client-one&limit=1000&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/38.yml b/fixtures/vcr_cassettes/examples/here_now/38.yml index f14164683..d06ac5810 100644 --- a/fixtures/vcr_cassettes/examples/here_now/38.yml +++ b/fixtures/vcr_cassettes/examples/here_now/38.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/demo/channel/test-channel-514,test-channel-56,test-channel-195?auth=ruby-test-auth-client-one&limit=3&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/test-channel-514,test-channel-56,test-channel-195?auth=ruby-test-auth-client-one&limit=3&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' @@ -38,7 +38,7 @@ http_interactions: recorded_at: Fri, 03 Oct 2025 12:29:56 GMT - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/demo/channel/test-channel-514,test-channel-56,test-channel-195?auth=ruby-test-auth-client-one&l_pres=0.482&limit=3&offset=3&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/test-channel-514,test-channel-56,test-channel-195?auth=ruby-test-auth-client-one&l_pres=0.482&limit=3&offset=3&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' @@ -74,7 +74,7 @@ http_interactions: recorded_at: Fri, 03 Oct 2025 12:29:56 GMT - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/demo/channel/test-channel-514,test-channel-56,test-channel-195?auth=ruby-test-auth-client-one&l_pres=0.051&limit=3&offset=6&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/test-channel-514,test-channel-56,test-channel-195?auth=ruby-test-auth-client-one&l_pres=0.051&limit=3&offset=6&pnsdk=PubNub-Ruby/5.6.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/4.yml b/fixtures/vcr_cassettes/examples/here_now/4.yml index 26e3498a9..92f6fea72 100644 --- a/fixtures/vcr_cassettes/examples/here_now/4.yml +++ b/fixtures/vcr_cassettes/examples/here_now/4.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/5.yml b/fixtures/vcr_cassettes/examples/here_now/5.yml index 0dd610733..cbda7da4f 100644 --- a/fixtures/vcr_cassettes/examples/here_now/5.yml +++ b/fixtures/vcr_cassettes/examples/here_now/5.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/6.yml b/fixtures/vcr_cassettes/examples/here_now/6.yml index 423db7911..ad16aa6c3 100644 --- a/fixtures/vcr_cassettes/examples/here_now/6.yml +++ b/fixtures/vcr_cassettes/examples/here_now/6.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/7.yml b/fixtures/vcr_cassettes/examples/here_now/7.yml index 630777cf5..9a1254b84 100644 --- a/fixtures/vcr_cassettes/examples/here_now/7.yml +++ b/fixtures/vcr_cassettes/examples/here_now/7.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/8.yml b/fixtures/vcr_cassettes/examples/here_now/8.yml index bb7021771..960bbff0a 100644 --- a/fixtures/vcr_cassettes/examples/here_now/8.yml +++ b/fixtures/vcr_cassettes/examples/here_now/8.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/examples/here_now/9.yml b/fixtures/vcr_cassettes/examples/here_now/9.yml index 20ab3d246..24591bf01 100644 --- a/fixtures/vcr_cassettes/examples/here_now/9.yml +++ b/fixtures/vcr_cassettes/examples/here_now/9.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth-client-one&channel-group=demo&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid-client-one body: encoding: UTF-8 string: '' diff --git a/lib/pubnub/events/here_now.rb b/lib/pubnub/events/here_now.rb index a15d6fd75..da2c4899b 100644 --- a/lib/pubnub/events/here_now.rb +++ b/lib/pubnub/events/here_now.rb @@ -77,7 +77,7 @@ def valid_envelope(parsed_response, req_res_objects) server_response: req_res_objects[:response], data: { uuids: parsed_response['uuids'], - occupancy: occupancy, + occupancy: parsed_response['occupancy'], total_occupancy: (parsed_response['payload'] ? parsed_response['payload']['total_occupancy'] : nil), total_channels: (parsed_response['payload'] ? parsed_response['payload']['total_channels'] : nil), channels: (parsed_response['payload'] ? parsed_response['payload']['channels'] : nil) diff --git a/spec/examples/here_now_examples_spec.rb b/spec/examples/here_now_examples_spec.rb index 0a75573cc..bee26724f 100644 --- a/spec/examples/here_now_examples_spec.rb +++ b/spec/examples/here_now_examples_spec.rb @@ -9,8 +9,8 @@ end @pubnub = Pubnub.new( - publish_key: "demo", - subscribe_key: "demo", + publish_key: "pub-a-mock-key", + subscribe_key: "sub-a-mock-key", user_id: "ruby-test-uuid-client-one", auth_key: "ruby-test-auth-client-one", ) @@ -30,7 +30,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -46,7 +46,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -62,7 +62,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -79,7 +79,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -96,7 +96,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -113,7 +113,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -129,7 +129,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -145,7 +145,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -161,7 +161,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -178,7 +178,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -195,7 +195,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -212,7 +212,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -228,7 +228,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -244,7 +244,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -260,7 +260,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -277,7 +277,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -294,7 +294,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -311,7 +311,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -327,7 +327,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -343,7 +343,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -359,7 +359,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -376,7 +376,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -393,7 +393,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -410,7 +410,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -426,7 +426,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -442,7 +442,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -458,7 +458,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -475,7 +475,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -492,7 +492,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -509,7 +509,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -525,7 +525,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -541,7 +541,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -557,7 +557,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -574,7 +574,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -591,7 +591,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -608,7 +608,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -679,7 +679,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) expect(envelope.result[:data]).to eq({ - :occupancy => 12, + :occupancy => nil, :nextOffset => 3, :total_occupancy => 12, :total_channels => 3, @@ -704,7 +704,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) expect(envelope.result[:data]).to eq({ - :occupancy => 12, + :occupancy => nil, :nextOffset => 6, :total_occupancy => 12, :total_channels => 3, @@ -735,7 +735,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) expect(envelope.result[:data]).to eq({ - :occupancy => 12, + :occupancy => nil, :nextOffset => nil, :total_occupancy => 12, :total_channels => 3, From 794c23cc08ceca33fbd5630a1432846a2e748c65 Mon Sep 17 00:00:00 2001 From: Serhii Mamontov Date: Fri, 3 Oct 2025 21:36:27 +0300 Subject: [PATCH 3/7] test(fixtures): add new required query parameter for here_now fixtures --- .../examples/message_actions/get_008.yml | 2 +- .../lib/events/here-now-error.yml | 2 +- .../vcr_cassettes/lib/events/here-now.yml | 2 +- .../vcr_cassettes/lib/signatures/here_now.yml | 47 ------------------- .../lib/super_admin/here_now.yml | 2 +- 5 files changed, 4 insertions(+), 51 deletions(-) delete mode 100644 fixtures/vcr_cassettes/lib/signatures/here_now.yml diff --git a/fixtures/vcr_cassettes/examples/message_actions/get_008.yml b/fixtures/vcr_cassettes/examples/message_actions/get_008.yml index 4aa73a92b..0a21f28de 100644 --- a/fixtures/vcr_cassettes/examples/message_actions/get_008.yml +++ b/fixtures/vcr_cassettes/examples/message_actions/get_008.yml @@ -196,7 +196,7 @@ http_interactions: body: encoding: UTF-8 string: '{"type":"emotion_type_3","value":"surprised"}' - headers: + headers:` User-Agent: - HTTPClient/1.0 (2.8.3, ruby 3.0.0 (2020-12-25)) Accept: diff --git a/fixtures/vcr_cassettes/lib/events/here-now-error.yml b/fixtures/vcr_cassettes/lib/events/here-now-error.yml index 444c03cae..72782041d 100644 --- a/fixtures/vcr_cassettes/lib/events/here-now-error.yml +++ b/fixtures/vcr_cassettes/lib/events/here-now-error.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/lib/events/here-now.yml b/fixtures/vcr_cassettes/lib/events/here-now.yml index 4557ea4e8..c930b772c 100644 --- a/fixtures/vcr_cassettes/lib/events/here-now.yml +++ b/fixtures/vcr_cassettes/lib/events/here-now.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?auth=ruby-test-auth&limit=1000&pnsdk=PubNub-Ruby/4.1.0&uuid=ruby-test-uuid body: encoding: UTF-8 string: '' diff --git a/fixtures/vcr_cassettes/lib/signatures/here_now.yml b/fixtures/vcr_cassettes/lib/signatures/here_now.yml deleted file mode 100644 index 25e68f6b0..000000000 --- a/fixtures/vcr_cassettes/lib/signatures/here_now.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/a!@%23$%25%5E&*()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z?pnsdk=PubNub-Ruby/4.0.21&signature=TCAR%2BkkCtGwRwBLF6k7jFjXnBBcnFHqo4GQDX7MLVNQ=×tamp=1496401140&uuid=test - body: - encoding: UTF-8 - string: '' - headers: - User-Agent: - - HTTPClient/1.0 (2.8.3, ruby 2.1.10 (2016-04-01)) - Accept: - - "*/*" - Date: - - Fri, 02 Jun 2017 10:59:00 GMT - response: - status: - code: 200 - message: OK - headers: - Date: - - Fri, 02 Jun 2017 10:59:00 GMT - Content-Type: - - text/javascript; charset="UTF-8" - Content-Length: - - '84' - Connection: - - keep-alive - Access-Control-Allow-Origin: - - "*" - Access-Control-Allow-Methods: - - OPTIONS, GET, POST - Cache-Control: - - no-cache - Accept-Ranges: - - bytes - Age: - - '0' - Server: - - Pubnub Presence - body: - encoding: UTF-8 - string: '{"status": 200, "message": "OK", "occupancy": 0, "uuids": [], "service": - "Presence"}' - http_version: - recorded_at: Fri, 02 Jun 2017 10:59:00 GMT -recorded_with: VCR 3.0.1 diff --git a/fixtures/vcr_cassettes/lib/super_admin/here_now.yml b/fixtures/vcr_cassettes/lib/super_admin/here_now.yml index 7a731c66d..4be63c7e1 100644 --- a/fixtures/vcr_cassettes/lib/super_admin/here_now.yml +++ b/fixtures/vcr_cassettes/lib/super_admin/here_now.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?pnsdk=PubNub-Ruby/4.0.10&signature=7aPUXLeMx1NsCGYIcuPbzrzbxbUk8PBGVV4aw86f5I8=×tamp=1477672650&uuid=ruby-test + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/demo?limit=1000&pnsdk=PubNub-Ruby/4.0.10&signature=7aPUXLeMx1NsCGYIcuPbzrzbxbUk8PBGVV4aw86f5I8=×tamp=1477672650&uuid=ruby-test body: encoding: UTF-8 string: '' From 4f21e1db4318943149f744f8968507c77dc71396 Mon Sep 17 00:00:00 2001 From: Serhii Mamontov Date: Fri, 3 Oct 2025 21:41:48 +0300 Subject: [PATCH 4/7] test(fixtures): add missing fixture --- .../vcr_cassettes/lib/signatures/here_now.yml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 fixtures/vcr_cassettes/lib/signatures/here_now.yml diff --git a/fixtures/vcr_cassettes/lib/signatures/here_now.yml b/fixtures/vcr_cassettes/lib/signatures/here_now.yml new file mode 100644 index 000000000..2177a133c --- /dev/null +++ b/fixtures/vcr_cassettes/lib/signatures/here_now.yml @@ -0,0 +1,39 @@ +--- +http_interactions: +- request: + method: get + uri: http://ps.pndsn.com/v2/presence/sub-key/sub-a-mock-key/channel/a!@%23$%25%5E&*()%C5%BB%C3%93%C5%81%5B%5D%7B%7D%22%22%3C%3E%3F%3F~%60Z?limit=1000&pnsdk=PubNub-Ruby/4.0.21&signature=v2.kA0ehBw7JQEFu7g3Mk1polqVqiCSEB8-ZZk1ahElQgs×tamp=1496401140&uuid=test + body: + encoding: UTF-8 + string: '' + headers: + User-Agent: + - HTTPClient/1.0 (2.8.3, ruby 3.2.2 (2023-03-30)) + Accept: + - "*/*" + Date: + - Fri, 03 Oct 2025 18:26:23 GMT + response: + status: + code: 200 + message: OK + headers: + Date: + - Fri, 03 Oct 2025 18:26:24 GMT + Content-Type: + - text/javascript; charset="UTF-8" + Content-Length: + - '75' + Connection: + - keep-alive + Access-Control-Allow-Methods: + - OPTIONS, GET, POST + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - "*" + body: + encoding: UTF-8 + string: '{"message":"OK","occupancy":0,"service":"Presence","status":200,"uuids":[]}' + recorded_at: Fri, 03 Oct 2025 18:26:24 GMT +recorded_with: VCR 6.3.1 From a879741454b676b1b6bccfaae7bb2e7435658983 Mon Sep 17 00:00:00 2001 From: Serhii Mamontov Date: Tue, 14 Oct 2025 13:41:11 +0300 Subject: [PATCH 5/7] refactor(presence): revert returned here now response object schema --- lib/pubnub/events/here_now.rb | 43 ++++--------- spec/examples/here_now_examples_spec.rb | 85 ++++++++++++------------- 2 files changed, 52 insertions(+), 76 deletions(-) diff --git a/lib/pubnub/events/here_now.rb b/lib/pubnub/events/here_now.rb index da2c4899b..3f087a7d3 100644 --- a/lib/pubnub/events/here_now.rb +++ b/lib/pubnub/events/here_now.rb @@ -67,39 +67,22 @@ def parameters(*_args) end def valid_envelope(parsed_response, req_res_objects) - occupancy = parsed_response['payload'] ? parsed_response['payload']['total_occupancy'] : parsed_response['occupancy'] - limit_reached = false - - result = { - code: req_res_objects[:response].code, - operation: get_operation, - client_request: req_res_objects[:request], - server_response: req_res_objects[:response], - data: { - uuids: parsed_response['uuids'], - occupancy: parsed_response['occupancy'], - total_occupancy: (parsed_response['payload'] ? parsed_response['payload']['total_occupancy'] : nil), - total_channels: (parsed_response['payload'] ? parsed_response['payload']['total_channels'] : nil), - channels: (parsed_response['payload'] ? parsed_response['payload']['channels'] : nil) - } - } - - if occupancy >= @limit - if !parsed_response.include?('payload') - limit_reached = result[:data][:uuids].length == @limit - else - result[:data][:channels].values.each do |channel| - limit_reached = channel['uuids'].length == @limit - break if limit_reached - end - end - end - result[:data][:nextOffset] = limit_reached ? @offset + @limit : nil - Pubnub::Envelope.new( event: @event, event_options: @given_options, - result: result, + result: { + code: req_res_objects[:response].code, + operation: get_operation, + client_request: req_res_objects[:request], + server_response: req_res_objects[:response], + data: { + uuids: parsed_response['uuids'], + occupancy: parsed_response['occupancy'], + total_occupancy: (parsed_response['payload'] ? parsed_response['payload']['total_occupancy'] : nil), + total_channels: (parsed_response['payload'] ? parsed_response['payload']['total_channels'] : nil), + channels: (parsed_response['payload'] ? parsed_response['payload']['channels'] : nil) + } + }, status: { code: req_res_objects[:response].code, client_request: req_res_objects[:request], diff --git a/spec/examples/here_now_examples_spec.rb b/spec/examples/here_now_examples_spec.rb index bee26724f..e1244006c 100644 --- a/spec/examples/here_now_examples_spec.rb +++ b/spec/examples/here_now_examples_spec.rb @@ -30,7 +30,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -46,7 +46,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -62,7 +62,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -79,7 +79,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -96,7 +96,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -113,7 +113,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -129,7 +129,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -145,7 +145,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -161,7 +161,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -178,7 +178,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -195,7 +195,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -212,7 +212,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -228,7 +228,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -244,7 +244,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -260,7 +260,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -277,7 +277,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -294,7 +294,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -311,7 +311,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -327,7 +327,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -343,7 +343,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -359,7 +359,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -376,7 +376,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -393,7 +393,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -410,7 +410,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -426,7 +426,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -442,7 +442,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -458,7 +458,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -475,7 +475,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -492,7 +492,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -509,7 +509,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => nil, :nextOffset => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) + expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}}) end end @@ -525,7 +525,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -541,7 +541,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -557,7 +557,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -574,7 +574,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -591,7 +591,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -608,7 +608,7 @@ expect(envelope.result[:code]).to eq(200) expect(envelope.result[:operation]).to eq(:here_now) - expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :nextOffset => nil, :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) + expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil}) end end @@ -628,7 +628,6 @@ expect(envelope.result[:operation]).to eq(:here_now) expect(envelope.result[:data]).to eq({ :occupancy => 4, - :nextOffset => 2, :total_occupancy => nil, :total_channels => nil, :channels => nil, @@ -653,7 +652,6 @@ expect(envelope.result[:operation]).to eq(:here_now) expect(envelope.result[:data]).to eq({ :occupancy => 4, - :nextOffset => nil, :total_occupancy => nil, :total_channels => nil, :channels => nil, @@ -662,7 +660,7 @@ end end - it "__channels_test_channel_514_test_channel_56_test_channel_195___group__nil___limit__3___offset__2_4___http_sync__true_" do + it "__channels_test_channel_514_test_channel_56_test_channel_195___group__nil___limit__3___offset__3_6___http_sync__true_" do VCR.use_cassette("examples/here_now/38", record: :once) do channels_list = %w[test-channel-514 test-channel-56 test-channel-195] # Fetching first page. @@ -680,17 +678,15 @@ expect(envelope.result[:operation]).to eq(:here_now) expect(envelope.result[:data]).to eq({ :occupancy => nil, - :nextOffset => 3, :total_occupancy => 12, :total_channels => 3, :channels => envelope.result[:data][:channels], :uuids => nil }) - offset = envelope.result[:data][:nextOffset] channels = envelope.result[:data][:channels] # Fetching next page - expect(offset).to eq(3) + offset = 3 envelope = @pubnub.here_now(channels: channels_list, limit: 3, offset: offset, http_sync: true) expect(envelope.is_a?(Pubnub::Envelope)).to eq true expect(envelope.error?).to eq false @@ -705,7 +701,6 @@ expect(envelope.result[:operation]).to eq(:here_now) expect(envelope.result[:data]).to eq({ :occupancy => nil, - :nextOffset => 6, :total_occupancy => 12, :total_channels => 3, :channels => envelope.result[:data][:channels], @@ -716,12 +711,11 @@ expect(envelope.result[:data][:channels][channel_name]['uuids']).not_to include(uuid) end end - offset = envelope.result[:data][:nextOffset] channels = envelope.result[:data][:channels] # Fetching last page - expect(offset).to eq(6) + offset = 6 envelope = @pubnub.here_now(channels: channels_list, limit: 3, offset: offset, http_sync: true) expect(envelope.is_a?(Pubnub::Envelope)).to eq true expect(envelope.error?).to eq false @@ -736,7 +730,6 @@ expect(envelope.result[:operation]).to eq(:here_now) expect(envelope.result[:data]).to eq({ :occupancy => nil, - :nextOffset => nil, :total_occupancy => 12, :total_channels => 3, :channels => envelope.result[:data][:channels], From 5c9a3499ba5a4e24c24a9bb3e57e3746f8bb8dda Mon Sep 17 00:00:00 2001 From: Serhii Mamontov Date: Wed, 15 Oct 2025 12:25:37 +0300 Subject: [PATCH 6/7] test(fixtures): remove redundant character from the yml file --- fixtures/vcr_cassettes/examples/message_actions/get_008.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixtures/vcr_cassettes/examples/message_actions/get_008.yml b/fixtures/vcr_cassettes/examples/message_actions/get_008.yml index 0a21f28de..4aa73a92b 100644 --- a/fixtures/vcr_cassettes/examples/message_actions/get_008.yml +++ b/fixtures/vcr_cassettes/examples/message_actions/get_008.yml @@ -196,7 +196,7 @@ http_interactions: body: encoding: UTF-8 string: '{"type":"emotion_type_3","value":"surprised"}' - headers:` + headers: User-Agent: - HTTPClient/1.0 (2.8.3, ruby 3.0.0 (2020-12-25)) Accept: From 86bfb1415a4fca6d26da1dd9ea3938f68ebd5132 Mon Sep 17 00:00:00 2001 From: PubNub Release Bot <120067856+pubnub-release-bot@users.noreply.github.com> Date: Wed, 15 Oct 2025 13:13:28 +0000 Subject: [PATCH 7/7] PubNub SDK v6.0.0 release. --- .pubnub.yml | 13 +++++++++---- CHANGELOG.md | 6 ++++++ Gemfile.lock | 2 +- VERSION | 2 +- lib/pubnub/version.rb | 2 +- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.pubnub.yml b/.pubnub.yml index 379020cb8..7459ee8f3 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,6 +1,11 @@ --- -version: "5.6.0" +version: "6.0.0" changelog: + - date: 2025-10-15 + version: v6.0.0 + changes: + - type: feature + text: "BREAKING CHANGES: Add 'limit' and 'offset' parameters for 'here_now' for pagination support." - date: 2025-09-11 version: v5.6.0 changes: @@ -613,7 +618,7 @@ sdks: - x86-64 - distribution-type: package distribution-repository: RubyGems - package-name: pubnub-5.6.0.gem + package-name: pubnub-6.0.0.gem location: https://rubygems.org/gems/pubnub requires: - name: addressable @@ -718,8 +723,8 @@ sdks: - x86-64 - distribution-type: library distribution-repository: GitHub release - package-name: pubnub-5.6.0.gem - location: https://github.com/pubnub/ruby/releases/download/v5.6.0/pubnub-5.6.0.gem + package-name: pubnub-6.0.0.gem + location: https://github.com/pubnub/ruby/releases/download/v6.0.0/pubnub-6.0.0.gem requires: - name: addressable min-version: 2.0.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ede2cdb8..8fcd59103 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v6.0.0 +October 15 2025 + +#### Added +- BREAKING CHANGES: Add 'limit' and 'offset' parameters for 'here_now' for pagination support. + ## v5.6.0 September 11 2025 diff --git a/Gemfile.lock b/Gemfile.lock index 298e24362..3276ce29f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - pubnub (5.6.0) + pubnub (6.0.0) addressable (>= 2.0.0) concurrent-ruby (~> 1.3.4) concurrent-ruby-edge (~> 0.7.1) diff --git a/VERSION b/VERSION index 1bc788d3b..09b254e90 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.6.0 +6.0.0 diff --git a/lib/pubnub/version.rb b/lib/pubnub/version.rb index 05d6655b2..8fa650f46 100644 --- a/lib/pubnub/version.rb +++ b/lib/pubnub/version.rb @@ -1,4 +1,4 @@ # Toplevel Pubnub module. module Pubnub - VERSION = '5.6.0'.freeze + VERSION = '6.0.0'.freeze end