cert 0.3.2 → 0.3.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: c0c53ff5900b5c3f38d1778617a18b25a23c5309
4
- data.tar.gz: 45cc55b27c6e1cff8d888f9f17d86160f71b3cd7
3
+ metadata.gz: 88229cf680a91240aeed1791a54e568a13549a11
4
+ data.tar.gz: 5acd569ede0bf47bbd5c52f0bc9f755477653367
5
5
  SHA512:
6
- metadata.gz: efe57de74ea3fe3710d68dc530d686b7befc2eca14d4505d8b8546d691c83ae28cae387364f7e60c1725e333e14755f53bc04a5e382ddf4e720c28b12a5b29ab
7
- data.tar.gz: b6210917aec21f1cceb71fec77ea37947f509f4a6d75e2d2e145e139b18a9685af329394803a0390745a2e407f74fa2e8427b02ec76266627eb483cceace08b0
6
+ metadata.gz: 68bd433d9523547edcbe31eef175fdf543d8744c411bc7e55d4974bd34f7ef628c590faa6f497a9b7b3f03f719e7923cc541b5b0e9970dcf37cb7ebd166ac61a
7
+ data.tar.gz: 7c714f5d69ba69d19f19dcc2cee018c31b6cfc091219b0152b66e235fa610349daf776e932a0e1b474ece109c92ba8f034005cf910b8864108d63e49c8e12594
data/bin/cert CHANGED
@@ -44,4 +44,4 @@ begin
44
44
  CertApplication.new.run
45
45
  ensure
46
46
  FastlaneCore::UpdateChecker.show_update_status('cert', Cert::VERSION)
47
- end
47
+ end
@@ -1,7 +1,6 @@
1
1
  require 'cert/version'
2
2
  require 'cert/dependency_checker'
3
3
  require 'cert/cert_runner'
4
- require 'cert/signing_request'
5
4
  require 'cert/keychain_importer'
6
5
 
7
6
  require 'fastlane_core'
@@ -12,7 +11,7 @@ module Cert
12
11
  class << self
13
12
  attr_accessor :config
14
13
  end
15
-
14
+
16
15
  TMP_FOLDER = "/tmp/cert/"
17
16
  FileUtils.mkdir_p TMP_FOLDER
18
17
 
@@ -3,11 +3,13 @@ module Cert
3
3
  def launch
4
4
  run
5
5
 
6
- installed = FastlaneCore::CertChecker.installed?ENV["CER_FILE_PATH"]
6
+ installed = FastlaneCore::CertChecker.installed? ENV["CER_FILE_PATH"]
7
7
  raise "Could not find the newly generated certificate installed" unless installed
8
8
  end
9
9
 
10
10
  def run
11
+ FastlaneCore::PrintTable.print_values(config: Cert.config, hide_keys: [], title: "Summary")
12
+
11
13
  Helper.log.info "Starting login with user '#{Cert.config[:username]}'"
12
14
  Spaceship.login(Cert.config[:username], nil)
13
15
  Spaceship.select_team
@@ -28,7 +30,7 @@ module Cert
28
30
  certificates.each do |certificate|
29
31
  path = store_certificate(certificate)
30
32
 
31
- if FastlaneCore::CertChecker.installed?path
33
+ if FastlaneCore::CertChecker.installed? path
32
34
  # This certificate is installed on the local machine
33
35
  ENV["CER_CERTIFICATE_ID"] = certificate.id
34
36
  ENV["CER_FILE_PATH"] = path
@@ -6,7 +6,7 @@ module Cert
6
6
 
7
7
  def self.check_xcode_select
8
8
  return if Helper.is_test?
9
- unless `xcode-select -v`.include?"xcode-select version "
9
+ unless `xcode-select -v`.include? "xcode-select version "
10
10
  Helper.log.fatal '#############################################################'
11
11
  Helper.log.fatal "# You have to install the Xcode commdand line tools to use cert"
12
12
  Helper.log.fatal "# Install the latest version of Xcode from the AppStore"
@@ -16,4 +16,4 @@ module Cert
16
16
  end
17
17
  end
18
18
  end
19
- end
19
+ end
@@ -1,10 +1,10 @@
1
1
  module Cert
2
2
  class KeychainImporter
3
3
  def self.import_file(path)
4
- raise "Could not find file '#{path}'".red unless File.exists?(path)
4
+ raise "Could not find file '#{path}'".red unless File.exist?(path)
5
5
  keychain = Cert.config[:keychain_path] || "#{Dir.home}/Library/Keychains/login.keychain"
6
-
6
+
7
7
  puts `security import '#{path}' -k '#{keychain}'`
8
8
  end
9
9
  end
10
- end
10
+ end
@@ -19,8 +19,8 @@ module Cert
19
19
  env_name: "CERT_TEAM_ID",
20
20
  description: "The ID of your team if you're in multiple teams",
21
21
  optional: true,
22
- verify_block: Proc.new do |value|
23
- ENV["FASTLANE_TEAM_ID"] = value
22
+ verify_block: proc do |value|
23
+ ENV["FASTLANE_TEAM_ID"] = value
24
24
  end),
25
25
  FastlaneCore::ConfigItem.new(key: :output_path,
26
26
  short_option: "-o",
@@ -32,16 +32,16 @@ module Cert
32
32
  env_name: "CERT_KEYCHAIN_PATH",
33
33
  description: "Path to a custom keychain",
34
34
  optional: true,
35
- verify_block: Proc.new do |value|
36
- raise "Keychain not found at path '#{value}'".red unless File.exists?value
35
+ verify_block: proc do |value|
36
+ raise "Keychain not found at path '#{value}'".red unless File.exist? value
37
37
  end),
38
38
  FastlaneCore::ConfigItem.new(key: :signing_request_path,
39
39
  short_option: "-s",
40
40
  env_name: "CERT_SIGNING_REQUEST_PATH",
41
41
  description: "Path to a signing request file (optional)",
42
42
  optional: true,
43
- verify_block: Proc.new do |value|
44
- raise "File not found at path '#{value}'".red unless File.exists?value
43
+ verify_block: proc do |value|
44
+ raise "File not found at path '#{value}'".red unless File.exist? value
45
45
  end)
46
46
  ]
47
47
  end
@@ -1,3 +1,3 @@
1
1
  module Cert
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
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: 0.3.2
4
+ version: 0.3.3
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-09-07 00:00:00.000000000 Z
11
+ date: 2015-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.16.0
19
+ version: 0.19.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 1.0.0
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.16.0
29
+ version: 0.19.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.0.0
@@ -144,7 +144,6 @@ files:
144
144
  - lib/cert/dependency_checker.rb
145
145
  - lib/cert/keychain_importer.rb
146
146
  - lib/cert/options.rb
147
- - lib/cert/signing_request.rb
148
147
  - lib/cert/version.rb
149
148
  homepage: https://fastlane.tools
150
149
  licenses:
@@ -1,37 +0,0 @@
1
- require 'openssl'
2
-
3
- module Cert
4
- class SigningRequest
5
- def self.get_path
6
- return Cert.config[:signing_request_path] if Cert.config[:signing_request_path]
7
-
8
- self.generate
9
- end
10
-
11
- def self.generate
12
- Helper.log.info "Creating a signing certificate for you.".green
13
- key = OpenSSL::PKey::RSA.new 2048
14
-
15
- # Generate CSR
16
- csr = OpenSSL::X509::Request.new
17
- csr.version = 0
18
- csr.subject = OpenSSL::X509::Name.new([
19
- ['CN', "PEM", OpenSSL::ASN1::UTF8STRING]
20
- ])
21
- csr.public_key = key.public_key
22
- csr.sign key, OpenSSL::Digest::SHA1.new
23
-
24
- path = File.join(TMP_FOLDER, 'CertCertificateSigningRequest.certSigningRequest')
25
- private_key_path = File.join(TMP_FOLDER, 'private_key.p12')
26
- File.write(path, csr.to_pem)
27
- File.write(private_key_path, key)
28
-
29
- # Import the private key into the Keychain
30
- puts `chmod 600 '#{private_key_path}'` # otherwise we're not allowed to import the private key
31
- KeychainImporter.import_file(private_key_path)
32
-
33
- Helper.log.info "Successfully generated .certSigningRequest at path '#{path}'".green
34
- return path
35
- end
36
- end
37
- end