Enable frozen string literals.

Make all string literals immutable by default.
This commit is contained in:
evazion
2021-12-14 19:29:23 -06:00
parent 67b96135dd
commit a7dc05ce63
392 changed files with 786 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Danbooru
module Helpers
module_function

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require "danbooru/http/application_client"
require "danbooru/http/html_adapter"
require "danbooru/http/xml_adapter"

View File

@@ -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

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Danbooru
class Http
class Cache < HTTP::Feature

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Danbooru
class Http
class HtmlAdapter < HTTP::MimeType::Adapter

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Danbooru
class Http
class Logger < HTTP::Feature

View File

@@ -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

View File

@@ -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.
#

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Danbooru
class Http
class Session < HTTP::Feature

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Danbooru
class Http
class SpoofReferrer < HTTP::Feature

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# Detect sites using Cloudflare Polish and bypass it by adding a random
# cache-busting URL param.
#

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Danbooru
class Http
class XmlAdapter < HTTP::MimeType::Adapter

View File

@@ -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

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Danbooru
class MessageVerifier
attr_reader :purpose, :secret, :verifier