glogin 0.16.2 → 0.16.3

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: 7add4a0060296c5a54d007c99c6aa47d66ca034412e742a8cff753b27929510e
4
- data.tar.gz: 99c4ab32611b03ad386803d71c623efbfcdc7c1cb6e7256aec9b03ba119e8a3f
3
+ metadata.gz: eda8e66e30f5f90d9a125ca84f104c5bddaf38f9b0ac2381935ee9dac92aff70
4
+ data.tar.gz: 74d58b5818dbd3f0809336de8895866aa8d9f1a01aa326ba1f1d73fc1383ebab
5
5
  SHA512:
6
- metadata.gz: 4e904da86505aac96eef855769f5c97adab7be319c66205adb7147d26af49426982dd137da54809b19915808e65d6420bafb414dc7e586ebc77aafa827d5851e
7
- data.tar.gz: 6ed925cd140812eb2b37ad87802d093a82c6c6545f1a77bf5b11e67c0f96e4bd30df2cc0eb903e2c3b10093645db426ffdfa4e56c64b839148afd5dac3668ead
6
+ metadata.gz: 63ec19df364df3d7db038e71798dff21713df174ecbddb3ef8e26de8a0a76d2c39efaed520809252bf42f0bbf077fd3628f65e006126a56e64ba8fe19700233d
7
+ data.tar.gz: 280d55cd553045833c0fb23e58918db97659a7f270efa1837223f2d02b781a5e9a60b7db5b96f86aaf9eb4b6fa897d147de5f258c0ecf55c9e4b545fd40a235f
data/Gemfile CHANGED
@@ -29,6 +29,6 @@ gem 'rake', '13.2.1', require: false
29
29
  gem 'rdoc', '6.7.0', require: false
30
30
  gem 'rspec-rails', '6.1.3', require: false
31
31
  gem 'rubocop', '1.65.0', require: false
32
- gem 'rubocop-rspec', '3.0.2', require: false
32
+ gem 'rubocop-rspec', '3.0.3', require: false
33
33
  gem 'simplecov', '0.22.0', require: false
34
34
  gem 'webmock', '3.23.1', require: false
data/lib/glogin/cookie.rb CHANGED
@@ -92,9 +92,9 @@ module GLogin
92
92
  raise 'JSON can\'t be nil' if json.nil?
93
93
  raise 'JSON must contain "id" key' if json['id'].nil?
94
94
  json.each do |k, v|
95
- raise "Key #{k} is not a string" unless k.is_a?(String)
96
- raise "Key #{k} is not allowed" unless %w[id login avatar_url bearer].include?(k)
97
- raise "Value #{v} is not a string" unless v.is_a?(String)
95
+ raise "The key #{k} is not a string" unless k.is_a?(String)
96
+ raise "The key #{k} is not allowed" unless %w[id login avatar_url bearer].include?(k)
97
+ raise "The value '#{v}' of #{k} is not String or Integer" unless v.is_a?(String) || v.is_a?(Integer)
98
98
  end
99
99
  @id = json['id']
100
100
  @login = json['login'] || ''
@@ -26,5 +26,5 @@
26
26
  # Copyright:: Copyright (c) 2017-2024 Yegor Bugayenko
27
27
  # License:: MIT
28
28
  module GLogin
29
- VERSION = '0.16.2'
29
+ VERSION = '0.16.3'
30
30
  end
@@ -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,
34
34
  \"login\":\"yegor256\",
35
35
  \"avatar_url\":\"https://avatars1.githubusercontent.com/u/526301\"}"
36
36
  ),
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glogin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.2
4
+ version: 0.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-11 00:00:00.000000000 Z
11
+ date: 2024-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base58