access_token_wrapper 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/access_token_wrapper.gemspec +4 -3
- data/lib/access_token_wrapper/base.rb +1 -1
- data/lib/access_token_wrapper/version.rb +1 -1
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41caff490861ec2790a54b80f5fb40bcc7d8eacf
|
4
|
+
data.tar.gz: 762c31fa85773bda6e1c6dcdb4148a90f5b1a18f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcf00843f23b13c5d6b4dd5ddf73cd4424b910c9e81e5e39d482efada0202981e4a9f1e9a1307243984f9a020b949d5987763718b2a5c68d7536096e212312b9
|
7
|
+
data.tar.gz: 10a125e2293eabfab24f92fc161f5cd573ff3d84f0b723db837ef2d5e786efff89179d88fed861b796c1bd67c153a25e561d3538914b2820881f55513acb57dc
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 0.2.1 (2018-01-23)
|
2
|
+
- [BUGFIX] Allow the request to fallback to the old style if no expires_at provided
|
3
|
+
|
1
4
|
## 0.2.0 (2018-01-16)
|
2
5
|
- [FEATURE] The library now checks the expires_at date of the token before attempting an API call.
|
3
6
|
- [BREAKING] The refresh callback now only optionally contains an exception, when an exception is raised, if the refresh is due to the expires_at field (which should be the majority of the time) it will be `nil`
|
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Bradley Priest"]
|
10
10
|
spec.email = ["bradley@tradegecko.com"]
|
11
11
|
spec.description = %q{Wrapper for OAuth2::Token to automatically refresh the expiry token when expired.}
|
12
|
-
spec.summary =
|
13
|
-
spec.homepage = ""
|
12
|
+
spec.summary = spec.description
|
13
|
+
spec.homepage = "https://github.com/tradegecko/access_token_wrapper"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
@@ -18,7 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "oauth2"
|
22
21
|
spec.add_development_dependency "bundler", "~> 1.3"
|
23
22
|
spec.add_development_dependency "rake"
|
23
|
+
|
24
|
+
spec.add_dependency "oauth2"
|
24
25
|
end
|
@@ -27,7 +27,7 @@ module AccessTokenWrapper
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def token_expiring?
|
30
|
-
@raw_token.expires_at < (Time.now.to_i + EXPIRY_GRACE_SEC)
|
30
|
+
@raw_token.expires_at && @raw_token.expires_at < (Time.now.to_i + EXPIRY_GRACE_SEC)
|
31
31
|
end
|
32
32
|
|
33
33
|
def respond_to_missing?(method_name, include_private = false)
|
metadata
CHANGED
@@ -1,51 +1,51 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: access_token_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bradley Priest
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
type: :
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: oauth2
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
|
-
type: :
|
48
|
+
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
@@ -73,7 +73,7 @@ files:
|
|
73
73
|
- lib/access_token_wrapper/version.rb
|
74
74
|
- test/base_test.rb
|
75
75
|
- test/test_helper.rb
|
76
|
-
homepage:
|
76
|
+
homepage: https://github.com/tradegecko/access_token_wrapper
|
77
77
|
licenses:
|
78
78
|
- MIT
|
79
79
|
metadata: {}
|