arkaan 0.5.5 → 0.5.6
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 +4 -4
- data/lib/arkaan/monitoring.rb +1 -0
- data/lib/arkaan/monitoring/gateway.rb +22 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fc29c2556a878524ea37ef5f8c2933fe7cff23f
|
4
|
+
data.tar.gz: 20c49fa9926ff15d5a02cd879eae8213c1b4cc79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e8f0ce7c13ca74686895d8433bc5bcbdc4ae75ece7184ab818e59bace7db8608172426347b0833209205ade5ea9d6527f986c6950601c6bec4005e91a6121c8
|
7
|
+
data.tar.gz: 0b837b8901a81755f308c69e0a36905d9b20100976989723ef8c60c4220441fece3c96e5f6d2a6a9d55ed602c9b3ec477107f133cebcf69cf73621085c2a97b0
|
data/lib/arkaan/monitoring.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
module Arkaan
|
2
|
+
module Monitoring
|
3
|
+
class Gateway
|
4
|
+
include Mongoid::Document
|
5
|
+
include Mongoid::Timestamps
|
6
|
+
include Arkaan::Concerns::Activable
|
7
|
+
|
8
|
+
# @!attribute [rw] url
|
9
|
+
# @return [String] the URL of the gateway, where the requests will be issued.
|
10
|
+
field :url, type: String
|
11
|
+
# @!attribute [rw] running
|
12
|
+
# @return [Boolean] the running status of the gateway, indicating if it can be used or not.
|
13
|
+
field :running, type: Boolean, default: false
|
14
|
+
|
15
|
+
scope :running , ->{ where(running: true) }
|
16
|
+
|
17
|
+
validates :url,
|
18
|
+
presence: {message: 'gateway.url.blank'},
|
19
|
+
format: {with: /\A(https?:\/\/)([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?\z/, message: 'gateway.url.format', if: :url?}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arkaan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Courtois
|
@@ -162,6 +162,7 @@ files:
|
|
162
162
|
- lib/arkaan/concerns/activable.rb
|
163
163
|
- lib/arkaan/concerns/sluggable.rb
|
164
164
|
- lib/arkaan/monitoring.rb
|
165
|
+
- lib/arkaan/monitoring/gateway.rb
|
165
166
|
- lib/arkaan/monitoring/instance.rb
|
166
167
|
- lib/arkaan/monitoring/service.rb
|
167
168
|
- lib/arkaan/oauth.rb
|