pubnub 5.3.5 → 5.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/commands-handler.yml +1 -1
- data/.github/workflows/release.yml +2 -2
- data/.github/workflows/run-tests.yml +12 -8
- data/.github/workflows/run-validations.yml +2 -2
- data/.pubnub.yml +26 -4
- data/CHANGELOG.md +100 -82
- data/Gemfile +1 -0
- data/Gemfile.lock +18 -1
- data/VERSION +1 -1
- data/lib/pubnub/client/events.rb +10 -8
- data/lib/pubnub/client.rb +97 -96
- data/lib/pubnub/constants.rb +4 -1
- data/lib/pubnub/event.rb +28 -23
- data/lib/pubnub/events/fetch_messages.rb +128 -0
- data/lib/pubnub/events/get_all_channels_metadata.rb +13 -9
- data/lib/pubnub/events/get_all_uuid_metadata.rb +13 -9
- data/lib/pubnub/events/get_channel_members.rb +18 -15
- data/lib/pubnub/events/get_channel_metadata.rb +9 -5
- data/lib/pubnub/events/get_memberships.rb +18 -15
- data/lib/pubnub/events/get_uuid_metadata.rb +9 -5
- data/lib/pubnub/events/publish.rb +1 -0
- data/lib/pubnub/events/set_channel_members.rb +18 -13
- data/lib/pubnub/events/set_channel_metadata.rb +8 -4
- data/lib/pubnub/events/set_memberships.rb +18 -13
- data/lib/pubnub/events/set_uuid_metadata.rb +8 -4
- data/lib/pubnub/events/signal.rb +4 -0
- data/lib/pubnub/subscribe_event/formatter.rb +29 -16
- data/lib/pubnub/validators/fetch_messages.rb +41 -0
- data/lib/pubnub/validators/set_channel_metadata.rb +17 -13
- data/lib/pubnub/validators/set_uuid_metadata.rb +17 -13
- data/lib/pubnub/version.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc4c6cc7d070726bb7046638c4cb142a9f902b21b0da50ae924d450f39e6e8a7
|
4
|
+
data.tar.gz: 27cb6f7c2e3ec634654b4d6e78984ea51b2ee8338f5cc58b0b08cf136bf1b15f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 401aa81c9dcafdd86d3d9626c18c321d3758f5a8278be2dca699e8210a2c20412cef22f7001f33fbde630c75c61fb88735deba59657df4e5f0c7e05a0582c672
|
7
|
+
data.tar.gz: 6d6715e518fe654f37d795b4d4ab283b22aab1e29c93d71f1c2df85964a8b52530cdc4f011ec128c053f472668a6f1dd7a4fee09aa0c6b726c3d1583b0b672c7
|
@@ -10,7 +10,7 @@ jobs:
|
|
10
10
|
name: Check release required
|
11
11
|
if: ${{ github.event.pull_request.merged && endsWith(github.repository, '-private') != true }}
|
12
12
|
runs-on:
|
13
|
-
group: Default
|
13
|
+
group: organization/Default
|
14
14
|
outputs:
|
15
15
|
release: ${{ steps.check.outputs.ready }}
|
16
16
|
steps:
|
@@ -31,7 +31,7 @@ jobs:
|
|
31
31
|
needs: check-release
|
32
32
|
if: ${{ needs.check-release.outputs.release == 'true' }}
|
33
33
|
runs-on:
|
34
|
-
group: Default
|
34
|
+
group: organization/Default
|
35
35
|
steps:
|
36
36
|
- name: Checkout repository
|
37
37
|
uses: actions/checkout@v4
|
@@ -20,13 +20,13 @@ jobs:
|
|
20
20
|
tests:
|
21
21
|
name: Integration and Unit tests
|
22
22
|
runs-on:
|
23
|
-
group: Default
|
23
|
+
group: organization/Default
|
24
24
|
env:
|
25
25
|
NO_COVERAGE: true
|
26
26
|
strategy:
|
27
27
|
fail-fast: true
|
28
28
|
matrix:
|
29
|
-
ruby: [3.0.6, 3.1.4, 3.2.3]
|
29
|
+
ruby: [ 3.0.6, 3.1.4, 3.2.3 ]
|
30
30
|
steps:
|
31
31
|
- name: Checkout repository
|
32
32
|
uses: actions/checkout@v4
|
@@ -52,7 +52,7 @@ jobs:
|
|
52
52
|
acceptance-tests:
|
53
53
|
name: Acceptance tests
|
54
54
|
runs-on:
|
55
|
-
group: Default
|
55
|
+
group: organization/Default
|
56
56
|
steps:
|
57
57
|
- name: Checkout project
|
58
58
|
uses: actions/checkout@v4
|
@@ -67,11 +67,15 @@ jobs:
|
|
67
67
|
uses: ./.github/.release/actions/actions/mock-server
|
68
68
|
with:
|
69
69
|
token: ${{ secrets.GH_TOKEN }}
|
70
|
-
- name: Setup Ruby 3.
|
70
|
+
- name: Setup Ruby 3.2.2
|
71
71
|
uses: ruby/setup-ruby@v1
|
72
72
|
with:
|
73
|
-
ruby-version: 3.
|
73
|
+
ruby-version: 3.2.2
|
74
74
|
bundler-cache: true
|
75
|
+
- name: Verify Ruby Version
|
76
|
+
run: ruby -v
|
77
|
+
- name: Check Ruby Version for Bundler
|
78
|
+
run: bundle exec ruby -v
|
75
79
|
- name: Run acceptance tests (optional)
|
76
80
|
run: bundle exec cucumber sdk-specifications/features/ -p mock -p run_beta -p report_beta -f pretty
|
77
81
|
continue-on-error: true
|
@@ -84,7 +88,7 @@ jobs:
|
|
84
88
|
jrm ./main.xml "./main/**/*.xml" &&
|
85
89
|
jrm ./beta.xml "./beta/**/*.xml"
|
86
90
|
- name: Expose acceptance tests reports
|
87
|
-
uses: actions/upload-artifact@
|
91
|
+
uses: actions/upload-artifact@v4
|
88
92
|
if: always()
|
89
93
|
with:
|
90
94
|
name: acceptance-test-reports
|
@@ -97,9 +101,9 @@ jobs:
|
|
97
101
|
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
|
98
102
|
all-tests:
|
99
103
|
name: Tests
|
100
|
-
needs: [tests, acceptance-tests]
|
104
|
+
needs: [ tests, acceptance-tests ]
|
101
105
|
runs-on:
|
102
|
-
group: Default
|
106
|
+
group: organization/Default
|
103
107
|
steps:
|
104
108
|
- name: Tests summary
|
105
109
|
run: echo -e "\033[38;2;95;215;0m\033[1mAll tests successfully passed"
|
@@ -6,7 +6,7 @@ jobs:
|
|
6
6
|
pubnub-yml:
|
7
7
|
name: "Validate .pubnub.yml"
|
8
8
|
runs-on:
|
9
|
-
group: Default
|
9
|
+
group: organization/Default
|
10
10
|
steps:
|
11
11
|
- name: Checkout project
|
12
12
|
uses: actions/checkout@v4
|
@@ -28,7 +28,7 @@ jobs:
|
|
28
28
|
name: Validations
|
29
29
|
needs: [pubnub-yml]
|
30
30
|
runs-on:
|
31
|
-
group: Default
|
31
|
+
group: organization/Default
|
32
32
|
steps:
|
33
33
|
- name: Validations summary
|
34
34
|
run: echo -e "\033[38;2;95;215;0m\033[1mAll validations passed"
|
data/.pubnub.yml
CHANGED
@@ -1,6 +1,28 @@
|
|
1
1
|
---
|
2
|
-
version: "5.
|
2
|
+
version: "5.5.0"
|
3
3
|
changelog:
|
4
|
+
- date: 2025-01-28
|
5
|
+
version: v5.5.0
|
6
|
+
changes:
|
7
|
+
- type: feature
|
8
|
+
text: "Add the ability to specify `type` and `status` fields for `channel metadata`, `uuid metadata`, `member`, and `membership`."
|
9
|
+
- type: feature
|
10
|
+
text: "Add missing `include` options for App Context APIs: `custom`, `status`, `type`, `uuid_status`, `uuid_type`, `channel_status`, and `channel_type`."
|
11
|
+
- date: 2025-01-07
|
12
|
+
version: v5.4.0
|
13
|
+
changes:
|
14
|
+
- type: feature
|
15
|
+
text: "Add batch history support."
|
16
|
+
- type: feature
|
17
|
+
text: "Add fetch messages with message reactions."
|
18
|
+
- type: feature
|
19
|
+
text: "Add fetch messages (batch history) endpoint support to fetch history for multiple channels."
|
20
|
+
- type: feature
|
21
|
+
text: "Add fetch messages with reactions support."
|
22
|
+
- type: feature
|
23
|
+
text: "Add `include_custom_message_type` support for fetch messages endpoint."
|
24
|
+
- type: feature
|
25
|
+
text: "Add `custom_message_type` support for `publish` / `signal` and `subscribe` endpoints."
|
4
26
|
- date: 2024-10-09
|
5
27
|
version: v5.3.5
|
6
28
|
changes:
|
@@ -581,7 +603,7 @@ sdks:
|
|
581
603
|
- x86-64
|
582
604
|
- distribution-type: package
|
583
605
|
distribution-repository: RubyGems
|
584
|
-
package-name: pubnub-5.
|
606
|
+
package-name: pubnub-5.5.0.gem
|
585
607
|
location: https://rubygems.org/gems/pubnub
|
586
608
|
requires:
|
587
609
|
- name: addressable
|
@@ -686,8 +708,8 @@ sdks:
|
|
686
708
|
- x86-64
|
687
709
|
- distribution-type: library
|
688
710
|
distribution-repository: GitHub release
|
689
|
-
package-name: pubnub-5.
|
690
|
-
location: https://github.com/pubnub/ruby/releases/download/v5.
|
711
|
+
package-name: pubnub-5.5.0.gem
|
712
|
+
location: https://github.com/pubnub/ruby/releases/download/v5.5.0/pubnub-5.5.0.gem
|
691
713
|
requires:
|
692
714
|
- name: addressable
|
693
715
|
min-version: 2.0.0
|
data/CHANGELOG.md
CHANGED
@@ -1,88 +1,106 @@
|
|
1
|
-
## v5.
|
2
|
-
|
3
|
-
|
4
|
-
#### Modified
|
5
|
-
- Updated direct and transient dependency versions. Fixed the following issues reported by [@pboling](https://github.com/pboling): [#158](https://github.com/pubnub/ruby/issues/158).
|
6
|
-
|
7
|
-
## v5.3.4
|
8
|
-
April 29 2024
|
9
|
-
|
10
|
-
#### Fixed
|
11
|
-
- Fix issue because of which client didn't encode App Context get all event `filter` query value.
|
12
|
-
|
13
|
-
## v5.3.3
|
14
|
-
January 29 2024
|
15
|
-
|
16
|
-
#### Modified
|
17
|
-
- Bump required version to the minimum officially supported Ruby version.
|
18
|
-
|
19
|
-
## v5.3.2
|
20
|
-
November 23 2023
|
21
|
-
|
22
|
-
#### Modified
|
23
|
-
- 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).
|
24
|
-
|
25
|
-
## v5.3.1
|
26
|
-
November 03 2023
|
27
|
-
|
28
|
-
#### Modified
|
29
|
-
- Update license information.
|
30
|
-
|
31
|
-
## v5.3.0
|
32
|
-
October 16 2023
|
33
|
-
|
34
|
-
#### Added
|
35
|
-
- Add crypto module that allows to configure SDK to encrypt and decrypt messages.
|
36
|
-
|
37
|
-
#### Fixed
|
38
|
-
- Improved security of crypto implementation by adding enhanced AES-CBC cryptor.
|
39
|
-
|
40
|
-
## v5.2.2
|
41
|
-
March 14 2023
|
42
|
-
|
43
|
-
#### Fixed
|
44
|
-
- Fix issue which raised an exception when PubNub client has been configured with a secret key.
|
45
|
-
|
46
|
-
## v5.2.1
|
47
|
-
December 13 2022
|
48
|
-
|
49
|
-
#### Fixed
|
50
|
-
- Fix format which is used to return server data from `get_message_actions` method call.
|
51
|
-
|
52
|
-
## v5.2.0
|
53
|
-
December 12 2022
|
54
|
-
|
55
|
-
#### Added
|
56
|
-
- Add api which allow to work with message actions endpoints.
|
57
|
-
|
58
|
-
#### Modified
|
59
|
-
- Migrate test suite run from Travis to GitHub Actions.
|
60
|
-
|
61
|
-
## v5.1.2
|
62
|
-
November 23 2022
|
63
|
-
|
64
|
-
#### Fixed
|
65
|
-
- Fix issue because of which channel hasn't been encoded properly with endpoint call.
|
66
|
-
|
67
|
-
## v5.1.1
|
68
|
-
October 26 2022
|
69
|
-
|
70
|
-
#### Fixed
|
71
|
-
- Fix issue because of which `callback` and `http_sync` provided during client configuration not used when missing in method call.
|
72
|
-
|
73
|
-
## v5.1.0
|
74
|
-
July 26 2022
|
1
|
+
## v5.5.0
|
2
|
+
January 28 2025
|
75
3
|
|
76
4
|
#### Added
|
77
|
-
- Add
|
78
|
-
- Add
|
79
|
-
|
80
|
-
## v5.0.0
|
81
|
-
January 13 2022
|
82
|
-
|
83
|
-
#### Modified
|
84
|
-
- BREAKING CHANGES: uuid is required parameter to create PubNub instance.
|
5
|
+
- Add the ability to specify `type` and `status` fields for `channel metadata`, `uuid metadata`, `member`, and `membership`.
|
6
|
+
- Add missing `include` options for App Context APIs: `custom`, `status`, `type`, `uuid_status`, `uuid_type`, `channel_status`, and `channel_type`.
|
85
7
|
|
8
|
+
## v5.4.0
|
9
|
+
January 07 2025
|
10
|
+
|
11
|
+
#### Added
|
12
|
+
- Add batch history support.
|
13
|
+
- Add fetch messages with message reactions.
|
14
|
+
- Add fetch messages (batch history) endpoint support to fetch history for multiple channels.
|
15
|
+
- Add fetch messages with reactions support.
|
16
|
+
- Add `include_custom_message_type` support for fetch messages endpoint.
|
17
|
+
- Add `custom_message_type` support for `publish` / `signal` and `subscribe` endpoints.
|
18
|
+
|
19
|
+
## v5.3.5
|
20
|
+
October 09 2024
|
21
|
+
|
22
|
+
#### Modified
|
23
|
+
- Updated direct and transient dependency versions. Fixed the following issues reported by [@pboling](https://github.com/pboling): [#158](https://github.com/pubnub/ruby/issues/158).
|
24
|
+
|
25
|
+
## v5.3.4
|
26
|
+
April 29 2024
|
27
|
+
|
28
|
+
#### Fixed
|
29
|
+
- Fix issue because of which client didn't encode App Context get all event `filter` query value.
|
30
|
+
|
31
|
+
## v5.3.3
|
32
|
+
January 29 2024
|
33
|
+
|
34
|
+
#### Modified
|
35
|
+
- Bump required version to the minimum officially supported Ruby version.
|
36
|
+
|
37
|
+
## v5.3.2
|
38
|
+
November 23 2023
|
39
|
+
|
40
|
+
#### Modified
|
41
|
+
- 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).
|
42
|
+
|
43
|
+
## v5.3.1
|
44
|
+
November 03 2023
|
45
|
+
|
46
|
+
#### Modified
|
47
|
+
- Update license information.
|
48
|
+
|
49
|
+
## v5.3.0
|
50
|
+
October 16 2023
|
51
|
+
|
52
|
+
#### Added
|
53
|
+
- Add crypto module that allows to configure SDK to encrypt and decrypt messages.
|
54
|
+
|
55
|
+
#### Fixed
|
56
|
+
- Improved security of crypto implementation by adding enhanced AES-CBC cryptor.
|
57
|
+
|
58
|
+
## v5.2.2
|
59
|
+
March 14 2023
|
60
|
+
|
61
|
+
#### Fixed
|
62
|
+
- Fix issue which raised an exception when PubNub client has been configured with a secret key.
|
63
|
+
|
64
|
+
## v5.2.1
|
65
|
+
December 13 2022
|
66
|
+
|
67
|
+
#### Fixed
|
68
|
+
- Fix format which is used to return server data from `get_message_actions` method call.
|
69
|
+
|
70
|
+
## v5.2.0
|
71
|
+
December 12 2022
|
72
|
+
|
73
|
+
#### Added
|
74
|
+
- Add api which allow to work with message actions endpoints.
|
75
|
+
|
76
|
+
#### Modified
|
77
|
+
- Migrate test suite run from Travis to GitHub Actions.
|
78
|
+
|
79
|
+
## v5.1.2
|
80
|
+
November 23 2022
|
81
|
+
|
82
|
+
#### Fixed
|
83
|
+
- Fix issue because of which channel hasn't been encoded properly with endpoint call.
|
84
|
+
|
85
|
+
## v5.1.1
|
86
|
+
October 26 2022
|
87
|
+
|
88
|
+
#### Fixed
|
89
|
+
- Fix issue because of which `callback` and `http_sync` provided during client configuration not used when missing in method call.
|
90
|
+
|
91
|
+
## v5.1.0
|
92
|
+
July 26 2022
|
93
|
+
|
94
|
+
#### Added
|
95
|
+
- Add support for spaces and users permissions in grant_token.
|
96
|
+
- Add user_id and deprecate uuid when creating new pubnub instance.
|
97
|
+
|
98
|
+
## v5.0.0
|
99
|
+
January 13 2022
|
100
|
+
|
101
|
+
#### Modified
|
102
|
+
- BREAKING CHANGES: uuid is required parameter to create PubNub instance.
|
103
|
+
|
86
104
|
## v4.8.0
|
87
105
|
December 16 2021
|
88
106
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pubnub (5.
|
4
|
+
pubnub (5.5.0)
|
5
5
|
addressable (>= 2.0.0)
|
6
6
|
concurrent-ruby (~> 1.3.4)
|
7
7
|
concurrent-ruby-edge (~> 0.7.1)
|
@@ -98,6 +98,7 @@ GEM
|
|
98
98
|
interception (0.5)
|
99
99
|
json (2.7.2)
|
100
100
|
language_server-protocol (3.17.0.3)
|
101
|
+
lint_roller (1.1.0)
|
101
102
|
method_source (1.1.0)
|
102
103
|
mini_mime (1.1.5)
|
103
104
|
multi_test (1.1.0)
|
@@ -147,6 +148,9 @@ GEM
|
|
147
148
|
unicode-display_width (>= 2.4.0, < 3.0)
|
148
149
|
rubocop-ast (1.32.3)
|
149
150
|
parser (>= 3.3.1.0)
|
151
|
+
rubocop-performance (1.23.0)
|
152
|
+
rubocop (>= 1.48.1, < 2.0)
|
153
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
150
154
|
ruby-progressbar (1.13.0)
|
151
155
|
simplecov (0.22.0)
|
152
156
|
docile (~> 1.1)
|
@@ -154,6 +158,18 @@ GEM
|
|
154
158
|
simplecov_json_formatter (~> 0.1)
|
155
159
|
simplecov-html (0.13.1)
|
156
160
|
simplecov_json_formatter (0.1.4)
|
161
|
+
standard (1.41.1)
|
162
|
+
language_server-protocol (~> 3.17.0.2)
|
163
|
+
lint_roller (~> 1.0)
|
164
|
+
rubocop (~> 1.66.0)
|
165
|
+
standard-custom (~> 1.0.0)
|
166
|
+
standard-performance (~> 1.5)
|
167
|
+
standard-custom (1.0.2)
|
168
|
+
lint_roller (~> 1.0)
|
169
|
+
rubocop (~> 1.50)
|
170
|
+
standard-performance (1.6.0)
|
171
|
+
lint_roller (~> 1.1)
|
172
|
+
rubocop-performance (~> 1.23.0)
|
157
173
|
sys-uname (1.3.0)
|
158
174
|
ffi (~> 1.1)
|
159
175
|
timers (4.3.5)
|
@@ -183,6 +199,7 @@ DEPENDENCIES
|
|
183
199
|
rspec-retry
|
184
200
|
rubocop
|
185
201
|
simplecov (>= 0.21.2)
|
202
|
+
standard
|
186
203
|
vcr
|
187
204
|
webmock
|
188
205
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.
|
1
|
+
5.5.0
|
data/lib/pubnub/client/events.rb
CHANGED
@@ -4,14 +4,16 @@ module Pubnub
|
|
4
4
|
class Client
|
5
5
|
# Module that holds generator for all events
|
6
6
|
module Events
|
7
|
-
EVENTS = %w[publish subscribe presence leave history here_now audit grant
|
8
|
-
revoke time heartbeat where_now
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
EVENTS = %w[publish subscribe presence leave history fetch_messages here_now audit grant
|
8
|
+
grant_token revoke_token delete_messages revoke time heartbeat where_now
|
9
|
+
set_state state channel_registration message_counts signal add_message_action
|
10
|
+
get_message_actions remove_message_action add_channels_to_push
|
11
|
+
list_push_provisions remove_channels_from_push remove_device_from_push
|
12
|
+
set_uuid_metadata set_channel_metadata remove_uuid_metadata
|
13
|
+
remove_channel_metadata get_uuid_metadata get_all_uuid_metadata
|
14
|
+
get_channel_metadata get_all_channels_metadata get_channel_members
|
15
|
+
get_memberships set_channel_members set_memberships remove_memberships
|
16
|
+
remove_channel_members].freeze
|
15
17
|
|
16
18
|
EVENTS.each do |event_name|
|
17
19
|
define_method event_name do |options = {}, &block|
|