arkaan 3.0.0 → 3.1.0

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
  SHA256:
3
- metadata.gz: 99aa03dc8a6f14cf981a81b89ab54adf9450c7bf2646a8231883ec71673d5695
4
- data.tar.gz: 1e852dcc77ae4418286c94b7390888b3f8e71c57770852548cdf585ec300cea8
3
+ metadata.gz: 65f4e93f704391dc219068d5a5159d2866a1a4a6e42c7b9cfe39585bb933fba8
4
+ data.tar.gz: 5eac7078fe5e4a32b70fbca4c3d7d6282440fbe7d27b2e5c8a6a715c37ecad5d
5
5
  SHA512:
6
- metadata.gz: 7fb7d81811559f1daff3971c65b80d323ad9c29705e96b5cc3d6ba2729234498b094955e76478148c3876b2aeb62f6dad5806d34f6fae6761d0fecb86d495917
7
- data.tar.gz: 4d2398bdc636a6b2307d4d4c101cf7f75e0e74b958f13e1d37d7e22addbbbfaec96022565737212c9f7b4beacd8f94e4f956f73a43203ca057612c8f50b33683
6
+ metadata.gz: b4bc3270b90c4ac5da60de1f8a09b1f5b8e2ab72c0f3d0d444d9708b400ff29c04f6828547b8c666b37d7be39dfb0283a338f0904e0275e35d4ece8e33247bd3
7
+ data.tar.gz: 1eda8e5ab833ecfaad48beafe3953f07e56139d513476fab37d0c99622908930d6458637539704c31ac012575a4bc911c46a0b04f5a4def2755a12168e4ce89d
@@ -12,7 +12,7 @@ module Arkaan
12
12
 
13
13
  # @!attribute [rw] token
14
14
  # @return [String] the unique token for this session, used to identify it and be sure the user is connected.
15
- field :token, type: String
15
+ field :session_id, type: String
16
16
  # @!attribute [rw] websocket_id
17
17
  # @return [String] the ID of the websocket the user is connected to.
18
18
  # It's not an association because instances are embedded.
@@ -22,10 +22,10 @@ module Arkaan
22
22
  # @return [Arkaan::Account] the account connected to the application.
23
23
  belongs_to :account, class_name: 'Arkaan::Account', inverse_of: :sessions
24
24
 
25
- validates :token,
25
+ validates :session_id,
26
26
  presence: { message: 'required' },
27
- uniqueness: { message: 'uniq', if: :token? },
28
- length: { minimum: 10, message: 'minlength', if: :token? }
27
+ uniqueness: { message: 'uniq', if: :session_id? },
28
+ length: { minimum: 10, message: 'minlength', if: :session_id? }
29
29
  end
30
30
  end
31
31
  end
@@ -14,7 +14,7 @@ module Arkaan
14
14
  field :name, type: String
15
15
  # @!attribute [rw] key
16
16
  # @return [String] the unique key for the application, identifying it when requesting a token for the API.
17
- field :application_key, type: String, default: -> { SecureRandom.hex }
17
+ field :app_key, type: String, default: -> { SecureRandom.hex }
18
18
  # @!attribute [rw] premium
19
19
  # @return [Boolean] a value indicating whether the application should automatically receive a token
20
20
  # when an account is created, or not.
@@ -36,7 +36,7 @@ module Arkaan
36
36
  length: { minimum: 6, message: 'minlength' },
37
37
  uniqueness: { message: 'uniq' }
38
38
 
39
- validates :application_key,
39
+ validates :app_key,
40
40
  presence: { message: 'required' },
41
41
  uniqueness: { message: 'uniq' }
42
42
 
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: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Courtois