pubnub 5.6.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +2 -2
- data/.pubnub.yml +18 -4
- data/CHANGELOG.md +16 -0
- data/Gemfile.lock +1 -1
- data/Pubnub Ruby SDK upgrade guide.md +4 -4
- data/VERSION +1 -1
- data/lib/pubnub/client.rb +2 -4
- data/lib/pubnub/constants.rb +1 -0
- data/lib/pubnub/event.rb +1 -1
- data/lib/pubnub/events/heartbeat.rb +4 -1
- data/lib/pubnub/events/here_now.rb +9 -0
- data/lib/pubnub/subscribe_event.rb +5 -2
- data/lib/pubnub/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5cc78cb2f721089e3b11e296957eb5ff594532d14153ce87a9cc24e6fcff027f
|
|
4
|
+
data.tar.gz: 8208d0dfed383cefe4ccad85561d4817ec29b034ad576d8c0071e7128d028b4a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99188584f3be07b794f73b64ab005476a28089605c44b5caf5f146682c26e2451f4ff8ed383ec48690f778f30f0d78c7fbd2fd8c91f1ca4a1d1febd4d50cb472
|
|
7
|
+
data.tar.gz: c9e646909f7b6cfdebb8c3ea2b07c2a2ce3a773ff1d1ef7b204c4176b40d24e321e34545293864e264adee5f9c26de2a20ed2e0e90c92055f69614f2cd9f9373
|
data/.github/CODEOWNERS
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
* @parfeon @jguz-pubnub
|
|
2
|
-
README.md @techwritermat @kazydek @parfeon @jguz-pubnub
|
|
1
|
+
* @parfeon @mohitpubnub @jguz-pubnub
|
|
2
|
+
README.md @techwritermat @kazydek @parfeon @mohitpubnub @jguz-pubnub
|
data/.pubnub.yml
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
version: "
|
|
2
|
+
version: "6.0.1"
|
|
3
3
|
changelog:
|
|
4
|
+
- date: 2025-11-04
|
|
5
|
+
version: v6.0.1
|
|
6
|
+
changes:
|
|
7
|
+
- type: bug
|
|
8
|
+
text: "Send proper object for `state` with the `heartbeat` request."
|
|
9
|
+
- type: improvement
|
|
10
|
+
text: "Don't cap `limit` and let the server perform value validation."
|
|
11
|
+
- type: improvement
|
|
12
|
+
text: "Replace legacy timetoken query parameter with subscribe v2 parameters."
|
|
13
|
+
- date: 2025-10-15
|
|
14
|
+
version: v6.0.0
|
|
15
|
+
changes:
|
|
16
|
+
- type: feature
|
|
17
|
+
text: "BREAKING CHANGES: Add 'limit' and 'offset' parameters for 'here_now' for pagination support."
|
|
4
18
|
- date: 2025-09-11
|
|
5
19
|
version: v5.6.0
|
|
6
20
|
changes:
|
|
@@ -613,7 +627,7 @@ sdks:
|
|
|
613
627
|
- x86-64
|
|
614
628
|
- distribution-type: package
|
|
615
629
|
distribution-repository: RubyGems
|
|
616
|
-
package-name: pubnub-
|
|
630
|
+
package-name: pubnub-6.0.1.gem
|
|
617
631
|
location: https://rubygems.org/gems/pubnub
|
|
618
632
|
requires:
|
|
619
633
|
- name: addressable
|
|
@@ -718,8 +732,8 @@ sdks:
|
|
|
718
732
|
- x86-64
|
|
719
733
|
- distribution-type: library
|
|
720
734
|
distribution-repository: GitHub release
|
|
721
|
-
package-name: pubnub-
|
|
722
|
-
location: https://github.com/pubnub/ruby/releases/download/
|
|
735
|
+
package-name: pubnub-6.0.1.gem
|
|
736
|
+
location: https://github.com/pubnub/ruby/releases/download/v6.0.1/pubnub-6.0.1.gem
|
|
723
737
|
requires:
|
|
724
738
|
- name: addressable
|
|
725
739
|
min-version: 2.0.0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## v6.0.1
|
|
2
|
+
November 04 2025
|
|
3
|
+
|
|
4
|
+
#### Fixed
|
|
5
|
+
- Send proper object for `state` with the `heartbeat` request.
|
|
6
|
+
|
|
7
|
+
#### Modified
|
|
8
|
+
- Don't cap `limit` and let the server perform value validation.
|
|
9
|
+
- Replace legacy timetoken query parameter with subscribe v2 parameters.
|
|
10
|
+
|
|
11
|
+
## v6.0.0
|
|
12
|
+
October 15 2025
|
|
13
|
+
|
|
14
|
+
#### Added
|
|
15
|
+
- BREAKING CHANGES: Add 'limit' and 'offset' parameters for 'here_now' for pagination support.
|
|
16
|
+
|
|
1
17
|
## v5.6.0
|
|
2
18
|
September 11 2025
|
|
3
19
|
|
data/Gemfile.lock
CHANGED
|
@@ -113,7 +113,7 @@ Most important part: `result[:data]`
|
|
|
113
113
|
{:code=>200,
|
|
114
114
|
:operation=>:subscribe,
|
|
115
115
|
:client_request=>
|
|
116
|
-
#<URI::HTTP http://pubsub.pubnub.com/v2/subscribe/demo/whatever/0?pnsdk=PubNub-Ruby%2F4.0.13&
|
|
116
|
+
#<URI::HTTP http://pubsub.pubnub.com/v2/subscribe/demo/whatever/0?pnsdk=PubNub-Ruby%2F4.0.13&tr=12&tt=14793085739462384&uuid=37c5370b-6fca-4fcc-a7d1-f82f18596e88>,
|
|
117
117
|
:server_response=>
|
|
118
118
|
#<HTTP::Message:0x0056126377b368
|
|
119
119
|
@http_body=
|
|
@@ -147,7 +147,7 @@ Most important part: `result[:data]`
|
|
|
147
147
|
@request_method="GET",
|
|
148
148
|
@request_query=nil,
|
|
149
149
|
@request_uri=
|
|
150
|
-
#<Addressable::URI:0x2b0931bbdf54 URI:http://pubsub.pubnub.com/v2/subscribe/demo/whatever/0?pnsdk=PubNub-Ruby%2F4.0.13&
|
|
150
|
+
#<Addressable::URI:0x2b0931bbdf54 URI:http://pubsub.pubnub.com/v2/subscribe/demo/whatever/0?pnsdk=PubNub-Ruby%2F4.0.13&tr=12&tt=14793085739462384&uuid=37c5370b-6fca-4fcc-a7d1-f82f18596e88>,
|
|
151
151
|
@status_code=200>,
|
|
152
152
|
@peer_cert=nil,
|
|
153
153
|
@previous=nil>,
|
|
@@ -162,7 +162,7 @@ Most important part: `result[:data]`
|
|
|
162
162
|
@status=
|
|
163
163
|
{:code=>200,
|
|
164
164
|
:client_request=>
|
|
165
|
-
#<URI::HTTP http://pubsub.pubnub.com/v2/subscribe/demo/whatever/0?pnsdk=PubNub-Ruby%2F4.0.13&
|
|
165
|
+
#<URI::HTTP http://pubsub.pubnub.com/v2/subscribe/demo/whatever/0?pnsdk=PubNub-Ruby%2F4.0.13&tr=12&tt=14793085739462384&uuid=37c5370b-6fca-4fcc-a7d1-f82f18596e88>,
|
|
166
166
|
:server_response=>
|
|
167
167
|
#<HTTP::Message:0x0056126377b368
|
|
168
168
|
@http_body=
|
|
@@ -196,7 +196,7 @@ Most important part: `result[:data]`
|
|
|
196
196
|
@request_method="GET",
|
|
197
197
|
@request_query=nil,
|
|
198
198
|
@request_uri=
|
|
199
|
-
#<Addressable::URI:0x2b0931bbdf54 URI:http://pubsub.pubnub.com/v2/subscribe/demo/whatever/0?pnsdk=PubNub-Ruby%2F4.0.13&
|
|
199
|
+
#<Addressable::URI:0x2b0931bbdf54 URI:http://pubsub.pubnub.com/v2/subscribe/demo/whatever/0?pnsdk=PubNub-Ruby%2F4.0.13&tr=12&tt=14793085739462384&uuid=37c5370b-6fca-4fcc-a7d1-f82f18596e88>,
|
|
200
200
|
@status_code=200>,
|
|
201
201
|
@peer_cert=nil,
|
|
202
202
|
@previous=nil>,
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
6.0.1
|
data/lib/pubnub/client.rb
CHANGED
|
@@ -310,11 +310,11 @@ module Pubnub
|
|
|
310
310
|
return unless event.state
|
|
311
311
|
|
|
312
312
|
event.channel.each do |channel|
|
|
313
|
-
@env[:state][event.origin][
|
|
313
|
+
@env[:state][event.origin][channel] = event.state
|
|
314
314
|
end
|
|
315
315
|
|
|
316
316
|
event.group.each do |group|
|
|
317
|
-
@env[:state][event.origin][
|
|
317
|
+
@env[:state][event.origin][group] = event.state
|
|
318
318
|
end
|
|
319
319
|
end
|
|
320
320
|
|
|
@@ -357,8 +357,6 @@ module Pubnub
|
|
|
357
357
|
def create_state_pools(event)
|
|
358
358
|
@env[:state] ||= {}
|
|
359
359
|
@env[:state][event.origin] ||= {}
|
|
360
|
-
@env[:state][event.origin][:channel] ||= {}
|
|
361
|
-
@env[:state][event.origin][:group] ||= {}
|
|
362
360
|
end
|
|
363
361
|
|
|
364
362
|
def setup_httpclient(event_type)
|
data/lib/pubnub/constants.rb
CHANGED
data/lib/pubnub/event.rb
CHANGED
|
@@ -173,7 +173,7 @@ module Pubnub
|
|
|
173
173
|
crypto_module secret_key auth_key publish_key subscribe_key timetoken
|
|
174
174
|
action_timetoken message_timetoken open_timeout read_timeout idle_timeout
|
|
175
175
|
heartbeat group action read write delete manage ttl presence start end count
|
|
176
|
-
limit max reverse presence_callback store skip_validate state channel_group
|
|
176
|
+
offset limit max reverse presence_callback store skip_validate state channel_group
|
|
177
177
|
channel_groups compressed meta customs custom_message_type include_token
|
|
178
178
|
include_custom_message_type include_message_actions include_message_type
|
|
179
179
|
replicate with_presence cipher_key_selector include_meta include_uuid join
|
|
@@ -32,7 +32,10 @@ module Pubnub
|
|
|
32
32
|
|
|
33
33
|
def parameters(*_args)
|
|
34
34
|
parameters = super
|
|
35
|
-
|
|
35
|
+
if @app.env[:state] && @app.env[:state][@origin]
|
|
36
|
+
parameters[:state] = encode_state(@app.env[:state][@origin])
|
|
37
|
+
parameters.delete(:state) if parameters[:state] == '%7B%7D'
|
|
38
|
+
end
|
|
36
39
|
parameters[:heartbeat] = @heartbeat
|
|
37
40
|
parameters['channel-group'] = @group.join(',') unless @group.blank?
|
|
38
41
|
parameters
|
|
@@ -50,6 +50,15 @@ module Pubnub
|
|
|
50
50
|
def parameters(*_args)
|
|
51
51
|
parameters = super
|
|
52
52
|
parameters['channel-group'] = @group.join(',') unless @group.blank?
|
|
53
|
+
|
|
54
|
+
if current_operation == Pubnub::Constants::OPERATION_HERE_NOW
|
|
55
|
+
@limit = Pubnub::Constants::MAXIMUM_HERE_NOW_COUNT if @limit.nil?
|
|
56
|
+
@offset = 0 if @offset.nil?
|
|
57
|
+
|
|
58
|
+
parameters['limit'] = @limit
|
|
59
|
+
parameters['offset'] = @offset if @offset&.positive?
|
|
60
|
+
end
|
|
61
|
+
|
|
53
62
|
parameters
|
|
54
63
|
end
|
|
55
64
|
|
|
@@ -143,7 +143,10 @@ module Pubnub
|
|
|
143
143
|
end
|
|
144
144
|
|
|
145
145
|
def add_timetoken_to_params(params)
|
|
146
|
-
|
|
146
|
+
if @app.env[:timetoken]&.to_i&.positive?
|
|
147
|
+
params[:tt] = @app.timetoken
|
|
148
|
+
params[:tr] = @app.region_code
|
|
149
|
+
end
|
|
147
150
|
params
|
|
148
151
|
end
|
|
149
152
|
|
|
@@ -153,7 +156,7 @@ module Pubnub
|
|
|
153
156
|
end
|
|
154
157
|
|
|
155
158
|
def add_state_to_params(params)
|
|
156
|
-
params[:state] = encode_parameter(@app.env[:state][@origin]
|
|
159
|
+
params[:state] = encode_parameter(@app.env[:state][@origin]) unless @app.empty_state?
|
|
157
160
|
params
|
|
158
161
|
end
|
|
159
162
|
end
|
data/lib/pubnub/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pubnub
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 6.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- PubNub
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-11-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|