Skip to content

Commit b07650f

Browse files
Merge pull request #3006 from tatheerf02/drop-ruby-2.7
Drop support for Ruby 2.7
2 parents 7ab4a75 + a148f62 commit b07650f

File tree

8 files changed

+12
-13
lines changed

8 files changed

+12
-13
lines changed

.github/workflows/ruby.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- uses: actions/checkout@v3
2525
- uses: ruby/setup-ruby@v1
2626
with:
27-
ruby-version: '2.7'
27+
ruby-version: '3.0'
2828

2929
- name: Install dependencies
3030
run: bundle install
@@ -38,7 +38,6 @@ jobs:
3838
fail-fast: false # don't fail all matrix builds if one fails
3939
matrix:
4040
ruby:
41-
- '2.7'
4241
- '3.0'
4342
- '3.1'
4443
- '3.2'

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require:
33
- rubocop-rake
44

55
AllCops:
6-
TargetRubyVersion: 2.7
6+
TargetRubyVersion: 3.0
77
NewCops: enable
88

99
# Suppress noise for obvious operator precedence.

MAINTAINING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ If you're reviewing a PR, ask yourself:
1313
## Managing libraries dependencies EOL
1414

1515
As a guideline for Ruby's End of Life (EOL) versions, a good heuristic (that's not too hard on maintainers) is to keep support for 1 EOL version.
16-
In other words, once Ruby 3.0 is EOL, drop support for 2.7.
16+
In other words, once Ruby 3.1 is EOL, drop support for 3.0.
1717

1818
## Security
1919

faker.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
1919
spec.bindir = 'bin'
2020
spec.executables = ['faker']
2121
spec.require_paths = ['lib']
22-
spec.required_ruby_version = '>= 2.7'
22+
spec.required_ruby_version = '>= 3.0'
2323

2424
spec.metadata['changelog_uri'] = 'https://github.com/faker-ruby/faker/blob/main/CHANGELOG.md'
2525
spec.metadata['source_code_uri'] = 'https://github.com/faker-ruby/faker'

lib/faker.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require 'psych'
66
require 'i18n'
77

8-
Dir.glob(File.join(mydir, 'helpers', '*.rb')).sort.each { |file| require file }
8+
Dir.glob(File.join(mydir, 'helpers', '*.rb')).each { |file| require file }
99

1010
I18n.load_path += Dir[File.join(mydir, 'locales', '**/*.yml')]
1111

@@ -275,4 +275,4 @@ def disable_enforce_available_locales
275275
end
276276

277277
# require faker objects
278-
Dir.glob(File.join(mydir, 'faker', '/**/*.rb')).sort.each { |file| require file }
278+
Dir.glob(File.join(mydir, 'faker', '/**/*.rb')).each { |file| require file }

lib/faker/default/id_number.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class IdNumber < Base
1212
].freeze
1313
ZA_RACE_DIGIT = '8'
1414
ZA_CITIZENSHIP_DIGITS = %w[0 1].freeze
15-
BRAZILIAN_ID_FORMAT = /(\d{1,2})(\d{3})(\d{3})([\dX])/.freeze
15+
BRAZILIAN_ID_FORMAT = /(\d{1,2})(\d{3})(\d{3})([\dX])/
1616
BRAZILIAN_ID_FROM = 10_000_000
1717
BRAZILIAN_ID_TO = 99_999_999
1818

test/faker/default/test_faker_crypto_coin.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ class TestFakerCryptoCoin < Test::Unit::TestCase
77
ACRONYM = 1
88
URL_LOGO = 2
99

10-
REGEX_COIN_NAME = /[a-zA-Z .]{3,}/.freeze
11-
REGEX_ACRONYM = /\w+{3,}/.freeze
12-
REGEX_URL_LOGO = /^https:\/\/i.imgur.com\/.......\./.freeze
10+
REGEX_COIN_NAME = /[a-zA-Z .]{3,}/
11+
REGEX_ACRONYM = /\w+{3,}/
12+
REGEX_URL_LOGO = /^https:\/\/i.imgur.com\/.......\./
1313

1414
def setup
1515
@tester = Faker::CryptoCoin

test/faker/default/test_faker_vehicle.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
require_relative '../../test_helper'
44

55
class TestFakerVehicle < Test::Unit::TestCase
6-
WORD_MATCH = /\w+\.?/.freeze
7-
VIN_REGEX = /\A[A-HJ-NPR-Z0-9]{17}\z/.freeze
6+
WORD_MATCH = /\w+\.?/
7+
VIN_REGEX = /\A[A-HJ-NPR-Z0-9]{17}\z/
88

99
def setup
1010
@tester = Faker::Vehicle

0 commit comments

Comments
 (0)