quality 4.0.0 → 4.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f2ac78c5cf2ce1a7ffa14ae0620ee589e46ea5d
4
- data.tar.gz: 77dbfa0aa0fcb5f7dc6e44bc59dc6b102942fb00
3
+ metadata.gz: 1b89cc87e0008d85924a48bda02f4961cae5889c
4
+ data.tar.gz: 1f0cea390667836193d156c2bf7fecb7437b27ba
5
5
  SHA512:
6
- metadata.gz: b7a48e534105dfc33ac3f9eaad04ba799930d608c1e9850b469abf06f0d1f321f30f2594d21e318d09c40ca9970d989c50d6b65e58065831c0963b5f4f372a22
7
- data.tar.gz: 95d993d5dc101127934b8aa407d765cdc8dcb133d2db0943a978f7e64ea18a651324efc94557ba546b5957c24e7fc156efe54cd60c9176b58c863b74ac5adc79
6
+ metadata.gz: 2fc768755c02c1a79eeca1451303ff5abab0dc3f6621eb43fd9b042d7f5a5546bc78539dc6542c8fa2056c7d3b4d829d306d90dd66a4086371587aa3008acce0
7
+ data.tar.gz: 2327c5405d0f37954c5b40d7bd9e45382ca061cdef59a35ef73cddc22eb3b813ff691fd14274a7c4eba79ee5b2710434af078fee08c44dd85c5352d3f2b2eba7
data/Rakefile CHANGED
@@ -21,6 +21,7 @@ Dir['tasks/**/*.rake'].each { |t| load t }
21
21
 
22
22
  Quality::Rake::Task.new do |t|
23
23
  t.skip_tools = ['reek']
24
+ t.verbose = true
24
25
  end
25
26
 
26
27
  task :clear_metrics do |_t|
@@ -90,9 +90,7 @@ module Quality
90
90
  quality_checker_class:
91
91
  quality_checker_class,
92
92
  count_io: count_io,
93
- count_file: count_file,
94
- configuration_writer:
95
- configuration_writer)
93
+ count_file: count_file)
96
94
  define
97
95
  end
98
96
 
@@ -6,6 +6,8 @@ require_relative 'tools/rubocop'
6
6
  require_relative 'tools/bigfiles'
7
7
 
8
8
  module Quality
9
+ # Knows how to run different quality tools based on a configuration
10
+ # already determined.
9
11
  class Runner
10
12
  include Tools::Cane
11
13
  include Tools::Flay
@@ -18,14 +20,12 @@ module Quality
18
20
  gem_spec: Gem::Specification,
19
21
  quality_checker_class: Quality::QualityChecker,
20
22
  count_io: IO,
21
- count_file: File,
22
- configuration_writer: File)
23
+ count_file: File)
23
24
  @config = config
24
25
  @gem_spec = gem_spec
25
26
  @quality_checker_class = quality_checker_class
26
27
  @count_io = count_io
27
28
  @count_file = count_file
28
- @configuration_writer = configuration_writer
29
29
  end
30
30
 
31
31
  def run_quality
@@ -4,23 +4,14 @@ module Quality
4
4
  module Cane
5
5
  private
6
6
 
7
- def write_out_dot_cane
8
- @configuration_writer.open('.cane', 'w') do |file|
9
- file.write("-f #{ruby_files_glob}")
10
- end
11
- end
12
-
13
- def args
14
- ['doc-glob', 'style-glob', 'abc-glob']
15
- .map { |arg_name| "--#{arg_name} #{ruby_files_glob}" }
16
- .join(' ')
7
+ def cane_args
8
+ "-f '#{ruby_files_glob}'"
17
9
  end
18
10
 
19
11
  def quality_cane
20
- write_out_dot_cane unless @configuration_writer.exist?('.cane')
21
- ratchet_quality_cmd('cane',
22
- gives_error_code_on_violations: true, args: args,
23
- emacs_format: true) do |line|
12
+ ratchet_quality_cmd('cane', gives_error_code_on_violations: true,
13
+ args: cane_args,
14
+ emacs_format: true) do |line|
24
15
  if line =~ /\(([0-9]*)\):$/
25
16
  Regexp.last_match[1].to_i
26
17
  else
@@ -2,5 +2,5 @@
2
2
  # reek, flog, flay and rubocop and makes sure your numbers don't get
3
3
  # any worse over time.
4
4
  module Quality
5
- VERSION = '4.0.0'
5
+ VERSION = '4.0.1'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quality
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz