cookstyle 7.31.1 → 7.31.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/upstream.yml +11 -11
- data/lib/cookstyle/version.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/cron_d_file_or_template.rb +12 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef76b0aec4f125de72a07fdb9aac1e079b6ff6b873dff89d3e9ee1665a153843
|
4
|
+
data.tar.gz: 8d8332cf3c6c991fb7b483fc4de82e73cd47f4834304e105b624da6649c9845b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e61f510b819dd0b81019a78e49ab6794b63890bc4e8940c39db6a2170fdbf28ca2b4d610eabd78ed0fe8d804eea66b746701f64927a82775c2fcab37cdd449dd
|
7
|
+
data.tar.gz: a0d25d86e1db04309786f376ea6ea3733d14be8e85651e7764879770ba3f28339bf99e7385c2ffc0144d03089886a6458e69c9bab8e9f29eff09731daf615a4a
|
data/config/upstream.yml
CHANGED
@@ -430,13 +430,13 @@ Layout/ClassStructure:
|
|
430
430
|
- prepend
|
431
431
|
- extend
|
432
432
|
ExpectedOrder:
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
433
|
+
- module_inclusion
|
434
|
+
- constants
|
435
|
+
- public_class_methods
|
436
|
+
- initializer
|
437
|
+
- public_methods
|
438
|
+
- protected_methods
|
439
|
+
- private_methods
|
440
440
|
|
441
441
|
Layout/ClosingHeredocIndentation:
|
442
442
|
Description: 'Checks the indentation of here document closings.'
|
@@ -1900,7 +1900,7 @@ Lint/NestedPercentLiteral:
|
|
1900
1900
|
VersionAdded: '0.52'
|
1901
1901
|
|
1902
1902
|
Lint/NextWithoutAccumulator:
|
1903
|
-
Description:
|
1903
|
+
Description: >-
|
1904
1904
|
Do not omit the accumulator when calling `next`
|
1905
1905
|
in a `reduce`/`inject` block.
|
1906
1906
|
Enabled: true
|
@@ -3153,7 +3153,7 @@ Style/ClassMethodsDefinitions:
|
|
3153
3153
|
StyleGuide: '#def-self-class-methods'
|
3154
3154
|
Enabled: false
|
3155
3155
|
VersionAdded: '0.89'
|
3156
|
-
EnforcedStyle:
|
3156
|
+
EnforcedStyle: def_self
|
3157
3157
|
SupportedStyles:
|
3158
3158
|
- def_self
|
3159
3159
|
- self_class
|
@@ -3815,8 +3815,8 @@ Style/InverseMethods:
|
|
3815
3815
|
:>: :<=
|
3816
3816
|
# `ActiveSupport` defines some common inverse methods. They are listed below,
|
3817
3817
|
# and not enabled by default.
|
3818
|
-
|
3819
|
-
|
3818
|
+
# :present?: :blank?,
|
3819
|
+
# :include?: :exclude?
|
3820
3820
|
# `InverseBlocks` are methods that are inverted by inverting the return
|
3821
3821
|
# of the block that is passed to the method
|
3822
3822
|
InverseBlocks:
|
data/lib/cookstyle/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
#
|
3
|
-
# Copyright:: 2020, Chef Software, Inc.
|
3
|
+
# Copyright:: 2020-2022, Chef Software, Inc.
|
4
4
|
# Author:: Tim Smith (<tsmith@chef.io>)
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -48,6 +48,10 @@ module RuboCop
|
|
48
48
|
# action :delete
|
49
49
|
# end
|
50
50
|
#
|
51
|
+
# file "/etc/cron.d/#{job_name}" do
|
52
|
+
# action :delete
|
53
|
+
# end
|
54
|
+
#
|
51
55
|
# #### correct
|
52
56
|
# cron_d 'backup' do
|
53
57
|
# minute '1'
|
@@ -70,14 +74,19 @@ module RuboCop
|
|
70
74
|
def_node_matcher :file_or_template?, <<-PATTERN
|
71
75
|
(block
|
72
76
|
(send nil? {:template :file :cookbook_file}
|
73
|
-
(
|
77
|
+
$(...))
|
74
78
|
...
|
75
79
|
)
|
76
80
|
PATTERN
|
77
81
|
|
78
82
|
def on_block(node)
|
79
83
|
file_or_template?(node) do |file_name|
|
80
|
-
|
84
|
+
# weed out types we can't evaluate
|
85
|
+
return unless file_name.dstr_type? || file_name.str_type?
|
86
|
+
|
87
|
+
# weed out string values that aren't a cron.d file
|
88
|
+
return unless file_name.value.start_with?('/etc/cron.d/')
|
89
|
+
|
81
90
|
add_offense(node, severity: :refactor)
|
82
91
|
end
|
83
92
|
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.3
|
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-
|
12
|
+
date: 2022-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubocop
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.25.
|
20
|
+
version: 1.25.1
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 1.25.
|
27
|
+
version: 1.25.1
|
28
28
|
description:
|
29
29
|
email:
|
30
30
|
- thom@chef.io
|