pubnub 4.2.6 → 4.2.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pubnub might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f7a81a88398281f6a7aabc7b3a6cfdc12c3f2c69d3f38648f35de7143e325d4
4
- data.tar.gz: cc0ceed081a5b115b283fe9ccc0e344e9865b815e3fef4b02ef24c01ea4d9507
3
+ metadata.gz: fa14ebbc97363da750a96e9a675bd03f8a7308668eb6d6972385348f2fe2a95a
4
+ data.tar.gz: f5ea4a167bb214814186aa1dd58fc7685bce1c412d4c6d575a92ca6ba17ddf6a
5
5
  SHA512:
6
- metadata.gz: 1a715e51fcc684a51fb1ef192f95780ebf3c815c6fe0cf2c67df58a38a697be9a80e9a52541abe6a4202ebd2dc0f2b330b7c82ea261230bb95e6c3e73cb4509a
7
- data.tar.gz: b4d7f702196a4aa9c32b4ca94c12ec9281ab37ad083175a021ef798f5b3148d3820abde80454b999b9609001e3bc76d61b27d62430c03e2f71166186cc0f91fb
6
+ metadata.gz: 69688095fd04c3832b6c07fa2ecc734c7f4f6503f85cfdc15138cc3c5e19b1c74b57e2e11fb6545e1f3f4d949360f9ac0618b71348d2751209f2e01c05dc2d2e
7
+ data.tar.gz: 54aae0e25031a5b5b3daed2ba4ad2385b9697482e7e515576175621bbacf66c32ee022ec7e91d67e1b26801454cc55896e49ea8caefbb21d32e2cbf682c1dfaa
@@ -0,0 +1 @@
1
+ * @parfeon @CraigLn
@@ -1,14 +1,24 @@
1
1
  ---
2
- version: "4.2.6"
2
+ version: "4.2.7"
3
3
  changelog:
4
+ -
5
+ changes:
6
+ -
7
+ text: "Don't suppress runtime errors."
8
+ type: bug
9
+ date: 14-09-2020
10
+ version: v4.2.7
4
11
  -
5
12
  changes:
6
13
  -
7
14
  text: "History can now respond with message meta information."
8
15
  type: feature
9
16
  -
10
- text: "Added official support for Ruby 2.7X\u2028\u2028fix: Decrypt History messages\u2028\u2028History properly decrypts messages when using the \"include_token\" parameter."
17
+ text: "Added official support for Ruby 2.7.X"
11
18
  type: feature
19
+ -
20
+ text: "History properly decrypts messages when using the \"include_token\" parameter."
21
+ type: bug
12
22
  date: 25-08-2020
13
23
  version: v4.2.6
14
24
  -
@@ -37,7 +47,7 @@ changelog:
37
47
  text: "Resolved issue with subscribe loop where the connection was reinitiated after receiving a 4xx error code from the server"
38
48
  type: bugfix
39
49
  date: 14-02-2020
40
- version: "4.2.6"
50
+ version: "4.2.7"
41
51
  -
42
52
  changes:
43
53
  -
@@ -1,20 +1,25 @@
1
- ##### v4.2.6
1
+ ##### v4.2.7
2
2
 
3
- - History can now respond with message meta information.
4
- - Added official support for Ruby 2.7X20282028fix: Decrypt History messages20282028History properly decrypts messages when using the "include_token" parameter.
5
-
6
- ##### v4.2.5
7
-
8
- - Updated Subscribe endpoint tests to use an unsorted channels list.
9
- - Fixed Message Counts channel timetokens by disabling alphabetic sorting of the channels list.
10
-
11
- ##### v4.2.4
12
-
13
- - Update Grant, Revoke and Audit PAM tests to use v2 paths instead of v1.
14
- - Replace event name with full endpoint path in PAM signatures, for compatibility with PAM v2 signatures. Addresses the following PRs from [@stefan-qsd](https://github.com/stefan-qsd): [#112](https://github.com/pubnub/ruby/pull/112).
15
- - Change paths for PAM endpoints from v1 to v2.
16
- - Update PAM signature generator to correctly sort the query string parameters based on key instead of combined key and value.
3
+ - Don't suppress runtime errors.
17
4
 
5
+ ##### v4.2.6
6
+
7
+ - History can now respond with message meta information.
8
+ - Added official support for Ruby 2.7.X
9
+ - History properly decrypts messages when using the "include_token" parameter.
10
+
11
+ ##### v4.2.5
12
+
13
+ - Updated Subscribe endpoint tests to use an unsorted channels list.
14
+ - Fixed Message Counts channel timetokens by disabling alphabetic sorting of the channels list.
15
+
16
+ ##### v4.2.4
17
+
18
+ - Update Grant, Revoke and Audit PAM tests to use v2 paths instead of v1.
19
+ - Replace event name with full endpoint path in PAM signatures, for compatibility with PAM v2 signatures. Addresses the following PRs from [@stefan-qsd](https://github.com/stefan-qsd): [#112](https://github.com/pubnub/ruby/pull/112).
20
+ - Change paths for PAM endpoints from v1 to v2.
21
+ - Update PAM signature generator to correctly sort the query string parameters based on key instead of combined key and value.
22
+
18
23
  ##### 4.2.3
19
24
  * Resolved issue with subscribe loop where the connection was reinitiated after receiving a 4xx error code from the server
20
25
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pubnub (4.2.6)
4
+ pubnub (4.2.7)
5
5
  addressable (>= 2.0.0)
6
6
  concurrent-ruby (~> 1.1.5)
7
7
  concurrent-ruby-edge (~> 0.5.0)
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  # Complete Documentation
8
8
  Available at https://www.pubnub.com/docs/ruby/pubnub-ruby-sdk-v4 **v4.x**
9
9
 
10
- ## PubNub Gem version 4.2.6
10
+ ## PubNub Gem version 4.2.7
11
11
 
12
12
  ##### YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API.
13
13
  ##### http://www.pubnub.com/account
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.2.6
1
+ 4.2.7
@@ -10,7 +10,11 @@ module Pubnub
10
10
  response,
11
11
  request: request,
12
12
  response: response)
13
+ elsif response.is_a?(StandardError)
14
+ # unexpected error response
15
+ raise response
13
16
  end
17
+
14
18
  parsed_response, error = Formatter.parse_json(response.body)
15
19
 
16
20
  error = response if parsed_response && response.code.to_i != 200
@@ -148,6 +148,11 @@ module Pubnub
148
148
  end
149
149
 
150
150
  def format_envelopes(response, request)
151
+ if response.is_a?(StandardError)
152
+ # unexpected error response
153
+ raise response
154
+ end
155
+
151
156
  parsed_response, error = Pubnub::Formatter.parse_json(response.body)
152
157
 
153
158
  error = response if parsed_response && response.code.to_i != 200
@@ -1,4 +1,4 @@
1
1
  # Toplevel Pubnub module.
2
2
  module Pubnub
3
- VERSION = '4.2.6'.freeze
3
+ VERSION = '4.2.7'.freeze
4
4
  end
@@ -0,0 +1,22 @@
1
+ require "spec_helper"
2
+
3
+ describe "formatter" do
4
+ around :each do |example|
5
+ example.run_with_retry retry: 10
6
+ end
7
+
8
+ it "does not hide errors when formatting" do
9
+ class MockFormatter
10
+ include Pubnub::Event::EFormatter
11
+ end
12
+
13
+ class TestError < StandardError
14
+ def message
15
+ "This is a test"
16
+ end
17
+ end
18
+
19
+ # ensure the correct error is raised instead of -> NoMethodError: undefined method `body'
20
+ expect { MockFormatter.new.format_envelopes(TestError.new('error'), nil) }.to raise_error(TestError)
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ require "spec_helper"
2
+
3
+ describe "formatter" do
4
+ around :each do |example|
5
+ example.run_with_retry retry: 10
6
+ end
7
+
8
+ it "does not hide errors when formatting" do
9
+ class MockFormatter
10
+ include Pubnub::SubscribeEvent::Formatter
11
+ end
12
+
13
+ class TestError < StandardError
14
+ def message
15
+ "This is a test"
16
+ end
17
+ end
18
+
19
+ # ensure the correct error is raised instead of -> NoMethodError: undefined method `body'
20
+ expect { MockFormatter.new.send(:format_envelopes, TestError.new('error'), nil) }.to raise_error(TestError)
21
+ end
22
+ end
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.2.6
4
+ version: 4.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - PubNub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-25 00:00:00.000000000 Z
11
+ date: 2020-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -129,6 +129,7 @@ extra_rdoc_files: []
129
129
  files:
130
130
  - ".bundle/config"
131
131
  - ".codeclimate.yml"
132
+ - ".github/CODEOWNERS"
132
133
  - ".gitignore"
133
134
  - ".pubnub.yml"
134
135
  - ".rubocop.yml"
@@ -10715,6 +10716,7 @@ files:
10715
10716
  - spec/lib/client_spec.rb
10716
10717
  - spec/lib/connection_callback_spec.rb
10717
10718
  - spec/lib/custom_retries_examples_spec.rb
10719
+ - spec/lib/event/formatter_spec.rb
10718
10720
  - spec/lib/event_spec.rb
10719
10721
  - spec/lib/events/audit_spec.rb
10720
10722
  - spec/lib/events/channel_registration_spec.rb
@@ -10743,6 +10745,7 @@ files:
10743
10745
  - spec/lib/pubnub_spec.rb
10744
10746
  - spec/lib/signatures_spec.rb
10745
10747
  - spec/lib/ssl_error_spec.rb
10748
+ - spec/lib/subscribe_event/formatter_spec.rb
10746
10749
  - spec/lib/super_admin_spec.rb
10747
10750
  - spec/lib/uuid_spec.rb
10748
10751
  - spec/spec_expectations.rb
@@ -10792,6 +10795,7 @@ test_files:
10792
10795
  - spec/lib/client_spec.rb
10793
10796
  - spec/lib/connection_callback_spec.rb
10794
10797
  - spec/lib/custom_retries_examples_spec.rb
10798
+ - spec/lib/event/formatter_spec.rb
10795
10799
  - spec/lib/event_spec.rb
10796
10800
  - spec/lib/events/audit_spec.rb
10797
10801
  - spec/lib/events/channel_registration_spec.rb
@@ -10820,6 +10824,7 @@ test_files:
10820
10824
  - spec/lib/pubnub_spec.rb
10821
10825
  - spec/lib/signatures_spec.rb
10822
10826
  - spec/lib/ssl_error_spec.rb
10827
+ - spec/lib/subscribe_event/formatter_spec.rb
10823
10828
  - spec/lib/super_admin_spec.rb
10824
10829
  - spec/lib/uuid_spec.rb
10825
10830
  - spec/spec_expectations.rb