foodcritic 13.1.1 → 14.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/chef_dsl_metadata/chef_13.4.19.json +0 -212
  4. data/chef_dsl_metadata/chef_13.5.3.json +0 -212
  5. data/chef_dsl_metadata/chef_13.6.0.json +0 -212
  6. data/chef_dsl_metadata/chef_13.7.16.json +0 -212
  7. data/chef_dsl_metadata/{chef_13.3.42.json → chef_13.9.1.json} +189 -48
  8. data/chef_dsl_metadata/{chef_13.1.31.json → chef_14.1.12.json} +8735 -1444
  9. data/chef_dsl_metadata/{chef_13.0.113.json → chef_14.2.0.json} +8763 -1432
  10. data/features/continuous_integration_support.feature +0 -2
  11. data/features/step_definitions/cookbook_steps.rb +0 -26
  12. data/features/support/command_helpers.rb +0 -2
  13. data/lib/foodcritic/api.rb +6 -1
  14. data/lib/foodcritic/linter.rb +1 -1
  15. data/lib/foodcritic/rules/fc048.rb +1 -1
  16. data/lib/foodcritic/rules/fc069.rb +145 -115
  17. data/lib/foodcritic/rules/fc071.rb +1 -1
  18. data/lib/foodcritic/rules/fc078.rb +54 -48
  19. data/lib/foodcritic/rules/fc121.rb +6 -0
  20. data/lib/foodcritic/version.rb +1 -1
  21. data/spec/functional/fc009_spec.rb +6 -6
  22. data/spec/functional/fc040_spec.rb +156 -0
  23. data/spec/functional/fc041_spec.rb +121 -0
  24. data/spec/functional/fc048_spec.rb +67 -0
  25. data/spec/functional/fc121_spec.rb +43 -0
  26. data/spec/regression/expected/aix.txt +4 -0
  27. data/spec/regression/expected/apt.txt +1 -1
  28. data/spec/regression/expected/ark.txt +1 -0
  29. data/spec/regression/expected/boost.txt +1 -0
  30. data/spec/regression/expected/chef-client.txt +4 -4
  31. data/spec/regression/expected/chef-ingredient.txt +1 -0
  32. data/spec/regression/expected/chef_client_updater.txt +1 -0
  33. data/spec/regression/expected/chef_nginx.txt +2 -0
  34. data/spec/regression/expected/dmg.txt +3 -3
  35. data/spec/regression/expected/docker.txt +1 -0
  36. data/spec/regression/expected/erlang.txt +1 -0
  37. data/spec/regression/expected/gecode.txt +2 -0
  38. data/spec/regression/expected/mysql.txt +2 -0
  39. data/spec/regression/expected/passenger_apache2.txt +2 -0
  40. data/spec/regression/expected/php.txt +2 -0
  41. data/spec/regression/expected/tomcat.txt +16 -0
  42. data/spec/regression/expected/transmission.txt +2 -0
  43. data/spec/regression/expected/ufw.txt +1 -0
  44. data/spec/regression/expected/windows.txt +2 -1
  45. data/spec/regression/expected/xml.txt +2 -0
  46. data/spec/unit/linter_spec.rb +1 -1
  47. metadata +11 -11
  48. data/features/040_check_raw_git_usage.feature +0 -43
  49. data/features/041_check_raw_download.feature +0 -34
  50. data/features/048_check_for_shellout.feature +0 -44
  51. data/lib/foodcritic/rules/fc012.rb +0 -8
  52. data/spec/functional/fc012_spec.rb +0 -20
@@ -1,44 +0,0 @@
1
- Feature: Check for spawning without Mixlib::ShellOut
2
-
3
- In order to work more easily with spawned processes
4
- As a developer
5
- I want to use the Mixlib::ShellOut library rather than basic ruby constructs
6
-
7
- Scenario Outline: Spawning a sub-process
8
- Given a cookbook recipe that spawns a sub-process with <command>
9
- When I check the cookbook
10
- Then the prefer mixlib shellout warning 048 <show_warning> be displayed
11
- Examples:
12
- | command | show_warning |
13
- | `ls` | should |
14
- | `#{cmd}` | should |
15
- | %x{ls} | should |
16
- | %x[ls] | should |
17
- | %x{#{cmd} some_dir} | should |
18
- | %x{#{cmd} some_dir} | should |
19
- | system "ls" | should |
20
- | system("ls") | should |
21
- | system cmd | should |
22
- | system(cmd) | should |
23
- | system("#{cmd} some_dir") | should |
24
- | Mixlib::ShellOut.new('ls').run_command | should not |
25
-
26
- Scenario: Execute resource
27
- Given a cookbook recipe that executes 'ls' with an execute resource
28
- When I check the cookbook
29
- Then the prefer mixlib shellout warning 048 should not be displayed
30
-
31
- Scenario: Group resource
32
- Given a cookbook recipe that contains a group resource that uses the 'system' bool attribute
33
- When I check the cookbook
34
- Then the prefer mixlib shellout warning 048 should not be displayed against the group resource
35
-
36
- Scenario: User resource
37
- Given a cookbook recipe that contains a user resource that uses the 'system' string attribute
38
- When I check the cookbook
39
- Then the prefer mixlib shellout warning 048 should not be displayed against the user resource
40
-
41
- Scenario: Ruby block
42
- Given a provider that contains a ruby_block resource that spawns a sub-process with system
43
- When I check the cookbook
44
- Then the prefer mixlib shellout warning 048 should be displayed against the ruby_block resource
@@ -1,8 +0,0 @@
1
- rule "FC012", "Use Markdown for README rather than RDoc" do
2
- tags %w{supermarket readme}
3
- cookbook do |filename|
4
- if File.exist?(File.join(filename, "README.rdoc"))
5
- [file_match(File.join(filename, "README.rdoc"))]
6
- end
7
- end
8
- end
@@ -1,20 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe "FC012" do
4
- context "with a cookbook with a README.md file" do
5
- metadata_file "name 'mycookbook'"
6
- file("README.md")
7
- it { is_expected.not_to violate_rule }
8
- end
9
-
10
- context "with a cookbook without a README file" do
11
- metadata_file "name 'mycookbook'"
12
- it { is_expected.not_to violate_rule }
13
- end
14
-
15
- context "with a cookbook with a README.rdoc file" do
16
- metadata_file "name 'mycookbook'"
17
- file("README.rdoc")
18
- it { is_expected.to violate_rule }
19
- end
20
- end