Skip to content

Commit

Permalink
Merge pull request #94 from caseywilliams/maint/release-3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
caseywilliams authored Nov 9, 2021
2 parents 19457cc + 4ac649a commit 7441c04
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 3 additions & 14 deletions lib/puppet_forge/connection/connection_failure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet_forge/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module PuppetForge
VERSION = '3.1.0' # Library version
VERSION = '3.2.0' # Library version
end

0 comments on commit 7441c04

Please sign in to comment.