Skip to content

Commit

Permalink
Add EditorConfig file
Browse files Browse the repository at this point in the history
Resolve issues.

More info here: https://editorconfig.org/
  • Loading branch information
AlexWayfer authored and olleolleolle committed Apr 19, 2020
1 parent c26df87 commit 680b9f8
Show file tree
Hide file tree
Showing 18 changed files with 74 additions and 67 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
2 changes: 1 addition & 1 deletion .rspec
@@ -1,3 +1,3 @@
--require spec_helper
--format documentation
--color
--color
2 changes: 1 addition & 1 deletion .yardopts
Expand Up @@ -9,4 +9,4 @@

lib/**/*.rb
-
CHANGELOG.md
CHANGELOG.md
1 change: 0 additions & 1 deletion UPGRADING.md
Expand Up @@ -57,4 +57,3 @@ conn = Faraday.new(...) do |f|
f.adapter AnyAdapter
end
```

2 changes: 1 addition & 1 deletion docs/README.md
Expand Up @@ -16,4 +16,4 @@ $ bundle exec jekyll serve
# The site will now be reachable at http://127.0.0.1:4000/faraday/
```

[website]: https://lostisland.github.io/faraday
[website]: https://lostisland.github.io/faraday
2 changes: 1 addition & 1 deletion docs/_includes/docs_nav.md
Expand Up @@ -15,4 +15,4 @@
<a href="{{ page.next_link }}">{{ page.next_name }} <i class="fa fa-angle-right"></i></a>
{% endif %}
</p>
</div>
</div>
2 changes: 1 addition & 1 deletion docs/_includes/footer.html
Expand Up @@ -18,4 +18,4 @@
inputSelector: '#search-box',
debug: false // Set debug to true if you want to inspect the dropdown
});
</script>
</script>
92 changes: 46 additions & 46 deletions docs/_includes/header.html
@@ -1,50 +1,50 @@
<!-- This is extracted directly from https://github.com/rohanchandra/type-theme/blob/c6ec5a69ff7dfe2df193be08515193c72bd4a55d/_includes/header.html
for customization (DocSearch feature) -->
<header class="site-header">
<div class="branding">
{% if site.theme_settings.gravatar %}
<a href="{{ site.baseurl }}/">
<img class="avatar" src="https://secure.gravatar.com/avatar/{{ site.theme_settings.gravatar }}?s=100" alt=""/>
</a>
{% elsif site.theme_settings.avatar %}
<a href="{{ site.baseurl }}/">
<img class="avatar" src="{{ site.baseurl }}/{{ site.theme_settings.avatar }}" alt=""/>
</a>
{% endif %}
<h1 class="site-title">
<a href="{{ site.baseurl }}/">{{ site.theme_settings.title }}</a>
</h1>
</div>
<nav class="site-nav">
<ul>
{% if site.theme_settings.site_navigation_sort %}
{% assign site_pages = site.pages | sort: site.theme_settings.site_navigation_sort %}
{% else %}
{% assign site_pages = site.pages %}
{% endif %}
{% for page in site_pages %}
{% if page.title and page.hide != true %}
<li>
<a class="page-link" href="{{ page.url | relative_url }}">
{{ page.title }}
</a>
</li>
{% endif %}
{% endfor %}
<!-- Social icons from Font Awesome, if enabled -->
{% include icons.html %}
<div class="branding">
{% if site.theme_settings.gravatar %}
<a href="{{ site.baseurl }}/">
<img class="avatar" src="https://secure.gravatar.com/avatar/{{ site.theme_settings.gravatar }}?s=100" alt=""/>
</a>
{% elsif site.theme_settings.avatar %}
<a href="{{ site.baseurl }}/">
<img class="avatar" src="{{ site.baseurl }}/{{ site.theme_settings.avatar }}" alt=""/>
</a>
{% endif %}
<h1 class="site-title">
<a href="{{ site.baseurl }}/">{{ site.theme_settings.title }}</a>
</h1>
</div>
<nav class="site-nav">
<ul>
{% if site.theme_settings.site_navigation_sort %}
{% assign site_pages = site.pages | sort: site.theme_settings.site_navigation_sort %}
{% else %}
{% assign site_pages = site.pages %}
{% endif %}
{% for page in site_pages %}
{% if page.title and page.hide != true %}
<li>
<a class="page-link" href="{{ page.url | relative_url }}">
{{ page.title }}
</a>
</li>
{% endif %}
{% endfor %}
<!-- Social icons from Font Awesome, if enabled -->
{% include icons.html %}

<!-- Search bar -->
{% if site.theme_settings.search %}
<li>
<form action="{{ site.baseurl }}/search.html" method="get">
<input type="text" id="search-box" name="query" placeholder="Search" class="">
<button type="submit" class="">
<i class="fa fa-fw fa-search"></i>
</button>
</form>
</li>
{% endif %}
<!-- Search bar -->
{% if site.theme_settings.search %}
<li>
<form action="{{ site.baseurl }}/search.html" method="get">
<input type="text" id="search-box" name="query" placeholder="Search" class="">
<button type="submit" class="">
<i class="fa fa-fw fa-search"></i>
</button>
</form>
</li>
{% endif %}
<li>
<form id="search-form">
<input type="text" id="search-box" placeholder="Search">
Expand All @@ -53,7 +53,7 @@ <h1 class="site-title">
</button>
</form>
</li>
</ul>
</nav>
</ul>
</nav>

</header>
</header>
2 changes: 1 addition & 1 deletion docs/_sass/_variables.scss
Expand Up @@ -6,4 +6,4 @@ $link-color: #EE4266;
$text-color: #3C3C3C;
$font-family-main: 'KohinoorTelugu-Regular', Helvetica, Arial, sans-serif;
$font-family-headings: 'Raleway', Helvetica, Arial, sans-serif;
$search-color: #EE4266;
$search-color: #EE4266;
1 change: 0 additions & 1 deletion docs/_sass/faraday.sass
Expand Up @@ -127,4 +127,3 @@ footer
// when needing search usually
@media screen and (max-width: 800px)
display: none

2 changes: 1 addition & 1 deletion docs/assets/css/main.scss
Expand Up @@ -4,4 +4,4 @@
@import "variables";
@import "type-theme";
@import "faraday";
@import "https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css"
@import "https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css"
2 changes: 1 addition & 1 deletion docs/assets/js/team.js
Expand Up @@ -46,4 +46,4 @@ fetch('https://api.github.com/repos/lostisland/faraday/stats/contributors')
hideLoader();
showTeam();
});
});
});
2 changes: 1 addition & 1 deletion docs/middleware/list.md
Expand Up @@ -13,7 +13,7 @@ Faraday ships with some useful middleware that you can use to customize your req
Middleware are separated into two macro-categories: **Request Middleware** and **Response Middleware**.
The former usually deal with the request, encoding the parameters or setting headers.
The latter instead activate after the request is completed and a response has been received, like
parsing the response body, logging useful info or checking the response status.
parsing the response body, logging useful info or checking the response status.

### Request Middleware

Expand Down
2 changes: 1 addition & 1 deletion docs/middleware/request/authentication.md
Expand Up @@ -27,4 +27,4 @@ end
Faraday.new(...) do |conn|
conn.token_auth('authentication-token')
end
```
```
8 changes: 4 additions & 4 deletions docs/middleware/request/multipart.md
Expand Up @@ -25,7 +25,7 @@ can be specified with a String path to a local file, or an IO object.
* `Faraday::ParamPart` wraps a String value with a Content-Type, and optionally
a Content-ID.

Note: `Faraday::ParamPart` was added in Faraday v0.16.0. Before that,
Note: `Faraday::ParamPart` was added in Faraday v0.16.0. Before that,
`Faraday::FilePart` was called `Faraday::UploadIO`.

### Example Usage
Expand All @@ -47,13 +47,13 @@ payload = { string: 'value' }
payload[:file] = Faraday::FilePart.new(__FILE__, 'text/x-ruby')

# specify filename because IO object doesn't know it
payload[:file_with_name] = Faraday::FilePart.new(File.open(__FILE__),
'text/x-ruby',
payload[:file_with_name] = Faraday::FilePart.new(File.open(__FILE__),
'text/x-ruby',
File.basename(__FILE__))

# Sets a custom Content-Disposition:
# nil filename still defaults to File.basename(__FILE__)
payload[:file_with_header] = Faraday::FilePart.new(__FILE__,
payload[:file_with_header] = Faraday::FilePart.new(__FILE__,
'text/x-ruby', nil,
'Content-Disposition' => 'form-data; foo=1')

Expand Down
2 changes: 1 addition & 1 deletion docs/middleware/request/retry.md
Expand Up @@ -120,7 +120,7 @@ response_statuses = []
retry_options = {
retry_block: -> (env, options, retries, exc) { response_statuses << env.status }
}
```
```


[raise_error]: ../middleware/raise-error
6 changes: 3 additions & 3 deletions docs/middleware/response/logger.md
Expand Up @@ -86,7 +86,7 @@ end

You can also provide a custom formatter to control how requests and responses are logged.
Any custom formatter MUST implement the `request` and `response` method, with one argument which
will be passed being the Faraday environment.
will be passed being the Faraday environment.
If you make your formatter inheriting from `Faraday::Response::Logger::Formatter`,
then the methods `debug`, `info`, `warn`, `error` and `fatal` are automatically delegated to the logger.

Expand All @@ -98,12 +98,12 @@ class MyFormatter < Faraday::Logging::Formatter
end

def response(env)
# Build a custom message using `env`
# Build a custom message using `env`
info('Response') { 'Response Received' }
end
end

conn = Faraday.new(url: 'http://sushi.com/api_key=s3cr3t') do |faraday|
faraday.response :logger, nil, formatter: MyFormatter
end
```
```
2 changes: 1 addition & 1 deletion docs/middleware/response/raise_error.md
Expand Up @@ -19,7 +19,7 @@ begin
rescue Faraday::ResourceNotFound => e
e.response[:status] #=> 404
e.response[:headers] #=> { ... }
e.response[:body] #=> "..."
e.response[:body] #=> "..."
end
```

Expand Down

0 comments on commit 680b9f8

Please sign in to comment.