pg-aws_rds_iam 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ca0b85c869fa1f5ccac0bada663bd2f532e5566359aea7d42a1f3c922e7dec4
4
- data.tar.gz: ed10f2e843a9b2fee3c09588be471e8936b1ce59059065e6648a62549b6dc6b4
3
+ metadata.gz: 7894b340911ed1dd4bf4ade1a3a93830f34a353107036f0bf974b098b332ad04
4
+ data.tar.gz: 7387170d637e6f5a57cb4e39146c03496595d7fd2bc785eae4dacd1dc7978a90
5
5
  SHA512:
6
- metadata.gz: 4e8373d5955858e81ca374910698e089992f50259cb3ed8b504b51c8e78a7548fd30928b181e7dc435505d24f3cce6a38577f43fee1de7809f5a256cde570bc4
7
- data.tar.gz: e93b304b942f78d74f63e3e122e53d9a464148e0d033f03903e3f39f35da06b64a56bd159f782859911c7b3b5be3c3e5ecd2311cc98f16a77009b639d04cc0bc
6
+ metadata.gz: 7ed4c84823ac809c74ac63358df8a31aebaa8ba09572cd8a8343a47c41768f5bb226b6ce99fb8ec052e90c37575e296538680ba1a3ab03bb4d100120fc0e044d
7
+ data.tar.gz: 1575d6f6e008a311edd01fb62cd9d3bf4615a14b41d0ed2f5163812999661180da5010252cf8013c82abcfc46c4d680d6dc995a21e8c02d3164949f929887b14
@@ -17,7 +17,7 @@ jobs:
17
17
  run: apk add git
18
18
 
19
19
  - name: Check out source code
20
- uses: actions/checkout@v2
20
+ uses: actions/checkout@v3
21
21
 
22
22
  - name: Install Bundler
23
23
  run: bin/install-bundler
@@ -40,7 +40,7 @@ jobs:
40
40
  run: test -n "${{ secrets.AVAILABLE }}"
41
41
 
42
42
  - name: Check out source code
43
- uses: actions/checkout@v2
43
+ uses: actions/checkout@v3
44
44
 
45
45
  - name: Generate version matrix
46
46
  id: version-matrix
@@ -69,7 +69,7 @@ jobs:
69
69
  run: apk add build-base git postgresql-dev tar
70
70
 
71
71
  - name: Check out source code
72
- uses: actions/checkout@v2
72
+ uses: actions/checkout@v3
73
73
 
74
74
  - name: Install Bundler
75
75
  run: bin/install-bundler
@@ -89,7 +89,7 @@ jobs:
89
89
  "${postgresql_version}"
90
90
 
91
91
  - name: Cache gems
92
- uses: actions/cache@v2
92
+ uses: actions/cache@v3
93
93
  with:
94
94
  key: ${{ steps.cache-key.outputs.cache-key }}-gems-${{ hashFiles('Gemfile.lock') }}
95
95
  path: vendor/bundle
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ require:
3
3
  - rubocop-rake
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 2.6
6
+ TargetRubyVersion: 2.7
7
7
  NewCops: enable
8
8
  Exclude:
9
9
  - bin/bundle
@@ -26,6 +26,9 @@ Minitest/MultipleAssertions:
26
26
  Naming/ClassAndModuleCamelCase:
27
27
  Enabled: false
28
28
 
29
+ Naming/VariableNumber:
30
+ EnforcedStyle: snake_case
31
+
29
32
  Style/Documentation:
30
33
  Exclude:
31
34
  - lib/pg/aws_rds_iam/auth_token_injector.rb
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-3.0.2
1
+ ruby-3.1.2
data/CHANGELOG.md CHANGED
@@ -8,6 +8,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8
8
 
9
9
  No notable changes.
10
10
 
11
+ ## [0.4.0] - 2022-06-22
12
+
13
+ ### Changed
14
+ * Test against Ruby 3.1 ([#305](https://github.com/haines/pg-aws_rds_iam/pull/305))
15
+ * Require Ruby ≥ 2.6 and Active Record ≥ 6.0 ([#360](https://github.com/haines/pg-aws_rds_iam/pull/360))
16
+
17
+ ### Fixed
18
+ * Compatibility with `pg` ≥ 1.4 ([#356](https://github.com/haines/pg-aws_rds_iam/pull/356))
19
+
11
20
  ## [0.3.2] - 2021-11-15
12
21
 
13
22
  ### Changed
@@ -43,7 +52,8 @@ No notable changes.
43
52
  * A plugin for the [`pg` gem](https://rubygems.org/gems/pg) that adds support for [IAM authentication](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html) when connecting to PostgreSQL databases hosted in Amazon RDS. ([#1](https://github.com/haines/pg-aws_rds_iam/pull/1))
44
53
  * ActiveRecord support. ([#3](https://github.com/haines/pg-aws_rds_iam/pull/3))
45
54
 
46
- [Unreleased]: https://github.com/haines/pg-aws_rds_iam/compare/v0.3.2...HEAD
55
+ [Unreleased]: https://github.com/haines/pg-aws_rds_iam/compare/v0.4.0...HEAD
56
+ [0.4.0]: https://github.com/haines/pg-aws_rds_iam/compare/v0.3.2...v0.4.0
47
57
  [0.3.2]: https://github.com/haines/pg-aws_rds_iam/compare/v0.3.1...v0.3.2
48
58
  [0.3.1]: https://github.com/haines/pg-aws_rds_iam/compare/v0.3.0...v0.3.1
49
59
  [0.3.0]: https://github.com/haines/pg-aws_rds_iam/compare/v0.2.0...v0.3.0
data/Gemfile CHANGED
@@ -14,8 +14,8 @@ gem "rubocop"
14
14
  gem "rubocop-minitest"
15
15
  gem "rubocop-rake"
16
16
  gem "timecop"
17
- gem "yard", github: "lsegal/yard"
17
+ gem "yard"
18
18
 
19
19
  ["activerecord", "pg"].each do |gem_name|
20
- gem gem_name, *ENV["#{gem_name.upcase}_VERSION"]&.yield_self { |gem_version| "~> #{gem_version}.0" }
20
+ gem gem_name, *ENV["#{gem_name.upcase}_VERSION"]&.then { |gem_version| "~> #{gem_version}.0" }
21
21
  end
data/Gemfile.lock CHANGED
@@ -1,95 +1,88 @@
1
- GIT
2
- remote: https://github.com/lsegal/yard.git
3
- revision: 9865620413d3519b561d87479e44f1b4fe782904
4
- specs:
5
- yard (0.9.26)
6
- webrick (~> 1.7.0)
7
-
8
1
  PATH
9
2
  remote: .
10
3
  specs:
11
- pg-aws_rds_iam (0.3.2)
4
+ pg-aws_rds_iam (0.4.0)
12
5
  aws-sdk-rds (~> 1.0)
13
6
  pg (>= 0.18, < 2.0)
14
7
 
15
8
  GEM
16
9
  remote: https://rubygems.org/
17
10
  specs:
18
- activemodel (6.1.3)
19
- activesupport (= 6.1.3)
20
- activerecord (6.1.3)
21
- activemodel (= 6.1.3)
22
- activesupport (= 6.1.3)
23
- activesupport (6.1.3)
11
+ activemodel (7.0.3)
12
+ activesupport (= 7.0.3)
13
+ activerecord (7.0.3)
14
+ activemodel (= 7.0.3)
15
+ activesupport (= 7.0.3)
16
+ activesupport (7.0.3)
24
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
25
18
  i18n (>= 1.6, < 2)
26
19
  minitest (>= 5.1)
27
20
  tzinfo (~> 2.0)
28
- zeitwerk (~> 2.3)
29
21
  ansi (1.5.0)
30
22
  ast (2.4.2)
31
23
  aws-eventstream (1.2.0)
32
- aws-partitions (1.530.0)
33
- aws-sdk-core (3.122.1)
24
+ aws-partitions (1.600.0)
25
+ aws-sdk-core (3.131.2)
34
26
  aws-eventstream (~> 1, >= 1.0.2)
35
27
  aws-partitions (~> 1, >= 1.525.0)
36
28
  aws-sigv4 (~> 1.1)
37
- jmespath (~> 1.0)
38
- aws-sdk-ec2 (1.281.0)
39
- aws-sdk-core (~> 3, >= 3.122.0)
29
+ jmespath (~> 1, >= 1.6.1)
30
+ aws-sdk-ec2 (1.319.0)
31
+ aws-sdk-core (~> 3, >= 3.127.0)
40
32
  aws-sigv4 (~> 1.1)
41
- aws-sdk-rds (1.130.0)
42
- aws-sdk-core (~> 3, >= 3.122.0)
33
+ aws-sdk-rds (1.146.0)
34
+ aws-sdk-core (~> 3, >= 3.127.0)
43
35
  aws-sigv4 (~> 1.1)
44
- aws-sigv4 (1.4.0)
36
+ aws-sigv4 (1.5.0)
45
37
  aws-eventstream (~> 1, >= 1.0.2)
46
38
  builder (3.2.4)
47
39
  coderay (1.1.3)
48
- commonmarker (0.23.2)
49
- concurrent-ruby (1.1.8)
50
- i18n (1.8.9)
40
+ commonmarker (0.23.5)
41
+ concurrent-ruby (1.1.10)
42
+ i18n (1.10.0)
51
43
  concurrent-ruby (~> 1.0)
52
- jmespath (1.4.0)
44
+ jmespath (1.6.1)
53
45
  method_source (1.0.0)
54
- minitest (5.14.4)
55
- minitest-reporters (1.4.3)
46
+ minitest (5.16.1)
47
+ minitest-reporters (1.5.0)
56
48
  ansi
57
49
  builder
58
50
  minitest (>= 5.0)
59
51
  ruby-progressbar
60
- parallel (1.21.0)
61
- parser (3.0.2.0)
52
+ parallel (1.22.1)
53
+ parser (3.1.2.0)
62
54
  ast (~> 2.4.1)
63
- pg (1.2.3)
55
+ pg (1.4.0)
64
56
  pry (0.14.1)
65
57
  coderay (~> 1.1)
66
58
  method_source (~> 1.0)
67
- rainbow (3.0.0)
59
+ rainbow (3.1.1)
68
60
  rake (13.0.6)
69
- regexp_parser (2.1.1)
61
+ regexp_parser (2.5.0)
70
62
  rexml (3.2.5)
71
- rubocop (1.23.0)
63
+ rubocop (1.30.1)
72
64
  parallel (~> 1.10)
73
- parser (>= 3.0.0.0)
65
+ parser (>= 3.1.0.0)
74
66
  rainbow (>= 2.2.2, < 4.0)
75
67
  regexp_parser (>= 1.8, < 3.0)
76
- rexml
77
- rubocop-ast (>= 1.12.0, < 2.0)
68
+ rexml (>= 3.2.5, < 4.0)
69
+ rubocop-ast (>= 1.18.0, < 2.0)
78
70
  ruby-progressbar (~> 1.7)
79
71
  unicode-display_width (>= 1.4.0, < 3.0)
80
- rubocop-ast (1.13.0)
81
- parser (>= 3.0.1.1)
82
- rubocop-minitest (0.16.0)
72
+ rubocop-ast (1.18.0)
73
+ parser (>= 3.1.1.0)
74
+ rubocop-minitest (0.20.1)
83
75
  rubocop (>= 0.90, < 2.0)
84
76
  rubocop-rake (0.6.0)
85
77
  rubocop (~> 1.0)
86
78
  ruby-progressbar (1.11.0)
87
- timecop (0.9.4)
79
+ timecop (0.9.5)
88
80
  tzinfo (2.0.4)
89
81
  concurrent-ruby (~> 1.0)
90
82
  unicode-display_width (2.1.0)
91
83
  webrick (1.7.0)
92
- zeitwerk (2.4.2)
84
+ yard (0.9.28)
85
+ webrick (~> 1.7.0)
93
86
 
94
87
  PLATFORMS
95
88
  ruby
@@ -109,7 +102,7 @@ DEPENDENCIES
109
102
  rubocop-minitest
110
103
  rubocop-rake
111
104
  timecop
112
- yard!
105
+ yard
113
106
 
114
107
  BUNDLED WITH
115
- 2.2.21
108
+ 2.3.16
data/bin/version-matrix CHANGED
@@ -9,15 +9,15 @@ def minor_versions(name, requirement)
9
9
  end
10
10
 
11
11
  ruby_activerecord_requirements = {
12
- "2.6" => ">= 5.2",
13
- "2.7" => ">= 5.2",
14
- "3.0" => ">= 6.0"
12
+ "2.7" => ">= 6.0",
13
+ "3.0" => ">= 6.0",
14
+ "3.1" => ">= 6.0"
15
15
  }
16
16
 
17
17
  activerecord_pg_requirements = {
18
- "5.2" => [">= 0.18", "< 2.0"],
19
18
  "6.0" => [">= 0.18", "< 2.0"],
20
- "6.1" => "~> 1.1"
19
+ "6.1" => "~> 1.1",
20
+ "7.0" => "~> 1.1"
21
21
  }
22
22
 
23
23
  versions = ruby_activerecord_requirements.flat_map do |ruby_version, activerecord_requirement|
@@ -4,7 +4,25 @@ module PG
4
4
  module AWS_RDS_IAM
5
5
  module Connection
6
6
  def conndefaults
7
- super + [{
7
+ super + [conndefault_aws_rds_iam_auth_token_generator]
8
+ end
9
+
10
+ def conninfo_parse(connection_string)
11
+ connection_info = ConnectionInfo.new(connection_string)
12
+
13
+ super(connection_info.to_s).tap do |result|
14
+ result << conndefault_aws_rds_iam_auth_token_generator.merge(val: connection_info.auth_token_generator_name) if connection_info.auth_token_generator_name
15
+ end
16
+ end
17
+
18
+ def parse_connect_args(*args)
19
+ AuthTokenInjector.call(super)
20
+ end
21
+
22
+ private
23
+
24
+ def conndefault_aws_rds_iam_auth_token_generator
25
+ {
8
26
  keyword: "aws_rds_iam_auth_token_generator",
9
27
  envvar: nil,
10
28
  compiled: nil,
@@ -12,11 +30,7 @@ module PG
12
30
  label: "AWS-RDS-IAM-auth-token-generator",
13
31
  dispchar: "",
14
32
  dispsize: 64
15
- }]
16
- end
17
-
18
- def parse_connect_args(*)
19
- AuthTokenInjector.call(super)
33
+ }
20
34
  end
21
35
  end
22
36
 
@@ -12,7 +12,7 @@ module PG
12
12
 
13
13
  def initialize(connection_string)
14
14
  @uri = ::URI.parse(connection_string)
15
- @query = ::URI.decode_www_form(@uri.query).to_h
15
+ @query = @uri.query ? ::URI.decode_www_form(@uri.query).to_h : {}
16
16
  @auth_token_generator_name = @query.delete("aws_rds_iam_auth_token_generator")
17
17
  end
18
18
 
@@ -3,6 +3,6 @@
3
3
  module PG
4
4
  module AWS_RDS_IAM
5
5
  # The current version of the gem.
6
- VERSION = "0.3.2"
6
+ VERSION = "0.4.0"
7
7
  end
8
8
  end
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.require_paths = ["lib"]
29
29
 
30
- spec.required_ruby_version = ">= 2.6"
30
+ spec.required_ruby_version = ">= 2.7"
31
31
 
32
32
  spec.add_dependency "aws-sdk-rds", "~> 1.0"
33
33
  spec.add_dependency "pg", ">= 0.18", "< 2.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg-aws_rds_iam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Haines
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-15 00:00:00.000000000 Z
11
+ date: 2022-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-rds
@@ -90,7 +90,7 @@ licenses:
90
90
  metadata:
91
91
  bug_tracker_uri: https://github.com/haines/pg-aws_rds_iam/issues
92
92
  changelog_uri: https://github.com/haines/pg-aws_rds_iam/blob/main/CHANGELOG.md
93
- documentation_uri: https://rubydoc.info/gems/pg-aws_rds_iam/0.3.2
93
+ documentation_uri: https://rubydoc.info/gems/pg-aws_rds_iam/0.4.0
94
94
  homepage_uri: https://github.com/haines/pg-aws_rds_iam
95
95
  source_code_uri: https://github.com/haines/pg-aws_rds_iam
96
96
  rubygems_mfa_required: 'true'
@@ -102,14 +102,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - ">="
104
104
  - !ruby/object:Gem::Version
105
- version: '2.6'
105
+ version: '2.7'
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 3.2.31
112
+ rubygems_version: 3.3.16
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: IAM authentication for PostgreSQL on Amazon RDS