shark-on-lambda 2.0.0.rc2 → 2.0.0.rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/shark_on_lambda/application.rb +4 -2
- data/lib/shark_on_lambda/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63f4b1de2142973e7e2214530bfcebe66427c76eac109a5e4107210b3842c10b
|
4
|
+
data.tar.gz: 9a4dbec8d0c428033548a37929306fa3e63cfb8c86bb32d7d6559413476291ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99896684ede88efb1f6e1269fa01de0ba4b9dc91d8b8008f6143a18129aa893c7e178264de975d2b6e2874d2c2c077bcaf3003792fdda7bd5fe54f12d339df6e
|
7
|
+
data.tar.gz: 61fb3d19fbcfa4fdad7173cc83c85235176e52938665f4997b80199669ef04a6008f8f2035d49607eca10650154495b7b0fee2e3ad655cd026ee1fd60c2d2f52
|
@@ -37,7 +37,7 @@ module SharkOnLambda
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def config_for(name, env: SharkOnLambda.env)
|
40
|
-
config = load_config_file(name, env: env)
|
40
|
+
config = load_config_file(name, env: env, fail_with_exception: true)
|
41
41
|
config.deep_merge(load_config_file("#{name}.local", env: env))
|
42
42
|
end
|
43
43
|
|
@@ -53,10 +53,12 @@ module SharkOnLambda
|
|
53
53
|
@routes = ActionDispatch::Routing::RouteSet.new_with_config(router_config)
|
54
54
|
end
|
55
55
|
|
56
|
-
def load_config_file(name, env:)
|
56
|
+
def load_config_file(name, env:, fail_with_exception: false)
|
57
57
|
filename = "#{name}.yml"
|
58
58
|
config_file = SharkOnLambda.root.join('config', filename)
|
59
59
|
unless config_file.exist?
|
60
|
+
return {} unless fail_with_exception
|
61
|
+
|
60
62
|
raise ArgumentError,
|
61
63
|
"Could not load configuration. No such file - #{config_file}"
|
62
64
|
end
|