glogin 0.16.3 → 0.16.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/glogin/cookie.rb +4 -9
- data/lib/glogin/version.rb +1 -1
- data/test/glogin/test_cookie.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6da39333e7c8e05cc42066d15bd2fa172f5eb7e503b7f422a62c9d0c5351ef1c
|
4
|
+
data.tar.gz: 02cb9b83d920882d11e75f678c32dd3239459533c9241aab351ef1edbc02c6fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 917708f2dc15758bfefb2f49baa33290057d01e5d4d2be1fd78e2f2bd9d3f4ca89cf5a2383f0ad060b2cd08f646a1a735c351843cd10b6a2867037f2261fe218
|
7
|
+
data.tar.gz: 93aeab81b46ed7b211e0da2452c8cf5fde102fe458750b83425dc62e4462ca54b9bed88f2a91311c635a8483c0a019f89204eee4f46ddd392c99531bb4797ee4
|
data/lib/glogin/cookie.rb
CHANGED
@@ -91,15 +91,10 @@ module GLogin
|
|
91
91
|
def initialize(json, secret, context = '')
|
92
92
|
raise 'JSON can\'t be nil' if json.nil?
|
93
93
|
raise 'JSON must contain "id" key' if json['id'].nil?
|
94
|
-
json.
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
end
|
99
|
-
@id = json['id']
|
100
|
-
@login = json['login'] || ''
|
101
|
-
@avatar_url = json['avatar_url'] || ''
|
102
|
-
@bearer = json['bearer'] || ''
|
94
|
+
@id = json['id'].to_s
|
95
|
+
@login = (json['login'] || '').to_s
|
96
|
+
@avatar_url = (json['avatar_url'] || '').to_s
|
97
|
+
@bearer = (json['bearer'] || '').to_s
|
103
98
|
raise 'Secret can\'t be nil' if secret.nil?
|
104
99
|
@secret = secret
|
105
100
|
raise 'Context can\'t be nil' if context.nil?
|
data/lib/glogin/version.rb
CHANGED
data/test/glogin/test_cookie.rb
CHANGED
@@ -30,7 +30,7 @@ class TestCookie < Minitest::Test
|
|
30
30
|
user = GLogin::Cookie::Closed.new(
|
31
31
|
GLogin::Cookie::Open.new(
|
32
32
|
JSON.parse(
|
33
|
-
"{\"id\":123,
|
33
|
+
"{\"id\":123,\"node_id\":\"how are you?\",
|
34
34
|
\"login\":\"yegor256\",
|
35
35
|
\"avatar_url\":\"https://avatars1.githubusercontent.com/u/526301\"}"
|
36
36
|
),
|