foodcritic 12.3.0 → 13.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -0
  3. data/Gemfile +1 -1
  4. data/README.md +1 -1
  5. data/chef_dsl_metadata/{chef_12.21.14.json → chef_13.7.16.json} +1339 -1052
  6. data/features/step_definitions/cookbook_steps.rb +0 -18
  7. data/features/support/command_helpers.rb +0 -2
  8. data/foodcritic.gemspec +1 -1
  9. data/lib/foodcritic/chef.rb +2 -2
  10. data/lib/foodcritic/linter.rb +2 -2
  11. data/lib/foodcritic/notifications.rb +14 -3
  12. data/lib/foodcritic/rules/fc025.rb +3 -1
  13. data/lib/foodcritic/rules/fc026.rb +1 -1
  14. data/lib/foodcritic/rules/fc037.rb +2 -1
  15. data/lib/foodcritic/rules/fc044.rb +2 -2
  16. data/lib/foodcritic/rules/fc064.rb +1 -1
  17. data/lib/foodcritic/rules/fc065.rb +1 -1
  18. data/lib/foodcritic/rules/fc115.rb +9 -0
  19. data/lib/foodcritic/rules/fc117.rb +9 -0
  20. data/lib/foodcritic/rules/fc118.rb +7 -0
  21. data/lib/foodcritic/rules/fc119.rb +16 -0
  22. data/lib/foodcritic/template.rb +2 -2
  23. data/lib/foodcritic/version.rb +1 -1
  24. data/spec/functional/fc007_spec.rb +1 -1
  25. data/spec/functional/fc009_spec.rb +8 -13
  26. data/spec/functional/fc025_spec.rb +60 -0
  27. data/spec/functional/fc026_spec.rb +66 -0
  28. data/spec/functional/fc037_spec.rb +75 -0
  29. data/spec/functional/fc038_spec.rb +16 -11
  30. data/spec/functional/fc115_spec.rb +24 -0
  31. data/spec/functional/fc117_spec.rb +23 -0
  32. data/spec/functional/fc118_spec.rb +17 -0
  33. data/spec/functional/fc119_spec.rb +27 -0
  34. data/spec/regression/regression_spec.rb +2 -2
  35. data/spec/unit/linter_spec.rb +1 -1
  36. metadata +17 -14
  37. data/chef_dsl_metadata/chef_12.15.19.json +0 -18720
  38. data/chef_dsl_metadata/chef_12.16.42.json +0 -18848
  39. data/chef_dsl_metadata/chef_12.17.44.json +0 -19330
  40. data/chef_dsl_metadata/chef_12.18.31.json +0 -19738
  41. data/chef_dsl_metadata/chef_12.19.36.json +0 -20061
  42. data/chef_dsl_metadata/chef_12.20.3.json +0 -20067
  43. data/features/025_check_for_deprecated_gem_install.feature +0 -30
  44. data/features/026_check_for_conditional_block_string.feature +0 -20
@@ -1,30 +0,0 @@
1
- Feature: Check for deprecated gem install
2
-
3
- In order to be clear and concise in my Chef recipes
4
- As a developer
5
- I want to use chef_gem in preference to manual compile-time gem install
6
-
7
- Scenario: Normal gem install
8
- Given a cookbook recipe that installs a gem
9
- When I check the cookbook specifying 0.10.10 as the Chef version
10
- Then the prefer chef_gem to manual install warning 025 should not be displayed
11
-
12
- Scenario: Compile-time gem install
13
- Given a cookbook recipe that installs a gem at compile time using the deprecated syntax
14
- When I check the cookbook specifying 0.10.10 as the Chef version
15
- Then the prefer chef_gem to manual install warning 025 should be shown
16
-
17
- Scenario: Compile-time gem upgrade
18
- Given a cookbook recipe that upgrades a gem at compile time using the deprecated syntax
19
- When I check the cookbook specifying 0.10.10 as the Chef version
20
- Then the prefer chef_gem to manual install warning 025 should be shown
21
-
22
- Scenario: Compile-time gem install - multiple from array
23
- Given a cookbook recipe that installs multiple gems from an array at compile time using the deprecated syntax
24
- When I check the cookbook specifying 0.10.10 as the Chef version
25
- Then the prefer chef_gem to manual install warning 025 should be shown
26
-
27
- Scenario: Compile-time gem install - multiple from wordlist
28
- Given a cookbook recipe that installs multiple gems from a word list at compile time using the deprecated syntax
29
- When I check the cookbook specifying 0.10.10 as the Chef version
30
- Then the prefer chef_gem to manual install warning 025 should be shown
@@ -1,20 +0,0 @@
1
- Feature: Check for conditional attribute blocks with only strings
2
-
3
- In order to avoid wrongly actioning a resource
4
- As a developer
5
- I want to identify conditional attribute blocks that consist only of strings
6
-
7
- Scenario Outline:
8
- Given a cookbook recipe that declares a resource with a <conditional_attribute>
9
- When I check the cookbook
10
- Then the conditional block contains only string warning 026 should be <show_warning>
11
-
12
- Examples:
13
- | conditional_attribute | show_warning |
14
- | not_if { "ls foo" } | shown |
15
- | not_if do "ls foo" end | shown |
16
- | only_if { "ls #{node['foo']['path']}" } | shown |
17
- | not_if { "ls #{foo.method()}" } | shown |
18
- | only_if { foo.bar } | not shown |
19
- | not_if { foo.to_s } | not shown |
20
- | not_if { File.exists?("/etc/foo") } | not shown |