-
Notifications
You must be signed in to change notification settings - Fork 988
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
π New docs π #1517
π New docs π #1517
Conversation
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.
Very nice!
docs/adapters/custom/streaming.md
Outdated
# Set a callback which will receive tuples of chunk Strings, | ||
# the sum of characters received so far, and the response environment. | ||
# The latter will allow access to the response status, headers and reason, as well as the request info. | ||
req.options.on_data = Proc.new do |chunk, overall_received_bytes, env| |
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.
Perhaps proc {
could be a shorter syntax?
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.
I might be wrong but I think using proc do
might not behave the same way for missing parameters?
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.
nope, double-checked and I got confused with lambda
(I can almost never remember these correctly π ).
As of Ruby 1.9 (so for quite a while!!) proc
has been an alias for Proc.new
π
require 'faraday_specs_setup' | ||
|
||
RSpec.describe Faraday::Adapter::FlorpHttp do | ||
it_behaves_like 'an adapter' |
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.
Just now came to think of that we could have called it a Faraday adapter
.
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.
That would have been much smarter π
Luckily, it shouldn't cause issues since this would only be loaded in faraday adapter repositories
docs/adapters/custom/testing.md
Outdated
| `:reason_phrase_parse` | Tests that your adapter supports parsing the `reason_phrase` from the response. | | ||
| `:compression` | Tests that your adapter can handle `gzip` and `defalte` compressions. | | ||
| `:streaming` | Tests that your adapter supports streaming responses. See [Streaming][streaming] for more details. | | ||
| `:parallel` | Tests that your adapter supports parallel requests. See [Parallel requests][parallel] for more details. | |
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.
Are these table rows sorted in any specific way?
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.
Not really! Open to suggestions π
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.
- in order of appearance
- in A-Z order
Async do | ||
Async { conn.get('/delay/3') } | ||
Async { conn.get('/delay/3') } | ||
end |
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.
@ioquatix π Is this example still good?
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.
Yeah it's reasonable. We could always do something more elaborate but maybe that's for a separate document or part of the document?
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.
Perhaps a link to the adapter's repo?
Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
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.
Alright, we are at the goal!
Description
Introduces a new Faraday Docs website based on docsify.js π