Skip to content

Commit

Permalink
Merge pull request #442 from haines/ruby-3.2
Browse files Browse the repository at this point in the history
Update Ruby and Bundler
  • Loading branch information
haines authored Jan 10, 2023
2 parents 6c7d594 + 60c2b05 commit e18745d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-3.1.2
ruby-3.2.0
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ 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))

### Fixed
* Handle empty host in connection URIs ([#442](https://github.com/haines/pg-aws_rds_iam/pull/442))

## [0.4.1] - 2022-07-20

Expand All @@ -17,7 +21,7 @@ No notable changes.

### 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))
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ DEPENDENCIES
yard

BUNDLED WITH
2.3.24
2.4.3
22 changes: 19 additions & 3 deletions bin/version-matrix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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,
Expand All @@ -34,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
4 changes: 3 additions & 1 deletion lib/pg/aws_rds_iam/connection_info/uri.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e18745d

Please sign in to comment.