quality 12.0.0 → 13.0.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: f313920de5ef20c4f14990383d85a81b4140fe96
4
- data.tar.gz: 18193477aaecd44d8668748888434fa13e8dbca0
3
+ metadata.gz: e9f0c2e57cde483dbe36d747786158aeecc033bb
4
+ data.tar.gz: aca2c88e639a3fc5136acba3e6157080c7cb41ee
5
5
  SHA512:
6
- metadata.gz: 0b4f2d9c01ebc772408836a1326cd12e1e03b58b9a07ac452f3990fbd94f3711212031b0937aa8495057f3b544861a7d87eeddea3e203a9c16a8067663a3ea9b
7
- data.tar.gz: 9181d5856ef14c00c327ce9699c4008b16a63a78bb15e87845d4255076e8a36fca22a6a7b83d31959436c3c42f5fe91d13a41ccf03f4c900ce9fc0ea115c0b83
6
+ metadata.gz: 780738abc2e816cbaf8cdd1e79e204296aeb0e8d63cbb14f760987616c4e7f742999ca77a47dd5ae2dc41af1cdf7159c424d376f7051a37702445cc12d75aa73
7
+ data.tar.gz: 8e0ac78008dd7fc927621f537549981e52f2460b36739b6ae89444b3a07bc81e45df12f9cdc4fca797f342290ff41273613ad7272b0935cff4f09e2b98184e3d
@@ -6,62 +6,12 @@
6
6
  module Quality
7
7
  # Configuration for running quality tool
8
8
  class Config
9
- # Name of quality task.
10
- # Defaults to :quality.
11
- attr_accessor :quality_name
9
+ # See README.md for documentation on these configuration parameters.
12
10
 
13
- # Name of ratchet task.
14
- # Defaults to :ratchet.
15
- attr_accessor :ratchet_name
16
-
17
- # Array of strings describing tools to be skipped--e.g., ["cane"]
18
- #
19
- # Defaults to []
20
- attr_accessor :skip_tools
21
-
22
- # Log command executation
23
- #
24
- # Defaults to false
25
- attr_accessor :verbose
26
-
27
- # Array of directory names which contain ruby files to analyze.
28
- #
29
- # Defaults to %w(app lib test spec feature), which translates to *.rb in
30
- # the base directory, as well as those directories.
31
- attr_writer :ruby_dirs
32
-
33
- # Array of directory names which contain any type of source
34
- # files to analyze.
35
- #
36
- # Defaults to the same as ruby_dirs
37
- attr_writer :source_dirs
38
-
39
- # Pick any extra files that are source files, but may not have
40
- # extensions--defaults to %w(Rakefile Dockerfile)
41
- attr_accessor :extra_files
42
-
43
- # Pick any extra files that are Ruby source files, but may not have
44
- # extensions--defaults to %w(Rakefile)
45
- attr_accessor :extra_ruby_files
46
-
47
- # Extensions for Ruby language files--defaults to 'rb,rake'
48
- attr_accessor :ruby_file_extensions
49
-
50
- # Extensions for all source files--defaults to
51
- # 'rb,rake,swift,cpp,c,java,py,clj,cljs,scala,js,yml,sh,json'
52
- attr_accessor :source_file_extensions
53
-
54
- # Pipe-separated regexp string describing what to look for in
55
- # files as 'todo'-like 'punchlist' comments.
56
- #
57
- # Defaults to 'XXX|TODO'
58
- attr_accessor :punchlist_regexp
59
-
60
- # Relative path to output directory where *_high_water_mark
61
- # files will be read/written
62
- #
63
- # Defaults to .
64
- attr_accessor :output_dir
11
+ attr_accessor :quality_name, :ratchet_name, :skip_tools, :verbose,
12
+ :ruby_dirs, :source_dirs, :extra_files, :extra_ruby_files,
13
+ :ruby_file_extensions, :source_file_extensions,
14
+ :punchlist_regexp, :output_dir
65
15
 
66
16
  def ruby_dirs
67
17
  @ruby_dirs ||= %w(src app lib test spec feature)
@@ -88,11 +38,11 @@ module Quality
88
38
  def source_files_glob(extra_source_files = extra_files,
89
39
  dirs = source_dirs,
90
40
  extensions = source_file_extensions)
91
- "{#{extra_source_files.join(',')}," +
92
- "*.{#{extensions}}," +
41
+ "{#{extra_source_files.join(',')}," \
42
+ "{*,.*}.{#{extensions}}," +
93
43
  File.join("{#{dirs.join(',')}}",
94
44
  '**',
95
- "*.{#{extensions}}") +
45
+ "{*,.*}.{#{extensions}}") +
96
46
  '}'
97
47
  end
98
48
 
@@ -104,10 +54,12 @@ module Quality
104
54
  source_files_glob(extra_ruby_files, ruby_dirs, ruby_file_extensions)
105
55
  end
106
56
 
107
- # XXX: Rakefile is hard-coded here--should use config instead
108
57
  def ruby_files
109
- @globber.glob("{*.{#{ruby_file_extensions}},Rakefile}")
110
- .concat(@globber.glob(ruby_files_glob)).join(' ')
58
+ @globber.glob(ruby_files_glob).join(' ')
59
+ end
60
+
61
+ def all_output_files
62
+ @globber.glob("#{output_dir}/*_high_water_mark")
111
63
  end
112
64
 
113
65
  def initialize(quality_name: 'quality',
@@ -53,9 +53,7 @@ module Quality
53
53
  end
54
54
 
55
55
  def run_ratchet
56
- # XXX: a lot of things know about globbing--isn't this config's job?
57
- @globber.glob("#{@config.output_dir}/*_high_water_mark")
58
- .each do |filename|
56
+ @config.all_output_files.each do |filename|
59
57
  run_ratchet_on_file(filename)
60
58
  end
61
59
  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 = '12.0.0'
5
+ VERSION = '13.0.0'
6
6
  end
data/quality.gemspec CHANGED
@@ -4,16 +4,14 @@ $LOAD_PATH.push File.join(File.dirname(__FILE__), 'lib')
4
4
  require 'quality/version'
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q(quality)
7
+ s.name = 'quality'
8
8
  s.version = Quality::VERSION
9
9
 
10
10
  s.authors = ['Vince Broz']
11
11
  # s.default_executable = %q{quality}
12
- s.description = %q(Quality is a tool that runs quality checks on Ruby
12
+ s.description = "Quality is a tool that runs quality checks on Ruby
13
13
  code using rubocop, cane, reek, flog and flay, and makes sure
14
- your numbers don't get any worse over time.
15
-
16
- )
14
+ your numbers don't get any worse over time."
17
15
  s.email = ['vince@broz.cc']
18
16
  # s.executables = ["quality"]
19
17
  # s.extra_rdoc_files = ["CHANGELOG", "License.txt"]
@@ -25,33 +23,33 @@ your numbers don't get any worse over time.
25
23
  'quality.gemspec'] & `git ls-files -z`.split("\0")
26
24
  # s.rdoc_options = ["--main", "README.md"]
27
25
  s.require_paths = ['lib']
28
- s.homepage = %q(http://github.com/apiology/quality)
26
+ s.homepage = 'http://github.com/apiology/quality'
29
27
  # s.rubyforge_project = %q{quality}
30
- s.rubygems_version = %q(1.3.6)
31
- s.summary = %q(Code quality tools for Ruby)
28
+ s.rubygems_version = '1.3.6'
29
+ s.summary = 'Code quality tools for Ruby'
32
30
 
33
- s.add_runtime_dependency(%q(cane), ['>= 2.6'])
34
- s.add_runtime_dependency(%q(reek), ['>= 1.3.4'])
35
- s.add_runtime_dependency(%q(flog), ['>= 4.1.1'])
31
+ s.add_runtime_dependency('cane', ['>= 2.6'])
32
+ s.add_runtime_dependency('reek', ['>= 1.3.4'])
33
+ s.add_runtime_dependency('flog', ['>= 4.1.1'])
36
34
  # flay 2.6.0 contained a command-line-parsing issue
37
- s.add_runtime_dependency(%q(flay), ['>= 2.4', '!= 2.6.0'])
38
- s.add_runtime_dependency(%q(rubocop))
39
- s.add_runtime_dependency(%q(bigfiles))
40
- s.add_runtime_dependency(%q(punchlist))
35
+ s.add_runtime_dependency('flay', ['>= 2.4', '!= 2.6.0'])
36
+ s.add_runtime_dependency('rubocop')
37
+ s.add_runtime_dependency('bigfiles')
38
+ s.add_runtime_dependency('punchlist')
41
39
 
42
40
  # need above 3.2.2 to support Ruby 2.0 syntax
43
41
  #
44
42
  # 3.6.6 was a buggy release, see seattlerb/ruby_parser#183
45
- s.add_runtime_dependency(%q(ruby_parser), ['>= 3.2.2', '!= 3.6.6'])
43
+ s.add_runtime_dependency('ruby_parser', ['>= 3.2.2', '!= 3.6.6'])
46
44
 
47
45
  # cane has an unadvertised dependency on json
48
- s.add_runtime_dependency(%q(json))
46
+ s.add_runtime_dependency('json')
49
47
 
50
- s.add_development_dependency(%q(bundler), ['>= 1.1'])
48
+ s.add_development_dependency('bundler', ['>= 1.1'])
51
49
  # Workaround for
52
50
  # https://github.com/bundler/bundler/issues/3401
53
- s.add_development_dependency(%q(rake), ['!= 10.4.2'])
54
- s.add_development_dependency(%q(simplecov))
55
- s.add_development_dependency(%q(mocha))
56
- s.add_development_dependency(%q(minitest), ['~> 5'])
51
+ s.add_development_dependency('rake', ['!= 10.4.2'])
52
+ s.add_development_dependency('simplecov')
53
+ s.add_development_dependency('mocha')
54
+ s.add_development_dependency('minitest', ['~> 5'])
57
55
  end
metadata CHANGED
@@ -1,228 +1,227 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quality
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.0.0
4
+ version: 13.0.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-07-20 00:00:00.000000000 Z
11
+ date: 2015-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cane
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: reek
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.3.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.3.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: flog
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: 4.1.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 4.1.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: flay
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '2.4'
62
- - - "!="
62
+ - - '!='
63
63
  - !ruby/object:Gem::Version
64
64
  version: 2.6.0
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - ">="
69
+ - - '>='
70
70
  - !ruby/object:Gem::Version
71
71
  version: '2.4'
72
- - - "!="
72
+ - - '!='
73
73
  - !ruby/object:Gem::Version
74
74
  version: 2.6.0
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rubocop
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ">="
79
+ - - '>='
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ">="
86
+ - - '>='
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: bigfiles
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - ">="
93
+ - - '>='
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ">="
100
+ - - '>='
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: punchlist
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - ">="
107
+ - - '>='
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  type: :runtime
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - ">="
114
+ - - '>='
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: ruby_parser
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - ">="
121
+ - - '>='
122
122
  - !ruby/object:Gem::Version
123
123
  version: 3.2.2
124
- - - "!="
124
+ - - '!='
125
125
  - !ruby/object:Gem::Version
126
126
  version: 3.6.6
127
127
  type: :runtime
128
128
  prerelease: false
129
129
  version_requirements: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - ">="
131
+ - - '>='
132
132
  - !ruby/object:Gem::Version
133
133
  version: 3.2.2
134
- - - "!="
134
+ - - '!='
135
135
  - !ruby/object:Gem::Version
136
136
  version: 3.6.6
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: json
139
139
  requirement: !ruby/object:Gem::Requirement
140
140
  requirements:
141
- - - ">="
141
+ - - '>='
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  type: :runtime
145
145
  prerelease: false
146
146
  version_requirements: !ruby/object:Gem::Requirement
147
147
  requirements:
148
- - - ">="
148
+ - - '>='
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  - !ruby/object:Gem::Dependency
152
152
  name: bundler
153
153
  requirement: !ruby/object:Gem::Requirement
154
154
  requirements:
155
- - - ">="
155
+ - - '>='
156
156
  - !ruby/object:Gem::Version
157
157
  version: '1.1'
158
158
  type: :development
159
159
  prerelease: false
160
160
  version_requirements: !ruby/object:Gem::Requirement
161
161
  requirements:
162
- - - ">="
162
+ - - '>='
163
163
  - !ruby/object:Gem::Version
164
164
  version: '1.1'
165
165
  - !ruby/object:Gem::Dependency
166
166
  name: rake
167
167
  requirement: !ruby/object:Gem::Requirement
168
168
  requirements:
169
- - - "!="
169
+ - - '!='
170
170
  - !ruby/object:Gem::Version
171
171
  version: 10.4.2
172
172
  type: :development
173
173
  prerelease: false
174
174
  version_requirements: !ruby/object:Gem::Requirement
175
175
  requirements:
176
- - - "!="
176
+ - - '!='
177
177
  - !ruby/object:Gem::Version
178
178
  version: 10.4.2
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: simplecov
181
181
  requirement: !ruby/object:Gem::Requirement
182
182
  requirements:
183
- - - ">="
183
+ - - '>='
184
184
  - !ruby/object:Gem::Version
185
185
  version: '0'
186
186
  type: :development
187
187
  prerelease: false
188
188
  version_requirements: !ruby/object:Gem::Requirement
189
189
  requirements:
190
- - - ">="
190
+ - - '>='
191
191
  - !ruby/object:Gem::Version
192
192
  version: '0'
193
193
  - !ruby/object:Gem::Dependency
194
194
  name: mocha
195
195
  requirement: !ruby/object:Gem::Requirement
196
196
  requirements:
197
- - - ">="
197
+ - - '>='
198
198
  - !ruby/object:Gem::Version
199
199
  version: '0'
200
200
  type: :development
201
201
  prerelease: false
202
202
  version_requirements: !ruby/object:Gem::Requirement
203
203
  requirements:
204
- - - ">="
204
+ - - '>='
205
205
  - !ruby/object:Gem::Version
206
206
  version: '0'
207
207
  - !ruby/object:Gem::Dependency
208
208
  name: minitest
209
209
  requirement: !ruby/object:Gem::Requirement
210
210
  requirements:
211
- - - "~>"
211
+ - - ~>
212
212
  - !ruby/object:Gem::Version
213
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
220
  version: '5'
221
- description: |+
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
224
224
  your numbers don't get any worse over time.
225
-
226
225
  email:
227
226
  - vince@broz.cc
228
227
  executables: []
@@ -258,17 +257,17 @@ require_paths:
258
257
  - lib
259
258
  required_ruby_version: !ruby/object:Gem::Requirement
260
259
  requirements:
261
- - - ">="
260
+ - - '>='
262
261
  - !ruby/object:Gem::Version
263
262
  version: '0'
264
263
  required_rubygems_version: !ruby/object:Gem::Requirement
265
264
  requirements:
266
- - - ">="
265
+ - - '>='
267
266
  - !ruby/object:Gem::Version
268
267
  version: '0'
269
268
  requirements: []
270
269
  rubyforge_project:
271
- rubygems_version: 2.4.3
270
+ rubygems_version: 2.4.6
272
271
  signing_key:
273
272
  specification_version: 4
274
273
  summary: Code quality tools for Ruby