ZReviewTender 1.2.5 → 1.2.6
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/.version +1 -1
- data/bin/ZReviewTender +38 -40
- data/lib/ZLogger.rb +0 -6
- 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: b2868c84fd65d362c6cd62029ec951c924f456f09688d428735186bc8ca41caa
|
4
|
+
data.tar.gz: 8ab6cb9dda7d91c2306201bbb4ee89f76e02686680d0076739d6a7e1677f9ea7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4ffe7ed942dee3fc9ed74de25166248460882818af03da9c10deb5a952296e651a5f6e2897c64635a637778061472d31897c391e9e7256f9817f9b5f298ed6a
|
7
|
+
data.tar.gz: f930bd703f6b91ab4034ff0de3815347e5199bea66bb3f7a594d7d0eb9ae93ec6dc328981799f15bfb668ac92aee9c871501b65d01af0f2555a71de01819f96c
|
data/.version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.6
|
data/bin/ZReviewTender
CHANGED
@@ -170,43 +170,38 @@ class Main
|
|
170
170
|
private
|
171
171
|
def parseConfigYMLFile(configFilePath)
|
172
172
|
configYMLObj = YAML.load_file(configFilePath)
|
173
|
-
|
174
|
-
platform = Helper.unwrapRequiredParameter(configYMLObj, 'platform')
|
173
|
+
platform = Helper.unwrapRequiredParameter(configYMLObj, 'platform')
|
175
174
|
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
175
|
+
fetcher = nil
|
176
|
+
if platform.downcase == "apple"
|
177
|
+
fetcher = AppleFetcher.new(AppleConfig.new(configYMLObj, configFilePath, ENV['PWD'] || ::Dir.pwd))
|
178
|
+
elsif platform.downcase == "android"
|
179
|
+
fetcher = AndroidFetcher.new(AndroidConfig.new(configYMLObj, configFilePath, ENV['PWD'] || ::Dir.pwd))
|
180
|
+
else
|
181
|
+
raise "unknow platform #{platform} in yml file #{configFilePath}."
|
182
|
+
end
|
184
183
|
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
184
|
+
processors = Helper.unwrapRequiredParameter(configYMLObj, 'processors')
|
185
|
+
if processors.nil?
|
186
|
+
processors = []
|
187
|
+
end
|
189
188
|
|
190
|
-
|
191
|
-
|
192
|
-
|
189
|
+
if processors.length < 1
|
190
|
+
raise "must specify/enable at least one processor."
|
191
|
+
end
|
193
192
|
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
end
|
199
|
-
processorClass = Helper.unwrapRequiredParameter(value, "class")
|
200
|
-
require "Processors/#{processorClass}"
|
201
|
-
fetcher.registerProcessor(eval("#{processorClass}.new(#{value}, '#{configFilePath}', '#{ENV['PWD'] || ::Dir.pwd}')"))
|
193
|
+
processors.each do |processor|
|
194
|
+
processor.each do |key, value|
|
195
|
+
if value["enable"] != true
|
196
|
+
next
|
202
197
|
end
|
198
|
+
processorClass = Helper.unwrapRequiredParameter(value, "class")
|
199
|
+
require "Processors/#{processorClass}"
|
200
|
+
fetcher.registerProcessor(eval("#{processorClass}.new(#{value}, '#{configFilePath}', '#{ENV['PWD'] || ::Dir.pwd}')"))
|
203
201
|
end
|
202
|
+
end
|
204
203
|
|
205
|
-
|
206
|
-
return fetcher
|
207
|
-
rescue => e
|
208
|
-
raise "#{e.message} in yml file #{configFilePath}."
|
209
|
-
end
|
204
|
+
return fetcher
|
210
205
|
end
|
211
206
|
end
|
212
207
|
|
@@ -222,14 +217,17 @@ begin
|
|
222
217
|
puts "#If this is helpful, please help to star the repo or recommend it to your friends."
|
223
218
|
rescue => e
|
224
219
|
logger = ZLogger.new(ENV['PWD'] || ::Dir.pwd)
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
logger.logError(
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
puts
|
234
|
-
puts
|
220
|
+
errorMessage = "#Error Message: #{e.message}\n"
|
221
|
+
errorMessage += "#Error Class: #{e.class}\n"
|
222
|
+
errorMessage += "#Backtrace Start#\n#{e.backtrace.join("\n")}\n#Backtrace End#\n"
|
223
|
+
logger.logError(errorMessage)
|
224
|
+
|
225
|
+
puts "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
|
226
|
+
puts "XXXXX Excute Failed, Error Occurred! XXXXX"
|
227
|
+
puts "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
|
228
|
+
puts "X https://github.com/ZhgChgLi/ZReviewTender"
|
229
|
+
puts "X Please create an issue on above repo, and provide error log, thanks!"
|
230
|
+
puts "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
|
231
|
+
|
232
|
+
raise e
|
235
233
|
end
|
data/lib/ZLogger.rb
CHANGED
@@ -12,22 +12,16 @@ class ZLogger
|
|
12
12
|
|
13
13
|
def logError(message)
|
14
14
|
result = "#{caller[0]}: #{message}"
|
15
|
-
|
16
|
-
puts "Error: #{result}"
|
17
15
|
logger.error(result)
|
18
16
|
end
|
19
17
|
|
20
18
|
def logWarn(message)
|
21
19
|
result = "#{caller[0]}: #{message}"
|
22
|
-
|
23
|
-
puts "Warning: #{result}"
|
24
20
|
logger.warn(result)
|
25
21
|
end
|
26
22
|
|
27
23
|
def logInfo(message)
|
28
24
|
result = "#{caller[0]}: #{message}"
|
29
|
-
|
30
|
-
puts "Info: #{result}"
|
31
25
|
logger.info(result)
|
32
26
|
end
|
33
27
|
end
|