houston 2.2.2 → 2.2.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: 5dd4fa1b395058b3407bdb64aa5d79cc1a98633c
4
- data.tar.gz: c5372346f173057ac25105ed33fd632d033a392f
3
+ metadata.gz: 70de85597ce7bd9b4388fb4afcb03dc3b4140bb8
4
+ data.tar.gz: 8be926f82276d5c006a17eb0949dd64867238508
5
5
  SHA512:
6
- metadata.gz: 7abc4177818be915fa327204025e769b718325237cd7298f24f5d78655b60ec9e1408c258733f634c8041b2a717df27d30b21a184dc837eca08f0bbbb66d260a
7
- data.tar.gz: d7d05b64143c6c5684471e97dd85c62ed570364c87f2dfbbfa5e58ce19d34036bf4e6597f2f527ac57371ad90088005dc5252ff3ef6d8e5781ce14c53183f199
6
+ metadata.gz: d60978d2f9862254305a44b924f4ee4c315d1a67581b17a6a1bfd59cb0b52ce6743292829a57ceacc6d0ee32333c1523d4257f15b53f7ce11107ca0e3a0ad79e
7
+ data.tar.gz: a12e4f5ae6c893e725aeae6f38215d6321bae7a8a6f02af88e287e70f7f2bb313722653136cc294c228c116c12db6181bacddda62eba9f635d292b790752ce31
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- houston (2.2.2)
4
+ houston (2.2.3)
5
5
  commander (~> 4.1)
6
6
  json
7
7
 
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
Binary file
@@ -1,3 +1,3 @@
1
1
  module Houston
2
- VERSION = "2.2.2"
2
+ VERSION = "2.2.3"
3
3
  end
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.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-18 00:00:00.000000000 Z
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