autotest 4.4.2 → 4.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +6 -0
- data/Gemfile.lock +34 -0
- data/Readme.md +11 -8
- data/VERSION +1 -1
- data/autotest.gemspec +6 -4
- data/bin/autotest +7 -2
- data/lib/autotest.rb +10 -48
- data/test/helper.rb +1 -1
- data/test/test_autotest.rb +1 -1
- data/test/test_autotest_integration.rb +1 -1
- data/test/test_unit_diff.rb +1 -1
- metadata +11 -4
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
GEM
|
|
2
|
+
remote: http://rubygems.org/
|
|
3
|
+
specs:
|
|
4
|
+
diff-lcs (1.1.2)
|
|
5
|
+
gemcutter (0.6.1)
|
|
6
|
+
git (1.2.5)
|
|
7
|
+
jeweler (1.4.0)
|
|
8
|
+
gemcutter (>= 0.1.0)
|
|
9
|
+
git (>= 1.2.5)
|
|
10
|
+
rubyforge (>= 2.0.0)
|
|
11
|
+
json_pure (1.4.6)
|
|
12
|
+
rake (0.8.7)
|
|
13
|
+
rspec (2.0.1)
|
|
14
|
+
rspec-core (~> 2.0.1)
|
|
15
|
+
rspec-expectations (~> 2.0.1)
|
|
16
|
+
rspec-mocks (~> 2.0.1)
|
|
17
|
+
rspec-core (2.0.1)
|
|
18
|
+
rspec-expectations (2.0.1)
|
|
19
|
+
diff-lcs (>= 1.1.2)
|
|
20
|
+
rspec-mocks (2.0.1)
|
|
21
|
+
rspec-core (~> 2.0.1)
|
|
22
|
+
rspec-expectations (~> 2.0.1)
|
|
23
|
+
rubyforge (2.0.4)
|
|
24
|
+
json_pure (>= 1.1.7)
|
|
25
|
+
shoulda (2.11.3)
|
|
26
|
+
|
|
27
|
+
PLATFORMS
|
|
28
|
+
ruby
|
|
29
|
+
|
|
30
|
+
DEPENDENCIES
|
|
31
|
+
jeweler
|
|
32
|
+
rake
|
|
33
|
+
rspec (~> 2)
|
|
34
|
+
shoulda
|
data/Readme.md
CHANGED
|
@@ -6,7 +6,7 @@ Improvements over ZenTest
|
|
|
6
6
|
=========================
|
|
7
7
|
- `-c` not run all tests after a failed test passes
|
|
8
8
|
- `-r` use given config file
|
|
9
|
-
- `-p` use parallel_tests to run tests
|
|
9
|
+
- `-p` use parallel_tests to run tests (Test::Unit only)
|
|
10
10
|
- `-s` use any style you want -> `alias autospec2="autotest --style rspec2"`
|
|
11
11
|
- simplified test setup
|
|
12
12
|
- simplified packaging
|
|
@@ -27,12 +27,12 @@ Optional: an [ZenTest without Autotest](http://github.com/grosser/zentest) versi
|
|
|
27
27
|
|
|
28
28
|
Usage
|
|
29
29
|
=====
|
|
30
|
-
- go to
|
|
31
|
-
- run autotest
|
|
30
|
+
- go to project folder with tests
|
|
31
|
+
- run `autotest`
|
|
32
32
|
|
|
33
33
|
### Options
|
|
34
34
|
-f, --fast-start Do not run full tests at start
|
|
35
|
-
-p, --parallel Run tests in parallel
|
|
35
|
+
-p, --parallel Run tests (Test::Unit only) in parallel -- gem install parallel_tests
|
|
36
36
|
-c, --no-full-after-failed Do not run full tests after failed test passed
|
|
37
37
|
-v, --verbose Be verbose. Prints files that autotest doesn't know how to map to tests
|
|
38
38
|
-q, --quiet Be quiet.
|
|
@@ -40,9 +40,11 @@ Usage
|
|
|
40
40
|
-s, --style STYLE Which style to use, e.g. rspec, rspec2
|
|
41
41
|
-h, --help Show this.
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Windows needs [diff.exe](http://gnuwin32.sourceforge.net/packages.html)
|
|
44
|
+
|
|
45
|
+
TIPS
|
|
44
46
|
====
|
|
45
|
-
- you
|
|
47
|
+
- [RSpec] if you want to use `require 'spec_helper'` -> `rspec --configure autotest`
|
|
46
48
|
|
|
47
49
|
TODO
|
|
48
50
|
====
|
|
@@ -50,6 +52,7 @@ TODO
|
|
|
50
52
|
- cleanup bin/autotest Dir hacks
|
|
51
53
|
- remove globals from unitdiff
|
|
52
54
|
- add some automatic notifications e.g. autotest -n -> use any notify library found
|
|
55
|
+
- use watchr
|
|
53
56
|
|
|
54
57
|
|
|
55
58
|
License
|
|
@@ -58,7 +61,7 @@ License
|
|
|
58
61
|
### Autotest was extracted from ZenTest and improved by:
|
|
59
62
|
- [Charles Roper](http://twitter.com/charlesroper)
|
|
60
63
|
- [Shane Liebling](http://github.com/shanel)
|
|
61
|
-
- [Michael Grosser](http://
|
|
64
|
+
- [Michael Grosser](http://grosser.it)
|
|
62
65
|
|
|
63
66
|
### ZenTest Authors
|
|
64
67
|
- http://www.zenspider.com/ZSS/Products/ZenTest/
|
|
@@ -87,4 +90,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
|
87
90
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
88
91
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
89
92
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
90
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
93
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.4.
|
|
1
|
+
4.4.3
|
data/autotest.gemspec
CHANGED
|
@@ -5,15 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{autotest}
|
|
8
|
-
s.version = "4.4.
|
|
8
|
+
s.version = "4.4.3"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Ryan Davis"]
|
|
12
|
-
s.date = %q{2010-11-
|
|
12
|
+
s.date = %q{2010-11-15}
|
|
13
13
|
s.executables = ["autotest", "unit_diff"]
|
|
14
14
|
s.files = [
|
|
15
15
|
".autotest",
|
|
16
16
|
".gitignore",
|
|
17
|
+
"Gemfile",
|
|
18
|
+
"Gemfile.lock",
|
|
17
19
|
"History.txt",
|
|
18
20
|
"Rakefile",
|
|
19
21
|
"Readme.md",
|
|
@@ -38,7 +40,7 @@ Gem::Specification.new do |s|
|
|
|
38
40
|
s.homepage = %q{http://github.com/grosser/autotest}
|
|
39
41
|
s.rdoc_options = ["--charset=UTF-8"]
|
|
40
42
|
s.require_paths = ["lib"]
|
|
41
|
-
s.rubygems_version = %q{1.3.
|
|
43
|
+
s.rubygems_version = %q{1.3.7}
|
|
42
44
|
s.summary = %q{Autotest, without ZenTest}
|
|
43
45
|
s.test_files = [
|
|
44
46
|
"test/test_autotest_integration.rb",
|
|
@@ -51,7 +53,7 @@ Gem::Specification.new do |s|
|
|
|
51
53
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
52
54
|
s.specification_version = 3
|
|
53
55
|
|
|
54
|
-
if Gem::Version.new(Gem::
|
|
56
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
55
57
|
else
|
|
56
58
|
end
|
|
57
59
|
else
|
data/bin/autotest
CHANGED
|
@@ -10,8 +10,13 @@ Continuous testing for your ruby app.
|
|
|
10
10
|
Usage:
|
|
11
11
|
autotest [options]
|
|
12
12
|
BANNER
|
|
13
|
-
opts.on("-f", "--fast-start","Do not run full tests at start")
|
|
14
|
-
|
|
13
|
+
opts.on("-f", "--fast-start","Do not run full tests at start") do
|
|
14
|
+
options[:no_full_after_start] = true
|
|
15
|
+
end
|
|
16
|
+
opts.on("-p", "--parallel","Run tests (Test::Unit only) in parallel -- gem install parallel_tests") do
|
|
17
|
+
options[:parallel] = true
|
|
18
|
+
require 'parallel_tests'
|
|
19
|
+
end
|
|
15
20
|
opts.on("-c", "--no-full-after-failed","Do not run full tests after failed test passed") { options[:no_full_after_failed] = true }
|
|
16
21
|
opts.on("-v", "--verbose","Be verbose. Prints files that autotest doesn't know how to map to tests") { options[:verbose] = true }
|
|
17
22
|
opts.on("-q", "--quiet","Be quiet.") { options[:quiet] = true }
|
data/lib/autotest.rb
CHANGED
|
@@ -80,45 +80,6 @@ class Autotest
|
|
|
80
80
|
|
|
81
81
|
@@discoveries = []
|
|
82
82
|
|
|
83
|
-
##
|
|
84
|
-
# Provide some help
|
|
85
|
-
def self.usage
|
|
86
|
-
help = [
|
|
87
|
-
"autotest [options]",
|
|
88
|
-
nil,
|
|
89
|
-
"Autotest automatically tests code that has changed.",
|
|
90
|
-
"It assumes the code is in lib, and tests are in tests.",
|
|
91
|
-
"Autotest uses plugins to control what happens.",
|
|
92
|
-
"You configure plugins with require statements in the",
|
|
93
|
-
".autotest file in your project base directory,",
|
|
94
|
-
"and a default configuration for all your projects",
|
|
95
|
-
"in the .autotest file in your home directory.",
|
|
96
|
-
|
|
97
|
-
nil,
|
|
98
|
-
"options:",
|
|
99
|
-
"\t-h",
|
|
100
|
-
"\t-help\t\tYou're looking at it.",
|
|
101
|
-
nil,
|
|
102
|
-
"\t-v\t\tBe verbose.",
|
|
103
|
-
"\t\t\tPrints files that autotest doesn't know how to map to",
|
|
104
|
-
"\t\t\ttests.",
|
|
105
|
-
nil,
|
|
106
|
-
"\t-q\t\tBe more quiet.",
|
|
107
|
-
nil,
|
|
108
|
-
"\t-f\t\tFast start.",
|
|
109
|
-
"\t\t\tDoesn't initially run tests at start.",
|
|
110
|
-
]
|
|
111
|
-
STDERR.puts help.join("\n")
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
##
|
|
115
|
-
# Call Autotest.usage then exit with 1.
|
|
116
|
-
def self.usage_with_exit
|
|
117
|
-
self.usage
|
|
118
|
-
exit 1
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
|
|
122
83
|
##
|
|
123
84
|
# Add a proc to the collection of discovery procs. See
|
|
124
85
|
# +autodiscover+.
|
|
@@ -313,7 +274,7 @@ class Autotest
|
|
|
313
274
|
open("| #{cmd}", "r") do |f|
|
|
314
275
|
until f.eof? do
|
|
315
276
|
c = f.getc or break
|
|
316
|
-
|
|
277
|
+
putc (c.is_a?(Fixnum) ? c.chr : c) # print breaks coloring on windows -> putc
|
|
317
278
|
line << c
|
|
318
279
|
if c == ?\n then
|
|
319
280
|
self.results << if RUBY19 then
|
|
@@ -728,18 +689,19 @@ class Autotest
|
|
|
728
689
|
|
|
729
690
|
private
|
|
730
691
|
|
|
731
|
-
#
|
|
732
|
-
# see http://redmine.ruby-lang.org/issues/show/1733
|
|
692
|
+
# since ruby 1.9 current path (path where autotest was called from) is not in $LOAD_PATH
|
|
733
693
|
def self.with_current_path_in_load_path
|
|
734
|
-
if
|
|
735
|
-
|
|
694
|
+
if RUBY19 and not $LOAD_PATH.include?(File.expand_path('.')) and not $LOAD_PATH.include?('.')
|
|
695
|
+
begin
|
|
736
696
|
$LOAD_PATH << '.'
|
|
737
|
-
|
|
697
|
+
result = yield
|
|
698
|
+
ensure
|
|
699
|
+
$LOAD_PATH.delete('.')
|
|
738
700
|
end
|
|
701
|
+
result
|
|
702
|
+
else
|
|
703
|
+
yield
|
|
739
704
|
end
|
|
740
|
-
result = yield
|
|
741
|
-
$LOAD_PATH.delete('.') if current_path_was_added
|
|
742
|
-
result
|
|
743
705
|
end
|
|
744
706
|
|
|
745
707
|
#list of all available rubygem load paths
|
data/test/helper.rb
CHANGED
data/test/test_autotest.rb
CHANGED
data/test/test_unit_diff.rb
CHANGED
metadata
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: autotest
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
+
hash: 41
|
|
4
5
|
prerelease: false
|
|
5
6
|
segments:
|
|
6
7
|
- 4
|
|
7
8
|
- 4
|
|
8
|
-
-
|
|
9
|
-
version: 4.4.
|
|
9
|
+
- 3
|
|
10
|
+
version: 4.4.3
|
|
10
11
|
platform: ruby
|
|
11
12
|
authors:
|
|
12
13
|
- Ryan Davis
|
|
@@ -14,7 +15,7 @@ autorequire:
|
|
|
14
15
|
bindir: bin
|
|
15
16
|
cert_chain: []
|
|
16
17
|
|
|
17
|
-
date: 2010-11-
|
|
18
|
+
date: 2010-11-15 00:00:00 +01:00
|
|
18
19
|
default_executable:
|
|
19
20
|
dependencies: []
|
|
20
21
|
|
|
@@ -30,6 +31,8 @@ extra_rdoc_files: []
|
|
|
30
31
|
files:
|
|
31
32
|
- .autotest
|
|
32
33
|
- .gitignore
|
|
34
|
+
- Gemfile
|
|
35
|
+
- Gemfile.lock
|
|
33
36
|
- History.txt
|
|
34
37
|
- Rakefile
|
|
35
38
|
- Readme.md
|
|
@@ -60,23 +63,27 @@ rdoc_options:
|
|
|
60
63
|
require_paths:
|
|
61
64
|
- lib
|
|
62
65
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
|
+
none: false
|
|
63
67
|
requirements:
|
|
64
68
|
- - ">="
|
|
65
69
|
- !ruby/object:Gem::Version
|
|
70
|
+
hash: 3
|
|
66
71
|
segments:
|
|
67
72
|
- 0
|
|
68
73
|
version: "0"
|
|
69
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
|
+
none: false
|
|
70
76
|
requirements:
|
|
71
77
|
- - ">="
|
|
72
78
|
- !ruby/object:Gem::Version
|
|
79
|
+
hash: 3
|
|
73
80
|
segments:
|
|
74
81
|
- 0
|
|
75
82
|
version: "0"
|
|
76
83
|
requirements: []
|
|
77
84
|
|
|
78
85
|
rubyforge_project:
|
|
79
|
-
rubygems_version: 1.3.
|
|
86
|
+
rubygems_version: 1.3.7
|
|
80
87
|
signing_key:
|
|
81
88
|
specification_version: 3
|
|
82
89
|
summary: Autotest, without ZenTest
|