* refactor aws config options

* fix aws calls in savedsearch
* remove unused scripts
This commit is contained in:
r888888888
2015-12-28 12:25:38 -08:00
parent 811a60bb9d
commit d5fa4b46e3
9 changed files with 108 additions and 139 deletions

View File

@@ -295,15 +295,6 @@ module Danbooru
nil
end
def amazon_ses
# {:smtp_server_name => "smtp server", :user_name => "user name", :ses_smtp_user_name => "smtp user name", :ses_smtp_password => "smtp password"}
nil
end
def amazon_s3_bucket_name
"danbooru"
end
def enable_dimension_autotagging
true
end
@@ -396,10 +387,51 @@ module Danbooru
def addthis_key
end
# listbooru options
def listbooru_enabled?
false
end
def listbooru_server
end
def listbooru_auth_key
end
# AWS config options
def aws_access_key_id
nil
end
def aws_secret_access_key
nil
end
def aws_ses_enabled?
false
end
def aws_ses_options
# {:smtp_server_name => "smtp server", :user_name => "user name", :ses_smtp_user_name => "smtp user name", :ses_smtp_password => "smtp password"}
nil
end
def aws_s3_enabled?
false
end
def aws_s3_bucket_name
"danbooru"
end
def aws_sqs_enabled?
false
end
def aws_sqs_queue_url
end
def aws_sqs_region
end
end
end

View File

@@ -1,8 +1,8 @@
if Danbooru.config.amazon_ses && Rails.env == "production"
if Danbooru.config.aws_ses_enabled? && Rails.env == "production"
Rails.application.config.action_mailer.smtp_settings = {
:address => Danbooru.config.amazon_ses[:smtp_server_name],
:user_name => Danbooru.config.amazon_ses[:ses_smtp_user_name],
:password => Danbooru.config.amazon_ses[:ses_smtp_password],
:address => Danbooru.config.aws_ses_options[:smtp_server_name],
:user_name => Danbooru.config.aws_ses_options[:ses_smtp_user_name],
:password => Danbooru.config.aws_ses_options[:ses_smtp_password],
:authentication => :login,
:enable_starttls_auto => true
}