pem 0.7.0 → 0.7.1

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: 1198e68c415395ece6002c71b82134b9e86c3cf7
4
- data.tar.gz: d7b170996e8deb312db5760867c369d955c12556
3
+ metadata.gz: d6d20f25149b6078c967bd5a3cc87ad1663ef523
4
+ data.tar.gz: 0b78b2d7ed716bdc835930fdc18724b9f746ba09
5
5
  SHA512:
6
- metadata.gz: 93793c6d827d5aeed902e8c7592bc8795a0b098dc9788a24705d9c95959d5fc73fae449141cb66a6fab8162d0ae0c93a4fbd58d1d40faf4020a409da284a0fa5
7
- data.tar.gz: db22fa0fb95801ad98b77da5f151889549527fe54c7f12b42beebad8917418731a1090465c0589006d9ba0529e403a35b446368b1bf9f4f9574a114ec07f8753
6
+ metadata.gz: 5f6940181d86d32087a67e357a95ec6d6003e6deda3e6cd96a638702c05f09f7d689cc5eb8a0072a9309ee8b18cbec42ce195ba19a814876349ff5bd4ab63794
7
+ data.tar.gz: 325f35b60c3b332a8851e46357007c48ad92462c30df96e6dc718e84f27100df3fab4aa17b6eea79a2e0af0f522cdbd2bafa2ba4e3bb54b39f0fff7a832f0023
@@ -10,16 +10,20 @@ module PEM
10
10
  Spaceship.login(password_manager.username, password_manager.password)
11
11
  Spaceship.client.select_team
12
12
 
13
- existing_certificate = Spaceship.certificate.all.detect {|c| c.name == PEM.config[:app_identifier] }
13
+ existing_certificate = Spaceship.certificate.all.detect { |c| c.name == PEM.config[:app_identifier] }
14
14
 
15
- if existing_certificate && !PEM.config[:force]
16
- Helper.log.info "You already have a push certificate, which is active for more than 30 more days. No need to create a new one".green
17
- Helper.log.info "If you still want to create a new one, use the --force option when running PEM.".green
18
- return false
19
- end
20
-
21
- if existing_certificate && PEM.config[:force]
22
- Helper.log.info "You already have an existing push certificate, but a new one will be created since the --force option has been set.".green
15
+ if existing_certificate
16
+ remaining_days = (existing_certificate.expires - Time.now) / 60 / 60 / 24
17
+ Helper.log.info "Existing push notification profile '#{existing_certificate.owner_name}' is valid for #{remaining_days.round} more days."
18
+ if remaining_days > 30
19
+ if PEM.config[:force]
20
+ Helper.log.info "You already have an existing push certificate, but a new one will be created since the --force option has been set.".green
21
+ else
22
+ Helper.log.info "You already have a push certificate, which is active for more than 30 more days. No need to create a new one".green
23
+ Helper.log.info "If you still want to create a new one, use the --force option when running PEM.".green
24
+ return false
25
+ end
26
+ end
23
27
  end
24
28
 
25
29
  Helper.log.warn "Creating a new push certificate for app '#{PEM.config[:app_identifier]}'."
@@ -1,3 +1,3 @@
1
1
  module PEM
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-07 00:00:00.000000000 Z
11
+ date: 2015-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core