diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-12-08 16:36:29 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-12-08 17:30:02 +0900 |
commit | 473f9d2df0ddd7fdb5cc73fa3ad49b2f19f22b06 (patch) | |
tree | 6b39312502d32474da0157f5d55620fabd6454ea /spec/bundler/support/artifice/endpoint_marshal_fail_basic_authentication.rb | |
parent | 4aca77edde91f826aa243e268bf1ef5214530583 (diff) |
Merge prepare version of Bundler 2.2.0
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3864
Diffstat (limited to 'spec/bundler/support/artifice/endpoint_marshal_fail_basic_authentication.rb')
-rw-r--r-- | spec/bundler/support/artifice/endpoint_marshal_fail_basic_authentication.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/bundler/support/artifice/endpoint_marshal_fail_basic_authentication.rb b/spec/bundler/support/artifice/endpoint_marshal_fail_basic_authentication.rb new file mode 100644 index 0000000000..c341c3993f --- /dev/null +++ b/spec/bundler/support/artifice/endpoint_marshal_fail_basic_authentication.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require_relative "endpoint_marshal_fail" + +Artifice.deactivate + +class EndpointMarshalFailBasicAuthentication < EndpointMarshalFail + before do + unless env["HTTP_AUTHORIZATION"] + halt 401, "Authentication info not supplied" + end + end +end + +Artifice.activate_with(EndpointMarshalFailBasicAuthentication) |