Sha256: a1b7716338e6917bd54f45d6c23b58294bc061fcbac2dfa921a3fbaa7beed968

Contents?: true

Size: 557 Bytes

Versions: 113

Compression:

Stored size: 557 Bytes

Contents

module Autotest::AutoUpdate
  @@sleep_time, @@update_cmd, @@updater = 60, "svn up", nil

  def self.sleep_time= o
    @@sleep_time = o
  end

  def self.update_cmd= o
    @@update_cmd = o
  end

  Autotest.add_hook :run_command do  |at|
    @@updater.kill if @@updater
  end

  Autotest.add_hook :ran_command do  |at|
    @@updater = Thread.start do
      loop do
        puts "# Waiting for #{@@sleep_time} seconds before updating"
        sleep @@sleep_time
        puts "# Running #{@@update_cmd}"
        system @@update_cmd
      end
    end
  end
end

Version data entries

113 entries across 109 versions & 16 rubygems

Version Path
vim-jar-0.0.3 bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/autotest/autoupdate.rb
vim-jar-0.0.2 bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/autotest/autoupdate.rb
vim-jar-0.0.1 bundler/ruby/1.8/gems/ZenTest-4.4.0/lib/autotest/autoupdate.rb
autotest-standalone-4.5.2 lib/autotest/autoupdate.rb
autotest-standalone-4.5.1 lib/autotest/autoupdate.rb
autotest-standalone-4.5.0 lib/autotest/autoupdate.rb
autotest-4.4.5 lib/autotest/autoupdate.rb
autotest-4.4.4 lib/autotest/autoupdate.rb
autotest-4.4.3 lib/autotest/autoupdate.rb
autotest-4.4.2 lib/autotest/autoupdate.rb
autotest-4.4.1 lib/autotest/autoupdate.rb
autotest-4.4.0 lib/autotest/autoupdate.rb
ZenTest-4.4.0 lib/autotest/autoupdate.rb
ZenTest-4.3.3 lib/autotest/autoupdate.rb
autotest-4.3.2 lib/autotest/autoupdate.rb
ZenTest-4.3.2 lib/autotest/autoupdate.rb
autotest-4.2.10 lib/autotest/autoupdate.rb
ZenTest-4.3.1 lib/autotest/autoupdate.rb
ZenTest-4.3.0 lib/autotest/autoupdate.rb
autotest-4.2.9 lib/autotest/autoupdate.rb