summaryrefslogtreecommitdiff
path: root/spec/support/artifice/endpoint.rb
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2012-11-19 09:37:56 -0800
committerAndre Arko <andre@arko.net>2012-11-19 09:37:56 -0800
commit402faf456bfe2b239aa4ef95a0c9870edf7bb00b (patch)
tree7a45b4399c8fbc357f7d02b3c3f2e0f8c43b9957 /spec/support/artifice/endpoint.rb
parent23543c7b3351c832683b8e0af8e4c197c24b7294 (diff)
downloadbundler-402faf456bfe2b239aa4ef95a0c9870edf7bb00b.tar.gz
suppress rubygems deprecation warnings in artifice
Diffstat (limited to 'spec/support/artifice/endpoint.rb')
-rw-r--r--spec/support/artifice/endpoint.rb27
1 files changed, 15 insertions, 12 deletions
diff --git a/spec/support/artifice/endpoint.rb b/spec/support/artifice/endpoint.rb
index 268a314efe..e3b698fcde 100644
--- a/spec/support/artifice/endpoint.rb
+++ b/spec/support/artifice/endpoint.rb
@@ -15,18 +15,21 @@ class Endpoint < Sinatra::Base
helpers do
def dependencies_for(gem_names, marshal = gem_repo1("Marshal.4.8"))
require 'rubygems'
- Marshal.load(File.open(marshal).read).map do |gem, spec|
- if gem_names.include?(spec.name)
- {
- :name => spec.name,
- :number => spec.version.version,
- :platform => spec.platform.to_s,
- :dependencies => spec.dependencies.select {|dep| dep.type == :runtime }.map do |dep|
- [dep.name, dep.requirement.requirements.map {|a| a.join(" ") }.join(", ")]
- end
- }
- end
- end.compact
+ require 'bundler/rubygems_integration'
+ Bundler::RubygemsIntegration::Deprecate.skip_during do
+ Marshal.load(File.open(marshal).read).map do |gem, spec|
+ if gem_names.include?(spec.name)
+ {
+ :name => spec.name,
+ :number => spec.version.version,
+ :platform => spec.platform.to_s,
+ :dependencies => spec.dependencies.select {|dep| dep.type == :runtime }.map do |dep|
+ [dep.name, dep.requirement.requirements.map {|a| a.join(" ") }.join(", ")]
+ end
+ }
+ end
+ end.compact
+ end
end
end