apple_certs_info 0.1.2 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/.gitignore +8 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/apple_certs_info.iml +138 -0
- data/.idea/inspectionProfiles/Project_Default.xml +6 -0
- data/.idea/misc.xml +7 -0
- data/.idea/modules.xml +8 -0
- data/.idea/vcs.xml +6 -0
- data/CODE_OF_CONDUCT.md +1 -1
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/apple_certs_info.gemspec +1 -1
- data/lib/apple_certs_info.rb +15 -6
- data/lib/apple_certs_info/version.rb +1 -1
- metadata +10 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84b7f8e2689acf89f4413b083da27c05798cb1867fe0ea0fc22942d5ecabdc48
|
4
|
+
data.tar.gz: b3d409307713e9f0db5ba668ec887853e74acb5fd7464cb8fef7b61db259bee3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b4e58366fb218cf58711095678e10eab3888d03734dc9003de7200369f356d487b8c564613065f025c09958bc8c9b4f6c7a991330e882a76069fdc43cac20eb
|
7
|
+
data.tar.gz: df6ec91474cf50b9f0e71c9ccf2fd34e35410aba9f7094e7dd448a48f63c013c1bfb832a0485e8849184d9af23085a0d55ff547c65b34977acfd59daf88017bf
|
data/.idea/.gitignore
ADDED
data/.idea/.rakeTasks
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
+
You are allowed to:
|
4
|
+
1. Remove rake task
|
5
|
+
2. Add existing rake tasks
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
@@ -0,0 +1,138 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="ModuleRunConfigurationManager">
|
4
|
+
<shared />
|
5
|
+
</component>
|
6
|
+
<component name="NewModuleRootManager">
|
7
|
+
<content url="file://$MODULE_DIR$">
|
8
|
+
<sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
|
9
|
+
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
10
|
+
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
11
|
+
<excludeFolder url="file://$MODULE_DIR$/vendor/bundle" />
|
12
|
+
</content>
|
13
|
+
<orderEntry type="inheritedJdk" />
|
14
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
15
|
+
<orderEntry type="module-library">
|
16
|
+
<library name="diff-lcs (vbundled(1.4.4)) [path][gem]" type="rubylib">
|
17
|
+
<properties>
|
18
|
+
<option name="version" value="4" />
|
19
|
+
</properties>
|
20
|
+
<CLASSES>
|
21
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/bin" />
|
22
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/lib" />
|
23
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/docs" />
|
24
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec" />
|
25
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/autotest" />
|
26
|
+
</CLASSES>
|
27
|
+
<SOURCES>
|
28
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/bin" />
|
29
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/lib" />
|
30
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/docs" />
|
31
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec" />
|
32
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/autotest" />
|
33
|
+
</SOURCES>
|
34
|
+
<excluded>
|
35
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/bin" />
|
36
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/docs" />
|
37
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec" />
|
38
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/autotest" />
|
39
|
+
</excluded>
|
40
|
+
</library>
|
41
|
+
</orderEntry>
|
42
|
+
<orderEntry type="module-library">
|
43
|
+
<library name="rake (vbundled(12.3.3)) [path][gem]" type="rubylib">
|
44
|
+
<properties>
|
45
|
+
<option name="version" value="4" />
|
46
|
+
</properties>
|
47
|
+
<CLASSES>
|
48
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/bin" />
|
49
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc" />
|
50
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe" />
|
51
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib" />
|
52
|
+
</CLASSES>
|
53
|
+
<SOURCES>
|
54
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/bin" />
|
55
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc" />
|
56
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe" />
|
57
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib" />
|
58
|
+
</SOURCES>
|
59
|
+
<excluded>
|
60
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/bin" />
|
61
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/doc" />
|
62
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe" />
|
63
|
+
</excluded>
|
64
|
+
</library>
|
65
|
+
</orderEntry>
|
66
|
+
<orderEntry type="module-library">
|
67
|
+
<library name="rspec (vbundled(3.10.0)) [path][gem]" type="rubylib">
|
68
|
+
<properties>
|
69
|
+
<option name="version" value="4" />
|
70
|
+
</properties>
|
71
|
+
<CLASSES>
|
72
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rspec-3.10.0/lib" />
|
73
|
+
</CLASSES>
|
74
|
+
<SOURCES>
|
75
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rspec-3.10.0/lib" />
|
76
|
+
</SOURCES>
|
77
|
+
</library>
|
78
|
+
</orderEntry>
|
79
|
+
<orderEntry type="module-library">
|
80
|
+
<library name="rspec-core (vbundled(3.10.1)) [path][gem]" type="rubylib">
|
81
|
+
<properties>
|
82
|
+
<option name="version" value="4" />
|
83
|
+
</properties>
|
84
|
+
<CLASSES>
|
85
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.10.1/exe" />
|
86
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.10.1/lib" />
|
87
|
+
</CLASSES>
|
88
|
+
<SOURCES>
|
89
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.10.1/exe" />
|
90
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.10.1/lib" />
|
91
|
+
</SOURCES>
|
92
|
+
<excluded>
|
93
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.10.1/exe" />
|
94
|
+
</excluded>
|
95
|
+
</library>
|
96
|
+
</orderEntry>
|
97
|
+
<orderEntry type="module-library">
|
98
|
+
<library name="rspec-expectations (vbundled(3.10.1)) [path][gem]" type="rubylib">
|
99
|
+
<properties>
|
100
|
+
<option name="version" value="4" />
|
101
|
+
</properties>
|
102
|
+
<CLASSES>
|
103
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.10.1/lib" />
|
104
|
+
</CLASSES>
|
105
|
+
<SOURCES>
|
106
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.10.1/lib" />
|
107
|
+
</SOURCES>
|
108
|
+
</library>
|
109
|
+
</orderEntry>
|
110
|
+
<orderEntry type="module-library">
|
111
|
+
<library name="rspec-mocks (vbundled(3.10.1)) [path][gem]" type="rubylib">
|
112
|
+
<properties>
|
113
|
+
<option name="version" value="4" />
|
114
|
+
</properties>
|
115
|
+
<CLASSES>
|
116
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.10.1/lib" />
|
117
|
+
</CLASSES>
|
118
|
+
<SOURCES>
|
119
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.10.1/lib" />
|
120
|
+
</SOURCES>
|
121
|
+
</library>
|
122
|
+
</orderEntry>
|
123
|
+
<orderEntry type="module-library">
|
124
|
+
<library name="rspec-support (vbundled(3.10.1)) [path][gem]" type="rubylib">
|
125
|
+
<properties>
|
126
|
+
<option name="version" value="4" />
|
127
|
+
</properties>
|
128
|
+
<CLASSES>
|
129
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.10.1/lib" />
|
130
|
+
</CLASSES>
|
131
|
+
<SOURCES>
|
132
|
+
<root url="file://$MODULE_DIR$/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.10.1/lib" />
|
133
|
+
</SOURCES>
|
134
|
+
</library>
|
135
|
+
</orderEntry>
|
136
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.1.2, rbenv: 2.6.5) [gem]" level="application" />
|
137
|
+
</component>
|
138
|
+
</module>
|
data/.idea/misc.xml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="JavaScriptSettings">
|
4
|
+
<option name="languageLevel" value="ES6" />
|
5
|
+
</component>
|
6
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 2.6.5" project-jdk-type="RUBY_SDK" />
|
7
|
+
</project>
|
data/.idea/modules.xml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectModuleManager">
|
4
|
+
<modules>
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/apple_certs_info.iml" filepath="$PROJECT_DIR$/.idea/apple_certs_info.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
data/.idea/vcs.xml
ADDED
data/CODE_OF_CONDUCT.md
CHANGED
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
|
|
55
55
|
## Enforcement
|
56
56
|
|
57
57
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at
|
58
|
+
reported by contacting the project team at tarappo@gmail.com. All
|
59
59
|
complaints will be reviewed and investigated and will result in a response that
|
60
60
|
is deemed necessary and appropriate to the circumstances. The project team is
|
61
61
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -30,10 +30,10 @@ AppleCertsInfo.provisioning_profile_list_limit_days_for(days: 10)
|
|
30
30
|
|
31
31
|
|
32
32
|
```
|
33
|
-
# Development
|
33
|
+
# iPhone Developer / Apple Development
|
34
34
|
AppleCertsInfo.certificate_development_list_limit_days_for(days: 10)
|
35
35
|
|
36
|
-
# Distribution
|
36
|
+
# iPhone / Apple Distribution
|
37
37
|
AppleCertsInfo.certificate_distribution_list_limit_days_for(days: 10)
|
38
38
|
```
|
39
39
|
|
data/apple_certs_info.gemspec
CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |spec|
|
|
4
4
|
spec.name = "apple_certs_info"
|
5
5
|
spec.version = AppleCertsInfo::VERSION
|
6
6
|
spec.authors = ["Toshiyuki Hirata"]
|
7
|
-
spec.email = ["
|
7
|
+
spec.email = ["tarappo@gmail.com"]
|
8
8
|
|
9
9
|
spec.summary = %q{Apple Certificate files and Provisioning Profile information.}
|
10
10
|
spec.homepage = "https://github.com/tarappo/apple_certs_info"
|
data/lib/apple_certs_info.rb
CHANGED
@@ -13,7 +13,7 @@ module AppleCertsInfo
|
|
13
13
|
@debug_log
|
14
14
|
end
|
15
15
|
|
16
|
-
# Check Certificate file for iPhone/Apple Development in the KeyChain
|
16
|
+
# Check Certificate file for iPhone Developer /Apple Development in the KeyChain
|
17
17
|
# @param days: limit days
|
18
18
|
def self.certificate_development_list_limit_days_for(days:)
|
19
19
|
raise "do not set days param" if days.nil?
|
@@ -33,11 +33,21 @@ module AppleCertsInfo
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def self.certificate_development_list
|
36
|
-
|
36
|
+
list = []
|
37
|
+
iphone_list = certificate_list_for(name: "iPhone Developer")
|
38
|
+
apple_list = certificate_list_for(name: "Apple Development")
|
39
|
+
list.concat(iphone_list)
|
40
|
+
list.concat(apple_list)
|
41
|
+
return list
|
37
42
|
end
|
38
43
|
|
39
44
|
def self.certificate_distribution_list
|
40
|
-
|
45
|
+
list = []
|
46
|
+
iphone_list = certificate_list_for(name: "iPhone Distribution")
|
47
|
+
apple_list = certificate_list_for(name: "Apple Distribution")
|
48
|
+
list.concat(iphone_list)
|
49
|
+
list.concat(apple_list)
|
50
|
+
return list
|
41
51
|
end
|
42
52
|
|
43
53
|
def self.certificate_info_for(name:)
|
@@ -48,7 +58,6 @@ module AppleCertsInfo
|
|
48
58
|
begin
|
49
59
|
`security find-certificate -a -c "#{name}" -p > #{temp_pem_file.path}`
|
50
60
|
result = `openssl x509 -text -fingerprint -noout -in #{temp_pem_file.path}`
|
51
|
-
puts(result) if @debug_log == true
|
52
61
|
|
53
62
|
expire_datetime_match = result.match(/.*Not After :(.*)/)
|
54
63
|
raise "not exits expire date" if expire_datetime_match.nil?
|
@@ -56,7 +65,7 @@ module AppleCertsInfo
|
|
56
65
|
expire_datetime = Time.parse(expire_datetime_match[1])
|
57
66
|
|
58
67
|
cname_match = result.match(/Subject: .* CN=(.*), OU=.*/)
|
59
|
-
raise "not exists cname" if cname_match.nil?
|
68
|
+
raise "not exists cname:#{result}" if cname_match.nil?
|
60
69
|
cname = cname_match[1]
|
61
70
|
|
62
71
|
limit_days = calc_limit_days(datetime: expire_datetime)
|
@@ -125,7 +134,7 @@ module AppleCertsInfo
|
|
125
134
|
|
126
135
|
danger_list = []
|
127
136
|
list.each do |info|
|
128
|
-
danger_list << info if info[:limit_days] <= days
|
137
|
+
danger_list << info if info[:limit_days].to_i <= days.to_i
|
129
138
|
end
|
130
139
|
|
131
140
|
danger_list
|
metadata
CHANGED
@@ -1,23 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apple_certs_info
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toshiyuki Hirata
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
15
|
-
-
|
15
|
+
- tarappo@gmail.com
|
16
16
|
executables: []
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- ".gitignore"
|
21
|
+
- ".idea/.gitignore"
|
22
|
+
- ".idea/.rakeTasks"
|
23
|
+
- ".idea/apple_certs_info.iml"
|
24
|
+
- ".idea/inspectionProfiles/Project_Default.xml"
|
25
|
+
- ".idea/misc.xml"
|
26
|
+
- ".idea/modules.xml"
|
27
|
+
- ".idea/vcs.xml"
|
21
28
|
- ".rakeTasks"
|
22
29
|
- ".rspec"
|
23
30
|
- ".rspec_status"
|