-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathyard.rb
40 lines (29 loc) · 920 Bytes
/
yard.rb
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
38
39
40
# >---------------------------------[ Yard ]----------------------------------<
# Application template recipe. Check for a newer version here:
# https://github.com/fortuity/rails-template-recipes/blob/master/yard.rb
# Replaces RDoc with Yard for documentation.
if recipe_list.include? 'yard'
say_recipe 'yard'
gem 'yard', :group => [:development, :test]
gem 'yardstick', :group => [:development, :test]
run 'rm -rf /doc/'
say_wizard "generating a .yardopts file for yardoc configuration"
file '.yardopts',<<-RUBY
## --use-cache
--title #{app_name}
app/**/*.rb
config/routes.rb
lib/**/*.rb
README.textile
spec/
--exclude README.md --exclude LICENSE
RUBY
after_bundler do
run 'yardoc'
if extra_recipes.include? 'git'
git :tag => "yard_installation"
git :add => '.'
git :commit => "-am 'Installed Yard as an alternative to RDoc.'"
end
end
end