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
cloudsmith-api-0.44.4 vendor/bundle/ruby/2.3.0/gems/ZenTest-4.11.2/lib/autotest/autoupdate.rb
dadapush_client-1.0.1 vendor/bundle/ruby/2.3.0/gems/ZenTest-4.11.2/lib/autotest/autoupdate.rb
minitest-autotest-1.1.1 lib/autotest/autoupdate.rb
minitest-autotest-1.1.0 lib/autotest/autoupdate.rb
ZenTest-4.11.2 lib/autotest/autoupdate.rb
cloudsmith-api-0.30.7 vendor/bundle/ruby/2.3.0/gems/ZenTest-4.11.1/lib/autotest/autoupdate.rb
color_me_shop-1.0.0 vendor/bundle/ruby/2.5.0/gems/ZenTest-4.11.1/lib/autotest/autoupdate.rb
cloudsmith-api-0.21.4 vendor/bundle/ruby/2.3.0/gems/ZenTest-4.11.1/lib/autotest/autoupdate.rb
ZenTest-4.11.1 lib/autotest/autoupdate.rb
minitest-autotest-1.0.3 lib/autotest/autoupdate.rb
dwolla_swagger-1.0.6 vendor/bundle/ruby/2.2.0/gems/ZenTest-4.11.0/lib/autotest/autoupdate.rb
minitest-autotest-1.0.2 lib/autotest/autoupdate.rb
minitest-autotest-1.0.1 lib/autotest/autoupdate.rb
minitest-autotest-1.0.0 lib/autotest/autoupdate.rb
ZenTest-4.11.0 lib/autotest/autoupdate.rb
minitest-autotest-1.0.0.b.1 lib/autotest/autoupdate.rb
BanzaiMan-ZenTest-4.2 lib/autotest/autoupdate.rb
grosser-autotest-4.0.3 lib/autotest/autoupdate.rb
grosser-autotest-4.0.4 lib/autotest/autoupdate.rb
ryanbriones-ZenTest-3.11.1 lib/autotest/autoupdate.rb