cookstyle 7.31.7 → 7.31.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 77ad4617e8e89f4b34622dfc962e39037e28c5d9779cbc3198a64c7155b426ed
|
|
4
|
+
data.tar.gz: cf9fdce4231a1b0c55e8166628affc51abe3eb188ba5a8d75c08cd57f0d49470
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db4d6bf2c6a01d8bbd4c49f3ed8a13cf23b70d664f15c515536ae64e509af4d2caa6151825161d9dc554d19088527465b009e37ff13fbac1a04829308fb90684
|
|
7
|
+
data.tar.gz: 192f218ee77783b63d7712a0c51837c2a50ebffef4cf1f12112cfcd0008599e9bdf25fb6250f7f4f2c2206f15ae856ef62a6ee2183abb8cb86ad959823df98f6
|
data/config/cookstyle.yml
CHANGED
|
@@ -2,6 +2,12 @@ AllCops:
|
|
|
2
2
|
SuggestExtensions: false
|
|
3
3
|
TargetRubyVersion: 2.5
|
|
4
4
|
TargetChefVersion: ~
|
|
5
|
+
inherit_mode:
|
|
6
|
+
merge:
|
|
7
|
+
- Include
|
|
8
|
+
Include:
|
|
9
|
+
- '**/.delivery/project.toml' # required by Chef/Deprecations/Delivery
|
|
10
|
+
- '**/.delivery/config.json' # required by Chef/Deprecations/Delivery
|
|
5
11
|
Exclude:
|
|
6
12
|
- '**/files/**/*'
|
|
7
13
|
- '**/vendor/**/*'
|
|
@@ -1265,12 +1271,13 @@ Chef/Deprecations/PolicyfileCommunitySource:
|
|
|
1265
1271
|
- '**/Policyfile.rb'
|
|
1266
1272
|
|
|
1267
1273
|
Chef/Deprecations/Delivery:
|
|
1268
|
-
Description: Do not include
|
|
1274
|
+
Description: Do not include Chef Delivery (Workflow) configuration in your cookbooks. Chef Delivery (Workflow) went EOL Dec 31st 2021 and the delivery command was removed from Chef Workstation Feb 2022.
|
|
1269
1275
|
StyleGuide: 'chef_deprecations_delivery'
|
|
1270
1276
|
Enabled: true
|
|
1271
1277
|
VersionAdded: '7.31.0'
|
|
1272
1278
|
Include:
|
|
1273
|
-
- '
|
|
1279
|
+
- '**/.delivery/project.toml'
|
|
1280
|
+
- '**/.delivery/config.json'
|
|
1274
1281
|
|
|
1275
1282
|
Chef/Deprecations/DeprecatedSudoActions:
|
|
1276
1283
|
Description: The `sudo` resource in the sudo cookbook 5.0 (2018) or Chef Infra Client 14 and later have replaced the existing `:install` and `:remove` actions with `:create` and `:delete` actions to better match other resources in Chef Infra.
|
|
@@ -1954,7 +1961,7 @@ Chef/Modernize/UseChefLanguageCloudHelpers:
|
|
|
1954
1961
|
- '**/resources/*.rb'
|
|
1955
1962
|
- '**/providers/*.rb'
|
|
1956
1963
|
- '**/recipes/*.rb'
|
|
1957
|
-
|
|
1964
|
+
|
|
1958
1965
|
Chef/Modernize/ClassEvalActionClass:
|
|
1959
1966
|
Description: In Chef Infra Client 12.9 and later it is no longer necessary to call the class_eval method on the action class block.
|
|
1960
1967
|
StyleGuide: 'chef_modernize_classevalactionclass'
|
|
@@ -2332,7 +2339,7 @@ Chef/Security/SshPrivateKey:
|
|
|
2332
2339
|
- '**/recipes/*.rb'
|
|
2333
2340
|
- '**/attributes/*.rb'
|
|
2334
2341
|
- '**/definitions/*.rb'
|
|
2335
|
-
|
|
2342
|
+
|
|
2336
2343
|
#### The base rubocop 0.37 enabled.yml file we started with ####
|
|
2337
2344
|
|
|
2338
2345
|
Layout/AccessModifierIndentation:
|
|
@@ -3094,4 +3101,4 @@ Style/FileRead:
|
|
|
3094
3101
|
|
|
3095
3102
|
# reduce file write complexity
|
|
3096
3103
|
Style/FileWrite:
|
|
3097
|
-
Enabled: true
|
|
3104
|
+
Enabled: true
|
data/lib/cookstyle/version.rb
CHANGED
|
@@ -27,16 +27,20 @@ module RuboCop
|
|
|
27
27
|
class Delivery < Base
|
|
28
28
|
include RangeHelp
|
|
29
29
|
|
|
30
|
-
MSG = 'Do not include
|
|
30
|
+
MSG = 'Do not include Chef Delivery (Workflow) configuration in your cookbooks. It went EOL Dec 31st 2021 and the delivery command was removed from Chef Workstation Feb 2022.'
|
|
31
31
|
|
|
32
|
-
def
|
|
33
|
-
return unless
|
|
32
|
+
def on_other_file
|
|
33
|
+
return unless processed_source.path.end_with?('/.delivery/project.toml', '/.delivery/config.json')
|
|
34
34
|
|
|
35
35
|
# Using range similar to RuboCop::Cop::Naming::Filename (file_name.rb)
|
|
36
36
|
range = source_range(processed_source.buffer, 1, 0)
|
|
37
37
|
|
|
38
38
|
add_offense(range, severity: :warning)
|
|
39
39
|
end
|
|
40
|
+
|
|
41
|
+
# An empty / simple TOML file can also be syntatically valid Ruby, so
|
|
42
|
+
# RuboCop may start an investigation instead of calling on_other_file.
|
|
43
|
+
alias_method :on_new_investigation, :on_other_file
|
|
40
44
|
end
|
|
41
45
|
end
|
|
42
46
|
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'rubocop/rspec/expect_offense'
|
|
3
|
+
# rubocop:disable Lint/DuplicateMethods
|
|
4
|
+
|
|
5
|
+
module RuboCop
|
|
6
|
+
module RSpec
|
|
7
|
+
module ExpectOffense
|
|
8
|
+
# Yields to a block with `parse_processed_source` patched to not raise an
|
|
9
|
+
# exception.
|
|
10
|
+
#
|
|
11
|
+
# RSpec's `expect_offense` helper calls a method called
|
|
12
|
+
# `parse_processed_source` that parses source code and raises an exception
|
|
13
|
+
# if it is not valid Ruby. Raising an exception prevents RuboCop from
|
|
14
|
+
# calling the cop's `on_other_file` method for checking non-Ruby files.
|
|
15
|
+
def allow_invalid_ruby(&block)
|
|
16
|
+
alias :parse_processed_source :_parse_invalid_source
|
|
17
|
+
yield block
|
|
18
|
+
alias :parse_processed_source :_orig_parse_processed_source
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
alias :_orig_parse_processed_source :parse_processed_source
|
|
22
|
+
|
|
23
|
+
def _parse_invalid_source(source, file = nil)
|
|
24
|
+
parse_source(source, file)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cookstyle
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.31.
|
|
4
|
+
version: 7.31.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thom May
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2022-02-
|
|
12
|
+
date: 2022-02-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rubocop
|
|
@@ -303,6 +303,7 @@ files:
|
|
|
303
303
|
- lib/rubocop/cop/inspec/deprecation/attribute_default.rb
|
|
304
304
|
- lib/rubocop/cop/inspec/deprecation/attribute_helper.rb
|
|
305
305
|
- lib/rubocop/cop/target_chef_version.rb
|
|
306
|
+
- lib/rubocop/monkey_patches/allow_invalid_ruby.rb
|
|
306
307
|
- lib/rubocop/monkey_patches/base.rb
|
|
307
308
|
- lib/rubocop/monkey_patches/config.rb
|
|
308
309
|
- lib/rubocop/monkey_patches/directive_comment.rb
|