Skip to content

Commit

Permalink
Remove ENV var that including dot.
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Dec 14, 2020
1 parent c44a09d commit 69f8c09
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
32 changes: 16 additions & 16 deletions app/models/setting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def legecy_envs

# = Rack Attach
field :rack_attack, type: :hash, default: {
limit: ENV["rack_attack.limit"] || 0,
period: ENV["rack_attack.period"] || 3.minutes,
limit: 0,
period: 3.minutes,
}

# = Uploader
Expand All @@ -108,27 +108,27 @@ def legecy_envs
field :mailer_provider, default: (ENV["mailer_provider"] || "smtp"), readonly: true
field :mailer_sender, default: (ENV["mailer_sender"] || "no-reply@localhost"), readonly: true
field :mailer_options, type: :hash, readonly: true, default: {
api_key: (ENV["mailer_options_api_key"] || ENV["mailer_options.api_key"]),
address: (ENV["mailer_options_address"] || ENV["mailer_options.address"]),
port: (ENV["mailer_options_port"] || ENV["mailer_options.port"]),
domain: (ENV["mailer_options_domain"] || ENV["mailer_options.domain"]),
user_name: (ENV["mailer_options_user_name"] || ENV["mailer_options.user_name"]),
password: (ENV["mailer_options_password"] || ENV["mailer_options.password"]),
authentication: (ENV["mailer_options_authentication"] || ENV["mailer_options.authentication"] || "login"),
enable_starttls_auto: (ENV["mailer_options_enable_starttls_auto"] || ENV["mailer_options.enable_starttls_auto"])
api_key: ENV["mailer_options_api_key"],
address: ENV["mailer_options_address"],
port: ENV["mailer_options_port"],
domain: ENV["mailer_options_domain"],
user_name: ENV["mailer_options_user_name"],
password: ENV["mailer_options_password"],
authentication: (ENV["mailer_options_authentication"] || "login"),
enable_starttls_auto: ENV["mailer_options_enable_starttls_auto"]
}

# = SSO
field :sso, type: :hash, readonly: true, default: {
enable: (ENV["sso_enable"] || ENV["sso.enable"] || false),
enable_provider: (ENV["sso_enable_provider"] || ENV["sso_enable.provider"] || false),
url: (ENV["sso_url"] || ENV["sso.url"]),
secret: (ENV["sso_secret"] || ENV["sso.secret"]),
enable: (ENV["sso_enable"] || false),
enable_provider: (ENV["sso_enable_provider"] || false),
url: ENV["sso_url"],
secret: ENV["sso_secret"],
}

# = Omniauth API Keys
field :github_api_key, default: (ENV["github_api_key"] || ENV["github_token"])
field :github_api_secret, default: (ENV["github_api_secret"] || ENV["github_secret"])
field :github_api_key, default: ENV["github_api_key"]
field :github_api_secret, default: ENV["github_api_secret"]
field :twitter_api_key, default: ENV["twitter_api_key"]
field :twitter_api_secret, default: ENV["twitter_api_secret"]
field :wechat_api_key, default: ENV["wechat_api_key"]
Expand Down
8 changes: 4 additions & 4 deletions public/packs-test/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"admin.css": "/packs-test/css/admin-3607befd.css",
"admin.css": "/packs-test/css/admin-2d80fa33.css",
"admin.js": "/packs-test/js/admin-ffcf61e7b3c79ae446a5.js",
"application.js": "/packs-test/js/application-afb598184845268b886d.js",
"entrypoints": {
"admin": {
"css": [
"/packs-test/css/admin-3607befd.css"
"/packs-test/css/admin-2d80fa33.css"
],
"js": [
"/packs-test/js/admin-ffcf61e7b3c79ae446a5.js"
Expand All @@ -19,7 +19,7 @@
},
"front": {
"css": [
"/packs-test/css/front-f6a3d04d.css"
"/packs-test/css/front-4459c932.css"
],
"js": [
"/packs-test/js/front-c53a5cbd9c08e94d7f27.js"
Expand All @@ -34,7 +34,7 @@
]
}
},
"front.css": "/packs-test/css/front-f6a3d04d.css",
"front.css": "/packs-test/css/front-4459c932.css",
"front.js": "/packs-test/js/front-c53a5cbd9c08e94d7f27.js",
"media/webfonts/fa-brands-400.eot": "/packs-test/media/webfonts/fa-brands-400-0fea2496.eot",
"media/webfonts/fa-brands-400.svg": "/packs-test/media/webfonts/fa-brands-400-e33e2cf6.svg",
Expand Down

0 comments on commit 69f8c09

Please sign in to comment.