quality 9.0.0 → 10.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: d0eeb8e8200a8489066c3555899760038353c7ff
4
- data.tar.gz: 3e81796940c32d493adf9a4d7dc62bf748ae5963
3
+ metadata.gz: b3e1637d8df1844bfacacd030b0f75c3c83d32c0
4
+ data.tar.gz: 6777cff9c719cbf836d5018e9ecae3ae4bfee6d7
5
5
  SHA512:
6
- metadata.gz: 2377e676f03c114b1295d46d778071b43c7f25760272a1096009a8ff3418b25d7732fd6bf86799ab5e887835ff48ecde18bf5bc515ac3d50439b80c2b370a2a2
7
- data.tar.gz: d8dd06d0ca7ad5034466a9014ee38dc3fa14273f9e797dca91e364f249e3f6df94076d30278cd089aa1641a37c3fc492221ce748a577d3798eaaea347fd79fd3
6
+ metadata.gz: b96706c2eece843b04e3deb095810fa06cd64bed2a2f6ff57d4db60c1db0fc004f2139bd3dae296aafabef45f84dafc05119d387aa639578eac8c932a5c3dcaa
7
+ data.tar.gz: 6dc5d41f84d78a83d20339bb9e76efb0974a74b0f013424f5918daa616d515063fb47f3bdea238ad8addafa0fe70b10564d72686f7a104a1992f332211e8cdf8
data/README.md CHANGED
@@ -90,6 +90,10 @@ Quality::Rake::Task.new { |t|
90
90
  # extensions--defaults to %w(Rakefile Dockerfile)
91
91
  t.extra_files = ['tools/check-script', 'Rakefile']
92
92
 
93
+ # Pick any extra files that are source files, but may not have
94
+ # extensions--defaults to %w(Rakefile)
95
+ t.extra_ruby_files = ['Rakefile']
96
+
93
97
  # Extensions for Ruby language files--defaults to 'rb,rake'
94
98
  t.ruby_file_extensions = 'rb,rake'
95
99
 
@@ -40,6 +40,10 @@ module Quality
40
40
  # extensions--defaults to %w(Rakefile Dockerfile)
41
41
  attr_accessor :extra_files
42
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
+
43
47
  # Extensions for Ruby language files--defaults to 'rb,rake'
44
48
  attr_accessor :ruby_file_extensions
45
49
 
@@ -68,7 +72,11 @@ module Quality
68
72
  end
69
73
 
70
74
  def extra_files
71
- @extra_files ||= %w(Rakefile Dockerfile)
75
+ @extra_files ||= extra_ruby_files.clone.concat(%w(Dockerfile))
76
+ end
77
+
78
+ def extra_ruby_files
79
+ @extra_ruby_files ||= %w(Rakefile)
72
80
  end
73
81
 
74
82
  def source_file_extensions
@@ -77,23 +85,26 @@ module Quality
77
85
  'yml,sh,json'
78
86
  end
79
87
 
80
- def source_files_glob(dirs = source_dirs,
88
+ def source_files_glob(extra_source_files = extra_files,
89
+ dirs = source_dirs,
81
90
  extensions = source_file_extensions)
82
- "{#{extra_files.join(',')}," +
91
+ "{#{extra_source_files.join(',')}," +
83
92
  File.join("{#{dirs.join(',')}}",
84
93
  '**',
85
94
  "*.{#{extensions}}") +
86
95
  '}'
87
96
  end
88
97
 
98
+ # XXX: Should add .gemspec
89
99
  def ruby_file_extensions
90
100
  @ruby_file_extensions ||= 'rb,rake'
91
101
  end
92
102
 
93
103
  def ruby_files_glob
94
- source_files_glob(ruby_dirs, ruby_file_extensions)
104
+ source_files_glob(extra_ruby_files, ruby_dirs, ruby_file_extensions)
95
105
  end
96
106
 
107
+ # XXX: Rakefile is hard-coded here--should use config instead
97
108
  def ruby_files
98
109
  @globber.glob("{*.{#{ruby_file_extensions}},Rakefile}")
99
110
  .concat(@globber.glob(ruby_files_glob)).join(' ')
@@ -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 = '9.0.0'
5
+ VERSION = '10.0.0'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quality
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 10.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz