From ed2e3fbee5950467cb0143f83dc57f1f9bb9043d Mon Sep 17 00:00:00 2001 From: "Stephen A. Wilson" Date: Sat, 6 Jun 2020 12:08:05 -0400 Subject: [PATCH 1/5] drop Ruby 2.3 from CI tests - 2.3 was EOL March 31, 2019 --- .github/workflows/ruby.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 8f628d2965..d3a4339fe2 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -21,7 +21,6 @@ jobs: fail-fast: false # don't fail all matrix builds if one fails matrix: ruby: - - '2.3' - '2.4' - '2.5' - '2.6' From e8519742ef444e81ea869e925113b75f8f6a4857 Mon Sep 17 00:00:00 2001 From: "Stephen A. Wilson" Date: Sat, 6 Jun 2020 12:08:41 -0400 Subject: [PATCH 2/5] drop Ruby 2.4 from CI tests - 2.4 was EOL March 31, 2020 --- .github/workflows/ruby.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index d3a4339fe2..4e3bc4aee0 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -21,7 +21,6 @@ jobs: fail-fast: false # don't fail all matrix builds if one fails matrix: ruby: - - '2.4' - '2.5' - '2.6' - '2.7' From 203e142c31da5f12ca528a7b8c54e112dab0fe98 Mon Sep 17 00:00:00 2001 From: "Stephen A. Wilson" Date: Sat, 6 Jun 2020 12:31:11 -0400 Subject: [PATCH 3/5] update Rubocop target version --- .rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 639c729545..c88ba1fe40 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,5 @@ AllCops: - TargetRubyVersion: 2.3 + TargetRubyVersion: 2.5 Layout/LineLength: Description: This cop checks the length of lines in the source code. The maximum length is configurable. From f13dc79ef1ef7e73f7561884b9792d6a220937f4 Mon Sep 17 00:00:00 2001 From: "Stephen A. Wilson" Date: Sat, 6 Jun 2020 12:53:29 -0400 Subject: [PATCH 4/5] bump required ruby version --- faker.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faker.gemspec b/faker.gemspec index 17c2fd7683..97ddd11ce9 100644 --- a/faker.gemspec +++ b/faker.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |spec| spec.bindir = 'bin' spec.executables = ['faker'] spec.require_paths = ['lib'] - spec.required_ruby_version = '>= 2.3' + spec.required_ruby_version = '>= 2.5' spec.metadata['changelog_uri'] = 'https://github.com/faker-ruby/faker/blob/master/CHANGELOG.md' spec.metadata['source_code_uri'] = 'https://github.com/faker-ruby/faker' From 0216e7d06537fbd32a4e05a1af0f298edb5ac0c3 Mon Sep 17 00:00:00 2001 From: "Stephen A. Wilson" Date: Sat, 6 Jun 2020 12:55:37 -0400 Subject: [PATCH 5/5] fix rubocop offenses --- lib/helpers/base58.rb | 2 +- test/faker/default/test_country_code.rb | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/helpers/base58.rb b/lib/helpers/base58.rb index 3b7f055fb3..e4bd278209 100644 --- a/lib/helpers/base58.rb +++ b/lib/helpers/base58.rb @@ -7,7 +7,7 @@ def self.encode(str) base = alphabet.size lv = 0 - str.split('').reverse.each_with_index { |v, i| lv += v.unpack('C')[0] * 256**i } + str.split('').reverse.each_with_index { |v, i| lv += v.unpack('C') * 256**i } ret = +'' while lv.positive? diff --git a/test/faker/default/test_country_code.rb b/test/faker/default/test_country_code.rb index f3c6995ac7..3fd7b82bc5 100644 --- a/test/faker/default/test_country_code.rb +++ b/test/faker/default/test_country_code.rb @@ -23,11 +23,9 @@ def test_country_code_long_expected_length def test_all_country_code_have_country codes = Faker::Base.fetch_all('address.country_code') lonely_codes = codes.reject do |code| - begin - Faker::Address.country_by_code(code: code) - rescue I18n::MissingTranslationData - nil - end + Faker::Address.country_by_code(code: code) + rescue I18n::MissingTranslationData + nil end assert_equal([], lonely_codes)