diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 69f7fa896..66bc7b70a 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -28,8 +28,8 @@ jobs:
- name: Run linter
run: bin/lint --nofix
- development_environment:
- name: Development Environment
+ development_demo:
+ name: Tests for Development and Demo
runs-on: ubuntu-latest
timeout-minutes: 10
env:
@@ -39,6 +39,7 @@ jobs:
BUNDLE_RETRY: 3
BUNDLE_PATH: vendor/bundle
DISABLE_SPRING: 1
+ TEST_DEMO: 1
services:
postgres:
image: postgres:15
diff --git a/Gemfile b/Gemfile
index f5c5fc8fd..e28aa348a 100644
--- a/Gemfile
+++ b/Gemfile
@@ -26,6 +26,9 @@ gem 'nokogiri'
gem 'pg', platforms: [:mri, :mingw, :x64_mingw]
gem 'rack', '~> 2.2'
gem 'rails'
+gem "sprockets-rails"
+# PGHero for the demo app
+gem 'pghero'
platforms :ruby do
gem "bootsnap"
diff --git a/Gemfile.lock b/Gemfile.lock
index a857772d6..c59fd7ec0 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -288,6 +288,8 @@ GEM
ast (~> 2.4.1)
racc
pg (1.5.4)
+ pghero (3.4.1)
+ activerecord (>= 6)
prettier_print (1.2.1)
prism (0.24.0)
protocol-hpack (1.4.2)
@@ -452,6 +454,13 @@ GEM
thor (>= 0.19.2)
spoon (0.0.6)
ffi
+ sprockets (4.2.1)
+ concurrent-ruby (~> 1.0)
+ rack (>= 2.2.4, < 4)
+ sprockets-rails (3.4.2)
+ actionpack (>= 5.2)
+ activesupport (>= 5.2)
+ sprockets (>= 3.0.0)
stackprof (0.2.25)
stringio (3.1.0)
syntax_tree (6.2.0)
@@ -528,6 +537,7 @@ DEPENDENCIES
net-smtp
nokogiri
pg
+ pghero
pry-byebug
pry-rails
puma
@@ -545,6 +555,7 @@ DEPENDENCIES
sorbet
sorbet-runtime
spoom
+ sprockets-rails
stackprof
tapioca
timecop
diff --git a/demo/app/jobs/pg_hero_maintenance_job.rb b/demo/app/jobs/pg_hero_maintenance_job.rb
new file mode 100644
index 000000000..cbc122229
--- /dev/null
+++ b/demo/app/jobs/pg_hero_maintenance_job.rb
@@ -0,0 +1,15 @@
+class PgHeroMaintenanceJob < ApplicationJob
+ include GoodJob::ActiveJobExtensions::Concurrency
+
+ good_job_control_concurrency_with(
+ key: "pg_hero_maintenance",
+ total_limit: 1
+ )
+
+ discard_on StandardError
+
+ def perform
+ PgHero.capture_query_stats
+ PgHero.clean_query_stats
+ end
+end
diff --git a/demo/config/initializers/good_job.rb b/demo/config/initializers/good_job.rb
index 41d5aaf6c..29629e367 100644
--- a/demo/config/initializers/good_job.rb
+++ b/demo/config/initializers/good_job.rb
@@ -82,6 +82,11 @@
complex_schedule: {
cron: -> (last_ran) { last_ran ? last_ran + 17.hours : Time.now},
class: "OtherJob",
+ },
+ pg_hero_maintenance: {
+ cron: "*/10 * * * *", # Every 10 minutes
+ class: "PgHeroMaintenanceJob",
+ description: "Runs PG Hero maintenance",
}
}
end
diff --git a/demo/config/routes.rb b/demo/config/routes.rb
index 950e86e49..8d6f2a0ac 100644
--- a/demo/config/routes.rb
+++ b/demo/config/routes.rb
@@ -3,4 +3,6 @@
mount GoodJob::Engine => "/good_job"
get :create_job, to: 'application#create_job'
+
+ mount PgHero::Engine, at: "pghero"
end
diff --git a/demo/db/migrate/20240321162554_create_pghero_query_stats.rb b/demo/db/migrate/20240321162554_create_pghero_query_stats.rb
new file mode 100644
index 000000000..3b52e8d3f
--- /dev/null
+++ b/demo/db/migrate/20240321162554_create_pghero_query_stats.rb
@@ -0,0 +1,17 @@
+class CreatePgheroQueryStats < ActiveRecord::Migration[7.1]
+ def change
+ enable_extension "pg_stat_statements"
+
+ create_table :pghero_query_stats do |t|
+ t.text :database
+ t.text :user
+ t.text :query
+ t.integer :query_hash, limit: 8
+ t.float :total_time
+ t.integer :calls, limit: 8
+ t.timestamp :captured_at
+ end
+
+ add_index :pghero_query_stats, [:database, :captured_at]
+ end
+end
diff --git a/demo/db/schema.rb b/demo/db/schema.rb
index 2100422ee..740662cc2 100644
--- a/demo/db/schema.rb
+++ b/demo/db/schema.rb
@@ -10,8 +10,9 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2024_01_14_221613) do
+ActiveRecord::Schema.define(version: 2024_03_21_162554) do
# These are extensions that must be enabled in order to support this database
+ enable_extension "pg_stat_statements"
enable_extension "pgcrypto"
enable_extension "plpgsql"
@@ -94,4 +95,15 @@
t.index ["scheduled_at"], name: "index_good_jobs_on_scheduled_at", where: "(finished_at IS NULL)"
end
+ create_table "pghero_query_stats", force: :cascade do |t|
+ t.text "database"
+ t.text "user"
+ t.text "query"
+ t.bigint "query_hash"
+ t.float "total_time"
+ t.bigint "calls"
+ t.datetime "captured_at", precision: nil
+ t.index ["database", "captured_at"], name: "index_pghero_query_stats_on_database_and_captured_at"
+ end
+
end
diff --git a/sorbet/rbi/gems/pghero@3.4.1.rbi b/sorbet/rbi/gems/pghero@3.4.1.rbi
new file mode 100644
index 000000000..705b1247d
--- /dev/null
+++ b/sorbet/rbi/gems/pghero@3.4.1.rbi
@@ -0,0 +1,1345 @@
+# typed: true
+
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `pghero` gem.
+# Please instead update this file by running `bin/tapioca gem pghero`.
+
+# source://pghero//lib/pghero/methods/basic.rb#1
+module PgHero
+ class << self
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def analyze(*args, **_arg1, &block); end
+
+ # source://pghero//lib/pghero.rb#211
+ def analyze_all(**options); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def analyze_tables(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def autoindex(*args, **_arg1, &block); end
+
+ # source://pghero//lib/pghero.rb#218
+ def autoindex_all(create: T.unsafe(nil), verbose: T.unsafe(nil)); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def autovacuum_danger(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def aws_access_key_id(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def aws_db_instance_identifier(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def aws_region(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def aws_secret_access_key(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def best_index(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def blocked_queries(*args, **_arg1, &block); end
+
+ # Returns the value of attribute cache_hit_rate_threshold.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def cache_hit_rate_threshold; end
+
+ # Sets the attribute cache_hit_rate_threshold
+ #
+ # @param value the value to set the attribute cache_hit_rate_threshold to.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def cache_hit_rate_threshold=(_arg0); end
+
+ # source://pghero//lib/pghero.rb#196
+ def capture_query_stats(verbose: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero.rb#204
+ def capture_space_stats(verbose: T.unsafe(nil)); end
+
+ # delete previous stats
+ # go database by database to use an index
+ # stats for old databases are not cleaned up since we can't use an index
+ #
+ # source://pghero//lib/pghero.rb#232
+ def clean_query_stats(before: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero.rb#238
+ def clean_space_stats(before: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero.rb#110
+ def config; end
+
+ # Returns the value of attribute config_path.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def config_path; end
+
+ # Sets the attribute config_path
+ #
+ # @param value the value to set the attribute config_path to.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def config_path=(_arg0); end
+
+ # private
+ #
+ # source://pghero//lib/pghero.rb#245
+ def connection_config(model); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def connection_sources(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def connection_states(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def connection_stats(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def connections(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def cpu_usage(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def create_user(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def database_size(*args, **_arg1, &block); end
+
+ # ensure we only have one copy of databases
+ # so there's only one connection pool per database
+ #
+ # source://pghero//lib/pghero.rb#178
+ def databases; end
+
+ # private
+ #
+ # source://pghero//lib/pghero.rb#143
+ def default_config; end
+
+ # private
+ #
+ # source://pghero//lib/pghero.rb#172
+ def default_connection_config; end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def disable_query_stats(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def drop_user(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def duplicate_indexes(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def enable_query_stats(*args, **_arg1, &block); end
+
+ # Returns the value of attribute env.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def env; end
+
+ # Sets the attribute env
+ #
+ # @param value the value to set the attribute env to.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def env=(_arg0); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def explain(*args, **_arg1, &block); end
+
+ # private
+ #
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero.rb#97
+ def explain_enabled?; end
+
+ # private
+ #
+ # source://pghero//lib/pghero.rb#102
+ def explain_mode; end
+
+ # Returns the value of attribute explain_timeout_sec.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def explain_timeout_sec; end
+
+ # Sets the attribute explain_timeout_sec
+ #
+ # @param value the value to set the attribute explain_timeout_sec to.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def explain_timeout_sec=(_arg0); end
+
+ # private
+ #
+ # source://pghero//lib/pghero.rb#115
+ def file_config; end
+
+ # Returns the value of attribute filter_data.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def filter_data; end
+
+ # Sets the attribute filter_data
+ #
+ # @param value the value to set the attribute filter_data to.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def filter_data=(_arg0); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def historical_query_stats_enabled?(*args, **_arg1, &block); end
+
+ # private
+ # Rails 7.0 deprecates `include_replicas` for `include_hidden`
+ #
+ # source://pghero//lib/pghero.rb#258
+ def include_replicas_key; end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def index_caching(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def index_hit_rate(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def index_usage(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def indexes(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def invalid_constraints(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def invalid_indexes(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def kill(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def kill_all(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def kill_long_running_queries(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def last_stats_reset_time(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def long_running_queries(*args, **_arg1, &block); end
+
+ # Returns the value of attribute long_running_query_sec.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def long_running_query_sec; end
+
+ # Sets the attribute long_running_query_sec
+ #
+ # @param value the value to set the attribute long_running_query_sec to.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def long_running_query_sec=(_arg0); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def maintenance_info(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def missing_indexes(*args, **_arg1, &block); end
+
+ # use method instead of attr_accessor to ensure
+ # this works if variable set after PgHero is loaded
+ #
+ # source://pghero//lib/pghero.rb#87
+ def password; end
+
+ # source://pghero//lib/pghero.rb#225
+ def pretty_size(value); end
+
+ # source://pghero//lib/pghero.rb#192
+ def primary_database; end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def query_stats(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def query_stats_available?(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def query_stats_enabled?(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def query_stats_extension_enabled?(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def query_stats_readable?(*args, **_arg1, &block); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#412
+ def railtie_helpers_paths; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#395
+ def railtie_namespace; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#416
+ def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def rds_stats(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def read_iops_stats(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def relation_sizes(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def replica?(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def replication_lag(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def replication_lag_stats(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def reset_query_stats(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def reset_stats(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def running_queries(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def sequence_danger(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def sequences(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def settings(*args, **_arg1, &block); end
+
+ # Returns the value of attribute show_migrations.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def show_migrations; end
+
+ # Sets the attribute show_migrations
+ #
+ # @param value the value to set the attribute show_migrations to.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def show_migrations=(_arg0); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def slow_queries(*args, **_arg1, &block); end
+
+ # Returns the value of attribute slow_query_calls.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def slow_query_calls; end
+
+ # Sets the attribute slow_query_calls
+ #
+ # @param value the value to set the attribute slow_query_calls to.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def slow_query_calls=(_arg0); end
+
+ # Returns the value of attribute slow_query_ms.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def slow_query_ms; end
+
+ # Sets the attribute slow_query_ms
+ #
+ # @param value the value to set the attribute slow_query_ms to.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def slow_query_ms=(_arg0); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def space_growth(*args, **_arg1, &block); end
+
+ # private
+ # Rails 6.1 deprecates `spec_name` for `name`
+ # https://github.com/rails/rails/pull/38536
+ #
+ # source://pghero//lib/pghero.rb#252
+ def spec_name_key; end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def ssl_used?(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def stats_connection(*args, **_arg1, &block); end
+
+ # config pattern for https://github.com/ankane/pghero/issues/424
+ #
+ # source://pghero//lib/pghero.rb#92
+ def stats_database_url; end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def suggested_indexes(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def suggested_indexes_by_query(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def suggested_indexes_enabled?(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def system_stats_enabled?(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def table_caching(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def table_hit_rate(*args, **_arg1, &block); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#401
+ def table_name_prefix; end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def table_stats(*args, **_arg1, &block); end
+
+ # source://pghero//lib/pghero.rb#75
+ def time_zone; end
+
+ # source://pghero//lib/pghero.rb#71
+ def time_zone=(time_zone); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def total_connections(*args, **_arg1, &block); end
+
+ # Returns the value of attribute total_connections_threshold.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def total_connections_threshold; end
+
+ # Sets the attribute total_connections_threshold
+ #
+ # @param value the value to set the attribute total_connections_threshold to.
+ #
+ # source://pghero//lib/pghero.rb#43
+ def total_connections_threshold=(_arg0); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def transaction_id_danger(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def unused_indexes(*args, **_arg1, &block); end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def unused_tables(*args, **_arg1, &block); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#408
+ def use_relative_model_naming?; end
+
+ # use method instead of attr_accessor to ensure
+ # this works if variable set after PgHero is loaded
+ #
+ # source://pghero//lib/pghero.rb#81
+ def username; end
+
+ # source://pghero//lib/pghero.rb#106
+ def visualize_url; end
+
+ # source://forwardable/1.3.3/forwardable.rb#231
+ def write_iops_stats(*args, **_arg1, &block); end
+
+ private
+
+ # source://pghero//lib/pghero.rb#264
+ def each_database; end
+ end
+end
+
+# source://pghero//lib/pghero/connection.rb#2
+class PgHero::Connection < ::ActiveRecord::Base
+ include ::PgHero::Connection::GeneratedAttributeMethods
+ include ::PgHero::Connection::GeneratedAssociationMethods
+
+ class << self
+ # source://activemodel/7.1.3/lib/active_model/validations.rb#71
+ def _validators; end
+
+ # source://activerecord/7.1.3/lib/active_record/enum.rb#167
+ def defined_enums; end
+ end
+end
+
+# source://pghero//lib/pghero/connection.rb#0
+module PgHero::Connection::GeneratedAssociationMethods; end
+
+# source://pghero//lib/pghero/connection.rb#0
+module PgHero::Connection::GeneratedAttributeMethods; end
+
+# source://pghero//lib/pghero/database.rb#2
+class PgHero::Database
+ include ::PgHero::Methods::Basic
+ include ::PgHero::Methods::Connections
+ include ::PgHero::Methods::Constraints
+ include ::PgHero::Methods::Explain
+ include ::PgHero::Methods::Indexes
+ include ::PgHero::Methods::Kill
+ include ::PgHero::Methods::Maintenance
+ include ::PgHero::Methods::Queries
+ include ::PgHero::Methods::QueryStats
+ include ::PgHero::Methods::Replication
+ include ::PgHero::Methods::Sequences
+ include ::PgHero::Methods::Settings
+ include ::PgHero::Methods::Space
+ include ::PgHero::Methods::SuggestedIndexes
+ include ::PgHero::Methods::System
+ include ::PgHero::Methods::Tables
+ include ::PgHero::Methods::Users
+
+ # @return [Database] a new instance of Database
+ #
+ # source://pghero//lib/pghero/database.rb#23
+ def initialize(id, config); end
+
+ # source://pghero//lib/pghero/database.rb#70
+ def aws_access_key_id; end
+
+ # environment variable is only used if no config file
+ #
+ # source://pghero//lib/pghero/database.rb#83
+ def aws_db_instance_identifier; end
+
+ # source://pghero//lib/pghero/database.rb#78
+ def aws_region; end
+
+ # source://pghero//lib/pghero/database.rb#74
+ def aws_secret_access_key; end
+
+ # environment variable is only used if no config file
+ #
+ # source://pghero//lib/pghero/database.rb#93
+ def azure_resource_id; end
+
+ # source://pghero//lib/pghero/database.rb#41
+ def cache_hit_rate_threshold; end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/database.rb#37
+ def capture_query_stats?; end
+
+ # Returns the value of attribute config.
+ #
+ # source://pghero//lib/pghero/database.rb#21
+ def config; end
+
+ # source://pghero//lib/pghero/database.rb#57
+ def explain_timeout_sec; end
+
+ # must check keys for booleans
+ #
+ # source://pghero//lib/pghero/database.rb#98
+ def filter_data; end
+
+ # environment variable is only used if no config file
+ #
+ # source://pghero//lib/pghero/database.rb#88
+ def gcp_database_id; end
+
+ # Returns the value of attribute id.
+ #
+ # source://pghero//lib/pghero/database.rb#21
+ def id; end
+
+ # defaults to 100 megabytes
+ #
+ # source://pghero//lib/pghero/database.rb#66
+ def index_bloat_bytes; end
+
+ # source://pghero//lib/pghero/database.rb#61
+ def long_running_query_sec; end
+
+ # source://pghero//lib/pghero/database.rb#33
+ def name; end
+
+ # source://pghero//lib/pghero/database.rb#53
+ def slow_query_calls; end
+
+ # source://pghero//lib/pghero/database.rb#49
+ def slow_query_ms; end
+
+ # source://pghero//lib/pghero/database.rb#45
+ def total_connections_threshold; end
+
+ private
+
+ # just return the model
+ # do not start a connection
+ #
+ # source://pghero//lib/pghero/database.rb#140
+ def build_connection_model; end
+
+ # check adapter lazily
+ #
+ # source://pghero//lib/pghero/database.rb#124
+ def connection_model; end
+end
+
+# source://pghero//lib/pghero/engine.rb#2
+class PgHero::Engine < ::Rails::Engine
+ class << self
+ # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70
+ def __callbacks; end
+ end
+end
+
+# source://pghero//lib/pghero.rb#36
+class PgHero::Error < ::StandardError; end
+
+class PgHero::HomeController < ::ActionController::Base
+ def connection_stats; end
+ def connections; end
+ def cpu_usage; end
+ def enable_query_stats; end
+ def explain; end
+ def free_space_stats; end
+ def index; end
+ def index_bloat; end
+ def kill; end
+ def kill_all; end
+ def kill_long_running_queries; end
+ def live_queries; end
+ def load_stats; end
+ def maintenance; end
+ def queries; end
+ def relation_space; end
+ def replication_lag_stats; end
+ def reset_query_stats; end
+ def show_query; end
+ def space; end
+ def system; end
+ def tune; end
+
+ protected
+
+ def chart_library_options; end
+ def check_api; end
+ def default_url_options; end
+ def ensure_query_stats; end
+ def group_connections(connections, keys); end
+ def group_connections_by_key(connections, key); end
+ def redirect_backward(options = T.unsafe(nil)); end
+ def render_text(message, status:); end
+ def rescue_timeout(default); end
+ def set_database; end
+ def set_query_stats_enabled; end
+ def set_show_details; end
+ def set_suggested_indexes(min_average_time = T.unsafe(nil), min_calls = T.unsafe(nil)); end
+ def system_params; end
+
+ private
+
+ # source://actionview/7.1.3/lib/action_view/layouts.rb#330
+ def _layout(lookup_context, formats); end
+
+ class << self
+ # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70
+ def __callbacks; end
+
+ # source://actionview/7.1.3/lib/action_view/layouts.rb#211
+ def _layout; end
+
+ # source://actionview/7.1.3/lib/action_view/layouts.rb#212
+ def _layout_conditions; end
+
+ # source://actionpack/7.1.3/lib/action_controller/metal.rb#262
+ def middleware_stack; end
+ end
+end
+
+module PgHero::HomeController::HelperMethods
+ include ::ActionController::Base::HelperMethods
+ include ::PgHero::HomeHelper
+end
+
+module PgHero::HomeHelper
+ def pghero_formatted_date_time(time); end
+ def pghero_formatted_vacuum_times(time); end
+ def pghero_js_value(value); end
+ def pghero_pretty_ident(table, schema: T.unsafe(nil)); end
+ def pghero_remove_index(query); end
+end
+
+# source://pghero//lib/pghero.rb#39
+PgHero::MUTEX = T.let(T.unsafe(nil), Thread::Mutex)
+
+# source://pghero//lib/pghero/methods/basic.rb#2
+module PgHero::Methods; end
+
+# source://pghero//lib/pghero/methods/basic.rb#3
+module PgHero::Methods::Basic
+ # source://pghero//lib/pghero/methods/basic.rb#21
+ def current_user; end
+
+ # source://pghero//lib/pghero/methods/basic.rb#17
+ def database_name; end
+
+ # source://pghero//lib/pghero/methods/basic.rb#33
+ def quote_ident(value); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#25
+ def server_version; end
+
+ # source://pghero//lib/pghero/methods/basic.rb#29
+ def server_version_num; end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/basic.rb#4
+ def ssl_used?; end
+
+ private
+
+ # source://pghero//lib/pghero/methods/basic.rb#119
+ def add_source(sql); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#107
+ def connection; end
+
+ # source://pghero//lib/pghero/methods/basic.rb#103
+ def execute(sql); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#123
+ def quote(value); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#131
+ def quote_column_name(value); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#127
+ def quote_table_name(value); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#39
+ def select_all(sql, conn: T.unsafe(nil), query_columns: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#87
+ def select_all_size(sql); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#83
+ def select_all_stats(sql, **options); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#95
+ def select_one(sql, conn: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#99
+ def select_one_stats(sql); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#115
+ def squish(str); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#111
+ def stats_connection; end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/basic.rb#152
+ def table_exists?(table); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#135
+ def unquote(part); end
+
+ # source://pghero//lib/pghero/methods/basic.rb#143
+ def with_transaction(lock_timeout: T.unsafe(nil), statement_timeout: T.unsafe(nil), rollback: T.unsafe(nil)); end
+end
+
+# source://pghero//lib/pghero/methods/connections.rb#3
+module PgHero::Methods::Connections
+ # source://pghero//lib/pghero/methods/connections.rb#59
+ def connection_sources; end
+
+ # source://pghero//lib/pghero/methods/connections.rb#43
+ def connection_states; end
+
+ # source://pghero//lib/pghero/methods/connections.rb#4
+ def connections; end
+
+ # source://pghero//lib/pghero/methods/connections.rb#39
+ def total_connections; end
+end
+
+# source://pghero//lib/pghero/methods/constraints.rb#3
+module PgHero::Methods::Constraints
+ # referenced fields can be nil
+ # as not all constraints are foreign keys
+ #
+ # source://pghero//lib/pghero/methods/constraints.rb#6
+ def invalid_constraints; end
+end
+
+# source://pghero//lib/pghero/methods/explain.rb#3
+module PgHero::Methods::Explain
+ # TODO remove in 4.0
+ # note: this method is not affected by the explain option
+ #
+ # source://pghero//lib/pghero/methods/explain.rb#6
+ def explain(sql); end
+
+ # TODO rename to explain in 4.0
+ # note: this method is not affected by the explain option
+ #
+ # source://pghero//lib/pghero/methods/explain.rb#23
+ def explain_v2(sql, analyze: T.unsafe(nil), verbose: T.unsafe(nil), costs: T.unsafe(nil), settings: T.unsafe(nil), generic_plan: T.unsafe(nil), buffers: T.unsafe(nil), wal: T.unsafe(nil), timing: T.unsafe(nil), summary: T.unsafe(nil), format: T.unsafe(nil)); end
+
+ private
+
+ # source://pghero//lib/pghero/methods/explain.rb#48
+ def add_explain_option(options, name, value); end
+
+ # important! validate format to prevent injection
+ #
+ # source://pghero//lib/pghero/methods/explain.rb#55
+ def explain_format(format); end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/explain.rb#41
+ def explain_safe?; end
+end
+
+# source://pghero//lib/pghero/methods/indexes.rb#3
+module PgHero::Methods::Indexes
+ # source://pghero//lib/pghero/methods/indexes.rb#171
+ def duplicate_indexes(indexes: T.unsafe(nil)); end
+
+ # https://gist.github.com/mbanck/9976015/71888a24e464e2f772182a7eb54f15a125edf398
+ # thanks @jberkus and @mbanck
+ #
+ # source://pghero//lib/pghero/methods/indexes.rb#187
+ def index_bloat(min_size: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/indexes.rb#13
+ def index_caching; end
+
+ # source://pghero//lib/pghero/methods/indexes.rb#4
+ def index_hit_rate; end
+
+ # source://pghero//lib/pghero/methods/indexes.rb#31
+ def index_usage; end
+
+ # TODO parse array properly
+ # https://stackoverflow.com/questions/2204058/list-columns-with-indexes-in-postgresql
+ #
+ # source://pghero//lib/pghero/methods/indexes.rb#128
+ def indexes; end
+
+ # source://pghero//lib/pghero/methods/indexes.rb#117
+ def invalid_indexes(indexes: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/indexes.rb#106
+ def last_stats_reset_time; end
+
+ # source://pghero//lib/pghero/methods/indexes.rb#49
+ def missing_indexes; end
+
+ # source://pghero//lib/pghero/methods/indexes.rb#101
+ def reset_stats; end
+
+ # source://pghero//lib/pghero/methods/indexes.rb#71
+ def unused_indexes(max_scans: T.unsafe(nil), across: T.unsafe(nil)); end
+
+ protected
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/indexes.rb#327
+ def index_covers?(indexed_columns, columns); end
+end
+
+# source://pghero//lib/pghero/methods/kill.rb#3
+module PgHero::Methods::Kill
+ # source://pghero//lib/pghero/methods/kill.rb#4
+ def kill(pid); end
+
+ # source://pghero//lib/pghero/methods/kill.rb#13
+ def kill_all; end
+
+ # source://pghero//lib/pghero/methods/kill.rb#8
+ def kill_long_running_queries(min_duration: T.unsafe(nil)); end
+end
+
+# source://pghero//lib/pghero/methods/maintenance.rb#3
+module PgHero::Methods::Maintenance
+ # source://pghero//lib/pghero/methods/maintenance.rb#70
+ def analyze(table, verbose: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/maintenance.rb#75
+ def analyze_tables(verbose: T.unsafe(nil), min_size: T.unsafe(nil), tables: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/maintenance.rb#31
+ def autovacuum_danger; end
+
+ # source://pghero//lib/pghero/methods/maintenance.rb#52
+ def maintenance_info; end
+
+ # https://www.postgresql.org/docs/current/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND
+ # "the system will shut down and refuse to start any new transactions
+ # once there are fewer than 1 million transactions left until wraparound"
+ # warn when 10,000,000 transactions left
+ #
+ # source://pghero//lib/pghero/methods/maintenance.rb#8
+ def transaction_id_danger(threshold: T.unsafe(nil), max_value: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/maintenance.rb#36
+ def vacuum_progress; end
+end
+
+# source://pghero//lib/pghero/methods/queries.rb#3
+module PgHero::Methods::Queries
+ # from https://wiki.postgresql.org/wiki/Lock_Monitoring
+ # and https://big-elephants.com/2013-09/exploring-query-locks-in-postgres/
+ #
+ # source://pghero//lib/pghero/methods/queries.rb#38
+ def blocked_queries; end
+
+ # source://pghero//lib/pghero/methods/queries.rb#32
+ def long_running_queries; end
+
+ # source://pghero//lib/pghero/methods/queries.rb#4
+ def running_queries(min_duration: T.unsafe(nil), all: T.unsafe(nil)); end
+end
+
+# source://pghero//lib/pghero/methods/query_stats.rb#3
+module PgHero::Methods::QueryStats
+ # resetting query stats will reset across the entire Postgres instance in Postgres < 12
+ # this is problematic if multiple PgHero databases use the same Postgres instance
+ #
+ # to get around this, we capture queries for every Postgres database before we
+ # reset query stats for the Postgres instance with the `capture_query_stats` option
+ #
+ # source://pghero//lib/pghero/methods/query_stats.rb#128
+ def capture_query_stats(raise_errors: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/query_stats.rb#165
+ def clean_query_stats(before: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/query_stats.rb#54
+ def disable_query_stats; end
+
+ # source://pghero//lib/pghero/methods/query_stats.rb#49
+ def enable_query_stats; end
+
+ # https://stackoverflow.com/questions/20582500/how-to-check-if-a-table-exists-in-a-given-schema
+ #
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/query_stats.rb#105
+ def historical_query_stats_enabled?; end
+
+ # source://pghero//lib/pghero/methods/query_stats.rb#115
+ def missing_query_stats_columns; end
+
+ # source://pghero//lib/pghero/methods/query_stats.rb#175
+ def query_hash_stats(query_hash, user: T.unsafe(nil), current: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/query_stats.rb#4
+ def query_stats(historical: T.unsafe(nil), start_at: T.unsafe(nil), end_at: T.unsafe(nil), min_average_time: T.unsafe(nil), min_calls: T.unsafe(nil), **options); end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/query_stats.rb#29
+ def query_stats_available?; end
+
+ # only cache if true
+ #
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/query_stats.rb#34
+ def query_stats_enabled?; end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/query_stats.rb#38
+ def query_stats_extension_enabled?; end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/query_stats.rb#42
+ def query_stats_readable?; end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/query_stats.rb#111
+ def query_stats_table_exists?; end
+
+ # resets query stats for the entire instance
+ # it's possible to reset stats for a specific
+ # database, user or query hash in Postgres 12+
+ #
+ # source://pghero//lib/pghero/methods/query_stats.rb#67
+ def reset_instance_query_stats(database: T.unsafe(nil), user: T.unsafe(nil), query_hash: T.unsafe(nil), raise_errors: T.unsafe(nil)); end
+
+ # @raise [PgHero::Error]
+ #
+ # source://pghero//lib/pghero/methods/query_stats.rb#59
+ def reset_query_stats(**options); end
+
+ # source://pghero//lib/pghero/methods/query_stats.rb#170
+ def slow_queries(query_stats: T.unsafe(nil), **options); end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/query_stats.rb#119
+ def supports_query_hash?; end
+
+ private
+
+ # source://pghero//lib/pghero/methods/query_stats.rb#313
+ def combine_query_stats(grouped_stats); end
+
+ # http://www.craigkerstiens.com/2013/01/10/more-on-postgres-performance/
+ #
+ # source://pghero//lib/pghero/methods/query_stats.rb#212
+ def current_query_stats(limit: T.unsafe(nil), sort: T.unsafe(nil), database: T.unsafe(nil), query_hash: T.unsafe(nil), user: T.unsafe(nil), origin: T.unsafe(nil)); end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/query_stats.rb#331
+ def explainable?(query); end
+
+ # source://pghero//lib/pghero/methods/query_stats.rb#265
+ def historical_query_stats(sort: T.unsafe(nil), start_at: T.unsafe(nil), end_at: T.unsafe(nil), query_hash: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/query_stats.rb#341
+ def insert_query_stats(db_id, db_query_stats, now); end
+
+ # removes comments
+ # combines ?, ?, ? => ?
+ #
+ # source://pghero//lib/pghero/methods/query_stats.rb#337
+ def normalize_query(query); end
+end
+
+# source://pghero//lib/pghero/methods/replication.rb#3
+module PgHero::Methods::Replication
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/replication.rb#4
+ def replica?; end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/replication.rb#48
+ def replicating?; end
+
+ # https://www.postgresql.org/message-id/CADKbJJWz9M0swPT3oqe8f9+tfD4-F54uE6Xtkh4nERpVsQnjnw@mail.gmail.com
+ #
+ # source://pghero//lib/pghero/methods/replication.rb#12
+ def replication_lag; end
+
+ # source://pghero//lib/pghero/methods/replication.rb#32
+ def replication_slots; end
+
+ private
+
+ # source://pghero//lib/pghero/methods/replication.rb#56
+ def feature_support; end
+
+ # source://pghero//lib/pghero/methods/replication.rb#60
+ def with_feature_support(cache_key, default = T.unsafe(nil)); end
+end
+
+# source://pghero//lib/pghero/methods/sequences.rb#3
+module PgHero::Methods::Sequences
+ # source://pghero//lib/pghero/methods/sequences.rb#54
+ def sequence_danger(threshold: T.unsafe(nil), sequences: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/sequences.rb#4
+ def sequences; end
+
+ private
+
+ # adds readable attribute to all sequences
+ # also adds schema if missing
+ #
+ # source://pghero//lib/pghero/methods/sequences.rb#85
+ def add_sequence_attributes(sequences); end
+
+ # can parse
+ # nextval('id_seq'::regclass)
+ # nextval(('id_seq'::text)::regclass)
+ #
+ # source://pghero//lib/pghero/methods/sequences.rb#64
+ def parse_default_value(default_value); end
+
+ # source://pghero//lib/pghero/methods/sequences.rb#74
+ def unquote_ident(value); end
+end
+
+# source://pghero//lib/pghero/methods/settings.rb#3
+module PgHero::Methods::Settings
+ # source://pghero//lib/pghero/methods/settings.rb#29
+ def autovacuum_settings; end
+
+ # source://pghero//lib/pghero/methods/settings.rb#4
+ def settings; end
+
+ # source://pghero//lib/pghero/methods/settings.rb#33
+ def vacuum_settings; end
+
+ private
+
+ # source://pghero//lib/pghero/methods/settings.rb#39
+ def fetch_settings(names); end
+end
+
+# source://pghero//lib/pghero/methods/space.rb#3
+module PgHero::Methods::Space
+ # source://pghero//lib/pghero/methods/space.rb#122
+ def capture_space_stats; end
+
+ # source://pghero//lib/pghero/methods/space.rb#137
+ def clean_space_stats(before: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/space.rb#4
+ def database_size; end
+
+ # source://pghero//lib/pghero/methods/space.rb#8
+ def relation_sizes; end
+
+ # source://pghero//lib/pghero/methods/space.rb#92
+ def relation_space_stats(relation, schema: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/space.rb#49
+ def space_growth(days: T.unsafe(nil), relation_sizes: T.unsafe(nil)); end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/space.rb#142
+ def space_stats_enabled?; end
+
+ # source://pghero//lib/pghero/methods/space.rb#29
+ def table_sizes; end
+end
+
+# source://pghero//lib/pghero/methods/suggested_indexes.rb#3
+module PgHero::Methods::SuggestedIndexes
+ # source://pghero//lib/pghero/methods/suggested_indexes.rb#78
+ def autoindex(create: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/suggested_indexes.rb#87
+ def best_index(statement); end
+
+ # source://pghero//lib/pghero/methods/suggested_indexes.rb#64
+ def suggested_indexes(suggested_indexes_by_query: T.unsafe(nil), **options); end
+
+ # TODO clean this mess
+ #
+ # source://pghero//lib/pghero/methods/suggested_indexes.rb#9
+ def suggested_indexes_by_query(queries: T.unsafe(nil), query_stats: T.unsafe(nil), indexes: T.unsafe(nil)); end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/suggested_indexes.rb#4
+ def suggested_indexes_enabled?; end
+
+ private
+
+ # source://pghero//lib/pghero/methods/suggested_indexes.rb#93
+ def best_index_helper(statements); end
+
+ # source://pghero//lib/pghero/methods/suggested_indexes.rb#196
+ def best_index_structure(statement); end
+
+ # source://pghero//lib/pghero/methods/suggested_indexes.rb#313
+ def column_stats(schema: T.unsafe(nil), table: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/suggested_indexes.rb#304
+ def parse_sort(sort_clause); end
+
+ # source://pghero//lib/pghero/methods/suggested_indexes.rb#269
+ def parse_table(tree); end
+
+ # TODO capture values
+ #
+ # source://pghero//lib/pghero/methods/suggested_indexes.rb#281
+ def parse_where(tree); end
+
+ # TODO better row estimation
+ # https://www.postgresql.org/docs/current/static/row-estimation-examples.html
+ #
+ # source://pghero//lib/pghero/methods/suggested_indexes.rb#237
+ def row_estimates(stats, total_rows, rows_left, op); end
+
+ # source://pghero//lib/pghero/methods/suggested_indexes.rb#300
+ def str_method; end
+end
+
+# source://pghero//lib/pghero/methods/system.rb#3
+module PgHero::Methods::System
+ # source://pghero//lib/pghero/methods/system.rb#80
+ def azure_stats(metric_name, duration: T.unsafe(nil), period: T.unsafe(nil), offset: T.unsafe(nil), series: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/system.rb#22
+ def connection_stats(**options); end
+
+ # source://pghero//lib/pghero/methods/system.rb#18
+ def cpu_usage(**options); end
+
+ # source://pghero//lib/pghero/methods/system.rb#38
+ def free_space_stats(**options); end
+
+ # source://pghero//lib/pghero/methods/system.rb#42
+ def rds_stats(metric_name, duration: T.unsafe(nil), period: T.unsafe(nil), offset: T.unsafe(nil), series: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/system.rb#30
+ def read_iops_stats(**options); end
+
+ # source://pghero//lib/pghero/methods/system.rb#26
+ def replication_lag_stats(**options); end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/system.rb#4
+ def system_stats_enabled?; end
+
+ # source://pghero//lib/pghero/methods/system.rb#8
+ def system_stats_provider; end
+
+ # source://pghero//lib/pghero/methods/system.rb#34
+ def write_iops_stats(**options); end
+
+ private
+
+ # source://pghero//lib/pghero/methods/system.rb#303
+ def add_missing_data(data, start_time, end_time, period); end
+
+ # @return [Boolean]
+ #
+ # source://pghero//lib/pghero/methods/system.rb#289
+ def azure_flexible_server?; end
+
+ # only use data points included in both series
+ # this also eliminates need to align Time.now
+ #
+ # source://pghero//lib/pghero/methods/system.rb#295
+ def free_space(quota, used); end
+
+ # @raise [Error]
+ #
+ # source://pghero//lib/pghero/methods/system.rb#130
+ def gcp_stats(metric_name, duration: T.unsafe(nil), period: T.unsafe(nil), offset: T.unsafe(nil), series: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/system.rb#240
+ def system_stats(metric_key, **options); end
+end
+
+# source://pghero//lib/pghero/methods/tables.rb#3
+module PgHero::Methods::Tables
+ # source://pghero//lib/pghero/methods/tables.rb#13
+ def table_caching; end
+
+ # source://pghero//lib/pghero/methods/tables.rb#4
+ def table_hit_rate; end
+
+ # source://pghero//lib/pghero/methods/tables.rb#46
+ def table_stats(schema: T.unsafe(nil), table: T.unsafe(nil)); end
+
+ # source://pghero//lib/pghero/methods/tables.rb#30
+ def unused_tables; end
+end
+
+# source://pghero//lib/pghero/methods/users.rb#3
+module PgHero::Methods::Users
+ # documented as unsafe to pass user input
+ # identifiers are now quoted, but still not officially supported
+ #
+ # source://pghero//lib/pghero/methods/users.rb#6
+ def create_user(user, password: T.unsafe(nil), schema: T.unsafe(nil), database: T.unsafe(nil), readonly: T.unsafe(nil), tables: T.unsafe(nil)); end
+
+ # documented as unsafe to pass user input
+ # identifiers are now quoted, but still not officially supported
+ #
+ # source://pghero//lib/pghero/methods/users.rb#50
+ def drop_user(user, schema: T.unsafe(nil), database: T.unsafe(nil)); end
+
+ private
+
+ # source://pghero//lib/pghero/methods/users.rb#83
+ def random_password; end
+
+ # source://pghero//lib/pghero/methods/users.rb#88
+ def table_grant_commands(privilege, tables, quoted_user); end
+end
+
+# source://pghero//lib/pghero.rb#37
+class PgHero::NotEnabled < ::PgHero::Error; end
+
+# source://pghero//lib/pghero/query_stats.rb#2
+class PgHero::QueryStats < ::PgHero::Stats
+ include ::PgHero::QueryStats::GeneratedAttributeMethods
+ include ::PgHero::QueryStats::GeneratedAssociationMethods
+
+ class << self
+ # source://activemodel/7.1.3/lib/active_model/validations.rb#71
+ def _validators; end
+
+ # source://activerecord/7.1.3/lib/active_record/enum.rb#167
+ def defined_enums; end
+ end
+end
+
+# source://pghero//lib/pghero/query_stats.rb#0
+module PgHero::QueryStats::GeneratedAssociationMethods; end
+
+# source://pghero//lib/pghero/query_stats.rb#0
+module PgHero::QueryStats::GeneratedAttributeMethods; end
+
+# source://pghero//lib/pghero/space_stats.rb#2
+class PgHero::SpaceStats < ::PgHero::Stats
+ include ::PgHero::SpaceStats::GeneratedAttributeMethods
+ include ::PgHero::SpaceStats::GeneratedAssociationMethods
+
+ class << self
+ # source://activemodel/7.1.3/lib/active_model/validations.rb#71
+ def _validators; end
+
+ # source://activerecord/7.1.3/lib/active_record/enum.rb#167
+ def defined_enums; end
+ end
+end
+
+# source://pghero//lib/pghero/space_stats.rb#0
+module PgHero::SpaceStats::GeneratedAssociationMethods; end
+
+# source://pghero//lib/pghero/space_stats.rb#0
+module PgHero::SpaceStats::GeneratedAttributeMethods; end
+
+# source://pghero//lib/pghero/stats.rb#2
+class PgHero::Stats < ::ActiveRecord::Base
+ include ::PgHero::Stats::GeneratedAttributeMethods
+ include ::PgHero::Stats::GeneratedAssociationMethods
+
+ class << self
+ # source://activemodel/7.1.3/lib/active_model/validations.rb#71
+ def _validators; end
+
+ # source://activerecord/7.1.3/lib/active_record/enum.rb#167
+ def defined_enums; end
+ end
+end
+
+# source://pghero//lib/pghero/stats.rb#0
+module PgHero::Stats::GeneratedAssociationMethods; end
+
+# source://pghero//lib/pghero/stats.rb#0
+module PgHero::Stats::GeneratedAttributeMethods; end
+
+# source://pghero//lib/pghero/version.rb#2
+PgHero::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/sprockets-rails@3.4.2.rbi b/sorbet/rbi/gems/sprockets-rails@3.4.2.rbi
new file mode 100644
index 000000000..28ac74412
--- /dev/null
+++ b/sorbet/rbi/gems/sprockets-rails@3.4.2.rbi
@@ -0,0 +1,1325 @@
+# typed: true
+
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `sprockets-rails` gem.
+# Please instead update this file by running `bin/tapioca gem sprockets-rails`.
+
+# source://sprockets-rails//lib/sprockets/railtie.rb#17
+module Rails
+ class << self
+ # source://railties/7.1.3/lib/rails.rb#42
+ def app_class; end
+
+ # source://railties/7.1.3/lib/rails.rb#42
+ def app_class=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails.rb#43
+ def application; end
+
+ # source://railties/7.1.3/lib/rails.rb#41
+ def application=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails.rb#123
+ def autoloaders; end
+
+ # source://railties/7.1.3/lib/rails.rb#54
+ def backtrace_cleaner; end
+
+ # source://railties/7.1.3/lib/rails.rb#42
+ def cache; end
+
+ # source://railties/7.1.3/lib/rails.rb#42
+ def cache=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails.rb#50
+ def configuration; end
+
+ # source://railties/7.1.3/lib/rails/deprecator.rb#4
+ def deprecator; end
+
+ # source://railties/7.1.3/lib/rails.rb#72
+ def env; end
+
+ # source://railties/7.1.3/lib/rails.rb#79
+ def env=(environment); end
+
+ # source://railties/7.1.3/lib/rails.rb#90
+ def error; end
+
+ # source://railties/7.1.3/lib/rails/gem_version.rb#5
+ def gem_version; end
+
+ # source://railties/7.1.3/lib/rails.rb#103
+ def groups(*groups); end
+
+ # source://railties/7.1.3/lib/rails.rb#47
+ def initialize!(*_arg0, **_arg1, &_arg2); end
+
+ # source://railties/7.1.3/lib/rails.rb#47
+ def initialized?(*_arg0, **_arg1, &_arg2); end
+
+ # source://railties/7.1.3/lib/rails.rb#42
+ def logger; end
+
+ # source://railties/7.1.3/lib/rails.rb#42
+ def logger=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails.rb#119
+ def public_path; end
+
+ # source://railties/7.1.3/lib/rails.rb#63
+ def root; end
+
+ # source://railties/7.1.3/lib/rails/version.rb#7
+ def version; end
+ end
+end
+
+# source://sprockets-rails//lib/sprockets/railtie.rb#18
+class Rails::Application < ::Rails::Engine
+ # source://railties/7.1.3/lib/rails/application.rb#109
+ def initialize(initial_variable_values = T.unsafe(nil), &block); end
+
+ # Called from asset helpers to alert you if you reference an asset URL that
+ # isn't precompiled and hence won't be available in production.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets-rails//lib/sprockets/railtie.rb#37
+ def asset_precompiled?(logical_path); end
+
+ # Returns Sprockets::Environment for app config.
+ #
+ # source://sprockets-rails//lib/sprockets/railtie.rb#30
+ def assets; end
+
+ # Returns Sprockets::Environment for app config.
+ #
+ # source://sprockets-rails//lib/sprockets/railtie.rb#30
+ def assets=(_arg0); end
+
+ # Returns Sprockets::Manifest for app config.
+ #
+ # source://sprockets-rails//lib/sprockets/railtie.rb#33
+ def assets_manifest; end
+
+ # Returns Sprockets::Manifest for app config.
+ #
+ # source://sprockets-rails//lib/sprockets/railtie.rb#33
+ def assets_manifest=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#102
+ def autoloaders; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#517
+ def build_middleware_stack; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#437
+ def config; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#441
+ def config=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#274
+ def config_for(name, env: T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#357
+ def console(&blk); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#516
+ def credentials; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#460
+ def credentials=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#104
+ def default_url_options(*_arg0, **_arg1, &_arg2); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#104
+ def default_url_options=(arg); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#230
+ def deprecators; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#574
+ def eager_load!; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#535
+ def encrypted(path, key_path: T.unsafe(nil), env_key: T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#303
+ def env_config; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#102
+ def executor; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#363
+ def generators(&blk); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#548
+ def helpers_paths; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#424
+ def initialize!(group = T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#134
+ def initialized?; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#345
+ def initializer(name, opts = T.unsafe(nil), &block); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#431
+ def initializers; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#374
+ def isolate_namespace(mod); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#161
+ def key_generator(secret_key_base = T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#568
+ def load_generators(app = T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#222
+ def message_verifier(verifier_name); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#197
+ def message_verifiers; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#564
+ def migration_railties; end
+
+ # Lazy-load the precompile list so we don't cause asset compilation at app
+ # boot time, but ensure we cache the list so we don't recompute it for each
+ # request or test case.
+ #
+ # source://sprockets-rails//lib/sprockets/railtie.rb#51
+ def precompiled_assets(clear_cache = T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#338
+ def rake_tasks(&block); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#153
+ def reload_routes!; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#102
+ def reloader; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#102
+ def reloaders; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#400
+ def require_environment!; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#405
+ def routes_reloader; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#138
+ def run_load_hooks!; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#351
+ def runner(&blk); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#100
+ def sandbox; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#100
+ def sandbox=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#100
+ def sandbox?; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#478
+ def secret_key_base; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#443
+ def secrets; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#460
+ def secrets=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#369
+ def server(&blk); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#544
+ def to_app; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#412
+ def watchable_args; end
+
+ protected
+
+ # source://railties/7.1.3/lib/rails/application.rb#647
+ def default_middleware_stack; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#662
+ def ensure_generator_templates_added; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#613
+ def ordered_railties; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#635
+ def railties_initializers(current); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#602
+ def run_console_blocks(app); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#592
+ def run_generators_blocks(app); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#597
+ def run_runner_blocks(app); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#607
+ def run_server_blocks(app); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#581
+ def run_tasks_blocks(app); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#652
+ def validate_secret_key_base(secret_key_base); end
+
+ private
+
+ # source://railties/7.1.3/lib/rails/application.rb#700
+ def build_middleware; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#693
+ def build_request(env); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#704
+ def coerce_same_site_protection(protection); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#708
+ def filter_parameters; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#668
+ def generate_local_secret; end
+
+ # source://railties/7.1.3/lib/rails/application.rb#687
+ def secrets_secret_key_base; end
+
+ class << self
+ # source://railties/7.1.3/lib/rails/application.rb#393
+ def add_lib_to_load_path!(root); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#84
+ def create(initial_variable_values = T.unsafe(nil), &block); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#88
+ def find_root(from); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#71
+ def inherited(base); end
+
+ # source://railties/7.1.3/lib/rails/application.rb#80
+ def instance; end
+
+ def new(*_arg0); end
+ end
+end
+
+# Hack: We need to remove Rails' built in config.assets so we can
+# do our own thing.
+#
+# source://sprockets-rails//lib/sprockets/railtie.rb#21
+class Rails::Application::Configuration < ::Rails::Engine::Configuration
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#30
+ def initialize(*_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def add_autoload_paths_to_load_path; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def add_autoload_paths_to_load_path=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def allow_concurrency; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def allow_concurrency=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#541
+ def annotations; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#28
+ def api_only; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#375
+ def api_only=(value); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def asset_host; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def asset_host=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def assume_ssl; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def assume_ssl=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def autoflush_log; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def autoflush_log=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#473
+ def autoload_lib(ignore:); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#485
+ def autoload_lib_once(ignore:); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def beginning_of_week; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def beginning_of_week=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#387
+ def broadcast_log_level; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def cache_classes; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def cache_classes=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def cache_store; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def cache_store=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#497
+ def colorize_logging; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#501
+ def colorize_logging=(val); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def consider_all_requests_local; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def consider_all_requests_local=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def console; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def console=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#546
+ def content_security_policy(&block); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def content_security_policy_nonce_directives; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def content_security_policy_nonce_directives=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def content_security_policy_nonce_generator; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def content_security_policy_nonce_generator=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def content_security_policy_report_only; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def content_security_policy_report_only=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def credentials; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def credentials=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#436
+ def database_configuration; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#391
+ def debug_exception_response_format; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#395
+ def debug_exception_response_format=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#563
+ def default_log_file; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def disable_sandbox; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def disable_sandbox=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def dom_testing_default_html_version; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def dom_testing_default_html_version=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def eager_load; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def eager_load=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#357
+ def enable_dependency_loading; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#362
+ def enable_dependency_loading=(value); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#343
+ def enable_reloading; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#347
+ def enable_reloading=(value); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#28
+ def encoding; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#367
+ def encoding=(value); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def exceptions_app; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def exceptions_app=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def file_watcher; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def file_watcher=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def filter_parameters; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def filter_parameters=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def filter_redirect; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def filter_redirect=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def force_ssl; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def force_ssl=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def helpers_paths; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def helpers_paths=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def host_authorization; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def host_authorization=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def hosts; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def hosts=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#575
+ def inspect; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#418
+ def load_database_yaml; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#92
+ def load_defaults(target_version); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#28
+ def loaded_config_version; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def log_file_size; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def log_file_size=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def log_formatter; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def log_formatter=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#28
+ def log_level; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#382
+ def log_level=(level); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def log_tags; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def log_tags=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def logger; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def logger=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#397
+ def paths; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#555
+ def permissions_policy(&block); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def precompile_filter_parameters; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def precompile_filter_parameters=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def public_file_server; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def public_file_server=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def railties_order; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def railties_order=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def rake_eager_load; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def rake_eager_load=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def read_encrypted_secrets; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def read_encrypted_secrets=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def relative_url_root; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def relative_url_root=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def reload_classes_only_on_change; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def reload_classes_only_on_change=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#339
+ def reloading_enabled?; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def require_master_key; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def require_master_key=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def sandbox_by_default; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def sandbox_by_default=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def secret_key_base; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def secret_key_base=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def server_timing; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def server_timing=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def session_options; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def session_options=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#521
+ def session_store(new_session_store = T.unsafe(nil), **options); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#537
+ def session_store?; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def ssl_options; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def ssl_options=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def time_zone; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def time_zone=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def x; end
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#14
+ def x=(_arg0); end
+
+ private
+
+ # source://railties/7.1.3/lib/rails/application/configuration.rb#600
+ def credentials_defaults; end
+end
+
+# source://sprockets-rails//lib/sprockets/railtie.rb#57
+class Rails::Engine < ::Rails::Railtie
+ # source://railties/7.1.3/lib/rails/engine.rb#439
+ def initialize; end
+
+ # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70
+ def __callbacks; end
+
+ # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70
+ def __callbacks?; end
+
+ # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963
+ def _load_seed_callbacks; end
+
+ # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951
+ def _run_load_seed_callbacks(&block); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#517
+ def app; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#534
+ def call(env); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#553
+ def config; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#491
+ def eager_load!; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#529
+ def endpoint; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#437
+ def engine_name(*_arg0, **_arg1, &_arg2); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#540
+ def env_config; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#501
+ def helpers; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#512
+ def helpers_paths; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#437
+ def isolated?(&block); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#453
+ def load_console(app = T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#477
+ def load_generators(app = T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#462
+ def load_runner(app = T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#561
+ def load_seed; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#486
+ def load_server(app = T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#469
+ def load_tasks(app = T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#436
+ def middleware(*_arg0, **_arg1, &_arg2); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#436
+ def paths(*_arg0, **_arg1, &_arg2); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#496
+ def railties; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#436
+ def root(*_arg0, **_arg1, &_arg2); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#546
+ def routes(&block); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#677
+ def routes?; end
+
+ protected
+
+ # source://railties/7.1.3/lib/rails/engine.rb#682
+ def run_tasks_blocks(*_arg0); end
+
+ private
+
+ # source://railties/7.1.3/lib/rails/engine.rb#714
+ def _all_autoload_once_paths; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#718
+ def _all_autoload_paths; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#727
+ def _all_load_paths(add_autoload_paths_to_load_path); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#751
+ def build_middleware; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#743
+ def build_request(env); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#710
+ def default_middleware_stack; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#738
+ def fixtures_in_root_and_not_in_vendor?(fixtures); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#694
+ def has_migrations?; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#688
+ def load_config_initializer(initializer); end
+
+ class << self
+ # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70
+ def __callbacks; end
+
+ # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70
+ def __callbacks=(value); end
+
+ # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70
+ def __callbacks?; end
+
+ # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955
+ def _load_seed_callbacks; end
+
+ # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959
+ def _load_seed_callbacks=(value); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#354
+ def called_from; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#354
+ def called_from=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#359
+ def eager_load!(*_arg0, **_arg1, &_arg2); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#379
+ def endpoint(endpoint = T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/railtie.rb#176
+ def engine_name(name = T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#423
+ def find(path); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#375
+ def find_root(from); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#698
+ def find_root_with_flag(flag, root_path, default = T.unsafe(nil)); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#361
+ def inherited(base); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#385
+ def isolate_namespace(mod); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#354
+ def isolated; end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#354
+ def isolated=(_arg0); end
+
+ # source://railties/7.1.3/lib/rails/engine.rb#354
+ def isolated?; end
+ end
+end
+
+# source://sprockets-rails//lib/sprockets/rails/version.rb#1
+module Sprockets
+ extend ::Sprockets::Utils
+ extend ::Sprockets::URIUtils
+ extend ::Sprockets::PathUtils
+ extend ::Sprockets::DigestUtils
+ extend ::Sprockets::PathDigestUtils
+ extend ::Sprockets::Dependencies
+ extend ::Sprockets::Compressing
+ extend ::Sprockets::Exporting
+ extend ::Sprockets::Processing
+ extend ::Sprockets::HTTPUtils
+ extend ::Sprockets::Transformers
+ extend ::Sprockets::Mime
+ extend ::Sprockets::Paths
+end
+
+# source://sprockets-rails//lib/sprockets/rails/version.rb#2
+module Sprockets::Rails; end
+
+# Resolve assets referenced in CSS `url()` calls and replace them with the digested paths
+#
+# source://sprockets-rails//lib/sprockets/rails/asset_url_processor.rb#4
+class Sprockets::Rails::AssetUrlProcessor
+ class << self
+ # source://sprockets-rails//lib/sprockets/rails/asset_url_processor.rb#6
+ def call(input); end
+ end
+end
+
+# source://sprockets-rails//lib/sprockets/rails/asset_url_processor.rb#5
+Sprockets::Rails::AssetUrlProcessor::REGEX = T.let(T.unsafe(nil), Regexp)
+
+# source://sprockets-rails//lib/sprockets/rails/context.rb#6
+module Sprockets::Rails::Context
+ include ::ActionView::Helpers::AssetUrlHelper
+ include ::ActionView::Helpers::CaptureHelper
+ include ::ActionView::Helpers::OutputSafetyHelper
+ include ::ActionView::Helpers::TagHelper
+ include ::ActionView::Helpers::AssetTagHelper
+ include GeneratedInstanceMethods
+
+ mixes_in_class_methods GeneratedClassMethods
+
+ # source://sprockets-rails//lib/sprockets/rails/context.rb#16
+ def compute_asset_path(path, options = T.unsafe(nil)); end
+
+ class << self
+ # @private
+ #
+ # source://sprockets-rails//lib/sprockets/rails/context.rb#10
+ def included(klass); end
+ end
+
+ module GeneratedClassMethods
+ def assets_prefix; end
+ def assets_prefix=(value); end
+ def assets_prefix?; end
+ def config; end
+ def config=(value); end
+ def config?; end
+ def digest_assets; end
+ def digest_assets=(value); end
+ def digest_assets?; end
+ end
+
+ module GeneratedInstanceMethods
+ def assets_prefix; end
+ def assets_prefix=(value); end
+ def assets_prefix?; end
+ def config; end
+ def config=(value); end
+ def config?; end
+ def digest_assets; end
+ def digest_assets=(value); end
+ def digest_assets?; end
+ end
+end
+
+# source://sprockets-rails//lib/sprockets/rails/helper.rb#8
+module Sprockets::Rails::Helper
+ include ::ActionView::Helpers::AssetUrlHelper
+ include ::ActionView::Helpers::CaptureHelper
+ include ::ActionView::Helpers::OutputSafetyHelper
+ include ::ActionView::Helpers::TagHelper
+ include ::ActionView::Helpers::AssetTagHelper
+ include ::Sprockets::Rails::Utils
+ include GeneratedInstanceMethods
+
+ mixes_in_class_methods GeneratedClassMethods
+
+ # Expand asset path to digested form.
+ #
+ # path - String path
+ # options - Hash options
+ #
+ # Returns String path or nil if no asset was found.
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#113
+ def asset_digest_path(path, options = T.unsafe(nil)); end
+
+ # Experimental: Get integrity for asset path.
+ #
+ # path - String path
+ # options - Hash options
+ #
+ # Returns String integrity attribute or nil if no asset was found.
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#125
+ def asset_integrity(path, options = T.unsafe(nil)); end
+
+ # Writes over the built in ActionView::Helpers::AssetUrlHelper#compute_asset_path
+ # to use the asset pipeline.
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#77
+ def compute_asset_path(path, options = T.unsafe(nil)); end
+
+ # Override javascript tag helper to provide debugging support.
+ #
+ # Eventually will be deprecated and replaced by source maps.
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#136
+ def javascript_include_tag(*sources); end
+
+ # Resolve the asset path against the Sprockets manifest or environment.
+ # Returns nil if it's an asset we don't know about.
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#101
+ def resolve_asset_path(path, allow_non_precompiled = T.unsafe(nil)); end
+
+ # Override stylesheet tag helper to provide debugging support.
+ #
+ # Eventually will be deprecated and replaced by source maps.
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#165
+ def stylesheet_link_tag(*sources); end
+
+ protected
+
+ # List of resolvers in `config.assets.resolve_with` order.
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#250
+ def asset_resolver_strategies; end
+
+ # This is awkward: `integrity` is a boolean option indicating whether
+ # we want to include or omit the subresource integrity hash, but the
+ # options hash is also passed through as literal tag attributes.
+ # That means we have to delete the shortcut boolean option so it
+ # doesn't bleed into the tag attributes, but also check its value if
+ # it's boolean-ish.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#198
+ def compute_integrity?(options); end
+
+ # Append ?body=1 if debug is on and we're on old Sprockets.
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#258
+ def legacy_debug_path(path, debug); end
+
+ # Internal method to support multifile debugging. Will
+ # eventually be removed w/ Sprockets 3.x.
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#226
+ def lookup_debug_asset(path, options = T.unsafe(nil)); end
+
+ # compute_asset_extname is in AV::Helpers::AssetUrlHelper
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#235
+ def path_with_extname(path, options); end
+
+ # Enable split asset debugging. Eventually will be deprecated
+ # and replaced by source maps in Sprockets 3.x.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#218
+ def request_debug_assets?; end
+
+ # Try each asset resolver and return the first non-nil result.
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#241
+ def resolve_asset; end
+
+ # Only serve integrity metadata for HTTPS requests:
+ # http://www.w3.org/TR/SRI/#non-secure-contexts-remain-non-secure
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#212
+ def secure_subresource_integrity_context?; end
+
+ class << self
+ # @private
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#60
+ def extended(obj); end
+
+ # @private
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#43
+ def included(klass); end
+ end
+
+ module GeneratedClassMethods
+ def assets_environment; end
+ def assets_environment=(value); end
+ def assets_environment?; end
+ def assets_manifest; end
+ def assets_manifest=(value); end
+ def assets_manifest?; end
+ def assets_precompile; end
+ def assets_precompile=(value); end
+ def assets_precompile?; end
+ def assets_prefix; end
+ def assets_prefix=(value); end
+ def assets_prefix?; end
+ def check_precompiled_asset; end
+ def check_precompiled_asset=(value); end
+ def check_precompiled_asset?; end
+ def debug_assets; end
+ def debug_assets=(value); end
+ def debug_assets?; end
+ def digest_assets; end
+ def digest_assets=(value); end
+ def digest_assets?; end
+ def precompiled_asset_checker; end
+ def precompiled_asset_checker=(value); end
+ def precompiled_asset_checker?; end
+ def resolve_assets_with; end
+ def resolve_assets_with=(value); end
+ def resolve_assets_with?; end
+ def unknown_asset_fallback; end
+ def unknown_asset_fallback=(value); end
+ def unknown_asset_fallback?; end
+ end
+
+ module GeneratedInstanceMethods
+ def assets_environment; end
+ def assets_environment=(value); end
+ def assets_environment?; end
+ def assets_manifest; end
+ def assets_manifest=(value); end
+ def assets_manifest?; end
+ def assets_precompile; end
+ def assets_precompile=(value); end
+ def assets_precompile?; end
+ def assets_prefix; end
+ def assets_prefix=(value); end
+ def assets_prefix?; end
+ def check_precompiled_asset; end
+ def check_precompiled_asset=(value); end
+ def check_precompiled_asset?; end
+ def debug_assets; end
+ def debug_assets=(value); end
+ def debug_assets?; end
+ def digest_assets; end
+ def digest_assets=(value); end
+ def digest_assets?; end
+ def precompiled_asset_checker; end
+ def precompiled_asset_checker=(value); end
+ def precompiled_asset_checker?; end
+ def resolve_assets_with; end
+ def resolve_assets_with=(value); end
+ def resolve_assets_with?; end
+ def unknown_asset_fallback; end
+ def unknown_asset_fallback=(value); end
+ def unknown_asset_fallback?; end
+ end
+end
+
+# source://sprockets-rails//lib/sprockets/rails/helper.rb#9
+class Sprockets::Rails::Helper::AssetNotFound < ::StandardError; end
+
+# source://sprockets-rails//lib/sprockets/rails/helper.rb#10
+class Sprockets::Rails::Helper::AssetNotPrecompiled < ::StandardError; end
+
+# source://sprockets-rails//lib/sprockets/rails/helper.rb#12
+class Sprockets::Rails::Helper::AssetNotPrecompiledError < ::Sprockets::Rails::Helper::AssetNotPrecompiled
+ include ::Sprockets::Rails::Utils
+
+ # @return [AssetNotPrecompiledError] a new instance of AssetNotPrecompiledError
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#14
+ def initialize(source); end
+end
+
+# source://sprockets-rails//lib/sprockets/rails/helper.rb#35
+Sprockets::Rails::Helper::VIEW_ACCESSORS = T.let(T.unsafe(nil), Array)
+
+# Use a separate module since Helper is mixed in and we needn't pollute
+# the class namespace with our internals.
+#
+# source://sprockets-rails//lib/sprockets/rails/helper.rb#269
+module Sprockets::Rails::HelperAssetResolvers
+ class << self
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#270
+ def [](name); end
+ end
+end
+
+# source://sprockets-rails//lib/sprockets/rails/helper.rb#315
+class Sprockets::Rails::HelperAssetResolvers::Environment
+ # @raise [ArgumentError]
+ # @return [Environment] a new instance of Environment
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#316
+ def initialize(view); end
+
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#323
+ def asset_path(path, digest, allow_non_precompiled = T.unsafe(nil)); end
+
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#336
+ def digest_path(path, allow_non_precompiled = T.unsafe(nil)); end
+
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#357
+ def find_asset(path, options = T.unsafe(nil)); end
+
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#347
+ def find_debug_asset(path); end
+
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#343
+ def integrity(path); end
+
+ private
+
+ # @return [Boolean]
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#367
+ def precompiled?(path); end
+
+ # @raise [Helper::AssetNotPrecompiledError]
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#371
+ def raise_unless_precompiled_asset(path); end
+end
+
+# source://sprockets-rails//lib/sprockets/rails/helper.rb#281
+class Sprockets::Rails::HelperAssetResolvers::Manifest
+ # @raise [ArgumentError]
+ # @return [Manifest] a new instance of Manifest
+ #
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#282
+ def initialize(view); end
+
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#287
+ def asset_path(path, digest, allow_non_precompiled = T.unsafe(nil)); end
+
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#293
+ def digest_path(path, allow_non_precompiled = T.unsafe(nil)); end
+
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#303
+ def find_debug_asset(path); end
+
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#297
+ def integrity(path); end
+
+ private
+
+ # source://sprockets-rails//lib/sprockets/rails/helper.rb#308
+ def metadata(path); end
+end
+
+# source://sprockets-rails//lib/sprockets/rails/quiet_assets.rb#3
+class Sprockets::Rails::QuietAssets
+ # @return [QuietAssets] a new instance of QuietAssets
+ #
+ # source://sprockets-rails//lib/sprockets/rails/quiet_assets.rb#4
+ def initialize(app); end
+
+ # source://sprockets-rails//lib/sprockets/rails/quiet_assets.rb#9
+ def call(env); end
+end
+
+# source://sprockets-rails//lib/sprockets/rails/route_wrapper.rb#3
+module Sprockets::Rails::RouteWrapper
+ # @return [Boolean]
+ #
+ # source://sprockets-rails//lib/sprockets/rails/route_wrapper.rb#9
+ def internal?; end
+
+ # @return [Boolean]
+ #
+ # source://sprockets-rails//lib/sprockets/rails/route_wrapper.rb#5
+ def internal_assets_path?; end
+
+ class << self
+ # @private
+ #
+ # source://sprockets-rails//lib/sprockets/rails/route_wrapper.rb#13
+ def included(klass); end
+ end
+end
+
+# Rewrites source mapping urls with the digested paths and protect against semicolon appending with a dummy comment line
+#
+# source://sprockets-rails//lib/sprockets/rails/sourcemapping_url_processor.rb#4
+class Sprockets::Rails::SourcemappingUrlProcessor
+ class << self
+ # source://sprockets-rails//lib/sprockets/rails/sourcemapping_url_processor.rb#8
+ def call(input); end
+
+ private
+
+ # source://sprockets-rails//lib/sprockets/rails/sourcemapping_url_processor.rb#25
+ def combine_sourcemap_logical_path(sourcefile:, sourcemap:); end
+
+ # source://sprockets-rails//lib/sprockets/rails/sourcemapping_url_processor.rb#47
+ def removed_sourcemap_comment(sourcemap_logical_path, filename:, env:); end
+
+ # source://sprockets-rails//lib/sprockets/rails/sourcemapping_url_processor.rb#33
+ def resolved_sourcemap_comment(sourcemap_logical_path, context:); end
+
+ # source://sprockets-rails//lib/sprockets/rails/sourcemapping_url_processor.rb#37
+ def sourcemap_asset_path(sourcemap_logical_path, context:); end
+ end
+end
+
+# source://sprockets-rails//lib/sprockets/rails/sourcemapping_url_processor.rb#5
+Sprockets::Rails::SourcemappingUrlProcessor::REGEX = T.let(T.unsafe(nil), Regexp)
+
+# source://sprockets-rails//lib/sprockets/rails/utils.rb#5
+module Sprockets::Rails::Utils
+ # @return [Boolean]
+ #
+ # source://sprockets-rails//lib/sprockets/rails/utils.rb#6
+ def using_sprockets4?; end
+end
+
+# source://sprockets-rails//lib/sprockets/rails/version.rb#3
+Sprockets::Rails::VERSION = T.let(T.unsafe(nil), String)
+
+# source://sprockets-rails//lib/sprockets/railtie.rb#70
+class Sprockets::Railtie < ::Rails::Railtie
+ include ::Sprockets::Rails::Utils
+
+ # source://sprockets-rails//lib/sprockets/railtie.rb#182
+ def build_environment(app, initialized = T.unsafe(nil)); end
+
+ class << self
+ # source://sprockets-rails//lib/sprockets/railtie.rb#213
+ def build_manifest(app); end
+ end
+end
+
+# source://sprockets-rails//lib/sprockets/railtie.rb#88
+Sprockets::Railtie::LOOSE_APP_ASSETS = T.let(T.unsafe(nil), Proc)
+
+# source://sprockets-rails//lib/sprockets/railtie.rb#73
+class Sprockets::Railtie::ManifestNeededError < ::StandardError
+ # @return [ManifestNeededError] a new instance of ManifestNeededError
+ #
+ # source://sprockets-rails//lib/sprockets/railtie.rb#74
+ def initialize; end
+end
+
+# source://sprockets-rails//lib/sprockets/railtie.rb#93
+class Sprockets::Railtie::OrderedOptions < ::ActiveSupport::OrderedOptions
+ # source://sprockets-rails//lib/sprockets/railtie.rb#94
+ def configure(&block); end
+end
diff --git a/sorbet/rbi/gems/sprockets@4.2.1.rbi b/sorbet/rbi/gems/sprockets@4.2.1.rbi
new file mode 100644
index 000000000..348d963bf
--- /dev/null
+++ b/sorbet/rbi/gems/sprockets@4.2.1.rbi
@@ -0,0 +1,5406 @@
+# typed: true
+
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `sprockets` gem.
+# Please instead update this file by running `bin/tapioca gem sprockets`.
+
+# Define some basic Sprockets error classes
+#
+# source://sprockets//lib/sprockets/version.rb#2
+module Sprockets
+ extend ::Sprockets::Utils
+ extend ::Sprockets::URIUtils
+ extend ::Sprockets::PathUtils
+ extend ::Sprockets::DigestUtils
+ extend ::Sprockets::PathDigestUtils
+ extend ::Sprockets::Dependencies
+ extend ::Sprockets::Compressing
+ extend ::Sprockets::Exporting
+ extend ::Sprockets::ProcessorUtils
+ extend ::Sprockets::Processing
+ extend ::Sprockets::HTTPUtils
+ extend ::Sprockets::Transformers
+ extend ::Sprockets::Mime
+ extend ::Sprockets::Paths
+ extend ::Sprockets::Configuration
+end
+
+# This is a processor designed to add a source map "comment"
+# to the bottom of a css or JS file that is serving a source
+# map. An example of a comment might look like this
+#
+# //# application.js-80af0efcc960fc2ac93eda2f7b12e3db40ab360bf6ea269ceed3bea3678326f9.map
+#
+# As an asset is built it gets source map information added
+# to the `asset.to_hash[:metadata][:map]` key. This contains all the
+# information that is needed to build a source map file.
+#
+# To add this comment we must have an asset we can link to.
+# To do this we ensure that the original asset is loaded, then
+# we use a use a special mime type. For example `application/js-sourcemap+json`
+# for a JS source map.
+#
+# This will trigger a new asset to be loaded and generated by the
+# `SourceMapProcessor` processor.
+#
+# Finally once we have that file, we can generate a link to it
+# with it's full fingerprint. This is done and then
+# added to the original asset as a comment at the bottom.
+#
+# source://sprockets//lib/sprockets/add_source_map_comment_to_asset_processor.rb#28
+class Sprockets::AddSourceMapCommentToAssetProcessor
+ class << self
+ # source://sprockets//lib/sprockets/add_source_map_comment_to_asset_processor.rb#29
+ def call(input); end
+ end
+end
+
+# source://sprockets//lib/sprockets/errors.rb#5
+class Sprockets::ArgumentError < ::Sprockets::Error; end
+
+# source://sprockets//lib/sprockets/asset.rb#6
+class Sprockets::Asset
+ # Private: Initialize Asset wrapper from attributes Hash.
+ #
+ # Asset wrappers should not be initialized directly, only
+ # Environment#find_asset should vend them.
+ #
+ # attributes - Hash of ivars
+ #
+ # Returns Asset.
+ #
+ # @return [Asset] a new instance of Asset
+ #
+ # source://sprockets//lib/sprockets/asset.rb#17
+ def initialize(attributes = T.unsafe(nil)); end
+
+ # Public: Compare assets.
+ #
+ # Assets are equal if they share the same path and digest.
+ #
+ # Returns true or false.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/asset.rb#207
+ def ==(other); end
+
+ # Public: Returns String base64 digest of source.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#152
+ def base64digest; end
+
+ # Public: Returns Integer length of source.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#120
+ def bytesize; end
+
+ # Public: Get charset of source.
+ #
+ # Returns a String charset name or nil if binary.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#115
+ def charset; end
+
+ # Public: Returns String MIME type of asset. Returns nil if type is unknown.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#82
+ def content_type; end
+
+ # Public: Returns String byte digest of source.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#126
+ def digest; end
+
+ # Public: Return logical path with digest spliced in.
+ #
+ # "foo/bar-37b51d194a7513e45b56f6524f2d51f2.js"
+ #
+ # Returns String.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#66
+ def digest_path; end
+
+ # Public: Add enumerator to allow `Asset` instances to be used as Rack
+ # compatible body objects.
+ #
+ # block
+ # part - String body chunk
+ #
+ # Returns nothing.
+ #
+ # @yield [to_s]
+ #
+ # source://sprockets//lib/sprockets/asset.rb#168
+ def each; end
+
+ # Private: Return the version of the environment where the asset was generated.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#131
+ def environment_version; end
+
+ # Public: Compare assets.
+ #
+ # Assets are equal if they share the same path and digest.
+ #
+ # Returns true or false.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/asset.rb#207
+ def eql?(other); end
+
+ # Public: ETag String of Asset.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#141
+ def etag; end
+
+ # Public: Returns String path of asset.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#47
+ def filename; end
+
+ # Public: Return load path + logical path with digest spliced in.
+ #
+ # Returns String.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#77
+ def full_digest_path; end
+
+ # Public: Implements Object#hash so Assets can be used as a Hash key or
+ # in a Set.
+ #
+ # Returns Integer hash of the id.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#198
+ def hash; end
+
+ # Public: Returns String hexdigest of source.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#136
+ def hexdigest; end
+
+ # Internal: Unique asset object ID.
+ #
+ # Returns a String.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#52
+ def id; end
+
+ # Public: Pretty inspect
+ #
+ # Returns String.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#190
+ def inspect; end
+
+ # Public: A "named information" URL for subresource integrity.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#157
+ def integrity; end
+
+ # Public: Returns Integer length of source.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#120
+ def length; end
+
+ # Public: Get all externally linked asset filenames from asset.
+ #
+ # All linked assets should be compiled anytime this asset is.
+ #
+ # Returns Set of String asset URIs.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#89
+ def links; end
+
+ # Returns the value of attribute logical_path.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#7
+ def logical_path; end
+
+ # Public: Metadata accumulated from pipeline process.
+ #
+ # The API status of the keys is dependent on the pipeline processors
+ # itself. So some values maybe considered public and others internal.
+ # See the pipeline processor documentation itself.
+ #
+ # Returns Hash.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#44
+ def metadata; end
+
+ # Public: Return `String` of concatenated source.
+ #
+ # Returns String.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#96
+ def source; end
+
+ # Internal: Return all internal instance variables as a hash.
+ #
+ # Returns a Hash.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#33
+ def to_hash; end
+
+ # Public: Alias for #source.
+ #
+ # Returns String.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#108
+ def to_s; end
+
+ # Public: Internal URI to lookup asset by.
+ #
+ # NOT a publicly accessible URL.
+ #
+ # Returns URI.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#59
+ def uri; end
+
+ # Deprecated: Save asset to disk.
+ #
+ # filename - String target
+ #
+ # Returns nothing.
+ #
+ # source://sprockets//lib/sprockets/asset.rb#177
+ def write_to(filename); end
+end
+
+# source://sprockets//lib/sprockets/autoload.rb#3
+module Sprockets::Autoload; end
+
+# source://sprockets//lib/sprockets/babel_processor.rb#8
+class Sprockets::BabelProcessor
+ # @return [BabelProcessor] a new instance of BabelProcessor
+ #
+ # source://sprockets//lib/sprockets/babel_processor.rb#25
+ def initialize(options = T.unsafe(nil)); end
+
+ # Returns the value of attribute cache_key.
+ #
+ # source://sprockets//lib/sprockets/babel_processor.rb#23
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/babel_processor.rb#40
+ def call(input); end
+
+ class << self
+ # source://sprockets//lib/sprockets/babel_processor.rb#19
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/babel_processor.rb#15
+ def call(input); end
+
+ # source://sprockets//lib/sprockets/babel_processor.rb#11
+ def instance; end
+ end
+end
+
+# source://sprockets//lib/sprockets/babel_processor.rb#9
+Sprockets::BabelProcessor::VERSION = T.let(T.unsafe(nil), String)
+
+# `Base` class for `Environment` and `CachedEnvironment`.
+#
+# source://sprockets//lib/sprockets/base.rb#32
+class Sprockets::Base
+ include ::Sprockets::SourceMapUtils
+ include ::Sprockets::Utils
+ include ::Sprockets::PathUtils
+ include ::Sprockets::DigestUtils
+ include ::Sprockets::PathDigestUtils
+ include ::Sprockets::URIUtils
+ include ::Sprockets::PathDependencyUtils
+ include ::Sprockets::Dependencies
+ include ::Sprockets::Compressing
+ include ::Sprockets::Exporting
+ include ::Sprockets::ProcessorUtils
+ include ::Sprockets::Resolve
+ include ::Sprockets::Processing
+ include ::Sprockets::HTTPUtils
+ include ::Sprockets::Transformers
+ include ::Sprockets::Mime
+ include ::Sprockets::Paths
+ include ::Sprockets::Configuration
+ include ::Sprockets::Server
+ include ::Sprockets::Loader
+ include ::Sprockets::Bower
+ include ::Sprockets::Npm
+
+ # Preferred `find_asset` shorthand.
+ #
+ # environment['application.js']
+ #
+ # source://sprockets//lib/sprockets/base.rb#118
+ def [](*args, **options); end
+
+ # Get persistent cache store
+ #
+ # source://sprockets//lib/sprockets/base.rb#41
+ def cache; end
+
+ # Set persistent cache store
+ #
+ # The cache store must implement a pair of getters and
+ # setters. Either `get(key)`/`set(key, value)`,
+ # `[key]`/`[key]=value`, `read(key)`/`write(key, value)`.
+ #
+ # source://sprockets//lib/sprockets/base.rb#48
+ def cache=(cache); end
+
+ # Return an `CachedEnvironment`. Must be implemented by the subclass.
+ #
+ # @raise [NotImplementedError]
+ #
+ # source://sprockets//lib/sprockets/base.rb#53
+ def cached; end
+
+ # source://sprockets//lib/sprockets/base.rb#139
+ def compress_from_root(uri); end
+
+ # source://sprockets//lib/sprockets/base.rb#143
+ def expand_from_root(uri); end
+
+ # Internal: Compute digest for path.
+ #
+ # path - String filename or directory path.
+ #
+ # Returns a String digest or nil.
+ #
+ # source://sprockets//lib/sprockets/base.rb#63
+ def file_digest(path); end
+
+ # @yield [asset]
+ #
+ # source://sprockets//lib/sprockets/base.rb#85
+ def find_all_linked_assets(*args); end
+
+ # Find asset by logical path or expanded path.
+ #
+ # source://sprockets//lib/sprockets/base.rb#78
+ def find_asset(*args, **options); end
+
+ # Find asset by logical path or expanded path.
+ #
+ # If the asset is not found an error will be raised.
+ #
+ # source://sprockets//lib/sprockets/base.rb#125
+ def find_asset!(*args); end
+
+ # Return an `CachedEnvironment`. Must be implemented by the subclass.
+ #
+ # @raise [NotImplementedError]
+ #
+ # source://sprockets//lib/sprockets/base.rb#53
+ def index; end
+
+ # Pretty inspect
+ #
+ # source://sprockets//lib/sprockets/base.rb#133
+ def inspect; end
+end
+
+# source://sprockets//lib/sprockets/bower.rb#5
+module Sprockets::Bower
+ # Internal: Read bower.json's main directive.
+ #
+ # dirname - String path to component directory.
+ # filename - String path to bower.json.
+ #
+ # Returns nothing.
+ #
+ # source://sprockets//lib/sprockets/bower.rb#48
+ def read_bower_main(dirname, filename); end
+
+ # Internal: Override resolve_alternates to install bower.json behavior.
+ #
+ # load_path - String environment path
+ # logical_path - String path relative to base
+ #
+ # Returns candidate filenames.
+ #
+ # source://sprockets//lib/sprockets/bower.rb#17
+ def resolve_alternates(load_path, logical_path); end
+end
+
+# Internal: All supported bower.json files.
+#
+# https://github.com/bower/json/blob/0.4.0/lib/json.js#L7
+#
+# source://sprockets//lib/sprockets/bower.rb#9
+Sprockets::Bower::POSSIBLE_BOWER_JSONS = T.let(T.unsafe(nil), Array)
+
+# Internal: Bundle processor takes a single file asset and prepends all the
+# `:required` URIs to the contents.
+#
+# Uses pipeline metadata:
+#
+# :required - Ordered Set of asset URIs to prepend
+# :stubbed - Set of asset URIs to subtract from the required set.
+#
+# Also see DirectiveProcessor.
+#
+# source://sprockets//lib/sprockets/bundle.rb#16
+class Sprockets::Bundle
+ class << self
+ # source://sprockets//lib/sprockets/bundle.rb#17
+ def call(input); end
+
+ # Internal: Removes uri from required if it's already included as an alias.
+ #
+ # required - Set of required uris
+ #
+ # Returns deduped set of uris
+ #
+ # source://sprockets//lib/sprockets/bundle.rb#61
+ def dedup(required); end
+
+ # Internal: Run bundle reducers on set of Assets producing a reduced
+ # metadata Hash.
+ #
+ # filename - String bundle filename
+ # assets - Array of Assets
+ # reducers - Array of [initial, reducer_proc] pairs
+ #
+ # Returns reduced asset metadata Hash.
+ #
+ # source://sprockets//lib/sprockets/bundle.rb#80
+ def process_bundle_reducers(input, assets, reducers); end
+ end
+end
+
+# Public: Wrapper interface to backend cache stores. Ensures a consistent API
+# even when the backend uses get/set or read/write.
+#
+# Public cache interface
+#
+# Always assign the backend store instance to Environment#cache=.
+#
+# environment.cache = Sprockets::Cache::MemoryStore.new(1000)
+#
+# Environment#cache will always return a wrapped Cache interface. See the
+# methods marked public on this class.
+#
+#
+# Backend cache interface
+#
+# The Backend cache store must implement two methods.
+#
+# get(key)
+#
+# key - An opaque String with a length less than 250 characters.
+#
+# Returns an JSON serializable object.
+#
+# set(key, value)
+#
+# Will only be called once per key. Setting a key "foo" with value "bar",
+# then later key "foo" with value "baz" is an undefined behavior.
+#
+# key - An opaque String with a length less than 250 characters.
+# value - A JSON serializable object.
+#
+# Returns argument value.
+#
+# clear(options)
+#
+# Clear the entire cache. Be careful with this method since it could
+# affect other processes if shared cache is being used.
+#
+# The options hash is passed to the underlying cache implementation.
+#
+# source://sprockets//lib/sprockets/cache.rb#45
+class Sprockets::Cache
+ # Internal: Wrap a backend cache store.
+ #
+ # Always assign a backend cache store instance to Environment#cache= and
+ # use Environment#cache to retrieve a wrapped interface.
+ #
+ # cache - A compatible backend cache store instance.
+ #
+ # @return [Cache] a new instance of Cache
+ #
+ # source://sprockets//lib/sprockets/cache.rb#68
+ def initialize(cache = T.unsafe(nil), logger = T.unsafe(nil)); end
+
+ # Public: Clear cache
+ #
+ # Returns truthy on success, potentially raises exception on failure
+ #
+ # source://sprockets//lib/sprockets/cache.rb#156
+ def clear(options = T.unsafe(nil)); end
+
+ # Public: Prefer API to retrieve and set values in the cache store.
+ #
+ # key - JSON serializable key
+ # block -
+ # Must return a consistent JSON serializable object for the given key.
+ #
+ # Examples
+ #
+ # cache.fetch("foo") { "bar" }
+ #
+ # Returns a JSON serializable object.
+ #
+ # source://sprockets//lib/sprockets/cache.rb#85
+ def fetch(key); end
+
+ # Public: Low level API to retrieve item directly from the backend cache
+ # store.
+ #
+ # This API may be used publicly, but may have undefined behavior
+ # depending on the backend store being used. Prefer the
+ # Cache#fetch API over using this.
+ #
+ # key - JSON serializable key
+ # local - Check local cache first (default: false)
+ #
+ # Returns a JSON serializable object or nil if there was a cache miss.
+ #
+ # source://sprockets//lib/sprockets/cache.rb#115
+ def get(key, local = T.unsafe(nil)); end
+
+ # Public: Pretty inspect
+ #
+ # Returns String.
+ #
+ # source://sprockets//lib/sprockets/cache.rb#149
+ def inspect; end
+
+ # Public: Low level API to set item directly to the backend cache store.
+ #
+ # This API may be used publicly, but may have undefined behavior
+ # depending on the backend store being used. Prefer the
+ # Cache#fetch API over using this.
+ #
+ # key - JSON serializable key
+ # value - A consistent JSON serializable object for the given key. Setting
+ # a different value for the given key has undefined behavior.
+ # local - Set on local cache (default: false)
+ #
+ # Returns the value argument.
+ #
+ # source://sprockets//lib/sprockets/cache.rb#140
+ def set(key, value, local = T.unsafe(nil)); end
+
+ private
+
+ # Internal: Expand object cache key into a short String key.
+ #
+ # The String should be under 250 characters so its compatible with
+ # Memcache.
+ #
+ # key - JSON serializable key
+ #
+ # Returns a String with a length less than 250 characters.
+ #
+ # source://sprockets//lib/sprockets/cache.rb#170
+ def expand_key(key); end
+
+ # source://sprockets//lib/sprockets/cache.rb#196
+ def get_cache_wrapper(cache); end
+
+ # Internal: Show first 100 characters of cache key for logging purposes.
+ #
+ # Returns a String with a length less than 100 characters.
+ #
+ # source://sprockets//lib/sprockets/cache.rb#181
+ def peek_key(key); end
+
+ class << self
+ # source://sprockets//lib/sprockets/cache.rb#56
+ def default_logger; end
+ end
+end
+
+# Public: A file system cache store that automatically cleans up old keys.
+#
+# Assign the instance to the Environment#cache.
+#
+# environment.cache = Sprockets::Cache::FileStore.new("/tmp")
+#
+# See Also
+#
+# ActiveSupport::Cache::FileStore
+#
+# source://sprockets//lib/sprockets/cache/file_store.rb#20
+class Sprockets::Cache::FileStore
+ # Public: Initialize the cache store.
+ #
+ # root - A String path to a directory to persist cached values to.
+ # max_size - A Integer of the maximum size the store will hold (in bytes).
+ # (default: 25MB).
+ # logger - The logger to which some info will be printed.
+ # (default logger level is FATAL and won't output anything).
+ #
+ # @return [FileStore] a new instance of FileStore
+ #
+ # source://sprockets//lib/sprockets/cache/file_store.rb#42
+ def initialize(root, max_size = T.unsafe(nil), logger = T.unsafe(nil)); end
+
+ # Public: Clear the cache
+ #
+ # adapted from ActiveSupport::Cache::FileStore#clear
+ #
+ # Deletes all items from the cache. In this case it deletes all the entries in the specified
+ # file store directory except for .keep or .gitkeep. Be careful which directory is specified
+ # as @root because everything in that directory will be deleted.
+ #
+ # Returns true
+ #
+ # source://sprockets//lib/sprockets/cache/file_store.rb#139
+ def clear(options = T.unsafe(nil)); end
+
+ # Public: Retrieve value from cache.
+ #
+ # This API should not be used directly, but via the Cache wrapper API.
+ #
+ # key - String cache key.
+ #
+ # Returns Object or nil or the value is not set.
+ #
+ # source://sprockets//lib/sprockets/cache/file_store.rb#56
+ def get(key); end
+
+ # Public: Pretty inspect
+ #
+ # Returns String.
+ #
+ # source://sprockets//lib/sprockets/cache/file_store.rb#126
+ def inspect; end
+
+ # Public: Set a key and value in the cache.
+ #
+ # This API should not be used directly, but via the Cache wrapper API.
+ #
+ # key - String cache key.
+ # value - Object value.
+ #
+ # Returns Object value.
+ #
+ # source://sprockets//lib/sprockets/cache/file_store.rb#85
+ def set(key, value); end
+
+ private
+
+ # source://sprockets//lib/sprockets/cache/file_store.rb#166
+ def compute_size(caches); end
+
+ # Internal: Get all cache files along with stats.
+ #
+ # Returns an Array of [String filename, File::Stat] pairs sorted by
+ # mtime.
+ #
+ # source://sprockets//lib/sprockets/cache/file_store.rb#152
+ def find_caches; end
+
+ # source://sprockets//lib/sprockets/cache/file_store.rb#183
+ def gc!; end
+
+ # source://sprockets//lib/sprockets/cache/file_store.rb#176
+ def safe_open(path, &block); end
+
+ # source://sprockets//lib/sprockets/cache/file_store.rb#170
+ def safe_stat(fn); end
+
+ # source://sprockets//lib/sprockets/cache/file_store.rb#162
+ def size; end
+
+ class << self
+ # Internal: Default standard error fatal logger.
+ #
+ # Returns a Logger.
+ #
+ # source://sprockets//lib/sprockets/cache/file_store.rb#29
+ def default_logger; end
+ end
+end
+
+# Internal: Default key limit for store.
+#
+# source://sprockets//lib/sprockets/cache/file_store.rb#22
+Sprockets::Cache::FileStore::DEFAULT_MAX_SIZE = T.let(T.unsafe(nil), Integer)
+
+# source://sprockets//lib/sprockets/cache/file_store.rb#23
+Sprockets::Cache::FileStore::EXCLUDED_DIRS = T.let(T.unsafe(nil), Array)
+
+# source://sprockets//lib/sprockets/cache/file_store.rb#24
+Sprockets::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array)
+
+# source://sprockets//lib/sprockets/cache.rb#221
+class Sprockets::Cache::GetWrapper < ::Sprockets::Cache::Wrapper
+ # source://sprockets//lib/sprockets/cache.rb#230
+ def clear(options = T.unsafe(nil)); end
+
+ # source://sprockets//lib/sprockets/cache.rb#222
+ def get(key); end
+
+ # source://sprockets//lib/sprockets/cache.rb#226
+ def set(key, value); end
+end
+
+# source://sprockets//lib/sprockets/cache.rb#241
+class Sprockets::Cache::HashWrapper < ::Sprockets::Cache::Wrapper
+ # source://sprockets//lib/sprockets/cache.rb#250
+ def clear(options = T.unsafe(nil)); end
+
+ # source://sprockets//lib/sprockets/cache.rb#242
+ def get(key); end
+
+ # source://sprockets//lib/sprockets/cache.rb#246
+ def set(key, value); end
+end
+
+# Public: Basic in memory LRU cache.
+#
+# Assign the instance to the Environment#cache.
+#
+# environment.cache = Sprockets::Cache::MemoryStore.new(1000)
+#
+# See Also
+#
+# ActiveSupport::Cache::MemoryStore
+#
+# source://sprockets//lib/sprockets/cache/memory_store.rb#14
+class Sprockets::Cache::MemoryStore
+ # Public: Initialize the cache store.
+ #
+ # max_size - A Integer of the maximum number of keys the store will hold.
+ # (default: 1000).
+ #
+ # @return [MemoryStore] a new instance of MemoryStore
+ #
+ # source://sprockets//lib/sprockets/cache/memory_store.rb#22
+ def initialize(max_size = T.unsafe(nil)); end
+
+ # Public: Clear the cache
+ #
+ # Returns true
+ #
+ # source://sprockets//lib/sprockets/cache/memory_store.rb#76
+ def clear(options = T.unsafe(nil)); end
+
+ # Public: Retrieve value from cache.
+ #
+ # This API should not be used directly, but via the Cache wrapper API.
+ #
+ # key - String cache key.
+ #
+ # Returns Object or nil or the value is not set.
+ #
+ # source://sprockets//lib/sprockets/cache/memory_store.rb#35
+ def get(key); end
+
+ # Public: Pretty inspect
+ #
+ # Returns String.
+ #
+ # source://sprockets//lib/sprockets/cache/memory_store.rb#67
+ def inspect; end
+
+ # Public: Set a key and value in the cache.
+ #
+ # This API should not be used directly, but via the Cache wrapper API.
+ #
+ # key - String cache key.
+ # value - Object value.
+ #
+ # Returns Object value.
+ #
+ # source://sprockets//lib/sprockets/cache/memory_store.rb#55
+ def set(key, value); end
+end
+
+# Internal: Default key limit for store.
+#
+# source://sprockets//lib/sprockets/cache/memory_store.rb#16
+Sprockets::Cache::MemoryStore::DEFAULT_MAX_SIZE = T.let(T.unsafe(nil), Integer)
+
+# Public: A compatible cache store that doesn't store anything. Used by
+# default when no Environment#cache is configured.
+#
+# Assign the instance to the Environment#cache.
+#
+# environment.cache = Sprockets::Cache::NullStore.new
+#
+# See Also
+#
+# ActiveSupport::Cache::NullStore
+#
+# source://sprockets//lib/sprockets/cache/null_store.rb#15
+class Sprockets::Cache::NullStore
+ # Public: Simulate clearing the cache
+ #
+ # Returns true
+ #
+ # source://sprockets//lib/sprockets/cache/null_store.rb#49
+ def clear(options = T.unsafe(nil)); end
+
+ # Public: Simulate a cache miss.
+ #
+ # This API should not be used directly, but via the Cache wrapper API.
+ #
+ # key - String cache key.
+ #
+ # Returns nil.
+ #
+ # source://sprockets//lib/sprockets/cache/null_store.rb#23
+ def get(key); end
+
+ # Public: Pretty inspect
+ #
+ # Returns String.
+ #
+ # source://sprockets//lib/sprockets/cache/null_store.rb#42
+ def inspect; end
+
+ # Public: Simulate setting a value in the cache.
+ #
+ # This API should not be used directly, but via the Cache wrapper API.
+ #
+ # key - String cache key.
+ # value - Object value.
+ #
+ # Returns Object value.
+ #
+ # source://sprockets//lib/sprockets/cache/null_store.rb#35
+ def set(key, value); end
+end
+
+# source://sprockets//lib/sprockets/cache.rb#176
+Sprockets::Cache::PEEK_SIZE = T.let(T.unsafe(nil), Integer)
+
+# source://sprockets//lib/sprockets/cache.rb#256
+class Sprockets::Cache::ReadWriteWrapper < ::Sprockets::Cache::Wrapper
+ # source://sprockets//lib/sprockets/cache.rb#265
+ def clear(options = T.unsafe(nil)); end
+
+ # source://sprockets//lib/sprockets/cache.rb#257
+ def get(key); end
+
+ # source://sprockets//lib/sprockets/cache.rb#261
+ def set(key, value); end
+end
+
+# Internal: Cache key version for this class. Rarely should have to change
+# unless the cache format radically changes. Will be bump on major version
+# releases though.
+#
+# source://sprockets//lib/sprockets/cache.rb#54
+Sprockets::Cache::VERSION = T.let(T.unsafe(nil), String)
+
+# source://sprockets//lib/sprockets/cache.rb#218
+class Sprockets::Cache::Wrapper < ::Struct; end
+
+# `CachedEnvironment` is a special cached version of `Environment`.
+#
+# The exception is that all of its file system methods are cached
+# for the instances lifetime. This makes `CachedEnvironment` much faster. This
+# behavior is ideal in production environments where the file system
+# is immutable.
+#
+# `CachedEnvironment` should not be initialized directly. Instead use
+# `Environment#cached`.
+#
+# source://sprockets//lib/sprockets/cached_environment.rb#14
+class Sprockets::CachedEnvironment < ::Sprockets::Base
+ # @return [CachedEnvironment] a new instance of CachedEnvironment
+ #
+ # source://sprockets//lib/sprockets/cached_environment.rb#15
+ def initialize(environment); end
+
+ # No-op return self as cached environment.
+ #
+ # source://sprockets//lib/sprockets/cached_environment.rb#27
+ def cached; end
+
+ # Internal: Cache Environment#entries
+ #
+ # source://sprockets//lib/sprockets/cached_environment.rb#33
+ def entries(path); end
+
+ # No-op return self as cached environment.
+ #
+ # source://sprockets//lib/sprockets/cached_environment.rb#27
+ def index; end
+
+ # Internal: Cache Environment#load
+ #
+ # source://sprockets//lib/sprockets/cached_environment.rb#43
+ def load(uri); end
+
+ # Internal: Cache Environment#processor_cache_key
+ #
+ # source://sprockets//lib/sprockets/cached_environment.rb#48
+ def processor_cache_key(str); end
+
+ # Internal: Cache Environment#resolve_dependency
+ #
+ # source://sprockets//lib/sprockets/cached_environment.rb#53
+ def resolve_dependency(str); end
+
+ # Internal: Cache Environment#stat
+ #
+ # source://sprockets//lib/sprockets/cached_environment.rb#38
+ def stat(path); end
+
+ private
+
+ # Cache is immutable, any methods that try to change the runtime config
+ # should bomb.
+ #
+ # @raise [RuntimeError]
+ #
+ # source://sprockets//lib/sprockets/cached_environment.rb#60
+ def config=(config); end
+end
+
+# Public: Closure Compiler minifier.
+#
+# To accept the default options
+#
+# environment.register_bundle_processor 'application/javascript',
+# Sprockets::ClosureCompressor
+#
+# Or to pass options to the Closure::Compiler class.
+#
+# environment.register_bundle_processor 'application/javascript',
+# Sprockets::ClosureCompressor.new({ ... })
+#
+# source://sprockets//lib/sprockets/closure_compressor.rb#18
+class Sprockets::ClosureCompressor
+ # @return [ClosureCompressor] a new instance of ClosureCompressor
+ #
+ # source://sprockets//lib/sprockets/closure_compressor.rb#38
+ def initialize(options = T.unsafe(nil)); end
+
+ # Returns the value of attribute cache_key.
+ #
+ # source://sprockets//lib/sprockets/closure_compressor.rb#36
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/closure_compressor.rb#43
+ def call(input); end
+
+ class << self
+ # source://sprockets//lib/sprockets/closure_compressor.rb#32
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/closure_compressor.rb#28
+ def call(input); end
+
+ # Public: Return singleton instance with default options.
+ #
+ # Returns ClosureCompressor object.
+ #
+ # source://sprockets//lib/sprockets/closure_compressor.rb#24
+ def instance; end
+ end
+end
+
+# source://sprockets//lib/sprockets/closure_compressor.rb#19
+Sprockets::ClosureCompressor::VERSION = T.let(T.unsafe(nil), String)
+
+# Processor engine class for the CoffeeScript compiler.
+# Depends on the `coffee-script` and `coffee-script-source` gems.
+#
+# For more information see:
+#
+# https://github.com/rails/ruby-coffee-script
+#
+# source://sprockets//lib/sprockets/coffee_script_processor.rb#13
+module Sprockets::CoffeeScriptProcessor
+ class << self
+ # source://sprockets//lib/sprockets/coffee_script_processor.rb#16
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/coffee_script_processor.rb#20
+ def call(input); end
+ end
+end
+
+# source://sprockets//lib/sprockets/coffee_script_processor.rb#14
+Sprockets::CoffeeScriptProcessor::VERSION = T.let(T.unsafe(nil), String)
+
+# `Compressing` is an internal mixin whose public methods are exposed on
+# the `Environment` and `CachedEnvironment` classes.
+#
+# source://sprockets//lib/sprockets/compressing.rb#7
+module Sprockets::Compressing
+ include ::Sprockets::Utils
+
+ # source://sprockets//lib/sprockets/compressing.rb#10
+ def compressors; end
+
+ # Return CSS compressor or nil if none is set
+ #
+ # source://sprockets//lib/sprockets/compressing.rb#40
+ def css_compressor; end
+
+ # Assign a compressor to run on `text/css` assets.
+ #
+ # The compressor object must respond to `compress`.
+ #
+ # source://sprockets//lib/sprockets/compressing.rb#49
+ def css_compressor=(compressor); end
+
+ # Public: Enable or disable the creation of Gzip files.
+ #
+ # To disable gzip generation set to a falsey value:
+ #
+ # environment.gzip = false
+ #
+ # To enable set to a truthy value. By default zlib wil
+ # be used to gzip assets. If you have the Zopfli gem
+ # installed you can specify the zopfli algorithm to be used
+ # instead:
+ #
+ # environment.gzip = :zopfli
+ #
+ # source://sprockets//lib/sprockets/compressing.rb#116
+ def gzip=(gzip); end
+
+ # Public: Checks if Gzip is enabled.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/compressing.rb#94
+ def gzip?; end
+
+ # Return JS compressor or nil if none is set
+ #
+ # source://sprockets//lib/sprockets/compressing.rb#67
+ def js_compressor; end
+
+ # Assign a compressor to run on `application/javascript` assets.
+ #
+ # The compressor object must respond to `compress`.
+ #
+ # source://sprockets//lib/sprockets/compressing.rb#76
+ def js_compressor=(compressor); end
+
+ # Public: Register a new compressor `klass` at `sym` for `mime_type`.
+ #
+ # Registering a processor allows it to be looked up by `sym` later when
+ # assigning a JavaScript or CSS compressor.
+ #
+ # Compressors only operate on JavaScript and CSS. If you want to compress a
+ # different type of asset, use a processor instead.
+ #
+ # Examples
+ #
+ # register_compressor 'text/css', :my_sass, MySassCompressor
+ # css_compressor = :my_sass
+ #
+ # mime_type - String MIME Type (one of: 'test/css' or 'application/javascript').
+ # sym - Symbol registration address.
+ # klass - The compressor class.
+ #
+ # Returns nothing.
+ #
+ # source://sprockets//lib/sprockets/compressing.rb#32
+ def register_compressor(mime_type, sym, klass); end
+
+ # Public: Checks if Gzip is disabled.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/compressing.rb#99
+ def skip_gzip?; end
+end
+
+# source://sprockets//lib/sprockets/configuration.rb#12
+module Sprockets::Configuration
+ include ::Sprockets::Utils
+ include ::Sprockets::URIUtils
+ include ::Sprockets::PathUtils
+ include ::Sprockets::DigestUtils
+ include ::Sprockets::PathDigestUtils
+ include ::Sprockets::Dependencies
+ include ::Sprockets::Compressing
+ include ::Sprockets::Exporting
+ include ::Sprockets::ProcessorUtils
+ include ::Sprockets::Processing
+ include ::Sprockets::HTTPUtils
+ include ::Sprockets::Transformers
+ include ::Sprockets::Mime
+ include ::Sprockets::Paths
+
+ # Returns the value of attribute config.
+ #
+ # source://sprockets//lib/sprockets/configuration.rb#21
+ def config; end
+
+ # @raise [TypeError]
+ #
+ # source://sprockets//lib/sprockets/configuration.rb#23
+ def config=(config); end
+
+ # This class maybe mutated and mixed in with custom helpers.
+ #
+ # environment.context_class.instance_eval do
+ # include MyHelpers
+ # def asset_url; end
+ # end
+ #
+ # source://sprockets//lib/sprockets/configuration.rb#77
+ def context_class; end
+
+ # Public: Returns a `Digest` implementation class.
+ #
+ # Defaults to `Digest::SHA256`.
+ #
+ # source://sprockets//lib/sprockets/configuration.rb#56
+ def digest_class; end
+
+ # Deprecated: Assign a `Digest` implementation class. This maybe any Ruby
+ # `Digest::` implementation such as `Digest::SHA256` or
+ # `Digest::SHA512`.
+ #
+ # environment.digest_class = Digest::SHA512
+ #
+ # source://sprockets//lib/sprockets/configuration.rb#66
+ def digest_class=(klass); end
+
+ # source://sprockets//lib/sprockets/configuration.rb#15
+ def initialize_configuration(parent); end
+
+ # Get and set `Logger` instance.
+ #
+ # source://sprockets//lib/sprockets/configuration.rb#29
+ def logger; end
+
+ # Get and set `Logger` instance.
+ #
+ # source://sprockets//lib/sprockets/configuration.rb#29
+ def logger=(_arg0); end
+
+ # The `Environment#version` is a custom value used for manually
+ # expiring all asset caches.
+ #
+ # Sprockets is able to track most file and directory changes and
+ # will take care of expiring the cache for you. However, its
+ # impossible to know when any custom helpers change that you mix
+ # into the `Context`.
+ #
+ # It would be wise to increment this value anytime you make a
+ # configuration change to the `Environment` object.
+ #
+ # source://sprockets//lib/sprockets/configuration.rb#41
+ def version; end
+
+ # Assign an environment version.
+ #
+ # environment.version = '2.0'
+ #
+ # source://sprockets//lib/sprockets/configuration.rb#49
+ def version=(version); end
+end
+
+# source://sprockets//lib/sprockets/errors.rb#6
+class Sprockets::ContentTypeMismatch < ::Sprockets::Error; end
+
+# They are typically accessed by ERB templates. You can mix in custom helpers
+# by injecting them into `Environment#context_class`. Do not mix them into
+# `Context` directly.
+#
+# environment.context_class.class_eval do
+# include MyHelper
+# def asset_url; end
+# end
+#
+# <%= asset_url "foo.png" %>
+#
+# The `Context` also collects dependencies declared by
+# assets. See `DirectiveProcessor` for an example of this.
+#
+# source://sprockets//lib/sprockets/context.rb#21
+class Sprockets::Context
+ # @return [Context] a new instance of Context
+ #
+ # source://sprockets//lib/sprockets/context.rb#42
+ def initialize(input); end
+
+ # Returns a `data:` URI with the contents of the asset at the specified
+ # path, and marks that path as a dependency of the current file.
+ #
+ # Uses URI encoding for SVG files, base64 encoding for all the other files.
+ #
+ # Use `asset_data_uri` from ERB with CSS or JavaScript assets:
+ #
+ # #logo { background: url(<%= asset_data_uri 'logo.png' %>) }
+ #
+ # $('').attr('src', '<%= asset_data_uri 'avatar.jpg' %>')
+ #
+ # source://sprockets//lib/sprockets/context.rb#201
+ def asset_data_uri(path); end
+
+ # Expands logical path to full url to asset.
+ #
+ # NOTE: This helper is currently not implemented and should be
+ # customized by the application. Though, in the future, some
+ # basic implementation may be provided with different methods that
+ # are required to be overridden.
+ #
+ # @raise [NotImplementedError]
+ #
+ # source://sprockets//lib/sprockets/context.rb#216
+ def asset_path(path, options = T.unsafe(nil)); end
+
+ # Expand logical audio asset path.
+ #
+ # source://sprockets//lib/sprockets/context.rb#241
+ def audio_path(path); end
+
+ # Returns content type of file
+ #
+ # 'application/javascript'
+ # 'text/css'
+ #
+ # source://sprockets//lib/sprockets/context.rb#88
+ def content_type; end
+
+ # `depend_on` allows you to state a dependency on a file without
+ # including it.
+ #
+ # This is used for caching purposes. Any changes made to
+ # the dependency file will invalidate the cache of the
+ # source file.
+ #
+ # source://sprockets//lib/sprockets/context.rb#128
+ def depend_on(path); end
+
+ # `depend_on_asset` allows you to state an asset dependency
+ # without including it.
+ #
+ # This is used for caching purposes. Any changes that would
+ # invalidate the dependency asset will invalidate the source
+ # file. Unlike `depend_on`, this will recursively include
+ # the target asset's dependencies.
+ #
+ # source://sprockets//lib/sprockets/context.rb#144
+ def depend_on_asset(path); end
+
+ # `depend_on_env` allows you to state a dependency on an environment
+ # variable.
+ #
+ # This is used for caching purposes. Any changes in the value of the
+ # environment variable will invalidate the cache of the source file.
+ #
+ # source://sprockets//lib/sprockets/context.rb#153
+ def depend_on_env(key); end
+
+ # source://sprockets//lib/sprockets/context.rb#64
+ def env_proxy; end
+
+ # Returns the value of attribute environment.
+ #
+ # source://sprockets//lib/sprockets/context.rb#40
+ def environment; end
+
+ # Returns the value of attribute filename.
+ #
+ # source://sprockets//lib/sprockets/context.rb#40
+ def filename; end
+
+ # Expand logical font asset path.
+ #
+ # source://sprockets//lib/sprockets/context.rb#246
+ def font_path(path); end
+
+ # Expand logical image asset path.
+ #
+ # source://sprockets//lib/sprockets/context.rb#231
+ def image_path(path); end
+
+ # Expand logical javascript asset path.
+ #
+ # source://sprockets//lib/sprockets/context.rb#251
+ def javascript_path(path); end
+
+ # `link_asset` declares an external dependency on an asset without directly
+ # including it. The target asset is returned from this function making it
+ # easy to construct a link to it.
+ #
+ # Returns an Asset or nil.
+ #
+ # source://sprockets//lib/sprockets/context.rb#184
+ def link_asset(path); end
+
+ # Public: Load Asset by AssetURI and track it as a dependency.
+ #
+ # uri - AssetURI
+ #
+ # Returns Asset.
+ #
+ # source://sprockets//lib/sprockets/context.rb#116
+ def load(uri); end
+
+ # Returns the environment path that contains the file.
+ #
+ # If `app/javascripts` and `app/stylesheets` are in your path, and
+ # current file is `app/javascripts/foo/bar.js`, `load_path` would
+ # return `app/javascripts`.
+ #
+ # source://sprockets//lib/sprockets/context.rb#73
+ def load_path; end
+
+ # Returns logical path without any file extensions.
+ #
+ # 'app/javascripts/application.js'
+ # # => 'application'
+ #
+ # source://sprockets//lib/sprockets/context.rb#81
+ def logical_path; end
+
+ # source://sprockets//lib/sprockets/context.rb#57
+ def metadata; end
+
+ # `require_asset` declares `path` as a dependency of the file. The
+ # dependency will be inserted before the file and will only be
+ # included once.
+ #
+ # If ERB processing is enabled, you can use it to dynamically
+ # require assets.
+ #
+ # <%= require_asset "#{framework}.js" %>
+ #
+ # source://sprockets//lib/sprockets/context.rb#166
+ def require_asset(path); end
+
+ # Public: Given a logical path, `resolve` will find and return an Asset URI.
+ # Relative paths will also be resolved. An accept type maybe given to
+ # restrict the search.
+ #
+ # resolve("foo.js")
+ # # => "file:///path/to/app/javascripts/foo.js?type=application/javascript"
+ #
+ # resolve("./bar.js")
+ # # => "file:///path/to/app/javascripts/bar.js?type=application/javascript"
+ #
+ # path - String logical or absolute path
+ # accept - String content accept type
+ #
+ # Returns an Asset URI String.
+ #
+ # source://sprockets//lib/sprockets/context.rb#104
+ def resolve(path, **kargs); end
+
+ # Returns the environment path that contains the file.
+ #
+ # If `app/javascripts` and `app/stylesheets` are in your path, and
+ # current file is `app/javascripts/foo/bar.js`, `load_path` would
+ # return `app/javascripts`.
+ #
+ # source://sprockets//lib/sprockets/context.rb#73
+ def root_path; end
+
+ # `stub_asset` blacklists `path` from being included in the bundle.
+ # `path` must be an asset which may or may not already be included
+ # in the bundle.
+ #
+ # source://sprockets//lib/sprockets/context.rb#174
+ def stub_asset(path); end
+
+ # Expand logical stylesheet asset path.
+ #
+ # source://sprockets//lib/sprockets/context.rb#256
+ def stylesheet_path(path); end
+
+ # Expand logical video asset path.
+ #
+ # source://sprockets//lib/sprockets/context.rb#236
+ def video_path(path); end
+
+ protected
+
+ # Returns a Base64-encoded data URI.
+ #
+ # source://sprockets//lib/sprockets/context.rb#272
+ def base64_asset_data_uri(asset); end
+
+ # Un-escapes characters in the given URI-escaped string that do not need
+ # escaping in "-quoted data URIs.
+ #
+ # source://sprockets//lib/sprockets/context.rb#297
+ def optimize_quoted_uri_escapes!(escaped); end
+
+ # Optimizes an SVG for being URI-escaped.
+ #
+ # This method only performs these basic but crucial optimizations:
+ # * Replaces " with ', because ' does not need escaping.
+ # * Removes comments, meta, doctype, and newlines.
+ # * Collapses whitespace.
+ #
+ # source://sprockets//lib/sprockets/context.rb#283
+ def optimize_svg_for_uri_escaping!(svg); end
+
+ # Returns a URI-encoded data URI (always "-quoted).
+ #
+ # source://sprockets//lib/sprockets/context.rb#263
+ def svg_asset_data_uri(asset); end
+end
+
+# Internal: Proxy for ENV that keeps track of the environment variables used
+#
+# source://sprockets//lib/sprockets/context.rb#23
+class Sprockets::Context::ENVProxy < ::SimpleDelegator
+ # @return [ENVProxy] a new instance of ENVProxy
+ #
+ # source://sprockets//lib/sprockets/context.rb#24
+ def initialize(context); end
+
+ # source://sprockets//lib/sprockets/context.rb#29
+ def [](key); end
+
+ # source://sprockets//lib/sprockets/context.rb#34
+ def fetch(key, *_arg1); end
+end
+
+# source://sprockets//lib/sprockets/errors.rb#9
+class Sprockets::ConversionError < ::Sprockets::NotFound; end
+
+# `Dependencies` is an internal mixin whose public methods are exposed on the
+# `Environment` and `CachedEnvironment` classes.
+#
+# source://sprockets//lib/sprockets/dependencies.rb#9
+module Sprockets::Dependencies
+ include ::Sprockets::URIUtils
+ include ::Sprockets::PathUtils
+ include ::Sprockets::DigestUtils
+ include ::Sprockets::PathDigestUtils
+
+ # Public: Add environmental dependency inherited by all assets.
+ #
+ # uri - String dependency URI
+ #
+ # Returns nothing.
+ #
+ # source://sprockets//lib/sprockets/dependencies.rb#48
+ def add_dependency(uri); end
+
+ # Public: Add environmental dependency inherited by all assets.
+ #
+ # uri - String dependency URI
+ #
+ # Returns nothing.
+ #
+ # source://sprockets//lib/sprockets/dependencies.rb#48
+ def depend_on(uri); end
+
+ # Public: Default set of dependency URIs for assets.
+ #
+ # Returns Set of String URIs.
+ #
+ # source://sprockets//lib/sprockets/dependencies.rb#25
+ def dependencies; end
+
+ # Public: Mapping dependency schemes to resolver functions.
+ #
+ # key - String scheme
+ # value - Proc.call(Environment, String)
+ #
+ # Returns Hash.
+ #
+ # source://sprockets//lib/sprockets/dependencies.rb#18
+ def dependency_resolvers; end
+
+ # Public: Register new dependency URI resolver.
+ #
+ # scheme - String scheme
+ # block -
+ # environment - Environment
+ # uri - String dependency URI
+ #
+ # Returns nothing.
+ #
+ # source://sprockets//lib/sprockets/dependencies.rb#37
+ def register_dependency_resolver(scheme, &block); end
+
+ # Internal: Resolve dependency URIs.
+ #
+ # Returns resolved Object.
+ #
+ # source://sprockets//lib/sprockets/dependencies.rb#58
+ def resolve_dependency(str); end
+end
+
+# Internal: Hash functions and digest related utilities. Mixed into
+# Environment.
+#
+# source://sprockets//lib/sprockets/digest_utils.rb#9
+module Sprockets::DigestUtils
+ extend ::Sprockets::DigestUtils
+
+ # Internal: Checks an asset name for a valid digest
+ #
+ # name - The name of the asset
+ #
+ # Returns true if the name contains a digest like string and .digested before the extension
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/digest_utils.rb#185
+ def already_digested?(name); end
+
+ # Internal: Detect digest class hash algorithm for digest bytes.
+ #
+ # While not elegant, all the supported digests have a unique bytesize.
+ #
+ # Returns Digest::Base or nil.
+ #
+ # source://sprockets//lib/sprockets/digest_utils.rb#32
+ def detect_digest_class(bytes); end
+
+ # Internal: Generate a hexdigest for a nested JSON serializable object.
+ #
+ # This is used for generating cache keys, so its pretty important its
+ # wicked fast. Microbenchmarks away!
+ #
+ # obj - A JSON serializable object.
+ #
+ # Returns a String digest of the object.
+ #
+ # source://sprockets//lib/sprockets/digest_utils.rb#87
+ def digest(obj); end
+
+ # Internal: Default digest class.
+ #
+ # Returns a Digest::Base subclass.
+ #
+ # source://sprockets//lib/sprockets/digest_utils.rb#15
+ def digest_class; end
+
+ # Internal: Generate a hexdigest for a nested JSON serializable object.
+ #
+ # The same as `pack_hexdigest(digest(obj))`.
+ #
+ # obj - A JSON serializable object.
+ #
+ # Returns a String digest of the object.
+ #
+ # source://sprockets//lib/sprockets/digest_utils.rb#98
+ def hexdigest(obj); end
+
+ # Public: Generate hash for use in the `integrity` attribute of an asset tag
+ # as per the subresource integrity specification.
+ #
+ # digest - The String hexbyte digest of the asset content.
+ #
+ # Returns a String or nil if hash algorithm is incompatible.
+ #
+ # source://sprockets//lib/sprockets/digest_utils.rb#176
+ def hexdigest_integrity_uri(hexdigest); end
+
+ # Public: Generate hash for use in the `integrity` attribute of an asset tag
+ # as per the subresource integrity specification.
+ #
+ # digest - The String byte digest of the asset content.
+ #
+ # Returns a String or nil if hash algorithm is incompatible.
+ #
+ # source://sprockets//lib/sprockets/digest_utils.rb#154
+ def integrity_uri(digest); end
+
+ # Internal: Pack a binary digest to a base64 encoded string.
+ #
+ # bin - String bytes
+ #
+ # Returns base64 String.
+ #
+ # source://sprockets//lib/sprockets/digest_utils.rb#125
+ def pack_base64digest(bin); end
+
+ # Internal: Pack a binary digest to a hex encoded string.
+ #
+ # bin - String bytes
+ #
+ # Returns hex String.
+ #
+ # source://sprockets//lib/sprockets/digest_utils.rb#107
+ def pack_hexdigest(bin); end
+
+ # Internal: Pack a binary digest to a urlsafe base64 encoded string.
+ #
+ # bin - String bytes
+ #
+ # Returns urlsafe base64 String.
+ #
+ # source://sprockets//lib/sprockets/digest_utils.rb#134
+ def pack_urlsafe_base64digest(bin); end
+
+ # Internal: Unpack a hex encoded digest string into binary bytes.
+ #
+ # hex - String hex
+ #
+ # Returns binary String.
+ #
+ # source://sprockets//lib/sprockets/digest_utils.rb#116
+ def unpack_hexdigest(hex); end
+
+ private
+
+ # source://sprockets//lib/sprockets/digest_utils.rb#190
+ def build_digest(obj); end
+end
+
+# source://sprockets//lib/sprockets/digest_utils.rb#36
+Sprockets::DigestUtils::ADD_VALUE_TO_DIGEST = T.let(T.unsafe(nil), Hash)
+
+# Internal: Maps digest bytesize to the digest class.
+#
+# source://sprockets//lib/sprockets/digest_utils.rb#20
+Sprockets::DigestUtils::DIGEST_SIZES = T.let(T.unsafe(nil), Hash)
+
+# Internal: Maps digest class to the CSP hash algorithm name.
+#
+# source://sprockets//lib/sprockets/digest_utils.rb#142
+Sprockets::DigestUtils::HASH_ALGORITHMS = T.let(T.unsafe(nil), Hash)
+
+# The `DirectiveProcessor` is responsible for parsing and evaluating
+# directive comments in a source file.
+#
+# A directive comment starts with a comment prefix, followed by an "=",
+# then the directive name, then any arguments.
+#
+# // JavaScript
+# //= require "foo"
+#
+# # CoffeeScript
+# #= require "bar"
+#
+# /* CSS
+# *= require "baz"
+# */
+#
+# This makes it possible to disable or modify the processor to do whatever
+# you'd like. You could add your own custom directives or invent your own
+# directive syntax.
+#
+# `Environment#processors` includes `DirectiveProcessor` by default.
+#
+# To remove the processor entirely:
+#
+# env.unregister_processor('text/css', Sprockets::DirectiveProcessor)
+# env.unregister_processor('application/javascript', Sprockets::DirectiveProcessor)
+#
+# Then inject your own preprocessor:
+#
+# env.register_processor('text/css', MyProcessor)
+#
+# source://sprockets//lib/sprockets/directive_processor.rb#37
+class Sprockets::DirectiveProcessor
+ # @return [DirectiveProcessor] a new instance of DirectiveProcessor
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#60
+ def initialize(comments: T.unsafe(nil)); end
+
+ # source://sprockets//lib/sprockets/directive_processor.rb#68
+ def _call(input); end
+
+ # source://sprockets//lib/sprockets/directive_processor.rb#64
+ def call(input); end
+
+ protected
+
+ # Directives will only be picked up if they are in the header
+ # of the source file. C style (/* */), JavaScript (//), and
+ # Ruby (#) comments are supported.
+ #
+ # Directives in comments after the first non-whitespace line
+ # of code will not be processed.
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#104
+ def compile_header_pattern(comments); end
+
+ # Returns an Array of directive structures. Each structure
+ # is an Array with the line number as the first element, the
+ # directive name as the second element, followed by any
+ # arguments.
+ #
+ # [[1, "require", "foo"], [2, "require", "bar"]]
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#141
+ def extract_directives(header); end
+
+ # Allows you to state a dependency on an asset without including
+ # it.
+ #
+ # This is used for caching purposes. Any changes that would
+ # invalidate the asset dependency will invalidate the cache of
+ # the source file.
+ #
+ # Unlike `depend_on`, the path must be a requirable asset.
+ #
+ # //= depend_on_asset "bar.js"
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#284
+ def process_depend_on_asset_directive(path); end
+
+ # Allows you to state a dependency on a file without
+ # including it.
+ #
+ # This is used for caching purposes. Any changes made to
+ # the dependency file will invalidate the cache of the
+ # source file.
+ #
+ # This is useful if you are using ERB and File.read to pull
+ # in contents from another file.
+ #
+ # //= depend_on "foo.png"
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#269
+ def process_depend_on_directive(path); end
+
+ # Allows you to state a dependency on a relative directory
+ # without including it.
+ #
+ # This is used for caching purposes. Any changes made to
+ # the dependency directory will invalidate the cache of the
+ # source file.
+ #
+ # This is useful if you are using ERB and File.read to pull
+ # in contents from multiple files in a directory.
+ #
+ # //= depend_on_directory ./data
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#300
+ def process_depend_on_directory_directive(path = T.unsafe(nil), accept = T.unsafe(nil)); end
+
+ # Gathers comment directives in the source and processes them.
+ # Any directive method matching `process_*_directive` will
+ # automatically be available. This makes it easy to extend the
+ # processor.
+ #
+ # To implement a custom directive called `require_glob`, subclass
+ # `Sprockets::DirectiveProcessor`, then add a method called
+ # `process_require_glob_directive`.
+ #
+ # class DirectiveProcessor < Sprockets::DirectiveProcessor
+ # def process_require_glob_directive(glob)
+ # Dir["#{dirname}/#{glob}"].sort.each do |filename|
+ # require(filename)
+ # end
+ # end
+ # end
+ #
+ # Replace the current processor on the environment with your own:
+ #
+ # env.unregister_processor('text/css', Sprockets::DirectiveProcessor)
+ # env.register_processor('text/css', DirectiveProcessor)
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#186
+ def process_directives(directives); end
+
+ # Declares a linked dependency on the target asset.
+ #
+ # The `path` must be a valid asset and should not already be part of the
+ # bundle. Any linked assets will automatically be compiled along with the
+ # current.
+ #
+ # /*= link "logo.png" */
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#326
+ def process_link_directive(path); end
+
+ # `link_directory` links all the files inside a single
+ # directory. It's similar to `path/*` since it does not follow
+ # nested directories.
+ #
+ # //= link_directory "./fonts"
+ #
+ # Use caution when linking against JS or CSS assets. Include an explicit
+ # extension or content type in these cases.
+ #
+ # //= link_directory "./scripts" .js
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#342
+ def process_link_directory_directive(path = T.unsafe(nil), accept = T.unsafe(nil)); end
+
+ # `link_tree` links all the nested files in a directory.
+ # Its glob equivalent is `path/**/*`.
+ #
+ # //= link_tree "./images"
+ #
+ # Use caution when linking against JS or CSS assets. Include an explicit
+ # extension or content type in these cases.
+ #
+ # //= link_tree "./styles" .css
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#358
+ def process_link_tree_directive(path = T.unsafe(nil), accept = T.unsafe(nil)); end
+
+ # The `require` directive functions similar to Ruby's own `require`.
+ # It provides a way to declare a dependency on a file in your path
+ # and ensures it's only loaded once before the source file.
+ #
+ # `require` works with files in the environment path:
+ #
+ # //= require "foo.js"
+ #
+ # Extensions are optional. If your source file is ".js", it
+ # assumes you are requiring another ".js".
+ #
+ # //= require "foo"
+ #
+ # Relative paths work too. Use a leading `./` to denote a relative
+ # path:
+ #
+ # //= require "./bar"
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#215
+ def process_require_directive(path); end
+
+ # `require_directory` requires all the files inside a single
+ # directory. It's similar to `path/*` since it does not follow
+ # nested directories.
+ #
+ # //= require_directory "./javascripts"
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#242
+ def process_require_directory_directive(path = T.unsafe(nil)); end
+
+ # `require_self` causes the body of the current file to be inserted
+ # before any subsequent `require` directives. Useful in CSS files, where
+ # it's common for the index file to contain global styles that need to
+ # be defined before other dependencies are loaded.
+ #
+ # /*= require "reset"
+ # *= require_self
+ # *= require_tree .
+ # */
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#229
+ def process_require_self_directive; end
+
+ # `require_tree` requires all the nested files in a directory.
+ # Its glob equivalent is `path/**/*`.
+ #
+ # //= require_tree "./public"
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#252
+ def process_require_tree_directive(path = T.unsafe(nil)); end
+
+ # source://sprockets//lib/sprockets/directive_processor.rb#118
+ def process_source(source); end
+
+ # Allows dependency to be excluded from the asset bundle.
+ #
+ # The `path` must be a valid asset and may or may not already
+ # be part of the bundle. Once stubbed, it is blacklisted and
+ # can't be brought back by any other `require`.
+ #
+ # //= stub "jquery"
+ #
+ # source://sprockets//lib/sprockets/directive_processor.rb#314
+ def process_stub_directive(path); end
+
+ private
+
+ # source://sprockets//lib/sprockets/directive_processor.rb#365
+ def expand_accept_shorthand(accept); end
+
+ # source://sprockets//lib/sprockets/directive_processor.rb#399
+ def expand_relative_dirname(directive, path); end
+
+ # source://sprockets//lib/sprockets/directive_processor.rb#383
+ def link_paths(paths, deps, accept); end
+
+ # source://sprockets//lib/sprockets/directive_processor.rb#377
+ def require_paths(paths, deps); end
+
+ # source://sprockets//lib/sprockets/directive_processor.rb#420
+ def resolve(path, **kargs); end
+
+ # source://sprockets//lib/sprockets/directive_processor.rb#389
+ def resolve_paths(paths, deps, **kargs); end
+
+ # source://sprockets//lib/sprockets/directive_processor.rb#415
+ def to_load(uri); end
+
+ class << self
+ # source://sprockets//lib/sprockets/directive_processor.rb#56
+ def call(input); end
+
+ # source://sprockets//lib/sprockets/directive_processor.rb#51
+ def instance; end
+ end
+end
+
+# Directives are denoted by a `=` followed by the name, then
+# argument list.
+#
+# A few different styles are allowed:
+#
+# // =require foo
+# //= require foo
+# //= require "foo"
+#
+# source://sprockets//lib/sprockets/directive_processor.rb#47
+Sprockets::DirectiveProcessor::DIRECTIVE_PATTERN = T.let(T.unsafe(nil), Regexp)
+
+# source://sprockets//lib/sprockets/base.rb#20
+class Sprockets::DoubleLinkError < ::Sprockets::Error
+ # @return [DoubleLinkError] a new instance of DoubleLinkError
+ #
+ # source://sprockets//lib/sprockets/base.rb#21
+ def initialize(parent_filename:, logical_path:, last_filename:, filename:); end
+end
+
+# source://sprockets//lib/sprockets/erb_processor.rb#4
+class Sprockets::ERBProcessor
+ # @return [ERBProcessor] a new instance of ERBProcessor
+ #
+ # source://sprockets//lib/sprockets/erb_processor.rb#16
+ def initialize(&block); end
+
+ # source://sprockets//lib/sprockets/erb_processor.rb#20
+ def call(input); end
+
+ private
+
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/erb_processor.rb#39
+ def keyword_constructor?; end
+
+ class << self
+ # source://sprockets//lib/sprockets/erb_processor.rb#12
+ def call(input); end
+
+ # Public: Return singleton instance with default options.
+ #
+ # Returns ERBProcessor object.
+ #
+ # source://sprockets//lib/sprockets/erb_processor.rb#8
+ def instance; end
+ end
+end
+
+# Processor engine class for the Eco compiler. Depends on the `eco` gem.
+#
+# For more information see:
+#
+# https://github.com/sstephenson/ruby-eco
+# https://github.com/sstephenson/eco
+#
+# source://sprockets//lib/sprockets/eco_processor.rb#12
+module Sprockets::EcoProcessor
+ class << self
+ # source://sprockets//lib/sprockets/eco_processor.rb#15
+ def cache_key; end
+
+ # Compile template data with Eco compiler.
+ #
+ # Returns a JS function definition String. The result should be
+ # assigned to a JS variable.
+ #
+ # # => "function(...) {...}"
+ #
+ # source://sprockets//lib/sprockets/eco_processor.rb#26
+ def call(input); end
+ end
+end
+
+# source://sprockets//lib/sprockets/eco_processor.rb#13
+Sprockets::EcoProcessor::VERSION = T.let(T.unsafe(nil), String)
+
+# Processor engine class for the EJS compiler. Depends on the `ejs` gem.
+#
+# For more information see:
+#
+# https://github.com/sstephenson/ruby-ejs
+#
+# source://sprockets//lib/sprockets/ejs_processor.rb#11
+module Sprockets::EjsProcessor
+ class << self
+ # source://sprockets//lib/sprockets/ejs_processor.rb#14
+ def cache_key; end
+
+ # Compile template data with EJS compiler.
+ #
+ # Returns a JS function definition String. The result should be
+ # assigned to a JS variable.
+ #
+ # # => "function(obj){...}"
+ #
+ # source://sprockets//lib/sprockets/ejs_processor.rb#25
+ def call(input); end
+ end
+end
+
+# source://sprockets//lib/sprockets/ejs_processor.rb#12
+Sprockets::EjsProcessor::VERSION = T.let(T.unsafe(nil), String)
+
+# Internal: HTTP transport encoding and charset detecting related functions.
+# Mixed into Environment.
+#
+# source://sprockets//lib/sprockets/encoding_utils.rb#9
+module Sprockets::EncodingUtils
+ extend ::Sprockets::EncodingUtils
+
+ # Public: Use base64 to encode data.
+ #
+ # str - String data
+ #
+ # Returns a encoded String
+ #
+ # source://sprockets//lib/sprockets/encoding_utils.rb#73
+ def base64(str); end
+
+ # Internal: Use Charlock Holmes to detect encoding.
+ #
+ # To enable this code path, require 'charlock_holmes'
+ #
+ # Returns encoded String.
+ #
+ # source://sprockets//lib/sprockets/encoding_utils.rb#122
+ def charlock_detect(str); end
+
+ # Public: Use deflate to compress data.
+ #
+ # str - String data
+ #
+ # Returns a compressed String
+ #
+ # source://sprockets//lib/sprockets/encoding_utils.rb#19
+ def deflate(str); end
+
+ # Public: Basic string detecter.
+ #
+ # Attempts to parse any Unicode BOM otherwise falls back to the
+ # environment's external encoding.
+ #
+ # str - ASCII-8BIT encoded String
+ #
+ # Returns encoded String.
+ #
+ # source://sprockets//lib/sprockets/encoding_utils.rb#100
+ def detect(str); end
+
+ # Public: Detect and strip @charset from CSS style sheet.
+ #
+ # str - String.
+ #
+ # Returns a encoded String.
+ #
+ # source://sprockets//lib/sprockets/encoding_utils.rb#178
+ def detect_css(str); end
+
+ # Public: Detect charset from HTML document.
+ #
+ # Attempts to parse any Unicode BOM otherwise attempt Charlock detection
+ # and finally falls back to the environment's external encoding.
+ #
+ # str - String.
+ #
+ # Returns a encoded String.
+ #
+ # source://sprockets//lib/sprockets/encoding_utils.rb#245
+ def detect_html(str); end
+
+ # Public: Detect Unicode string.
+ #
+ # Attempts to parse Unicode BOM and falls back to UTF-8.
+ #
+ # str - ASCII-8BIT encoded String
+ #
+ # Returns encoded String.
+ #
+ # source://sprockets//lib/sprockets/encoding_utils.rb#139
+ def detect_unicode(str); end
+
+ # Public: Detect and strip BOM from possible unicode string.
+ #
+ # str - ASCII-8BIT encoded String
+ #
+ # Returns UTF 8/16/32 encoded String without BOM or the original String if
+ # no BOM was present.
+ #
+ # source://sprockets//lib/sprockets/encoding_utils.rb#157
+ def detect_unicode_bom(str); end
+
+ # Public: Use gzip to compress data.
+ #
+ # str - String data
+ #
+ # Returns a compressed String
+ #
+ # source://sprockets//lib/sprockets/encoding_utils.rb#59
+ def gzip(str); end
+
+ # Internal: Scan binary CSS string for @charset encoding name.
+ #
+ # str - ASCII-8BIT encoded String
+ #
+ # Returns encoding String name or nil.
+ #
+ # source://sprockets//lib/sprockets/encoding_utils.rb#208
+ def scan_css_charset(str); end
+
+ # Internal: Unmarshal optionally deflated data.
+ #
+ # Checks leading marshal header to see if the bytes are uncompressed
+ # otherwise inflate the data an unmarshal.
+ #
+ # str - Marshaled String
+ # window_bits - Integer deflate window size. See ZLib::Inflate.new()
+ #
+ # Returns unmarshaled Object or raises an Exception.
+ #
+ # source://sprockets//lib/sprockets/encoding_utils.rb#39
+ def unmarshaled_deflated(str, window_bits = T.unsafe(nil)); end
+end
+
+# Internal: Mapping unicode encodings to byte order markers.
+#
+# source://sprockets//lib/sprockets/encoding_utils.rb#84
+Sprockets::EncodingUtils::BOM = T.let(T.unsafe(nil), Hash)
+
+# Internal: Shorthand aliases for detecter functions.
+#
+# source://sprockets//lib/sprockets/encoding_utils.rb#81
+Sprockets::EncodingUtils::CHARSET_DETECT = T.let(T.unsafe(nil), Hash)
+
+# source://sprockets//lib/sprockets/encoding_utils.rb#201
+Sprockets::EncodingUtils::CHARSET_SIZE = T.let(T.unsafe(nil), Integer)
+
+# Internal: @charset bytes
+#
+# source://sprockets//lib/sprockets/encoding_utils.rb#200
+Sprockets::EncodingUtils::CHARSET_START = T.let(T.unsafe(nil), Array)
+
+# source://sprockets//lib/sprockets/environment.rb#7
+class Sprockets::Environment < ::Sprockets::Base
+ # `Environment` should be initialized with your application's root
+ # directory. This should be the same as your Rails or Rack root.
+ #
+ # env = Environment.new(Rails.root)
+ #
+ # @return [Environment] a new instance of Environment
+ # @yield [_self]
+ # @yieldparam _self [Sprockets::Environment] the object that the method was called on
+ #
+ # source://sprockets//lib/sprockets/environment.rb#13
+ def initialize(root = T.unsafe(nil)); end
+
+ # Returns a cached version of the environment.
+ #
+ # All of its file system calls are cached which makes `cached` much
+ # faster. This behavior is ideal in production since the file
+ # system only changes between deploys.
+ #
+ # source://sprockets//lib/sprockets/environment.rb#25
+ def cached; end
+
+ # source://sprockets//lib/sprockets/environment.rb#38
+ def find_all_linked_assets(*args, &block); end
+
+ # source://sprockets//lib/sprockets/environment.rb#30
+ def find_asset(*args, **options); end
+
+ # source://sprockets//lib/sprockets/environment.rb#34
+ def find_asset!(*args); end
+
+ # Returns a cached version of the environment.
+ #
+ # All of its file system calls are cached which makes `cached` much
+ # faster. This behavior is ideal in production since the file
+ # system only changes between deploys.
+ #
+ # source://sprockets//lib/sprockets/environment.rb#25
+ def index; end
+
+ # source://sprockets//lib/sprockets/environment.rb#42
+ def load(*args); end
+end
+
+# source://sprockets//lib/sprockets/errors.rb#4
+class Sprockets::Error < ::StandardError; end
+
+# source://sprockets//lib/sprockets/exporters/base.rb#2
+module Sprockets::Exporters; end
+
+# Convenience class for all exporters to inherit from
+#
+# An exporter is responsible for exporting a Sprockets::Asset
+# to a file system. For example the Exporters::File class
+# writes the asset to it's destination. The Exporters::Zlib class
+# writes a gzip copy of the asset to disk.
+#
+# source://sprockets//lib/sprockets/exporters/base.rb#9
+class Sprockets::Exporters::Base
+ # Public: Creates new instance
+ #
+ # Initialize will be called with
+ # keyword arguments:
+ #
+ # - asset: An instance of Sprockets::Asset.
+ # - environment: An instance of Sprockets::Environment.
+ # - directory: String representing the target directory to write to.
+ #
+ # These will all be stored as accessible values. In addition a
+ # +target+ will be available which is the target directory and
+ # the asset's digest path combined.
+ #
+ # @return [Base] a new instance of Base
+ #
+ # source://sprockets//lib/sprockets/exporters/base.rb#24
+ def initialize(asset: T.unsafe(nil), environment: T.unsafe(nil), directory: T.unsafe(nil)); end
+
+ # Returns the value of attribute asset.
+ #
+ # source://sprockets//lib/sprockets/exporters/base.rb#10
+ def asset; end
+
+ # Public: Contains logic for writing "exporting" asset to disk
+ #
+ # If the exporter is not skipped it then Sprockets will execute it's
+ # `call` method. This method takes no arguments and should only use
+ # elements passed in via initialize or stored in `setup`.
+ #
+ # source://sprockets//lib/sprockets/exporters/base.rb#55
+ def call; end
+
+ # Returns the value of attribute directory.
+ #
+ # source://sprockets//lib/sprockets/exporters/base.rb#10
+ def directory; end
+
+ # Returns the value of attribute environment.
+ #
+ # source://sprockets//lib/sprockets/exporters/base.rb#10
+ def environment; end
+
+ # Public: Callback that is executed after initialization
+ #
+ # Any setup that needs to be done can be performed in the +setup+
+ # method. It will be called immediately after initialization.
+ #
+ # source://sprockets//lib/sprockets/exporters/base.rb#36
+ def setup; end
+
+ # Public: Handles logic for skipping exporter and notifying logger
+ #
+ # The `skip?` will be called before anything will be written.
+ # If `skip?` returns truthy it will not continue. This method
+ # takes a `logger` that responds to +debug+ and +info+. The `skip?`
+ # method is the only place expected to write to a logger, any other
+ # messages may produce jumbled logs.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/exporters/base.rb#46
+ def skip?(logger); end
+
+ # Returns the value of attribute target.
+ #
+ # source://sprockets//lib/sprockets/exporters/base.rb#10
+ def target; end
+
+ # Public: Yields a file that can be written to with the input
+ #
+ # `filename`. Defaults to the `target`. Method
+ # is safe to use in forked or threaded environments.
+ #
+ # source://sprockets//lib/sprockets/exporters/base.rb#63
+ def write(filename = T.unsafe(nil)); end
+end
+
+# Writes a an asset file to disk
+#
+# source://sprockets//lib/sprockets/exporters/file_exporter.rb#6
+class Sprockets::Exporters::FileExporter < ::Sprockets::Exporters::Base
+ # source://sprockets//lib/sprockets/exporters/file_exporter.rb#17
+ def call; end
+
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/exporters/file_exporter.rb#7
+ def skip?(logger); end
+end
+
+# Generates a `.gz` file using the zlib algorithm built into
+# Ruby's standard library.
+#
+# source://sprockets//lib/sprockets/exporters/zlib_exporter.rb#8
+class Sprockets::Exporters::ZlibExporter < ::Sprockets::Exporters::Base
+ # source://sprockets//lib/sprockets/exporters/zlib_exporter.rb#26
+ def call; end
+
+ # source://sprockets//lib/sprockets/exporters/zlib_exporter.rb#9
+ def setup; end
+
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/exporters/zlib_exporter.rb#14
+ def skip?(logger); end
+end
+
+# Generates a `.gz` file using the zopfli algorithm from the
+# Zopfli gem.
+#
+# source://sprockets//lib/sprockets/exporters/zopfli_exporter.rb#7
+class Sprockets::Exporters::ZopfliExporter < ::Sprockets::Exporters::ZlibExporter
+ # source://sprockets//lib/sprockets/exporters/zopfli_exporter.rb#8
+ def setup; end
+end
+
+# `Exporting` is an internal mixin whose public methods are exposed on
+# the `Environment` and `CachedEnvironment` classes.
+#
+# source://sprockets//lib/sprockets/exporting.rb#4
+module Sprockets::Exporting
+ # Public: Checks if concurrent exporting is allowed
+ #
+ # source://sprockets//lib/sprockets/exporting.rb#59
+ def export_concurrent; end
+
+ # Public: Enable or disable the concurrently exporting files
+ #
+ # Defaults to true.
+ #
+ # environment.export_concurrent = false
+ #
+ # source://sprockets//lib/sprockets/exporting.rb#69
+ def export_concurrent=(export_concurrent); end
+
+ # Exporters are ran on the assets:precompile task
+ #
+ # source://sprockets//lib/sprockets/exporting.rb#6
+ def exporters; end
+
+ # Public: Registers a new Exporter `klass` for `mime_type`.
+ #
+ # If your exporter depends on one or more other exporters you can
+ # specify this via the `depend_on` keyword.
+ #
+ # register_exporter '*/*', Sprockets::Exporters::ZlibExporter
+ #
+ # This ensures that `Sprockets::Exporters::File` will always execute before
+ # `Sprockets::Exporters::Zlib`
+ #
+ # source://sprockets//lib/sprockets/exporting.rb#19
+ def register_exporter(mime_types, klass = T.unsafe(nil)); end
+
+ # Public: Remove Exporting processor `klass` for `mime_type`.
+ #
+ # environment.unregister_exporter '*/*', Sprockets::Exporters::ZlibExporter
+ #
+ # Can be called without a mime type
+ #
+ # environment.unregister_exporter Sprockets::Exporters::ZlibExporter
+ #
+ # Does not remove any exporters that depend on `klass`.
+ #
+ # source://sprockets//lib/sprockets/exporting.rb#38
+ def unregister_exporter(mime_types, exporter = T.unsafe(nil)); end
+end
+
+# source://sprockets//lib/sprockets/errors.rb#10
+class Sprockets::FileNotFound < ::Sprockets::NotFound; end
+
+# source://sprockets//lib/sprockets/errors.rb#11
+class Sprockets::FileOutsidePaths < ::Sprockets::NotFound; end
+
+# Internal: The first processor in the pipeline that reads the file into
+# memory and passes it along as `input[:data]`.
+#
+# source://sprockets//lib/sprockets/file_reader.rb#7
+class Sprockets::FileReader
+ class << self
+ # source://sprockets//lib/sprockets/file_reader.rb#8
+ def call(input); end
+ end
+end
+
+# Internal: HTTP URI utilities. Many adapted from Rack::Utils. Mixed into
+# Environment.
+#
+# source://sprockets//lib/sprockets/http_utils.rb#5
+module Sprockets::HTTPUtils
+ extend ::Sprockets::HTTPUtils
+
+ # Internal: Find the best qvalue match from an Array of available mime type
+ # options.
+ #
+ # Adapted from Rack::Utils#q_values.
+ #
+ # Returns the matched mime type String from available Array or nil.
+ #
+ # source://sprockets//lib/sprockets/http_utils.rb#129
+ def find_best_mime_type_match(q_value_header, available); end
+
+ # Internal: Find the best qvalue match from an Array of available options.
+ #
+ # Adapted from Rack::Utils#q_values.
+ #
+ # Returns the matched String from available Array or nil.
+ #
+ # source://sprockets//lib/sprockets/http_utils.rb#107
+ def find_best_q_match(q_values, available, &matcher); end
+
+ # Internal: Find the all qvalue match from an Array of available mime type
+ # options.
+ #
+ # Adapted from Rack::Utils#q_values.
+ #
+ # Returns Array of matched mime type Strings from available Array or [].
+ #
+ # source://sprockets//lib/sprockets/http_utils.rb#117
+ def find_mime_type_matches(q_value_header, available); end
+
+ # Internal: Find all qvalue matches from an Array of available options.
+ #
+ # Adapted from Rack::Utils#q_values.
+ #
+ # Returns Array of matched Strings from available Array or [].
+ #
+ # source://sprockets//lib/sprockets/http_utils.rb#74
+ def find_q_matches(q_values, available, &matcher); end
+
+ # Public: Test mime type against mime range.
+ #
+ # match_mime_type?('text/html', 'text/*') => true
+ # match_mime_type?('text/plain', '*') => true
+ # match_mime_type?('text/html', 'application/json') => false
+ #
+ # Returns true if the given value is a mime match for the given mime match
+ # specification, false otherwise.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/http_utils.rb#16
+ def match_mime_type?(value, matcher); end
+
+ # Public: Return values from Hash where the key matches the mime type.
+ #
+ # hash - Hash of String matcher keys to Object values
+ # mime_type - String mime type
+ #
+ # Returns Array of Object values.
+ #
+ # source://sprockets//lib/sprockets/http_utils.rb#28
+ def match_mime_type_keys(hash, mime_type); end
+
+ # Internal: Parse Accept header quality values.
+ #
+ # values - String e.g. "application/javascript"
+ #
+ # Adapted from Rack::Utils#q_values. Quality values are
+ # described in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
+ #
+ # parse_q_values("application/javascript")
+ # # => [["application/javascript", 1.0]]
+ #
+ # parse_q_values("*/*")
+ # # => [["*/*", 1.0]]
+ #
+ # parse_q_values("text/plain; q=0.5, image/*")
+ # # => [["text/plain", 0.5], ["image/*", 1.0]]
+ #
+ # parse_q_values("application/javascript, text/css")
+ # # => [["application/javascript", 1.0], ["text/css", 1.0]]
+ #
+ # Returns an Array of [String, Float].
+ #
+ # source://sprockets//lib/sprockets/http_utils.rb#58
+ def parse_q_values(values); end
+end
+
+# source://sprockets//lib/sprockets/jsminc_compressor.rb#6
+class Sprockets::JSMincCompressor
+ # @return [JSMincCompressor] a new instance of JSMincCompressor
+ #
+ # source://sprockets//lib/sprockets/jsminc_compressor.rb#23
+ def initialize(options = T.unsafe(nil)); end
+
+ # Returns the value of attribute cache_key.
+ #
+ # source://sprockets//lib/sprockets/jsminc_compressor.rb#21
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/jsminc_compressor.rb#28
+ def call(input); end
+
+ class << self
+ # source://sprockets//lib/sprockets/jsminc_compressor.rb#17
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/jsminc_compressor.rb#13
+ def call(input); end
+
+ # source://sprockets//lib/sprockets/jsminc_compressor.rb#9
+ def instance; end
+ end
+end
+
+# source://sprockets//lib/sprockets/jsminc_compressor.rb#7
+Sprockets::JSMincCompressor::VERSION = T.let(T.unsafe(nil), String)
+
+# Public: JST transformer.
+#
+# Exports server side compiled templates to an object.
+#
+# Name your template "users/show.ejs", "users/new.eco", etc.
+#
+# To accept the default options
+#
+# environment.register_transformer
+# 'application/javascript+function',
+# 'application/javascript', JstProcessor
+#
+# Change the default namespace.
+#
+# environment.register_transformer
+# 'application/javascript+function',
+# 'application/javascript', JstProcessor.new(namespace: 'App.templates')
+#
+# source://sprockets//lib/sprockets/jst_processor.rb#21
+class Sprockets::JstProcessor
+ # @return [JstProcessor] a new instance of JstProcessor
+ #
+ # source://sprockets//lib/sprockets/jst_processor.rb#37
+ def initialize(namespace: T.unsafe(nil)); end
+
+ # source://sprockets//lib/sprockets/jst_processor.rb#41
+ def call(input); end
+
+ class << self
+ # source://sprockets//lib/sprockets/jst_processor.rb#33
+ def call(input); end
+
+ # source://sprockets//lib/sprockets/jst_processor.rb#22
+ def default_namespace; end
+
+ # Public: Return singleton instance with default options.
+ #
+ # Returns JstProcessor object.
+ #
+ # source://sprockets//lib/sprockets/jst_processor.rb#29
+ def instance; end
+ end
+end
+
+# The loader phase takes a asset URI location and returns a constructed Asset
+# object.
+#
+# source://sprockets//lib/sprockets/loader.rb#19
+module Sprockets::Loader
+ include ::Sprockets::URIUtils
+ include ::Sprockets::Utils
+ include ::Sprockets::ProcessorUtils
+ include ::Sprockets::PathUtils
+ include ::Sprockets::DigestUtils
+ include ::Sprockets::PathDependencyUtils
+ include ::Sprockets::HTTPUtils
+ include ::Sprockets::Transformers
+ include ::Sprockets::Resolve
+ include ::Sprockets::Processing
+ include ::Sprockets::Mime
+
+ # Public: Load Asset by Asset URI.
+ #
+ # uri - A String containing complete URI to a file including schema
+ # and full path such as:
+ # "file:///Path/app/assets/js/app.js?type=application/javascript"
+ #
+ # Returns Asset.
+ #
+ # source://sprockets//lib/sprockets/loader.rb#31
+ def load(uri); end
+
+ private
+
+ # Internal: Load asset hash from cache
+ #
+ # key - A String containing lookup information for an asset
+ #
+ # This method converts all "compressed" paths to absolute paths.
+ # Returns a hash of values representing an asset
+ #
+ # source://sprockets//lib/sprockets/loader.rb#111
+ def asset_from_cache(key); end
+
+ # source://sprockets//lib/sprockets/loader.rb#67
+ def compress_key_from_hash(hash, key); end
+
+ # source://sprockets//lib/sprockets/loader.rb#87
+ def expand_key_from_hash(hash, key); end
+
+ # Internal: Retrieves an asset based on its digest
+ #
+ # unloaded - An UnloadedAsset
+ # limit - An Integer which sets the maximum number of versions of "histories"
+ # stored in the cache
+ #
+ # This method attempts to retrieve the last `limit` number of histories of an asset
+ # from the cache a "history" which is an array of unresolved "dependencies" that the asset needs
+ # to compile. In this case a dependency can refer to either an asset e.g. index.js
+ # may rely on jquery.js (so jquery.js is a dependency), or other factors that may affect
+ # compilation, such as the VERSION of Sprockets (i.e. the environment) and what "processors"
+ # are used.
+ #
+ # For example a history array may look something like this
+ #
+ # [["environment-version", "environment-paths", "processors:type=text/css&file_type=text/css",
+ # "file-digest:///Full/path/app/assets/stylesheets/application.css",
+ # "processors:type=text/css&file_digesttype=text/css&pipeline=self",
+ # "file-digest:///Full/path/app/assets/stylesheets"]]
+ #
+ # Where the first entry is a Set of dependencies for last generated version of that asset.
+ # Multiple versions are stored since Sprockets keeps the last `limit` number of assets
+ # generated present in the system.
+ #
+ # If a "history" of dependencies is present in the cache, each version of "history" will be
+ # yielded to the passed block which is responsible for loading the asset. If found, the existing
+ # history will be saved with the dependency that found a valid asset moved to the front.
+ #
+ # If no history is present, or if none of the histories could be resolved to a valid asset then,
+ # the block is yielded to and expected to return a valid asset.
+ # When this happens the dependencies for the returned asset are added to the "history", and older
+ # entries are removed if the "history" is above `limit`.
+ #
+ # source://sprockets//lib/sprockets/loader.rb#325
+ def fetch_asset_from_dependency_cache(unloaded, limit = T.unsafe(nil)); end
+
+ # Internal: Loads an asset and saves it to cache
+ #
+ # unloaded - An UnloadedAsset
+ #
+ # This method is only called when the given unloaded asset could not be
+ # successfully pulled from cache.
+ #
+ # source://sprockets//lib/sprockets/loader.rb#139
+ def load_from_unloaded(unloaded); end
+
+ # Internal: Resolve set of dependency URIs.
+ #
+ # uris - An Array of "dependencies" for example:
+ # ["environment-version", "environment-paths", "processors:type=text/css&file_type=text/css",
+ # "file-digest:///Full/path/app/assets/stylesheets/application.css",
+ # "processors:type=text/css&file_type=text/css&pipeline=self",
+ # "file-digest:///Full/path/app/assets/stylesheets"]
+ #
+ # Returns back array of things that the given uri depends on
+ # For example the environment version, if you're using a different version of sprockets
+ # then the dependencies should be different, this is used only for generating cache key
+ # for example the "environment-version" may be resolved to "environment-1.0-3.2.0" for
+ # version "3.2.0" of sprockets.
+ #
+ # Any paths that are returned are converted to relative paths
+ #
+ # Returns array of resolved dependencies
+ #
+ # source://sprockets//lib/sprockets/loader.rb#289
+ def resolve_dependencies(uris); end
+
+ # Internal: Save a given asset to the cache
+ #
+ # asset - A hash containing values of loaded asset
+ # unloaded - The UnloadedAsset used to lookup the `asset`
+ #
+ # This method converts all absolute paths to "compressed" paths
+ # which are relative if they're in the root.
+ #
+ # source://sprockets//lib/sprockets/loader.rb#239
+ def store_asset(asset, unloaded); end
+end
+
+# The Manifest logs the contents of assets compiled to a single directory. It
+# records basic attributes about the asset for fast lookup without having to
+# compile. A pointer from each logical path indicates which fingerprinted
+# asset is the current one.
+#
+# The JSON is part of the public API and should be considered stable. This
+# should make it easy to read from other programming languages and processes
+# that don't have sprockets loaded. See `#assets` and `#files` for more
+# information about the structure.
+#
+# source://sprockets//lib/sprockets/manifest.rb#19
+class Sprockets::Manifest
+ include ::Sprockets::ManifestUtils
+
+ # Create new Manifest associated with an `environment`. `filename` is a full
+ # path to the manifest json file. The file may or may not already exist. The
+ # dirname of the `filename` will be used to write compiled assets to.
+ # Otherwise, if the path is a directory, the filename will default a random
+ # ".sprockets-manifest-*.json" file in that directory.
+ #
+ # Manifest.new(environment, "./public/assets/manifest.json")
+ #
+ # @return [Manifest] a new instance of Manifest
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#32
+ def initialize(*args); end
+
+ # Returns internal assets mapping. Keys are logical paths which
+ # map to the latest fingerprinted filename.
+ #
+ # Logical path (String): Fingerprint path (String)
+ #
+ # { "application.js" => "application-2e8e9a7c6b0aafa0c9bdeec90ea30213.js",
+ # "jquery.js" => "jquery-ae0908555a245f8266f77df5a8edca2e.js" }
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#91
+ def assets; end
+
+ # Cleanup old assets in the compile directory. By default it will
+ # keep the latest version, 2 backups and any created within the past hour.
+ #
+ # Examples
+ #
+ # To force only 1 backup to be kept, set count=1 and age=0.
+ #
+ # To only keep files created within the last 10 minutes, set count=0 and
+ # age=600.
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#246
+ def clean(count = T.unsafe(nil), age = T.unsafe(nil)); end
+
+ # Wipe directive
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#269
+ def clobber; end
+
+ # Compile asset to directory. The asset is written to a
+ # fingerprinted filename like
+ # `application-2e8e9a7c6b0aafa0c9bdeec90ea30213.js`. An entry is
+ # also inserted into the manifest file.
+ #
+ # compile("application.js")
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#161
+ def compile(*args); end
+
+ # Returns the value of attribute directory.
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#80
+ def dir; end
+
+ # Returns the value of attribute directory.
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#80
+ def directory; end
+
+ # Returns the value of attribute environment.
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#22
+ def environment; end
+
+ # Returns String path to manifest.json file.
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#77
+ def filename; end
+
+ # Returns internal file directory listing. Keys are filenames
+ # which map to an attributes array.
+ #
+ # Fingerprint path (String):
+ # logical_path: Logical path (String)
+ # mtime: ISO8601 mtime (String)
+ # digest: Base64 hex digest (String)
+ #
+ # { "application-2e8e9a7c6b0aafa0c9bdeec90ea30213.js" =>
+ # { 'logical_path' => "application.js",
+ # 'mtime' => "2011-12-13T21:47:08-06:00",
+ # 'digest' => "2e8e9a7c6b0aafa0c9bdeec90ea30213" } }
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#108
+ def files; end
+
+ # Public: Find all assets matching pattern set in environment.
+ #
+ # Returns Enumerator of Assets.
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#115
+ def find(*args, &block); end
+
+ # Public: Find the source of assets by paths.
+ #
+ # Returns Enumerator of assets file content.
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#139
+ def find_sources(*args); end
+
+ # Returns String path to manifest.json file.
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#77
+ def path; end
+
+ # Removes file from directory and from manifest. `filename` must
+ # be the name with any directory path.
+ #
+ # manifest.remove("application-2e8e9a7c6b0aafa0c9bdeec90ea30213.js")
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#216
+ def remove(filename); end
+
+ # Persist manifest back to FS
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#278
+ def save; end
+
+ private
+
+ # source://sprockets//lib/sprockets/manifest.rb#335
+ def executor; end
+
+ # Given an asset, finds all exporters that
+ # match its mime-type.
+ #
+ # Will yield each expoter to the passed in block.
+ #
+ # array = []
+ # puts asset.content_type # => "application/javascript"
+ # exporters_for_asset(asset) do |exporter|
+ # array << exporter
+ # end
+ # # puts array => [Exporters::FileExporter, Exporters::ZlibExporter]
+ #
+ # source://sprockets//lib/sprockets/manifest.rb#299
+ def exporters_for_asset(asset); end
+
+ # source://sprockets//lib/sprockets/manifest.rb#317
+ def json_decode(obj); end
+
+ # source://sprockets//lib/sprockets/manifest.rb#321
+ def json_encode(obj); end
+
+ # source://sprockets//lib/sprockets/manifest.rb#325
+ def logger; end
+end
+
+# Public: Manifest utilities.
+#
+# source://sprockets//lib/sprockets/manifest_utils.rb#7
+module Sprockets::ManifestUtils
+ extend ::Sprockets::ManifestUtils
+
+ # Public: Find or pick a new manifest filename for target build directory.
+ #
+ # dirname - String dirname
+ #
+ # Examples
+ #
+ # find_directory_manifest("/app/public/assets")
+ # # => "/app/public/assets/.sprockets-manifest-abc123.json"
+ #
+ # Returns String filename.
+ #
+ # source://sprockets//lib/sprockets/manifest_utils.rb#37
+ def find_directory_manifest(dirname, logger = T.unsafe(nil)); end
+
+ # Public: Generate a new random manifest path.
+ #
+ # Manifests are not intended to be accessed publicly, but typically live
+ # alongside public assets for convenience. To avoid being served, the
+ # filename is prefixed with a "." which is usually hidden by web servers
+ # like Apache. To help in other environments that may not control this,
+ # a random hex string is appended to the filename to prevent people from
+ # guessing the location. If directory indexes are enabled on the server,
+ # all bets are off.
+ #
+ # Return String path.
+ #
+ # source://sprockets//lib/sprockets/manifest_utils.rb#23
+ def generate_manifest_path; end
+end
+
+# source://sprockets//lib/sprockets/manifest_utils.rb#10
+Sprockets::ManifestUtils::MANIFEST_RE = T.let(T.unsafe(nil), Regexp)
+
+# source://sprockets//lib/sprockets/mime.rb#7
+module Sprockets::Mime
+ include ::Sprockets::Utils
+ include ::Sprockets::HTTPUtils
+
+ # Internal: Mapping of MIME extension Strings to MIME type Strings.
+ #
+ # Used for internal fast lookup purposes.
+ #
+ # Examples:
+ #
+ # mime_exts['.js'] #=> 'application/javascript'
+ #
+ # key - MIME extension String
+ # value - MIME Type String
+ #
+ # Returns Hash.
+ #
+ # source://sprockets//lib/sprockets/mime.rb#34
+ def mime_exts; end
+
+ # Internal: Get detecter function for MIME type.
+ #
+ # mime_type - String MIME type
+ #
+ # Returns Proc detector or nil if none is available.
+ #
+ # source://sprockets//lib/sprockets/mime.rb#71
+ def mime_type_charset_detecter(mime_type); end
+
+ # Public: Mapping of MIME type Strings to properties Hash.
+ #
+ # key - MIME Type String
+ # value - Hash
+ # extensions - Array of extnames
+ # charset - Default Encoding or function to detect encoding
+ #
+ # Returns Hash.
+ #
+ # source://sprockets//lib/sprockets/mime.rb#18
+ def mime_types; end
+
+ # Public: Read file on disk with MIME type specific encoding.
+ #
+ # filename - String path
+ # content_type - String MIME type
+ #
+ # Returns String file contents transcoded to UTF-8 or in its external
+ # encoding.
+ #
+ # source://sprockets//lib/sprockets/mime.rb#86
+ def read_file(filename, content_type = T.unsafe(nil)); end
+
+ # Public: Register a new mime type.
+ #
+ # mime_type - String MIME Type
+ # extensions - Array of String extnames
+ # charset - Proc/Method that detects the charset of a file.
+ # See EncodingUtils.
+ #
+ # Returns nothing.
+ #
+ # source://sprockets//lib/sprockets/mime.rb#46
+ def register_mime_type(mime_type, extensions: T.unsafe(nil), charset: T.unsafe(nil)); end
+end
+
+# source://sprockets//lib/sprockets/errors.rb#8
+class Sprockets::NotFound < ::Sprockets::Error; end
+
+# source://sprockets//lib/sprockets/errors.rb#7
+class Sprockets::NotImplementedError < ::Sprockets::Error; end
+
+# source://sprockets//lib/sprockets/npm.rb#5
+module Sprockets::Npm
+ # Internal: Read package.json's main and style directives.
+ #
+ # dirname - String path to component directory.
+ # filename - String path to package.json.
+ #
+ # Returns nothing.
+ #
+ # @yield [File.expand_path(package['style'], dirname)]
+ #
+ # source://sprockets//lib/sprockets/npm.rb#39
+ def read_package_directives(dirname, filename); end
+
+ # Internal: Override resolve_alternates to install package.json behavior.
+ #
+ # load_path - String environment path
+ # logical_path - String path relative to base
+ #
+ # Returns candidate filenames.
+ #
+ # source://sprockets//lib/sprockets/npm.rb#12
+ def resolve_alternates(load_path, logical_path); end
+end
+
+# Internal: Related PathUtils helpers that also track all the file system
+# calls they make for caching purposes. All functions return a standard
+# return value and a Set of cache dependency URIs that can be used in the
+# future to see if the returned value should be invalidated from cache.
+#
+# entries_with_dependencies("app/assets/javascripts")
+# # => [
+# # ["application.js", "projects.js", "users.js", ...]
+# # #
+# # ]
+#
+# The returned dependency set can be passed to resolve_dependencies(deps)
+# to check if the returned result is still fresh. In this case, entry always
+# returns a single path, but multiple calls should accumulate dependencies
+# into a single set thats saved off and checked later.
+#
+# resolve_dependencies(deps)
+# # => "\x01\x02\x03"
+#
+# Later, resolving the same set again will produce a different hash if
+# something on the file system has changed.
+#
+# resolve_dependencies(deps)
+# # => "\x03\x04\x05"
+#
+# source://sprockets//lib/sprockets/path_dependency_utils.rb#32
+module Sprockets::PathDependencyUtils
+ include ::Sprockets::PathUtils
+ include ::Sprockets::URIUtils
+
+ # Internal: List directory entries and return a set of dependencies that
+ # would invalid the cached return result.
+ #
+ # See PathUtils#entries
+ #
+ # path - String directory path
+ #
+ # Returns an Array of entry names and a Set of dependency URIs.
+ #
+ # source://sprockets//lib/sprockets/path_dependency_utils.rb#44
+ def entries_with_dependencies(path); end
+
+ # Internal: List directory filenames and associated Stats under a
+ # directory.
+ #
+ # See PathUtils#stat_directory
+ #
+ # dir - A String directory
+ #
+ # Returns an Array of filenames and a Set of dependency URIs.
+ #
+ # source://sprockets//lib/sprockets/path_dependency_utils.rb#56
+ def stat_directory_with_dependencies(dir); end
+
+ # Internal: List directory filenames and associated Stats under an entire
+ # directory tree.
+ #
+ # See PathUtils#stat_sorted_tree
+ #
+ # dir - A String directory
+ #
+ # Returns an Array of filenames and a Set of dependency URIs.
+ #
+ # source://sprockets//lib/sprockets/path_dependency_utils.rb#68
+ def stat_sorted_tree_with_dependencies(dir); end
+end
+
+# Internal: Crossover of path and digest utilities functions.
+#
+# source://sprockets//lib/sprockets/path_digest_utils.rb#7
+module Sprockets::PathDigestUtils
+ include ::Sprockets::PathUtils
+ include ::Sprockets::DigestUtils
+
+ # Internal: Compute digest for path.
+ #
+ # path - String filename or directory path.
+ #
+ # Returns String digest bytes or nil.
+ #
+ # source://sprockets//lib/sprockets/path_digest_utils.rb#33
+ def file_digest(path); end
+
+ # Internal: Compute digest for a set of paths.
+ #
+ # paths - Array of filename or directory paths.
+ #
+ # Returns String digest bytes.
+ #
+ # source://sprockets//lib/sprockets/path_digest_utils.rb#44
+ def files_digest(paths); end
+
+ # Internal: Compute digest for file stat.
+ #
+ # path - String filename
+ # stat - File::Stat
+ #
+ # Returns String digest bytes.
+ #
+ # source://sprockets//lib/sprockets/path_digest_utils.rb#16
+ def stat_digest(path, stat); end
+end
+
+# Internal: File and path related utilities. Mixed into Environment.
+#
+# Probably would be called FileUtils, but that causes namespace annoyances
+# when code actually wants to reference ::FileUtils.
+#
+# source://sprockets//lib/sprockets/path_utils.rb#7
+module Sprockets::PathUtils
+ extend ::Sprockets::PathUtils
+
+ # On Windows, ALT_SEPARATOR is \
+ # Delegate to Pathname since the logic gets complex.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#83
+ def absolute_path?(path); end
+
+ # Public: Write to a file atomically. Useful for situations where you
+ # don't want other processes or threads to see half-written files.
+ #
+ # Utils.atomic_write('important.file') do |file|
+ # file.write('hello')
+ # end
+ #
+ # Returns nothing.
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#348
+ def atomic_write(filename); end
+
+ # Public: Like `File.directory?`.
+ #
+ # path - String file path.
+ #
+ # Returns true path exists and is a directory.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#42
+ def directory?(path); end
+
+ # Public: A version of `Dir.entries` that filters out `.` files and `~`
+ # swap files.
+ #
+ # path - String directory path
+ #
+ # Returns an empty `Array` if the directory does not exist.
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#56
+ def entries(path); end
+
+ # Public: Like `File.file?`.
+ #
+ # path - String file path.
+ #
+ # Returns true path exists and is a file.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#29
+ def file?(path); end
+
+ # Internal: Match paths in a directory against available extensions.
+ #
+ # path - String directory
+ # basename - String basename of target file
+ # extensions - Hash of String extnames to values
+ #
+ # Examples
+ #
+ # exts = { ".js" => "application/javascript" }
+ # find_matching_path_for_extensions("app/assets", "application", exts)
+ # # => ["app/assets/application.js", "application/javascript"]
+ #
+ # Returns an Array of [String path, Object value] matches.
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#231
+ def find_matching_path_for_extensions(path, basename, extensions); end
+
+ # Internal: Find target basename checking upwards from path.
+ #
+ # basename - String filename: ".sprocketsrc"
+ # path - String path to start search: "app/assets/javascripts/app.js"
+ # root - String path to stop at (default: system root)
+ #
+ # Returns String filename or nil.
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#273
+ def find_upwards(basename, path, root = T.unsafe(nil)); end
+
+ # Public: Joins path to base path.
+ #
+ # base - Root path
+ # path - Extending path
+ #
+ # Example
+ #
+ # join('base/path/', '../file.js')
+ # # => 'base/file.js'
+ #
+ # Returns string path starting from base and ending at path
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#127
+ def join(base, path); end
+
+ # Internal: Match path extnames against available extensions.
+ #
+ # path - String
+ # extensions - Hash of String extnames to values
+ #
+ # Returns [String extname, Object value] or nil nothing matched.
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#202
+ def match_path_extname(path, extensions); end
+
+ # Internal: Get path's extensions.
+ #
+ # path - String
+ #
+ # Returns an Array of String extnames.
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#192
+ def path_extnames(path); end
+
+ # Internal: Returns all parents for path
+ #
+ # path - String absolute filename or directory
+ # root - String path to stop at (default: system root)
+ #
+ # Returns an Array of String paths.
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#252
+ def path_parents(path, root = T.unsafe(nil)); end
+
+ # Internal: Detect root path and base for file in a set of paths.
+ #
+ # paths - Array of String paths
+ # filename - String path of file expected to be in one of the paths.
+ #
+ # Returns [String root, String path]
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#178
+ def paths_split(paths, filename); end
+
+ # Public: Check if path is explicitly relative.
+ # Starts with "./" or "../".
+ #
+ # path - String path.
+ #
+ # Returns true if path is relative, otherwise false.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#100
+ def relative_path?(path); end
+
+ # Public: Get relative path from `start` to `dest`.
+ #
+ # start - String start path (file or dir)
+ # dest - String destination path
+ #
+ # Returns relative String path from `start` to `dest`
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#110
+ def relative_path_from(start, dest); end
+
+ # Public: Sets pipeline for path
+ #
+ # path - String path
+ # extensions - List of file extensions
+ # pipeline - Pipeline
+ #
+ # Examples
+ #
+ # set_pipeline('path/file.js.erb', config[:mime_exts], config[:pipeline_exts], :source)
+ # # => 'path/file.source.js.erb'
+ #
+ # set_pipeline('path/some.file.source.js.erb', config[:mime_exts], config[:pipeline_exts], :debug)
+ # # => 'path/some.file.debug.js.erb'
+ #
+ # Returns string path with pipeline parsed in
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#146
+ def set_pipeline(path, mime_exts, pipeline_exts, pipeline); end
+
+ # Internal: Get relative path for root path and subpath.
+ #
+ # path - String path
+ # subpath - String subpath of path
+ #
+ # Returns relative String path if subpath is a subpath of path, or nil if
+ # subpath is outside of path.
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#162
+ def split_subpath(path, subpath); end
+
+ # Public: Like `File.stat`.
+ #
+ # path - String file or directory path
+ #
+ # Returns nil if the file does not exist.
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#16
+ def stat(path); end
+
+ # Public: Stat all the files under a directory.
+ #
+ # dir - A String directory
+ #
+ # Returns an Enumerator of [path, stat].
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#286
+ def stat_directory(dir); end
+
+ # Public: Recursive stat all the files under a directory in alphabetical
+ # order.
+ #
+ # dir - A String directory
+ #
+ # Returns an Enumerator of [path, stat].
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#324
+ def stat_sorted_tree(dir, &block); end
+
+ # Public: Recursive stat all the files under a directory.
+ #
+ # dir - A String directory
+ #
+ # Returns an Enumerator of [path, stat].
+ #
+ # source://sprockets//lib/sprockets/path_utils.rb#304
+ def stat_tree(dir, &block); end
+end
+
+# source://sprockets//lib/sprockets/path_utils.rb#91
+Sprockets::PathUtils::SEPARATOR_PATTERN = T.let(T.unsafe(nil), String)
+
+# source://sprockets//lib/sprockets/paths.rb#6
+module Sprockets::Paths
+ include ::Sprockets::Utils
+ include ::Sprockets::PathUtils
+
+ # Append a `path` to the `paths` list.
+ #
+ # Paths at the beginning of the `Array` have a higher priority.
+ #
+ # source://sprockets//lib/sprockets/paths.rb#47
+ def append_path(path); end
+
+ # Clear all paths and start fresh.
+ #
+ # There is no mechanism for reordering paths, so its best to
+ # completely wipe the paths list and reappend them in the order
+ # you want.
+ #
+ # source://sprockets//lib/sprockets/paths.rb#59
+ def clear_paths; end
+
+ # Public: Iterate over every file under all load paths.
+ #
+ # Returns Enumerator if no block is given.
+ #
+ # source://sprockets//lib/sprockets/paths.rb#68
+ def each_file; end
+
+ # Returns an `Array` of path `String`s.
+ #
+ # These paths will be used for asset logical path lookups.
+ #
+ # source://sprockets//lib/sprockets/paths.rb#30
+ def paths; end
+
+ # Prepend a `path` to the `paths` list.
+ #
+ # Paths at the end of the `Array` have the least priority.
+ #
+ # source://sprockets//lib/sprockets/paths.rb#37
+ def prepend_path(path); end
+
+ # Returns `Environment` root.
+ #
+ # All relative paths are expanded with root as its base. To be
+ # useful set this to your applications root directory. (`Rails.root`)
+ #
+ # source://sprockets//lib/sprockets/paths.rb#13
+ def root; end
+
+ private
+
+ # Internal: Change Environment root.
+ #
+ # Only the initializer should change the root.
+ #
+ # source://sprockets//lib/sprockets/paths.rb#20
+ def root=(path); end
+end
+
+# source://sprockets//lib/sprockets/preprocessors/default_source_map.rb#3
+module Sprockets::Preprocessors; end
+
+# Private: Adds a default map to assets when one is not present
+#
+# If the input file already has a source map, it effectively returns the original
+# result. Otherwise it maps 1 for 1 lines original to generated. This is needed
+# Because other generators run after might depend on having a valid source map
+# available.
+#
+# source://sprockets//lib/sprockets/preprocessors/default_source_map.rb#10
+class Sprockets::Preprocessors::DefaultSourceMap
+ # source://sprockets//lib/sprockets/preprocessors/default_source_map.rb#11
+ def call(input); end
+
+ private
+
+ # source://sprockets//lib/sprockets/preprocessors/default_source_map.rb#38
+ def default_mappings(lines); end
+end
+
+# `Processing` is an internal mixin whose public methods are exposed on
+# the `Environment` and `CachedEnvironment` classes.
+#
+# source://sprockets//lib/sprockets/processing.rb#11
+module Sprockets::Processing
+ include ::Sprockets::Utils
+ include ::Sprockets::URIUtils
+ include ::Sprockets::ProcessorUtils
+
+ # Bundle Processors are ran on concatenated assets rather than
+ # individual files.
+ #
+ # source://sprockets//lib/sprockets/processing.rb#95
+ def bundle_processors; end
+
+ # source://sprockets//lib/sprockets/processing.rb#14
+ def pipelines; end
+
+ # Postprocessors are ran after Preprocessors and Engine processors.
+ #
+ # source://sprockets//lib/sprockets/processing.rb#39
+ def postprocessors; end
+
+ # Preprocessors are ran before Postprocessors and Engine
+ # processors.
+ #
+ # source://sprockets//lib/sprockets/processing.rb#33
+ def preprocessors; end
+
+ # Preprocessors are ran before Postprocessors and Engine
+ # processors.
+ #
+ # source://sprockets//lib/sprockets/processing.rb#33
+ def processors; end
+
+ # Public: Register bundle metadata reducer function.
+ #
+ # Examples
+ #
+ # Sprockets.register_bundle_metadata_reducer 'application/javascript', :jshint_errors, [], :+
+ #
+ # Sprockets.register_bundle_metadata_reducer 'text/css', :selector_count, 0 { |total, count|
+ # total + count
+ # }
+ #
+ # mime_type - String MIME Type. Use '*/*' applies to all types.
+ # key - Symbol metadata key
+ # initial - Initial memo to pass to the reduce function (default: nil)
+ # block - Proc accepting the memo accumulator and current value
+ #
+ # Returns nothing.
+ #
+ # source://sprockets//lib/sprockets/processing.rb#137
+ def register_bundle_metadata_reducer(mime_type, key, *args, &block); end
+
+ # Registers a new Bundle Processor `klass` for `mime_type`.
+ #
+ # register_bundle_processor 'application/javascript', Sprockets::DirectiveProcessor
+ #
+ # A block can be passed for to create a shorthand processor.
+ #
+ # register_bundle_processor 'application/javascript' do |input|
+ # input[:data].gsub(...)
+ # end
+ #
+ # source://sprockets//lib/sprockets/processing.rb#109
+ def register_bundle_processor(*args, &block); end
+
+ # Registers a pipeline that will be called by `call_processor` method.
+ #
+ # source://sprockets//lib/sprockets/processing.rb#19
+ def register_pipeline(name, proc = T.unsafe(nil), &block); end
+
+ # Registers a new Postprocessor `klass` for `mime_type`.
+ #
+ # register_postprocessor 'application/javascript', Sprockets::DirectiveProcessor
+ #
+ # A block can be passed for to create a shorthand processor.
+ #
+ # register_postprocessor 'application/javascript' do |input|
+ # input[:data].gsub(...)
+ # end
+ #
+ # source://sprockets//lib/sprockets/processing.rb#69
+ def register_postprocessor(*args, &block); end
+
+ # Registers a new Preprocessor `klass` for `mime_type`.
+ #
+ # register_preprocessor 'text/css', Sprockets::DirectiveProcessor
+ #
+ # A block can be passed for to create a shorthand processor.
+ #
+ # register_preprocessor 'text/css' do |input|
+ # input[:data].gsub(...)
+ # end
+ #
+ # source://sprockets//lib/sprockets/processing.rb#53
+ def register_preprocessor(*args, &block); end
+
+ # Registers a new Preprocessor `klass` for `mime_type`.
+ #
+ # register_preprocessor 'text/css', Sprockets::DirectiveProcessor
+ #
+ # A block can be passed for to create a shorthand processor.
+ #
+ # register_preprocessor 'text/css' do |input|
+ # input[:data].gsub(...)
+ # end
+ #
+ # source://sprockets//lib/sprockets/processing.rb#53
+ def register_processor(*args, &block); end
+
+ # Remove Bundle Processor `klass` for `mime_type`.
+ #
+ # unregister_bundle_processor 'application/javascript', Sprockets::DirectiveProcessor
+ #
+ # source://sprockets//lib/sprockets/processing.rb#117
+ def unregister_bundle_processor(*args); end
+
+ # Remove Postprocessor `klass` for `mime_type`.
+ #
+ # unregister_postprocessor 'text/css', Sprockets::DirectiveProcessor
+ #
+ # source://sprockets//lib/sprockets/processing.rb#88
+ def unregister_postprocessor(*args); end
+
+ # Remove Preprocessor `klass` for `mime_type`.
+ #
+ # unregister_preprocessor 'text/css', Sprockets::DirectiveProcessor
+ #
+ # source://sprockets//lib/sprockets/processing.rb#78
+ def unregister_preprocessor(*args); end
+
+ # Remove Preprocessor `klass` for `mime_type`.
+ #
+ # unregister_preprocessor 'text/css', Sprockets::DirectiveProcessor
+ #
+ # source://sprockets//lib/sprockets/processing.rb#78
+ def unregister_processor(*args); end
+
+ protected
+
+ # source://sprockets//lib/sprockets/processing.rb#168
+ def build_processors_uri(type, file_type, pipeline); end
+
+ # source://sprockets//lib/sprockets/processing.rb#186
+ def default_processors_for(type, file_type); end
+
+ # source://sprockets//lib/sprockets/processing.rb#177
+ def processors_for(type, file_type, pipeline); end
+
+ # source://sprockets//lib/sprockets/processing.rb#162
+ def resolve_processors_cache_key_uri(uri); end
+
+ # source://sprockets//lib/sprockets/processing.rb#195
+ def self_processors_for(type, file_type); end
+
+ private
+
+ # source://sprockets//lib/sprockets/processing.rb#212
+ def register_config_processor(type, mime_type, processor = T.unsafe(nil), &block); end
+
+ # source://sprockets//lib/sprockets/processing.rb#221
+ def unregister_config_processor(type, mime_type, processor); end
+end
+
+# Functional utilities for dealing with Processor functions.
+#
+# A Processor is a general function that may modify or transform an asset as
+# part of the pipeline. CoffeeScript to JavaScript conversion, Minification
+# or Concatenation are all implemented as separate Processor steps.
+#
+# Processors maybe any object that responds to call. So procs or a class that
+# defines a self.call method.
+#
+# For ergonomics, processors may return a number of shorthand values.
+# Unfortunately, this means that processors can not compose via ordinary
+# function composition. The composition helpers here can help.
+#
+# source://sprockets//lib/sprockets/processor_utils.rb#17
+module Sprockets::ProcessorUtils
+ extend ::Sprockets::ProcessorUtils
+
+ # Public: Invoke processor.
+ #
+ # processor - Processor callables
+ # input - Hash of input data to pass to processor
+ #
+ # Returns a Hash with :data and other processor metadata key/values.
+ #
+ # source://sprockets//lib/sprockets/processor_utils.rb#80
+ def call_processor(processor, input); end
+
+ # Public: Invoke list of processors in right to left order.
+ #
+ # The right to left order processing mirrors standard function composition.
+ # Think about:
+ #
+ # bundle.call(uglify.call(coffee.call(input)))
+ #
+ # processors - Array of processor callables
+ # input - Hash of input data to pass to each processor
+ #
+ # Returns a Hash with :data and other processor metadata key/values.
+ #
+ # source://sprockets//lib/sprockets/processor_utils.rb#61
+ def call_processors(processors, input); end
+
+ # Public: Compose processors in right to left order.
+ #
+ # processors - Array of processors callables
+ #
+ # Returns a composed Proc.
+ #
+ # source://sprockets//lib/sprockets/processor_utils.rb#46
+ def compose_processors(*processors); end
+
+ # Internal: Get processor defined cached key.
+ #
+ # processor - Processor function
+ #
+ # Returns JSON serializable key or nil.
+ #
+ # source://sprockets//lib/sprockets/processor_utils.rb#101
+ def processor_cache_key(processor); end
+
+ # Internal: Get combined cache keys for set of processors.
+ #
+ # processors - Array of processor functions
+ #
+ # Returns Array of JSON serializable keys.
+ #
+ # source://sprockets//lib/sprockets/processor_utils.rb#110
+ def processors_cache_keys(processors); end
+
+ # Internal: Validate returned result of calling a processor pipeline and
+ # raise a friendly user error message.
+ #
+ # result - Metadata Hash returned from call_processors
+ #
+ # Returns result or raises a TypeError.
+ #
+ # source://sprockets//lib/sprockets/processor_utils.rb#152
+ def validate_processor_result!(result); end
+end
+
+# source://sprockets//lib/sprockets/processor_utils.rb#20
+class Sprockets::ProcessorUtils::CompositeProcessor < ::Struct
+ # source://sprockets//lib/sprockets/processor_utils.rb#36
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/processor_utils.rb#32
+ def call(input); end
+
+ class << self
+ # source://sprockets//lib/sprockets/processor_utils.rb#24
+ def create(processors); end
+ end
+end
+
+# source://sprockets//lib/sprockets/processor_utils.rb#22
+Sprockets::ProcessorUtils::CompositeProcessor::PLURAL = T.let(T.unsafe(nil), Proc)
+
+# source://sprockets//lib/sprockets/processor_utils.rb#21
+Sprockets::ProcessorUtils::CompositeProcessor::SINGULAR = T.let(T.unsafe(nil), Proc)
+
+# Internal: Set of all nested compound metadata types that can nest values.
+#
+# source://sprockets//lib/sprockets/processor_utils.rb#126
+Sprockets::ProcessorUtils::VALID_METADATA_COMPOUND_TYPES = T.let(T.unsafe(nil), Set)
+
+# Internal: Hash of all nested compound metadata types that can nest values.
+#
+# source://sprockets//lib/sprockets/processor_utils.rb#139
+Sprockets::ProcessorUtils::VALID_METADATA_COMPOUND_TYPES_HASH = T.let(T.unsafe(nil), Hash)
+
+# Internal: Set of all allowed metadata types.
+#
+# source://sprockets//lib/sprockets/processor_utils.rb#144
+Sprockets::ProcessorUtils::VALID_METADATA_TYPES = T.let(T.unsafe(nil), Set)
+
+# Internal: Set of all "simple" value types allowed to be returned in
+# processor metadata.
+#
+# source://sprockets//lib/sprockets/processor_utils.rb#116
+Sprockets::ProcessorUtils::VALID_METADATA_VALUE_TYPES = T.let(T.unsafe(nil), Set)
+
+# Internal: Hash of all "simple" value types allowed to be returned in
+# processor metadata.
+#
+# source://sprockets//lib/sprockets/processor_utils.rb#134
+Sprockets::ProcessorUtils::VALID_METADATA_VALUE_TYPES_HASH = T.let(T.unsafe(nil), Hash)
+
+# source://sprockets//lib/sprockets/resolve.rb#8
+module Sprockets::Resolve
+ include ::Sprockets::PathUtils
+ include ::Sprockets::URIUtils
+ include ::Sprockets::PathDependencyUtils
+ include ::Sprockets::HTTPUtils
+
+ # Public: Find Asset URI for given a logical path by searching the
+ # environment's load paths.
+ #
+ # resolve("application.js")
+ # # => "file:///path/to/app/javascripts/application.js?type=application/javascript"
+ #
+ # An accept content type can be given if the logical path doesn't have a
+ # format extension.
+ #
+ # resolve("application", accept: "application/javascript")
+ # # => "file:///path/to/app/javascripts/application.coffee?type=application/javascript"
+ #
+ # The String Asset URI is returned or nil if no results are found.
+ #
+ # source://sprockets//lib/sprockets/resolve.rb#24
+ def resolve(path, load_paths: T.unsafe(nil), accept: T.unsafe(nil), pipeline: T.unsafe(nil), base_path: T.unsafe(nil)); end
+
+ # Public: Same as resolve() but raises a FileNotFound exception instead of
+ # nil if no assets are found.
+ #
+ # source://sprockets//lib/sprockets/resolve.rb#46
+ def resolve!(path, **kargs); end
+
+ protected
+
+ # Internal: Converts mimetype into accept Array
+ #
+ # - mime_type - String, optional. e.g. "text/html"
+ # - explicit_type - String, optional. e.g. "application/javascript"
+ #
+ # When called with an explicit_type and a mime_type, only a mime_type
+ # that matches the given explicit_type will be accepted.
+ #
+ # Returns Array of Array
+ #
+ # [["application/javascript", 1.0]]
+ # [["*/*", 1.0]]
+ # []
+ #
+ # source://sprockets//lib/sprockets/resolve.rb#279
+ def parse_accept_options(mime_type, explicit_type); end
+
+ # Internal: Finds a file in a set of given paths
+ #
+ # paths - Array of Strings.
+ # filename - String containing absolute path to a file including extension.
+ # e.g. "/Users/schneems/sprockets/test/fixtures/asset/application.js"
+ # accept - String. A Quality value incoded set of
+ # mime types that we are looking for. Can be nil.
+ # e.g. "application/javascript" or "text/css, */*"
+ #
+ # Returns Array. Filename, type, path_pipeline, deps, index_alias
+ #
+ # source://sprockets//lib/sprockets/resolve.rb#92
+ def resolve_absolute_path(paths, filename, accept); end
+
+ # source://sprockets//lib/sprockets/resolve.rb#291
+ def resolve_alternates(load_path, logical_name); end
+
+ # source://sprockets//lib/sprockets/resolve.rb#257
+ def resolve_alts_under_path(load_path, logical_name, mime_exts); end
+
+ # Internal: Finds an asset given a URI
+ #
+ # uri - String. Contains file:// scheme, absolute path to
+ # file.
+ # e.g. "file:///Users/schneems/sprockets/test/fixtures/default/gallery.js?type=application/javascript"
+ #
+ # Returns Array. Contains a String uri and Set of dependencies
+ #
+ # source://sprockets//lib/sprockets/resolve.rb#77
+ def resolve_asset_uri(uri); end
+
+ # Internal: Finds candidate index files in a given path
+ #
+ # load_path - String. An absolute path to a directory
+ # logical_name - String. A filename without extension
+ # e.g. "application" or "coffee/foo"
+ # mime_exts - Hash of file extensions and their mime types
+ # e.g. {".xml.builder"=>"application/xml+builder"}
+ #
+ # Looking in the given `load_path` this method will find all files under the `logical_name` directory
+ # that are named `index` and have a matching mime type in `mime_exts`.
+ #
+ # Returns Array. First element is an Array of hashes or empty, second is a String
+ #
+ # source://sprockets//lib/sprockets/resolve.rb#239
+ def resolve_index_under_path(load_path, logical_name, mime_exts); end
+
+ # Internal: Finds a file in a set of given paths
+ #
+ # paths - Array of Strings.
+ # logical_path - String. A filename with extension
+ # e.g. "coffee/foo.js" or "foo.js"
+ # accept - String. A Quality value incoded set of
+ # mime types that we are looking for. Can be nil.
+ # e.g. "application/javascript" or "text/css, */*"
+ #
+ # Finds a file on the given paths.
+ #
+ # Returns Array. Filename, type, path_pipeline, deps, index_alias
+ #
+ # source://sprockets//lib/sprockets/resolve.rb#142
+ def resolve_logical_path(paths, logical_path, accept); end
+
+ # Internal: Finds candidate files on a given path
+ #
+ # load_path - String. An absolute path to a directory
+ # logical_name - String. A filename without extension
+ # e.g. "application" or "coffee/foo"
+ # mime_exts - Hash of file extensions and their mime types
+ # e.g. {".xml.builder"=>"application/xml+builder"}
+ #
+ # Finds files that match a given `logical_name` with an acceptable
+ # mime type that is included in `mime_exts` on the `load_path`.
+ #
+ # Returns Array. First element is an Array of hashes or empty, second is a String
+ #
+ # source://sprockets//lib/sprockets/resolve.rb#217
+ def resolve_main_under_path(load_path, logical_name, mime_exts); end
+
+ # Internal: Finds a relative file in a set of given paths
+ #
+ # paths - Array of Strings.
+ # path - String. A relative filename with or without extension
+ # e.g. "./jquery" or "../foo.js"
+ # dirname - String. Base path where we start looking for the given file.
+ # accept - String. A Quality value incoded set of
+ # mime types that we are looking for. Can be nil.
+ # e.g. "application/javascript" or "text/css, */*"
+ #
+ # Returns Array. Filename, type, path_pipeline, deps, index_alias
+ #
+ # source://sprockets//lib/sprockets/resolve.rb#120
+ def resolve_relative_path(paths, path, dirname, accept); end
+
+ # Internal: Finds a file in a set of given paths
+ #
+ # paths - Array of Strings.
+ # logical_name - String. A filename without extension
+ # e.g. "application" or "coffee/foo"
+ # accepts - Array of array containing mime/version pairs
+ # e.g. [["application/javascript", 1.0]]
+ #
+ # Finds a file with the same name as `logical_name` or "index" inside
+ # of the `logical_name` directory that matches a valid mime-type/version from
+ # `accepts`.
+ #
+ # Returns Array. Filename, type, dependencies, and index_alias
+ #
+ # source://sprockets//lib/sprockets/resolve.rb#176
+ def resolve_under_paths(paths, logical_name, accepts); end
+end
+
+# Public: Sass CSS minifier.
+#
+# To accept the default options
+#
+# environment.register_bundle_processor 'text/css',
+# Sprockets::SassCompressor
+#
+# Or to pass options to the Sass::Engine class.
+#
+# environment.register_bundle_processor 'text/css',
+# Sprockets::SassCompressor.new({ ... })
+#
+# source://sprockets//lib/sprockets/sass_compressor.rb#19
+class Sprockets::SassCompressor
+ # @return [SassCompressor] a new instance of SassCompressor
+ #
+ # source://sprockets//lib/sprockets/sass_compressor.rb#39
+ def initialize(options = T.unsafe(nil)); end
+
+ # Returns the value of attribute cache_key.
+ #
+ # source://sprockets//lib/sprockets/sass_compressor.rb#37
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/sass_compressor.rb#49
+ def call(input); end
+
+ class << self
+ # source://sprockets//lib/sprockets/sass_compressor.rb#33
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/sass_compressor.rb#29
+ def call(input); end
+
+ # Public: Return singleton instance with default options.
+ #
+ # Returns SassCompressor object.
+ #
+ # source://sprockets//lib/sprockets/sass_compressor.rb#25
+ def instance; end
+ end
+end
+
+# source://sprockets//lib/sprockets/sass_compressor.rb#20
+Sprockets::SassCompressor::VERSION = T.let(T.unsafe(nil), String)
+
+# Public: Sass CSS minifier.
+#
+# To accept the default options
+#
+# environment.register_bundle_processor 'text/css',
+# Sprockets::SasscCompressor
+#
+# Or to pass options to the Sass::Engine class.
+#
+# environment.register_bundle_processor 'text/css',
+# Sprockets::SasscCompressor.new({ ... })
+#
+# source://sprockets//lib/sprockets/sassc_compressor.rb#18
+class Sprockets::SasscCompressor
+ # @return [SasscCompressor] a new instance of SasscCompressor
+ #
+ # source://sprockets//lib/sprockets/sassc_compressor.rb#30
+ def initialize(options = T.unsafe(nil)); end
+
+ # source://sprockets//lib/sprockets/sassc_compressor.rb#39
+ def call(input); end
+
+ class << self
+ # source://sprockets//lib/sprockets/sassc_compressor.rb#26
+ def call(input); end
+
+ # Public: Return singleton instance with default options.
+ #
+ # Returns SasscCompressor object.
+ #
+ # source://sprockets//lib/sprockets/sassc_compressor.rb#22
+ def instance; end
+ end
+end
+
+# Processor engine class for the SASS/SCSS compiler. Depends on the `sassc` gem.
+#
+# For more information see:
+#
+# https://github.com/sass/sassc-ruby
+# https://github.com/sass/sassc-rails
+#
+# source://sprockets//lib/sprockets/sassc_processor.rb#15
+class Sprockets::SasscProcessor
+ # @return [SasscProcessor] a new instance of SasscProcessor
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#40
+ def initialize(options = T.unsafe(nil), &block); end
+
+ # Returns the value of attribute cache_key.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#38
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/sassc_processor.rb#52
+ def call(input); end
+
+ private
+
+ # source://sprockets//lib/sprockets/sassc_processor.rb#273
+ def engine_options(input, context); end
+
+ # source://sprockets//lib/sprockets/sassc_processor.rb#78
+ def merge_options(options); end
+
+ class << self
+ # source://sprockets//lib/sprockets/sassc_processor.rb#34
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/sassc_processor.rb#30
+ def call(input); end
+
+ # Public: Return singleton instance with default options.
+ #
+ # Returns SasscProcessor object.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#26
+ def instance; end
+
+ # Internal: Defines default sass syntax to use. Exposed so the ScsscProcessor
+ # may override it.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#19
+ def syntax; end
+ end
+end
+
+# Public: Functions injected into Sass context during Sprockets evaluation.
+#
+# This module may be extended to add global functionality to all Sprockets
+# Sass environments. Though, scoping your functions to just your environment
+# is preferred.
+#
+# module Sprockets::SasscProcessor::Functions
+# def asset_path(path, options = {})
+# end
+# end
+#
+# source://sprockets//lib/sprockets/sassc_processor.rb#100
+module Sprockets::SasscProcessor::Functions
+ # Public: Generate a data URI for asset path.
+ #
+ # path - SassC::Script::Value::String logical asset path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#243
+ def asset_data_url(path); end
+
+ # Public: Generate a url for asset path.
+ #
+ # Default implementation is deprecated. Currently defaults to
+ # Context#asset_path.
+ #
+ # Will raise NotImplementedError in the future. Users should provide their
+ # own base implementation.
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#110
+ def asset_path(path, options = T.unsafe(nil)); end
+
+ # Public: Generate a asset url() link.
+ #
+ # path - SassC::Script::Value::String URL path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#126
+ def asset_url(path, options = T.unsafe(nil)); end
+
+ # Public: Generate url for audio path.
+ #
+ # path - SassC::Script::Value::String URL path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#171
+ def audio_path(path); end
+
+ # Public: Generate a audio url() link.
+ #
+ # path - SassC::Script::Value::String URL path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#180
+ def audio_url(path); end
+
+ # Public: Generate url for font path.
+ #
+ # path - SassC::Script::Value::String URL path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#189
+ def font_path(path); end
+
+ # Public: Generate a font url() link.
+ #
+ # path - SassC::Script::Value::String URL path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#198
+ def font_url(path); end
+
+ # Public: Generate url for image path.
+ #
+ # path - SassC::Script::Value::String URL path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#135
+ def image_path(path); end
+
+ # Public: Generate a image url() link.
+ #
+ # path - SassC::Script::Value::String URL path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#144
+ def image_url(path); end
+
+ # Public: Generate url for javascript path.
+ #
+ # path - SassC::Script::Value::String URL path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#207
+ def javascript_path(path); end
+
+ # Public: Generate a javascript url() link.
+ #
+ # path - SassC::Script::Value::String URL path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#216
+ def javascript_url(path); end
+
+ # Public: Generate url for stylesheet path.
+ #
+ # path - SassC::Script::Value::String URL path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#225
+ def stylesheet_path(path); end
+
+ # Public: Generate a stylesheet url() link.
+ #
+ # path - SassC::Script::Value::String URL path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#234
+ def stylesheet_url(path); end
+
+ # Public: Generate url for video path.
+ #
+ # path - SassC::Script::Value::String URL path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#153
+ def video_path(path); end
+
+ # Public: Generate a video url() link.
+ #
+ # path - SassC::Script::Value::String URL path
+ #
+ # Returns a SassC::Script::Value::String.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#162
+ def video_url(path); end
+
+ protected
+
+ # Deprecated: Get the Context instance. Use APIs on
+ # sprockets_environment or sprockets_dependencies directly.
+ #
+ # Returns a Context instance.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#267
+ def sprockets_context; end
+
+ # Public: Mutatable set of dependencies.
+ #
+ # Returns a Set.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#259
+ def sprockets_dependencies; end
+
+ # Public: The Environment.
+ #
+ # Returns Sprockets::Environment.
+ #
+ # source://sprockets//lib/sprockets/sassc_processor.rb#252
+ def sprockets_environment; end
+end
+
+# source://sprockets//lib/sprockets/sassc_processor.rb#292
+class Sprockets::ScsscProcessor < ::Sprockets::SasscProcessor
+ class << self
+ # source://sprockets//lib/sprockets/sassc_processor.rb#293
+ def syntax; end
+ end
+end
+
+# `Server` is a concern mixed into `Environment` and
+# `CachedEnvironment` that provides a Rack compatible `call`
+# interface and url generation helpers.
+#
+# source://sprockets//lib/sprockets/server.rb#10
+module Sprockets::Server
+ # `call` implements the Rack 1.x specification which accepts an
+ # `env` Hash and returns a three item tuple with the status code,
+ # headers, and body.
+ #
+ # Mapping your environment at a url prefix will serve all assets
+ # in the path.
+ #
+ # map "/assets" do
+ # run Sprockets::Environment.new
+ # end
+ #
+ # A request for `"/assets/foo/bar.js"` will search your
+ # environment for `"foo/bar.js"`.
+ #
+ # source://sprockets//lib/sprockets/server.rb#37
+ def call(env); end
+
+ private
+
+ # Returns a 400 Forbidden response tuple
+ #
+ # source://sprockets//lib/sprockets/server.rb#159
+ def bad_request_response(env); end
+
+ # source://sprockets//lib/sprockets/server.rb#267
+ def cache_headers(env, etag); end
+
+ # Returns a CSS response that hides all elements on the page and
+ # displays the exception
+ #
+ # source://sprockets//lib/sprockets/server.rb#207
+ def css_exception_response(exception); end
+
+ # Escape special characters for use inside a CSS content("...") string
+ #
+ # source://sprockets//lib/sprockets/server.rb#259
+ def escape_css_content(content); end
+
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/server.rb#132
+ def forbidden_request?(path); end
+
+ # Returns a 403 Forbidden response tuple
+ #
+ # source://sprockets//lib/sprockets/server.rb#168
+ def forbidden_response(env); end
+
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/server.rb#140
+ def head_request?(env); end
+
+ # source://sprockets//lib/sprockets/server.rb#288
+ def headers(env, asset, length); end
+
+ # Returns a JavaScript response that re-throws a Ruby exception
+ # in the browser
+ #
+ # source://sprockets//lib/sprockets/server.rb#199
+ def javascript_exception_response(exception); end
+
+ # source://sprockets//lib/sprockets/server.rb#185
+ def method_not_allowed_response; end
+
+ # Returns a 404 Not Found response tuple
+ #
+ # source://sprockets//lib/sprockets/server.rb#177
+ def not_found_response(env); end
+
+ # Returns a 304 Not Modified response tuple
+ #
+ # source://sprockets//lib/sprockets/server.rb#154
+ def not_modified_response(env, etag); end
+
+ # Returns a 200 OK response tuple
+ #
+ # source://sprockets//lib/sprockets/server.rb#145
+ def ok_response(asset, env); end
+
+ # Gets ETag fingerprint.
+ #
+ # "foo-0aa2105d29558f3eb790d411d7d8fb66.js"
+ # # => "0aa2105d29558f3eb790d411d7d8fb66"
+ #
+ # source://sprockets//lib/sprockets/server.rb#311
+ def path_fingerprint(path); end
+
+ # source://sprockets//lib/sprockets/server.rb#189
+ def precondition_failed_response(env); end
+end
+
+# Supported HTTP request methods.
+#
+# source://sprockets//lib/sprockets/server.rb#12
+Sprockets::Server::ALLOWED_REQUEST_METHODS = T.let(T.unsafe(nil), Set)
+
+# source://sprockets//lib/sprockets/server.rb#17
+Sprockets::Server::VARY = T.let(T.unsafe(nil), String)
+
+# source://sprockets//lib/sprockets/server.rb#16
+Sprockets::Server::X_CASCADE = T.let(T.unsafe(nil), String)
+
+# The purpose of this class is to generate a source map file
+# that can be read and understood by browsers.
+#
+# When a file is passed in it will have a `application/js-sourcemap+json`
+# or `application/css-sourcemap+json` mime type. The filename will be
+# match the original asset. The original asset is loaded. As it
+# gets processed by Sprockets it will acquire all information
+# needed to build a source map file in the `asset.to_hash[:metadata][:map]`
+# key.
+#
+# The output is an asset with a properly formatted source map file:
+#
+# {
+# "version": 3,
+# "sources": ["foo.js"],
+# "names": [ ],
+# "mappings": "AAAA,GAAIA"
+# }
+#
+# source://sprockets//lib/sprockets/source_map_processor.rb#25
+class Sprockets::SourceMapProcessor
+ class << self
+ # source://sprockets//lib/sprockets/source_map_processor.rb#26
+ def call(input); end
+
+ # source://sprockets//lib/sprockets/source_map_processor.rb#54
+ def original_content_type(source_map_content_type, error_when_not_found: T.unsafe(nil)); end
+ end
+end
+
+# source://sprockets//lib/sprockets/source_map_utils.rb#6
+module Sprockets::SourceMapUtils
+ extend ::Sprockets::SourceMapUtils
+
+ # Public: Search Array of mappings for closest offset.
+ #
+ # mappings - Array of mapping Hash objects
+ # offset - Array [line, column]
+ #
+ # Returns mapping Hash object.
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#273
+ def bsearch_mappings(mappings, offset, from = T.unsafe(nil), to = T.unsafe(nil)); end
+
+ # Public: Combine two separate source map transformations into a single
+ # mapping.
+ #
+ # Source transformations may happen in discrete steps producing separate
+ # source maps. These steps can be combined into a single mapping back to
+ # the source.
+ #
+ # For an example, CoffeeScript may transform a file producing a map. Then
+ # Uglifier processes the result and produces another map. The CoffeeScript
+ # map can be combined with the Uglifier map so the source lines of the
+ # minified output can be traced back to the original CoffeeScript file.
+ #
+ # Returns a source map hash.
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#156
+ def combine_source_maps(first, second); end
+
+ # Public: Compare two source map offsets.
+ #
+ # Compatible with Array#sort.
+ #
+ # a - Array [line, column]
+ # b - Array [line, column]
+ #
+ # Returns -1 if a < b, 0 if a == b and 1 if a > b.
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#254
+ def compare_source_offsets(a, b); end
+
+ # Public: Concatenate two source maps.
+ #
+ # For an example, if two js scripts are concatenated, the individual source
+ # maps for those files can be concatenated to map back to the originals.
+ #
+ # Examples
+ #
+ # script3 = "#{script1}#{script2}"
+ # map3 = concat_source_maps(map1, map2)
+ #
+ # a - Source map hash
+ # b - Source map hash
+ #
+ # Returns a new source map hash.
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#73
+ def concat_source_maps(a, b); end
+
+ # Public: Decompress source map
+ #
+ # Example:
+ #
+ # decode_source_map(map)
+ # # => {
+ # version: 3,
+ # file: "..",
+ # mappings: [
+ # { source: "..", generated: [0, 0], original: [0, 0], name: ".."}, ..
+ # ],
+ # sources: [..],
+ # names: [..]
+ # }
+ #
+ # map - Source map hash (v3 spec)
+ #
+ # Returns an uncompressed source map hash
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#192
+ def decode_source_map(map); end
+
+ # Public: Decode VLQ mappings and match up sources and symbol names.
+ #
+ # str - VLQ string from 'mappings' attribute
+ # sources - Array of Strings from 'sources' attribute
+ # names - Array of Strings from 'names' attribute
+ #
+ # Returns an Array of Mappings.
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#297
+ def decode_vlq_mappings(str, sources: T.unsafe(nil), names: T.unsafe(nil)); end
+
+ # Public: Compress source map
+ #
+ # Example:
+ #
+ # encode_source_map(map)
+ # # => {
+ # "version" => 3,
+ # "file" => "..",
+ # "mappings" => "AAAA;AACA;..;AACA",
+ # "sources" => [..],
+ # "names" => [..]
+ # }
+ #
+ # map - Source map hash (uncompressed)
+ #
+ # Returns a compressed source map hash according to source map spec v3
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#235
+ def encode_source_map(map); end
+
+ # Public: Encode mappings Hash into a VLQ encoded String.
+ #
+ # mappings - Array of Hash mapping objects
+ # sources - Array of String sources (default: mappings source order)
+ # names - Array of String names (default: mappings name order)
+ #
+ # Returns a VLQ encoded String.
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#346
+ def encode_vlq_mappings(mappings, sources: T.unsafe(nil), names: T.unsafe(nil)); end
+
+ # Public: Transpose source maps into a standard format
+ #
+ # NOTE: Does not support index maps
+ #
+ # version => 3
+ # file => logical path
+ # sources => relative from filename
+ #
+ # Unnecessary attributes are removed
+ #
+ # Example
+ #
+ # map
+ # #=> {
+ # # "version" => 3,
+ # # "file" => "stdin",
+ # # "sourceRoot" => "",
+ # # "sourceContents" => "blah blah blah",
+ # # "sources" => [/root/logical/path.js],
+ # # "names" => [..],
+ # #}
+ # format_source_map(map, input)
+ # #=> {
+ # # "version" => 3,
+ # # "file" => "logical/path.js",
+ # # "sources" => ["path.js"],
+ # # "names" => [..],
+ # #}
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#37
+ def format_source_map(map, input); end
+
+ # Public: Converts source map to index map
+ #
+ # Example:
+ #
+ # map
+ # # => {
+ # "version" => 3,
+ # "file" => "..",
+ # "mappings" => "AAAA;AACA;..;AACA",
+ # "sources" => [..],
+ # "names" => [..]
+ # }
+ # make_index_map(map)
+ # # => {
+ # "version" => 3,
+ # "file" => "..",
+ # "sections" => [
+ # {
+ # "offset" => { "line" => 0, "column" => 0 },
+ # "map" => {
+ # "version" => 3,
+ # "file" => "..",
+ # "mappings" => "AAAA;AACA;..;AACA",
+ # "sources" => [..],
+ # "names" => [..]
+ # }
+ # }
+ # ]
+ # }
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#129
+ def make_index_map(map); end
+
+ # Public: Decode a VLQ string.
+ #
+ # str - VLQ encoded String
+ #
+ # Returns an Array of Integers.
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#429
+ def vlq_decode(str); end
+
+ # Public: Decode a VLQ string into mapping numbers.
+ #
+ # str - VLQ encoded String
+ #
+ # Returns an two dimensional Array of Integers.
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#470
+ def vlq_decode_mappings(str); end
+
+ # Public: Encode a list of numbers into a compact VLQ string.
+ #
+ # ary - An Array of Integers
+ #
+ # Returns a VLQ String.
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#408
+ def vlq_encode(ary); end
+
+ # Public: Encode a mapping array into a compact VLQ string.
+ #
+ # ary - Two dimensional Array of Integers.
+ #
+ # Returns a VLQ encoded String separated by , and ;.
+ #
+ # source://sprockets//lib/sprockets/source_map_utils.rb#457
+ def vlq_encode_mappings(ary); end
+end
+
+# source://sprockets//lib/sprockets/source_map_utils.rb#400
+Sprockets::SourceMapUtils::BASE64_DIGITS = T.let(T.unsafe(nil), Array)
+
+# source://sprockets//lib/sprockets/source_map_utils.rb#401
+Sprockets::SourceMapUtils::BASE64_VALUES = T.let(T.unsafe(nil), Hash)
+
+# source://sprockets//lib/sprockets/source_map_utils.rb#396
+Sprockets::SourceMapUtils::VLQ_BASE = T.let(T.unsafe(nil), Integer)
+
+# source://sprockets//lib/sprockets/source_map_utils.rb#397
+Sprockets::SourceMapUtils::VLQ_BASE_MASK = T.let(T.unsafe(nil), Integer)
+
+# Public: Base64 VLQ encoding
+#
+# Adopted from ConradIrwin/ruby-source_map
+# https://github.com/ConradIrwin/ruby-source_map/blob/master/lib/source_map/vlq.rb
+#
+# Resources
+#
+# http://en.wikipedia.org/wiki/Variable-length_quantity
+# https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
+# https://github.com/mozilla/source-map/blob/master/lib/source-map/base64-vlq.js
+#
+# source://sprockets//lib/sprockets/source_map_utils.rb#395
+Sprockets::SourceMapUtils::VLQ_BASE_SHIFT = T.let(T.unsafe(nil), Integer)
+
+# source://sprockets//lib/sprockets/source_map_utils.rb#398
+Sprockets::SourceMapUtils::VLQ_CONTINUATION_BIT = T.let(T.unsafe(nil), Integer)
+
+# source://sprockets//lib/sprockets/transformers.rb#7
+module Sprockets::Transformers
+ include ::Sprockets::Utils
+ include ::Sprockets::ProcessorUtils
+ include ::Sprockets::HTTPUtils
+
+ # Internal: Compose multiple transformer steps into a single processor
+ # function.
+ #
+ # transformers - Two level Hash of a source mime type to a target mime type
+ # types - Array of mime type steps
+ #
+ # Returns Processor.
+ #
+ # source://sprockets//lib/sprockets/transformers.rb#115
+ def compose_transformers(transformers, types, preprocessors, postprocessors); end
+
+ # Internal: Expand accept type list to include possible transformed types.
+ #
+ # parsed_accepts - Array of accept q values
+ #
+ # Examples
+ #
+ # expand_transform_accepts([['application/javascript', 1.0]])
+ # # => [['application/javascript', 1.0], ['text/coffeescript', 0.8]]
+ #
+ # Returns an expanded Array of q values.
+ #
+ # source://sprockets//lib/sprockets/transformers.rb#97
+ def expand_transform_accepts(parsed_accepts); end
+
+ # Public: Register a transformer from and to a mime type.
+ #
+ # from - String mime type
+ # to - String mime type
+ # proc - Callable block that accepts an input Hash.
+ #
+ # Examples
+ #
+ # register_transformer 'text/coffeescript', 'application/javascript',
+ # ConvertCoffeeScriptToJavaScript
+ #
+ # register_transformer 'image/svg+xml', 'image/png', ConvertSvgToPng
+ #
+ # Returns nothing.
+ #
+ # source://sprockets//lib/sprockets/transformers.rb#38
+ def register_transformer(from, to, proc); end
+
+ # Internal: Register transformer for existing type adding a suffix.
+ #
+ # types - Array of existing mime type Strings
+ # type_format - String suffix formatting string
+ # extname - String extension to append
+ # processor - Callable block that accepts an input Hash.
+ #
+ # Returns nothing.
+ #
+ # source://sprockets//lib/sprockets/transformers.rb#53
+ def register_transformer_suffix(types, type_format, extname, processor); end
+
+ # Internal: Resolve target mime type that the source type should be
+ # transformed to.
+ #
+ # type - String from mime type
+ # accept - String accept type list (default: '*/*')
+ #
+ # Examples
+ #
+ # resolve_transform_type('text/plain', 'text/plain')
+ # # => 'text/plain'
+ #
+ # resolve_transform_type('image/svg+xml', 'image/png, image/*')
+ # # => 'image/png'
+ #
+ # resolve_transform_type('text/css', 'image/png')
+ # # => nil
+ #
+ # Returns String mime type or nil is no type satisfied the accept value.
+ #
+ # source://sprockets//lib/sprockets/transformers.rb#83
+ def resolve_transform_type(type, accept); end
+
+ # Public: Two level mapping of a source mime type to a target mime type.
+ #
+ # environment.transformers
+ # # => { 'text/coffeescript' => {
+ # 'application/javascript' => ConvertCoffeeScriptToJavaScript
+ # }
+ # }
+ #
+ # source://sprockets//lib/sprockets/transformers.rb#18
+ def transformers; end
+
+ private
+
+ # source://sprockets//lib/sprockets/transformers.rb#131
+ def compose_transformer_list(transformers, preprocessors, postprocessors); end
+
+ # source://sprockets//lib/sprockets/transformers.rb#147
+ def compute_transformers!(registered_transformers); end
+end
+
+# source://sprockets//lib/sprockets/transformers.rb#22
+class Sprockets::Transformers::Transformer < ::Struct
+ # Returns the value of attribute from
+ #
+ # @return [Object] the current value of from
+ def from; end
+
+ # Sets the attribute from
+ #
+ # @param value [Object] the value to set the attribute from to.
+ # @return [Object] the newly set value
+ def from=(_); end
+
+ # Returns the value of attribute proc
+ #
+ # @return [Object] the current value of proc
+ def proc; end
+
+ # Sets the attribute proc
+ #
+ # @param value [Object] the value to set the attribute proc to.
+ # @return [Object] the newly set value
+ def proc=(_); end
+
+ # Returns the value of attribute to
+ #
+ # @return [Object] the current value of to
+ def to; end
+
+ # Sets the attribute to
+ #
+ # @param value [Object] the value to set the attribute to to.
+ # @return [Object] the newly set value
+ def to=(_); end
+
+ class << self
+ def [](*_arg0); end
+ def inspect; end
+ def keyword_init?; end
+ def members; end
+ def new(*_arg0); end
+ end
+end
+
+# Internal: used to "expand" and "compress" values for storage
+#
+# source://sprockets//lib/sprockets/uri_tar.rb#6
+class Sprockets::URITar
+ # Internal: Initialize object for compression or expansion
+ #
+ # uri - A String containing URI that may or may not contain the scheme
+ # env - The current "environment" that assets are being loaded into.
+ #
+ # @return [URITar] a new instance of URITar
+ #
+ # source://sprockets//lib/sprockets/uri_tar.rb#13
+ def initialize(uri, env); end
+
+ # Internal: Tells us if we are using an absolute path
+ #
+ # Nix* systems start with a `/` like /Users/schneems.
+ # Windows systems start with a drive letter than colon and slash
+ # like C:/Schneems.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/uri_tar.rb#44
+ def absolute_path?; end
+
+ # Internal: Converts full uri to a "compressed" uri
+ #
+ # If a uri is inside of an environment's root it will
+ # be shortened to be a relative path.
+ #
+ # If a uri is outside of the environment's root the original
+ # uri will be returned.
+ #
+ # Returns String
+ #
+ # source://sprockets//lib/sprockets/uri_tar.rb#35
+ def compress; end
+
+ # Internal: Returns "compressed" path
+ #
+ # If the input uri is relative to the environment root
+ # it will return a path relative to the environment root.
+ # Otherwise an absolute path will be returned.
+ #
+ # Only path information is returned, and not scheme.
+ #
+ # Returns String
+ #
+ # source://sprockets//lib/sprockets/uri_tar.rb#84
+ def compressed_path; end
+
+ # Internal: Convert a "compressed" uri to an absolute path
+ #
+ # If a uri is inside of the environment's root it will not
+ # start with a slash for example:
+ #
+ # file://this/is/a/relative/path
+ #
+ # If a uri is outside the root, it will start with a slash:
+ #
+ # file:///This/is/an/absolute/path
+ #
+ # Returns String
+ #
+ # source://sprockets//lib/sprockets/uri_tar.rb#60
+ def expand; end
+
+ # Returns the value of attribute path.
+ #
+ # source://sprockets//lib/sprockets/uri_tar.rb#7
+ def path; end
+
+ # Returns the value of attribute root.
+ #
+ # source://sprockets//lib/sprockets/uri_tar.rb#7
+ def root; end
+
+ # Returns the value of attribute scheme.
+ #
+ # source://sprockets//lib/sprockets/uri_tar.rb#7
+ def scheme; end
+end
+
+# Internal: Asset URI related parsing utilities. Mixed into Environment.
+#
+# An Asset URI identifies the compiled Asset result. It shares the file:
+# scheme and requires an absolute path.
+#
+# Other query parameters
+#
+# type - String output content type. Otherwise assumed from file extension.
+# This maybe different than the extension if the asset is transformed
+# from one content type to another. For an example .coffee -> .js.
+#
+# id - Unique fingerprint of the entire asset and all its metadata. Assets
+# will only have the same id if they serialize to an identical value.
+#
+# pipeline - String name of pipeline.
+#
+# source://sprockets//lib/sprockets/uri_utils.rb#21
+module Sprockets::URIUtils
+ extend ::Sprockets::URIUtils
+
+ # Internal: Build Asset URI.
+ #
+ # Examples
+ #
+ # build("/tmp/js/application.coffee", type: "application/javascript")
+ # # => "file:///tmp/js/application.coffee?type=application/javascript"
+ #
+ # path - String file path
+ # params - Hash of optional parameters
+ #
+ # Returns String URI.
+ #
+ # source://sprockets//lib/sprockets/uri_utils.rb#114
+ def build_asset_uri(path, params = T.unsafe(nil)); end
+
+ # Internal: Build file-digest dependency URI.
+ #
+ # Examples
+ #
+ # build("/tmp/js/application.js")
+ # # => "file-digest:/tmp/js/application.js"
+ #
+ # path - String file path
+ #
+ # Returns String URI.
+ #
+ # source://sprockets//lib/sprockets/uri_utils.rb#148
+ def build_file_digest_uri(path); end
+
+ # Internal: Serialize hash of params into query string.
+ #
+ # params - Hash of params to serialize
+ #
+ # Returns String query or nil if empty.
+ #
+ # source://sprockets//lib/sprockets/uri_utils.rb#157
+ def encode_uri_query_params(params); end
+
+ # Internal: Join file: URI component parts into String.
+ #
+ # Returns String.
+ #
+ # source://sprockets//lib/sprockets/uri_utils.rb#62
+ def join_file_uri(scheme, host, path, query); end
+
+ # Internal: Join URI component parts into String.
+ #
+ # Returns String.
+ #
+ # source://sprockets//lib/sprockets/uri_utils.rb#36
+ def join_uri(scheme, userinfo, host, port, registry, path, opaque, query, fragment); end
+
+ # Internal: Parse Asset URI.
+ #
+ # Examples
+ #
+ # parse("file:///tmp/js/application.coffee?type=application/javascript")
+ # # => "/tmp/js/application.coffee", {type: "application/javascript"}
+ #
+ # uri - String asset URI
+ #
+ # Returns String path and Hash of symbolized parameters.
+ #
+ # source://sprockets//lib/sprockets/uri_utils.rb#93
+ def parse_asset_uri(uri); end
+
+ # Internal: Parse file-digest dependency URI.
+ #
+ # Examples
+ #
+ # parse("file-digest:/tmp/js/application.js")
+ # # => "/tmp/js/application.js"
+ #
+ # uri - String file-digest URI
+ #
+ # Returns String path.
+ #
+ # source://sprockets//lib/sprockets/uri_utils.rb#128
+ def parse_file_digest_uri(uri); end
+
+ # Internal: Parse query string into hash of params
+ #
+ # query - String query string
+ #
+ # Return Hash of params.
+ #
+ # source://sprockets//lib/sprockets/uri_utils.rb#182
+ def parse_uri_query_params(query); end
+
+ # Internal: Parse file: URI into component parts.
+ #
+ # uri - String uri
+ #
+ # Returns [scheme, host, path, query].
+ #
+ # source://sprockets//lib/sprockets/uri_utils.rb#45
+ def split_file_uri(uri); end
+
+ # Internal: Parse URI into component parts.
+ #
+ # uri - String uri
+ #
+ # Returns Array of components.
+ #
+ # source://sprockets//lib/sprockets/uri_utils.rb#29
+ def split_uri(uri); end
+
+ # Internal: Check if String is a valid Asset URI.
+ #
+ # str - Possible String asset URI.
+ #
+ # Returns true or false.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/uri_utils.rb#76
+ def valid_asset_uri?(str); end
+end
+
+# source://sprockets//lib/sprockets/uglifier_compressor.rb#19
+class Sprockets::UglifierCompressor
+ # @return [UglifierCompressor] a new instance of UglifierCompressor
+ #
+ # source://sprockets//lib/sprockets/uglifier_compressor.rb#39
+ def initialize(options = T.unsafe(nil)); end
+
+ # Returns the value of attribute cache_key.
+ #
+ # source://sprockets//lib/sprockets/uglifier_compressor.rb#37
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/uglifier_compressor.rb#46
+ def call(input); end
+
+ class << self
+ # source://sprockets//lib/sprockets/uglifier_compressor.rb#33
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/uglifier_compressor.rb#29
+ def call(input); end
+
+ # Public: Return singleton instance with default options.
+ #
+ # Returns UglifierCompressor object.
+ #
+ # source://sprockets//lib/sprockets/uglifier_compressor.rb#25
+ def instance; end
+ end
+end
+
+# source://sprockets//lib/sprockets/uglifier_compressor.rb#20
+Sprockets::UglifierCompressor::VERSION = T.let(T.unsafe(nil), String)
+
+# Internal: Used to parse and store the URI to an unloaded asset
+# Generates keys used to store and retrieve items from cache
+#
+# source://sprockets//lib/sprockets/unloaded_asset.rb#8
+class Sprockets::UnloadedAsset
+ # Internal: Initialize object for generating cache keys
+ #
+ # uri - A String containing complete URI to a file including scheme
+ # and full path such as
+ # "file:///Path/app/assets/js/app.js?type=application/javascript"
+ # env - The current "environment" that assets are being loaded into.
+ # We need it so we know where the +root+ (directory where Sprockets
+ # is being invoked). We also need it for the `file_digest` method,
+ # since, for some strange reason, memoization is provided by
+ # overriding methods such as `stat` in the `PathUtils` module.
+ #
+ # Returns UnloadedAsset.
+ #
+ # @return [UnloadedAsset] a new instance of UnloadedAsset
+ #
+ # source://sprockets//lib/sprockets/unloaded_asset.rb#22
+ def initialize(uri, env); end
+
+ # Internal: Key of asset
+ #
+ # Used to retrieve an asset from the cache based on "compressed" path to asset.
+ # A "compressed" path can either be relative to the root of the project or an
+ # absolute path.
+ #
+ # Returns a String.
+ #
+ # source://sprockets//lib/sprockets/unloaded_asset.rb#77
+ def asset_key; end
+
+ # Returns the value of attribute compressed_path.
+ #
+ # source://sprockets//lib/sprockets/unloaded_asset.rb#29
+ def compressed_path; end
+
+ # Public: Dependency History key
+ #
+ # Used to retrieve an array of "histories" each of which contains a set of stored dependencies
+ # for a given asset path and filename digest.
+ #
+ # A dependency can refer to either an asset e.g. index.js
+ # may rely on jquery.js (so jquery.js is a dependency), or other factors that may affect
+ # compilation, such as the VERSION of Sprockets (i.e. the environment) and what "processors"
+ # are used.
+ #
+ # For example a history array with one Set of dependencies may look like:
+ #
+ # [["environment-version", "environment-paths", "processors:type=text/css&file_type=text/css",
+ # "file-digest:///Full/path/app/assets/stylesheets/application.css",
+ # "processors:type=text/css&file_type=text/css&pipeline=self",
+ # "file-digest:///Full/path/app/assets/stylesheets"]]
+ #
+ # This method of asset lookup is used to ensure that none of the dependencies have been modified
+ # since last lookup. If one of them has, the key will be different and a new entry must be stored.
+ #
+ # URI dependencies are later converted to "compressed" paths
+ #
+ # Returns a String.
+ #
+ # source://sprockets//lib/sprockets/unloaded_asset.rb#104
+ def dependency_history_key; end
+
+ # Internal: Digest key
+ #
+ # Used to retrieve a string containing the "compressed" path to an asset based on
+ # a digest. The digest is generated from dependencies stored via information stored in
+ # the `dependency_history_key` after each of the "dependencies" is "resolved".
+ # For example "environment-version" may be resolved to "environment-1.0-3.2.0"
+ # for version "3.2.0" of Sprockets
+ #
+ # Returns a String.
+ #
+ # source://sprockets//lib/sprockets/unloaded_asset.rb#117
+ def digest_key(digest); end
+
+ # Internal: File digest key
+ #
+ # The digest for a given file won't change if the path and the stat time hasn't changed
+ # We can save time by not re-computing this information and storing it in the cache
+ #
+ # Returns a String.
+ #
+ # source://sprockets//lib/sprockets/unloaded_asset.rb#127
+ def file_digest_key(stat); end
+
+ # Internal: Full file path without schema
+ #
+ # This returns a string containing the full path to the asset without the schema.
+ # Information is loaded lazily since we want `UnloadedAsset.new(dep, self).relative_path`
+ # to be fast. Calling this method the first time allocates an array and a hash.
+ #
+ # Example
+ #
+ # If the URI is `file:///Full/path/app/assets/javascripts/application.js"` then the
+ # filename would be `"/Full/path/app/assets/javascripts/application.js"`
+ #
+ # Returns a String.
+ #
+ # source://sprockets//lib/sprockets/unloaded_asset.rb#43
+ def filename; end
+
+ # Internal: Hash of param values
+ #
+ # This information is generated and used internally by Sprockets.
+ # Known keys include `:type` which stores the asset's mime-type, `:id` which is a fully resolved
+ # digest for the asset (includes dependency digest as opposed to a digest of only file contents)
+ # and `:pipeline`. Hash may be empty.
+ #
+ # Example
+ #
+ # If the URI is `file:///Full/path/app/assets/javascripts/application.js"type=application/javascript`
+ # Then the params would be `{type: "application/javascript"}`
+ #
+ # Returns a Hash.
+ #
+ # source://sprockets//lib/sprockets/unloaded_asset.rb#63
+ def params; end
+
+ # Returns the value of attribute uri.
+ #
+ # source://sprockets//lib/sprockets/unloaded_asset.rb#29
+ def uri; end
+
+ private
+
+ # Internal: Parses uri into filename and params hash
+ #
+ # Returns Array with filename and params hash
+ #
+ # source://sprockets//lib/sprockets/unloaded_asset.rb#135
+ def load_file_params; end
+end
+
+# Internal: Utils, we didn't know where else to put it! Functions may
+# eventually be shuffled into more specific drawers.
+#
+# source://sprockets//lib/sprockets/utils.rb#7
+module Sprockets::Utils
+ extend ::Sprockets::Utils
+
+ # Internal: Accumulate asset source to buffer and append a trailing
+ # semicolon if necessary.
+ #
+ # buf - String buffer to append to
+ # source - String source to append
+ #
+ # Returns buf String.
+ #
+ # source://sprockets//lib/sprockets/utils.rb#100
+ def concat_javascript_sources(buf, source); end
+
+ # Internal: Post-order Depth-First search algorithm.
+ #
+ # Used for resolving asset dependencies.
+ #
+ # initial - Initial Array of nodes to traverse.
+ # block -
+ # node - Current node to get children of
+ #
+ # Returns a Set of nodes.
+ #
+ # source://sprockets//lib/sprockets/utils.rb#165
+ def dfs(initial); end
+
+ # Internal: Post-order Depth-First search algorithm that gathers all paths
+ # along the way.
+ #
+ # TODO: Rename function.
+ #
+ # path - Initial Array node path
+ # block -
+ # node - Current node to get children of
+ #
+ # Returns an Array of node Arrays.
+ #
+ # source://sprockets//lib/sprockets/utils.rb#192
+ def dfs_paths(path); end
+
+ # Internal: Check if object can safely be .dup'd.
+ #
+ # Similar to ActiveSupport #duplicable? check.
+ #
+ # obj - Any Object
+ #
+ # Returns false if .dup would raise a TypeError, otherwise true.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/utils.rb#17
+ def duplicable?(obj); end
+
+ # Internal: Duplicate and store key/value on new frozen hash.
+ #
+ # Similar to Hash#store for nested frozen hashes.
+ #
+ # hash - Hash
+ # key_a - Object key. Use multiple keys for nested hashes.
+ # key_b - Object key. Use multiple keys for nested hashes.
+ # block - Receives current value at key.
+ #
+ # Examples
+ #
+ # config = {paths: ["/bin", "/sbin"]}.freeze
+ # new_config = hash_reassoc(config, :paths) do |paths|
+ # paths << "/usr/local/bin"
+ # end
+ #
+ # Returns duplicated frozen Hash.
+ #
+ # source://sprockets//lib/sprockets/utils.rb#61
+ def hash_reassoc(hash, key_a, key_b = T.unsafe(nil), &block); end
+
+ # Internal: Duplicate and store key/value on new frozen hash.
+ #
+ # Separated for recursive calls, always use hash_reassoc(hash, *keys).
+ #
+ # hash - Hash
+ # key - Object key
+ #
+ # Returns Hash.
+ #
+ # source://sprockets//lib/sprockets/utils.rb#34
+ def hash_reassoc1(hash, key); end
+
+ # Internal: Inject into target module for the duration of the block.
+ #
+ # mod - Module
+ #
+ # Returns result of block.
+ #
+ # source://sprockets//lib/sprockets/utils.rb#129
+ def module_include(base, mod); end
+
+ # Internal: Check if string has a trailing semicolon.
+ #
+ # str - String
+ #
+ # Returns true or false.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/utils.rb#79
+ def string_end_with_semicolon?(str); end
+end
+
+# source://sprockets//lib/sprockets/utils/gzip.rb#4
+class Sprockets::Utils::Gzip
+ # Private: Generates a gzipped file based off of reference file.
+ #
+ # @return [Gzip] a new instance of Gzip
+ #
+ # source://sprockets//lib/sprockets/utils/gzip.rb#43
+ def initialize(asset, archiver: T.unsafe(nil)); end
+
+ # Returns the value of attribute archiver.
+ #
+ # source://sprockets//lib/sprockets/utils/gzip.rb#40
+ def archiver; end
+
+ # Private: Returns whether or not an asset can be compressed.
+ #
+ # We want to compress any file that is text based.
+ # You do not want to compress binary
+ # files as they may already be compressed and running them
+ # through a compression algorithm would make them larger.
+ #
+ # Return Boolean.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/utils/gzip.rb#68
+ def can_compress?; end
+
+ # Private: Opposite of `can_compress?`.
+ #
+ # Returns Boolean.
+ #
+ # @return [Boolean]
+ #
+ # source://sprockets//lib/sprockets/utils/gzip.rb#80
+ def cannot_compress?; end
+
+ # Returns the value of attribute charset.
+ #
+ # source://sprockets//lib/sprockets/utils/gzip.rb#40
+ def charset; end
+
+ # Private: Generates a gzipped file based off of reference asset.
+ #
+ # Compresses the target asset's contents and puts it into a file with
+ # the same name plus a `.gz` extension in the same folder as the original.
+ # Does not modify the target asset.
+ #
+ # Returns nothing.
+ #
+ # source://sprockets//lib/sprockets/utils/gzip.rb#91
+ def compress(file, target); end
+
+ # Returns the value of attribute content_type.
+ #
+ # source://sprockets//lib/sprockets/utils/gzip.rb#40
+ def content_type; end
+
+ # Returns the value of attribute source.
+ #
+ # source://sprockets//lib/sprockets/utils/gzip.rb#40
+ def source; end
+end
+
+# What non-text mime types should we compress? This list comes from:
+# https://www.fastly.com/blog/new-gzip-settings-and-deciding-what-compress
+#
+# source://sprockets//lib/sprockets/utils/gzip.rb#52
+Sprockets::Utils::Gzip::COMPRESSABLE_MIME_TYPES = T.let(T.unsafe(nil), Hash)
+
+# Private: Generates a gzipped file based off of reference asset.
+#
+# ZlibArchiver.call(file, source, mtime)
+#
+# Compresses a given `source` using stdlib Zlib algorithm
+# writes contents to the `file` passed in. Sets `mtime` of
+# written file to passed in `mtime`
+#
+# source://sprockets//lib/sprockets/utils/gzip.rb#12
+module Sprockets::Utils::Gzip::ZlibArchiver
+ class << self
+ # source://sprockets//lib/sprockets/utils/gzip.rb#13
+ def call(file, source, mtime); end
+ end
+end
+
+# Private: Generates a gzipped file based off of reference asset.
+#
+# ZopfliArchiver.call(file, source, mtime)
+#
+# Compresses a given `source` using the zopfli gem
+# writes contents to the `file` passed in. Sets `mtime` of
+# written file to passed in `mtime`
+#
+# source://sprockets//lib/sprockets/utils/gzip.rb#30
+module Sprockets::Utils::Gzip::ZopfliArchiver
+ class << self
+ # source://sprockets//lib/sprockets/utils/gzip.rb#31
+ def call(file, source, mtime); end
+ end
+end
+
+# source://sprockets//lib/sprockets/utils.rb#121
+Sprockets::Utils::MODULE_INCLUDE_MUTEX = T.let(T.unsafe(nil), Thread::Mutex)
+
+# source://sprockets//lib/sprockets/utils.rb#71
+Sprockets::Utils::WHITESPACE_ORDINALS = T.let(T.unsafe(nil), Hash)
+
+# source://sprockets//lib/sprockets/version.rb#3
+Sprockets::VERSION = T.let(T.unsafe(nil), String)
+
+# Public: YUI compressor.
+#
+# To accept the default options
+#
+# environment.register_bundle_processor 'application/javascript',
+# Sprockets::YUICompressor
+#
+# Or to pass options to the YUI::JavaScriptCompressor class.
+#
+# environment.register_bundle_processor 'application/javascript',
+# Sprockets::YUICompressor.new(munge: true)
+#
+# source://sprockets//lib/sprockets/yui_compressor.rb#18
+class Sprockets::YUICompressor
+ # @return [YUICompressor] a new instance of YUICompressor
+ #
+ # source://sprockets//lib/sprockets/yui_compressor.rb#38
+ def initialize(options = T.unsafe(nil)); end
+
+ # Returns the value of attribute cache_key.
+ #
+ # source://sprockets//lib/sprockets/yui_compressor.rb#36
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/yui_compressor.rb#43
+ def call(input); end
+
+ class << self
+ # source://sprockets//lib/sprockets/yui_compressor.rb#32
+ def cache_key; end
+
+ # source://sprockets//lib/sprockets/yui_compressor.rb#28
+ def call(input); end
+
+ # Public: Return singleton instance with default options.
+ #
+ # Returns YUICompressor object.
+ #
+ # source://sprockets//lib/sprockets/yui_compressor.rb#24
+ def instance; end
+ end
+end
+
+# source://sprockets//lib/sprockets/yui_compressor.rb#19
+Sprockets::YUICompressor::VERSION = T.let(T.unsafe(nil), String)
diff --git a/spec/support/demo.rb b/spec/support/demo.rb
new file mode 100644
index 000000000..79c29f7f9
--- /dev/null
+++ b/spec/support/demo.rb
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+RSpec.configure do |c|
+ c.filter_run_excluding(:demo_only) if ENV["CI"] && !ENV["TEST_DEMO"]
+end
diff --git a/spec/system/pghero_spec.rb b/spec/system/pghero_spec.rb
new file mode 100644
index 000000000..8153e4d50
--- /dev/null
+++ b/spec/system/pghero_spec.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+
+describe 'PGHero', :demo_only do
+ describe 'access' do
+ context 'with the appropriate environment variables set' do
+ before do
+ allow(ENV).to receive(:[]).with('PGHERO_USERNAME').and_return('link')
+ allow(ENV).to receive(:[]).with('PGHERO_PASSWORD').and_return('hyrule')
+ end
+
+ it 'fails without the basic auth credentials' do
+ visit pg_hero_path
+
+ expect(status_code).to eq 401
+ expect(page).to have_content 'HTTP Basic: Access denied.'
+ end
+
+ it 'succeeds with the credentials' do
+ # this will only work with the rack_test driver
+ page.driver.browser.basic_authorize 'link', 'hyrule'
+
+ visit pg_hero_path
+
+ expect(status_code).to eq 200
+ expect(page).to have_content 'PgHero'
+ end
+ end
+ end
+end