Skip to content

Commit 69f8c09

Browse files
committed
Remove ENV var that including dot.
1 parent c44a09d commit 69f8c09

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

app/models/setting.rb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def legecy_envs
8888

8989
# = Rack Attach
9090
field :rack_attack, type: :hash, default: {
91-
limit: ENV["rack_attack.limit"] || 0,
92-
period: ENV["rack_attack.period"] || 3.minutes,
91+
limit: 0,
92+
period: 3.minutes,
9393
}
9494

9595
# = Uploader
@@ -108,27 +108,27 @@ def legecy_envs
108108
field :mailer_provider, default: (ENV["mailer_provider"] || "smtp"), readonly: true
109109
field :mailer_sender, default: (ENV["mailer_sender"] || "no-reply@localhost"), readonly: true
110110
field :mailer_options, type: :hash, readonly: true, default: {
111-
api_key: (ENV["mailer_options_api_key"] || ENV["mailer_options.api_key"]),
112-
address: (ENV["mailer_options_address"] || ENV["mailer_options.address"]),
113-
port: (ENV["mailer_options_port"] || ENV["mailer_options.port"]),
114-
domain: (ENV["mailer_options_domain"] || ENV["mailer_options.domain"]),
115-
user_name: (ENV["mailer_options_user_name"] || ENV["mailer_options.user_name"]),
116-
password: (ENV["mailer_options_password"] || ENV["mailer_options.password"]),
117-
authentication: (ENV["mailer_options_authentication"] || ENV["mailer_options.authentication"] || "login"),
118-
enable_starttls_auto: (ENV["mailer_options_enable_starttls_auto"] || ENV["mailer_options.enable_starttls_auto"])
111+
api_key: ENV["mailer_options_api_key"],
112+
address: ENV["mailer_options_address"],
113+
port: ENV["mailer_options_port"],
114+
domain: ENV["mailer_options_domain"],
115+
user_name: ENV["mailer_options_user_name"],
116+
password: ENV["mailer_options_password"],
117+
authentication: (ENV["mailer_options_authentication"] || "login"),
118+
enable_starttls_auto: ENV["mailer_options_enable_starttls_auto"]
119119
}
120120

121121
# = SSO
122122
field :sso, type: :hash, readonly: true, default: {
123-
enable: (ENV["sso_enable"] || ENV["sso.enable"] || false),
124-
enable_provider: (ENV["sso_enable_provider"] || ENV["sso_enable.provider"] || false),
125-
url: (ENV["sso_url"] || ENV["sso.url"]),
126-
secret: (ENV["sso_secret"] || ENV["sso.secret"]),
123+
enable: (ENV["sso_enable"] || false),
124+
enable_provider: (ENV["sso_enable_provider"] || false),
125+
url: ENV["sso_url"],
126+
secret: ENV["sso_secret"],
127127
}
128128

129129
# = Omniauth API Keys
130-
field :github_api_key, default: (ENV["github_api_key"] || ENV["github_token"])
131-
field :github_api_secret, default: (ENV["github_api_secret"] || ENV["github_secret"])
130+
field :github_api_key, default: ENV["github_api_key"]
131+
field :github_api_secret, default: ENV["github_api_secret"]
132132
field :twitter_api_key, default: ENV["twitter_api_key"]
133133
field :twitter_api_secret, default: ENV["twitter_api_secret"]
134134
field :wechat_api_key, default: ENV["wechat_api_key"]

public/packs-test/manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"admin.css": "/packs-test/css/admin-3607befd.css",
2+
"admin.css": "/packs-test/css/admin-2d80fa33.css",
33
"admin.js": "/packs-test/js/admin-ffcf61e7b3c79ae446a5.js",
44
"application.js": "/packs-test/js/application-afb598184845268b886d.js",
55
"entrypoints": {
66
"admin": {
77
"css": [
8-
"/packs-test/css/admin-3607befd.css"
8+
"/packs-test/css/admin-2d80fa33.css"
99
],
1010
"js": [
1111
"/packs-test/js/admin-ffcf61e7b3c79ae446a5.js"
@@ -19,7 +19,7 @@
1919
},
2020
"front": {
2121
"css": [
22-
"/packs-test/css/front-f6a3d04d.css"
22+
"/packs-test/css/front-4459c932.css"
2323
],
2424
"js": [
2525
"/packs-test/js/front-c53a5cbd9c08e94d7f27.js"
@@ -34,7 +34,7 @@
3434
]
3535
}
3636
},
37-
"front.css": "/packs-test/css/front-f6a3d04d.css",
37+
"front.css": "/packs-test/css/front-4459c932.css",
3838
"front.js": "/packs-test/js/front-c53a5cbd9c08e94d7f27.js",
3939
"media/webfonts/fa-brands-400.eot": "/packs-test/media/webfonts/fa-brands-400-0fea2496.eot",
4040
"media/webfonts/fa-brands-400.svg": "/packs-test/media/webfonts/fa-brands-400-e33e2cf6.svg",

0 commit comments

Comments
 (0)