quality 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,23 +29,20 @@ module Quality
29
29
  #
30
30
  class Task < ::Rake::TaskLib
31
31
 
32
- # Name of reek task.
33
- # Defaults to :reek.
32
+ # Name of quality task.
33
+ # Defaults to :quality.
34
34
  attr_accessor :name
35
35
 
36
- # Array of directories to be added to $LOAD_PATH before running reek.
37
- # Defaults to ['<the absolute path to reek's lib directory>']
38
- attr_accessor :libs
39
-
40
- # Use verbose output. If this is set to true, the task will print
41
- # the reek command to stdout. Defaults to false.
42
- attr_accessor :verbose
36
+ # Array of strings describing tools to be skipped--e.g., ["cane"]
37
+ #
38
+ # Defaults to []
39
+ attr_accessor :skip_tools
43
40
 
44
41
  # Defines a new task, using the name +name+.
45
42
  def initialize(args = {})
46
43
  @name = args[:name]
47
44
  @name = 'quality' if @name.nil?
48
- @libs = [File.expand_path(File.dirname(__FILE__) + '/../../../lib')]
45
+ @skip_tools = [] if @skip_tools.nil?
49
46
  @config_files = nil
50
47
  @source_files = nil
51
48
  @ruby_opts = []
@@ -69,13 +66,21 @@ module Quality
69
66
  end
70
67
 
71
68
  def run_task
72
- quality_cane
73
- if Gem::Specification.find_all_by_name("reek").any?
74
- quality_reek
69
+ tools = ['cane', 'flog', 'flay', 'reek', 'rubocop']
70
+ tools.each do |tool|
71
+ installed = Gem::Specification.find_all_by_name(tool).any?
72
+ suppressed = @skip_tools.include? tool
73
+
74
+ if installed
75
+ puts "#{tool} not installed"
76
+ elsif suppressed
77
+ puts "Suppressing use of #{tool}"
78
+ else
79
+ method("quality_#{tool}".to_sym).call
80
+ end
81
+ elsif
82
+ puts ""
75
83
  end
76
- quality_flog
77
- quality_flay
78
- quality_rubocop
79
84
  end
80
85
 
81
86
  def ratchet_quality_cmd(cmd,
@@ -1,3 +1,3 @@
1
1
  module Quality
2
- VERSION = '0.2.6'
2
+ VERSION = '0.2.7'
3
3
  end
data/quality.gemspec CHANGED
@@ -29,12 +29,7 @@ your numbers don't get any worse over time.
29
29
  s.summary = %q{Code quality tools for Ruby}
30
30
 
31
31
  s.add_runtime_dependency(%q<cane>, [">= 2.6"])
32
- #
33
- # disabled until Ruby 2.0 support is complete and newer ruby_parser is supported in reek's gemspec.
34
- #
35
- # See https://github.com/troessner/reek/issues/165
36
- #
37
- # s.add_runtime_dependency(%q<reek>, [">= 1.3.1"])
32
+ s.add_runtime_dependency(%q<reek>, [">= 1.3.2"])
38
33
  s.add_runtime_dependency(%q<flog>, [">= 4.1.1"])
39
34
  s.add_runtime_dependency(%q<flay>, [">= 2.4"])
40
35
  s.add_runtime_dependency(%q<rubocop>)
metadata CHANGED
@@ -1,128 +1,161 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quality
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Vince Broz
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-08-20 00:00:00.000000000 Z
12
+ date: 2013-09-09 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: cane
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - '>='
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: '2.6'
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - '>='
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: '2.6'
30
+ - !ruby/object:Gem::Dependency
31
+ name: reek
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 1.3.2
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.3.2
27
46
  - !ruby/object:Gem::Dependency
28
47
  name: flog
29
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
30
50
  requirements:
31
- - - '>='
51
+ - - ! '>='
32
52
  - !ruby/object:Gem::Version
33
53
  version: 4.1.1
34
54
  type: :runtime
35
55
  prerelease: false
36
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
37
58
  requirements:
38
- - - '>='
59
+ - - ! '>='
39
60
  - !ruby/object:Gem::Version
40
61
  version: 4.1.1
41
62
  - !ruby/object:Gem::Dependency
42
63
  name: flay
43
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
44
66
  requirements:
45
- - - '>='
67
+ - - ! '>='
46
68
  - !ruby/object:Gem::Version
47
69
  version: '2.4'
48
70
  type: :runtime
49
71
  prerelease: false
50
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
51
74
  requirements:
52
- - - '>='
75
+ - - ! '>='
53
76
  - !ruby/object:Gem::Version
54
77
  version: '2.4'
55
78
  - !ruby/object:Gem::Dependency
56
79
  name: rubocop
57
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
58
82
  requirements:
59
- - - '>='
83
+ - - ! '>='
60
84
  - !ruby/object:Gem::Version
61
85
  version: '0'
62
86
  type: :runtime
63
87
  prerelease: false
64
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
65
90
  requirements:
66
- - - '>='
91
+ - - ! '>='
67
92
  - !ruby/object:Gem::Version
68
93
  version: '0'
69
94
  - !ruby/object:Gem::Dependency
70
95
  name: ruby_parser
71
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
72
98
  requirements:
73
- - - '>='
99
+ - - ! '>='
74
100
  - !ruby/object:Gem::Version
75
101
  version: 3.2.2
76
102
  type: :runtime
77
103
  prerelease: false
78
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
79
106
  requirements:
80
- - - '>='
107
+ - - ! '>='
81
108
  - !ruby/object:Gem::Version
82
109
  version: 3.2.2
83
110
  - !ruby/object:Gem::Dependency
84
111
  name: json
85
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
86
114
  requirements:
87
- - - '>='
115
+ - - ! '>='
88
116
  - !ruby/object:Gem::Version
89
117
  version: '0'
90
118
  type: :runtime
91
119
  prerelease: false
92
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
93
122
  requirements:
94
- - - '>='
123
+ - - ! '>='
95
124
  - !ruby/object:Gem::Version
96
125
  version: '0'
97
126
  - !ruby/object:Gem::Dependency
98
127
  name: bundler
99
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
100
130
  requirements:
101
- - - '>='
131
+ - - ! '>='
102
132
  - !ruby/object:Gem::Version
103
133
  version: '1.1'
104
134
  type: :development
105
135
  prerelease: false
106
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
107
138
  requirements:
108
- - - '>='
139
+ - - ! '>='
109
140
  - !ruby/object:Gem::Version
110
141
  version: '1.1'
111
142
  - !ruby/object:Gem::Dependency
112
143
  name: rake
113
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
114
146
  requirements:
115
- - - '>='
147
+ - - ! '>='
116
148
  - !ruby/object:Gem::Version
117
149
  version: '0'
118
150
  type: :development
119
151
  prerelease: false
120
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
121
154
  requirements:
122
- - - '>='
155
+ - - ! '>='
123
156
  - !ruby/object:Gem::Version
124
157
  version: '0'
125
- description: "Quality is a tool that runs quality checks on Ruby\ncode using rubocop,
158
+ description: ! "Quality is a tool that runs quality checks on Ruby\ncode using rubocop,
126
159
  cane, reek, flog and flay, and makes sure \nyour numbers don't get any worse over
127
160
  time.\n"
128
161
  email:
@@ -139,25 +172,32 @@ files:
139
172
  - quality.gemspec
140
173
  homepage: http://github.com/apiology/quality
141
174
  licenses: []
142
- metadata: {}
143
175
  post_install_message:
144
176
  rdoc_options: []
145
177
  require_paths:
146
178
  - lib
147
179
  required_ruby_version: !ruby/object:Gem::Requirement
180
+ none: false
148
181
  requirements:
149
- - - '>='
182
+ - - ! '>='
150
183
  - !ruby/object:Gem::Version
151
184
  version: '0'
185
+ segments:
186
+ - 0
187
+ hash: 695672815
152
188
  required_rubygems_version: !ruby/object:Gem::Requirement
189
+ none: false
153
190
  requirements:
154
- - - '>='
191
+ - - ! '>='
155
192
  - !ruby/object:Gem::Version
156
193
  version: '0'
194
+ segments:
195
+ - 0
196
+ hash: 695672815
157
197
  requirements: []
158
198
  rubyforge_project:
159
- rubygems_version: 2.0.6
199
+ rubygems_version: 1.8.23
160
200
  signing_key:
161
- specification_version: 4
201
+ specification_version: 3
162
202
  summary: Code quality tools for Ruby
163
203
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 152705eb13652d71e755c4e31f97dc3a235976b2
4
- data.tar.gz: 1c3acedb900d8fe264714777fea4e9e0d177ede0
5
- SHA512:
6
- metadata.gz: 3971b1a25aa8c4f722f0fa34367a8c965ebaba4aacfbd9a1f6c8e7c82fcc616a145a74eaf0d41df70e9de0401b2569eb6ceb8a3565c9484217ce47915797a216
7
- data.tar.gz: 5de21a2e5377d6ed1ab73fb3e70737642d577f022251b9711404e49cd706aec31ebb9276ac5a202783c23b2ecd36e67bdc91d746931913be2f86ff0ff1aa4de2