aws-sdk-rails 2.1.0 → 3.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 105a6ec68c6b8ca61c5d4601a3102223b2a7bd29cd643635b8f46b50c0b918a4
4
- data.tar.gz: ef976f4a27a8542e5a264f2baad36a914ad2918068461b083a166a5ab8590f39
3
+ metadata.gz: 65b9f52f5df1206d26fba5177b30724fb5f0aa66d7888966f533b42dfbba3187
4
+ data.tar.gz: 215f61a38c9be614103f56c71f83593e6844b2edd266c16b277a2f5e8d56b01e
5
5
  SHA512:
6
- metadata.gz: 39f7819a13cfa4ec5a95d7ef85e11830224b445006f2b2f168700ac2840f4f02646cfb694316a4c973ead7c56325bd1fb9f7ac67ec8f3d61b41e38a9f7513361
7
- data.tar.gz: 6b60ca1d73b53de41c89a2c6d4acd15500240dc34514b5291de56a1ebfcb7962df9242d3576b7512724d041f5771d4fc1c792959e3449613c0e1f6a075379fa2
6
+ metadata.gz: 6f216cd5d536b69c872d1332b89bac9fb086ccfd8fe4abd276b971d7ca4ada38d166e66d91ddfd045de4d1dab429acb497d2ca599d38f5ac2b754760fbdb03fd
7
+ data.tar.gz: c36a45d9ff981b78bf0c0dfa86189522a05ff5b9a8c6b3abcc9ab95c73861d785bb81705336fb11eed3c5c58bfe79c9bb6dda9f3bfdc3a4c7cb01a22397d70f2
@@ -1,28 +1,31 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'aws/rails/mailer'
2
4
 
3
5
  module Aws
6
+ # Use the Rails namespace.
4
7
  module Rails
5
-
6
8
  # @api private
7
9
  class Railtie < ::Rails::Railtie
8
- initializer "aws-sdk-rails.initialize", before: :load_config_initializers do |app|
10
+ initializer 'aws-sdk-rails.initialize',
11
+ before: :load_config_initializers do
9
12
  # Initialization Actions
13
+ Aws::Rails.use_rails_encrypted_credentials
10
14
  Aws::Rails.add_action_mailer_delivery_method
11
15
  Aws::Rails.log_to_rails_logger
12
16
  end
13
17
  end
14
18
 
15
- # This is called automatically from the SDK's Railtie, but if you want to
16
- # manually specify options for building the Aws::SES::Client object, you
17
- # can manually call this method.
19
+ # This is called automatically from the SDK's Railtie, but can be manually
20
+ # called if you want to specify options for building the Aws::SES::Client.
18
21
  #
19
22
  # @param [Symbol] name The name of the ActionMailer delivery method to
20
23
  # register.
21
24
  # @param [Hash] options The options you wish to pass on to the
22
25
  # Aws::SES::Client initialization method.
23
- def self.add_action_mailer_delivery_method(name = :aws_sdk, options = {})
26
+ def self.add_action_mailer_delivery_method(name = :ses, options = {})
24
27
  ActiveSupport.on_load(:action_mailer) do
25
- self.add_delivery_method(name, Aws::Rails::Mailer, options)
28
+ add_delivery_method(name, Aws::Rails::Mailer, options)
26
29
  end
27
30
  end
28
31
 
@@ -32,6 +35,9 @@ module Aws
32
35
  nil
33
36
  end
34
37
 
38
+ # Configures the AWS SDK with credentials from Rails encrypted credentials.
39
+ def self.use_rails_encrypted_credentials
40
+ Aws.config.merge!(::Rails.application.try(:credentials).try(:aws).to_h)
41
+ end
35
42
  end
36
43
  end
37
-
@@ -1,21 +1,21 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'aws-sdk-ses'
2
4
 
3
5
  module Aws
4
6
  module Rails
5
-
6
7
  # Provides a delivery method for ActionMailer that uses Amazon Simple Email
7
8
  # Service.
8
- #
9
+ #
9
10
  # Once you have an SES delivery method you can configure Rails to
10
11
  # use this for ActionMailer in your environment configuration
11
12
  # (e.g. RAILS_ROOT/config/environments/production.rb)
12
13
  #
13
- # config.action_mailer.delivery_method = :aws_sdk
14
+ # config.action_mailer.delivery_method = :ses
14
15
  #
15
- # Uses the AWS SDK for Ruby V2's credential provider chain when creating an
16
- # SES client instance.
16
+ # Uses the AWS SDK for Ruby's credential provider chain when creating an SES
17
+ # client instance.
17
18
  class Mailer
18
-
19
19
  # @param [Hash] options Passes along initialization options to
20
20
  # [Aws::SES::Client.new](http://docs.aws.amazon.com/sdkforruby/api/Aws/SES/Client.html#initialize-instance_method).
21
21
  def initialize(options = {})
@@ -42,7 +42,6 @@ module Aws
42
42
  def settings
43
43
  {}
44
44
  end
45
-
46
45
  end
47
46
  end
48
47
  end
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: 2.1.0
4
+ version: 3.0.5
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: 2019-02-14 00:00:00.000000000 Z
11
+ date: 2019-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-ses
@@ -30,17 +30,32 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3'
33
+ version: 5.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '3'
41
- description: Provides helpers to integrate the AWS SDK for Ruby with Ruby on Rails.
40
+ version: 5.2.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Integrates the AWS Ruby SDK with Ruby on Rails
42
56
  email:
43
- - alexwood@amazon.com
57
+ - chejingy@amazon.com
58
+ - mamuller@amazon.com
44
59
  executables: []
45
60
  extensions: []
46
61
  extra_rdoc_files: []
@@ -49,7 +64,7 @@ files:
49
64
  - lib/aws/rails/mailer.rb
50
65
  homepage: https://github.com/aws/aws-sdk-rails
51
66
  licenses:
52
- - Apache 2.0
67
+ - Apache-2.0
53
68
  metadata: {}
54
69
  post_install_message:
55
70
  rdoc_options: []
@@ -66,9 +81,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
81
  - !ruby/object:Gem::Version
67
82
  version: '0'
68
83
  requirements: []
69
- rubyforge_project:
70
- rubygems_version: 2.7.6
84
+ rubygems_version: 3.0.3
71
85
  signing_key:
72
86
  specification_version: 4
73
- summary: AWS SDK for Ruby Rails Plugin
87
+ summary: AWS SDK for Ruby on Rails Plugin
74
88
  test_files: []