arkaan 0.6.10 → 0.7.0
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/route.rb +9 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07b4489f79230ccb811f9d1ce8450b9d3b3f4f09
|
4
|
+
data.tar.gz: e9b8a2f2b4fc2077fbefb9c03f27deab149ac00b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27c4afac918bef59a56c8f6cba6b0b44d9c7e5433d1edf7fd25b6a7e0f87358ad8ff6028cc991f0f550af0cfb0050c886b10d1b8d27cbdd58c71b6bef2d74b1d
|
7
|
+
data.tar.gz: a60ed29bf413cd20889560f183058f36ad57094f2cbe809337d120d41f7ae38c95eea61b8b1795ef5ec93d9afd45490f3bc2f3b54748350002682c0f7826e1e6
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Arkaan
|
2
2
|
module Monitoring
|
3
|
-
# A route is an endpoint accessible in a service. Each route has to have an associated endpoint in the
|
3
|
+
# A route is an endpoint accessible in a service. Each route has to have an associated endpoint in the deployed instances.
|
4
4
|
# @param Vincent Courtois <courtois.vincent@outlook.com>
|
5
5
|
class Route
|
6
6
|
include Mongoid::Document
|
@@ -9,16 +9,22 @@ module Arkaan
|
|
9
9
|
|
10
10
|
# @!attribute [rw] path
|
11
11
|
# @return [String] the path (URI) of the route in the service?
|
12
|
-
field :path, type: String
|
12
|
+
field :path, type: String, default: '/'
|
13
13
|
# @!attribute [rw] verb
|
14
14
|
# @return [String] the verb (HTTP method) of this route in the service.
|
15
|
-
field :verb, type: String
|
15
|
+
field :verb, type: String, default: 'get'
|
16
16
|
|
17
17
|
make_premiumable
|
18
18
|
|
19
19
|
# @!attribute [rw] service
|
20
20
|
# @return [Arkaan::Monitoring::Service] the service in which this route is declared.
|
21
21
|
embedded_in :service, class_name: 'Arkaan::Monitoring::Service', inverse_of: :routes
|
22
|
+
|
23
|
+
validates :path,
|
24
|
+
format: {with: /\A(\/[A-Za-z0-9\/])+\z/, message: 'route.path.format', if: :path?}
|
25
|
+
|
26
|
+
validates :verb,
|
27
|
+
inclusion: {message: 'route.verb.unknown', in: ['get', 'post', 'put', 'delete', 'patch', 'option']}
|
22
28
|
end
|
23
29
|
end
|
24
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arkaan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Courtois
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|