houston 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +27 -30
- data/README.md +1 -0
- data/coverage/assets/0.7.1/application.css +1110 -0
- data/coverage/assets/0.7.1/application.js +626 -0
- data/coverage/assets/0.7.1/fancybox/blank.gif +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_close.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_loading.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_nav_left.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_nav_right.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_e.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_n.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_ne.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_nw.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_s.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_se.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_sw.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_w.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_left.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_main.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_over.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_right.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancybox-x.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancybox-y.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancybox.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/favicon_green.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/favicon_red.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/favicon_yellow.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/loading.gif +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/magnify.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/{0.10.2 → 0.7.1}/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/assets/{0.10.2 → 0.8.0}/application.css +0 -0
- data/coverage/assets/{0.10.2 → 0.8.0}/application.js +931 -1079
- data/coverage/assets/{0.10.2 → 0.8.0}/colorbox/border.png +0 -0
- data/coverage/assets/{0.10.2 → 0.8.0}/colorbox/controls.png +0 -0
- data/coverage/assets/{0.10.2 → 0.8.0}/colorbox/loading.gif +0 -0
- data/coverage/assets/{0.10.2 → 0.8.0}/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.8.0/favicon_green.png +0 -0
- data/coverage/assets/0.8.0/favicon_red.png +0 -0
- data/coverage/assets/0.8.0/favicon_yellow.png +0 -0
- data/coverage/assets/0.8.0/loading.gif +0 -0
- data/coverage/assets/0.8.0/magnify.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/index.html +187 -334
- data/houston-2.2.2.gem +0 -0
- data/houston-2.2.3.gem +0 -0
- data/lib/houston/notification.rb +3 -1
- data/lib/houston/version.rb +1 -1
- data/spec/notification_spec.rb +17 -4
- metadata +69 -27
data/houston-2.2.2.gem
ADDED
Binary file
|
data/houston-2.2.3.gem
ADDED
Binary file
|
data/lib/houston/notification.rb
CHANGED
@@ -30,7 +30,7 @@ module Houston
|
|
30
30
|
MAXIMUM_PAYLOAD_SIZE = 2048
|
31
31
|
|
32
32
|
attr_accessor :token, :alert, :badge, :sound, :category, :content_available, :mutable_content,
|
33
|
-
:custom_data, :id, :expiry, :priority, :url_args
|
33
|
+
:custom_data, :id, :expiry, :priority, :url_args, :thread_id
|
34
34
|
attr_reader :sent_at
|
35
35
|
attr_writer :apns_error_code
|
36
36
|
|
@@ -49,6 +49,7 @@ module Houston
|
|
49
49
|
@content_available = options.delete(:content_available)
|
50
50
|
@mutable_content = options.delete(:mutable_content)
|
51
51
|
@url_args = options.delete(:url_args)
|
52
|
+
@thread_id = options.delete(:thread_id)
|
52
53
|
|
53
54
|
@custom_data = options
|
54
55
|
|
@@ -67,6 +68,7 @@ module Houston
|
|
67
68
|
json['aps']['content-available'] = 1 if @content_available
|
68
69
|
json['aps']['mutable-content'] = 1 if @mutable_content
|
69
70
|
json['aps']['url-args'] = @url_args if @url_args
|
71
|
+
json['aps']['thread-id'] = @thread_id if @thread_id
|
70
72
|
|
71
73
|
json
|
72
74
|
end
|
data/lib/houston/version.rb
CHANGED
data/spec/notification_spec.rb
CHANGED
@@ -14,7 +14,8 @@ describe Houston::Notification do
|
|
14
14
|
content_available: true,
|
15
15
|
key1: 1,
|
16
16
|
key2: 'abc',
|
17
|
-
url_args: %w[boarding A998]
|
17
|
+
url_args: %w[boarding A998],
|
18
|
+
thread_id: 'notify-team-ios'
|
18
19
|
}
|
19
20
|
}
|
20
21
|
|
@@ -75,6 +76,11 @@ describe Houston::Notification do
|
|
75
76
|
it { should == %w[boarding A998] }
|
76
77
|
end
|
77
78
|
|
79
|
+
describe '#thread_id' do
|
80
|
+
subject { super().thread_id }
|
81
|
+
it { should == 'notify-team-ios' }
|
82
|
+
end
|
83
|
+
|
78
84
|
context 'using :device instead of :token' do
|
79
85
|
subject do
|
80
86
|
notification_options[:device] = notification_options[:token]
|
@@ -97,7 +103,8 @@ describe Houston::Notification do
|
|
97
103
|
'sound' => 'sosumi.aiff',
|
98
104
|
'category' => 'INVITE_CATEGORY',
|
99
105
|
'content-available' => 1,
|
100
|
-
'url-args' => %w[boarding A998]
|
106
|
+
'url-args' => %w[boarding A998],
|
107
|
+
'thread-id' => 'notify-team-ios'
|
101
108
|
},
|
102
109
|
'key1' => 1,
|
103
110
|
'key2' => 'abc')
|
@@ -147,6 +154,12 @@ describe Houston::Notification do
|
|
147
154
|
)
|
148
155
|
end
|
149
156
|
|
157
|
+
it 'should create a dictionary only with thread-id' do
|
158
|
+
expect(Houston::Notification.new(thread_id: 'notify-ios-team').payload).to eq(
|
159
|
+
'aps' => { 'thread-id' => 'notify-ios-team' }
|
160
|
+
)
|
161
|
+
end
|
162
|
+
|
150
163
|
it 'should allow custom data inside aps key' do
|
151
164
|
notification_options = { :badge => 567, 'aps' => { 'loc-key' => 'my-key' } }
|
152
165
|
expect(Houston::Notification.new(notification_options).payload).to eq(
|
@@ -187,7 +200,7 @@ describe Houston::Notification do
|
|
187
200
|
|
188
201
|
it 'should create a message with correct frame length' do
|
189
202
|
_1, length, _2 = subject.message.unpack('cNa*')
|
190
|
-
expect(length).to eq(
|
203
|
+
expect(length).to eq(272)
|
191
204
|
end
|
192
205
|
|
193
206
|
def parse_items(items_stream)
|
@@ -214,7 +227,7 @@ describe Houston::Notification do
|
|
214
227
|
it 'should include an item #2 with the payload as JSON' do
|
215
228
|
_1, _2, items_stream = subject.message.unpack('cNa*')
|
216
229
|
items = parse_items(items_stream)
|
217
|
-
expect(items).to include([2,
|
230
|
+
expect(items).to include([2, 216, '{"key1":1,"key2":"abc","aps":{"alert":"Houston, we have a problem.","badge":2701,"sound":"sosumi.aiff","category":"INVITE_CATEGORY","content-available":1,"url-args":["boarding","A998"],"thread-id":"notify-team-ios"}}'])
|
218
231
|
end
|
219
232
|
|
220
233
|
it 'should include an item #3 with the identifier' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: houston
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattt Thompson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|
@@ -93,31 +93,73 @@ files:
|
|
93
93
|
- "./LICENSE"
|
94
94
|
- "./README.md"
|
95
95
|
- "./Rakefile"
|
96
|
-
- "./coverage/assets/0.
|
97
|
-
- "./coverage/assets/0.
|
98
|
-
- "./coverage/assets/0.
|
99
|
-
- "./coverage/assets/0.
|
100
|
-
- "./coverage/assets/0.
|
101
|
-
- "./coverage/assets/0.
|
102
|
-
- "./coverage/assets/0.
|
103
|
-
- "./coverage/assets/0.
|
104
|
-
- "./coverage/assets/0.
|
105
|
-
- "./coverage/assets/0.
|
106
|
-
- "./coverage/assets/0.
|
107
|
-
- "./coverage/assets/0.
|
108
|
-
- "./coverage/assets/0.
|
109
|
-
- "./coverage/assets/0.
|
110
|
-
- "./coverage/assets/0.
|
111
|
-
- "./coverage/assets/0.
|
112
|
-
- "./coverage/assets/0.
|
113
|
-
- "./coverage/assets/0.
|
114
|
-
- "./coverage/assets/0.
|
115
|
-
- "./coverage/assets/0.
|
116
|
-
- "./coverage/assets/0.
|
117
|
-
- "./coverage/assets/0.
|
118
|
-
- "./coverage/assets/0.
|
119
|
-
- "./coverage/assets/0.
|
96
|
+
- "./coverage/assets/0.7.1/application.css"
|
97
|
+
- "./coverage/assets/0.7.1/application.js"
|
98
|
+
- "./coverage/assets/0.7.1/fancybox/blank.gif"
|
99
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_close.png"
|
100
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_loading.png"
|
101
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_nav_left.png"
|
102
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_nav_right.png"
|
103
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_shadow_e.png"
|
104
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_shadow_n.png"
|
105
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_shadow_ne.png"
|
106
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_shadow_nw.png"
|
107
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_shadow_s.png"
|
108
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_shadow_se.png"
|
109
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_shadow_sw.png"
|
110
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_shadow_w.png"
|
111
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_title_left.png"
|
112
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_title_main.png"
|
113
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_title_over.png"
|
114
|
+
- "./coverage/assets/0.7.1/fancybox/fancy_title_right.png"
|
115
|
+
- "./coverage/assets/0.7.1/fancybox/fancybox-x.png"
|
116
|
+
- "./coverage/assets/0.7.1/fancybox/fancybox-y.png"
|
117
|
+
- "./coverage/assets/0.7.1/fancybox/fancybox.png"
|
118
|
+
- "./coverage/assets/0.7.1/favicon_green.png"
|
119
|
+
- "./coverage/assets/0.7.1/favicon_red.png"
|
120
|
+
- "./coverage/assets/0.7.1/favicon_yellow.png"
|
121
|
+
- "./coverage/assets/0.7.1/loading.gif"
|
122
|
+
- "./coverage/assets/0.7.1/magnify.png"
|
123
|
+
- "./coverage/assets/0.7.1/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png"
|
124
|
+
- "./coverage/assets/0.7.1/smoothness/images/ui-bg_flat_75_ffffff_40x100.png"
|
125
|
+
- "./coverage/assets/0.7.1/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png"
|
126
|
+
- "./coverage/assets/0.7.1/smoothness/images/ui-bg_glass_65_ffffff_1x400.png"
|
127
|
+
- "./coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_dadada_1x400.png"
|
128
|
+
- "./coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png"
|
129
|
+
- "./coverage/assets/0.7.1/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png"
|
130
|
+
- "./coverage/assets/0.7.1/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png"
|
131
|
+
- "./coverage/assets/0.7.1/smoothness/images/ui-icons_222222_256x240.png"
|
132
|
+
- "./coverage/assets/0.7.1/smoothness/images/ui-icons_2e83ff_256x240.png"
|
133
|
+
- "./coverage/assets/0.7.1/smoothness/images/ui-icons_454545_256x240.png"
|
134
|
+
- "./coverage/assets/0.7.1/smoothness/images/ui-icons_888888_256x240.png"
|
135
|
+
- "./coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png"
|
136
|
+
- "./coverage/assets/0.8.0/application.css"
|
137
|
+
- "./coverage/assets/0.8.0/application.js"
|
138
|
+
- "./coverage/assets/0.8.0/colorbox/border.png"
|
139
|
+
- "./coverage/assets/0.8.0/colorbox/controls.png"
|
140
|
+
- "./coverage/assets/0.8.0/colorbox/loading.gif"
|
141
|
+
- "./coverage/assets/0.8.0/colorbox/loading_background.png"
|
142
|
+
- "./coverage/assets/0.8.0/favicon_green.png"
|
143
|
+
- "./coverage/assets/0.8.0/favicon_red.png"
|
144
|
+
- "./coverage/assets/0.8.0/favicon_yellow.png"
|
145
|
+
- "./coverage/assets/0.8.0/loading.gif"
|
146
|
+
- "./coverage/assets/0.8.0/magnify.png"
|
147
|
+
- "./coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png"
|
148
|
+
- "./coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png"
|
149
|
+
- "./coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png"
|
150
|
+
- "./coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png"
|
151
|
+
- "./coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png"
|
152
|
+
- "./coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png"
|
153
|
+
- "./coverage/assets/0.8.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png"
|
154
|
+
- "./coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png"
|
155
|
+
- "./coverage/assets/0.8.0/smoothness/images/ui-icons_222222_256x240.png"
|
156
|
+
- "./coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png"
|
157
|
+
- "./coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png"
|
158
|
+
- "./coverage/assets/0.8.0/smoothness/images/ui-icons_888888_256x240.png"
|
159
|
+
- "./coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png"
|
120
160
|
- "./coverage/index.html"
|
161
|
+
- "./houston-2.2.2.gem"
|
162
|
+
- "./houston-2.2.3.gem"
|
121
163
|
- "./houston.gemspec"
|
122
164
|
- "./lib/houston.rb"
|
123
165
|
- "./lib/houston/client.rb"
|
@@ -148,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
190
|
version: '0'
|
149
191
|
requirements: []
|
150
192
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.
|
193
|
+
rubygems_version: 2.6.14
|
152
194
|
signing_key:
|
153
195
|
specification_version: 4
|
154
196
|
summary: Send Apple Push Notifications
|