plangrade-ruby 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/plangrade/oauth2_client.rb +2 -6
- data/lib/plangrade/ruby/version.rb +1 -1
- data/spec/oauth2_client_spec.rb +1 -4
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 253752ae142ea006ae9d284ff50a3d7147a53888
|
4
|
+
data.tar.gz: 67a38f1fcec962dff5c5ea6d1aa8471fa302a17c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf07f9cc6cc1e01992d5a4e2a13a7d2092f3637cc2155685b53e351440b576ac999577aecf66c735cb5cccb57f2410852c62a6de7b8978225820a9270369a17a
|
7
|
+
data.tar.gz: c1187963b48af9535fc2d7ceb5b0d9b18cfb49c357bc42dec3a5a6ec8844370bf9fa8ab1bfee236c8a042ab93edc1b1b6d5c3adcba2e9a840962b93c510c73be
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -81,13 +81,9 @@ module Plangrade
|
|
81
81
|
|
82
82
|
# client_id={client_id}&refresh_token=G3Y6jU3a&grant_type=refresh_token&
|
83
83
|
# client_secret={client_secret}
|
84
|
-
def
|
85
|
-
unless (opts[:params] && opts[:params][:refresh_token])
|
86
|
-
raise ArgumentError.new("You must include a refresh_token as a parameter")
|
87
|
-
end
|
84
|
+
def refresh!(ref_token, opts={})
|
88
85
|
opts[:authenticate] ||= :body
|
89
|
-
|
90
|
-
refresh_token.get_token(token, opts)
|
86
|
+
refresh_token.get_token(ref_token, opts)
|
91
87
|
end
|
92
88
|
end
|
93
89
|
end
|
data/spec/oauth2_client_spec.rb
CHANGED
@@ -90,7 +90,6 @@ describe Plangrade::OAuth2Client do
|
|
90
90
|
:refresh_token => 'MmOGL795LbIZuJJVnL49Cc',
|
91
91
|
:client_id => 'PRbTcg9qjgKsp4jjpm1pw',
|
92
92
|
:client_secret => 'a2nQpcUm2Dgq1chWdAvbXGTk',
|
93
|
-
:redirect_uri => 'http://localhost:3000/callback'
|
94
93
|
},
|
95
94
|
:headers => {
|
96
95
|
'Accept' =>'application/json',
|
@@ -98,9 +97,7 @@ describe Plangrade::OAuth2Client do
|
|
98
97
|
'User-Agent' =>"Plangrade OAuth2 Client #{Plangrade::Ruby::VERSION}"
|
99
98
|
})
|
100
99
|
|
101
|
-
subject.
|
102
|
-
:params => {:refresh_token => 'MmOGL795LbIZuJJVnL49Cc', :redirect_uri => 'http://localhost:3000/callback'}
|
103
|
-
)
|
100
|
+
subject.refresh!('MmOGL795LbIZuJJVnL49Cc')
|
104
101
|
end
|
105
102
|
end
|
106
103
|
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|