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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 238f893678a011e6e7b020981ecce10c7bd19f20
4
- data.tar.gz: 4680f82a6c79dfbe07b99aa5cff2f3442cde6a73
3
+ metadata.gz: 253752ae142ea006ae9d284ff50a3d7147a53888
4
+ data.tar.gz: 67a38f1fcec962dff5c5ea6d1aa8471fa302a17c
5
5
  SHA512:
6
- metadata.gz: 2fed9ab65f06a9bb1be2cd5ede6a00fe2bab6189f8efd9216fed7616edcff256622e1211787be521860f5c786f6b780d87c1cc314498053d9a07c634cd1d4499
7
- data.tar.gz: 47d82fd369ec3f2b06bc25e2360bdcb342274bdb7be282bd5c38052a4dfdc06f04faf9c49301cb8ce72a0383f852b1b9457e2508919df958071bb0bc02fd051f
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 refresh_access_token(opts={})
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
- token = opts[:params].delete(:refresh_token)
90
- refresh_token.get_token(token, opts)
86
+ refresh_token.get_token(ref_token, opts)
91
87
  end
92
88
  end
93
89
  end
@@ -1,5 +1,5 @@
1
1
  module Plangrade
2
2
  module Ruby
3
- VERSION = "0.4.5"
3
+ VERSION = "0.4.6"
4
4
  end
5
5
  end
@@ -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.refresh_access_token(
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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plangrade-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Plangrade Inc
metadata.gz.sig CHANGED
Binary file