quality 9.0.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/quality/rake/config.rb +15 -4
- data/lib/quality/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3e1637d8df1844bfacacd030b0f75c3c83d32c0
|
4
|
+
data.tar.gz: 6777cff9c719cbf836d5018e9ecae3ae4bfee6d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/quality/rake/config.rb
CHANGED
@@ -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(
|
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(
|
88
|
+
def source_files_glob(extra_source_files = extra_files,
|
89
|
+
dirs = source_dirs,
|
81
90
|
extensions = source_file_extensions)
|
82
|
-
"{#{
|
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(' ')
|
data/lib/quality/version.rb
CHANGED