houston 2.2.2 → 2.2.3
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/apn +41 -0
- data/houston-2.2.2.gem +0 -0
- data/lib/houston/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70de85597ce7bd9b4388fb4afcb03dc3b4140bb8
|
4
|
+
data.tar.gz: 8be926f82276d5c006a17eb0949dd64867238508
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d60978d2f9862254305a44b924f4ee4c315d1a67581b17a6a1bfd59cb0b52ce6743292829a57ceacc6d0ee32333c1523d4257f15b53f7ce11107ca0e3a0ad79e
|
7
|
+
data.tar.gz: a12e4f5ae6c893e725aeae6f38215d6321bae7a8a6f02af88e287e70f7f2bb313722653136cc294c228c116c12db6181bacddda62eba9f635d292b790752ce31
|
data/Gemfile.lock
CHANGED
data/bin/apn
CHANGED
@@ -118,3 +118,44 @@ command :push do |c|
|
|
118
118
|
end
|
119
119
|
end
|
120
120
|
end
|
121
|
+
|
122
|
+
command :feedback do |c|
|
123
|
+
c.syntax = 'apn feedback [...]'
|
124
|
+
c.summary = 'Queries the APN Feedback Service for failed device tokens.'
|
125
|
+
c.description = ''
|
126
|
+
|
127
|
+
c.example 'description', 'apn feedback -c /path/to/apple_push_certificate.pem'
|
128
|
+
c.option '-c', '--certificate CERTIFICATE', 'Path to certificate (.pem) file'
|
129
|
+
c.option '-e', '--environment ENV', [:production, :development], 'Environment to send push notification (production or development (default))'
|
130
|
+
c.option '-p', '--[no]-passphrase', 'Prompt for a certificate passphrase'
|
131
|
+
|
132
|
+
c.action do |args, options|
|
133
|
+
|
134
|
+
@environment = options.environment.downcase.to_sym rescue :development
|
135
|
+
say_error "Invalid environment,'#{@environment}' (should be either :development or :production)" and abort unless [:development, :production].include?(@environment)
|
136
|
+
|
137
|
+
@certificate = options.certificate
|
138
|
+
say_error "Missing certificate file option (-c /path/to/certificate.pem)" and abort unless @certificate
|
139
|
+
say_error "Could not find certificate file '#{@certificate}'" and abort unless File.exists?(@certificate)
|
140
|
+
|
141
|
+
@passphrase = options.passphrase ? password : ""
|
142
|
+
|
143
|
+
client = (@environment == :production) ? Houston::Client.production : Houston::Client.development
|
144
|
+
client.certificate = File.read(@certificate)
|
145
|
+
client.passphrase = @passphrase
|
146
|
+
|
147
|
+
begin
|
148
|
+
feedbackDevices = client.unregistered_devices
|
149
|
+
|
150
|
+
if feedbackDevices.any? && feedbackDevices.length > 0
|
151
|
+
puts feedbackDevices.to_json
|
152
|
+
else
|
153
|
+
say_ok "No feedback available"
|
154
|
+
end
|
155
|
+
|
156
|
+
rescue => message
|
157
|
+
say_error "Exception querying feedback: #{message}" and abort
|
158
|
+
end
|
159
|
+
|
160
|
+
end
|
161
|
+
end
|
data/houston-2.2.2.gem
ADDED
Binary file
|
data/lib/houston/version.rb
CHANGED
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.2.
|
4
|
+
version: 2.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattt Thompson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|
@@ -155,6 +155,7 @@ files:
|
|
155
155
|
- ./coverage/index.html
|
156
156
|
- ./Gemfile
|
157
157
|
- ./Gemfile.lock
|
158
|
+
- ./houston-2.2.2.gem
|
158
159
|
- ./houston.gemspec
|
159
160
|
- ./lib/houston/client.rb
|
160
161
|
- ./lib/houston/connection.rb
|