pusher 2.1.0 → 2.1.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/CHANGELOG.md +6 -0
- data/lib/pusher/channel.rb +1 -1
- data/lib/pusher/client.rb +3 -3
- data/lib/pusher/request.rb +2 -2
- data/lib/pusher/resource.rb +2 -2
- data/lib/pusher/version.rb +1 -1
- data/lib/pusher/webhook.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2778ad34b51350c0d6af9fde2bb7e885b13de4e21bac9569f97b66de1ad171c1
|
|
4
|
+
data.tar.gz: fd0504f1db47b942981fadca4c19608618d243b41e3ec7e10955b0d782996dc3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c0252bffa5bfccaedcd59ca2680bd010405842ed485fd8ad5a72b77d8b413dce778596a234a669323c2b7bdb7526b565f49501786dc443221b5bb67f146a029
|
|
7
|
+
data.tar.gz: c8640b4a96a37f464e19643ae7e630abb894ef8d2fe90cd5f9b6da971d3eee59b3518080a5a8e8bf4136acd73443aeef853968a6905419eb514eee03eef93353
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.1.1
|
|
4
|
+
|
|
5
|
+
* [FIXED] Fix MultiJson deprecation warnings (encode/decode → dump/load)
|
|
6
|
+
* [FIXED] Fix RSpec deprecation warnings across spec files
|
|
7
|
+
* [FIXED] Add logger gem to development dependencies for Ruby 4.0 compatibility
|
|
8
|
+
|
|
3
9
|
## 2.1.0
|
|
4
10
|
|
|
5
11
|
* [FIXED] Reset HTTP client connection after unknown error responses to prevent subsequent requests from failing.
|
data/lib/pusher/channel.rb
CHANGED
|
@@ -156,7 +156,7 @@ module Pusher
|
|
|
156
156
|
# @private Custom data is sent to server as JSON-encoded string
|
|
157
157
|
#
|
|
158
158
|
def authenticate(socket_id, custom_data = nil)
|
|
159
|
-
custom_data = MultiJson.
|
|
159
|
+
custom_data = MultiJson.dump(custom_data) if custom_data
|
|
160
160
|
auth = authentication_string(socket_id, custom_data)
|
|
161
161
|
r = {:auth => auth}
|
|
162
162
|
r[:channel_data] = custom_data if custom_data
|
data/lib/pusher/client.rb
CHANGED
|
@@ -374,7 +374,7 @@ module Pusher
|
|
|
374
374
|
def authenticate_user(socket_id, user_data)
|
|
375
375
|
validate_user_data(user_data)
|
|
376
376
|
|
|
377
|
-
custom_data = MultiJson.
|
|
377
|
+
custom_data = MultiJson.dump(user_data)
|
|
378
378
|
auth = authentication_string(socket_id, custom_data)
|
|
379
379
|
|
|
380
380
|
{ auth:, user_data: custom_data }
|
|
@@ -461,7 +461,7 @@ module Pusher
|
|
|
461
461
|
# JSON-encode the data if it's not a string
|
|
462
462
|
def encode_data(data)
|
|
463
463
|
return data if data.is_a? String
|
|
464
|
-
MultiJson.
|
|
464
|
+
MultiJson.dump(data)
|
|
465
465
|
end
|
|
466
466
|
|
|
467
467
|
# Encrypts a message with a key derived from the master key and channel
|
|
@@ -480,7 +480,7 @@ module Pusher
|
|
|
480
480
|
nonce = RbNaCl::Random.random_bytes(secret_box.nonce_bytes)
|
|
481
481
|
ciphertext = secret_box.encrypt(nonce, encoded_data)
|
|
482
482
|
|
|
483
|
-
MultiJson.
|
|
483
|
+
MultiJson.dump({
|
|
484
484
|
"nonce" => Base64::strict_encode64(nonce),
|
|
485
485
|
"ciphertext" => Base64::strict_encode64(ciphertext),
|
|
486
486
|
})
|
data/lib/pusher/request.rb
CHANGED
|
@@ -86,9 +86,9 @@ module Pusher
|
|
|
86
86
|
def handle_response(status_code, body)
|
|
87
87
|
case status_code
|
|
88
88
|
when 200
|
|
89
|
-
return symbolize_first_level(MultiJson.
|
|
89
|
+
return symbolize_first_level(MultiJson.load(body))
|
|
90
90
|
when 202
|
|
91
|
-
return body.empty? ? true : symbolize_first_level(MultiJson.
|
|
91
|
+
return body.empty? ? true : symbolize_first_level(MultiJson.load(body))
|
|
92
92
|
when 400
|
|
93
93
|
raise Error, "Bad request: #{body}"
|
|
94
94
|
when 401
|
data/lib/pusher/resource.rb
CHANGED
|
@@ -14,12 +14,12 @@ module Pusher
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def post(params)
|
|
17
|
-
body = MultiJson.
|
|
17
|
+
body = MultiJson.dump(params)
|
|
18
18
|
create_request(:post, {}, body).send_sync
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def post_async(params)
|
|
22
|
-
body = MultiJson.
|
|
22
|
+
body = MultiJson.dump(params)
|
|
23
23
|
create_request(:post, {}, body).send_async
|
|
24
24
|
end
|
|
25
25
|
|
data/lib/pusher/version.rb
CHANGED
data/lib/pusher/webhook.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pusher
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pusher
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-05-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: multi_json
|
|
@@ -164,6 +164,20 @@ dependencies:
|
|
|
164
164
|
- - "~>"
|
|
165
165
|
- !ruby/object:Gem::Version
|
|
166
166
|
version: '7.1'
|
|
167
|
+
- !ruby/object:Gem::Dependency
|
|
168
|
+
name: logger
|
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
|
170
|
+
requirements:
|
|
171
|
+
- - "~>"
|
|
172
|
+
- !ruby/object:Gem::Version
|
|
173
|
+
version: '1.0'
|
|
174
|
+
type: :development
|
|
175
|
+
prerelease: false
|
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
177
|
+
requirements:
|
|
178
|
+
- - "~>"
|
|
179
|
+
- !ruby/object:Gem::Version
|
|
180
|
+
version: '1.0'
|
|
167
181
|
description: 'Wrapper for Pusher Channels REST api: : https://pusher.com/channels'
|
|
168
182
|
email:
|
|
169
183
|
- support@pusher.com
|