pubnub 4.2.0 → 4.2.1

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.

Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.pubnub.yml +8 -1
  3. data/CHANGELOG.md +3 -0
  4. data/Gemfile.lock +1 -1
  5. data/README.md +1 -1
  6. data/VERSION +1 -1
  7. data/fixtures/vcr_cassettes/lib/events/create_space.yml +40 -0
  8. data/fixtures/vcr_cassettes/lib/events/create_user.yml +40 -0
  9. data/fixtures/vcr_cassettes/lib/events/delete_space.yml +38 -0
  10. data/fixtures/vcr_cassettes/lib/events/delete_user.yml +38 -0
  11. data/fixtures/vcr_cassettes/lib/events/get_members.yml +38 -0
  12. data/fixtures/vcr_cassettes/lib/events/get_space.yml +38 -0
  13. data/fixtures/vcr_cassettes/lib/events/get_space_memberships.yml +38 -0
  14. data/fixtures/vcr_cassettes/lib/events/get_spaces.yml +40 -0
  15. data/fixtures/vcr_cassettes/lib/events/get_user.yml +38 -0
  16. data/fixtures/vcr_cassettes/lib/events/manage_members_add.yml +40 -0
  17. data/fixtures/vcr_cassettes/lib/events/manage_members_remove.yml +83 -0
  18. data/fixtures/vcr_cassettes/lib/events/manage_memberships_add.yml +40 -0
  19. data/fixtures/vcr_cassettes/lib/events/manage_memberships_remove.yml +40 -0
  20. data/fixtures/vcr_cassettes/lib/events/subscribe-member-add-async.yml +77 -0
  21. data/fixtures/vcr_cassettes/lib/events/subscribe-member-remove-async.yml +77 -0
  22. data/fixtures/vcr_cassettes/lib/events/subscribe-membership-add-async.yml +77 -0
  23. data/fixtures/vcr_cassettes/lib/events/subscribe-membership-remove-async.yml +77 -0
  24. data/fixtures/vcr_cassettes/lib/events/subscribe-space-delete-async.yml +77 -0
  25. data/fixtures/vcr_cassettes/lib/events/subscribe-space-update-async.yml +77 -0
  26. data/fixtures/vcr_cassettes/lib/events/subscribe-user-delete-async.yml +77 -0
  27. data/fixtures/vcr_cassettes/lib/events/subscribe-user-update-async.yml +77 -0
  28. data/fixtures/vcr_cassettes/lib/events/update_space.yml +40 -0
  29. data/fixtures/vcr_cassettes/lib/events/update_user.yml +40 -0
  30. data/lib/pubnub/subscribe_callback.rb +4 -1
  31. data/lib/pubnub/subscribe_event/formatter.rb +33 -0
  32. data/lib/pubnub/subscriber.rb +6 -0
  33. data/lib/pubnub/version.rb +1 -1
  34. data/spec/lib/events/subscribe_spec.rb +188 -0
  35. metadata +25 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c25c64114536e1291cee9e54eda326abe3a57df11045d1a3b8ca366f3a58ae1
4
- data.tar.gz: 83eed4a95f664d986b80710f8ad3d48131648f479ffa7d62a1f3a8dc8beca963
3
+ metadata.gz: 4e3dd1d474f3a7ccd15e14e8eb931da336c59eec2c483211509ca047f38fbcf1
4
+ data.tar.gz: 7e2d24ade1f3c10584580e688ecb3f236d602c461d3b7f9175a9573b0d795c1f
5
5
  SHA512:
6
- metadata.gz: 2945b9f4c19a4ed2427bd1cab5a983b9968670efa9becba45dd3be6cf8945a55feea753be973dbd141ab253687cd734cab4b522f7993a7f4032d6a8ec7dc1d4a
7
- data.tar.gz: c6d198937f88306474e57ff39c2db525db12619d7ea2072d7b1262be4b9922014f66d3dcd8f29a60c5a28c593cfc15906cf0317c27343064f44797a27794910f
6
+ metadata.gz: 2922e70b04a70cc12e838080e2be8d8d2c85176c9dd9a5cc5542fdc02000d1bc989b9e39e046c0b6ddba9969a9112add60f5622dea50f633a29985bdc7caa22d
7
+ data.tar.gz: 1d374d572927336782075f6980391bcde9205916d511457045bc4475e20695b77d86b196894b3210dc6b17654f5760395079ec18dae38d5e8e9f241a702f7a5e
@@ -1,6 +1,13 @@
1
1
  ---
2
- version: "4.2.0"
2
+ version: "4.2.1"
3
3
  changelog:
4
+ -
5
+ changes:
6
+ -
7
+ text: "Updated listener methods"
8
+ type: feature
9
+ date: 25-10-2019
10
+ version: "4.2.1"
4
11
  -
5
12
  changes:
6
13
  -
@@ -1,3 +1,6 @@
1
+ ##### 4.2.1
2
+ * Updated listener methods
3
+
1
4
  ##### 4.2.0
2
5
  * Added objects feature
3
6
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pubnub (4.2.0)
4
+ pubnub (4.2.1)
5
5
  concurrent-ruby (~> 1.1.5)
6
6
  concurrent-ruby-edge (~> 0.5.0)
7
7
  dry-validation (~> 1.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.0
10
+ ## PubNub Gem version 4.2.1
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.0
1
+ 4.2.1
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://ps.pndsn.com/v1/objects/demo/spaces?auth=ruby-test-auth&include=custom&pnsdk=PubNub-Ruby/4.2.0&uuid=ruby-test-uuid
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"id":"rb_space","name":"some_name","custom":{"XXX":"YYYY"}}'
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.6.3 (2019-04-16))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 25 Oct 2019 20:35:51 GMT
16
+ Content-Type:
17
+ - application/x-www-form-urlencoded
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Date:
24
+ - Fri, 25 Oct 2019 20:35:54 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Content-Length:
28
+ - '201'
29
+ Connection:
30
+ - keep-alive
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Credentials:
34
+ - 'true'
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"status":200,"data":{"id":"rb_space","name":"some_name","description":null,"custom":{"XXX":"YYYY"},"created":"2019-10-25T20:35:54.1512Z","updated":"2019-10-25T20:35:54.1512Z","eTag":"AZTUtcvx6NDGLQ"}}'
38
+ http_version:
39
+ recorded_at: Fri, 25 Oct 2019 20:35:51 GMT
40
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://ps.pndsn.com/v1/objects/demo/users?auth=ruby-test-auth&include=custom&pnsdk=PubNub-Ruby/4.2.0&uuid=ruby-test-uuid
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"id":"mg","name":"magnum","custom":{"XXX":"YYYY"}}'
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.6.3 (2019-04-16))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 25 Oct 2019 20:36:54 GMT
16
+ Content-Type:
17
+ - application/x-www-form-urlencoded
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Date:
24
+ - Fri, 25 Oct 2019 20:36:57 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Content-Length:
28
+ - '227'
29
+ Connection:
30
+ - keep-alive
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Credentials:
34
+ - 'true'
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"status":200,"data":{"id":"mg","name":"magnum","externalId":null,"profileUrl":null,"email":null,"custom":{"XXX":"YYYY"},"created":"2019-10-25T20:36:57.254813Z","updated":"2019-10-25T20:36:57.254813Z","eTag":"Ad2eyIWXwJzBqAE"}}'
38
+ http_version:
39
+ recorded_at: Fri, 25 Oct 2019 20:36:54 GMT
40
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://ps.pndsn.com/v1/objects/demo/spaces/rb_space?auth=ruby-test-auth&pnsdk=PubNub-Ruby/4.2.0&uuid=ruby-test-uuid
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.6.3 (2019-04-16))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 25 Oct 2019 20:35:52 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 25 Oct 2019 20:35:55 GMT
23
+ Content-Type:
24
+ - application/json
25
+ Content-Length:
26
+ - '26'
27
+ Connection:
28
+ - keep-alive
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Access-Control-Allow-Credentials:
32
+ - 'true'
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"status":200,"data":null}'
36
+ http_version:
37
+ recorded_at: Fri, 25 Oct 2019 20:35:52 GMT
38
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://ps.pndsn.com/v1/objects/demo/users/mg?auth=ruby-test-auth&pnsdk=PubNub-Ruby/4.2.0&uuid=ruby-test-uuid
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.6.3 (2019-04-16))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 25 Oct 2019 20:36:55 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 25 Oct 2019 20:36:58 GMT
23
+ Content-Type:
24
+ - application/json
25
+ Content-Length:
26
+ - '26'
27
+ Connection:
28
+ - keep-alive
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Access-Control-Allow-Credentials:
32
+ - 'true'
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"status":200,"data":null}'
36
+ http_version:
37
+ recorded_at: Fri, 25 Oct 2019 20:36:55 GMT
38
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v1/objects/demo/spaces/space-1/users?auth=ruby-test-auth&count=true&include=custom&pnsdk=PubNub-Ruby/4.2.0&uuid=ruby-test-uuid
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.6.3 (2019-04-16))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 25 Oct 2019 20:35:48 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 25 Oct 2019 20:35:51 GMT
23
+ Content-Type:
24
+ - application/json
25
+ Content-Length:
26
+ - '39'
27
+ Connection:
28
+ - keep-alive
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Access-Control-Allow-Credentials:
32
+ - 'true'
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"status":200,"data":[],"totalCount":0}'
36
+ http_version:
37
+ recorded_at: Fri, 25 Oct 2019 20:35:48 GMT
38
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v1/objects/demo/spaces/rb_space?auth=ruby-test-auth&include=custom&pnsdk=PubNub-Ruby/4.2.0&uuid=ruby-test-uuid
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.6.3 (2019-04-16))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 25 Oct 2019 20:35:51 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 25 Oct 2019 20:35:54 GMT
23
+ Content-Type:
24
+ - application/json
25
+ Content-Length:
26
+ - '203'
27
+ Connection:
28
+ - keep-alive
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Access-Control-Allow-Credentials:
32
+ - 'true'
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"status":200,"data":{"id":"rb_space","name":"new_name","description":null,"custom":{"XXX":"YYYY"},"created":"2019-10-25T20:35:54.1512Z","updated":"2019-10-25T20:35:54.431837Z","eTag":"AYKsrdL029TZ1wE"}}'
36
+ http_version:
37
+ recorded_at: Fri, 25 Oct 2019 20:35:51 GMT
38
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v1/objects/demo/users/mg3/spaces?auth=ruby-test-auth&count=true&include=custom&pnsdk=PubNub-Ruby/4.2.0&uuid=ruby-test-uuid
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.6.3 (2019-04-16))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 25 Oct 2019 20:35:48 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 25 Oct 2019 20:35:51 GMT
23
+ Content-Type:
24
+ - application/json
25
+ Content-Length:
26
+ - '39'
27
+ Connection:
28
+ - keep-alive
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Access-Control-Allow-Credentials:
32
+ - 'true'
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"status":200,"data":[],"totalCount":0}'
36
+ http_version:
37
+ recorded_at: Fri, 25 Oct 2019 20:35:48 GMT
38
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v1/objects/demo/spaces?auth=ruby-test-auth&include=custom&limit=5&pnsdk=PubNub-Ruby/4.2.0&uuid=ruby-test-uuid
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.6.3 (2019-04-16))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 25 Oct 2019 20:35:51 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 25 Oct 2019 20:35:54 GMT
23
+ Content-Type:
24
+ - application/json
25
+ Content-Length:
26
+ - '1036'
27
+ Connection:
28
+ - keep-alive
29
+ Vary:
30
+ - Accept-Encoding
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Credentials:
34
+ - 'true'
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"status":200,"data":[{"id":"NMLWPOUHLV","name":"ZAGXJVHXZL","description":null,"custom":null,"created":"2019-08-18T12:10:01.873873Z","updated":"2019-08-18T12:10:01.873873Z","eTag":"AY6XzPic6t+aNg"},{"id":"YGVRVMOZIK","name":"FZJWFBWKZM","description":"GKRYWOMDRG","custom":null,"created":"2019-08-18T12:16:37.379839Z","updated":"2019-08-18T12:16:37.848793Z","eTag":"AdGc85ajmIDoXg"},{"id":"PXBRDJJWOI","name":"AOQFCTWRZF","description":null,"custom":{"info":"CJIOSKYG","text":"YWHVBDKUHF","uncd":"=!=?-+-?"},"created":"2019-08-18T12:16:40.302258Z","updated":"2019-08-18T12:16:40.609418Z","eTag":"AbzMs+nb/JmowgE"},{"id":"ZZHUEGVHWM","name":"YUUOXZEKDW","description":null,"custom":{"info":"RDZQEIYH","text":"MVCSBQVYEZ","uncd":"-=--?!=!"},"created":"2019-08-18T12:16:41.154746Z","updated":"2019-08-18T12:16:41.564938Z","eTag":"Ab79ksvrz77S6QE"},{"id":"OTCGLMCVEQ","name":"KLRDJADJSG","description":null,"custom":null,"created":"2019-08-18T12:16:42.062339Z","updated":"2019-08-18T12:16:42.062339Z","eTag":"Adbut8mspafpYw"}],"next":"NQ"}'
38
+ http_version:
39
+ recorded_at: Fri, 25 Oct 2019 20:35:52 GMT
40
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ps.pndsn.com/v1/objects/demo/users/mg?auth=ruby-test-auth&include=custom&pnsdk=PubNub-Ruby/4.2.0&uuid=ruby-test-uuid
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.6.3 (2019-04-16))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 25 Oct 2019 20:36:54 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Fri, 25 Oct 2019 20:36:57 GMT
23
+ Content-Type:
24
+ - application/json
25
+ Content-Length:
26
+ - '228'
27
+ Connection:
28
+ - keep-alive
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Access-Control-Allow-Credentials:
32
+ - 'true'
33
+ body:
34
+ encoding: UTF-8
35
+ string: '{"status":200,"data":{"id":"mg","name":"magnum_1","externalId":null,"profileUrl":null,"email":null,"custom":{"XXX":"YYYY"},"created":"2019-10-25T20:36:57.254813Z","updated":"2019-10-25T20:36:57.561462Z","eTag":"AYD0rZeD55aIMA"}}'
36
+ http_version:
37
+ recorded_at: Fri, 25 Oct 2019 20:36:55 GMT
38
+ recorded_with: VCR 5.0.0
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: patch
5
+ uri: http://ps.pndsn.com/v1/objects/demo/spaces/space-1/users?auth=ruby-test-auth&include=custom&pnsdk=PubNub-Ruby/4.2.0&uuid=ruby-test-uuid
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"add":[{"id":"mg2"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - HTTPClient/1.0 (2.8.3, ruby 2.6.3 (2019-04-16))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Fri, 25 Oct 2019 20:35:49 GMT
16
+ Content-Type:
17
+ - application/x-www-form-urlencoded
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Date:
24
+ - Fri, 25 Oct 2019 20:35:52 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Content-Length:
28
+ - '166'
29
+ Connection:
30
+ - keep-alive
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Credentials:
34
+ - 'true'
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"status":200,"data":[{"id":"mg2","custom":null,"created":"2019-10-25T20:35:52.562231Z","updated":"2019-10-25T20:35:52.562231Z","eTag":"AY39mJKK//C0VA"}],"next":"MQ"}'
38
+ http_version:
39
+ recorded_at: Fri, 25 Oct 2019 20:35:49 GMT
40
+ recorded_with: VCR 5.0.0