minitest-autotest 1.0.3 → 1.1.0
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.tar.gz.sig +2 -1
- data/History.rdoc +14 -0
- data/README.rdoc +1 -1
- data/bin/autotest +0 -1
- data/lib/autotest.rb +39 -16
- data/lib/minitest/autotest.rb +1 -1
- data/test/test_minitest/test_autorun.rb +15 -1
- metadata +30 -25
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 205dba5c6e238583177e5dceae970deb6ab4623cc82b7738d68195fa0d154b8e
|
4
|
+
data.tar.gz: 55ab1d6e357f76475dc361b0dfd455b952ad4faf6f9c3ce3bee4176b78a4616d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f9964b2fccb0feb52897bfa84d3f871207318b4a4a1aefcbcc19d44916d2591f608f53fb97f7ebea12a216bbdc67003152922d7eb3b1c443291c895c846b89b
|
7
|
+
data.tar.gz: d07e45e2ce56fa6a1b5bce9647bde81f88f4b5e11a93eabe040743deebc80f5467f785db201dd362696569404806ac4544e1821f9086352d89ec90b89650c772
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
$4�y�(���C
|
2
|
+
t���
|
data/History.rdoc
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
=== 1.1.0 / 2019-05-26
|
2
|
+
|
3
|
+
* 4 minor enhancements:
|
4
|
+
|
5
|
+
* Added --focus mode that lets you only monitor/test specified files.
|
6
|
+
* Move Autotest.parse_options from bin/autotest to Autotest.run.
|
7
|
+
* Push options down to instance variable. No globals. Passed to #initialize.
|
8
|
+
* Use path_expander to process cmdline args.
|
9
|
+
|
10
|
+
* 2 bug fixes:
|
11
|
+
|
12
|
+
* Filter out non-files (eg "(eval)") to avoid spurious errors.
|
13
|
+
* Remove explicit -rubygems flag. Broken in ruby 2.5 for some reason.
|
14
|
+
|
1
15
|
=== 1.0.3 / 2016-05-02
|
2
16
|
|
3
17
|
* 2 bug fixes:
|
data/README.rdoc
CHANGED
@@ -40,7 +40,7 @@ passes:
|
|
40
40
|
system "rake rcov_info"
|
41
41
|
end if ENV['RCOV']
|
42
42
|
|
43
|
-
Do note, since minitest ships with
|
43
|
+
Do note, since minitest ships with ruby 1.9, if you want to use the
|
44
44
|
latest minitest gem you need to ensure that the gem activation occurs!
|
45
45
|
To do this, add the gem activation and the proper require to a
|
46
46
|
separate file (like ".minitest.rb" or even a test helper if you have
|
data/bin/autotest
CHANGED
data/lib/autotest.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require "find"
|
2
2
|
require "rbconfig"
|
3
3
|
|
4
|
+
require "path_expander"
|
5
|
+
|
4
6
|
##
|
5
7
|
# Autotest continuously scans the files in your project for changes
|
6
8
|
# and runs the appropriate tests. Test failures are run until they
|
@@ -64,13 +66,7 @@ class Autotest
|
|
64
66
|
:interrupt, :quit, :ran_command, :reset,
|
65
67
|
:run_command, :updated, :waiting ]
|
66
68
|
|
67
|
-
|
68
|
-
@@options ||= {}
|
69
|
-
end
|
70
|
-
|
71
|
-
def options
|
72
|
-
self.class.options
|
73
|
-
end
|
69
|
+
attr_accessor :options
|
74
70
|
|
75
71
|
HOOKS = Hash.new { |h,k| h[k] = [] }
|
76
72
|
|
@@ -103,6 +99,10 @@ class Autotest
|
|
103
99
|
options[:debug] = true
|
104
100
|
end
|
105
101
|
|
102
|
+
opts.on "-f", "--focus", "Focus mode, only run named tests." do
|
103
|
+
options[:focus] = true
|
104
|
+
end
|
105
|
+
|
106
106
|
opts.on "-v", "--verbose", "Be annoyingly verbose (debugs .autotest)." do
|
107
107
|
options[:verbose] = true
|
108
108
|
end
|
@@ -125,16 +125,31 @@ class Autotest
|
|
125
125
|
end
|
126
126
|
end.parse! args
|
127
127
|
|
128
|
-
Autotest.options.merge! options
|
129
|
-
|
130
128
|
options
|
131
129
|
end
|
132
130
|
|
133
131
|
##
|
134
132
|
# Initialize and run the system.
|
135
133
|
|
136
|
-
def self.run
|
137
|
-
new
|
134
|
+
def self.run args = ARGV
|
135
|
+
expander = PathExpander.new args, "**/*.rb"
|
136
|
+
files = expander.process
|
137
|
+
|
138
|
+
autotest = new parse_options args
|
139
|
+
|
140
|
+
if autotest.options[:debug] then
|
141
|
+
puts
|
142
|
+
puts "options:"
|
143
|
+
puts
|
144
|
+
pp autotest.options
|
145
|
+
puts "files:"
|
146
|
+
puts
|
147
|
+
pp files
|
148
|
+
puts
|
149
|
+
end
|
150
|
+
|
151
|
+
autotest.extra_files = files
|
152
|
+
autotest.run
|
138
153
|
end
|
139
154
|
|
140
155
|
attr_writer :known_files
|
@@ -161,12 +176,13 @@ class Autotest
|
|
161
176
|
##
|
162
177
|
# Initialize the instance and then load the user's .autotest file, if any.
|
163
178
|
|
164
|
-
def initialize
|
179
|
+
def initialize options
|
165
180
|
# these two are set directly because they're wrapped with
|
166
181
|
# add/remove/clear accessor methods
|
167
182
|
@exception_list = []
|
168
183
|
@child = nil
|
169
184
|
|
185
|
+
self.options = options
|
170
186
|
self.extra_class_map = {}
|
171
187
|
self.extra_files = []
|
172
188
|
self.failures = Hash.new { |h,k| h[k] = Hash.new { |h2,k2| h2[k2] = [] } }
|
@@ -180,8 +196,7 @@ class Autotest
|
|
180
196
|
self.test_prefix = "gem 'minitest'"
|
181
197
|
self.testlib = "minitest/autorun" # TODO: rename
|
182
198
|
|
183
|
-
|
184
|
-
self.find_directories = specified_directories.empty? ? ['.'] : specified_directories
|
199
|
+
self.find_directories = ['.']
|
185
200
|
|
186
201
|
# file in /lib -> run test in /test
|
187
202
|
self.add_mapping(/^lib\/.*\.rb$/) do |filename, _|
|
@@ -378,7 +393,13 @@ class Autotest
|
|
378
393
|
|
379
394
|
def find_files
|
380
395
|
result = {}
|
381
|
-
|
396
|
+
|
397
|
+
targets = if options[:focus] then
|
398
|
+
self.extra_files
|
399
|
+
else
|
400
|
+
self.find_directories + self.extra_files
|
401
|
+
end
|
402
|
+
|
382
403
|
reset_find_order
|
383
404
|
|
384
405
|
targets.each do |target|
|
@@ -397,6 +418,7 @@ class Autotest
|
|
397
418
|
result[filename] = File.stat(filename).mtime rescue next
|
398
419
|
order << filename
|
399
420
|
end
|
421
|
+
|
400
422
|
self.find_order.push(*order.sort)
|
401
423
|
end
|
402
424
|
|
@@ -464,6 +486,7 @@ class Autotest
|
|
464
486
|
|
465
487
|
unless partial.empty? then
|
466
488
|
files = partial.map(&:first).sort # no longer a hash because of partition
|
489
|
+
files.select! { |path| File.file? path } # filter out (eval) and the like
|
467
490
|
re = []
|
468
491
|
|
469
492
|
partial.each do |path, klasses|
|
@@ -539,7 +562,7 @@ class Autotest
|
|
539
562
|
# Returns the base of the ruby command.
|
540
563
|
|
541
564
|
def ruby_cmd
|
542
|
-
"#{prefix}#{ruby} -I#{libs}
|
565
|
+
"#{prefix}#{ruby} -I#{libs}"
|
543
566
|
end
|
544
567
|
|
545
568
|
##
|
data/lib/minitest/autotest.rb
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
require "minitest/autorun"
|
2
2
|
|
3
|
+
class Foo
|
4
|
+
def raises
|
5
|
+
raise "blah"
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
3
9
|
class FooTest < Minitest::Test
|
4
10
|
def test_pass
|
5
11
|
assert true
|
@@ -15,7 +21,15 @@ class FooTest < Minitest::Test
|
|
15
21
|
end
|
16
22
|
|
17
23
|
def test_error
|
18
|
-
|
24
|
+
Foo.new.raises
|
25
|
+
end
|
26
|
+
|
27
|
+
def assert_bad_thingy
|
28
|
+
Foo.new.raises
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_indirect_error
|
32
|
+
assert_bad_thingy
|
19
33
|
end
|
20
34
|
end
|
21
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-autotest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -10,9 +10,9 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDPjCCAiagAwIBAgIBAzANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
|
14
14
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
15
|
-
|
15
|
+
GRYDY29tMB4XDTE4MTIwNDIxMzAxNFoXDTE5MTIwNDIxMzAxNFowRTETMBEGA1UE
|
16
16
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
17
17
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
18
18
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
@@ -21,58 +21,64 @@ cert_chain:
|
|
21
21
|
GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt
|
22
22
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
23
23
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
24
|
-
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
|
25
|
+
AQCbJwLmpJR2PomLU+Zzw3KRzH/hbyUWc/ftru71AopZ1fy4iY9J/BW5QYKVYwbP
|
26
|
+
V0FSBWtvfI/RdwfKGtuGhPKECZgmLieGuZ3XCc09qPu1bdg7i/tu1p0t0c6163ku
|
27
|
+
nDMDIC/t/DAFK0TY9I3HswuyZGbLW7rgF0DmiuZdN/RPhHq2pOLMLXJmFclCb/im
|
28
|
+
9yToml/06TJdUJ5p64mkBs0TzaK66DIB1Smd3PdtfZqoRV+EwaXMdx0Hb3zdR1JR
|
29
|
+
Em82dBUFsipwMLCYj39kcyHWAxyl6Ae1Cn9r/ItVBCxoeFdrHjfavnrIEoXUt4bU
|
30
|
+
UfBugfLD19bu3nvL+zTAGx/U
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date:
|
32
|
+
date: 2019-05-27 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: minitest-server
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.0'
|
41
41
|
type: :runtime
|
42
42
|
prerelease: false
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.0'
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rdoc
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '4.0'
|
55
|
+
- - "<"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '7'
|
55
58
|
type: :development
|
56
59
|
prerelease: false
|
57
60
|
version_requirements: !ruby/object:Gem::Requirement
|
58
61
|
requirements:
|
59
|
-
- -
|
62
|
+
- - ">="
|
60
63
|
- !ruby/object:Gem::Version
|
61
64
|
version: '4.0'
|
65
|
+
- - "<"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '7'
|
62
68
|
- !ruby/object:Gem::Dependency
|
63
69
|
name: hoe
|
64
70
|
requirement: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
|
-
- - ~>
|
72
|
+
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
74
|
+
version: '3.17'
|
69
75
|
type: :development
|
70
76
|
prerelease: false
|
71
77
|
version_requirements: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
|
-
- - ~>
|
79
|
+
- - "~>"
|
74
80
|
- !ruby/object:Gem::Version
|
75
|
-
version: '3.
|
81
|
+
version: '3.17'
|
76
82
|
description: |-
|
77
83
|
autotest is a continous testing facility meant to be used during
|
78
84
|
development. As soon as you save a file, autotest will run the
|
@@ -92,7 +98,7 @@ extra_rdoc_files:
|
|
92
98
|
- Manifest.txt
|
93
99
|
- README.rdoc
|
94
100
|
files:
|
95
|
-
- .autotest
|
101
|
+
- ".autotest"
|
96
102
|
- History.rdoc
|
97
103
|
- Manifest.txt
|
98
104
|
- README.rdoc
|
@@ -120,23 +126,22 @@ licenses:
|
|
120
126
|
metadata: {}
|
121
127
|
post_install_message:
|
122
128
|
rdoc_options:
|
123
|
-
- --main
|
129
|
+
- "--main"
|
124
130
|
- README.rdoc
|
125
131
|
require_paths:
|
126
132
|
- lib
|
127
133
|
required_ruby_version: !ruby/object:Gem::Requirement
|
128
134
|
requirements:
|
129
|
-
- -
|
135
|
+
- - ">="
|
130
136
|
- !ruby/object:Gem::Version
|
131
137
|
version: '0'
|
132
138
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
139
|
requirements:
|
134
|
-
- -
|
140
|
+
- - ">="
|
135
141
|
- !ruby/object:Gem::Version
|
136
142
|
version: '0'
|
137
143
|
requirements: []
|
138
|
-
|
139
|
-
rubygems_version: 2.4.5
|
144
|
+
rubygems_version: 3.0.2
|
140
145
|
signing_key:
|
141
146
|
specification_version: 4
|
142
147
|
summary: autotest is a continous testing facility meant to be used during development
|
metadata.gz.sig
CHANGED
Binary file
|