ZenTest 4.11.0 → 4.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data/.autotest +0 -1
- data/History.txt +31 -0
- data/Manifest.txt +0 -15
- data/README.txt +4 -0
- data/Rakefile +1 -1
- data/bin/multigem +2 -1
- data/bin/multiruby +43 -18
- data/lib/zentest.rb +1 -1
- data/test/test_zentest.rb +11 -4
- data.tar.gz.sig +0 -0
- metadata +39 -69
- metadata.gz.sig +0 -0
- data/.gemtest +0 -0
- data/articles/getting_started_with_autotest.html +0 -533
- data/bin/autotest +0 -6
- data/bin/multiruby_setup +0 -74
- data/example_dot_autotest.rb +0 -16
- data/lib/autotest/autoupdate.rb +0 -26
- data/lib/autotest/bundler.rb +0 -10
- data/lib/autotest/isolate.rb +0 -19
- data/lib/autotest/once.rb +0 -9
- data/lib/autotest/preload.rb +0 -56
- data/lib/autotest/rcov.rb +0 -27
- data/lib/autotest/restart.rb +0 -16
- data/lib/autotest/timestamp.rb +0 -9
- data/lib/autotest.rb +0 -901
- data/lib/multiruby.rb +0 -413
- data/test/test_autotest.rb +0 -560
data/lib/autotest/isolate.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# Run autotest with isolate support.
|
3
|
-
|
4
|
-
module Autotest::Isolate
|
5
|
-
@@dir = "tmp/isolate/#{Gem.ruby_engine}-#{RbConfig::CONFIG['ruby_version']}"
|
6
|
-
|
7
|
-
def self.dir= o
|
8
|
-
@@dir = o
|
9
|
-
end
|
10
|
-
|
11
|
-
Autotest.add_hook :initialize do |at|
|
12
|
-
ENV["GEM_HOME"] = @@dir
|
13
|
-
ENV["GEM_PATH"] = @@dir
|
14
|
-
ENV["PATH"] += ":#{@@dir}/bin"
|
15
|
-
|
16
|
-
Gem.clear_paths
|
17
|
-
false
|
18
|
-
end
|
19
|
-
end
|
data/lib/autotest/once.rb
DELETED
data/lib/autotest/preload.rb
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
module Autotest::Preload
|
2
|
-
def self.glob
|
3
|
-
@glob
|
4
|
-
end
|
5
|
-
|
6
|
-
def self.glob= o
|
7
|
-
@glob = o
|
8
|
-
end
|
9
|
-
|
10
|
-
self.glob = "test/test_helper.rb"
|
11
|
-
|
12
|
-
Autotest.add_hook :post_initialize do |at, *args|
|
13
|
-
at.add_sigquit_handler
|
14
|
-
|
15
|
-
warn "pre-loading initializers"
|
16
|
-
t0 = Time.now
|
17
|
-
Dir[self.glob].each do |path|
|
18
|
-
require path
|
19
|
-
end
|
20
|
-
warn "done pre-loading initializers in %.2f seconds" % [Time.now - t0]
|
21
|
-
|
22
|
-
false
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
class Autotest
|
27
|
-
alias :old_run_tests :run_tests
|
28
|
-
|
29
|
-
def run_tests
|
30
|
-
hook :run_command
|
31
|
-
|
32
|
-
new_mtime = self.find_files_to_test
|
33
|
-
return unless new_mtime
|
34
|
-
self.last_mtime = new_mtime
|
35
|
-
|
36
|
-
begin
|
37
|
-
# TODO: deal with unit_diff and partial test runs later
|
38
|
-
original_argv = ARGV.dup
|
39
|
-
ARGV.clear
|
40
|
-
|
41
|
-
@child = fork do
|
42
|
-
trap "QUIT", "DEFAULT"
|
43
|
-
trap "INT", "DEFAULT"
|
44
|
-
files_to_test.keys.each do |file|
|
45
|
-
load file
|
46
|
-
end
|
47
|
-
end
|
48
|
-
Process.wait
|
49
|
-
ensure
|
50
|
-
@child = nil
|
51
|
-
ARGV.replace original_argv
|
52
|
-
end
|
53
|
-
|
54
|
-
hook :ran_command
|
55
|
-
end
|
56
|
-
end
|
data/lib/autotest/rcov.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
module Autotest::RCov
|
2
|
-
@@command, @@options = "rcov", nil
|
3
|
-
|
4
|
-
def self.command= o
|
5
|
-
@@command = o
|
6
|
-
end
|
7
|
-
|
8
|
-
def self.pattern= o
|
9
|
-
warn "RCov.pattern= no longer has any functionality. please remove."
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.options= o
|
13
|
-
@@options = o
|
14
|
-
end
|
15
|
-
|
16
|
-
Autotest.add_hook :all_good do |at|
|
17
|
-
options = @@options ? "RCOVOPTS=\"#{@@options}\"" : ""
|
18
|
-
system "rake #{@@command} #{options}"
|
19
|
-
false
|
20
|
-
end
|
21
|
-
|
22
|
-
Autotest.add_hook :initialize do |at|
|
23
|
-
at.add_exception 'coverage'
|
24
|
-
at.add_exception 'coverage.info'
|
25
|
-
false
|
26
|
-
end
|
27
|
-
end
|
data/lib/autotest/restart.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
module Autotest::Restart
|
2
|
-
Autotest.add_hook :initialize do |at|
|
3
|
-
configs = [File.expand_path('~/.autotest'), './.autotest'].select { |f|
|
4
|
-
File.exist? f
|
5
|
-
}
|
6
|
-
at.extra_files.concat configs
|
7
|
-
false
|
8
|
-
end
|
9
|
-
|
10
|
-
Autotest.add_hook :updated do |at, found|
|
11
|
-
unless found.flatten.grep(/\.autotest$/).empty? then
|
12
|
-
warn "Detected change to .autotest, restarting"
|
13
|
-
at.restart
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|