diff options
-rw-r--r-- | CHANGELOG.md | 13 | ||||
-rw-r--r-- | Gemfile | 8 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | lib/mixlib/authentication/signedheaderauth.rb | 4 | ||||
-rw-r--r-- | lib/mixlib/authentication/version.rb | 2 | ||||
-rw-r--r-- | mixlib-authentication.gemspec | 2 | ||||
-rw-r--r-- | spec/mixlib/authentication/http_authentication_request_spec.rb | 2 | ||||
-rw-r--r-- | spec/mixlib/authentication/mixlib_authentication_spec.rb | 4 | ||||
-rw-r--r-- | spec/spec_helper.rb | 2 |
9 files changed, 24 insertions, 15 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index ffc7249..f8a9115 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,18 @@ # mixlib-authentication Changelog -<!-- latest_release --> +<!-- latest_release 3.0.9 --> +## [v3.0.9](https://github.com/chef/mixlib-authentication/tree/v3.0.9) (2021-03-15) + +#### Merged Pull Requests +- Replace __FILE__ with __dir__ and use safe operators [#54](https://github.com/chef/mixlib-authentication/pull/54) ([tas50](https://github.com/tas50)) <!-- latest_release --> -<!-- release_rollup --> +<!-- release_rollup since=3.0.7 --> +### Changes not yet released to rubygems.org + +#### Merged Pull Requests +- Replace __FILE__ with __dir__ and use safe operators [#54](https://github.com/chef/mixlib-authentication/pull/54) ([tas50](https://github.com/tas50)) <!-- 3.0.9 --> +- Split using a string not a regex [#55](https://github.com/chef/mixlib-authentication/pull/55) ([tas50](https://github.com/tas50)) <!-- 3.0.8 --> <!-- release_rollup --> <!-- latest_stable_release --> @@ -4,12 +4,12 @@ gemspec group :test do gem "chefstyle" - gem "rspec-core", "~> 3.2" - gem "rspec-mocks", "~> 3.2" - gem "rspec-expectations", "~> 3.2" - gem "rake" gem "mixlib-log", "~> 3" gem "net-ssh" + gem "rake" + gem "rspec-core", "~> 3.2" + gem "rspec-expectations", "~> 3.2" + gem "rspec-mocks", "~> 3.2" end group :debug do @@ -1 +1 @@ -3.0.7
\ No newline at end of file +3.0.9
\ No newline at end of file diff --git a/lib/mixlib/authentication/signedheaderauth.rb b/lib/mixlib/authentication/signedheaderauth.rb index ffb6004..3782d1c 100644 --- a/lib/mixlib/authentication/signedheaderauth.rb +++ b/lib/mixlib/authentication/signedheaderauth.rb @@ -17,7 +17,7 @@ # limitations under the License. # -require "time" unless defined?(Time) +require "time" unless defined?(Time.zone_offset) require "base64" unless defined?(Base64) require "openssl/digest" require_relative "../authentication" @@ -196,7 +196,7 @@ module Mixlib # TODO: tim 2009-12-28: It'd be nice to just remove this special case, # always sign the entire request body, using the expanded multipart # body in the case of a file being include. - @hashed_body ||= if file && file.respond_to?(:read) + @hashed_body ||= if file&.respond_to?(:read) digester.hash_file(file, digest) else digester.hash_string(body, digest) diff --git a/lib/mixlib/authentication/version.rb b/lib/mixlib/authentication/version.rb index 983a666..071479e 100644 --- a/lib/mixlib/authentication/version.rb +++ b/lib/mixlib/authentication/version.rb @@ -16,6 +16,6 @@ module Mixlib module Authentication - VERSION = "3.0.7".freeze + VERSION = "3.0.9".freeze end end diff --git a/mixlib-authentication.gemspec b/mixlib-authentication.gemspec index 38a30a4..2bcf30e 100644 --- a/mixlib-authentication.gemspec +++ b/mixlib-authentication.gemspec @@ -1,4 +1,4 @@ -$:.unshift(File.dirname(__FILE__) + "/lib") +$:.unshift(__dir__ + "/lib") require "mixlib/authentication/version" Gem::Specification.new do |s| diff --git a/spec/mixlib/authentication/http_authentication_request_spec.rb b/spec/mixlib/authentication/http_authentication_request_spec.rb index 29a134a..b74968b 100644 --- a/spec/mixlib/authentication/http_authentication_request_spec.rb +++ b/spec/mixlib/authentication/http_authentication_request_spec.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper")) +require File.expand_path(File.join(__dir__, "..", "..", "spec_helper")) require "mixlib/authentication" require "mixlib/authentication/http_authentication_request" diff --git a/spec/mixlib/authentication/mixlib_authentication_spec.rb b/spec/mixlib/authentication/mixlib_authentication_spec.rb index b679208..3a6e0eb 100644 --- a/spec/mixlib/authentication/mixlib_authentication_spec.rb +++ b/spec/mixlib/authentication/mixlib_authentication_spec.rb @@ -19,13 +19,13 @@ # limitations under the License. # -require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper")) +require File.expand_path(File.join(__dir__, "..", "..", "spec_helper")) require "rubygems" unless defined?(Gem) require "ostruct" unless defined?(OpenStruct) require "openssl" unless defined?(OpenSSL) require "mixlib/authentication/signatureverification" -require "time" unless defined?(Time) +require "time" unless defined?(Time.zone_offset) require "net/ssh" unless defined?(Net::SSH) # TODO: should make these regular spec-based mock objects. diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f10ee93..015c298 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,6 +17,6 @@ # limitations under the License. # -$:.unshift File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")) # lib in mixlib-authentication +$:.unshift File.expand_path(File.join(__dir__, "..", "lib")) # lib in mixlib-authentication require "rubygems" unless defined?(Gem) |