ably 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec00d1068f71b56bbd617d688762b9736c3dc905
|
4
|
+
data.tar.gz: 43c524b37e87cd8d5b028b3e21211a8d175096d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54e6043bc398bf76397bab60b9c9922824c79c96223421cfb0496ce70ef83339300a799d3fe4cf2b440c1834ca5ecda634c060f63a769f237674051bc7e4120e
|
7
|
+
data.tar.gz: 1377c7533da5ccc4996237c9b345ede359548e5ae1845f50f1c590e2d4b6759bd7f3fa194911404158b8935c5fa76b36757e5d6b57007b8d2bea9b858c3c5c0c
|
data/lib/ably/exceptions.rb
CHANGED
data/lib/ably/version.rb
CHANGED
@@ -76,6 +76,8 @@ describe 'Ably::Realtime::Channel Message', :event_machine do
|
|
76
76
|
end
|
77
77
|
|
78
78
|
context 'with supported extra payload content type (#RTL6h, #RSL6a2)' do
|
79
|
+
let(:channel) { client.channel("pushenabled:#{random_str}") }
|
80
|
+
|
79
81
|
def publish_and_check_extras(extras)
|
80
82
|
channel.attach
|
81
83
|
channel.publish 'event', {}, extras: extras
|
@@ -86,7 +88,7 @@ describe 'Ably::Realtime::Channel Message', :event_machine do
|
|
86
88
|
end
|
87
89
|
|
88
90
|
context 'JSON Object (Hash)' do
|
89
|
-
let(:data) { { 'push' => { 'title' => 'Testing' } } }
|
91
|
+
let(:data) { { 'push' => { 'notification' => { 'title' => 'Testing' } } } }
|
90
92
|
|
91
93
|
it 'is encoded and decoded to the same hash' do
|
92
94
|
publish_and_check_extras data
|
@@ -94,7 +96,8 @@ describe 'Ably::Realtime::Channel Message', :event_machine do
|
|
94
96
|
end
|
95
97
|
|
96
98
|
context 'JSON Array' do
|
97
|
-
|
99
|
+
# TODO: Add nil type back in
|
100
|
+
let(:data) { { 'push' => { 'data' => { 'key' => [ true, false, 55, 'string', { 'Hash' => true }, ['array'] ] } } } }
|
98
101
|
|
99
102
|
it 'is encoded and decoded to the same Array' do
|
100
103
|
publish_and_check_extras data
|
@@ -62,8 +62,10 @@ describe Ably::Rest::Channel, 'messages' do
|
|
62
62
|
end
|
63
63
|
|
64
64
|
context 'with supported extra payload content type (#RSL1h, #RSL6a2)' do
|
65
|
+
let(:channel) { client.channel("pushenabled:#{random_str}") }
|
66
|
+
|
65
67
|
context 'JSON Object (Hash)' do
|
66
|
-
let(:data) { { 'push' => { 'title' => 'Testing' } } }
|
68
|
+
let(:data) { { 'push' => { 'notification' => { 'title' => 'Testing' } } } }
|
67
69
|
|
68
70
|
it 'is encoded and decoded to the same hash' do
|
69
71
|
channel.publish 'event', {}, extras: data
|
@@ -72,9 +74,10 @@ describe Ably::Rest::Channel, 'messages' do
|
|
72
74
|
end
|
73
75
|
|
74
76
|
context 'JSON Array' do
|
75
|
-
|
77
|
+
# TODO: Add nil type back in
|
78
|
+
let(:data) { { 'push' => { 'data' => { 'key' => [ true, false, 55, 'string', { 'Hash' => true }, ['array'] ] } } } }
|
76
79
|
|
77
|
-
it 'is encoded and decoded to the same
|
80
|
+
it 'is encoded and decoded to the same deep multi-type object' do
|
78
81
|
channel.publish 'event', {}, extras: data
|
79
82
|
expect(channel.history.items.first.extras).to eql(data)
|
80
83
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ably
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lewis Marshall
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-05-
|
12
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
@@ -458,7 +458,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
458
458
|
version: '0'
|
459
459
|
requirements: []
|
460
460
|
rubyforge_project:
|
461
|
-
rubygems_version: 2.
|
461
|
+
rubygems_version: 2.4.8
|
462
462
|
signing_key:
|
463
463
|
specification_version: 4
|
464
464
|
summary: A Ruby client library for ably.io realtime messaging implemented using EventMachine
|