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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd4c3aa19d41b8717dcc6f5abbe1111e2dbca95ccfd99f515adce980f01723f1
4
- data.tar.gz: d9804ce12a02132dc755a0a23d9ed377c626f6bc6c96bd55a17c7153dd0c259c
3
+ metadata.gz: 2778ad34b51350c0d6af9fde2bb7e885b13de4e21bac9569f97b66de1ad171c1
4
+ data.tar.gz: fd0504f1db47b942981fadca4c19608618d243b41e3ec7e10955b0d782996dc3
5
5
  SHA512:
6
- metadata.gz: 4344bd4f151fe5a9236b156596e3d510a245f8aa44d047ce6e6c79735f0423491674da4b5ad0a9407d86eb94796f8849ecddc2fc62d545c10c815295165ffff5
7
- data.tar.gz: 6efb6dc780be5fb8e493f7e092d792079ae8e7f284c6c427284d0ffe3587fd35ef88d90de4aaa4680605ce30f796d9b9e1ea13483a846ffdbbbbb13607708563
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.
@@ -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.encode(custom_data) if custom_data
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.encode(user_data)
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.encode(data)
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.encode({
483
+ MultiJson.dump({
484
484
  "nonce" => Base64::strict_encode64(nonce),
485
485
  "ciphertext" => Base64::strict_encode64(ciphertext),
486
486
  })
@@ -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.decode(body))
89
+ return symbolize_first_level(MultiJson.load(body))
90
90
  when 202
91
- return body.empty? ? true : symbolize_first_level(MultiJson.decode(body))
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
@@ -14,12 +14,12 @@ module Pusher
14
14
  end
15
15
 
16
16
  def post(params)
17
- body = MultiJson.encode(params)
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.encode(params)
22
+ body = MultiJson.dump(params)
23
23
  create_request(:post, {}, body).send_async
24
24
  end
25
25
 
@@ -1,3 +1,3 @@
1
1
  module Pusher
2
- VERSION = '2.1.0'
2
+ VERSION = '2.1.1'
3
3
  end
@@ -88,7 +88,7 @@ module Pusher
88
88
  @data ||= begin
89
89
  case @content_type
90
90
  when 'application/json'
91
- MultiJson.decode(@body)
91
+ MultiJson.load(@body)
92
92
  else
93
93
  raise "Unknown Content-Type (#{@content_type})"
94
94
  end
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.0
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-04-02 00:00:00.000000000 Z
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