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.
- checksums.yaml +4 -4
- data/.pubnub.yml +8 -1
- data/.rubocop.yml +9 -3
- data/.travis.yml +6 -19
- data/CHANGELOG.md +86 -82
- data/Gemfile +7 -5
- data/Gemfile.lock +155 -157
- data/README.md +34 -34
- data/VERSION +1 -1
- data/gemfiles/celluloid_017.gemfile +4 -4
- data/gemfiles/celluloid_018.gemfile +4 -4
- data/gemfiles/celluloid_master.gemfile +4 -4
- data/gemfiles/concurrent-ruby-1.0.5.gem +0 -0
- data/gemfiles/concurrent-ruby-edge-0.3.1.gem +0 -0
- data/lib/pubnub.rb +3 -3
- data/lib/pubnub/client.rb +19 -16
- data/lib/pubnub/client/events.rb +5 -5
- data/lib/pubnub/client/getters_setters.rb +11 -12
- data/lib/pubnub/client/paged_history.rb +11 -9
- data/lib/pubnub/configuration.rb +1 -2
- data/lib/pubnub/constants.rb +47 -47
- data/lib/pubnub/crypto.rb +2 -2
- data/lib/pubnub/envelope.rb +7 -5
- data/lib/pubnub/error.rb +22 -15
- data/lib/pubnub/event.rb +24 -25
- data/lib/pubnub/event/formatter.rb +8 -5
- data/lib/pubnub/event/signature.rb +3 -3
- data/lib/pubnub/events/audit.rb +1 -1
- data/lib/pubnub/events/channel_registration.rb +10 -15
- data/lib/pubnub/events/delete_messages.rb +9 -9
- data/lib/pubnub/events/grant.rb +3 -3
- data/lib/pubnub/events/heartbeat.rb +4 -8
- data/lib/pubnub/events/here_now.rb +4 -8
- data/lib/pubnub/events/history.rb +10 -10
- data/lib/pubnub/events/leave.rb +2 -2
- data/lib/pubnub/events/presence.rb +1 -1
- data/lib/pubnub/events/publish.rb +3 -5
- data/lib/pubnub/events/revoke.rb +3 -3
- data/lib/pubnub/events/set_state.rb +3 -3
- data/lib/pubnub/events/state.rb +4 -6
- data/lib/pubnub/events/subscribe.rb +1 -1
- data/lib/pubnub/events/time.rb +2 -2
- data/lib/pubnub/events/where_now.rb +6 -6
- data/lib/pubnub/format.rb +73 -0
- data/lib/pubnub/formatter.rb +23 -21
- data/lib/pubnub/heart.rb +4 -4
- data/lib/pubnub/origin_manager.rb +3 -5
- data/lib/pubnub/pam.rb +5 -5
- data/lib/pubnub/schemas/envelope_schema.rb +1 -1
- data/lib/pubnub/subscribe_callback.rb +3 -3
- data/lib/pubnub/subscribe_event.rb +6 -10
- data/lib/pubnub/subscribe_event/formatter.rb +82 -80
- data/lib/pubnub/subscribe_event/heartbeat.rb +1 -1
- data/lib/pubnub/subscriber.rb +31 -32
- data/lib/pubnub/telemetry.rb +26 -27
- data/lib/pubnub/validators/audit.rb +3 -2
- data/lib/pubnub/validators/channel_registration.rb +6 -4
- data/lib/pubnub/validators/client.rb +1 -0
- data/lib/pubnub/validators/common_validator.rb +37 -31
- data/lib/pubnub/validators/delete.rb +5 -4
- data/lib/pubnub/validators/grant.rb +3 -2
- data/lib/pubnub/validators/history.rb +3 -2
- data/lib/pubnub/validators/leave.rb +3 -2
- data/lib/pubnub/validators/presence.rb +3 -2
- data/lib/pubnub/validators/publish.rb +15 -10
- data/lib/pubnub/validators/set_state.rb +0 -2
- data/lib/pubnub/validators/state.rb +3 -2
- data/lib/pubnub/version.rb +1 -1
- data/pubnub.gemspec +19 -18
- data/spec/examples/audit_examples_spec.rb +1268 -1418
- data/spec/examples/channel_registration_examples_spec.rb +655 -757
- data/spec/examples/delete_messages_examples_spec.rb +19 -21
- data/spec/examples/grant_examples_spec.rb +34028 -37920
- data/spec/examples/heartbeat_examples_spec.rb +583 -731
- data/spec/examples/here_now_examples_spec.rb +493 -569
- data/spec/examples/history_examples_spec.rb +979 -1127
- data/spec/examples/leave_examples_spec.rb +439 -551
- data/spec/examples/presence_examples_spec.rb +686 -830
- data/spec/examples/publish_examples_spec.rb +27223 -31547
- data/spec/examples/publish_with_ttl_spec.rb +11 -14
- data/spec/examples/revoke_examples_spec.rb +68048 -75828
- data/spec/examples/set_state_examples_spec.rb +295 -371
- data/spec/examples/state_examples_spec.rb +169 -197
- data/spec/examples/status_request_message_count_exceeded_spec.rb +16 -19
- data/spec/examples/subscribe_examples_spec.rb +43843 -52035
- data/spec/examples/time_examples_spec.rb +82 -98
- data/spec/examples/where_now_examples_spec.rb +88 -104
- data/spec/lib/client_spec.rb +99 -117
- data/spec/lib/connection_callback_spec.rb +27 -33
- data/spec/lib/custom_retries_examples_spec.rb +8 -11
- data/spec/lib/event_spec.rb +35 -42
- data/spec/lib/events/audit_spec.rb +19 -25
- data/spec/lib/events/channel_registration_spec.rb +17 -23
- data/spec/lib/events/delete_messages_spec.rb +14 -20
- data/spec/lib/events/grant_spec.rb +15 -21
- data/spec/lib/events/heartbeat_spec.rb +21 -27
- data/spec/lib/events/here_now_spec.rb +14 -20
- data/spec/lib/events/history_spec.rb +14 -20
- data/spec/lib/events/leave_spec.rb +14 -20
- data/spec/lib/events/presence_delta_spec.rb +15 -16
- data/spec/lib/events/presence_spec.rb +36 -45
- data/spec/lib/events/publish_spec.rb +33 -40
- data/spec/lib/events/revoke_spec.rb +16 -22
- data/spec/lib/events/state_spec.rb +16 -22
- data/spec/lib/events/subscribe_spec.rb +75 -85
- data/spec/lib/events/time_spec.rb +12 -18
- data/spec/lib/events/timeout_handling_spec.rb +8 -14
- data/spec/lib/events/where_now_spec.rb +14 -20
- data/spec/lib/keep_alive_spec.rb +4 -8
- data/spec/lib/multiple_ciphers_spec.rb +56 -60
- data/spec/lib/pubnub_spec.rb +10 -13
- data/spec/lib/signatures_spec.rb +118 -120
- data/spec/lib/ssl_error_spec.rb +14 -18
- data/spec/lib/super_admin_spec.rb +58 -66
- data/spec/lib/uuid_spec.rb +3 -4
- data/spec/spec_expectations.rb +3 -3
- data/spec/spec_helper.rb +29 -46
- metadata +52 -22
- data/lib/pubnub/message.rb +0 -43
|
@@ -1,1356 +1,1208 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe Pubnub::History 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:
|
|
15
|
-
subscribe_key:
|
|
16
|
-
uuid:
|
|
17
|
-
auth_key:
|
|
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.
|
|
21
|
-
Celluloid.shutdown
|
|
18
|
+
example.run_with_retry retry: 10
|
|
22
19
|
end
|
|
23
20
|
|
|
24
|
-
it
|
|
25
|
-
VCR.use_cassette(
|
|
26
|
-
envelope = @pubnub.history(channel: :demo, count: 10, reverse: true, 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(:history)
|
|
36
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
37
|
-
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__true___http_sync__true___callback___block_' do
|
|
43
|
-
VCR.use_cassette('examples/history/51', record: :none) do
|
|
44
|
-
envelope = @pubnub.history(channel: :demo, count: 10, reverse: true, 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(:history)
|
|
54
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
55
|
-
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__true___http_sync__true___callback___lambda_' do
|
|
61
|
-
VCR.use_cassette('examples/history/52', record: :none) do
|
|
62
|
-
envelope = @pubnub.history(channel: :demo, count: 10, reverse: true, 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(:history)
|
|
72
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
73
|
-
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__true___http_sync__false___callback__nil_' do
|
|
79
|
-
VCR.use_cassette('examples/history/50', record: :none) do
|
|
80
|
-
envelope = @pubnub.history(channel: :demo, count: 10, reverse: true, 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(:history)
|
|
91
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
92
|
-
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__true___http_sync__false___callback___block_' do
|
|
98
|
-
VCR.use_cassette('examples/history/48', record: :none) do
|
|
99
|
-
envelope = @pubnub.history(channel: :demo, count: 10, reverse: true, 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(:history)
|
|
110
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
111
|
-
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__true___http_sync__false___callback___lambda_' do
|
|
117
|
-
VCR.use_cassette('examples/history/49', record: :none) do
|
|
118
|
-
envelope = @pubnub.history(channel: :demo, count: 10, reverse: true, 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(:history)
|
|
129
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
130
|
-
|
|
131
|
-
end
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__true___callback__nil_' do
|
|
136
|
-
VCR.use_cassette('examples/history/41', record: :none) do
|
|
137
|
-
envelope = @pubnub.history(channel: :demo, count: 10, reverse: false, 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(:history)
|
|
147
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
148
|
-
|
|
149
|
-
end
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__true___callback___block_' do
|
|
154
|
-
VCR.use_cassette('examples/history/39', record: :none) do
|
|
155
|
-
envelope = @pubnub.history(channel: :demo, count: 10, reverse: false, 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(:history)
|
|
165
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
166
|
-
|
|
167
|
-
end
|
|
168
|
-
end
|
|
21
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__true___http_sync__true___callback__nil_" do
|
|
22
|
+
VCR.use_cassette("examples/history/53", record: :none) do
|
|
23
|
+
envelope = @pubnub.history(channel: :demo, count: 10, reverse: true, 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
|
-
|
|
172
|
-
|
|
173
|
-
envelope
|
|
174
|
-
|
|
175
|
-
|
|
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(:history)
|
|
183
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
184
|
-
|
|
185
|
-
end
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__false___callback__nil_' do
|
|
190
|
-
VCR.use_cassette('examples/history/38', record: :none) do
|
|
191
|
-
envelope = @pubnub.history(channel: :demo, count: 10, reverse: false, 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(:history)
|
|
202
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
203
|
-
|
|
204
|
-
end
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__false___callback___block_' do
|
|
209
|
-
VCR.use_cassette('examples/history/36', record: :none) do
|
|
210
|
-
envelope = @pubnub.history(channel: :demo, count: 10, reverse: false, 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(:history)
|
|
221
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
222
|
-
|
|
223
|
-
end
|
|
224
|
-
end
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__false___callback___lambda_' do
|
|
228
|
-
VCR.use_cassette('examples/history/37', record: :none) do
|
|
229
|
-
envelope = @pubnub.history(channel: :demo, count: 10, reverse: false, 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(:history)
|
|
240
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
241
|
-
|
|
242
|
-
end
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__nil___http_sync__true___callback__nil_' do
|
|
247
|
-
VCR.use_cassette('examples/history/47', record: :none) do
|
|
248
|
-
envelope = @pubnub.history(channel: :demo, count: 10, 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(:history)
|
|
258
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
259
|
-
|
|
260
|
-
end
|
|
261
|
-
end
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__nil___http_sync__true___callback___block_' do
|
|
265
|
-
VCR.use_cassette('examples/history/45', record: :none) do
|
|
266
|
-
envelope = @pubnub.history(channel: :demo, count: 10, 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(:history)
|
|
276
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
277
|
-
|
|
278
|
-
end
|
|
279
|
-
end
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__nil___http_sync__true___callback___lambda_' do
|
|
283
|
-
VCR.use_cassette('examples/history/46', record: :none) do
|
|
284
|
-
envelope = @pubnub.history(channel: :demo, count: 10, 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(:history)
|
|
294
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
295
|
-
|
|
296
|
-
end
|
|
297
|
-
end
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__nil___http_sync__false___callback__nil_' do
|
|
301
|
-
VCR.use_cassette('examples/history/44', record: :none) do
|
|
302
|
-
envelope = @pubnub.history(channel: :demo, count: 10, http_sync: false)
|
|
303
|
-
envelope = envelope.value
|
|
304
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
305
|
-
expect(envelope.error?).to eq false
|
|
306
|
-
|
|
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"})
|
|
310
|
-
|
|
311
|
-
expect(envelope.result[:code]).to eq(200)
|
|
312
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
313
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
314
|
-
|
|
315
|
-
end
|
|
316
|
-
end
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__nil___http_sync__false___callback___block_' do
|
|
320
|
-
VCR.use_cassette('examples/history/42', record: :none) do
|
|
321
|
-
envelope = @pubnub.history(channel: :demo, count: 10, 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
|
|
325
|
-
|
|
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"})
|
|
329
|
-
|
|
330
|
-
expect(envelope.result[:code]).to eq(200)
|
|
331
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
332
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
333
|
-
|
|
334
|
-
end
|
|
335
|
-
end
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
it '__channel___demo___count__10___start__nil___end__nil___reverse__nil___http_sync__false___callback___lambda_' do
|
|
339
|
-
VCR.use_cassette('examples/history/43', record: :none) do
|
|
340
|
-
envelope = @pubnub.history(channel: :demo, count: 10, 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
|
|
344
|
-
|
|
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"})
|
|
348
|
-
|
|
349
|
-
expect(envelope.result[:code]).to eq(200)
|
|
350
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
351
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
352
|
-
|
|
353
|
-
end
|
|
354
|
-
end
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
it '__channel___demo___count__nil___start__nil___end__nil___reverse__true___http_sync__true___callback__nil_' do
|
|
358
|
-
VCR.use_cassette('examples/history/71', record: :none) do
|
|
359
|
-
envelope = @pubnub.history(channel: :demo, reverse: true, http_sync: true)
|
|
360
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
361
|
-
expect(envelope.error?).to eq false
|
|
362
|
-
|
|
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"})
|
|
366
|
-
|
|
367
|
-
expect(envelope.result[:code]).to eq(200)
|
|
368
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
369
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
370
|
-
|
|
371
|
-
end
|
|
372
|
-
end
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
it '__channel___demo___count__nil___start__nil___end__nil___reverse__true___http_sync__true___callback___block_' do
|
|
376
|
-
VCR.use_cassette('examples/history/69', record: :none) do
|
|
377
|
-
envelope = @pubnub.history(channel: :demo, reverse: true, http_sync: true, &@callback)
|
|
378
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
379
|
-
expect(envelope.error?).to eq false
|
|
380
|
-
|
|
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"})
|
|
384
|
-
|
|
385
|
-
expect(envelope.result[:code]).to eq(200)
|
|
386
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
387
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
388
|
-
|
|
389
|
-
end
|
|
390
|
-
end
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
it '__channel___demo___count__nil___start__nil___end__nil___reverse__true___http_sync__true___callback___lambda_' do
|
|
394
|
-
VCR.use_cassette('examples/history/70', record: :none) do
|
|
395
|
-
envelope = @pubnub.history(channel: :demo, reverse: true, http_sync: true, callback: @callback)
|
|
396
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
397
|
-
expect(envelope.error?).to eq false
|
|
398
|
-
|
|
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"})
|
|
402
|
-
|
|
403
|
-
expect(envelope.result[:code]).to eq(200)
|
|
404
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
405
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
406
|
-
|
|
407
|
-
end
|
|
408
|
-
end
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
it '__channel___demo___count__nil___start__nil___end__nil___reverse__true___http_sync__false___callback__nil_' do
|
|
412
|
-
VCR.use_cassette('examples/history/68', record: :none) do
|
|
413
|
-
envelope = @pubnub.history(channel: :demo, reverse: true, http_sync: false)
|
|
414
|
-
envelope = envelope.value
|
|
415
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
416
|
-
expect(envelope.error?).to eq false
|
|
417
|
-
|
|
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"})
|
|
421
|
-
|
|
422
|
-
expect(envelope.result[:code]).to eq(200)
|
|
423
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
424
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
425
|
-
|
|
426
|
-
end
|
|
427
|
-
end
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
it '__channel___demo___count__nil___start__nil___end__nil___reverse__true___http_sync__false___callback___block_' do
|
|
431
|
-
VCR.use_cassette('examples/history/66', record: :none) do
|
|
432
|
-
envelope = @pubnub.history(channel: :demo, reverse: true, 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
|
|
436
|
-
|
|
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"})
|
|
440
|
-
|
|
441
|
-
expect(envelope.result[:code]).to eq(200)
|
|
442
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
443
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
444
|
-
|
|
445
|
-
end
|
|
446
|
-
end
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
it '__channel___demo___count__nil___start__nil___end__nil___reverse__true___http_sync__false___callback___lambda_' do
|
|
450
|
-
VCR.use_cassette('examples/history/67', record: :none) do
|
|
451
|
-
envelope = @pubnub.history(channel: :demo, reverse: true, 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
|
|
455
|
-
|
|
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"})
|
|
459
|
-
|
|
460
|
-
expect(envelope.result[:code]).to eq(200)
|
|
461
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
462
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
463
|
-
|
|
464
|
-
end
|
|
465
|
-
end
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
it '__channel___demo___count__nil___start__nil___end__nil___reverse__false___http_sync__true___callback__nil_' do
|
|
469
|
-
VCR.use_cassette('examples/history/59', record: :none) do
|
|
470
|
-
envelope = @pubnub.history(channel: :demo, reverse: false, http_sync: true)
|
|
471
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
472
|
-
expect(envelope.error?).to eq false
|
|
473
|
-
|
|
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"})
|
|
477
|
-
|
|
478
|
-
expect(envelope.result[:code]).to eq(200)
|
|
479
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
480
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
481
|
-
|
|
482
|
-
end
|
|
483
|
-
end
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
it '__channel___demo___count__nil___start__nil___end__nil___reverse__false___http_sync__true___callback___block_' do
|
|
487
|
-
VCR.use_cassette('examples/history/57', record: :none) do
|
|
488
|
-
envelope = @pubnub.history(channel: :demo, reverse: false, http_sync: true, &@callback)
|
|
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[: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"})
|
|
495
|
-
|
|
496
|
-
expect(envelope.result[:code]).to eq(200)
|
|
497
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
498
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
499
|
-
|
|
500
|
-
end
|
|
501
|
-
end
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
it '__channel___demo___count__nil___start__nil___end__nil___reverse__false___http_sync__true___callback___lambda_' do
|
|
505
|
-
VCR.use_cassette('examples/history/58', record: :none) do
|
|
506
|
-
envelope = @pubnub.history(channel: :demo, reverse: false, http_sync: true, callback: @callback)
|
|
507
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
508
|
-
expect(envelope.error?).to eq false
|
|
509
|
-
|
|
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"})
|
|
513
|
-
|
|
514
|
-
expect(envelope.result[:code]).to eq(200)
|
|
515
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
516
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
517
|
-
|
|
518
|
-
end
|
|
519
|
-
end
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
it '__channel___demo___count__nil___start__nil___end__nil___reverse__false___http_sync__false___callback__nil_' do
|
|
523
|
-
VCR.use_cassette('examples/history/56', record: :none) do
|
|
524
|
-
envelope = @pubnub.history(channel: :demo, reverse: false, http_sync: false)
|
|
525
|
-
envelope = envelope.value
|
|
526
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
527
|
-
expect(envelope.error?).to eq false
|
|
528
|
-
|
|
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"})
|
|
532
|
-
|
|
533
|
-
expect(envelope.result[:code]).to eq(200)
|
|
534
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
535
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
536
|
-
|
|
537
|
-
end
|
|
538
|
-
end
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
it '__channel___demo___count__nil___start__nil___end__nil___reverse__false___http_sync__false___callback___block_' do
|
|
542
|
-
VCR.use_cassette('examples/history/54', record: :none) do
|
|
543
|
-
envelope = @pubnub.history(channel: :demo, reverse: false, 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
|
|
547
|
-
|
|
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"})
|
|
551
|
-
|
|
552
|
-
expect(envelope.result[:code]).to eq(200)
|
|
553
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
554
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
555
|
-
|
|
556
|
-
end
|
|
557
|
-
end
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
it '__channel___demo___count__nil___start__nil___end__nil___reverse__false___http_sync__false___callback___lambda_' do
|
|
561
|
-
VCR.use_cassette('examples/history/55', record: :none) do
|
|
562
|
-
envelope = @pubnub.history(channel: :demo, reverse: false, 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
|
|
566
|
-
|
|
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"})
|
|
570
|
-
|
|
571
|
-
expect(envelope.result[:code]).to eq(200)
|
|
572
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
573
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
31
|
+
expect(envelope.result[:code]).to eq(200)
|
|
32
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
33
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
34
|
+
end
|
|
35
|
+
end
|
|
574
36
|
|
|
575
|
-
|
|
576
|
-
|
|
37
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__true___http_sync__true___callback___block_" do
|
|
38
|
+
VCR.use_cassette("examples/history/51", record: :none) do
|
|
39
|
+
envelope = @pubnub.history(channel: :demo, count: 10, reverse: true, http_sync: true, &@callback)
|
|
40
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
41
|
+
expect(envelope.error?).to eq false
|
|
577
42
|
|
|
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"})
|
|
578
46
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
envelope
|
|
582
|
-
|
|
583
|
-
|
|
47
|
+
expect(envelope.result[:code]).to eq(200)
|
|
48
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
49
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
50
|
+
end
|
|
51
|
+
end
|
|
584
52
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
53
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__true___http_sync__true___callback___lambda_" do
|
|
54
|
+
VCR.use_cassette("examples/history/52", record: :none) do
|
|
55
|
+
envelope = @pubnub.history(channel: :demo, count: 10, reverse: true, http_sync: true, callback: @callback)
|
|
56
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
57
|
+
expect(envelope.error?).to eq false
|
|
588
58
|
|
|
589
|
-
expect(envelope.
|
|
590
|
-
expect(envelope.
|
|
591
|
-
expect(envelope.
|
|
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"})
|
|
592
62
|
|
|
593
|
-
|
|
594
|
-
|
|
63
|
+
expect(envelope.result[:code]).to eq(200)
|
|
64
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
65
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
66
|
+
end
|
|
67
|
+
end
|
|
595
68
|
|
|
69
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__true___http_sync__false___callback__nil_" do
|
|
70
|
+
VCR.use_cassette("examples/history/50", record: :none) do
|
|
71
|
+
envelope = @pubnub.history(channel: :demo, count: 10, reverse: true, http_sync: false)
|
|
72
|
+
envelope = envelope.value
|
|
73
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
74
|
+
expect(envelope.error?).to eq false
|
|
596
75
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
envelope
|
|
600
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
601
|
-
expect(envelope.error?).to eq false
|
|
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"})
|
|
602
79
|
|
|
603
|
-
expect(envelope.
|
|
604
|
-
expect(envelope.
|
|
605
|
-
expect(envelope.
|
|
80
|
+
expect(envelope.result[:code]).to eq(200)
|
|
81
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
82
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
83
|
+
end
|
|
84
|
+
end
|
|
606
85
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
86
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__true___http_sync__false___callback___block_" do
|
|
87
|
+
VCR.use_cassette("examples/history/48", record: :none) do
|
|
88
|
+
envelope = @pubnub.history(channel: :demo, count: 10, reverse: true, 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
|
|
610
92
|
|
|
611
|
-
|
|
612
|
-
|
|
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"})
|
|
613
96
|
|
|
97
|
+
expect(envelope.result[:code]).to eq(200)
|
|
98
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
99
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
100
|
+
end
|
|
101
|
+
end
|
|
614
102
|
|
|
615
|
-
it
|
|
616
|
-
VCR.use_cassette(
|
|
617
|
-
envelope = @pubnub.history(channel: :demo,
|
|
618
|
-
|
|
619
|
-
expect(envelope.
|
|
103
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__true___http_sync__false___callback___lambda_" do
|
|
104
|
+
VCR.use_cassette("examples/history/49", record: :none) do
|
|
105
|
+
envelope = @pubnub.history(channel: :demo, count: 10, reverse: true, 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
|
|
620
109
|
|
|
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"})
|
|
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"})
|
|
624
113
|
|
|
625
|
-
expect(envelope.result[:code]).to eq(200)
|
|
626
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
627
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
114
|
+
expect(envelope.result[:code]).to eq(200)
|
|
115
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
116
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
117
|
+
end
|
|
118
|
+
end
|
|
628
119
|
|
|
629
|
-
|
|
630
|
-
|
|
120
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__true___callback__nil_" do
|
|
121
|
+
VCR.use_cassette("examples/history/41", record: :none) do
|
|
122
|
+
envelope = @pubnub.history(channel: :demo, count: 10, reverse: false, http_sync: true)
|
|
123
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
124
|
+
expect(envelope.error?).to eq false
|
|
631
125
|
|
|
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"})
|
|
632
129
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
envelope
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
expect(envelope.error?).to eq false
|
|
130
|
+
expect(envelope.result[:code]).to eq(200)
|
|
131
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
132
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
133
|
+
end
|
|
134
|
+
end
|
|
639
135
|
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
136
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__true___callback___block_" do
|
|
137
|
+
VCR.use_cassette("examples/history/39", record: :none) do
|
|
138
|
+
envelope = @pubnub.history(channel: :demo, count: 10, reverse: false, http_sync: true, &@callback)
|
|
139
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
140
|
+
expect(envelope.error?).to eq false
|
|
643
141
|
|
|
644
|
-
expect(envelope.
|
|
645
|
-
expect(envelope.
|
|
646
|
-
expect(envelope.
|
|
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"})
|
|
647
145
|
|
|
648
|
-
|
|
649
|
-
|
|
146
|
+
expect(envelope.result[:code]).to eq(200)
|
|
147
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
148
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
149
|
+
end
|
|
150
|
+
end
|
|
650
151
|
|
|
152
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__true___callback___lambda_" do
|
|
153
|
+
VCR.use_cassette("examples/history/40", record: :none) do
|
|
154
|
+
envelope = @pubnub.history(channel: :demo, count: 10, reverse: false, http_sync: true, callback: @callback)
|
|
155
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
156
|
+
expect(envelope.error?).to eq false
|
|
651
157
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
envelope
|
|
655
|
-
envelope = envelope.value
|
|
656
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
657
|
-
expect(envelope.error?).to eq false
|
|
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"})
|
|
658
161
|
|
|
659
|
-
expect(envelope.
|
|
660
|
-
expect(envelope.
|
|
661
|
-
expect(envelope.
|
|
162
|
+
expect(envelope.result[:code]).to eq(200)
|
|
163
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
164
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
165
|
+
end
|
|
166
|
+
end
|
|
662
167
|
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
168
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__false___callback__nil_" do
|
|
169
|
+
VCR.use_cassette("examples/history/38", record: :none) do
|
|
170
|
+
envelope = @pubnub.history(channel: :demo, count: 10, reverse: false, http_sync: false)
|
|
171
|
+
envelope = envelope.value
|
|
172
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
173
|
+
expect(envelope.error?).to eq false
|
|
666
174
|
|
|
667
|
-
|
|
668
|
-
|
|
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"})
|
|
669
178
|
|
|
179
|
+
expect(envelope.result[:code]).to eq(200)
|
|
180
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
181
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
182
|
+
end
|
|
183
|
+
end
|
|
670
184
|
|
|
671
|
-
it
|
|
672
|
-
VCR.use_cassette(
|
|
673
|
-
envelope = @pubnub.history(channel: :demo,
|
|
674
|
-
envelope = envelope.value
|
|
675
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
676
|
-
expect(envelope.error?).to eq false
|
|
185
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__false___callback___block_" do
|
|
186
|
+
VCR.use_cassette("examples/history/36", record: :none) do
|
|
187
|
+
envelope = @pubnub.history(channel: :demo, count: 10, reverse: false, 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
|
|
677
191
|
|
|
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"})
|
|
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"})
|
|
681
195
|
|
|
682
|
-
expect(envelope.result[:code]).to eq(200)
|
|
683
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
684
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
196
|
+
expect(envelope.result[:code]).to eq(200)
|
|
197
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
198
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
199
|
+
end
|
|
200
|
+
end
|
|
685
201
|
|
|
686
|
-
|
|
687
|
-
|
|
202
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__false___http_sync__false___callback___lambda_" do
|
|
203
|
+
VCR.use_cassette("examples/history/37", record: :none) do
|
|
204
|
+
envelope = @pubnub.history(channel: :demo, count: 10, reverse: false, 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
|
|
688
208
|
|
|
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"})
|
|
689
212
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
envelope
|
|
693
|
-
|
|
694
|
-
|
|
213
|
+
expect(envelope.result[:code]).to eq(200)
|
|
214
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
215
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
216
|
+
end
|
|
217
|
+
end
|
|
695
218
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
219
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__nil___http_sync__true___callback__nil_" do
|
|
220
|
+
VCR.use_cassette("examples/history/47", record: :none) do
|
|
221
|
+
envelope = @pubnub.history(channel: :demo, count: 10, http_sync: true)
|
|
222
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
223
|
+
expect(envelope.error?).to eq false
|
|
699
224
|
|
|
700
|
-
expect(envelope.
|
|
701
|
-
expect(envelope.
|
|
702
|
-
expect(envelope.
|
|
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"})
|
|
703
228
|
|
|
704
|
-
|
|
705
|
-
|
|
229
|
+
expect(envelope.result[:code]).to eq(200)
|
|
230
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
231
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
232
|
+
end
|
|
233
|
+
end
|
|
706
234
|
|
|
235
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__nil___http_sync__true___callback___block_" do
|
|
236
|
+
VCR.use_cassette("examples/history/45", record: :none) do
|
|
237
|
+
envelope = @pubnub.history(channel: :demo, count: 10, http_sync: true, &@callback)
|
|
238
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
239
|
+
expect(envelope.error?).to eq false
|
|
707
240
|
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
envelope
|
|
711
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
712
|
-
expect(envelope.error?).to eq false
|
|
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"})
|
|
713
244
|
|
|
714
|
-
expect(envelope.
|
|
715
|
-
expect(envelope.
|
|
716
|
-
expect(envelope.
|
|
245
|
+
expect(envelope.result[:code]).to eq(200)
|
|
246
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
247
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
248
|
+
end
|
|
249
|
+
end
|
|
717
250
|
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
251
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__nil___http_sync__true___callback___lambda_" do
|
|
252
|
+
VCR.use_cassette("examples/history/46", record: :none) do
|
|
253
|
+
envelope = @pubnub.history(channel: :demo, count: 10, http_sync: true, callback: @callback)
|
|
254
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
255
|
+
expect(envelope.error?).to eq false
|
|
721
256
|
|
|
722
|
-
|
|
723
|
-
|
|
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"})
|
|
724
260
|
|
|
261
|
+
expect(envelope.result[:code]).to eq(200)
|
|
262
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
263
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
264
|
+
end
|
|
265
|
+
end
|
|
725
266
|
|
|
726
|
-
it
|
|
727
|
-
VCR.use_cassette(
|
|
728
|
-
envelope = @pubnub.history(channel:
|
|
729
|
-
|
|
730
|
-
expect(envelope.
|
|
267
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__nil___http_sync__false___callback__nil_" do
|
|
268
|
+
VCR.use_cassette("examples/history/44", record: :none) do
|
|
269
|
+
envelope = @pubnub.history(channel: :demo, count: 10, http_sync: false)
|
|
270
|
+
envelope = envelope.value
|
|
271
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
272
|
+
expect(envelope.error?).to eq false
|
|
731
273
|
|
|
732
|
-
expect(envelope.status[:code]).to eq(200)
|
|
733
|
-
expect(envelope.status[:category]).to eq(:ack)
|
|
734
|
-
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
|
+
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"})
|
|
735
277
|
|
|
736
|
-
expect(envelope.result[:code]).to eq(200)
|
|
737
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
738
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
278
|
+
expect(envelope.result[:code]).to eq(200)
|
|
279
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
280
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
281
|
+
end
|
|
282
|
+
end
|
|
739
283
|
|
|
740
|
-
|
|
741
|
-
|
|
284
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__nil___http_sync__false___callback___block_" do
|
|
285
|
+
VCR.use_cassette("examples/history/42", record: :none) do
|
|
286
|
+
envelope = @pubnub.history(channel: :demo, count: 10, 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
|
|
742
290
|
|
|
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"})
|
|
743
294
|
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
envelope
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
expect(envelope.error?).to eq false
|
|
295
|
+
expect(envelope.result[:code]).to eq(200)
|
|
296
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
297
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
298
|
+
end
|
|
299
|
+
end
|
|
750
300
|
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
301
|
+
it "__channel___demo___count__10___start__nil___end__nil___reverse__nil___http_sync__false___callback___lambda_" do
|
|
302
|
+
VCR.use_cassette("examples/history/43", record: :none) do
|
|
303
|
+
envelope = @pubnub.history(channel: :demo, count: 10, 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
|
|
754
307
|
|
|
755
|
-
expect(envelope.
|
|
756
|
-
expect(envelope.
|
|
757
|
-
expect(envelope.
|
|
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"})
|
|
758
311
|
|
|
759
|
-
|
|
760
|
-
|
|
312
|
+
expect(envelope.result[:code]).to eq(200)
|
|
313
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
314
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
315
|
+
end
|
|
316
|
+
end
|
|
761
317
|
|
|
318
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__true___http_sync__true___callback__nil_" do
|
|
319
|
+
VCR.use_cassette("examples/history/71", record: :none) do
|
|
320
|
+
envelope = @pubnub.history(channel: :demo, reverse: true, http_sync: true)
|
|
321
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
322
|
+
expect(envelope.error?).to eq false
|
|
762
323
|
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
envelope
|
|
766
|
-
envelope = envelope.value
|
|
767
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
768
|
-
expect(envelope.error?).to eq false
|
|
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"})
|
|
769
327
|
|
|
770
|
-
expect(envelope.
|
|
771
|
-
expect(envelope.
|
|
772
|
-
expect(envelope.
|
|
328
|
+
expect(envelope.result[:code]).to eq(200)
|
|
329
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
330
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
331
|
+
end
|
|
332
|
+
end
|
|
773
333
|
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
334
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__true___http_sync__true___callback___block_" do
|
|
335
|
+
VCR.use_cassette("examples/history/69", record: :none) do
|
|
336
|
+
envelope = @pubnub.history(channel: :demo, reverse: true, http_sync: true, &@callback)
|
|
337
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
338
|
+
expect(envelope.error?).to eq false
|
|
777
339
|
|
|
778
|
-
|
|
779
|
-
|
|
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"})
|
|
780
343
|
|
|
344
|
+
expect(envelope.result[:code]).to eq(200)
|
|
345
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
346
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
347
|
+
end
|
|
348
|
+
end
|
|
781
349
|
|
|
782
|
-
it
|
|
783
|
-
VCR.use_cassette(
|
|
784
|
-
envelope = @pubnub.history(channel:
|
|
785
|
-
envelope
|
|
786
|
-
expect(envelope.
|
|
787
|
-
expect(envelope.error?).to eq false
|
|
350
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__true___http_sync__true___callback___lambda_" do
|
|
351
|
+
VCR.use_cassette("examples/history/70", record: :none) do
|
|
352
|
+
envelope = @pubnub.history(channel: :demo, reverse: true, http_sync: true, callback: @callback)
|
|
353
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
354
|
+
expect(envelope.error?).to eq false
|
|
788
355
|
|
|
789
|
-
expect(envelope.status[:code]).to eq(200)
|
|
790
|
-
expect(envelope.status[:category]).to eq(:ack)
|
|
791
|
-
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
|
+
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"})
|
|
792
359
|
|
|
793
|
-
expect(envelope.result[:code]).to eq(200)
|
|
794
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
795
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
360
|
+
expect(envelope.result[:code]).to eq(200)
|
|
361
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
362
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
363
|
+
end
|
|
364
|
+
end
|
|
796
365
|
|
|
797
|
-
|
|
798
|
-
|
|
366
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__true___http_sync__false___callback__nil_" do
|
|
367
|
+
VCR.use_cassette("examples/history/68", record: :none) do
|
|
368
|
+
envelope = @pubnub.history(channel: :demo, reverse: true, http_sync: false)
|
|
369
|
+
envelope = envelope.value
|
|
370
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
371
|
+
expect(envelope.error?).to eq false
|
|
799
372
|
|
|
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"})
|
|
800
376
|
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
envelope
|
|
804
|
-
|
|
805
|
-
|
|
377
|
+
expect(envelope.result[:code]).to eq(200)
|
|
378
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
379
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
380
|
+
end
|
|
381
|
+
end
|
|
806
382
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
383
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__true___http_sync__false___callback___block_" do
|
|
384
|
+
VCR.use_cassette("examples/history/66", record: :none) do
|
|
385
|
+
envelope = @pubnub.history(channel: :demo, reverse: true, 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
|
|
810
389
|
|
|
811
|
-
expect(envelope.
|
|
812
|
-
expect(envelope.
|
|
813
|
-
expect(envelope.
|
|
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"})
|
|
814
393
|
|
|
815
|
-
|
|
816
|
-
|
|
394
|
+
expect(envelope.result[:code]).to eq(200)
|
|
395
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
396
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
397
|
+
end
|
|
398
|
+
end
|
|
817
399
|
|
|
400
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__true___http_sync__false___callback___lambda_" do
|
|
401
|
+
VCR.use_cassette("examples/history/67", record: :none) do
|
|
402
|
+
envelope = @pubnub.history(channel: :demo, reverse: true, 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
|
|
818
406
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
envelope
|
|
822
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
823
|
-
expect(envelope.error?).to eq false
|
|
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"})
|
|
824
410
|
|
|
825
|
-
expect(envelope.
|
|
826
|
-
expect(envelope.
|
|
827
|
-
expect(envelope.
|
|
411
|
+
expect(envelope.result[:code]).to eq(200)
|
|
412
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
413
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
414
|
+
end
|
|
415
|
+
end
|
|
828
416
|
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
417
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__false___http_sync__true___callback__nil_" do
|
|
418
|
+
VCR.use_cassette("examples/history/59", record: :none) do
|
|
419
|
+
envelope = @pubnub.history(channel: :demo, reverse: false, http_sync: true)
|
|
420
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
421
|
+
expect(envelope.error?).to eq false
|
|
832
422
|
|
|
833
|
-
|
|
834
|
-
|
|
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"})
|
|
835
426
|
|
|
427
|
+
expect(envelope.result[:code]).to eq(200)
|
|
428
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
429
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
430
|
+
end
|
|
431
|
+
end
|
|
836
432
|
|
|
837
|
-
it
|
|
838
|
-
VCR.use_cassette(
|
|
839
|
-
envelope = @pubnub.history(channel:
|
|
840
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
841
|
-
expect(envelope.error?).to eq false
|
|
433
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__false___http_sync__true___callback___block_" do
|
|
434
|
+
VCR.use_cassette("examples/history/57", record: :none) do
|
|
435
|
+
envelope = @pubnub.history(channel: :demo, reverse: false, http_sync: true, &@callback)
|
|
436
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
437
|
+
expect(envelope.error?).to eq false
|
|
842
438
|
|
|
843
|
-
expect(envelope.status[:code]).to eq(200)
|
|
844
|
-
expect(envelope.status[:category]).to eq(:ack)
|
|
845
|
-
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
|
+
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"})
|
|
846
442
|
|
|
847
|
-
expect(envelope.result[:code]).to eq(200)
|
|
848
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
849
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
443
|
+
expect(envelope.result[:code]).to eq(200)
|
|
444
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
445
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
446
|
+
end
|
|
447
|
+
end
|
|
850
448
|
|
|
851
|
-
|
|
852
|
-
|
|
449
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__false___http_sync__true___callback___lambda_" do
|
|
450
|
+
VCR.use_cassette("examples/history/58", record: :none) do
|
|
451
|
+
envelope = @pubnub.history(channel: :demo, reverse: false, http_sync: true, callback: @callback)
|
|
452
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
453
|
+
expect(envelope.error?).to eq false
|
|
853
454
|
|
|
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"})
|
|
854
458
|
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
envelope
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
expect(envelope.error?).to eq false
|
|
459
|
+
expect(envelope.result[:code]).to eq(200)
|
|
460
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
461
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
462
|
+
end
|
|
463
|
+
end
|
|
861
464
|
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
465
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__false___http_sync__false___callback__nil_" do
|
|
466
|
+
VCR.use_cassette("examples/history/56", record: :none) do
|
|
467
|
+
envelope = @pubnub.history(channel: :demo, reverse: false, http_sync: false)
|
|
468
|
+
envelope = envelope.value
|
|
469
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
470
|
+
expect(envelope.error?).to eq false
|
|
865
471
|
|
|
866
|
-
expect(envelope.
|
|
867
|
-
expect(envelope.
|
|
868
|
-
expect(envelope.
|
|
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"})
|
|
869
475
|
|
|
870
|
-
|
|
871
|
-
|
|
476
|
+
expect(envelope.result[:code]).to eq(200)
|
|
477
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
478
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
479
|
+
end
|
|
480
|
+
end
|
|
872
481
|
|
|
482
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__false___http_sync__false___callback___block_" do
|
|
483
|
+
VCR.use_cassette("examples/history/54", record: :none) do
|
|
484
|
+
envelope = @pubnub.history(channel: :demo, reverse: false, 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
|
|
873
488
|
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
envelope
|
|
877
|
-
envelope = envelope.value
|
|
878
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
879
|
-
expect(envelope.error?).to eq false
|
|
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"})
|
|
880
492
|
|
|
881
|
-
expect(envelope.
|
|
882
|
-
expect(envelope.
|
|
883
|
-
expect(envelope.
|
|
493
|
+
expect(envelope.result[:code]).to eq(200)
|
|
494
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
495
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
496
|
+
end
|
|
497
|
+
end
|
|
884
498
|
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
499
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__false___http_sync__false___callback___lambda_" do
|
|
500
|
+
VCR.use_cassette("examples/history/55", record: :none) do
|
|
501
|
+
envelope = @pubnub.history(channel: :demo, reverse: false, 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
|
|
888
505
|
|
|
889
|
-
|
|
890
|
-
|
|
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"})
|
|
891
509
|
|
|
510
|
+
expect(envelope.result[:code]).to eq(200)
|
|
511
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
512
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
513
|
+
end
|
|
514
|
+
end
|
|
892
515
|
|
|
893
|
-
it
|
|
894
|
-
VCR.use_cassette(
|
|
895
|
-
envelope = @pubnub.history(channel:
|
|
896
|
-
envelope
|
|
897
|
-
expect(envelope.
|
|
898
|
-
expect(envelope.error?).to eq false
|
|
516
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__nil___http_sync__true___callback__nil_" do
|
|
517
|
+
VCR.use_cassette("examples/history/65", record: :none) do
|
|
518
|
+
envelope = @pubnub.history(channel: :demo, http_sync: true)
|
|
519
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
520
|
+
expect(envelope.error?).to eq false
|
|
899
521
|
|
|
900
|
-
expect(envelope.status[:code]).to eq(200)
|
|
901
|
-
expect(envelope.status[:category]).to eq(:ack)
|
|
902
|
-
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"})
|
|
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"})
|
|
903
525
|
|
|
904
|
-
expect(envelope.result[:code]).to eq(200)
|
|
905
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
906
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
526
|
+
expect(envelope.result[:code]).to eq(200)
|
|
527
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
528
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
529
|
+
end
|
|
530
|
+
end
|
|
907
531
|
|
|
908
|
-
|
|
909
|
-
|
|
532
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__nil___http_sync__true___callback___block_" do
|
|
533
|
+
VCR.use_cassette("examples/history/63", record: :none) do
|
|
534
|
+
envelope = @pubnub.history(channel: :demo, http_sync: true, &@callback)
|
|
535
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
536
|
+
expect(envelope.error?).to eq false
|
|
910
537
|
|
|
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"})
|
|
911
541
|
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
envelope
|
|
915
|
-
|
|
916
|
-
|
|
542
|
+
expect(envelope.result[:code]).to eq(200)
|
|
543
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
544
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
545
|
+
end
|
|
546
|
+
end
|
|
917
547
|
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
548
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__nil___http_sync__true___callback___lambda_" do
|
|
549
|
+
VCR.use_cassette("examples/history/64", record: :none) do
|
|
550
|
+
envelope = @pubnub.history(channel: :demo, http_sync: true, callback: @callback)
|
|
551
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
552
|
+
expect(envelope.error?).to eq false
|
|
921
553
|
|
|
922
|
-
expect(envelope.
|
|
923
|
-
expect(envelope.
|
|
924
|
-
expect(envelope.
|
|
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"})
|
|
925
557
|
|
|
926
|
-
|
|
927
|
-
|
|
558
|
+
expect(envelope.result[:code]).to eq(200)
|
|
559
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
560
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
561
|
+
end
|
|
562
|
+
end
|
|
928
563
|
|
|
564
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__nil___http_sync__false___callback__nil_" do
|
|
565
|
+
VCR.use_cassette("examples/history/62", record: :none) do
|
|
566
|
+
envelope = @pubnub.history(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
|
|
929
570
|
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
envelope
|
|
933
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
934
|
-
expect(envelope.error?).to eq false
|
|
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"})
|
|
935
574
|
|
|
936
|
-
expect(envelope.
|
|
937
|
-
expect(envelope.
|
|
938
|
-
expect(envelope.
|
|
575
|
+
expect(envelope.result[:code]).to eq(200)
|
|
576
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
577
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
578
|
+
end
|
|
579
|
+
end
|
|
939
580
|
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
581
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__nil___http_sync__false___callback___block_" do
|
|
582
|
+
VCR.use_cassette("examples/history/60", record: :none) do
|
|
583
|
+
envelope = @pubnub.history(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
|
|
943
587
|
|
|
944
|
-
|
|
945
|
-
|
|
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"})
|
|
946
591
|
|
|
592
|
+
expect(envelope.result[:code]).to eq(200)
|
|
593
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
594
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
595
|
+
end
|
|
596
|
+
end
|
|
947
597
|
|
|
948
|
-
it
|
|
949
|
-
VCR.use_cassette(
|
|
950
|
-
envelope = @pubnub.history(channel:
|
|
951
|
-
|
|
952
|
-
expect(envelope.
|
|
598
|
+
it "__channel___demo___count__nil___start__nil___end__nil___reverse__nil___http_sync__false___callback___lambda_" do
|
|
599
|
+
VCR.use_cassette("examples/history/61", record: :none) do
|
|
600
|
+
envelope = @pubnub.history(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
|
|
953
604
|
|
|
954
|
-
expect(envelope.status[:code]).to eq(200)
|
|
955
|
-
expect(envelope.status[:category]).to eq(:ack)
|
|
956
|
-
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"})
|
|
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"})
|
|
957
608
|
|
|
958
|
-
expect(envelope.result[:code]).to eq(200)
|
|
959
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
960
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
609
|
+
expect(envelope.result[:code]).to eq(200)
|
|
610
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
611
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
612
|
+
end
|
|
613
|
+
end
|
|
961
614
|
|
|
962
|
-
|
|
963
|
-
|
|
615
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__true___http_sync__true___callback__nil_" do
|
|
616
|
+
VCR.use_cassette("examples/history/17", record: :none) do
|
|
617
|
+
envelope = @pubnub.history(channel: "demo", count: 10, reverse: true, http_sync: true)
|
|
618
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
619
|
+
expect(envelope.error?).to eq false
|
|
964
620
|
|
|
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"})
|
|
965
624
|
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
envelope
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
expect(envelope.error?).to eq false
|
|
625
|
+
expect(envelope.result[:code]).to eq(200)
|
|
626
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
627
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
628
|
+
end
|
|
629
|
+
end
|
|
972
630
|
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
631
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__true___http_sync__true___callback___block_" do
|
|
632
|
+
VCR.use_cassette("examples/history/15", record: :none) do
|
|
633
|
+
envelope = @pubnub.history(channel: "demo", count: 10, reverse: true, http_sync: true, &@callback)
|
|
634
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
635
|
+
expect(envelope.error?).to eq false
|
|
976
636
|
|
|
977
|
-
expect(envelope.
|
|
978
|
-
expect(envelope.
|
|
979
|
-
expect(envelope.
|
|
637
|
+
expect(envelope.status[:code]).to eq(200)
|
|
638
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
639
|
+
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"})
|
|
980
640
|
|
|
981
|
-
|
|
982
|
-
|
|
641
|
+
expect(envelope.result[:code]).to eq(200)
|
|
642
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
643
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
644
|
+
end
|
|
645
|
+
end
|
|
983
646
|
|
|
647
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__true___http_sync__true___callback___lambda_" do
|
|
648
|
+
VCR.use_cassette("examples/history/16", record: :none) do
|
|
649
|
+
envelope = @pubnub.history(channel: "demo", count: 10, reverse: true, http_sync: true, callback: @callback)
|
|
650
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
651
|
+
expect(envelope.error?).to eq false
|
|
984
652
|
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
envelope
|
|
988
|
-
envelope = envelope.value
|
|
989
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
990
|
-
expect(envelope.error?).to eq false
|
|
653
|
+
expect(envelope.status[:code]).to eq(200)
|
|
654
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
655
|
+
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"})
|
|
991
656
|
|
|
992
|
-
expect(envelope.
|
|
993
|
-
expect(envelope.
|
|
994
|
-
expect(envelope.
|
|
657
|
+
expect(envelope.result[:code]).to eq(200)
|
|
658
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
659
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
660
|
+
end
|
|
661
|
+
end
|
|
995
662
|
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
663
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__true___http_sync__false___callback__nil_" do
|
|
664
|
+
VCR.use_cassette("examples/history/14", record: :none) do
|
|
665
|
+
envelope = @pubnub.history(channel: "demo", count: 10, reverse: true, http_sync: false)
|
|
666
|
+
envelope = envelope.value
|
|
667
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
668
|
+
expect(envelope.error?).to eq false
|
|
999
669
|
|
|
1000
|
-
|
|
1001
|
-
|
|
670
|
+
expect(envelope.status[:code]).to eq(200)
|
|
671
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
672
|
+
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"})
|
|
1002
673
|
|
|
674
|
+
expect(envelope.result[:code]).to eq(200)
|
|
675
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
676
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
677
|
+
end
|
|
678
|
+
end
|
|
1003
679
|
|
|
1004
|
-
it
|
|
1005
|
-
VCR.use_cassette(
|
|
1006
|
-
envelope = @pubnub.history(channel:
|
|
1007
|
-
envelope = envelope.value
|
|
1008
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1009
|
-
expect(envelope.error?).to eq false
|
|
680
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__true___http_sync__false___callback___block_" do
|
|
681
|
+
VCR.use_cassette("examples/history/12", record: :none) do
|
|
682
|
+
envelope = @pubnub.history(channel: "demo", count: 10, reverse: true, http_sync: false, &@callback)
|
|
683
|
+
envelope = envelope.value
|
|
684
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
685
|
+
expect(envelope.error?).to eq false
|
|
1010
686
|
|
|
1011
|
-
expect(envelope.status[:code]).to eq(200)
|
|
1012
|
-
expect(envelope.status[:category]).to eq(:ack)
|
|
1013
|
-
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"})
|
|
687
|
+
expect(envelope.status[:code]).to eq(200)
|
|
688
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
689
|
+
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"})
|
|
1014
690
|
|
|
1015
|
-
expect(envelope.result[:code]).to eq(200)
|
|
1016
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
1017
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
691
|
+
expect(envelope.result[:code]).to eq(200)
|
|
692
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
693
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
694
|
+
end
|
|
695
|
+
end
|
|
1018
696
|
|
|
1019
|
-
|
|
1020
|
-
|
|
697
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__true___http_sync__false___callback___lambda_" do
|
|
698
|
+
VCR.use_cassette("examples/history/13", record: :none) do
|
|
699
|
+
envelope = @pubnub.history(channel: "demo", count: 10, reverse: true, http_sync: false, callback: @callback)
|
|
700
|
+
envelope = envelope.value
|
|
701
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
702
|
+
expect(envelope.error?).to eq false
|
|
1021
703
|
|
|
704
|
+
expect(envelope.status[:code]).to eq(200)
|
|
705
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
706
|
+
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"})
|
|
1022
707
|
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
envelope
|
|
1026
|
-
|
|
1027
|
-
|
|
708
|
+
expect(envelope.result[:code]).to eq(200)
|
|
709
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
710
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
711
|
+
end
|
|
712
|
+
end
|
|
1028
713
|
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
714
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__false___http_sync__true___callback__nil_" do
|
|
715
|
+
VCR.use_cassette("examples/history/5", record: :none) do
|
|
716
|
+
envelope = @pubnub.history(channel: "demo", count: 10, reverse: false, http_sync: true)
|
|
717
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
718
|
+
expect(envelope.error?).to eq false
|
|
1032
719
|
|
|
1033
|
-
expect(envelope.
|
|
1034
|
-
expect(envelope.
|
|
1035
|
-
expect(envelope.
|
|
720
|
+
expect(envelope.status[:code]).to eq(200)
|
|
721
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
722
|
+
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"})
|
|
1036
723
|
|
|
1037
|
-
|
|
1038
|
-
|
|
724
|
+
expect(envelope.result[:code]).to eq(200)
|
|
725
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
726
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
727
|
+
end
|
|
728
|
+
end
|
|
1039
729
|
|
|
730
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__false___http_sync__true___callback___block_" do
|
|
731
|
+
VCR.use_cassette("examples/history/3", record: :none) do
|
|
732
|
+
envelope = @pubnub.history(channel: "demo", count: 10, reverse: false, http_sync: true, &@callback)
|
|
733
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
734
|
+
expect(envelope.error?).to eq false
|
|
1040
735
|
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
envelope
|
|
1044
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1045
|
-
expect(envelope.error?).to eq false
|
|
736
|
+
expect(envelope.status[:code]).to eq(200)
|
|
737
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
738
|
+
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"})
|
|
1046
739
|
|
|
1047
|
-
expect(envelope.
|
|
1048
|
-
expect(envelope.
|
|
1049
|
-
expect(envelope.
|
|
740
|
+
expect(envelope.result[:code]).to eq(200)
|
|
741
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
742
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
743
|
+
end
|
|
744
|
+
end
|
|
1050
745
|
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
746
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__false___http_sync__true___callback___lambda_" do
|
|
747
|
+
VCR.use_cassette("examples/history/4", record: :none) do
|
|
748
|
+
envelope = @pubnub.history(channel: "demo", count: 10, reverse: false, http_sync: true, callback: @callback)
|
|
749
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
750
|
+
expect(envelope.error?).to eq false
|
|
1054
751
|
|
|
1055
|
-
|
|
1056
|
-
|
|
752
|
+
expect(envelope.status[:code]).to eq(200)
|
|
753
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
754
|
+
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"})
|
|
1057
755
|
|
|
756
|
+
expect(envelope.result[:code]).to eq(200)
|
|
757
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
758
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
759
|
+
end
|
|
760
|
+
end
|
|
1058
761
|
|
|
1059
|
-
it
|
|
1060
|
-
VCR.use_cassette(
|
|
1061
|
-
envelope = @pubnub.history(channel:
|
|
1062
|
-
|
|
1063
|
-
expect(envelope.
|
|
762
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__false___http_sync__false___callback__nil_" do
|
|
763
|
+
VCR.use_cassette("examples/history/2", record: :none) do
|
|
764
|
+
envelope = @pubnub.history(channel: "demo", count: 10, reverse: false, http_sync: false)
|
|
765
|
+
envelope = envelope.value
|
|
766
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
767
|
+
expect(envelope.error?).to eq false
|
|
1064
768
|
|
|
1065
|
-
expect(envelope.status[:code]).to eq(200)
|
|
1066
|
-
expect(envelope.status[:category]).to eq(:ack)
|
|
1067
|
-
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"})
|
|
769
|
+
expect(envelope.status[:code]).to eq(200)
|
|
770
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
771
|
+
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"})
|
|
1068
772
|
|
|
1069
|
-
expect(envelope.result[:code]).to eq(200)
|
|
1070
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
1071
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
773
|
+
expect(envelope.result[:code]).to eq(200)
|
|
774
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
775
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
776
|
+
end
|
|
777
|
+
end
|
|
1072
778
|
|
|
1073
|
-
|
|
1074
|
-
|
|
779
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__false___http_sync__false___callback___block_" do
|
|
780
|
+
VCR.use_cassette("examples/history/0", record: :none) do
|
|
781
|
+
envelope = @pubnub.history(channel: "demo", count: 10, reverse: false, http_sync: false, &@callback)
|
|
782
|
+
envelope = envelope.value
|
|
783
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
784
|
+
expect(envelope.error?).to eq false
|
|
1075
785
|
|
|
786
|
+
expect(envelope.status[:code]).to eq(200)
|
|
787
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
788
|
+
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"})
|
|
1076
789
|
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
envelope
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
expect(envelope.error?).to eq false
|
|
790
|
+
expect(envelope.result[:code]).to eq(200)
|
|
791
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
792
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
793
|
+
end
|
|
794
|
+
end
|
|
1083
795
|
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
796
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__false___http_sync__false___callback___lambda_" do
|
|
797
|
+
VCR.use_cassette("examples/history/1", record: :none) do
|
|
798
|
+
envelope = @pubnub.history(channel: "demo", count: 10, reverse: false, http_sync: false, callback: @callback)
|
|
799
|
+
envelope = envelope.value
|
|
800
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
801
|
+
expect(envelope.error?).to eq false
|
|
1087
802
|
|
|
1088
|
-
expect(envelope.
|
|
1089
|
-
expect(envelope.
|
|
1090
|
-
expect(envelope.
|
|
803
|
+
expect(envelope.status[:code]).to eq(200)
|
|
804
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
805
|
+
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"})
|
|
1091
806
|
|
|
1092
|
-
|
|
1093
|
-
|
|
807
|
+
expect(envelope.result[:code]).to eq(200)
|
|
808
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
809
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
810
|
+
end
|
|
811
|
+
end
|
|
1094
812
|
|
|
813
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__nil___http_sync__true___callback__nil_" do
|
|
814
|
+
VCR.use_cassette("examples/history/11", record: :none) do
|
|
815
|
+
envelope = @pubnub.history(channel: "demo", count: 10, http_sync: true)
|
|
816
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
817
|
+
expect(envelope.error?).to eq false
|
|
1095
818
|
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
envelope
|
|
1099
|
-
envelope = envelope.value
|
|
1100
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1101
|
-
expect(envelope.error?).to eq false
|
|
819
|
+
expect(envelope.status[:code]).to eq(200)
|
|
820
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
821
|
+
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"})
|
|
1102
822
|
|
|
1103
|
-
expect(envelope.
|
|
1104
|
-
expect(envelope.
|
|
1105
|
-
expect(envelope.
|
|
823
|
+
expect(envelope.result[:code]).to eq(200)
|
|
824
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
825
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
826
|
+
end
|
|
827
|
+
end
|
|
1106
828
|
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
829
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__nil___http_sync__true___callback___block_" do
|
|
830
|
+
VCR.use_cassette("examples/history/9", record: :none) do
|
|
831
|
+
envelope = @pubnub.history(channel: "demo", count: 10, http_sync: true, &@callback)
|
|
832
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
833
|
+
expect(envelope.error?).to eq false
|
|
1110
834
|
|
|
1111
|
-
|
|
1112
|
-
|
|
835
|
+
expect(envelope.status[:code]).to eq(200)
|
|
836
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
837
|
+
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"})
|
|
1113
838
|
|
|
839
|
+
expect(envelope.result[:code]).to eq(200)
|
|
840
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
841
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
842
|
+
end
|
|
843
|
+
end
|
|
1114
844
|
|
|
1115
|
-
it
|
|
1116
|
-
VCR.use_cassette(
|
|
1117
|
-
envelope = @pubnub.history(channel:
|
|
1118
|
-
envelope
|
|
1119
|
-
expect(envelope.
|
|
1120
|
-
expect(envelope.error?).to eq false
|
|
845
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__nil___http_sync__true___callback___lambda_" do
|
|
846
|
+
VCR.use_cassette("examples/history/10", record: :none) do
|
|
847
|
+
envelope = @pubnub.history(channel: "demo", count: 10, http_sync: true, callback: @callback)
|
|
848
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
849
|
+
expect(envelope.error?).to eq false
|
|
1121
850
|
|
|
1122
|
-
expect(envelope.status[:code]).to eq(200)
|
|
1123
|
-
expect(envelope.status[:category]).to eq(:ack)
|
|
1124
|
-
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"})
|
|
851
|
+
expect(envelope.status[:code]).to eq(200)
|
|
852
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
853
|
+
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"})
|
|
1125
854
|
|
|
1126
|
-
expect(envelope.result[:code]).to eq(200)
|
|
1127
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
1128
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
855
|
+
expect(envelope.result[:code]).to eq(200)
|
|
856
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
857
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
858
|
+
end
|
|
859
|
+
end
|
|
1129
860
|
|
|
1130
|
-
|
|
1131
|
-
|
|
861
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__nil___http_sync__false___callback__nil_" do
|
|
862
|
+
VCR.use_cassette("examples/history/8", record: :none) do
|
|
863
|
+
envelope = @pubnub.history(channel: "demo", count: 10, http_sync: false)
|
|
864
|
+
envelope = envelope.value
|
|
865
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
866
|
+
expect(envelope.error?).to eq false
|
|
1132
867
|
|
|
868
|
+
expect(envelope.status[:code]).to eq(200)
|
|
869
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
870
|
+
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"})
|
|
1133
871
|
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
envelope
|
|
1137
|
-
|
|
1138
|
-
|
|
872
|
+
expect(envelope.result[:code]).to eq(200)
|
|
873
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
874
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
875
|
+
end
|
|
876
|
+
end
|
|
1139
877
|
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
878
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__nil___http_sync__false___callback___block_" do
|
|
879
|
+
VCR.use_cassette("examples/history/6", record: :none) do
|
|
880
|
+
envelope = @pubnub.history(channel: "demo", count: 10, http_sync: false, &@callback)
|
|
881
|
+
envelope = envelope.value
|
|
882
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
883
|
+
expect(envelope.error?).to eq false
|
|
1143
884
|
|
|
1144
|
-
expect(envelope.
|
|
1145
|
-
expect(envelope.
|
|
1146
|
-
expect(envelope.
|
|
885
|
+
expect(envelope.status[:code]).to eq(200)
|
|
886
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
887
|
+
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"})
|
|
1147
888
|
|
|
1148
|
-
|
|
1149
|
-
|
|
889
|
+
expect(envelope.result[:code]).to eq(200)
|
|
890
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
891
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
892
|
+
end
|
|
893
|
+
end
|
|
1150
894
|
|
|
895
|
+
it "__channel___demo____count__10___start__nil___end__nil___reverse__nil___http_sync__false___callback___lambda_" do
|
|
896
|
+
VCR.use_cassette("examples/history/7", record: :none) do
|
|
897
|
+
envelope = @pubnub.history(channel: "demo", count: 10, http_sync: false, callback: @callback)
|
|
898
|
+
envelope = envelope.value
|
|
899
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
900
|
+
expect(envelope.error?).to eq false
|
|
1151
901
|
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
envelope
|
|
1155
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1156
|
-
expect(envelope.error?).to eq false
|
|
902
|
+
expect(envelope.status[:code]).to eq(200)
|
|
903
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
904
|
+
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"})
|
|
1157
905
|
|
|
1158
|
-
expect(envelope.
|
|
1159
|
-
expect(envelope.
|
|
1160
|
-
expect(envelope.
|
|
906
|
+
expect(envelope.result[:code]).to eq(200)
|
|
907
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
908
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
909
|
+
end
|
|
910
|
+
end
|
|
1161
911
|
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
912
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__true___http_sync__true___callback__nil_" do
|
|
913
|
+
VCR.use_cassette("examples/history/35", record: :none) do
|
|
914
|
+
envelope = @pubnub.history(channel: "demo", reverse: true, http_sync: true)
|
|
915
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
916
|
+
expect(envelope.error?).to eq false
|
|
1165
917
|
|
|
1166
|
-
|
|
1167
|
-
|
|
918
|
+
expect(envelope.status[:code]).to eq(200)
|
|
919
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
920
|
+
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"})
|
|
1168
921
|
|
|
922
|
+
expect(envelope.result[:code]).to eq(200)
|
|
923
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
924
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
925
|
+
end
|
|
926
|
+
end
|
|
1169
927
|
|
|
1170
|
-
it
|
|
1171
|
-
VCR.use_cassette(
|
|
1172
|
-
envelope = @pubnub.history(channel:
|
|
1173
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1174
|
-
expect(envelope.error?).to eq false
|
|
928
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__true___http_sync__true___callback___block_" do
|
|
929
|
+
VCR.use_cassette("examples/history/33", record: :none) do
|
|
930
|
+
envelope = @pubnub.history(channel: "demo", reverse: true, http_sync: true, &@callback)
|
|
931
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
932
|
+
expect(envelope.error?).to eq false
|
|
1175
933
|
|
|
1176
|
-
expect(envelope.status[:code]).to eq(200)
|
|
1177
|
-
expect(envelope.status[:category]).to eq(:ack)
|
|
1178
|
-
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"})
|
|
934
|
+
expect(envelope.status[:code]).to eq(200)
|
|
935
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
936
|
+
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"})
|
|
1179
937
|
|
|
1180
|
-
expect(envelope.result[:code]).to eq(200)
|
|
1181
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
1182
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
938
|
+
expect(envelope.result[:code]).to eq(200)
|
|
939
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
940
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
941
|
+
end
|
|
942
|
+
end
|
|
1183
943
|
|
|
1184
|
-
|
|
1185
|
-
|
|
944
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__true___http_sync__true___callback___lambda_" do
|
|
945
|
+
VCR.use_cassette("examples/history/34", record: :none) do
|
|
946
|
+
envelope = @pubnub.history(channel: "demo", reverse: true, http_sync: true, callback: @callback)
|
|
947
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
948
|
+
expect(envelope.error?).to eq false
|
|
1186
949
|
|
|
950
|
+
expect(envelope.status[:code]).to eq(200)
|
|
951
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
952
|
+
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"})
|
|
1187
953
|
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
envelope
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
expect(envelope.error?).to eq false
|
|
954
|
+
expect(envelope.result[:code]).to eq(200)
|
|
955
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
956
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
957
|
+
end
|
|
958
|
+
end
|
|
1194
959
|
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
960
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__true___http_sync__false___callback__nil_" do
|
|
961
|
+
VCR.use_cassette("examples/history/32", record: :none) do
|
|
962
|
+
envelope = @pubnub.history(channel: "demo", reverse: true, http_sync: false)
|
|
963
|
+
envelope = envelope.value
|
|
964
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
965
|
+
expect(envelope.error?).to eq false
|
|
1198
966
|
|
|
1199
|
-
expect(envelope.
|
|
1200
|
-
expect(envelope.
|
|
1201
|
-
expect(envelope.
|
|
967
|
+
expect(envelope.status[:code]).to eq(200)
|
|
968
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
969
|
+
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"})
|
|
1202
970
|
|
|
1203
|
-
|
|
1204
|
-
|
|
971
|
+
expect(envelope.result[:code]).to eq(200)
|
|
972
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
973
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
974
|
+
end
|
|
975
|
+
end
|
|
1205
976
|
|
|
977
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__true___http_sync__false___callback___block_" do
|
|
978
|
+
VCR.use_cassette("examples/history/30", record: :none) do
|
|
979
|
+
envelope = @pubnub.history(channel: "demo", reverse: true, http_sync: false, &@callback)
|
|
980
|
+
envelope = envelope.value
|
|
981
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
982
|
+
expect(envelope.error?).to eq false
|
|
1206
983
|
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
envelope
|
|
1210
|
-
envelope = envelope.value
|
|
1211
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1212
|
-
expect(envelope.error?).to eq false
|
|
984
|
+
expect(envelope.status[:code]).to eq(200)
|
|
985
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
986
|
+
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"})
|
|
1213
987
|
|
|
1214
|
-
expect(envelope.
|
|
1215
|
-
expect(envelope.
|
|
1216
|
-
expect(envelope.
|
|
988
|
+
expect(envelope.result[:code]).to eq(200)
|
|
989
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
990
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
991
|
+
end
|
|
992
|
+
end
|
|
1217
993
|
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
994
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__true___http_sync__false___callback___lambda_" do
|
|
995
|
+
VCR.use_cassette("examples/history/31", record: :none) do
|
|
996
|
+
envelope = @pubnub.history(channel: "demo", reverse: true, http_sync: false, callback: @callback)
|
|
997
|
+
envelope = envelope.value
|
|
998
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
999
|
+
expect(envelope.error?).to eq false
|
|
1221
1000
|
|
|
1222
|
-
|
|
1223
|
-
|
|
1001
|
+
expect(envelope.status[:code]).to eq(200)
|
|
1002
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
1003
|
+
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"})
|
|
1224
1004
|
|
|
1005
|
+
expect(envelope.result[:code]).to eq(200)
|
|
1006
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
1007
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
1008
|
+
end
|
|
1009
|
+
end
|
|
1225
1010
|
|
|
1226
|
-
it
|
|
1227
|
-
VCR.use_cassette(
|
|
1228
|
-
envelope = @pubnub.history(channel:
|
|
1229
|
-
envelope
|
|
1230
|
-
expect(envelope.
|
|
1231
|
-
expect(envelope.error?).to eq false
|
|
1011
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__false___http_sync__true___callback__nil_" do
|
|
1012
|
+
VCR.use_cassette("examples/history/23", record: :none) do
|
|
1013
|
+
envelope = @pubnub.history(channel: "demo", reverse: false, http_sync: true)
|
|
1014
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1015
|
+
expect(envelope.error?).to eq false
|
|
1232
1016
|
|
|
1233
|
-
expect(envelope.status[:code]).to eq(200)
|
|
1234
|
-
expect(envelope.status[:category]).to eq(:ack)
|
|
1235
|
-
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"})
|
|
1017
|
+
expect(envelope.status[:code]).to eq(200)
|
|
1018
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
1019
|
+
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"})
|
|
1236
1020
|
|
|
1237
|
-
expect(envelope.result[:code]).to eq(200)
|
|
1238
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
1239
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
1021
|
+
expect(envelope.result[:code]).to eq(200)
|
|
1022
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
1023
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
1024
|
+
end
|
|
1025
|
+
end
|
|
1240
1026
|
|
|
1241
|
-
|
|
1242
|
-
|
|
1027
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__false___http_sync__true___callback___block_" do
|
|
1028
|
+
VCR.use_cassette("examples/history/21", record: :none) do
|
|
1029
|
+
envelope = @pubnub.history(channel: "demo", reverse: false, http_sync: true, &@callback)
|
|
1030
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1031
|
+
expect(envelope.error?).to eq false
|
|
1243
1032
|
|
|
1033
|
+
expect(envelope.status[:code]).to eq(200)
|
|
1034
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
1035
|
+
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"})
|
|
1244
1036
|
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
envelope
|
|
1248
|
-
|
|
1249
|
-
|
|
1037
|
+
expect(envelope.result[:code]).to eq(200)
|
|
1038
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
1039
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
1040
|
+
end
|
|
1041
|
+
end
|
|
1250
1042
|
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1043
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__false___http_sync__true___callback___lambda_" do
|
|
1044
|
+
VCR.use_cassette("examples/history/22", record: :none) do
|
|
1045
|
+
envelope = @pubnub.history(channel: "demo", reverse: false, http_sync: true, callback: @callback)
|
|
1046
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1047
|
+
expect(envelope.error?).to eq false
|
|
1254
1048
|
|
|
1255
|
-
expect(envelope.
|
|
1256
|
-
expect(envelope.
|
|
1257
|
-
expect(envelope.
|
|
1049
|
+
expect(envelope.status[:code]).to eq(200)
|
|
1050
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
1051
|
+
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"})
|
|
1258
1052
|
|
|
1259
|
-
|
|
1260
|
-
|
|
1053
|
+
expect(envelope.result[:code]).to eq(200)
|
|
1054
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
1055
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
1056
|
+
end
|
|
1057
|
+
end
|
|
1261
1058
|
|
|
1059
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__false___http_sync__false___callback__nil_" do
|
|
1060
|
+
VCR.use_cassette("examples/history/20", record: :none) do
|
|
1061
|
+
envelope = @pubnub.history(channel: "demo", reverse: false, http_sync: false)
|
|
1062
|
+
envelope = envelope.value
|
|
1063
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1064
|
+
expect(envelope.error?).to eq false
|
|
1262
1065
|
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
envelope
|
|
1266
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1267
|
-
expect(envelope.error?).to eq false
|
|
1066
|
+
expect(envelope.status[:code]).to eq(200)
|
|
1067
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
1068
|
+
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"})
|
|
1268
1069
|
|
|
1269
|
-
expect(envelope.
|
|
1270
|
-
expect(envelope.
|
|
1271
|
-
expect(envelope.
|
|
1070
|
+
expect(envelope.result[:code]).to eq(200)
|
|
1071
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
1072
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
1073
|
+
end
|
|
1074
|
+
end
|
|
1272
1075
|
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1076
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__false___http_sync__false___callback___block_" do
|
|
1077
|
+
VCR.use_cassette("examples/history/18", record: :none) do
|
|
1078
|
+
envelope = @pubnub.history(channel: "demo", reverse: false, http_sync: false, &@callback)
|
|
1079
|
+
envelope = envelope.value
|
|
1080
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1081
|
+
expect(envelope.error?).to eq false
|
|
1276
1082
|
|
|
1277
|
-
|
|
1278
|
-
|
|
1083
|
+
expect(envelope.status[:code]).to eq(200)
|
|
1084
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
1085
|
+
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"})
|
|
1279
1086
|
|
|
1087
|
+
expect(envelope.result[:code]).to eq(200)
|
|
1088
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
1089
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
1090
|
+
end
|
|
1091
|
+
end
|
|
1280
1092
|
|
|
1281
|
-
it
|
|
1282
|
-
VCR.use_cassette(
|
|
1283
|
-
envelope = @pubnub.history(channel:
|
|
1284
|
-
|
|
1285
|
-
expect(envelope.
|
|
1093
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__false___http_sync__false___callback___lambda_" do
|
|
1094
|
+
VCR.use_cassette("examples/history/19", record: :none) do
|
|
1095
|
+
envelope = @pubnub.history(channel: "demo", reverse: false, http_sync: false, callback: @callback)
|
|
1096
|
+
envelope = envelope.value
|
|
1097
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1098
|
+
expect(envelope.error?).to eq false
|
|
1286
1099
|
|
|
1287
|
-
expect(envelope.status[:code]).to eq(200)
|
|
1288
|
-
expect(envelope.status[:category]).to eq(:ack)
|
|
1289
|
-
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"})
|
|
1100
|
+
expect(envelope.status[:code]).to eq(200)
|
|
1101
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
1102
|
+
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"})
|
|
1290
1103
|
|
|
1291
|
-
expect(envelope.result[:code]).to eq(200)
|
|
1292
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
1293
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
1104
|
+
expect(envelope.result[:code]).to eq(200)
|
|
1105
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
1106
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
1107
|
+
end
|
|
1108
|
+
end
|
|
1294
1109
|
|
|
1295
|
-
|
|
1296
|
-
|
|
1110
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__nil___http_sync__true___callback__nil_" do
|
|
1111
|
+
VCR.use_cassette("examples/history/29", record: :none) do
|
|
1112
|
+
envelope = @pubnub.history(channel: "demo", http_sync: true)
|
|
1113
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1114
|
+
expect(envelope.error?).to eq false
|
|
1297
1115
|
|
|
1116
|
+
expect(envelope.status[:code]).to eq(200)
|
|
1117
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
1118
|
+
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"})
|
|
1298
1119
|
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
envelope
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
expect(envelope.error?).to eq false
|
|
1120
|
+
expect(envelope.result[:code]).to eq(200)
|
|
1121
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
1122
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
1123
|
+
end
|
|
1124
|
+
end
|
|
1305
1125
|
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1126
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__nil___http_sync__true___callback___block_" do
|
|
1127
|
+
VCR.use_cassette("examples/history/27", record: :none) do
|
|
1128
|
+
envelope = @pubnub.history(channel: "demo", http_sync: true, &@callback)
|
|
1129
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1130
|
+
expect(envelope.error?).to eq false
|
|
1309
1131
|
|
|
1310
|
-
expect(envelope.
|
|
1311
|
-
expect(envelope.
|
|
1312
|
-
expect(envelope.
|
|
1132
|
+
expect(envelope.status[:code]).to eq(200)
|
|
1133
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
1134
|
+
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"})
|
|
1313
1135
|
|
|
1314
|
-
|
|
1315
|
-
|
|
1136
|
+
expect(envelope.result[:code]).to eq(200)
|
|
1137
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
1138
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
1139
|
+
end
|
|
1140
|
+
end
|
|
1316
1141
|
|
|
1142
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__nil___http_sync__true___callback___lambda_" do
|
|
1143
|
+
VCR.use_cassette("examples/history/28", record: :none) do
|
|
1144
|
+
envelope = @pubnub.history(channel: "demo", http_sync: true, callback: @callback)
|
|
1145
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1146
|
+
expect(envelope.error?).to eq false
|
|
1317
1147
|
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
envelope
|
|
1321
|
-
envelope = envelope.value
|
|
1322
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1323
|
-
expect(envelope.error?).to eq false
|
|
1148
|
+
expect(envelope.status[:code]).to eq(200)
|
|
1149
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
1150
|
+
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"})
|
|
1324
1151
|
|
|
1325
|
-
expect(envelope.
|
|
1326
|
-
expect(envelope.
|
|
1327
|
-
expect(envelope.
|
|
1152
|
+
expect(envelope.result[:code]).to eq(200)
|
|
1153
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
1154
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
1155
|
+
end
|
|
1156
|
+
end
|
|
1328
1157
|
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1158
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__nil___http_sync__false___callback__nil_" do
|
|
1159
|
+
VCR.use_cassette("examples/history/26", record: :none) do
|
|
1160
|
+
envelope = @pubnub.history(channel: "demo", http_sync: false)
|
|
1161
|
+
envelope = envelope.value
|
|
1162
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1163
|
+
expect(envelope.error?).to eq false
|
|
1332
1164
|
|
|
1333
|
-
|
|
1334
|
-
|
|
1165
|
+
expect(envelope.status[:code]).to eq(200)
|
|
1166
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
1167
|
+
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"})
|
|
1335
1168
|
|
|
1169
|
+
expect(envelope.result[:code]).to eq(200)
|
|
1170
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
1171
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
1172
|
+
end
|
|
1173
|
+
end
|
|
1336
1174
|
|
|
1337
|
-
it
|
|
1338
|
-
VCR.use_cassette(
|
|
1339
|
-
envelope = @pubnub.history(channel:
|
|
1340
|
-
envelope = envelope.value
|
|
1341
|
-
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1342
|
-
expect(envelope.error?).to eq false
|
|
1175
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__nil___http_sync__false___callback___block_" do
|
|
1176
|
+
VCR.use_cassette("examples/history/24", record: :none) do
|
|
1177
|
+
envelope = @pubnub.history(channel: "demo", http_sync: false, &@callback)
|
|
1178
|
+
envelope = envelope.value
|
|
1179
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1180
|
+
expect(envelope.error?).to eq false
|
|
1343
1181
|
|
|
1344
|
-
expect(envelope.status[:code]).to eq(200)
|
|
1345
|
-
expect(envelope.status[:category]).to eq(:ack)
|
|
1346
|
-
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"})
|
|
1182
|
+
expect(envelope.status[:code]).to eq(200)
|
|
1183
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
1184
|
+
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"})
|
|
1347
1185
|
|
|
1348
|
-
expect(envelope.result[:code]).to eq(200)
|
|
1349
|
-
expect(envelope.result[:operation]).to eq(:history)
|
|
1350
|
-
expect(envelope.result[:data]).to eq({:messages=>[{"text"=>"Enter Message Here"}], :end=>14641838216911695, :start=>14641838216911695})
|
|
1186
|
+
expect(envelope.result[:code]).to eq(200)
|
|
1187
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
1188
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
1189
|
+
end
|
|
1190
|
+
end
|
|
1351
1191
|
|
|
1352
|
-
|
|
1353
|
-
|
|
1192
|
+
it "__channel___demo____count__nil___start__nil___end__nil___reverse__nil___http_sync__false___callback___lambda_" do
|
|
1193
|
+
VCR.use_cassette("examples/history/25", record: :none) do
|
|
1194
|
+
envelope = @pubnub.history(channel: "demo", http_sync: false, callback: @callback)
|
|
1195
|
+
envelope = envelope.value
|
|
1196
|
+
expect(envelope.is_a?(Pubnub::Envelope)).to eq true
|
|
1197
|
+
expect(envelope.error?).to eq false
|
|
1354
1198
|
|
|
1199
|
+
expect(envelope.status[:code]).to eq(200)
|
|
1200
|
+
expect(envelope.status[:category]).to eq(:ack)
|
|
1201
|
+
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"})
|
|
1355
1202
|
|
|
1203
|
+
expect(envelope.result[:code]).to eq(200)
|
|
1204
|
+
expect(envelope.result[:operation]).to eq(:history)
|
|
1205
|
+
expect(envelope.result[:data]).to eq({:messages => [{"text" => "Enter Message Here"}], :end => 14641838216911695, :start => 14641838216911695})
|
|
1206
|
+
end
|
|
1207
|
+
end
|
|
1356
1208
|
end
|