Commit 74828ab8 by Dave Syer

Fix Guardfile

parent e157eb6f
require 'asciidoctor'
require 'erb'
require './src/main/ruby/readme.rb'
options = {:mkdirs => true, :safe => :unsafe, :attributes => 'linkcss'}
guard 'shell' do
watch(/^[A-Za-z].*\.adoc$/) {|m|
Asciidoctor.render_file('src/main/asciidoc/README.adoc', options.merge(:to_file => './README.md'))
watch(/^src\/[A-Za-z].*\.adoc$/) {|m|
SpringCloud::Build.render_file('src/main/asciidoc/README.adoc', :to_file => './README.adoc')
Asciidoctor.render_file('src/main/asciidoc/spring-cloud-netflix.adoc', options.merge(:to_dir => 'target/generated-docs'))
}
end
......@@ -41,8 +41,9 @@ module SpringCloud
unless options[:to_file]
puts out
else
writer = File.new(options[:to_file],'w+')
out.each { |line| writer.write(line) }
File.open(options[:to_file],'w+') do |file|
out.each { |line| file.write(line) }
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment