From 4407893c2d62b991e186752de218a04d67d6ae68 Mon Sep 17 00:00:00 2001 From: MaicolBen Date: Sat, 14 Apr 2018 20:16:33 -0300 Subject: [PATCH] Update gitbook docs link --- .gitbook.yaml | 5 +++++ README.md | 2 +- SUMMARY.md | 11 +++-------- docs/config/README.md | 2 +- docs/installation.md | 13 +++++++++++++ docs/security.md | 2 +- docs/usage/testing.md | 8 ++++---- 7 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 .gitbook.yaml create mode 100644 docs/installation.md diff --git a/.gitbook.yaml b/.gitbook.yaml new file mode 100644 index 000000000..5920a2639 --- /dev/null +++ b/.gitbook.yaml @@ -0,0 +1,5 @@ +--- +root: ./ +structure: + readme: ./docs/installation.md + summary: SUMMARY.md diff --git a/README.md b/README.md index 3182172fe..ba41ea8c5 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Then install the gem using bundle: bundle install ~~~ -## [Docs](https://maicolben.gitbooks.io/devise-token-auth/content/docs/config/) +## [Docs](https://devise-token-auth.gitbook.io/devise-token-auth) ## Need help? diff --git a/SUMMARY.md b/SUMMARY.md index a2cd8182b..b8ae69915 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -1,18 +1,13 @@ # Summary -* Introduction - * [Installation](README.md#installation) - * [Need help?](README.md#need-help) - * [Live demos](README.md#live-demos) -* Configuration - * [Introduction](docs/config/README.md) +* [Installation](docs/installation.md) +* [Configuration](docs/config/README.md) * [Initializer Settings](docs/config/initialization.md) * [OmniAuth](docs/config/omniauth.md) * [Email Authentication](docs/config/email_auth.md) * [Customizing Devise Verbiage](docs/config/devise.md) * [Cross Origin Requests (CORS)](docs/config/cors.md) -* Usage - * [Introduction](docs/usage/README.md) +* [Usage](docs/usage/README.md) * [Mounting Routes](docs/usage/routes.md) * [Controller Integration](docs/usage/controller_methods.md) * [Model Integration](docs/usage/model_concerns.md) diff --git a/docs/config/README.md b/docs/config/README.md index 6ea0faaee..3b0df915b 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -39,5 +39,5 @@ You may also need to configure the following items: * **OmniAuth providers** when using 3rd party oauth2 authentication. [Read more](omniauth.md). * **Cross Origin Request Settings** when using cross-domain clients. [Read more](cors.md). -* **Email** when using email registration. [Read more](email-auth.md). +* **Email** when using email registration. [Read more](email_auth.md). * **Multiple model support** may require additional steps. [Read more](/docs/usage/multiple_models.md). diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 000000000..c0cec7628 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,13 @@ +## Installation + +Add the following to your `Gemfile`: + +~~~ruby +gem 'devise_token_auth' +~~~ + +Then install the gem using bundle: + +~~~bash +bundle install +~~~ diff --git a/docs/security.md b/docs/security.md index a339d6758..c10d3dddf 100644 --- a/docs/security.md +++ b/docs/security.md @@ -3,7 +3,7 @@ This gem takes the following steps to ensure security. This gem uses auth tokens that are: -* [changed after every request](#about-token-management) (can be [turned off](https://github.com/lynndylanhurley/devise_token_auth/#initializer-settings)), +* [changed after every request](/docs/conceptual.md#about-token-management) (can be [turned off](https://github.com/lynndylanhurley/devise_token_auth/#initializer-settings)), * [of cryptographic strength](https://ruby-doc.org/stdlib-2.1.0/libdoc/securerandom/rdoc/SecureRandom.html), * hashed using [BCrypt](https://github.com/codahale/bcrypt-ruby) (not stored in plain-text), * securely compared (to protect against timing attacks), diff --git a/docs/usage/testing.md b/docs/usage/testing.md index d8a2ed134..9192b184c 100644 --- a/docs/usage/testing.md +++ b/docs/usage/testing.md @@ -65,9 +65,9 @@ describe 'Whether access is ocurring properly', type: :request do login auth_params = get_auth_params_from_login_response_headers(response).tap do |h| h.each do |k, _v| - if k == 'access-token' - h[k] = '123' - end end + if k == 'access-token' + h[k] = '123' + end end end new_client = FactoryBot.create(:client) get api_find_client_by_name_path(new_client.name), headers: auth_params @@ -125,7 +125,7 @@ end ``` -### (b) How to create an authorisation header from Scratch +### (b) How to create an authorization header from Scratch ```ruby require 'rails_helper'