pubnub 4.0.23 → 4.0.25

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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/.pubnub.yml +18 -1
  3. data/.travis.yml +23 -6
  4. data/CHANGELOG.md +7 -0
  5. data/Gemfile.lock +59 -50
  6. data/VERSION +1 -1
  7. data/fixtures/vcr_cassettes/examples/delete_messages_channel.yml +46 -0
  8. data/fixtures/vcr_cassettes/examples/delete_messages_channel_end.yml +46 -0
  9. data/fixtures/vcr_cassettes/examples/delete_messages_channel_start.yml +46 -0
  10. data/fixtures/vcr_cassettes/examples/delete_messages_channel_start_end.yml +46 -0
  11. data/fixtures/vcr_cassettes/lib/events/delete_messages-error.yml +46 -0
  12. data/fixtures/vcr_cassettes/lib/events/delete_messages.yml +46 -0
  13. data/gemfiles/celluloid_017.gemfile +25 -0
  14. data/gemfiles/celluloid_017.gemfile.lock +159 -0
  15. data/gemfiles/celluloid_018.gemfile +25 -0
  16. data/gemfiles/celluloid_018.gemfile.lock +159 -0
  17. data/gemfiles/celluloid_master.gemfile +25 -0
  18. data/gemfiles/celluloid_master.gemfile.lock +155 -0
  19. data/lib/pubnub.rb +3 -0
  20. data/lib/pubnub/client.rb +13 -1
  21. data/lib/pubnub/client/events.rb +1 -1
  22. data/lib/pubnub/constants.rb +1 -0
  23. data/lib/pubnub/event.rb +20 -5
  24. data/lib/pubnub/event/formatter.rb +1 -3
  25. data/lib/pubnub/events/channel_registration.rb +1 -0
  26. data/lib/pubnub/events/delete_messages.rb +63 -0
  27. data/lib/pubnub/events/heartbeat.rb +1 -0
  28. data/lib/pubnub/events/here_now.rb +1 -0
  29. data/lib/pubnub/events/history.rb +1 -0
  30. data/lib/pubnub/events/leave.rb +1 -0
  31. data/lib/pubnub/events/presence.rb +1 -0
  32. data/lib/pubnub/events/publish.rb +1 -0
  33. data/lib/pubnub/events/set_state.rb +1 -0
  34. data/lib/pubnub/events/state.rb +1 -0
  35. data/lib/pubnub/events/time.rb +1 -0
  36. data/lib/pubnub/events/where_now.rb +1 -0
  37. data/lib/pubnub/pam.rb +2 -1
  38. data/lib/pubnub/telemetry.rb +29 -0
  39. data/lib/pubnub/validators/delete.rb +24 -0
  40. data/lib/pubnub/version.rb +1 -1
  41. data/spec/examples/audit_examples_spec.rb +3 -1
  42. data/spec/examples/channel_registration_examples_spec.rb +3 -1
  43. data/spec/examples/delete_messages_examples_spec.rb +48 -0
  44. data/spec/examples/grant_examples_spec.rb +2 -2
  45. data/spec/examples/heartbeat_examples_spec.rb +2 -2
  46. data/spec/examples/here_now_examples_spec.rb +2 -2
  47. data/spec/examples/history_examples_spec.rb +2 -2
  48. data/spec/examples/leave_examples_spec.rb +2 -2
  49. data/spec/examples/presence_examples_spec.rb +2 -2
  50. data/spec/examples/publish_examples_spec.rb +2 -2
  51. data/spec/examples/publish_with_ttl_spec.rb +3 -2
  52. data/spec/examples/revoke_examples_spec.rb +2 -2
  53. data/spec/examples/set_state_examples_spec.rb +2 -2
  54. data/spec/examples/state_examples_spec.rb +2 -2
  55. data/spec/examples/subscribe_examples_spec.rb +2 -2
  56. data/spec/examples/time_examples_spec.rb +2 -2
  57. data/spec/examples/where_now_examples_spec.rb +2 -2
  58. data/spec/lib/events/delete_messages_spec.rb +43 -0
  59. data/spec/lib/events/grant_spec.rb +27 -28
  60. data/spec/lib/events/timeout_handling_spec.rb +20 -14
  61. data/spec/lib/pubnub_spec.rb +7 -1
  62. data/spec/spec_helper.rb +21 -0
  63. metadata +22 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a669116c6ba475d9b9fc6bf8ff088a9dc14c9029
4
- data.tar.gz: 26cb93550d57410ae0883984f37a86de4f8a0b97
3
+ metadata.gz: 00b276ca8003a18a9ffca97432d7386bb0c344a9
4
+ data.tar.gz: 37453ec20c3eaccced7004add88817c6f992a454
5
5
  SHA512:
6
- metadata.gz: c14ebefffa1b9bc3fbbab756433b5bbd90d91ec383676754a847a07e602dee9f1d44bbf5bc1ac57a40da3d240dd2cbcedcb32597e9b6847de3505f3e323a39ff
7
- data.tar.gz: 291fcb39ba0d46e70f23fc0d7c0230cd9d7bf26ed2f4e59b0ada9ea43a6fa55153ec106bc3cd292762d405386915df131755ecbd9e31c97dd2594c294a3a7e3c
6
+ metadata.gz: d0c5316dd50e880aa1680fda80bd00f7f74fa7d9444bf48065f96d71b8ba0d0e214cae79e5602b5059786154512a42fe6e05f5e694dbf9b9bb194254cec1c478
7
+ data.tar.gz: 974ad4cc0b96d1a09cd0ef449b22d95c329d094b0d1c534e50e749c008c4f93edc113ca8a62fbbc7a860be72a78a1387fcf17e7d7906a85207ce10d15effcb23
@@ -1,5 +1,22 @@
1
1
  ---
2
2
  changelog:
3
+ -
4
+ changes:
5
+ -
6
+ text: "Added telemetry"
7
+ type: feature
8
+ date: 12-09-2017
9
+ version: "4.0.25"
10
+ -
11
+ changes:
12
+ -
13
+ text: "Added #delete_messages method"
14
+ type: feature
15
+ -
16
+ text: "Improved timeout error handling (thanks @f1sherman)"
17
+ type: improvement
18
+ date: 29-08-2017
19
+ version: "4.0.24"
3
20
  -
4
21
  changes:
5
22
  -
@@ -7,7 +24,7 @@ changelog:
7
24
  type: bug
8
25
  date: 26-07-2017
9
26
  version: "4.0.23"
10
- -
27
+ -
11
28
  changes:
12
29
  -
13
30
  text: "Fixed signature generation and channel name escaping"
@@ -5,18 +5,35 @@ addons:
5
5
  repo_token: 48739096f72763cbed9bd407efd2ed33151ce5663fb3181455128f06d6123ef3
6
6
 
7
7
  before_install:
8
+ # See https://github.com/travis-ci/travis-ci/issues/5861
9
+ - gem install bundler
8
10
  - gem update bundler
9
11
 
10
12
  bundler_args: --without development
11
13
 
12
14
  script: bundle exec rspec
13
15
 
16
+ gemfile:
17
+ - gemfiles/celluloid_017.gemfile
18
+ - gemfiles/celluloid_018.gemfile
19
+ - gemfiles/celluloid_master.gemfile
20
+
21
+ rvm:
22
+ - 2.4.1
23
+ - 2.3.4
24
+ - 2.2.7
25
+
14
26
  matrix:
15
27
  include:
16
- - rvm: 2.4.1
17
- - rvm: 2.3.4
18
- - rvm: 2.2.7
19
- - rvm: 2.1.10
20
- - rvm: jruby-9.1.8.0
28
+ - rvm: jruby-9.1.13.0
29
+ env: JRUBY_OPTS="--server -J-Xms1500m -J-Xmx1500m -J-XX:+UseConcMarkSweepGC -J-XX:-UseGCOverheadLimit -J-XX:+CMSClassUnloadingEnabled"
30
+ jdk: oraclejdk8
31
+ gemfile: gemfiles/celluloid_017.gemfile
32
+ - rvm: jruby-9.1.13.0
33
+ env: JRUBY_OPTS="--server -J-Xms1500m -J-Xmx1500m -J-XX:+UseConcMarkSweepGC -J-XX:-UseGCOverheadLimit -J-XX:+CMSClassUnloadingEnabled"
34
+ jdk: oraclejdk8
35
+ gemfile: gemfiles/celluloid_018.gemfile
36
+ - rvm: jruby-9.1.13.0
21
37
  env: JRUBY_OPTS="--server -J-Xms1500m -J-Xmx1500m -J-XX:+UseConcMarkSweepGC -J-XX:-UseGCOverheadLimit -J-XX:+CMSClassUnloadingEnabled"
22
- jdk: oraclejdk7
38
+ jdk: oraclejdk8
39
+ gemfile: gemfiles/celluloid_master.gemfile
@@ -1,3 +1,10 @@
1
+ ##### 4.0.25
2
+ * Added Telemetry
3
+
4
+ ##### 4.0.24
5
+ * Added #delete_messages method
6
+ * Improved timeout error handling (thanks @f1sherman)
7
+
1
8
  ##### 4.0.23
2
9
  * Fixed HereNow envelope generation
3
10
 
@@ -1,20 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pubnub (4.0.21)
4
+ pubnub (4.0.25)
5
5
  celluloid (~> 0.17)
6
6
  dry-validation (~> 0.10)
7
- httpclient (~> 2.8)
7
+ httpclient (~> 2.8, >= 2.8.3)
8
8
  json (>= 1.8, < 3)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- addressable (2.3.8)
14
- ast (2.1.0)
15
- astrolabe (1.3.1)
16
- parser (~> 2.2)
17
- awesome_print (1.6.1)
13
+ addressable (2.5.2)
14
+ public_suffix (>= 2.0.2, < 4.0)
15
+ ast (2.3.0)
16
+ awesome_print (1.8.0)
18
17
  celluloid (0.17.3)
19
18
  celluloid-essentials
20
19
  celluloid-extras
@@ -32,27 +31,28 @@ GEM
32
31
  timers (>= 4.1.1)
33
32
  celluloid-supervision (0.20.6)
34
33
  timers (>= 4.1.1)
35
- codacy-coverage (1.1.6)
34
+ codacy-coverage (1.1.7)
36
35
  simplecov
37
- coderay (1.1.0)
36
+ coderay (1.1.2)
38
37
  concurrent-ruby (1.0.5)
39
- crack (0.4.2)
38
+ concurrent-ruby (1.0.5-java)
39
+ crack (0.4.3)
40
40
  safe_yaml (~> 1.0.0)
41
- diff-lcs (1.2.5)
41
+ diff-lcs (1.3)
42
42
  docile (1.1.5)
43
- dry-configurable (0.6.2)
43
+ dry-configurable (0.7.0)
44
44
  concurrent-ruby (~> 1.0)
45
45
  dry-container (0.6.0)
46
46
  concurrent-ruby (~> 1.0)
47
47
  dry-configurable (~> 0.1, >= 0.1.3)
48
- dry-core (0.2.4)
48
+ dry-core (0.3.3)
49
49
  concurrent-ruby (~> 1.0)
50
50
  dry-equalizer (0.2.0)
51
51
  dry-logic (0.4.1)
52
52
  dry-container (~> 0.2, >= 0.2.6)
53
53
  dry-core (~> 0.2)
54
54
  dry-equalizer (~> 0.2)
55
- dry-types (0.9.4)
55
+ dry-types (0.11.1)
56
56
  concurrent-ruby (~> 1.0)
57
57
  dry-configurable (~> 0.1)
58
58
  dry-container (~> 0.3)
@@ -60,71 +60,80 @@ GEM
60
60
  dry-equalizer (~> 0.2)
61
61
  dry-logic (~> 0.4, >= 0.4.0)
62
62
  inflecto (~> 0.0.0, >= 0.0.2)
63
- dry-validation (0.10.5)
63
+ dry-validation (0.11.0)
64
64
  concurrent-ruby (~> 1.0)
65
65
  dry-configurable (~> 0.1, >= 0.1.3)
66
66
  dry-core (~> 0.2, >= 0.2.1)
67
67
  dry-equalizer (~> 0.2)
68
68
  dry-logic (~> 0.4, >= 0.4.0)
69
- dry-types (~> 0.9, >= 0.9.0)
70
- ffi (1.9.10-java)
71
- hitimes (1.2.4)
69
+ dry-types (~> 0.11.0)
70
+ ffi (1.9.18-java)
71
+ hashdiff (0.3.6)
72
+ hitimes (1.2.6)
73
+ hitimes (1.2.6-java)
72
74
  httpclient (2.8.3)
73
75
  inflecto (0.0.2)
74
- json (2.0.2)
75
- json (2.0.2-java)
76
+ json (2.1.0)
77
+ json (2.1.0-java)
76
78
  method_source (0.8.2)
77
- parser (2.2.2.6)
78
- ast (>= 1.1, < 3.0)
79
+ parallel (1.12.0)
80
+ parser (2.4.0.0)
81
+ ast (~> 2.2)
79
82
  powerpack (0.1.1)
80
- pry (0.10.1)
83
+ pry (0.10.4)
81
84
  coderay (~> 1.1.0)
82
85
  method_source (~> 0.8.1)
83
86
  slop (~> 3.4)
84
- pry (0.10.1-java)
87
+ pry (0.10.4-java)
85
88
  coderay (~> 1.1.0)
86
89
  method_source (~> 0.8.1)
87
90
  slop (~> 3.4)
88
91
  spoon (~> 0.0)
89
- rainbow (2.0.0)
90
- rr (1.1.2)
91
- rspec (3.3.0)
92
- rspec-core (~> 3.3.0)
93
- rspec-expectations (~> 3.3.0)
94
- rspec-mocks (~> 3.3.0)
95
- rspec-core (3.3.2)
96
- rspec-support (~> 3.3.0)
97
- rspec-expectations (3.3.1)
92
+ public_suffix (3.0.0)
93
+ rainbow (2.2.2)
94
+ rake
95
+ rake (12.1.0)
96
+ rr (1.2.1)
97
+ rspec (3.6.0)
98
+ rspec-core (~> 3.6.0)
99
+ rspec-expectations (~> 3.6.0)
100
+ rspec-mocks (~> 3.6.0)
101
+ rspec-core (3.6.0)
102
+ rspec-support (~> 3.6.0)
103
+ rspec-expectations (3.6.0)
98
104
  diff-lcs (>= 1.2.0, < 2.0)
99
- rspec-support (~> 3.3.0)
100
- rspec-mocks (3.3.2)
105
+ rspec-support (~> 3.6.0)
106
+ rspec-mocks (3.6.0)
101
107
  diff-lcs (>= 1.2.0, < 2.0)
102
- rspec-support (~> 3.3.0)
103
- rspec-support (3.3.0)
104
- rspec-wait (0.0.8)
105
- rspec (>= 2.11, < 3.5)
106
- rubocop (0.34.1)
107
- astrolabe (~> 1.3)
108
- parser (>= 2.2.2.5, < 3.0)
108
+ rspec-support (~> 3.6.0)
109
+ rspec-support (3.6.0)
110
+ rspec-wait (0.0.9)
111
+ rspec (>= 3, < 4)
112
+ rubocop (0.49.1)
113
+ parallel (~> 1.10)
114
+ parser (>= 2.3.3.1, < 3.0)
109
115
  powerpack (~> 0.1)
110
116
  rainbow (>= 1.99.1, < 3.0)
111
- ruby-progressbar (~> 1.4)
112
- ruby-progressbar (1.7.5)
117
+ ruby-progressbar (~> 1.7)
118
+ unicode-display_width (~> 1.0, >= 1.0.1)
119
+ ruby-progressbar (1.8.1)
113
120
  safe_yaml (1.0.4)
114
- simplecov (0.12.0)
121
+ simplecov (0.15.1)
115
122
  docile (~> 1.1.0)
116
123
  json (>= 1.8, < 3)
117
124
  simplecov-html (~> 0.10.0)
118
- simplecov-html (0.10.0)
125
+ simplecov-html (0.10.2)
119
126
  slop (3.6.0)
120
- spoon (0.0.4)
127
+ spoon (0.0.6)
121
128
  ffi
122
129
  timers (4.1.2)
123
130
  hitimes
124
- vcr (3.0.1)
125
- webmock (1.21.0)
131
+ unicode-display_width (1.3.0)
132
+ vcr (3.0.3)
133
+ webmock (3.0.1)
126
134
  addressable (>= 2.3.6)
127
135
  crack (>= 0.3.2)
136
+ hashdiff
128
137
 
129
138
  PLATFORMS
130
139
  java
@@ -145,4 +154,4 @@ DEPENDENCIES
145
154
  webmock
146
155
 
147
156
  BUNDLED WITH
148
- 1.14.6
157
+ 1.15.4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.0.23
1
+ 4.0.25
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://ps.pndsn.com/v3/history/sub-key/sub-c-fc6c9226-655d-11e7-b272-02ee2ddab7fe/channel/demo?auth=ruby-test-auth&pnsdk=PubNub-Ruby/4.0.23&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.1.10 (2016-04-01))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Tue, 29 Aug 2017 11:42:57 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Tue, 29 Aug 2017 11:42:57 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '52'
27
+ Connection:
28
+ - keep-alive
29
+ Cache-Control:
30
+ - no-cache
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Methods:
34
+ - GET
35
+ Accept-Ranges:
36
+ - bytes
37
+ Age:
38
+ - '0'
39
+ Server:
40
+ - Pubnub
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"status": 200, "error": false, "error_message": ""}'
44
+ http_version:
45
+ recorded_at: Tue, 29 Aug 2017 11:42:57 GMT
46
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://ps.pndsn.com/v3/history/sub-key/sub-c-fc6c9226-655d-11e7-b272-02ee2ddab7fe/channel/demo?auth=ruby-test-auth&end=15040071432538531&pnsdk=PubNub-Ruby/4.0.23&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.1.10 (2016-04-01))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Tue, 29 Aug 2017 11:47:27 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Tue, 29 Aug 2017 11:47:27 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '52'
27
+ Connection:
28
+ - keep-alive
29
+ Cache-Control:
30
+ - no-cache
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Methods:
34
+ - GET
35
+ Accept-Ranges:
36
+ - bytes
37
+ Age:
38
+ - '0'
39
+ Server:
40
+ - Pubnub
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"status": 200, "error": false, "error_message": ""}'
44
+ http_version:
45
+ recorded_at: Tue, 29 Aug 2017 11:47:27 GMT
46
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://ps.pndsn.com/v3/history/sub-key/sub-c-fc6c9226-655d-11e7-b272-02ee2ddab7fe/channel/demo?auth=ruby-test-auth&pnsdk=PubNub-Ruby/4.0.23&start=15040071432538531&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.1.10 (2016-04-01))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Tue, 29 Aug 2017 11:47:26 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Tue, 29 Aug 2017 11:47:27 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '52'
27
+ Connection:
28
+ - keep-alive
29
+ Cache-Control:
30
+ - no-cache
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Methods:
34
+ - GET
35
+ Accept-Ranges:
36
+ - bytes
37
+ Age:
38
+ - '0'
39
+ Server:
40
+ - Pubnub
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"status": 200, "error": false, "error_message": ""}'
44
+ http_version:
45
+ recorded_at: Tue, 29 Aug 2017 11:47:27 GMT
46
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://ps.pndsn.com/v3/history/sub-key/sub-c-fc6c9226-655d-11e7-b272-02ee2ddab7fe/channel/demo?auth=ruby-test-auth&end=1504007197000&pnsdk=PubNub-Ruby/4.0.23&start=1504003597000&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.1.10 (2016-04-01))
12
+ Accept:
13
+ - "*/*"
14
+ Date:
15
+ - Tue, 29 Aug 2017 11:47:27 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Tue, 29 Aug 2017 11:47:27 GMT
23
+ Content-Type:
24
+ - text/javascript; charset="UTF-8"
25
+ Content-Length:
26
+ - '52'
27
+ Connection:
28
+ - keep-alive
29
+ Cache-Control:
30
+ - no-cache
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Allow-Methods:
34
+ - GET
35
+ Accept-Ranges:
36
+ - bytes
37
+ Age:
38
+ - '0'
39
+ Server:
40
+ - Pubnub
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"status": 200, "error": false, "error_message": ""}'
44
+ http_version:
45
+ recorded_at: Tue, 29 Aug 2017 11:47:27 GMT
46
+ recorded_with: VCR 3.0.1