lib/warder/code_duplication_runner.rb in warder-0.2.0 vs lib/warder/code_duplication_runner.rb in warder-0.2.1
- old
+ new
@@ -9,9 +9,15 @@
FAILURE_REGEXP = /code found in :\w+ \(mass(\*\d+)? = (?<issues>\d+)\)/
private
def command_with_options
- "#{COMMAND_NAME} -d -m #{FLAY_SCORE} #{@options.files}"
+ "#{COMMAND_NAME} -d -m #{flay_score} #{@options.files}"
+ end
+
+ def flay_score
+ env_flay_score = ENV['FLAY_SCORE']
+ return self.class::FLAY_SCORE unless env_flay_score
+ env_flay_score.to_i
end
end
end