diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-07-21 00:06:18 +0300 |
---|---|---|
committer | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-07-21 00:06:18 +0300 |
commit | 111b3cdc8e73b33e287a9b0b34c41f2f3c242fde (patch) | |
tree | 47fd80053acd1490ac85de9ed377b38e26d4828f /lib | |
parent | 8299aabc25acb9ae7251d6dbb61337e37710f58b (diff) |
Upgrade diaspora_federation to 1.0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/connection_tester.rb | 4 | ||||
-rw-r--r-- | lib/pubsubhubbub.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/connection_tester.rb b/lib/connection_tester.rb index 5bc58d75b..ef5a4abf8 100644 --- a/lib/connection_tester.rb +++ b/lib/connection_tester.rb @@ -114,7 +114,7 @@ class ConnectionTester raise NetFailure, e.message rescue Faraday::SSLError => e raise SSLFailure, e.message - rescue ArgumentError, FaradayMiddleware::RedirectLimitReached, Faraday::ClientError => e + rescue ArgumentError, Faraday::FollowRedirects::RedirectLimitReached, Faraday::ClientError => e raise HTTPFailure, e.message rescue StandardError => e unexpected_error(e) @@ -146,7 +146,7 @@ class ConnectionTester def with_http_connection @http ||= Faraday.new(@url) do |c| c.use Faraday::Response::RaiseError - c.use FaradayMiddleware::FollowRedirects, limit: 3 + c.use Faraday::FollowRedirects::Middleware, limit: 3 c.adapter(Faraday.default_adapter) c.headers[:user_agent] = "diaspora-connection-tester" c.options.timeout = 12 diff --git a/lib/pubsubhubbub.rb b/lib/pubsubhubbub.rb index 66f899ba6..a6a566173 100644 --- a/lib/pubsubhubbub.rb +++ b/lib/pubsubhubbub.rb @@ -14,8 +14,8 @@ class Pubsubhubbub conn = Faraday.new do |c| c.use Faraday::Request::UrlEncoded # encode request params as "www-form-urlencoded" - c.use Faraday::Adapter::NetHttp # perform requests with Net::HTTP + c.adapter Faraday::Adapter::NetHttp # perform requests with Net::HTTP end conn.post @hub, {'hub.url' => feed, 'hub.mode' => 'publish'} end -end
\ No newline at end of file +end |