summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2018-03-10 15:41:51 -0800
committerSamuel Giddins <segiddins@segiddins.me>2018-03-10 15:41:51 -0800
commita5130824dea64200e28fd3a2886016ac1001b1d0 (patch)
tree6597a955ac4fa075167f1a013a41c9c6cf1c1749
parent007a1737f3d3ba678bc78d3fa101d61b3d6892db (diff)
downloadbundler-segiddins/use-rubygems-integration-inflate.tar.gz
Use Bundler.rubygems.inflate instead of the Gem::Util method directlysegiddins/use-rubygems-integration-inflate
-rw-r--r--lib/bundler/fetcher.rb4
-rw-r--r--lib/bundler/fetcher/index.rb4
-rw-r--r--spec/install/gems/resolving_spec.rb2
-rw-r--r--spec/support/artifice/compact_index.rb2
-rw-r--r--spec/support/artifice/endpoint.rb2
5 files changed, 7 insertions, 7 deletions
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 3538b668fa..444778b36b 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -96,11 +96,11 @@ module Bundler
uri = URI.parse("#{remote_uri}#{Gem::MARSHAL_SPEC_DIR}#{spec_file_name}.rz")
if uri.scheme == "file"
- Bundler.load_marshal Gem::Util.inflate(Gem.read_binary(uri.path))
+ Bundler.load_marshal Bundler.rubygems.inflate(Gem.read_binary(uri.path))
elsif cached_spec_path = gemspec_cached_path(spec_file_name)
Bundler.load_gemspec(cached_spec_path)
else
- Bundler.load_marshal Gem::Util.inflate(downloader.fetch(uri).body)
+ Bundler.load_marshal Bundler.rubygems.inflate(downloader.fetch(uri).body)
end
rescue MarshalError
raise HTTPError, "Gemspec #{spec} contained invalid data.\n" \
diff --git a/lib/bundler/fetcher/index.rb b/lib/bundler/fetcher/index.rb
index 19b37ee548..1a8064624d 100644
--- a/lib/bundler/fetcher/index.rb
+++ b/lib/bundler/fetcher/index.rb
@@ -29,11 +29,11 @@ module Bundler
uri = URI.parse("#{remote_uri}#{Gem::MARSHAL_SPEC_DIR}#{spec_file_name}.rz")
if uri.scheme == "file"
- Bundler.load_marshal Gem::Util.inflate(Gem.read_binary(uri.path))
+ Bundler.load_marshal Bundler.rubygems.inflate(Gem.read_binary(uri.path))
elsif cached_spec_path = gemspec_cached_path(spec_file_name)
Bundler.load_gemspec(cached_spec_path)
else
- Bundler.load_marshal Gem::Util.inflate(downloader.fetch(uri).body)
+ Bundler.load_marshal Bundler.rubygems.inflate(downloader.fetch(uri).body)
end
rescue MarshalError
raise HTTPError, "Gemspec #{spec} contained invalid data.\n" \
diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb
index cf9f19980a..2925542d86 100644
--- a/spec/install/gems/resolving_spec.rb
+++ b/spec/install/gems/resolving_spec.rb
@@ -22,7 +22,7 @@ RSpec.describe "bundle install with install-time dependencies" do
build_repo2
path = "#{gem_repo2}/#{Gem::MARSHAL_SPEC_DIR}/actionpack-2.3.2.gemspec.rz"
- spec = Marshal.load(Gem::Util.inflate(File.read(path)))
+ spec = Marshal.load(Bundler.rubygems.inflate(File.read(path)))
spec.dependencies.each do |d|
d.instance_variable_set(:@type, :fail)
end
diff --git a/spec/support/artifice/compact_index.rb b/spec/support/artifice/compact_index.rb
index d59f59831b..38559e2e23 100644
--- a/spec/support/artifice/compact_index.rb
+++ b/spec/support/artifice/compact_index.rb
@@ -10,7 +10,7 @@ class CompactIndexAPI < Endpoint
def load_spec(name, version, platform, gem_repo)
full_name = "#{name}-#{version}"
full_name += "-#{platform}" if platform != "ruby"
- Marshal.load(Gem::Util.inflate(File.open(gem_repo.join("quick/Marshal.4.8/#{full_name}.gemspec.rz")).read))
+ Marshal.load(Bundler.rubygems.inflate(File.open(gem_repo.join("quick/Marshal.4.8/#{full_name}.gemspec.rz")).read))
end
def etag_response
diff --git a/spec/support/artifice/endpoint.rb b/spec/support/artifice/endpoint.rb
index 84dbcfd345..9a0cfae8a2 100644
--- a/spec/support/artifice/endpoint.rb
+++ b/spec/support/artifice/endpoint.rb
@@ -68,7 +68,7 @@ class Endpoint < Sinatra::Base
def load_spec(name, version, platform, gem_repo)
full_name = "#{name}-#{version}"
full_name += "-#{platform}" if platform != "ruby"
- Marshal.load(Gem::Util.inflate(File.open(gem_repo.join("quick/Marshal.4.8/#{full_name}.gemspec.rz")).read))
+ Marshal.load(Bundler.rubygems.inflate(File.open(gem_repo.join("quick/Marshal.4.8/#{full_name}.gemspec.rz")).read))
end
end