finnegans 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/finnegans/client.rb +7 -3
- data/lib/finnegans/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db790653a5f6d25618f93b2313dcdeedffa46a78
|
4
|
+
data.tar.gz: b6b7c19c330acd20747b53d3d4761dd4938c32bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0dc56a9277c919f113791b24ae07a37c1fd25f6377e0e6079afc8769eecefc83bd5458c2760635cb18045579685df0f646219496bfb71c988fa54cc4718250b
|
7
|
+
data.tar.gz: 17bd69a3f393036b0ba2a00b43d88cbeb82759a4cb600f390f0b1cdf3e1c66e66a50231fd53590e4ad12bdcc9b2a9930d32209b466823ba63993568db8a6a191
|
data/Gemfile.lock
CHANGED
data/lib/finnegans/client.rb
CHANGED
@@ -58,6 +58,10 @@ module Finnegans
|
|
58
58
|
|
59
59
|
attr_reader :client_secret, :access_token
|
60
60
|
|
61
|
+
def access_token=(value)
|
62
|
+
@access_token = value
|
63
|
+
end
|
64
|
+
|
61
65
|
def authenticate
|
62
66
|
begin
|
63
67
|
authenticate!
|
@@ -69,11 +73,11 @@ module Finnegans
|
|
69
73
|
def authenticate!
|
70
74
|
return if ready?
|
71
75
|
|
72
|
-
(
|
76
|
+
(self.access_token = get_access_token) && nil
|
73
77
|
end
|
74
78
|
|
75
79
|
def ready?
|
76
|
-
|
80
|
+
!!access_token
|
77
81
|
end
|
78
82
|
|
79
83
|
def catalog(refresh: false)
|
@@ -106,7 +110,7 @@ module Finnegans
|
|
106
110
|
end
|
107
111
|
|
108
112
|
def refresh_authentication!
|
109
|
-
|
113
|
+
self.access_token = refresh_access_token
|
110
114
|
end
|
111
115
|
|
112
116
|
def defined_resources
|
data/lib/finnegans/version.rb
CHANGED