cert 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cert/runner.rb +18 -10
- data/lib/cert/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1831bb359ed6c1f3e5fe6b77e394799b7bdfa4b2
|
4
|
+
data.tar.gz: b45082955557faf8c8818783c5919a52b224e7b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 475de97f8332c9eb82e78297f001f2dc1aa1f6b4941d563812bb5ddc931269516b48ad6ffb6f137289228eb50fade8993d6192f738d3f647b6f95701b4798580
|
7
|
+
data.tar.gz: 3faf4477d503da1d5c790df85b7e060c087eb5ae3f52d8c5a5cd3f0b897c5f9751ebe999df959fcbb85dc32b57f5d36d7c442d507997edb49e5ac96971993b10
|
data/lib/cert/runner.rb
CHANGED
@@ -19,13 +19,18 @@ module Cert
|
|
19
19
|
Spaceship.select_team
|
20
20
|
Helper.log.info "Successfully logged in"
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
22
|
+
should_create = Cert.config[:force]
|
23
|
+
unless should_create
|
24
|
+
cert_path = find_existing_cert
|
25
|
+
should_create = cert_path.nil?
|
26
|
+
end
|
27
|
+
|
28
|
+
return unless should_create
|
29
|
+
|
30
|
+
if create_certificate # no certificate here, creating a new one
|
31
|
+
return # success
|
32
|
+
else
|
33
|
+
raise "Something went wrong when trying to create a new certificate..."
|
29
34
|
end
|
30
35
|
end
|
31
36
|
|
@@ -42,7 +47,6 @@ module Cert
|
|
42
47
|
Helper.log.info "Found the certificate #{certificate.id} (#{certificate.name}) which is installed on the local machine. Using this one.".green
|
43
48
|
|
44
49
|
return path
|
45
|
-
|
46
50
|
elsif File.exist?(private_key_path)
|
47
51
|
KeychainImporter.import_file(private_key_path)
|
48
52
|
KeychainImporter.import_file(path)
|
@@ -53,10 +57,11 @@ module Cert
|
|
53
57
|
Helper.log.info "Found the cached certificate #{certificate.id} (#{certificate.name}). Using this one.".green
|
54
58
|
|
55
59
|
return path
|
56
|
-
|
57
60
|
else
|
58
61
|
Helper.log.info "Certificate #{certificate.id} (#{certificate.name}) can't be found on your local computer"
|
59
62
|
end
|
63
|
+
|
64
|
+
File.delete(path) # as apparantly this certificate is pretty useless without a private key
|
60
65
|
end
|
61
66
|
|
62
67
|
Helper.log.info "Couldn't find an existing certificate... creating a new one"
|
@@ -85,7 +90,10 @@ module Cert
|
|
85
90
|
begin
|
86
91
|
certificate = certificate_type.create!(csr: csr)
|
87
92
|
rescue => ex
|
88
|
-
|
93
|
+
if ex.to_s.include?("You already have a current")
|
94
|
+
Helper.log.error "Could not create another certificate, reached the maximum number of available certificates.".red
|
95
|
+
end
|
96
|
+
|
89
97
|
raise ex
|
90
98
|
end
|
91
99
|
|
data/lib/cert/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
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-12-
|
11
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane_core
|