apiql 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/apiql.gemspec +1 -1
- data/lib/apiql.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb1ebabe8ada909b6d81d7f175c34dfacac5eb97c75af10e29a1ee2f2dd9f4fd
|
4
|
+
data.tar.gz: 19980e934f637e0fc87b74f014c0ec4edb8f0730be5b8eb2c3562c06aa2b8144
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b258efa6ec0fbfc2841295ce888503023f41b1e9f85d7a4e76ffff73b569eba8d2d39d6aa30d04f8dcd7f68abaf0df63824d6953d8193a38837f330a67bf1070
|
7
|
+
data.tar.gz: 3a5ecde6e15da9c3fa6f9f3e3296b6d25fab6686dc318c1e1d0fee9a7bc6759dfb1c589121a2eeaade595649ac0a5fde0266682d24c9e600fac603d1221cc110
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ class UserAPIQL < ::APIQL
|
|
9
9
|
def me
|
10
10
|
authorize! :show, ::User
|
11
11
|
|
12
|
-
|
12
|
+
current_user
|
13
13
|
end
|
14
14
|
|
15
15
|
def authenticate(email, password)
|
@@ -20,7 +20,7 @@ class UserAPIQL < ::APIQL
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def logout
|
23
|
-
|
23
|
+
current_user&.logout
|
24
24
|
|
25
25
|
:ok
|
26
26
|
end
|
@@ -46,7 +46,7 @@ class User < ApplicationRecord
|
|
46
46
|
attributes :full_name, :email, :token, :role, :roles
|
47
47
|
|
48
48
|
def token
|
49
|
-
object.token if object ==
|
49
|
+
object.token if object == current_user
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
data/apiql.gemspec
CHANGED
data/lib/apiql.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apiql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Silchenko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|