1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rubygems/package.rb: Set rubygems_version before validation.

Fixes issue with bundler.
* test/rubygems/test_gem_package.rb:  Test for above.

* lib/rubygems/remote_fetcher.rb:  Only update the cache when we have
  permission.  [ruby-trunk - Bug #7509]
* lib/rubygems/source.rb (class Gem):  ditto
* test/rubygems/test_gem_remote_fetcher.rb:  Test for above.
* lib/rubygems/test_utilities.rb:  ditto

* lib/rubygems/specification.rb:  Derive base_dir properly for default
  gems.  [ruby-trunk - Bug #7496]
* test/rubygems/test_gem_specification.rb:  Test for above.

* lib/rubygems.rb:  Untaint Dir.pwd when searching for gemdeps files
  for operation under $SAFE=1


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2012-12-06 05:13:08 +00:00
parent 5ffc1a3aaa
commit afae107a4c
10 changed files with 76 additions and 16 deletions

View file

@ -63,9 +63,9 @@ class Gem::FakeFetcher
end
end
def cache_update_path uri, path = nil
def cache_update_path uri, path = nil, update = true
if data = fetch_path(uri)
open(path, 'wb') { |io| io.write data } if path
open(path, 'wb') { |io| io.write data } if path and update
data
else
Gem.read_binary(path) if path