Enable frozen string literals.
Make all string literals immutable by default.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Danbooru
|
||||
module Helpers
|
||||
module_function
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "danbooru/http/application_client"
|
||||
require "danbooru/http/html_adapter"
|
||||
require "danbooru/http/xml_adapter"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# An extension to HTTP::Client that lets us write Rack-style middlewares that
|
||||
# hook into the request/response cycle and override how requests are made. This
|
||||
# works by extending http.rb's concept of features (HTTP::Feature) to give them
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Danbooru
|
||||
class Http
|
||||
class Cache < HTTP::Feature
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Danbooru
|
||||
class Http
|
||||
class HtmlAdapter < HTTP::MimeType::Adapter
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Danbooru
|
||||
class Http
|
||||
class Logger < HTTP::Feature
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# A HTTP::Feature that automatically follows HTTP redirects.
|
||||
#
|
||||
# @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# A HTTP::Feature that automatically retries requests that return a 429 error
|
||||
# or a Retry-After header.
|
||||
#
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Danbooru
|
||||
class Http
|
||||
class Session < HTTP::Feature
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Danbooru
|
||||
class Http
|
||||
class SpoofReferrer < HTTP::Feature
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Detect sites using Cloudflare Polish and bypass it by adding a random
|
||||
# cache-busting URL param.
|
||||
#
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Danbooru
|
||||
class Http
|
||||
class XmlAdapter < HTTP::MimeType::Adapter
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# A wrapper around the IPAddress gem that adds some extra utility methods.
|
||||
#
|
||||
# @see https://github.com/ipaddress-gem/ipaddress
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Danbooru
|
||||
class MessageVerifier
|
||||
attr_reader :purpose, :secret, :verifier
|
||||
|
||||
Reference in New Issue
Block a user