Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 44 lines (32 sloc) 1.013 kB
e46cf1a @zenspider Added restart to .autotest
zenspider authored
1 # -*- ruby -*-
2
72fefbc @zenspider Ugh. Make sure that autotest is using isolate so we pick up the icky …
zenspider authored
3 Gem.refresh
4
e46cf1a @zenspider Added restart to .autotest
zenspider authored
5 require 'autotest/restart'
8b8644f @drbrain ! Restore behavior of Gem::Specification#loaded? Ruby Bug #5032
drbrain authored
6 require 'autotest/isolate'
e46cf1a @zenspider Added restart to .autotest
zenspider authored
7
db0cc1d @drbrain When :executable is set, don't ask the user
drbrain authored
8 Autotest.add_hook :initialize do |at|
d8e8803 @zenspider minor cleanup
zenspider authored
9 at.testlib = 'minitest/autorun'
db0cc1d @drbrain When :executable is set, don't ask the user
drbrain authored
10
d31b173 @luislavena Ignore .git for autotest
luislavena authored
11 at.add_exception %r%/\.git/%
db0cc1d @drbrain When :executable is set, don't ask the user
drbrain authored
12 at.add_exception %r%/\.svn/%
13 at.add_exception %r%\.rbc$%
4392bbf @drbrain Fix .autotest
drbrain authored
14 at.add_exception %r%test/rubygems/rubygems%
db0cc1d @drbrain When :executable is set, don't ask the user
drbrain authored
15
16 at.find_directories.clear
17 at.find_directories.push 'lib', 'test'
18
89c8f85 @drbrain Fix mappings
drbrain authored
19 at.add_mapping %r%^lib/rubygems.rb$% do |_, m|
4392bbf @drbrain Fix .autotest
drbrain authored
20 "test/rubygems/test_gem.rb"
89c8f85 @drbrain Fix mappings
drbrain authored
21 end
22
23 at.add_mapping %r%^lib/rubygems/(.*).rb$% do |_, m|
4392bbf @drbrain Fix .autotest
drbrain authored
24 "test/rubygems/test_gem_#{m[1].gsub '/', '_'}.rb"
db0cc1d @drbrain When :executable is set, don't ask the user
drbrain authored
25 end
26
b9179c4 @jbarnette Burn down Gem::Requirement.
jbarnette authored
27 at.add_mapping %r%^test/support/(.*).rb$% do |_, m|
4392bbf @drbrain Fix .autotest
drbrain authored
28 at.files_matching %r%^test/rubygems/test_(.*)\.rb$%
b9179c4 @jbarnette Burn down Gem::Requirement.
jbarnette authored
29 end
30
7075751 @zenspider Minor fix to let autotest pass options.
zenspider authored
31 args = ARGV.reject { |a| a =~ /^-/ }
32 at.find_directories = args unless args.empty?
b9179c4 @jbarnette Burn down Gem::Requirement.
jbarnette authored
33 end
a08b531 @zenspider Added fixes to .autotest to deal with unit_diff suckage and test clas…
zenspider authored
34
35 class Autotest
36 alias :old_path_to_classname :path_to_classname
37 def path_to_classname s
a45d5f8 @drbrain - Add an optional type parameter to Gem::Specification#doc_dir.
drbrain authored
38 classname = old_path_to_classname(s.sub(/test.rubygems.test_/, ""))
39 classname = classname.gsub('Rdoc', 'RDoc')
40
41 classname
a08b531 @zenspider Added fixes to .autotest to deal with unit_diff suckage and test clas…
zenspider authored
42 end
43 end
Something went wrong with that request. Please try again.