berkeley_library-location 4.0.0 → 4.1.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38e532bc61a09117863f2ac3583ec26735685d03b9a22ece2cc55a32490cc31e
|
4
|
+
data.tar.gz: 3cdec6c95056bdc388716b4153d46a6ea1e7dfd529fe18dc9660de32068bb55b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1883e646eab5646d0dcde57e88477d758b52939ab2b0f0033e7aecf1184c7a342ac0c339060cd2ead515ccdcd7005d84df6f6700cb0095955e4d817c9ca28fe7
|
7
|
+
data.tar.gz: fb64c8aa2204c0a60d36ae504d96c5e2e946e71517d4b9e11584f48f91b0bc3339dcece2e4f906145c866a124fe260117ba1849a87244eccb89bf3f7401aeed3
|
data/CHANGES.md
CHANGED
@@ -7,7 +7,7 @@ module BerkeleyLibrary
|
|
7
7
|
SUMMARY = 'Locaton-related utilities for the UC Berkeley Library'.freeze
|
8
8
|
DESCRIPTION = 'A collection of location-related utilities for the UC Berkeley Library'.freeze
|
9
9
|
LICENSE = 'MIT'.freeze
|
10
|
-
VERSION = '4.
|
10
|
+
VERSION = '4.1.0'.freeze
|
11
11
|
HOMEPAGE = 'https://github.com/BerkeleyLibrary/location'.freeze
|
12
12
|
end
|
13
13
|
end
|
@@ -10,6 +10,7 @@ module BerkeleyLibrary
|
|
10
10
|
attr_accessor :token
|
11
11
|
|
12
12
|
def initialize
|
13
|
+
# Sorry Rubocop - needs to be ||= because we're dealing with a singleton
|
13
14
|
# rubocop:disable Lint/DisjunctiveAssignmentInConstructor
|
14
15
|
@token ||= fetch_token
|
15
16
|
# rubocop:enable Lint/DisjunctiveAssignmentInConstructor:
|
@@ -29,18 +30,13 @@ module BerkeleyLibrary
|
|
29
30
|
JSON.parse(response.body, symbolize_names: true)
|
30
31
|
end
|
31
32
|
|
32
|
-
# def token
|
33
|
-
# @token = get_token if token_expired?
|
34
|
-
# @token
|
35
|
-
# end
|
36
|
-
|
37
33
|
def oclc_token_url
|
38
34
|
URI.parse("#{Config.token_uri}?#{URI.encode_www_form(token_params)}")
|
39
35
|
end
|
40
36
|
|
41
37
|
# Before every request check if the token is expired (OCLC tokens expire after 20 minutes)
|
42
38
|
def access_token
|
43
|
-
@token =
|
39
|
+
@token = fetch_token if token_expired?
|
44
40
|
@token[:access_token]
|
45
41
|
end
|
46
42
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: berkeley_library-location
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UC Berkeley Library IT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: berkeley_library-logging
|