diff options
author | Tim Smith <tsmith@chef.io> | 2021-03-15 11:20:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-15 11:20:11 -0700 |
commit | 2269feb2b74a792352cf9568cd58866e4fbb8ad5 (patch) | |
tree | 4853bf58b80e404d22270336bf7a0907dceb638f | |
parent | 0fd5b792f8f7eaf38bb5308ff015e59513242c61 (diff) | |
parent | 14bf1b5047ac4d4cafdc630908b17a8b20a451d0 (diff) | |
download | mixlib-authentication-2269feb2b74a792352cf9568cd58866e4fbb8ad5.tar.gz |
Merge pull request #55 from chef/regex_split
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | Gemfile | 7 | ||||
-rw-r--r-- | Rakefile | 7 | ||||
-rw-r--r-- | lib/mixlib/authentication/signedheaderauth.rb | 2 |
3 files changed, 1 insertions, 15 deletions
@@ -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 @@ -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] |