pubnub 4.1.2 → 4.1.5

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

Potentially problematic release.


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

Files changed (43) hide show
  1. checksums.yaml +5 -5
  2. data/.pubnub.yml +8 -1
  3. data/.rubocop.yml +3 -1
  4. data/.travis.yml +2 -1
  5. data/CHANGELOG.md +4 -0
  6. data/Gemfile.lock +74 -68
  7. data/README.md +1 -1
  8. data/VERSION +1 -2
  9. data/lib/pubnub/events/add_channels_to_push.rb +3 -2
  10. data/lib/pubnub/events/list_push_provisions.rb +2 -2
  11. data/lib/pubnub/events/remove_channels_from_push.rb +3 -2
  12. data/lib/pubnub/events/remove_device_from_push.rb +2 -2
  13. data/lib/pubnub/schemas/envelope_schema.rb +54 -27
  14. data/lib/pubnub/subscribe_event/formatter.rb +2 -2
  15. data/lib/pubnub/validators/push.rb +5 -5
  16. data/lib/pubnub/version.rb +1 -1
  17. data/pubnub.gemspec +6 -5
  18. data/spec/examples/audit_examples_spec.rb +1 -1
  19. data/spec/examples/grant_examples_spec.rb +1 -1
  20. data/spec/examples/publish_with_ttl_spec.rb +2 -2
  21. data/spec/examples/revoke_examples_spec.rb +1 -1
  22. data/spec/lib/custom_retries_examples_spec.rb +1 -1
  23. data/spec/lib/events/audit_spec.rb +7 -7
  24. data/spec/lib/events/channel_registration_spec.rb +3 -3
  25. data/spec/lib/events/delete_messages_spec.rb +2 -2
  26. data/spec/lib/events/grant_spec.rb +6 -6
  27. data/spec/lib/events/heartbeat_spec.rb +2 -2
  28. data/spec/lib/events/here_now_spec.rb +3 -3
  29. data/spec/lib/events/history_spec.rb +3 -3
  30. data/spec/lib/events/leave_spec.rb +2 -2
  31. data/spec/lib/events/presence_spec.rb +5 -5
  32. data/spec/lib/events/publish_spec.rb +2 -2
  33. data/spec/lib/events/revoke_spec.rb +5 -5
  34. data/spec/lib/events/state_spec.rb +3 -3
  35. data/spec/lib/events/subscribe_spec.rb +12 -12
  36. data/spec/lib/events/time_spec.rb +2 -2
  37. data/spec/lib/events/timeout_handling_spec.rb +1 -1
  38. data/spec/lib/events/where_now_spec.rb +3 -3
  39. data/spec/lib/signatures_spec.rb +13 -13
  40. data/spec/lib/ssl_error_spec.rb +1 -1
  41. data/spec/lib/super_admin_spec.rb +1 -1
  42. data/spec/spec_expectations.rb +12 -1
  43. metadata +14 -15
@@ -134,11 +134,11 @@ module Pubnub
134
134
  # return if envelopes.size == 1 && envelopes.first.timetoken_update?
135
135
 
136
136
  results_validation = envelopes.map(&:result).map do |result|
137
- Pubnub::Schemas::Envelope::ResultSchema.call result
137
+ Pubnub::Schemas::Envelope::ResultSchema.new.call result
138
138
  end
139
139
 
140
140
  statuses_validation = envelopes.map(&:status).map do |status|
141
- Pubnub::Schemas::Envelope::StatusSchema.call status
141
+ Pubnub::Schemas::Envelope::StatusSchema.new.call status
142
142
  end
143
143
 
144
144
  if (results_validation + statuses_validation).map(&:failure?).index(true)
@@ -6,12 +6,12 @@ module Pubnub
6
6
  # Push related events validator
7
7
  module Push
8
8
  include CommonValidator
9
- BASIC_PARAMS = %i[push_token type uuid].freeze
9
+ BASIC_PARAMS = %i[push_token type].freeze
10
10
  PARAMS_MAP = {
11
- Pubnub::Constants::OPERATION_ADD_CHANNELS_TO_PUSH => BASIC_PARAMS + %i[add auth],
11
+ Pubnub::Constants::OPERATION_ADD_CHANNELS_TO_PUSH => BASIC_PARAMS + %i[add],
12
12
  Pubnub::Constants::OPERATION_LIST_PUSH_PROVISIONS => BASIC_PARAMS,
13
- Pubnub::Constants::OPERATION_REMOVE_CHANNELS_FROM_PUSH => BASIC_PARAMS + %i[remove auth],
14
- Pubnub::Constants::OPERATION_REMOVE_DEVICE_FROM_PUSH => BASIC_PARAMS - [:uuid]
13
+ Pubnub::Constants::OPERATION_REMOVE_CHANNELS_FROM_PUSH => BASIC_PARAMS + %i[remove],
14
+ Pubnub::Constants::OPERATION_REMOVE_DEVICE_FROM_PUSH => BASIC_PARAMS
15
15
  }.freeze
16
16
 
17
17
  def validate!
@@ -23,7 +23,7 @@ module Pubnub
23
23
  private
24
24
 
25
25
  def validate_channel!
26
- missing_params = required_params - @params.keys
26
+ missing_params = required_params - @given_options.keys
27
27
  return if missing_params.empty?
28
28
 
29
29
  raise(
@@ -1,4 +1,4 @@
1
1
  # Toplevel Pubnub module.
2
2
  module Pubnub
3
- VERSION = '4.1.2'.freeze
3
+ VERSION = '4.1.5'.freeze
4
4
  end
@@ -16,12 +16,13 @@ Gem::Specification.new do |spec|
16
16
  spec.executables = spec.files.grep(%r{^bin\/}) { |f| File.basename(f) }
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)\/})
18
18
  spec.require_paths = ['lib']
19
+ spec.required_ruby_version = '>= 2.4'
19
20
 
20
- spec.add_dependency 'concurrent-ruby', '~> 1.0.5'
21
- spec.add_dependency 'concurrent-ruby-edge', '~> 0.3.1'
22
- spec.add_dependency 'dry-validation', '~> 0.10'
21
+ spec.add_dependency 'concurrent-ruby', '~> 1.1.5'
22
+ spec.add_dependency 'concurrent-ruby-edge', '~> 0.5.0'
23
+ spec.add_dependency 'dry-validation', '~> 1.0'
23
24
  spec.add_dependency 'httpclient', '~> 2.8', '>= 2.8.3'
24
- spec.add_dependency 'json', '>= 1.8', '< 3'
25
- spec.add_dependency 'timers', '>= 4.1.1'
25
+ spec.add_dependency 'json', '>= 2.2.0', '< 3'
26
+ spec.add_dependency 'timers', '>= 4.3.0'
26
27
  spec.add_development_dependency 'bundler', '~> 1.7'
27
28
  end
@@ -11,7 +11,7 @@ describe Pubnub::Audit do
11
11
  @pubnub = Pubnub.new(
12
12
  publish_key: "pub-a-mock-key",
13
13
  subscribe_key: "sub-a-mock-key",
14
- secret_key: "sec-c-OWIyYmVlYWYtYWMxMS00OTcxLTlhZDAtZDBlYTM4ODE1MWUy",
14
+ secret_key: "sec-a-mock-key",
15
15
  uuid: "ruby-test-uuid-client-one",
16
16
  auth_key: "ruby-test-auth-client-one",
17
17
  )
@@ -11,7 +11,7 @@ describe Pubnub::Grant do
11
11
  @pubnub = Pubnub.new(
12
12
  publish_key: "pub-a-mock-key",
13
13
  subscribe_key: "sub-a-mock-key",
14
- secret_key: "sec-c-OWIyYmVlYWYtYWMxMS00OTcxLTlhZDAtZDBlYTM4ODE1MWUy",
14
+ secret_key: "sec-a-mock-key",
15
15
  uuid: "ruby-test-uuid-client-one",
16
16
  auth_key: "ruby-test-auth-client-one",
17
17
  )
@@ -18,7 +18,7 @@ describe Pubnub::Publish do
18
18
  envelope = @pubnub.publish(channel: :demo, message: :whatever, ttl: 10, http_sync: true)
19
19
 
20
20
  expect(envelope.is_a?(Pubnub::Envelope)).to eq true
21
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
21
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
22
22
  end
23
23
  end
24
24
 
@@ -27,7 +27,7 @@ describe Pubnub::Publish do
27
27
  envelope = @pubnub.publish(channel: :demo, message: :whatever, ttl: 10, store: false, http_sync: true)
28
28
 
29
29
  expect(envelope.is_a?(Pubnub::Envelope)).to eq true
30
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
30
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
31
31
  end
32
32
  end
33
33
  end
@@ -11,7 +11,7 @@ describe Pubnub::Revoke do
11
11
  @pubnub = Pubnub.new(
12
12
  publish_key: "pub-a-mock-key",
13
13
  subscribe_key: "sub-a-mock-key",
14
- secret_key: "sec-c-OWIyYmVlYWYtYWMxMS00OTcxLTlhZDAtZDBlYTM4ODE1MWUy",
14
+ secret_key: "sec-a-mock-key",
15
15
  uuid: "ruby-test-uuid-client-one",
16
16
  auth_key: "ruby-test-auth-client-one",
17
17
  )
@@ -9,7 +9,7 @@ describe "Custom retries" do
9
9
  @pubnub = Pubnub.new(
10
10
  subscribe_key: "sub-a-mock-key",
11
11
  publish_key: "pub-a-mock-key",
12
- secret_key: "sec-c-MTQyMzhjZGUtNTJiYi00MDU0LThkZWQtZDRmMGUwZDk4NjQz",
12
+ secret_key: "sec-a-mock-key",
13
13
  uuid: "ruby-test-client",
14
14
  )
15
15
  end
@@ -11,7 +11,7 @@ describe Pubnub::Audit do
11
11
  @pubnub = Pubnub::Client.new(
12
12
  subscribe_key: "sub-a-mock-key",
13
13
  publish_key: "pub-a-mock-key",
14
- secret_key: "sec-c-OWIyYmVlYWYtYWMxMS00OTcxLTlhZDAtZDBlYTM4ODE1MWUy",
14
+ secret_key: "sec-a-mock-key",
15
15
  auth_key: "ruby-test-auth",
16
16
  uuid: "ruby-test-uuid",
17
17
  )
@@ -23,8 +23,8 @@ describe Pubnub::Audit do
23
23
  channel: :demo,
24
24
  ).value
25
25
 
26
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
27
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
26
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
27
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
28
28
  end
29
29
  end
30
30
 
@@ -35,8 +35,8 @@ describe Pubnub::Audit do
35
35
  ).value
36
36
 
37
37
  expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
38
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
39
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
38
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
39
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
40
40
  end
41
41
  end
42
42
 
@@ -46,8 +46,8 @@ describe Pubnub::Audit do
46
46
  channel: :demo,
47
47
  ).value
48
48
  expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
49
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
50
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
49
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
50
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
51
51
  end
52
52
  end
53
53
  end
@@ -21,8 +21,8 @@ describe Pubnub::ChannelRegistration do
21
21
  group: :demo,
22
22
  ).value
23
23
 
24
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
25
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
24
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
25
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
26
26
  end
27
27
  end
28
28
 
@@ -35,7 +35,7 @@ describe Pubnub::ChannelRegistration do
35
35
  ).value
36
36
 
37
37
  expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
38
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
38
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
39
39
  end
40
40
  end
41
41
  end
@@ -19,7 +19,7 @@ describe Pubnub::DeleteMessages do
19
19
  channel: :demo,
20
20
  ).value
21
21
 
22
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
22
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
23
23
  end
24
24
  end
25
25
 
@@ -30,7 +30,7 @@ describe Pubnub::DeleteMessages do
30
30
  ).value
31
31
 
32
32
  expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
33
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
33
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
34
34
  end
35
35
  end
36
36
  end
@@ -12,7 +12,7 @@ describe Pubnub::Grant do
12
12
  Pubnub::Client.new(
13
13
  subscribe_key: "sub-a-mock-key",
14
14
  publish_key: "pub-a-mock-key",
15
- secret_key: "sec-c-OWIyYmVlYWYtYWMxMS00OTcxLTlhZDAtZDBlYTM4ODE1MWUy",
15
+ secret_key: "sec-a-mock-key",
16
16
  auth_key: "ruby-test-auth",
17
17
  uuid: "ruby-test-uuid",
18
18
  )
@@ -25,16 +25,16 @@ describe Pubnub::Grant do
25
25
 
26
26
  it "works" do
27
27
  VCR.use_cassette("lib/events/grant", record: :once) do
28
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
29
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
28
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
29
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
30
30
  end
31
31
  end
32
32
 
33
33
  it "forms valid ErrorEnvelope on error" do
34
34
  VCR.use_cassette("lib/events/grant-error", record: :once) do
35
35
  expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
36
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
37
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
36
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
37
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
38
38
  end
39
39
  end
40
40
 
@@ -49,7 +49,7 @@ describe Pubnub::Grant do
49
49
  expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
50
50
  expect(envelope.status[:code]).to eq 408
51
51
  expect(envelope.status[:category]).to eq Pubnub::Constants::STATUS_TIMEOUT
52
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
52
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
53
53
  end
54
54
  end
55
55
  end
@@ -38,7 +38,7 @@ describe Pubnub::Heartbeat do
38
38
  channel: :demo,
39
39
  ).value
40
40
 
41
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
41
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
42
42
  end
43
43
  end
44
44
 
@@ -49,7 +49,7 @@ describe Pubnub::Heartbeat do
49
49
  ).value
50
50
 
51
51
  expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
52
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
52
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
53
53
  end
54
54
  end
55
55
  end
@@ -19,8 +19,8 @@ describe Pubnub::HereNow do
19
19
  channel: :demo,
20
20
  ).value
21
21
 
22
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
23
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
22
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
23
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
24
24
  end
25
25
  end
26
26
 
@@ -31,7 +31,7 @@ describe Pubnub::HereNow do
31
31
  ).value
32
32
 
33
33
  expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
34
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
34
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
35
35
  end
36
36
  end
37
37
  end
@@ -19,8 +19,8 @@ describe Pubnub::History do
19
19
  channel: :demo,
20
20
  ).value
21
21
 
22
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
23
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
22
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
23
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
24
24
  end
25
25
  end
26
26
 
@@ -31,7 +31,7 @@ describe Pubnub::History do
31
31
  ).value
32
32
 
33
33
  expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
34
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
34
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
35
35
  end
36
36
  end
37
37
  end
@@ -19,7 +19,7 @@ describe Pubnub::Leave do
19
19
  channel: :demo,
20
20
  ).value
21
21
 
22
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
22
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
23
23
  end
24
24
  end
25
25
 
@@ -30,7 +30,7 @@ describe Pubnub::Leave do
30
30
  ).value
31
31
 
32
32
  expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
33
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
33
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
34
34
  end
35
35
  end
36
36
  end
@@ -35,8 +35,8 @@ describe Pubnub::Presence do
35
35
 
36
36
  eventually do
37
37
  envelope = @messages.first
38
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
39
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
38
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
39
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
40
40
  end
41
41
  end
42
42
  end
@@ -78,8 +78,8 @@ describe Pubnub::Presence do
78
78
  envelopes = @pubnub.presence(channel: :demo, http_sync: true)
79
79
 
80
80
  envelope = envelopes.first
81
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
82
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
81
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
82
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
83
83
  end
84
84
  end
85
85
 
@@ -97,7 +97,7 @@ describe Pubnub::Presence do
97
97
 
98
98
  envelope = envelopes.first
99
99
  expect(envelope).to be_a_kind_of Pubnub::ErrorEnvelope
100
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
100
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
101
101
  end
102
102
  end
103
103
  end
@@ -19,7 +19,7 @@ describe Pubnub::Publish do
19
19
  message: "whatever",
20
20
  ).value
21
21
 
22
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
22
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
23
23
  end
24
24
  end
25
25
 
@@ -31,7 +31,7 @@ describe Pubnub::Publish do
31
31
  ).value
32
32
 
33
33
  expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
34
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
34
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
35
35
  end
36
36
  end
37
37
  end
@@ -11,7 +11,7 @@ describe Pubnub::Revoke do
11
11
  @pubnub = Pubnub::Client.new(
12
12
  subscribe_key: "sub-a-mock-key",
13
13
  publish_key: "pub-a-mock-key",
14
- secret_key: "sec-c-OWIyYmVlYWYtYWMxMS00OTcxLTlhZDAtZDBlYTM4ODE1MWUy",
14
+ secret_key: "sec-a-mock-key",
15
15
  auth_key: "ruby-test-auth",
16
16
  uuid: "ruby-test-uuid",
17
17
  )
@@ -23,8 +23,8 @@ describe Pubnub::Revoke do
23
23
  channel: :demo,
24
24
  ).value
25
25
 
26
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
27
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
26
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
27
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
28
28
  end
29
29
  end
30
30
 
@@ -35,8 +35,8 @@ describe Pubnub::Revoke do
35
35
  ).value
36
36
 
37
37
  expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
38
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
39
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
38
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
39
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
40
40
  end
41
41
  end
42
42
  end
@@ -20,8 +20,8 @@ describe Pubnub::State do
20
20
  uuid: :whatever,
21
21
  ).value
22
22
 
23
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
24
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
23
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
24
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
25
25
  end
26
26
  end
27
27
 
@@ -33,7 +33,7 @@ describe Pubnub::State do
33
33
  ).value
34
34
 
35
35
  expect(envelope.is_a?(Pubnub::ErrorEnvelope)).to eq true
36
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
36
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
37
37
  end
38
38
  end
39
39
  end
@@ -36,8 +36,8 @@ describe Pubnub::Subscribe do
36
36
 
37
37
  eventually do
38
38
  envelope = @messages.first
39
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
40
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
39
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
40
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
41
41
  end
42
42
  end
43
43
  end
@@ -94,7 +94,7 @@ describe Pubnub::Subscribe do
94
94
  eventually do
95
95
  envelope = @statuses.first
96
96
  expect(envelope).to be_a_kind_of Pubnub::ErrorEnvelope
97
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
97
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
98
98
  end
99
99
  end
100
100
  end
@@ -131,8 +131,8 @@ describe Pubnub::Subscribe do
131
131
  envelopes = @pubnub.subscribe(channel: :demo, http_sync: true)
132
132
 
133
133
  envelope = envelopes.first
134
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
135
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
134
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
135
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
136
136
  end
137
137
  end
138
138
 
@@ -150,7 +150,7 @@ describe Pubnub::Subscribe do
150
150
 
151
151
  envelope = envelopes.first
152
152
  expect(envelope).to be_a_kind_of Pubnub::ErrorEnvelope
153
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
153
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
154
154
  end
155
155
  end
156
156
  end
@@ -169,8 +169,8 @@ describe Pubnub::Subscribe do
169
169
  envelopes = @pubnub.subscribe(channels: :demo, http_sync: true)
170
170
 
171
171
  envelope = envelopes.first
172
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
173
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
172
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
173
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
174
174
  end
175
175
  end
176
176
 
@@ -187,8 +187,8 @@ describe Pubnub::Subscribe do
187
187
  envelopes = @pubnub.subscribe(channel_groups: :demo, http_sync: true)
188
188
 
189
189
  envelope = envelopes.first
190
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
191
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
190
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
191
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
192
192
  end
193
193
  end
194
194
  end
@@ -207,8 +207,8 @@ describe Pubnub::Subscribe do
207
207
  envelopes = @pubnub.subscribe(channels: [:demo, :demo1, "demo.*"], with_presence: true, http_sync: true)
208
208
 
209
209
  envelope = envelopes.first
210
- expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema
211
- expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema
210
+ expect(envelope.status).to satisfies_schema Pubnub::Schemas::Envelope::StatusSchema.new
211
+ expect(envelope.result).to satisfies_schema Pubnub::Schemas::Envelope::ResultSchema.new
212
212
  end
213
213
  end
214
214
  end