diff options
Diffstat (limited to 'spec/bundler/support/artifice')
39 files changed, 42 insertions, 41 deletions
diff --git a/spec/bundler/support/artifice/compact_index.rb b/spec/bundler/support/artifice/compact_index.rb index 4f01690ae4..89362c4dbc 100644 --- a/spec/bundler/support/artifice/compact_index.rb +++ b/spec/bundler/support/artifice/compact_index.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint", __FILE__) +require_relative "endpoint" $LOAD_PATH.unshift Dir[base_system_gems.join("gems/compact_index*/lib")].first.to_s require "compact_index" diff --git a/spec/bundler/support/artifice/compact_index_api_missing.rb b/spec/bundler/support/artifice/compact_index_api_missing.rb index 94e6b73000..fdd342bc08 100644 --- a/spec/bundler/support/artifice/compact_index_api_missing.rb +++ b/spec/bundler/support/artifice/compact_index_api_missing.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_basic_authentication.rb b/spec/bundler/support/artifice/compact_index_basic_authentication.rb index 97aa6cbd84..775f1a3977 100644 --- a/spec/bundler/support/artifice/compact_index_basic_authentication.rb +++ b/spec/bundler/support/artifice/compact_index_basic_authentication.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_checksum_mismatch.rb b/spec/bundler/support/artifice/compact_index_checksum_mismatch.rb index 62feb9f164..1abe64236c 100644 --- a/spec/bundler/support/artifice/compact_index_checksum_mismatch.rb +++ b/spec/bundler/support/artifice/compact_index_checksum_mismatch.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_concurrent_download.rb b/spec/bundler/support/artifice/compact_index_concurrent_download.rb index 972ecb88b7..7f989a3f37 100644 --- a/spec/bundler/support/artifice/compact_index_concurrent_download.rb +++ b/spec/bundler/support/artifice/compact_index_concurrent_download.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_creds_diff_host.rb b/spec/bundler/support/artifice/compact_index_creds_diff_host.rb index 0d349bcc1e..6c3442e14b 100644 --- a/spec/bundler/support/artifice/compact_index_creds_diff_host.rb +++ b/spec/bundler/support/artifice/compact_index_creds_diff_host.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_extra.rb b/spec/bundler/support/artifice/compact_index_extra.rb index 84d1859235..3a09afd06f 100644 --- a/spec/bundler/support/artifice/compact_index_extra.rb +++ b/spec/bundler/support/artifice/compact_index_extra.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_extra_api.rb b/spec/bundler/support/artifice/compact_index_extra_api.rb index 903aa900fb..3c716763c0 100644 --- a/spec/bundler/support/artifice/compact_index_extra_api.rb +++ b/spec/bundler/support/artifice/compact_index_extra_api.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_extra_api_missing.rb b/spec/bundler/support/artifice/compact_index_extra_api_missing.rb index e72040f604..6bd24ddbb4 100644 --- a/spec/bundler/support/artifice/compact_index_extra_api_missing.rb +++ b/spec/bundler/support/artifice/compact_index_extra_api_missing.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index_extra_api", __FILE__) +require_relative "compact_index_extra_api" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_extra_missing.rb b/spec/bundler/support/artifice/compact_index_extra_missing.rb index 67a9d23691..4758b785ac 100644 --- a/spec/bundler/support/artifice/compact_index_extra_missing.rb +++ b/spec/bundler/support/artifice/compact_index_extra_missing.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index_extra", __FILE__) +require_relative "compact_index_extra" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_forbidden.rb b/spec/bundler/support/artifice/compact_index_forbidden.rb index 0a4dfdb2e8..3eebe0fbd8 100644 --- a/spec/bundler/support/artifice/compact_index_forbidden.rb +++ b/spec/bundler/support/artifice/compact_index_forbidden.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_host_redirect.rb b/spec/bundler/support/artifice/compact_index_host_redirect.rb index ab371117de..304c897d68 100644 --- a/spec/bundler/support/artifice/compact_index_host_redirect.rb +++ b/spec/bundler/support/artifice/compact_index_host_redirect.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_no_gem.rb b/spec/bundler/support/artifice/compact_index_no_gem.rb index 01c5be1b3d..0a4be08a46 100644 --- a/spec/bundler/support/artifice/compact_index_no_gem.rb +++ b/spec/bundler/support/artifice/compact_index_no_gem.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_partial_update.rb b/spec/bundler/support/artifice/compact_index_partial_update.rb index eaedff5105..6e7c05d423 100644 --- a/spec/bundler/support/artifice/compact_index_partial_update.rb +++ b/spec/bundler/support/artifice/compact_index_partial_update.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_range_not_satisfiable.rb b/spec/bundler/support/artifice/compact_index_range_not_satisfiable.rb index 487be4771a..788f9d6f99 100644 --- a/spec/bundler/support/artifice/compact_index_range_not_satisfiable.rb +++ b/spec/bundler/support/artifice/compact_index_range_not_satisfiable.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_rate_limited.rb b/spec/bundler/support/artifice/compact_index_rate_limited.rb index d8f4fc941c..ba17476045 100644 --- a/spec/bundler/support/artifice/compact_index_rate_limited.rb +++ b/spec/bundler/support/artifice/compact_index_rate_limited.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_redirects.rb b/spec/bundler/support/artifice/compact_index_redirects.rb index e83451b5b6..99adc797bf 100644 --- a/spec/bundler/support/artifice/compact_index_redirects.rb +++ b/spec/bundler/support/artifice/compact_index_redirects.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_strict_basic_authentication.rb b/spec/bundler/support/artifice/compact_index_strict_basic_authentication.rb index abbf3258e7..7d427b5382 100644 --- a/spec/bundler/support/artifice/compact_index_strict_basic_authentication.rb +++ b/spec/bundler/support/artifice/compact_index_strict_basic_authentication.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_wrong_dependencies.rb b/spec/bundler/support/artifice/compact_index_wrong_dependencies.rb index 7e1d3686e2..036fac70b3 100644 --- a/spec/bundler/support/artifice/compact_index_wrong_dependencies.rb +++ b/spec/bundler/support/artifice/compact_index_wrong_dependencies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/compact_index_wrong_gem_checksum.rb b/spec/bundler/support/artifice/compact_index_wrong_gem_checksum.rb index db4d8e3974..8add32b88f 100644 --- a/spec/bundler/support/artifice/compact_index_wrong_gem_checksum.rb +++ b/spec/bundler/support/artifice/compact_index_wrong_gem_checksum.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../compact_index", __FILE__) +require_relative "compact_index" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endopint_marshal_fail_basic_authentication.rb b/spec/bundler/support/artifice/endopint_marshal_fail_basic_authentication.rb index 12a6fa153f..c341c3993f 100644 --- a/spec/bundler/support/artifice/endopint_marshal_fail_basic_authentication.rb +++ b/spec/bundler/support/artifice/endopint_marshal_fail_basic_authentication.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint_marshal_fail", __FILE__) +require_relative "endpoint_marshal_fail" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endpoint.rb b/spec/bundler/support/artifice/endpoint.rb index 966681f8d8..bf26c56503 100644 --- a/spec/bundler/support/artifice/endpoint.rb +++ b/spec/bundler/support/artifice/endpoint.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -require File.expand_path("../../path.rb", __FILE__) -require Spec::Path.root.join("lib/bundler/deprecate") +require_relative "../path" +require Spec::Path.lib_dir.join("bundler/deprecate") include Spec::Path $LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,mustermann,rack,tilt,sinatra}-*/lib")].map(&:to_s)) @@ -44,7 +44,7 @@ class Endpoint < Sinatra::Base def dependencies_for(gem_names, gem_repo = GEM_REPO) return [] if gem_names.nil? || gem_names.empty? - require "#{Spec::Path.lib}/bundler" + require "#{Spec::Path.lib_dir}/bundler" Bundler::Deprecate.skip_during do all_specs = %w[specs.4.8 prerelease_specs.4.8].map do |filename| Marshal.load(File.open(gem_repo.join(filename)).read) diff --git a/spec/bundler/support/artifice/endpoint_500.rb b/spec/bundler/support/artifice/endpoint_500.rb index ad51d58e67..f98e7e3bc2 100644 --- a/spec/bundler/support/artifice/endpoint_500.rb +++ b/spec/bundler/support/artifice/endpoint_500.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../../path.rb", __FILE__) +require_relative "../path" include Spec::Path $LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,mustermann,rack,tilt,sinatra}-*/lib")].map(&:to_s)) diff --git a/spec/bundler/support/artifice/endpoint_api_forbidden.rb b/spec/bundler/support/artifice/endpoint_api_forbidden.rb index bb89747adc..edc2463424 100644 --- a/spec/bundler/support/artifice/endpoint_api_forbidden.rb +++ b/spec/bundler/support/artifice/endpoint_api_forbidden.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint", __FILE__) +require_relative "endpoint" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endpoint_api_missing.rb b/spec/bundler/support/artifice/endpoint_api_missing.rb index 2ada0dc553..8dafde7362 100644 --- a/spec/bundler/support/artifice/endpoint_api_missing.rb +++ b/spec/bundler/support/artifice/endpoint_api_missing.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint", __FILE__) +require_relative "endpoint" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endpoint_basic_authentication.rb b/spec/bundler/support/artifice/endpoint_basic_authentication.rb index 223671bc29..ff3d1493d6 100644 --- a/spec/bundler/support/artifice/endpoint_basic_authentication.rb +++ b/spec/bundler/support/artifice/endpoint_basic_authentication.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint", __FILE__) +require_relative "endpoint" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endpoint_creds_diff_host.rb b/spec/bundler/support/artifice/endpoint_creds_diff_host.rb index 925954b12d..f20ef74ac6 100644 --- a/spec/bundler/support/artifice/endpoint_creds_diff_host.rb +++ b/spec/bundler/support/artifice/endpoint_creds_diff_host.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint", __FILE__) +require_relative "endpoint" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endpoint_extra.rb b/spec/bundler/support/artifice/endpoint_extra.rb index 422f65401b..31f6822161 100644 --- a/spec/bundler/support/artifice/endpoint_extra.rb +++ b/spec/bundler/support/artifice/endpoint_extra.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint", __FILE__) +require_relative "endpoint" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endpoint_extra_api.rb b/spec/bundler/support/artifice/endpoint_extra_api.rb index 62e2c2bb93..213b8e5895 100644 --- a/spec/bundler/support/artifice/endpoint_extra_api.rb +++ b/spec/bundler/support/artifice/endpoint_extra_api.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint", __FILE__) +require_relative "endpoint" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endpoint_extra_missing.rb b/spec/bundler/support/artifice/endpoint_extra_missing.rb index 038a12610a..ee129025ff 100644 --- a/spec/bundler/support/artifice/endpoint_extra_missing.rb +++ b/spec/bundler/support/artifice/endpoint_extra_missing.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint_extra", __FILE__) +require_relative "endpoint_extra" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endpoint_fallback.rb b/spec/bundler/support/artifice/endpoint_fallback.rb index 554c08f0a2..08edf232e3 100644 --- a/spec/bundler/support/artifice/endpoint_fallback.rb +++ b/spec/bundler/support/artifice/endpoint_fallback.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint", __FILE__) +require_relative "endpoint" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endpoint_host_redirect.rb b/spec/bundler/support/artifice/endpoint_host_redirect.rb index cda5664be2..338cbcad00 100644 --- a/spec/bundler/support/artifice/endpoint_host_redirect.rb +++ b/spec/bundler/support/artifice/endpoint_host_redirect.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint", __FILE__) +require_relative "endpoint" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endpoint_marshal_fail.rb b/spec/bundler/support/artifice/endpoint_marshal_fail.rb index 2a5dcdc2fd..22c13e3e17 100644 --- a/spec/bundler/support/artifice/endpoint_marshal_fail.rb +++ b/spec/bundler/support/artifice/endpoint_marshal_fail.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint_fallback", __FILE__) +require_relative "endpoint_fallback" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endpoint_mirror_source.rb b/spec/bundler/support/artifice/endpoint_mirror_source.rb index 64452f198d..318866e420 100644 --- a/spec/bundler/support/artifice/endpoint_mirror_source.rb +++ b/spec/bundler/support/artifice/endpoint_mirror_source.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint", __FILE__) +require_relative "endpoint" class EndpointMirrorSource < Endpoint get "/gems/:id" do diff --git a/spec/bundler/support/artifice/endpoint_redirect.rb b/spec/bundler/support/artifice/endpoint_redirect.rb index ebf01458ba..ee97fccf64 100644 --- a/spec/bundler/support/artifice/endpoint_redirect.rb +++ b/spec/bundler/support/artifice/endpoint_redirect.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint", __FILE__) +require_relative "endpoint" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endpoint_strict_basic_authentication.rb b/spec/bundler/support/artifice/endpoint_strict_basic_authentication.rb index 905a519f3f..4d4da08770 100644 --- a/spec/bundler/support/artifice/endpoint_strict_basic_authentication.rb +++ b/spec/bundler/support/artifice/endpoint_strict_basic_authentication.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint", __FILE__) +require_relative "endpoint" Artifice.deactivate diff --git a/spec/bundler/support/artifice/endpoint_timeout.rb b/spec/bundler/support/artifice/endpoint_timeout.rb index 3f60471c90..c118da1893 100644 --- a/spec/bundler/support/artifice/endpoint_timeout.rb +++ b/spec/bundler/support/artifice/endpoint_timeout.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../endpoint_fallback", __FILE__) +require_relative "endpoint_fallback" Artifice.deactivate diff --git a/spec/bundler/support/artifice/vcr.rb b/spec/bundler/support/artifice/vcr.rb index 1e3809ff62..a46f8e9391 100644 --- a/spec/bundler/support/artifice/vcr.rb +++ b/spec/bundler/support/artifice/vcr.rb @@ -1,8 +1,9 @@ # frozen_string_literal: true require "net/http" +require_relative "../path" -CASSETTE_PATH = File.expand_path("../vcr_cassettes", __FILE__) +CASSETTE_PATH = "#{Spec::Path.spec_dir}/support/artifice/vcr_cassettes" CASSETTE_NAME = ENV.fetch("BUNDLER_SPEC_VCR_CASSETTE_NAME") { "realworld" } class BundlerVCRHTTP < Net::HTTP diff --git a/spec/bundler/support/artifice/windows.rb b/spec/bundler/support/artifice/windows.rb index 0630798df0..ce7455b86c 100644 --- a/spec/bundler/support/artifice/windows.rb +++ b/spec/bundler/support/artifice/windows.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require File.expand_path("../../path.rb", __FILE__) +require_relative "../path" include Spec::Path $LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,mustermann,rack,tilt,sinatra}-*/lib")].map(&:to_s)) |