mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00
Extend list of files to watch to regen docs
Now updating these files will regenerate the docs: * NEWS.md * .yardopts * docs/ * .rb, .js, .css, and .erb files inside of doc_config/
This commit is contained in:
parent
6f8b7e15fe
commit
e224e1dd88
1 changed files with 10 additions and 17 deletions
|
@ -39,29 +39,22 @@ module Shoulda
|
||||||
|
|
||||||
project_directory = File.expand_path(File.dirname(__FILE__) + "/..")
|
project_directory = File.expand_path(File.dirname(__FILE__) + "/..")
|
||||||
|
|
||||||
regenerate_docs = -> (base, relative) {
|
regenerate_docs = proc do
|
||||||
print 'Regenerating docs... '
|
print 'Regenerating docs... '
|
||||||
system('bundle exec yard doc &>/dev/null')
|
if system('bundle exec yard doc &>/dev/null')
|
||||||
puts 'done!'
|
puts 'done!'
|
||||||
}
|
else
|
||||||
|
print "\nCould not regenerate docs!!"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
regenerate_docs.call
|
||||||
|
|
||||||
puts 'Waiting for documentation files to change...'
|
puts 'Waiting for documentation files to change...'
|
||||||
|
|
||||||
FSSM.monitor do
|
FSSM.monitor do
|
||||||
path project_directory do
|
path project_directory do
|
||||||
glob 'README.md'
|
glob '{README.md,NEWS.md,.yardopts,docs/**/*.md,doc_config/yard/**/*.{rb,js,css,erb},lib/**/*.rb}'
|
||||||
create(®enerate_docs)
|
|
||||||
update(®enerate_docs)
|
|
||||||
end
|
|
||||||
|
|
||||||
path File.join(project_directory, 'doc_config/yard') do
|
|
||||||
glob '**/*.rb'
|
|
||||||
create(®enerate_docs)
|
|
||||||
update(®enerate_docs)
|
|
||||||
end
|
|
||||||
|
|
||||||
path File.join(project_directory, 'lib') do
|
|
||||||
glob '**/*.rb'
|
|
||||||
create(®enerate_docs)
|
create(®enerate_docs)
|
||||||
update(®enerate_docs)
|
update(®enerate_docs)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue