ZenTest 4.3.3 → 4.4.0

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.tar.gz.sig ADDED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,19 @@
1
+ === 4.4.0 / 2010-09-01
2
+
3
+ * 1 major enhancement:
4
+
5
+ * Removed git building. I'm dropping direct support for rubinius.
6
+
7
+ * 3 minor enhancements:
8
+
9
+ * Added multiruby mri:list:x.y.z command so you can see what's available.
10
+ * Enabled installing specific patch versions of ruby.
11
+ * multiruby rubygems:update now forces a build to be less confusing.
12
+
13
+ * 1 bug fix:
14
+
15
+ * Removed redundant test_to_normal, now in zentest_mappings
16
+
1
17
  === 4.3.3 / 2010-06-17
2
18
 
3
19
  * 2 minor enhancements:
data/bin/multiruby_setup CHANGED
@@ -30,6 +30,7 @@ ARGV.each do |spec|
30
30
  Multiruby.merge_rubygems
31
31
  when "rubygems:update", "update:rubygems" then
32
32
  Multiruby.update_rubygems
33
+ ARGV << "build"
33
34
  when "update" then
34
35
  Multiruby.update
35
36
  when "tags" then
@@ -57,6 +58,12 @@ ARGV.each do |spec|
57
58
  ARGV << "build"
58
59
  when /mri:svn:tag:(.*)/ then
59
60
  ARGV << "mri:svn:tag:#{$1}:#{$1}" << "build"
61
+ when /mri:list:(.*)/ then
62
+ v = $1
63
+ ver = v[/\d+\.\d+/]
64
+ url = "#{Multiruby::RUBY_URL}/#{ver}/"
65
+
66
+ puts Multiruby.matching_versions(url, v).join("\n")
60
67
  when /mri:tar:(.*)/ then
61
68
  Multiruby.fetch_tar $1
62
69
  ARGV << "build"
data/lib/autotest.rb CHANGED
@@ -144,6 +144,8 @@ class Autotest
144
144
  :unit_diff,
145
145
  :wants_to_quit)
146
146
 
147
+ alias tainted? tainted
148
+
147
149
  ##
148
150
  # Initialize the instance and then load the user's .autotest file, if any.
149
151
 
@@ -196,14 +198,14 @@ class Autotest
196
198
  loop do # ^c handler
197
199
  begin
198
200
  get_to_green
199
- if self.tainted then
201
+ if tainted? then
200
202
  rerun_all_tests
201
203
  else
202
204
  hook :all_good
203
205
  end
204
206
  wait_for_changes
205
207
  rescue Interrupt
206
- break if self.wants_to_quit
208
+ break if wants_to_quit
207
209
  reset
208
210
  end
209
211
  end
@@ -371,7 +373,7 @@ class Autotest
371
373
  # if any file is newer than the previously recorded most recent
372
374
  # file.
373
375
 
374
- def find_files_to_test(files=find_files)
376
+ def find_files_to_test files = find_files
375
377
  updated = files.select { |filename, mtime| self.last_mtime < mtime }
376
378
 
377
379
  p updated if $v unless updated.empty? || self.last_mtime.to_i == 0
data/lib/multiruby.rb CHANGED
@@ -123,7 +123,7 @@ module Multiruby
123
123
  def self.clean
124
124
  self.each_scm_build_dir do |style|
125
125
  case style
126
- when :svn, :git then
126
+ when :svn then
127
127
  if File.exist? "Rakefile" then
128
128
  run "rake clean"
129
129
  elsif File.exist? "Makefile" then
@@ -140,9 +140,8 @@ module Multiruby
140
140
  Dir["*"].each do |dir|
141
141
  next unless File.directory? dir
142
142
  Dir.chdir dir do
143
- if File.exist?(".svn") || File.exist?(".git") then
144
- scm = File.exist?(".svn") ? :svn : :git
145
- yield scm
143
+ if File.exist?(".svn") then
144
+ yield :svn
146
145
  else
147
146
  yield :none
148
147
  end
@@ -151,23 +150,31 @@ module Multiruby
151
150
  end
152
151
  end
153
152
 
154
- def self.extract_latest_version url, matching=nil
153
+ def self.matching_versions url, matching=nil
155
154
  file = URI.parse(url).read
156
- versions = file.scan(/href="(ruby.*tar.gz)"/).flatten.reject { |s|
157
- s =~ /-rc\d/
158
- }.sort_by { |s|
159
- s.split(/\D+/).map { |i| i.to_i }
160
- }.flatten
155
+
156
+ map = {
157
+ "preview" => "beta",
158
+ "rc" => "beta2",
159
+ "p" => "release",
160
+ "tar" => "aargh",
161
+ "gz" => "aargh",
162
+ }
163
+
164
+ versions = file.scan(/href="(ruby.*tar.gz)"/).flatten.sort_by { |s|
165
+ s.scan(/\d+|[a-z]+/).map { |a| Integer(a) rescue map[a] || a }
166
+ }
161
167
 
162
168
  versions = versions.grep(/#{Regexp.escape(matching)}/) if matching
163
- versions.last
169
+
170
+ versions
164
171
  end
165
172
 
166
173
  def self.fetch_tar v
167
174
  in_versions_dir do
168
175
  warn " Determining latest version for #{v}"
169
176
  ver = v[/\d+\.\d+/]
170
- base = extract_latest_version("#{RUBY_URL}/#{ver}/", v)
177
+ base = matching_versions("#{RUBY_URL}/#{ver}/", v).last
171
178
  abort "Could not determine release for #{v}" unless base
172
179
  url = File.join RUBY_URL, ver, base
173
180
  unless File.file? base then
@@ -181,13 +188,6 @@ module Multiruby
181
188
  end
182
189
  end
183
190
 
184
- def self.git_clone url, dir
185
- Multiruby.in_versions_dir do
186
- Multiruby.run "git clone #{url} #{dir}" unless File.directory? dir
187
- FileUtils.ln_sf "../versions/#{dir}", "../build/#{dir}"
188
- end
189
- end
190
-
191
191
  def self.gnu_utils_build inst_dir
192
192
  run "autoconf" unless test ?f, "configure"
193
193
  run "./configure --enable-shared --prefix #{inst_dir}", "log.configure" unless
@@ -201,31 +201,31 @@ module Multiruby
201
201
  end
202
202
 
203
203
  def self.in_build_dir
204
- Dir.chdir File.join(self.root_dir, "build") do
204
+ in_root_dir "build" do
205
205
  yield
206
206
  end
207
207
  end
208
208
 
209
209
  def self.in_install_dir
210
- Dir.chdir File.join(self.root_dir, "install") do
210
+ in_root_dir "install" do
211
211
  yield
212
212
  end
213
213
  end
214
214
 
215
- def self.in_root_dir
216
- Dir.chdir self.root_dir do
215
+ def self.in_root_dir subdir = ""
216
+ Dir.chdir File.join(self.root_dir, subdir) do
217
217
  yield
218
218
  end
219
219
  end
220
220
 
221
221
  def self.in_tmp_dir
222
- Dir.chdir File.join(self.root_dir, "tmp") do
222
+ in_root_dir "tmp" do
223
223
  yield
224
224
  end
225
225
  end
226
226
 
227
227
  def self.in_versions_dir
228
- Dir.chdir File.join(self.root_dir, "versions") do
228
+ in_root_dir "versions" do
229
229
  yield
230
230
  end
231
231
  end
@@ -370,13 +370,6 @@ module Multiruby
370
370
  else
371
371
  warn " update in this svn dir not supported yet: #{dir}"
372
372
  end
373
- when :git then
374
- case dir
375
- when /rubinius/ then
376
- run "rake git:update build" # minor cheat by building here
377
- else
378
- warn " update in this git dir not supported yet: #{dir}"
379
- end
380
373
  else
381
374
  warn " update in non-svn dir not supported yet: #{dir}"
382
375
  end
data/lib/zentest.rb CHANGED
@@ -53,7 +53,7 @@ end
53
53
 
54
54
  class ZenTest
55
55
 
56
- VERSION = '4.3.3'
56
+ VERSION = '4.4.0'
57
57
 
58
58
  include ZenTestMapping
59
59
 
@@ -419,20 +419,6 @@ class ZenTest
419
419
  end # @klasses[klassname]
420
420
  end
421
421
 
422
- def test_to_normal(_name, klassname=nil)
423
- super do |name|
424
- if defined? @inherited_methods then
425
- known_methods = (@inherited_methods[klassname] || {}).keys.sort.reverse
426
- known_methods_re = known_methods.map {|s| Regexp.escape(s) }.join("|")
427
-
428
- name = name.sub(/^(#{known_methods_re})(_.*)?$/) { $1 } unless
429
- known_methods_re.empty?
430
-
431
- name
432
- end
433
- end
434
- end
435
-
436
422
  # create a given method at a given
437
423
  # indentation. Returns an array containing
438
424
  # the lines of the method.
@@ -116,7 +116,10 @@ class TestAutotest < MiniTest::Unit::TestCase
116
116
 
117
117
  @a.find_order = @files.keys.sort
118
118
 
119
- input = [['test_fail1', @test_class], ['test_fail2', @test_class], ['test_error1', @test_class], ['test_error2', @test_class]]
119
+ input = [['test_fail1', @test_class],
120
+ ['test_fail2', @test_class],
121
+ ['test_error1', @test_class],
122
+ ['test_error2', @test_class]]
120
123
  result = @a.consolidate_failures input
121
124
  expected = { @test => %w( test_fail1 test_fail2 test_error1 test_error2 ) }
122
125
  assert_equal expected, result
@@ -139,10 +142,10 @@ class TestAutotest < MiniTest::Unit::TestCase
139
142
 
140
143
  def test_consolidate_failures_nested_classes
141
144
  @files.clear
142
- @files['lib/outer.rb'] = Time.at(5)
145
+ @files['lib/outer.rb'] = Time.at(5)
143
146
  @files['lib/outer/inner.rb'] = Time.at(5)
144
- @files[@inner_test] = Time.at(5)
145
- @files[@outer_test] = Time.at(5)
147
+ @files[@inner_test] = Time.at(5)
148
+ @files[@outer_test] = Time.at(5)
146
149
 
147
150
  @a.find_order = @files.keys.sort
148
151
 
@@ -368,8 +371,12 @@ test_error2(#{@test_class}):
368
371
  'test/test_fooby.rb' => [ 'test_something1', 'test_something2' ]
369
372
  }
370
373
 
371
- expected = [ "#{RUBY} -I.:lib:test -rubygems -e \"%w[test/unit #{@test}].each { |f| require f }\" | unit_diff -u",
372
- "#{RUBY} -I.:lib:test -rubygems test/test_fooby.rb -n \"/^(test_something1|test_something2)$/\" | unit_diff -u" ].join("; ")
374
+ pre = "#{RUBY} -I.:lib:test -rubygems"
375
+ req = ".each { |f| require f }\""
376
+ post = "| unit_diff -u"
377
+
378
+ expected = [ "#{pre} -e \"%w[test/unit #{@test}]#{req} #{post}",
379
+ "#{pre} test/test_fooby.rb -n \"/^(test_something1|test_something2)$/\" #{post}" ].join("; ")
373
380
 
374
381
  result = @a.make_test_cmd f
375
382
  assert_equal expected, result
@@ -433,8 +440,8 @@ test_error2(#{@test_class}):
433
440
 
434
441
  assert @a.find_files_to_test(files)
435
442
  assert_equal expected, @a.files_to_test
436
- assert_equal t, @a.last_mtime
437
- assert_equal "", @a.output.string
443
+ assert_equal t, @a.last_mtime
444
+ assert_equal "", @a.output.string
438
445
  end
439
446
 
440
447
  def util_mappings
metadata CHANGED
@@ -1,30 +1,54 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ZenTest
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 47
4
5
  prerelease: false
5
6
  segments:
6
7
  - 4
7
- - 3
8
- - 3
9
- version: 4.3.3
8
+ - 4
9
+ - 0
10
+ version: 4.4.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - Ryan Davis
13
14
  - Eric Hodel
14
15
  autorequire:
15
16
  bindir: bin
16
- cert_chain: []
17
+ cert_chain:
18
+ -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FxK1utWoIhtB6AFC/+trM0FQEB/jZkIS8SaNzn96Rl
36
+ n0sZEf77FLf5peR8TP/PtmIg7Cyqz23sLM4mCOoTGIy5OcZ8TdyiyINUHtb5ej/T
37
+ FBHgymkyj/AOSqKRIpXPhjC6
38
+ -----END CERTIFICATE-----
17
39
 
18
- date: 2010-06-17 00:00:00 -07:00
40
+ date: 2010-09-01 00:00:00 -07:00
19
41
  default_executable:
20
42
  dependencies:
21
43
  - !ruby/object:Gem::Dependency
22
44
  name: rubyforge
23
45
  prerelease: false
24
46
  requirement: &id001 !ruby/object:Gem::Requirement
47
+ none: false
25
48
  requirements:
26
49
  - - ">="
27
50
  - !ruby/object:Gem::Version
51
+ hash: 7
28
52
  segments:
29
53
  - 2
30
54
  - 0
@@ -36,28 +60,32 @@ dependencies:
36
60
  name: minitest
37
61
  prerelease: false
38
62
  requirement: &id002 !ruby/object:Gem::Requirement
63
+ none: false
39
64
  requirements:
40
65
  - - ">="
41
66
  - !ruby/object:Gem::Version
67
+ hash: 11
42
68
  segments:
43
69
  - 1
44
- - 6
70
+ - 7
45
71
  - 0
46
- version: 1.6.0
72
+ version: 1.7.0
47
73
  type: :development
48
74
  version_requirements: *id002
49
75
  - !ruby/object:Gem::Dependency
50
76
  name: hoe
51
77
  prerelease: false
52
78
  requirement: &id003 !ruby/object:Gem::Requirement
79
+ none: false
53
80
  requirements:
54
81
  - - ">="
55
82
  - !ruby/object:Gem::Version
83
+ hash: 21
56
84
  segments:
57
85
  - 2
58
86
  - 6
59
- - 0
60
- version: 2.6.0
87
+ - 1
88
+ version: 2.6.1
61
89
  type: :development
62
90
  version_requirements: *id003
63
91
  description: |-
@@ -144,23 +172,27 @@ rdoc_options:
144
172
  require_paths:
145
173
  - lib
146
174
  required_ruby_version: !ruby/object:Gem::Requirement
175
+ none: false
147
176
  requirements:
148
177
  - - ">="
149
178
  - !ruby/object:Gem::Version
179
+ hash: 3
150
180
  segments:
151
181
  - 0
152
182
  version: "0"
153
183
  required_rubygems_version: !ruby/object:Gem::Requirement
184
+ none: false
154
185
  requirements:
155
186
  - - ">="
156
187
  - !ruby/object:Gem::Version
188
+ hash: 3
157
189
  segments:
158
190
  - 0
159
191
  version: "0"
160
192
  requirements: []
161
193
 
162
194
  rubyforge_project: zentest
163
- rubygems_version: 1.3.6
195
+ rubygems_version: 1.3.7
164
196
  signing_key:
165
197
  specification_version: 3
166
198
  summary: "ZenTest provides 4 different tools: zentest, unit_diff, autotest, and multiruby"
metadata.gz.sig ADDED
@@ -0,0 +1 @@
1
+ �ж/�Hl5�<����ņsm�8C�����8��9��S�ᷴ�{V���o۳�da�p--������i�#[���55����g�ggԏ�VD��8B������.�3]  ���3�����}�E����Bb�4��F�����g!�T���R��x(�Z�y��~��׶�c�C0LЯ-�Eu>c k�p����ϐ\��/�D�<��yï��zJ���5�.$,6��`�� �c]���F��;ﳎ��H�&<w���