pubnub 4.0.27 → 4.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pubnub might be problematic. Click here for more details.

Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.pubnub.yml +8 -1
  3. data/.rubocop.yml +9 -3
  4. data/.travis.yml +6 -19
  5. data/CHANGELOG.md +86 -82
  6. data/Gemfile +7 -5
  7. data/Gemfile.lock +155 -157
  8. data/README.md +34 -34
  9. data/VERSION +1 -1
  10. data/gemfiles/celluloid_017.gemfile +4 -4
  11. data/gemfiles/celluloid_018.gemfile +4 -4
  12. data/gemfiles/celluloid_master.gemfile +4 -4
  13. data/gemfiles/concurrent-ruby-1.0.5.gem +0 -0
  14. data/gemfiles/concurrent-ruby-edge-0.3.1.gem +0 -0
  15. data/lib/pubnub.rb +3 -3
  16. data/lib/pubnub/client.rb +19 -16
  17. data/lib/pubnub/client/events.rb +5 -5
  18. data/lib/pubnub/client/getters_setters.rb +11 -12
  19. data/lib/pubnub/client/paged_history.rb +11 -9
  20. data/lib/pubnub/configuration.rb +1 -2
  21. data/lib/pubnub/constants.rb +47 -47
  22. data/lib/pubnub/crypto.rb +2 -2
  23. data/lib/pubnub/envelope.rb +7 -5
  24. data/lib/pubnub/error.rb +22 -15
  25. data/lib/pubnub/event.rb +24 -25
  26. data/lib/pubnub/event/formatter.rb +8 -5
  27. data/lib/pubnub/event/signature.rb +3 -3
  28. data/lib/pubnub/events/audit.rb +1 -1
  29. data/lib/pubnub/events/channel_registration.rb +10 -15
  30. data/lib/pubnub/events/delete_messages.rb +9 -9
  31. data/lib/pubnub/events/grant.rb +3 -3
  32. data/lib/pubnub/events/heartbeat.rb +4 -8
  33. data/lib/pubnub/events/here_now.rb +4 -8
  34. data/lib/pubnub/events/history.rb +10 -10
  35. data/lib/pubnub/events/leave.rb +2 -2
  36. data/lib/pubnub/events/presence.rb +1 -1
  37. data/lib/pubnub/events/publish.rb +3 -5
  38. data/lib/pubnub/events/revoke.rb +3 -3
  39. data/lib/pubnub/events/set_state.rb +3 -3
  40. data/lib/pubnub/events/state.rb +4 -6
  41. data/lib/pubnub/events/subscribe.rb +1 -1
  42. data/lib/pubnub/events/time.rb +2 -2
  43. data/lib/pubnub/events/where_now.rb +6 -6
  44. data/lib/pubnub/format.rb +73 -0
  45. data/lib/pubnub/formatter.rb +23 -21
  46. data/lib/pubnub/heart.rb +4 -4
  47. data/lib/pubnub/origin_manager.rb +3 -5
  48. data/lib/pubnub/pam.rb +5 -5
  49. data/lib/pubnub/schemas/envelope_schema.rb +1 -1
  50. data/lib/pubnub/subscribe_callback.rb +3 -3
  51. data/lib/pubnub/subscribe_event.rb +6 -10
  52. data/lib/pubnub/subscribe_event/formatter.rb +82 -80
  53. data/lib/pubnub/subscribe_event/heartbeat.rb +1 -1
  54. data/lib/pubnub/subscriber.rb +31 -32
  55. data/lib/pubnub/telemetry.rb +26 -27
  56. data/lib/pubnub/validators/audit.rb +3 -2
  57. data/lib/pubnub/validators/channel_registration.rb +6 -4
  58. data/lib/pubnub/validators/client.rb +1 -0
  59. data/lib/pubnub/validators/common_validator.rb +37 -31
  60. data/lib/pubnub/validators/delete.rb +5 -4
  61. data/lib/pubnub/validators/grant.rb +3 -2
  62. data/lib/pubnub/validators/history.rb +3 -2
  63. data/lib/pubnub/validators/leave.rb +3 -2
  64. data/lib/pubnub/validators/presence.rb +3 -2
  65. data/lib/pubnub/validators/publish.rb +15 -10
  66. data/lib/pubnub/validators/set_state.rb +0 -2
  67. data/lib/pubnub/validators/state.rb +3 -2
  68. data/lib/pubnub/version.rb +1 -1
  69. data/pubnub.gemspec +19 -18
  70. data/spec/examples/audit_examples_spec.rb +1268 -1418
  71. data/spec/examples/channel_registration_examples_spec.rb +655 -757
  72. data/spec/examples/delete_messages_examples_spec.rb +19 -21
  73. data/spec/examples/grant_examples_spec.rb +34028 -37920
  74. data/spec/examples/heartbeat_examples_spec.rb +583 -731
  75. data/spec/examples/here_now_examples_spec.rb +493 -569
  76. data/spec/examples/history_examples_spec.rb +979 -1127
  77. data/spec/examples/leave_examples_spec.rb +439 -551
  78. data/spec/examples/presence_examples_spec.rb +686 -830
  79. data/spec/examples/publish_examples_spec.rb +27223 -31547
  80. data/spec/examples/publish_with_ttl_spec.rb +11 -14
  81. data/spec/examples/revoke_examples_spec.rb +68048 -75828
  82. data/spec/examples/set_state_examples_spec.rb +295 -371
  83. data/spec/examples/state_examples_spec.rb +169 -197
  84. data/spec/examples/status_request_message_count_exceeded_spec.rb +16 -19
  85. data/spec/examples/subscribe_examples_spec.rb +43843 -52035
  86. data/spec/examples/time_examples_spec.rb +82 -98
  87. data/spec/examples/where_now_examples_spec.rb +88 -104
  88. data/spec/lib/client_spec.rb +99 -117
  89. data/spec/lib/connection_callback_spec.rb +27 -33
  90. data/spec/lib/custom_retries_examples_spec.rb +8 -11
  91. data/spec/lib/event_spec.rb +35 -42
  92. data/spec/lib/events/audit_spec.rb +19 -25
  93. data/spec/lib/events/channel_registration_spec.rb +17 -23
  94. data/spec/lib/events/delete_messages_spec.rb +14 -20
  95. data/spec/lib/events/grant_spec.rb +15 -21
  96. data/spec/lib/events/heartbeat_spec.rb +21 -27
  97. data/spec/lib/events/here_now_spec.rb +14 -20
  98. data/spec/lib/events/history_spec.rb +14 -20
  99. data/spec/lib/events/leave_spec.rb +14 -20
  100. data/spec/lib/events/presence_delta_spec.rb +15 -16
  101. data/spec/lib/events/presence_spec.rb +36 -45
  102. data/spec/lib/events/publish_spec.rb +33 -40
  103. data/spec/lib/events/revoke_spec.rb +16 -22
  104. data/spec/lib/events/state_spec.rb +16 -22
  105. data/spec/lib/events/subscribe_spec.rb +75 -85
  106. data/spec/lib/events/time_spec.rb +12 -18
  107. data/spec/lib/events/timeout_handling_spec.rb +8 -14
  108. data/spec/lib/events/where_now_spec.rb +14 -20
  109. data/spec/lib/keep_alive_spec.rb +4 -8
  110. data/spec/lib/multiple_ciphers_spec.rb +56 -60
  111. data/spec/lib/pubnub_spec.rb +10 -13
  112. data/spec/lib/signatures_spec.rb +118 -120
  113. data/spec/lib/ssl_error_spec.rb +14 -18
  114. data/spec/lib/super_admin_spec.rb +58 -66
  115. data/spec/lib/uuid_spec.rb +3 -4
  116. data/spec/spec_expectations.rb +3 -3
  117. data/spec/spec_helper.rb +29 -46
  118. metadata +52 -22
  119. data/lib/pubnub/message.rb +0 -43
@@ -1,816 +1,668 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe Pubnub::Heartbeat do
4
4
  around :each do |example|
5
- Celluloid.boot
6
-
7
5
  @fired = false
8
6
 
9
- @callback = ->(_envelope) do
7
+ @callback = -> (_envelope) do
10
8
  @fired = true
11
9
  end
12
10
 
13
11
  @pubnub = Pubnub.new(
14
- publish_key: 'pub-c-b42cec2f-f468-4784-8833-dd2b074538c4',
15
- subscribe_key: 'sub-c-b7fb805a-1777-11e6-be83-0619f8945a4f',
16
- uuid: 'ruby-test-uuid-client-one',
17
- auth_key: 'ruby-test-auth-client-one'
12
+ publish_key: "pub-c-b42cec2f-f468-4784-8833-dd2b074538c4",
13
+ subscribe_key: "sub-c-b7fb805a-1777-11e6-be83-0619f8945a4f",
14
+ uuid: "ruby-test-uuid-client-one",
15
+ auth_key: "ruby-test-auth-client-one",
18
16
  )
19
17
 
20
- example.run
21
- Celluloid.shutdown
18
+ example.run_with_retry retry: 10
22
19
  end
23
20
 
24
- it '__channel___demo___channel_group___demo___http_sync__true___callback__nil_' do
25
- VCR.use_cassette('examples/heartbeat/29', record: :none) do
26
- envelope = @pubnub.heartbeat(channel: :demo, channel_group: :demo, http_sync: true)
27
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
28
- expect(envelope.error?).to eq false
29
-
30
- expect(envelope.status[:code]).to eq(200)
31
- expect(envelope.status[:operation]).to eq(:heartbeat)
32
- expect(envelope.status[:category]).to eq(:ack)
33
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
34
-
35
-
36
- end
37
- end
38
-
39
-
40
- it '__channel___demo___channel_group___demo___http_sync__true___callback___block_' do
41
- VCR.use_cassette('examples/heartbeat/27', record: :none) do
42
- envelope = @pubnub.heartbeat(channel: :demo, channel_group: :demo, http_sync: true, &@callback)
43
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
44
- expect(envelope.error?).to eq false
45
-
46
- expect(envelope.status[:code]).to eq(200)
47
- expect(envelope.status[:operation]).to eq(:heartbeat)
48
- expect(envelope.status[:category]).to eq(:ack)
49
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
50
-
51
-
52
- end
53
- end
54
-
55
-
56
- it '__channel___demo___channel_group___demo___http_sync__true___callback___lambda_' do
57
- VCR.use_cassette('examples/heartbeat/28', record: :none) do
58
- envelope = @pubnub.heartbeat(channel: :demo, channel_group: :demo, http_sync: true, callback: @callback)
59
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
60
- expect(envelope.error?).to eq false
61
-
62
- expect(envelope.status[:code]).to eq(200)
63
- expect(envelope.status[:operation]).to eq(:heartbeat)
64
- expect(envelope.status[:category]).to eq(:ack)
65
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
66
-
67
-
68
- end
69
- end
70
-
71
-
72
- it '__channel___demo___channel_group___demo___http_sync__false___callback__nil_' do
73
- VCR.use_cassette('examples/heartbeat/26', record: :none) do
74
- envelope = @pubnub.heartbeat(channel: :demo, channel_group: :demo, http_sync: false)
75
- envelope = envelope.value
76
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
77
- expect(envelope.error?).to eq false
78
-
79
- expect(envelope.status[:code]).to eq(200)
80
- expect(envelope.status[:operation]).to eq(:heartbeat)
81
- expect(envelope.status[:category]).to eq(:ack)
82
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
83
-
84
-
85
- end
86
- end
87
-
88
-
89
- it '__channel___demo___channel_group___demo___http_sync__false___callback___block_' do
90
- VCR.use_cassette('examples/heartbeat/24', record: :none) do
91
- envelope = @pubnub.heartbeat(channel: :demo, channel_group: :demo, http_sync: false, &@callback)
92
- envelope = envelope.value
93
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
94
- expect(envelope.error?).to eq false
95
-
96
- expect(envelope.status[:code]).to eq(200)
97
- expect(envelope.status[:operation]).to eq(:heartbeat)
98
- expect(envelope.status[:category]).to eq(:ack)
99
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
100
-
101
-
102
- end
103
- end
104
-
105
-
106
- it '__channel___demo___channel_group___demo___http_sync__false___callback___lambda_' do
107
- VCR.use_cassette('examples/heartbeat/25', record: :none) do
108
- envelope = @pubnub.heartbeat(channel: :demo, channel_group: :demo, http_sync: false, callback: @callback)
109
- envelope = envelope.value
110
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
111
- expect(envelope.error?).to eq false
112
-
113
- expect(envelope.status[:code]).to eq(200)
114
- expect(envelope.status[:operation]).to eq(:heartbeat)
115
- expect(envelope.status[:category]).to eq(:ack)
116
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
117
-
118
-
119
- end
120
- end
121
-
122
-
123
- it '__channel___demo___channel_group___demo____http_sync__true___callback__nil_' do
124
- VCR.use_cassette('examples/heartbeat/23', record: :none) do
125
- envelope = @pubnub.heartbeat(channel: :demo, channel_group: 'demo', http_sync: true)
126
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
127
- expect(envelope.error?).to eq false
128
-
129
- expect(envelope.status[:code]).to eq(200)
130
- expect(envelope.status[:operation]).to eq(:heartbeat)
131
- expect(envelope.status[:category]).to eq(:ack)
132
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
133
-
134
-
135
- end
136
- end
137
-
138
-
139
- it '__channel___demo___channel_group___demo____http_sync__true___callback___block_' do
140
- VCR.use_cassette('examples/heartbeat/21', record: :none) do
141
- envelope = @pubnub.heartbeat(channel: :demo, channel_group: 'demo', http_sync: true, &@callback)
142
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
143
- expect(envelope.error?).to eq false
144
-
145
- expect(envelope.status[:code]).to eq(200)
146
- expect(envelope.status[:operation]).to eq(:heartbeat)
147
- expect(envelope.status[:category]).to eq(:ack)
148
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
149
-
150
-
151
- end
152
- end
153
-
154
-
155
- it '__channel___demo___channel_group___demo____http_sync__true___callback___lambda_' do
156
- VCR.use_cassette('examples/heartbeat/22', record: :none) do
157
- envelope = @pubnub.heartbeat(channel: :demo, channel_group: 'demo', http_sync: true, callback: @callback)
158
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
159
- expect(envelope.error?).to eq false
160
-
161
- expect(envelope.status[:code]).to eq(200)
162
- expect(envelope.status[:operation]).to eq(:heartbeat)
163
- expect(envelope.status[:category]).to eq(:ack)
164
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
165
-
166
-
167
- end
168
- end
169
-
170
-
171
- it '__channel___demo___channel_group___demo____http_sync__false___callback__nil_' do
172
- VCR.use_cassette('examples/heartbeat/20', record: :none) do
173
- envelope = @pubnub.heartbeat(channel: :demo, channel_group: 'demo', http_sync: false)
174
- envelope = envelope.value
175
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
176
- expect(envelope.error?).to eq false
177
-
178
- expect(envelope.status[:code]).to eq(200)
179
- expect(envelope.status[:operation]).to eq(:heartbeat)
180
- expect(envelope.status[:category]).to eq(:ack)
181
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
182
-
183
-
184
- end
185
- end
186
-
187
-
188
- it '__channel___demo___channel_group___demo____http_sync__false___callback___block_' do
189
- VCR.use_cassette('examples/heartbeat/18', record: :none) do
190
- envelope = @pubnub.heartbeat(channel: :demo, channel_group: 'demo', http_sync: false, &@callback)
191
- envelope = envelope.value
192
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
193
- expect(envelope.error?).to eq false
194
-
195
- expect(envelope.status[:code]).to eq(200)
196
- expect(envelope.status[:operation]).to eq(:heartbeat)
197
- expect(envelope.status[:category]).to eq(:ack)
198
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
199
-
200
-
201
- end
202
- end
203
-
204
-
205
- it '__channel___demo___channel_group___demo____http_sync__false___callback___lambda_' do
206
- VCR.use_cassette('examples/heartbeat/19', record: :none) do
207
- envelope = @pubnub.heartbeat(channel: :demo, channel_group: 'demo', http_sync: false, callback: @callback)
208
- envelope = envelope.value
209
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
210
- expect(envelope.error?).to eq false
211
-
212
- expect(envelope.status[:code]).to eq(200)
213
- expect(envelope.status[:operation]).to eq(:heartbeat)
214
- expect(envelope.status[:category]).to eq(:ack)
215
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
216
-
217
-
218
- end
219
- end
220
-
221
-
222
- it '__channel___demo___channel_group__nil___http_sync__true___callback__nil_' do
223
- VCR.use_cassette('examples/heartbeat/35', record: :none) do
224
- envelope = @pubnub.heartbeat(channel: :demo, http_sync: true)
225
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
226
- expect(envelope.error?).to eq false
227
-
228
- expect(envelope.status[:code]).to eq(200)
229
- expect(envelope.status[:operation]).to eq(:heartbeat)
230
- expect(envelope.status[:category]).to eq(:ack)
231
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
232
-
233
-
234
- end
235
- end
236
-
237
-
238
- it '__channel___demo___channel_group__nil___http_sync__true___callback___block_' do
239
- VCR.use_cassette('examples/heartbeat/33', record: :none) do
240
- envelope = @pubnub.heartbeat(channel: :demo, http_sync: true, &@callback)
241
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
242
- expect(envelope.error?).to eq false
243
-
244
- expect(envelope.status[:code]).to eq(200)
245
- expect(envelope.status[:operation]).to eq(:heartbeat)
246
- expect(envelope.status[:category]).to eq(:ack)
247
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
248
-
249
-
250
- end
251
- end
252
-
253
-
254
- it '__channel___demo___channel_group__nil___http_sync__true___callback___lambda_' do
255
- VCR.use_cassette('examples/heartbeat/34', record: :none) do
256
- envelope = @pubnub.heartbeat(channel: :demo, http_sync: true, callback: @callback)
257
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
258
- expect(envelope.error?).to eq false
259
-
260
- expect(envelope.status[:code]).to eq(200)
261
- expect(envelope.status[:operation]).to eq(:heartbeat)
262
- expect(envelope.status[:category]).to eq(:ack)
263
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
264
-
265
-
266
- end
267
- end
268
-
269
-
270
- it '__channel___demo___channel_group__nil___http_sync__false___callback__nil_' do
271
- VCR.use_cassette('examples/heartbeat/32', record: :none) do
272
- envelope = @pubnub.heartbeat(channel: :demo, http_sync: false)
273
- envelope = envelope.value
274
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
275
- expect(envelope.error?).to eq false
276
-
277
- expect(envelope.status[:code]).to eq(200)
278
- expect(envelope.status[:operation]).to eq(:heartbeat)
279
- expect(envelope.status[:category]).to eq(:ack)
280
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
281
-
282
-
283
- end
284
- end
285
-
286
-
287
- it '__channel___demo___channel_group__nil___http_sync__false___callback___block_' do
288
- VCR.use_cassette('examples/heartbeat/30', record: :none) do
289
- envelope = @pubnub.heartbeat(channel: :demo, http_sync: false, &@callback)
290
- envelope = envelope.value
291
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
292
- expect(envelope.error?).to eq false
293
-
294
- expect(envelope.status[:code]).to eq(200)
295
- expect(envelope.status[:operation]).to eq(:heartbeat)
296
- expect(envelope.status[:category]).to eq(:ack)
297
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
298
-
299
-
300
- end
301
- end
302
-
303
-
304
- it '__channel___demo___channel_group__nil___http_sync__false___callback___lambda_' do
305
- VCR.use_cassette('examples/heartbeat/31', record: :none) do
306
- envelope = @pubnub.heartbeat(channel: :demo, http_sync: false, callback: @callback)
307
- envelope = envelope.value
308
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
309
- expect(envelope.error?).to eq false
310
-
311
- expect(envelope.status[:code]).to eq(200)
312
- expect(envelope.status[:operation]).to eq(:heartbeat)
313
- expect(envelope.status[:category]).to eq(:ack)
314
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
315
-
316
-
317
- end
318
- end
319
-
320
-
321
- it '__channel___demo____channel_group___demo___http_sync__true___callback__nil_' do
322
- VCR.use_cassette('examples/heartbeat/11', record: :none) do
323
- envelope = @pubnub.heartbeat(channel: 'demo', channel_group: :demo, http_sync: true)
324
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
325
- expect(envelope.error?).to eq false
326
-
327
- expect(envelope.status[:code]).to eq(200)
328
- expect(envelope.status[:operation]).to eq(:heartbeat)
329
- expect(envelope.status[:category]).to eq(:ack)
330
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
331
-
332
-
333
- end
334
- end
335
-
336
-
337
- it '__channel___demo____channel_group___demo___http_sync__true___callback___block_' do
338
- VCR.use_cassette('examples/heartbeat/9', record: :none) do
339
- envelope = @pubnub.heartbeat(channel: 'demo', channel_group: :demo, http_sync: true, &@callback)
340
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
341
- expect(envelope.error?).to eq false
342
-
343
- expect(envelope.status[:code]).to eq(200)
344
- expect(envelope.status[:operation]).to eq(:heartbeat)
345
- expect(envelope.status[:category]).to eq(:ack)
346
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
347
-
348
-
349
- end
350
- end
351
-
352
-
353
- it '__channel___demo____channel_group___demo___http_sync__true___callback___lambda_' do
354
- VCR.use_cassette('examples/heartbeat/10', record: :none) do
355
- envelope = @pubnub.heartbeat(channel: 'demo', channel_group: :demo, http_sync: true, callback: @callback)
356
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
357
- expect(envelope.error?).to eq false
358
-
359
- expect(envelope.status[:code]).to eq(200)
360
- expect(envelope.status[:operation]).to eq(:heartbeat)
361
- expect(envelope.status[:category]).to eq(:ack)
362
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
363
-
364
-
365
- end
366
- end
367
-
368
-
369
- it '__channel___demo____channel_group___demo___http_sync__false___callback__nil_' do
370
- VCR.use_cassette('examples/heartbeat/8', record: :none) do
371
- envelope = @pubnub.heartbeat(channel: 'demo', channel_group: :demo, http_sync: false)
372
- envelope = envelope.value
373
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
374
- expect(envelope.error?).to eq false
375
-
376
- expect(envelope.status[:code]).to eq(200)
377
- expect(envelope.status[:operation]).to eq(:heartbeat)
378
- expect(envelope.status[:category]).to eq(:ack)
379
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
380
-
381
-
382
- end
383
- end
384
-
385
-
386
- it '__channel___demo____channel_group___demo___http_sync__false___callback___block_' do
387
- VCR.use_cassette('examples/heartbeat/6', record: :none) do
388
- envelope = @pubnub.heartbeat(channel: 'demo', channel_group: :demo, http_sync: false, &@callback)
389
- envelope = envelope.value
390
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
391
- expect(envelope.error?).to eq false
392
-
393
- expect(envelope.status[:code]).to eq(200)
394
- expect(envelope.status[:operation]).to eq(:heartbeat)
395
- expect(envelope.status[:category]).to eq(:ack)
396
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
397
-
398
-
399
- end
400
- end
401
-
402
-
403
- it '__channel___demo____channel_group___demo___http_sync__false___callback___lambda_' do
404
- VCR.use_cassette('examples/heartbeat/7', record: :none) do
405
- envelope = @pubnub.heartbeat(channel: 'demo', channel_group: :demo, http_sync: false, callback: @callback)
406
- envelope = envelope.value
407
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
408
- expect(envelope.error?).to eq false
409
-
410
- expect(envelope.status[:code]).to eq(200)
411
- expect(envelope.status[:operation]).to eq(:heartbeat)
412
- expect(envelope.status[:category]).to eq(:ack)
413
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
414
-
415
-
416
- end
417
- end
418
-
419
-
420
- it '__channel___demo____channel_group___demo____http_sync__true___callback__nil_' do
421
- VCR.use_cassette('examples/heartbeat/5', record: :none) do
422
- envelope = @pubnub.heartbeat(channel: 'demo', channel_group: 'demo', http_sync: true)
423
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
424
- expect(envelope.error?).to eq false
425
-
426
- expect(envelope.status[:code]).to eq(200)
427
- expect(envelope.status[:operation]).to eq(:heartbeat)
428
- expect(envelope.status[:category]).to eq(:ack)
429
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
430
-
431
-
432
- end
433
- end
434
-
435
-
436
- it '__channel___demo____channel_group___demo____http_sync__true___callback___block_' do
437
- VCR.use_cassette('examples/heartbeat/3', record: :none) do
438
- envelope = @pubnub.heartbeat(channel: 'demo', channel_group: 'demo', http_sync: true, &@callback)
439
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
440
- expect(envelope.error?).to eq false
441
-
442
- expect(envelope.status[:code]).to eq(200)
443
- expect(envelope.status[:operation]).to eq(:heartbeat)
444
- expect(envelope.status[:category]).to eq(:ack)
445
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
446
-
447
-
448
- end
449
- end
450
-
451
-
452
- it '__channel___demo____channel_group___demo____http_sync__true___callback___lambda_' do
453
- VCR.use_cassette('examples/heartbeat/4', record: :none) do
454
- envelope = @pubnub.heartbeat(channel: 'demo', channel_group: 'demo', http_sync: true, callback: @callback)
455
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
456
- expect(envelope.error?).to eq false
457
-
458
- expect(envelope.status[:code]).to eq(200)
459
- expect(envelope.status[:operation]).to eq(:heartbeat)
460
- expect(envelope.status[:category]).to eq(:ack)
461
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
462
-
463
-
464
- end
465
- end
466
-
467
-
468
- it '__channel___demo____channel_group___demo____http_sync__false___callback__nil_' do
469
- VCR.use_cassette('examples/heartbeat/2', record: :none) do
470
- envelope = @pubnub.heartbeat(channel: 'demo', channel_group: 'demo', http_sync: false)
471
- envelope = envelope.value
472
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
473
- expect(envelope.error?).to eq false
474
-
475
- expect(envelope.status[:code]).to eq(200)
476
- expect(envelope.status[:operation]).to eq(:heartbeat)
477
- expect(envelope.status[:category]).to eq(:ack)
478
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
479
-
480
-
481
- end
482
- end
483
-
484
-
485
- it '__channel___demo____channel_group___demo____http_sync__false___callback___block_' do
486
- VCR.use_cassette('examples/heartbeat/0', record: :none) do
487
- envelope = @pubnub.heartbeat(channel: 'demo', channel_group: 'demo', http_sync: false, &@callback)
488
- envelope = envelope.value
489
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
490
- expect(envelope.error?).to eq false
491
-
492
- expect(envelope.status[:code]).to eq(200)
493
- expect(envelope.status[:operation]).to eq(:heartbeat)
494
- expect(envelope.status[:category]).to eq(:ack)
495
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
496
-
497
-
498
- end
499
- end
500
-
501
-
502
- it '__channel___demo____channel_group___demo____http_sync__false___callback___lambda_' do
503
- VCR.use_cassette('examples/heartbeat/1', record: :none) do
504
- envelope = @pubnub.heartbeat(channel: 'demo', channel_group: 'demo', http_sync: false, callback: @callback)
505
- envelope = envelope.value
506
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
507
- expect(envelope.error?).to eq false
508
-
509
- expect(envelope.status[:code]).to eq(200)
510
- expect(envelope.status[:operation]).to eq(:heartbeat)
511
- expect(envelope.status[:category]).to eq(:ack)
512
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
513
-
514
-
515
- end
516
- end
517
-
518
-
519
- it '__channel___demo____channel_group__nil___http_sync__true___callback__nil_' do
520
- VCR.use_cassette('examples/heartbeat/17', record: :none) do
521
- envelope = @pubnub.heartbeat(channel: 'demo', http_sync: true)
522
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
523
- expect(envelope.error?).to eq false
524
-
525
- expect(envelope.status[:code]).to eq(200)
526
- expect(envelope.status[:operation]).to eq(:heartbeat)
527
- expect(envelope.status[:category]).to eq(:ack)
528
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
529
-
530
-
531
- end
532
- end
533
-
534
-
535
- it '__channel___demo____channel_group__nil___http_sync__true___callback___block_' do
536
- VCR.use_cassette('examples/heartbeat/15', record: :none) do
537
- envelope = @pubnub.heartbeat(channel: 'demo', http_sync: true, &@callback)
538
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
539
- expect(envelope.error?).to eq false
540
-
541
- expect(envelope.status[:code]).to eq(200)
542
- expect(envelope.status[:operation]).to eq(:heartbeat)
543
- expect(envelope.status[:category]).to eq(:ack)
544
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
545
-
546
-
547
- end
548
- end
549
-
550
-
551
- it '__channel___demo____channel_group__nil___http_sync__true___callback___lambda_' do
552
- VCR.use_cassette('examples/heartbeat/16', record: :none) do
553
- envelope = @pubnub.heartbeat(channel: 'demo', http_sync: true, callback: @callback)
554
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
555
- expect(envelope.error?).to eq false
556
-
557
- expect(envelope.status[:code]).to eq(200)
558
- expect(envelope.status[:operation]).to eq(:heartbeat)
559
- expect(envelope.status[:category]).to eq(:ack)
560
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
561
-
21
+ it "__channel___demo___channel_group___demo___http_sync__true___callback__nil_" do
22
+ VCR.use_cassette("examples/heartbeat/29", record: :none) do
23
+ envelope = @pubnub.heartbeat(channel: :demo, channel_group: :demo, http_sync: true)
24
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
25
+ expect(envelope.error?).to eq false
562
26
 
563
- end
564
- end
565
-
566
-
567
- it '__channel___demo____channel_group__nil___http_sync__false___callback__nil_' do
568
- VCR.use_cassette('examples/heartbeat/14', record: :none) do
569
- envelope = @pubnub.heartbeat(channel: 'demo', http_sync: false)
570
- envelope = envelope.value
571
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
572
- expect(envelope.error?).to eq false
573
-
574
- expect(envelope.status[:code]).to eq(200)
575
- expect(envelope.status[:operation]).to eq(:heartbeat)
576
- expect(envelope.status[:category]).to eq(:ack)
577
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
578
-
579
-
580
- end
581
- end
582
-
583
-
584
- it '__channel___demo____channel_group__nil___http_sync__false___callback___block_' do
585
- VCR.use_cassette('examples/heartbeat/12', record: :none) do
586
- envelope = @pubnub.heartbeat(channel: 'demo', http_sync: false, &@callback)
587
- envelope = envelope.value
588
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
589
- expect(envelope.error?).to eq false
27
+ expect(envelope.status[:code]).to eq(200)
28
+ expect(envelope.status[:operation]).to eq(:heartbeat)
29
+ expect(envelope.status[:category]).to eq(:ack)
30
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
31
+ end
32
+ end
590
33
 
591
- expect(envelope.status[:code]).to eq(200)
592
- expect(envelope.status[:operation]).to eq(:heartbeat)
593
- expect(envelope.status[:category]).to eq(:ack)
594
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
34
+ it "__channel___demo___channel_group___demo___http_sync__true___callback___block_" do
35
+ VCR.use_cassette("examples/heartbeat/27", record: :none) do
36
+ envelope = @pubnub.heartbeat(channel: :demo, channel_group: :demo, http_sync: true, &@callback)
37
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
38
+ expect(envelope.error?).to eq false
595
39
 
40
+ expect(envelope.status[:code]).to eq(200)
41
+ expect(envelope.status[:operation]).to eq(:heartbeat)
42
+ expect(envelope.status[:category]).to eq(:ack)
43
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
44
+ end
45
+ end
596
46
 
597
- end
598
- end
47
+ it "__channel___demo___channel_group___demo___http_sync__true___callback___lambda_" do
48
+ VCR.use_cassette("examples/heartbeat/28", record: :none) do
49
+ envelope = @pubnub.heartbeat(channel: :demo, channel_group: :demo, http_sync: true, callback: @callback)
50
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
51
+ expect(envelope.error?).to eq false
599
52
 
53
+ expect(envelope.status[:code]).to eq(200)
54
+ expect(envelope.status[:operation]).to eq(:heartbeat)
55
+ expect(envelope.status[:category]).to eq(:ack)
56
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
57
+ end
58
+ end
600
59
 
601
- it '__channel___demo____channel_group__nil___http_sync__false___callback___lambda_' do
602
- VCR.use_cassette('examples/heartbeat/13', record: :none) do
603
- envelope = @pubnub.heartbeat(channel: 'demo', http_sync: false, callback: @callback)
604
- envelope = envelope.value
605
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
606
- expect(envelope.error?).to eq false
60
+ it "__channel___demo___channel_group___demo___http_sync__false___callback__nil_" do
61
+ VCR.use_cassette("examples/heartbeat/26", record: :none) do
62
+ envelope = @pubnub.heartbeat(channel: :demo, channel_group: :demo, http_sync: false)
63
+ envelope = envelope.value
64
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
65
+ expect(envelope.error?).to eq false
66
+
67
+ expect(envelope.status[:code]).to eq(200)
68
+ expect(envelope.status[:operation]).to eq(:heartbeat)
69
+ expect(envelope.status[:category]).to eq(:ack)
70
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
71
+ end
72
+ end
607
73
 
608
- expect(envelope.status[:code]).to eq(200)
609
- expect(envelope.status[:operation]).to eq(:heartbeat)
610
- expect(envelope.status[:category]).to eq(:ack)
611
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
74
+ it "__channel___demo___channel_group___demo___http_sync__false___callback___block_" do
75
+ VCR.use_cassette("examples/heartbeat/24", record: :none) do
76
+ envelope = @pubnub.heartbeat(channel: :demo, channel_group: :demo, http_sync: false, &@callback)
77
+ envelope = envelope.value
78
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
79
+ expect(envelope.error?).to eq false
80
+
81
+ expect(envelope.status[:code]).to eq(200)
82
+ expect(envelope.status[:operation]).to eq(:heartbeat)
83
+ expect(envelope.status[:category]).to eq(:ack)
84
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
85
+ end
86
+ end
612
87
 
88
+ it "__channel___demo___channel_group___demo___http_sync__false___callback___lambda_" do
89
+ VCR.use_cassette("examples/heartbeat/25", record: :none) do
90
+ envelope = @pubnub.heartbeat(channel: :demo, channel_group: :demo, http_sync: false, callback: @callback)
91
+ envelope = envelope.value
92
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
93
+ expect(envelope.error?).to eq false
94
+
95
+ expect(envelope.status[:code]).to eq(200)
96
+ expect(envelope.status[:operation]).to eq(:heartbeat)
97
+ expect(envelope.status[:category]).to eq(:ack)
98
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
99
+ end
100
+ end
613
101
 
614
- end
615
- end
102
+ it "__channel___demo___channel_group___demo____http_sync__true___callback__nil_" do
103
+ VCR.use_cassette("examples/heartbeat/23", record: :none) do
104
+ envelope = @pubnub.heartbeat(channel: :demo, channel_group: "demo", http_sync: true)
105
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
106
+ expect(envelope.error?).to eq false
616
107
 
108
+ expect(envelope.status[:code]).to eq(200)
109
+ expect(envelope.status[:operation]).to eq(:heartbeat)
110
+ expect(envelope.status[:category]).to eq(:ack)
111
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
112
+ end
113
+ end
617
114
 
618
- it '__channel__nil___channel_group___demo___http_sync__true___callback__nil_' do
619
- VCR.use_cassette('examples/heartbeat/47', record: :none) do
620
- envelope = @pubnub.heartbeat(channel_group: :demo, http_sync: true)
621
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
622
- expect(envelope.error?).to eq false
115
+ it "__channel___demo___channel_group___demo____http_sync__true___callback___block_" do
116
+ VCR.use_cassette("examples/heartbeat/21", record: :none) do
117
+ envelope = @pubnub.heartbeat(channel: :demo, channel_group: "demo", http_sync: true, &@callback)
118
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
119
+ expect(envelope.error?).to eq false
623
120
 
624
- expect(envelope.status[:code]).to eq(200)
625
- expect(envelope.status[:operation]).to eq(:heartbeat)
626
- expect(envelope.status[:category]).to eq(:ack)
627
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
121
+ expect(envelope.status[:code]).to eq(200)
122
+ expect(envelope.status[:operation]).to eq(:heartbeat)
123
+ expect(envelope.status[:category]).to eq(:ack)
124
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
125
+ end
126
+ end
628
127
 
128
+ it "__channel___demo___channel_group___demo____http_sync__true___callback___lambda_" do
129
+ VCR.use_cassette("examples/heartbeat/22", record: :none) do
130
+ envelope = @pubnub.heartbeat(channel: :demo, channel_group: "demo", http_sync: true, callback: @callback)
131
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
132
+ expect(envelope.error?).to eq false
629
133
 
630
- end
631
- end
134
+ expect(envelope.status[:code]).to eq(200)
135
+ expect(envelope.status[:operation]).to eq(:heartbeat)
136
+ expect(envelope.status[:category]).to eq(:ack)
137
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
138
+ end
139
+ end
632
140
 
141
+ it "__channel___demo___channel_group___demo____http_sync__false___callback__nil_" do
142
+ VCR.use_cassette("examples/heartbeat/20", record: :none) do
143
+ envelope = @pubnub.heartbeat(channel: :demo, channel_group: "demo", http_sync: false)
144
+ envelope = envelope.value
145
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
146
+ expect(envelope.error?).to eq false
147
+
148
+ expect(envelope.status[:code]).to eq(200)
149
+ expect(envelope.status[:operation]).to eq(:heartbeat)
150
+ expect(envelope.status[:category]).to eq(:ack)
151
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
152
+ end
153
+ end
633
154
 
634
- it '__channel__nil___channel_group___demo___http_sync__true___callback___block_' do
635
- VCR.use_cassette('examples/heartbeat/45', record: :none) do
636
- envelope = @pubnub.heartbeat(channel_group: :demo, http_sync: true, &@callback)
637
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
638
- expect(envelope.error?).to eq false
155
+ it "__channel___demo___channel_group___demo____http_sync__false___callback___block_" do
156
+ VCR.use_cassette("examples/heartbeat/18", record: :none) do
157
+ envelope = @pubnub.heartbeat(channel: :demo, channel_group: "demo", http_sync: false, &@callback)
158
+ envelope = envelope.value
159
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
160
+ expect(envelope.error?).to eq false
161
+
162
+ expect(envelope.status[:code]).to eq(200)
163
+ expect(envelope.status[:operation]).to eq(:heartbeat)
164
+ expect(envelope.status[:category]).to eq(:ack)
165
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
166
+ end
167
+ end
639
168
 
640
- expect(envelope.status[:code]).to eq(200)
641
- expect(envelope.status[:operation]).to eq(:heartbeat)
642
- expect(envelope.status[:category]).to eq(:ack)
643
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
169
+ it "__channel___demo___channel_group___demo____http_sync__false___callback___lambda_" do
170
+ VCR.use_cassette("examples/heartbeat/19", record: :none) do
171
+ envelope = @pubnub.heartbeat(channel: :demo, channel_group: "demo", http_sync: false, callback: @callback)
172
+ envelope = envelope.value
173
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
174
+ expect(envelope.error?).to eq false
175
+
176
+ expect(envelope.status[:code]).to eq(200)
177
+ expect(envelope.status[:operation]).to eq(:heartbeat)
178
+ expect(envelope.status[:category]).to eq(:ack)
179
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
180
+ end
181
+ end
644
182
 
183
+ it "__channel___demo___channel_group__nil___http_sync__true___callback__nil_" do
184
+ VCR.use_cassette("examples/heartbeat/35", record: :none) do
185
+ envelope = @pubnub.heartbeat(channel: :demo, http_sync: true)
186
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
187
+ expect(envelope.error?).to eq false
645
188
 
646
- end
647
- end
189
+ expect(envelope.status[:code]).to eq(200)
190
+ expect(envelope.status[:operation]).to eq(:heartbeat)
191
+ expect(envelope.status[:category]).to eq(:ack)
192
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
193
+ end
194
+ end
648
195
 
196
+ it "__channel___demo___channel_group__nil___http_sync__true___callback___block_" do
197
+ VCR.use_cassette("examples/heartbeat/33", record: :none) do
198
+ envelope = @pubnub.heartbeat(channel: :demo, http_sync: true, &@callback)
199
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
200
+ expect(envelope.error?).to eq false
649
201
 
650
- it '__channel__nil___channel_group___demo___http_sync__true___callback___lambda_' do
651
- VCR.use_cassette('examples/heartbeat/46', record: :none) do
652
- envelope = @pubnub.heartbeat(channel_group: :demo, http_sync: true, callback: @callback)
653
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
654
- expect(envelope.error?).to eq false
202
+ expect(envelope.status[:code]).to eq(200)
203
+ expect(envelope.status[:operation]).to eq(:heartbeat)
204
+ expect(envelope.status[:category]).to eq(:ack)
205
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
206
+ end
207
+ end
655
208
 
656
- expect(envelope.status[:code]).to eq(200)
657
- expect(envelope.status[:operation]).to eq(:heartbeat)
658
- expect(envelope.status[:category]).to eq(:ack)
659
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
209
+ it "__channel___demo___channel_group__nil___http_sync__true___callback___lambda_" do
210
+ VCR.use_cassette("examples/heartbeat/34", record: :none) do
211
+ envelope = @pubnub.heartbeat(channel: :demo, http_sync: true, callback: @callback)
212
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
213
+ expect(envelope.error?).to eq false
660
214
 
215
+ expect(envelope.status[:code]).to eq(200)
216
+ expect(envelope.status[:operation]).to eq(:heartbeat)
217
+ expect(envelope.status[:category]).to eq(:ack)
218
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
219
+ end
220
+ end
661
221
 
662
- end
663
- end
222
+ it "__channel___demo___channel_group__nil___http_sync__false___callback__nil_" do
223
+ VCR.use_cassette("examples/heartbeat/32", record: :none) do
224
+ envelope = @pubnub.heartbeat(channel: :demo, http_sync: false)
225
+ envelope = envelope.value
226
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
227
+ expect(envelope.error?).to eq false
228
+
229
+ expect(envelope.status[:code]).to eq(200)
230
+ expect(envelope.status[:operation]).to eq(:heartbeat)
231
+ expect(envelope.status[:category]).to eq(:ack)
232
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
233
+ end
234
+ end
664
235
 
236
+ it "__channel___demo___channel_group__nil___http_sync__false___callback___block_" do
237
+ VCR.use_cassette("examples/heartbeat/30", record: :none) do
238
+ envelope = @pubnub.heartbeat(channel: :demo, http_sync: false, &@callback)
239
+ envelope = envelope.value
240
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
241
+ expect(envelope.error?).to eq false
242
+
243
+ expect(envelope.status[:code]).to eq(200)
244
+ expect(envelope.status[:operation]).to eq(:heartbeat)
245
+ expect(envelope.status[:category]).to eq(:ack)
246
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
247
+ end
248
+ end
665
249
 
666
- it '__channel__nil___channel_group___demo___http_sync__false___callback__nil_' do
667
- VCR.use_cassette('examples/heartbeat/44', record: :none) do
668
- envelope = @pubnub.heartbeat(channel_group: :demo, http_sync: false)
669
- envelope = envelope.value
670
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
671
- expect(envelope.error?).to eq false
250
+ it "__channel___demo___channel_group__nil___http_sync__false___callback___lambda_" do
251
+ VCR.use_cassette("examples/heartbeat/31", record: :none) do
252
+ envelope = @pubnub.heartbeat(channel: :demo, http_sync: false, callback: @callback)
253
+ envelope = envelope.value
254
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
255
+ expect(envelope.error?).to eq false
256
+
257
+ expect(envelope.status[:code]).to eq(200)
258
+ expect(envelope.status[:operation]).to eq(:heartbeat)
259
+ expect(envelope.status[:category]).to eq(:ack)
260
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
261
+ end
262
+ end
672
263
 
673
- expect(envelope.status[:code]).to eq(200)
674
- expect(envelope.status[:operation]).to eq(:heartbeat)
675
- expect(envelope.status[:category]).to eq(:ack)
676
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
264
+ it "__channel___demo____channel_group___demo___http_sync__true___callback__nil_" do
265
+ VCR.use_cassette("examples/heartbeat/11", record: :none) do
266
+ envelope = @pubnub.heartbeat(channel: "demo", channel_group: :demo, http_sync: true)
267
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
268
+ expect(envelope.error?).to eq false
677
269
 
270
+ expect(envelope.status[:code]).to eq(200)
271
+ expect(envelope.status[:operation]).to eq(:heartbeat)
272
+ expect(envelope.status[:category]).to eq(:ack)
273
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
274
+ end
275
+ end
678
276
 
679
- end
680
- end
277
+ it "__channel___demo____channel_group___demo___http_sync__true___callback___block_" do
278
+ VCR.use_cassette("examples/heartbeat/9", record: :none) do
279
+ envelope = @pubnub.heartbeat(channel: "demo", channel_group: :demo, http_sync: true, &@callback)
280
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
281
+ expect(envelope.error?).to eq false
681
282
 
283
+ expect(envelope.status[:code]).to eq(200)
284
+ expect(envelope.status[:operation]).to eq(:heartbeat)
285
+ expect(envelope.status[:category]).to eq(:ack)
286
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
287
+ end
288
+ end
682
289
 
683
- it '__channel__nil___channel_group___demo___http_sync__false___callback___block_' do
684
- VCR.use_cassette('examples/heartbeat/42', record: :none) do
685
- envelope = @pubnub.heartbeat(channel_group: :demo, http_sync: false, &@callback)
686
- envelope = envelope.value
687
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
688
- expect(envelope.error?).to eq false
290
+ it "__channel___demo____channel_group___demo___http_sync__true___callback___lambda_" do
291
+ VCR.use_cassette("examples/heartbeat/10", record: :none) do
292
+ envelope = @pubnub.heartbeat(channel: "demo", channel_group: :demo, http_sync: true, callback: @callback)
293
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
294
+ expect(envelope.error?).to eq false
689
295
 
690
- expect(envelope.status[:code]).to eq(200)
691
- expect(envelope.status[:operation]).to eq(:heartbeat)
692
- expect(envelope.status[:category]).to eq(:ack)
693
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
296
+ expect(envelope.status[:code]).to eq(200)
297
+ expect(envelope.status[:operation]).to eq(:heartbeat)
298
+ expect(envelope.status[:category]).to eq(:ack)
299
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
300
+ end
301
+ end
694
302
 
303
+ it "__channel___demo____channel_group___demo___http_sync__false___callback__nil_" do
304
+ VCR.use_cassette("examples/heartbeat/8", record: :none) do
305
+ envelope = @pubnub.heartbeat(channel: "demo", channel_group: :demo, http_sync: false)
306
+ envelope = envelope.value
307
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
308
+ expect(envelope.error?).to eq false
309
+
310
+ expect(envelope.status[:code]).to eq(200)
311
+ expect(envelope.status[:operation]).to eq(:heartbeat)
312
+ expect(envelope.status[:category]).to eq(:ack)
313
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
314
+ end
315
+ end
695
316
 
696
- end
697
- end
317
+ it "__channel___demo____channel_group___demo___http_sync__false___callback___block_" do
318
+ VCR.use_cassette("examples/heartbeat/6", record: :none) do
319
+ envelope = @pubnub.heartbeat(channel: "demo", channel_group: :demo, http_sync: false, &@callback)
320
+ envelope = envelope.value
321
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
322
+ expect(envelope.error?).to eq false
323
+
324
+ expect(envelope.status[:code]).to eq(200)
325
+ expect(envelope.status[:operation]).to eq(:heartbeat)
326
+ expect(envelope.status[:category]).to eq(:ack)
327
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
328
+ end
329
+ end
698
330
 
331
+ it "__channel___demo____channel_group___demo___http_sync__false___callback___lambda_" do
332
+ VCR.use_cassette("examples/heartbeat/7", record: :none) do
333
+ envelope = @pubnub.heartbeat(channel: "demo", channel_group: :demo, http_sync: false, callback: @callback)
334
+ envelope = envelope.value
335
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
336
+ expect(envelope.error?).to eq false
337
+
338
+ expect(envelope.status[:code]).to eq(200)
339
+ expect(envelope.status[:operation]).to eq(:heartbeat)
340
+ expect(envelope.status[:category]).to eq(:ack)
341
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
342
+ end
343
+ end
699
344
 
700
- it '__channel__nil___channel_group___demo___http_sync__false___callback___lambda_' do
701
- VCR.use_cassette('examples/heartbeat/43', record: :none) do
702
- envelope = @pubnub.heartbeat(channel_group: :demo, http_sync: false, callback: @callback)
703
- envelope = envelope.value
704
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
705
- expect(envelope.error?).to eq false
345
+ it "__channel___demo____channel_group___demo____http_sync__true___callback__nil_" do
346
+ VCR.use_cassette("examples/heartbeat/5", record: :none) do
347
+ envelope = @pubnub.heartbeat(channel: "demo", channel_group: "demo", http_sync: true)
348
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
349
+ expect(envelope.error?).to eq false
706
350
 
707
- expect(envelope.status[:code]).to eq(200)
708
- expect(envelope.status[:operation]).to eq(:heartbeat)
709
- expect(envelope.status[:category]).to eq(:ack)
710
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
351
+ expect(envelope.status[:code]).to eq(200)
352
+ expect(envelope.status[:operation]).to eq(:heartbeat)
353
+ expect(envelope.status[:category]).to eq(:ack)
354
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
355
+ end
356
+ end
711
357
 
358
+ it "__channel___demo____channel_group___demo____http_sync__true___callback___block_" do
359
+ VCR.use_cassette("examples/heartbeat/3", record: :none) do
360
+ envelope = @pubnub.heartbeat(channel: "demo", channel_group: "demo", http_sync: true, &@callback)
361
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
362
+ expect(envelope.error?).to eq false
712
363
 
713
- end
714
- end
364
+ expect(envelope.status[:code]).to eq(200)
365
+ expect(envelope.status[:operation]).to eq(:heartbeat)
366
+ expect(envelope.status[:category]).to eq(:ack)
367
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
368
+ end
369
+ end
715
370
 
371
+ it "__channel___demo____channel_group___demo____http_sync__true___callback___lambda_" do
372
+ VCR.use_cassette("examples/heartbeat/4", record: :none) do
373
+ envelope = @pubnub.heartbeat(channel: "demo", channel_group: "demo", http_sync: true, callback: @callback)
374
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
375
+ expect(envelope.error?).to eq false
716
376
 
717
- it '__channel__nil___channel_group___demo____http_sync__true___callback__nil_' do
718
- VCR.use_cassette('examples/heartbeat/41', record: :none) do
719
- envelope = @pubnub.heartbeat(channel_group: 'demo', http_sync: true)
720
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
721
- expect(envelope.error?).to eq false
377
+ expect(envelope.status[:code]).to eq(200)
378
+ expect(envelope.status[:operation]).to eq(:heartbeat)
379
+ expect(envelope.status[:category]).to eq(:ack)
380
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
381
+ end
382
+ end
722
383
 
723
- expect(envelope.status[:code]).to eq(200)
724
- expect(envelope.status[:operation]).to eq(:heartbeat)
725
- expect(envelope.status[:category]).to eq(:ack)
726
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
384
+ it "__channel___demo____channel_group___demo____http_sync__false___callback__nil_" do
385
+ VCR.use_cassette("examples/heartbeat/2", record: :none) do
386
+ envelope = @pubnub.heartbeat(channel: "demo", channel_group: "demo", http_sync: false)
387
+ envelope = envelope.value
388
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
389
+ expect(envelope.error?).to eq false
390
+
391
+ expect(envelope.status[:code]).to eq(200)
392
+ expect(envelope.status[:operation]).to eq(:heartbeat)
393
+ expect(envelope.status[:category]).to eq(:ack)
394
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
395
+ end
396
+ end
727
397
 
398
+ it "__channel___demo____channel_group___demo____http_sync__false___callback___block_" do
399
+ VCR.use_cassette("examples/heartbeat/0", record: :none) do
400
+ envelope = @pubnub.heartbeat(channel: "demo", channel_group: "demo", http_sync: false, &@callback)
401
+ envelope = envelope.value
402
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
403
+ expect(envelope.error?).to eq false
404
+
405
+ expect(envelope.status[:code]).to eq(200)
406
+ expect(envelope.status[:operation]).to eq(:heartbeat)
407
+ expect(envelope.status[:category]).to eq(:ack)
408
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
409
+ end
410
+ end
728
411
 
729
- end
730
- end
412
+ it "__channel___demo____channel_group___demo____http_sync__false___callback___lambda_" do
413
+ VCR.use_cassette("examples/heartbeat/1", record: :none) do
414
+ envelope = @pubnub.heartbeat(channel: "demo", channel_group: "demo", http_sync: false, callback: @callback)
415
+ envelope = envelope.value
416
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
417
+ expect(envelope.error?).to eq false
418
+
419
+ expect(envelope.status[:code]).to eq(200)
420
+ expect(envelope.status[:operation]).to eq(:heartbeat)
421
+ expect(envelope.status[:category]).to eq(:ack)
422
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
423
+ end
424
+ end
731
425
 
426
+ it "__channel___demo____channel_group__nil___http_sync__true___callback__nil_" do
427
+ VCR.use_cassette("examples/heartbeat/17", record: :none) do
428
+ envelope = @pubnub.heartbeat(channel: "demo", http_sync: true)
429
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
430
+ expect(envelope.error?).to eq false
732
431
 
733
- it '__channel__nil___channel_group___demo____http_sync__true___callback___block_' do
734
- VCR.use_cassette('examples/heartbeat/39', record: :none) do
735
- envelope = @pubnub.heartbeat(channel_group: 'demo', http_sync: true, &@callback)
736
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
737
- expect(envelope.error?).to eq false
432
+ expect(envelope.status[:code]).to eq(200)
433
+ expect(envelope.status[:operation]).to eq(:heartbeat)
434
+ expect(envelope.status[:category]).to eq(:ack)
435
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
436
+ end
437
+ end
738
438
 
739
- expect(envelope.status[:code]).to eq(200)
740
- expect(envelope.status[:operation]).to eq(:heartbeat)
741
- expect(envelope.status[:category]).to eq(:ack)
742
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
439
+ it "__channel___demo____channel_group__nil___http_sync__true___callback___block_" do
440
+ VCR.use_cassette("examples/heartbeat/15", record: :none) do
441
+ envelope = @pubnub.heartbeat(channel: "demo", http_sync: true, &@callback)
442
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
443
+ expect(envelope.error?).to eq false
743
444
 
445
+ expect(envelope.status[:code]).to eq(200)
446
+ expect(envelope.status[:operation]).to eq(:heartbeat)
447
+ expect(envelope.status[:category]).to eq(:ack)
448
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
449
+ end
450
+ end
744
451
 
745
- end
746
- end
452
+ it "__channel___demo____channel_group__nil___http_sync__true___callback___lambda_" do
453
+ VCR.use_cassette("examples/heartbeat/16", record: :none) do
454
+ envelope = @pubnub.heartbeat(channel: "demo", http_sync: true, callback: @callback)
455
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
456
+ expect(envelope.error?).to eq false
747
457
 
458
+ expect(envelope.status[:code]).to eq(200)
459
+ expect(envelope.status[:operation]).to eq(:heartbeat)
460
+ expect(envelope.status[:category]).to eq(:ack)
461
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
462
+ end
463
+ end
748
464
 
749
- it '__channel__nil___channel_group___demo____http_sync__true___callback___lambda_' do
750
- VCR.use_cassette('examples/heartbeat/40', record: :none) do
751
- envelope = @pubnub.heartbeat(channel_group: 'demo', http_sync: true, callback: @callback)
752
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
753
- expect(envelope.error?).to eq false
465
+ it "__channel___demo____channel_group__nil___http_sync__false___callback__nil_" do
466
+ VCR.use_cassette("examples/heartbeat/14", record: :none) do
467
+ envelope = @pubnub.heartbeat(channel: "demo", http_sync: false)
468
+ envelope = envelope.value
469
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
470
+ expect(envelope.error?).to eq false
471
+
472
+ expect(envelope.status[:code]).to eq(200)
473
+ expect(envelope.status[:operation]).to eq(:heartbeat)
474
+ expect(envelope.status[:category]).to eq(:ack)
475
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
476
+ end
477
+ end
754
478
 
755
- expect(envelope.status[:code]).to eq(200)
756
- expect(envelope.status[:operation]).to eq(:heartbeat)
757
- expect(envelope.status[:category]).to eq(:ack)
758
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
479
+ it "__channel___demo____channel_group__nil___http_sync__false___callback___block_" do
480
+ VCR.use_cassette("examples/heartbeat/12", record: :none) do
481
+ envelope = @pubnub.heartbeat(channel: "demo", http_sync: false, &@callback)
482
+ envelope = envelope.value
483
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
484
+ expect(envelope.error?).to eq false
485
+
486
+ expect(envelope.status[:code]).to eq(200)
487
+ expect(envelope.status[:operation]).to eq(:heartbeat)
488
+ expect(envelope.status[:category]).to eq(:ack)
489
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
490
+ end
491
+ end
759
492
 
493
+ it "__channel___demo____channel_group__nil___http_sync__false___callback___lambda_" do
494
+ VCR.use_cassette("examples/heartbeat/13", record: :none) do
495
+ envelope = @pubnub.heartbeat(channel: "demo", http_sync: false, callback: @callback)
496
+ envelope = envelope.value
497
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
498
+ expect(envelope.error?).to eq false
499
+
500
+ expect(envelope.status[:code]).to eq(200)
501
+ expect(envelope.status[:operation]).to eq(:heartbeat)
502
+ expect(envelope.status[:category]).to eq(:ack)
503
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
504
+ end
505
+ end
760
506
 
761
- end
762
- end
507
+ it "__channel__nil___channel_group___demo___http_sync__true___callback__nil_" do
508
+ VCR.use_cassette("examples/heartbeat/47", record: :none) do
509
+ envelope = @pubnub.heartbeat(channel_group: :demo, http_sync: true)
510
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
511
+ expect(envelope.error?).to eq false
763
512
 
513
+ expect(envelope.status[:code]).to eq(200)
514
+ expect(envelope.status[:operation]).to eq(:heartbeat)
515
+ expect(envelope.status[:category]).to eq(:ack)
516
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
517
+ end
518
+ end
764
519
 
765
- it '__channel__nil___channel_group___demo____http_sync__false___callback__nil_' do
766
- VCR.use_cassette('examples/heartbeat/38', record: :none) do
767
- envelope = @pubnub.heartbeat(channel_group: 'demo', http_sync: false)
768
- envelope = envelope.value
769
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
770
- expect(envelope.error?).to eq false
520
+ it "__channel__nil___channel_group___demo___http_sync__true___callback___block_" do
521
+ VCR.use_cassette("examples/heartbeat/45", record: :none) do
522
+ envelope = @pubnub.heartbeat(channel_group: :demo, http_sync: true, &@callback)
523
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
524
+ expect(envelope.error?).to eq false
771
525
 
772
- expect(envelope.status[:code]).to eq(200)
773
- expect(envelope.status[:operation]).to eq(:heartbeat)
774
- expect(envelope.status[:category]).to eq(:ack)
775
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
526
+ expect(envelope.status[:code]).to eq(200)
527
+ expect(envelope.status[:operation]).to eq(:heartbeat)
528
+ expect(envelope.status[:category]).to eq(:ack)
529
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
530
+ end
531
+ end
776
532
 
533
+ it "__channel__nil___channel_group___demo___http_sync__true___callback___lambda_" do
534
+ VCR.use_cassette("examples/heartbeat/46", record: :none) do
535
+ envelope = @pubnub.heartbeat(channel_group: :demo, http_sync: true, callback: @callback)
536
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
537
+ expect(envelope.error?).to eq false
777
538
 
778
- end
779
- end
539
+ expect(envelope.status[:code]).to eq(200)
540
+ expect(envelope.status[:operation]).to eq(:heartbeat)
541
+ expect(envelope.status[:category]).to eq(:ack)
542
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
543
+ end
544
+ end
780
545
 
546
+ it "__channel__nil___channel_group___demo___http_sync__false___callback__nil_" do
547
+ VCR.use_cassette("examples/heartbeat/44", record: :none) do
548
+ envelope = @pubnub.heartbeat(channel_group: :demo, http_sync: false)
549
+ envelope = envelope.value
550
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
551
+ expect(envelope.error?).to eq false
552
+
553
+ expect(envelope.status[:code]).to eq(200)
554
+ expect(envelope.status[:operation]).to eq(:heartbeat)
555
+ expect(envelope.status[:category]).to eq(:ack)
556
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
557
+ end
558
+ end
781
559
 
782
- it '__channel__nil___channel_group___demo____http_sync__false___callback___block_' do
783
- VCR.use_cassette('examples/heartbeat/36', record: :none) do
784
- envelope = @pubnub.heartbeat(channel_group: 'demo', http_sync: false, &@callback)
785
- envelope = envelope.value
786
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
787
- expect(envelope.error?).to eq false
560
+ it "__channel__nil___channel_group___demo___http_sync__false___callback___block_" do
561
+ VCR.use_cassette("examples/heartbeat/42", record: :none) do
562
+ envelope = @pubnub.heartbeat(channel_group: :demo, http_sync: false, &@callback)
563
+ envelope = envelope.value
564
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
565
+ expect(envelope.error?).to eq false
566
+
567
+ expect(envelope.status[:code]).to eq(200)
568
+ expect(envelope.status[:operation]).to eq(:heartbeat)
569
+ expect(envelope.status[:category]).to eq(:ack)
570
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
571
+ end
572
+ end
788
573
 
789
- expect(envelope.status[:code]).to eq(200)
790
- expect(envelope.status[:operation]).to eq(:heartbeat)
791
- expect(envelope.status[:category]).to eq(:ack)
792
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
574
+ it "__channel__nil___channel_group___demo___http_sync__false___callback___lambda_" do
575
+ VCR.use_cassette("examples/heartbeat/43", record: :none) do
576
+ envelope = @pubnub.heartbeat(channel_group: :demo, http_sync: false, callback: @callback)
577
+ envelope = envelope.value
578
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
579
+ expect(envelope.error?).to eq false
580
+
581
+ expect(envelope.status[:code]).to eq(200)
582
+ expect(envelope.status[:operation]).to eq(:heartbeat)
583
+ expect(envelope.status[:category]).to eq(:ack)
584
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
585
+ end
586
+ end
793
587
 
588
+ it "__channel__nil___channel_group___demo____http_sync__true___callback__nil_" do
589
+ VCR.use_cassette("examples/heartbeat/41", record: :none) do
590
+ envelope = @pubnub.heartbeat(channel_group: "demo", http_sync: true)
591
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
592
+ expect(envelope.error?).to eq false
794
593
 
795
- end
796
- end
594
+ expect(envelope.status[:code]).to eq(200)
595
+ expect(envelope.status[:operation]).to eq(:heartbeat)
596
+ expect(envelope.status[:category]).to eq(:ack)
597
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
598
+ end
599
+ end
797
600
 
601
+ it "__channel__nil___channel_group___demo____http_sync__true___callback___block_" do
602
+ VCR.use_cassette("examples/heartbeat/39", record: :none) do
603
+ envelope = @pubnub.heartbeat(channel_group: "demo", http_sync: true, &@callback)
604
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
605
+ expect(envelope.error?).to eq false
798
606
 
799
- it '__channel__nil___channel_group___demo____http_sync__false___callback___lambda_' do
800
- VCR.use_cassette('examples/heartbeat/37', record: :none) do
801
- envelope = @pubnub.heartbeat(channel_group: 'demo', http_sync: false, callback: @callback)
802
- envelope = envelope.value
803
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
804
- expect(envelope.error?).to eq false
607
+ expect(envelope.status[:code]).to eq(200)
608
+ expect(envelope.status[:operation]).to eq(:heartbeat)
609
+ expect(envelope.status[:category]).to eq(:ack)
610
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
611
+ end
612
+ end
805
613
 
806
- expect(envelope.status[:code]).to eq(200)
807
- expect(envelope.status[:operation]).to eq(:heartbeat)
808
- expect(envelope.status[:category]).to eq(:ack)
809
- expect(envelope.status[:config]).to eq({:tls=>false, :uuid=>"ruby-test-uuid-client-one", :auth_key=>"ruby-test-auth-client-one", :origin=>"ps.pndsn.com"})
614
+ it "__channel__nil___channel_group___demo____http_sync__true___callback___lambda_" do
615
+ VCR.use_cassette("examples/heartbeat/40", record: :none) do
616
+ envelope = @pubnub.heartbeat(channel_group: "demo", http_sync: true, callback: @callback)
617
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
618
+ expect(envelope.error?).to eq false
810
619
 
620
+ expect(envelope.status[:code]).to eq(200)
621
+ expect(envelope.status[:operation]).to eq(:heartbeat)
622
+ expect(envelope.status[:category]).to eq(:ack)
623
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
624
+ end
625
+ end
811
626
 
812
- end
813
- end
627
+ it "__channel__nil___channel_group___demo____http_sync__false___callback__nil_" do
628
+ VCR.use_cassette("examples/heartbeat/38", record: :none) do
629
+ envelope = @pubnub.heartbeat(channel_group: "demo", http_sync: false)
630
+ envelope = envelope.value
631
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
632
+ expect(envelope.error?).to eq false
633
+
634
+ expect(envelope.status[:code]).to eq(200)
635
+ expect(envelope.status[:operation]).to eq(:heartbeat)
636
+ expect(envelope.status[:category]).to eq(:ack)
637
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
638
+ end
639
+ end
814
640
 
641
+ it "__channel__nil___channel_group___demo____http_sync__false___callback___block_" do
642
+ VCR.use_cassette("examples/heartbeat/36", record: :none) do
643
+ envelope = @pubnub.heartbeat(channel_group: "demo", http_sync: false, &@callback)
644
+ envelope = envelope.value
645
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
646
+ expect(envelope.error?).to eq false
647
+
648
+ expect(envelope.status[:code]).to eq(200)
649
+ expect(envelope.status[:operation]).to eq(:heartbeat)
650
+ expect(envelope.status[:category]).to eq(:ack)
651
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
652
+ end
653
+ end
815
654
 
655
+ it "__channel__nil___channel_group___demo____http_sync__false___callback___lambda_" do
656
+ VCR.use_cassette("examples/heartbeat/37", record: :none) do
657
+ envelope = @pubnub.heartbeat(channel_group: "demo", http_sync: false, callback: @callback)
658
+ envelope = envelope.value
659
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
660
+ expect(envelope.error?).to eq false
661
+
662
+ expect(envelope.status[:code]).to eq(200)
663
+ expect(envelope.status[:operation]).to eq(:heartbeat)
664
+ expect(envelope.status[:category]).to eq(:ack)
665
+ expect(envelope.status[:config]).to eq({:tls => false, :uuid => "ruby-test-uuid-client-one", :auth_key => "ruby-test-auth-client-one", :origin => "ps.pndsn.com"})
666
+ end
667
+ end
816
668
  end