danbooru_default_config.rb: remove unused config params.
This commit is contained in:
@@ -6,7 +6,7 @@ class SqsService
|
|||||||
end
|
end
|
||||||
|
|
||||||
def enabled?
|
def enabled?
|
||||||
Danbooru.config.aws_sqs_enabled? && credentials.set? && url.present?
|
Danbooru.config.aws_credentials.set? && url.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_message(string, options = {})
|
def send_message(string, options = {})
|
||||||
@@ -21,17 +21,9 @@ class SqsService
|
|||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def credentials
|
|
||||||
@credentials ||= Aws::Credentials.new(
|
|
||||||
Danbooru.config.aws_access_key_id,
|
|
||||||
Danbooru.config.aws_secret_access_key
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
def sqs
|
def sqs
|
||||||
@sqs ||= Aws::SQS::Client.new(
|
@sqs ||= Aws::SQS::Client.new(
|
||||||
credentials: credentials,
|
credentials: Danbooru.config.aws_credentials,
|
||||||
region: Danbooru.config.aws_sqs_region
|
region: Danbooru.config.aws_sqs_region
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -437,7 +437,7 @@ module Danbooru
|
|||||||
|
|
||||||
def stripe_secret_key
|
def stripe_secret_key
|
||||||
end
|
end
|
||||||
|
|
||||||
def stripe_publishable_key
|
def stripe_publishable_key
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -541,20 +541,9 @@ module Danbooru
|
|||||||
end
|
end
|
||||||
|
|
||||||
# iqdbs options - see https://github.com/r888888888/iqdbs
|
# iqdbs options - see https://github.com/r888888888/iqdbs
|
||||||
def iqdbs_auth_key
|
|
||||||
end
|
|
||||||
|
|
||||||
def iqdbs_server
|
def iqdbs_server
|
||||||
end
|
end
|
||||||
|
|
||||||
# google api options
|
|
||||||
def google_api_project
|
|
||||||
end
|
|
||||||
|
|
||||||
def google_api_json_key_path
|
|
||||||
"/var/www/danbooru2/shared/config/google-key.json"
|
|
||||||
end
|
|
||||||
|
|
||||||
# AWS config options
|
# AWS config options
|
||||||
def aws_region
|
def aws_region
|
||||||
"us-east-1"
|
"us-east-1"
|
||||||
@@ -578,25 +567,6 @@ module Danbooru
|
|||||||
# {:smtp_server_name => "smtp server", :user_name => "user name", :ses_smtp_user_name => "smtp user name", :ses_smtp_password => "smtp password"}
|
# {:smtp_server_name => "smtp server", :user_name => "user name", :ses_smtp_user_name => "smtp user name", :ses_smtp_password => "smtp password"}
|
||||||
end
|
end
|
||||||
|
|
||||||
def aws_s3_enabled?
|
|
||||||
false
|
|
||||||
end
|
|
||||||
|
|
||||||
# Used for backing up images to S3. Must be changed to your own S3 bucket.
|
|
||||||
def aws_s3_bucket_name
|
|
||||||
"danbooru"
|
|
||||||
end
|
|
||||||
|
|
||||||
def aws_sqs_enabled?
|
|
||||||
false
|
|
||||||
end
|
|
||||||
|
|
||||||
def aws_sqs_reltagcalc_url
|
|
||||||
end
|
|
||||||
|
|
||||||
def aws_sqs_post_versions_url
|
|
||||||
end
|
|
||||||
|
|
||||||
def aws_sqs_region
|
def aws_sqs_region
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -621,7 +591,7 @@ module Danbooru
|
|||||||
def enable_image_cropping
|
def enable_image_cropping
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
# Akismet API key. Used for Dmail spam detection. http://akismet.com/signup/
|
# Akismet API key. Used for Dmail spam detection. http://akismet.com/signup/
|
||||||
def rakismet_key
|
def rakismet_key
|
||||||
end
|
end
|
||||||
@@ -643,9 +613,6 @@ module Danbooru
|
|||||||
def recommender_server
|
def recommender_server
|
||||||
end
|
end
|
||||||
|
|
||||||
def recommender_key
|
|
||||||
end
|
|
||||||
|
|
||||||
def redis_url
|
def redis_url
|
||||||
"redis://localhost:6379"
|
"redis://localhost:6379"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ module IqdbTestHelper
|
|||||||
Post.stubs(:iqdb_sqs_service).returns(service)
|
Post.stubs(:iqdb_sqs_service).returns(service)
|
||||||
Post.stubs(:iqdb_enabled?).returns(true)
|
Post.stubs(:iqdb_enabled?).returns(true)
|
||||||
|
|
||||||
Danbooru.config.stubs(:iqdbs_auth_key).returns("hunter2")
|
|
||||||
Danbooru.config.stubs(:iqdbs_server).returns("http://localhost:3004")
|
Danbooru.config.stubs(:iqdbs_server).returns("http://localhost:3004")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user