gems: drop Mechanize, HTTParty, and Sinatra gems.

This commit is contained in:
evazion
2020-06-21 12:00:57 -05:00
parent 5c7843bd3d
commit a4efeb2260
7 changed files with 2 additions and 122 deletions

View File

@@ -22,8 +22,8 @@ module Danbooru
@http ||=
::Danbooru::Http::ApplicationClient.new
.timeout(DEFAULT_TIMEOUT)
.headers(Danbooru.config.http_headers)
.headers("Accept-Encoding" => "gzip")
.headers("User-Agent": "#{Danbooru.config.canonical_app_name}/#{Rails.application.config.x.git_hash}")
.use(:auto_inflate)
.use(:retriable)
.use(redirector: { max_redirects: MAX_REDIRECTS })

View File

@@ -155,7 +155,6 @@ class PixivApiClient
def api_client
http.headers(
**Danbooru.config.http_headers,
"Referer": "http://www.pixiv.net",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer #{access_token}"

View File

@@ -141,7 +141,7 @@ module Sources
# Subclasses should merge in any required headers needed to access resources
# on the site.
def headers
Danbooru.config.http_headers
{}
end
# Returns the size of the image resource without actually downloading the file.