From ab27dccba5e470749bc9dc4ae7e9306c1762a6b0 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 11 Mar 2018 15:13:13 +0100 Subject: Bump version to 2.3.1rc1 --- lib/mastodon/version.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 3ba96731d..50498be1d 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -13,7 +13,7 @@ module Mastodon end def patch - 0 + 1 end def pre @@ -21,7 +21,7 @@ module Mastodon end def flags - '' + 'rc1' end def to_a -- cgit From f89ff65ec72d28723c09b71a1635b7fb66ff021a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 12 Mar 2018 12:48:49 +0100 Subject: Bump version to 2.3.1rc2 --- lib/mastodon/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 50498be1d..4241ffe32 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -21,7 +21,7 @@ module Mastodon end def flags - 'rc1' + 'rc2' end def to_a -- cgit From f5f165a5ebad5493a0d127c89b92876ffb75b0ef Mon Sep 17 00:00:00 2001 From: 艮 鮟鱇 Date: Tue, 13 Mar 2018 00:21:48 +0900 Subject: set SAFETY_ASSURED=1 of db:setup in mastodon:setup (#6758) --- lib/tasks/mastodon.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index d6c9e2d01..6ea76d738 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -302,7 +302,7 @@ namespace :mastodon do prompt.say 'Running `RAILS_ENV=production rails db:setup` ...' prompt.say "\n" - if cmd.run!({ RAILS_ENV: 'production' }, :rails, 'db:setup').failure? + if cmd.run!({ RAILS_ENV: 'production', SAFETY_ASSURED: 1 }, :rails, 'db:setup').failure? prompt.say "\n" prompt.error 'That failed! Perhaps your configuration is not right' else -- cgit From 051b649628d8039ff15f0c035c6f8fe5dbf045d6 Mon Sep 17 00:00:00 2001 From: Ushitora Anqou Date: Tue, 13 Mar 2018 05:41:26 +0900 Subject: Detailed SMTP setup (#6759) * add detailed SMTP settings setup in mastodon:setup * add localhost SMTP settings setup in mastodon:setup * SMTP settings setup should exit after successful delivery of test mail --- lib/tasks/mastodon.rake | 53 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 16 deletions(-) (limited to 'lib') diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 6ea76d738..13df76f91 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -224,24 +224,43 @@ namespace :mastodon do prompt.say "\n" loop do - env['SMTP_SERVER'] = prompt.ask('SMTP server:') do |q| - q.required true - q.default 'smtp.mailgun.org' - q.modify :strip - end + if prompt.yes?('Do you want to send e-mails from localhost?', default: false) + env['SMTP_SERVER'] = 'localhost' + env['SMTP_PORT'] = 25 + env['SMTP_AUTH_METHOD'] = 'none' + env['SMTP_OPENSSL_VERIFY_MODE'] = 'none' + else + env['SMTP_SERVER'] = prompt.ask('SMTP server:') do |q| + q.required true + q.default 'smtp.mailgun.org' + q.modify :strip + end - env['SMTP_PORT'] = prompt.ask('SMTP port:') do |q| - q.required true - q.default 587 - q.convert :int - end + env['SMTP_PORT'] = prompt.ask('SMTP port:') do |q| + q.required true + q.default 587 + q.convert :int + end - env['SMTP_LOGIN'] = prompt.ask('SMTP username:') do |q| - q.modify :strip - end + env['SMTP_LOGIN'] = prompt.ask('SMTP username:') do |q| + q.modify :strip + end - env['SMTP_PASSWORD'] = prompt.ask('SMTP password:') do |q| - q.echo false + env['SMTP_PASSWORD'] = prompt.ask('SMTP password:') do |q| + q.echo false + end + + env['SMTP_AUTH_METHOD'] = prompt.ask('SMTP authentication:') do |q| + q.required + q.default 'plain' + q.modify :strip + end + + env['SMTP_OPENSSL_VERIFY_MODE'] = prompt.ask('SMTP OpenSSL verify mode:') do |q| + q.required + q.default 'peer' + q.modify :strip + end end env['SMTP_FROM_ADDRESS'] = prompt.ask('E-mail address to send e-mails "from":') do |q| @@ -261,7 +280,8 @@ namespace :mastodon do :user_name => env['SMTP_LOGIN'].presence, :password => env['SMTP_PASSWORD'].presence, :domain => env['LOCAL_DOMAIN'], - :authentication => :plain, + :authentication => env['SMTP_AUTH_METHOD'] == 'none' ? nil : env['SMTP_AUTH_METHOD'] || :plain, + :openssl_verify_mode => env['SMTP_OPENSSL_VERIFY_MODE'], :enable_starttls_auto => true, } @@ -271,6 +291,7 @@ namespace :mastodon do mail = ActionMailer::Base.new.mail to: send_to, subject: 'Test', body: 'Mastodon SMTP configuration works!' mail.deliver + break rescue StandardError => e prompt.error 'E-mail could not be sent with this configuration, try again.' prompt.error e.message -- cgit