aws-sdk-rails 4.0.2 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/aws/rails/railtie.rb +25 -7
  4. metadata +22 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b2a36be4e26aa7999922750428f26eb04b3b8c824ed1cc6179a98c3e6484f8d
4
- data.tar.gz: 4de349a64752e7e61edf461c84d80a474035579aba144ef1eef13f16607e819c
3
+ metadata.gz: '0487e57cf5abffd700526851a6ce35f6fb96c9a62e8c330de841870b528ac419'
4
+ data.tar.gz: 6e5cd63585548d8b169fc61b88a1607ca2fce692c74882de7ef3b13d19cb8ef9
5
5
  SHA512:
6
- metadata.gz: 6a70a8509e17d875ca696518d52cfca863bdecbef8ee231884ad5508c9e0c018ce01e8867957a468438890d5e37176d78ac8a0213fc914644788cf4490e523ac
7
- data.tar.gz: 8097f4409f61dc35f5ade004a26231daf0b957b6223c50cfed5c610287da8bff757eb9b73a8d09e916900d1870eee038367d267a23545ed0c05f88c84bd724c3
6
+ metadata.gz: 657a57cd07e3614de0ca6707e35209cb3acdd5d69960762f345e179552a91eb78699429bd369b10a88817f631c7f61a1f30a6cfda2f68adf66d844eee8092878
7
+ data.tar.gz: 28322c2ad4dad967ba39ea6f58050725a7db23a6cb9898386058f111eba43cdff9be2acb9c899fa9613f703410755332938d9f0dbcce653176088d786ec9e49f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.0.2
1
+ 4.1.0
@@ -9,7 +9,7 @@ module Aws
9
9
  before: :load_config_initializers do
10
10
  # Initialization Actions
11
11
  Aws::Rails.use_rails_encrypted_credentials
12
- Aws::Rails.add_action_mailer_delivery_method(:ses)
12
+ Aws::Rails.add_action_mailer_delivery_method
13
13
  Aws::Rails.add_action_mailer_delivery_method(:sesv2)
14
14
  Aws::Rails.log_to_rails_logger
15
15
  end
@@ -18,6 +18,23 @@ module Aws
18
18
  Aws::Rails.add_sqsd_middleware(app)
19
19
  end
20
20
 
21
+ initializer 'aws-sdk-rails.sdk_eager_load' do
22
+ config.before_eager_load do
23
+ config.eager_load_namespaces << Aws
24
+ end
25
+
26
+ Aws.define_singleton_method(:eager_load!) do
27
+ Aws.constants.each do |c|
28
+ m = Aws.const_get(c)
29
+ next unless m.is_a?(Module)
30
+
31
+ m.constants.each do |constant|
32
+ m.const_get(constant)
33
+ end
34
+ end
35
+ end
36
+ end
37
+
21
38
  rake_tasks do
22
39
  load 'tasks/dynamo_db/session_store.rake'
23
40
  load 'tasks/aws_record/migrate.rake'
@@ -32,15 +49,14 @@ module Aws
32
49
  # register, either :ses or :sesv2.
33
50
  # @param [Hash] client_options The options you wish to pass on to the
34
51
  # Aws::SES[V2]::Client initialization method.
35
- def self.add_action_mailer_delivery_method(name, client_options = {})
52
+ def self.add_action_mailer_delivery_method(name = :ses, client_options = {})
53
+ # TODO: on the next major version, add a "mailer" param to this method
54
+ # and use it to determine which mailer to use, keeping name free-form.
36
55
  ActiveSupport.on_load(:action_mailer) do
37
- case name
38
- when :ses
39
- add_delivery_method(name, Aws::Rails::SesMailer, client_options)
40
- when :sesv2
56
+ if name == :sesv2
41
57
  add_delivery_method(name, Aws::Rails::Sesv2Mailer, client_options)
42
58
  else
43
- raise ArgumentError, "Unknown action mailer delivery method: #{name}"
59
+ add_delivery_method(name, Aws::Rails::SesMailer, client_options)
44
60
  end
45
61
  end
46
62
  end
@@ -67,6 +83,8 @@ module Aws
67
83
  # name of: put_object.S3.aws
68
84
  def self.instrument_sdk_operations
69
85
  Aws.constants.each do |c|
86
+ next if Aws.autoload?(c)
87
+
70
88
  m = Aws.const_get(c)
71
89
  if m.is_a?(Module) && m.const_defined?(:Client) &&
72
90
  m.const_get(:Client).superclass == Seahorse::Client::Base
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-22 00:00:00.000000000 Z
11
+ date: 2024-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-record
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: aws-sessionstore-dynamodb
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: aws-sdk-s3
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -139,23 +153,12 @@ dependencies:
139
153
  - !ruby/object:Gem::Version
140
154
  version: 7.0.0
141
155
  - !ruby/object:Gem::Dependency
142
- name: aws-sessionstore-dynamodb
156
+ name: concurrent-ruby
143
157
  requirement: !ruby/object:Gem::Requirement
144
158
  requirements:
145
159
  - - "~>"
146
160
  - !ruby/object:Gem::Version
147
- version: '2'
148
- type: :runtime
149
- prerelease: false
150
- version_requirements: !ruby/object:Gem::Requirement
151
- requirements:
152
- - - "~>"
153
- - !ruby/object:Gem::Version
154
- version: '2'
155
- - !ruby/object:Gem::Dependency
156
- name: concurrent-ruby
157
- requirement: !ruby/object:Gem::Requirement
158
- requirements:
161
+ version: '1.3'
159
162
  - - ">="
160
163
  - !ruby/object:Gem::Version
161
164
  version: 1.3.1
@@ -163,6 +166,9 @@ dependencies:
163
166
  prerelease: false
164
167
  version_requirements: !ruby/object:Gem::Requirement
165
168
  requirements:
169
+ - - "~>"
170
+ - !ruby/object:Gem::Version
171
+ version: '1.3'
166
172
  - - ">="
167
173
  - !ruby/object:Gem::Version
168
174
  version: 1.3.1
@@ -248,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
254
  - !ruby/object:Gem::Version
249
255
  version: '0'
250
256
  requirements: []
251
- rubygems_version: 3.5.11
257
+ rubygems_version: 3.5.9
252
258
  signing_key:
253
259
  specification_version: 4
254
260
  summary: AWS SDK for Ruby on Rails Plugin