quality 25.0.0 → 26.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: 3a5c90aea5a929b14f5092744d99277a2fd9834d
4
- data.tar.gz: 775ef1094302919c878998fa0c2faf1644365443
3
+ metadata.gz: 2273037269a7af1f185b729b587471d1516eb76a
4
+ data.tar.gz: 4253ffcd434143862235bb3db27aea804bf7f75d
5
5
  SHA512:
6
- metadata.gz: 80c9d4b7582bb56f98afc8f36efd776ae936782791867b6d29742dbfae9f995b52bb6aa93623a7cd4bc40b2eedd6cf1b4701aa56c2575533c926583298947281
7
- data.tar.gz: a1bb6f9fce4be8b38ad48dfa8cc3675eee907c2ce11954856fb01975c10c1f676fa4d56116e5ee83f14ec310f87d5689fcd0018aff35a103d2e139194db74d04
6
+ metadata.gz: 12009b820c8d70742fb24c226c5f49ebacb8590328dd58135d10b0333b6787c1a2105cfb1630d4d5c28316fd5d6f1d216a1989f53acafdd4c45096e475fab67a
7
+ data.tar.gz: 6923b2aac536a2d7b6dcbbf35d65ff2e3d5e0826dd23c536639ee30323e85dfc84a93059cb89469a2323d015d90c57b9181f1616bb9e67b4e8d765a11874ef45
@@ -19,6 +19,7 @@ module Quality
19
19
  :ruby_files,
20
20
  :python_files,
21
21
  :js_files,
22
+ :markdown_files,
22
23
  :shell_files,
23
24
  :source_and_doc_files,
24
25
  :source_files,
@@ -43,7 +43,7 @@ module Quality
43
43
  end
44
44
 
45
45
  def all_files
46
- @source_files ||= begin
46
+ @all_files ||= begin
47
47
  files = []
48
48
  tree = @commit.target.tree
49
49
  tree.walk(:preorder) do |root, file|
@@ -95,7 +95,7 @@ module Quality
95
95
  def source_files
96
96
  @source_files ||= begin
97
97
  real_files_matching do |blob|
98
- !blob.language.nil?
98
+ !blob.language.nil? && !blob.documentation?
99
99
  end
100
100
  end
101
101
  end
@@ -112,5 +112,15 @@ module Quality
112
112
  end
113
113
  end
114
114
  end
115
+
116
+ def real_files_of_type(file_type)
117
+ real_files_matching do |blob, _filename|
118
+ blob.language.to_s == file_type
119
+ end
120
+ end
121
+
122
+ def markdown_files
123
+ @markdown_files ||= real_files_of_type('Markdown')
124
+ end
115
125
  end
116
126
  end
@@ -85,7 +85,7 @@ module Quality
85
85
  @dsl.define_task(ratchet_name) { @runner.run_ratchet }
86
86
  @runner.tools.each do |tool_name, tool_exe|
87
87
  @dsl.define_task(tool_name) do
88
- @runner.run_quality_with_tool(tool_exe)
88
+ @runner.run_quality_with_tool(tool_name, tool_exe)
89
89
  end
90
90
  end
91
91
  end
@@ -109,6 +109,7 @@ module Quality
109
109
  def_delegators :@config,
110
110
  :ruby_files,
111
111
  :python_files,
112
+ :markdown_files,
112
113
  :shell_files,
113
114
  :source_files,
114
115
  :source_files_glob,
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Quality
4
+ module Tools
5
+ # Adds 'bigfiles' tool support to quality gem
6
+ module Mdl
7
+ private
8
+
9
+ def mdl_args
10
+ markdown_files.join(' ')
11
+ end
12
+
13
+ def quality_mdl
14
+ if mdl_args.empty?
15
+ puts 'No markdown files found--skipping mdl'
16
+ return
17
+ end
18
+
19
+ ratchet_quality_cmd('mdl',
20
+ args: mdl_args,
21
+ gives_error_code_on_violations: true) do |_line|
22
+ 1
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -4,5 +4,5 @@
4
4
  # reek, flog, flay and rubocop and makes sure your numbers don't get
5
5
  # any worse over time.
6
6
  module Quality
7
- VERSION = '25.0.0'
7
+ VERSION = '26.0.0'
8
8
  end
data/quality.gemspec CHANGED
@@ -39,6 +39,7 @@ Gem::Specification.new do |s|
39
39
  # flay 2.6.0 contained a command-line-parsing issue
40
40
  s.add_runtime_dependency('flay', ['>= 2.4', '!= 2.6.0'])
41
41
  s.add_runtime_dependency('rubocop')
42
+ s.add_runtime_dependency('mdl')
42
43
  s.add_runtime_dependency('rubocop-rspec')
43
44
  s.add_runtime_dependency('bigfiles', ['>= 0.1'])
44
45
  s.add_runtime_dependency('punchlist', ['>= 1.1'])
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: 25.0.0
4
+ version: 26.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: 2016-09-14 00:00:00.000000000 Z
11
+ date: 2016-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -128,6 +128,20 @@ dependencies:
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
+ - !ruby/object:Gem::Dependency
132
+ name: mdl
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ type: :runtime
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
131
145
  - !ruby/object:Gem::Dependency
132
146
  name: rubocop-rspec
133
147
  requirement: !ruby/object:Gem::Requirement
@@ -331,6 +345,7 @@ files:
331
345
  - lib/quality/tools/flay.rb
332
346
  - lib/quality/tools/flog.rb
333
347
  - lib/quality/tools/jscs.rb
348
+ - lib/quality/tools/mdl.rb
334
349
  - lib/quality/tools/pep8.rb
335
350
  - lib/quality/tools/punchlist.rb
336
351
  - lib/quality/tools/rails_best_practices.rb