Skip to content

Commit

Permalink
Merge pull request #653 from haines/activerecord
Browse files Browse the repository at this point in the history
Test against ActiveRecord 7.2
  • Loading branch information
haines authored Aug 19, 2024
2 parents a85d69e + 1988591 commit c588f9e
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 29 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
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-3.3.3
ruby-3.3.4
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
36 changes: 18 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,23 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activemodel (7.1.2)
activesupport (= 7.1.2)
activerecord (7.1.2)
activemodel (= 7.1.2)
activesupport (= 7.1.2)
activemodel (7.2.0)
activesupport (= 7.2.0)
activerecord (7.2.0)
activemodel (= 7.2.0)
activesupport (= 7.2.0)
timeout (>= 0.4.0)
activesupport (7.1.2)
activesupport (7.2.0)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
ansi (1.5.0)
ast (2.4.2)
aws-eventstream (1.3.0)
Expand All @@ -42,27 +43,26 @@ GEM
aws-sigv4 (1.9.1)
aws-eventstream (~> 1, >= 1.0.2)
base64 (0.2.0)
bigdecimal (3.1.5)
bigdecimal (3.1.8)
builder (3.3.0)
coderay (1.1.3)
commonmarker (0.23.10)
concurrent-ruby (1.2.2)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
drb (2.2.0)
ruby2_keywords
i18n (1.14.1)
drb (2.2.1)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
jmespath (1.6.2)
json (2.7.2)
language_server-protocol (3.17.0.3)
logger (1.6.0)
method_source (1.0.0)
minitest (5.24.1)
minitest (5.25.1)
minitest-reporters (1.7.1)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
mutex_m (0.2.0)
parallel (1.25.1)
parser (3.3.4.0)
ast (~> 2.4.1)
Expand Down Expand Up @@ -96,7 +96,7 @@ GEM
rubocop-rake (0.6.0)
rubocop (~> 1.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
securerandom (0.3.1)
strscan (3.1.0)
timecop (0.9.10)
timeout (0.4.1)
Expand Down Expand Up @@ -126,4 +126,4 @@ DEPENDENCIES
yard

BUNDLED WITH
2.5.14
2.5.17
5 changes: 2 additions & 3 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 All @@ -25,7 +23,8 @@ ruby_pg_requirements = {
activerecord_pg_requirements = {
"6.1" => "~> 1.1",
"7.0" => "~> 1.1",
"7.1" => "~> 1.1"
"7.1" => "~> 1.1",
"7.2" => "~> 1.1"
}

versions = ruby_activerecord_requirements.flat_map do |ruby_version, activerecord_requirement|
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 c588f9e

Please sign in to comment.