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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/router_helper.rb +38 -14
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b7a963b2d000e7eebba5d20368aa754afcb8fa5c
4
- data.tar.gz: 5958f87dcd6547580819f7c5a78bd9cb618495c7
3
+ metadata.gz: 8d37bb3df7fac17f5ba51081a3a2d19cf08f66a9
4
+ data.tar.gz: b7f2e236de3e20eb11a64dc0b64f18086f5f8e32
5
5
  SHA512:
6
- metadata.gz: 80465b797fb38e02bece8b9874a4de2b2aec39341496be919f9e638ecad34514c9708a1d7ce288ebf0538bec890e7a6398be6d17f5559c5c7b902760b6eb6c8b
7
- data.tar.gz: 7f7860caae67e1d16d8ea562f580b0f5c193c545de69f80ae01e49ac46b5fcfefc935a4c54285fe93477367a4285d36dd75ee505a9c2fc8e09bfed89e40ac92b
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 #{_req.url}" }
15
+ data = {code: 404, error: "Url not found #{url}" }
16
16
  rescue RestClient::InternalServerError => err
17
- data = {code: 500, error: "Url not found #{_req.url}" }
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 ||= {user: {url: "http://localhost", port: 3000},
24
- practice: {url: "http://localhost", port: 3001},
25
- mocktest: {url: "http://localhost", port: 3002},
26
- payment: {url: "http://localhost", port: 3003},
27
- content: {url: "http://localhost", port: 3004},
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 ||= {user: {url: "http://user.embibe.com", port: nil},
37
- mocktest: {url: "http://mocktest.embibe.com", port: nil},
38
- practice: {url: "http://practice.embibe.com", port: nil},
39
- payment: {url: "http://payment.embibe.com", port: nil},
40
- content: {url: "http://content.embibe.com", port: nil},
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jwt_auth_token
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Afzal Lakdawala