Skip to content

Commit

Permalink
drop ruby 2.7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
tycooon committed Apr 16, 2024
1 parent bee8d40 commit 9d421fe
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3"]
ruby: ["3.0", "3.1", "3.2", "3.3"]

services:
postgres:
Expand Down
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ inherit_gem:

AllCops:
DisplayCopNames: true
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0
SuggestExtensions: false

Naming/MethodParameterName:
AllowedNames: ["x", "y", "z"]
Expand Down
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ GEM
nokogiri (1.15.6)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.15.6-arm64-darwin)
racc (~> 1.4)
nokogiri (1.15.6-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.15.6-x86_64-linux)
racc (~> 1.4)
nori (2.7.0)
bigdecimal
parallel (1.24.0)
Expand Down
4 changes: 2 additions & 2 deletions lib/umbrellio_utils/checks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module UmbrellioUtils
module Checks
extend self

EMAIL_REGEXP = /\A([\w+-].?)+@[a-z\d-]+(\.[a-z]+)*\.[a-z]+\z/i.freeze
HOLDER_NAME_REGEXP = /\A([A-Za-z0-9.'-]+ ?)+\z/.freeze
EMAIL_REGEXP = /\A([\w+-].?)+@[a-z\d-]+(\.[a-z]+)*\.[a-z]+\z/i
HOLDER_NAME_REGEXP = /\A([A-Za-z0-9.'-]+ ?)+\z/

def secure_compare(src, dest)
ActiveSupport::SecurityUtils.secure_compare(
Expand Down
2 changes: 1 addition & 1 deletion lib/umbrellio_utils/parsing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Parsing
HTTP_X_HTTP_AUTHORIZATION
HTTP_REDIRECT_X_HTTP_AUTHORIZATION
].freeze
CARD_TRUNCATED_PAN_REGEX = /\A(\d{6}).*(\d{4})\z/.freeze
CARD_TRUNCATED_PAN_REGEX = /\A(\d{6}).*(\d{4})\z/

def try_to_parse_as_json(data)
JSON.parse(data) rescue data
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

require "umbrellio-utils"

Dir[Pathname(__dir__).join("support/**/*")].sort.each { |x| require(x) }
Dir[Pathname(__dir__).join("support/**/*")].each { |x| require(x) }

TableSync.orm = :sequel
TableSync.headers_callable = -> (_klass, attributes) { attributes.slice(:id) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
let(:result) { formatter.call(log, nil) }

let(:formatter) { described_class.new(**options) }
let(:options) { Hash[custom_names_mapping:] }
let(:options) { Hash[custom_names_mapping: custom_names_mapping] }
let(:custom_names_mapping) { Hash[] }

let(:log_level) { :debug }
Expand Down
6 changes: 3 additions & 3 deletions umbrellio_utils.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ require_relative "lib/umbrellio_utils/version"
Gem::Specification.new do |spec|
spec.name = "umbrellio-utils"
spec.version = UmbrellioUtils::VERSION
spec.authors = ["JustAnotherDude"]
spec.email = ["[email protected]"]
spec.authors = ["Team Umbrellio"]
spec.email = ["[email protected]"]

spec.summary = "A set of utilities that speed up development"
spec.description = "UmbrellioUtils is collection of utility classes and helpers"
spec.homepage = "https://github.com/umbrellio/utils"
spec.license = "MIT"
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/umbrellio/utils"
Expand Down

0 comments on commit 9d421fe

Please sign in to comment.