From 46adf9215d5f60f8e233e52439292f5a9446a5f8 Mon Sep 17 00:00:00 2001 From: Andrew Haines Date: Mon, 9 Jan 2023 12:41:09 +0000 Subject: [PATCH 1/6] Test against Ruby 3.2 --- CHANGELOG.md | 3 ++- bin/version-matrix | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 267c4f3..21f353e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] -No notable changes. +### Changed +* Test against Ruby 3.2 ([#442](https://github.com/haines/pg-aws_rds_iam/pull/442)) ## [0.4.1] - 2022-07-20 diff --git a/bin/version-matrix b/bin/version-matrix index c8de17a..6659e16 100755 --- a/bin/version-matrix +++ b/bin/version-matrix @@ -11,7 +11,15 @@ end ruby_activerecord_requirements = { "2.7" => ">= 6.0", "3.0" => ">= 6.0", - "3.1" => ">= 6.0" + "3.1" => ">= 6.0", + "3.2" => ">= 6.0" +} + +ruby_pg_requirements = { + "2.7" => "> 0", + "3.0" => "> 0", + "3.1" => "> 0", + "3.2" => ">= 1.3" } activerecord_pg_requirements = { @@ -22,7 +30,12 @@ activerecord_pg_requirements = { versions = ruby_activerecord_requirements.flat_map do |ruby_version, activerecord_requirement| minor_versions("activerecord", activerecord_requirement).flat_map do |activerecord_version| - minor_versions("pg", activerecord_pg_requirements.fetch(activerecord_version)).map do |pg_version| + pg_requirement = [ + ruby_pg_requirements.fetch(ruby_version), + activerecord_pg_requirements.fetch(activerecord_version) + ].flatten + + minor_versions("pg", pg_requirement).map do |pg_version| { ruby: ruby_version, activerecord: activerecord_version, From c5a65250a3eed4da0800edf9f025b323a12bca4b Mon Sep 17 00:00:00 2001 From: Andrew Haines Date: Mon, 9 Jan 2023 12:41:55 +0000 Subject: [PATCH 2/6] Bump ruby from 3.1.2 to 3.2.0 --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index 7bde84d..a9cadc6 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.1.2 +ruby-3.2.0 From e02f586d3ad273be11e2961fbcc525b0e1790729 Mon Sep 17 00:00:00 2001 From: Andrew Haines Date: Mon, 9 Jan 2023 12:47:52 +0000 Subject: [PATCH 3/6] Bump bundler from 2.3.24 to 2.4.3 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7ca7bb6..34cda61 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -107,4 +107,4 @@ DEPENDENCIES yard BUNDLED WITH - 2.3.24 + 2.4.3 From a504aa06359880ad3366087c057dab7c6ed12393 Mon Sep 17 00:00:00 2001 From: Andrew Haines Date: Mon, 9 Jan 2023 12:55:57 +0000 Subject: [PATCH 4/6] Stop using deprecated `set-output` command in workflow --- bin/version-matrix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/version-matrix b/bin/version-matrix index 6659e16..57199f8 100755 --- a/bin/version-matrix +++ b/bin/version-matrix @@ -47,4 +47,7 @@ end matrix = { include: versions } -puts "::set-output name=matrix::#{matrix.to_json}" +puts JSON.pretty_generate(matrix) + +output_file = ENV.fetch("GITHUB_OUTPUT", false) +File.write output_file, "matrix=#{matrix.to_json}" if output_file From 3518a8f2348ee75838413766c67da54ca13e0af1 Mon Sep 17 00:00:00 2001 From: Andrew Haines Date: Tue, 10 Jan 2023 12:01:11 +0000 Subject: [PATCH 5/6] Handle empty host in URIs https://github.com/ruby/ruby/commit/dd5118f8524c425894d4716b787837ad7380bb0d --- CHANGELOG.md | 3 +++ lib/pg/aws_rds_iam/connection_info/uri.rb | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21f353e..307438a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Changed * Test against Ruby 3.2 ([#442](https://github.com/haines/pg-aws_rds_iam/pull/442)) +### Fixed +* Handle empty host in connection URIs ([#442](https://github.com/haines/pg-aws_rds_iam/pull/442)) + ## [0.4.1] - 2022-07-20 ### Fixed diff --git a/lib/pg/aws_rds_iam/connection_info/uri.rb b/lib/pg/aws_rds_iam/connection_info/uri.rb index 3f2d68c..8ed5823 100644 --- a/lib/pg/aws_rds_iam/connection_info/uri.rb +++ b/lib/pg/aws_rds_iam/connection_info/uri.rb @@ -21,7 +21,9 @@ def user end def host - @uri.host || @query["host"] + return @query["host"] if @uri.host.nil? || @uri.host.empty? + + @uri.host end def port From 60c2b054296fbc55f9960f5e773eebc9826a1a5d Mon Sep 17 00:00:00 2001 From: Andrew Haines Date: Tue, 10 Jan 2023 12:07:48 +0000 Subject: [PATCH 6/6] Fix typo in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 307438a..d939aaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Changed * Test against Ruby 3.1 ([#305](https://github.com/haines/pg-aws_rds_iam/pull/305)) -* Require Ruby ≥ 2.6 and Active Record ≥ 6.0 ([#360](https://github.com/haines/pg-aws_rds_iam/pull/360)) +* Require Ruby ≥ 2.7 and Active Record ≥ 6.0 ([#360](https://github.com/haines/pg-aws_rds_iam/pull/360)) ### Fixed * Compatibility with `pg` ≥ 1.4 ([#356](https://github.com/haines/pg-aws_rds_iam/pull/356))