umts-microservices-engine 0.0.9 → 0.1.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 047205e3f834412639d8032e0f99de1ce8671c6c
|
4
|
+
data.tar.gz: 5605425e67060720ec62fc0d9eefe8e431936b3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99fa43095b2487549c47200ab00e1a788763e590908fdd6a0e50ff5f9bd4d3cfaf56e5180e537c566e22441b40bf092a912fffe21c03fea6153e56b5b660cc05
|
7
|
+
data.tar.gz: d071ce009966b5023fd7a9f374eb5a84548493261a83670df7e90b60e3ef80e5448fc0810b0aba7f16cf7a0523ab18964381beb8461d8d0eacf9517ccfacc8ce
|
@@ -1,21 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
require 'net/http'
|
3
|
-
|
3
|
+
CONFIG_FILE = 'config/mse_router_info.yml'
|
4
4
|
|
5
|
-
|
6
|
-
raise ArgumentError, "Missing key #{key} in #{
|
7
|
-
|
5
|
+
report_missing_config_key = lambda do |key|
|
6
|
+
raise ArgumentError, "Missing key #{key} in #{CONFIG_FILE}"
|
7
|
+
end
|
8
8
|
|
9
|
-
unless File.file?(
|
9
|
+
unless File.file?(CONFIG_FILE)
|
10
10
|
raise IOError, 'No router configuration YAML file found'
|
11
11
|
end
|
12
12
|
|
13
|
-
config_data = YAML.load_file(
|
13
|
+
config_data = YAML.load_file(CONFIG_FILE)
|
14
|
+
|
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
|
14
19
|
|
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
20
|
router_url = router_url + '/services/register'
|
20
21
|
|
21
22
|
res = Net::HTTP.post_form(
|
@@ -7,6 +7,7 @@ name: ''
|
|
7
7
|
|
8
8
|
# REQUIRED field
|
9
9
|
# The URI for the site hosting the microservice
|
10
|
+
# remember to add http:// to the beginning of your uri
|
10
11
|
uri: ''
|
11
12
|
|
12
13
|
# REQUIRED field
|
@@ -15,7 +16,8 @@ security_token: ''
|
|
15
16
|
|
16
17
|
# REQUIRED Field
|
17
18
|
# Endpoint of Microservices router
|
18
|
-
# Make sure you do not add a slash to this
|
19
|
+
# Make sure you do not add a slash to this, and remember to add
|
20
|
+
# http:// to the beginning of your uri.
|
19
21
|
router_uri: ''
|
20
22
|
|
21
23
|
# OPTIONAL field (leave blank if not applicable)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: umts-microservices-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UMass Transportation Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|