Skip to content

Commit ac94438

Browse files
authored
Merge pull request #242 from puppetlabs/CAT-2281-Remove_puppet_7_test_infrastructure
(CAT-2281) Remove puppet 7 infrastructure
2 parents 25825df + 3126455 commit ac94438

35 files changed

+50
-54
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
ruby_version:
22-
- '2.7'
2322
- '3.2'
2423
- '3.3'
2524
name: "spec (ruby ${{ matrix.ruby_version }})"
@@ -34,7 +33,6 @@ jobs:
3433
fail-fast: false
3534
matrix:
3635
ruby_version:
37-
- '2.7'
3836
- '3.2'
3937
- '3.3'
4038
name: "acceptance (ruby ${{ matrix.ruby_version }})"

.github/workflows/nightly.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
ruby_version:
15-
- '2.7'
1615
- '3.2'
1716
- '3.3'
1817
name: "spec (ruby ${{ matrix.ruby_version }})"
@@ -26,7 +25,6 @@ jobs:
2625
fail-fast: false
2726
matrix:
2827
ruby_version:
29-
- '2.7'
3028
- '3.2'
3129
- '3.3'
3230
name: "acceptance (ruby ${{ matrix.ruby_version }})"

lib/puppet-lint.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,11 @@ def print_problems
250250
# def check
251251
# end
252252
# end
253-
def self.new_check(name, &block)
253+
def self.new_check(name, &)
254254
class_name = name.to_s.split('_').map(&:capitalize).join
255255
klass = PuppetLint.const_set(:"Check#{class_name}", Class.new(PuppetLint::CheckPlugin))
256256
klass.const_set(:NAME, name)
257-
klass.class_exec(&block)
257+
klass.class_exec(&)
258258
PuppetLint.configuration.add_check(name, klass)
259259
PuppetLint::Data.ignore_overrides[name] ||= {}
260260
end

lib/puppet-lint/checkplugin.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ def manifest_lines
180180
def default_info
181181
@default_info ||= {
182182
check: self.class.const_get(:NAME),
183-
fullpath: fullpath,
184-
path: path,
185-
filename: filename
183+
fullpath:,
184+
path:,
185+
filename:
186186
}
187187
end
188188

lib/puppet-lint/checks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def load_data(path, content)
3636
problems << {
3737
kind: :error,
3838
check: :syntax,
39-
message: message,
39+
message:,
4040
line: e.line_no,
4141
column: e.column,
4242
fullpath: PuppetLint::Data.fullpath,

lib/puppet-lint/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def self.add_check(check)
4848
# Signature
4949
#
5050
# <option>=(value)
51-
def method_missing(method, *args, &_block)
51+
def method_missing(method, *args, &)
5252
super unless method.to_s =~ %r{^(\w+)=?$}
5353

5454
option = Regexp.last_match(1)

lib/puppet-lint/data.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def definition_indexes(type)
359359
end: i + j + 1,
360360
tokens: tokens[i..(i + j + 1)],
361361
param_tokens: param_tokens(tokens[i..(i + j + 1)]),
362-
type: type,
362+
type:,
363363
name_token: token.next_code_token,
364364
inherited_token: inherited_class
365365
}

lib/puppet-lint/lexer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ def heredoc_queue
111111
# \p{Zs} == ASCII + Unicode non-linebreaking whitespace
112112
WHITESPACE_RE = (RUBY_VERSION == '1.8.7') ? %r{[\t\v\f ]} : %r{[\t\v\f\p{Zs}]}
113113

114-
LINE_END_RE = %r{(?:\r\n|\r|\n)}.freeze
114+
LINE_END_RE = %r{(?:\r\n|\r|\n)}
115115

116-
NAME_RE = %r{\A((?:(?:::)?[_a-z0-9][-\w]*)(?:::[a-z0-9][-\w]*)*)}.freeze
116+
NAME_RE = %r{\A((?:(?:::)?[_a-z0-9][-\w]*)(?:::[a-z0-9][-\w]*)*)}
117117

118118
# Internal: An Array of Arrays containing tokens that can be described by
119119
# a single regular expression. Each sub-Array contains 2 elements, the

lib/puppet-lint/lexer/string_slurper.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ class PuppetLint::Lexer
66
class StringSlurper
77
attr_accessor :scanner, :results, :interp_stack
88

9-
START_INTERP_PATTERN = %r{\$\{}.freeze
10-
END_INTERP_PATTERN = %r{\}}.freeze
11-
END_STRING_PATTERN = %r{(\A|[^\\])(\\\\)*"}.freeze
12-
UNENC_VAR_PATTERN = %r{(\A|[^\\])\$(::)?(\w+(-\w+)*::)*\w+(-\w+)*}.freeze
13-
ESC_DQUOTE_PATTERN = %r{\\+"}.freeze
14-
LBRACE_PATTERN = %r{\{}.freeze
9+
START_INTERP_PATTERN = %r{\$\{}
10+
END_INTERP_PATTERN = %r{\}}
11+
END_STRING_PATTERN = %r{(\A|[^\\])(\\\\)*"}
12+
UNENC_VAR_PATTERN = %r{(\A|[^\\])\$(::)?(\w+(-\w+)*::)*\w+(-\w+)*}
13+
ESC_DQUOTE_PATTERN = %r{\\+"}
14+
LBRACE_PATTERN = %r{\{}
1515

1616
def initialize(string)
1717
@scanner = StringScanner.new(string)

lib/puppet-lint/monkeypatches.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class String
66
Percent = instance_method(:%) unless defined?(Percent)
77

8-
def %(*a, &b)
8+
def %(*a, &)
99
a.flatten!
1010

1111
string = case a.last
@@ -18,7 +18,7 @@ def %(*a, &b)
1818
if a.empty?
1919
string
2020
else
21-
Percent.bind_call(string, a, &b)
21+
Percent.bind_call(string, a, &)
2222
end
2323
end
2424

0 commit comments

Comments
 (0)