virtuatable-core 1.6.0.dev1 → 1.6.0.dev3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d04349e236702f20e0c4a2542187eb4d1a0ef59d6ff4b44f90ff7d1a2484f783
4
- data.tar.gz: f1e41d1f2b0a89c2851d617c2642222351a96cda77f0baeefed1a67eb98150d5
3
+ metadata.gz: 9dfb4fa2fa19ff981a12cd82df061d7c39936e4a5d45aff4115ca6d30adde608
4
+ data.tar.gz: 9c98b7459fe2be97b905c443e493f3af2b82d1b295f791fe61458c3d53f54a50
5
5
  SHA512:
6
- metadata.gz: d1a87bca549bdc10d5f9dbee7c483051a0af0d7ec0cfb5594051a64b617e07fe8e32f8fcb7231398a078e4ca30d4d51e3434eb703bbdf5f5790474da897d8c6d
7
- data.tar.gz: 910921c135060a8b78065c146e41ccc6e13f32e24ed75bafd4b3f507058ccb22a47c88f75ecfff991831c65382e1c56c3971124b07855e7e7513242871eec184
6
+ metadata.gz: dea8649e84d34cedd4392482426fd65399175c089ce711d36694a3769faff8d6f5dff20a8b1b5563c7189e022e42d87c523ad6593412b5fdadcead9e168e3603
7
+ data.tar.gz: eecbb2dd1b8b2e01b6337543a976934294f7dfab2ebe048bb0767b91e856585e4d0200fe38baf8a81a80b02043334a8713723a06a5c0db0559786f81702f60b2
@@ -0,0 +1,9 @@
1
+ module Core
2
+ module Decorators
3
+ class Authorization < Core::Decorators::Base
4
+ def to_h
5
+ { code: object.code }
6
+ end
7
+ end
8
+ end
9
+ end
@@ -2,6 +2,7 @@ module Core
2
2
  module Decorators
3
3
  autoload :Account, 'core/decorators/account'
4
4
  autoload :Application, 'core/decorators/application'
5
+ autoload :Authorization, 'core/decorators/authorization'
5
6
  autoload :Base, 'core/decorators/base'
6
7
  autoload :Campaign, 'core/decorators/campaign'
7
8
  autoload :Session, 'core/decorators/session'
@@ -42,7 +42,7 @@ module Core
42
42
  authorization = Core::Models::OAuth::Authorization.find_by(code: authorization_code)
43
43
  raise unknown_err(field: 'authorization_code') if authorization.nil?
44
44
 
45
- authorization
45
+ Core::Decorators::Authorization.new(authorization)
46
46
  end
47
47
 
48
48
  private
@@ -28,6 +28,7 @@ module Core
28
28
  account: account,
29
29
  token: SecureRandom.uuid
30
30
  )
31
+ Decorators::Sessions.new(session)
31
32
  end
32
33
 
33
34
  # Gets the session by its unique identifier.
data/lib/core/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Core
4
- VERSION = '1.6.0.dev1'
4
+ VERSION = '1.6.0.dev3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virtuatable-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0.dev1
4
+ version: 1.6.0.dev3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Courtois
@@ -280,16 +280,16 @@ dependencies:
280
280
  name: draper
281
281
  requirement: !ruby/object:Gem::Requirement
282
282
  requirements:
283
- - - ">="
283
+ - - '='
284
284
  - !ruby/object:Gem::Version
285
- version: '0'
285
+ version: 4.0.2
286
286
  type: :runtime
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
289
289
  requirements:
290
- - - ">="
290
+ - - '='
291
291
  - !ruby/object:Gem::Version
292
- version: '0'
292
+ version: 4.0.2
293
293
  description: This gem holds the model layer for my table-top RPG games application.
294
294
  email: courtois.vincent@outlook.com
295
295
  executables: []
@@ -302,6 +302,7 @@ files:
302
302
  - lib/core/decorators.rb
303
303
  - lib/core/decorators/account.rb
304
304
  - lib/core/decorators/application.rb
305
+ - lib/core/decorators/authorization.rb
305
306
  - lib/core/decorators/base.rb
306
307
  - lib/core/decorators/campaign.rb
307
308
  - lib/core/decorators/session.rb