code_quality 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '0468a907d1a5093eb7a55189993c91b7db4dc35c'
4
- data.tar.gz: d976a2903996a791e5fc83596194f93813ed819f
3
+ metadata.gz: a916f4bb0abada23ac50bc7f78503d1231e1ff16
4
+ data.tar.gz: 95c0516415e45d0333ff74a1bd33da22081f66ef
5
5
  SHA512:
6
- metadata.gz: e0987639e46edab9cb64d36c1231fa8b0c34f0db415442a1db5b6da4b899d7c71402bef53e102bf19361345756dc954da9c2015ec31b989313a5157935862d23
7
- data.tar.gz: 62f47cffc1f28847bb182edf16b150470373337d2e13a2b35c41387d3259dca766426ee16ebc8a4fa117effcd965f071a2c1a4e4468ce5fc17fcc1e0a18f837c
6
+ metadata.gz: 70744748adc7192561d92fd62f97e6d376ef50ccc90d69690ef2c91bcfc5e21a5465dfcf9ce30161c511177ac2facdafa74e6a16b59917a07e3c0044d80c08e1
7
+ data.tar.gz: cf39d87aa7210edfb5ca1e8a60eb8975f50fda21c9b14deaa9c57ebaa9d20cfb8ae9b94bd2556f26dff9983b134d9bc650d335e545b3751c0c40e484e1490377
@@ -1,3 +1,3 @@
1
1
  module CodeQuality
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -184,8 +184,10 @@ namespace :code_quality do
184
184
  if options[option_key]
185
185
  detected_offenses = report_result[metric.to_sym][:total].to_s.match(pattern)[1].to_i rescue 0
186
186
  max_offenses = options[option_key].to_i
187
- puts "Metric #{colorize(metric, :green)} detected offenses #{colorize(detected_offenses, :yellow)} is more then #{colorize(max_offenses, :yellow)}, must improve your code quality or set a lower #{colorize(option_key, :black, :white)}" if detected_offenses > max_offenses
188
- audit_failures << {metric: metric, detected_offenses: detected_offenses, max_offenses: max_offenses}
187
+ if detected_offenses > max_offenses
188
+ puts "Metric #{colorize(metric, :green)} detected offenses #{colorize(detected_offenses, :yellow)} is more then #{colorize(max_offenses, :yellow)}, must improve your code quality or set a lower #{colorize(option_key, :black, :white)}"
189
+ audit_failures << {metric: metric, detected_offenses: detected_offenses, max_offenses: max_offenses}
190
+ end
189
191
  end
190
192
  end
191
193
  audit_faild "#{audit_failures.size} of #{selected_metrics.size} metrics audit failed" if audit_failures.any?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: code_quality
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - RainChen