Skip to content
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

Merged
merged 25 commits into from Jul 13, 2023
Merged

πŸ“„ New docs πŸŽ‰ #1517

merged 25 commits into from Jul 13, 2023

Conversation

iMacTia
Copy link
Member

@iMacTia iMacTia commented Jul 11, 2023

Description

Introduces a new Faraday Docs website based on docsify.js πŸŽ‰

  • Improved structure with sidebar "table of contents" menu πŸ—‚οΈ
  • Light/Dark Theme 🌞 πŸŒ”
  • Search bar πŸ”
  • Improved pages and examples πŸ“
  • Simplified dependencies (no more jekyll) πŸ“¦

@iMacTia iMacTia self-assigned this Jul 11, 2023
Copy link
Member

@olleolleolle olleolleolle left a 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/index.md Outdated Show resolved Hide resolved
# 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|
Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Member Author

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'
Copy link
Member

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.

Copy link
Member Author

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

| `: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. |
Copy link
Member

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?

Copy link
Member Author

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 πŸ˜„

Copy link
Member

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
Copy link
Member

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?

Copy link
Contributor

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?

Copy link
Member

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?

docs/customization/ssl-options.md Outdated Show resolved Hide resolved
docs/customization/ssl-options.md Outdated Show resolved Hide resolved
docs/customization/ssl-options.md Outdated Show resolved Hide resolved
docs/customization/ssl-options.md Outdated Show resolved Hide resolved
docs/getting-started/env-object.md Outdated Show resolved Hide resolved
iMacTia and others added 2 commits July 12, 2023 13:36
Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
Copy link
Member

@olleolleolle olleolleolle left a 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!

@iMacTia iMacTia merged commit 17d586c into main Jul 13, 2023
8 checks passed
@iMacTia iMacTia deleted the new-docs branch November 21, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants