mixlib-authentication 1.4.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/mixlib/authentication.rb +3 -3
- data/lib/mixlib/authentication/digester.rb +2 -2
- data/lib/mixlib/authentication/http_authentication_request.rb +4 -4
- data/lib/mixlib/authentication/null_logger.rb +2 -2
- data/lib/mixlib/authentication/signatureverification.rb +18 -18
- data/lib/mixlib/authentication/signedheaderauth.rb +116 -40
- data/lib/mixlib/authentication/version.rb +3 -2
- metadata +6 -87
- data/Gemfile +0 -7
- data/NOTICE +0 -7
- data/README.md +0 -23
- data/Rakefile +0 -18
- data/mixlib-authentication.gemspec +0 -22
- data/spec/mixlib/authentication/digester_spec.rb +0 -24
- data/spec/mixlib/authentication/http_authentication_request_spec.rb +0 -132
- data/spec/mixlib/authentication/mixlib_authentication_spec.rb +0 -596
- data/spec/mixlib/authentication/mixlib_log_missing_spec.rb +0 -55
- data/spec/spec_helper.rb +0 -22
@@ -1,55 +0,0 @@
|
|
1
|
-
describe "Mixlib::Authentication::Log" do
|
2
|
-
before do
|
3
|
-
Mixlib::Authentication.send(:remove_const, "DEFAULT_SERVER_API_VERSION")
|
4
|
-
Mixlib::Authentication.send(:remove_const, "Log")
|
5
|
-
end
|
6
|
-
|
7
|
-
context "without mixlib-log" do
|
8
|
-
before do
|
9
|
-
@mixlib_path = $LOAD_PATH.find { |p| p.match("mixlib-log") }
|
10
|
-
$LOAD_PATH.reject! { |p| p.match("mixlib-log") }
|
11
|
-
|
12
|
-
load "mixlib/authentication.rb"
|
13
|
-
end
|
14
|
-
|
15
|
-
after do
|
16
|
-
$LOAD_PATH.unshift(@mixlib_path)
|
17
|
-
end
|
18
|
-
|
19
|
-
it "uses MixlibLogMissing" do
|
20
|
-
expect(Mixlib::Authentication::Log.singleton_class.included_modules)
|
21
|
-
.to include(Mixlib::Authentication::NullLogger)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "default log level is :error" do
|
25
|
-
expect(Mixlib::Authentication::Log.level).to eq(:error)
|
26
|
-
end
|
27
|
-
|
28
|
-
%w{debug info warn error fatal}.each do |level|
|
29
|
-
it "logs at level #{level}" do
|
30
|
-
expect(Mixlib::Authentication::Log).to receive(level).with("foo")
|
31
|
-
|
32
|
-
Mixlib::Authentication.logger.send(level, "foo")
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
context "with mixlib-log" do
|
38
|
-
before do
|
39
|
-
load "mixlib/authentication.rb"
|
40
|
-
end
|
41
|
-
|
42
|
-
it "uses Mixlib::Log" do
|
43
|
-
expect(Mixlib::Authentication::Log.singleton_class.included_modules)
|
44
|
-
.to include(Mixlib::Log)
|
45
|
-
end
|
46
|
-
|
47
|
-
%w{debug info warn error fatal}.each do |level|
|
48
|
-
it "forward #{level} to mixlib-log" do
|
49
|
-
expect(Mixlib::Authentication::Log.logger).to receive(level).with("foo")
|
50
|
-
|
51
|
-
Mixlib::Authentication.logger.send(level, "foo")
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
data/spec/spec_helper.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Author:: Tim Hinderliter (<tim@opscode.com>)
|
3
|
-
# Author:: Christopher Walters (<cw@opscode.com>)
|
4
|
-
# Copyright:: Copyright (c) 2009, 2010 Opscode, Inc.
|
5
|
-
# License:: Apache License, Version 2.0
|
6
|
-
#
|
7
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
#
|
19
|
-
|
20
|
-
$:.unshift File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")) # lib in mixlib-authentication
|
21
|
-
|
22
|
-
require "rubygems"
|