Skip to content

Commit

Permalink
replace envkey with credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmeurer committed Oct 9, 2024
1 parent 7234afb commit e469179
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 10 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ gem "baseline", github: "manuelmeurer/baseline"
gem "bootsnap", "~> 1.17", require: false
gem "bootstrap", "~> 5.3"
gem "dartsass-rails", "~> 0.5"
gem "envkey", "~> 2.0"
gem "friendly_id", "~> 5.5"
gem "haml", "~> 6.0"
gem "importmap-rails", "~> 2.0"
Expand Down
2 changes: 0 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ GEM
date (3.3.4)
debug_inspector (1.2.0)
drb (2.2.1)
envkey (2.4.2)
erubi (1.13.0)
execjs (2.9.1)
friendly_id (5.5.1)
Expand Down Expand Up @@ -335,7 +334,6 @@ DEPENDENCIES
bootsnap (~> 1.17)
bootstrap (~> 5.3)
dartsass-rails (~> 0.5)
envkey (~> 2.0)
friendly_id (~> 5.5)
haml (~> 6.0)
importmap-rails (~> 2.0)
Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Application < Rails::Application

Rails.application.routes.default_url_options =
config.action_mailer.default_url_options = {
host: ENV.fetch("HOST"),
host: Rails.application.env_credentials.host!,
protocol: "https"
}

Expand Down
1 change: 1 addition & 0 deletions config/credentials.yml.enc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2t4Ii8wPGfGq9G5WkbpnkethM+aAQi3xiKXq5zvdeJnaWlytHbhmOhBTjrg+IHOGOPlQ4Rdw2ChQg8+2P4FDuYpYjWjAgSwP7pdWDlKP0xDl+2OtZ/c1KFDrHSxaBdkHDIQqRjn7OS6LJdnt/dBbF7GiKbD6zisQob/4KmvPqQmpzdsT4wjxgFiEPmFnXb50R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43g9ZcTZpJ9X3fCBGscYVw+15RZvF96EfKAebEXmBdGgeK4RRt8/zH/WrBsJWl9Mq8yfX4zyODbSO/k1JxqX4hO7d3EqLU/wM4ONfdqZzBdZJTxWI/ZLMb0nEACjQKyrJ8xzwgx6q2kJbj902w==--VTHXaEU8Dpb5XFGR--tROw7PCE8/FH3bDcj3iLug==
2 changes: 1 addition & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@
# Raise error when a before_action's only/except options reference missing actions
config.action_controller.raise_on_missing_callback_actions = true

config.hosts << /([a-z]+\.)?#{ENV.fetch "HOST"}/
config.hosts << /([a-z]+\.)?#{Rails.application.env_credentials.host!}/
end
2 changes: 1 addition & 1 deletion config/initializers/postmark.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require "postmark"

Postmark.api_token = ENV["POSTMARK_API_TOKEN"]
Postmark.api_token = Rails.application.env_credentials.postmark_api_token
8 changes: 4 additions & 4 deletions config/storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ test:

cloudflare:
service: S3
access_key_id: <%= ENV["CLOUDFLARE_R2_ACCESS_KEY_ID"] %>
secret_access_key: <%= ENV["CLOUDFLARE_R2_SECRET_ACCESS_KEY"] %>
endpoint: https://<%= ENV["CLOUDFLARE_ACCOUNT_ID"] %>.r2.cloudflarestorage.com
bucket: rubydocs
access_key_id: <%= Rails.application.env_credentials.cloudflare.r2.access_key_id! %>
secret_access_key: <%= Rails.application.env_credentials.cloudflare.r2.secret_access_key! %>
endpoint: https://<%= Rails.application.env_credentials.cloudflare.account_id! %>.r2.cloudflarestorage.com
bucket: <%= Rails.application.env_credentials.cloudflare.r2.bucket %>
region: auto
force_path_style: true

0 comments on commit e469179

Please sign in to comment.