arkaan 0.5.9 → 0.5.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arkaan/monitoring/gateway.rb +7 -0
- 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: 0457afc1c00ec42c0dfe5aea451727e30715821a
|
4
|
+
data.tar.gz: 7aa9901899f699eaeea2de3acf8d2dcc62b3d9ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a78e5a10d51061d7eea0e59b9e2a9eda77c5fb7689f73fce38264d1f97f74da6e3891a90bb9a53c0371a739e33026ec98b64f8886c4344ffac9e6026b1b37e8
|
7
|
+
data.tar.gz: fc0a602f6d590bb96d5711f4844389e2bb0b3bc1cf61c00fe7a56af8c36b837c2c71bfb69c0d3ee6156eb3a5ae73f848bbeb5397f69b33c25d06e0590533fe88
|
@@ -14,6 +14,9 @@ module Arkaan
|
|
14
14
|
# @!attribute [rw] running
|
15
15
|
# @return [Boolean] the running status of the gateway, indicating if it can be used or not.
|
16
16
|
field :running, type: Boolean, default: false
|
17
|
+
# @!attribute [rw] gateways
|
18
|
+
# @return [String] the uniq token for this gateway, identifying it in the micro services.
|
19
|
+
field :token, type: String
|
17
20
|
|
18
21
|
scope :running , ->{ where(running: true) }
|
19
22
|
|
@@ -22,6 +25,10 @@ module Arkaan
|
|
22
25
|
validates :url,
|
23
26
|
presence: {message: 'gateway.url.blank'},
|
24
27
|
format: {with: /\A(https?:\/\/)([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?\z/, message: 'gateway.url.format', if: :url?}
|
28
|
+
|
29
|
+
validates :token,
|
30
|
+
presence: {message: 'gateway.token.blank'},
|
31
|
+
uniqueness: {message: 'gateway.token.uniq'}
|
25
32
|
end
|
26
33
|
end
|
27
34
|
end
|