shark-on-lambda 2.0.0.rc2 → 2.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2de1dc4c59a25047859c9c41c4a6216aa70480ef9b00f38ebfe47038c57f93bc
4
- data.tar.gz: 61c7045d5ebb7830ba72371083345d62d9c3c36fed81ebfe8ac37697e1e06558
3
+ metadata.gz: 63f4b1de2142973e7e2214530bfcebe66427c76eac109a5e4107210b3842c10b
4
+ data.tar.gz: 9a4dbec8d0c428033548a37929306fa3e63cfb8c86bb32d7d6559413476291ef
5
5
  SHA512:
6
- metadata.gz: 3419eb783ba62c32a55809b52394d6ee9a1f5de0968f0b0b28e4d9877fbd48edba5012c872aeb3330dae8c3fa7fc6903fcdc31d75dfc987ce541f3c01b559818
7
- data.tar.gz: 2715b4f010e87b4aeb9f330e58aa1564d8448b2962a2a94b70a5dce775e0d10901bf2dd218fa983ce5d24dcfaee4e18b14a417cdf20bbdc560396c5c0f5123bd
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SharkOnLambda
4
- VERSION = '2.0.0.rc2'
4
+ VERSION = '2.0.0.rc3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shark-on-lambda
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc2
4
+ version: 2.0.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Huy Dinh