foodcritic 3.0.3 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +6 -14
  2. data/CHANGELOG.md +65 -0
  3. data/README.md +1 -1
  4. data/chef_dsl_metadata/chef_11.10.0.json +10272 -0
  5. data/chef_dsl_metadata/chef_11.10.2.json +10272 -0
  6. data/chef_dsl_metadata/chef_11.10.4.json +10272 -0
  7. data/chef_dsl_metadata/chef_11.6.2.json +9566 -0
  8. data/chef_dsl_metadata/chef_11.8.0.json +10074 -0
  9. data/chef_dsl_metadata/chef_11.8.2.json +10074 -0
  10. data/features/001_check_node_access.feature +60 -0
  11. data/features/003_check_for_chef_server.feature +5 -0
  12. data/features/006_check_file_mode.feature +1 -0
  13. data/features/022_check_for_dodgy_conditions_within_loop.feature +10 -0
  14. data/features/040_check_raw_git_usage.feature +6 -0
  15. data/features/047_check_for_attribute_assignment_without_precedence.feature +2 -0
  16. data/features/build_framework_support.feature +10 -0
  17. data/features/exclude_paths_to_lint.feature +19 -0
  18. data/features/show_lines_matched.feature +4 -4
  19. data/features/sort_warnings.feature +1 -1
  20. data/features/step_definitions/cookbook_steps.rb +117 -24
  21. data/features/support/command_helpers.rb +45 -12
  22. data/features/support/env.rb +5 -0
  23. data/lib/foodcritic/api.rb +122 -99
  24. data/lib/foodcritic/ast.rb +6 -7
  25. data/lib/foodcritic/chef.rb +24 -23
  26. data/lib/foodcritic/command_line.rb +49 -41
  27. data/lib/foodcritic/domain.rb +12 -10
  28. data/lib/foodcritic/dsl.rb +4 -7
  29. data/lib/foodcritic/error_checker.rb +0 -3
  30. data/lib/foodcritic/linter.rb +45 -43
  31. data/lib/foodcritic/notifications.rb +32 -32
  32. data/lib/foodcritic/output.rb +3 -6
  33. data/lib/foodcritic/rake_task.rb +9 -10
  34. data/lib/foodcritic/rules.rb +278 -240
  35. data/lib/foodcritic/template.rb +6 -13
  36. data/lib/foodcritic/version.rb +1 -1
  37. data/lib/foodcritic/xml.rb +1 -3
  38. data/man/foodcritic.1 +6 -2
  39. data/man/foodcritic.1.ronn +4 -1
  40. data/spec/foodcritic/linter_spec.rb +2 -2
  41. data/spec/regression/expected-output.txt +296 -1
  42. metadata +160 -138
metadata CHANGED
@@ -1,99 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foodcritic
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 4.0.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: 2013-10-13 00:00:00.000000000 Z
11
+ date: 2014-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gherkin
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.11.7
19
+ version: '2.11'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.11.7
26
+ version: '2.11'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.5.4
33
+ version: '1.5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.5.4
40
+ version: '1.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: treetop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.4.10
61
+ version: '1.4'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.4.10
68
+ version: '1.4'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yajl-ruby
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.1.0
75
+ version: '1.1'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.1.0
82
+ version: '1.1'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: erubis
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ! '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rufus-lru
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.0'
97
111
  description: Lint tool for Opscode Chef cookbooks.
98
112
  email:
99
113
  executables:
@@ -101,142 +115,150 @@ executables:
101
115
  extensions: []
102
116
  extra_rdoc_files: []
103
117
  files:
104
- - chef_dsl_metadata/chef_10.20.0.json
105
- - chef_dsl_metadata/chef_10.12.0.json
106
- - chef_dsl_metadata/chef_10.18.2.json
107
- - chef_dsl_metadata/chef_10.26.0.json
118
+ - CHANGELOG.md
119
+ - LICENSE
120
+ - README.md
121
+ - bin/foodcritic
122
+ - chef_dsl_metadata/chef_0.10.0.json
108
123
  - chef_dsl_metadata/chef_0.10.10.json
109
- - chef_dsl_metadata/chef_0.9.4.json
110
- - chef_dsl_metadata/chef_0.10.8.json
111
- - chef_dsl_metadata/chef_10.14.4.json
112
- - chef_dsl_metadata/chef_0.9.12.json
113
- - chef_dsl_metadata/chef_10.22.0.json
124
+ - chef_dsl_metadata/chef_0.10.2.json
125
+ - chef_dsl_metadata/chef_0.10.4.json
114
126
  - chef_dsl_metadata/chef_0.10.6.json
115
- - chef_dsl_metadata/chef_11.0.0.json
116
- - chef_dsl_metadata/chef_0.9.8.json
117
- - chef_dsl_metadata/chef_11.4.0.json
127
+ - chef_dsl_metadata/chef_0.10.8.json
118
128
  - chef_dsl_metadata/chef_0.8.14.json
119
- - chef_dsl_metadata/chef_0.9.18.json
120
- - chef_dsl_metadata/chef_10.16.0.json
121
- - chef_dsl_metadata/chef_11.4.2.json
129
+ - chef_dsl_metadata/chef_0.8.16.json
130
+ - chef_dsl_metadata/chef_0.9.0.json
131
+ - chef_dsl_metadata/chef_0.9.10.json
132
+ - chef_dsl_metadata/chef_0.9.12.json
133
+ - chef_dsl_metadata/chef_0.9.14.json
122
134
  - chef_dsl_metadata/chef_0.9.16.json
135
+ - chef_dsl_metadata/chef_0.9.18.json
123
136
  - chef_dsl_metadata/chef_0.9.2.json
137
+ - chef_dsl_metadata/chef_0.9.4.json
124
138
  - chef_dsl_metadata/chef_0.9.6.json
125
- - chef_dsl_metadata/chef_10.16.6.json
139
+ - chef_dsl_metadata/chef_0.9.8.json
140
+ - chef_dsl_metadata/chef_10.12.0.json
141
+ - chef_dsl_metadata/chef_10.14.0.json
142
+ - chef_dsl_metadata/chef_10.14.2.json
143
+ - chef_dsl_metadata/chef_10.14.4.json
144
+ - chef_dsl_metadata/chef_10.16.0.json
145
+ - chef_dsl_metadata/chef_10.16.2.json
126
146
  - chef_dsl_metadata/chef_10.16.4.json
127
- - chef_dsl_metadata/chef_0.9.14.json
147
+ - chef_dsl_metadata/chef_10.16.6.json
128
148
  - chef_dsl_metadata/chef_10.18.0.json
129
- - chef_dsl_metadata/chef_0.10.2.json
130
- - chef_dsl_metadata/chef_0.9.0.json
131
- - chef_dsl_metadata/chef_0.8.16.json
132
- - chef_dsl_metadata/chef_0.10.4.json
133
- - chef_dsl_metadata/chef_11.4.4.json
134
- - chef_dsl_metadata/chef_0.10.0.json
135
- - chef_dsl_metadata/chef_10.16.2.json
149
+ - chef_dsl_metadata/chef_10.18.2.json
150
+ - chef_dsl_metadata/chef_10.20.0.json
151
+ - chef_dsl_metadata/chef_10.22.0.json
136
152
  - chef_dsl_metadata/chef_10.24.0.json
137
- - chef_dsl_metadata/chef_11.6.0.json
138
153
  - chef_dsl_metadata/chef_10.24.4.json
139
- - chef_dsl_metadata/chef_10.14.2.json
140
- - chef_dsl_metadata/chef_10.14.0.json
154
+ - chef_dsl_metadata/chef_10.26.0.json
155
+ - chef_dsl_metadata/chef_11.0.0.json
156
+ - chef_dsl_metadata/chef_11.10.0.json
157
+ - chef_dsl_metadata/chef_11.10.2.json
158
+ - chef_dsl_metadata/chef_11.10.4.json
141
159
  - chef_dsl_metadata/chef_11.2.0.json
142
- - chef_dsl_metadata/chef_0.9.10.json
143
- - lib/foodcritic/dsl.rb
144
- - lib/foodcritic/command_line.rb
145
- - lib/foodcritic/rake_task.rb
146
- - lib/foodcritic/chef.rb
147
- - lib/foodcritic/ast.rb
148
- - lib/foodcritic/api.rb
149
- - lib/foodcritic/output.rb
150
- - lib/foodcritic/xml.rb
151
- - lib/foodcritic/template.rb
152
- - lib/foodcritic/linter.rb
153
- - lib/foodcritic/error_checker.rb
154
- - lib/foodcritic/domain.rb
155
- - lib/foodcritic/rules.rb
156
- - lib/foodcritic/version.rb
157
- - lib/foodcritic/notifications.rb
158
- - lib/foodcritic.rb
159
- - bin/foodcritic
160
- - spec/spec_helper.rb
161
- - spec/regression/regression_spec.rb
162
- - spec/regression/expected-output.txt
163
- - spec/regression/cookbooks.txt
164
- - spec/foodcritic/template_spec.rb
165
- - spec/foodcritic/command_line_spec.rb
166
- - spec/foodcritic/chef_spec.rb
167
- - spec/foodcritic/api_spec.rb
168
- - spec/foodcritic/linter_spec.rb
169
- - spec/foodcritic/domain_spec.rb
170
- - spec/regression_helpers.rb
171
- - features/045_check_for_cookbook_name_in_metadata.feature
172
- - features/choose_rules_to_apply.feature
173
- - features/030_check_for_debugger_breakpoints.feature
160
+ - chef_dsl_metadata/chef_11.4.0.json
161
+ - chef_dsl_metadata/chef_11.4.2.json
162
+ - chef_dsl_metadata/chef_11.4.4.json
163
+ - chef_dsl_metadata/chef_11.6.0.json
164
+ - chef_dsl_metadata/chef_11.6.2.json
165
+ - chef_dsl_metadata/chef_11.8.0.json
166
+ - chef_dsl_metadata/chef_11.8.2.json
167
+ - features/001_check_node_access.feature
168
+ - features/002_check_string_interpolation.feature
169
+ - features/003_check_for_chef_server.feature
170
+ - features/004_check_service_resource_used.feature
171
+ - features/005_check_for_resource_repetition.feature
174
172
  - features/006_check_file_mode.feature
175
- - features/050_check_for_invalid_name.feature
176
- - features/029_check_for_no_leading_cookbook_name.feature
177
- - features/include_custom_rules.feature
178
- - features/031_check_for_metadata_existence.feature
179
- - features/checking_all_types_of_file.feature
180
- - features/021_check_for_dodgy_lwrp_conditions.feature
181
- - features/051_check_for_template_partial_loops.feature
182
- - features/015_check_for_definitions.feature
183
- - features/041_check_raw_download.feature
184
- - features/individual_file.feature
185
- - features/multiple_paths.feature
186
173
  - features/007_check_for_undeclared_recipe_dependencies.feature
187
- - features/046_check_for_assign_unless_nil_attributes.feature
188
- - features/023_check_for_condition_around_resource.feature
189
- - features/003_check_for_chef_server.feature
190
- - features/018_check_for_old_lwrp_notification_syntax.feature
191
- - features/043_check_for_old_notification_style.feature
192
- - features/002_check_string_interpolation.feature
193
- - features/044_check_for_bare_attribute_keys.feature
194
- - features/028_check_for_incorrect_platform_method.feature
195
174
  - features/008_check_for_boilerplate_metadata.feature
196
- - features/039_check_for_key_access_to_node_methods.feature
197
- - features/026_check_for_conditional_block_string.feature
175
+ - features/009_check_for_unrecognised_resource_attributes.feature
198
176
  - features/010_check_search_syntax.feature
199
- - features/show_lines_matched.feature
200
- - features/005_check_for_resource_repetition.feature
177
+ - features/011_check_for_markdown_readme.feature
201
178
  - features/012_check_for_deprecated_readme_format.feature
179
+ - features/013_check_for_hardcoded_tmpdir.feature
180
+ - features/014_check_for_long_ruby_blocks.feature
181
+ - features/015_check_for_definitions.feature
182
+ - features/016_check_for_no_lwrp_default_action.feature
202
183
  - features/017_check_for_no_lwrp_notifications.feature
203
- - features/support/cookbook_helpers.rb
204
- - features/support/env.rb
205
- - features/support/command_helpers.rb
184
+ - features/018_check_for_old_lwrp_notification_syntax.feature
185
+ - features/019_check_for_consistent_node_access.feature
186
+ - features/021_check_for_dodgy_lwrp_conditions.feature
187
+ - features/022_check_for_dodgy_conditions_within_loop.feature
188
+ - features/023_check_for_condition_around_resource.feature
189
+ - features/024_check_for_missing_platforms.feature
190
+ - features/025_check_for_deprecated_gem_install.feature
191
+ - features/026_check_for_conditional_block_string.feature
192
+ - features/027_check_for_internal_attribute_use.feature
193
+ - features/028_check_for_incorrect_platform_method.feature
194
+ - features/029_check_for_no_leading_cookbook_name.feature
195
+ - features/030_check_for_debugger_breakpoints.feature
196
+ - features/031_check_for_metadata_existence.feature
206
197
  - features/032_check_for_invalid_notification_timing.feature
207
- - features/continuous_integration_support.feature
198
+ - features/033_check_for_missing_template.feature
208
199
  - features/034_check_for_unused_template_variables.feature
200
+ - features/037_check_for_invalid_notification_action.feature
209
201
  - features/038_check_for_invalid_action.feature
210
- - features/022_check_for_dodgy_conditions_within_loop.feature
211
- - features/025_check_for_deprecated_gem_install.feature
212
- - features/004_check_service_resource_used.feature
213
- - features/sort_warnings.feature
214
- - features/limit_rules_to_specific_versions.feature
215
- - features/step_definitions/cookbook_steps.rb
202
+ - features/039_check_for_key_access_to_node_methods.feature
203
+ - features/040_check_raw_git_usage.feature
204
+ - features/041_check_raw_download.feature
216
205
  - features/042_check_for_deprecated_require_recipe.feature
217
- - features/024_check_for_missing_platforms.feature
218
- - features/command_line_help.feature
219
- - features/049_check_for_role_name_mismatch_with_file_name.feature
220
- - features/013_check_for_hardcoded_tmpdir.feature
206
+ - features/043_check_for_old_notification_style.feature
207
+ - features/044_check_for_bare_attribute_keys.feature
208
+ - features/045_check_for_cookbook_name_in_metadata.feature
209
+ - features/046_check_for_assign_unless_nil_attributes.feature
221
210
  - features/047_check_for_attribute_assignment_without_precedence.feature
222
- - features/011_check_for_markdown_readme.feature
223
- - features/specify_search_grammar.feature
224
- - features/019_check_for_consistent_node_access.feature
225
- - features/014_check_for_long_ruby_blocks.feature
226
- - features/037_check_for_invalid_notification_action.feature
227
- - features/ignore_via_line_comments.feature
228
- - features/016_check_for_no_lwrp_default_action.feature
229
- - features/033_check_for_missing_template.feature
230
211
  - features/048_check_for_shellout.feature
231
- - features/040_check_raw_git_usage.feature
232
- - features/009_check_for_unrecognised_resource_attributes.feature
212
+ - features/049_check_for_role_name_mismatch_with_file_name.feature
213
+ - features/050_check_for_invalid_name.feature
214
+ - features/051_check_for_template_partial_loops.feature
233
215
  - features/build_framework_support.feature
234
- - features/027_check_for_internal_attribute_use.feature
235
- - CHANGELOG.md
236
- - README.md
237
- - LICENSE
238
- - man/foodcritic.1.ronn
216
+ - features/checking_all_types_of_file.feature
217
+ - features/choose_rules_to_apply.feature
218
+ - features/command_line_help.feature
219
+ - features/continuous_integration_support.feature
220
+ - features/exclude_paths_to_lint.feature
221
+ - features/ignore_via_line_comments.feature
222
+ - features/include_custom_rules.feature
223
+ - features/individual_file.feature
224
+ - features/limit_rules_to_specific_versions.feature
225
+ - features/multiple_paths.feature
226
+ - features/show_lines_matched.feature
227
+ - features/sort_warnings.feature
228
+ - features/specify_search_grammar.feature
229
+ - features/step_definitions/cookbook_steps.rb
230
+ - features/support/command_helpers.rb
231
+ - features/support/cookbook_helpers.rb
232
+ - features/support/env.rb
233
+ - lib/foodcritic.rb
234
+ - lib/foodcritic/api.rb
235
+ - lib/foodcritic/ast.rb
236
+ - lib/foodcritic/chef.rb
237
+ - lib/foodcritic/command_line.rb
238
+ - lib/foodcritic/domain.rb
239
+ - lib/foodcritic/dsl.rb
240
+ - lib/foodcritic/error_checker.rb
241
+ - lib/foodcritic/linter.rb
242
+ - lib/foodcritic/notifications.rb
243
+ - lib/foodcritic/output.rb
244
+ - lib/foodcritic/rake_task.rb
245
+ - lib/foodcritic/rules.rb
246
+ - lib/foodcritic/template.rb
247
+ - lib/foodcritic/version.rb
248
+ - lib/foodcritic/xml.rb
239
249
  - man/foodcritic.1
250
+ - man/foodcritic.1.ronn
251
+ - spec/foodcritic/api_spec.rb
252
+ - spec/foodcritic/chef_spec.rb
253
+ - spec/foodcritic/command_line_spec.rb
254
+ - spec/foodcritic/domain_spec.rb
255
+ - spec/foodcritic/linter_spec.rb
256
+ - spec/foodcritic/template_spec.rb
257
+ - spec/regression/cookbooks.txt
258
+ - spec/regression/expected-output.txt
259
+ - spec/regression/regression_spec.rb
260
+ - spec/regression_helpers.rb
261
+ - spec/spec_helper.rb
240
262
  homepage: http://foodcritic.io
241
263
  licenses:
242
264
  - MIT
@@ -247,18 +269,18 @@ require_paths:
247
269
  - lib
248
270
  required_ruby_version: !ruby/object:Gem::Requirement
249
271
  requirements:
250
- - - ! '>='
272
+ - - ">="
251
273
  - !ruby/object:Gem::Version
252
- version: 1.9.2
274
+ version: 1.9.3
253
275
  required_rubygems_version: !ruby/object:Gem::Requirement
254
276
  requirements:
255
- - - ! '>='
277
+ - - ">="
256
278
  - !ruby/object:Gem::Version
257
279
  version: '0'
258
280
  requirements: []
259
281
  rubyforge_project:
260
- rubygems_version: 2.0.7
282
+ rubygems_version: 2.2.2
261
283
  signing_key:
262
284
  specification_version: 4
263
- summary: foodcritic-3.0.3
285
+ summary: foodcritic-4.0.0
264
286
  test_files: []