foodcritic-rackspace-rules 1.2.0 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/foodcritic/rackspace/rules/version.rb +1 -1
- data/lib/foodcritic/rules/rules.rb +16 -3
- metadata +5 -13
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MTllMDRkZDg5MzY4OTM4MzY5OGJjNGE3MGY3ODdjYTc0OGFlZDhhNg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
N2NlNzI3YWNkMDgyMTk0M2E4YzgwZTBhNGUzMjRiNWVkY2VmYTRiNw==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
OTAxMDIwMzJkNzc3NGZiYzViMWQzOTY1YjU0MjI3ZGE3MTRmZDY3NmQzNzUw
|
10
|
+
MDVmNzY1NjI2YzUzNThiMjUzYzBlNDMzYjBkOTZlYjAyMmQ4NjlkMWRkOGMz
|
11
|
+
YzEyYjZhOGM3ZWE5ODNiOTA2MDExMjhjZTcyYzM2ODA2NDYwMDc=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZjNjNzI0MDgxYjFjNDI0MzEyZTkzNTg5MmZiZGUxMWQ4ZTA4MTVlNzJlNDU4
|
14
|
+
NDMxMzI5MDNjYmNhYmQ3Y2ZmYTMwYmRkMjVkNTljZjkyNWZlMmU1OGFjZDVh
|
15
|
+
YjVjNDI4ZDVkYWQ0YzkzYjFkOGFlNDNkZWM2MmFiZmM4ZDY5NDY=
|
@@ -128,7 +128,6 @@ end # rule
|
|
128
128
|
rack005_required_fields = {
|
129
129
|
'maintainer' => 'Rackspace',
|
130
130
|
'maintainer_email' => 'rackspace-cookbooks@rackspace.com',
|
131
|
-
'license' => 'Apache 2.0'
|
132
131
|
}
|
133
132
|
req_fields = StringIO.new
|
134
133
|
rack005_required_fields.each do |k, v|
|
@@ -140,10 +139,10 @@ rule 'RACK005', "Cookbook metadata must have#{req_fields.string}" do
|
|
140
139
|
rack005_required_fields.map do |field, value|
|
141
140
|
ast.xpath(%Q(//command[ident/@value='#{field}']/descendant::tstring_content[@value!='#{value}']))
|
142
141
|
end
|
143
|
-
end #
|
142
|
+
end # metadata
|
144
143
|
end # rule
|
145
144
|
|
146
|
-
rule 'RACK006', 'Cookbook chefspec
|
145
|
+
rule 'RACK006', 'Cookbook rspec (chefspec) tests should be in ./test/unit/spec, not ./spec' do
|
147
146
|
tags %w(style rackspace)
|
148
147
|
|
149
148
|
default_suite_found = false
|
@@ -160,3 +159,17 @@ rule 'RACK006', 'Cookbook chefspec and rspec tests should be in ./test/unit/spec
|
|
160
159
|
matches
|
161
160
|
end # cookbook
|
162
161
|
end # rule
|
162
|
+
|
163
|
+
rule 'RACK007', "Cookbook must be licensed Apache 2.0 (public) or All rights reserved (private)" do
|
164
|
+
tags %w(style rackspace)
|
165
|
+
apache = 'Apache 2.0'
|
166
|
+
arr = 'All rights reserved'
|
167
|
+
metadata do |ast, filename|
|
168
|
+
matches = []
|
169
|
+
license_value = ast.xpath(%Q(//command[ident/@value='license']/descendant::tstring_content/@value))
|
170
|
+
if license_value.nil? || !(license_value.to_s == apache || license_value.to_s == arr)
|
171
|
+
matches << ast.xpath(%Q(//command[ident/@value='license']/descendant::tstring_content))
|
172
|
+
end
|
173
|
+
matches
|
174
|
+
end # metadata
|
175
|
+
end # rule
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foodcritic-rackspace-rules
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
5
|
-
prerelease:
|
4
|
+
version: 1.2.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Martin Smith
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-11 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: foodcritic
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -76,26 +69,25 @@ files:
|
|
76
69
|
homepage: https://github.com/racker/foodcritic-rackspace-rules
|
77
70
|
licenses:
|
78
71
|
- Apache-2.0
|
72
|
+
metadata: {}
|
79
73
|
post_install_message:
|
80
74
|
rdoc_options: []
|
81
75
|
require_paths:
|
82
76
|
- lib
|
83
77
|
required_ruby_version: !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
78
|
requirements:
|
86
79
|
- - ! '>='
|
87
80
|
- !ruby/object:Gem::Version
|
88
81
|
version: '0'
|
89
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
83
|
requirements:
|
92
84
|
- - ! '>='
|
93
85
|
- !ruby/object:Gem::Version
|
94
86
|
version: '0'
|
95
87
|
requirements: []
|
96
88
|
rubyforge_project:
|
97
|
-
rubygems_version:
|
89
|
+
rubygems_version: 2.4.1
|
98
90
|
signing_key:
|
99
|
-
specification_version:
|
91
|
+
specification_version: 4
|
100
92
|
summary: Foodcritic rules for rackops cookbooks or stacks
|
101
93
|
test_files: []
|