quality 8.0.0 → 8.1.0

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: 2d1d2f22bee9a46ee274bd62d797a7b244adf0cf
4
- data.tar.gz: 387cbe6830fb239fdf34f07678650b79b3ebaf74
3
+ metadata.gz: 1bc78e99ad7803a34bf9288f31c008c9074838c6
4
+ data.tar.gz: 76d7f141b2a5a09b48b980ca7bb8135c852d95a1
5
5
  SHA512:
6
- metadata.gz: 0c199d2ce881f68df95cc72b1019a46a0816492b0e5fe3cff0567f7e2ec8d7cdf9cc45468e28f9093403f9beef4f24aeb5dc07648254a9b9cfec8ce89aa487ab
7
- data.tar.gz: 54f9f7edfb3d502756f63eea45de92672dc596d12cb30bdce67f2c295102b9424fe32554f45264de645e9d7dc9718abc68a7347adf61ea0910fb2fee3f8ed70d
6
+ metadata.gz: 2103747ffeba6c92079ef56d380072db200469792ad657ad41994628871d62e7eb9b1ebf63d5259f9f673d69a124ecda8be64db0e6f2c381fe94df55d5d15940
7
+ data.tar.gz: 8a20703b872cc159b33878911561e465bbcc5e6aab1bdbe091eb4b1dbf116fc20337fbe65ee4b0e3bd4bc2e7f741e8d370a291ae09991e54aa8a983ccb0540d7
data/README.md CHANGED
@@ -89,6 +89,12 @@ Quality::Rake::Task.new { |t|
89
89
  #
90
90
  # Defaults to 'metrics'
91
91
  t.output_dir = 'metrics'
92
+
93
+ # Pipe-separated regexp string describing what to look for in
94
+ # files as 'todo'-like 'punchlist' comments.
95
+ #
96
+ # Defaults to 'XXX|TODO'
97
+ t.punchlist_regexp = 'XXX|TODO'
92
98
  }
93
99
  ```
94
100
 
@@ -40,6 +40,12 @@ module Quality
40
40
  # extensions--defaults to ['Rakefile']
41
41
  attr_accessor :extra_files
42
42
 
43
+ # Pipe-separated regexp string describing what to look for in
44
+ # files as 'todo'-like 'punchlist' comments.
45
+ #
46
+ # Defaults to 'XXX|TODO'
47
+ attr_accessor :punchlist_regexp
48
+
43
49
  # Relative path to output directory where *_high_water_mark
44
50
  # files will be read/written
45
51
  #
@@ -20,6 +20,8 @@ module Quality
20
20
  include Tools::BigFiles
21
21
  include Tools::Punchlist
22
22
 
23
+ extend Forwardable
24
+
23
25
  def initialize(config,
24
26
  gem_spec: Gem::Specification,
25
27
  quality_checker_class: Quality::QualityChecker,
@@ -94,16 +96,7 @@ module Quality
94
96
  quality_checker.execute(&count_violations_on_line)
95
97
  end
96
98
 
97
- def ruby_files
98
- @config.ruby_files
99
- end
100
-
101
- def ruby_files_glob
102
- @config.ruby_files_glob
103
- end
104
-
105
- def source_files_glob
106
- @config.source_files_glob
107
- end
99
+ def_delegators :@config, :ruby_files, :ruby_files_glob, :source_files_glob,
100
+ :punchlist_regexp
108
101
  end
109
102
  end
@@ -4,9 +4,18 @@ module Quality
4
4
  module Punchlist
5
5
  private
6
6
 
7
+ def punchlist_args
8
+ glob = "--glob '#{source_files_glob}'"
9
+ regexp = " --regexp '#{punchlist_regexp}'" if punchlist_regexp
10
+
11
+ args = glob
12
+ args += regexp if regexp
13
+ args
14
+ end
15
+
7
16
  def quality_punchlist
8
17
  ratchet_quality_cmd('punchlist',
9
- args: "--glob '#{source_files_glob}'") do |_line|
18
+ args: punchlist_args) do |_line|
10
19
  1
11
20
  end
12
21
  end
@@ -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 = '8.0.0'
5
+ VERSION = '8.1.0'
6
6
  end
data/quality.gemspec CHANGED
@@ -53,5 +53,5 @@ your numbers don't get any worse over time.
53
53
  s.add_development_dependency(%q(rake), ['!= 10.4.2'])
54
54
  s.add_development_dependency(%q(simplecov))
55
55
  s.add_development_dependency(%q(mocha))
56
- s.add_development_dependency(%q(minitest))
56
+ s.add_development_dependency(%q(minitest), ['~> 5'])
57
57
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quality
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0
4
+ version: 8.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-08 00:00:00.000000000 Z
11
+ date: 2015-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cane
@@ -208,16 +208,16 @@ dependencies:
208
208
  name: minitest
209
209
  requirement: !ruby/object:Gem::Requirement
210
210
  requirements:
211
- - - '>='
211
+ - - ~>
212
212
  - !ruby/object:Gem::Version
213
- version: '0'
213
+ version: '5'
214
214
  type: :development
215
215
  prerelease: false
216
216
  version_requirements: !ruby/object:Gem::Requirement
217
217
  requirements:
218
- - - '>='
218
+ - - ~>
219
219
  - !ruby/object:Gem::Version
220
- version: '0'
220
+ version: '5'
221
221
  description: |+
222
222
  Quality is a tool that runs quality checks on Ruby
223
223
  code using rubocop, cane, reek, flog and flay, and makes sure