summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2021-03-15 11:20:11 -0700
committerGitHub <noreply@github.com>2021-03-15 11:20:11 -0700
commit2269feb2b74a792352cf9568cd58866e4fbb8ad5 (patch)
tree4853bf58b80e404d22270336bf7a0907dceb638f
parent0fd5b792f8f7eaf38bb5308ff015e59513242c61 (diff)
parent14bf1b5047ac4d4cafdc630908b17a8b20a451d0 (diff)
downloadmixlib-authentication-2269feb2b74a792352cf9568cd58866e4fbb8ad5.tar.gz
Merge pull request #55 from chef/regex_split
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--Gemfile7
-rw-r--r--Rakefile7
-rw-r--r--lib/mixlib/authentication/signedheaderauth.rb2
3 files changed, 1 insertions, 15 deletions
diff --git a/Gemfile b/Gemfile
index 8786b84..7ce73b9 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,12 +2,6 @@ source "https://rubygems.org"
gemspec
-group :docs do
- gem "github-markup"
- gem "redcarpet"
- gem "yard"
-end
-
group :test do
gem "chefstyle"
gem "rspec-core", "~> 3.2"
@@ -21,6 +15,5 @@ end
group :debug do
gem "pry"
gem "pry-byebug"
- gem "pry-stack_explorer", "~> 0.4.0" # pin until we drop ruby < 2.6
gem "rb-readline"
end
diff --git a/Rakefile b/Rakefile
index c8140a3..03f4d6b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -23,13 +23,6 @@ rescue LoadError
puts "chefstyle gem is not installed. bundle install first to make sure all dependencies are installed."
end
-begin
- require "yard" unless defined?(YARD)
- YARD::Rake::YardocTask.new(:docs)
-rescue LoadError
- puts "yard is not available. bundle install first to make sure all dependencies are installed."
-end
-
task :console do
require "irb"
require "irb/completion"
diff --git a/lib/mixlib/authentication/signedheaderauth.rb b/lib/mixlib/authentication/signedheaderauth.rb
index c86c295..ffb6004 100644
--- a/lib/mixlib/authentication/signedheaderauth.rb
+++ b/lib/mixlib/authentication/signedheaderauth.rb
@@ -127,7 +127,7 @@ module Mixlib
}
signature = Base64.encode64(do_sign(rsa_key, digest, sign_algorithm, sign_version, use_ssh_agent)).chomp
- signature_lines = signature.split(/\n/)
+ signature_lines = signature.split("\n")
signature_lines.each_index do |idx|
key = "X-Ops-Authorization-#{idx + 1}"
header_hash[key] = signature_lines[idx]