pubnub 5.3.0 → 5.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +2 -3
- data/.pubnub.yml +14 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -3
- data/VERSION +1 -1
- data/lib/pubnub/events/history.rb +6 -10
- data/lib/pubnub/formatter.rb +0 -1
- data/lib/pubnub/subscribe_event/formatter.rb +1 -2
- data/lib/pubnub/version.rb +1 -1
- data/pubnub.gemspec +1 -1
- metadata +4 -5
- /data/{LICENSE → LICENSE.txt} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9c887ab663f1e0dc8c245c8a62677a371dc46a9454c3f5371159f951ddb78d9
|
4
|
+
data.tar.gz: 21dd9cd7754f3ecc8a9dcc38b23a30504381ef543ce0e01a33b51af9ba727d59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6626ad1366f8208953e322fdeda90eda491178fbadf7e522164c56fcedac64c7724badf2a7f770778c5fe16a8859c26fccac4c340755c7b5ee4f7416d5914df5
|
7
|
+
data.tar.gz: 3afeba49eb145bb0fad19fac7bae013323d7d24f7c2bc905a9d2a23483e7bad5280cd28bb26926284ccf0d187d69a90711af80f15a6f16932a1f518b64b6b25c
|
data/.github/CODEOWNERS
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
* @parfeon @
|
2
|
-
.
|
3
|
-
README.md @techwritermat @kazydek
|
1
|
+
* @parfeon @seba-aln
|
2
|
+
README.md @techwritermat @kazydek @parfeon @seba-aln
|
data/.pubnub.yml
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
---
|
2
|
-
version: "5.3.
|
2
|
+
version: "5.3.2"
|
3
3
|
changelog:
|
4
|
+
- date: 2023-11-23
|
5
|
+
version: v5.3.2
|
6
|
+
changes:
|
7
|
+
- type: improvement
|
8
|
+
text: "Return source event data when a client configured with crypto is unable to decrypt it (can be not encrypted data or encrypted with different options)."
|
9
|
+
- date: 2023-11-03
|
10
|
+
version: v5.3.1
|
11
|
+
changes:
|
12
|
+
- type: improvement
|
13
|
+
text: "Update license information."
|
4
14
|
- date: 2023-10-16
|
5
15
|
version: v5.3.0
|
6
16
|
changes:
|
@@ -670,7 +680,7 @@ sdks:
|
|
670
680
|
- x86-64
|
671
681
|
- distribution-type: package
|
672
682
|
distribution-repository: RubyGems
|
673
|
-
package-name: pubnub-5.3.
|
683
|
+
package-name: pubnub-5.3.2.gem
|
674
684
|
location: https://rubygems.org/gems/pubnub
|
675
685
|
requires:
|
676
686
|
- name: addressable
|
@@ -775,8 +785,8 @@ sdks:
|
|
775
785
|
- x86-64
|
776
786
|
- distribution-type: library
|
777
787
|
distribution-repository: GitHub release
|
778
|
-
package-name: pubnub-5.3.
|
779
|
-
location: https://github.com/pubnub/ruby/releases/download/v5.3.
|
788
|
+
package-name: pubnub-5.3.2.gem
|
789
|
+
location: https://github.com/pubnub/ruby/releases/download/v5.3.2/pubnub-5.3.2.gem
|
780
790
|
requires:
|
781
791
|
- name: addressable
|
782
792
|
min-version: 2.0.0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## v5.3.2
|
2
|
+
November 23 2023
|
3
|
+
|
4
|
+
#### Modified
|
5
|
+
- Return source event data when a client configured with crypto is unable to decrypt it (can be not encrypted data or encrypted with different options).
|
6
|
+
|
7
|
+
## v5.3.1
|
8
|
+
November 03 2023
|
9
|
+
|
10
|
+
#### Modified
|
11
|
+
- Update license information.
|
12
|
+
|
1
13
|
## v5.3.0
|
2
14
|
October 16 2023
|
3
15
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# PubNub Ruby SDK
|
2
2
|
|
3
|
-
|
4
|
-
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/b744287bb0324e2883f95525b12cf19f)](https://www.codacy.com/app/blazeroot/ruby?utm_source=github.com&utm_medium=referral&utm_content=pubnub/ruby&utm_campaign=Badge_Coverage)
|
5
|
-
[![Build Status](https://travis-ci.org/pubnub/ruby.svg?branch=master)](https://travis-ci.org/pubnub/ruby)
|
3
|
+
![Tests Status](https://github.com/pubnub/ruby/actions/workflows/run-tests.yml/badge.svg)
|
6
4
|
|
7
5
|
This is the official PubNub Ruby SDK repository.
|
8
6
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.3.
|
1
|
+
5.3.2
|
@@ -68,30 +68,26 @@ module Pubnub
|
|
68
68
|
|
69
69
|
def decrypt_history(message, crypto)
|
70
70
|
if @include_token || @include_meta
|
71
|
-
encrypted_message = Base64.
|
71
|
+
encrypted_message = Base64.strict_decode64(message['message'])
|
72
72
|
message['message'] = JSON.parse(crypto.decrypt(encrypted_message), quirks_mode: true)
|
73
|
-
|
74
73
|
message
|
75
74
|
else
|
76
|
-
encrypted_message = Base64.
|
75
|
+
encrypted_message = Base64.strict_decode64(message)
|
77
76
|
JSON.parse(crypto.decrypt(encrypted_message), quirks_mode: true)
|
78
77
|
end
|
78
|
+
rescue StandardError => e
|
79
|
+
puts "Pubnub :: DECRYPTION ERROR: #{e}"
|
80
|
+
message['decrypt_error'] = true if @include_token || @include_meta
|
81
|
+
message
|
79
82
|
end
|
80
83
|
|
81
84
|
def valid_envelope(parsed_response, req_res_objects)
|
82
85
|
messages = parsed_response[0]
|
83
86
|
|
84
|
-
# TODO: Uncomment code below when cryptor implementations will be added.
|
85
87
|
if crypto_module && messages
|
86
88
|
crypto = crypto_module
|
87
89
|
messages = messages.map { |message| decrypt_history(message, crypto) }
|
88
90
|
end
|
89
|
-
# if (@cipher_key || @app.env[:cipher_key] || @cipher_key_selector || @app.env[:cipher_key_selector]) && messages
|
90
|
-
# cipher_key = compute_cipher_key(parsed_response)
|
91
|
-
# random_iv = compute_random_iv(parsed_response)
|
92
|
-
# crypto = Crypto.new(cipher_key, random_iv)
|
93
|
-
# messages = messages.map { |message| decrypt_history(message, crypto) }
|
94
|
-
# end
|
95
91
|
|
96
92
|
start = parsed_response[1]
|
97
93
|
finish = parsed_response[2]
|
data/lib/pubnub/formatter.rb
CHANGED
@@ -33,10 +33,9 @@ module Pubnub
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def decipher_payload(message)
|
36
|
-
# TODO: Uncomment code below when cryptor implementations will be added.
|
37
36
|
return message[:payload] if message[:channel].end_with?('-pnpres') || crypto_module.nil?
|
38
37
|
|
39
|
-
encrypted_message = Base64.
|
38
|
+
encrypted_message = Base64.strict_decode64(message[:payload])
|
40
39
|
JSON.parse(crypto_module.decrypt(encrypted_message), quirks_mode: true)
|
41
40
|
rescue StandardError, UnknownCryptorError
|
42
41
|
message[:payload]
|
data/lib/pubnub/version.rb
CHANGED
data/pubnub.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.summary = 'PubNub Official Ruby gem.'
|
11
11
|
spec.description = 'Ruby anywhere in the world in 250ms with PubNub!'
|
12
12
|
spec.homepage = 'https://github.com/pubnub/ruby'
|
13
|
-
spec.licenses =
|
13
|
+
spec.licenses = ['LicenseRef-LICENSE.txt']
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0").grep_v(/^(test|spec|fixtures)/)
|
16
16
|
spec.executables = spec.files.grep(%r{^bin\/}) { |f| File.basename(f) }
|
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: 5.3.
|
4
|
+
version: 5.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PubNub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -143,7 +143,7 @@ files:
|
|
143
143
|
- CHANGELOG.md
|
144
144
|
- Gemfile
|
145
145
|
- Gemfile.lock
|
146
|
-
- LICENSE
|
146
|
+
- LICENSE.txt
|
147
147
|
- Pubnub Ruby SDK upgrade guide.md
|
148
148
|
- README.md
|
149
149
|
- Rakefile
|
@@ -291,8 +291,7 @@ files:
|
|
291
291
|
- pubnub.gemspec
|
292
292
|
homepage: https://github.com/pubnub/ruby
|
293
293
|
licenses:
|
294
|
-
-
|
295
|
-
- LicenseRef-LICENSE
|
294
|
+
- LicenseRef-LICENSE.txt
|
296
295
|
metadata: {}
|
297
296
|
post_install_message:
|
298
297
|
rdoc_options: []
|
/data/{LICENSE → LICENSE.txt}
RENAMED
File without changes
|