pubnub 4.1.5 → 4.1.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

@@ -0,0 +1,39 @@
1
+ require "spec_helper"
2
+
3
+ describe Pubnub::Signal do
4
+ it_behaves_like "an event"
5
+
6
+ context "given basic parameters" do
7
+ before :each do
8
+ @pubnub = Pubnub::Client.new(
9
+ subscribe_key: "demo",
10
+ publish_key: "demo",
11
+ auth_key: "ruby-test-auth",
12
+ uuid: "ruby-test-uuid",
13
+ )
14
+ end
15
+ it "works" do
16
+ VCR.use_cassette("lib/events/signal", record: :once) do
17
+ envelope = @pubnub.signal(
18
+ channel: :demo,
19
+ message: "whatever",
20
+ ).value
21
+
22
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
23
+ end
24
+ end
25
+
26
+ it "forms valid ErrorEnvelope on error" do
27
+ VCR.use_cassette("lib/events/signal-error", record: :once) do
28
+ envelope = @pubnub.signal(
29
+ channel: :demo,
30
+ message: "0" * 50
31
+ ).value
32
+
33
+ expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
34
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
35
+ end
36
+ end
37
+ end
38
+
39
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubnub
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.5
4
+ version: 4.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - PubNub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-29 00:00:00.000000000 Z
11
+ date: 2019-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -10506,6 +10506,8 @@ files:
10506
10506
  - fixtures/vcr_cassettes/lib/events/publish.yml
10507
10507
  - fixtures/vcr_cassettes/lib/events/revoke-error.yml
10508
10508
  - fixtures/vcr_cassettes/lib/events/revoke.yml
10509
+ - fixtures/vcr_cassettes/lib/events/signal-error.yml
10510
+ - fixtures/vcr_cassettes/lib/events/signal.yml
10509
10511
  - fixtures/vcr_cassettes/lib/events/state-error.yml
10510
10512
  - fixtures/vcr_cassettes/lib/events/state.yml
10511
10513
  - fixtures/vcr_cassettes/lib/events/subscribe-async-error.yml
@@ -10587,6 +10589,7 @@ files:
10587
10589
  - lib/pubnub/events/remove_device_from_push.rb
10588
10590
  - lib/pubnub/events/revoke.rb
10589
10591
  - lib/pubnub/events/set_state.rb
10592
+ - lib/pubnub/events/signal.rb
10590
10593
  - lib/pubnub/events/state.rb
10591
10594
  - lib/pubnub/events/subscribe.rb
10592
10595
  - lib/pubnub/events/time.rb
@@ -10624,6 +10627,7 @@ files:
10624
10627
  - lib/pubnub/validators/push.rb
10625
10628
  - lib/pubnub/validators/revoke.rb
10626
10629
  - lib/pubnub/validators/set_state.rb
10630
+ - lib/pubnub/validators/signal.rb
10627
10631
  - lib/pubnub/validators/state.rb
10628
10632
  - lib/pubnub/validators/subscribe.rb
10629
10633
  - lib/pubnub/validators/time.rb
@@ -10665,6 +10669,7 @@ files:
10665
10669
  - spec/lib/events/presence_spec.rb
10666
10670
  - spec/lib/events/publish_spec.rb
10667
10671
  - spec/lib/events/revoke_spec.rb
10672
+ - spec/lib/events/signal_spec.rb
10668
10673
  - spec/lib/events/state_spec.rb
10669
10674
  - spec/lib/events/subscribe_spec.rb
10670
10675
  - spec/lib/events/time_spec.rb
@@ -10738,6 +10743,7 @@ test_files:
10738
10743
  - spec/lib/events/presence_spec.rb
10739
10744
  - spec/lib/events/publish_spec.rb
10740
10745
  - spec/lib/events/revoke_spec.rb
10746
+ - spec/lib/events/signal_spec.rb
10741
10747
  - spec/lib/events/state_spec.rb
10742
10748
  - spec/lib/events/subscribe_spec.rb
10743
10749
  - spec/lib/events/time_spec.rb