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
@@ -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:21:27 GMT
16
+ response:
17
+ status:
18
+ code: 500
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Tue, 29 Aug 2017 11:21: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": 500, "error": true, "error_message": ""}'
44
+ http_version:
45
+ recorded_at: Tue, 29 Aug 2017 11:21: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&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:21:26 GMT
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Tue, 29 Aug 2017 11:21: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:21:27 GMT
46
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,25 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '../'
4
+
5
+ gem 'celluloid', '>= 0.17', '< 0.18'
6
+
7
+ # dry-validation depends on dry-types that is not compatible with ruby
8
+ # 2.1.0 from 0.11.0.
9
+ gem 'dry-validation', '>= 0.10', '< 0.11'
10
+
11
+ group :test do
12
+ gem 'rubocop'
13
+ gem 'simplecov', '>= 0.12', require: false
14
+ gem 'codacy-coverage', require: false
15
+ gem 'rspec'
16
+ gem 'rspec-wait'
17
+ gem 'vcr'
18
+ gem 'rr'
19
+ gem 'webmock'
20
+ end
21
+
22
+ group :development, :test do
23
+ gem 'pry'
24
+ gem 'awesome_print'
25
+ end
@@ -0,0 +1,159 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ pubnub (4.0.24)
5
+ celluloid (~> 0.17)
6
+ dry-validation (~> 0.10)
7
+ httpclient (~> 2.8, >= 2.8.3)
8
+ json (>= 1.8, < 3)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ addressable (2.5.2)
14
+ public_suffix (>= 2.0.2, < 4.0)
15
+ ast (2.3.0)
16
+ awesome_print (1.8.0)
17
+ celluloid (0.17.3)
18
+ celluloid-essentials
19
+ celluloid-extras
20
+ celluloid-fsm
21
+ celluloid-pool
22
+ celluloid-supervision
23
+ timers (>= 4.1.1)
24
+ celluloid-essentials (0.20.5)
25
+ timers (>= 4.1.1)
26
+ celluloid-extras (0.20.5)
27
+ timers (>= 4.1.1)
28
+ celluloid-fsm (0.20.5)
29
+ timers (>= 4.1.1)
30
+ celluloid-pool (0.20.5)
31
+ timers (>= 4.1.1)
32
+ celluloid-supervision (0.20.6)
33
+ timers (>= 4.1.1)
34
+ codacy-coverage (1.1.7)
35
+ simplecov
36
+ coderay (1.1.2)
37
+ concurrent-ruby (1.0.5)
38
+ concurrent-ruby (1.0.5-java)
39
+ crack (0.4.3)
40
+ safe_yaml (~> 1.0.0)
41
+ diff-lcs (1.3)
42
+ docile (1.1.5)
43
+ dry-configurable (0.7.0)
44
+ concurrent-ruby (~> 1.0)
45
+ dry-container (0.6.0)
46
+ concurrent-ruby (~> 1.0)
47
+ dry-configurable (~> 0.1, >= 0.1.3)
48
+ dry-core (0.3.3)
49
+ concurrent-ruby (~> 1.0)
50
+ dry-equalizer (0.2.0)
51
+ dry-logic (0.4.1)
52
+ dry-container (~> 0.2, >= 0.2.6)
53
+ dry-core (~> 0.2)
54
+ dry-equalizer (~> 0.2)
55
+ dry-types (0.10.3)
56
+ concurrent-ruby (~> 1.0)
57
+ dry-configurable (~> 0.1)
58
+ dry-container (~> 0.3)
59
+ dry-core (~> 0.2, >= 0.2.1)
60
+ dry-equalizer (~> 0.2)
61
+ dry-logic (~> 0.4, >= 0.4.0)
62
+ inflecto (~> 0.0.0, >= 0.0.2)
63
+ dry-validation (0.10.7)
64
+ concurrent-ruby (~> 1.0)
65
+ dry-configurable (~> 0.1, >= 0.1.3)
66
+ dry-core (~> 0.2, >= 0.2.1)
67
+ dry-equalizer (~> 0.2)
68
+ dry-logic (~> 0.4, >= 0.4.0)
69
+ dry-types (~> 0.9, >= 0.9.0)
70
+ ffi (1.9.18-java)
71
+ hashdiff (0.3.6)
72
+ hitimes (1.2.6)
73
+ hitimes (1.2.6-java)
74
+ httpclient (2.8.3)
75
+ inflecto (0.0.2)
76
+ json (2.1.0)
77
+ json (2.1.0-java)
78
+ method_source (0.8.2)
79
+ parallel (1.12.0)
80
+ parser (2.4.0.0)
81
+ ast (~> 2.2)
82
+ powerpack (0.1.1)
83
+ pry (0.10.4)
84
+ coderay (~> 1.1.0)
85
+ method_source (~> 0.8.1)
86
+ slop (~> 3.4)
87
+ pry (0.10.4-java)
88
+ coderay (~> 1.1.0)
89
+ method_source (~> 0.8.1)
90
+ slop (~> 3.4)
91
+ spoon (~> 0.0)
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)
104
+ diff-lcs (>= 1.2.0, < 2.0)
105
+ rspec-support (~> 3.6.0)
106
+ rspec-mocks (3.6.0)
107
+ diff-lcs (>= 1.2.0, < 2.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)
115
+ powerpack (~> 0.1)
116
+ rainbow (>= 1.99.1, < 3.0)
117
+ ruby-progressbar (~> 1.7)
118
+ unicode-display_width (~> 1.0, >= 1.0.1)
119
+ ruby-progressbar (1.8.1)
120
+ safe_yaml (1.0.4)
121
+ simplecov (0.15.1)
122
+ docile (~> 1.1.0)
123
+ json (>= 1.8, < 3)
124
+ simplecov-html (~> 0.10.0)
125
+ simplecov-html (0.10.2)
126
+ slop (3.6.0)
127
+ spoon (0.0.6)
128
+ ffi
129
+ timers (4.1.2)
130
+ hitimes
131
+ unicode-display_width (1.3.0)
132
+ vcr (3.0.3)
133
+ webmock (3.0.1)
134
+ addressable (>= 2.3.6)
135
+ crack (>= 0.3.2)
136
+ hashdiff
137
+
138
+ PLATFORMS
139
+ java
140
+ ruby
141
+
142
+ DEPENDENCIES
143
+ awesome_print
144
+ bundler (~> 1.7)
145
+ celluloid (>= 0.17, < 0.18)
146
+ codacy-coverage
147
+ dry-validation (>= 0.10, < 0.11)
148
+ pry
149
+ pubnub!
150
+ rr
151
+ rspec
152
+ rspec-wait
153
+ rubocop
154
+ simplecov (>= 0.12)
155
+ vcr
156
+ webmock
157
+
158
+ BUNDLED WITH
159
+ 1.15.4
@@ -0,0 +1,25 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '../'
4
+
5
+ gem 'celluloid', '>= 0.18.0.pre', '< 0.19'
6
+
7
+ # dry-validation depends on dry-types that is not compatible with ruby
8
+ # 2.1.0 from 0.11.0.
9
+ gem 'dry-validation', '>= 0.10', '< 0.11'
10
+
11
+ group :test do
12
+ gem 'rubocop'
13
+ gem 'simplecov', '>= 0.12', require: false
14
+ gem 'codacy-coverage', require: false
15
+ gem 'rspec'
16
+ gem 'rspec-wait'
17
+ gem 'vcr'
18
+ gem 'rr'
19
+ gem 'webmock'
20
+ end
21
+
22
+ group :development, :test do
23
+ gem 'pry'
24
+ gem 'awesome_print'
25
+ end
@@ -0,0 +1,159 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ pubnub (4.0.24)
5
+ celluloid (~> 0.17)
6
+ dry-validation (~> 0.10)
7
+ httpclient (~> 2.8, >= 2.8.3)
8
+ json (>= 1.8, < 3)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ addressable (2.5.2)
14
+ public_suffix (>= 2.0.2, < 4.0)
15
+ ast (2.3.0)
16
+ awesome_print (1.8.0)
17
+ celluloid (0.18.0.pre)
18
+ celluloid-essentials
19
+ celluloid-extras
20
+ celluloid-fsm
21
+ celluloid-pool
22
+ celluloid-supervision
23
+ timers (>= 4.1.1)
24
+ celluloid-essentials (0.20.5)
25
+ timers (>= 4.1.1)
26
+ celluloid-extras (0.20.5)
27
+ timers (>= 4.1.1)
28
+ celluloid-fsm (0.20.5)
29
+ timers (>= 4.1.1)
30
+ celluloid-pool (0.20.5)
31
+ timers (>= 4.1.1)
32
+ celluloid-supervision (0.20.6)
33
+ timers (>= 4.1.1)
34
+ codacy-coverage (1.1.7)
35
+ simplecov
36
+ coderay (1.1.2)
37
+ concurrent-ruby (1.0.5)
38
+ concurrent-ruby (1.0.5-java)
39
+ crack (0.4.3)
40
+ safe_yaml (~> 1.0.0)
41
+ diff-lcs (1.3)
42
+ docile (1.1.5)
43
+ dry-configurable (0.7.0)
44
+ concurrent-ruby (~> 1.0)
45
+ dry-container (0.6.0)
46
+ concurrent-ruby (~> 1.0)
47
+ dry-configurable (~> 0.1, >= 0.1.3)
48
+ dry-core (0.3.3)
49
+ concurrent-ruby (~> 1.0)
50
+ dry-equalizer (0.2.0)
51
+ dry-logic (0.4.1)
52
+ dry-container (~> 0.2, >= 0.2.6)
53
+ dry-core (~> 0.2)
54
+ dry-equalizer (~> 0.2)
55
+ dry-types (0.10.3)
56
+ concurrent-ruby (~> 1.0)
57
+ dry-configurable (~> 0.1)
58
+ dry-container (~> 0.3)
59
+ dry-core (~> 0.2, >= 0.2.1)
60
+ dry-equalizer (~> 0.2)
61
+ dry-logic (~> 0.4, >= 0.4.0)
62
+ inflecto (~> 0.0.0, >= 0.0.2)
63
+ dry-validation (0.10.7)
64
+ concurrent-ruby (~> 1.0)
65
+ dry-configurable (~> 0.1, >= 0.1.3)
66
+ dry-core (~> 0.2, >= 0.2.1)
67
+ dry-equalizer (~> 0.2)
68
+ dry-logic (~> 0.4, >= 0.4.0)
69
+ dry-types (~> 0.9, >= 0.9.0)
70
+ ffi (1.9.18-java)
71
+ hashdiff (0.3.6)
72
+ hitimes (1.2.6)
73
+ hitimes (1.2.6-java)
74
+ httpclient (2.8.3)
75
+ inflecto (0.0.2)
76
+ json (2.1.0)
77
+ json (2.1.0-java)
78
+ method_source (0.8.2)
79
+ parallel (1.12.0)
80
+ parser (2.4.0.0)
81
+ ast (~> 2.2)
82
+ powerpack (0.1.1)
83
+ pry (0.10.4)
84
+ coderay (~> 1.1.0)
85
+ method_source (~> 0.8.1)
86
+ slop (~> 3.4)
87
+ pry (0.10.4-java)
88
+ coderay (~> 1.1.0)
89
+ method_source (~> 0.8.1)
90
+ slop (~> 3.4)
91
+ spoon (~> 0.0)
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)
104
+ diff-lcs (>= 1.2.0, < 2.0)
105
+ rspec-support (~> 3.6.0)
106
+ rspec-mocks (3.6.0)
107
+ diff-lcs (>= 1.2.0, < 2.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)
115
+ powerpack (~> 0.1)
116
+ rainbow (>= 1.99.1, < 3.0)
117
+ ruby-progressbar (~> 1.7)
118
+ unicode-display_width (~> 1.0, >= 1.0.1)
119
+ ruby-progressbar (1.8.1)
120
+ safe_yaml (1.0.4)
121
+ simplecov (0.15.1)
122
+ docile (~> 1.1.0)
123
+ json (>= 1.8, < 3)
124
+ simplecov-html (~> 0.10.0)
125
+ simplecov-html (0.10.2)
126
+ slop (3.6.0)
127
+ spoon (0.0.6)
128
+ ffi
129
+ timers (4.1.2)
130
+ hitimes
131
+ unicode-display_width (1.3.0)
132
+ vcr (3.0.3)
133
+ webmock (3.0.1)
134
+ addressable (>= 2.3.6)
135
+ crack (>= 0.3.2)
136
+ hashdiff
137
+
138
+ PLATFORMS
139
+ java
140
+ ruby
141
+
142
+ DEPENDENCIES
143
+ awesome_print
144
+ bundler (~> 1.7)
145
+ celluloid (>= 0.18.0.pre, < 0.19)
146
+ codacy-coverage
147
+ dry-validation (>= 0.10, < 0.11)
148
+ pry
149
+ pubnub!
150
+ rr
151
+ rspec
152
+ rspec-wait
153
+ rubocop
154
+ simplecov (>= 0.12)
155
+ vcr
156
+ webmock
157
+
158
+ BUNDLED WITH
159
+ 1.15.4