tml 4.3.8 → 4.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tml/api/client.rb +1 -13
- data/lib/tml/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: a766ff87d61d364fb1f5296ee8db8a7bee43a07c
|
4
|
+
data.tar.gz: 526bc06c8fc67615ea4367a2a8c271f4fe18d246
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf6b37af75c30ca3e074ff60184df0fb187cbaa4bf65c5833c7fa8115b8ecdb66782e404cb82c96feb1eec464ae59f317f4f97242df42dc8d6fde09d499d7fa2
|
7
|
+
data.tar.gz: f66818fce6aea3bea1791ca49834202dedbc3520abfafbc98f581b89d6a3d3e58f7486907ffd96a718d53725a597c7800cde1ed7c88af5894150433defc3bba6
|
data/lib/tml/api/client.rb
CHANGED
@@ -39,19 +39,7 @@ class Tml::Api::Client < Tml::Base
|
|
39
39
|
attributes :application
|
40
40
|
|
41
41
|
def access_token
|
42
|
-
|
43
|
-
|
44
|
-
application.access_token ||= begin
|
45
|
-
token = Tml.cache.fetch("#{application.key}/access_token") do
|
46
|
-
api('oauth/token', {
|
47
|
-
:client_id => application.key,
|
48
|
-
:client_secret => application.secret,
|
49
|
-
:grant_type => :client_credentials
|
50
|
-
}, {:method => :post})
|
51
|
-
end
|
52
|
-
Tml::Session.access_token = token['access_token']
|
53
|
-
Tml::Session.access_token
|
54
|
-
end
|
42
|
+
Tml.config.application[:token] || Tml.config.application[:access_token]
|
55
43
|
end
|
56
44
|
|
57
45
|
def results(path, params = {}, opts = {})
|
data/lib/tml/version.rb
CHANGED