umts-microservices-engine 0.0.7 → 0.0.8
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdec59bf53e6c2906359a2f7d5cebf3b866251ca
|
4
|
+
data.tar.gz: f904351962ceac74a9863e6908a0b5cd2a83981c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a09e26f78e7d1ed60bd62faebca3a030fd32d00637ef96b8100ebf492b2bee81a66323ee126b05382ed43c517e215618e28810eb00744a87e4ba6b557b12e06
|
7
|
+
data.tar.gz: 36050b0d47b35cbcb13461d0ca1a935e9ac5eb198b07fed878556127a02244fb43ad551fed4d24594a716766fa812ac1c005e0ef42da0be9cb92a127bd0ade56
|
@@ -3,7 +3,7 @@ require 'net/http'
|
|
3
3
|
config_file = 'config/mse_router_info.yml'
|
4
4
|
|
5
5
|
REPORT_MISSING_CONFIG_KEY = -> (key) {
|
6
|
-
raise ArgumentError, "Missing key #{key} in
|
6
|
+
raise ArgumentError, "Missing key #{key} in #{config_file}"
|
7
7
|
}
|
8
8
|
|
9
9
|
unless File.file?(config_file)
|
@@ -12,10 +12,10 @@ end
|
|
12
12
|
|
13
13
|
config_data = YAML.load_file(config_file)
|
14
14
|
|
15
|
-
service_name = config_data.fetch
|
16
|
-
service_url = config_data.fetch
|
17
|
-
router_url = config_data.fetch
|
18
|
-
security_token = config_data.fetch
|
15
|
+
service_name = config_data.fetch 'name', &REPORT_MISSING_CONFIG_KEY
|
16
|
+
service_url = config_data.fetch 'uri', &REPORT_MISSING_CONFIG_KEY
|
17
|
+
router_url = config_data.fetch 'router_uri', &REPORT_MISSING_CONFIG_KEY
|
18
|
+
security_token = config_data.fetch 'security_token', &REPORT_MISSING_CONFIG_KEY
|
19
19
|
|
20
20
|
res = Net::HTTP.post_form(
|
21
21
|
URI.parse(router_url),
|