cookstyle 7.30.4 → 7.31.0

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: 6043723cd21a354dc4721b561f5ce919a9769362920502b28d200f11475c1a4d
4
- data.tar.gz: '08e817e80ca78e386c17ae09ed96001739ef7ef5c4e77c13495e6b6a339b637a'
3
+ metadata.gz: a58f07c36931ca525e09e1be9c91cc142834784bbb12a9fc83db09d527ccf078
4
+ data.tar.gz: c29158ed043e7c942e5e3aaa17b9d2c967e20741428f4d6a5074529acd268db9
5
5
  SHA512:
6
- metadata.gz: 818a1516cdccadac3bc08ff587fac2ad0da22c56be22d03fd027adb540bf4cbb764852cf9d204745ea54e074f984e7c71607c70fe215d8de98ac27d395f18644
7
- data.tar.gz: a9a3dc037d434165f73dc09658532094e19f744c7463ace68d610fbdfc8f9da6dfdbd1b525f4330d8d71aed00a8e40a8a1681c4f2bb677a5460dab60562bf10c
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'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Cookstyle
3
- VERSION = "7.30.4" # rubocop: disable Style/StringLiterals
3
+ VERSION = "7.31.0" # rubocop: disable Style/StringLiterals
4
4
  RUBOCOP_VERSION = '1.25.0'
5
5
  end
@@ -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.30.4
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-24 00:00:00.000000000 Z
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