cookstyle 7.30.4 → 7.31.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/cookstyle.yml +8 -0
- data/lib/cookstyle/version.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/delivery.rb +44 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a58f07c36931ca525e09e1be9c91cc142834784bbb12a9fc83db09d527ccf078
|
4
|
+
data.tar.gz: c29158ed043e7c942e5e3aaa17b9d2c967e20741428f4d6a5074529acd268db9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c2c36c3fb350b28334a19c22350ce6d38e4506e18a9f4160d439a928e86678c0da051428e519aac811607305db938efa18fdc99b996eb5d7f53de11ccfca2bf
|
7
|
+
data.tar.gz: 6871dd79e567d39409b676d9321895d2c7c2292de2bf00d06d9fe31813ee484378acf4e46d1cbcb261ce934250ca547f7307f8b53c24bb8aea8ef9cb4b3207fd
|
data/config/cookstyle.yml
CHANGED
@@ -1264,6 +1264,14 @@ Chef/Deprecations/PolicyfileCommunitySource:
|
|
1264
1264
|
Include:
|
1265
1265
|
- '**/Policyfile.rb'
|
1266
1266
|
|
1267
|
+
Chef/Deprecations/Delivery:
|
1268
|
+
Description: Do not include a `.delivery` directory for the `delivery` command in your cookbooks. Chef Delivery (Workflow) went EOL Dec 31st 2021 and the delivery command was removed from Chef Workstation Feb 2022.
|
1269
|
+
StyleGuide: 'chef_deprecations_delivery'
|
1270
|
+
Enabled: true
|
1271
|
+
VersionAdded: '7.31.0'
|
1272
|
+
Include:
|
1273
|
+
- '**/metadata.rb'
|
1274
|
+
|
1267
1275
|
Chef/Deprecations/DeprecatedSudoActions:
|
1268
1276
|
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.
|
1269
1277
|
StyleGuide: 'chef_deprecations_deprecatedsudoactions'
|
data/lib/cookstyle/version.rb
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
#
|
3
|
+
# Copyright:: 2022, Chef Software Inc.
|
4
|
+
# Author:: Tim Smith (<tsmith@chef.io>)
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
module RuboCop
|
19
|
+
module Cop
|
20
|
+
module Chef
|
21
|
+
module Deprecations
|
22
|
+
# The Delivery CLI from Chef Delivery/Workflow is no longer bundled with Chef Workstation as Chef Delivery is end of life as of Dec 31st 2021.
|
23
|
+
#
|
24
|
+
# Users of Delivery / Workflow would include a `.delivery` directory in their cookbooks. This directory would include Delivery local-mode configs
|
25
|
+
# or Delivery cookbooks. The contents of this directory are now obsolete and should be removed.
|
26
|
+
#
|
27
|
+
class Delivery < Base
|
28
|
+
include RangeHelp
|
29
|
+
|
30
|
+
MSG = 'Do not include a `.delivery` directory for the `delivery` command in your cookbooks. Chef Delivery (Workflow) went EOL Dec 31st 2021 and the delivery command was removed from Chef Workstation Feb 2022.'
|
31
|
+
|
32
|
+
def on_new_investigation
|
33
|
+
return unless File.exist?(File.join(File.dirname(processed_source.path) + '/.delivery'))
|
34
|
+
|
35
|
+
# Using range similar to RuboCop::Cop::Naming::Filename (file_name.rb)
|
36
|
+
range = source_range(processed_source.buffer, 1, 0)
|
37
|
+
|
38
|
+
add_offense(range, severity: :warning)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
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.
|
4
|
+
version: 7.31.0
|
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-01-
|
12
|
+
date: 2022-01-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubocop
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- lib/rubocop/cop/chef/deprecation/chefspec_coverage_report.rb
|
104
104
|
- lib/rubocop/cop/chef/deprecation/chefspec_legacy_runner.rb
|
105
105
|
- lib/rubocop/cop/chef/deprecation/chocolatey_package_uninstall_action.rb
|
106
|
+
- lib/rubocop/cop/chef/deprecation/delivery.rb
|
106
107
|
- lib/rubocop/cop/chef/deprecation/depends_chef_nginx_cookbook.rb
|
107
108
|
- lib/rubocop/cop/chef/deprecation/depends_chef_reporting_cookbook.rb
|
108
109
|
- lib/rubocop/cop/chef/deprecation/depends_compat_resource.rb
|