arkaan 0.5.0 → 0.5.1

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: 92aaa301dede5e57664f8c5a3ecd25ae671a1282
4
- data.tar.gz: c58e0aa2e97dd02c9653a1ce20044ef4179eada0
3
+ metadata.gz: 8d5bfcbb6a55477730bc17089ae04af810db865e
4
+ data.tar.gz: 478a4b33dbd76b7094db1ad123cc1557bb908201
5
5
  SHA512:
6
- metadata.gz: 420b97c672c8c2e71a9c1f1b93906dc22023b3e24752c0b1143a75eeb12511e6846796289328534de7ad03c0994739f8b7627d14533fb4dcda6fc97fc915a71c
7
- data.tar.gz: 52910749470f716ebfe646ba48afa5dc2e22dc19eda19d625d1a44f4754eda003acfdd6be88bfbfa6ffb3082ac340c8dbe92fbf8396c185899680b386e15d6ae
6
+ metadata.gz: 1030fcdca64b8db9f3d829abcff756d04927fff76465c800899ec357e47148e7df126b6f13e51ba86cf7824baa46ba1559471a2350f8499bc96c9e678a309e90
7
+ data.tar.gz: 0bd87c8ee10f222a47674eb55248ec31c3145dfc3e7bf0270b4e160265a3e269e1884f86215daa64a2b6d9407cca90ca5616e65cfedff088c5ebdc7a304d3488
@@ -40,6 +40,11 @@ module Arkaan
40
40
  # @!attribute [rw] authorizations
41
41
  # @return [Array<Arkaan::OAuth::Authorization>] the authorization issued by this account to third-party applications to access its data.
42
42
  has_many :authorizations, class_name: 'Arkaan::OAuth::Authorization', inverse_of: :account
43
+ # @!attribute [rw] services
44
+ # @return [Array<Arkaan::Monitoring::Service] the services created by this user.
45
+ has_many :services, class_name: 'Arkaan::Monitoring::Service', inverse_of: :creator
46
+
47
+ attr_readonly :password_digest
43
48
 
44
49
  validates :username,
45
50
  presence: {message: 'account.username.blank'},
@@ -1,6 +1,7 @@
1
1
  module Arkaan
2
+ # The monitoring module holds all the logic about the services so they can be activated or deactivated.
3
+ # @author Vincent Courtois <courtois.vincent@outlook.com>
2
4
  module Monitoring
3
5
  autoload :Service, 'arkaan/monitoring/service'
4
- autoload :Route , 'arkaan/monitoring/route'
5
6
  end
6
7
  end
@@ -1,14 +1,21 @@
1
1
  module Arkaan
2
2
  module Monitoring
3
+ # A service is the representation of one of the applications composing the API.
4
+ # @author Vincent Courtois <courtois.vincent@outlook.com>
3
5
  class Service
4
6
  include Mongoid::Document
5
7
  include Mongoid::Timestamps
6
8
 
9
+ # @!attribute [rw] key
10
+ # @return [String] the name, or title of the service, optionally given to identify it more easily.
7
11
  field :key, type: String
8
-
12
+ # @!attribute [rw] url
13
+ # @return [String] the URL of the service, where the requests will be issued.
9
14
  field :url, type: String
10
15
 
11
- belongs_to :creator, class_name: 'Arkaan::Account', optional: true
16
+ # @!attribute [rw] creator
17
+ # @return [Arkaan::Account] the creator of this service.
18
+ belongs_to :creator, class_name: 'Arkaan::Account', optional: true, inverse_of: :services
12
19
 
13
20
  validates :key, uniqueness: {message: 'service.key.uniq'}
14
21
 
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.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Courtois