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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ab81c60f81276ca7e0405ba1a2d278d306bd16e
4
- data.tar.gz: c37126260296a51411f8f667fe76d55c8c1f2eab
3
+ metadata.gz: 7fc29c2556a878524ea37ef5f8c2933fe7cff23f
4
+ data.tar.gz: 20c49fa9926ff15d5a02cd879eae8213c1b4cc79
5
5
  SHA512:
6
- metadata.gz: 48e83eb4063aabdaed703bc8c75d3f7485a88d7e396c66d48f388830a3380db9fc91ac1b6ca55cf79c234e25d99d1cd9882389143f5f02b8e2824e91da57be15
7
- data.tar.gz: 203dbd24f11e37606a8615d23ffaa5b2372c6438f6405925fc45b701b3a72049eb1f06660a24c028f828039630a0c1303b8a4923f95c5a8607c4d119d5b49b39
6
+ metadata.gz: 6e8f0ce7c13ca74686895d8433bc5bcbdc4ae75ece7184ab818e59bace7db8608172426347b0833209205ade5ea9d6527f986c6950601c6bec4005e91a6121c8
7
+ data.tar.gz: 0b837b8901a81755f308c69e0a36905d9b20100976989723ef8c60c4220441fece3c96e5f6d2a6a9d55ed602c9b3ec477107f133cebcf69cf73621085c2a97b0
@@ -4,5 +4,6 @@ module Arkaan
4
4
  module Monitoring
5
5
  autoload :Service , 'arkaan/monitoring/service'
6
6
  autoload :Instance, 'arkaan/monitoring/instance'
7
+ autoload :Gateway , 'arkaan/monitoring/gateway'
7
8
  end
8
9
  end
@@ -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.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