Skip to content

Commit

Permalink
Drop support for Ruby 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
haines committed Aug 19, 2024
1 parent 7bb5a1c commit 1988591
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require:
- rubocop-rake

AllCops:
TargetRubyVersion: 3.0
TargetRubyVersion: 3.1
NewCops: enable
Exclude:
- bin/bundle
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

No notable changes.
### Changed
* Require Ruby ≥ 3.1 ([#653](https://github.com/haines/pg-aws_rds_iam/pull/653))

## [0.5.0] - 2023-05-04

Expand Down
2 changes: 0 additions & 2 deletions bin/version-matrix
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ def minor_versions(name, requirement)
end

ruby_activerecord_requirements = {
"3.0" => ">= 6.1",
"3.1" => ">= 6.1",
"3.2" => ">= 6.1",
"3.3" => ">= 6.1"
}

ruby_pg_requirements = {
"3.0" => "> 0",
"3.1" => "> 0",
"3.2" => ">= 1.3",
"3.3" => ">= 1.3"
Expand Down
2 changes: 1 addition & 1 deletion lib/pg/aws_rds_iam/auth_token_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AuthTokenGenerator
# @param credentials [Aws::CredentialProvider] the IAM credentials with which to sign the token
# @param region [String] the AWS region in which the RDS instances are running
def initialize(credentials:, region:)
@generator = Aws::RDS::AuthTokenGenerator.new(credentials: credentials)
@generator = Aws::RDS::AuthTokenGenerator.new(credentials:)
@region = region
end

Expand Down
4 changes: 2 additions & 2 deletions lib/pg/aws_rds_iam/auth_token_generator_registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def initialize(default_auth_token_generator_class: AuthTokenGenerator)
# @param name [String, Symbol]
# @return [void]
# @yieldreturn [AuthTokenGenerator]
def add(name, &block)
@registry[name.to_s] = Memoizer.new(&block)
def add(name, &)
@registry[name.to_s] = Memoizer.new(&)
end

# Looks up an {AuthTokenGenerator} by name.
Expand Down
2 changes: 1 addition & 1 deletion pg-aws_rds_iam.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Gem::Specification.new do |spec|

spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 3.0"
spec.required_ruby_version = ">= 3.1"

spec.add_dependency "aws-sdk-rds", "~> 1.0"
spec.add_dependency "pg", "~> 1.1"
Expand Down
2 changes: 1 addition & 1 deletion test/pg/aws_rds_iam/auth_token_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module AWS_RDS_IAM
class AuthTokenGeneratorTest < Minitest::Test
def setup
credentials = Aws::Credentials.new("AKIAIOSFODNN7EXAMPLE", "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY")
@auth_token_generator = AuthTokenGenerator.new(credentials: credentials, region: "eu-west-2")
@auth_token_generator = AuthTokenGenerator.new(credentials:, region: "eu-west-2")
end

def test_generate_token
Expand Down

0 comments on commit 1988591

Please sign in to comment.