rubygems-test 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ === 0.4.2 / 2011-05-09
2
+
3
+ * Fix operation on 1.8.x
4
+
1
5
  === 0.4.1 / 2011-04-26
2
6
 
3
7
  * Fix for situations during on-install testing where the gem dir is not available (f.e., on a new installation)
@@ -15,7 +15,7 @@ class Gem::Commands::TestCommand < Gem::Command
15
15
  include Gem::VersionOption
16
16
  include Gem::DefaultUserInteraction
17
17
 
18
- VERSION = "0.4.1"
18
+ VERSION = "0.4.2"
19
19
 
20
20
  # taken straight out of rake
21
21
  DEFAULT_RAKEFILES = ['rakefile', 'Rakefile', 'rakefile.rb', 'Rakefile.rb']
@@ -64,6 +64,16 @@ class Test::Unit::TestCase
64
64
  Gem.configuration.verbose = false
65
65
  end
66
66
 
67
+ def set_paths
68
+ if Gem::VERSION > '1.8'
69
+ Gem.paths = { :home => @gem_temp_path }
70
+ else
71
+ Gem.send :set_home, @gem_temp_path
72
+ end
73
+
74
+ Gem.refresh
75
+ end
76
+
67
77
  def set_gem_temp_paths
68
78
  @gem_temp_path = Dir.mktmpdir('rubygems-test')
69
79
  @gem_home = Gem.dir
@@ -75,9 +85,8 @@ class Test::Unit::TestCase
75
85
  else
76
86
  Gem.path.replace [@gem_temp_path]
77
87
  end
78
- Gem.send :set_home, @gem_temp_path
79
88
 
80
- Gem.refresh
89
+ set_paths
81
90
  end
82
91
 
83
92
  def unset_gem_temp_paths
@@ -89,8 +98,8 @@ class Test::Unit::TestCase
89
98
  else
90
99
  Gem.path.replace @gem_paths
91
100
  end
92
- Gem.send :set_home, @gem_home
93
- Gem.refresh
101
+
102
+ set_paths
94
103
  end
95
104
 
96
105
  def setup
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rubygems-test
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.1
5
+ version: 0.4.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Erik Hollensbe
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-04-26 00:00:00 Z
14
+ date: 2011-05-09 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake