Skip to content

Commit

Permalink
Use URI::RFC2396_PARSER.regexp[:ABS_URI_REF] directly to resolve de…
Browse files Browse the repository at this point in the history
…precation warning

ruby/uri#107
ruby/uri#113
  • Loading branch information
haines committed Nov 12, 2024
1 parent 44cf717 commit d09dd26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Changed
* Test against Active Record 8.0 ([#685](https://github.com/haines/pg-aws_rds_iam/pull/685))
* Use `URI::RFC2396_PARSER.regexp[:ABS_URI_REF]` directly to resolve deprecation warning introduced in [ruby/uri#113](https://github.com/ruby/uri/pull/113) ([#685](https://github.com/haines/pg-aws_rds_iam/pull/685))

## [0.6.0] - 2024-10-30

Expand Down
9 changes: 8 additions & 1 deletion lib/pg/aws_rds_iam/connection_info/uri.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ module AWS_RDS_IAM
module ConnectionInfo
class URI
def self.match?(connection_string)
/\A#{::URI::ABS_URI_REF}\z/.match?(connection_string)
regexp =
if defined?(::URI::RFC2396_PARSER)
::URI::RFC2396_PARSER.regexp[:ABS_URI_REF]
else
::URI::ABS_URI_REF
end

/\A#{regexp}\z/.match?(connection_string)
end

attr_reader :auth_token_generator_name
Expand Down

0 comments on commit d09dd26

Please sign in to comment.