pubnub 4.0.27 → 4.0.28

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 (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,690 +1,614 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe Pubnub::HereNow 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___group___demo___http_sync__true___callback__nil_' do
25
- VCR.use_cassette('examples/here_now/29', record: :none) do
26
- envelope = @pubnub.here_now(channel: :demo, 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[:category]).to eq(:ack)
32
- 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"})
33
-
34
- expect(envelope.result[:code]).to eq(200)
35
- expect(envelope.result[:operation]).to eq(:here_now)
36
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
37
-
38
- end
39
- end
40
-
41
-
42
- it '__channel___demo___group___demo___http_sync__true___callback___block_' do
43
- VCR.use_cassette('examples/here_now/27', record: :none) do
44
- envelope = @pubnub.here_now(channel: :demo, group: :demo, http_sync: true, &@callback)
45
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
46
- expect(envelope.error?).to eq false
47
-
48
- expect(envelope.status[:code]).to eq(200)
49
- expect(envelope.status[:category]).to eq(:ack)
50
- 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"})
51
-
52
- expect(envelope.result[:code]).to eq(200)
53
- expect(envelope.result[:operation]).to eq(:here_now)
54
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
55
-
56
- end
57
- end
58
-
59
-
60
- it '__channel___demo___group___demo___http_sync__true___callback___lambda_' do
61
- VCR.use_cassette('examples/here_now/28', record: :none) do
62
- envelope = @pubnub.here_now(channel: :demo, group: :demo, http_sync: true, callback: @callback)
63
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
64
- expect(envelope.error?).to eq false
65
-
66
- expect(envelope.status[:code]).to eq(200)
67
- expect(envelope.status[:category]).to eq(:ack)
68
- 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"})
69
-
70
- expect(envelope.result[:code]).to eq(200)
71
- expect(envelope.result[:operation]).to eq(:here_now)
72
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
73
-
74
- end
75
- end
76
-
77
-
78
- it '__channel___demo___group___demo___http_sync__false___callback__nil_' do
79
- VCR.use_cassette('examples/here_now/26', record: :none) do
80
- envelope = @pubnub.here_now(channel: :demo, group: :demo, http_sync: false)
81
- envelope = envelope.value
82
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
83
- expect(envelope.error?).to eq false
84
-
85
- expect(envelope.status[:code]).to eq(200)
86
- expect(envelope.status[:category]).to eq(:ack)
87
- 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"})
88
-
89
- expect(envelope.result[:code]).to eq(200)
90
- expect(envelope.result[:operation]).to eq(:here_now)
91
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
92
-
93
- end
94
- end
95
-
96
-
97
- it '__channel___demo___group___demo___http_sync__false___callback___block_' do
98
- VCR.use_cassette('examples/here_now/24', record: :none) do
99
- envelope = @pubnub.here_now(channel: :demo, group: :demo, http_sync: false, &@callback)
100
- envelope = envelope.value
101
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
102
- expect(envelope.error?).to eq false
103
-
104
- expect(envelope.status[:code]).to eq(200)
105
- expect(envelope.status[:category]).to eq(:ack)
106
- 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"})
107
-
108
- expect(envelope.result[:code]).to eq(200)
109
- expect(envelope.result[:operation]).to eq(:here_now)
110
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
111
-
112
- end
113
- end
114
-
115
-
116
- it '__channel___demo___group___demo___http_sync__false___callback___lambda_' do
117
- VCR.use_cassette('examples/here_now/25', record: :none) do
118
- envelope = @pubnub.here_now(channel: :demo, group: :demo, http_sync: false, callback: @callback)
119
- envelope = envelope.value
120
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
121
- expect(envelope.error?).to eq false
122
-
123
- expect(envelope.status[:code]).to eq(200)
124
- expect(envelope.status[:category]).to eq(:ack)
125
- 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"})
126
-
127
- expect(envelope.result[:code]).to eq(200)
128
- expect(envelope.result[:operation]).to eq(:here_now)
129
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
130
-
131
- end
132
- end
133
-
134
-
135
- it '__channel___demo___group___demo____http_sync__true___callback__nil_' do
136
- VCR.use_cassette('examples/here_now/23', record: :none) do
137
- envelope = @pubnub.here_now(channel: :demo, group: 'demo', http_sync: true)
138
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
139
- expect(envelope.error?).to eq false
140
-
141
- expect(envelope.status[:code]).to eq(200)
142
- expect(envelope.status[:category]).to eq(:ack)
143
- 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"})
144
-
145
- expect(envelope.result[:code]).to eq(200)
146
- expect(envelope.result[:operation]).to eq(:here_now)
147
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
148
-
149
- end
150
- end
151
-
152
-
153
- it '__channel___demo___group___demo____http_sync__true___callback___block_' do
154
- VCR.use_cassette('examples/here_now/21', record: :none) do
155
- envelope = @pubnub.here_now(channel: :demo, group: 'demo', http_sync: true, &@callback)
156
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
157
- expect(envelope.error?).to eq false
158
-
159
- expect(envelope.status[:code]).to eq(200)
160
- expect(envelope.status[:category]).to eq(:ack)
161
- 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"})
162
-
163
- expect(envelope.result[:code]).to eq(200)
164
- expect(envelope.result[:operation]).to eq(:here_now)
165
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
166
-
167
- end
168
- end
21
+ it "__channel___demo___group___demo___http_sync__true___callback__nil_" do
22
+ VCR.use_cassette("examples/here_now/29", record: :none) do
23
+ envelope = @pubnub.here_now(channel: :demo, group: :demo, http_sync: true)
24
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
25
+ expect(envelope.error?).to eq false
169
26
 
27
+ expect(envelope.status[:code]).to eq(200)
28
+ expect(envelope.status[:category]).to eq(:ack)
29
+ 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"})
170
30
 
171
- it '__channel___demo___group___demo____http_sync__true___callback___lambda_' do
172
- VCR.use_cassette('examples/here_now/22', record: :none) do
173
- envelope = @pubnub.here_now(channel: :demo, group: 'demo', http_sync: true, callback: @callback)
174
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
175
- expect(envelope.error?).to eq false
176
-
177
- expect(envelope.status[:code]).to eq(200)
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
-
181
- expect(envelope.result[:code]).to eq(200)
182
- expect(envelope.result[:operation]).to eq(:here_now)
183
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
184
-
185
- end
186
- end
187
-
188
-
189
- it '__channel___demo___group___demo____http_sync__false___callback__nil_' do
190
- VCR.use_cassette('examples/here_now/20', record: :none) do
191
- envelope = @pubnub.here_now(channel: :demo, group: 'demo', http_sync: false)
192
- envelope = envelope.value
193
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
194
- expect(envelope.error?).to eq false
195
-
196
- expect(envelope.status[:code]).to eq(200)
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
- expect(envelope.result[:code]).to eq(200)
201
- expect(envelope.result[:operation]).to eq(:here_now)
202
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
203
-
204
- end
205
- end
206
-
207
-
208
- it '__channel___demo___group___demo____http_sync__false___callback___block_' do
209
- VCR.use_cassette('examples/here_now/18', record: :none) do
210
- envelope = @pubnub.here_now(channel: :demo, group: 'demo', http_sync: false, &@callback)
211
- envelope = envelope.value
212
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
213
- expect(envelope.error?).to eq false
214
-
215
- expect(envelope.status[:code]).to eq(200)
216
- expect(envelope.status[:category]).to eq(:ack)
217
- 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"})
218
-
219
- expect(envelope.result[:code]).to eq(200)
220
- expect(envelope.result[:operation]).to eq(:here_now)
221
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
222
-
223
- end
224
- end
225
-
226
-
227
- it '__channel___demo___group___demo____http_sync__false___callback___lambda_' do
228
- VCR.use_cassette('examples/here_now/19', record: :none) do
229
- envelope = @pubnub.here_now(channel: :demo, group: 'demo', http_sync: false, callback: @callback)
230
- envelope = envelope.value
231
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
232
- expect(envelope.error?).to eq false
233
-
234
- expect(envelope.status[:code]).to eq(200)
235
- expect(envelope.status[:category]).to eq(:ack)
236
- 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"})
237
-
238
- expect(envelope.result[:code]).to eq(200)
239
- expect(envelope.result[:operation]).to eq(:here_now)
240
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
241
-
242
- end
243
- end
244
-
245
-
246
- it '__channel___demo___group__nil___http_sync__true___callback__nil_' do
247
- VCR.use_cassette('examples/here_now/35', record: :none) do
248
- envelope = @pubnub.here_now(channel: :demo, http_sync: true)
249
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
250
- expect(envelope.error?).to eq false
251
-
252
- expect(envelope.status[:code]).to eq(200)
253
- expect(envelope.status[:category]).to eq(:ack)
254
- 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"})
255
-
256
- expect(envelope.result[:code]).to eq(200)
257
- expect(envelope.result[:operation]).to eq(:here_now)
258
- expect(envelope.result[:data]).to eq({:uuids=>["ruby-test-uuid-client-one"], :occupancy=>1, :total_occupancy=>nil, :total_channels=>nil, :channels=>nil})
259
-
260
- end
261
- end
262
-
263
-
264
- it '__channel___demo___group__nil___http_sync__true___callback___block_' do
265
- VCR.use_cassette('examples/here_now/33', record: :none) do
266
- envelope = @pubnub.here_now(channel: :demo, http_sync: true, &@callback)
267
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
268
- expect(envelope.error?).to eq false
269
-
270
- expect(envelope.status[:code]).to eq(200)
271
- expect(envelope.status[:category]).to eq(:ack)
272
- 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"})
273
-
274
- expect(envelope.result[:code]).to eq(200)
275
- expect(envelope.result[:operation]).to eq(:here_now)
276
- expect(envelope.result[:data]).to eq({:uuids=>["ruby-test-uuid-client-one"], :occupancy=>1, :total_occupancy=>nil, :total_channels=>nil, :channels=>nil})
277
-
278
- end
279
- end
280
-
281
-
282
- it '__channel___demo___group__nil___http_sync__true___callback___lambda_' do
283
- VCR.use_cassette('examples/here_now/34', record: :none) do
284
- envelope = @pubnub.here_now(channel: :demo, http_sync: true, callback: @callback)
285
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
286
- expect(envelope.error?).to eq false
287
-
288
- expect(envelope.status[:code]).to eq(200)
289
- expect(envelope.status[:category]).to eq(:ack)
290
- 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"})
291
-
292
- expect(envelope.result[:code]).to eq(200)
293
- expect(envelope.result[:operation]).to eq(:here_now)
294
- expect(envelope.result[:data]).to eq({:uuids=>["ruby-test-uuid-client-one"], :occupancy=>1, :total_occupancy=>nil, :total_channels=>nil, :channels=>nil})
295
-
296
- end
297
- end
298
-
299
-
300
- it '__channel___demo___group__nil___http_sync__false___callback__nil_' do
301
- VCR.use_cassette('examples/here_now/32', record: :none) do
302
- envelope = @pubnub.here_now(channel: :demo, http_sync: false)
303
- envelope = envelope.value
304
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
305
- expect(envelope.error?).to eq false
31
+ expect(envelope.result[:code]).to eq(200)
32
+ expect(envelope.result[:operation]).to eq(:here_now)
33
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
34
+ end
35
+ end
306
36
 
307
- expect(envelope.status[:code]).to eq(200)
308
- expect(envelope.status[:category]).to eq(:ack)
309
- 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"})
37
+ it "__channel___demo___group___demo___http_sync__true___callback___block_" do
38
+ VCR.use_cassette("examples/here_now/27", record: :none) do
39
+ envelope = @pubnub.here_now(channel: :demo, group: :demo, http_sync: true, &@callback)
40
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
41
+ expect(envelope.error?).to eq false
310
42
 
311
- expect(envelope.result[:code]).to eq(200)
312
- expect(envelope.result[:operation]).to eq(:here_now)
313
- expect(envelope.result[:data]).to eq({:uuids=>["ruby-test-uuid-client-one"], :occupancy=>1, :total_occupancy=>nil, :total_channels=>nil, :channels=>nil})
43
+ expect(envelope.status[:code]).to eq(200)
44
+ expect(envelope.status[:category]).to eq(:ack)
45
+ 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
46
 
315
- end
316
- end
47
+ expect(envelope.result[:code]).to eq(200)
48
+ expect(envelope.result[:operation]).to eq(:here_now)
49
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
50
+ end
51
+ end
317
52
 
53
+ it "__channel___demo___group___demo___http_sync__true___callback___lambda_" do
54
+ VCR.use_cassette("examples/here_now/28", record: :none) do
55
+ envelope = @pubnub.here_now(channel: :demo, group: :demo, http_sync: true, callback: @callback)
56
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
57
+ expect(envelope.error?).to eq false
318
58
 
319
- it '__channel___demo___group__nil___http_sync__false___callback___block_' do
320
- VCR.use_cassette('examples/here_now/30', record: :none) do
321
- envelope = @pubnub.here_now(channel: :demo, http_sync: false, &@callback)
322
- envelope = envelope.value
323
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
324
- expect(envelope.error?).to eq false
59
+ expect(envelope.status[:code]).to eq(200)
60
+ expect(envelope.status[:category]).to eq(:ack)
61
+ 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"})
325
62
 
326
- expect(envelope.status[:code]).to eq(200)
327
- expect(envelope.status[:category]).to eq(:ack)
328
- 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"})
63
+ expect(envelope.result[:code]).to eq(200)
64
+ expect(envelope.result[:operation]).to eq(:here_now)
65
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
66
+ end
67
+ end
329
68
 
330
- expect(envelope.result[:code]).to eq(200)
331
- expect(envelope.result[:operation]).to eq(:here_now)
332
- expect(envelope.result[:data]).to eq({:uuids=>["ruby-test-uuid-client-one"], :occupancy=>1, :total_occupancy=>nil, :total_channels=>nil, :channels=>nil})
69
+ it "__channel___demo___group___demo___http_sync__false___callback__nil_" do
70
+ VCR.use_cassette("examples/here_now/26", record: :none) do
71
+ envelope = @pubnub.here_now(channel: :demo, group: :demo, http_sync: false)
72
+ envelope = envelope.value
73
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
74
+ expect(envelope.error?).to eq false
333
75
 
334
- end
335
- end
76
+ expect(envelope.status[:code]).to eq(200)
77
+ expect(envelope.status[:category]).to eq(:ack)
78
+ 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"})
336
79
 
80
+ expect(envelope.result[:code]).to eq(200)
81
+ expect(envelope.result[:operation]).to eq(:here_now)
82
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
83
+ end
84
+ end
337
85
 
338
- it '__channel___demo___group__nil___http_sync__false___callback___lambda_' do
339
- VCR.use_cassette('examples/here_now/31', record: :none) do
340
- envelope = @pubnub.here_now(channel: :demo, http_sync: false, callback: @callback)
341
- envelope = envelope.value
342
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
343
- expect(envelope.error?).to eq false
86
+ it "__channel___demo___group___demo___http_sync__false___callback___block_" do
87
+ VCR.use_cassette("examples/here_now/24", record: :none) do
88
+ envelope = @pubnub.here_now(channel: :demo, group: :demo, http_sync: false, &@callback)
89
+ envelope = envelope.value
90
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
91
+ expect(envelope.error?).to eq false
344
92
 
345
- expect(envelope.status[:code]).to eq(200)
346
- expect(envelope.status[:category]).to eq(:ack)
347
- 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"})
93
+ expect(envelope.status[:code]).to eq(200)
94
+ expect(envelope.status[:category]).to eq(:ack)
95
+ 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"})
348
96
 
349
- expect(envelope.result[:code]).to eq(200)
350
- expect(envelope.result[:operation]).to eq(:here_now)
351
- expect(envelope.result[:data]).to eq({:uuids=>["ruby-test-uuid-client-one"], :occupancy=>1, :total_occupancy=>nil, :total_channels=>nil, :channels=>nil})
97
+ expect(envelope.result[:code]).to eq(200)
98
+ expect(envelope.result[:operation]).to eq(:here_now)
99
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
100
+ end
101
+ end
352
102
 
353
- end
354
- end
103
+ it "__channel___demo___group___demo___http_sync__false___callback___lambda_" do
104
+ VCR.use_cassette("examples/here_now/25", record: :none) do
105
+ envelope = @pubnub.here_now(channel: :demo, group: :demo, http_sync: false, callback: @callback)
106
+ envelope = envelope.value
107
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
108
+ expect(envelope.error?).to eq false
355
109
 
110
+ expect(envelope.status[:code]).to eq(200)
111
+ expect(envelope.status[:category]).to eq(:ack)
112
+ 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"})
356
113
 
357
- it '__channel___demo____group___demo___http_sync__true___callback__nil_' do
358
- VCR.use_cassette('examples/here_now/11', record: :none) do
359
- envelope = @pubnub.here_now(channel: 'demo', group: :demo, http_sync: true)
360
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
361
- expect(envelope.error?).to eq false
114
+ expect(envelope.result[:code]).to eq(200)
115
+ expect(envelope.result[:operation]).to eq(:here_now)
116
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
117
+ end
118
+ end
362
119
 
363
- expect(envelope.status[:code]).to eq(200)
364
- expect(envelope.status[:category]).to eq(:ack)
365
- 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"})
120
+ it "__channel___demo___group___demo____http_sync__true___callback__nil_" do
121
+ VCR.use_cassette("examples/here_now/23", record: :none) do
122
+ envelope = @pubnub.here_now(channel: :demo, group: "demo", http_sync: true)
123
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
124
+ expect(envelope.error?).to eq false
366
125
 
367
- expect(envelope.result[:code]).to eq(200)
368
- expect(envelope.result[:operation]).to eq(:here_now)
369
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
126
+ expect(envelope.status[:code]).to eq(200)
127
+ expect(envelope.status[:category]).to eq(:ack)
128
+ 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"})
370
129
 
371
- end
372
- end
130
+ expect(envelope.result[:code]).to eq(200)
131
+ expect(envelope.result[:operation]).to eq(:here_now)
132
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
133
+ end
134
+ end
373
135
 
136
+ it "__channel___demo___group___demo____http_sync__true___callback___block_" do
137
+ VCR.use_cassette("examples/here_now/21", record: :none) do
138
+ envelope = @pubnub.here_now(channel: :demo, group: "demo", http_sync: true, &@callback)
139
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
140
+ expect(envelope.error?).to eq false
374
141
 
375
- it '__channel___demo____group___demo___http_sync__true___callback___block_' do
376
- VCR.use_cassette('examples/here_now/9', record: :none) do
377
- envelope = @pubnub.here_now(channel: 'demo', group: :demo, http_sync: true, &@callback)
378
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
379
- expect(envelope.error?).to eq false
142
+ expect(envelope.status[:code]).to eq(200)
143
+ expect(envelope.status[:category]).to eq(:ack)
144
+ 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
145
 
381
- expect(envelope.status[:code]).to eq(200)
382
- expect(envelope.status[:category]).to eq(:ack)
383
- 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"})
146
+ expect(envelope.result[:code]).to eq(200)
147
+ expect(envelope.result[:operation]).to eq(:here_now)
148
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
149
+ end
150
+ end
384
151
 
385
- expect(envelope.result[:code]).to eq(200)
386
- expect(envelope.result[:operation]).to eq(:here_now)
387
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
152
+ it "__channel___demo___group___demo____http_sync__true___callback___lambda_" do
153
+ VCR.use_cassette("examples/here_now/22", record: :none) do
154
+ envelope = @pubnub.here_now(channel: :demo, group: "demo", http_sync: true, callback: @callback)
155
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
156
+ expect(envelope.error?).to eq false
388
157
 
389
- end
390
- end
158
+ expect(envelope.status[:code]).to eq(200)
159
+ expect(envelope.status[:category]).to eq(:ack)
160
+ 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"})
391
161
 
162
+ expect(envelope.result[:code]).to eq(200)
163
+ expect(envelope.result[:operation]).to eq(:here_now)
164
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
165
+ end
166
+ end
392
167
 
393
- it '__channel___demo____group___demo___http_sync__true___callback___lambda_' do
394
- VCR.use_cassette('examples/here_now/10', record: :none) do
395
- envelope = @pubnub.here_now(channel: 'demo', group: :demo, http_sync: true, callback: @callback)
396
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
397
- expect(envelope.error?).to eq false
168
+ it "__channel___demo___group___demo____http_sync__false___callback__nil_" do
169
+ VCR.use_cassette("examples/here_now/20", record: :none) do
170
+ envelope = @pubnub.here_now(channel: :demo, group: "demo", http_sync: false)
171
+ envelope = envelope.value
172
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
173
+ expect(envelope.error?).to eq false
398
174
 
399
- expect(envelope.status[:code]).to eq(200)
400
- expect(envelope.status[:category]).to eq(:ack)
401
- 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"})
175
+ expect(envelope.status[:code]).to eq(200)
176
+ expect(envelope.status[:category]).to eq(:ack)
177
+ 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"})
402
178
 
403
- expect(envelope.result[:code]).to eq(200)
404
- expect(envelope.result[:operation]).to eq(:here_now)
405
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
179
+ expect(envelope.result[:code]).to eq(200)
180
+ expect(envelope.result[:operation]).to eq(:here_now)
181
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
182
+ end
183
+ end
406
184
 
407
- end
408
- end
185
+ it "__channel___demo___group___demo____http_sync__false___callback___block_" do
186
+ VCR.use_cassette("examples/here_now/18", record: :none) do
187
+ envelope = @pubnub.here_now(channel: :demo, group: "demo", http_sync: false, &@callback)
188
+ envelope = envelope.value
189
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
190
+ expect(envelope.error?).to eq false
409
191
 
192
+ expect(envelope.status[:code]).to eq(200)
193
+ expect(envelope.status[:category]).to eq(:ack)
194
+ 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"})
410
195
 
411
- it '__channel___demo____group___demo___http_sync__false___callback__nil_' do
412
- VCR.use_cassette('examples/here_now/8', record: :none) do
413
- envelope = @pubnub.here_now(channel: 'demo', group: :demo, http_sync: false)
414
- envelope = envelope.value
415
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
416
- expect(envelope.error?).to eq false
196
+ expect(envelope.result[:code]).to eq(200)
197
+ expect(envelope.result[:operation]).to eq(:here_now)
198
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
199
+ end
200
+ end
417
201
 
418
- expect(envelope.status[:code]).to eq(200)
419
- expect(envelope.status[:category]).to eq(:ack)
420
- 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"})
202
+ it "__channel___demo___group___demo____http_sync__false___callback___lambda_" do
203
+ VCR.use_cassette("examples/here_now/19", record: :none) do
204
+ envelope = @pubnub.here_now(channel: :demo, group: "demo", http_sync: false, callback: @callback)
205
+ envelope = envelope.value
206
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
207
+ expect(envelope.error?).to eq false
421
208
 
422
- expect(envelope.result[:code]).to eq(200)
423
- expect(envelope.result[:operation]).to eq(:here_now)
424
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
209
+ expect(envelope.status[:code]).to eq(200)
210
+ expect(envelope.status[:category]).to eq(:ack)
211
+ 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"})
425
212
 
426
- end
427
- end
213
+ expect(envelope.result[:code]).to eq(200)
214
+ expect(envelope.result[:operation]).to eq(:here_now)
215
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
216
+ end
217
+ end
428
218
 
219
+ it "__channel___demo___group__nil___http_sync__true___callback__nil_" do
220
+ VCR.use_cassette("examples/here_now/35", record: :none) do
221
+ envelope = @pubnub.here_now(channel: :demo, http_sync: true)
222
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
223
+ expect(envelope.error?).to eq false
429
224
 
430
- it '__channel___demo____group___demo___http_sync__false___callback___block_' do
431
- VCR.use_cassette('examples/here_now/6', record: :none) do
432
- envelope = @pubnub.here_now(channel: 'demo', group: :demo, http_sync: false, &@callback)
433
- envelope = envelope.value
434
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
435
- expect(envelope.error?).to eq false
225
+ expect(envelope.status[:code]).to eq(200)
226
+ expect(envelope.status[:category]).to eq(:ack)
227
+ 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
228
 
437
- expect(envelope.status[:code]).to eq(200)
438
- expect(envelope.status[:category]).to eq(:ack)
439
- 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"})
229
+ expect(envelope.result[:code]).to eq(200)
230
+ expect(envelope.result[:operation]).to eq(:here_now)
231
+ expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil})
232
+ end
233
+ end
440
234
 
441
- expect(envelope.result[:code]).to eq(200)
442
- expect(envelope.result[:operation]).to eq(:here_now)
443
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
235
+ it "__channel___demo___group__nil___http_sync__true___callback___block_" do
236
+ VCR.use_cassette("examples/here_now/33", record: :none) do
237
+ envelope = @pubnub.here_now(channel: :demo, http_sync: true, &@callback)
238
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
239
+ expect(envelope.error?).to eq false
444
240
 
445
- end
446
- end
241
+ expect(envelope.status[:code]).to eq(200)
242
+ expect(envelope.status[:category]).to eq(:ack)
243
+ 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"})
447
244
 
245
+ expect(envelope.result[:code]).to eq(200)
246
+ expect(envelope.result[:operation]).to eq(:here_now)
247
+ expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil})
248
+ end
249
+ end
448
250
 
449
- it '__channel___demo____group___demo___http_sync__false___callback___lambda_' do
450
- VCR.use_cassette('examples/here_now/7', record: :none) do
451
- envelope = @pubnub.here_now(channel: 'demo', group: :demo, http_sync: false, callback: @callback)
452
- envelope = envelope.value
453
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
454
- expect(envelope.error?).to eq false
251
+ it "__channel___demo___group__nil___http_sync__true___callback___lambda_" do
252
+ VCR.use_cassette("examples/here_now/34", record: :none) do
253
+ envelope = @pubnub.here_now(channel: :demo, http_sync: true, callback: @callback)
254
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
255
+ expect(envelope.error?).to eq false
455
256
 
456
- expect(envelope.status[:code]).to eq(200)
457
- expect(envelope.status[:category]).to eq(:ack)
458
- 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"})
257
+ expect(envelope.status[:code]).to eq(200)
258
+ expect(envelope.status[:category]).to eq(:ack)
259
+ 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"})
459
260
 
460
- expect(envelope.result[:code]).to eq(200)
461
- expect(envelope.result[:operation]).to eq(:here_now)
462
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
261
+ expect(envelope.result[:code]).to eq(200)
262
+ expect(envelope.result[:operation]).to eq(:here_now)
263
+ expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil})
264
+ end
265
+ end
463
266
 
464
- end
465
- end
267
+ it "__channel___demo___group__nil___http_sync__false___callback__nil_" do
268
+ VCR.use_cassette("examples/here_now/32", record: :none) do
269
+ envelope = @pubnub.here_now(channel: :demo, http_sync: false)
270
+ envelope = envelope.value
271
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
272
+ expect(envelope.error?).to eq false
466
273
 
274
+ expect(envelope.status[:code]).to eq(200)
275
+ expect(envelope.status[:category]).to eq(:ack)
276
+ 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"})
467
277
 
468
- it '__channel___demo____group___demo____http_sync__true___callback__nil_' do
469
- VCR.use_cassette('examples/here_now/5', record: :none) do
470
- envelope = @pubnub.here_now(channel: 'demo', group: 'demo', http_sync: true)
471
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
472
- expect(envelope.error?).to eq false
278
+ expect(envelope.result[:code]).to eq(200)
279
+ expect(envelope.result[:operation]).to eq(:here_now)
280
+ expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil})
281
+ end
282
+ end
473
283
 
474
- expect(envelope.status[:code]).to eq(200)
475
- expect(envelope.status[:category]).to eq(:ack)
476
- 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"})
284
+ it "__channel___demo___group__nil___http_sync__false___callback___block_" do
285
+ VCR.use_cassette("examples/here_now/30", record: :none) do
286
+ envelope = @pubnub.here_now(channel: :demo, http_sync: false, &@callback)
287
+ envelope = envelope.value
288
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
289
+ expect(envelope.error?).to eq false
477
290
 
478
- expect(envelope.result[:code]).to eq(200)
479
- expect(envelope.result[:operation]).to eq(:here_now)
480
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
291
+ expect(envelope.status[:code]).to eq(200)
292
+ expect(envelope.status[:category]).to eq(:ack)
293
+ 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"})
481
294
 
482
- end
483
- end
295
+ expect(envelope.result[:code]).to eq(200)
296
+ expect(envelope.result[:operation]).to eq(:here_now)
297
+ expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil})
298
+ end
299
+ end
484
300
 
301
+ it "__channel___demo___group__nil___http_sync__false___callback___lambda_" do
302
+ VCR.use_cassette("examples/here_now/31", record: :none) do
303
+ envelope = @pubnub.here_now(channel: :demo, http_sync: false, callback: @callback)
304
+ envelope = envelope.value
305
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
306
+ expect(envelope.error?).to eq false
485
307
 
486
- it '__channel___demo____group___demo____http_sync__true___callback___block_' do
487
- VCR.use_cassette('examples/here_now/3', record: :none) do
488
- envelope = @pubnub.here_now(channel: 'demo', group: 'demo', http_sync: true, &@callback)
489
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
490
- expect(envelope.error?).to eq false
308
+ expect(envelope.status[:code]).to eq(200)
309
+ expect(envelope.status[:category]).to eq(:ack)
310
+ 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"})
491
311
 
492
- expect(envelope.status[:code]).to eq(200)
493
- expect(envelope.status[:category]).to eq(:ack)
494
- 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"})
312
+ expect(envelope.result[:code]).to eq(200)
313
+ expect(envelope.result[:operation]).to eq(:here_now)
314
+ expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil})
315
+ end
316
+ end
495
317
 
496
- expect(envelope.result[:code]).to eq(200)
497
- expect(envelope.result[:operation]).to eq(:here_now)
498
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
318
+ it "__channel___demo____group___demo___http_sync__true___callback__nil_" do
319
+ VCR.use_cassette("examples/here_now/11", record: :none) do
320
+ envelope = @pubnub.here_now(channel: "demo", group: :demo, http_sync: true)
321
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
322
+ expect(envelope.error?).to eq false
499
323
 
500
- end
501
- end
324
+ expect(envelope.status[:code]).to eq(200)
325
+ expect(envelope.status[:category]).to eq(:ack)
326
+ 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"})
502
327
 
328
+ expect(envelope.result[:code]).to eq(200)
329
+ expect(envelope.result[:operation]).to eq(:here_now)
330
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
331
+ end
332
+ end
503
333
 
504
- it '__channel___demo____group___demo____http_sync__true___callback___lambda_' do
505
- VCR.use_cassette('examples/here_now/4', record: :none) do
506
- envelope = @pubnub.here_now(channel: 'demo', group: 'demo', http_sync: true, callback: @callback)
507
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
508
- expect(envelope.error?).to eq false
334
+ it "__channel___demo____group___demo___http_sync__true___callback___block_" do
335
+ VCR.use_cassette("examples/here_now/9", record: :none) do
336
+ envelope = @pubnub.here_now(channel: "demo", group: :demo, http_sync: true, &@callback)
337
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
338
+ expect(envelope.error?).to eq false
509
339
 
510
- expect(envelope.status[:code]).to eq(200)
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"})
340
+ expect(envelope.status[:code]).to eq(200)
341
+ expect(envelope.status[:category]).to eq(:ack)
342
+ 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
343
 
514
- expect(envelope.result[:code]).to eq(200)
515
- expect(envelope.result[:operation]).to eq(:here_now)
516
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
344
+ expect(envelope.result[:code]).to eq(200)
345
+ expect(envelope.result[:operation]).to eq(:here_now)
346
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
347
+ end
348
+ end
517
349
 
518
- end
519
- end
350
+ it "__channel___demo____group___demo___http_sync__true___callback___lambda_" do
351
+ VCR.use_cassette("examples/here_now/10", record: :none) do
352
+ envelope = @pubnub.here_now(channel: "demo", group: :demo, http_sync: true, callback: @callback)
353
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
354
+ expect(envelope.error?).to eq false
520
355
 
356
+ expect(envelope.status[:code]).to eq(200)
357
+ expect(envelope.status[:category]).to eq(:ack)
358
+ 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"})
521
359
 
522
- it '__channel___demo____group___demo____http_sync__false___callback__nil_' do
523
- VCR.use_cassette('examples/here_now/2', record: :none) do
524
- envelope = @pubnub.here_now(channel: 'demo', group: 'demo', http_sync: false)
525
- envelope = envelope.value
526
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
527
- expect(envelope.error?).to eq false
360
+ expect(envelope.result[:code]).to eq(200)
361
+ expect(envelope.result[:operation]).to eq(:here_now)
362
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
363
+ end
364
+ end
528
365
 
529
- expect(envelope.status[:code]).to eq(200)
530
- expect(envelope.status[:category]).to eq(:ack)
531
- 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"})
366
+ it "__channel___demo____group___demo___http_sync__false___callback__nil_" do
367
+ VCR.use_cassette("examples/here_now/8", record: :none) do
368
+ envelope = @pubnub.here_now(channel: "demo", group: :demo, http_sync: false)
369
+ envelope = envelope.value
370
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
371
+ expect(envelope.error?).to eq false
532
372
 
533
- expect(envelope.result[:code]).to eq(200)
534
- expect(envelope.result[:operation]).to eq(:here_now)
535
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
373
+ expect(envelope.status[:code]).to eq(200)
374
+ expect(envelope.status[:category]).to eq(:ack)
375
+ 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"})
536
376
 
537
- end
538
- end
377
+ expect(envelope.result[:code]).to eq(200)
378
+ expect(envelope.result[:operation]).to eq(:here_now)
379
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
380
+ end
381
+ end
539
382
 
383
+ it "__channel___demo____group___demo___http_sync__false___callback___block_" do
384
+ VCR.use_cassette("examples/here_now/6", record: :none) do
385
+ envelope = @pubnub.here_now(channel: "demo", group: :demo, http_sync: false, &@callback)
386
+ envelope = envelope.value
387
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
388
+ expect(envelope.error?).to eq false
540
389
 
541
- it '__channel___demo____group___demo____http_sync__false___callback___block_' do
542
- VCR.use_cassette('examples/here_now/0', record: :none) do
543
- envelope = @pubnub.here_now(channel: 'demo', group: 'demo', http_sync: false, &@callback)
544
- envelope = envelope.value
545
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
546
- expect(envelope.error?).to eq false
390
+ expect(envelope.status[:code]).to eq(200)
391
+ expect(envelope.status[:category]).to eq(:ack)
392
+ 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"})
547
393
 
548
- expect(envelope.status[:code]).to eq(200)
549
- expect(envelope.status[:category]).to eq(:ack)
550
- 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"})
394
+ expect(envelope.result[:code]).to eq(200)
395
+ expect(envelope.result[:operation]).to eq(:here_now)
396
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
397
+ end
398
+ end
551
399
 
552
- expect(envelope.result[:code]).to eq(200)
553
- expect(envelope.result[:operation]).to eq(:here_now)
554
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
400
+ it "__channel___demo____group___demo___http_sync__false___callback___lambda_" do
401
+ VCR.use_cassette("examples/here_now/7", record: :none) do
402
+ envelope = @pubnub.here_now(channel: "demo", group: :demo, http_sync: false, callback: @callback)
403
+ envelope = envelope.value
404
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
405
+ expect(envelope.error?).to eq false
555
406
 
556
- end
557
- end
407
+ expect(envelope.status[:code]).to eq(200)
408
+ expect(envelope.status[:category]).to eq(:ack)
409
+ 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"})
558
410
 
411
+ expect(envelope.result[:code]).to eq(200)
412
+ expect(envelope.result[:operation]).to eq(:here_now)
413
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
414
+ end
415
+ end
559
416
 
560
- it '__channel___demo____group___demo____http_sync__false___callback___lambda_' do
561
- VCR.use_cassette('examples/here_now/1', record: :none) do
562
- envelope = @pubnub.here_now(channel: 'demo', group: 'demo', http_sync: false, callback: @callback)
563
- envelope = envelope.value
564
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
565
- expect(envelope.error?).to eq false
417
+ it "__channel___demo____group___demo____http_sync__true___callback__nil_" do
418
+ VCR.use_cassette("examples/here_now/5", record: :none) do
419
+ envelope = @pubnub.here_now(channel: "demo", group: "demo", http_sync: true)
420
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
421
+ expect(envelope.error?).to eq false
566
422
 
567
- expect(envelope.status[:code]).to eq(200)
568
- expect(envelope.status[:category]).to eq(:ack)
569
- 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
+ expect(envelope.status[:code]).to eq(200)
424
+ expect(envelope.status[:category]).to eq(:ack)
425
+ 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"})
570
426
 
571
- expect(envelope.result[:code]).to eq(200)
572
- expect(envelope.result[:operation]).to eq(:here_now)
573
- expect(envelope.result[:data]).to eq({:uuids=>nil, :occupancy=>nil, :total_occupancy=>1, :total_channels=>1, :channels=>{"demo"=>{"uuids"=>["ruby-test-uuid-client-one"], "occupancy"=>1}}})
427
+ expect(envelope.result[:code]).to eq(200)
428
+ expect(envelope.result[:operation]).to eq(:here_now)
429
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
430
+ end
431
+ end
574
432
 
575
- end
576
- end
433
+ it "__channel___demo____group___demo____http_sync__true___callback___block_" do
434
+ VCR.use_cassette("examples/here_now/3", record: :none) do
435
+ envelope = @pubnub.here_now(channel: "demo", group: "demo", http_sync: true, &@callback)
436
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
437
+ expect(envelope.error?).to eq false
577
438
 
439
+ expect(envelope.status[:code]).to eq(200)
440
+ expect(envelope.status[:category]).to eq(:ack)
441
+ 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
442
 
579
- it '__channel___demo____group__nil___http_sync__true___callback__nil_' do
580
- VCR.use_cassette('examples/here_now/17', record: :none) do
581
- envelope = @pubnub.here_now(channel: 'demo', http_sync: true)
582
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
583
- expect(envelope.error?).to eq false
443
+ expect(envelope.result[:code]).to eq(200)
444
+ expect(envelope.result[:operation]).to eq(:here_now)
445
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
446
+ end
447
+ end
584
448
 
585
- expect(envelope.status[:code]).to eq(200)
586
- expect(envelope.status[:category]).to eq(:ack)
587
- 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
+ it "__channel___demo____group___demo____http_sync__true___callback___lambda_" do
450
+ VCR.use_cassette("examples/here_now/4", record: :none) do
451
+ envelope = @pubnub.here_now(channel: "demo", group: "demo", http_sync: true, callback: @callback)
452
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
453
+ expect(envelope.error?).to eq false
588
454
 
589
- expect(envelope.result[:code]).to eq(200)
590
- expect(envelope.result[:operation]).to eq(:here_now)
591
- expect(envelope.result[:data]).to eq({:uuids=>["ruby-test-uuid-client-one"], :occupancy=>1, :total_occupancy=>nil, :total_channels=>nil, :channels=>nil})
455
+ expect(envelope.status[:code]).to eq(200)
456
+ expect(envelope.status[:category]).to eq(:ack)
457
+ 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"})
592
458
 
593
- end
594
- end
459
+ expect(envelope.result[:code]).to eq(200)
460
+ expect(envelope.result[:operation]).to eq(:here_now)
461
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
462
+ end
463
+ end
595
464
 
465
+ it "__channel___demo____group___demo____http_sync__false___callback__nil_" do
466
+ VCR.use_cassette("examples/here_now/2", record: :none) do
467
+ envelope = @pubnub.here_now(channel: "demo", group: "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
596
471
 
597
- it '__channel___demo____group__nil___http_sync__true___callback___block_' do
598
- VCR.use_cassette('examples/here_now/15', record: :none) do
599
- envelope = @pubnub.here_now(channel: 'demo', http_sync: true, &@callback)
600
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
601
- expect(envelope.error?).to eq false
472
+ expect(envelope.status[:code]).to eq(200)
473
+ expect(envelope.status[:category]).to eq(:ack)
474
+ 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"})
602
475
 
603
- expect(envelope.status[:code]).to eq(200)
604
- expect(envelope.status[:category]).to eq(:ack)
605
- 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
+ expect(envelope.result[:code]).to eq(200)
477
+ expect(envelope.result[:operation]).to eq(:here_now)
478
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
479
+ end
480
+ end
606
481
 
607
- expect(envelope.result[:code]).to eq(200)
608
- expect(envelope.result[:operation]).to eq(:here_now)
609
- expect(envelope.result[:data]).to eq({:uuids=>["ruby-test-uuid-client-one"], :occupancy=>1, :total_occupancy=>nil, :total_channels=>nil, :channels=>nil})
482
+ it "__channel___demo____group___demo____http_sync__false___callback___block_" do
483
+ VCR.use_cassette("examples/here_now/0", record: :none) do
484
+ envelope = @pubnub.here_now(channel: "demo", group: "demo", http_sync: false, &@callback)
485
+ envelope = envelope.value
486
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
487
+ expect(envelope.error?).to eq false
610
488
 
611
- end
612
- end
489
+ expect(envelope.status[:code]).to eq(200)
490
+ expect(envelope.status[:category]).to eq(:ack)
491
+ 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"})
613
492
 
493
+ expect(envelope.result[:code]).to eq(200)
494
+ expect(envelope.result[:operation]).to eq(:here_now)
495
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
496
+ end
497
+ end
614
498
 
615
- it '__channel___demo____group__nil___http_sync__true___callback___lambda_' do
616
- VCR.use_cassette('examples/here_now/16', record: :none) do
617
- envelope = @pubnub.here_now(channel: 'demo', http_sync: true, callback: @callback)
618
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
619
- expect(envelope.error?).to eq false
499
+ it "__channel___demo____group___demo____http_sync__false___callback___lambda_" do
500
+ VCR.use_cassette("examples/here_now/1", record: :none) do
501
+ envelope = @pubnub.here_now(channel: "demo", group: "demo", http_sync: false, callback: @callback)
502
+ envelope = envelope.value
503
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
504
+ expect(envelope.error?).to eq false
620
505
 
621
- expect(envelope.status[:code]).to eq(200)
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"})
506
+ expect(envelope.status[:code]).to eq(200)
507
+ expect(envelope.status[:category]).to eq(:ack)
508
+ 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
509
 
625
- expect(envelope.result[:code]).to eq(200)
626
- expect(envelope.result[:operation]).to eq(:here_now)
627
- expect(envelope.result[:data]).to eq({:uuids=>["ruby-test-uuid-client-one"], :occupancy=>1, :total_occupancy=>nil, :total_channels=>nil, :channels=>nil})
510
+ expect(envelope.result[:code]).to eq(200)
511
+ expect(envelope.result[:operation]).to eq(:here_now)
512
+ expect(envelope.result[:data]).to eq({:uuids => nil, :occupancy => nil, :total_occupancy => 1, :total_channels => 1, :channels => {"demo" => {"uuids" => ["ruby-test-uuid-client-one"], "occupancy" => 1}}})
513
+ end
514
+ end
628
515
 
629
- end
630
- end
516
+ it "__channel___demo____group__nil___http_sync__true___callback__nil_" do
517
+ VCR.use_cassette("examples/here_now/17", record: :none) do
518
+ envelope = @pubnub.here_now(channel: "demo", http_sync: true)
519
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
520
+ expect(envelope.error?).to eq false
631
521
 
522
+ expect(envelope.status[:code]).to eq(200)
523
+ expect(envelope.status[:category]).to eq(:ack)
524
+ 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"})
632
525
 
633
- it '__channel___demo____group__nil___http_sync__false___callback__nil_' do
634
- VCR.use_cassette('examples/here_now/14', record: :none) do
635
- envelope = @pubnub.here_now(channel: 'demo', http_sync: false)
636
- envelope = envelope.value
637
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
638
- expect(envelope.error?).to eq false
526
+ expect(envelope.result[:code]).to eq(200)
527
+ expect(envelope.result[:operation]).to eq(:here_now)
528
+ expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil})
529
+ end
530
+ end
639
531
 
640
- expect(envelope.status[:code]).to eq(200)
641
- expect(envelope.status[:category]).to eq(:ack)
642
- 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"})
532
+ it "__channel___demo____group__nil___http_sync__true___callback___block_" do
533
+ VCR.use_cassette("examples/here_now/15", record: :none) do
534
+ envelope = @pubnub.here_now(channel: "demo", http_sync: true, &@callback)
535
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
536
+ expect(envelope.error?).to eq false
643
537
 
644
- expect(envelope.result[:code]).to eq(200)
645
- expect(envelope.result[:operation]).to eq(:here_now)
646
- expect(envelope.result[:data]).to eq({:uuids=>["ruby-test-uuid-client-one"], :occupancy=>1, :total_occupancy=>nil, :total_channels=>nil, :channels=>nil})
538
+ expect(envelope.status[:code]).to eq(200)
539
+ expect(envelope.status[:category]).to eq(:ack)
540
+ 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"})
647
541
 
648
- end
649
- end
542
+ expect(envelope.result[:code]).to eq(200)
543
+ expect(envelope.result[:operation]).to eq(:here_now)
544
+ expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil})
545
+ end
546
+ end
650
547
 
548
+ it "__channel___demo____group__nil___http_sync__true___callback___lambda_" do
549
+ VCR.use_cassette("examples/here_now/16", record: :none) do
550
+ envelope = @pubnub.here_now(channel: "demo", http_sync: true, callback: @callback)
551
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
552
+ expect(envelope.error?).to eq false
651
553
 
652
- it '__channel___demo____group__nil___http_sync__false___callback___block_' do
653
- VCR.use_cassette('examples/here_now/12', record: :none) do
654
- envelope = @pubnub.here_now(channel: 'demo', http_sync: false, &@callback)
655
- envelope = envelope.value
656
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
657
- expect(envelope.error?).to eq false
554
+ expect(envelope.status[:code]).to eq(200)
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"})
658
557
 
659
- expect(envelope.status[:code]).to eq(200)
660
- expect(envelope.status[:category]).to eq(:ack)
661
- 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"})
558
+ expect(envelope.result[:code]).to eq(200)
559
+ expect(envelope.result[:operation]).to eq(:here_now)
560
+ expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil})
561
+ end
562
+ end
662
563
 
663
- expect(envelope.result[:code]).to eq(200)
664
- expect(envelope.result[:operation]).to eq(:here_now)
665
- expect(envelope.result[:data]).to eq({:uuids=>["ruby-test-uuid-client-one"], :occupancy=>1, :total_occupancy=>nil, :total_channels=>nil, :channels=>nil})
564
+ it "__channel___demo____group__nil___http_sync__false___callback__nil_" do
565
+ VCR.use_cassette("examples/here_now/14", record: :none) do
566
+ envelope = @pubnub.here_now(channel: "demo", http_sync: false)
567
+ envelope = envelope.value
568
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
569
+ expect(envelope.error?).to eq false
666
570
 
667
- end
668
- end
571
+ expect(envelope.status[:code]).to eq(200)
572
+ expect(envelope.status[:category]).to eq(:ack)
573
+ 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"})
669
574
 
575
+ expect(envelope.result[:code]).to eq(200)
576
+ expect(envelope.result[:operation]).to eq(:here_now)
577
+ expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil})
578
+ end
579
+ end
670
580
 
671
- it '__channel___demo____group__nil___http_sync__false___callback___lambda_' do
672
- VCR.use_cassette('examples/here_now/13', record: :none) do
673
- envelope = @pubnub.here_now(channel: 'demo', http_sync: false, callback: @callback)
674
- envelope = envelope.value
675
- expect(envelope.is_a?(Pubnub::Envelope)).to eq true
676
- expect(envelope.error?).to eq false
581
+ it "__channel___demo____group__nil___http_sync__false___callback___block_" do
582
+ VCR.use_cassette("examples/here_now/12", record: :none) do
583
+ envelope = @pubnub.here_now(channel: "demo", http_sync: false, &@callback)
584
+ envelope = envelope.value
585
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
586
+ expect(envelope.error?).to eq false
677
587
 
678
- expect(envelope.status[:code]).to eq(200)
679
- expect(envelope.status[:category]).to eq(:ack)
680
- 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"})
588
+ expect(envelope.status[:code]).to eq(200)
589
+ expect(envelope.status[:category]).to eq(:ack)
590
+ 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"})
681
591
 
682
- expect(envelope.result[:code]).to eq(200)
683
- expect(envelope.result[:operation]).to eq(:here_now)
684
- expect(envelope.result[:data]).to eq({:uuids=>["ruby-test-uuid-client-one"], :occupancy=>1, :total_occupancy=>nil, :total_channels=>nil, :channels=>nil})
592
+ expect(envelope.result[:code]).to eq(200)
593
+ expect(envelope.result[:operation]).to eq(:here_now)
594
+ expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil})
595
+ end
596
+ end
685
597
 
686
- end
687
- end
598
+ it "__channel___demo____group__nil___http_sync__false___callback___lambda_" do
599
+ VCR.use_cassette("examples/here_now/13", record: :none) do
600
+ envelope = @pubnub.here_now(channel: "demo", http_sync: false, callback: @callback)
601
+ envelope = envelope.value
602
+ expect(envelope.is_a?(Pubnub::Envelope)).to eq true
603
+ expect(envelope.error?).to eq false
688
604
 
605
+ expect(envelope.status[:code]).to eq(200)
606
+ expect(envelope.status[:category]).to eq(:ack)
607
+ 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"})
689
608
 
609
+ expect(envelope.result[:code]).to eq(200)
610
+ expect(envelope.result[:operation]).to eq(:here_now)
611
+ expect(envelope.result[:data]).to eq({:uuids => ["ruby-test-uuid-client-one"], :occupancy => 1, :total_occupancy => nil, :total_channels => nil, :channels => nil})
612
+ end
613
+ end
690
614
  end