Skip to content

Commit 81b4905

Browse files
committedMay 2, 2019
Drop support for Ruby 2.3 and 32-bit Windows builds
Ruby 2.3 reached EOL on March 31, 2019: https://www.ruby-lang.org/en/news/2019/03/31/support-of-ruby-2-3-has-ended/ As part of this, we needed run an autocorrect with RuboCop. We also removed 32-bit Windows builds from the AppVeyor matrix. There's no serious need to support 32-bit builds. Furthermore, these additional builds make feedback take that much longer to receive.
1 parent 1003db8 commit 81b4905

14 files changed

+12
-18
lines changed
 

‎.rubocop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AllCops:
2-
TargetRubyVersion: 2.3
2+
TargetRubyVersion: 2.4
33

44
Layout/ClosingParenthesisIndentation:
55
Enabled: false

‎.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ language: ruby
33
cache: bundler
44

55
rvm:
6-
- 2.3.8
76
- 2.4.6
87
- 2.5.5
98
- 2.6.2

‎CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## master (unreleased)
44

5-
* Drop support for Ruby 2.2
5+
* Drop support for Ruby 2.3 or older
66
* Add `FileSize` pre-commit hook
77

88
## 0.47.0

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ any Ruby code.
5454

5555
This project aims to support the following Ruby runtimes on both \*nix and Windows:
5656

57-
* MRI 2.3+
57+
* Ruby 2.4+
5858

5959
### Dependencies
6060

‎appveyor.yml

-5
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,8 @@ clone_depth: 1
44

55
environment:
66
matrix:
7-
- RUBY_FOLDER_VERSION: "23"
8-
- RUBY_FOLDER_VERSION: "23-x64"
9-
- RUBY_FOLDER_VERSION: "24"
107
- RUBY_FOLDER_VERSION: "24-x64"
11-
- RUBY_FOLDER_VERSION: "25"
128
- RUBY_FOLDER_VERSION: "25-x64"
13-
- RUBY_FOLDER_VERSION: "26"
149
- RUBY_FOLDER_VERSION: "26-x64"
1510
matrix:
1611
fast_finish: true

‎lib/overcommit/configuration_validator.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def check_hook_name_format(hash)
102102
hash.fetch(hook_type) { {} }.each_key do |hook_name|
103103
next if hook_name == 'ALL'
104104

105-
unless hook_name =~ /\A[A-Za-z0-9]+\z/
105+
unless hook_name.match?(/\A[A-Za-z0-9]+\z/)
106106
errors << "#{hook_type}::#{hook_name} has an invalid name " \
107107
"#{hook_name}. It must contain only alphanumeric " \
108108
'characters (no underscores or dashes, etc.)'

‎lib/overcommit/hook/commit_msg/message_format.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def validate_pattern(message)
1919
expected_pattern_message = config['expected_pattern_message']
2020
sample_message = config['sample_message']
2121

22-
unless message =~ /#{pattern}/m
22+
unless message.match?(/#{pattern}/m)
2323
[
2424
'Commit message pattern mismatch.',
2525
"Expected : #{expected_pattern_message}",

‎lib/overcommit/hook/pre_commit/author_email.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def run
1212
result.stdout.chomp
1313
end
1414

15-
unless email =~ /#{config['pattern']}/
15+
unless email.match?(/#{config['pattern']}/)
1616
return :fail,
1717
"Author has an invalid email address: '#{email}'\n" \
1818
'Set your email with ' \

‎lib/overcommit/hook/pre_commit/cook_style.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Overcommit::Hook::PreCommit
66
# @see https://docs.chef.io/cookstyle.html
77
class CookStyle < Base
88
GENERIC_MESSAGE_TYPE_CATEGORIZER = lambda do |type|
9-
type =~ /^warn/ ? :warning : :error
9+
type.match?(/^warn/) ? :warning : :error
1010
end
1111

1212
COP_MESSAGE_TYPE_CATEGORIZER = lambda do |type|

‎lib/overcommit/hook/pre_commit/go_vet.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def run
99
result = execute(command, args: applicable_files)
1010
return :pass if result.success?
1111

12-
if result.stderr =~ /no such tool "vet"/
12+
if result.stderr.match?(/no such tool "vet"/)
1313
return :fail, "`go tool vet` is not installed#{install_command_prompt}"
1414
end
1515

‎lib/overcommit/hook/pre_commit/jsl.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Jsl < Base
88
MESSAGE_REGEX = /(?<file>(?:\w:)?.+)\((?<line>\d+)\):(?<type>[^:]+)/
99

1010
MESSAGE_TYPE_CATEGORIZER = lambda do |type|
11-
type =~ /warning/ ? :warning : :error
11+
type.match?(/warning/) ? :warning : :error
1212
end
1313

1414
def run

‎lib/overcommit/hook/pre_commit/rubo_cop.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Overcommit::Hook::PreCommit
66
# @see http://batsov.com/rubocop/
77
class RuboCop < Base
88
GENERIC_MESSAGE_TYPE_CATEGORIZER = lambda do |type|
9-
type =~ /^warn/ ? :warning : :error
9+
type.match?(/^warn/) ? :warning : :error
1010
end
1111

1212
COP_MESSAGE_TYPE_CATEGORIZER = lambda do |type|

‎lib/overcommit/hook/prepare_commit_msg/replace_branch.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def run
1111
Overcommit::Utils.log.debug(
1212
"Checking if '#{Overcommit::GitRepo.current_branch}' matches #{branch_pattern}"
1313
)
14-
if branch_pattern.match(Overcommit::GitRepo.current_branch)
14+
if branch_pattern.match?(Overcommit::GitRepo.current_branch)
1515
Overcommit::Utils.log.debug("Writing #{commit_message_filename} with #{new_template}")
1616
modify_commit_message do |old_contents|
1717
"#{new_template}\n#{old_contents}"

‎overcommit.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
2525
Dir['libexec/**/*'] +
2626
Dir['template-dir/**/*']
2727

28-
s.required_ruby_version = '>= 2.3'
28+
s.required_ruby_version = '>= 2.4'
2929

3030
s.add_dependency 'childprocess', '~> 0.6', '>= 0.6.3'
3131
s.add_dependency 'iniparse', '~> 1.4'

0 commit comments

Comments
 (0)