From c5efd85580d6a6d40442393f1f2d21c6db1306e1 Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Sat, 19 Nov 2016 12:01:07 -0600 Subject: Update to sinatra 1.4.7 in the specs --- spec/support/artifice/endpoint.rb | 7 +------ spec/support/artifice/endpoint_500.rb | 6 +----- spec/support/artifice/fail.rb | 5 +---- spec/support/rubygems_ext.rb | 2 +- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/spec/support/artifice/endpoint.rb b/spec/support/artifice/endpoint.rb index fae72ea4cd..861ac49e93 100644 --- a/spec/support/artifice/endpoint.rb +++ b/spec/support/artifice/endpoint.rb @@ -3,12 +3,7 @@ require File.expand_path("../../path.rb", __FILE__) require File.expand_path("../../../../lib/bundler/deprecate", __FILE__) include Spec::Path -# Set up pretend http gem server with Artifice -$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/artifice*/lib")].first}" -$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/rack-*/lib")].first}" -$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/rack-*/lib")].last}" -$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/tilt*/lib")].first}" -$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/sinatra*/lib")].first}" +$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,rack,tilt,sinatra}-*/lib")].map(&:to_s)) require "artifice" require "sinatra/base" diff --git a/spec/support/artifice/endpoint_500.rb b/spec/support/artifice/endpoint_500.rb index 9bbbd1e2f2..993630b79e 100644 --- a/spec/support/artifice/endpoint_500.rb +++ b/spec/support/artifice/endpoint_500.rb @@ -2,11 +2,7 @@ require File.expand_path("../../path.rb", __FILE__) include Spec::Path -$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/artifice*/lib")].first}" -$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/rack-*/lib")].first}" -$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/rack-*/lib")].last}" -$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/tilt*/lib")].first}" -$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/sinatra*/lib")].first}" +$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,rack,tilt,sinatra}-*/lib")].map(&:to_s)) require "artifice" require "sinatra/base" diff --git a/spec/support/artifice/fail.rb b/spec/support/artifice/fail.rb index 2e29c03c5b..2ef009c7c8 100644 --- a/spec/support/artifice/fail.rb +++ b/spec/support/artifice/fail.rb @@ -3,10 +3,7 @@ require File.expand_path("../../path.rb", __FILE__) # Set up pretend http gem server with Artifice -$LOAD_PATH.unshift Dir[Spec::Path.base_system_gems.join("gems/artifice*/lib")].first.to_s -$LOAD_PATH.unshift Dir[Spec::Path.base_system_gems.join("gems/rack-*/lib")].first.to_s -$LOAD_PATH.unshift Dir[Spec::Path.base_system_gems.join("gems/rack-*/lib")].last.to_s -$LOAD_PATH.unshift Dir[Spec::Path.base_system_gems.join("gems/tilt*/lib")].first.to_s +$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,rack,tilt}-*/lib")].map(&:to_s)) require "artifice" class Fail diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb index f20e051d1d..bb8b7f2a51 100644 --- a/spec/support/rubygems_ext.rb +++ b/spec/support/rubygems_ext.rb @@ -11,7 +11,7 @@ module Spec "rack" => "< 2", "artifice" => "~> 0.6.0", "compact_index" => "~> 0.11.0", - "sinatra" => "1.2.7", + "sinatra" => "~> 1.4.7", # Rake version has to be consistent for tests to pass "rake" => "10.0.2", # 3.0.0 breaks 1.9.2 specs -- cgit v1.2.1