diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d7d9b0..b163705 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Starting with v2.0.0, all notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## v3.2.0 - 2021-11-09 + +* Allow requests to follow redirects +* Remove the `gettext-setup` gem dependency, which was unused + ## v3.1.0 - 2021-08-20 ### Changed diff --git a/lib/puppet_forge/connection/connection_failure.rb b/lib/puppet_forge/connection/connection_failure.rb index 6dd0be8..df2f27f 100644 --- a/lib/puppet_forge/connection/connection_failure.rb +++ b/lib/puppet_forge/connection/connection_failure.rb @@ -9,22 +9,11 @@ def call(env) @app.call(env) rescue Faraday::ConnectionFailed, Faraday::TimeoutError => e baseurl = env[:url].dup - errmsg = "Unable to connect to #{baseurl.to_s}" + errmsg = "Unable to connect to %{scheme}://%{host}" % { scheme: baseurl.scheme, host: baseurl.host } if proxy = env[:request][:proxy] - errmsg << ("Unable to connect to %{scheme}://%{host} (using proxy %{proxy}) (for request %{path_query})") % { - scheme: baseurl.scheme, - host: baseurl.host, - proxy: proxy.uri.to_s, - path_query: baseurl.request_uri, - } - else - errmsg << ("Unable to connect to %{scheme}://%{host} (for request %{path_query})") % { - scheme: baseurl.scheme, - host: baseurl.host, - path_query: baseurl.request_uri, - } + errmsg << " (using proxy %{proxy})" % { proxy: proxy.uri.to_s } end - errmsg << ": #{e.message}" + errmsg << " (for request %{path_query}): %{message}" % { message: e.message, path_query: baseurl.request_uri } m = Faraday::ConnectionFailed.new(errmsg) m.set_backtrace(e.backtrace) raise m diff --git a/lib/puppet_forge/version.rb b/lib/puppet_forge/version.rb index 4b7e9fb..5f6b37b 100644 --- a/lib/puppet_forge/version.rb +++ b/lib/puppet_forge/version.rb @@ -1,3 +1,3 @@ module PuppetForge - VERSION = '3.1.0' # Library version + VERSION = '3.2.0' # Library version end