foodcritic 10.1.1 → 10.2.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: bf1400039591c18cb681dc2add6b181ea08cd506
4
- data.tar.gz: a54e351dc350f646a429ec9a266c4d67f09979d0
3
+ metadata.gz: b08ad5cec31244e974aa28a39c76d4e56ab2fdd8
4
+ data.tar.gz: 1666eb4b5239344af70ef2a6e755396034af676b
5
5
  SHA512:
6
- metadata.gz: 7fc6031eb6d2c0a25d59871f9412decb490e455a2e0be5617c6473ab7c32a0642005023da4918cb55c03d02399b413bf8327ba68528dc9a88c908292f270e728
7
- data.tar.gz: 9d9f373826b4e3996dfd41a7a0227210bc8ab601668a8eef96eeda39bac179752b59bcc8e7fae3dbe9d956c385707138593573ec3026cfa416400899fac91e3a
6
+ metadata.gz: c8bd0e679350c1114a79dfb5f2eb46ab5d2db6b9560567ae64b539dfc950b957bd5dd0bddb692125114465966db579c7030e9a6cf87ca5b4d0074ffc6ba9b01c
7
+ data.tar.gz: 56d65593fa28610db403643e5006f3d451c38dc1c0ea612be8423fe8af8cd8cb2dfd30264338074dda4404260bf7c3f3771b8816fc7ce63c786438bb4e5bc83d
data/CHANGELOG.md CHANGED
@@ -1,13 +1,28 @@
1
1
  # Foodcritic Changelog:
2
2
 
3
- ## [10.1.1](https://github.com/acrmp/foodcritic/tree/v10.1.1) (2017-03-29)
3
+ ## [10.2.0](https://github.com/acrmp/foodcritic/tree/v10.2.0) (2017-03-30)
4
+
5
+ [Full Changelog](https://github.com/acrmp/foodcritic/compare/v10.1.1...v10.2.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Add FC066/FC067/FC068 to check metadata chef_version, license, and supports [#528](https://github.com/acrmp/foodcritic/pull/528) ([tas50](https://github.com/tas50))
10
+
11
+ **Fixed bugs:**
12
+
13
+ - Don't trigger FC007 on a shorthand recipe includes [#526](https://github.com/acrmp/foodcritic/pull/526) ([tas50](https://github.com/tas50))
14
+ - Fix already initialized constant warning with `--search-gems` [#529](https://github.com/acrmp/foodcritic/pull/529) ([nvwls](https://github.com/nvwls))
15
+
16
+ ## [v10.1.1](https://github.com/acrmp/foodcritic/tree/v10.1.1) (2017-03-29)
17
+
4
18
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v10.1.0...v10.1.1)
5
19
 
6
20
  **Fixed bugs:**
7
21
 
8
- - Fix FC016 triggering on custom resources [\#525](https://github.com/acrmp/foodcritic/pull/525) ([tas50](https://github.com/tas50))
22
+ - Fix FC016 triggering on custom resources [#525](https://github.com/acrmp/foodcritic/pull/525) ([tas50](https://github.com/tas50))
9
23
 
10
24
  ## [v10.1.0](https://github.com/acrmp/foodcritic/tree/v10.1.0) (2017-03-29)
25
+
11
26
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v10.0.0...v10.1.0)
12
27
 
13
28
  **Implemented enhancements:**
@@ -52,344 +67,389 @@
52
67
 
53
68
  **Implemented enhancements:**
54
69
 
55
- - Add Chef client 12.15.19 metadata [\#493](https://github.com/acrmp/foodcritic/pull/493) ([tas50](https://github.com/tas50))
56
- - Clarify exclude path instructions in the CLI help [\#489](https://github.com/acrmp/foodcritic/pull/489) ([unixorn](https://github.com/unixorn))
70
+ - Add Chef client 12.15.19 metadata [#493](https://github.com/acrmp/foodcritic/pull/493) ([tas50](https://github.com/tas50))
71
+ - Clarify exclude path instructions in the CLI help [#489](https://github.com/acrmp/foodcritic/pull/489) ([unixorn](https://github.com/unixorn))
57
72
 
58
73
  ## [v8.0.0](https://github.com/acrmp/foodcritic/tree/v8.0.0) (2016-09-23)
74
+
59
75
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v7.1.0...v8.0.0)
60
76
 
61
77
  **Implemented enhancements:**
62
78
 
63
- - Require Ruby 2.2.2 [\#487](https://github.com/acrmp/foodcritic/pull/487) ([tas50](https://github.com/tas50))
64
- - Add 12.14.89 metadata and make it the default [\#486](https://github.com/acrmp/foodcritic/pull/486) ([tas50](https://github.com/tas50))
65
- - Remove Chef 11 metadata and rule support [\#481](https://github.com/acrmp/foodcritic/pull/481) ([tas50](https://github.com/tas50))
79
+ - Require Ruby 2.2.2 [#487](https://github.com/acrmp/foodcritic/pull/487) ([tas50](https://github.com/tas50))
80
+ - Add 12.14.89 metadata and make it the default [#486](https://github.com/acrmp/foodcritic/pull/486) ([tas50](https://github.com/tas50))
81
+ - Remove Chef 11 metadata and rule support [#481](https://github.com/acrmp/foodcritic/pull/481) ([tas50](https://github.com/tas50))
66
82
 
67
83
  ## [v7.1.0](https://github.com/acrmp/foodcritic/tree/v7.1.0) (2016-08-17)
84
+
68
85
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v7.0.1...v7.1.0)
69
86
 
70
87
  **Implemented enhancements:**
71
88
 
72
- - Add Chef 12.13.37 metadata and make it the default [\#479](https://github.com/acrmp/foodcritic/pull/479) ([tas50](https://github.com/tas50))
73
- - Add 12.12.13 metadata and fix metadata generation [\#472](https://github.com/acrmp/foodcritic/pull/472) ([tas50](https://github.com/tas50))
89
+ - Add Chef 12.13.37 metadata and make it the default [#479](https://github.com/acrmp/foodcritic/pull/479) ([tas50](https://github.com/tas50))
90
+ - Add 12.12.13 metadata and fix metadata generation [#472](https://github.com/acrmp/foodcritic/pull/472) ([tas50](https://github.com/tas50))
74
91
 
75
92
  **Fixed bugs:**
76
93
 
77
- - Add missing assigment attributes [\#478](https://github.com/acrmp/foodcritic/pull/478) ([ofir-petrushka](https://github.com/ofir-petrushka))
94
+ - Add missing assigment attributes [#478](https://github.com/acrmp/foodcritic/pull/478) ([ofir-petrushka](https://github.com/ofir-petrushka))
78
95
 
79
96
  ## [v7.0.1](https://github.com/acrmp/foodcritic/tree/v7.0.1) (2016-07-06)
97
+
80
98
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v7.0.0...v7.0.1)
81
99
 
82
100
  **Implemented enhancements:**
83
101
 
84
- - Readme improvements [\#468](https://github.com/acrmp/foodcritic/pull/468) ([tas50](https://github.com/tas50))
102
+ - Readme improvements [#468](https://github.com/acrmp/foodcritic/pull/468) ([tas50](https://github.com/tas50))
85
103
 
86
104
  ## [v7.0.0](https://github.com/acrmp/foodcritic/tree/v7.0.0) (2016-07-05)
105
+
87
106
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v6.3.0...v7.0.0)
88
107
 
89
108
  **Implemented enhancements:**
90
109
 
91
- - Remove support for Ruby 2.0 [\#465](https://github.com/acrmp/foodcritic/pull/465) ([tas50](https://github.com/tas50))
92
- - Remove chef version support for Chef 0.7, 0.8, 0.9, and 0.10 [\#464](https://github.com/acrmp/foodcritic/pull/464) ([tas50](https://github.com/tas50))
93
- - Add chef 12.11.18 metadata and make it the default [\#461](https://github.com/acrmp/foodcritic/pull/461) ([tas50](https://github.com/tas50))
94
- - FC032 allow the new :before timing on resource notifications in Chef \>= 12.6.0 [\#441](https://github.com/acrmp/foodcritic/pull/441) ([gnjack](https://github.com/gnjack))
95
- - New cookbook\_maintainer api methods [\#248](https://github.com/acrmp/foodcritic/pull/248) ([miguelcnf](https://github.com/miguelcnf))
110
+ - Remove support for Ruby 2.0 [#465](https://github.com/acrmp/foodcritic/pull/465) ([tas50](https://github.com/tas50))
111
+ - Remove chef version support for Chef 0.7, 0.8, 0.9, and 0.10 [#464](https://github.com/acrmp/foodcritic/pull/464) ([tas50](https://github.com/tas50))
112
+ - Add chef 12.11.18 metadata and make it the default [#461](https://github.com/acrmp/foodcritic/pull/461) ([tas50](https://github.com/tas50))
113
+ - FC032 allow the new :before timing on resource notifications in Chef >= 12.6.0 [#441](https://github.com/acrmp/foodcritic/pull/441) ([gnjack](https://github.com/gnjack))
114
+ - New cookbook_maintainer api methods [#248](https://github.com/acrmp/foodcritic/pull/248) ([miguelcnf](https://github.com/miguelcnf))
96
115
 
97
116
  ## [v6.3.0](https://github.com/acrmp/foodcritic/tree/v6.3.0) (2016-05-16)
117
+
98
118
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v6.2.0...v6.3.0)
99
119
 
100
120
  **Implemented enhancements:**
101
121
 
102
- - Add Chef 12.10.24 metadata and release 6.3.0 [\#456](https://github.com/acrmp/foodcritic/pull/456) ([tas50](https://github.com/tas50))
122
+ - Add Chef 12.10.24 metadata and release 6.3.0 [#456](https://github.com/acrmp/foodcritic/pull/456) ([tas50](https://github.com/tas50))
103
123
 
104
124
  ## [v6.2.0](https://github.com/acrmp/foodcritic/tree/v6.2.0) (2016-04-26)
125
+
105
126
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v6.1.1...v6.2.0)
106
127
 
107
128
  **Implemented enhancements:**
108
129
 
109
- - Add 12.9.38 metadata and make it the default chef version [\#452](https://github.com/acrmp/foodcritic/pull/452) ([tas50](https://github.com/tas50))
130
+ - Add 12.9.38 metadata and make it the default chef version [#452](https://github.com/acrmp/foodcritic/pull/452) ([tas50](https://github.com/tas50))
110
131
 
111
132
  ## [v6.1.1](https://github.com/acrmp/foodcritic/tree/v6.1.1) (2016-04-08)
133
+
112
134
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v6.1.0...v6.1.1)
113
135
 
114
136
  **Implemented enhancements:**
115
137
 
116
- - Use latest gherkin for faster installs [\#447](https://github.com/acrmp/foodcritic/pull/447) ([jkeiser](https://github.com/jkeiser))
138
+ - Use latest gherkin for faster installs [#447](https://github.com/acrmp/foodcritic/pull/447) ([jkeiser](https://github.com/jkeiser))
117
139
 
118
140
  ## [v6.1.0](https://github.com/acrmp/foodcritic/tree/v6.1.0) (2016-04-06)
141
+
119
142
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v6.0.1...v6.1.0)
120
143
 
121
144
  **Implemented enhancements:**
122
145
 
123
- - Don't require cucumber and rubocop to run rake [\#444](https://github.com/acrmp/foodcritic/pull/444) ([jkeiser](https://github.com/jkeiser))
124
- - Add 12.8.1 metadata + update metadata process [\#438](https://github.com/acrmp/foodcritic/pull/438) ([tas50](https://github.com/tas50))
125
- - Add metadata for Chef 12.7.2 and update instructions [\#427](https://github.com/acrmp/foodcritic/pull/427) ([tas50](https://github.com/tas50))
146
+ - Don't require cucumber and rubocop to run rake [#444](https://github.com/acrmp/foodcritic/pull/444) ([jkeiser](https://github.com/jkeiser))
147
+ - Add 12.8.1 metadata + update metadata process [#438](https://github.com/acrmp/foodcritic/pull/438) ([tas50](https://github.com/tas50))
148
+ - Add metadata for Chef 12.7.2 and update instructions [#427](https://github.com/acrmp/foodcritic/pull/427) ([tas50](https://github.com/tas50))
126
149
 
127
150
  **Fixed bugs:**
128
151
 
129
- - Rake.last\_comment was depreciated in Rake11. [\#434](https://github.com/acrmp/foodcritic/pull/434) ([gkuchta](https://github.com/gkuchta))
152
+ - Rake.last_comment was depreciated in Rake11\. [#434](https://github.com/acrmp/foodcritic/pull/434) ([gkuchta](https://github.com/gkuchta))
130
153
 
131
154
  ## [v6.0.1](https://github.com/acrmp/foodcritic/tree/v6.0.1) (2016-02-22)
155
+
132
156
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v6.0.0...v6.0.1)
133
157
 
134
158
  **Implemented enhancements:**
135
159
 
136
- - Check for URLs that are helpful to the Supermarket [\#421](https://github.com/acrmp/foodcritic/pull/421) ([nathenharvey](https://github.com/nathenharvey))
160
+ - Check for URLs that are helpful to the Supermarket [#421](https://github.com/acrmp/foodcritic/pull/421) ([nathenharvey](https://github.com/nathenharvey))
137
161
 
138
162
  **Fixed bugs:**
139
163
 
140
- - Fix FC058 false positives [\#423](https://github.com/acrmp/foodcritic/pull/423) ([jaym](https://github.com/jaym))
164
+ - Fix FC058 false positives [#423](https://github.com/acrmp/foodcritic/pull/423) ([jaym](https://github.com/jaym))
141
165
 
142
166
  ## [v6.0.0](https://github.com/acrmp/foodcritic/tree/v6.0.0) (2016-01-14)
167
+
143
168
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v5.0.0...v6.0.0)
144
169
 
145
170
  **Implemented enhancements:**
146
171
 
147
- - Cookbook version is specified in metadata [\#347](https://github.com/acrmp/foodcritic/issues/347)
148
- - FC035 - Templates, Style [\#62](https://github.com/acrmp/foodcritic/issues/62)
149
- - Add Chef 12.6.0 metadata [\#417](https://github.com/acrmp/foodcritic/pull/417) ([tas50](https://github.com/tas50))
150
- - New Rule 61 - valid cookbook version [\#405](https://github.com/acrmp/foodcritic/pull/405) ([lamont-granquist](https://github.com/lamont-granquist))
151
- - Require Oracle as a RHEL equiv [\#404](https://github.com/acrmp/foodcritic/pull/404) ([tas50](https://github.com/tas50))
152
- - Suggest updating from definitions to custom resources [\#403](https://github.com/acrmp/foodcritic/pull/403) ([tas50](https://github.com/tas50))
153
- - add checks for correct use of use\_inline\_resources [\#402](https://github.com/acrmp/foodcritic/pull/402) ([lamont-granquist](https://github.com/lamont-granquist))
154
- - Add new tags for rules [\#401](https://github.com/acrmp/foodcritic/pull/401) ([tas50](https://github.com/tas50))
155
- - Rename FC045 since Chef 12 requires name metadata [\#399](https://github.com/acrmp/foodcritic/pull/399) ([tas50](https://github.com/tas50))
156
- - Add Chef 12.5.1 metadata [\#397](https://github.com/acrmp/foodcritic/pull/397) ([tas50](https://github.com/tas50))
157
- - Add self-dependency warning [\#328](https://github.com/acrmp/foodcritic/pull/328) ([lamont-granquist](https://github.com/lamont-granquist))
172
+ - Cookbook version is specified in metadata [#347](https://github.com/acrmp/foodcritic/issues/347)
173
+ - FC035 - Templates, Style [#62](https://github.com/acrmp/foodcritic/issues/62)
174
+ - Add Chef 12.6.0 metadata [#417](https://github.com/acrmp/foodcritic/pull/417) ([tas50](https://github.com/tas50))
175
+ - New Rule 61 - valid cookbook version [#405](https://github.com/acrmp/foodcritic/pull/405) ([lamont-granquist](https://github.com/lamont-granquist))
176
+ - Require Oracle as a RHEL equiv [#404](https://github.com/acrmp/foodcritic/pull/404) ([tas50](https://github.com/tas50))
177
+ - Suggest updating from definitions to custom resources [#403](https://github.com/acrmp/foodcritic/pull/403) ([tas50](https://github.com/tas50))
178
+ - add checks for correct use of use_inline_resources [#402](https://github.com/acrmp/foodcritic/pull/402) ([lamont-granquist](https://github.com/lamont-granquist))
179
+ - Add new tags for rules [#401](https://github.com/acrmp/foodcritic/pull/401) ([tas50](https://github.com/tas50))
180
+ - Rename FC045 since Chef 12 requires name metadata [#399](https://github.com/acrmp/foodcritic/pull/399) ([tas50](https://github.com/tas50))
181
+ - Add Chef 12.5.1 metadata [#397](https://github.com/acrmp/foodcritic/pull/397) ([tas50](https://github.com/tas50))
182
+ - Add self-dependency warning [#328](https://github.com/acrmp/foodcritic/pull/328) ([lamont-granquist](https://github.com/lamont-granquist))
158
183
 
159
184
  **Fixed bugs:**
160
185
 
161
- - Time to cut a release? [\#344](https://github.com/acrmp/foodcritic/issues/344)
162
- - FC048: Warn within a provider block, refs \#365 [\#413](https://github.com/acrmp/foodcritic/pull/413) ([acrmp](https://github.com/acrmp))
163
- - use\_inline\_resources checks apply to Chef 11+ [\#410](https://github.com/acrmp/foodcritic/pull/410) ([tas50](https://github.com/tas50))
164
- - fix for edge condition with 061 [\#408](https://github.com/acrmp/foodcritic/pull/408) ([lamont-granquist](https://github.com/lamont-granquist))
165
- - Rake options override default options [\#382](https://github.com/acrmp/foodcritic/pull/382) ([pkang](https://github.com/pkang))
186
+ - Time to cut a release? [#344](https://github.com/acrmp/foodcritic/issues/344)
187
+ - FC048: Warn within a provider block, refs #365 [#413](https://github.com/acrmp/foodcritic/pull/413) ([acrmp](https://github.com/acrmp))
188
+ - use_inline_resources checks apply to Chef 11+ [#410](https://github.com/acrmp/foodcritic/pull/410) ([tas50](https://github.com/tas50))
189
+ - fix for edge condition with 061 [#408](https://github.com/acrmp/foodcritic/pull/408) ([lamont-granquist](https://github.com/lamont-granquist))
190
+ - Rake options override default options [#382](https://github.com/acrmp/foodcritic/pull/382) ([pkang](https://github.com/pkang))
166
191
 
167
192
  **Closed issues:**
168
193
 
169
- - Chef Docs vs Foodcritic 4.x [\#354](https://github.com/acrmp/foodcritic/issues/354)
170
- - Github pages have drifted from foodcritic.io [\#332](https://github.com/acrmp/foodcritic/issues/332)
171
- - FC001 is re-enabled thus http://www.foodcritic.io/ is out-of-date [\#330](https://github.com/acrmp/foodcritic/issues/330)
194
+ - Chef Docs vs Foodcritic 4.x [#354](https://github.com/acrmp/foodcritic/issues/354)
195
+ - Github pages have drifted from foodcritic.io [#332](https://github.com/acrmp/foodcritic/issues/332)
196
+ - FC001 is re-enabled thus <http://www.foodcritic.io/> is out-of-date [#330](https://github.com/acrmp/foodcritic/issues/330)
172
197
 
173
198
  ## [v5.0.0](https://github.com/acrmp/foodcritic/tree/v5.0.0) (2015-09-17)
199
+
174
200
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v4.0.0...v5.0.0)
175
201
 
176
202
  **Implemented enhancements:**
177
203
 
178
- - Support for a magic comment to temporarily disable a rule [\#259](https://github.com/acrmp/foodcritic/issues/259)
179
- - FC007 false positive on depending on the cookbook currently being parsed [\#242](https://github.com/acrmp/foodcritic/issues/242)
180
- - Create a rule for "execute resource used to install packages" [\#180](https://github.com/acrmp/foodcritic/issues/180)
181
- - New Rule Proposal: uid/gid should be integer [\#53](https://github.com/acrmp/foodcritic/issues/53)
182
- - merge default options before check instead of during intialization [\#321](https://github.com/acrmp/foodcritic/pull/321) ([ranjib](https://github.com/ranjib))
204
+ - Support for a magic comment to temporarily disable a rule [#259](https://github.com/acrmp/foodcritic/issues/259)
205
+ - FC007 false positive on depending on the cookbook currently being parsed [#242](https://github.com/acrmp/foodcritic/issues/242)
206
+ - Create a rule for "execute resource used to install packages" [#180](https://github.com/acrmp/foodcritic/issues/180)
207
+ - New Rule Proposal: uid/gid should be integer [#53](https://github.com/acrmp/foodcritic/issues/53)
208
+ - merge default options before check instead of during intialization [#321](https://github.com/acrmp/foodcritic/pull/321) ([ranjib](https://github.com/ranjib))
183
209
 
184
210
  **Fixed bugs:**
185
211
 
186
- - Fix FC031 and FC045 and metadata.rb vs metadata.json issues [\#369](https://github.com/acrmp/foodcritic/issues/369)
187
- - FC007 false positive on depending on the cookbook currently being parsed [\#242](https://github.com/acrmp/foodcritic/issues/242)
188
- - FC010 Test failures due to missing search support [\#199](https://github.com/acrmp/foodcritic/issues/199)
189
- - 'lazy' causes false-positive in FC009 - on previous line [\#189](https://github.com/acrmp/foodcritic/issues/189)
190
- - FC051 tries to validate temp files of the editors [\#172](https://github.com/acrmp/foodcritic/issues/172)
212
+ - Fix FC031 and FC045 and metadata.rb vs metadata.json issues [#369](https://github.com/acrmp/foodcritic/issues/369)
213
+ - FC007 false positive on depending on the cookbook currently being parsed [#242](https://github.com/acrmp/foodcritic/issues/242)
214
+ - FC010 Test failures due to missing search support [#199](https://github.com/acrmp/foodcritic/issues/199)
215
+ - 'lazy' causes false-positive in FC009 - on previous line [#189](https://github.com/acrmp/foodcritic/issues/189)
216
+ - FC051 tries to validate temp files of the editors [#172](https://github.com/acrmp/foodcritic/issues/172)
191
217
 
192
218
  ## [v4.0.0](https://github.com/acrmp/foodcritic/tree/v4.0.0) (2014-06-11)
219
+
193
220
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v3.0.3...v4.0.0)
194
221
 
195
222
  ## [v3.0.3](https://github.com/acrmp/foodcritic/tree/v3.0.3) (2013-10-13)
223
+
196
224
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v3.0.2...v3.0.3)
197
225
 
198
226
  ## [v3.0.2](https://github.com/acrmp/foodcritic/tree/v3.0.2) (2013-10-05)
227
+
199
228
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v3.0.1...v3.0.2)
200
229
 
201
230
  ## [v3.0.1](https://github.com/acrmp/foodcritic/tree/v3.0.1) (2013-09-25)
231
+
202
232
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v3.0.0...v3.0.1)
203
233
 
204
234
  **Implemented enhancements:**
205
235
 
206
- - Roles rules [\#19](https://github.com/acrmp/foodcritic/issues/19)
236
+ - Roles rules [#19](https://github.com/acrmp/foodcritic/issues/19)
207
237
 
208
238
  ## [v3.0.0](https://github.com/acrmp/foodcritic/tree/v3.0.0) (2013-09-14)
239
+
209
240
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v2.2.0...v3.0.0)
210
241
 
211
242
  **Implemented enhancements:**
212
243
 
213
- - Provide a comprehensive list of `tags` somewhere on the docs [\#63](https://github.com/acrmp/foodcritic/issues/63)
244
+ - Provide a comprehensive list of `tags` somewhere on the docs [#63](https://github.com/acrmp/foodcritic/issues/63)
214
245
 
215
246
  **Fixed bugs:**
216
247
 
217
- - FC001, FC019 shouldn't match on node.run\_state [\#66](https://github.com/acrmp/foodcritic/issues/66)
248
+ - FC001, FC019 shouldn't match on node.run_state [#66](https://github.com/acrmp/foodcritic/issues/66)
218
249
 
219
250
  ## [v2.2.0](https://github.com/acrmp/foodcritic/tree/v2.2.0) (2013-07-10)
251
+
220
252
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v2.1.0...v2.2.0)
221
253
 
222
254
  ## [v2.1.0](https://github.com/acrmp/foodcritic/tree/v2.1.0) (2013-04-16)
255
+
223
256
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v2.0.1...v2.1.0)
224
257
 
225
258
  **Implemented enhancements:**
226
259
 
227
- - New Rule Proposal: ||= considered harmful with attributes [\#52](https://github.com/acrmp/foodcritic/issues/52)
228
- - Would like to be able to exempt rules in cookbooks [\#10](https://github.com/acrmp/foodcritic/issues/10)
260
+ - New Rule Proposal: ||= considered harmful with attributes [#52](https://github.com/acrmp/foodcritic/issues/52)
261
+ - Would like to be able to exempt rules in cookbooks [#10](https://github.com/acrmp/foodcritic/issues/10)
229
262
 
230
263
  ## [v2.0.1](https://github.com/acrmp/foodcritic/tree/v2.0.1) (2013-03-31)
264
+
231
265
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v2.0.0...v2.0.1)
232
266
 
233
267
  ## [v2.0.0](https://github.com/acrmp/foodcritic/tree/v2.0.0) (2013-03-24)
268
+
234
269
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v1.7.0...v2.0.0)
235
270
 
236
271
  **Implemented enhancements:**
237
272
 
238
- - New Rule: Check for existence of 'name' in metadata.rb [\#64](https://github.com/acrmp/foodcritic/issues/64)
239
- - New Rule: action ":none" vs ":nothing" [\#61](https://github.com/acrmp/foodcritic/issues/61)
273
+ - New Rule: Check for existence of 'name' in metadata.rb [#64](https://github.com/acrmp/foodcritic/issues/64)
274
+ - New Rule: action ":none" vs ":nothing" [#61](https://github.com/acrmp/foodcritic/issues/61)
240
275
 
241
276
  **Fixed bugs:**
242
277
 
243
- - Incorrectly decoding attributes within a block [\#76](https://github.com/acrmp/foodcritic/issues/76)
244
- - FC003 doesn't match unless statements [\#58](https://github.com/acrmp/foodcritic/issues/58)
245
- - FC019 triggered on internal recipe hash key as symbol instead of node [\#54](https://github.com/acrmp/foodcritic/issues/54)
278
+ - Incorrectly decoding attributes within a block [#76](https://github.com/acrmp/foodcritic/issues/76)
279
+ - FC003 doesn't match unless statements [#58](https://github.com/acrmp/foodcritic/issues/58)
280
+ - FC019 triggered on internal recipe hash key as symbol instead of node [#54](https://github.com/acrmp/foodcritic/issues/54)
246
281
 
247
282
  ## [v1.7.0](https://github.com/acrmp/foodcritic/tree/v1.7.0) (2012-12-27)
283
+
248
284
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v1.6.1...v1.7.0)
249
285
 
250
286
  **Fixed bugs:**
251
287
 
252
- - FC037 false positive for subscribes [\#65](https://github.com/acrmp/foodcritic/issues/65)
253
- - Foodcritic not being fully deterministic. [\#55](https://github.com/acrmp/foodcritic/issues/55)
288
+ - FC037 false positive for subscribes [#65](https://github.com/acrmp/foodcritic/issues/65)
289
+ - Foodcritic not being fully deterministic. [#55](https://github.com/acrmp/foodcritic/issues/55)
254
290
 
255
291
  ## [v1.6.1](https://github.com/acrmp/foodcritic/tree/v1.6.1) (2012-08-30)
292
+
256
293
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v1.6.0...v1.6.1)
257
294
 
258
295
  ## [v1.6.0](https://github.com/acrmp/foodcritic/tree/v1.6.0) (2012-08-28)
296
+
259
297
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v1.5.0...v1.6.0)
260
298
 
261
299
  **Implemented enhancements:**
262
300
 
263
- - Thoughts on more style-y lint checks [\#15](https://github.com/acrmp/foodcritic/issues/15)
301
+ - Thoughts on more style-y lint checks [#15](https://github.com/acrmp/foodcritic/issues/15)
264
302
 
265
303
  **Fixed bugs:**
266
304
 
267
- - FC020 triggered on non-ruby shell command [\#30](https://github.com/acrmp/foodcritic/issues/30)
268
- - Incorrect FC019 alarms [\#22](https://github.com/acrmp/foodcritic/issues/22)
305
+ - FC020 triggered on non-ruby shell command [#30](https://github.com/acrmp/foodcritic/issues/30)
306
+ - Incorrect FC019 alarms [#22](https://github.com/acrmp/foodcritic/issues/22)
269
307
 
270
308
  ## [v1.5.0](https://github.com/acrmp/foodcritic/tree/v1.5.0) (2012-08-20)
309
+
271
310
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v1.5.1...v1.5.0)
272
311
 
273
312
  ## [v1.5.1](https://github.com/acrmp/foodcritic/tree/v1.5.1) (2012-08-20)
313
+
274
314
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v1.4.0...v1.5.1)
275
315
 
276
316
  **Fixed bugs:**
277
317
 
278
- - FC007 should not be triggered by include\_recipe "\#{cookbook\_name}::blah" [\#44](https://github.com/acrmp/foodcritic/issues/44)
279
- - FC022 block name check appears to be too simplistic [\#29](https://github.com/acrmp/foodcritic/issues/29)
318
+ - FC007 should not be triggered by include_recipe "#{cookbook_name}::blah" [#44](https://github.com/acrmp/foodcritic/issues/44)
319
+ - FC022 block name check appears to be too simplistic [#29](https://github.com/acrmp/foodcritic/issues/29)
280
320
 
281
321
  ## [v1.4.0](https://github.com/acrmp/foodcritic/tree/v1.4.0) (2012-06-15)
322
+
282
323
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v1.3.1...v1.4.0)
283
324
 
284
325
  ## [v1.3.1](https://github.com/acrmp/foodcritic/tree/v1.3.1) (2012-06-09)
326
+
285
327
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v1.3.0...v1.3.1)
286
328
 
287
329
  **Implemented enhancements:**
288
330
 
289
- - catch pry breakpoints [\#36](https://github.com/acrmp/foodcritic/issues/36)
331
+ - catch pry breakpoints [#36](https://github.com/acrmp/foodcritic/issues/36)
290
332
 
291
333
  **Fixed bugs:**
292
334
 
293
- - resource\_attributes should show all of the relevant part of the AST [\#31](https://github.com/acrmp/foodcritic/issues/31)
294
- - FC003 is triggered, despite being handled [\#26](https://github.com/acrmp/foodcritic/issues/26)
335
+ - resource_attributes should show all of the relevant part of the AST [#31](https://github.com/acrmp/foodcritic/issues/31)
336
+ - FC003 is triggered, despite being handled [#26](https://github.com/acrmp/foodcritic/issues/26)
295
337
 
296
338
  ## [v1.3.0](https://github.com/acrmp/foodcritic/tree/v1.3.0) (2012-05-21)
339
+
297
340
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v1.2.0...v1.3.0)
298
341
 
299
342
  ## [v1.2.0](https://github.com/acrmp/foodcritic/tree/v1.2.0) (2012-04-21)
343
+
300
344
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v1.1.0...v1.2.0)
301
345
 
302
346
  ## [v1.1.0](https://github.com/acrmp/foodcritic/tree/v1.1.0) (2012-03-25)
347
+
303
348
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v1.0.1...v1.1.0)
304
349
 
305
350
  **Fixed bugs:**
306
351
 
307
- - ruby segfault / foodcritic 1.0.0 / nokogiri 1.5.2 [\#18](https://github.com/acrmp/foodcritic/issues/18)
352
+ - ruby segfault / foodcritic 1.0.0 / nokogiri 1.5.2 [#18](https://github.com/acrmp/foodcritic/issues/18)
308
353
 
309
354
  ## [v1.0.1](https://github.com/acrmp/foodcritic/tree/v1.0.1) (2012-03-15)
355
+
310
356
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v1.0.0...v1.0.1)
311
357
 
312
358
  **Implemented enhancements:**
313
359
 
314
- - rules in code? [\#8](https://github.com/acrmp/foodcritic/issues/8)
360
+ - rules in code? [#8](https://github.com/acrmp/foodcritic/issues/8)
315
361
 
316
362
  ## [v1.0.0](https://github.com/acrmp/foodcritic/tree/v1.0.0) (2012-03-04)
363
+
317
364
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.11.1...v1.0.0)
318
365
 
319
366
  **Implemented enhancements:**
320
367
 
321
- - Foodcritic doesn't have a -v [\#16](https://github.com/acrmp/foodcritic/issues/16)
368
+ - Foodcritic doesn't have a -v [#16](https://github.com/acrmp/foodcritic/issues/16)
322
369
 
323
370
  **Fixed bugs:**
324
371
 
325
- - FC003: Recognise updated chef-solo-search [\#17](https://github.com/acrmp/foodcritic/issues/17)
326
- - foodcritic v10 and v11 have conflicting yajl-ruby dependencies with chef [\#14](https://github.com/acrmp/foodcritic/issues/14)
372
+ - FC003: Recognise updated chef-solo-search [#17](https://github.com/acrmp/foodcritic/issues/17)
373
+ - foodcritic v10 and v11 have conflicting yajl-ruby dependencies with chef [#14](https://github.com/acrmp/foodcritic/issues/14)
327
374
 
328
375
  ## [v0.11.1](https://github.com/acrmp/foodcritic/tree/v0.11.1) (2012-02-29)
376
+
329
377
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.11.0...v0.11.1)
330
378
 
331
379
  **Implemented enhancements:**
332
380
 
333
- - Want "all" arg to '-f' option. [\#11](https://github.com/acrmp/foodcritic/issues/11)
381
+ - Want "all" arg to '-f' option. [#11](https://github.com/acrmp/foodcritic/issues/11)
334
382
 
335
383
  **Fixed bugs:**
336
384
 
337
- - Epic fail fail? [\#13](https://github.com/acrmp/foodcritic/issues/13)
385
+ - Epic fail fail? [#13](https://github.com/acrmp/foodcritic/issues/13)
338
386
 
339
387
  ## [v0.11.0](https://github.com/acrmp/foodcritic/tree/v0.11.0) (2012-02-22)
388
+
340
389
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.10.0...v0.11.0)
341
390
 
342
391
  **Fixed bugs:**
343
392
 
344
- - Numeric value for mode should be 5 digits \(CHEF-174\) [\#9](https://github.com/acrmp/foodcritic/pull/9) ([aia](https://github.com/aia))
393
+ - Numeric value for mode should be 5 digits (CHEF-174) [#9](https://github.com/acrmp/foodcritic/pull/9) ([aia](https://github.com/aia))
345
394
 
346
395
  ## [v0.10.0](https://github.com/acrmp/foodcritic/tree/v0.10.0) (2012-02-20)
396
+
347
397
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.9.0...v0.10.0)
348
398
 
349
399
  ## [v0.9.0](https://github.com/acrmp/foodcritic/tree/v0.9.0) (2012-01-26)
400
+
350
401
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.8.1...v0.9.0)
351
402
 
352
403
  ## [v0.8.1](https://github.com/acrmp/foodcritic/tree/v0.8.1) (2012-01-20)
404
+
353
405
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.8.0...v0.8.1)
354
406
 
355
407
  ## [v0.8.0](https://github.com/acrmp/foodcritic/tree/v0.8.0) (2012-01-19)
408
+
356
409
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.7.0...v0.8.0)
357
410
 
358
411
  **Fixed bugs:**
359
412
 
360
- - Don't raise FC003 warning if chef-solo-search is installed [\#7](https://github.com/acrmp/foodcritic/issues/7)
413
+ - Don't raise FC003 warning if chef-solo-search is installed [#7](https://github.com/acrmp/foodcritic/issues/7)
361
414
 
362
415
  ## [v0.7.0](https://github.com/acrmp/foodcritic/tree/v0.7.0) (2011-12-31)
416
+
363
417
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.6.0...v0.7.0)
364
418
 
365
419
  ## [v0.6.0](https://github.com/acrmp/foodcritic/tree/v0.6.0) (2011-12-18)
420
+
366
421
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.5.2...v0.6.0)
367
422
 
368
423
  **Fixed bugs:**
369
424
 
370
- - Bundler fails to resolve JSON version [\#6](https://github.com/acrmp/foodcritic/issues/6)
425
+ - Bundler fails to resolve JSON version [#6](https://github.com/acrmp/foodcritic/issues/6)
371
426
 
372
427
  ## [v0.5.2](https://github.com/acrmp/foodcritic/tree/v0.5.2) (2011-12-15)
428
+
373
429
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.5.1...v0.5.2)
374
430
 
375
431
  ## [v0.5.1](https://github.com/acrmp/foodcritic/tree/v0.5.1) (2011-12-14)
432
+
376
433
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.5.0...v0.5.1)
377
434
 
378
435
  ## [v0.5.0](https://github.com/acrmp/foodcritic/tree/v0.5.0) (2011-12-13)
436
+
379
437
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.4.0...v0.5.0)
380
438
 
381
439
  ## [v0.4.0](https://github.com/acrmp/foodcritic/tree/v0.4.0) (2011-12-10)
440
+
382
441
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.3.0...v0.4.0)
383
442
 
384
443
  ## [v0.3.0](https://github.com/acrmp/foodcritic/tree/v0.3.0) (2011-12-04)
444
+
385
445
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.2.0...v0.3.0)
386
446
 
387
447
  ## [v0.2.0](https://github.com/acrmp/foodcritic/tree/v0.2.0) (2011-12-01)
448
+
388
449
  [Full Changelog](https://github.com/acrmp/foodcritic/compare/v0.1.0...v0.2.0)
389
450
 
390
451
  ## [v0.1.0](https://github.com/acrmp/foodcritic/tree/v0.1.0) (2011-11-30)
391
- [Full Changelog](https://github.com/acrmp/foodcritic/compare/4257264aa0bf93e3d13851ac0343a6b25ca3d316...v0.1.0)
392
-
393
452
 
453
+ [Full Changelog](https://github.com/acrmp/foodcritic/compare/4257264aa0bf93e3d13851ac0343a6b25ca3d316...v0.1.0)
394
454
 
395
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
455
+ - _This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)_
data/README.md CHANGED
@@ -26,6 +26,22 @@ $ bundle install
26
26
  $ bundle exec rake
27
27
  ```
28
28
 
29
+ ## Testing Foodcritic
30
+
31
+ Foodcritic includes rspec tests of the application itself and cucumber tests for each of the included rules. Each of these tests can be run via rake
32
+
33
+ Running rspec tests:
34
+
35
+ ```
36
+ $ bundle exec rake test
37
+ ```
38
+
39
+ Running cucumber tests:
40
+
41
+ ```
42
+ $ bundle exec rake features
43
+ ```
44
+
29
45
  ## License
30
46
 
31
47
  MIT - see the accompanying [LICENSE](https://github.com/acrmp/foodcritic/blob/master/LICENSE) file for details.
@@ -52,3 +52,8 @@ Feature: Check for undeclared recipe dependencies
52
52
  Given a cookbook that does not have defined metadata
53
53
  When I check the cookbook
54
54
  Then the undeclared dependency warning 007 should not be displayed
55
+
56
+ Scenario: Cookbook uses the include_recipe shorthand syntax
57
+ Given a cookbook that uses the include_recipe shorthand syntax
58
+ When I check the cookbook
59
+ Then the undeclared dependency warning 007 should not be displayed
@@ -0,0 +1,20 @@
1
+ Feature: Check for no chef_version metadata
2
+
3
+ In order to clearly specify chef version compatibility to users
4
+ As a developer
5
+ I want to be notified when my cookbook metadata does not specify the chef_version
6
+
7
+ Scenario: Metadata without a chef_version
8
+ Given a cookbook with metadata that does not include a chef_version keyword
9
+ When I check the cookbook
10
+ Then the metadata missing chef_version warning 066 should be shown against the metadata file
11
+
12
+ Scenario: Metadata with a chef_version
13
+ Given a cookbook with metadata that includes a chef_version keyword
14
+ When I check the cookbook
15
+ Then the metadata missing chef_version warning 066 should be not shown against the metadata file
16
+
17
+ Scenario: Cookbook without metadata file
18
+ Given a cookbook that does not have defined metadata
19
+ When I check the cookbook
20
+ Then the metadata missing chef_version warning 066 should be not shown against the metadata file
@@ -0,0 +1,20 @@
1
+ Feature: Check for no supports metadata
2
+
3
+ In order to clearly specify platform support to users
4
+ As a developer
5
+ I want to be notified when my cookbook metadata does not specify the platform supports
6
+
7
+ Scenario: Metadata without a supports metadata
8
+ Given a cookbook with metadata that does not include a supports keyword
9
+ When I check the cookbook
10
+ Then the metadata missing supports warning 067 should be shown against the metadata file
11
+
12
+ Scenario: Metadata with a supports metadata
13
+ Given a cookbook with metadata that includes a supports keyword
14
+ When I check the cookbook
15
+ Then the metadata missing supports warning 067 should be not shown against the metadata file
16
+
17
+ Scenario: Cookbook without metadata file
18
+ Given a cookbook that does not have defined metadata
19
+ When I check the cookbook
20
+ Then the metadata missing supports warning 067 should be not shown against the metadata file
@@ -0,0 +1,20 @@
1
+ Feature: Check for no license metadata
2
+
3
+ In order to clearly specify cookbook licensing to consumers
4
+ As a developer
5
+ I want to be notified when my cookbook metadata does not specify the license
6
+
7
+ Scenario: Metadata without a license
8
+ Given a cookbook with metadata that does not include a license keyword
9
+ When I check the cookbook
10
+ Then the metadata missing license warning 068 should be shown against the metadata file
11
+
12
+ Scenario: Metadata with a license
13
+ Given a cookbook with metadata that includes a license keyword
14
+ When I check the cookbook
15
+ Then the metadata missing license warning 068 should be not shown against the metadata file
16
+
17
+ Scenario: Cookbook without metadata file
18
+ Given a cookbook that does not have defined metadata
19
+ When I check the cookbook
20
+ Then the metadata missing license warning 068 should be not shown against the metadata file
@@ -16,20 +16,20 @@ Feature: Continuous Integration Support
16
16
  And the build status should be <build_status>
17
17
 
18
18
  Examples:
19
- | cookbook_matches | tag_arguments | warnings_shown | build_status |
20
- | FC002,FC004 | | FC002,FC004 | failed |
21
- | FC002,FC004 | -t style | FC002 | failed |
22
- | FC002,FC004 | -t style -f ~any | FC002 | successful |
23
- | FC002,FC004 | -f FC005 | FC002,FC004 | successful |
24
- | FC002,FC004 | -f FC004 | FC002,FC004 | failed |
25
- | FC002,FC004 | --epic-fail FC002 | FC002,FC004 | failed |
26
- | FC002,FC005 | -f ~any | FC002,FC005 | successful |
27
- | FC002,FC005 | -f any -f ~FC014 | FC002,FC005 | failed |
28
- | FC002,FC005 | -f any,~FC014 | FC002,FC005 | failed |
29
- | FC002 | -f ~FC002 | FC002 | successful |
30
- | FC002,FC005 | -f ~FC002 | FC002,FC005 | failed |
31
- | FC002,FC005 | -f any -f ~FC002 | FC002,FC005 | failed |
32
- | FC002 | -f any,~FC002 | FC002 | failed |
33
- | FC002 | -f any -f ~FC002 | FC002 | successful |
34
- | FC002,FC005 | -f any,~FC002 | FC002,FC005 | failed |
35
- | FC002,FC005 | -f ~FC002 -f ~FC004 | FC002,FC005 | failed |
19
+ | cookbook_matches | tag_arguments | warnings_shown | build_status |
20
+ | FC002,FC004 | | FC002,FC004 | failed |
21
+ | FC002,FC004 | -t style | FC002 | failed |
22
+ | FC002,FC004 | -t style -f ~any | FC002 | successful |
23
+ | FC002,FC004 | -f FC005 | FC002,FC004 | successful |
24
+ | FC002,FC004 | -f FC004 | FC002,FC004 | failed |
25
+ | FC002,FC004 | --epic-fail FC002 | FC002,FC004 | failed |
26
+ | FC002,FC005 | -f ~any | FC002,FC005 | successful |
27
+ | FC002,FC005 | -f any -f ~FC014 | FC002,FC005 | failed |
28
+ | FC002,FC005 | -f any,~FC014 | FC002,FC005 | failed |
29
+ | FC002 | -f ~FC002 -f ~metadata | FC002 | successful |
30
+ | FC002,FC005 | -f ~FC002 | FC002,FC005 | failed |
31
+ | FC002,FC005 | -f any -f ~FC002 | FC002,FC005 | failed |
32
+ | FC002 | -f any,~FC002 | FC002 | failed |
33
+ | FC002 | -f any -f ~FC002 -f ~metadata | FC002 | successful |
34
+ | FC002,FC005 | -f any,~FC002 | FC002,FC005 | failed |
35
+ | FC002,FC005 | -f ~FC002 -f ~FC004 | FC002,FC005 | failed |
@@ -509,6 +509,12 @@ Given "a cookbook recipe that includes both declared and undeclared recipe depen
509
509
  }
510
510
  end
511
511
 
512
+ Given "a cookbook that uses the include_recipe shorthand syntax" do
513
+ write_recipe %q{
514
+ include_recipe "::some_recipe"
515
+ }
516
+ end
517
+
512
518
  Given /^a cookbook recipe that includes several declared recipe dependencies - (brace|block)$/ do |brace_or_block|
513
519
  cookbook_declares_dependencies(brace_or_block.to_sym)
514
520
  end
@@ -2540,3 +2546,33 @@ end
2540
2546
  Given(/^a cookbook with metadata that includes a source_url expression$/) do
2541
2547
  write_metadata "source_url an(expression)"
2542
2548
  end
2549
+
2550
+ Given(/^a cookbook with metadata that (includes|does not include) a chef_version keyword$/) do |includes|
2551
+ write_metadata %Q{
2552
+ #{"chef_version '> 12.6'" if includes == 'includes'}
2553
+ }
2554
+ end
2555
+
2556
+ Then(/^the metadata missing chef_version warning 066 should be (shown|not shown) against the metadata file$/) do |show_warning|
2557
+ expect_warning("FC066", :file => "metadata.rb", :expect_warning => show_warning == "shown")
2558
+ end
2559
+
2560
+ Given(/^a cookbook with metadata that (includes|does not include) a supports keyword$/) do |includes|
2561
+ write_metadata %Q{
2562
+ #{"supports 'debian'" if includes == 'includes'}
2563
+ }
2564
+ end
2565
+
2566
+ Then(/^the metadata missing supports warning 067 should be (shown|not shown) against the metadata file$/) do |show_warning|
2567
+ expect_warning("FC067", :file => "metadata.rb", :expect_warning => show_warning == "shown")
2568
+ end
2569
+
2570
+ Given(/^a cookbook with metadata that (includes|does not include) a license keyword$/) do |includes|
2571
+ write_metadata %Q{
2572
+ #{"license 'Apache-2.0'" if includes == 'includes'}
2573
+ }
2574
+ end
2575
+
2576
+ Then(/^the metadata missing license warning 068 should be (shown|not shown) against the metadata file$/) do |show_warning|
2577
+ expect_warning("FC068", :file => "metadata.rb", :expect_warning => show_warning == "shown")
2578
+ end
@@ -76,6 +76,9 @@ module FoodCritic
76
76
  "FC063" => "Cookbook incorrectly depends on itself",
77
77
  "FC064" => "Ensure issues_url is set in metadata",
78
78
  "FC065" => "Ensure source_url is set in metadata",
79
+ "FC066" => "Ensure chef_version is set in metadata",
80
+ "FC067" => "Ensure at least one platform supported in metadata",
81
+ "FC068" => "Ensure license is set in metadata",
79
82
  "FCTEST001" => "Test Rule",
80
83
  }
81
84
 
@@ -166,9 +166,11 @@ module FoodCritic
166
166
  private
167
167
 
168
168
  def rule_files_in_gems
169
- Gem::Specification.latest_specs(true).map do |spec|
170
- spec.matches_for_glob("foodcritic/rules/**/*.rb")
171
- end.flatten
169
+ Gem::Specification
170
+ .latest_specs(true)
171
+ .reject { |spec| spec.name == "foodcritic" }
172
+ .map { |spec| spec.matches_for_glob("foodcritic/rules/**/*.rb") }
173
+ .flatten
172
174
  end
173
175
 
174
176
  def remove_ignored(matches, rule, file)
@@ -6,8 +6,8 @@ rule "FC007", "Ensure recipe dependencies are reflected in cookbook metadata" do
6
6
  next unless File.exist? metadata_path
7
7
  actual_included = included_recipes(ast, with_partial_names: false)
8
8
  undeclared = actual_included.keys.map do |recipe|
9
- recipe.split("::").first
10
- end - [cookbook_name(filename)] -
9
+ recipe.split("::").first unless recipe =~ /^::/ # skip shorthand included recipes. They're local
10
+ end.compact - [cookbook_name(filename)] -
11
11
  declared_dependencies(read_ast(metadata_path))
12
12
  actual_included.map do |recipe, include_stmts|
13
13
  if undeclared.include?(recipe) ||
@@ -0,0 +1,6 @@
1
+ rule "FC066", "Ensure chef_version is set in metadata" do
2
+ tags %w{metadata}
3
+ metadata do |ast, filename|
4
+ [file_match(filename)] unless field(ast, "chef_version").any?
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ rule "FC067", "Ensure at least one platform supported in metadata" do
2
+ tags %w{metadata}
3
+ metadata do |ast, filename|
4
+ [file_match(filename)] unless field(ast, "supports").any?
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ rule "FC068", "Ensure license is set in metadata" do
2
+ tags %w{metadata}
3
+ metadata do |ast, filename|
4
+ [file_match(filename)] unless field(ast, "license").any?
5
+ end
6
+ end
@@ -1,4 +1,4 @@
1
1
  module FoodCritic
2
2
  # The current version of foodcritic
3
- VERSION = "10.1.1"
3
+ VERSION = "10.2.0"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foodcritic
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.1.1
4
+ version: 10.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Crump
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-29 00:00:00.000000000 Z
11
+ date: 2017-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber-core
@@ -200,6 +200,9 @@ files:
200
200
  - features/063_cookbook_incorrectly_depends_on_itself.feature
201
201
  - features/064_check_for_no_issues_url.feature
202
202
  - features/065_check_for_no_source_url.feature
203
+ - features/066_check_for_no_chef_version_metadata.feature
204
+ - features/067_check_for_no_supports_metadata.feature
205
+ - features/068_check_for_no_license_metadata.feature
203
206
  - features/build_framework_support.feature
204
207
  - features/checking_all_types_of_file.feature
205
208
  - features/choose_rules_to_apply.feature
@@ -290,6 +293,9 @@ files:
290
293
  - lib/foodcritic/rules/fc063.rb
291
294
  - lib/foodcritic/rules/fc064.rb
292
295
  - lib/foodcritic/rules/fc065.rb
296
+ - lib/foodcritic/rules/fc066.rb
297
+ - lib/foodcritic/rules/fc067.rb
298
+ - lib/foodcritic/rules/fc068.rb
293
299
  - lib/foodcritic/template.rb
294
300
  - lib/foodcritic/version.rb
295
301
  - lib/foodcritic/xml.rb
@@ -355,5 +361,5 @@ rubyforge_project:
355
361
  rubygems_version: 2.6.11
356
362
  signing_key:
357
363
  specification_version: 4
358
- summary: foodcritic-10.1.1
364
+ summary: foodcritic-10.2.0
359
365
  test_files: []