quality 21.0.4 → 21.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/quality/rake/task.rb +4 -2
- data/lib/quality/runner.rb +16 -12
- data/lib/quality/tools/bundle_audit.rb +2 -2
- data/lib/quality/tools/cane.rb +1 -1
- data/lib/quality/tools/punchlist.rb +1 -1
- data/lib/quality/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ba82925f9d35cd03980cf87ea36facd35294b85
|
4
|
+
data.tar.gz: 5748906f7e5a10a345e6b2f8ae2b8ab40da3a17b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 709aeb06dce345bee67d09d96c5e8658394511b23894c7db4adfd00230fd90c1d9ed67f578e709f5e421cad496560e8e8da3f02caa5fdb6abb69e57138966d03
|
7
|
+
data.tar.gz: 817fb0244fef064802b2b8baa70572a4bc4d296d801e9cecb4981a5ab702302a94683fa136041327fcf8f976572bbdef6bd8a223166228bd4dd45a82f8e0c677
|
data/lib/quality/rake/task.rb
CHANGED
@@ -83,8 +83,10 @@ module Quality
|
|
83
83
|
'the same' unless ::Rake.application.last_description
|
84
84
|
@dsl.define_task(quality_name) { @runner.run_quality }
|
85
85
|
@dsl.define_task(ratchet_name) { @runner.run_ratchet }
|
86
|
-
@runner.tools.each do |
|
87
|
-
@dsl.define_task(
|
86
|
+
@runner.tools.each do |tool_name, tool_exe|
|
87
|
+
@dsl.define_task(tool_name) do
|
88
|
+
@runner.run_quality_with_tool(tool_exe)
|
89
|
+
end
|
88
90
|
end
|
89
91
|
end
|
90
92
|
end
|
data/lib/quality/runner.rb
CHANGED
@@ -34,18 +34,20 @@ module Quality
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def run_quality
|
37
|
-
tools.each
|
37
|
+
tools.each do |tool_name, tool_exe|
|
38
|
+
run_quality_with_tool(tool_name, tool_exe)
|
39
|
+
end
|
38
40
|
end
|
39
41
|
|
40
|
-
def run_quality_with_tool(
|
41
|
-
suppressed = @config.skip_tools.include?
|
42
|
-
installed = @gem_spec.find_all_by_name(
|
43
|
-
!@which.which(
|
42
|
+
def run_quality_with_tool(tool_name, tool_exe)
|
43
|
+
suppressed = @config.skip_tools.include? tool_name
|
44
|
+
installed = @gem_spec.find_all_by_name(tool_name).any? ||
|
45
|
+
!@which.which(tool_exe).nil?
|
44
46
|
|
45
47
|
if installed && !suppressed
|
46
|
-
method("quality_#{
|
48
|
+
method("quality_#{tool_name}".to_sym).call
|
47
49
|
elsif !installed
|
48
|
-
puts "#{
|
50
|
+
puts "#{tool_name} not installed"
|
49
51
|
end
|
50
52
|
end
|
51
53
|
|
@@ -76,11 +78,13 @@ module Quality
|
|
76
78
|
self.class.ancestors.map do |ancestor|
|
77
79
|
ancestor_name = ancestor.to_s
|
78
80
|
next unless ancestor_name.start_with?('Quality::Tools::')
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
81
|
+
name = ancestor.to_s.split('::').last.underscore
|
82
|
+
command_name = if ancestor.respond_to? :command_name
|
83
|
+
ancestor.command_name
|
84
|
+
else
|
85
|
+
name
|
86
|
+
end
|
87
|
+
[name, command_name]
|
84
88
|
end.compact
|
85
89
|
end
|
86
90
|
|
@@ -2,12 +2,12 @@ module Quality
|
|
2
2
|
module Tools
|
3
3
|
# Adds 'bundler_audit' tool support to quality gem
|
4
4
|
module BundleAudit
|
5
|
-
private
|
6
|
-
|
7
5
|
def self.command_name
|
8
6
|
'bundle-audit'
|
9
7
|
end
|
10
8
|
|
9
|
+
private
|
10
|
+
|
11
11
|
def quality_bundle_audit
|
12
12
|
ratchet_quality_cmd('bundle-audit', args: '') do |line|
|
13
13
|
if line =~ /^Name: /
|
data/lib/quality/tools/cane.rb
CHANGED
@@ -7,7 +7,7 @@ module Quality
|
|
7
7
|
def punchlist_args
|
8
8
|
glob = "--glob '#{source_and_doc_files_glob}'"
|
9
9
|
regexp = " --regexp '#{punchlist_regexp}'" if punchlist_regexp
|
10
|
-
|
10
|
+
unless exclude_files.empty?
|
11
11
|
exclude = " --exclude-glob '#{source_files_exclude_glob}'"
|
12
12
|
end
|
13
13
|
|
data/lib/quality/version.rb
CHANGED
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: 21.0.
|
4
|
+
version: 21.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vince Broz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|