From 6467849a6dfe44e9c68edb8bc15cffdfd04ca553 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Mon, 3 Dec 2018 17:51:04 +0500 Subject: [PATCH] Add YARD --- .gitignore | 4 ++++ .yardopts | 6 ++++++ Gemfile | 3 +++ Gemfile.lock | 2 ++ Rakefile | 7 +++++++ 5 files changed, 22 insertions(+) create mode 100644 .yardopts diff --git a/.gitignore b/.gitignore index 58c5e54..02c2ca0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,10 @@ # Ignore bundler config. /.bundle/ +# Ignore documentation. +/doc/ +/.yardoc/ + # Ignore all logfiles and tempfiles. /log/* /tmp/* diff --git a/.yardopts b/.yardopts new file mode 100644 index 0000000..0fd9e8d --- /dev/null +++ b/.yardopts @@ -0,0 +1,6 @@ +--markup markdown +--protected +--private +- +README.md +LICENSE diff --git a/Gemfile b/Gemfile index 897593b..83cab7c 100644 --- a/Gemfile +++ b/Gemfile @@ -138,6 +138,9 @@ group :development do # Automatically generate an entity-relationship diagram (ERD) # for your Rails models. gem 'rails-erd', '~> 1.5' + + # YARD is a documentation generation tool for the Ruby programming language. + gem 'yard', '~> 0.9' end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 01c51e4..c5a7380 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -359,6 +359,7 @@ GEM websocket-extensions (0.1.3) xpath (3.2.0) nokogiri (~> 1.8) + yard (0.9.16) PLATFORMS ruby @@ -406,6 +407,7 @@ DEPENDENCIES turbolinks (~> 5) uglifier (>= 1.3.0) web-console (>= 3.3.0) + yard (~> 0.9) RUBY VERSION ruby 2.5.1p57 diff --git a/Rakefile b/Rakefile index e1c8add..506aaa3 100644 --- a/Rakefile +++ b/Rakefile @@ -19,3 +19,10 @@ begin rescue LoadError nil end + +begin + require 'yard' + YARD::Rake::YardocTask.new +rescue LoadError + nil +end