From baec1f93d012cec60722aaba5ee5ce51023df9d0 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 8 Jan 2024 17:13:43 -0300 Subject: [PATCH] feat: docs --- .gitignore | 2 ++ Gemfile | 1 + Gemfile.lock | 2 ++ README.md | 21 +++++++++++++++++++++ Taskfile.yaml | 6 ++++++ 5 files changed, 32 insertions(+) diff --git a/.gitignore b/.gitignore index 18d02ded..ec350559 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,5 @@ yarn-debug.log* .yarn-integrity /.task +/.yardoc +/public/doc/ diff --git a/Gemfile b/Gemfile index 37bcd949..03da906d 100644 --- a/Gemfile +++ b/Gemfile @@ -116,6 +116,7 @@ group :development, :test do end group :development do + gem 'yard' gem 'brakeman' gem 'haml-lint', require: false gem 'letter_opener' diff --git a/Gemfile.lock b/Gemfile.lock index b63a806a..5be5a103 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -574,6 +574,7 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) + yard (0.9.34) zeitwerk (2.6.8) PLATFORMS @@ -669,6 +670,7 @@ DEPENDENCIES web-console webpacker yaml_db! + yard RUBY VERSION ruby 3.1.4p223 diff --git a/README.md b/README.md index 6ec288b8..6fefe82f 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,16 @@ instalación (en inglés)](https://taskfile.dev/installation/) go-task ``` +### Documentación + +Para navegar la documentación del código usando YARD: + +```bash +go-task doc serve +``` + +Y luego navegar a + ## English Sutty is a platform for hosting safer, faster and more resilient @@ -51,3 +61,14 @@ instructions](https://taskfile.dev/installation/). ```bash go-task ``` + +### Documentation + +To browse documentation using YARD: + +```bash +go-task doc serve +``` + +And then open + diff --git a/Taskfile.yaml b/Taskfile.yaml index 576c5f1c..8d95e302 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -114,3 +114,9 @@ tasks: status: - "test -f tmp/pids/server.pid" - "pgrep -F tmp/pids/server.pid" + doc: + desc: "Build documentation" + deps: + - "gems" + cmds: + - "{{.HAINISH}} bundle exec yardoc -o public/doc app lib config db"