foodcritic-rackspace-rules 0.0.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -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 << {
|