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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/.version +1 -1
  3. data/bin/ZReviewTender +38 -40
  4. data/lib/ZLogger.rb +0 -6
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c197ecf59b28ef67df11ec8795a6cd740e206211b072325dec5b02b9c1bec232
4
- data.tar.gz: bd8ecd956b8e2c528a5a6d19dbf1f6c60be0be6e9fe0ccfeab2a3e6f840b2f2c
3
+ metadata.gz: b2868c84fd65d362c6cd62029ec951c924f456f09688d428735186bc8ca41caa
4
+ data.tar.gz: 8ab6cb9dda7d91c2306201bbb4ee89f76e02686680d0076739d6a7e1677f9ea7
5
5
  SHA512:
6
- metadata.gz: 9a761827f14d965bf732955a2df5aad4efc8ab3f6d7a2045c212cbecce8479192415f1f47ef4ffcad306fabc45854ab56eed43422425025ed43cfcd2a2768ee2
7
- data.tar.gz: df78adf8c930f754031658063b8f8e8a8d7adb3aa56697c7e8e9fe8e3ea23efc2a12e12f5e05773741e408627d6167740f468399c40b0577a01fb16156703713
6
+ metadata.gz: b4ffe7ed942dee3fc9ed74de25166248460882818af03da9c10deb5a952296e651a5f6e2897c64635a637778061472d31897c391e9e7256f9817f9b5f298ed6a
7
+ data.tar.gz: f930bd703f6b91ab4034ff0de3815347e5199bea66bb3f7a594d7d0eb9ae93ec6dc328981799f15bfb668ac92aee9c871501b65d01af0f2555a71de01819f96c
data/.version CHANGED
@@ -1 +1 @@
1
- 1.2.5
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
- begin
174
- platform = Helper.unwrapRequiredParameter(configYMLObj, 'platform')
173
+ platform = Helper.unwrapRequiredParameter(configYMLObj, 'platform')
175
174
 
176
- fetcher = nil
177
- if platform.downcase == "apple"
178
- fetcher = AppleFetcher.new(AppleConfig.new(configYMLObj, configFilePath, ENV['PWD'] || ::Dir.pwd))
179
- elsif platform.downcase == "android"
180
- fetcher = AndroidFetcher.new(AndroidConfig.new(configYMLObj, configFilePath, ENV['PWD'] || ::Dir.pwd))
181
- else
182
- raise "unknow platform #{platform} in yml file #{configFilePath}."
183
- end
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
- processors = Helper.unwrapRequiredParameter(configYMLObj, 'processors')
186
- if processors.nil?
187
- processors = []
188
- end
184
+ processors = Helper.unwrapRequiredParameter(configYMLObj, 'processors')
185
+ if processors.nil?
186
+ processors = []
187
+ end
189
188
 
190
- if processors.length < 1
191
- raise "must specify/enable at least one processor."
192
- end
189
+ if processors.length < 1
190
+ raise "must specify/enable at least one processor."
191
+ end
193
192
 
194
- processors.each do |processor|
195
- processor.each do |key, value|
196
- if value["enable"] != true
197
- next
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
- title = "#Error: #{e.class} #{e.message}"
226
- body = e.backtrace
227
-
228
- logger.logError("===RUNTIME EXCEPTION START===")
229
- logger.logError(title)
230
- logger.logError(body)
231
- logger.logError("===RUNTIME EXCEPTION END===")
232
-
233
- puts title
234
- puts body
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ZReviewTender
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - ZhgChgLi