File tree 6 files changed +17
-25
lines changed
6 files changed +17
-25
lines changed Original file line number Diff line number Diff line change @@ -103,8 +103,7 @@ gem 'rollbar'
103
103
gem 'devise'
104
104
105
105
# aws
106
- gem 'aws-sdk'
107
- gem 'aws-sdk-v1'
106
+ gem 'aws-sdk-rails'
108
107
109
108
# unicorn
110
109
gem 'unicorn'
Original file line number Diff line number Diff line change 70
70
ast (2.3.0 )
71
71
autoprefixer-rails (7.1.1 )
72
72
execjs
73
- aws-sdk (2.9.29 )
74
- aws-sdk-resources (= 2.9.29 )
75
- aws-sdk-core (2.9.29 )
73
+ aws-sdk-core (2.10.9 )
76
74
aws-sigv4 (~> 1.0 )
77
75
jmespath (~> 1.0 )
78
- aws-sdk-resources ( 2.9.29 )
79
- aws-sdk-core ( = 2.9.29 )
80
- aws-sdk-v1 ( 1.67.0 )
81
- json ( ~> 1.4 )
82
- nokogiri ( ~> 1 )
76
+ aws-sdk-rails ( 1.0.1 )
77
+ aws-sdk-resources ( ~> 2 )
78
+ railties ( >= 3 )
79
+ aws-sdk-resources ( 2.10.9 )
80
+ aws-sdk-core ( = 2.10.9 )
83
81
aws-sigv4 (1.0.0 )
84
82
bcrypt (3.1.11 )
85
83
binding_of_caller (0.7.2 )
357
355
method_source (0.8.2 )
358
356
mime-types (2.99.3 )
359
357
mini_magick (4.7.0 )
360
- mini_portile2 (2.1 .0 )
358
+ mini_portile2 (2.2 .0 )
361
359
minitest (5.10.2 )
362
360
multi_json (1.12.1 )
363
361
multi_xml (0.6.0 )
369
367
net-ssh (4.1.0 )
370
368
netrc (0.11.0 )
371
369
nio4r (2.1.0 )
372
- nokogiri (1.7.2 )
373
- mini_portile2 (~> 2.1 .0 )
370
+ nokogiri (1.8.0 )
371
+ mini_portile2 (~> 2.2 .0 )
374
372
oauth2 (1.3.1 )
375
373
faraday (>= 0.8 , < 0.12 )
376
374
jwt (~> 1.0 )
@@ -612,8 +610,7 @@ DEPENDENCIES
612
610
acts_as_list
613
611
annotate
614
612
asset_sync
615
- aws-sdk
616
- aws-sdk-v1
613
+ aws-sdk-rails
617
614
bootstrap-sass
618
615
byebug
619
616
capistrano-rails
Original file line number Diff line number Diff line change 1
1
class BaseNotifier < ApplicationMailer
2
2
def notify
3
- mail ( to : 'test @5fpro.com' , subject : format_subject ( 'Hello!' ) )
3
+ mail ( to : 'hi @5fpro.com' , subject : format_subject ( 'Hello!' ) )
4
4
end
5
5
6
6
protected
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class Application < Rails::Application
24
24
# Application configuration should go into files in config/initializers
25
25
# -- all .rb files in that directory are automatically loaded.
26
26
27
- config . action_mailer . delivery_method = :amazon_ses
27
+ config . action_mailer . delivery_method = :aws_sdk
28
28
29
29
# Disable some file generators
30
30
config . generators . stylesheets = false
Original file line number Diff line number Diff line change 5
5
forward_agent : true
6
6
}
7
7
8
- require 'aws-sdk-v1'
9
- require 'aws-sdk'
10
- aws_conf = YAML . load ( IO . read ( './config/application.yml' ) ) [ 'development' ] [ 'aws' ] . symbolize_keys
11
- AWS . config ( aws_conf )
12
- lb_name = 'lb.5fpro.com' # Config@initial
13
- servers = AWS ::ELB . new . load_balancers [ lb_name ] . instances . map ( &:ip_address )
8
+ servers = [ '127.0.0.1' ]
14
9
15
10
shadow_server = 'myapp.5fpro.com'
16
11
role :app , servers
Original file line number Diff line number Diff line change 1
- # aws ses: https://github.com/aws/aws-sdk-ruby/
2
- AWS . config ( Setting . aws )
1
+ creds = Aws ::Credentials . new ( Setting . aws . access_key_id , Setting . aws . secret_access_key )
2
+ Aws ::Rails . add_action_mailer_delivery_method ( :aws_sdk , credentials : creds , region : 'us-east-1' )
3
+
3
4
ActionMailer ::Base . default_url_options = { host : Setting . host , protocol : Setting . default_protocol }
4
5
ActionMailer ::Base . asset_host = "#{ Setting . default_protocol } ://#{ Setting . carrierwave . host } "
You can’t perform that action at this time.
0 commit comments