fastlane-plugin-certificate_expirydate 0.1.1 → 0.1.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: 80ffa8497b2650082b0106e44564d49f37f3d056
4
- data.tar.gz: 154b9b14d1aafa8527dfbd6ee9c5c5f4245756cf
3
+ metadata.gz: 76766a692c59f0de68c6b67e59e035ad61db1306
4
+ data.tar.gz: 8188afac18bcf759bb58044c75782449520c0cdc
5
5
  SHA512:
6
- metadata.gz: 99c34b57e69e27bd95e179ff7e3abe95cba14fa68ff5f5fa60d12790772d7b7a661510a064b4a16c7ec3046b44cb0155e3a5d4934ce503294e7ce4765eb4f6a5
7
- data.tar.gz: e508909b68085b3d623b0cdee55f818f91644c2af01940c404fe4258aaa1f15269654a0c54be05a9ec1d49a9376aa1eb0f91436dec03577e3ac9b25814421fbc
6
+ metadata.gz: 8770b5e87892e37e1567b7eef6e105382bab9d2601af78560650b33bf605c01898ff05975be0b0c2fe4913f9dd2e1b9371f49bec195fd32303da754f62f99c5a
7
+ data.tar.gz: 28856e11f4c0d071e1d5f71094fc0d01a44be388873bc1002ee64f7c59cf3d2083357519725fe7e5a0a37ccfbf2fe4effafe081429e5ae4cca9130e786321a2d
@@ -6,8 +6,10 @@ module Fastlane
6
6
  certificate_pem_file = File.join("/tmp", "#{certificate_basename}.pem")
7
7
  File.delete(certificate_pem_file) if File.exist?(certificate_pem_file)
8
8
 
9
- Actions.sh("openssl pkcs12 -in #{params[:certificate_filepath].shellescape} -out #{certificate_pem_file} -nodes -password pass:#{params[:certificate_password].shellescape}", log: false)
10
- expirydate_string = Actions.sh("cat #{certificate_pem_file} | openssl x509 -noout -enddate", log: false)[/notAfter=(.*)/, 1]
9
+ result = sh("openssl pkcs12 -in #{params[:certificate_filepath].shellescape} -out #{certificate_pem_file} -nodes -password pass:#{params[:certificate_password].shellescape}")
10
+ UI.user_error!("Invalid password provided to get the expiry date of the certificate") if /Mac verify error: invalid password\?/ =~ result
11
+
12
+ expirydate_string = sh("cat #{certificate_pem_file} | openssl x509 -noout -enddate")[/notAfter=(.*)/, 1]
11
13
 
12
14
  DateTime.parse(expirydate_string)
13
15
  end
@@ -28,7 +30,7 @@ module Fastlane
28
30
  optional: false,
29
31
  type: String,
30
32
  verify_block: proc do |value|
31
- UI.user_error!("Invalid or empty certificate filepath given to CertificateExpirydateAction. Pass using `certificate_filepath: 'path/to/certificate_file'`") if (value.nil? || value.empty?)
33
+ UI.user_error!("Invalid or empty certificate filepath given to CertificateExpirydateAction. Pass using `certificate_filepath: 'path/to/certificate_file'`") if value.nil? || value.empty?
32
34
  UI.user_error!("Non-existant certificate file for CertificateExpirydateAction given") unless File.exist?(value)
33
35
  end),
34
36
  FastlaneCore::ConfigItem.new(key: :certificate_password,
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module CertificateExpirydate
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-certificate_expirydate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lyndsey Ferguson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-21 00:00:00.000000000 Z
11
+ date: 2016-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -106,7 +106,7 @@ files:
106
106
  - lib/fastlane/plugin/certificate_expirydate.rb
107
107
  - README.md
108
108
  - LICENSE
109
- homepage: https://github.com/lyndsey-ferguson/fastlane_plugins/fastlane-plugin-certificate_expirydate
109
+ homepage: https://github.com/lyndsey-ferguson/fastlane_plugins/
110
110
  licenses:
111
111
  - MIT
112
112
  metadata: {}