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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18fa65905d8ca7d7f8d968cd150c703a0426d680
4
- data.tar.gz: 3e7618257f1e58499740908441209b386f662e85
3
+ metadata.gz: 0ba82925f9d35cd03980cf87ea36facd35294b85
4
+ data.tar.gz: 5748906f7e5a10a345e6b2f8ae2b8ab40da3a17b
5
5
  SHA512:
6
- metadata.gz: 044dadea9230a9f069fda1f743430e9bfa6c128a9ce3f3bcbc1ba60181551f675ac502453f53460a4c8dcabab6926ca2140b0708e3d0712e15a2ea6c8a20a59e
7
- data.tar.gz: 9b1e2e18c3ba98ab60b9c589dd320b3a4fc1327b8e050d43a7d6d23e4d3f90cfba739efef46e852b742e56435db0bec19e05c1edea4a403303a16589614b4bcf
6
+ metadata.gz: 709aeb06dce345bee67d09d96c5e8658394511b23894c7db4adfd00230fd90c1d9ed67f578e709f5e421cad496560e8e8da3f02caa5fdb6abb69e57138966d03
7
+ data.tar.gz: 817fb0244fef064802b2b8baa70572a4bc4d296d801e9cecb4981a5ab702302a94683fa136041327fcf8f976572bbdef6bd8a223166228bd4dd45a82f8e0c677
@@ -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 |tool|
87
- @dsl.define_task(tool) { @runner.run_quality_with_tool(tool) }
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
@@ -34,18 +34,20 @@ module Quality
34
34
  end
35
35
 
36
36
  def run_quality
37
- tools.each { |tool| run_quality_with_tool(tool) }
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(tool)
41
- suppressed = @config.skip_tools.include? tool
42
- installed = @gem_spec.find_all_by_name(tool).any? ||
43
- !@which.which(tool).nil?
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_#{tool}".to_sym).call
48
+ method("quality_#{tool_name}".to_sym).call
47
49
  elsif !installed
48
- puts "#{tool} not installed"
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
- # if ancestor.respond_to? :command_name
80
- # ancestor.command_name
81
- # else
82
- ancestor_name.split('::').last.underscore
83
- # end
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: /
@@ -16,7 +16,7 @@ module Quality
16
16
  args = [
17
17
  "-f '#{ruby_files_glob}'",
18
18
  ]
19
- args += cane_exclude_args if !exclude_files.empty?
19
+ args += cane_exclude_args unless exclude_files.empty?
20
20
  args.join(' ')
21
21
  end
22
22
 
@@ -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
- if !exclude_files.empty?
10
+ unless exclude_files.empty?
11
11
  exclude = " --exclude-glob '#{source_files_exclude_glob}'"
12
12
  end
13
13
 
@@ -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 = '21.0.4'.freeze
5
+ VERSION = '21.0.5'.freeze
6
6
  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: 21.0.4
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-22 00:00:00.000000000 Z
11
+ date: 2016-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport