-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathRakefile
More file actions
37 lines (31 loc) · 737 Bytes
/
Rakefile
File metadata and controls
37 lines (31 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# frozen_string_literal: true
require "bundler/setup"
require "bundler/gem_tasks"
require "rake/testtask"
require "standard/rake"
require "yard"
Rake::TestTask.new(:spec) do |t|
t.libs << "spec"
t.libs << "lib"
t.test_files = FileList["spec/**/*_spec.rb"]
t.warning = false
end
task test: :spec
task default: %i[spec standard]
namespace :doc do
desc "Build docs"
task :build do
sh "bundle exec yard doc"
end
desc "Generate docs and publish to gh-pages"
task :publish do
puts "Generating docs"
require "fileutils"
sh "yard doc"
sh "git checkout gh-pages"
sh "cp -R doc/* ."
sh "git commit -vam 'Update documentation'"
sh "git push origin gh-pages"
sh "git checkout -"
end
end