foodcritic 13.1.1 → 14.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/chef_dsl_metadata/chef_13.4.19.json +0 -212
- data/chef_dsl_metadata/chef_13.5.3.json +0 -212
- data/chef_dsl_metadata/chef_13.6.0.json +0 -212
- data/chef_dsl_metadata/chef_13.7.16.json +0 -212
- data/chef_dsl_metadata/{chef_13.3.42.json → chef_13.9.1.json} +189 -48
- data/chef_dsl_metadata/{chef_13.1.31.json → chef_14.1.12.json} +8735 -1444
- data/chef_dsl_metadata/{chef_13.0.113.json → chef_14.2.0.json} +8763 -1432
- data/features/continuous_integration_support.feature +0 -2
- data/features/step_definitions/cookbook_steps.rb +0 -26
- data/features/support/command_helpers.rb +0 -2
- data/lib/foodcritic/api.rb +6 -1
- data/lib/foodcritic/linter.rb +1 -1
- data/lib/foodcritic/rules/fc048.rb +1 -1
- data/lib/foodcritic/rules/fc069.rb +145 -115
- data/lib/foodcritic/rules/fc071.rb +1 -1
- data/lib/foodcritic/rules/fc078.rb +54 -48
- data/lib/foodcritic/rules/fc121.rb +6 -0
- data/lib/foodcritic/version.rb +1 -1
- data/spec/functional/fc009_spec.rb +6 -6
- data/spec/functional/fc040_spec.rb +156 -0
- data/spec/functional/fc041_spec.rb +121 -0
- data/spec/functional/fc048_spec.rb +67 -0
- data/spec/functional/fc121_spec.rb +43 -0
- data/spec/regression/expected/aix.txt +4 -0
- data/spec/regression/expected/apt.txt +1 -1
- data/spec/regression/expected/ark.txt +1 -0
- data/spec/regression/expected/boost.txt +1 -0
- data/spec/regression/expected/chef-client.txt +4 -4
- data/spec/regression/expected/chef-ingredient.txt +1 -0
- data/spec/regression/expected/chef_client_updater.txt +1 -0
- data/spec/regression/expected/chef_nginx.txt +2 -0
- data/spec/regression/expected/dmg.txt +3 -3
- data/spec/regression/expected/docker.txt +1 -0
- data/spec/regression/expected/erlang.txt +1 -0
- data/spec/regression/expected/gecode.txt +2 -0
- data/spec/regression/expected/mysql.txt +2 -0
- data/spec/regression/expected/passenger_apache2.txt +2 -0
- data/spec/regression/expected/php.txt +2 -0
- data/spec/regression/expected/tomcat.txt +16 -0
- data/spec/regression/expected/transmission.txt +2 -0
- data/spec/regression/expected/ufw.txt +1 -0
- data/spec/regression/expected/windows.txt +2 -1
- data/spec/regression/expected/xml.txt +2 -0
- data/spec/unit/linter_spec.rb +1 -1
- metadata +11 -11
- data/features/040_check_raw_git_usage.feature +0 -43
- data/features/041_check_raw_download.feature +0 -34
- data/features/048_check_for_shellout.feature +0 -44
- data/lib/foodcritic/rules/fc012.rb +0 -8
- 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,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
|