arkaan 0.10.19 → 0.10.20

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: a7d51c83e609d86677f16a095865bd05bb933f24
4
- data.tar.gz: c8759d996c98bbf4239a6ec996894b732b15c5e4
3
+ metadata.gz: 802dde822c6a67b3cc42513f6842d738fe927b4f
4
+ data.tar.gz: bcf79de27b982ecd9d3efd2a0930fa26ed3d637a
5
5
  SHA512:
6
- metadata.gz: abf93a8b62871351b3286688a03cd049cc27d9608a88f288073322aa8262567c196a3103a2d7c173b965355ca4f0ca0cd7cd31ac498cba3569bd0672dc03d1c2
7
- data.tar.gz: a3c77106780afa149ee1076c600fa73a1105b72943c64cb92042910b4893d9fefd359691a64bd089e35905a7187732243e7a21a1ff007cc78cde62b0a3be0862
6
+ metadata.gz: d7898d11625e1e4e87ddbbb63e7f0ef47a0355709966550bf7803eb91c7131d064ec234b1ae8e9e79d41838e7f09ea38827bab1f98c67ed73ea0c014677d8932
7
+ data.tar.gz: c256372eb33847cc2d7ea3aee83e0e43556617d6016db7bb6a91b36e054cd84e296bdb362b47f2100524c9967474b45d521e3402d93921c930cf8684a257056e
@@ -2,10 +2,11 @@ module Arkaan
2
2
  # The monitoring module holds all the logic about the services so they can be activated or deactivated.
3
3
  # @author Vincent Courtois <courtois.vincent@outlook.com>
4
4
  module Monitoring
5
- autoload :Service , 'arkaan/monitoring/service'
6
- autoload :Instance , 'arkaan/monitoring/instance'
5
+ autoload :Action , 'arkaan/monitoring/action'
7
6
  autoload :Gateway , 'arkaan/monitoring/gateway'
7
+ autoload :Instance , 'arkaan/monitoring/instance'
8
8
  autoload :Route , 'arkaan/monitoring/route'
9
+ autoload :Service , 'arkaan/monitoring/service'
9
10
  autoload :Websocket, 'arkaan/monitoring/websocket'
10
11
  end
11
12
  end
@@ -0,0 +1,22 @@
1
+ module Arkaan
2
+ module Monitoring
3
+ # An action is made by an authorized user on the instance of a server to perform a task.
4
+ # @author Vincent Courtois <courtois.vincent@outlook.com>
5
+ class Action
6
+ include Mongoid::Document
7
+ include Mongoid::Timestamps
8
+ include Arkaan::Concerns::Enumerable
9
+
10
+ # @!attribute [rw] type
11
+ # @return [Symbol] the type of action you're making on this instance
12
+ enum_field :type, [:restart]
13
+
14
+ # @!attribute [rw] user
15
+ # @return [Arkaan::Account] the user performing the action on the instance.
16
+ belongs_to :user, class_name: 'Arkaan::Account'
17
+ # @!attribute [rw] instance
18
+ # @return [Arkaan::Monitoring::Instance] the instance of a service on which the action is performed.
19
+ embedded_in :instance, class_name: 'Arkaan::Monitoring::Instance', inverse_of: :actions
20
+ end
21
+ end
22
+ end
@@ -26,6 +26,9 @@ module Arkaan
26
26
  # @!attribute [r] service
27
27
  # @return [Arkaan::Monitoring::Service] the service this instance is linked to.
28
28
  embedded_in :service, class_name: 'Arkaan::Monitoring::Service', inverse_of: :instances
29
+ # @!attribute [rw] actions
30
+ # @return [Arkaan::Monitoring::Action] the actions that has been performed on the service.
31
+ embeds_many :actions, class_name: 'Arkaan::Monitoring::Action', inverse_of: :instance
29
32
 
30
33
  validates :url,
31
34
  presence: {message: 'required'},
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.10.19
4
+ version: 0.10.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Courtois
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-12 00:00:00.000000000 Z
11
+ date: 2018-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -241,6 +241,7 @@ files:
241
241
  - lib/arkaan/concerns/premiumable.rb
242
242
  - lib/arkaan/concerns/sluggable.rb
243
243
  - lib/arkaan/monitoring.rb
244
+ - lib/arkaan/monitoring/action.rb
244
245
  - lib/arkaan/monitoring/gateway.rb
245
246
  - lib/arkaan/monitoring/instance.rb
246
247
  - lib/arkaan/monitoring/route.rb