jwt_auth_token 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/router_helper.rb +38 -14
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d37bb3df7fac17f5ba51081a3a2d19cf08f66a9
|
4
|
+
data.tar.gz: b7f2e236de3e20eb11a64dc0b64f18086f5f8e32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 475836200e35101a0cac91e1f61ce146c42352d4c0341a5caad3f659421c0f6a66b9e1ff787e19487bbb4c13c909c6dd050b0c50e80ef90d2cb8f51a7c65fb11
|
7
|
+
data.tar.gz: 8426e0a21c0240644b47fe8c49618d22338d2160595bb4a3b5529aea45a6eca5c20c3ae72c7434594143ffc95e2c1bda2798331a58bfd0ff6a394d02d5889309
|
data/lib/router_helper.rb
CHANGED
@@ -12,20 +12,42 @@ module RouterHelper
|
|
12
12
|
rescue RestClient::Unauthorized, RestClient::Forbidden => err
|
13
13
|
data = JSON.parse(err.response)
|
14
14
|
rescue RestClient::ResourceNotFound => err
|
15
|
-
data = {code: 404, error: "Url not found #{
|
15
|
+
data = {code: 404, error: "Url not found #{url}" }
|
16
16
|
rescue RestClient::InternalServerError => err
|
17
|
-
data = {code: 500, error: "
|
17
|
+
data = {code: 500, error: "Server side exception" }
|
18
|
+
rescue Exception => ex
|
19
|
+
data = {code: 503, error: ex.message }
|
18
20
|
end
|
19
21
|
data
|
20
22
|
end
|
21
23
|
|
22
24
|
def services_development_urls
|
23
|
-
@_services_development_urls ||= {
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
@_services_development_urls ||= {
|
26
|
+
# user: {url: "http://localhost", port: 3000},
|
27
|
+
# horizontal: {url: "http://localhost", port: 3005},
|
28
|
+
# content: {url: "http://localhost", port: 3004},
|
29
|
+
# practice: {url: "http://localhost", port: 3001},
|
30
|
+
# mocktest: {url: "http://localhost", port: 3002},
|
31
|
+
# payment: {url: "http://localhost", port: 3003}
|
32
|
+
|
33
|
+
user: {url: "http://user.embibe.com", port: nil},
|
34
|
+
horizontal: {url: "http://horizontal.embibe.com", port: nil},
|
35
|
+
content: {url: "http://content.embibe.com", port: nil},
|
36
|
+
mocktest: {url: "http://mocktest.embibe.com", port: nil},
|
37
|
+
practice: {url: "http://practice.embibe.com", port: nil},
|
38
|
+
payment: {url: "http://payment.embibe.com", port: nil}
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
def services_staging_urls
|
43
|
+
@_services_staging_urls ||= {
|
44
|
+
user: {url: "http://user.embibe.com", port: nil},
|
45
|
+
horizontal: {url: "http://horizontal.embibe.com", port: nil},
|
46
|
+
content: {url: "http://content.embibe.com", port: nil},
|
47
|
+
mocktest: {url: "http://mocktest.embibe.com", port: nil},
|
48
|
+
practice: {url: "http://practice.embibe.com", port: nil},
|
49
|
+
payment: {url: "http://payment.embibe.com", port: nil}
|
50
|
+
}
|
29
51
|
end
|
30
52
|
|
31
53
|
def services_uri
|
@@ -33,12 +55,14 @@ module RouterHelper
|
|
33
55
|
end
|
34
56
|
|
35
57
|
def services_production_urls
|
36
|
-
@_services_production_urls ||= {
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
58
|
+
@_services_production_urls ||= {
|
59
|
+
user: {url: "http://user.embibe.com", port: nil},
|
60
|
+
horizontal: {url: "http://horizontal.embibe.com", port: nil},
|
61
|
+
content: {url: "http://content.embibe.com", port: nil},
|
62
|
+
mocktest: {url: "http://mocktest.embibe.com", port: nil},
|
63
|
+
practice: {url: "http://practice.embibe.com", port: nil},
|
64
|
+
payment: {url: "http://payment.embibe.com", port: nil}
|
65
|
+
}
|
42
66
|
|
43
67
|
end
|
44
68
|
|