-
Notifications
You must be signed in to change notification settings - Fork 14
Add a refresh token option in the client class #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
spec/feedlr/client_spec.rb
Outdated
|
||
it 'runs a request to refresh the token' do | ||
expect(Feedlr::Request) | ||
.to receive(:new).with(arguments).and_return(request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Place the . on the previous line, together with the method call receiver.
spec/feedlr/client_spec.rb
Outdated
end | ||
let(:request) { Feedlr::Request.new(arguments) } | ||
|
||
it 'runs a request to refresh the token' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
spec/feedlr/client_spec.rb
Outdated
{ | ||
client: client, | ||
method: :post, | ||
path: '/auth/token', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
spec/feedlr/client_spec.rb
Outdated
refresh_token: refresh_oauth_token, | ||
client_id: 'feedlydev', | ||
client_secret: 'feedlydev', | ||
grant_type: 'refresh_token', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
spec/feedlr/client_spec.rb
Outdated
{ | ||
refresh_token: refresh_oauth_token, | ||
client_id: 'feedlydev', | ||
client_secret: 'feedlydev', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
spec/feedlr/client_spec.rb
Outdated
|
||
describe '#oauth_refresh_token' do | ||
it 'should default to Feedlr.oauth_refresh_token if not set' do | ||
Feedlr.configure { |c| c.oauth_refresh_token = 'test' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
spec/feedlr/client_spec.rb
Outdated
end | ||
|
||
describe '#oauth_refresh_token' do | ||
it 'should default to Feedlr.oauth_refresh_token if not set' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
spec/feedlr/client_spec.rb
Outdated
end | ||
end | ||
|
||
describe '#oauth_refresh_token' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
lib/feedlr/client.rb
Outdated
client: self, | ||
method: :post, | ||
path: '/auth/token', | ||
params: params).perform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closing method call brace must be on the line after the last argument when opening brace is on a separate line from the first argument.
lib/feedlr/client.rb
Outdated
Request.new( | ||
client: self, | ||
method: :post, | ||
path: '/auth/token', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
a54f41a
to
30406a3
Compare
No description provided.