apple_certs_info 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -1
- data/lib/apple_certs_info.rb +12 -7
- data/lib/apple_certs_info/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9aa7d7c2f0488a86aad43c21f46120626db39ab3bc47c6dae63bbf7d4e7378d4
|
4
|
+
data.tar.gz: ee260498195f64c8e6c306996533777ca9b63ee95f9a97f2bee815e387c6e6c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f3a0818aa78570b003e171a3ec0b4852426f34a25af3376770acbc2590fdbc55a588814f2566f3cd5a212248bf0a68e5c0066b45b70da9249c17a301f72b01c
|
7
|
+
data.tar.gz: 9a65aeb1448c9ab71499e798a3a4efb4e28396794f2c75d8766423641232e3b6465972f0dd6fa4b50eef2e206fc82ade0604aa423f172b23be82bf40939d0896
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -18,13 +18,14 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
Information with an expiration date of
|
21
|
+
Information with an expiration date of 10 days or less will return.
|
22
22
|
|
23
23
|
- Provisioning Profiles
|
24
24
|
|
25
25
|
```
|
26
26
|
AppleCertsInfo.provisioning_profile_list_limit_days_for(days: 10)
|
27
27
|
```
|
28
|
+
|
28
29
|
- Certificatefiles(Development / Distribution)
|
29
30
|
|
30
31
|
|
data/lib/apple_certs_info.rb
CHANGED
@@ -5,19 +5,23 @@ require "tempfile"
|
|
5
5
|
module AppleCertsInfo
|
6
6
|
class Error < StandardError; end
|
7
7
|
|
8
|
-
|
8
|
+
# Check Certificate file for iPhone/Apple Development in the KeyChain
|
9
|
+
# @param days: limit days
|
10
|
+
def self.certificate_development_list_limit_days_for(days:, log: false)
|
9
11
|
raise "do not set days param" if days.nil?
|
10
|
-
limit_days_for(days: days, type: "certificate_development")
|
12
|
+
limit_days_for(days: days, type: "certificate_development", log: log)
|
11
13
|
end
|
12
14
|
|
13
|
-
|
15
|
+
# Check Certificate file for iPhone/Apple Distribution in the KeyChain
|
16
|
+
def self.certificate_distribution_list_limit_days_for(days:, log: false)
|
14
17
|
raise "do not set days param" if days.nil?
|
15
|
-
limit_days_for(days: days, type: "certificate_distribution")
|
18
|
+
limit_days_for(days: days, type: "certificate_distribution", log: log)
|
16
19
|
end
|
17
20
|
|
18
|
-
|
21
|
+
# Check Provisioning Profiles in the Directory that is ~/Library/MobileDevice/Provisioning Profiles/
|
22
|
+
def self.provisioning_profile_list_limit_days_for(days:, log: false)
|
19
23
|
raise "do not set days param" if days.nil?
|
20
|
-
limit_days_for(days: days, type: "provisioning_profile")
|
24
|
+
limit_days_for(days: days, type: "provisioning_profile", log: log)
|
21
25
|
end
|
22
26
|
|
23
27
|
def self.certificate_development_list
|
@@ -99,7 +103,7 @@ module AppleCertsInfo
|
|
99
103
|
end
|
100
104
|
|
101
105
|
private
|
102
|
-
def self.limit_days_for(days:, type:)
|
106
|
+
def self.limit_days_for(days:, type:, log: false)
|
103
107
|
case type
|
104
108
|
when "certificate_development" then
|
105
109
|
list = certificate_development_list
|
@@ -108,6 +112,7 @@ module AppleCertsInfo
|
|
108
112
|
when "provisioning_profile" then
|
109
113
|
list = provisioning_profile_list_info
|
110
114
|
end
|
115
|
+
puts(list) if log == true
|
111
116
|
|
112
117
|
danger_list = []
|
113
118
|
list.each do |info|
|