lib/awestruct/cli/auto.rb in awestruct-0.4.2.x9 vs lib/awestruct/cli/auto.rb in awestruct-0.4.2.x10

- old
+ new

@@ -9,11 +9,12 @@ def initialize(config) @config = config end def run() - listener = Listen.to( @config.dir, :relative_paths=>true ) + force_polling = ( RUBY_PLATFORM =~ /mingw/ ? true : false ) + listener = Listen.to( @config.dir, :relative_paths=>true, :latency=>0.5, :force_polling=>force_polling ) listener.ignore( %r(\.awestruct) ) listener.ignore( %r(^#{File.basename( @config.tmp_dir )}) ) listener.ignore( %r(^#{File.basename( @config.output_dir )}) ) listener.change do |modified, added, removed| modified.each do |path| @@ -21,10 +22,10 @@ unless ( path =~ %r(#{File.basename( engine.config.output_dir) }) || path =~ /.awestruct/ ) engine.generate_page_by_output_path( path ) end end end - listener.start( false ) + listener.start(false) end end end