pubnub 6.0.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 +13 -4
- data/CHANGELOG.md +10 -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/events/heartbeat.rb +4 -1
- data/lib/pubnub/events/here_now.rb +1 -5
- 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,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
version: "6.0.
|
|
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."
|
|
4
13
|
- date: 2025-10-15
|
|
5
14
|
version: v6.0.0
|
|
6
15
|
changes:
|
|
@@ -618,7 +627,7 @@ sdks:
|
|
|
618
627
|
- x86-64
|
|
619
628
|
- distribution-type: package
|
|
620
629
|
distribution-repository: RubyGems
|
|
621
|
-
package-name: pubnub-6.0.
|
|
630
|
+
package-name: pubnub-6.0.1.gem
|
|
622
631
|
location: https://rubygems.org/gems/pubnub
|
|
623
632
|
requires:
|
|
624
633
|
- name: addressable
|
|
@@ -723,8 +732,8 @@ sdks:
|
|
|
723
732
|
- x86-64
|
|
724
733
|
- distribution-type: library
|
|
725
734
|
distribution-repository: GitHub release
|
|
726
|
-
package-name: pubnub-6.0.
|
|
727
|
-
location: https://github.com/pubnub/ruby/releases/download/v6.0.
|
|
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
|
|
728
737
|
requires:
|
|
729
738
|
- name: addressable
|
|
730
739
|
min-version: 2.0.0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
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
|
+
|
|
1
11
|
## v6.0.0
|
|
2
12
|
October 15 2025
|
|
3
13
|
|
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
|
-
6.0.
|
|
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)
|
|
@@ -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
|
|
@@ -52,11 +52,7 @@ module Pubnub
|
|
|
52
52
|
parameters['channel-group'] = @group.join(',') unless @group.blank?
|
|
53
53
|
|
|
54
54
|
if current_operation == Pubnub::Constants::OPERATION_HERE_NOW
|
|
55
|
-
@limit = if
|
|
56
|
-
Pubnub::Constants::MAXIMUM_HERE_NOW_COUNT
|
|
57
|
-
else
|
|
58
|
-
[Pubnub::Constants::MAXIMUM_HERE_NOW_COUNT, @limit].min
|
|
59
|
-
end
|
|
55
|
+
@limit = Pubnub::Constants::MAXIMUM_HERE_NOW_COUNT if @limit.nil?
|
|
60
56
|
@offset = 0 if @offset.nil?
|
|
61
57
|
|
|
62
58
|
parameters['limit'] = @limit
|
|
@@ -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: 6.0.
|
|
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
|