PushIt 1.0 → 1.0.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/pushit +6 -6
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c06139aef409eda367d86c2a189fa6f23ac5b07
4
- data.tar.gz: d2a4af4180dc92341895e5905d575ff1d45a27e5
3
+ data.tar.gz: d7d4ea0f5bd22ec67a351e36d8eab3f42d1edf62
4
+ metadata.gz: 958b2ffbd0dad4959f7c81e8ed5f7c9d04b0de50
5
5
  SHA512:
6
- metadata.gz: 7449c1186f71d74f0146db36d67b732210504fb11ced9d8ba3902e15eb0174220a7c4f76ffc2301d92fb57057decca89ef07b31b974dde7ac02fb897fdd9ae68
7
- data.tar.gz: f8e5b29ee8968c3321f0c4295ac2f096504715331f5bad39079d7b1c0c401b30fe5a8f1530724a070df387c1ea9f0f396250a0b1fb03f9fdc2e44f8e051baffb
6
+ data.tar.gz: 9ee5b42877d196fc860c72db44a11d7482c9b5407ff06f305548fdfeaf80d81237c2dfa56b1be5a160717c4793e386d24a76aa8a26d3c8f9fbf16e74f75e9272
7
+ metadata.gz: 8c06fa5377abb1cbefbf1076b283e08bddb97ae8e9fb15c5ef2f601d3b79e901d5fda7a036e26347e799a04df711e188cc3e66d921c8258e6e7d7f5918f3e8d2
data/bin/pushit CHANGED
@@ -120,7 +120,7 @@ command :push do |c|
120
120
  c.option '-b', '--badge NUMBER', 'Sets the app badge when the notification is received.'
121
121
  c.option '-s', '--sound STRING', 'Specifies a sound to be played when the notification is received.'
122
122
  c.option '-n', '--newsstand', 'Adds content-available to the payload. Newsstand apps only.'
123
- c.option '-d', '--download NUMBER', 'Sets the issue ID of the issue to be downloaded in the background.'
123
+ c.option '-i', '--issue NUMBER', 'Sets the issue ID of the issue to be downloaded in the background.'
124
124
 
125
125
  c.option '-l', '--link STRING', 'Sends a link of the given type. Choose from: web, itunes, appstore, email, page, location, telephone.'
126
126
  c.option '-t', '--button STRING', 'Sets the action button on the notification. If no --button option is chosen, View will appear by default. Choose from: install, read, watch, browse, listen, visit.'
@@ -153,20 +153,20 @@ command :push do |c|
153
153
 
154
154
  debug_log "Setting environment..."
155
155
  if options.environment
156
- @environment = options.environment.downcase.to_sym
156
+ @environment = options.environment
157
157
  say_error "Invalid environment,'#{@environment}' (should be either :development or :production)" and abort unless [:development, :production].include?(@environment)
158
158
  else
159
159
  @environment = :development
160
160
  end
161
161
  debug_log "environment: #{@environment}"
162
162
 
163
- @app = options.app if @app # This will be converted to the certificate filename later on.
163
+ @app = options.app if options.app # This will be converted to the certificate filename later on.
164
164
 
165
165
  @message = options.message
166
166
  @badge = options.badge.nil? ? nil : options.badge.to_i
167
167
  @sound = options.sound
168
168
  @newsstand = options.newsstand ? true : false
169
- @issue_id = options.download.nil? ? nil : options.download.to_i
169
+ @issue_id = options.issue.nil? ? nil : options.issue.to_i
170
170
 
171
171
  debug_log "app: #{@app}"
172
172
  debug_log "message: #{@message}"
@@ -223,13 +223,13 @@ command :push do |c|
223
223
  notification.alert = @message if @message
224
224
  notification.badge = @badge if @badge
225
225
  notification.sound = @sound if @sound
226
- notification.content-available = @newsstand if @newsstand
226
+ notification.content_available = @newsstand if @newsstand
227
227
 
228
228
  custom_payload = Hash.new
229
229
  debug_log "Created custom payload hash."
230
230
 
231
231
  # TODO: Find out what the actual name is for :issue.
232
- custom_payload.merge!({:issue => "#{@issue_id}"}) if @issue_id
232
+ custom_payload.merge!({:new_issue_identifier => "#{@issue_id}"}) if @issue_id
233
233
  custom_payload.merge!({:pmps => {:'link-url' => "#{@link}"}}) if @link
234
234
  custom_payload.merge!({'alert' => {:body => "#{@message}", :'action-loc-key' => "#{@button}"}}) if @button
235
235
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: PushIt
3
3
  version: !ruby/object:Gem::Version
4
- version: "1.0"
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oletha Lai
@@ -40,7 +40,7 @@ extra_rdoc_files: []
40
40
 
41
41
  files:
42
42
  - bin/pushit
43
- homepage:
43
+ homepage: https://github.com/olethalai/challenges/tree/master/apns-cli
44
44
  licenses: []
45
45
 
46
46
  metadata: {}