foodcritic-rackspace-rules 0.0.2 → 1.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require 'pp'
|
|
2
2
|
|
|
3
|
-
rule 'RACK001', 'Missing license
|
|
3
|
+
rule 'RACK001', 'Missing license or copyright declarations' do
|
|
4
4
|
tags %w(style rackspace)
|
|
5
5
|
cookbook do |path|
|
|
6
6
|
matches = []
|
|
@@ -15,7 +15,7 @@ rule 'RACK001', 'Missing license declaration' do
|
|
|
15
15
|
# need to scan comments for this rule
|
|
16
16
|
lines = File.readlines(recipe)
|
|
17
17
|
next if lines.collect do |line|
|
|
18
|
-
line.include?('http://www.apache.org/licenses/LICENSE-2.0')
|
|
18
|
+
line.include?('Rackspace') || line.include?('# Copyright') || line.include?('http://www.apache.org/licenses/LICENSE-2.0')
|
|
19
19
|
end.compact.flatten.include? true
|
|
20
20
|
|
|
21
21
|
matches << {
|