foodcritic 11.0.0 → 11.1.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 +15 -1
- data/README.md +1 -1
- data/chef_dsl_metadata/chef_12.20.3.json +20067 -0
- data/lib/foodcritic/command_line.rb +4 -0
- data/lib/foodcritic/linter.rb +2 -2
- data/lib/foodcritic/rules/fc080.rb +1 -1
- data/lib/foodcritic/rules/fc081.rb +2 -2
- data/lib/foodcritic/rules/fc082.rb +1 -1
- data/lib/foodcritic/rules/fc083.rb +1 -1
- data/lib/foodcritic/rules/fc086.rb +10 -0
- data/lib/foodcritic/rules/fc087.rb +7 -0
- data/lib/foodcritic/rules/fc088.rb +11 -0
- data/lib/foodcritic/rules/fc089.rb +11 -0
- data/lib/foodcritic/version.rb +1 -1
- data/spec/functional/fc086_spec.rb +36 -0
- data/spec/functional/fc087_spec.rb +29 -0
- data/spec/functional/fc088_spec.rb +18 -0
- data/spec/functional/fc089_spec.rb +23 -0
- data/spec/regression/expected/aix.txt +1 -1
- data/spec/regression/expected/apt.txt +4 -0
- data/spec/regression/expected/aws.txt +3 -3
- data/spec/regression/expected/bluepill.txt +6 -0
- data/spec/regression/expected/chef-client.txt +2 -2
- data/spec/regression/expected/chef-vault.txt +2 -0
- data/spec/regression/expected/chef.txt +67 -67
- data/spec/regression/expected/cron.txt +1 -0
- data/spec/regression/expected/database.txt +7 -1
- data/spec/regression/expected/drbd.txt +1 -1
- data/spec/regression/expected/dynect.txt +4 -0
- data/spec/regression/expected/firewall.txt +3 -0
- data/spec/regression/expected/gunicorn.txt +3 -0
- data/spec/regression/expected/homebrew.txt +1 -0
- data/spec/regression/expected/jetty.txt +1 -1
- data/spec/regression/expected/libarchive.txt +1 -0
- data/spec/regression/expected/maven.txt +1 -0
- data/spec/regression/expected/mysql.txt +4 -4
- data/spec/regression/expected/openssh.txt +1 -1
- data/spec/regression/expected/partial_search.txt +1 -0
- data/spec/regression/expected/perl.txt +1 -0
- data/spec/regression/expected/postfix.txt +1 -1
- data/spec/regression/expected/rsync.txt +1 -0
- data/spec/regression/expected/rsyslog.txt +1 -1
- data/spec/regression/expected/smokeping.txt +3 -1
- data/spec/regression/expected/sql_server.txt +1 -1
- data/spec/regression/expected/sudo.txt +2 -0
- data/spec/regression/expected/transmission.txt +2 -0
- data/spec/regression/expected/ufw.txt +1 -1
- data/spec/regression/expected/users.txt +4 -2
- data/spec/regression/expected/xml.txt +1 -1
- data/spec/regression/expected/yum.txt +2 -0
- data/spec/unit/command_line_spec.rb +14 -0
- data/spec/unit/linter_spec.rb +1 -1
- metadata +12 -3
@@ -28,3 +28,7 @@ FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
|
28
28
|
FC067: Ensure at least one platform supported in metadata: ./metadata.rb:1
|
29
29
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
30
30
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
31
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/rr.rb:54
|
32
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/rr.rb:75
|
33
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/rr.rb:90
|
34
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/rr.rb:98
|
@@ -11,3 +11,6 @@ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
|
11
11
|
FC074: LWRP should use DSL to define resource's default action: ./resources/default.rb:1
|
12
12
|
FC074: LWRP should use DSL to define resource's default action: ./resources/rule.rb:1
|
13
13
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
14
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/rule_ufw.rb:78
|
15
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/ufw.rb:31
|
16
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/ufw.rb:41
|
@@ -8,3 +8,6 @@ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
|
8
8
|
FC074: LWRP should use DSL to define resource's default action: ./resources/config.rb:1
|
9
9
|
FC074: LWRP should use DSL to define resource's default action: ./resources/install.rb:1
|
10
10
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
11
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/config.rb:48
|
12
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/config.rb:56
|
13
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/install.rb:31
|
@@ -7,3 +7,4 @@ FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
|
7
7
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
8
8
|
FC074: LWRP should use DSL to define resource's default action: ./resources/tap.rb:1
|
9
9
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
10
|
+
FC087: Library maps provider with deprecated Chef::Platform.set: ./libraries/homebrew_package.rb:82
|
@@ -10,4 +10,4 @@ FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
|
10
10
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
11
11
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
12
12
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
13
|
-
FC082: node.set or node.set_unless used to set node attributes: ./recipes/cargo.rb:38
|
13
|
+
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/cargo.rb:38
|
@@ -4,3 +4,4 @@ FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
|
4
4
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
5
5
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
6
6
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
7
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/file.rb:25
|
@@ -8,3 +8,4 @@ FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
|
8
8
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
9
9
|
FC074: LWRP should use DSL to define resource's default action: ./resources/default.rb:1
|
10
10
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
11
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/default.rb:56
|
@@ -12,7 +12,7 @@ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
|
12
12
|
FC072: Metadata should not contain "attribute" keyword: ./metadata.rb:1
|
13
13
|
FC075: Cookbook uses node.save to save partial node data to the chef-server mid-run: ./recipes/server.rb:42
|
14
14
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
15
|
-
FC082: node.set or node.set_unless used to set node attributes: ./recipes/ruby.rb:28
|
16
|
-
FC082: node.set or node.set_unless used to set node attributes: ./recipes/server.rb:39
|
17
|
-
FC082: node.set or node.set_unless used to set node attributes: ./recipes/server.rb:40
|
18
|
-
FC082: node.set or node.set_unless used to set node attributes: ./recipes/server.rb:41
|
15
|
+
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/ruby.rb:28
|
16
|
+
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/server.rb:39
|
17
|
+
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/server.rb:40
|
18
|
+
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/server.rb:41
|
@@ -3,4 +3,4 @@ FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
|
3
3
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
4
4
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
5
5
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
6
|
-
FC082: node.set or node.set_unless used to set node attributes: ./recipes/default.rb:63
|
6
|
+
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/default.rb:63
|
@@ -4,3 +4,4 @@ FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
|
4
4
|
FC067: Ensure at least one platform supported in metadata: ./metadata.rb:1
|
5
5
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
6
6
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
7
|
+
FC084: Deprecated Chef::REST class used: ./libraries/partial_search.rb:36
|
@@ -10,3 +10,4 @@ FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
|
10
10
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
11
11
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
12
12
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
13
|
+
FC083: Execute resource using deprecated 'path' property: ./definitions/cpan_module.rb:31
|
@@ -5,4 +5,4 @@ FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
|
5
5
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
6
6
|
FC072: Metadata should not contain "attribute" keyword: ./metadata.rb:1
|
7
7
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
8
|
-
FC082: node.set or node.set_unless used to set node attributes: ./recipes/client.rb:40
|
8
|
+
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/client.rb:40
|
@@ -9,3 +9,4 @@ FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
|
9
9
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
10
10
|
FC071: Missing LICENSE file: examples/LICENSE:1
|
11
11
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
12
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/serve.rb:62
|
@@ -8,4 +8,4 @@ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
|
8
8
|
FC072: Metadata should not contain "attribute" keyword: ./metadata.rb:1
|
9
9
|
FC075: Cookbook uses node.save to save partial node data to the chef-server mid-run: ./recipes/server.rb:23
|
10
10
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
11
|
-
FC082: node.set or node.set_unless used to set node attributes: ./recipes/server.rb:22
|
11
|
+
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/server.rb:22
|
@@ -2,4 +2,6 @@ FC059: LWRP provider does not declare use_inline_resources: ./providers/target.r
|
|
2
2
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
3
3
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
4
4
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
5
|
-
FC082: node.set or node.set_unless used to set node attributes: ./recipes/example_slave.rb:19
|
5
|
+
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/example_slave.rb:19
|
6
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/target.rb:53
|
7
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/target.rb:63
|
@@ -4,4 +4,4 @@ FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
|
4
4
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
5
5
|
FC075: Cookbook uses node.save to save partial node data to the chef-server mid-run: ./recipes/server.rb:28
|
6
6
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
7
|
-
FC082: node.set or node.set_unless used to set node attributes: ./recipes/server.rb:26
|
7
|
+
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/server.rb:26
|
@@ -7,3 +7,5 @@ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
|
7
7
|
FC072: Metadata should not contain "attribute" keyword: ./metadata.rb:1
|
8
8
|
FC074: LWRP should use DSL to define resource's default action: ./resources/default.rb:1
|
9
9
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
10
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/default.rb:98
|
11
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/default.rb:112
|
@@ -9,3 +9,5 @@ FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
|
9
9
|
FC067: Ensure at least one platform supported in metadata: ./metadata.rb:1
|
10
10
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
11
11
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
12
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/torrent_file.rb:53
|
13
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/torrent_file.rb:58
|
@@ -8,4 +8,4 @@ FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
|
8
8
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
9
9
|
FC072: Metadata should not contain "attribute" keyword: ./metadata.rb:1
|
10
10
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
11
|
-
FC082: node.set or node.set_unless used to set node attributes: ./recipes/default.rb:34
|
11
|
+
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/default.rb:34
|
@@ -6,5 +6,7 @@ FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
|
6
6
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
7
7
|
FC074: LWRP should use DSL to define resource's default action: ./resources/manage.rb:1
|
8
8
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
9
|
-
FC080: User resource uses supports property: ./providers/manage.rb:87
|
10
|
-
FC080: User resource uses supports property: ./providers/manage.rb:89
|
9
|
+
FC080: User resource uses deprecated supports property: ./providers/manage.rb:87
|
10
|
+
FC080: User resource uses deprecated supports property: ./providers/manage.rb:89
|
11
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/manage.rb:39
|
12
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/manage.rb:143
|
@@ -3,4 +3,4 @@ FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
|
3
3
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
4
4
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
5
5
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
6
|
-
FC082: node.set or node.set_unless used to set node attributes: ./recipes/ruby.rb:27
|
6
|
+
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/ruby.rb:27
|
@@ -15,3 +15,5 @@ FC072: Metadata should not contain "attribute" keyword: ./metadata.rb:1
|
|
15
15
|
FC074: LWRP should use DSL to define resource's default action: ./resources/key.rb:1
|
16
16
|
FC074: LWRP should use DSL to define resource's default action: ./resources/repository.rb:1
|
17
17
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
18
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/key.rb:76
|
19
|
+
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/repository.rb:41
|
@@ -119,4 +119,18 @@ describe FoodCritic::CommandLine do
|
|
119
119
|
expect(FoodCritic::CommandLine.new(["--no-context", "."]).show_context?).to be_falsey
|
120
120
|
end
|
121
121
|
end
|
122
|
+
|
123
|
+
describe ":rule_file" do
|
124
|
+
it "is unset if -r/--rule-file is not specified" do
|
125
|
+
expect(FoodCritic::CommandLine.new(["."]).options[:rule_file].nil?).to be_truthy
|
126
|
+
end
|
127
|
+
|
128
|
+
it "is equal to the provided path if -r is set and path is specified" do
|
129
|
+
expect(FoodCritic::CommandLine.new(["-r", "example", "."]).options[:rule_file]).to eq "example"
|
130
|
+
end
|
131
|
+
|
132
|
+
it "is equal to the provided path if --rule-file is set and path is specified" do
|
133
|
+
expect(FoodCritic::CommandLine.new(["--rule-file", "example", "."]).options[:rule_file]).to eq "example"
|
134
|
+
end
|
135
|
+
end
|
122
136
|
end
|
data/spec/unit/linter_spec.rb
CHANGED
@@ -12,7 +12,7 @@ describe FoodCritic::Linter do
|
|
12
12
|
|
13
13
|
describe "chef version" do
|
14
14
|
it "should be the latest stable version of Chef" do
|
15
|
-
expect(FoodCritic::Linter::DEFAULT_CHEF_VERSION).to eq "12.
|
15
|
+
expect(FoodCritic::Linter::DEFAULT_CHEF_VERSION).to eq "12.20.3"
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
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: 11.
|
4
|
+
version: 11.1.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-
|
11
|
+
date: 2017-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber-core
|
@@ -179,6 +179,7 @@ files:
|
|
179
179
|
- chef_dsl_metadata/chef_12.17.44.json
|
180
180
|
- chef_dsl_metadata/chef_12.18.31.json
|
181
181
|
- chef_dsl_metadata/chef_12.19.36.json
|
182
|
+
- chef_dsl_metadata/chef_12.20.3.json
|
182
183
|
- chef_dsl_metadata/chef_12.6.0.json
|
183
184
|
- chef_dsl_metadata/chef_12.7.2.json
|
184
185
|
- chef_dsl_metadata/chef_12.8.1.json
|
@@ -330,6 +331,10 @@ files:
|
|
330
331
|
- lib/foodcritic/rules/fc083.rb
|
331
332
|
- lib/foodcritic/rules/fc084.rb
|
332
333
|
- lib/foodcritic/rules/fc085.rb
|
334
|
+
- lib/foodcritic/rules/fc086.rb
|
335
|
+
- lib/foodcritic/rules/fc087.rb
|
336
|
+
- lib/foodcritic/rules/fc088.rb
|
337
|
+
- lib/foodcritic/rules/fc089.rb
|
333
338
|
- lib/foodcritic/template.rb
|
334
339
|
- lib/foodcritic/version.rb
|
335
340
|
- lib/foodcritic/xml.rb
|
@@ -378,6 +383,10 @@ files:
|
|
378
383
|
- spec/functional/fc083_spec.rb
|
379
384
|
- spec/functional/fc084_spec.rb
|
380
385
|
- spec/functional/fc085_spec.rb
|
386
|
+
- spec/functional/fc086_spec.rb
|
387
|
+
- spec/functional/fc087_spec.rb
|
388
|
+
- spec/functional/fc088_spec.rb
|
389
|
+
- spec/functional/fc089_spec.rb
|
381
390
|
- spec/functional/root_aliases_spec.rb
|
382
391
|
- spec/regression/cookbooks.txt
|
383
392
|
- spec/regression/expected/activemq.txt
|
@@ -494,5 +503,5 @@ rubyforge_project:
|
|
494
503
|
rubygems_version: 2.6.11
|
495
504
|
signing_key:
|
496
505
|
specification_version: 4
|
497
|
-
summary: foodcritic-11.
|
506
|
+
summary: foodcritic-11.1.0
|
498
507
|
test_files: []
|