Skip to content

Commit

Permalink
Fix credentials -> secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
genya0407 committed Dec 17, 2023
1 parent 4fd3a3b commit 84326ba
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/mailers/application_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ApplicationMailer < ActionMailer::Base
default from: "noreply@#{Rails.application.credentials.domain}"
default from: "noreply@#{Rails.application.secrets.domain}"
layout 'mailer'
end
2 changes: 1 addition & 1 deletion app/mailers/notify_lack_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def lack_exist_email(cars)
else
'乗車記録に欠落があります'
end
mail(to: Rails.application.credentials.mailing_list_address,
mail(to: Rails.application.secrets.mailing_list_address,
subject:)
end
end
6 changes: 3 additions & 3 deletions app/views/user_mailer/activation_needed_email.text.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Welcome to <%= Rails.application.credentials.site_domain %>, <%= @user.name %>
Welcome to <%= Rails.application.secrets.site_domain %>, <%= @user.name %>
===============================================

You have successfully signed up to <%= Rails.application.credentials.site_domain %>.
You have successfully signed up to <%= Rails.application.secrets.site_domain %>.

To login to the site, just follow this link: <%= @url %>.

Thanks for joining and have a great day!
Thanks for joining and have a great day!
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@
config.active_record.dump_schema_after_migration = false

# custom configs
config.action_mailer.default_url_options = { host: Rails.application.credentials.site_domain, protocol: 'https' }
config.action_mailer.default_url_options = { host: Rails.application.secrets.site_domain, protocol: 'https' }
end
4 changes: 2 additions & 2 deletions config/initializers/action_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ActionMailer::Base.smtp_settings = {
user_name: 'apikey',
password: Rails.application.credentials.sendgrid_api_key,
domain: Rails.application.credentials.domain,
password: Rails.application.secrets.sendgrid_api_key,
domain: Rails.application.secrets.domain,
address: 'smtp.sendgrid.net',
port: 587,
authentication: :plain,
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/scheduler.rake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ task wake_up: :environment do
require 'net/http'
require 'uri'

url = URI.parse("https://#{Rails.application.credentials.site_domain}")
url = URI.parse("https://#{Rails.application.secrets.site_domain}")
Net::HTTP.start(url.host, url.port) { |http| http.get('/') }
end

0 comments on commit 84326ba

Please sign in to comment.