certstepper 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/certstepper.rb +15 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d79605fedd8df288f566664fd269a516bea782ea
|
4
|
+
data.tar.gz: a5fea3b5b2ee819702b93befaec705b18823f7f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40915f36c73f9f45ccf0115d04af05916d398e31af8870f6ac95768b4522897b6a1114343f0a82153f3b1d0841a365512932ebcf891d782c7b1610da783a1c96
|
7
|
+
data.tar.gz: 4e3e1bc30fe3c99965cb982e4be32e5bd8ec2a248cc2ec8e0926028405bea1ef7a0d50a143c2b26e6a0ba9476ff7cdfaa9cc7761a513de95f2e12dbb0501d60e
|
data/lib/certstepper.rb
CHANGED
@@ -34,8 +34,7 @@ module CertStepper
|
|
34
34
|
# end
|
35
35
|
|
36
36
|
|
37
|
-
|
38
|
-
file.write("#{ARGV}\n")
|
37
|
+
self.logMessage("#{ARGV}\n")
|
39
38
|
|
40
39
|
begin
|
41
40
|
if ARGV[0].start_with? "chrome-extension:"
|
@@ -44,17 +43,17 @@ module CertStepper
|
|
44
43
|
str = self.getUserInput[1..-1]
|
45
44
|
str =str.strip_control_characters
|
46
45
|
|
47
|
-
|
46
|
+
self.logMessage("#{str}\n")
|
48
47
|
|
49
48
|
|
50
|
-
|
49
|
+
self.logMessage "start parse #{str.class}\n"
|
51
50
|
my_hash = JSON.parse str
|
52
|
-
|
51
|
+
self.logMessage("end parse#{my_hash}\n")
|
53
52
|
|
54
53
|
start_path = my_hash["start_path"]
|
55
|
-
profile_name = my_hash["
|
54
|
+
profile_name = my_hash["profile_name"]
|
56
55
|
if start_path
|
57
|
-
|
56
|
+
self.logMessage("#start work start_path:#{start_path} : #{profile_name} \n")
|
58
57
|
self.startWorkByChromeExtension start_path , profile_name
|
59
58
|
finished = true
|
60
59
|
end
|
@@ -65,19 +64,17 @@ module CertStepper
|
|
65
64
|
end
|
66
65
|
|
67
66
|
rescue => e
|
68
|
-
|
67
|
+
self.logMessage e.backtrace
|
69
68
|
end
|
70
69
|
|
71
70
|
|
72
|
-
file.close
|
73
71
|
end
|
74
72
|
|
75
73
|
def self.startWorkByChromeExtension(root_path,profile_name)
|
76
|
-
file = File.open("/Users/mac/Desktop/CertSimplify/some_file", "a")
|
77
74
|
console_root_path = root_path.gsub /[\s]/ , "\\ "
|
78
75
|
system("open #{console_root_path}")
|
79
76
|
self.createDir root_path + "/#{profile_name}"
|
80
|
-
self.dealCertByChrome root_path , profile_name
|
77
|
+
#self.dealCertByChrome root_path , profile_name
|
81
78
|
mobileprovision_name = "#{profile_name}.mobileprovision"
|
82
79
|
source_file = "#{File.expand_path('~')}/Downloads/#{mobileprovision_name}"
|
83
80
|
dest_file = "#{root_path}/#{profile_name}/#{mobileprovision_name}"
|
@@ -198,4 +195,11 @@ module CertStepper
|
|
198
195
|
system "security delete-keychain 123456"
|
199
196
|
end
|
200
197
|
|
198
|
+
|
199
|
+
def self.logMessage(message)
|
200
|
+
file = File.open("#{File.expand_path('~')}/certstepper.log", "w+")
|
201
|
+
file.write message
|
202
|
+
file.close
|
203
|
+
end
|
204
|
+
|
201
205
|
end
|