init sorbet

This commit is contained in:
Dylan Knutson
2025-01-01 01:14:26 +00:00
parent fcd9a7fbab
commit 20aa7871ea
207 changed files with 500609 additions and 219 deletions

View File

@@ -52,7 +52,8 @@ RUN \
postgresql-client \ postgresql-client \
rustc \ rustc \
uuid-dev \ uuid-dev \
zlib1g-dev zlib1g-dev \
watchman
# Install & configure delta diff tool # Install & configure delta diff tool
RUN wget -O- https://github.com/dandavison/delta/releases/download/0.18.2/git-delta_0.18.2_amd64.deb > /tmp/git-delta.deb && \ RUN wget -O- https://github.com/dandavison/delta/releases/download/0.18.2/git-delta_0.18.2_amd64.deb > /tmp/git-delta.deb && \

View File

@@ -122,7 +122,8 @@ gem "ruby-vips"
gem "table_print" gem "table_print"
gem "zstd-ruby" gem "zstd-ruby"
gem "pghero", git: "https://github.com/dymk/pghero", ref: "e314f99" # gem "pghero", git: "https://github.com/dymk/pghero", ref: "e314f99"
gem "pghero", "~> 3.6"
gem "pg_query", ">= 2" gem "pg_query", ">= 2"
gem "disco" gem "disco"
@@ -138,10 +139,11 @@ group :production do
gem "sd_notify" gem "sd_notify"
end end
gem "rack", "~> 2.2"
gem "rack-cors" gem "rack-cors"
gem "react_on_rails" gem "react_on_rails"
gem "sanitize", "~> 6.1" gem "sanitize", "~> 6.1"
gem "shakapacker" gem "shakapacker", "~> 6.6"
group :development do group :development do
gem "prettier_print" gem "prettier_print"
@@ -156,3 +158,6 @@ gem "devise", "~> 4.9"
# Authorization # Authorization
gem "pundit", "~> 2.4" gem "pundit", "~> 2.4"
gem "sorbet-static-and-runtime"
gem "tapioca", require: false, group: %i[development test]

View File

@@ -1,11 +1,3 @@
GIT
remote: https://github.com/dymk/pghero
revision: e314f9999f83116448085a66d3a806e8296bd4bf
ref: e314f99
specs:
pghero (3.3.3)
activerecord (>= 6)
GIT GIT
remote: https://github.com/railsjazz/rails_live_reload remote: https://github.com/railsjazz/rails_live_reload
revision: dcd3b73904594e2c5134c2f6e05954f3937a8d29 revision: dcd3b73904594e2c5134c2f6e05954f3937a8d29
@@ -101,39 +93,39 @@ GEM
minitest (>= 5.1) minitest (>= 5.1)
securerandom (>= 0.3) securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5) tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.1) addressable (2.8.7)
public_suffix (>= 2.0.2, < 6.0) public_suffix (>= 2.0.2, < 7.0)
base64 (0.2.0) base64 (0.2.0)
bcrypt (3.1.20) bcrypt (3.1.20)
benchmark (0.4.0) benchmark (0.4.0)
bigdecimal (3.1.8) bigdecimal (3.1.9)
bindex (0.8.1) bindex (0.8.1)
binding_of_caller (1.0.0) binding_of_caller (1.0.1)
debug_inspector (>= 0.0.1) debug_inspector (>= 1.2.0)
bootsnap (1.16.0) bootsnap (1.18.4)
msgpack (~> 1.2) msgpack (~> 1.2)
builder (3.3.0) builder (3.3.0)
capybara (3.38.0) capybara (3.40.0)
addressable addressable
matrix matrix
mini_mime (>= 0.1.3) mini_mime (>= 0.1.3)
nokogiri (~> 1.8) nokogiri (~> 1.11)
rack (>= 1.6.0) rack (>= 1.6.0)
rack-test (>= 0.6.3) rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0) regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2) xpath (~> 3.2)
coderay (1.1.3) coderay (1.1.3)
colorize (0.8.1) colorize (1.1.0)
concurrent-ruby (1.3.4) concurrent-ruby (1.3.4)
concurrent-ruby-edge (0.7.1) concurrent-ruby-edge (0.7.1)
concurrent-ruby (~> 1.3) concurrent-ruby (~> 1.3)
concurrent-ruby-ext (1.3.4) concurrent-ruby-ext (1.3.4)
concurrent-ruby (= 1.3.4) concurrent-ruby (= 1.3.4)
connection_pool (2.4.0) connection_pool (2.4.1)
crass (1.0.6) crass (1.0.6)
cssbundling-rails (1.4.1) cssbundling-rails (1.4.1)
railties (>= 6.0.0) railties (>= 6.0.0)
curb (1.0.5) curb (1.0.6)
daemons (1.4.1) daemons (1.4.1)
date (3.4.1) date (3.4.1)
db-query-matchers (0.14.0) db-query-matchers (0.14.0)
@@ -142,7 +134,7 @@ GEM
debug (1.10.0) debug (1.10.0)
irb (~> 1.10) irb (~> 1.10)
reline (>= 0.3.8) reline (>= 0.3.8)
debug_inspector (1.1.0) debug_inspector (1.2.0)
devise (4.9.4) devise (4.9.4)
bcrypt (~> 3.0) bcrypt (~> 3.0)
orm_adapter (~> 0.1) orm_adapter (~> 0.1)
@@ -150,33 +142,37 @@ GEM
responders responders
warden (~> 1.2.3) warden (~> 1.2.3)
diff-lcs (1.5.1) diff-lcs (1.5.1)
diffy (3.4.2) diffy (3.4.3)
discard (1.2.1) discard (1.4.0)
activerecord (>= 4.2, < 8) activerecord (>= 4.2, < 9.0)
disco (0.4.0) disco (0.5.1)
libmf (>= 0.2) libmf (>= 0.4)
numo-narray numo-narray (>= 0.9.2)
domain_name (0.5.20190701) domain_name (0.6.20240107)
unf (>= 0.0.5, < 1.0.0)
drb (2.2.1) drb (2.2.1)
erubi (1.13.0) erubi (1.13.1)
et-orbi (1.2.11) et-orbi (1.2.11)
tzinfo tzinfo
execjs (2.8.1) execjs (2.10.0)
factory_bot (6.5.0) factory_bot (6.5.0)
activesupport (>= 5.0.0) activesupport (>= 5.0.0)
factory_bot_rails (6.4.4) factory_bot_rails (6.4.4)
factory_bot (~> 6.5) factory_bot (~> 6.5)
railties (>= 5.0.0) railties (>= 5.0.0)
faiss (0.2.5) faiss (0.3.2)
numo-narray numo-narray
rice (>= 4.0.2) rice (>= 4.0.2)
ffi (1.17.0) ffi (1.17.1-aarch64-linux-gnu)
ffi (1.17.1-aarch64-linux-musl)
ffi (1.17.1-arm64-darwin)
ffi (1.17.1-x86_64-darwin)
ffi (1.17.1-x86_64-linux-gnu)
ffi (1.17.1-x86_64-linux-musl)
fugit (1.11.1) fugit (1.11.1)
et-orbi (~> 1, >= 1.2.11) et-orbi (~> 1, >= 1.2.11)
raabro (~> 1.4) raabro (~> 1.4)
globalid (1.1.0) globalid (1.2.1)
activesupport (>= 5.0) activesupport (>= 6.1)
good_job (4.6.0) good_job (4.6.0)
activejob (>= 6.1.0) activejob (>= 6.1.0)
activerecord (>= 6.1.0) activerecord (>= 6.1.0)
@@ -184,13 +180,24 @@ GEM
fugit (>= 1.11.0) fugit (>= 1.11.0)
railties (>= 6.1.0) railties (>= 6.1.0)
thor (>= 1.0.0) thor (>= 1.0.0)
google-protobuf (3.23.1) google-protobuf (4.29.2-aarch64-linux)
htmlbeautifier (1.4.2) bigdecimal
http-cookie (1.0.5) rake (>= 13)
google-protobuf (4.29.2-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.29.2-x86_64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.29.2-x86_64-linux)
bigdecimal
rake (>= 13)
htmlbeautifier (1.4.3)
http-cookie (1.0.8)
domain_name (~> 0.5) domain_name (~> 0.5)
i18n (1.14.6) i18n (1.14.6)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
io-console (0.6.0) io-console (0.8.0)
irb (1.14.3) irb (1.14.3)
rdoc (>= 4.0.0) rdoc (>= 4.0.0)
reline (>= 0.4.2) reline (>= 0.4.2)
@@ -209,7 +216,7 @@ GEM
activerecord activerecord
kaminari-core (= 1.2.2) kaminari-core (= 1.2.2)
kaminari-core (1.2.2) kaminari-core (1.2.2)
libmf (0.3.0) libmf (0.4.0)
ffi ffi
listen (3.9.0) listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3) rb-fsevent (~> 0.10, >= 0.10.3)
@@ -225,15 +232,14 @@ GEM
net-smtp net-smtp
marcel (1.0.4) marcel (1.0.4)
matrix (0.4.2) matrix (0.4.2)
memory_profiler (1.0.1) memory_profiler (1.1.0)
method_source (1.1.0) method_source (1.1.0)
mini_mime (1.1.2) mini_mime (1.1.5)
mini_portile2 (2.8.8)
minitest (5.25.4) minitest (5.25.4)
msgpack (1.6.0) msgpack (1.7.5)
neighbor (0.2.2) neighbor (0.5.1)
activerecord (>= 5.2) activerecord (>= 7)
net-imap (0.5.3) net-imap (0.5.4)
date date
net-protocol net-protocol
net-pop (0.1.2) net-pop (0.1.2)
@@ -242,24 +248,37 @@ GEM
timeout timeout
net-smtp (0.5.0) net-smtp (0.5.0)
net-protocol net-protocol
netrc (0.11.0)
nio4r (2.7.4) nio4r (2.7.4)
nokogiri (1.17.2) nokogiri (1.18.1-aarch64-linux-gnu)
mini_portile2 (~> 2.8.2) racc (~> 1.4)
nokogiri (1.18.1-aarch64-linux-musl)
racc (~> 1.4)
nokogiri (1.18.1-arm64-darwin)
racc (~> 1.4)
nokogiri (1.18.1-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.18.1-x86_64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.1-x86_64-linux-musl)
racc (~> 1.4) racc (~> 1.4)
numo-narray (0.9.2.1) numo-narray (0.9.2.1)
orm_adapter (0.5.0) orm_adapter (0.5.0)
parallel (1.26.3) parallel (1.26.3)
parallel_tests (4.7.2) parallel_tests (4.7.2)
parallel parallel
pg (1.4.5) pg (1.5.9)
pg_query (4.2.1) pg_query (6.0.0)
google-protobuf (>= 3.22.3) google-protobuf (>= 3.25.3)
pghero (3.6.1)
activerecord (>= 6.1)
pluck_each (0.2.0) pluck_each (0.2.0)
activerecord (> 3.2.0) activerecord (> 3.2.0)
activesupport (> 3.0.0) activesupport (> 3.0.0)
prettier_print (1.2.1) prettier_print (1.2.1)
prism (1.3.0)
progressbar (1.13.0) progressbar (1.13.0)
pry (0.14.2) pry (0.15.2)
coderay (~> 1.1) coderay (~> 1.1)
method_source (~> 1.0) method_source (~> 1.0)
pry-stack_explorer (0.6.1) pry-stack_explorer (0.6.1)
@@ -268,8 +287,8 @@ GEM
psych (5.2.2) psych (5.2.2)
date date
stringio stringio
public_suffix (5.0.1) public_suffix (6.0.1)
puma (5.6.5) puma (5.6.9)
nio4r (~> 2.0) nio4r (~> 2.0)
pundit (2.4.0) pundit (2.4.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
@@ -281,15 +300,15 @@ GEM
raabro (1.4.0) raabro (1.4.0)
racc (1.8.1) racc (1.8.1)
rack (2.2.10) rack (2.2.10)
rack-cors (2.0.1) rack-cors (2.0.2)
rack (>= 2.0.0) rack (>= 2.0.0)
rack-mini-profiler (3.3.1) rack-mini-profiler (3.3.1)
rack (>= 1.2.0) rack (>= 1.2.0)
rack-proxy (0.7.6) rack-proxy (0.7.7)
rack rack
rack-session (1.0.2) rack-session (1.0.2)
rack (< 3) rack (< 3)
rack-test (2.1.0) rack-test (2.2.0)
rack (>= 1.3) rack (>= 1.3)
rackup (1.0.1) rackup (1.0.1)
rack (< 3) rack (< 3)
@@ -336,22 +355,25 @@ GEM
rb-fsevent (0.11.2) rb-fsevent (0.11.2)
rb-inotify (0.11.1) rb-inotify (0.11.1)
ffi (~> 1.0) ffi (~> 1.0)
rbi (0.2.2)
prism (~> 1.0)
sorbet-runtime (>= 0.5.9204)
rdoc (6.10.0) rdoc (6.10.0)
psych (>= 4.0.0) psych (>= 4.0.0)
react_on_rails (13.3.3) react_on_rails (14.0.5)
addressable addressable
connection_pool connection_pool
execjs (~> 2.5) execjs (~> 2.5)
rails (>= 5.2) rails (>= 5.2)
rainbow (~> 3.0) rainbow (~> 3.0)
regexp_parser (2.6.2) regexp_parser (2.10.0)
reline (0.6.0) reline (0.6.0)
io-console (~> 0.5) io-console (~> 0.5)
responders (3.1.1) responders (3.1.1)
actionpack (>= 5.2) actionpack (>= 5.2)
railties (>= 5.2) railties (>= 5.2)
rexml (3.2.5) rexml (3.4.0)
rice (4.0.4) rice (4.3.3)
ripcord (2.0.0) ripcord (2.0.0)
rspec (3.13.0) rspec (3.13.0)
rspec-core (~> 3.13.0) rspec-core (~> 3.13.0)
@@ -374,25 +396,26 @@ GEM
rspec-mocks (~> 3.13) rspec-mocks (~> 3.13)
rspec-support (~> 3.13) rspec-support (~> 3.13)
rspec-support (3.13.2) rspec-support (3.13.2)
ruby-prof (1.4.5) ruby-prof (1.7.1)
ruby-prof-speedscope (0.3.0) ruby-prof-speedscope (0.3.0)
ruby-prof (~> 1.0) ruby-prof (~> 1.0)
ruby-vips (2.1.4) ruby-vips (2.2.2)
ffi (~> 1.12) ffi (~> 1.12)
logger
rubyzip (2.3.2) rubyzip (2.3.2)
rufo (0.15.1) rufo (0.18.0)
sanitize (6.1.3) sanitize (6.1.3)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.12.0) nokogiri (>= 1.12.0)
sd_notify (0.1.1) sd_notify (0.1.1)
securerandom (0.4.1) securerandom (0.4.1)
selenium-webdriver (4.8.0) selenium-webdriver (4.10.0)
rexml (~> 3.2, >= 3.2.5) rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0) rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0) websocket (~> 1.0)
semantic_logger (4.16.1) semantic_logger (4.16.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
semantic_range (3.0.0) semantic_range (3.1.0)
shakapacker (6.6.0) shakapacker (6.6.0)
activesupport (>= 5.2) activesupport (>= 5.2)
rack-proxy (>= 0.6.1) rack-proxy (>= 0.6.1)
@@ -400,61 +423,96 @@ GEM
semantic_range (>= 2.3.0) semantic_range (>= 2.3.0)
shoulda-matchers (6.4.0) shoulda-matchers (6.4.0)
activesupport (>= 5.2.0) activesupport (>= 5.2.0)
sprockets (4.2.0) sorbet (0.5.11708)
sorbet-static (= 0.5.11708)
sorbet-runtime (0.5.11708)
sorbet-static (0.5.11708-aarch64-linux)
sorbet-static (0.5.11708-universal-darwin)
sorbet-static (0.5.11708-x86_64-linux)
sorbet-static-and-runtime (0.5.11708)
sorbet (= 0.5.11708)
sorbet-runtime (= 0.5.11708)
spoom (1.5.0)
erubi (>= 1.10.0)
prism (>= 0.28.0)
sorbet-static-and-runtime (>= 0.5.10187)
thor (>= 0.19.2)
sprockets (4.2.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4) rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2) sprockets-rails (3.5.2)
actionpack (>= 5.2) actionpack (>= 6.1)
activesupport (>= 5.2) activesupport (>= 6.1)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sqlite3 (1.6.0) sqlite3 (1.7.3-aarch64-linux)
mini_portile2 (~> 2.8.0) sqlite3 (1.7.3-arm64-darwin)
stackprof (0.2.24) sqlite3 (1.7.3-x86_64-darwin)
stimulus-rails (1.2.1) sqlite3 (1.7.3-x86_64-linux)
stackprof (0.2.26)
stimulus-rails (1.3.4)
railties (>= 6.0.0) railties (>= 6.0.0)
stringio (3.1.2) stringio (3.1.2)
syntax_tree (6.2.0) syntax_tree (6.2.0)
prettier_print (>= 1.2.0) prettier_print (>= 1.2.0)
table_print (1.5.7) table_print (1.5.7)
tailwindcss-rails (3.0.0) tailwindcss-rails (3.1.0)
railties (>= 7.0.0) railties (>= 7.0.0)
tailwindcss-ruby tailwindcss-ruby
tailwindcss-ruby (3.4.17) tailwindcss-ruby (3.4.17-aarch64-linux)
tailwindcss-ruby (3.4.17-arm64-darwin)
tailwindcss-ruby (3.4.17-x86_64-darwin)
tailwindcss-ruby (3.4.17-x86_64-linux)
tapioca (0.16.5)
bundler (>= 2.2.25)
netrc (>= 0.11.0)
parallel (>= 1.21.0)
rbi (~> 0.2)
sorbet-static-and-runtime (>= 0.5.11087)
spoom (>= 1.2.0)
thor (>= 1.2.0)
yard-sorbet
thor (1.3.2) thor (1.3.2)
timeout (0.4.3) timeout (0.4.3)
turbo-rails (1.3.3) turbo-rails (2.0.11)
actionpack (>= 6.0.0) actionpack (>= 6.0.0)
activejob (>= 6.0.0)
railties (>= 6.0.0) railties (>= 6.0.0)
tzinfo (2.0.6) tzinfo (2.0.6)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
useragent (0.16.11) useragent (0.16.11)
warden (1.2.9) warden (1.2.9)
rack (>= 2.0.9) rack (>= 2.0.9)
web-console (4.2.0) web-console (4.2.1)
actionview (>= 6.0.0) actionview (>= 6.0.0)
activemodel (>= 6.0.0) activemodel (>= 6.0.0)
bindex (>= 0.4.0) bindex (>= 0.4.0)
railties (>= 6.0.0) railties (>= 6.0.0)
webdrivers (5.2.0) webdrivers (5.3.1)
nokogiri (~> 1.6) nokogiri (~> 1.6)
rubyzip (>= 1.3.0) rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0) selenium-webdriver (~> 4.0, < 4.11)
webrick (1.9.1) webrick (1.9.1)
websocket (1.2.9) websocket (1.2.11)
websocket-driver (0.7.6) websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5) websocket-extensions (0.1.5)
xpath (3.2.0) xpath (3.2.0)
nokogiri (~> 1.8) nokogiri (~> 1.8)
yard (0.9.37)
yard-sorbet (0.9.0)
sorbet-runtime
yard
zeitwerk (2.7.1) zeitwerk (2.7.1)
zstd-ruby (1.5.5.0) zstd-ruby (1.5.6.6)
PLATFORMS PLATFORMS
ruby aarch64-linux
aarch64-linux-gnu
aarch64-linux-musl
arm64-darwin
universal-darwin
x86_64-darwin
x86_64-linux-gnu
x86_64-linux-musl
DEPENDENCIES DEPENDENCIES
addressable addressable
@@ -485,7 +543,7 @@ DEPENDENCIES
parallel_tests parallel_tests
pg pg
pg_query (>= 2) pg_query (>= 2)
pghero! pghero (~> 3.6)
pluck_each pluck_each
prettier_print prettier_print
progressbar progressbar
@@ -494,6 +552,7 @@ DEPENDENCIES
puma (~> 5.0) puma (~> 5.0)
pundit (~> 2.4) pundit (~> 2.4)
pundit-matchers (~> 4.0) pundit-matchers (~> 4.0)
rack (~> 2.2)
rack-cors rack-cors
rack-mini-profiler (~> 3.3) rack-mini-profiler (~> 3.3)
rails (~> 7.2) rails (~> 7.2)
@@ -511,8 +570,9 @@ DEPENDENCIES
sanitize (~> 6.1) sanitize (~> 6.1)
sd_notify sd_notify
selenium-webdriver selenium-webdriver
shakapacker shakapacker (~> 6.6)
shoulda-matchers shoulda-matchers
sorbet-static-and-runtime
sprockets-rails sprockets-rails
sqlite3 (~> 1.4) sqlite3 (~> 1.4)
stackprof stackprof
@@ -520,6 +580,7 @@ DEPENDENCIES
syntax_tree (~> 6.2) syntax_tree (~> 6.2)
table_print table_print
tailwindcss-rails (~> 3.0) tailwindcss-rails (~> 3.0)
tapioca
turbo-rails turbo-rails
tzinfo-data tzinfo-data
web-console web-console
@@ -531,4 +592,4 @@ RUBY VERSION
ruby 3.2.6p234 ruby 3.2.6p234
BUNDLED WITH BUNDLED WITH
2.4.6 2.6.2

View File

@@ -1,122 +0,0 @@
require "csv"
class Domain::E621::CsvPostImporter < LegacyImport::BulkImportJob
def initialize(csv_path:, start_at:, limit: nil)
logger.info "loading..."
@csv_file = CSV.new(File.open(csv_path, "r+"), headers: true)
logger.info "loaded"
@start_at = start_at || 0
@start_time = Time.now
@limit = limit
logger.info "start_at=#{@start_at} limit=#{limit}"
end
def name
"e621_csv_post_importer"
end
def profile?
false
end
def run_impl
progress = 0
for row in @csv_file.each
row = row.to_h
e621_id = row["id"].to_i
if @start_at && e621_id >= @start_at
@start_time = Time.now
next
end
progress += self.class.import_row(row)
write_last_id e621_id
break if @limit && progress >= @limit
end
# while row = @csv_file.shift&.to_h
# e621_id = row["id"].to_i
# if @start_at && e621_id < @start_at
# @start_time = Time.now
# next
# end
# progress += self.class.import_row(row)
# write_last_id e621_id
# break if @limit && progress >= @limit
# end
progress
end
def self.import_row(row)
e621_id = row["id"].to_i
md5 = row["md5"]
logger.prefix = proc { "[e621_id #{e621_id.to_s.bold}]" }
post =
Domain::E621::Post.find_by({ e621_id: e621_id }) ||
Domain::E621::Post.new({ e621_id: e621_id, md5: md5 })
if post.md5 && post.md5 != md5
logger.error("md5 mismatch, skipping")
return 0
end
if (updated_at = row["updated_at"])
csv_e621_updated_at = Time.parse(row["updated_at"])
if post.e621_updated_at && post.e621_updated_at > csv_e621_updated_at
logger.info("model more recent than csv, skipping")
return 0
end
post.e621_updated_at = csv_e621_updated_at
else
logger.warn("no updated_at in csv row")
end
file_ext = row["file_ext"]
post.file_url_str =
"https://static1.e621.net/data/#{md5[0...2]}/#{md5[2...4]}/#{md5}.#{file_ext}"
post.description = row["description"]
post.rating = row["rating"]
post.score = row["score"].to_i
post.score_up = row["up_score"].to_i
post.score_down = row["down_score"].to_i
post.num_favorites = row["fav_count"].to_i
post.num_comments = row["comment_count"].to_i
post.change_seq = row["change_seq"].to_i
post.parent_e621_id = row["parent_id"]&.to_i
flags_array = []
flags_array << "deleted" if row["is_deleted"] == "t"
flags_array << "pending" if row["is_pending"] == "t"
flags_array << "flagged" if row["is_flagged"] == "t"
post.flags_array = flags_array
post.sources_array = row["source"].split(/[\n\s]/).map(&:strip)
post.tags_array = row["tag_string"].split(/[\n\s]/).map(&:strip).sort
name_to_tag_id, missing_tags =
Domain::E621::TagUtil.tag_names_to_id_map(post.tags_array, posts: [post])
name_to_tag_id.merge!(
Domain::E621::TagUtil.create_tags_from_names(missing_tags)
)
new_record = post.new_record?
Domain::E621::Post.transaction do
post.save!
Domain::E621::TagUtil.update_tags_on_post(
post,
post.tags_array,
name_to_tag_id
)
end
Domain::E621::Job::StaticFileJob.perform_later({ post: post }) if new_record
logger.info("updated post (new? #{new_record ? "yes" : "no"})")
new_record ? 1 : 0
rescue => e
logger.error("error importing post: #{e.message}")
0
end
end

View File

@@ -11,7 +11,7 @@ class Domain::Fa::PostPolicy < ApplicationPolicy
user&.admin? user&.admin?
end end
class Scope < Scope class Scope < ApplicationPolicy::Scope
def resolve def resolve
scope.all # All users can see posts exist in lists scope.all # All users can see posts exist in lists
end end

View File

@@ -20,7 +20,7 @@ class Domain::Fa::UserPolicy < ApplicationPolicy
user&.admin? user&.admin?
end end
class Scope < Scope class Scope < ApplicationPolicy::Scope
def resolve def resolve
scope.all # All users can see users exist in lists scope.all # All users can see users exist in lists
end end

View File

@@ -11,7 +11,7 @@ class Domain::Inkbunny::PostPolicy < ApplicationPolicy
user&.admin? user&.admin?
end end
class Scope < Scope class Scope < ApplicationPolicy::Scope
def resolve def resolve
scope.all # All users can see posts exist in lists scope.all # All users can see posts exist in lists
end end

View File

@@ -43,7 +43,7 @@ class GlobalStatePolicy < ApplicationPolicy
user.admin? user.admin?
end end
class Scope < Scope class Scope < ApplicationPolicy::Scope
def resolve def resolve
scope.all scope.all
end end

27
bin/tapioca Executable file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
#
# This file was generated by Bundler.
#
# The application 'tapioca' is installed as part of a gem, and
# this file is here to facilitate running it.
#
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
bundle_binstub = File.expand_path("bundle", __dir__)
if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end
require "rubygems"
require "bundler/setup"
load Gem.bin_path("tapioca", "tapioca")

10
sorbet/config Normal file
View File

@@ -0,0 +1,10 @@
--dir
.
--ignore=tmp/
--ignore=vendor/
--ignore=gems/rb-bsdiff
--suppress-payload-superclass-redefinition-for=Net::IMAP::Atom
--suppress-payload-superclass-redefinition-for=Net::IMAP::Literal
--suppress-payload-superclass-redefinition-for=Net::IMAP::MessageSet
--suppress-payload-superclass-redefinition-for=Net::IMAP::QuotedString
--suppress-payload-superclass-redefinition-for=Net::IMAP::RawData

1
sorbet/rbi/annotations/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
**/*.rbi linguist-vendored=true

10
sorbet/rbi/annotations/actionmailer.rbi vendored Normal file
View File

@@ -0,0 +1,10 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
class ActionMailer::Base
sig { params(headers: T.untyped, block: T.nilable(T.proc.params(arg0: ActionMailer::Collector).void)).returns(Mail::Message) }
def mail(headers = nil, &block); end
end

430
sorbet/rbi/annotations/actionpack.rbi vendored Normal file
View File

@@ -0,0 +1,430 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
class ActionController::API
MODULES = T.let(T.unsafe(nil), T::Array[T.untyped])
end
module ActionController::Flash::ClassMethods
sig { params(types: Symbol).void }
def add_flash_types(*types); end
end
module ActionController::Helpers::ClassMethods
sig { returns(ActionView::Base) }
def helpers; end
end
class ActionController::Metal < AbstractController::Base
sig { returns(ActionController::Parameters) }
def params; end
sig { returns(ActionDispatch::Request) }
def request; end
sig { returns(ActionDispatch::Response) }
def response; end
end
module ActionController::MimeResponds
sig { params(mimes: T.nilable(Symbol), block: T.nilable(T.proc.params(arg0: ActionController::MimeResponds::Collector).void)).void }
def respond_to(*mimes, &block); end
end
class ActionController::Parameters
sig { params(other: T.any(String, ActionController::Parameters)).returns(T::Boolean) }
def ==(other); end
sig { params(key: T.any(String, Symbol), value: T.untyped).void }
def []=(key, value); end
sig { returns(T.nilable(T::Array[T.any(String, Symbol)])) }
def always_permitted_parameters; end
sig { params(obj: T.nilable(T::Array[T.any(String, Symbol)])).void }
def always_permitted_parameters=(obj); end
sig { returns(T.untyped) }
def deep_dup; end
sig { params(key: T.any(String, Symbol), block: T.untyped).returns(T.untyped) }
def delete(key, &block); end
sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
def dig(*keys); end
sig { params(block: T.untyped).returns(T.untyped) }
def each_pair(&block); end
# each is an alias of each_pair
sig { params(block: T.untyped).returns(T.untyped) }
def each(&block); end
sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
def except(*keys); end
sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
def extract!(*keys); end
sig { params(key: T.any(String, Symbol), args: T.untyped).returns(T.untyped) }
def fetch(key, *args); end
sig { returns(String) }
def inspect; end
sig { params(other_hash: T.untyped, block: T.untyped).returns(ActionController::Parameters) }
def merge!(other_hash, &block); end
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
def merge(other_hash); end
sig { returns(T.untyped) }
def parameters; end
sig { returns(T.self_type) }
def permit!; end
# You can pass _a lot_ of stuff to permit, so filters is left untyped for now.
sig { params(filters: T.untyped).returns(ActionController::Parameters) }
def permit(*filters); end
sig { params(new_permitted: T.untyped).void }
def permitted=(new_permitted); end
sig { returns(T::Boolean) }
def permitted?; end
sig { params(block: T.untyped).returns(T.untyped) }
def reject!(&block); end
# delete_if is an alias of reject!
sig { params(block: T.untyped).returns(T.untyped) }
def delete_if(&block); end
sig { params(block: T.untyped).returns(T.untyped) }
def reject(&block); end
sig { params(key: T.any(String, Symbol)).returns(T.untyped) }
def [](key); end
sig { params(key: T.any(String, Symbol)).returns(ActionController::Parameters) }
sig { params(key: T::Array[T.any(String, Symbol)]).returns(T::Array[ActionController::Parameters]) }
def require(key); end
# required is an alias of require
sig { params(key: T.any(String, Symbol)).returns(ActionController::Parameters) }
sig { params(key: T::Array[T.any(String, Symbol)]).returns(T::Array[ActionController::Parameters]) }
def required(key); end
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
def reverse_merge!(other_hash); end
# with_defaults! is an alias of reverse_merge!
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
def with_defaults!(other_hash); end
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
def reverse_merge(other_hash); end
# with_defaults is an alias of reverse_merge
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
def with_defaults(other_hash); end
sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) }
def select!(&block); end
# keep_if is an alias of select!
sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) }
def keep_if(&block); end
sig { params(block: T.untyped).returns(ActionController::Parameters) }
def select(&block); end
sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
def slice!(*keys); end
sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
def slice(*keys); end
sig { params(block: T.nilable(Proc)).returns(ActiveSupport::HashWithIndifferentAccess) }
def to_h(&block); end
sig { returns(T::Hash[T.untyped, T.untyped]) }
def to_hash; end
# to_param is an alias of to_query
sig { params(args: String).returns(T.nilable(String)) }
def to_param(*args); end
sig { params(args: String).returns(T.nilable(String)) }
def to_query(*args); end
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
def to_unsafe_h; end
# to_unsafe_hash is an alias of to_unsafe_h
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
def to_unsafe_hash; end
sig { params(block: T.untyped).returns(ActionController::Parameters) }
def transform_keys!(&block); end
sig { params(block: T.untyped).returns(ActionController::Parameters) }
def transform_keys(&block); end
sig { returns(ActionController::Parameters) }
def transform_values!; end
sig { returns(ActionController::Parameters) }
def transform_values; end
sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
def values_at(*keys); end
sig { returns(T.any(Symbol, T::Boolean)) }
def self.action_on_unpermitted_parameters; end
sig { params(obj: T.any(Symbol, T::Boolean)).void }
def self.action_on_unpermitted_parameters=(obj); end
sig { returns(T::Array[T.any(String, Symbol)]) }
def self.always_permitted_parameters; end
sig { params(obj: T::Array[T.any(String, Symbol)]).void }
def self.always_permitted_parameters=(obj); end
sig { returns(T::Boolean) }
def self.permit_all_parameters; end
sig { params(obj: T::Boolean).void }
def self.permit_all_parameters=(obj); end
end
module ActionController::RequestForgeryProtection
sig { returns(T::Boolean) }
def protect_against_forgery?; end
sig { params(form_options: T::Hash[T.untyped, T.untyped]).returns(String) }
def form_authenticity_token(form_options: {}); end
end
module ActionController::RequestForgeryProtection::ClassMethods
sig { params(options: T::Hash[T.untyped, T.untyped]).void }
def skip_forgery_protection(options = T.unsafe(nil)); end
end
module ActionController::StrongParameters
sig { returns(ActionController::Parameters) }
def params; end
end
module ActionDispatch::Http::Parameters
sig { returns(ActionController::Parameters) }
def parameters; end
# params is an alias of parameters
sig { returns(ActionController::Parameters) }
def params; end
end
module ActionDispatch::Integration::Runner
# @method_missing: delegated to ActionDispatch::Integration::Session
sig { params(host: String).returns(String) }
def host!(host); end
# @method_missing: delegated to ActionDispatch::Integration::Session
sig { params(flag: T::Boolean).returns(T::Boolean) }
def https!(flag = true); end
end
class ActionDispatch::IntegrationTest
# The following methods are accessible on `IntegrationTest`
# through the following delegation chain:
# - `IntegrationTest` includes `IntegrationTest::Behavior`
# - `IntegrationTest::Behavior` includes `Integration::Runner`
# - `Integration::Runner#method_missing` delegates to `Integration::Session`
#
# Then `Integration::Session` either implements the methods
# directly or further delegates to `TestProcess` (included) or
# `TestResponse` / `Request` (via `delegate`).
#
# Cf. https://github.com/Shopify/rbi-central/pull/138 for more context.
# @method_missing: delegated to ActionDispatch::TestProcess
sig { returns(ActionDispatch::Flash::FlashHash) }
def flash; end
# @method_missing: delegated to ActionDispatch::TestProcess
sig { returns(ActionDispatch::Request::Session) }
def session; end
# @method_missing: delegated to ActionDispatch::TestResponse
sig { returns(T.nilable(Integer)) }
def status; end
# @method_missing: delegated to ActionDispatch::TestResponse
sig { returns(T.nilable(String)) }
def status_message; end
# @method_missing: delegated to ActionDispatch::TestResponse
sig { returns(ActionDispatch::Response::Header) }
def headers; end
# @method_missing: delegated to ActionDispatch::TestResponse
sig { returns(T.nilable(String)) }
def body; end
# @method_missing: delegated to ActionDispatch::TestResponse
sig { returns(T.nilable(T::Boolean)) }
def redirect?; end
# @method_missing: delegated to ActionDispatch::Request
sig { returns(T.nilable(String)) }
def path; end
# @method_missing: delegated to ActionDispatch::Integration::Session
sig { returns(String) }
def host; end
# @method_missing: delegated to ActionDispatch::Integration::Session
sig { params(host: String).returns(String) }
attr_writer :host
# @method_missing: delegated to ActionDispatch::Integration::Session
sig { returns(T.nilable(String)) }
attr_accessor :remote_addr
# @method_missing: delegated to ActionDispatch::Integration::Session
sig { returns(T.nilable(String)) }
attr_accessor :accept
# @method_missing: delegated to ActionDispatch::Integration::Session
sig { returns(Rack::Test::CookieJar) }
def cookies; end
# @method_missing: delegated to ActionDispatch::Integration::Session
sig { returns(T.nilable(ActionController::Base)) }
attr_reader :controller
# @method_missing: delegated to ActionDispatch::Integration::Session
sig { returns(ActionDispatch::TestRequest) }
attr_reader :request
# @method_missing: delegated to ActionDispatch::Integration::Session
sig { returns(ActionDispatch::TestResponse) }
attr_reader :response
# @method_missing: delegated to ActionDispatch::Integration::Session
sig { returns(Integer) }
attr_accessor :request_count
end
class ActionDispatch::Request
# Provides access to the request's HTTP headers, for example:
#
# ```ruby
# request.headers["Content-Type"] # => "text/plain"
# ```
sig { returns(ActionDispatch::Http::Headers) }
def headers; end
# Returns a `String` with the last requested path including their params.
#
# ```ruby
# # get '/foo'
# request.original_fullpath # => '/foo'
#
# # get '/foo?bar'
# request.original_fullpath # => '/foo?bar'
# ```
sig { returns(String) }
def original_fullpath; end
# Returns the `String` full path including params of the last URL requested.
#
# ```ruby
# # get "/articles"
# request.fullpath # => "/articles"
#
# # get "/articles?page=2"
# request.fullpath # => "/articles?page=2"
# ```
sig { returns(String) }
def fullpath; end
# Returns the original request URL as a `String`.
#
# ```ruby
# # get "/articles?page=2"
# request.original_url # => "http://www.example.com/articles?page=2"
# ```
sig { returns(String) }
def original_url; end
# The `String` MIME type of the request.
#
# ```
# # get "/articles"
# request.media_type # => "application/x-www-form-urlencoded"
# ```
sig { returns(String) }
def media_type; end
# Returns the content length of the request as an integer.
sig { returns(Integer) }
def content_length; end
# Returns the IP address of client as a `String`.
sig { returns(String) }
def ip; end
# Returns the IP address of client as a `String`,
# usually set by the RemoteIp middleware.
sig { returns(String) }
def remote_ip; end
# Returns the unique request id, which is based on either the X-Request-Id header that can
# be generated by a firewall, load balancer, or web server or by the RequestId middleware
# (which sets the action_dispatch.request_id environment variable).
#
# This unique ID is useful for tracing a request from end-to-end as part of logging or debugging.
# This relies on the Rack variable set by the ActionDispatch::RequestId middleware.
sig { returns(T.nilable(String)) }
def request_id; end
# Returns true if the request has a header matching the given key parameter.
#
# ```ruby
# request.key? :ip_spoofing_check # => true
# ```
sig { params(key: Symbol).returns(T::Boolean) }
def key?(key); end
# True if the request came from localhost, 127.0.0.1, or ::1.
sig { returns(T::Boolean) }
def local?; end
end
module ActionDispatch::Routing::Mapper::Resources
sig { params(name: T.untyped).returns(T.untyped) }
def action_path(name); end
sig { params(block: T.untyped).returns(T.untyped) }
def collection(&block); end
sig { params(block: T.untyped).returns(T.untyped) }
def member(&block); end
sig { returns(T.untyped) }
def shallow; end
sig { returns(T::Boolean) }
def shallow?; end
end
class ActionDispatch::Routing::RouteSet
sig { params(block: T.proc.bind(ActionDispatch::Routing::Mapper).void).void }
def draw(&block); end
end

75
sorbet/rbi/annotations/actionview.rbi vendored Normal file
View File

@@ -0,0 +1,75 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
module ActionView
TemplateError = T.type_alias { Template::Error }
class MissingTemplate < ActionView::ActionViewError
sig { returns(String) }
def path; end
end
end
class ActionView::Helpers::FormBuilder
sig { returns(T.untyped) }
def object; end
end
module ActionView::Helpers::NumberHelper
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
def number_to_currency(number, options = T.unsafe(nil)); end
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
def number_to_human(number, options = T.unsafe(nil)); end
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
def number_to_human_size(number, options = T.unsafe(nil)); end
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
def number_to_percentage(number, options = T.unsafe(nil)); end
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
def number_to_phone(number, options = T.unsafe(nil)); end
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
def number_with_delimiter(number, options = T.unsafe(nil)); end
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
def number_with_precision(number, options = T.unsafe(nil)); end
end
module ActionView::Helpers::SanitizeHelper
mixes_in_class_methods ActionView::Helpers::SanitizeHelper::ClassMethods
end
module ActionView::Helpers::UrlHelper
extend ActiveSupport::Concern
include ActionView::Helpers::TagHelper
mixes_in_class_methods ActionView::Helpers::UrlHelper::ClassMethods
sig { params(name: T.nilable(String), options: T.untyped, html_options: T.untyped, block: T.untyped).returns(ActiveSupport::SafeBuffer) }
def link_to(name = nil, options = nil, html_options = nil, &block); end
sig { params(condition: T.untyped, name: String, options: T.untyped, html_options: T.untyped, block: T.untyped).returns(T.untyped) }
def link_to_if(condition, name, options = {}, html_options = {}, &block); end
end
module ActionView::Layouts
mixes_in_class_methods ActionView::Layouts::ClassMethods
end
module ActionView::Rendering
mixes_in_class_methods ActionView::Rendering::ClassMethods
end
module ActionView::ViewPaths
mixes_in_class_methods ActionView::ViewPaths::ClassMethods
end
module ActionView::ViewPaths::ClassMethods
sig { params(value: T.any(String, T::Array[String])).void }
def append_view_path(value); end
end

44
sorbet/rbi/annotations/activejob.rbi vendored Normal file
View File

@@ -0,0 +1,44 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
class ActiveJob::Base
sig { params(blk: T.proc.bind(T.attached_class).params(job: T.attached_class, exception: Exception).void).void }
def self.after_discard(&blk); end
sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class).void)).void }
def self.after_enqueue(*filters, &blk); end
sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class).void)).void }
def self.after_perform(*filters, &blk); end
sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class, block: T.untyped).void)).void }
def self.around_enqueue(*filters, &blk); end
sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class, block: T.untyped).void)).void }
def self.around_perform(*filters, &blk); end
sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class).void)).void }
def self.before_enqueue(*filters, &blk); end
sig { params(filters: T.untyped, blk: T.nilable(T.proc.bind(T.attached_class).params(job: T.attached_class).void)).void }
def self.before_perform(*filters, &blk); end
sig { type_parameters(:ExceptionType).params(exceptions: T::Class[T.type_parameter(:ExceptionType)], block: T.nilable(T.proc.params(job: T.attached_class, error: T.type_parameter(:ExceptionType)).void)).void }
sig { params(exceptions: T.any(Module, String), block: T.nilable(T.proc.params(job: T.attached_class, error: T.untyped).void)).void }
def self.discard_on(*exceptions, &block); end
sig { params(klasses: T.any(Module, String), with: T.nilable(Symbol), block: T.nilable(T.proc.params(exception: T.untyped).void)).void }
def self.rescue_from(*klasses, with: nil, &block); end
sig { params(exceptions: T.any(Module, String), wait: T.any(ActiveSupport::Duration, Integer, Symbol, T.proc.params(executions: Integer).returns(Integer)), attempts: T.any(Integer, Symbol), queue: T.nilable(T.any(String, Symbol)), priority: T.untyped, jitter: Numeric, block: T.nilable(T.proc.params(job: T.attached_class, error: T.untyped).void)).void }
def self.retry_on(*exceptions, wait: 3.seconds, attempts: 5, queue: nil, priority: nil, jitter: ActiveJob::Exceptions::JITTER_DEFAULT, &block); end
sig { params(part_name: T.nilable(T.any(String, Symbol)), block: T.nilable(T.proc.bind(T.attached_class).returns(T.untyped))).void }
def self.queue_as(part_name = nil, &block); end
sig { params(priority: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).returns(T.untyped))).void }
def self.queue_with_priority(priority = nil, &block); end
end

89
sorbet/rbi/annotations/activemodel.rbi vendored Normal file
View File

@@ -0,0 +1,89 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
class ActiveModel::Errors
Elem = type_member { { fixed: ActiveModel::Error } }
sig { params(attribute: T.any(Symbol, String)).returns(T::Array[String]) }
def [](attribute); end
sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(ActiveModel::Error) }
def add(attribute, type = :invalid, **options); end
sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(T::Boolean) }
def added?(attribute, type = :invalid, options = {}); end
sig { params(options: T.untyped).returns(T::Hash[T.untyped, T.untyped]) }
def as_json(options = nil); end
sig { returns(T::Array[Symbol]) }
def attribute_names; end
sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(T.nilable(T::Array[String])) }
def delete(attribute, type = nil, **options); end
sig { returns(T::Hash[Symbol, T::Array[T::Hash[Symbol, T.untyped]]]) }
def details; end
sig { returns(T::Array[Elem]) }
def errors; end
sig { params(attribute: T.any(Symbol, String), message: String).returns(String) }
def full_message(attribute, message); end
sig { returns(T::Array[String]) }
def full_messages; end
sig { params(attribute: T.any(Symbol, String)).returns(T::Array[String]) }
def full_messages_for(attribute); end
sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(String) }
def generate_message(attribute, type = :invalid, options = {}); end
sig { returns(T::Hash[Symbol, T::Array[ActiveModel::Error]]) }
def group_by_attribute; end
sig { params(attribute: T.any(Symbol, String)).returns(T::Boolean) }
def has_key?(attribute); end
sig { params(error: ActiveModel::Error, override_options: T.untyped).returns(T::Array[ActiveModel::Error]) }
def import(error, override_options = {}); end
sig { params(attribute: T.any(Symbol, String)).returns(T::Boolean) }
def include?(attribute); end
sig { params(attribute: T.any(Symbol, String)).returns(T::Boolean) }
def key?(attribute); end
sig { params(other: T.untyped).returns(T::Array[ActiveModel::Error]) }
def merge!(other); end
sig { returns(T::Hash[Symbol, T::Array[String]]) }
def messages; end
sig { params(attribute: T.any(Symbol, String)).returns(T::Array[String]) }
def messages_for(attribute); end
sig { returns(T::Array[Elem]) }
def objects; end
sig { params(attribute: T.any(Symbol, String), type: T.untyped).returns(T::Boolean) }
def of_kind?(attribute, type = :invalid); end
sig { returns(T::Array[String]) }
def to_a; end
sig { params(full_messages: T.untyped).returns(T::Hash[Symbol, T::Array[String]]) }
def to_hash(full_messages = false); end
sig { params(attribute: T.any(Symbol, String), type: T.untyped, options: T.untyped).returns(T::Array[ActiveModel::Error]) }
def where(attribute, type = nil, **options); end
end
module ActiveModel::Validations
sig { returns(ActiveModel::Errors) }
def errors; end
end

98
sorbet/rbi/annotations/activerecord.rbi vendored Normal file
View File

@@ -0,0 +1,98 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
class ActiveRecord::Schema
sig { params(info: T::Hash[T.untyped, T.untyped], blk: T.proc.bind(ActiveRecord::Schema).void).void }
def self.define(info = nil, &blk); end
end
class ActiveRecord::Migration
# @shim: Methods on migration are delegated to `SchemaStatements` using `method_missing`
include ActiveRecord::ConnectionAdapters::SchemaStatements
# @shim: Methods on migration are delegated to `DatabaseStatements` using `method_missing`
include ActiveRecord::ConnectionAdapters::DatabaseStatements
end
class ActiveRecord::Base
sig { returns(FalseClass) }
def blank?; end
# @shim: since `present?` is always true, `presence` always returns `self`
sig { returns(T.self_type) }
def presence; end
sig { returns(TrueClass) }
def present?; end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.after_initialize(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.after_find(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.after_touch(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.before_validation(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.after_validation(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.before_save(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.around_save(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.after_save(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.before_create(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.around_create(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.after_create(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.before_update(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.around_update(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.after_update(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.before_destroy(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.around_destroy(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.after_destroy(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.after_commit(*args, **options, &block); end
sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
def self.after_rollback(*args, **options, &block); end
end
class ActiveRecord::Relation
Elem = type_member(:out) { { fixed: T.untyped } }
sig { returns(T::Boolean) }
def blank?; end
sig { abstract.params(blk: T.proc.params(arg0: Elem).returns(BasicObject)).returns(T.untyped) }
sig { abstract.returns(T::Enumerator[Elem]) }
def each(&blk); end
end

457
sorbet/rbi/annotations/activesupport.rbi vendored Normal file
View File

@@ -0,0 +1,457 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
module ActiveSupport::Testing::Declarative
sig { params(name: String, block: T.proc.bind(T.untyped).void).void }
def test(name, &block); end
end
class ActiveSupport::EnvironmentInquirer
sig { returns(T::Boolean) }
def development?; end
sig { returns(T::Boolean) }
def production?; end
sig { returns(T::Boolean) }
def test?; end
# @method_missing: delegated to String through ActiveSupport::StringInquirer
sig { returns(T::Boolean) }
def staging?; end
end
module ActiveSupport::Testing::SetupAndTeardown::ClassMethods
sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void }
def setup(*args, &block); end
sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void }
def teardown(*args, &block); end
end
class ActiveSupport::TestCase
sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void }
def self.setup(*args, &block); end
sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void }
def self.teardown(*args, &block); end
sig { params(name: String, block: T.proc.bind(T.attached_class).void).void }
def self.test(name, &block); end
end
class ActiveSupport::TimeWithZone
# @shim: Methods on ActiveSupport::TimeWithZone are delegated to `Time` using `method_missing
include ::DateAndTime::Zones
# @shim: Methods on ActiveSupport::TimeWithZone are delegated to `Time` using `method_missing
include ::DateAndTime::Calculations
sig { returns(FalseClass) }
def blank?; end
# @shim: since `present?` is always true, `presence` always returns `self`
sig { returns(T.self_type) }
def presence; end
# @shim: since `blank?` is always false, `present?` always returns `true`
sig { returns(TrueClass) }
def present?; end
end
class Object
sig { returns(T::Boolean) }
def blank?; end
sig { returns(FalseClass) }
def html_safe?; end
sig { returns(T.nilable(T.self_type)) }
def presence; end
sig { params(another_object: T.untyped).returns(T.nilable(T.self_type)) }
def presence_in(another_object); end
sig { returns(T::Boolean) }
def present?; end
end
class Hash
sig { returns(T::Boolean) }
def blank?; end
sig { returns(T::Boolean) }
def present?; end
sig { returns(T::Boolean) }
def extractable_options?; end
end
class Array
sig { returns(T::Boolean) }
def blank?; end
sig { returns(T::Boolean) }
def present?; end
sig { params(position: Integer).returns(T.self_type) }
def from(position); end
sig { params(position: Integer).returns(T.self_type) }
def to(position); end
sig { params(elements: T.untyped).returns(T::Array[T.untyped]) }
def including(*elements); end
sig { params(elements: T.untyped).returns(T.self_type) }
def excluding(*elements); end
sig { params(elements: T.untyped).returns(T.self_type) }
def without(*elements); end
sig { returns(T.nilable(Elem)) }
def second; end
sig { returns(T.nilable(Elem)) }
def third; end
sig { returns(T.nilable(Elem)) }
def fourth; end
sig { returns(T.nilable(Elem)) }
def fifth; end
sig { returns(T.nilable(Elem)) }
def forty_two; end
sig { returns(T.nilable(Elem)) }
def third_to_last; end
sig { returns(T.nilable(Elem)) }
def second_to_last; end
sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) }
def to_sentence(options = {}); end
sig { params(format: Symbol).returns(String) }
def to_fs(format = :default); end
sig { params(format: Symbol).returns(String) }
def to_formatted_s(format = :default); end
sig { returns(String) }
def to_xml; end
sig { returns(T::Hash[T.untyped, T.untyped]) }
def extract_options!; end
sig { type_parameters(:FillType).params(number: Integer, fill_with: T.type_parameter(:FillType), block: T.nilable(T.proc.params(group: T::Array[T.any(Elem, T.type_parameter(:FillType))]).void)).returns(T::Array[T::Array[T.any(Elem, T.type_parameter(:FillType))]]) }
def in_groups(number, fill_with = T.unsafe(nil), &block); end
sig { type_parameters(:FillType).params(number: Integer, fill_with: T.type_parameter(:FillType), block: T.nilable(T.proc.params(group: T::Array[T.any(Elem, T.type_parameter(:FillType))]).void)).returns(T::Array[T::Array[T.any(Elem, T.type_parameter(:FillType))]]) }
def in_groups_of(number, fill_with = T.unsafe(nil), &block); end
sig { params(value: T.untyped, block: T.nilable(T.proc.params(element: Elem).returns(T.untyped))).returns(T::Array[T::Array[Elem]]) }
def split(value = nil, &block); end
sig { params(block: T.nilable(T.proc.params(element: Elem).returns(T.untyped))).returns(T.any(T::Array[Elem], T::Enumerator[Elem])) }
def extract!(&block); end
sig { returns(ActiveSupport::ArrayInquirer) }
def inquiry; end
sig { params(object: T.untyped).returns(T::Array[T.untyped]) }
def self.wrap(object); end
end
class Date
sig { returns(FalseClass) }
def blank?; end
# @shim: since `present?` is always true, `presence` always returns `self`
sig { returns(T.self_type) }
def presence; end
# @shim: since `blank?` is always false, `present?` always returns `true`
sig { returns(TrueClass) }
def present?; end
end
class DateTime
sig { returns(FalseClass) }
def blank?; end
# @shim: since `present?` is always true, `presence` always returns `self`
sig { returns(T.self_type) }
def presence; end
# @shim: since `blank?` is always false, `present?` always returns `true`
sig { returns(TrueClass) }
def present?; end
end
class NilClass
sig { returns(TrueClass) }
def blank?; end
# @shim: since `present?` is always false, `presence` always returns `nil`
sig { returns(NilClass) }
def presence; end
# @shim: since `blank?` is always true, `present?` always returns `false`
sig { returns(FalseClass) }
def present?; end
end
class FalseClass
sig { returns(TrueClass) }
def blank?; end
# @shim: since `present?` is always false, `presence` always returns `nil`
sig { returns(NilClass) }
def presence; end
# @shim: since `blank?` is always true, `present?` always returns `false`
sig { returns(FalseClass) }
def present?; end
end
class TrueClass
sig { returns(FalseClass) }
def blank?; end
# @shim: since `present?` is always true, `presence` always returns `self`
sig { returns(T.self_type) }
def presence; end
# @shim: since `blank?` is always false, `present?` always returns `true`
sig { returns(TrueClass) }
def present?; end
end
class Numeric
sig { returns(FalseClass) }
def blank?; end
sig { returns(TrueClass) }
def html_safe?; end
# @shim: since `present?` is always true, `presence` always returns `self`
sig { returns(T.self_type) }
def presence; end
# @shim: since `blank?` is always false, `present?` always returns `true`
sig { returns(TrueClass) }
def present?; end
end
class Time
sig { returns(FalseClass) }
def blank?; end
# @shim: since `present?` is always true, `presence` always returns `self`
sig { returns(T.self_type) }
def presence; end
# @shim: since `blank?` is always false, `present?` always returns `true`
sig { returns(TrueClass) }
def present?; end
sig { returns(ActiveSupport::TimeZone) }
def self.zone; end
sig { returns(T.any(ActiveSupport::TimeWithZone, ::Time)) }
def self.current; end
end
class Symbol
sig { returns(T::Boolean) }
def blank?; end
sig { returns(T::Boolean) }
def present?; end
# alias for `#start_with?`
sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) }
def starts_with?(*string_or_regexp); end
# alias for `#end_with?`
sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) }
def ends_with?(*string_or_regexp); end
end
class String
sig { returns(TrueClass) }
def acts_like_string?; end
# This is the subset of `#[]` sigs that have just 1 parameter.
# https://github.com/sorbet/sorbet/blob/40ad87b4dc7be23fa00c1369ac9f927053c68907/rbi/core/string.rbi#L270-L303
sig { params(position: Integer).returns(T.nilable(String)) }
sig { params(position: T.any(T::Range[Integer], Regexp)).returns(T.nilable(String)) }
sig { params(position: String).returns(T.nilable(String)) }
def at(position); end
sig { returns(String) }
def as_json; end
sig { returns(T::Boolean) }
def blank?; end
sig { params(first_letter: Symbol).returns(String) }
def camelcase(first_letter = :upper); end
sig { params(first_letter: Symbol).returns(String) }
def camelize(first_letter = :upper); end
sig { returns(String) }
def classify; end
sig { returns(T.untyped) }
def constantize; end
sig { returns(String) }
def dasherize; end
sig { returns(String) }
def deconstantize; end
sig { returns(String) }
def demodulize; end
# alias for `#end_with?`
sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) }
def ends_with?(*string_or_regexp); end
sig { returns(String) }
def downcase_first; end
sig { params(string: String).returns(T::Boolean) }
def exclude?(string); end
sig { params(limit: Integer).returns(String) }
def first(limit = 1); end
sig { params(separate_class_name_and_id_with_underscore: T::Boolean).returns(String) }
def foreign_key(separate_class_name_and_id_with_underscore = true); end
sig { params(position: Integer).returns(String) }
def from(position); end
sig { returns(ActiveSupport::SafeBuffer) }
def html_safe; end
sig { params(capitalize: T::Boolean, keep_id_suffix: T::Boolean).returns(String) }
def humanize(capitalize: true, keep_id_suffix: false); end
sig { params(zone: T.nilable(T.any(ActiveSupport::TimeZone, String))).returns(T.any(ActiveSupport::TimeWithZone, Time)) }
def in_time_zone(zone = ::Time.zone); end
sig { params(amount: Integer, indent_string: T.nilable(String), indent_empty_lines: T::Boolean).returns(String) }
def indent(amount, indent_string = nil, indent_empty_lines = false); end
sig { params(amount: Integer, indent_string: T.nilable(String), indent_empty_lines: T::Boolean).returns(T.nilable(String)) }
def indent!(amount, indent_string = nil, indent_empty_lines = false); end
sig { returns(ActiveSupport::StringInquirer) }
def inquiry; end
sig { returns(T::Boolean) }
def is_utf8?; end
sig { params(limit: Integer).returns(String) }
def last(limit = 1); end
sig { returns(ActiveSupport::Multibyte::Chars) }
def mb_chars; end
sig { params(separator: String, preserve_case: T::Boolean, locale: T.nilable(Symbol)).returns(String) }
def parameterize(separator: "-", preserve_case: false, locale: nil); end
sig { params(count: T.nilable(T.any(Integer, Symbol)), locale: T.nilable(Symbol)).returns(String) }
def pluralize(count = nil, locale = :en); end
sig { returns(T::Boolean) }
def present?; end
sig { params(patterns: T.any(String, Regexp)).returns(String) }
def remove(*patterns); end
sig { params(patterns: T.any(String, Regexp)).returns(String) }
def remove!(*patterns); end
sig { returns(T.untyped) }
def safe_constantize; end
sig { params(locale: Symbol).returns(String) }
def singularize(locale = :en); end
sig { returns(String) }
def squish; end
sig { returns(String) }
def squish!; end
# alias for `#start_with?`
sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) }
def starts_with?(*string_or_regexp); end
sig { returns(String) }
def strip_heredoc; end
sig { returns(String) }
def tableize; end
sig { params(keep_id_suffix: T::Boolean).returns(String) }
def titlecase(keep_id_suffix: false); end
sig { params(keep_id_suffix: T::Boolean).returns(String) }
def titleize(keep_id_suffix: false); end
sig { params(position: Integer).returns(String) }
def to(position); end
sig { returns(::Date) }
def to_date; end
sig { returns(::DateTime) }
def to_datetime; end
sig { params(form: T.nilable(Symbol)).returns(T.nilable(Time)) }
def to_time(form = :local); end
sig { params(truncate_to: Integer, options: T::Hash[Symbol, T.anything]).returns(String) }
def truncate(truncate_to, options = {}); end
sig { params(truncate_to: Integer, omission: T.nilable(String)).returns(String) }
def truncate_bytes(truncate_to, omission: "…"); end
sig { params(words_count: Integer, options: T::Hash[Symbol, T.anything]).returns(String) }
def truncate_words(words_count, options = {}); end
sig { returns(String) }
def underscore; end
sig { returns(String) }
def upcase_first; end
end
class ActiveSupport::ErrorReporter
# @version >= 7.1.0.beta1
sig { type_parameters(:Block, :Fallback).params(error_classes: T.class_of(Exception), severity: T.nilable(Symbol), context: T.nilable(T::Hash[Symbol, T.untyped]), fallback: T.nilable(T.proc.returns(T.type_parameter(:Fallback))), source: T.nilable(String), blk: T.proc.returns(T.type_parameter(:Block))).returns(T.any(T.type_parameter(:Block), T.type_parameter(:Fallback))) }
def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil), &blk); end
# @version >= 7.1.0.beta1
sig { type_parameters(:Block).params(error_classes: T.class_of(Exception), severity: T.nilable(Symbol), context: T.nilable(T::Hash[Symbol, T.untyped]), source: T.nilable(String), blk: T.proc.returns(T.type_parameter(:Block))).returns(T.type_parameter(:Block)) }
def record(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil), &blk); end
# @version >= 7.1.0.beta1
sig { params(error: Exception, handled: T::Boolean, severity: T.nilable(Symbol), context: T::Hash[Symbol, T.untyped], source: T.nilable(String)).void }
def report(error, handled: true, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end
# @version >= 7.2.0.beta1
sig { params(error: T.any(Exception, String), severity: T.nilable(Symbol), context: T::Hash[Symbol, T.untyped], source: T.nilable(String)).void }
def unexpected(error, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end
end

121
sorbet/rbi/annotations/colorize.rbi vendored Normal file
View File

@@ -0,0 +1,121 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
class String
extend Colorize::ClassMethods
include Colorize::InstanceMethods
sig { returns(String) }
def black; end
sig { returns(String) }
def blink; end
sig { returns(String) }
def blue; end
sig { returns(String) }
def bold; end
sig { returns(String) }
def cyan; end
sig { returns(String) }
def green; end
sig { returns(String) }
def hide; end
sig { returns(String) }
def italic; end
sig { returns(String) }
def light_black; end
sig { returns(String) }
def light_blue; end
sig { returns(String) }
def light_cyan; end
sig { returns(String) }
def light_green; end
sig { returns(String) }
def light_magenta; end
sig { returns(String) }
def light_red; end
sig { returns(String) }
def light_white; end
sig { returns(String) }
def light_yellow; end
sig { returns(String) }
def magenta; end
sig { returns(String) }
def on_black; end
sig { returns(String) }
def on_blue; end
sig { returns(String) }
def on_cyan; end
sig { returns(String) }
def on_green; end
sig { returns(String) }
def on_light_black; end
sig { returns(String) }
def on_light_blue; end
sig { returns(String) }
def on_light_cyan; end
sig { returns(String) }
def on_light_green; end
sig { returns(String) }
def on_light_magenta; end
sig { returns(String) }
def on_light_red; end
sig { returns(String) }
def on_light_white; end
sig { returns(String) }
def on_light_yellow; end
sig { returns(String) }
def on_magenta; end
sig { returns(String) }
def on_red; end
sig { returns(String) }
def on_white; end
sig { returns(String) }
def on_yellow; end
sig { returns(String) }
def red; end
sig { returns(String) }
def underline; end
sig { returns(String) }
def white; end
sig { returns(String) }
def yellow; end
end

168
sorbet/rbi/annotations/devise.rbi vendored Normal file
View File

@@ -0,0 +1,168 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
# @shim: Devise controllers are loaded by rails
class DeviseController
sig { returns(T.untyped) }
def resource; end
# Proxy to devise map name
sig { returns(String) }
def resource_name; end
sig { returns(String) }
def scope_name; end
# Proxy to devise map class
sig { returns(T::Class[T.anything]) }
def resource_class; end
# Returns a signed in resource from session (if one exists)
sig { returns(T.untyped) }
def signed_in_resource; end
# Attempt to find the mapped route for devise based on request path
sig { returns(T.untyped) }
def devise_mapping; end
sig { returns(T.untyped) }
def navigational_formats; end
sig { returns(ActionController::Parameters) }
def resource_params; end
sig { returns(String) }
def translation_scope; end
end
# @shim: Devise controllers are loaded by rails
class Devise::ConfirmationsController < DeviseController
sig { returns(T.untyped) }
def new; end
# POST /resource/confirmation
sig { returns(T.untyped) }
def create; end
# GET /resource/confirmation?confirmation_token=abcdef
sig { returns(T.untyped) }
def show; end
end
# @shim: Devise controllers are loaded by rails
class Devise::PasswordsController < DeviseController
# GET /resource/password/new
sig { returns(T.untyped) }
def new; end
# POST /resource/password
sig { returns(T.untyped) }
def create; end
# GET /resource/password/edit?reset_password_token=abcdef
sig { returns(T.untyped) }
def edit; end
# PUT /resource/password
sig { returns(T.untyped) }
def update; end
end
# @shim: Devise controllers are loaded by rails
class Devise::RegistrationsController < DeviseController
sig { returns(T.untyped) }
def new; end
# POST /resource
sig { returns(T.untyped) }
def create; end
# GET /resource/edit
sig { returns(T.untyped) }
def edit; end
# PUT /resource
# We need to use a copy of the resource because we don't want to change
# the current user in place.
sig { returns(T.untyped) }
def update; end
# DELETE /resource
sig { returns(T.untyped) }
def destroy; end
# GET /resource/cancel
# Forces the session data which is usually expired after sign
# in to be expired now. This is useful if the user wants to
# cancel oauth signing in/up in the middle of the process,
# removing all OAuth session data.
sig { returns(T.untyped) }
def cancel; end
end
# @shim: Devise controllers are loaded by rails
class Devise::SessionsController < DeviseController
# GET /resource/sign_in
sig { returns(T.untyped) }
def new; end
# POST /resource/sign_in
sig { returns(T.untyped) }
def create; end
# DELETE /resource/sign_out
sig { returns(T.untyped) }
def destroy; end
sig { returns(ActionController::Parameters) }
def sign_in_params; end
end
# @shim: Devise controllers are loaded by rails
class Devise::UnlocksController < DeviseController
# GET /resource/unlock/new
sig { returns(T.untyped) }
def new; end
# POST /resource/unlock
sig { returns(T.untyped) }
def create; end
# GET /resource/unlock?unlock_token=abcdef
sig { returns(T.untyped) }
def show; end
# The path used after sending unlock password instructions
sig { params(resource: T.untyped).returns(String) }
def after_sending_unlock_instructions_path_for(resource); end
# The path used after unlocking the resource
sig { params(resource: T.untyped).returns(String) }
def after_unlock_path_for(resource); end
end
# @shim: Devise controllers are loaded by rails
class Devise::OmniauthCallbacksController < DeviseController
# GET|POST /resource/auth/provider
sig { returns(T.untyped) }
def passthru; end
# GET|POST /resource/auth/provider/callback
sig { returns(T.untyped) }
def failure; end
sig { returns(String) }
def failed_strategy; end
sig { returns(String) }
def failure_message; end
sig { params(scope: String).returns(String) }
def after_omniauth_failure_path_for(scope); end
sig { returns(String) }
def translation_scope; end
end

30
sorbet/rbi/annotations/globalid.rbi vendored Normal file
View File

@@ -0,0 +1,30 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
class ActiveRecord::Base
# @shim: this is included at runtime https://github.com/rails/globalid/blob/v1.0.0/lib/global_id/railtie.rb#L38
include GlobalID::Identification
end
module GlobalID::Identification
sig { params(options: T::Hash[T.untyped, T.untyped]).returns(GlobalID) }
def to_gid(options = {}); end
sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) }
def to_gid_param(options = {}); end
sig { params(options: T::Hash[T.untyped, T.untyped]).returns(GlobalID) }
def to_global_id(options = {}); end
sig { params(options: T::Hash[T.untyped, T.untyped]).returns(SignedGlobalID) }
def to_sgid(options = {}); end
sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) }
def to_sgid_param(options = {}); end
sig { params(options: T::Hash[T.untyped, T.untyped]).returns(SignedGlobalID) }
def to_signed_global_id(options = {}); end
end

119
sorbet/rbi/annotations/minitest.rbi vendored Normal file
View File

@@ -0,0 +1,119 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
module Minitest::Assertions
sig { params(test: T.anything, msg: T.anything).returns(TrueClass) }
def assert(test, msg = nil); end
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
def assert_empty(obj, msg = nil); end
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
def assert_equal(exp, act, msg = nil); end
sig { params(exp: T.anything, act: T.anything, delta: Numeric, msg: T.anything).returns(TrueClass) }
def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = nil); end
sig { params(a: T.anything, b: T.anything, epsilon: Numeric, msg: T.anything).returns(TrueClass) }
def assert_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = nil); end
sig { params(collection: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
def assert_includes(collection, obj, msg = nil); end
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
def assert_instance_of(cls, obj, msg = nil); end
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
def assert_kind_of(cls, obj, msg = nil); end
sig { params(matcher: T.any(String, Regexp), obj: T.anything, msg: T.anything).returns(MatchData) }
def assert_match(matcher, obj, msg = nil); end
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
def assert_nil(obj, msg = nil); end
sig { params(o1: T.anything, op: T.any(Symbol, String), o2: T.anything, msg: T.anything).returns(TrueClass) }
def assert_operator(o1, op, o2 = T.unsafe(nil), msg = nil); end
sig { params(stdout: T.nilable(T.any(String, Regexp)), stderr: T.nilable(T.any(String, Regexp)), block: T.proc.void).returns(T::Boolean) }
def assert_output(stdout = nil, stderr = nil, &block); end
sig { params(path: T.any(String, Pathname), msg: T.anything).returns(TrueClass) }
def assert_path_exists(path, msg = nil); end
sig { params(block: T.proc.void).returns(TrueClass) }
def assert_pattern(&block); end
sig { params(o1: T.anything, op: T.any(String, Symbol), msg: T.anything).returns(TrueClass) }
def assert_predicate(o1, op, msg = nil); end
sig { params(exp: NilClass, block: T.proc.void).returns(StandardError) }
sig { type_parameters(:T).params(exp: T.any(T::Class[T.type_parameter(:T)], Regexp, String), block: T.proc.void).returns(T.type_parameter(:T)) }
def assert_raises(*exp, &block); end
sig { params(obj: T.anything, meth: T.any(String, Symbol), msg: T.anything, include_all: T::Boolean).returns(TrueClass) }
def assert_respond_to(obj, meth, msg = nil, include_all: false); end
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
def assert_same(exp, act, msg = nil); end
sig { params(send_ary: T::Array[T.anything], m: T.anything).returns(T::Boolean) }
def assert_send(send_ary, m = nil); end
sig { params(block: T.proc.void).returns(T::Boolean) }
def assert_silent(&block); end
sig { params(sym: Symbol, msg: T.anything, block: T.proc.void).returns(T.anything) }
def assert_throws(sym, msg = nil, &block); end
sig { params(test: T.anything, msg: T.anything).returns(TrueClass) }
def refute(test, msg = nil); end
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
def refute_empty(obj, msg = nil); end
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
def refute_equal(exp, act, msg = nil); end
sig { params(exp: T.anything, act: T.anything, delta: Numeric, msg: T.anything).returns(TrueClass) }
def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = nil); end
sig { params(a: T.anything, b: T.anything, epsilon: Numeric, msg: T.anything).returns(TrueClass) }
def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = nil); end
sig { params(collection: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
def refute_includes(collection, obj, msg = nil); end
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
def refute_instance_of(cls, obj, msg = nil); end
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
def refute_kind_of(cls, obj, msg = nil); end
sig { params(matcher: T.any(String, Regexp), obj: T.anything, msg: T.anything).returns(TrueClass) }
def refute_match(matcher, obj, msg = nil); end
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
def refute_nil(obj, msg = nil); end
sig { params(block: T.proc.void).returns(TrueClass) }
def refute_pattern(&block); end
sig { params(o1: T.anything, op: T.any(Symbol, String), o2: T.anything, msg: T.anything).returns(TrueClass) }
def refute_operator(o1, op, o2 = T.unsafe(nil), msg = nil); end
sig { params(path: T.any(String, Pathname), msg: T.anything).returns(TrueClass) }
def refute_path_exists(path, msg = nil); end
sig { params(o1: T.anything, op: T.any(String, Symbol), msg: T.anything).returns(TrueClass) }
def refute_predicate(o1, op, msg = nil); end
sig { params(obj: T.anything, meth: T.any(String, Symbol), msg: T.anything, include_all: T::Boolean).returns(TrueClass) }
def refute_respond_to(obj, meth, msg = nil, include_all: false); end
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
def refute_same(exp, act, msg = nil); end
end

13
sorbet/rbi/annotations/pundit.rbi vendored Normal file
View File

@@ -0,0 +1,13 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
module Pundit::Authorization
sig { void }
def skip_authorization; end
sig { void }
def skip_policy_scope; end
end

61
sorbet/rbi/annotations/railties.rbi vendored Normal file
View File

@@ -0,0 +1,61 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
module Rails
class << self
sig { returns(Rails::Application) }
def application; end
sig { returns(ActiveSupport::BacktraceCleaner) }
def backtrace_cleaner; end
sig { returns(ActiveSupport::Cache::Store) }
def cache; end
sig { returns(ActiveSupport::EnvironmentInquirer) }
def env; end
sig { returns(ActiveSupport::ErrorReporter) }
def error; end
sig { returns(ActiveSupport::Logger) }
def logger; end
sig { returns(Pathname) }
def root; end
sig { returns(String) }
def version; end
end
end
class Rails::Application < ::Rails::Engine
class << self
sig { params(block: T.proc.bind(Rails::Application).void).void }
def configure(&block); end
end
sig { params(block: T.proc.bind(Rails::Application).void).void }
def configure(&block); end
sig { returns(T.untyped) }
def config; end
end
class Rails::Engine < ::Rails::Railtie
sig { params(block: T.untyped).returns(ActionDispatch::Routing::RouteSet) }
def routes(&block); end
end
class Rails::Railtie
sig { params(block: T.proc.bind(Rails::Railtie).void).void }
def configure(&block); end
end
class Rails::Railtie::Configuration
sig { params(blk: T.proc.bind(ActiveSupport::Reloader).void).void }
def to_prepare(&blk); end
end

269
sorbet/rbi/annotations/rainbow.rbi vendored Normal file
View File

@@ -0,0 +1,269 @@
# typed: true
# DO NOT EDIT MANUALLY
# This file was pulled from a central RBI files repository.
# Please run `bin/tapioca annotations` to update it.
module Rainbow
# @shim: https://github.com/sickill/rainbow/blob/master/lib/rainbow.rb#L10-L12
sig { returns(T::Boolean) }
attr_accessor :enabled
class Color
sig { returns(Symbol) }
attr_reader :ground
sig { params(ground: Symbol, values: T.any([Integer], [Integer, Integer, Integer])).returns(Color) }
def self.build(ground, values); end
sig { params(hex: String).returns([Integer, Integer, Integer]) }
def self.parse_hex_color(hex); end
class Indexed < Rainbow::Color
sig { returns(Integer) }
attr_reader :num
sig { params(ground: Symbol, num: Integer).void }
def initialize(ground, num); end
sig { returns(T::Array[Integer]) }
def codes; end
end
class Named < Rainbow::Color::Indexed
NAMES = T.let(nil, T::Hash[Symbol, Integer])
sig { params(ground: Symbol, name: Symbol).void }
def initialize(ground, name); end
sig { returns(T::Array[Symbol]) }
def self.color_names; end
sig { returns(String) }
def self.valid_names; end
end
class RGB < Rainbow::Color::Indexed
sig { returns(Integer) }
attr_reader :r, :g, :b
sig { params(ground: Symbol, values: Integer).void }
def initialize(ground, *values); end
sig { returns(T::Array[Integer]) }
def codes; end
sig { params(value: Numeric).returns(Integer) }
def self.to_ansi_domain(value); end
end
class X11Named < Rainbow::Color::RGB
include Rainbow::X11ColorNames
sig { params(ground: Symbol, name: Symbol).void }
def initialize(ground, name); end
sig { returns(T::Array[Symbol]) }
def self.color_names; end
sig { returns(String) }
def self.valid_names; end
end
end
sig { returns(Wrapper) }
def self.global; end
sig { returns(T::Boolean) }
def self.enabled; end
sig { params(value: T::Boolean).returns(T::Boolean) }
def self.enabled=(value); end
sig { params(string: String).returns(String) }
def self.uncolor(string); end
class NullPresenter < String
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
def color(*values); end
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
def foreground(*values); end
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
def fg(*values); end
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
def background(*values); end
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
def bg(*values); end
sig { returns(NullPresenter) }
def reset; end
sig { returns(NullPresenter) }
def bright; end
sig { returns(NullPresenter) }
def faint; end
sig { returns(NullPresenter) }
def italic; end
sig { returns(NullPresenter) }
def underline; end
sig { returns(NullPresenter) }
def blink; end
sig { returns(NullPresenter) }
def inverse; end
sig { returns(NullPresenter) }
def hide; end
sig { returns(NullPresenter) }
def cross_out; end
sig { returns(NullPresenter) }
def black; end
sig { returns(NullPresenter) }
def red; end
sig { returns(NullPresenter) }
def green; end
sig { returns(NullPresenter) }
def yellow; end
sig { returns(NullPresenter) }
def blue; end
sig { returns(NullPresenter) }
def magenta; end
sig { returns(NullPresenter) }
def cyan; end
sig { returns(NullPresenter) }
def white; end
sig { returns(NullPresenter) }
def bold; end
sig { returns(NullPresenter) }
def dark; end
sig { returns(NullPresenter) }
def strike; end
end
class Presenter < String
TERM_EFFECTS = T.let(nil, T::Hash[Symbol, Integer])
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
def color(*values); end
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
def foreground(*values); end
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
def fg(*values); end
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
def background(*values); end
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
def bg(*values); end
sig { returns(Presenter) }
def reset; end
sig { returns(Presenter) }
def bright; end
sig { returns(Presenter) }
def faint; end
sig { returns(Presenter) }
def italic; end
sig { returns(Presenter) }
def underline; end
sig { returns(Presenter) }
def blink; end
sig { returns(Presenter) }
def inverse; end
sig { returns(Presenter) }
def hide; end
sig { returns(Presenter) }
def cross_out; end
sig { returns(Presenter) }
def black; end
sig { returns(Presenter) }
def red; end
sig { returns(Presenter) }
def green; end
sig { returns(Presenter) }
def yellow; end
sig { returns(Presenter) }
def blue; end
sig { returns(Presenter) }
def magenta; end
sig { returns(Presenter) }
def cyan; end
sig { returns(Presenter) }
def white; end
sig { returns(Presenter) }
def bold; end
sig { returns(Presenter) }
def dark; end
sig { returns(Presenter) }
def strike; end
end
class StringUtils
sig { params(string: String, codes: T::Array[Integer]).returns(String) }
def self.wrap_with_sgr(string, codes); end
sig { params(string: String).returns(String) }
def self.uncolor(string); end
end
VERSION = T.let(nil, String)
class Wrapper
sig { returns(T::Boolean) }
attr_accessor :enabled
sig { params(enabled: T::Boolean).void }
def initialize(enabled = true); end
sig { params(string: String).returns(T.any(Rainbow::Presenter, Rainbow::NullPresenter)) }
def wrap(string); end
end
module X11ColorNames
NAMES = T.let(nil, T::Hash[Symbol, [Integer, Integer, Integer]])
end
end
sig { params(string: String).returns(Rainbow::Presenter) }
def Rainbow(string); end

1
sorbet/rbi/gems/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
**/*.rbi linguist-generated=true

3161
sorbet/rbi/gems/actioncable@7.2.2.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

1846
sorbet/rbi/gems/actionmailbox@7.2.2.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

2666
sorbet/rbi/gems/actionmailer@7.2.2.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

21235
sorbet/rbi/gems/actionpack@7.2.2.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

1857
sorbet/rbi/gems/actiontext@7.2.2.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

15803
sorbet/rbi/gems/actionview@7.2.2.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

2828
sorbet/rbi/gems/activejob@7.2.2.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

6762
sorbet/rbi/gems/activemodel@7.2.2.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

46542
sorbet/rbi/gems/activerecord@7.2.2.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

3615
sorbet/rbi/gems/activestorage@7.2.2.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

21177
sorbet/rbi/gems/activesupport@7.2.2.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

1994
sorbet/rbi/gems/addressable@2.8.7.rbi generated Normal file

File diff suppressed because it is too large Load Diff

509
sorbet/rbi/gems/base64@0.2.0.rbi generated Normal file
View File

@@ -0,0 +1,509 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `base64` gem.
# Please instead update this file by running `bin/tapioca gem base64`.
# \Module \Base64 provides methods for:
#
# - Encoding a binary string (containing non-ASCII characters)
# as a string of printable ASCII characters.
# - Decoding such an encoded string.
#
# \Base64 is commonly used in contexts where binary data
# is not allowed or supported:
#
# - Images in HTML or CSS files, or in URLs.
# - Email attachments.
#
# A \Base64-encoded string is about one-third larger that its source.
# See the {Wikipedia article}[https://en.wikipedia.org/wiki/Base64]
# for more information.
#
# This module provides three pairs of encode/decode methods.
# Your choices among these methods should depend on:
#
# - Which character set is to be used for encoding and decoding.
# - Whether "padding" is to be used.
# - Whether encoded strings are to contain newlines.
#
# Note: Examples on this page assume that the including program has executed:
#
# require 'base64'
#
# == Encoding Character Sets
#
# A \Base64-encoded string consists only of characters from a 64-character set:
#
# - <tt>('A'..'Z')</tt>.
# - <tt>('a'..'z')</tt>.
# - <tt>('0'..'9')</tt>.
# - <tt>=</tt>, the 'padding' character.
# - Either:
# - <tt>%w[+ /]</tt>:
# {RFC-2045-compliant}[https://datatracker.ietf.org/doc/html/rfc2045];
# _not_ safe for URLs.
# - <tt>%w[- _]</tt>:
# {RFC-4648-compliant}[https://datatracker.ietf.org/doc/html/rfc4648];
# safe for URLs.
#
# If you are working with \Base64-encoded strings that will come from
# or be put into URLs, you should choose this encoder-decoder pair
# of RFC-4648-compliant methods:
#
# - Base64.urlsafe_encode64 and Base64.urlsafe_decode64.
#
# Otherwise, you may choose any of the pairs in this module,
# including the pair above, or the RFC-2045-compliant pairs:
#
# - Base64.encode64 and Base64.decode64.
# - Base64.strict_encode64 and Base64.strict_decode64.
#
# == Padding
#
# \Base64-encoding changes a triplet of input bytes
# into a quartet of output characters.
#
# <b>Padding in Encode Methods</b>
#
# Padding -- extending an encoded string with zero, one, or two trailing
# <tt>=</tt> characters -- is performed by methods Base64.encode64,
# Base64.strict_encode64, and, by default, Base64.urlsafe_encode64:
#
# Base64.encode64('s') # => "cw==\n"
# Base64.strict_encode64('s') # => "cw=="
# Base64.urlsafe_encode64('s') # => "cw=="
# Base64.urlsafe_encode64('s', padding: false) # => "cw"
#
# When padding is performed, the encoded string is always of length <em>4n</em>,
# where +n+ is a non-negative integer:
#
# - Input bytes of length <em>3n</em> generate unpadded output characters
# of length <em>4n</em>:
#
# # n = 1: 3 bytes => 4 characters.
# Base64.strict_encode64('123') # => "MDEy"
# # n = 2: 6 bytes => 8 characters.
# Base64.strict_encode64('123456') # => "MDEyMzQ1"
#
# - Input bytes of length <em>3n+1</em> generate padded output characters
# of length <em>4(n+1)</em>, with two padding characters at the end:
#
# # n = 1: 4 bytes => 8 characters.
# Base64.strict_encode64('1234') # => "MDEyMw=="
# # n = 2: 7 bytes => 12 characters.
# Base64.strict_encode64('1234567') # => "MDEyMzQ1Ng=="
#
# - Input bytes of length <em>3n+2</em> generate padded output characters
# of length <em>4(n+1)</em>, with one padding character at the end:
#
# # n = 1: 5 bytes => 8 characters.
# Base64.strict_encode64('12345') # => "MDEyMzQ="
# # n = 2: 8 bytes => 12 characters.
# Base64.strict_encode64('12345678') # => "MDEyMzQ1Njc="
#
# When padding is suppressed, for a positive integer <em>n</em>:
#
# - Input bytes of length <em>3n</em> generate unpadded output characters
# of length <em>4n</em>:
#
# # n = 1: 3 bytes => 4 characters.
# Base64.urlsafe_encode64('123', padding: false) # => "MDEy"
# # n = 2: 6 bytes => 8 characters.
# Base64.urlsafe_encode64('123456', padding: false) # => "MDEyMzQ1"
#
# - Input bytes of length <em>3n+1</em> generate unpadded output characters
# of length <em>4n+2</em>, with two padding characters at the end:
#
# # n = 1: 4 bytes => 6 characters.
# Base64.urlsafe_encode64('1234', padding: false) # => "MDEyMw"
# # n = 2: 7 bytes => 10 characters.
# Base64.urlsafe_encode64('1234567', padding: false) # => "MDEyMzQ1Ng"
#
# - Input bytes of length <em>3n+2</em> generate unpadded output characters
# of length <em>4n+3</em>, with one padding character at the end:
#
# # n = 1: 5 bytes => 7 characters.
# Base64.urlsafe_encode64('12345', padding: false) # => "MDEyMzQ"
# # m = 2: 8 bytes => 11 characters.
# Base64.urlsafe_encode64('12345678', padding: false) # => "MDEyMzQ1Njc"
#
# <b>Padding in Decode Methods</b>
#
# All of the \Base64 decode methods support (but do not require) padding.
#
# \Method Base64.decode64 does not check the size of the padding:
#
# Base64.decode64("MDEyMzQ1Njc") # => "01234567"
# Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
# Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
#
# \Method Base64.strict_decode64 strictly enforces padding size:
#
# Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
# Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
#
# \Method Base64.urlsafe_decode64 allows padding in +str+,
# which if present, must be correct:
# see {Padding}[Base64.html#module-Base64-label-Padding], above:
#
# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
# Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
# Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
#
# == Newlines
#
# An encoded string returned by Base64.encode64 or Base64.urlsafe_encode64
# has an embedded newline character
# after each 60-character sequence, and, if non-empty, at the end:
#
# # No newline if empty.
# encoded = Base64.encode64("\x00" * 0)
# encoded.index("\n") # => nil
#
# # Newline at end of short output.
# encoded = Base64.encode64("\x00" * 1)
# encoded.size # => 4
# encoded.index("\n") # => 4
#
# # Newline at end of longer output.
# encoded = Base64.encode64("\x00" * 45)
# encoded.size # => 60
# encoded.index("\n") # => 60
#
# # Newlines embedded and at end of still longer output.
# encoded = Base64.encode64("\x00" * 46)
# encoded.size # => 65
# encoded.rindex("\n") # => 65
# encoded.split("\n").map {|s| s.size } # => [60, 4]
#
# The string to be encoded may itself contain newlines,
# which are encoded as \Base64:
#
# # Base64.encode64("\n\n\n") # => "CgoK\n"
# s = "This is line 1\nThis is line 2\n"
# Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
#
# source://base64//lib/base64.rb#184
module Base64
private
# Returns a string containing the decoding of an RFC-2045-compliant
# \Base64-encoded string +str+:
#
# s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
# Base64.decode64(s) # => "This is line 1\nThis is line 2\n"
#
# Non-\Base64 characters in +str+ are ignored;
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
# these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
#
# Base64.decode64("\x00\n-_") # => ""
#
# Padding in +str+ (even if incorrect) is ignored:
#
# Base64.decode64("MDEyMzQ1Njc") # => "01234567"
# Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
# Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
#
# source://base64//lib/base64.rb#241
def decode64(str); end
# Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
#
# Per RFC 2045, the returned string may contain the URL-unsafe characters
# <tt>+</tt> or <tt>/</tt>;
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
#
# Base64.encode64("\xFB\xEF\xBE") # => "++++\n"
# Base64.encode64("\xFF\xFF\xFF") # => "////\n"
#
# The returned string may include padding;
# see {Padding}[Base64.html#module-Base64-label-Padding] above.
#
# Base64.encode64('*') # => "Kg==\n"
#
# The returned string ends with a newline character, and if sufficiently long
# will have one or more embedded newline characters;
# see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
#
# Base64.encode64('*') # => "Kg==\n"
# Base64.encode64('*' * 46)
# # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n"
#
# The string to be encoded may itself contain newlines,
# which will be encoded as ordinary \Base64:
#
# Base64.encode64("\n\n\n") # => "CgoK\n"
# s = "This is line 1\nThis is line 2\n"
# Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
#
# source://base64//lib/base64.rb#219
def encode64(bin); end
# Returns a string containing the decoding of an RFC-2045-compliant
# \Base64-encoded string +str+:
#
# s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
# Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n"
#
# Non-\Base64 characters in +str+ not allowed;
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
# these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
#
# Base64.strict_decode64("\n") # Raises ArgumentError
# Base64.strict_decode64('-') # Raises ArgumentError
# Base64.strict_decode64('_') # Raises ArgumentError
#
# Padding in +str+, if present, must be correct:
#
# Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
# Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
#
# source://base64//lib/base64.rb#297
def strict_decode64(str); end
# Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
#
# Per RFC 2045, the returned string may contain the URL-unsafe characters
# <tt>+</tt> or <tt>/</tt>;
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
#
# Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n"
# Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n"
#
# The returned string may include padding;
# see {Padding}[Base64.html#module-Base64-label-Padding] above.
#
# Base64.strict_encode64('*') # => "Kg==\n"
#
# The returned string will have no newline characters, regardless of its length;
# see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
#
# Base64.strict_encode64('*') # => "Kg=="
# Base64.strict_encode64('*' * 46)
# # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
#
# The string to be encoded may itself contain newlines,
# which will be encoded as ordinary \Base64:
#
# Base64.strict_encode64("\n\n\n") # => "CgoK"
# s = "This is line 1\nThis is line 2\n"
# Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
#
# source://base64//lib/base64.rb#273
def strict_encode64(bin); end
# Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+:
#
# +str+ may not contain non-Base64 characters;
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
#
# Base64.urlsafe_decode64('+') # Raises ArgumentError.
# Base64.urlsafe_decode64('/') # Raises ArgumentError.
# Base64.urlsafe_decode64("\n") # Raises ArgumentError.
#
# Padding in +str+, if present, must be correct:
# see {Padding}[Base64.html#module-Base64-label-Padding], above:
#
# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
# Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
# Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
#
# source://base64//lib/base64.rb#351
def urlsafe_decode64(str); end
# Returns the RFC-4648-compliant \Base64-encoding of +bin+.
#
# Per RFC 4648, the returned string will not contain the URL-unsafe characters
# <tt>+</tt> or <tt>/</tt>,
# but instead may contain the URL-safe characters
# <tt>-</tt> and <tt>_</tt>;
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
#
# Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----"
# Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____"
#
# By default, the returned string may have padding;
# see {Padding}[Base64.html#module-Base64-label-Padding], above:
#
# Base64.urlsafe_encode64('*') # => "Kg=="
#
# Optionally, you can suppress padding:
#
# Base64.urlsafe_encode64('*', padding: false) # => "Kg"
#
# The returned string will have no newline characters, regardless of its length;
# see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
#
# Base64.urlsafe_encode64('*') # => "Kg=="
# Base64.urlsafe_encode64('*' * 46)
# # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
#
# source://base64//lib/base64.rb#328
def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
class << self
# Returns a string containing the decoding of an RFC-2045-compliant
# \Base64-encoded string +str+:
#
# s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
# Base64.decode64(s) # => "This is line 1\nThis is line 2\n"
#
# Non-\Base64 characters in +str+ are ignored;
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
# these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
#
# Base64.decode64("\x00\n-_") # => ""
#
# Padding in +str+ (even if incorrect) is ignored:
#
# Base64.decode64("MDEyMzQ1Njc") # => "01234567"
# Base64.decode64("MDEyMzQ1Njc=") # => "01234567"
# Base64.decode64("MDEyMzQ1Njc==") # => "01234567"
#
# source://base64//lib/base64.rb#241
def decode64(str); end
# Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
#
# Per RFC 2045, the returned string may contain the URL-unsafe characters
# <tt>+</tt> or <tt>/</tt>;
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
#
# Base64.encode64("\xFB\xEF\xBE") # => "++++\n"
# Base64.encode64("\xFF\xFF\xFF") # => "////\n"
#
# The returned string may include padding;
# see {Padding}[Base64.html#module-Base64-label-Padding] above.
#
# Base64.encode64('*') # => "Kg==\n"
#
# The returned string ends with a newline character, and if sufficiently long
# will have one or more embedded newline characters;
# see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
#
# Base64.encode64('*') # => "Kg==\n"
# Base64.encode64('*' * 46)
# # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq\nKg==\n"
#
# The string to be encoded may itself contain newlines,
# which will be encoded as ordinary \Base64:
#
# Base64.encode64("\n\n\n") # => "CgoK\n"
# s = "This is line 1\nThis is line 2\n"
# Base64.encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK\n"
#
# source://base64//lib/base64.rb#219
def encode64(bin); end
# Returns a string containing the decoding of an RFC-2045-compliant
# \Base64-encoded string +str+:
#
# s = "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
# Base64.strict_decode64(s) # => "This is line 1\nThis is line 2\n"
#
# Non-\Base64 characters in +str+ not allowed;
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
# these include newline characters and characters <tt>-</tt> and <tt>/</tt>:
#
# Base64.strict_decode64("\n") # Raises ArgumentError
# Base64.strict_decode64('-') # Raises ArgumentError
# Base64.strict_decode64('_') # Raises ArgumentError
#
# Padding in +str+, if present, must be correct:
#
# Base64.strict_decode64("MDEyMzQ1Njc") # Raises ArgumentError
# Base64.strict_decode64("MDEyMzQ1Njc=") # => "01234567"
# Base64.strict_decode64("MDEyMzQ1Njc==") # Raises ArgumentError
#
# source://base64//lib/base64.rb#297
def strict_decode64(str); end
# Returns a string containing the RFC-2045-compliant \Base64-encoding of +bin+.
#
# Per RFC 2045, the returned string may contain the URL-unsafe characters
# <tt>+</tt> or <tt>/</tt>;
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
#
# Base64.strict_encode64("\xFB\xEF\xBE") # => "++++\n"
# Base64.strict_encode64("\xFF\xFF\xFF") # => "////\n"
#
# The returned string may include padding;
# see {Padding}[Base64.html#module-Base64-label-Padding] above.
#
# Base64.strict_encode64('*') # => "Kg==\n"
#
# The returned string will have no newline characters, regardless of its length;
# see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
#
# Base64.strict_encode64('*') # => "Kg=="
# Base64.strict_encode64('*' * 46)
# # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
#
# The string to be encoded may itself contain newlines,
# which will be encoded as ordinary \Base64:
#
# Base64.strict_encode64("\n\n\n") # => "CgoK"
# s = "This is line 1\nThis is line 2\n"
# Base64.strict_encode64(s) # => "VGhpcyBpcyBsaW5lIDEKVGhpcyBpcyBsaW5lIDIK"
#
# source://base64//lib/base64.rb#273
def strict_encode64(bin); end
# Returns the decoding of an RFC-4648-compliant \Base64-encoded string +str+:
#
# +str+ may not contain non-Base64 characters;
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
#
# Base64.urlsafe_decode64('+') # Raises ArgumentError.
# Base64.urlsafe_decode64('/') # Raises ArgumentError.
# Base64.urlsafe_decode64("\n") # Raises ArgumentError.
#
# Padding in +str+, if present, must be correct:
# see {Padding}[Base64.html#module-Base64-label-Padding], above:
#
# Base64.urlsafe_decode64("MDEyMzQ1Njc") # => "01234567"
# Base64.urlsafe_decode64("MDEyMzQ1Njc=") # => "01234567"
# Base64.urlsafe_decode64("MDEyMzQ1Njc==") # Raises ArgumentError.
#
# source://base64//lib/base64.rb#351
def urlsafe_decode64(str); end
# Returns the RFC-4648-compliant \Base64-encoding of +bin+.
#
# Per RFC 4648, the returned string will not contain the URL-unsafe characters
# <tt>+</tt> or <tt>/</tt>,
# but instead may contain the URL-safe characters
# <tt>-</tt> and <tt>_</tt>;
# see {Encoding Character Set}[Base64.html#module-Base64-label-Encoding+Character+Sets] above:
#
# Base64.urlsafe_encode64("\xFB\xEF\xBE") # => "----"
# Base64.urlsafe_encode64("\xFF\xFF\xFF") # => "____"
#
# By default, the returned string may have padding;
# see {Padding}[Base64.html#module-Base64-label-Padding], above:
#
# Base64.urlsafe_encode64('*') # => "Kg=="
#
# Optionally, you can suppress padding:
#
# Base64.urlsafe_encode64('*', padding: false) # => "Kg"
#
# The returned string will have no newline characters, regardless of its length;
# see {Newlines}[Base64.html#module-Base64-label-Newlines] above:
#
# Base64.urlsafe_encode64('*') # => "Kg=="
# Base64.urlsafe_encode64('*' * 46)
# # => "KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg=="
#
# source://base64//lib/base64.rb#328
def urlsafe_encode64(bin, padding: T.unsafe(nil)); end
end
end
# source://base64//lib/base64.rb#186
Base64::VERSION = T.let(T.unsafe(nil), String)

272
sorbet/rbi/gems/bcrypt@3.1.20.rbi generated Normal file
View File

@@ -0,0 +1,272 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `bcrypt` gem.
# Please instead update this file by running `bin/tapioca gem bcrypt`.
# A Ruby library implementing OpenBSD's bcrypt()/crypt_blowfish algorithm for
# hashing passwords.
#
# source://bcrypt//lib/bcrypt.rb#3
module BCrypt; end
# A Ruby wrapper for the bcrypt() C extension calls and the Java calls.
#
# source://bcrypt//lib/bcrypt/engine.rb#3
class BCrypt::Engine
class << self
# Autodetects the cost from the salt string.
#
# source://bcrypt//lib/bcrypt/engine.rb#129
def autodetect_cost(salt); end
# Returns the cost factor which will result in computation times less than +upper_time_limit_in_ms+.
#
# Example:
#
# BCrypt::Engine.calibrate(200) #=> 10
# BCrypt::Engine.calibrate(1000) #=> 12
#
# # should take less than 200ms
# BCrypt::Password.create("woo", :cost => 10)
#
# # should take less than 1000ms
# BCrypt::Password.create("woo", :cost => 12)
#
# source://bcrypt//lib/bcrypt/engine.rb#119
def calibrate(upper_time_limit_in_ms); end
# Returns the cost factor that will be used if one is not specified when
# creating a password hash. Defaults to DEFAULT_COST if not set.
#
# source://bcrypt//lib/bcrypt/engine.rb#32
def cost; end
# Set a default cost factor that will be used if one is not specified when
# creating a password hash.
#
# Example:
#
# BCrypt::Engine::DEFAULT_COST #=> 12
# BCrypt::Password.create('secret').cost #=> 12
#
# BCrypt::Engine.cost = 8
# BCrypt::Password.create('secret').cost #=> 8
#
# # cost can still be overridden as needed
# BCrypt::Password.create('secret', :cost => 6).cost #=> 6
#
# source://bcrypt//lib/bcrypt/engine.rb#49
def cost=(cost); end
# Generates a random salt with a given computational cost.
#
# source://bcrypt//lib/bcrypt/engine.rb#81
def generate_salt(cost = T.unsafe(nil)); end
# Given a secret and a valid salt (see BCrypt::Engine.generate_salt) calculates
# a bcrypt() password hash. Secrets longer than 72 bytes are truncated.
#
# source://bcrypt//lib/bcrypt/engine.rb#55
def hash_secret(secret, salt, _ = T.unsafe(nil)); end
# Returns true if +salt+ is a valid bcrypt() salt, false if not.
#
# @return [Boolean]
#
# source://bcrypt//lib/bcrypt/engine.rb#98
def valid_salt?(salt); end
# Returns true if +secret+ is a valid bcrypt() secret, false if not.
#
# @return [Boolean]
#
# source://bcrypt//lib/bcrypt/engine.rb#103
def valid_secret?(secret); end
private
def __bc_crypt(_arg0, _arg1); end
def __bc_salt(_arg0, _arg1, _arg2); end
end
end
# The default computational expense parameter.
#
# source://bcrypt//lib/bcrypt/engine.rb#5
BCrypt::Engine::DEFAULT_COST = T.let(T.unsafe(nil), Integer)
# The maximum cost supported by the algorithm.
#
# source://bcrypt//lib/bcrypt/engine.rb#9
BCrypt::Engine::MAX_COST = T.let(T.unsafe(nil), Integer)
# Maximum possible size of bcrypt() salts.
#
# source://bcrypt//lib/bcrypt/engine.rb#19
BCrypt::Engine::MAX_SALT_LENGTH = T.let(T.unsafe(nil), Integer)
# Maximum possible size of bcrypt() secrets.
# Older versions of the bcrypt library would truncate passwords longer
# than 72 bytes, but newer ones do not. We truncate like the old library for
# forward compatibility. This way users upgrading from Ubuntu 18.04 to 20.04
# will not have their user passwords invalidated, for example.
# A max secret length greater than 255 leads to bcrypt returning nil.
# https://github.com/bcrypt-ruby/bcrypt-ruby/issues/225#issuecomment-875908425
#
# source://bcrypt//lib/bcrypt/engine.rb#17
BCrypt::Engine::MAX_SECRET_BYTESIZE = T.let(T.unsafe(nil), Integer)
# The minimum cost supported by the algorithm.
#
# source://bcrypt//lib/bcrypt/engine.rb#7
BCrypt::Engine::MIN_COST = T.let(T.unsafe(nil), Integer)
# source://bcrypt//lib/bcrypt/error.rb#3
class BCrypt::Error < ::StandardError; end
# source://bcrypt//lib/bcrypt/error.rb#6
module BCrypt::Errors; end
# The cost parameter provided to bcrypt() is invalid.
#
# source://bcrypt//lib/bcrypt/error.rb#15
class BCrypt::Errors::InvalidCost < ::BCrypt::Error; end
# The hash parameter provided to bcrypt() is invalid.
#
# source://bcrypt//lib/bcrypt/error.rb#12
class BCrypt::Errors::InvalidHash < ::BCrypt::Error; end
# The salt parameter provided to bcrypt() is invalid.
#
# source://bcrypt//lib/bcrypt/error.rb#9
class BCrypt::Errors::InvalidSalt < ::BCrypt::Error; end
# The secret parameter provided to bcrypt() is invalid.
#
# source://bcrypt//lib/bcrypt/error.rb#18
class BCrypt::Errors::InvalidSecret < ::BCrypt::Error; end
# A password management class which allows you to safely store users' passwords and compare them.
#
# Example usage:
#
# include BCrypt
#
# # hash a user's password
# @password = Password.create("my grand secret")
# @password #=> "$2a$12$C5.FIvVDS9W4AYZ/Ib37YuWd/7ozp1UaMhU28UKrfSxp2oDchbi3K"
#
# # store it safely
# @user.update_attribute(:password, @password)
#
# # read it back
# @user.reload!
# @db_password = Password.new(@user.password)
#
# # compare it after retrieval
# @db_password == "my grand secret" #=> true
# @db_password == "a paltry guess" #=> false
#
# source://bcrypt//lib/bcrypt/password.rb#23
class BCrypt::Password < ::String
# Initializes a BCrypt::Password instance with the data from a stored hash.
#
# @return [Password] a new instance of Password
#
# source://bcrypt//lib/bcrypt/password.rb#55
def initialize(raw_hash); end
# Compares a potential secret against the hash. Returns true if the secret is the original secret, false otherwise.
#
# Comparison edge case/gotcha:
#
# secret = "my secret"
# @password = BCrypt::Password.create(secret)
#
# @password == secret # => True
# @password == @password # => False
# @password == @password.to_s # => False
# @password.to_s == @password # => True
# @password.to_s == @password.to_s # => True
#
# source://bcrypt//lib/bcrypt/password.rb#76
def ==(secret); end
# The hash portion of the stored password hash.
#
# source://bcrypt//lib/bcrypt/password.rb#25
def checksum; end
# The cost factor used to create the hash.
#
# source://bcrypt//lib/bcrypt/password.rb#31
def cost; end
# Compares a potential secret against the hash. Returns true if the secret is the original secret, false otherwise.
#
# Comparison edge case/gotcha:
#
# secret = "my secret"
# @password = BCrypt::Password.create(secret)
#
# @password == secret # => True
# @password == @password # => False
# @password == @password.to_s # => False
# @password.to_s == @password # => True
# @password.to_s == @password.to_s # => True
#
# source://bcrypt//lib/bcrypt/password.rb#76
def is_password?(secret); end
# The salt of the store password hash (including version and cost).
#
# source://bcrypt//lib/bcrypt/password.rb#27
def salt; end
# The version of the bcrypt() algorithm used to create the hash.
#
# source://bcrypt//lib/bcrypt/password.rb#29
def version; end
private
# call-seq:
# split_hash(raw_hash) -> version, cost, salt, hash
#
# Splits +h+ into version, cost, salt, and hash and returns them in that order.
#
# source://bcrypt//lib/bcrypt/password.rb#92
def split_hash(h); end
# Returns true if +h+ is a valid hash.
#
# @return [Boolean]
#
# source://bcrypt//lib/bcrypt/password.rb#84
def valid_hash?(h); end
class << self
# Hashes a secret, returning a BCrypt::Password instance. Takes an optional <tt>:cost</tt> option, which is a
# logarithmic variable which determines how computational expensive the hash is to calculate (a <tt>:cost</tt> of
# 4 is twice as much work as a <tt>:cost</tt> of 3). The higher the <tt>:cost</tt> the harder it becomes for
# attackers to try to guess passwords (even if a copy of your database is stolen), but the slower it is to check
# users' passwords.
#
# Example:
#
# @password = BCrypt::Password.create("my secret", :cost => 13)
#
# @raise [ArgumentError]
#
# source://bcrypt//lib/bcrypt/password.rb#43
def create(secret, options = T.unsafe(nil)); end
# @return [Boolean]
#
# source://bcrypt//lib/bcrypt/password.rb#49
def valid_hash?(h); end
end
end

618
sorbet/rbi/gems/benchmark@0.4.0.rbi generated Normal file
View File

@@ -0,0 +1,618 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `benchmark` gem.
# Please instead update this file by running `bin/tapioca gem benchmark`.
# The Benchmark module provides methods to measure and report the time
# used to execute Ruby code.
#
# * Measure the time to construct the string given by the expression
# <code>"a"*1_000_000_000</code>:
#
# require 'benchmark'
#
# puts Benchmark.measure { "a"*1_000_000_000 }
#
# On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates:
#
# 0.350000 0.400000 0.750000 ( 0.835234)
#
# This report shows the user CPU time, system CPU time, the sum of
# the user and system CPU times, and the elapsed real time. The unit
# of time is seconds.
#
# * Do some experiments sequentially using the #bm method:
#
# require 'benchmark'
#
# n = 5000000
# Benchmark.bm do |x|
# x.report { for i in 1..n; a = "1"; end }
# x.report { n.times do ; a = "1"; end }
# x.report { 1.upto(n) do ; a = "1"; end }
# end
#
# The result:
#
# user system total real
# 1.010000 0.000000 1.010000 ( 1.014479)
# 1.000000 0.000000 1.000000 ( 0.998261)
# 0.980000 0.000000 0.980000 ( 0.981335)
#
# * Continuing the previous example, put a label in each report:
#
# require 'benchmark'
#
# n = 5000000
# Benchmark.bm(7) do |x|
# x.report("for:") { for i in 1..n; a = "1"; end }
# x.report("times:") { n.times do ; a = "1"; end }
# x.report("upto:") { 1.upto(n) do ; a = "1"; end }
# end
#
# The result:
#
# user system total real
# for: 1.010000 0.000000 1.010000 ( 1.015688)
# times: 1.000000 0.000000 1.000000 ( 1.003611)
# upto: 1.030000 0.000000 1.030000 ( 1.028098)
#
# * The times for some benchmarks depend on the order in which items
# are run. These differences are due to the cost of memory
# allocation and garbage collection. To avoid these discrepancies,
# the #bmbm method is provided. For example, to compare ways to
# sort an array of floats:
#
# require 'benchmark'
#
# array = (1..1000000).map { rand }
#
# Benchmark.bmbm do |x|
# x.report("sort!") { array.dup.sort! }
# x.report("sort") { array.dup.sort }
# end
#
# The result:
#
# Rehearsal -----------------------------------------
# sort! 1.490000 0.010000 1.500000 ( 1.490520)
# sort 1.460000 0.000000 1.460000 ( 1.463025)
# -------------------------------- total: 2.960000sec
#
# user system total real
# sort! 1.460000 0.000000 1.460000 ( 1.460465)
# sort 1.450000 0.010000 1.460000 ( 1.448327)
#
# * Report statistics of sequential experiments with unique labels,
# using the #benchmark method:
#
# require 'benchmark'
# include Benchmark # we need the CAPTION and FORMAT constants
#
# n = 5000000
# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
# tf = x.report("for:") { for i in 1..n; a = "1"; end }
# tt = x.report("times:") { n.times do ; a = "1"; end }
# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
# [tf+tt+tu, (tf+tt+tu)/3]
# end
#
# The result:
#
# user system total real
# for: 0.950000 0.000000 0.950000 ( 0.952039)
# times: 0.980000 0.000000 0.980000 ( 0.984938)
# upto: 0.950000 0.000000 0.950000 ( 0.946787)
# >total: 2.880000 0.000000 2.880000 ( 2.883764)
# >avg: 0.960000 0.000000 0.960000 ( 0.961255)
#
# source://benchmark//lib/benchmark.rb#122
module Benchmark
private
# Invokes the block with a Benchmark::Report object, which
# may be used to collect and report on the results of individual
# benchmark tests. Reserves +label_width+ leading spaces for
# labels on each line. Prints +caption+ at the top of the
# report, and uses +format+ to format each line.
# (Note: +caption+ must contain a terminating newline character,
# see the default Benchmark::Tms::CAPTION for an example.)
#
# Returns an array of Benchmark::Tms objects.
#
# If the block returns an array of
# Benchmark::Tms objects, these will be used to format
# additional lines of output. If +labels+ parameter are
# given, these are used to label these extra lines.
#
# _Note_: Other methods provide a simpler interface to this one, and are
# suitable for nearly all benchmarking requirements. See the examples in
# Benchmark, and the #bm and #bmbm methods.
#
# Example:
#
# require 'benchmark'
# include Benchmark # we need the CAPTION and FORMAT constants
#
# n = 5000000
# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
# tf = x.report("for:") { for i in 1..n; a = "1"; end }
# tt = x.report("times:") { n.times do ; a = "1"; end }
# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
# [tf+tt+tu, (tf+tt+tu)/3]
# end
#
# Generates:
#
# user system total real
# for: 0.970000 0.000000 0.970000 ( 0.970493)
# times: 0.990000 0.000000 0.990000 ( 0.989542)
# upto: 0.970000 0.000000 0.970000 ( 0.972854)
# >total: 2.930000 0.000000 2.930000 ( 2.932889)
# >avg: 0.976667 0.000000 0.976667 ( 0.977630)
#
# source://benchmark//lib/benchmark.rb#170
def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end
# A simple interface to the #benchmark method, #bm generates sequential
# reports with labels. +label_width+ and +labels+ parameters have the same
# meaning as for #benchmark.
#
# require 'benchmark'
#
# n = 5000000
# Benchmark.bm(7) do |x|
# x.report("for:") { for i in 1..n; a = "1"; end }
# x.report("times:") { n.times do ; a = "1"; end }
# x.report("upto:") { 1.upto(n) do ; a = "1"; end }
# end
#
# Generates:
#
# user system total real
# for: 0.960000 0.000000 0.960000 ( 0.957966)
# times: 0.960000 0.000000 0.960000 ( 0.960423)
# upto: 0.950000 0.000000 0.950000 ( 0.954864)
#
# source://benchmark//lib/benchmark.rb#215
def bm(label_width = T.unsafe(nil), *labels, &blk); end
# Sometimes benchmark results are skewed because code executed
# earlier encounters different garbage collection overheads than
# that run later. #bmbm attempts to minimize this effect by running
# the tests twice, the first time as a rehearsal in order to get the
# runtime environment stable, the second time for
# real. GC.start is executed before the start of each of
# the real timings; the cost of this is not included in the
# timings. In reality, though, there's only so much that #bmbm can
# do, and the results are not guaranteed to be isolated from garbage
# collection and other effects.
#
# Because #bmbm takes two passes through the tests, it can
# calculate the required label width.
#
# require 'benchmark'
#
# array = (1..1000000).map { rand }
#
# Benchmark.bmbm do |x|
# x.report("sort!") { array.dup.sort! }
# x.report("sort") { array.dup.sort }
# end
#
# Generates:
#
# Rehearsal -----------------------------------------
# sort! 1.440000 0.010000 1.450000 ( 1.446833)
# sort 1.440000 0.000000 1.440000 ( 1.448257)
# -------------------------------- total: 2.890000sec
#
# user system total real
# sort! 1.460000 0.000000 1.460000 ( 1.458065)
# sort 1.450000 0.000000 1.450000 ( 1.455963)
#
# #bmbm yields a Benchmark::Job object and returns an array of
# Benchmark::Tms objects.
#
# source://benchmark//lib/benchmark.rb#257
def bmbm(width = T.unsafe(nil)); end
# Returns the time used to execute the given block as a
# Benchmark::Tms object. Takes +label+ option.
#
# require 'benchmark'
#
# n = 1000000
#
# time = Benchmark.measure do
# n.times { a = "1" }
# end
# puts time
#
# Generates:
#
# 0.220000 0.000000 0.220000 ( 0.227313)
#
# source://benchmark//lib/benchmark.rb#302
def measure(label = T.unsafe(nil)); end
# Returns the elapsed real time used to execute the given block.
# The unit of time is seconds.
#
# Benchmark.realtime { "a" * 1_000_000_000 }
# #=> 0.5098029999935534
#
# source://benchmark//lib/benchmark.rb#321
def realtime; end
class << self
# Invokes the block with a Benchmark::Report object, which
# may be used to collect and report on the results of individual
# benchmark tests. Reserves +label_width+ leading spaces for
# labels on each line. Prints +caption+ at the top of the
# report, and uses +format+ to format each line.
# (Note: +caption+ must contain a terminating newline character,
# see the default Benchmark::Tms::CAPTION for an example.)
#
# Returns an array of Benchmark::Tms objects.
#
# If the block returns an array of
# Benchmark::Tms objects, these will be used to format
# additional lines of output. If +labels+ parameter are
# given, these are used to label these extra lines.
#
# _Note_: Other methods provide a simpler interface to this one, and are
# suitable for nearly all benchmarking requirements. See the examples in
# Benchmark, and the #bm and #bmbm methods.
#
# Example:
#
# require 'benchmark'
# include Benchmark # we need the CAPTION and FORMAT constants
#
# n = 5000000
# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
# tf = x.report("for:") { for i in 1..n; a = "1"; end }
# tt = x.report("times:") { n.times do ; a = "1"; end }
# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
# [tf+tt+tu, (tf+tt+tu)/3]
# end
#
# Generates:
#
# user system total real
# for: 0.970000 0.000000 0.970000 ( 0.970493)
# times: 0.990000 0.000000 0.990000 ( 0.989542)
# upto: 0.970000 0.000000 0.970000 ( 0.972854)
# >total: 2.930000 0.000000 2.930000 ( 2.932889)
# >avg: 0.976667 0.000000 0.976667 ( 0.977630)
#
# source://benchmark//lib/benchmark.rb#170
def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end
# A simple interface to the #benchmark method, #bm generates sequential
# reports with labels. +label_width+ and +labels+ parameters have the same
# meaning as for #benchmark.
#
# require 'benchmark'
#
# n = 5000000
# Benchmark.bm(7) do |x|
# x.report("for:") { for i in 1..n; a = "1"; end }
# x.report("times:") { n.times do ; a = "1"; end }
# x.report("upto:") { 1.upto(n) do ; a = "1"; end }
# end
#
# Generates:
#
# user system total real
# for: 0.960000 0.000000 0.960000 ( 0.957966)
# times: 0.960000 0.000000 0.960000 ( 0.960423)
# upto: 0.950000 0.000000 0.950000 ( 0.954864)
#
# source://benchmark//lib/benchmark.rb#215
def bm(label_width = T.unsafe(nil), *labels, &blk); end
# Sometimes benchmark results are skewed because code executed
# earlier encounters different garbage collection overheads than
# that run later. #bmbm attempts to minimize this effect by running
# the tests twice, the first time as a rehearsal in order to get the
# runtime environment stable, the second time for
# real. GC.start is executed before the start of each of
# the real timings; the cost of this is not included in the
# timings. In reality, though, there's only so much that #bmbm can
# do, and the results are not guaranteed to be isolated from garbage
# collection and other effects.
#
# Because #bmbm takes two passes through the tests, it can
# calculate the required label width.
#
# require 'benchmark'
#
# array = (1..1000000).map { rand }
#
# Benchmark.bmbm do |x|
# x.report("sort!") { array.dup.sort! }
# x.report("sort") { array.dup.sort }
# end
#
# Generates:
#
# Rehearsal -----------------------------------------
# sort! 1.440000 0.010000 1.450000 ( 1.446833)
# sort 1.440000 0.000000 1.440000 ( 1.448257)
# -------------------------------- total: 2.890000sec
#
# user system total real
# sort! 1.460000 0.000000 1.460000 ( 1.458065)
# sort 1.450000 0.000000 1.450000 ( 1.455963)
#
# #bmbm yields a Benchmark::Job object and returns an array of
# Benchmark::Tms objects.
#
# source://benchmark//lib/benchmark.rb#257
def bmbm(width = T.unsafe(nil)); end
# Returns the time used to execute the given block as a
# Benchmark::Tms object. Takes +label+ option.
#
# require 'benchmark'
#
# n = 1000000
#
# time = Benchmark.measure do
# n.times { a = "1" }
# end
# puts time
#
# Generates:
#
# 0.220000 0.000000 0.220000 ( 0.227313)
#
# source://benchmark//lib/benchmark.rb#302
def measure(label = T.unsafe(nil)); end
# Returns the elapsed real time used to execute the given block.
# The unit of time is seconds.
#
# Benchmark.realtime { "a" * 1_000_000_000 }
# #=> 0.5098029999935534
#
# source://benchmark//lib/benchmark.rb#321
def realtime; end
end
end
# A Job is a sequence of labelled blocks to be processed by the
# Benchmark.bmbm method. It is of little direct interest to the user.
#
# source://benchmark//lib/benchmark.rb#333
class Benchmark::Job
# Returns an initialized Job instance.
# Usually, one doesn't call this method directly, as new
# Job objects are created by the #bmbm method.
# +width+ is a initial value for the label offset used in formatting;
# the #bmbm method passes its +width+ argument to this constructor.
#
# @return [Job] a new instance of Job
#
# source://benchmark//lib/benchmark.rb#341
def initialize(width); end
# Registers the given label and block pair in the job list.
#
# @raise [ArgumentError]
#
# source://benchmark//lib/benchmark.rb#349
def item(label = T.unsafe(nil), &blk); end
# An array of 2-element arrays, consisting of label and block pairs.
#
# source://benchmark//lib/benchmark.rb#361
def list; end
# Registers the given label and block pair in the job list.
#
# @raise [ArgumentError]
#
# source://benchmark//lib/benchmark.rb#349
def report(label = T.unsafe(nil), &blk); end
# Length of the widest label in the #list.
#
# source://benchmark//lib/benchmark.rb#364
def width; end
end
# This class is used by the Benchmark.benchmark and Benchmark.bm methods.
# It is of little direct interest to the user.
#
# source://benchmark//lib/benchmark.rb#371
class Benchmark::Report
# Returns an initialized Report instance.
# Usually, one doesn't call this method directly, as new
# Report objects are created by the #benchmark and #bm methods.
# +width+ and +format+ are the label offset and
# format string used by Tms#format.
#
# @return [Report] a new instance of Report
#
# source://benchmark//lib/benchmark.rb#379
def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end
# An array of Benchmark::Tms objects representing each item.
#
# source://benchmark//lib/benchmark.rb#398
def format; end
# Prints the +label+ and measured time for the block,
# formatted by +format+. See Tms#format for the
# formatting rules.
#
# source://benchmark//lib/benchmark.rb#388
def item(label = T.unsafe(nil), *format, &blk); end
# An array of Benchmark::Tms objects representing each item.
#
# source://benchmark//lib/benchmark.rb#398
def list; end
# Prints the +label+ and measured time for the block,
# formatted by +format+. See Tms#format for the
# formatting rules.
#
# source://benchmark//lib/benchmark.rb#388
def report(label = T.unsafe(nil), *format, &blk); end
# An array of Benchmark::Tms objects representing each item.
#
# source://benchmark//lib/benchmark.rb#398
def width; end
end
# A data object, representing the times associated with a benchmark
# measurement.
#
# source://benchmark//lib/benchmark.rb#407
class Benchmark::Tms
# Returns an initialized Tms object which has
# +utime+ as the user CPU time, +stime+ as the system CPU time,
# +cutime+ as the children's user CPU time, +cstime+ as the children's
# system CPU time, +real+ as the elapsed real time and +label+ as the label.
#
# @return [Tms] a new instance of Tms
#
# source://benchmark//lib/benchmark.rb#442
def initialize(utime = T.unsafe(nil), stime = T.unsafe(nil), cutime = T.unsafe(nil), cstime = T.unsafe(nil), real = T.unsafe(nil), label = T.unsafe(nil)); end
# Returns a new Tms object obtained by memberwise multiplication
# of the individual times for this Tms object by +x+.
#
# source://benchmark//lib/benchmark.rb#490
def *(x); end
# Returns a new Tms object obtained by memberwise summation
# of the individual times for this Tms object with those of the +other+
# Tms object.
# This method and #/() are useful for taking statistics.
#
# source://benchmark//lib/benchmark.rb#477
def +(other); end
# Returns a new Tms object obtained by memberwise subtraction
# of the individual times for the +other+ Tms object from those of this
# Tms object.
#
# source://benchmark//lib/benchmark.rb#484
def -(other); end
# Returns a new Tms object obtained by memberwise division
# of the individual times for this Tms object by +x+.
# This method and #+() are useful for taking statistics.
#
# source://benchmark//lib/benchmark.rb#497
def /(x); end
# Returns a new Tms object whose times are the sum of the times for this
# Tms object, plus the time required to execute the code block (+blk+).
#
# source://benchmark//lib/benchmark.rb#451
def add(&blk); end
# An in-place version of #add.
# Changes the times of this Tms object by making it the sum of the times
# for this Tms object, plus the time required to execute
# the code block (+blk+).
#
# source://benchmark//lib/benchmark.rb#461
def add!(&blk); end
# System CPU time of children
#
# source://benchmark//lib/benchmark.rb#425
def cstime; end
# User CPU time of children
#
# source://benchmark//lib/benchmark.rb#422
def cutime; end
# Returns the contents of this Tms object as
# a formatted string, according to a +format+ string
# like that passed to Kernel.format. In addition, #format
# accepts the following extensions:
#
# <tt>%u</tt>:: Replaced by the user CPU time, as reported by Tms#utime.
# <tt>%y</tt>:: Replaced by the system CPU time, as reported by #stime (Mnemonic: y of "s*y*stem")
# <tt>%U</tt>:: Replaced by the children's user CPU time, as reported by Tms#cutime
# <tt>%Y</tt>:: Replaced by the children's system CPU time, as reported by Tms#cstime
# <tt>%t</tt>:: Replaced by the total CPU time, as reported by Tms#total
# <tt>%r</tt>:: Replaced by the elapsed real time, as reported by Tms#real
# <tt>%n</tt>:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame")
#
# If +format+ is not given, FORMAT is used as default value, detailing the
# user, system and real elapsed time.
#
# source://benchmark//lib/benchmark.rb#516
def format(format = T.unsafe(nil), *args); end
# Label
#
# source://benchmark//lib/benchmark.rb#434
def label; end
# Elapsed real time
#
# source://benchmark//lib/benchmark.rb#428
def real; end
# System CPU time
#
# source://benchmark//lib/benchmark.rb#419
def stime; end
# Returns a new 6-element array, consisting of the
# label, user CPU time, system CPU time, children's
# user CPU time, children's system CPU time and elapsed
# real time.
#
# source://benchmark//lib/benchmark.rb#541
def to_a; end
# Returns a hash containing the same data as `to_a`.
#
# source://benchmark//lib/benchmark.rb#548
def to_h; end
# Same as #format.
#
# source://benchmark//lib/benchmark.rb#531
def to_s; end
# Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+
#
# source://benchmark//lib/benchmark.rb#431
def total; end
# User CPU time
#
# source://benchmark//lib/benchmark.rb#416
def utime; end
protected
# Returns a new Tms object obtained by memberwise operation +op+
# of the individual times for this Tms object with those of the other
# Tms object (+x+).
#
# +op+ can be a mathematical operation such as <tt>+</tt>, <tt>-</tt>,
# <tt>*</tt>, <tt>/</tt>
#
# source://benchmark//lib/benchmark.rb#569
def memberwise(op, x); end
end
# source://benchmark//lib/benchmark.rb#124
Benchmark::VERSION = T.let(T.unsafe(nil), String)

78
sorbet/rbi/gems/bigdecimal@3.1.9.rbi generated Normal file
View File

@@ -0,0 +1,78 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `bigdecimal` gem.
# Please instead update this file by running `bin/tapioca gem bigdecimal`.
# source://bigdecimal//lib/bigdecimal/util.rb#78
class BigDecimal < ::Numeric
# call-seq:
# a.to_d -> bigdecimal
#
# Returns self.
#
# require 'bigdecimal/util'
#
# d = BigDecimal("3.14")
# d.to_d # => 0.314e1
#
# source://bigdecimal//lib/bigdecimal/util.rb#110
def to_d; end
# call-seq:
# a.to_digits -> string
#
# Converts a BigDecimal to a String of the form "nnnnnn.mmm".
# This method is deprecated; use BigDecimal#to_s("F") instead.
#
# require 'bigdecimal/util'
#
# d = BigDecimal("3.14")
# d.to_digits # => "3.14"
#
# source://bigdecimal//lib/bigdecimal/util.rb#90
def to_digits; end
end
BigDecimal::VERSION = T.let(T.unsafe(nil), String)
# source://bigdecimal//lib/bigdecimal/util.rb#138
class Complex < ::Numeric
# call-seq:
# cmp.to_d -> bigdecimal
# cmp.to_d(precision) -> bigdecimal
#
# Returns the value as a BigDecimal.
#
# The +precision+ parameter is required for a rational complex number.
# This parameter is used to determine the number of significant digits
# for the result.
#
# require 'bigdecimal'
# require 'bigdecimal/util'
#
# Complex(0.1234567, 0).to_d(4) # => 0.1235e0
# Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1
#
# See also Kernel.BigDecimal.
#
# source://bigdecimal//lib/bigdecimal/util.rb#157
def to_d(*args); end
end
# source://bigdecimal//lib/bigdecimal/util.rb#171
class NilClass
# call-seq:
# nil.to_d -> bigdecimal
#
# Returns nil represented as a BigDecimal.
#
# require 'bigdecimal'
# require 'bigdecimal/util'
#
# nil.to_d # => 0.0
#
# source://bigdecimal//lib/bigdecimal/util.rb#182
def to_d; end
end

9
sorbet/rbi/gems/bindex@0.8.1.rbi generated Normal file
View File

@@ -0,0 +1,9 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `bindex` gem.
# Please instead update this file by running `bin/tapioca gem bindex`.
# THIS IS AN EMPTY RBI FILE.
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem

View File

@@ -0,0 +1,56 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `binding_of_caller` gem.
# Please instead update this file by running `bin/tapioca gem binding_of_caller`.
# source://binding_of_caller//lib/binding_of_caller/mri.rb#61
class Binding
include ::BindingOfCaller::BindingExtensions
end
# source://binding_of_caller//lib/binding_of_caller/version.rb#1
module BindingOfCaller; end
# source://binding_of_caller//lib/binding_of_caller/mri.rb#4
module BindingOfCaller::BindingExtensions
# Return bindings for all caller frames.
#
# @return [Array<Binding>]
#
# source://binding_of_caller//lib/binding_of_caller/mri.rb#18
def callers; end
# Number of parent frames available at the point of call.
#
# @return [Fixnum]
#
# source://binding_of_caller//lib/binding_of_caller/mri.rb#38
def frame_count; end
# The description of the frame.
#
# @return [String]
#
# source://binding_of_caller//lib/binding_of_caller/mri.rb#54
def frame_description; end
# The type of the frame.
#
# @return [Symbol]
#
# source://binding_of_caller//lib/binding_of_caller/mri.rb#44
def frame_type; end
# Retrieve the binding of the nth caller of the current frame.
#
# @raise [RuntimeError]
# @return [Binding]
#
# source://binding_of_caller//lib/binding_of_caller/mri.rb#7
def of_caller(n); end
end
# source://binding_of_caller//lib/binding_of_caller/version.rb#2
BindingOfCaller::VERSION = T.let(T.unsafe(nil), String)

970
sorbet/rbi/gems/bootsnap@1.18.4.rbi generated Normal file
View File

@@ -0,0 +1,970 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `bootsnap` gem.
# Please instead update this file by running `bin/tapioca gem bootsnap`.
# source://bootsnap//lib/bootsnap/version.rb#3
module Bootsnap
extend ::Bootsnap
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/bundler.rb#6
def bundler?; end
private
def instrumentation_enabled=(_arg0); end
class << self
# source://bootsnap//lib/bootsnap.rb#44
def _instrument(event, path); end
# source://bootsnap//lib/bootsnap.rb#137
def absolute_path?(path); end
# source://bootsnap//lib/bootsnap.rb#82
def default_setup; end
# source://bootsnap//lib/bootsnap.rb#37
def instrumentation=(callback); end
def instrumentation_enabled=(_arg0); end
# source://bootsnap//lib/bootsnap.rb#24
def log!; end
# source://bootsnap//lib/bootsnap.rb#14
def log_stats!; end
# Returns the value of attribute logger.
#
# source://bootsnap//lib/bootsnap.rb#12
def logger; end
# source://bootsnap//lib/bootsnap.rb#28
def logger=(logger); end
# Allow the C extension to redefine `rb_get_path` without warning.
# Allow the C extension to redefine `rb_get_path` without warning.
def rb_get_path(_arg0); end
# source://bootsnap//lib/bootsnap.rb#48
def setup(cache_dir:, development_mode: T.unsafe(nil), load_path_cache: T.unsafe(nil), ignore_directories: T.unsafe(nil), readonly: T.unsafe(nil), revalidation: T.unsafe(nil), compile_cache_iseq: T.unsafe(nil), compile_cache_yaml: T.unsafe(nil), compile_cache_json: T.unsafe(nil)); end
# source://bootsnap//lib/bootsnap.rb#78
def unload_cache!; end
private
# source://bootsnap//lib/bootsnap.rb#159
def bool_env(key, default: T.unsafe(nil)); end
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap.rb#155
def enabled?(key); end
end
end
# source://bootsnap//lib/bootsnap/compile_cache.rb#4
module Bootsnap::CompileCache
class << self
# source://bootsnap//lib/bootsnap/compile_cache.rb#12
def setup(cache_dir:, iseq:, yaml:, json:, readonly: T.unsafe(nil), revalidation: T.unsafe(nil)); end
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/compile_cache.rb#46
def supported?; end
end
end
# source://bootsnap//lib/bootsnap/compile_cache.rb#10
class Bootsnap::CompileCache::Error < ::StandardError; end
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#8
module Bootsnap::CompileCache::ISeq
class << self
# Returns the value of attribute cache_dir.
#
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#10
def cache_dir; end
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#12
def cache_dir=(cache_dir); end
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#103
def compile_option_updated; end
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#63
def fetch(path, cache_dir: T.unsafe(nil)); end
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#80
def input_to_output(_data, _kwargs); end
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#45
def input_to_storage(_, path); end
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#110
def install!(cache_dir); end
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#72
def precompile(path); end
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#52
def storage_to_output(binary, _args); end
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#16
def supported?; end
end
end
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#84
module Bootsnap::CompileCache::ISeq::InstructionSequenceMixin
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#97
def compile_option=(hash); end
# source://bootsnap//lib/bootsnap/compile_cache/iseq.rb#85
def load_iseq(path); end
end
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#7
module Bootsnap::CompileCache::JSON
class << self
# Returns the value of attribute cache_dir.
#
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#10
def cache_dir; end
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#12
def cache_dir=(cache_dir); end
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#48
def init!; end
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#28
def input_to_output(data, kwargs); end
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#16
def input_to_storage(payload, _); end
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#40
def install!(cache_dir); end
# Returns the value of attribute msgpack_factory.
#
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#9
def msgpack_factory; end
# Sets the attribute msgpack_factory
#
# @param value the value to set the attribute msgpack_factory to.
#
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#9
def msgpack_factory=(_arg0); end
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#32
def precompile(path); end
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#21
def storage_to_output(data, kwargs); end
# Returns the value of attribute supported_options.
#
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#9
def supported_options; end
# Sets the attribute supported_options
#
# @param value the value to set the attribute supported_options to.
#
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#9
def supported_options=(_arg0); end
private
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#62
def supports_freeze?; end
end
end
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#68
module Bootsnap::CompileCache::JSON::Patch
# source://bootsnap//lib/bootsnap/compile_cache/json.rb#69
def load_file(path, *args, **_arg2); end
end
module Bootsnap::CompileCache::Native
private
def compile_option_crc32=(_arg0); end
def fetch(_arg0, _arg1, _arg2, _arg3); end
def precompile(_arg0, _arg1, _arg2); end
def readonly=(_arg0); end
def revalidation=(_arg0); end
class << self
def compile_option_crc32=(_arg0); end
def fetch(_arg0, _arg1, _arg2, _arg3); end
def precompile(_arg0, _arg1, _arg2); end
def readonly=(_arg0); end
def revalidation=(_arg0); end
end
end
# source://bootsnap//lib/bootsnap/compile_cache.rb#5
Bootsnap::CompileCache::UNCOMPILABLE = T.let(T.unsafe(nil), BasicObject)
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#7
module Bootsnap::CompileCache::YAML
class << self
# Returns the value of attribute cache_dir.
#
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#20
def cache_dir; end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#22
def cache_dir=(cache_dir); end
# Returns the value of attribute implementation.
#
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#20
def implementation; end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#57
def init!; end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#36
def install!(cache_dir); end
# Returns the value of attribute msgpack_factory.
#
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#19
def msgpack_factory; end
# Sets the attribute msgpack_factory
#
# @param value the value to set the attribute msgpack_factory to.
#
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#19
def msgpack_factory=(_arg0); end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#124
def patch; end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#26
def precompile(path); end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#128
def strict_load(payload); end
# Psych coerce strings to `Encoding.default_internal` but Message Pack only support
# UTF-8, US-ASCII and BINARY. So if Encoding.default_internal is set to anything else
# we can't safely use the cache
#
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#45
def supported_internal_encoding?; end
# Returns the value of attribute supported_options.
#
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#19
def supported_options; end
# Sets the attribute supported_options
#
# @param value the value to set the attribute supported_options to.
#
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#19
def supported_options=(_arg0); end
end
end
# source://bootsnap//lib/bootsnap/setup.rb#0
class Bootsnap::CompileCache::YAML::NoTagsVisitor < ::Psych::Visitors::NoAliasRuby
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#69
def visit(target); end
end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#264
module Bootsnap::CompileCache::YAML::Psych3
extend ::Bootsnap::CompileCache::YAML::Psych3
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#289
def input_to_output(data, kwargs); end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#267
def input_to_storage(contents, _); end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#279
def storage_to_output(data, kwargs); end
end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#293
module Bootsnap::CompileCache::YAML::Psych3::Patch
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#294
def load_file(path, *args, **_arg2); end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#314
def unsafe_load_file(path, *args, **_arg2); end
end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#139
module Bootsnap::CompileCache::YAML::Psych4
extend ::Bootsnap::CompileCache::YAML::Psych4
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#142
def input_to_storage(contents, _); end
end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#221
module Bootsnap::CompileCache::YAML::Psych4::Patch
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#222
def load_file(path, *args, **_arg2); end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#242
def unsafe_load_file(path, *args, **_arg2); end
end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#181
module Bootsnap::CompileCache::YAML::Psych4::SafeLoad
extend ::Bootsnap::CompileCache::YAML::Psych4::SafeLoad
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#216
def input_to_output(data, kwargs); end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#184
def input_to_storage(contents, _); end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#201
def storage_to_output(data, kwargs); end
end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#150
module Bootsnap::CompileCache::YAML::Psych4::UnsafeLoad
extend ::Bootsnap::CompileCache::YAML::Psych4::UnsafeLoad
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#176
def input_to_output(data, kwargs); end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#153
def input_to_storage(contents, _); end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#165
def storage_to_output(data, kwargs); end
end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#11
Bootsnap::CompileCache::YAML::SUPPORTED_INTERNAL_ENCODINGS = T.let(T.unsafe(nil), Array)
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#8
class Bootsnap::CompileCache::YAML::Uncompilable < ::StandardError; end
# source://bootsnap//lib/bootsnap/compile_cache/yaml.rb#9
class Bootsnap::CompileCache::YAML::UnsupportedTags < ::Bootsnap::CompileCache::YAML::Uncompilable; end
# source://bootsnap//lib/bootsnap/explicit_require.rb#4
module Bootsnap::ExplicitRequire
class << self
# source://bootsnap//lib/bootsnap/explicit_require.rb#17
def from_archdir(feature); end
# source://bootsnap//lib/bootsnap/explicit_require.rb#13
def from_rubylibdir(feature); end
# source://bootsnap//lib/bootsnap/explicit_require.rb#9
def from_self(feature); end
# Given a set of gems, run a block with the LOAD_PATH narrowed to include
# only core ruby source paths and these gems -- that is, roughly,
# temporarily remove all gems not listed in this call from the LOAD_PATH.
#
# This is useful before bootsnap is fully-initialized to load gems that it
# depends on, without forcing full LOAD_PATH traversals.
#
# source://bootsnap//lib/bootsnap/explicit_require.rb#27
def with_gems(*gems); end
end
end
# source://bootsnap//lib/bootsnap/explicit_require.rb#5
Bootsnap::ExplicitRequire::ARCHDIR = T.let(T.unsafe(nil), String)
# source://bootsnap//lib/bootsnap/explicit_require.rb#7
Bootsnap::ExplicitRequire::DLEXT = T.let(T.unsafe(nil), String)
# source://bootsnap//lib/bootsnap/explicit_require.rb#6
Bootsnap::ExplicitRequire::RUBYLIBDIR = T.let(T.unsafe(nil), String)
# source://bootsnap//lib/bootsnap.rb#9
class Bootsnap::InvalidConfiguration < ::StandardError; end
# source://bootsnap//lib/bootsnap/load_path_cache.rb#4
module Bootsnap::LoadPathCache
class << self
# Returns the value of attribute enabled.
#
# source://bootsnap//lib/bootsnap/load_path_cache.rb#27
def enabled?; end
# Returns the value of attribute load_path_cache.
#
# source://bootsnap//lib/bootsnap/load_path_cache.rb#27
def load_path_cache; end
# Returns the value of attribute loaded_features_index.
#
# source://bootsnap//lib/bootsnap/load_path_cache.rb#27
def loaded_features_index; end
# source://bootsnap//lib/bootsnap/load_path_cache.rb#31
def setup(cache_path:, development_mode:, ignore_directories:, readonly: T.unsafe(nil)); end
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache.rb#56
def supported?; end
# source://bootsnap//lib/bootsnap/load_path_cache.rb#48
def unload!; end
end
end
# source://bootsnap//lib/bootsnap/load_path_cache.rb#22
Bootsnap::LoadPathCache::CACHED_EXTENSIONS = T.let(T.unsafe(nil), Array)
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#7
class Bootsnap::LoadPathCache::Cache
# @return [Cache] a new instance of Cache
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#10
def initialize(store, path_obj, development_mode: T.unsafe(nil)); end
# Try to resolve this feature to an absolute path without traversing the
# loadpath.
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#56
def find(feature); end
# What is the path item that contains the dir as child?
# e.g. given "/a/b/c/d" exists, and the path is ["/a/b"], load_dir("c/d")
# is "/a/b".
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#22
def load_dir(dir); end
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#116
def push_paths(sender, *paths); end
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#122
def reinitialize(path_obj = T.unsafe(nil)); end
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#110
def unshift_paths(sender, *paths); end
private
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#135
def dir_changed?; end
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#180
def expand_path(feature); end
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#211
def maybe_append_extension(feature); end
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#188
def now; end
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#145
def push_paths_locked(*paths); end
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#207
def search_index(feature); end
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#184
def stale?; end
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#239
def try_ext(feature); end
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#219
def try_index(feature); end
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#163
def unshift_paths_locked(*paths); end
end
# seconds
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#8
Bootsnap::LoadPathCache::Cache::AGE_THRESHOLD = T.let(T.unsafe(nil), Integer)
# { 'enumerator' => nil, 'enumerator.so' => nil, ... }
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#32
Bootsnap::LoadPathCache::Cache::BUILTIN_FEATURES = T.let(T.unsafe(nil), Hash)
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#27
Bootsnap::LoadPathCache::Cache::TRUFFLERUBY_LIB_DIR_PREFIX = T.let(T.unsafe(nil), T.untyped)
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#5
module Bootsnap::LoadPathCache::ChangeObserver
class << self
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#65
def register(arr, observer); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#74
def unregister(arr); end
end
end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#6
module Bootsnap::LoadPathCache::ChangeObserver::ArrayMixin
# For each method that adds items to one end or another of the array
# (<<, push, unshift, concat), override that method to also notify the
# observer of the change.
#
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#10
def <<(entry); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def []=(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#15
def append(*entries); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def clear(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#58
def clone; end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def collect!(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def compact!(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#27
def concat(entries); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def delete(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def delete_at(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def delete_if(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#58
def dup; end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def fill(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def flatten!(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def insert(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def keep_if(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def map!(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def pop(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#21
def prepend(*entries); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#15
def push(*entries); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def reject!(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def replace(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def reverse!(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def rotate!(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def select!(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def shift(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def shuffle!(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def slice!(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def sort!(*args, &block); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
def sort_by!(*args, &block); end
# uniq! keeps the first occurrence of each path, otherwise preserving
# order, preserving the effective load path
#
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#34
def uniq!(*args); end
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#21
def unshift(*entries); end
end
# source://bootsnap//lib/bootsnap/load_path_cache.rb#16
Bootsnap::LoadPathCache::DLEXT = T.let(T.unsafe(nil), String)
# This is nil on linux and darwin, but I think it's '.o' on some other
# platform. I'm not really sure which, but it seems better to replicate
# ruby's semantics as faithfully as possible.
#
# source://bootsnap//lib/bootsnap/load_path_cache.rb#20
Bootsnap::LoadPathCache::DLEXT2 = T.let(T.unsafe(nil), T.untyped)
# source://bootsnap//lib/bootsnap/load_path_cache.rb#11
Bootsnap::LoadPathCache::DL_EXTENSIONS = T.let(T.unsafe(nil), Array)
# source://bootsnap//lib/bootsnap/load_path_cache.rb#7
Bootsnap::LoadPathCache::DOT_RB = T.let(T.unsafe(nil), String)
# source://bootsnap//lib/bootsnap/load_path_cache.rb#8
Bootsnap::LoadPathCache::DOT_SO = T.let(T.unsafe(nil), String)
# source://bootsnap//lib/bootsnap/load_path_cache.rb#5
Bootsnap::LoadPathCache::FALLBACK_SCAN = T.let(T.unsafe(nil), BasicObject)
# LoadedFeaturesIndex partially mirrors an internal structure in ruby that
# we can't easily obtain an interface to.
#
# This works around an issue where, without bootsnap, *ruby* knows that it
# has already required a file by its short name (e.g. require 'bundler') if
# a new instance of bundler is added to the $LOAD_PATH which resolves to a
# different absolute path. This class makes bootsnap smart enough to
# realize that it has already loaded 'bundler', and not just
# '/path/to/bundler'.
#
# If you disable LoadedFeaturesIndex, you can see the problem this solves by:
#
# 1. `require 'a'`
# 2. Prepend a new $LOAD_PATH element containing an `a.rb`
# 3. `require 'a'`
#
# Ruby returns false from step 3.
# With bootsnap but with no LoadedFeaturesIndex, this loads two different
# `a.rb`s.
# With bootsnap and with LoadedFeaturesIndex, this skips the second load,
# returning false like ruby.
#
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#26
class Bootsnap::LoadPathCache::LoadedFeaturesIndex
# @return [LoadedFeaturesIndex] a new instance of LoadedFeaturesIndex
#
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#27
def initialize; end
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#72
def cursor(short); end
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#78
def identify(short, cursor); end
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#68
def key?(feature); end
# We've optimized for initialize and register to be fast, and purge to be tolerable.
# If access patterns make this not-okay, we can lazy-invert the LFI on
# first purge and work from there.
#
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#54
def purge(feature); end
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#61
def purge_multi(features); end
# There is a relatively uncommon case where we could miss adding an
# entry:
#
# If the user asked for e.g. `require 'bundler'`, and we went through the
# `FALLBACK_SCAN` pathway in `kernel_require.rb` and therefore did not
# pass `long` (the full expanded absolute path), then we did are not able
# to confidently add the `bundler.rb` form to @lfi.
#
# We could either:
#
# 1. Just add `bundler.rb`, `bundler.so`, and so on, which is close but
# not quite right; or
# 2. Inspect $LOADED_FEATURES upon return from yield to find the matching
# entry.
#
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#105
def register(short, long); end
private
# Might Ruby automatically search for this extension if
# someone tries to 'require' the file without it? E.g. Ruby
# will implicitly try 'x.rb' if you ask for 'x'.
#
# This is complex and platform-dependent, and the Ruby docs are a little
# handwavy about what will be tried when and in what order.
# So optimistically pretend that all known elidable extensions
# will be tried on all platforms, and that people are unlikely
# to name files in a way that assumes otherwise.
# (E.g. It's unlikely that someone will know that their code
# will _never_ run on MacOS, and therefore think they can get away
# with calling a Ruby file 'x.dylib.rb' and then requiring it as 'x.dylib'.)
#
# See <https://ruby-doc.org/core-2.6.4/Kernel.html#method-i-require>.
#
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#146
def extension_elidable?(feature); end
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#150
def strip_extension_if_elidable(feature); end
end
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#129
Bootsnap::LoadPathCache::LoadedFeaturesIndex::STRIP_EXTENSION = T.let(T.unsafe(nil), Regexp)
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#7
class Bootsnap::LoadPathCache::Path
# @return [Path] a new instance of Path
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#24
def initialize(path, real: T.unsafe(nil)); end
# Return a list of all the requirable files and all of the subdirectories
# of this +Path+.
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#59
def entries_and_dirs(store); end
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#82
def expanded_path; end
# True if the path exists, but represents a non-directory object
#
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#47
def non_directory?; end
# Returns the value of attribute path.
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#22
def path; end
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#53
def relative?; end
# A path is considered 'stable' if it is part of a Gem.path or the ruby
# distribution. When adding or removing files in these paths, the cache
# must be cleared before the change will be noticed.
#
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#11
def stable?; end
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#29
def to_realpath; end
# A path is considered volatile if it doesn't live under a Gem.path or
# the ruby distribution root. These paths are scanned for new additions
# more frequently.
#
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#18
def volatile?; end
private
# last time a directory was modified in this subtree. +dirs+ should be a
# list of relative paths to directories under +path+. e.g. for /a/b and
# /a/b/c, pass ('/a/b', ['c'])
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#99
def latest_mtime(path, dirs); end
# (expensive) returns [entries, dirs]
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#92
def scan!; end
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#123
def stability; end
end
# Built-in ruby lib stuff doesn't change, but things can occasionally be
# installed into sitedir, which generally lives under rubylibdir.
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#120
Bootsnap::LoadPathCache::Path::RUBY_LIBDIR = T.let(T.unsafe(nil), String)
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#121
Bootsnap::LoadPathCache::Path::RUBY_SITEDIR = T.let(T.unsafe(nil), String)
# a Path can be either stable of volatile, depending on how frequently we
# expect its contents may change. Stable paths aren't rescanned nearly as
# often.
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#115
Bootsnap::LoadPathCache::Path::STABLE = T.let(T.unsafe(nil), Symbol)
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#116
Bootsnap::LoadPathCache::Path::VOLATILE = T.let(T.unsafe(nil), Symbol)
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#7
module Bootsnap::LoadPathCache::PathScanner
class << self
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#23
def call(path); end
# Returns the value of attribute ignored_directories.
#
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#21
def ignored_directories; end
# Sets the attribute ignored_directories
#
# @param value the value to set the attribute ignored_directories to.
#
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#21
def ignored_directories=(_arg0); end
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#69
def os_path(path); end
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#49
def walk(absolute_dir_path, relative_dir_path, &block); end
end
end
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#10
Bootsnap::LoadPathCache::PathScanner::ALTERNATIVE_NATIVE_EXTENSIONS_PATTERN = T.let(T.unsafe(nil), Regexp)
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#12
Bootsnap::LoadPathCache::PathScanner::BUNDLE_PATH = T.let(T.unsafe(nil), String)
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#9
Bootsnap::LoadPathCache::PathScanner::NORMALIZE_NATIVE_EXTENSIONS = T.let(T.unsafe(nil), FalseClass)
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#8
Bootsnap::LoadPathCache::PathScanner::REQUIRABLE_EXTENSIONS = T.let(T.unsafe(nil), Array)
# source://bootsnap//lib/bootsnap/load_path_cache.rb#9
Bootsnap::LoadPathCache::SLASH = T.let(T.unsafe(nil), String)
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#9
class Bootsnap::LoadPathCache::Store
# @return [Store] a new instance of Store
#
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#16
def initialize(store_path, readonly: T.unsafe(nil)); end
# @raise [SetOutsideTransactionNotAllowed]
#
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#28
def fetch(key); end
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#24
def get(key); end
# @raise [SetOutsideTransactionNotAllowed]
#
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#40
def set(key, value); end
# @raise [NestedTransactionError]
#
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#49
def transaction; end
private
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#66
def commit_transaction; end
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#112
def default_data; end
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#95
def dump_data; end
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#73
def load_data; end
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#61
def mark_for_mutation!; end
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#116
def mkdir_p(path); end
end
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#11
Bootsnap::LoadPathCache::Store::CURRENT_VERSION = T.let(T.unsafe(nil), String)
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#13
class Bootsnap::LoadPathCache::Store::NestedTransactionError < ::StandardError; end
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#14
class Bootsnap::LoadPathCache::Store::SetOutsideTransactionNotAllowed < ::StandardError; end
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#10
Bootsnap::LoadPathCache::Store::VERSION_KEY = T.let(T.unsafe(nil), String)
# source://bootsnap//lib/bootsnap/version.rb#4
Bootsnap::VERSION = T.let(T.unsafe(nil), String)
module JSON
extend ::Bootsnap::CompileCache::JSON::Patch
end
# source://bootsnap//lib/bootsnap/load_path_cache/core_ext/kernel_require.rb#3
module Kernel
private
# source://bootsnap//lib/bootsnap/load_path_cache/core_ext/kernel_require.rb#8
def zeitwerk_original_require(path); end
end
module Psych
extend ::Bootsnap::CompileCache::YAML::Psych4::Patch
end
class RubyVM::InstructionSequence
extend ::Bootsnap::CompileCache::ISeq::InstructionSequenceMixin
end

9
sorbet/rbi/gems/builder@3.3.0.rbi generated Normal file
View File

@@ -0,0 +1,9 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `builder` gem.
# Please instead update this file by running `bin/tapioca gem builder`.
# THIS IS AN EMPTY RBI FILE.
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem

9946
sorbet/rbi/gems/capybara@3.40.0.rbi generated Normal file

File diff suppressed because it is too large Load Diff

3427
sorbet/rbi/gems/coderay@1.1.3.rbi generated Normal file

File diff suppressed because it is too large Load Diff

219
sorbet/rbi/gems/colorize@1.1.0.rbi generated Normal file
View File

@@ -0,0 +1,219 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `colorize` gem.
# Please instead update this file by running `bin/tapioca gem colorize`.
# Gem version
#
# source://colorize//lib/colorize/version.rb#6
module Colorize; end
# source://colorize//lib/colorize/class_methods.rb#4
module Colorize::ClassMethods
# Add color alias
#
# source://colorize//lib/colorize/class_methods.rb#135
def add_color_alias(*params); end
# source://colorize//lib/colorize/class_methods.rb#154
def add_color_code(code, color); end
# Generate color and on_color method
#
# source://colorize//lib/colorize/class_methods.rb#179
def add_color_method(key); end
# Check if color exists
#
# source://colorize//lib/colorize/class_methods.rb#214
def check_if_color_available!(color); end
# Check if color is missing
#
# source://colorize//lib/colorize/class_methods.rb#221
def check_if_color_exist!(color); end
# Color codes hash
#
# source://colorize//lib/colorize/class_methods.rb#150
def color_codes; end
# @return [Boolean]
#
# source://colorize//lib/colorize/class_methods.rb#225
def color_exist?(color); end
# Generate color and on_color methods
#
# source://colorize//lib/colorize/class_methods.rb#168
def color_methods; end
# Display color samples
#
# source://colorize//lib/colorize/class_methods.rb#125
def color_samples; end
# Return array of available colors used by colorize
#
# source://colorize//lib/colorize/class_methods.rb#111
def colors; end
# Property for disable colorization
#
# source://colorize//lib/colorize/class_methods.rb#67
def disable_colorization(value = T.unsafe(nil)); end
# Setter for disable colorization
#
# source://colorize//lib/colorize/class_methods.rb#82
def disable_colorization=(value); end
# Property for readline support
#
# source://colorize//lib/colorize/class_methods.rb#45
def enable_readline_support(value = T.unsafe(nil)); end
# Setter for enable readline support
#
# source://colorize//lib/colorize/class_methods.rb#60
def enable_readline_support=(value); end
# Mode codes hash
#
# source://colorize//lib/colorize/class_methods.rb#161
def mode_codes; end
# Return array of available modes used by colorize
#
# source://colorize//lib/colorize/class_methods.rb#118
def modes; end
# Generate modes methods
#
# source://colorize//lib/colorize/class_methods.rb#192
def modes_methods; end
# source://colorize//lib/colorize/class_methods.rb#202
def parse_color_alias_params(params); end
# Property for prevent recolorization
#
# source://colorize//lib/colorize/class_methods.rb#89
def prevent_colors(value = T.unsafe(nil)); end
# Setter for prevent recolorization
#
# source://colorize//lib/colorize/class_methods.rb#104
def prevent_colors=(value); end
end
# source://colorize//lib/colorize/errors.rb#4
class Colorize::ColorAlreadyExist < ::StandardError; end
# source://colorize//lib/colorize/errors.rb#7
class Colorize::ColorDontExist < ::StandardError; end
# source://colorize//lib/colorize/instance_methods.rb#4
module Colorize::InstanceMethods
# Change color of string
#
# Examples:
#
# puts "This is blue".colorize(:blue)
# puts "This is light blue".colorize(:light_blue)
# puts "This is also blue".colorize(:color => :blue)
# puts "This is light blue with red background".colorize(:color => :light_blue, :background => :red)
# puts "This is light blue with red background".colorize(:light_blue ).colorize( :background => :red)
# puts "This is blue text on red".blue.on_red
# puts "This is red on blue".colorize(:red).on_blue
# puts "This is red on blue and underline".colorize(:red).on_blue.underline
# puts "This is blue text on red".blue.on_red.blink
# puts "This is uncolorized".blue.on_red.uncolorize
#
# source://colorize//lib/colorize/instance_methods.rb#21
def colorize(params); end
# Return true if string is colorized
#
# @return [Boolean]
#
# source://colorize//lib/colorize/instance_methods.rb#43
def colorized?; end
# Return uncolorized string
#
# source://colorize//lib/colorize/instance_methods.rb#34
def uncolorize; end
private
# Color for background (offset 10)
#
# source://colorize//lib/colorize/instance_methods.rb#117
def background_color(color); end
# Color for foreground
#
# source://colorize//lib/colorize/instance_methods.rb#110
def color(color); end
# Set color from params symbol
#
# source://colorize//lib/colorize/instance_methods.rb#99
def color_from_symbol(match, symbol); end
# Generate string with escape colors
#
# source://colorize//lib/colorize/instance_methods.rb#54
def colorized_string(mode, color, background_color, previous); end
# Set colors from params hash
#
# source://colorize//lib/colorize/instance_methods.rb#84
def colors_from_hash(match, hash); end
# Set color from params
#
# source://colorize//lib/colorize/instance_methods.rb#74
def colors_from_params(match, params); end
# Set default colors
#
# source://colorize//lib/colorize/instance_methods.rb#65
def defaults_colors(match); end
# Mode
#
# source://colorize//lib/colorize/instance_methods.rb#124
def mode(mode); end
# Require windows libs
#
# source://colorize//lib/colorize/instance_methods.rb#160
def require_windows_libs; end
# Scan for colorized string
#
# source://colorize//lib/colorize/instance_methods.rb#142
def scan_for_colors; end
# Generate regex for color scanner
#
# source://colorize//lib/colorize/instance_methods.rb#131
def scan_for_colors_regex; end
# source://colorize//lib/colorize/instance_methods.rb#148
def split_colors(match); end
end
# source://colorize//lib/colorize/version.rb#7
Colorize::VERSION = T.let(T.unsafe(nil), String)
# source://colorize//lib/colorize.rb#11
class String
include ::Comparable
include ::Colorize::InstanceMethods
extend ::Colorize::ClassMethods
end

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `concurrent-ruby-ext` gem.
# Please instead update this file by running `bin/tapioca gem concurrent-ruby-ext`.
# THIS IS AN EMPTY RBI FILE.
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem

11892
sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi generated Normal file

File diff suppressed because it is too large Load Diff

275
sorbet/rbi/gems/connection_pool@2.4.1.rbi generated Normal file
View File

@@ -0,0 +1,275 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `connection_pool` gem.
# Please instead update this file by running `bin/tapioca gem connection_pool`.
# Generic connection pool class for sharing a limited number of objects or network connections
# among many threads. Note: pool elements are lazily created.
#
# Example usage with block (faster):
#
# @pool = ConnectionPool.new { Redis.new }
# @pool.with do |redis|
# redis.lpop('my-list') if redis.llen('my-list') > 0
# end
#
# Using optional timeout override (for that single invocation)
#
# @pool.with(timeout: 2.0) do |redis|
# redis.lpop('my-list') if redis.llen('my-list') > 0
# end
#
# Example usage replacing an existing connection (slower):
#
# $redis = ConnectionPool.wrap { Redis.new }
#
# def do_work
# $redis.lpop('my-list') if $redis.llen('my-list') > 0
# end
#
# Accepts the following options:
# - :size - number of connections to pool, defaults to 5
# - :timeout - amount of time to wait for a connection if none currently available, defaults to 5 seconds
# - :auto_reload_after_fork - automatically drop all connections after fork, defaults to true
#
# source://connection_pool//lib/connection_pool/version.rb#1
class ConnectionPool
# @raise [ArgumentError]
# @return [ConnectionPool] a new instance of ConnectionPool
#
# source://connection_pool//lib/connection_pool.rb#90
def initialize(options = T.unsafe(nil), &block); end
# Automatically drop all connections after fork
#
# source://connection_pool//lib/connection_pool.rb#166
def auto_reload_after_fork; end
# Number of pool entries available for checkout at this instant.
#
# source://connection_pool//lib/connection_pool.rb#169
def available; end
# source://connection_pool//lib/connection_pool.rb#129
def checkin(force: T.unsafe(nil)); end
# source://connection_pool//lib/connection_pool.rb#119
def checkout(options = T.unsafe(nil)); end
# Reloads the ConnectionPool by passing each connection to +block+ and then
# removing it the pool. Subsequent checkouts will create new connections as
# needed.
#
# source://connection_pool//lib/connection_pool.rb#159
def reload(&block); end
# Shuts down the ConnectionPool by passing each connection to +block+ and
# then removing it from the pool. Attempting to checkout a connection after
# shutdown will raise +ConnectionPool::PoolShuttingDownError+.
#
# source://connection_pool//lib/connection_pool.rb#150
def shutdown(&block); end
# Size of this connection pool
#
# source://connection_pool//lib/connection_pool.rb#164
def size; end
# source://connection_pool//lib/connection_pool.rb#105
def then(options = T.unsafe(nil)); end
# source://connection_pool//lib/connection_pool.rb#105
def with(options = T.unsafe(nil)); end
class << self
# source://connection_pool//lib/connection_pool.rb#52
def after_fork; end
# source://connection_pool//lib/connection_pool.rb#44
def wrap(options, &block); end
end
end
# source://connection_pool//lib/connection_pool.rb#42
ConnectionPool::DEFAULTS = T.let(T.unsafe(nil), Hash)
# source://connection_pool//lib/connection_pool.rb#5
class ConnectionPool::Error < ::RuntimeError; end
# source://connection_pool//lib/connection_pool.rb#70
module ConnectionPool::ForkTracker
# source://connection_pool//lib/connection_pool.rb#71
def _fork; end
end
# source://connection_pool//lib/connection_pool.rb#49
ConnectionPool::INSTANCES = T.let(T.unsafe(nil), ObjectSpace::WeakMap)
# source://connection_pool//lib/connection_pool.rb#7
class ConnectionPool::PoolShuttingDownError < ::ConnectionPool::Error; end
# Examples:
#
# ts = TimedStack.new(1) { MyConnection.new }
#
# # fetch a connection
# conn = ts.pop
#
# # return a connection
# ts.push conn
#
# conn = ts.pop
# ts.pop timeout: 5
# #=> raises ConnectionPool::TimeoutError after 5 seconds
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#20
class ConnectionPool::TimedStack
# Creates a new pool with +size+ connections that are created from the given
# +block+.
#
# @return [TimedStack] a new instance of TimedStack
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#27
def initialize(size = T.unsafe(nil), &block); end
# Returns +obj+ to the stack. +options+ is ignored in TimedStack but may be
# used by subclasses that extend TimedStack.
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#41
def <<(obj, options = T.unsafe(nil)); end
# Returns +true+ if there are no available connections.
#
# @return [Boolean]
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#104
def empty?; end
# The number of connections available on the stack.
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#111
def length; end
# Returns the value of attribute max.
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#21
def max; end
# Retrieves a connection from the stack. If a connection is available it is
# immediately returned. If no connection is available within the given
# timeout a ConnectionPool::TimeoutError is raised.
#
# +:timeout+ is the only checked entry in +options+ and is preferred over
# the +timeout+ argument (which will be removed in a future release). Other
# options may be used by subclasses that extend TimedStack.
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#63
def pop(timeout = T.unsafe(nil), options = T.unsafe(nil)); end
# Returns +obj+ to the stack. +options+ is ignored in TimedStack but may be
# used by subclasses that extend TimedStack.
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#41
def push(obj, options = T.unsafe(nil)); end
# Shuts down the TimedStack by passing each connection to +block+ and then
# removing it from the pool. Attempting to checkout a connection after
# shutdown will raise +ConnectionPool::PoolShuttingDownError+ unless
# +:reload+ is +true+.
#
# @raise [ArgumentError]
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#89
def shutdown(reload: T.unsafe(nil), &block); end
private
# This is an extension point for TimedStack and is called with a mutex.
#
# This method must returns true if a connection is available on the stack.
#
# @return [Boolean]
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#126
def connection_stored?(options = T.unsafe(nil)); end
# source://connection_pool//lib/connection_pool/timed_stack.rb#117
def current_time; end
# This is an extension point for TimedStack and is called with a mutex.
#
# This method must return a connection from the stack.
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#135
def fetch_connection(options = T.unsafe(nil)); end
# This is an extension point for TimedStack and is called with a mutex.
#
# This method must shut down all connections on the stack.
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#144
def shutdown_connections(options = T.unsafe(nil)); end
# This is an extension point for TimedStack and is called with a mutex.
#
# This method must return +obj+ to the stack.
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#157
def store_connection(obj, options = T.unsafe(nil)); end
# This is an extension point for TimedStack and is called with a mutex.
#
# This method must create a connection if and only if the total number of
# connections allowed has not been met.
#
# source://connection_pool//lib/connection_pool/timed_stack.rb#167
def try_create(options = T.unsafe(nil)); end
end
# source://connection_pool//lib/connection_pool.rb#9
class ConnectionPool::TimeoutError < ::Timeout::Error; end
# source://connection_pool//lib/connection_pool/version.rb#2
ConnectionPool::VERSION = T.let(T.unsafe(nil), String)
# source://connection_pool//lib/connection_pool/wrapper.rb#2
class ConnectionPool::Wrapper < ::BasicObject
# @return [Wrapper] a new instance of Wrapper
#
# source://connection_pool//lib/connection_pool/wrapper.rb#5
def initialize(options = T.unsafe(nil), &block); end
# source://connection_pool//lib/connection_pool/wrapper.rb#35
def method_missing(name, *args, **kwargs, &block); end
# source://connection_pool//lib/connection_pool/wrapper.rb#25
def pool_available; end
# source://connection_pool//lib/connection_pool/wrapper.rb#17
def pool_shutdown(&block); end
# source://connection_pool//lib/connection_pool/wrapper.rb#21
def pool_size; end
# @return [Boolean]
#
# source://connection_pool//lib/connection_pool/wrapper.rb#29
def respond_to?(id, *args); end
# source://connection_pool//lib/connection_pool/wrapper.rb#13
def with(&block); end
# source://connection_pool//lib/connection_pool/wrapper.rb#9
def wrapped_pool; end
end
# source://connection_pool//lib/connection_pool/wrapper.rb#3
ConnectionPool::Wrapper::METHODS = T.let(T.unsafe(nil), Array)
module Process
extend ::ActiveSupport::ForkTracker::CoreExt
extend ::FFI::ModernForkTracking
extend ::ConnectionPool::ForkTracker
end

623
sorbet/rbi/gems/crass@1.0.6.rbi generated Normal file
View File

@@ -0,0 +1,623 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `crass` gem.
# Please instead update this file by running `bin/tapioca gem crass`.
# A CSS parser based on the CSS Syntax Module Level 3 spec.
#
# source://crass//lib/crass/token-scanner.rb#3
module Crass
class << self
# Parses _input_ as a CSS stylesheet and returns a parse tree.
#
# See {Tokenizer#initialize} for _options_.
#
# source://crass//lib/crass.rb#10
def parse(input, options = T.unsafe(nil)); end
# Parses _input_ as a string of CSS properties (such as the contents of an
# HTML element's `style` attribute) and returns a parse tree.
#
# See {Tokenizer#initialize} for _options_.
#
# source://crass//lib/crass.rb#18
def parse_properties(input, options = T.unsafe(nil)); end
end
end
# Parses a CSS string or list of tokens.
#
# 5. http://dev.w3.org/csswg/css-syntax/#parsing
#
# source://crass//lib/crass/parser.rb#10
class Crass::Parser
# Initializes a parser based on the given _input_, which may be a CSS string
# or an array of tokens.
#
# See {Tokenizer#initialize} for _options_.
#
# @return [Parser] a new instance of Parser
#
# source://crass//lib/crass/parser.rb#126
def initialize(input, options = T.unsafe(nil)); end
# Consumes an at-rule and returns it.
#
# 5.4.2. http://dev.w3.org/csswg/css-syntax-3/#consume-at-rule
#
# source://crass//lib/crass/parser.rb#137
def consume_at_rule(input = T.unsafe(nil)); end
# Consumes a component value and returns it, or `nil` if there are no more
# tokens.
#
# 5.4.6. http://dev.w3.org/csswg/css-syntax-3/#consume-a-component-value
#
# source://crass//lib/crass/parser.rb#184
def consume_component_value(input = T.unsafe(nil)); end
# Consumes a declaration and returns it, or `nil` on parse error.
#
# 5.4.5. http://dev.w3.org/csswg/css-syntax-3/#consume-a-declaration
#
# source://crass//lib/crass/parser.rb#209
def consume_declaration(input = T.unsafe(nil)); end
# Consumes a list of declarations and returns them.
#
# By default, the returned list may include `:comment`, `:semicolon`, and
# `:whitespace` nodes, which is non-standard.
#
# Options:
#
# * **:strict** - Set to `true` to exclude non-standard `:comment`,
# `:semicolon`, and `:whitespace` nodes.
#
# 5.4.4. http://dev.w3.org/csswg/css-syntax/#consume-a-list-of-declarations
#
# source://crass//lib/crass/parser.rb#276
def consume_declarations(input = T.unsafe(nil), options = T.unsafe(nil)); end
# Consumes a function and returns it.
#
# 5.4.8. http://dev.w3.org/csswg/css-syntax-3/#consume-a-function
#
# source://crass//lib/crass/parser.rb#326
def consume_function(input = T.unsafe(nil)); end
# Consumes a qualified rule and returns it, or `nil` if a parse error
# occurs.
#
# 5.4.3. http://dev.w3.org/csswg/css-syntax-3/#consume-a-qualified-rule
#
# source://crass//lib/crass/parser.rb#357
def consume_qualified_rule(input = T.unsafe(nil)); end
# Consumes a list of rules and returns them.
#
# 5.4.1. http://dev.w3.org/csswg/css-syntax/#consume-a-list-of-rules
#
# source://crass//lib/crass/parser.rb#398
def consume_rules(flags = T.unsafe(nil)); end
# Consumes and returns a simple block associated with the current input
# token.
#
# 5.4.7. http://dev.w3.org/csswg/css-syntax/#consume-a-simple-block
#
# source://crass//lib/crass/parser.rb#434
def consume_simple_block(input = T.unsafe(nil)); end
# Creates and returns a new parse node with the given _properties_.
#
# source://crass//lib/crass/parser.rb#458
def create_node(type, properties = T.unsafe(nil)); end
# Parses the given _input_ tokens into a selector node and returns it.
#
# Doesn't bother splitting the selector list into individual selectors or
# validating them. Feel free to do that yourself! It'll be fun!
#
# source://crass//lib/crass/parser.rb#466
def create_selector(input); end
# Creates a `:style_rule` node from the given qualified _rule_, and returns
# it.
#
# source://crass//lib/crass/parser.rb#474
def create_style_rule(rule); end
# Parses a single component value and returns it.
#
# 5.3.7. http://dev.w3.org/csswg/css-syntax-3/#parse-a-component-value
#
# source://crass//lib/crass/parser.rb#483
def parse_component_value(input = T.unsafe(nil)); end
# Parses a list of component values and returns an array of parsed tokens.
#
# 5.3.8. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-component-values
#
# source://crass//lib/crass/parser.rb#510
def parse_component_values(input = T.unsafe(nil)); end
# Parses a single declaration and returns it.
#
# 5.3.5. http://dev.w3.org/csswg/css-syntax/#parse-a-declaration
#
# source://crass//lib/crass/parser.rb#524
def parse_declaration(input = T.unsafe(nil)); end
# Parses a list of declarations and returns them.
#
# See {#consume_declarations} for _options_.
#
# 5.3.6. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-declarations
#
# source://crass//lib/crass/parser.rb#552
def parse_declarations(input = T.unsafe(nil), options = T.unsafe(nil)); end
# Parses a list of declarations and returns an array of `:property` nodes
# (and any non-declaration nodes that were in the input). This is useful for
# parsing the contents of an HTML element's `style` attribute.
#
# source://crass//lib/crass/parser.rb#560
def parse_properties(input = T.unsafe(nil)); end
# Parses a single rule and returns it.
#
# 5.3.4. http://dev.w3.org/csswg/css-syntax-3/#parse-a-rule
#
# source://crass//lib/crass/parser.rb#586
def parse_rule(input = T.unsafe(nil)); end
# Returns the unescaped value of a selector name or property declaration.
#
# source://crass//lib/crass/parser.rb#615
def parse_value(nodes); end
# {TokenScanner} wrapping the tokens generated from this parser's input.
#
# source://crass//lib/crass/parser.rb#120
def tokens; end
class << self
# Parses CSS properties (such as the contents of an HTML element's `style`
# attribute) and returns a parse tree.
#
# See {Tokenizer#initialize} for _options_.
#
# 5.3.6. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-declarations
#
# source://crass//lib/crass/parser.rb#25
def parse_properties(input, options = T.unsafe(nil)); end
# Parses CSS rules (such as the content of a `@media` block) and returns a
# parse tree. The only difference from {parse_stylesheet} is that CDO/CDC
# nodes (`<!--` and `-->`) aren't ignored.
#
# See {Tokenizer#initialize} for _options_.
#
# 5.3.3. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-rules
#
# source://crass//lib/crass/parser.rb#36
def parse_rules(input, options = T.unsafe(nil)); end
# Parses a CSS stylesheet and returns a parse tree.
#
# See {Tokenizer#initialize} for _options_.
#
# 5.3.2. http://dev.w3.org/csswg/css-syntax/#parse-a-stylesheet
#
# source://crass//lib/crass/parser.rb#54
def parse_stylesheet(input, options = T.unsafe(nil)); end
# Converts a node or array of nodes into a CSS string based on their
# original tokenized input.
#
# Options:
#
# * **:exclude_comments** - When `true`, comments will be excluded.
#
# source://crass//lib/crass/parser.rb#74
def stringify(nodes, options = T.unsafe(nil)); end
end
end
# source://crass//lib/crass/parser.rb#11
Crass::Parser::BLOCK_END_TOKENS = T.let(T.unsafe(nil), Hash)
# Similar to a StringScanner, but with extra functionality needed to tokenize
# CSS while preserving the original text.
#
# source://crass//lib/crass/scanner.rb#8
class Crass::Scanner
# Creates a Scanner instance for the given _input_ string or IO instance.
#
# @return [Scanner] a new instance of Scanner
#
# source://crass//lib/crass/scanner.rb#25
def initialize(input); end
# Consumes the next character and returns it, advancing the pointer, or
# an empty string if the end of the string has been reached.
#
# source://crass//lib/crass/scanner.rb#34
def consume; end
# Consumes the rest of the string and returns it, advancing the pointer to
# the end of the string. Returns an empty string is the end of the string
# has already been reached.
#
# source://crass//lib/crass/scanner.rb#46
def consume_rest; end
# Current character, or `nil` if the scanner hasn't yet consumed a
# character, or is at the end of the string.
#
# source://crass//lib/crass/scanner.rb#11
def current; end
# Returns `true` if the end of the string has been reached, `false`
# otherwise.
#
# @return [Boolean]
#
# source://crass//lib/crass/scanner.rb#57
def eos?; end
# Sets the marker to the position of the next character that will be
# consumed.
#
# source://crass//lib/crass/scanner.rb#63
def mark; end
# Returns the substring between {#marker} and {#pos}, without altering the
# pointer.
#
# source://crass//lib/crass/scanner.rb#69
def marked; end
# Current marker position. Use {#marked} to get the substring between
# {#marker} and {#pos}.
#
# source://crass//lib/crass/scanner.rb#15
def marker; end
# Current marker position. Use {#marked} to get the substring between
# {#marker} and {#pos}.
#
# source://crass//lib/crass/scanner.rb#15
def marker=(_arg0); end
# Returns up to _length_ characters starting at the current position, but
# doesn't consume them. The number of characters returned may be less than
# _length_ if the end of the string is reached.
#
# source://crass//lib/crass/scanner.rb#80
def peek(length = T.unsafe(nil)); end
# Position of the next character that will be consumed. This is a character
# position, not a byte position, so it accounts for multi-byte characters.
#
# source://crass//lib/crass/scanner.rb#19
def pos; end
# Position of the next character that will be consumed. This is a character
# position, not a byte position, so it accounts for multi-byte characters.
#
# source://crass//lib/crass/scanner.rb#19
def pos=(_arg0); end
# Moves the pointer back one character without changing the value of
# {#current}. The next call to {#consume} will re-consume the current
# character.
#
# source://crass//lib/crass/scanner.rb#87
def reconsume; end
# Resets the pointer to the beginning of the string.
#
# source://crass//lib/crass/scanner.rb#93
def reset; end
# Tries to match _pattern_ at the current position. If it matches, the
# matched substring will be returned and the pointer will be advanced.
# Otherwise, `nil` will be returned.
#
# source://crass//lib/crass/scanner.rb#103
def scan(pattern); end
# Scans the string until the _pattern_ is matched. Returns the substring up
# to and including the end of the match, and advances the pointer. If there
# is no match, `nil` is returned and the pointer is not advanced.
#
# source://crass//lib/crass/scanner.rb#115
def scan_until(pattern); end
# String being scanned.
#
# source://crass//lib/crass/scanner.rb#22
def string; end
end
# Like {Scanner}, but for tokens!
#
# source://crass//lib/crass/token-scanner.rb#6
class Crass::TokenScanner
# @return [TokenScanner] a new instance of TokenScanner
#
# source://crass//lib/crass/token-scanner.rb#9
def initialize(tokens); end
# Executes the given block, collects all tokens that are consumed during its
# execution, and returns them.
#
# source://crass//lib/crass/token-scanner.rb#16
def collect; end
# Consumes the next token and returns it, advancing the pointer. Returns
# `nil` if there is no next token.
#
# source://crass//lib/crass/token-scanner.rb#24
def consume; end
# Returns the value of attribute current.
#
# source://crass//lib/crass/token-scanner.rb#7
def current; end
# Returns the next token without consuming it, or `nil` if there is no next
# token.
#
# source://crass//lib/crass/token-scanner.rb#32
def peek; end
# Returns the value of attribute pos.
#
# source://crass//lib/crass/token-scanner.rb#7
def pos; end
# Reconsumes the current token, moving the pointer back one position.
#
# http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/#reconsume-the-current-input-token
#
# source://crass//lib/crass/token-scanner.rb#39
def reconsume; end
# Resets the pointer to the first token in the list.
#
# source://crass//lib/crass/token-scanner.rb#44
def reset; end
# Returns the value of attribute tokens.
#
# source://crass//lib/crass/token-scanner.rb#7
def tokens; end
end
# Tokenizes a CSS string.
#
# 4. http://dev.w3.org/csswg/css-syntax/#tokenization
#
# source://crass//lib/crass/tokenizer.rb#9
class Crass::Tokenizer
# Initializes a new Tokenizer.
#
# Options:
#
# * **:preserve_comments** - If `true`, comments will be preserved as
# `:comment` tokens.
#
# * **:preserve_hacks** - If `true`, certain non-standard browser hacks
# such as the IE "*" hack will be preserved even though they violate
# CSS 3 syntax rules.
#
# @return [Tokenizer] a new instance of Tokenizer
#
# source://crass//lib/crass/tokenizer.rb#62
def initialize(input, options = T.unsafe(nil)); end
# Consumes a token and returns the token that was consumed.
#
# 4.3.1. http://dev.w3.org/csswg/css-syntax/#consume-a-token
#
# source://crass//lib/crass/tokenizer.rb#70
def consume; end
# Consumes the remnants of a bad URL and returns the consumed text.
#
# 4.3.15. http://dev.w3.org/csswg/css-syntax/#consume-the-remnants-of-a-bad-url
#
# source://crass//lib/crass/tokenizer.rb#275
def consume_bad_url; end
# Consumes comments and returns them, or `nil` if no comments were consumed.
#
# 4.3.2. http://dev.w3.org/csswg/css-syntax/#consume-comments
#
# source://crass//lib/crass/tokenizer.rb#301
def consume_comments; end
# Consumes an escaped code point and returns its unescaped value.
#
# This method assumes that the `\` has already been consumed, and that the
# next character in the input has already been verified not to be a newline
# or EOF.
#
# 4.3.8. http://dev.w3.org/csswg/css-syntax/#consume-an-escaped-code-point
#
# source://crass//lib/crass/tokenizer.rb#326
def consume_escaped; end
# Consumes an ident-like token and returns it.
#
# 4.3.4. http://dev.w3.org/csswg/css-syntax/#consume-an-ident-like-token
#
# source://crass//lib/crass/tokenizer.rb#350
def consume_ident; end
# Consumes a name and returns it.
#
# 4.3.12. http://dev.w3.org/csswg/css-syntax/#consume-a-name
#
# source://crass//lib/crass/tokenizer.rb#375
def consume_name; end
# Consumes a number and returns a 3-element array containing the number's
# original representation, its numeric value, and its type (either
# `:integer` or `:number`).
#
# 4.3.13. http://dev.w3.org/csswg/css-syntax/#consume-a-number
#
# source://crass//lib/crass/tokenizer.rb#407
def consume_number; end
# Consumes a numeric token and returns it.
#
# 4.3.3. http://dev.w3.org/csswg/css-syntax/#consume-a-numeric-token
#
# source://crass//lib/crass/tokenizer.rb#430
def consume_numeric; end
# Consumes a string token that ends at the given character, and returns the
# token.
#
# 4.3.5. http://dev.w3.org/csswg/css-syntax/#consume-a-string-token
#
# source://crass//lib/crass/tokenizer.rb#469
def consume_string(ending = T.unsafe(nil)); end
# Consumes a Unicode range token and returns it. Assumes the initial "u+" or
# "U+" has already been consumed.
#
# 4.3.7. http://dev.w3.org/csswg/css-syntax/#consume-a-unicode-range-token
#
# source://crass//lib/crass/tokenizer.rb#510
def consume_unicode_range; end
# Consumes a URL token and returns it. Assumes the original "url(" has
# already been consumed.
#
# 4.3.6. http://dev.w3.org/csswg/css-syntax/#consume-a-url-token
#
# source://crass//lib/crass/tokenizer.rb#542
def consume_url; end
# Converts a valid CSS number string into a number and returns the number.
#
# 4.3.14. http://dev.w3.org/csswg/css-syntax/#convert-a-string-to-a-number
#
# source://crass//lib/crass/tokenizer.rb#590
def convert_string_to_number(str); end
# Creates and returns a new token with the given _properties_.
#
# source://crass//lib/crass/tokenizer.rb#616
def create_token(type, properties = T.unsafe(nil)); end
# Preprocesses _input_ to prepare it for the tokenizer.
#
# 3.3. http://dev.w3.org/csswg/css-syntax/#input-preprocessing
#
# source://crass//lib/crass/tokenizer.rb#627
def preprocess(input); end
# Returns `true` if the given three-character _text_ would start an
# identifier. If _text_ is `nil`, the current and next two characters in the
# input stream will be checked, but will not be consumed.
#
# 4.3.10. http://dev.w3.org/csswg/css-syntax/#would-start-an-identifier
#
# @return [Boolean]
#
# source://crass//lib/crass/tokenizer.rb#642
def start_identifier?(text = T.unsafe(nil)); end
# Returns `true` if the given three-character _text_ would start a number.
# If _text_ is `nil`, the current and next two characters in the input
# stream will be checked, but will not be consumed.
#
# 4.3.11. http://dev.w3.org/csswg/css-syntax/#starts-with-a-number
#
# @return [Boolean]
#
# source://crass//lib/crass/tokenizer.rb#666
def start_number?(text = T.unsafe(nil)); end
# Tokenizes the input stream and returns an array of tokens.
#
# source://crass//lib/crass/tokenizer.rb#685
def tokenize; end
# Returns `true` if the given two-character _text_ is the beginning of a
# valid escape sequence. If _text_ is `nil`, the current and next character
# in the input stream will be checked, but will not be consumed.
#
# 4.3.9. http://dev.w3.org/csswg/css-syntax/#starts-with-a-valid-escape
#
# @return [Boolean]
#
# source://crass//lib/crass/tokenizer.rb#702
def valid_escape?(text = T.unsafe(nil)); end
class << self
# Tokenizes the given _input_ as a CSS string and returns an array of
# tokens.
#
# See {#initialize} for _options_.
#
# source://crass//lib/crass/tokenizer.rb#45
def tokenize(input, options = T.unsafe(nil)); end
end
end
# source://crass//lib/crass/tokenizer.rb#10
Crass::Tokenizer::RE_COMMENT_CLOSE = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#11
Crass::Tokenizer::RE_DIGIT = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#12
Crass::Tokenizer::RE_ESCAPE = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#13
Crass::Tokenizer::RE_HEX = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#14
Crass::Tokenizer::RE_NAME = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#15
Crass::Tokenizer::RE_NAME_START = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#16
Crass::Tokenizer::RE_NON_PRINTABLE = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#17
Crass::Tokenizer::RE_NUMBER_DECIMAL = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#18
Crass::Tokenizer::RE_NUMBER_EXPONENT = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#19
Crass::Tokenizer::RE_NUMBER_SIGN = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#21
Crass::Tokenizer::RE_NUMBER_STR = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#33
Crass::Tokenizer::RE_QUOTED_URL_START = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#35
Crass::Tokenizer::RE_UNICODE_RANGE_END = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#34
Crass::Tokenizer::RE_UNICODE_RANGE_START = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#36
Crass::Tokenizer::RE_WHITESPACE = T.let(T.unsafe(nil), Regexp)
# source://crass//lib/crass/tokenizer.rb#37
Crass::Tokenizer::RE_WHITESPACE_ANCHORED = T.let(T.unsafe(nil), Regexp)

View File

@@ -0,0 +1,20 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `cssbundling-rails` gem.
# Please instead update this file by running `bin/tapioca gem cssbundling-rails`.
# source://cssbundling-rails//lib/cssbundling-rails.rb#1
module Cssbundling; end
# source://cssbundling-rails//lib/cssbundling/engine.rb#2
class Cssbundling::Engine < ::Rails::Engine
class << self
# source://activesupport/7.2.2.1/lib/active_support/callbacks.rb#70
def __callbacks; end
end
end
# source://cssbundling-rails//lib/cssbundling/version.rb#2
Cssbundling::VERSION = T.let(T.unsafe(nil), String)

1242
sorbet/rbi/gems/curb@1.0.6.rbi generated Normal file

File diff suppressed because it is too large Load Diff

1212
sorbet/rbi/gems/daemons@1.4.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

75
sorbet/rbi/gems/date@3.4.1.rbi generated Normal file
View File

@@ -0,0 +1,75 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `date` gem.
# Please instead update this file by running `bin/tapioca gem date`.
# source://date//lib/date.rb#6
class Date
include ::Comparable
# call-seq:
# infinite? -> false
#
# Returns +false+
#
# @return [Boolean]
#
# source://date//lib/date.rb#13
def infinite?; end
end
# source://date//lib/date.rb#17
class Date::Infinity < ::Numeric
# @return [Infinity] a new instance of Infinity
#
# source://date//lib/date.rb#19
def initialize(d = T.unsafe(nil)); end
# source://date//lib/date.rb#33
def +@; end
# source://date//lib/date.rb#32
def -@; end
# source://date//lib/date.rb#35
def <=>(other); end
# source://date//lib/date.rb#30
def abs; end
# source://date//lib/date.rb#51
def coerce(other); end
# @return [Boolean]
#
# source://date//lib/date.rb#26
def finite?; end
# @return [Boolean]
#
# source://date//lib/date.rb#27
def infinite?; end
# @return [Boolean]
#
# source://date//lib/date.rb#28
def nan?; end
# source://date//lib/date.rb#59
def to_f; end
# @return [Boolean]
#
# source://date//lib/date.rb#25
def zero?; end
protected
# source://date//lib/date.rb#21
def d; end
end
# source://date//lib/date.rb#7
Date::VERSION = T.let(T.unsafe(nil), String)

View File

@@ -0,0 +1,207 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `db-query-matchers` gem.
# Please instead update this file by running `bin/tapioca gem db-query-matchers`.
# Main module that holds global configuration.
#
# source://db-query-matchers//lib/db_query_matchers/version.rb#2
module DBQueryMatchers
class << self
# Gets the current configuration
#
# @return [DBQueryMatchers::Configuration] the active configuration
#
# source://db-query-matchers//lib/db_query_matchers.rb#15
def configuration; end
# Sets the attribute configuration
#
# @param value the value to set the attribute configuration to.
#
# source://db-query-matchers//lib/db_query_matchers.rb#10
def configuration=(_arg0); end
# Updates the current configuration.
#
# @example
# DBQueryMatchers.configure do |config|
# config.ignores = [/SELECT.*FROM.*users/]
# end
# @yield [configuration]
#
# source://db-query-matchers//lib/db_query_matchers.rb#31
def configure; end
# Resets the current configuration.
#
# @return [DBQueryMatchers::Configuration] the active configuration
#
# source://db-query-matchers//lib/db_query_matchers.rb#21
def reset_configuration; end
end
end
# Configuration for the DBQueryMatcher module.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#3
class DBQueryMatchers::Configuration
# @return [Configuration] a new instance of Configuration
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#6
def initialize; end
# Returns the value of attribute backtrace_filter.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def backtrace_filter; end
# Sets the attribute backtrace_filter
#
# @param value the value to set the attribute backtrace_filter to.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def backtrace_filter=(_arg0); end
# Returns the value of attribute db_event.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def db_event; end
# Sets the attribute db_event
#
# @param value the value to set the attribute db_event to.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def db_event=(_arg0); end
# Returns the value of attribute ignore_cached.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def ignore_cached; end
# Sets the attribute ignore_cached
#
# @param value the value to set the attribute ignore_cached to.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def ignore_cached=(_arg0); end
# Returns the value of attribute ignores.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def ignores; end
# Sets the attribute ignores
#
# @param value the value to set the attribute ignores to.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def ignores=(_arg0); end
# Returns the value of attribute log_backtrace.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def log_backtrace; end
# Sets the attribute log_backtrace
#
# @param value the value to set the attribute log_backtrace to.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def log_backtrace=(_arg0); end
# Returns the value of attribute on_query_counted.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def on_query_counted; end
# Sets the attribute on_query_counted
#
# @param value the value to set the attribute on_query_counted to.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def on_query_counted=(_arg0); end
# Returns the value of attribute schemaless.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def schemaless; end
# Sets the attribute schemaless
#
# @param value the value to set the attribute schemaless to.
#
# source://db-query-matchers//lib/db_query_matchers/configuration.rb#4
def schemaless=(_arg0); end
end
# Counter to keep track of the number of queries caused by running a piece of
# code. Closely tied to the `:make_database_queries` matcher, this class is
# designed to be a consumer of `sql.active_record` events.
#
# @example
# counter = DBQueryMatchers::QueryCounter.new
# ActiveSupport::Notifications.subscribed(counter.to_proc,
# 'sql.active_record') do
# # run code here
# end
# puts counter.count # prints the number of queries made
# puts counter.log.join(', ') # prints all queries made
# @see http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html#module-ActiveSupport::Notifications-label-Temporary+Subscriptions
#
# source://db-query-matchers//lib/db_query_matchers/query_counter.rb#16
class DBQueryMatchers::QueryCounter
# @return [QueryCounter] a new instance of QueryCounter
#
# source://db-query-matchers//lib/db_query_matchers/query_counter.rb#19
def initialize(options = T.unsafe(nil)); end
# Method called from the ActiveSupport::Notifications module (through the
# lambda created by `to_proc`) when an SQL query is made.
#
# @param _name [String] name of the event
# @param _start [Time] when the instrumented block started execution
# @param _finish [Time] when the instrumented block ended execution
# @param _message_id [String] unique ID for this notification
# @param payload [Hash] the payload
#
# source://db-query-matchers//lib/db_query_matchers/query_counter.rb#42
def callback(_name, _start, _finish, _message_id, payload); end
# Returns the value of attribute count.
#
# source://db-query-matchers//lib/db_query_matchers/query_counter.rb#17
def count; end
# Returns the value of attribute log.
#
# source://db-query-matchers//lib/db_query_matchers/query_counter.rb#17
def log; end
# Turns a QueryCounter instance into a lambda. Designed to be used when
# subscribing to events through the ActiveSupport::Notifications module.
#
# @return [Proc]
#
# source://db-query-matchers//lib/db_query_matchers/query_counter.rb#30
def to_proc; end
private
# @return [Boolean]
#
# source://db-query-matchers//lib/db_query_matchers/query_counter.rb#57
def any_match?(patterns, sql); end
# source://db-query-matchers//lib/db_query_matchers/query_counter.rb#61
def count_query; end
# source://db-query-matchers//lib/db_query_matchers/query_counter.rb#65
def log_query(sql); end
end
# source://db-query-matchers//lib/db_query_matchers/version.rb#3
DBQueryMatchers::VERSION = T.let(T.unsafe(nil), String)

View File

@@ -0,0 +1,27 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `debug_inspector` gem.
# Please instead update this file by running `bin/tapioca gem debug_inspector`.
# source://debug_inspector//lib/debug_inspector/version.rb#1
class DebugInspector
def backtrace_locations; end
def frame_binding(_arg0); end
def frame_class(_arg0); end
def frame_iseq(_arg0); end
def frame_self(_arg0); end
class << self
def open; end
end
end
# Don't forget to update the version string in the gemspec file.
#
# source://debug_inspector//lib/debug_inspector/version.rb#3
DebugInspector::VERSION = T.let(T.unsafe(nil), String)
# source://debug_inspector//lib/debug_inspector.rb#20
RubyVM::DebugInspector = DebugInspector

4715
sorbet/rbi/gems/devise@4.9.4.rbi generated Normal file

File diff suppressed because it is too large Load Diff

1131
sorbet/rbi/gems/diff-lcs@1.5.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

184
sorbet/rbi/gems/diffy@3.4.3.rbi generated Normal file
View File

@@ -0,0 +1,184 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `diffy` gem.
# Please instead update this file by running `bin/tapioca gem diffy`.
# source://diffy//lib/diffy.rb#6
module Diffy; end
# source://diffy//lib/diffy/css.rb#2
Diffy::CSS = T.let(T.unsafe(nil), String)
# source://diffy//lib/diffy/css.rb#18
Diffy::CSS_COLORBLIND_1 = T.let(T.unsafe(nil), String)
# source://diffy//lib/diffy/diff.rb#2
class Diffy::Diff
include ::Enumerable
# supported options
# +:diff+:: A cli options string passed to diff
# +:source+:: Either _strings_ or _files_. Determines whether string1
# and string2 should be interpreted as strings or file paths.
# +:include_diff_info+:: Include diff header info
# +:include_plus_and_minus_in_html+:: Show the +, -, ' ' at the
# beginning of lines in html output.
#
# @return [Diff] a new instance of Diff
#
# source://diffy//lib/diffy/diff.rb#35
def initialize(string1, string2, options = T.unsafe(nil)); end
# source://diffy//lib/diffy/diff.rb#43
def diff; end
# source://diffy//lib/diffy/diff.rb#79
def each; end
# source://diffy//lib/diffy/diff.rb#102
def each_chunk; end
# Returns the value of attribute options.
#
# source://diffy//lib/diffy/diff.rb#26
def options; end
# Returns the value of attribute string1.
#
# source://diffy//lib/diffy/diff.rb#26
def string1; end
# Returns the value of attribute string2.
#
# source://diffy//lib/diffy/diff.rb#26
def string2; end
# source://diffy//lib/diffy/diff.rb#122
def tempfile(string); end
# source://diffy//lib/diffy/diff.rb#134
def to_s(format = T.unsafe(nil)); end
private
# source://diffy//lib/diffy/diff.rb#149
def diff_bin; end
# options pass to diff program
#
# source://diffy//lib/diffy/diff.rb#170
def diff_options; end
class << self
# source://diffy//lib/diffy/diff.rb#14
def default_format; end
# Sets the attribute default_format
#
# @param value the value to set the attribute default_format to.
#
# source://diffy//lib/diffy/diff.rb#13
def default_format=(_arg0); end
# source://diffy//lib/diffy/diff.rb#20
def default_options; end
# default options passed to new Diff objects
#
# source://diffy//lib/diffy/diff.rb#19
def default_options=(_arg0); end
end
end
# source://diffy//lib/diffy/diff.rb#3
Diffy::Diff::ORIGINAL_DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
# source://diffy//lib/diffy/format.rb#2
module Diffy::Format
# ANSI color output suitable for terminal output
#
# source://diffy//lib/diffy/format.rb#4
def color; end
# Html output which does inline highlighting of changes between two lines.
#
# source://diffy//lib/diffy/format.rb#33
def html; end
# Basic html output which does not attempt to highlight the changes
# between lines, and is more performant.
#
# source://diffy//lib/diffy/format.rb#28
def html_simple; end
# Basic text output
#
# source://diffy//lib/diffy/format.rb#22
def text; end
end
# source://diffy//lib/diffy/html_formatter.rb#2
class Diffy::HtmlFormatter
# @return [HtmlFormatter] a new instance of HtmlFormatter
#
# source://diffy//lib/diffy/html_formatter.rb#4
def initialize(diff, options = T.unsafe(nil)); end
# source://diffy//lib/diffy/html_formatter.rb#9
def to_s; end
private
# remove +/- or wrap in html
#
# source://diffy//lib/diffy/html_formatter.rb#35
def clean_line(line); end
# source://diffy//lib/diffy/html_formatter.rb#124
def highlight(lines); end
# source://diffy//lib/diffy/html_formatter.rb#51
def highlighted_words; end
# source://diffy//lib/diffy/html_formatter.rb#104
def reconstruct_characters(line_diff, type); end
# source://diffy//lib/diffy/html_formatter.rb#91
def split_characters(chunk); end
# source://diffy//lib/diffy/html_formatter.rb#18
def wrap_line(line); end
# source://diffy//lib/diffy/html_formatter.rb#43
def wrap_lines(lines); end
end
# source://diffy//lib/diffy/split_diff.rb#2
class Diffy::SplitDiff
# @return [SplitDiff] a new instance of SplitDiff
#
# source://diffy//lib/diffy/split_diff.rb#3
def initialize(left, right, options = T.unsafe(nil)); end
# source://diffy//lib/diffy/split_diff.rb#16
def left; end
# source://diffy//lib/diffy/split_diff.rb#16
def right; end
private
# source://diffy//lib/diffy/split_diff.rb#23
def split; end
# source://diffy//lib/diffy/split_diff.rb#27
def split_left; end
# source://diffy//lib/diffy/split_diff.rb#38
def split_right; end
end
# source://diffy//lib/diffy.rb#7
Diffy::WINDOWS = T.let(T.unsafe(nil), T.untyped)

228
sorbet/rbi/gems/discard@1.4.0.rbi generated Normal file
View File

@@ -0,0 +1,228 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `discard` gem.
# Please instead update this file by running `bin/tapioca gem discard`.
# source://discard//lib/discard/version.rb#3
module Discard; end
# = Discard Errors
#
# Generic exception class.
#
# source://discard//lib/discard/errors.rb#7
class Discard::DiscardError < ::StandardError; end
# Handles soft deletes of records.
#
# Options:
#
# - :discard_column - The columns used to track soft delete, defaults to `:discarded_at`.
#
# source://discard//lib/discard/model.rb#9
module Discard::Model
extend ::ActiveSupport::Concern
include GeneratedInstanceMethods
mixes_in_class_methods GeneratedClassMethods
mixes_in_class_methods ::Discard::Model::ClassMethods
# Discard the record in the database
#
# @return [Boolean] true if successful, otherwise false
#
# source://discard//lib/discard/model.rb#118
def discard; end
# Discard the record in the database
#
# There's a series of callbacks associated with #discard!. If the
# <tt>before_discard</tt> callback throws +:abort+ the action is cancelled
# and #discard! raises {Discard::RecordNotDiscarded}.
#
# @raise [Discard::RecordNotDiscarded]
# @return [Boolean] true if successful
#
# source://discard//lib/discard/model.rb#133
def discard!; end
# @return [Boolean] true if this record has been discarded, otherwise false
#
# source://discard//lib/discard/model.rb#105
def discarded?; end
# @return [Boolean] false if this record has been discarded, otherwise true
#
# source://discard//lib/discard/model.rb#110
def kept?; end
# Undiscard the record in the database
#
# @return [Boolean] true if successful, otherwise false
#
# source://discard//lib/discard/model.rb#140
def undiscard; end
# Undiscard the record in the database
#
# There's a series of callbacks associated with #undiscard!. If the
# <tt>before_undiscard</tt> callback throws +:abort+ the action is cancelled
# and #undiscard! raises {Discard::RecordNotUndiscarded}.
#
# @raise [Discard::RecordNotUndiscarded]
# @return [Boolean] true if successful
#
# source://discard//lib/discard/model.rb#155
def undiscard!; end
# @return [Boolean] false if this record has been discarded, otherwise true
#
# source://discard//lib/discard/model.rb#110
def undiscarded?; end
private
# @raise [::Discard::RecordNotDiscarded]
#
# source://discard//lib/discard/model.rb#161
def _raise_record_not_discarded; end
# @raise [::Discard::RecordNotUndiscarded]
#
# source://discard//lib/discard/model.rb#165
def _raise_record_not_undiscarded; end
# source://discard//lib/discard/model.rb#169
def discarded_fail_message; end
# source://discard//lib/discard/model.rb#175
def undiscarded_fail_message; end
module GeneratedClassMethods
def discard_column; end
def discard_column=(value); end
def discard_column?; end
end
module GeneratedInstanceMethods
def discard_column; end
def discard_column=(value); end
def discard_column?; end
end
end
# source://discard//lib/discard/model.rb#26
module Discard::Model::ClassMethods
# Discards the records by instantiating each
# record and calling its {#discard} method.
# Each object's callbacks are executed.
# Returns the collection of objects that were discarded.
#
# Note: Instantiation, callback execution, and update of each
# record can be time consuming when you're discarding many records at
# once. It generates at least one SQL +UPDATE+ query per record (or
# possibly more, to enforce your callbacks). If you want to discard many
# rows quickly, without concern for their associations or callbacks, use
# #update_all(discarded_at: Time.current) instead.
#
# ==== Examples
#
# Person.where(age: 0..18).discard_all
#
# source://discard//lib/discard/model.rb#42
def discard_all; end
# Discards the records by instantiating each
# record and calling its {#discard!} method.
# Each object's callbacks are executed.
# Returns the collection of objects that were discarded.
#
# Note: Instantiation, callback execution, and update of each
# record can be time consuming when you're discarding many records at
# once. It generates at least one SQL +UPDATE+ query per record (or
# possibly more, to enforce your callbacks). If you want to discard many
# rows quickly, without concern for their associations or callbacks, use
# #update_all!(discarded_at: Time.current) instead.
#
# ==== Examples
#
# Person.where(age: 0..18).discard_all!
#
# source://discard//lib/discard/model.rb#61
def discard_all!; end
# Undiscards the records by instantiating each
# record and calling its {#undiscard} method.
# Each object's callbacks are executed.
# Returns the collection of objects that were undiscarded.
#
# Note: Instantiation, callback execution, and update of each
# record can be time consuming when you're undiscarding many records at
# once. It generates at least one SQL +UPDATE+ query per record (or
# possibly more, to enforce your callbacks). If you want to undiscard many
# rows quickly, without concern for their associations or callbacks, use
# #update_all(discarded_at: nil) instead.
#
# ==== Examples
#
# Person.where(age: 0..18).undiscard_all
#
# source://discard//lib/discard/model.rb#80
def undiscard_all; end
# Undiscards the records by instantiating each
# record and calling its {#undiscard!} method.
# Each object's callbacks are executed.
# Returns the collection of objects that were undiscarded.
#
# Note: Instantiation, callback execution, and update of each
# record can be time consuming when you're undiscarding many records at
# once. It generates at least one SQL +UPDATE+ query per record (or
# possibly more, to enforce your callbacks). If you want to undiscard many
# rows quickly, without concern for their associations or callbacks, use
# #update_all!(discarded_at: nil) instead.
#
# ==== Examples
#
# Person.where(age: 0..18).undiscard_all!
#
# source://discard//lib/discard/model.rb#99
def undiscard_all!; end
end
# Raised by {Discard::Model#discard!}
#
# source://discard//lib/discard/errors.rb#11
class Discard::RecordNotDiscarded < ::Discard::DiscardError
# @return [RecordNotDiscarded] a new instance of RecordNotDiscarded
#
# source://discard//lib/discard/errors.rb#14
def initialize(message = T.unsafe(nil), record = T.unsafe(nil)); end
# Returns the value of attribute record.
#
# source://discard//lib/discard/errors.rb#12
def record; end
end
# Raised by {Discard::Model#undiscard!}
#
# source://discard//lib/discard/errors.rb#21
class Discard::RecordNotUndiscarded < ::Discard::DiscardError
# @return [RecordNotUndiscarded] a new instance of RecordNotUndiscarded
#
# source://discard//lib/discard/errors.rb#24
def initialize(message = T.unsafe(nil), record = T.unsafe(nil)); end
# Returns the value of attribute record.
#
# source://discard//lib/discard/errors.rb#22
def record; end
end
# Discard version
#
# source://discard//lib/discard/version.rb#5
Discard::VERSION = T.let(T.unsafe(nil), String)

232
sorbet/rbi/gems/disco@0.5.1.rbi generated Normal file
View File

@@ -0,0 +1,232 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `disco` gem.
# Please instead update this file by running `bin/tapioca gem disco`.
# source://disco//lib/disco/data.rb#1
module Disco
extend ::Disco::Data
end
# source://disco//lib/disco/data.rb#2
module Disco::Data
# source://disco//lib/disco/data.rb#3
def load_movielens; end
private
# source://disco//lib/disco/data.rb#30
def download_file(fname, origin, file_hash:); end
end
# source://disco//lib/disco/engine.rb#2
class Disco::Engine < ::Rails::Engine
class << self
# source://activesupport/7.2.2.1/lib/active_support/callbacks.rb#70
def __callbacks; end
end
end
# source://disco//lib/disco.rb#15
class Disco::Error < ::StandardError; end
# source://disco//lib/disco/metrics.rb#2
module Disco::Metrics
class << self
# @raise [ArgumentError]
#
# source://disco//lib/disco/metrics.rb#4
def rmse(act, exp); end
end
end
# source://disco//lib/disco/model.rb#2
module Disco::Model
# source://disco//lib/disco/model.rb#3
def has_recommended(name, class_name: T.unsafe(nil)); end
end
class Disco::Recommendation < ::ActiveRecord::Base
include ::Disco::Recommendation::GeneratedAttributeMethods
include ::Disco::Recommendation::GeneratedAssociationMethods
include ::Kaminari::ActiveRecordModelExtension
include ::Kaminari::ConfigurationMethods
extend ::Kaminari::ConfigurationMethods::ClassMethods
# source://activerecord/7.2.2.1/lib/active_record/autosave_association.rb#162
def autosave_associated_records_for_item(*args); end
# source://activerecord/7.2.2.1/lib/active_record/autosave_association.rb#162
def autosave_associated_records_for_subject(*args); end
class << self
# source://activesupport/7.2.2.1/lib/active_support/callbacks.rb#70
def __callbacks; end
# source://activerecord/7.2.2.1/lib/active_record/reflection.rb#11
def _reflections; end
# source://activemodel/7.2.2.1/lib/active_model/validations.rb#71
def _validators; end
# source://activerecord/7.2.2.1/lib/active_record/enum.rb#167
def defined_enums; end
# source://kaminari-activerecord/1.2.2/lib/kaminari/activerecord/active_record_model_extension.rb#15
def page(num = T.unsafe(nil)); end
end
end
module Disco::Recommendation::GeneratedAssociationMethods
# source://activerecord/7.2.2.1/lib/active_record/associations/builder/association.rb#103
def item; end
# source://activerecord/7.2.2.1/lib/active_record/associations/builder/association.rb#111
def item=(value); end
# source://activerecord/7.2.2.1/lib/active_record/associations/builder/belongs_to.rb#146
def item_changed?; end
# source://activerecord/7.2.2.1/lib/active_record/associations/builder/belongs_to.rb#150
def item_previously_changed?; end
# source://activerecord/7.2.2.1/lib/active_record/associations/builder/singular_association.rb#19
def reload_item; end
# source://activerecord/7.2.2.1/lib/active_record/associations/builder/singular_association.rb#19
def reload_subject; end
# source://activerecord/7.2.2.1/lib/active_record/associations/builder/singular_association.rb#23
def reset_item; end
# source://activerecord/7.2.2.1/lib/active_record/associations/builder/singular_association.rb#23
def reset_subject; end
# source://activerecord/7.2.2.1/lib/active_record/associations/builder/association.rb#103
def subject; end
# source://activerecord/7.2.2.1/lib/active_record/associations/builder/association.rb#111
def subject=(value); end
# source://activerecord/7.2.2.1/lib/active_record/associations/builder/belongs_to.rb#146
def subject_changed?; end
# source://activerecord/7.2.2.1/lib/active_record/associations/builder/belongs_to.rb#150
def subject_previously_changed?; end
end
module Disco::Recommendation::GeneratedAttributeMethods; end
# source://disco//lib/disco/recommender.rb#2
class Disco::Recommender
# @return [Recommender] a new instance of Recommender
#
# source://disco//lib/disco/recommender.rb#5
def initialize(factors: T.unsafe(nil), epochs: T.unsafe(nil), verbose: T.unsafe(nil), top_items: T.unsafe(nil)); end
# @raise [ArgumentError]
#
# source://disco//lib/disco/recommender.rb#14
def fit(train_set, validation_set: T.unsafe(nil)); end
# Returns the value of attribute global_mean.
#
# source://disco//lib/disco/recommender.rb#3
def global_mean; end
# source://disco//lib/disco/recommender.rb#259
def inspect; end
# source://disco//lib/disco/recommender.rb#234
def item_factors(item_id = T.unsafe(nil)); end
# source://disco//lib/disco/recommender.rb#221
def item_ids; end
# source://disco//lib/disco/recommender.rb#173
def item_recs(item_id, count: T.unsafe(nil)); end
# source://disco//lib/disco/recommender.rb#248
def optimize_item_recs(library: T.unsafe(nil)); end
# source://disco//lib/disco/recommender.rb#248
def optimize_similar_items(library: T.unsafe(nil)); end
# source://disco//lib/disco/recommender.rb#254
def optimize_similar_users(library: T.unsafe(nil)); end
# source://disco//lib/disco/recommender.rb#243
def optimize_user_recs; end
# generates a prediction even if a user has already rated the item
#
# source://disco//lib/disco/recommender.rb#111
def predict(data); end
# source://disco//lib/disco/recommender.rb#173
def similar_items(item_id, count: T.unsafe(nil)); end
# source://disco//lib/disco/recommender.rb#179
def similar_users(user_id, count: T.unsafe(nil)); end
# source://disco//lib/disco/recommender.rb#263
def to_json; end
# source://disco//lib/disco/recommender.rb#184
def top_items(count: T.unsafe(nil)); end
# source://disco//lib/disco/recommender.rb#225
def user_factors(user_id = T.unsafe(nil)); end
# source://disco//lib/disco/recommender.rb#217
def user_ids; end
# source://disco//lib/disco/recommender.rb#129
def user_recs(user_id, count: T.unsafe(nil), item_ids: T.unsafe(nil)); end
private
# source://disco//lib/disco/recommender.rb#410
def check_fit; end
# source://disco//lib/disco/recommender.rb#397
def check_ratings(ratings); end
# @raise [ArgumentError]
#
# source://disco//lib/disco/recommender.rb#406
def check_training_set(train_set); end
# factors should already be normalized for similar users/items
#
# source://disco//lib/disco/recommender.rb#305
def create_index(factors, library:); end
# source://disco//lib/disco/recommender.rb#347
def item_norms; end
# source://disco//lib/disco/recommender.rb#433
def json_load(obj); end
# source://disco//lib/disco/recommender.rb#351
def norms(factors); end
# source://disco//lib/disco/recommender.rb#357
def similar(id, key, map, factors, norms, count, index); end
# source://disco//lib/disco/recommender.rb#414
def to_dataset(dataset); end
# source://disco//lib/disco/recommender.rb#343
def user_norms; end
class << self
# source://disco//lib/disco/recommender.rb#292
def load_json(json); end
end
end
# source://disco//lib/disco/version.rb#2
Disco::VERSION = T.let(T.unsafe(nil), String)

View File

@@ -0,0 +1,262 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `domain_name` gem.
# Please instead update this file by running `bin/tapioca gem domain_name`.
# Represents a domain name ready for extracting its registered domain
# and TLD.
#
# source://domain_name//lib/domain_name/version.rb#1
class DomainName
# Parses _hostname_ into a DomainName object. An IP address is also
# accepted. An IPv6 address may be enclosed in square brackets.
#
# @return [DomainName] a new instance of DomainName
#
# source://domain_name//lib/domain_name.rb#77
def initialize(hostname); end
# source://domain_name//lib/domain_name.rb#194
def <(other); end
# source://domain_name//lib/domain_name.rb#216
def <=(other); end
# source://domain_name//lib/domain_name.rb#178
def <=>(other); end
# source://domain_name//lib/domain_name.rb#173
def ==(other); end
# source://domain_name//lib/domain_name.rb#205
def >(other); end
# source://domain_name//lib/domain_name.rb#227
def >=(other); end
# Returns true if this domain name has a canonical registered
# domain.
#
# @return [Boolean]
#
# source://domain_name//lib/domain_name.rb#69
def canonical?; end
# Returns true if this domain name has a canonical TLD.
#
# @return [Boolean]
#
# source://domain_name//lib/domain_name.rb#63
def canonical_tld?; end
# Checks if the server represented by this domain is qualified to
# send and receive cookies with a domain attribute value of
# _domain_. A true value given as the second argument represents
# cookies without a domain attribute value, in which case only
# hostname equality is checked.
#
# @return [Boolean]
#
# source://domain_name//lib/domain_name.rb#149
def cookie_domain?(domain, host_only = T.unsafe(nil)); end
# The least "universally original" domain part of this domain name.
# For example, "example.co.uk" for "www.sub.example.co.uk". This
# may be nil if the hostname does not have one, like when it is an
# IP address, an effective TLD or higher itself, or of a
# non-canonical domain.
#
# source://domain_name//lib/domain_name.rb#31
def domain; end
# source://domain_name//lib/domain_name.rb#255
def domain_idn; end
# The full host name normalized, ASCII-ized and downcased using the
# Unicode NFC rules and the Punycode algorithm. If initialized with
# an IP address, the string representation of the IP address
# suitable for opening a connection to.
#
# source://domain_name//lib/domain_name.rb#20
def hostname; end
# source://domain_name//lib/domain_name.rb#244
def hostname_idn; end
# source://domain_name//lib/domain_name.rb#244
def idn; end
# source://domain_name//lib/domain_name.rb#273
def inspect; end
# Returns an IPAddr object if this is an IP address.
#
# source://domain_name//lib/domain_name.rb#49
def ipaddr; end
# Returns true if this is an IP address, such as "192.168.0.1" and
# "[::1]".
#
# @return [Boolean]
#
# source://domain_name//lib/domain_name.rb#53
def ipaddr?; end
# Returns the superdomain of this domain name.
#
# source://domain_name//lib/domain_name.rb#167
def superdomain; end
# The TLD part of this domain name. For example, if the hostname is
# "www.sub.example.co.uk", the TLD part is "uk". This property is
# nil only if +ipaddr?+ is true. This may be nil if the hostname
# does not have one, like when it is an IP address or of a
# non-canonical domain.
#
# source://domain_name//lib/domain_name.rb#42
def tld; end
# source://domain_name//lib/domain_name.rb#264
def tld_idn; end
# source://domain_name//lib/domain_name.rb#238
def to_s; end
# source://domain_name//lib/domain_name.rb#238
def to_str; end
# Returns a host name representation suitable for use in the host
# name part of a URI. A host name, an IPv4 address, or a IPv6
# address enclosed in square brackets.
#
# source://domain_name//lib/domain_name.rb#60
def uri_host; end
class << self
# source://domain_name//lib/domain_name/etld_data.rb#9572
def etld_data; end
# Normalizes a _domain_ using the Punycode algorithm as necessary.
# Input must be strictly ASCII-only or unicode.
# The result will be a downcased, ASCII-only string.
#
# source://domain_name//lib/domain_name.rb#288
def normalize(domain); end
end
end
# source://domain_name//lib/domain_name.rb#73
DomainName::DOT = T.let(T.unsafe(nil), String)
# source://domain_name//lib/domain_name/etld_data.rb#4
DomainName::ETLD_DATA = T.let(T.unsafe(nil), Hash)
# source://domain_name//lib/domain_name/etld_data.rb#2
DomainName::ETLD_DATA_DATE = T.let(T.unsafe(nil), String)
# source://domain_name//lib/domain_name/punycode.rb#52
module DomainName::Punycode
class << self
# Decode a +string+ encoded in Punycode
#
# source://domain_name//lib/domain_name/punycode.rb#194
def decode(string); end
# Decode a hostname using IDN/Punycode algorithms
#
# source://domain_name//lib/domain_name/punycode.rb#276
def decode_hostname(hostname); end
# Encode a +string+ in Punycode
#
# source://domain_name//lib/domain_name/punycode.rb#101
def encode(string); end
# Encode a hostname using IDN/Punycode algorithms
#
# source://domain_name//lib/domain_name/punycode.rb#181
def encode_hostname(hostname); end
end
end
# Most errors we raise are basically kind of ArgumentError.
#
# source://domain_name//lib/domain_name/punycode.rb#96
class DomainName::Punycode::ArgumentError < ::ArgumentError; end
# source://domain_name//lib/domain_name/punycode.rb#53
DomainName::Punycode::BASE = T.let(T.unsafe(nil), Integer)
# source://domain_name//lib/domain_name/punycode.rb#97
class DomainName::Punycode::BufferOverflowError < ::DomainName::Punycode::ArgumentError; end
# source://domain_name//lib/domain_name/punycode.rb#65
DomainName::Punycode::CUTOFF = T.let(T.unsafe(nil), Integer)
# source://domain_name//lib/domain_name/punycode.rb#57
DomainName::Punycode::DAMP = T.let(T.unsafe(nil), Integer)
# Returns the numeric value of a basic code point (for use in
# representing integers) in the range 0 to base-1, or nil if cp
# is does not represent a value.
#
# source://domain_name//lib/domain_name/punycode.rb#72
DomainName::Punycode::DECODE_DIGIT = T.let(T.unsafe(nil), Hash)
# source://domain_name//lib/domain_name/punycode.rb#60
DomainName::Punycode::DELIMITER = T.let(T.unsafe(nil), String)
# source://domain_name//lib/domain_name/punycode.rb#92
DomainName::Punycode::DOT = T.let(T.unsafe(nil), String)
# Returns the basic code point whose value (when used for
# representing integers) is d, which must be in the range 0 to
# BASE-1. The lowercase form is used unless flag is true, in
# which case the uppercase form is used. The behavior is
# undefined if flag is nonzero and digit d has no uppercase
# form.
#
# source://domain_name//lib/domain_name/punycode.rb#86
DomainName::Punycode::ENCODE_DIGIT = T.let(T.unsafe(nil), Proc)
# source://domain_name//lib/domain_name/punycode.rb#58
DomainName::Punycode::INITIAL_BIAS = T.let(T.unsafe(nil), Integer)
# source://domain_name//lib/domain_name/punycode.rb#59
DomainName::Punycode::INITIAL_N = T.let(T.unsafe(nil), Integer)
# source://domain_name//lib/domain_name/punycode.rb#64
DomainName::Punycode::LOBASE = T.let(T.unsafe(nil), Integer)
# source://domain_name//lib/domain_name/punycode.rb#62
DomainName::Punycode::MAXINT = T.let(T.unsafe(nil), Integer)
# source://domain_name//lib/domain_name/punycode.rb#93
DomainName::Punycode::PREFIX = T.let(T.unsafe(nil), String)
# source://domain_name//lib/domain_name/punycode.rb#67
DomainName::Punycode::RE_NONBASIC = T.let(T.unsafe(nil), Regexp)
# source://domain_name//lib/domain_name/punycode.rb#56
DomainName::Punycode::SKEW = T.let(T.unsafe(nil), Integer)
# source://domain_name//lib/domain_name/punycode.rb#55
DomainName::Punycode::TMAX = T.let(T.unsafe(nil), Integer)
# source://domain_name//lib/domain_name/punycode.rb#54
DomainName::Punycode::TMIN = T.let(T.unsafe(nil), Integer)
# source://domain_name//lib/domain_name/version.rb#2
DomainName::VERSION = T.let(T.unsafe(nil), String)
class Object < ::BasicObject
include ::Kernel
include ::PP::ObjectMixin
private
# source://domain_name//lib/domain_name.rb#298
def DomainName(hostname); end
end

1347
sorbet/rbi/gems/drb@2.2.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

155
sorbet/rbi/gems/erubi@1.13.1.rbi generated Normal file
View File

@@ -0,0 +1,155 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `erubi` gem.
# Please instead update this file by running `bin/tapioca gem erubi`.
# source://erubi//lib/erubi.rb#3
module Erubi
private
def h(_arg0); end
class << self
def h(_arg0); end
end
end
# source://erubi//lib/erubi.rb#51
class Erubi::Engine
# Initialize a new Erubi::Engine. Options:
# +:bufval+ :: The value to use for the buffer variable, as a string (default <tt>'::String.new'</tt>).
# +:bufvar+ :: The variable name to use for the buffer variable, as a string.
# +:chain_appends+ :: Whether to chain <tt><<</t> calls to the buffer variable. Offers better
# performance, but can cause issues when the buffer variable is reassigned during
# template rendering (default +false+).
# +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar.
# +:escapefunc+ :: The function to use for escaping, as a string (default: <tt>'::Erubi.h'</tt>).
# +:escape+ :: Whether to make <tt><%=</tt> escape by default, and <tt><%==</tt> not escape by default.
# +:escape_html+ :: Same as +:escape+, with lower priority.
# +:filename+ :: The filename for the template.
# the resulting source code. Note this may cause problems if you are wrapping the resulting
# source code in other code, because the magic comment only has an effect at the beginning of
# the file, and having the magic comment later in the file can trigger warnings.
# +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with <tt>.freeze</tt>
# (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older).
# Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled
# in order to improve performance.
# +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default <tt>'<%'</tt>).
# +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default <tt>'%>'</tt>).
# +:outvar+ :: Same as +:bufvar+, with lower priority.
# +:postamble+ :: The postamble for the template, by default returns the resulting source code.
# +:preamble+ :: The preamble for the template, by default initializes the buffer variable.
# +:regexp+ :: The regexp to use for scanning.
# +:src+ :: The initial value to use for the source code, an empty string by default.
# +:trim+ :: Whether to trim leading and trailing whitespace, true by default.
#
# @return [Engine] a new instance of Engine
#
# source://erubi//lib/erubi.rb#91
def initialize(input, properties = T.unsafe(nil)); end
# The variable name used for the buffer variable.
#
# source://erubi//lib/erubi.rb#62
def bufvar; end
# The filename of the template, if one was given.
#
# source://erubi//lib/erubi.rb#59
def filename; end
# The frozen ruby source code generated from the template, which can be evaled.
#
# source://erubi//lib/erubi.rb#56
def src; end
private
# :nocov:
#
# source://erubi//lib/erubi.rb#209
def _dup_string_if_frozen(string); end
# Add ruby code to the template
#
# source://erubi//lib/erubi.rb#232
def add_code(code); end
# Add the given ruby expression result to the template,
# escaping it based on the indicator given and escape flag.
#
# source://erubi//lib/erubi.rb#241
def add_expression(indicator, code); end
# Add the result of Ruby expression to the template
#
# source://erubi//lib/erubi.rb#250
def add_expression_result(code); end
# Add the escaped result of Ruby expression to the template
#
# source://erubi//lib/erubi.rb#255
def add_expression_result_escaped(code); end
# Add the given postamble to the src. Can be overridden in subclasses
# to make additional changes to src that depend on the current state.
#
# source://erubi//lib/erubi.rb#261
def add_postamble(postamble); end
# Add raw text to the template. Modifies argument if argument is mutable as a memory optimization.
# Must be called with a string, cannot be called with nil (Rails's subclass depends on it).
#
# source://erubi//lib/erubi.rb#222
def add_text(text); end
# Raise an exception, as the base engine class does not support handling other indicators.
#
# @raise [ArgumentError]
#
# source://erubi//lib/erubi.rb#267
def handle(indicator, code, tailch, rspace, lspace); end
# Make sure that any current expression has been terminated.
# The default is to terminate all expressions, but when
# the chain_appends option is used, expressions may not be
# terminated.
#
# source://erubi//lib/erubi.rb#295
def terminate_expression; end
# Make sure the buffer variable is the target of the next append
# before yielding to the block. Mark that the buffer is the target
# of the next append after the block executes.
#
# This method should only be called if the block will result in
# code where << will append to the bufvar.
#
# source://erubi//lib/erubi.rb#277
def with_buffer; end
end
# The default regular expression used for scanning.
#
# source://erubi//lib/erubi.rb#53
Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp)
# source://erubi//lib/erubi.rb#17
Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass)
# source://erubi//lib/erubi.rb#15
Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol)
# source://erubi//lib/erubi.rb#8
Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer)
# source://erubi//lib/erubi.rb#9
Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer)
# source://erubi//lib/erubi.rb#16
Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass)
# source://erubi//lib/erubi.rb#4
Erubi::VERSION = T.let(T.unsafe(nil), String)

473
sorbet/rbi/gems/et-orbi@1.2.11.rbi generated Normal file
View File

@@ -0,0 +1,473 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `et-orbi` gem.
# Please instead update this file by running `bin/tapioca gem et-orbi`.
# source://et-orbi//lib/et-orbi/info.rb#2
module EtOrbi
class << self
# For `make info`
#
# source://et-orbi//lib/et-orbi/info.rb#36
def _make_info; end
# test tool
#
# source://et-orbi//lib/et-orbi/zones.rb#89
def _os_zone; end
# test tool
#
# source://et-orbi//lib/et-orbi/zones.rb#89
def _os_zone=(_arg0); end
# source://et-orbi//lib/et-orbi/zones.rb#109
def centos_tz; end
# source://et-orbi//lib/et-orbi/make.rb#9
def chronic_enabled=(b); end
# @return [Boolean]
#
# source://et-orbi//lib/et-orbi/make.rb#6
def chronic_enabled?; end
# system tz determination
#
# source://et-orbi//lib/et-orbi/zones.rb#102
def debian_tz; end
# source://et-orbi//lib/et-orbi/zones.rb#53
def determine_local_tzone; end
# source://et-orbi//lib/et-orbi/zones.rb#35
def extract_zone(str); end
# source://et-orbi//lib/et-orbi/zones.rb#131
def gather_tzs; end
# source://et-orbi//lib/et-orbi/zone.rb#6
def get_tzone(o); end
# https://en.wikipedia.org/wiki/ISO_8601
# Postel's law applies
#
# source://et-orbi//lib/et-orbi/zones.rb#21
def list_iso8601_zones(s); end
# source://et-orbi//lib/et-orbi/make.rb#51
def make(*a); end
# source://et-orbi//lib/et-orbi/make.rb#51
def make_time(*a); end
# source://et-orbi//lib/et-orbi/make.rb#15
def now(zone = T.unsafe(nil)); end
# source://et-orbi//lib/et-orbi/zones.rb#91
def os_tz; end
# source://et-orbi//lib/et-orbi/zones.rb#122
def osx_tz; end
# source://et-orbi//lib/et-orbi/make.rb#20
def parse(str, opts = T.unsafe(nil)); end
# source://et-orbi//lib/et-orbi/info.rb#6
def platform_info; end
# source://et-orbi//lib/et-orbi/info.rb#42
def render_nozone_time(seconds); end
# source://et-orbi//lib/et-orbi/zones.rb#164
def tweak_zone_name(name); end
# Semi-helpful, since it requires the current time
#
# source://et-orbi//lib/et-orbi/zones.rb#138
def windows_zone_name(zone_name, time); end
# source://et-orbi//lib/et-orbi/zones.rb#53
def zone; end
protected
# source://et-orbi//lib/et-orbi/make.rb#73
def chronic_parse(str, opts); end
# source://et-orbi//lib/et-orbi/zone.rb#56
def create_offset_tzone(utc_off, id); end
# source://et-orbi//lib/et-orbi/zones.rb#240
def custom_tzs; end
# source://et-orbi//lib/et-orbi/zones.rb#210
def determine_local_tzones; end
# https://api.rubyonrails.org/classes/ActiveSupport/TimeWithZone.html
#
# If it responds to #time_zone, then return that time zone.
#
# source://et-orbi//lib/et-orbi/zone.rb#126
def get_as_tzone(t); end
# source://et-orbi//lib/et-orbi/zone.rb#115
def get_local_tzone(t); end
# custom timezones, no DST, just an offset, like "+08:00" or "-01:30"
#
# source://et-orbi//lib/et-orbi/zone.rb#29
def get_offset_tzone(str); end
# source://et-orbi//lib/et-orbi/zone.rb#95
def get_tzinfo_tzone(name); end
# source://et-orbi//lib/et-orbi/zone.rb#74
def get_x_offset_tzone(str); end
# source://et-orbi//lib/et-orbi/make.rb#108
def make_from_array(a, zone); end
# source://et-orbi//lib/et-orbi/make.rb#99
def make_from_date(d, zone); end
# source://et-orbi//lib/et-orbi/make.rb#125
def make_from_eotime(eot, zone); end
# source://et-orbi//lib/et-orbi/make.rb#120
def make_from_numeric(f, zone); end
# source://et-orbi//lib/et-orbi/make.rb#115
def make_from_string(s, zone); end
# source://et-orbi//lib/et-orbi/make.rb#84
def make_from_time(t, zone); end
# source://et-orbi//lib/et-orbi/zones.rb#176
def normalize(name); end
# source://et-orbi//lib/et-orbi/zone.rb#84
def to_offset(n); end
# source://et-orbi//lib/et-orbi/zones.rb#241
def tz_all; end
# source://et-orbi//lib/et-orbi/info.rb#67
def tzinfo_data_version; end
# source://et-orbi//lib/et-orbi/info.rb#59
def tzinfo_version; end
# source://et-orbi//lib/et-orbi/zones.rb#181
def unzz(name); end
# source://et-orbi//lib/et-orbi/zone.rb#106
def windows_zone_code_x(zone_name); end
end
end
# Our EoTime class (which quacks like a ::Time).
#
# An EoTime instance should respond to most of the methods ::Time instances
# respond to. If a method is missing, feel free to open an issue to
# ask (politely) for it. If it makes sense, it'll get added, else
# a workaround will get suggested.
# The immediate workaround is to call #to_t on the EoTime instance to get
# equivalent ::Time instance in the local, current, timezone.
#
# source://et-orbi//lib/et-orbi/time.rb#13
class EtOrbi::EoTime
# @return [EoTime] a new instance of EoTime
#
# source://et-orbi//lib/et-orbi/time.rb#67
def initialize(s, zone); end
# source://et-orbi//lib/et-orbi/time.rb#251
def +(t); end
# source://et-orbi//lib/et-orbi/time.rb#252
def -(t); end
# source://et-orbi//lib/et-orbi/time.rb#244
def <(o); end
# source://et-orbi//lib/et-orbi/time.rb#245
def <=(o); end
# source://et-orbi//lib/et-orbi/time.rb#246
def <=>(o); end
# source://et-orbi//lib/et-orbi/time.rb#221
def ==(o); end
# Nota Bene:
#
# Unlike ==, the equal? method should never be overridden by subclasses
# as it is used to determine object identity (that is, a.equal?(b) if and
# only if a is the same object as b)
#
# The eql? method returns true if obj and other refer to the same hash key.
# This is used by Hash to test members for equality.
#
# source://et-orbi//lib/et-orbi/time.rb#242
def >(o); end
# source://et-orbi//lib/et-orbi/time.rb#243
def >=(o); end
# source://et-orbi//lib/et-orbi/time.rb#248
def add(t); end
# Returns true if this EoTime instance corresponds to 2 different UTC
# times.
# It happens when transitioning from DST to winter time.
#
# https://www.timeanddate.com/time/change/usa/new-york?year=2018
#
# @return [Boolean]
#
# source://et-orbi//lib/et-orbi/time.rb#128
def ambiguous?; end
# source://et-orbi//lib/et-orbi/time.rb#218
def asctime; end
# source://et-orbi//lib/et-orbi/time.rb#409
def clone; end
# source://et-orbi//lib/et-orbi/time.rb#218
def day; end
# Returns this ::EtOrbi::EoTime as a ::Time instance
# in the current UTC timezone.
#
# source://et-orbi//lib/et-orbi/time.rb#142
def getgm; end
# Returns this ::EtOrbi::EoTime as a ::Time instance
# in the current UTC timezone.
#
# source://et-orbi//lib/et-orbi/time.rb#142
def getutc; end
# source://et-orbi//lib/et-orbi/time.rb#218
def hour; end
# source://et-orbi//lib/et-orbi/time.rb#339
def in_time_zone(zone = T.unsafe(nil)); end
# source://et-orbi//lib/et-orbi/time.rb#317
def inc(t, dir = T.unsafe(nil)); end
# @return [Boolean]
#
# source://et-orbi//lib/et-orbi/time.rb#189
def is_dst?; end
# @return [Boolean]
#
# source://et-orbi//lib/et-orbi/time.rb#189
def isdst; end
# source://et-orbi//lib/et-orbi/time.rb#292
def iso8601(fraction_digits = T.unsafe(nil)); end
# source://et-orbi//lib/et-orbi/time.rb#339
def localtime(zone = T.unsafe(nil)); end
# source://et-orbi//lib/et-orbi/time.rb#218
def min; end
# source://et-orbi//lib/et-orbi/time.rb#218
def month; end
# source://et-orbi//lib/et-orbi/time.rb#257
def monthdays; end
# "reference week", used in fugit for cron modulo notation
#
# source://et-orbi//lib/et-orbi/time.rb#367
def rday; end
# source://et-orbi//lib/et-orbi/time.rb#377
def reach(points); end
# "reference week", used in fugit for cron modulo notation
#
# source://et-orbi//lib/et-orbi/time.rb#355
def rweek; end
# source://et-orbi//lib/et-orbi/time.rb#218
def sec; end
# instance methods
#
# source://et-orbi//lib/et-orbi/time.rb#64
def seconds; end
# source://et-orbi//lib/et-orbi/time.rb#103
def seconds=(f); end
# source://et-orbi//lib/et-orbi/time.rb#170
def strftime(format); end
# source://et-orbi//lib/et-orbi/time.rb#249
def subtract(t); end
# source://et-orbi//lib/et-orbi/time.rb#195
def to_debug_s; end
# source://et-orbi//lib/et-orbi/time.rb#160
def to_f; end
# source://et-orbi//lib/et-orbi/time.rb#165
def to_i; end
# Returns this ::EtOrbi::EoTime as a ::Time instance
# in the current timezone.
#
# Has a #to_t alias.
#
# source://et-orbi//lib/et-orbi/time.rb#182
def to_local_time; end
# source://et-orbi//lib/et-orbi/time.rb#282
def to_s; end
# Returns this ::EtOrbi::EoTime as a ::Time instance
# in the current timezone.
#
# Has a #to_t alias.
#
# source://et-orbi//lib/et-orbi/time.rb#182
def to_t; end
# source://et-orbi//lib/et-orbi/time.rb#312
def to_time_s; end
# Debug current time by showing local time / delta / utc time
# for example: "0120-7(0820)"
#
# source://et-orbi//lib/et-orbi/time.rb#301
def to_utc_comparison_s; end
# Returns this ::EtOrbi::EoTime as a ::Time instance
# in the current UTC timezone.
#
# source://et-orbi//lib/et-orbi/time.rb#142
def to_utc_time; end
# source://et-orbi//lib/et-orbi/time.rb#287
def to_zs; end
# Nullify the "caches" used by #to_time, #rweek, and others
#
# source://et-orbi//lib/et-orbi/time.rb#96
def touch; end
# source://et-orbi//lib/et-orbi/time.rb#339
def translate(zone = T.unsafe(nil)); end
# source://et-orbi//lib/et-orbi/time.rb#218
def usec; end
# Returns this ::EtOrbi::EoTime as a ::Time instance
# in the current UTC timezone.
#
# source://et-orbi//lib/et-orbi/time.rb#142
def utc; end
# Returns true if this ::EtOrbi::EoTime instance timezone is UTC.
# Returns false else.
#
# @return [Boolean]
#
# source://et-orbi//lib/et-orbi/time.rb#150
def utc?; end
# source://et-orbi//lib/et-orbi/time.rb#210
def utc_offset; end
# source://et-orbi//lib/et-orbi/time.rb#218
def wday; end
# source://et-orbi//lib/et-orbi/time.rb#347
def wday_in_month; end
# source://et-orbi//lib/et-orbi/time.rb#218
def yday; end
# source://et-orbi//lib/et-orbi/time.rb#218
def year; end
# Returns the value of attribute zone.
#
# source://et-orbi//lib/et-orbi/time.rb#65
def zone; end
# source://et-orbi//lib/et-orbi/time.rb#112
def zone=(z); end
protected
# source://et-orbi//lib/et-orbi/time.rb#465
def _to_f(o); end
# source://et-orbi//lib/et-orbi/time.rb#426
def count_weeks(start, dir); end
# source://et-orbi//lib/et-orbi/time.rb#439
def strfz(code); end
# Returns a Ruby Time instance.
#
# Warning: the timezone of that Time instance will be UTC when used with
# TZInfo < 2.0.0.
#
# source://et-orbi//lib/et-orbi/time.rb#421
def to_time; end
class << self
# source://et-orbi//lib/et-orbi/time.rb#30
def get_tzone(o); end
# source://et-orbi//lib/et-orbi/time.rb#55
def local(*a); end
# source://et-orbi//lib/et-orbi/time.rb#35
def local_tzone; end
# source://et-orbi//lib/et-orbi/time.rb#45
def make(o); end
# source://et-orbi//lib/et-orbi/time.rb#20
def now(zone = T.unsafe(nil)); end
# source://et-orbi//lib/et-orbi/time.rb#25
def parse(str, opts = T.unsafe(nil)); end
# source://et-orbi//lib/et-orbi/time.rb#40
def platform_info; end
# source://et-orbi//lib/et-orbi/time.rb#50
def utc(*a); end
end
end
# source://et-orbi//lib/et-orbi/time.rb#254
EtOrbi::EoTime::DAY_S = T.let(T.unsafe(nil), Integer)
# source://et-orbi//lib/et-orbi/time.rb#255
EtOrbi::EoTime::WEEK_S = T.let(T.unsafe(nil), Integer)
# source://et-orbi//lib/et-orbi.rb#16
EtOrbi::VERSION = T.let(T.unsafe(nil), String)
# https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones
# https://support.microsoft.com/en-ca/help/973627/microsoft-time-zone-index-values
# https://ss64.com/nt/timezones.html
#
# source://et-orbi//lib/et-orbi/zones.rb#248
EtOrbi::ZONE_ALIASES = T.let(T.unsafe(nil), Hash)

457
sorbet/rbi/gems/execjs@2.10.0.rbi generated Normal file
View File

@@ -0,0 +1,457 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `execjs` gem.
# Please instead update this file by running `bin/tapioca gem execjs`.
# source://execjs//lib/execjs/version.rb#1
module ExecJS
class << self
# source://execjs//lib/execjs/module.rb#26
def compile(source, options = T.unsafe(nil)); end
# @return [Boolean]
#
# source://execjs//lib/execjs/module.rb#38
def cygwin?; end
# source://execjs//lib/execjs/module.rb#22
def eval(source, options = T.unsafe(nil)); end
# source://execjs//lib/execjs/module.rb#18
def exec(source, options = T.unsafe(nil)); end
# source://execjs//lib/execjs/module.rb#30
def root; end
# Returns the value of attribute runtime.
#
# source://execjs//lib/execjs.rb#5
def runtime; end
# @raise [RuntimeUnavailable]
#
# source://execjs//lib/execjs/module.rb#13
def runtime=(runtime); end
# source://execjs//lib/execjs/runtimes.rb#108
def runtimes; end
# @return [Boolean]
#
# source://execjs//lib/execjs/module.rb#34
def windows?; end
end
end
# source://execjs//lib/execjs/disabled_runtime.rb#4
class ExecJS::DisabledRuntime < ::ExecJS::Runtime
# @return [Boolean]
#
# source://execjs//lib/execjs/disabled_runtime.rb#25
def available?; end
# @raise [Error]
#
# source://execjs//lib/execjs/disabled_runtime.rb#17
def compile(source, options = T.unsafe(nil)); end
# @return [Boolean]
#
# source://execjs//lib/execjs/disabled_runtime.rb#21
def deprecated?; end
# @raise [Error]
#
# source://execjs//lib/execjs/disabled_runtime.rb#13
def eval(source, options = T.unsafe(nil)); end
# @raise [Error]
#
# source://execjs//lib/execjs/disabled_runtime.rb#9
def exec(source, options = T.unsafe(nil)); end
# source://execjs//lib/execjs/disabled_runtime.rb#5
def name; end
end
# source://execjs//lib/execjs/duktape_runtime.rb#5
class ExecJS::DuktapeRuntime < ::ExecJS::Runtime
# @return [Boolean]
#
# source://execjs//lib/execjs/duktape_runtime.rb#62
def available?; end
# source://execjs//lib/execjs/duktape_runtime.rb#58
def name; end
end
# source://execjs//lib/execjs/duktape_runtime.rb#6
class ExecJS::DuktapeRuntime::Context < ::ExecJS::Runtime::Context
# @return [Context] a new instance of Context
#
# source://execjs//lib/execjs/duktape_runtime.rb#7
def initialize(runtime, source = T.unsafe(nil), options = T.unsafe(nil)); end
# source://execjs//lib/execjs/duktape_runtime.rb#28
def call(identifier, *args); end
# source://execjs//lib/execjs/duktape_runtime.rb#21
def eval(source, options = T.unsafe(nil)); end
# source://execjs//lib/execjs/duktape_runtime.rb#14
def exec(source, options = T.unsafe(nil)); end
private
# source://execjs//lib/execjs/duktape_runtime.rb#36
def wrap_error(e); end
end
# source://execjs//lib/execjs/module.rb#5
class ExecJS::Error < ::StandardError; end
# source://execjs//lib/execjs/external_runtime.rb#6
class ExecJS::ExternalRuntime < ::ExecJS::Runtime
# @return [ExternalRuntime] a new instance of ExternalRuntime
#
# source://execjs//lib/execjs/external_runtime.rb#93
def initialize(options); end
# @return [Boolean]
#
# source://execjs//lib/execjs/external_runtime.rb#116
def available?; end
# @return [Boolean]
#
# source://execjs//lib/execjs/external_runtime.rb#121
def deprecated?; end
# source://execjs//lib/execjs/external_runtime.rb#209
def exec_runtime(filename); end
# Returns the value of attribute name.
#
# source://execjs//lib/execjs/external_runtime.rb#91
def name; end
protected
# source://execjs//lib/execjs/external_runtime.rb#157
def encode_source(source); end
# source://execjs//lib/execjs/external_runtime.rb#162
def encode_unicode_codepoints(str); end
# source://execjs//lib/execjs/external_runtime.rb#224
def exec_runtime_error(output); end
# source://execjs//lib/execjs/external_runtime.rb#153
def json2_source; end
# source://execjs//lib/execjs/external_runtime.rb#233
def which(command); end
private
# source://execjs//lib/execjs/external_runtime.rb#126
def binary; end
# source://execjs//lib/execjs/external_runtime.rb#130
def locate_executable(command); end
end
# source://execjs//lib/execjs/external_runtime.rb#7
class ExecJS::ExternalRuntime::Context < ::ExecJS::Runtime::Context
# @return [Context] a new instance of Context
#
# source://execjs//lib/execjs/external_runtime.rb#8
def initialize(runtime, source = T.unsafe(nil), options = T.unsafe(nil)); end
# source://execjs//lib/execjs/external_runtime.rb#46
def call(identifier, *args); end
# source://execjs//lib/execjs/external_runtime.rb#18
def eval(source, options = T.unsafe(nil)); end
# source://execjs//lib/execjs/external_runtime.rb#26
def exec(source, options = T.unsafe(nil)); end
protected
# See Tempfile.create on Ruby 2.1
#
# source://execjs//lib/execjs/external_runtime.rb#52
def create_tempfile(basename); end
# source://execjs//lib/execjs/external_runtime.rb#68
def extract_result(output, filename); end
# source://execjs//lib/execjs/external_runtime.rb#61
def write_to_tempfile(contents); end
end
# source://execjs//lib/execjs/graaljs_runtime.rb#4
class ExecJS::GraalJSRuntime < ::ExecJS::Runtime
# @return [Boolean]
#
# source://execjs//lib/execjs/graaljs_runtime.rb#125
def available?; end
# source://execjs//lib/execjs/graaljs_runtime.rb#121
def name; end
end
# source://execjs//lib/execjs/graaljs_runtime.rb#5
class ExecJS::GraalJSRuntime::Context < ::ExecJS::Runtime::Context
# @return [Context] a new instance of Context
#
# source://execjs//lib/execjs/graaljs_runtime.rb#6
def initialize(runtime, source = T.unsafe(nil), options = T.unsafe(nil)); end
# source://execjs//lib/execjs/graaljs_runtime.rb#37
def call(source, *args); end
# source://execjs//lib/execjs/graaljs_runtime.rb#28
def eval(source, options = T.unsafe(nil)); end
def eval_in_context(code); end
# source://execjs//lib/execjs/graaljs_runtime.rb#19
def exec(source, options = T.unsafe(nil)); end
private
# source://execjs//lib/execjs/graaljs_runtime.rb#64
def convert_js_to_ruby(value); end
# source://execjs//lib/execjs/graaljs_runtime.rb#97
def convert_ruby_to_js(value); end
# source://execjs//lib/execjs/graaljs_runtime.rb#51
def translate; end
end
# source://execjs//lib/execjs/graaljs_runtime.rb#49
ExecJS::GraalJSRuntime::Context::ForeignException = RuntimeError
# source://execjs//lib/execjs/mini_racer_runtime.rb#4
class ExecJS::MiniRacerRuntime < ::ExecJS::Runtime
# @return [Boolean]
#
# source://execjs//lib/execjs/mini_racer_runtime.rb#96
def available?; end
# source://execjs//lib/execjs/mini_racer_runtime.rb#92
def name; end
end
# source://execjs//lib/execjs/mini_racer_runtime.rb#5
class ExecJS::MiniRacerRuntime::Context < ::ExecJS::Runtime::Context
# @return [Context] a new instance of Context
#
# source://execjs//lib/execjs/mini_racer_runtime.rb#6
def initialize(runtime, source = T.unsafe(nil), options = T.unsafe(nil)); end
# source://execjs//lib/execjs/mini_racer_runtime.rb#33
def call(identifier, *args); end
# source://execjs//lib/execjs/mini_racer_runtime.rb#23
def eval(source, options = T.unsafe(nil)); end
# source://execjs//lib/execjs/mini_racer_runtime.rb#15
def exec(source, options = T.unsafe(nil)); end
private
# source://execjs//lib/execjs/mini_racer_runtime.rb#40
def strip_functions!(value); end
# source://execjs//lib/execjs/mini_racer_runtime.rb#65
def translate; end
end
# source://execjs//lib/execjs/module.rb#7
class ExecJS::ProgramError < ::ExecJS::Error; end
# source://execjs//lib/execjs/ruby_rhino_runtime.rb#5
class ExecJS::RubyRhinoRuntime < ::ExecJS::Runtime
# @return [Boolean]
#
# source://execjs//lib/execjs/ruby_rhino_runtime.rb#95
def available?; end
# source://execjs//lib/execjs/ruby_rhino_runtime.rb#91
def name; end
end
# source://execjs//lib/execjs/ruby_rhino_runtime.rb#6
class ExecJS::RubyRhinoRuntime::Context < ::ExecJS::Runtime::Context
# @return [Context] a new instance of Context
#
# source://execjs//lib/execjs/ruby_rhino_runtime.rb#7
def initialize(runtime, source = T.unsafe(nil), options = T.unsafe(nil)); end
# source://execjs//lib/execjs/ruby_rhino_runtime.rb#35
def call(properties, *args); end
# source://execjs//lib/execjs/ruby_rhino_runtime.rb#25
def eval(source, options = T.unsafe(nil)); end
# source://execjs//lib/execjs/ruby_rhino_runtime.rb#17
def exec(source, options = T.unsafe(nil)); end
# source://execjs//lib/execjs/ruby_rhino_runtime.rb#45
def unbox(value); end
# source://execjs//lib/execjs/ruby_rhino_runtime.rb#66
def wrap_error(e); end
private
# Disables bytecode compiling which limits you to 64K scripts
#
# source://execjs//lib/execjs/ruby_rhino_runtime.rb#82
def fix_memory_limit!(context); end
end
# Abstract base class for runtimes
#
# source://execjs//lib/execjs/runtime.rb#3
class ExecJS::Runtime
# @raise [NotImplementedError]
# @return [Boolean]
#
# source://execjs//lib/execjs/runtime.rb#76
def available?; end
# source://execjs//lib/execjs/runtime.rb#64
def compile(source, options = T.unsafe(nil)); end
# source://execjs//lib/execjs/runtime.rb#40
def context_class; end
# @return [Boolean]
#
# source://execjs//lib/execjs/runtime.rb#72
def deprecated?; end
# source://execjs//lib/execjs/runtime.rb#54
def eval(source, options = T.unsafe(nil)); end
# source://execjs//lib/execjs/runtime.rb#44
def exec(source, options = T.unsafe(nil)); end
# @raise [NotImplementedError]
#
# source://execjs//lib/execjs/runtime.rb#36
def name; end
end
# source://execjs//lib/execjs/runtime.rb#4
class ExecJS::Runtime::Context
# @return [Context] a new instance of Context
#
# source://execjs//lib/execjs/runtime.rb#5
def initialize(runtime, source = T.unsafe(nil), options = T.unsafe(nil)); end
# Evaluates +source+ as an expression (which should be of type
# +function+), and calls the function with the given arguments.
# The function will be evaluated with the global object as +this+.
#
# context.call("function(a, b) { return a + b }", 1, 1) # => 2
# context.call("CoffeeScript.compile", "1 + 1")
#
# @raise [NotImplementedError]
#
# source://execjs//lib/execjs/runtime.rb#31
def call(source, *args); end
# Evaluates the +source+ as an expression and returns the result.
#
# context.eval("1") # => 1
# context.eval("return 1") # => Raises SyntaxError
#
# @raise [NotImplementedError]
#
# source://execjs//lib/execjs/runtime.rb#21
def eval(source, options = T.unsafe(nil)); end
# Evaluates the +source+ in the context of a function body and returns the
# returned value.
#
# context.exec("return 1") # => 1
# context.exec("1") # => nil (nothing was returned)
#
# @raise [NotImplementedError]
#
# source://execjs//lib/execjs/runtime.rb#13
def exec(source, options = T.unsafe(nil)); end
end
# source://execjs//lib/execjs/module.rb#6
class ExecJS::RuntimeError < ::ExecJS::Error; end
# source://execjs//lib/execjs/module.rb#8
class ExecJS::RuntimeUnavailable < ::ExecJS::RuntimeError; end
# source://execjs//lib/execjs/runtimes.rb#10
module ExecJS::Runtimes
class << self
# source://execjs//lib/execjs/runtimes.rb#66
def autodetect; end
# source://execjs//lib/execjs/runtimes.rb#72
def best_available; end
# source://execjs//lib/execjs/runtimes.rb#76
def from_environment; end
# source://execjs//lib/execjs/runtimes.rb#88
def names; end
# source://execjs//lib/execjs/runtimes.rb#92
def runtimes; end
end
end
# source://execjs//lib/execjs/runtimes.rb#28
ExecJS::Runtimes::Bun = T.let(T.unsafe(nil), ExecJS::ExternalRuntime)
# source://execjs//lib/execjs/runtimes.rb#11
ExecJS::Runtimes::Disabled = T.let(T.unsafe(nil), ExecJS::DisabledRuntime)
# source://execjs//lib/execjs/runtimes.rb#13
ExecJS::Runtimes::Duktape = T.let(T.unsafe(nil), ExecJS::DuktapeRuntime)
# source://execjs//lib/execjs/runtimes.rb#17
ExecJS::Runtimes::GraalJS = T.let(T.unsafe(nil), ExecJS::GraalJSRuntime)
# source://execjs//lib/execjs/runtimes.rb#51
ExecJS::Runtimes::JScript = T.let(T.unsafe(nil), ExecJS::ExternalRuntime)
# source://execjs//lib/execjs/runtimes.rb#35
ExecJS::Runtimes::JavaScriptCore = T.let(T.unsafe(nil), ExecJS::ExternalRuntime)
# source://execjs//lib/execjs/runtimes.rb#19
ExecJS::Runtimes::MiniRacer = T.let(T.unsafe(nil), ExecJS::MiniRacerRuntime)
# source://execjs//lib/execjs/runtimes.rb#21
ExecJS::Runtimes::Node = T.let(T.unsafe(nil), ExecJS::ExternalRuntime)
# source://execjs//lib/execjs/runtimes.rb#15
ExecJS::Runtimes::RubyRhino = T.let(T.unsafe(nil), ExecJS::RubyRhinoRuntime)
# source://execjs//lib/execjs/runtimes.rb#44
ExecJS::Runtimes::SpiderMonkey = T.let(T.unsafe(nil), ExecJS::ExternalRuntime)
# source://execjs//lib/execjs/runtimes.rb#44
ExecJS::Runtimes::Spidermonkey = T.let(T.unsafe(nil), ExecJS::ExternalRuntime)
# source://execjs//lib/execjs/runtimes.rb#58
ExecJS::Runtimes::V8 = T.let(T.unsafe(nil), ExecJS::ExternalRuntime)
# source://execjs//lib/execjs/version.rb#2
ExecJS::VERSION = T.let(T.unsafe(nil), String)

2377
sorbet/rbi/gems/factory_bot@6.5.0.rbi generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,159 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `factory_bot_rails` gem.
# Please instead update this file by running `bin/tapioca gem factory_bot_rails`.
# source://factory_bot_rails//lib/factory_bot_rails/generators/rspec_generator.rb#1
module FactoryBotRails; end
# source://factory_bot_rails//lib/factory_bot_rails/definition_file_paths.rb#4
class FactoryBotRails::DefinitionFilePaths
# @return [DefinitionFilePaths] a new instance of DefinitionFilePaths
#
# source://factory_bot_rails//lib/factory_bot_rails/definition_file_paths.rb#5
def initialize(definition_file_paths); end
# @return [Boolean]
#
# source://factory_bot_rails//lib/factory_bot_rails/definition_file_paths.rb#23
def any?; end
# source://factory_bot_rails//lib/factory_bot_rails/definition_file_paths.rb#15
def directories; end
# source://factory_bot_rails//lib/factory_bot_rails/definition_file_paths.rb#19
def files; end
end
# source://factory_bot_rails//lib/factory_bot_rails/factory_validator.rb#2
class FactoryBotRails::FactoryValidator
# @return [FactoryValidator] a new instance of FactoryValidator
#
# source://factory_bot_rails//lib/factory_bot_rails/factory_validator.rb#3
def initialize(validators = T.unsafe(nil)); end
# source://factory_bot_rails//lib/factory_bot_rails/factory_validator.rb#7
def add_validator(validator); end
# source://factory_bot_rails//lib/factory_bot_rails/factory_validator.rb#11
def run; end
private
# source://factory_bot_rails//lib/factory_bot_rails/factory_validator.rb#17
def validate_compiled_factory; end
end
# source://factory_bot_rails//lib/factory_bot_rails/generator.rb#6
class FactoryBotRails::Generator
# @return [Generator] a new instance of Generator
#
# source://factory_bot_rails//lib/factory_bot_rails/generator.rb#7
def initialize(config); end
# @return [Boolean]
#
# source://factory_bot_rails//lib/factory_bot_rails/generator.rb#29
def factory_bot_disabled?; end
# source://factory_bot_rails//lib/factory_bot_rails/generator.rb#15
def generator; end
# source://factory_bot_rails//lib/factory_bot_rails/generator.rb#33
def rails_options; end
# source://factory_bot_rails//lib/factory_bot_rails/generator.rb#11
def run; end
# source://factory_bot_rails//lib/factory_bot_rails/generator.rb#25
def test_framework; end
end
# source://factory_bot_rails//lib/factory_bot_rails/generators/rspec_generator.rb#2
module FactoryBotRails::Generators; end
# source://factory_bot_rails//lib/factory_bot_rails/generators/non_rspec_generator.rb#3
class FactoryBotRails::Generators::NonRSpecGenerator
# @return [NonRSpecGenerator] a new instance of NonRSpecGenerator
#
# source://factory_bot_rails//lib/factory_bot_rails/generators/non_rspec_generator.rb#4
def initialize(generators); end
# source://factory_bot_rails//lib/factory_bot_rails/generators/non_rspec_generator.rb#8
def run; end
private
# source://factory_bot_rails//lib/factory_bot_rails/generators/non_rspec_generator.rb#18
def test_framework; end
end
# source://factory_bot_rails//lib/factory_bot_rails/generators/null_generator.rb#3
class FactoryBotRails::Generators::NullGenerator
# @return [NullGenerator] a new instance of NullGenerator
#
# source://factory_bot_rails//lib/factory_bot_rails/generators/null_generator.rb#4
def initialize(*_arg0); end
# source://factory_bot_rails//lib/factory_bot_rails/generators/null_generator.rb#7
def run; end
end
# source://factory_bot_rails//lib/factory_bot_rails/generators/rspec_generator.rb#3
class FactoryBotRails::Generators::RSpecGenerator
# @return [RSpecGenerator] a new instance of RSpecGenerator
#
# source://factory_bot_rails//lib/factory_bot_rails/generators/rspec_generator.rb#4
def initialize(generators); end
# source://factory_bot_rails//lib/factory_bot_rails/generators/rspec_generator.rb#8
def run; end
private
# source://factory_bot_rails//lib/factory_bot_rails/generators/rspec_generator.rb#21
def factory_bot_directory; end
# source://factory_bot_rails//lib/factory_bot_rails/generators/rspec_generator.rb#25
def factory_bot_options; end
# source://factory_bot_rails//lib/factory_bot_rails/generators/rspec_generator.rb#17
def fixture_replacement_setting; end
end
# source://factory_bot_rails//lib/factory_bot_rails/railtie.rb#10
class FactoryBotRails::Railtie < ::Rails::Railtie
private
# source://factory_bot_rails//lib/factory_bot_rails/railtie.rb#31
def definition_file_paths; end
end
# source://factory_bot_rails//lib/factory_bot_rails/reloader.rb#6
class FactoryBotRails::Reloader
# @return [Reloader] a new instance of Reloader
#
# source://factory_bot_rails//lib/factory_bot_rails/reloader.rb#7
def initialize(app); end
# source://factory_bot_rails//lib/factory_bot_rails/reloader.rb#12
def run; end
private
# Returns the value of attribute app.
#
# source://factory_bot_rails//lib/factory_bot_rails/reloader.rb#20
def app; end
# source://factory_bot_rails//lib/factory_bot_rails/reloader.rb#22
def build_reloader; end
# source://factory_bot_rails//lib/factory_bot_rails/reloader.rb#32
def register_reloader(reloader); end
# source://factory_bot_rails//lib/factory_bot_rails/reloader.rb#28
def reloader_class; end
end

138
sorbet/rbi/gems/faiss@0.3.2.rbi generated Normal file
View File

@@ -0,0 +1,138 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `faiss` gem.
# Please instead update this file by running `bin/tapioca gem faiss`.
# source://faiss//lib/faiss/version.rb#1
module Faiss
class << self
def index_binary_factory(*_arg0); end
end
end
class Faiss::Index
def add(*_arg0); end
def add_with_ids(*_arg0); end
def d(*_arg0); end
def nprobe=(*_arg0); end
def ntotal(*_arg0); end
def save(*_arg0); end
def search(*_arg0); end
def train(*_arg0); end
def trained?(*_arg0); end
class << self
def load(*_arg0); end
end
end
class Faiss::IndexBinary
def add(*_arg0); end
def d(*_arg0); end
def ntotal(*_arg0); end
def save(*_arg0); end
def search(*_arg0); end
def train(*_arg0); end
def trained?(*_arg0); end
class << self
def load(*_arg0); end
end
end
class Faiss::IndexBinaryFlat < ::Faiss::IndexBinary
def initialize(*_arg0); end
end
class Faiss::IndexBinaryIVF < ::Faiss::IndexBinary
def initialize(*_arg0); end
end
class Faiss::IndexFlatIP < ::Faiss::Index
def initialize(*_arg0); end
end
class Faiss::IndexFlatL2 < ::Faiss::Index
def initialize(*_arg0); end
end
class Faiss::IndexHNSWFlat < ::Faiss::Index
def initialize(*_arg0); end
end
class Faiss::IndexIDMap < ::Faiss::Index
def initialize(*_arg0); end
end
class Faiss::IndexIVFFlat < ::Faiss::Index
def initialize(*_arg0); end
end
class Faiss::IndexIVFPQ < ::Faiss::Index
def initialize(*_arg0); end
end
class Faiss::IndexIVFPQR < ::Faiss::Index
def initialize(*_arg0); end
end
class Faiss::IndexIVFScalarQuantizer < ::Faiss::Index
def initialize(*_arg0); end
end
class Faiss::IndexLSH < ::Faiss::Index
def initialize(*_arg0); end
end
class Faiss::IndexPQ < ::Faiss::Index
def initialize(*_arg0); end
end
class Faiss::IndexScalarQuantizer < ::Faiss::Index
def initialize(*_arg0); end
end
class Faiss::Kmeans
def initialize(*_arg0); end
def centroids(*_arg0); end
def d(*_arg0); end
def index(*_arg0); end
def k(*_arg0); end
def train(*_arg0); end
end
class Faiss::PCAMatrix
def initialize(*_arg0); end
def apply(*_arg0); end
def d_in(*_arg0); end
def d_out(*_arg0); end
def train(*_arg0); end
end
class Faiss::ParameterSpace
def initialize(*_arg0); end
def set_index_parameter(*_arg0); end
end
class Faiss::ProductQuantizer
def initialize(*_arg0); end
def compute_codes(*_arg0); end
def d(*_arg0); end
def decode(*_arg0); end
def m(*_arg0); end
def save(*_arg0); end
def train(*_arg0); end
class << self
def load(*_arg0); end
end
end
# source://faiss//lib/faiss/version.rb#2
Faiss::VERSION = T.let(T.unsafe(nil), String)

2177
sorbet/rbi/gems/ffi@1.17.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

1500
sorbet/rbi/gems/fugit@1.11.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

749
sorbet/rbi/gems/globalid@1.2.1.rbi generated Normal file
View File

@@ -0,0 +1,749 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `globalid` gem.
# Please instead update this file by running `bin/tapioca gem globalid`.
# source://globalid//lib/global_id/global_id.rb#7
class GlobalID
extend ::ActiveSupport::Autoload
# @return [GlobalID] a new instance of GlobalID
#
# source://globalid//lib/global_id/global_id.rb#44
def initialize(gid, options = T.unsafe(nil)); end
# source://globalid//lib/global_id/global_id.rb#63
def ==(other); end
# source://globalid//lib/global_id/global_id.rb#42
def app(*_arg0, **_arg1, &_arg2); end
# source://globalid//lib/global_id/global_id.rb#76
def as_json(*_arg0); end
# source://globalid//lib/global_id/global_id.rb#42
def deconstruct_keys(*_arg0, **_arg1, &_arg2); end
# source://globalid//lib/global_id/global_id.rb#63
def eql?(other); end
# source://globalid//lib/global_id/global_id.rb#48
def find(options = T.unsafe(nil)); end
# source://globalid//lib/global_id/global_id.rb#68
def hash; end
# source://globalid//lib/global_id/global_id.rb#52
def model_class; end
# source://globalid//lib/global_id/global_id.rb#42
def model_id(*_arg0, **_arg1, &_arg2); end
# source://globalid//lib/global_id/global_id.rb#42
def model_name(*_arg0, **_arg1, &_arg2); end
# source://globalid//lib/global_id/global_id.rb#42
def params(*_arg0, **_arg1, &_arg2); end
# source://globalid//lib/global_id/global_id.rb#72
def to_param; end
# source://globalid//lib/global_id/global_id.rb#42
def to_s(*_arg0, **_arg1, &_arg2); end
# Returns the value of attribute uri.
#
# source://globalid//lib/global_id/global_id.rb#41
def uri; end
class << self
# Returns the value of attribute app.
#
# source://globalid//lib/global_id/global_id.rb#9
def app; end
# source://globalid//lib/global_id/global_id.rb#31
def app=(app); end
# source://globalid//lib/global_id/global_id.rb#11
def create(model, options = T.unsafe(nil)); end
# source://globalid//lib/global_id.rb#20
def deprecator; end
# source://globalid//lib/global_id.rb#15
def eager_load!; end
# source://globalid//lib/global_id/global_id.rb#21
def find(gid, options = T.unsafe(nil)); end
# source://globalid//lib/global_id/global_id.rb#25
def parse(gid, options = T.unsafe(nil)); end
private
# source://globalid//lib/global_id/global_id.rb#36
def parse_encoded_gid(gid, options); end
end
end
# Mix `GlobalID::Identification` into any model with a `#find(id)` class
# method. Support is automatically included in Active Record.
#
# class Person
# include ActiveModel::Model
# include GlobalID::Identification
#
# attr_accessor :id
#
# def self.find(id)
# new id: id
# end
#
# def ==(other)
# id == other.try(:id)
# end
# end
#
# person_gid = Person.find(1).to_global_id
# # => #<GlobalID ...
# person_gid.uri
# # => #<URI ...
# person_gid.to_s
# # => "gid://app/Person/1"
# GlobalID::Locator.locate person_gid
# # => #<Person:0x007fae94bf6298 @id="1">
#
# source://globalid//lib/global_id/identification.rb#28
module GlobalID::Identification
# Returns the Global ID of the model.
#
# model = Person.new id: 1
# global_id = model.to_global_id
# global_id.modal_class # => Person
# global_id.modal_id # => "1"
# global_id.to_param # => "Z2lkOi8vYm9yZGZvbGlvL1BlcnNvbi8x"
#
# source://globalid//lib/global_id/identification.rb#37
def to_gid(options = T.unsafe(nil)); end
# Returns the Global ID parameter of the model.
#
# model = Person.new id: 1
# model.to_gid_param # => ""Z2lkOi8vYm9yZGZvbGlvL1BlcnNvbi8x"
#
# source://globalid//lib/global_id/identification.rb#46
def to_gid_param(options = T.unsafe(nil)); end
# Returns the Global ID of the model.
#
# model = Person.new id: 1
# global_id = model.to_global_id
# global_id.modal_class # => Person
# global_id.modal_id # => "1"
# global_id.to_param # => "Z2lkOi8vYm9yZGZvbGlvL1BlcnNvbi8x"
#
# source://globalid//lib/global_id/identification.rb#37
def to_global_id(options = T.unsafe(nil)); end
# Returns the Signed Global ID of the model.
# Signed Global IDs ensure that the data hasn't been tampered with.
#
# model = Person.new id: 1
# signed_global_id = model.to_signed_global_id
# signed_global_id.modal_class # => Person
# signed_global_id.modal_id # => "1"
# signed_global_id.to_param # => "BAh7CEkiCGdpZAY6BkVUSSIiZ2..."
#
# ==== Expiration
#
# Signed Global IDs can expire some time in the future. This is useful if
# there's a resource people shouldn't have indefinite access to, like a
# share link.
#
# expiring_sgid = Document.find(5).to_sgid(expires_in: 2.hours, for: 'sharing')
# # => #<SignedGlobalID:0x008fde45df8937 ...>
# # Within 2 hours...
# GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing')
# # => #<Document:0x007fae94bf6298 @id="5">
# # More than 2 hours later...
# GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing')
# # => nil
#
# In Rails, an auto-expiry of 1 month is set by default.
#
# You need to explicitly pass `expires_in: nil` to generate a permanent
# SGID that will not expire,
#
# never_expiring_sgid = Document.find(5).to_sgid(expires_in: nil)
# # => #<SignedGlobalID:0x008fde45df8937 ...>
#
# # Any time later...
# GlobalID::Locator.locate_signed never_expiring_sgid
# # => #<Document:0x007fae94bf6298 @id="5">
#
# It's also possible to pass a specific expiry time
#
# explicit_expiring_sgid = SecretAgentMessage.find(5).to_sgid(expires_at: Time.now.advance(hours: 1))
# # => #<SignedGlobalID:0x008fde45df8937 ...>
#
# # 1 hour later...
# GlobalID::Locator.locate_signed explicit_expiring_sgid.to_s
# # => nil
#
# Note that an explicit `:expires_at` takes precedence over a relative `:expires_in`.
#
# ==== Purpose
#
# You can even bump the security up some more by explaining what purpose a
# Signed Global ID is for. In this way evildoers can't reuse a sign-up
# form's SGID on the login page. For example.
#
# signup_person_sgid = Person.find(1).to_sgid(for: 'signup_form')
# # => #<SignedGlobalID:0x007fea1984b520
# GlobalID::Locator.locate_signed(signup_person_sgid.to_s, for: 'signup_form')
# => #<Person:0x007fae94bf6298 @id="1">
#
# source://globalid//lib/global_id/identification.rb#107
def to_sgid(options = T.unsafe(nil)); end
# Returns the Signed Global ID parameter.
#
# model = Person.new id: 1
# model.to_sgid_param # => "BAh7CEkiCGdpZAY6BkVUSSIiZ2..."
#
# source://globalid//lib/global_id/identification.rb#116
def to_sgid_param(options = T.unsafe(nil)); end
# Returns the Signed Global ID of the model.
# Signed Global IDs ensure that the data hasn't been tampered with.
#
# model = Person.new id: 1
# signed_global_id = model.to_signed_global_id
# signed_global_id.modal_class # => Person
# signed_global_id.modal_id # => "1"
# signed_global_id.to_param # => "BAh7CEkiCGdpZAY6BkVUSSIiZ2..."
#
# ==== Expiration
#
# Signed Global IDs can expire some time in the future. This is useful if
# there's a resource people shouldn't have indefinite access to, like a
# share link.
#
# expiring_sgid = Document.find(5).to_sgid(expires_in: 2.hours, for: 'sharing')
# # => #<SignedGlobalID:0x008fde45df8937 ...>
# # Within 2 hours...
# GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing')
# # => #<Document:0x007fae94bf6298 @id="5">
# # More than 2 hours later...
# GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing')
# # => nil
#
# In Rails, an auto-expiry of 1 month is set by default.
#
# You need to explicitly pass `expires_in: nil` to generate a permanent
# SGID that will not expire,
#
# never_expiring_sgid = Document.find(5).to_sgid(expires_in: nil)
# # => #<SignedGlobalID:0x008fde45df8937 ...>
#
# # Any time later...
# GlobalID::Locator.locate_signed never_expiring_sgid
# # => #<Document:0x007fae94bf6298 @id="5">
#
# It's also possible to pass a specific expiry time
#
# explicit_expiring_sgid = SecretAgentMessage.find(5).to_sgid(expires_at: Time.now.advance(hours: 1))
# # => #<SignedGlobalID:0x008fde45df8937 ...>
#
# # 1 hour later...
# GlobalID::Locator.locate_signed explicit_expiring_sgid.to_s
# # => nil
#
# Note that an explicit `:expires_at` takes precedence over a relative `:expires_in`.
#
# ==== Purpose
#
# You can even bump the security up some more by explaining what purpose a
# Signed Global ID is for. In this way evildoers can't reuse a sign-up
# form's SGID on the login page. For example.
#
# signup_person_sgid = Person.find(1).to_sgid(for: 'signup_form')
# # => #<SignedGlobalID:0x007fea1984b520
# GlobalID::Locator.locate_signed(signup_person_sgid.to_s, for: 'signup_form')
# => #<Person:0x007fae94bf6298 @id="1">
#
# source://globalid//lib/global_id/identification.rb#107
def to_signed_global_id(options = T.unsafe(nil)); end
end
# source://globalid//lib/global_id/locator.rb#4
module GlobalID::Locator
class << self
# Takes either a GlobalID or a string that can be turned into a GlobalID
#
# Options:
# * <tt>:includes</tt> - A Symbol, Array, Hash or combination of them.
# The same structure you would pass into a +includes+ method of Active Record.
# If present, locate will load all the relationships specified here.
# See https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations.
# * <tt>:only</tt> - A class, module or Array of classes and/or modules that are
# allowed to be located. Passing one or more classes limits instances of returned
# classes to those classes or their subclasses. Passing one or more modules in limits
# instances of returned classes to those including that module. If no classes or
# modules match, +nil+ is returned.
#
# source://globalid//lib/global_id/locator.rb#20
def locate(gid, options = T.unsafe(nil)); end
# Takes an array of GlobalIDs or strings that can be turned into a GlobalIDs.
# All GlobalIDs must belong to the same app, as they will be located using
# the same locator using its locate_many method.
#
# By default the GlobalIDs will be located using Model.find(array_of_ids), so the
# models must respond to that finder signature.
#
# This approach will efficiently call only one #find (or #where(id: id), when using ignore_missing)
# per model class, but still interpolate the results to match the order in which the gids were passed.
#
# Options:
# * <tt>:includes</tt> - A Symbol, Array, Hash or combination of them
# The same structure you would pass into a includes method of Active Record.
# @see https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations
# If present, locate_many will load all the relationships specified here.
# Note: It only works if all the gids models have that relationships.
# * <tt>:only</tt> - A class, module or Array of classes and/or modules that are
# allowed to be located. Passing one or more classes limits instances of returned
# classes to those classes or their subclasses. Passing one or more modules in limits
# instances of returned classes to those including that module. If no classes or
# modules match, +nil+ is returned.
# * <tt>:ignore_missing</tt> - By default, locate_many will call #find on the model to locate the
# ids extracted from the GIDs. In Active Record (and other data stores following the same pattern),
# #find will raise an exception if a named ID can't be found. When you set this option to true,
# we will use #where(id: ids) instead, which does not raise on missing records.
#
# source://globalid//lib/global_id/locator.rb#60
def locate_many(gids, options = T.unsafe(nil)); end
# Takes an array of SignedGlobalIDs or strings that can be turned into a SignedGlobalIDs.
# The SignedGlobalIDs are located using Model.find(array_of_ids), so the models must respond to
# that finder signature.
#
# This approach will efficiently call only one #find per model class, but still interpolate
# the results to match the order in which the gids were passed.
#
# Options:
# * <tt>:includes</tt> - A Symbol, Array, Hash or combination of them
# The same structure you would pass into a includes method of Active Record.
# @see https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations
# If present, locate_many_signed will load all the relationships specified here.
# Note: It only works if all the gids models have that relationships.
# * <tt>:only</tt> - A class, module or Array of classes and/or modules that are
# allowed to be located. Passing one or more classes limits instances of returned
# classes to those classes or their subclasses. Passing one or more modules in limits
# instances of returned classes to those including that module. If no classes or
# modules match, +nil+ is returned.
#
# source://globalid//lib/global_id/locator.rb#103
def locate_many_signed(sgids, options = T.unsafe(nil)); end
# Takes either a SignedGlobalID or a string that can be turned into a SignedGlobalID
#
# Options:
# * <tt>:includes</tt> - A Symbol, Array, Hash or combination of them
# The same structure you would pass into a includes method of Active Record.
# @see https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations
# If present, locate_signed will load all the relationships specified here.
# * <tt>:only</tt> - A class, module or Array of classes and/or modules that are
# allowed to be located. Passing one or more classes limits instances of returned
# classes to those classes or their subclasses. Passing one or more modules in limits
# instances of returned classes to those including that module. If no classes or
# modules match, +nil+ is returned.
#
# source://globalid//lib/global_id/locator.rb#81
def locate_signed(sgid, options = T.unsafe(nil)); end
# Tie a locator to an app.
# Useful when different apps collaborate and reference each others' Global IDs.
#
# The locator can be either a block or a class.
#
# Using a block:
#
# GlobalID::Locator.use :foo do |gid, options|
# FooRemote.const_get(gid.model_name).find(gid.model_id)
# end
#
# Using a class:
#
# GlobalID::Locator.use :bar, BarLocator.new
#
# class BarLocator
# def locate(gid, options = {})
# @search_client.search name: gid.model_name, id: gid.model_id
# end
# end
#
# @raise [ArgumentError]
#
# source://globalid//lib/global_id/locator.rb#127
def use(app, locator = T.unsafe(nil), &locator_block); end
private
# @return [Boolean]
#
# source://globalid//lib/global_id/locator.rb#140
def find_allowed?(model_class, only = T.unsafe(nil)); end
# source://globalid//lib/global_id/locator.rb#136
def locator_for(gid); end
# source://globalid//lib/global_id/locator.rb#148
def normalize_app(app); end
# source://globalid//lib/global_id/locator.rb#144
def parse_allowed(gids, only = T.unsafe(nil)); end
end
end
# source://globalid//lib/global_id/locator.rb#156
class GlobalID::Locator::BaseLocator
# source://globalid//lib/global_id/locator.rb#157
def locate(gid, options = T.unsafe(nil)); end
# source://globalid//lib/global_id/locator.rb#165
def locate_many(gids, options = T.unsafe(nil)); end
private
# source://globalid//lib/global_id/locator.rb#189
def find_records(model_class, ids, options); end
# @return [Boolean]
#
# source://globalid//lib/global_id/locator.rb#199
def model_id_is_valid?(gid); end
# source://globalid//lib/global_id/locator.rb#203
def primary_key(model_class); end
end
# source://globalid//lib/global_id/locator.rb#228
class GlobalID::Locator::BlockLocator
# @return [BlockLocator] a new instance of BlockLocator
#
# source://globalid//lib/global_id/locator.rb#229
def initialize(block); end
# source://globalid//lib/global_id/locator.rb#233
def locate(gid, options = T.unsafe(nil)); end
# source://globalid//lib/global_id/locator.rb#237
def locate_many(gids, options = T.unsafe(nil)); end
end
# source://globalid//lib/global_id/locator.rb#226
GlobalID::Locator::DEFAULT_LOCATOR = T.let(T.unsafe(nil), GlobalID::Locator::UnscopedLocator)
# source://globalid//lib/global_id/locator.rb#5
class GlobalID::Locator::InvalidModelIdError < ::StandardError; end
# source://globalid//lib/global_id/locator.rb#208
class GlobalID::Locator::UnscopedLocator < ::GlobalID::Locator::BaseLocator
# source://globalid//lib/global_id/locator.rb#209
def locate(gid, options = T.unsafe(nil)); end
private
# source://globalid//lib/global_id/locator.rb#214
def find_records(model_class, ids, options); end
# source://globalid//lib/global_id/locator.rb#218
def unscoped(model_class); end
end
# source://globalid//lib/global_id/railtie.rb#12
class GlobalID::Railtie < ::Rails::Railtie; end
# source://globalid//lib/global_id/verifier.rb#4
class GlobalID::Verifier < ::ActiveSupport::MessageVerifier
private
# source://globalid//lib/global_id/verifier.rb#10
def decode(data, **_arg1); end
# source://globalid//lib/global_id/verifier.rb#6
def encode(data, **_arg1); end
end
# source://globalid//lib/global_id/signed_global_id.rb#4
class SignedGlobalID < ::GlobalID
# @return [SignedGlobalID] a new instance of SignedGlobalID
#
# source://globalid//lib/global_id/signed_global_id.rb#59
def initialize(gid, options = T.unsafe(nil)); end
# source://globalid//lib/global_id/signed_global_id.rb#71
def ==(other); end
# Returns the value of attribute expires_at.
#
# source://globalid//lib/global_id/signed_global_id.rb#57
def expires_at; end
# source://globalid//lib/global_id/signed_global_id.rb#75
def inspect; end
# Returns the value of attribute purpose.
#
# source://globalid//lib/global_id/signed_global_id.rb#57
def purpose; end
# source://globalid//lib/global_id/signed_global_id.rb#66
def to_param; end
# source://globalid//lib/global_id/signed_global_id.rb#66
def to_s; end
# Returns the value of attribute verifier.
#
# source://globalid//lib/global_id/signed_global_id.rb#57
def verifier; end
private
# source://globalid//lib/global_id/signed_global_id.rb#80
def pick_expiration(options); end
class << self
# Returns the value of attribute expires_in.
#
# source://globalid//lib/global_id/signed_global_id.rb#8
def expires_in; end
# Sets the attribute expires_in
#
# @param value the value to set the attribute expires_in to.
#
# source://globalid//lib/global_id/signed_global_id.rb#8
def expires_in=(_arg0); end
# source://globalid//lib/global_id/signed_global_id.rb#10
def parse(sgid, options = T.unsafe(nil)); end
# source://globalid//lib/global_id/signed_global_id.rb#24
def pick_purpose(options); end
# Grab the verifier from options and fall back to SignedGlobalID.verifier.
# Raise ArgumentError if neither is available.
#
# source://globalid//lib/global_id/signed_global_id.rb#16
def pick_verifier(options); end
# Returns the value of attribute verifier.
#
# source://globalid//lib/global_id/signed_global_id.rb#8
def verifier; end
# Sets the attribute verifier
#
# @param value the value to set the attribute verifier to.
#
# source://globalid//lib/global_id/signed_global_id.rb#8
def verifier=(_arg0); end
private
# source://globalid//lib/global_id/signed_global_id.rb#50
def raise_if_expired(expires_at); end
# source://globalid//lib/global_id/signed_global_id.rb#29
def verify(sgid, options); end
# source://globalid//lib/global_id/signed_global_id.rb#40
def verify_with_legacy_self_validated_metadata(sgid, options); end
# source://globalid//lib/global_id/signed_global_id.rb#34
def verify_with_verifier_validated_metadata(sgid, options); end
end
end
# source://globalid//lib/global_id/signed_global_id.rb#5
class SignedGlobalID::ExpiredMessage < ::StandardError; end
# source://globalid//lib/global_id/uri/gid.rb#6
module URI
include ::URI::RFC2396_REGEXP
end
# source://globalid//lib/global_id/uri/gid.rb#7
class URI::GID < ::URI::Generic
# URI::GID encodes an app unique reference to a specific model as an URI.
# It has the components: app name, model class name, model id and params.
# All components except params are required.
#
# The URI format looks like "gid://app/model_name/model_id".
#
# Simple metadata can be stored in params. Useful if your app has multiple databases,
# for instance, and you need to find out which one to look up the model in.
#
# Params will be encoded as query parameters like so
# "gid://app/model_name/model_id?key=value&another_key=another_value".
#
# Params won't be typecast, they're always strings.
# For convenience params can be accessed using both strings and symbol keys.
#
# Multi value params aren't supported. Any params encoding multiple values under
# the same key will return only the last value. For example, when decoding
# params like "key=first_value&key=last_value" key will only be last_value.
#
# Read the documentation for +parse+, +create+ and +build+ for more.
#
# source://uri/0.12.3/uri/generic.rb#243
def app; end
# source://globalid//lib/global_id/uri/gid.rb#107
def deconstruct_keys(_keys); end
# Returns the value of attribute model_id.
#
# source://globalid//lib/global_id/uri/gid.rb#29
def model_id; end
# Returns the value of attribute model_name.
#
# source://globalid//lib/global_id/uri/gid.rb#29
def model_name; end
# Returns the value of attribute params.
#
# source://globalid//lib/global_id/uri/gid.rb#29
def params; end
# source://globalid//lib/global_id/uri/gid.rb#102
def to_s; end
protected
# Ruby 2.2 uses #query= instead of #set_query
#
# source://globalid//lib/global_id/uri/gid.rb#118
def query=(query); end
# source://globalid//lib/global_id/uri/gid.rb#129
def set_params(params); end
# source://globalid//lib/global_id/uri/gid.rb#112
def set_path(path); end
# Ruby 2.1 or less uses #set_query to assign the query
#
# source://globalid//lib/global_id/uri/gid.rb#124
def set_query(query); end
private
# source://globalid//lib/global_id/uri/gid.rb#136
def check_host(host); end
# source://globalid//lib/global_id/uri/gid.rb#141
def check_path(path); end
# source://globalid//lib/global_id/uri/gid.rb#146
def check_scheme(scheme); end
# source://globalid//lib/global_id/uri/gid.rb#195
def parse_query_params(query); end
# source://globalid//lib/global_id/uri/gid.rb#154
def set_model_components(path, validate = T.unsafe(nil)); end
# @raise [URI::InvalidComponentError]
#
# source://globalid//lib/global_id/uri/gid.rb#174
def validate_component(component); end
# @raise [InvalidModelIdError]
#
# source://globalid//lib/global_id/uri/gid.rb#188
def validate_model_id(model_id_part); end
# @raise [MissingModelIdError]
#
# source://globalid//lib/global_id/uri/gid.rb#181
def validate_model_id_section(model_id, model_name); end
class << self
# Create a new URI::GID from components with argument check.
#
# The allowed components are app, model_name, model_id and params, which can be
# either a hash or an array.
#
# Using a hash:
#
# URI::GID.build(app: 'bcx', model_name: 'Person', model_id: '1', params: { key: 'value' })
#
# Using an array, the arguments must be in order [app, model_name, model_id, params]:
#
# URI::GID.build(['bcx', 'Person', '1', key: 'value'])
#
# source://globalid//lib/global_id/uri/gid.rb#88
def build(args); end
# Shorthand to build a URI::GID from an app, a model and optional params.
#
# URI::GID.create('bcx', Person.find(5), database: 'superhumans')
#
# source://globalid//lib/global_id/uri/gid.rb#72
def create(app, model, params = T.unsafe(nil)); end
# Create a new URI::GID by parsing a gid string with argument check.
#
# URI::GID.parse 'gid://bcx/Person/1?key=value'
#
# This differs from URI() and URI.parse which do not check arguments.
#
# URI('gid://bcx') # => URI::GID instance
# URI.parse('gid://bcx') # => URI::GID instance
# URI::GID.parse('gid://bcx/') # => raises URI::InvalidComponentError
#
# source://globalid//lib/global_id/uri/gid.rb#64
def parse(uri); end
# Validates +app+'s as URI hostnames containing only alphanumeric characters
# and hyphens. An ArgumentError is raised if +app+ is invalid.
#
# URI::GID.validate_app('bcx') # => 'bcx'
# URI::GID.validate_app('foo-bar') # => 'foo-bar'
#
# URI::GID.validate_app(nil) # => ArgumentError
# URI::GID.validate_app('foo/bar') # => ArgumentError
#
# source://globalid//lib/global_id/uri/gid.rb#48
def validate_app(app); end
end
end
# source://globalid//lib/global_id/uri/gid.rb#134
URI::GID::COMPONENT = T.let(T.unsafe(nil), Array)
# source://globalid//lib/global_id/uri/gid.rb#37
URI::GID::COMPOSITE_MODEL_ID_DELIMITER = T.let(T.unsafe(nil), String)
# Maximum size of a model id segment
#
# source://globalid//lib/global_id/uri/gid.rb#36
URI::GID::COMPOSITE_MODEL_ID_MAX_SIZE = T.let(T.unsafe(nil), Integer)
# source://globalid//lib/global_id/uri/gid.rb#33
class URI::GID::InvalidModelIdError < ::URI::InvalidComponentError; end
# Raised when creating a Global ID for a model without an id
#
# source://globalid//lib/global_id/uri/gid.rb#32
class URI::GID::MissingModelIdError < ::URI::InvalidComponentError; end
class URI::WSS < ::URI::WS; end

4682
sorbet/rbi/gems/good_job@4.6.0.rbi generated Normal file

File diff suppressed because it is too large Load Diff

731
sorbet/rbi/gems/google-protobuf@4.29.2.rbi generated Normal file
View File

@@ -0,0 +1,731 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `google-protobuf` gem.
# Please instead update this file by running `bin/tapioca gem google-protobuf`.
# We define these before requiring the platform-specific modules.
# That way the module init can grab references to these.
#
# source://google-protobuf//lib/google/protobuf/message_exts.rb#8
module Google; end
# source://google-protobuf//lib/google/protobuf/message_exts.rb#9
module Google::Protobuf
class << self
# source://google-protobuf//lib/google/protobuf.rb#38
def decode(klass, proto, options = T.unsafe(nil)); end
# source://google-protobuf//lib/google/protobuf.rb#42
def decode_json(klass, json, options = T.unsafe(nil)); end
def deep_copy(_arg0); end
# @raise [FrozenError]
def discard_unknown(_arg0); end
# source://google-protobuf//lib/google/protobuf.rb#30
def encode(msg, options = T.unsafe(nil)); end
# source://google-protobuf//lib/google/protobuf.rb#34
def encode_json(msg, options = T.unsafe(nil)); end
end
end
# source://google-protobuf//lib/google/protobuf/message_exts.rb#29
class Google::Protobuf::AbstractMessage
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
def initialize(*_arg0); end
def ==(_arg0); end
def [](_arg0); end
def []=(_arg0, _arg1); end
def clone; end
def dup; end
def eql?(_arg0); end
def freeze; end
def frozen?; end
def hash; end
def inspect; end
def method_missing(*_arg0); end
def to_h; end
def to_s; end
private
def respond_to_missing?(*_arg0); end
class << self
def decode(*_arg0); end
def decode_json(*_arg0); end
def descriptor; end
def encode(*_arg0); end
def encode_json(*_arg0); end
end
end
# Message Descriptor - Descriptor for short.
class Google::Protobuf::Descriptor
include ::Enumerable
# @return [Descriptor] a new instance of Descriptor
def initialize(_arg0, _arg1, _arg2); end
def each; end
def each_oneof; end
def file_descriptor; end
def lookup(_arg0); end
def lookup_oneof(_arg0); end
def msgclass; end
def name; end
def options; end
end
class Google::Protobuf::DescriptorPool
# @raise [ArgumentError]
def add_serialized_file(_arg0); end
def lookup(_arg0); end
class << self
def generated_pool; end
end
end
class Google::Protobuf::EnumDescriptor
include ::Enumerable
# @return [EnumDescriptor] a new instance of EnumDescriptor
def initialize(_arg0, _arg1, _arg2); end
def each; end
def enummodule; end
def file_descriptor; end
def is_closed?; end
def lookup_name(_arg0); end
def lookup_value(_arg0); end
def name; end
def options; end
end
# source://google-protobuf//lib/google/protobuf.rb#16
class Google::Protobuf::Error < ::StandardError; end
class Google::Protobuf::FieldDescriptor
# @return [FieldDescriptor] a new instance of FieldDescriptor
def initialize(_arg0, _arg1, _arg2); end
# @param msg [Google::Protobuf::Message]
def clear(_arg0); end
def default; end
# Tests if this field has been set on the argument message.
#
# @param msg [Google::Protobuf::Message]
# @raise [TypeError] If the field is not defined on this message.
# @return [Object] Value of the field on this message.
def get(_arg0); end
# Tests if this field has been set on the argument message.
#
# @param msg [Google::Protobuf::Message]
# @raise [TypeError] If this field does not exist on the message
# @raise [ArgumentError] If this field does not track presence
# @return [Boolean] True iff message has this field set
def has?(_arg0); end
# Tests if this field tracks presence.
#
# @return [Boolean] True iff this field tracks presence
def has_presence?; end
# Tests if this is a repeated field that uses packed encoding.
#
# @return [Boolean] True iff this field is packed
def is_packed?; end
def json_name; end
def label; end
def name; end
def number; end
def options; end
# call-seq:
# FieldDescriptor.set(message, value)
#
# Sets the value corresponding to this field to the given value on the given
# message. Raises an exception if message is of the wrong type. Performs the
# ordinary type-checks for field setting.
#
# @param msg [Google::Protobuf::Message]
# @param value [Object]
def set(_arg0, _arg1); end
def submsg_name; end
def subtype; end
def type; end
end
class Google::Protobuf::FileDescriptor
# @return [FileDescriptor] a new instance of FileDescriptor
def initialize(_arg0, _arg1, _arg2); end
def name; end
def options; end
end
# source://google-protobuf//lib/google/protobuf.rb#46
Google::Protobuf::IMPLEMENTATION = T.let(T.unsafe(nil), Symbol)
# source://google-protobuf//lib/google/protobuf/internal/object_cache.rb#10
module Google::Protobuf::Internal; end
class Google::Protobuf::Internal::Arena; end
# source://google-protobuf//lib/google/protobuf/internal/object_cache.rb#42
class Google::Protobuf::Internal::LegacyObjectCache
# @return [LegacyObjectCache] a new instance of LegacyObjectCache
#
# source://google-protobuf//lib/google/protobuf/internal/object_cache.rb#43
def initialize; end
# source://google-protobuf//lib/google/protobuf/internal/object_cache.rb#49
def get(key); end
# source://google-protobuf//lib/google/protobuf/internal/object_cache.rb#71
def try_add(key, value); end
private
# source://google-protobuf//lib/google/protobuf/internal/object_cache.rb#86
def purge; end
end
Google::Protobuf::Internal::OBJECT_CACHE = T.let(T.unsafe(nil), Google::Protobuf::Internal::ObjectCache)
# A pointer -> Ruby Object cache that keeps references to Ruby wrapper
# objects. This allows us to look up any Ruby wrapper object by the address
# of the object it is wrapping. That way we can avoid ever creating two
# different wrapper objects for the same C object, which saves memory and
# preserves object identity.
#
# We use WeakMap for the cache. If sizeof(long) > sizeof(VALUE), we also
# need a secondary Hash to store WeakMap keys, because our pointer keys may
# need to be stored as Bignum instead of Fixnum. Since WeakMap is weak for
# both keys and values, a Bignum key will cause the WeakMap entry to be
# collected immediately unless there is another reference to the Bignum.
# This happens on 64-bit Windows, on which pointers are 64 bits but longs
# are 32 bits. In this case, we enable the secondary Hash to hold the keys
# and prevent them from being collected.
#
# source://google-protobuf//lib/google/protobuf/internal/object_cache.rb#25
class Google::Protobuf::Internal::ObjectCache
# @return [ObjectCache] a new instance of ObjectCache
#
# source://google-protobuf//lib/google/protobuf/internal/object_cache.rb#26
def initialize; end
# source://google-protobuf//lib/google/protobuf/internal/object_cache.rb#31
def get(key); end
# source://google-protobuf//lib/google/protobuf/internal/object_cache.rb#35
def try_add(key, value); end
end
Google::Protobuf::Internal::SIZEOF_LONG = T.let(T.unsafe(nil), Integer)
Google::Protobuf::Internal::SIZEOF_VALUE = T.let(T.unsafe(nil), Integer)
class Google::Protobuf::Map
include ::Enumerable
# @return [Map] a new instance of Map
def initialize(*_arg0); end
# call-seq:
# Map.==(other) => boolean
#
# Compares this map to another. Maps are equal if they have identical key sets,
# and for each key, the values in both maps compare equal. Elements are
# compared as per normal Ruby semantics, by calling their :== methods (or
# performing a more efficient comparison for primitive types).
#
# Maps with dissimilar key types or value types/typeclasses are never equal,
# even if value comparison (for example, between integers and floats) would
# have otherwise indicated that every element has equal value.
def ==(_arg0); end
# call-seq:
# Map.[](key) => value
#
# Accesses the element at the given key. Throws an exception if the key type is
# incorrect. Returns nil when the key is not present in the map.
def [](_arg0); end
# call-seq:
# Map.[]=(key, value) => value
#
# Inserts or overwrites the value at the given key with the given new value.
# Throws an exception if the key type is incorrect. Returns the new value that
# was just inserted.
def []=(_arg0, _arg1); end
def clear; end
# call-seq:
# Map.dup => new_map
#
# Duplicates this map with a shallow copy. References to all non-primitive
# element objects (e.g., submessages) are shared.
def clone; end
# call-seq:
# Map.delete(key) => old_value
#
# Deletes the value at the given key, if any, returning either the old value or
# nil if none was present. Throws an exception if the key is of the wrong type.
def delete(_arg0); end
# call-seq:
# Map.dup => new_map
#
# Duplicates this map with a shallow copy. References to all non-primitive
# element objects (e.g., submessages) are shared.
def dup; end
# call-seq:
# Map.each(&block)
#
# Invokes &block on each |key, value| pair in the map, in unspecified order.
# Note that Map also includes Enumerable; map thus acts like a normal Ruby
# sequence.
def each; end
# Freezes the map object. We have to intercept this so we can freeze the
# underlying representation, not just the Ruby wrapper. Returns self.
def freeze; end
# Is this object frozen?
# Returns true if either this Ruby wrapper or the underlying
# representation are frozen. Freezes the wrapper if the underlying
# representation is already frozen but this wrapper isn't.
#
# @return [Boolean]
def frozen?; end
# @return [Boolean]
def has_key?(_arg0); end
def hash; end
def inspect; end
# call-seq:
# Map.keys => [list_of_keys]
#
# Returns the list of keys contained in the map, in unspecified order.
def keys; end
def length; end
# call-seq:
# Map.merge(other_map) => map
#
# Copies key/value pairs from other_map into a copy of this map. If a key is
# set in other_map and this map, the value from other_map overwrites the value
# in the new copy of this map. Returns the new copy of this map with merged
# contents.
def merge(_arg0); end
def size; end
# call-seq:
# Map.to_h => {}
#
# Returns a Ruby Hash object containing all the values within the map
def to_h; end
# call-seq:
# Map.values => [list_of_values]
#
# Returns the list of values contained in the map, in unspecified order.
def values; end
end
# source://google-protobuf//lib/google/protobuf/message_exts.rb#10
module Google::Protobuf::MessageExts
mixes_in_class_methods ::Google::Protobuf::MessageExts::ClassMethods
# source://google-protobuf//lib/google/protobuf/message_exts.rb#20
def to_json(options = T.unsafe(nil)); end
# source://google-protobuf//lib/google/protobuf/message_exts.rb#24
def to_proto(options = T.unsafe(nil)); end
class << self
# this is only called in jruby; mri loades the ClassMethods differently
#
# source://google-protobuf//lib/google/protobuf/message_exts.rb#13
def included(klass); end
end
end
# source://google-protobuf//lib/google/protobuf/message_exts.rb#17
module Google::Protobuf::MessageExts::ClassMethods; end
class Google::Protobuf::MethodDescriptor
# @return [MethodDescriptor] a new instance of MethodDescriptor
def initialize(_arg0, _arg1, _arg2); end
def client_streaming; end
def input_type; end
def name; end
def options; end
def output_type; end
def server_streaming; end
end
class Google::Protobuf::OneofDescriptor
include ::Enumerable
# @return [OneofDescriptor] a new instance of OneofDescriptor
def initialize(_arg0, _arg1, _arg2); end
def each; end
def name; end
def options; end
end
# source://google-protobuf//lib/google/protobuf.rb#20
Google::Protobuf::PREFER_FFI = T.let(T.unsafe(nil), FalseClass)
# source://google-protobuf//lib/google/protobuf.rb#17
class Google::Protobuf::ParseError < ::Google::Protobuf::Error; end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#27
class Google::Protobuf::RepeatedField
include ::Enumerable
extend ::Forwardable
# @return [RepeatedField] a new instance of RepeatedField
def initialize(*_arg0); end
# source://forwardable/1.3.3/forwardable.rb#231
def &(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def *(*args, **_arg1, &block); end
def +(_arg0); end
# source://forwardable/1.3.3/forwardable.rb#231
def -(*args, **_arg1, &block); end
# @raise [FrozenError]
def <<(_arg0); end
# source://forwardable/1.3.3/forwardable.rb#231
def <=>(*args, **_arg1, &block); end
def ==(_arg0); end
def [](*_arg0); end
# @raise [FrozenError]
def []=(_arg0, _arg1); end
# source://forwardable/1.3.3/forwardable.rb#231
def assoc(*args, **_arg1, &block); end
def at(*_arg0); end
# source://forwardable/1.3.3/forwardable.rb#231
def bsearch(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def bsearch_index(*args, **_arg1, &block); end
# @raise [FrozenError]
def clear; end
def clone; end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def collect!(*args, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def combination(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def compact(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def compact!(*args, &block); end
def concat(_arg0); end
# source://forwardable/1.3.3/forwardable.rb#231
def count(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def cycle(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#104
def delete(*args, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#104
def delete_at(*args, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def delete_if(*args, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def difference(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def dig(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def drop(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def drop_while(*args, **_arg1, &block); end
def dup; end
# call-seq:
# RepeatedField.each(&block)
#
# Invokes the block once for each element of the repeated field. RepeatedField
# also includes Enumerable; combined with this method, the repeated field thus
# acts like an ordinary Ruby sequence.
def each; end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def each_index(*args, &block); end
# @return [Boolean]
#
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#92
def empty?; end
# source://forwardable/1.3.3/forwardable.rb#231
def eql?(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def fetch(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def fill(*args, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def find_index(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#58
def first(n = T.unsafe(nil)); end
# source://forwardable/1.3.3/forwardable.rb#231
def flatten(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def flatten!(*args, &block); end
# Freezes the RepeatedField object. We have to intercept this so we can
# freeze the underlying representation, not just the Ruby wrapper. Returns
# self.
def freeze; end
# Is this object frozen?
# Returns true if either this Ruby wrapper or the underlying
# representation are frozen. Freezes the wrapper if the underlying
# representation is already frozen but this wrapper isn't.
#
# @return [Boolean]
def frozen?; end
def hash; end
# source://forwardable/1.3.3/forwardable.rb#231
def include?(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def index(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def insert(*args, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def inspect(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def intersection(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def join(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def keep_if(*args, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#69
def last(n = T.unsafe(nil)); end
def length; end
def map; end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def map!(*args, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def pack(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def permutation(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#81
def pop(n = T.unsafe(nil)); end
# source://forwardable/1.3.3/forwardable.rb#231
def pretty_print(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def pretty_print_cycle(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def product(*args, **_arg1, &block); end
# @raise [FrozenError]
def push(*_arg0); end
# source://forwardable/1.3.3/forwardable.rb#231
def rassoc(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def reject!(*args, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def repeated_combination(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def repeated_permutation(*args, **_arg1, &block); end
# @raise [FrozenError]
def replace(_arg0); end
# source://forwardable/1.3.3/forwardable.rb#231
def reverse(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def reverse!(*args, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def rindex(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def rotate(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def rotate!(*args, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def sample(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def select!(*args, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def shelljoin(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#104
def shift(*args, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def shuffle(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def shuffle!(*args, &block); end
def size; end
# array aliases into enumerable
def slice(*_arg0); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#104
def slice!(*args, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def sort!(*args, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def sort_by!(*args, &block); end
# call-seq:
# RepeatedField.to_ary => array
#
# Used when converted implicitly into array, e.g. compared to an Array.
# Also called as a fallback of Object#to_a
def to_ary; end
# source://forwardable/1.3.3/forwardable.rb#231
def to_s(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def transpose(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def union(*args, **_arg1, &block); end
# source://forwardable/1.3.3/forwardable.rb#231
def uniq(*args, **_arg1, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#116
def uniq!(*args, &block); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#104
def unshift(*args, &block); end
def values_at; end
# source://forwardable/1.3.3/forwardable.rb#231
def |(*args, **_arg1, &block); end
private
# @raise [FrozenError]
def pop_one; end
class << self
private
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#103
def define_array_wrapper_method(method_name); end
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#115
def define_array_wrapper_with_result_method(method_name); end
end
end
# propagates changes made by user of enumerator back to the original repeated field.
# This only applies in cases where the calling function which created the enumerator,
# such as #sort!, modifies itself rather than a new array, such as #sort
#
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#159
class Google::Protobuf::RepeatedField::ProxyingEnumerator < ::Struct
# source://google-protobuf//lib/google/protobuf/repeated_field.rb#160
def each(*args, &block); end
end
class Google::Protobuf::ServiceDescriptor
include ::Enumerable
# @return [ServiceDescriptor] a new instance of ServiceDescriptor
def initialize(_arg0, _arg1, _arg2); end
def each; end
def file_descriptor; end
def name; end
def options; end
end
# source://google-protobuf//lib/google/protobuf.rb#18
class Google::Protobuf::TypeError < ::TypeError; end

188
sorbet/rbi/gems/htmlbeautifier@1.4.3.rbi generated Normal file
View File

@@ -0,0 +1,188 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `htmlbeautifier` gem.
# Please instead update this file by running `bin/tapioca gem htmlbeautifier`.
# source://htmlbeautifier//lib/htmlbeautifier/parser.rb#5
module HtmlBeautifier
class << self
# Returns a beautified HTML/HTML+ERB document as a String.
# html must be an object that responds to +#to_s+.
#
# Available options are:
# tab_stops - an integer for the number of spaces to indent, default 2.
# Deprecated: see indent.
# indent - what to indent with (" ", "\t" etc.), default " "
# stop_on_errors - raise an exception on a badly-formed document. Default
# is false, i.e. continue to process the rest of the document.
# initial_level - The entire output will be indented by this number of steps.
# Default is 0.
# keep_blank_lines - an integer for the number of consecutive empty lines
# to keep in output.
#
# source://htmlbeautifier//lib/htmlbeautifier.rb#23
def beautify(html, options = T.unsafe(nil)); end
end
end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#7
class HtmlBeautifier::Builder
# @return [Builder] a new instance of Builder
#
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#15
def initialize(output, options = T.unsafe(nil)); end
private
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#104
def close_block_element(elem); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#99
def close_element(elem); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#119
def close_ie_cc(elem); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#58
def embed(opening, code, closing); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#45
def emit(*strings); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#71
def emit_reindented_block_content(code); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#30
def error(text); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#65
def foreign_block(opening, code, closing); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#84
def foreign_block_indentation(code); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#36
def indent; end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#54
def new_line; end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#134
def new_lines(*content); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#114
def open_block_element(elem); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#109
def open_element(elem); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#128
def open_ie_cc(elem); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#40
def outdent; end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#88
def preformatted_block(opening, content, closing); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#94
def standalone_element(elem); end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#45
def text(*strings); end
end
# source://htmlbeautifier//lib/htmlbeautifier/builder.rb#8
HtmlBeautifier::Builder::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
# source://htmlbeautifier//lib/htmlbeautifier/html_parser.rb#6
class HtmlBeautifier::HtmlParser < ::HtmlBeautifier::Parser
# @return [HtmlParser] a new instance of HtmlParser
#
# source://htmlbeautifier//lib/htmlbeautifier/html_parser.rb#57
def initialize; end
end
# source://htmlbeautifier//lib/htmlbeautifier/html_parser.rb#7
HtmlBeautifier::HtmlParser::ELEMENT_CONTENT = T.let(T.unsafe(nil), Regexp)
# source://htmlbeautifier//lib/htmlbeautifier/html_parser.rb#12
HtmlBeautifier::HtmlParser::HTML_BLOCK_ELEMENTS = T.let(T.unsafe(nil), Regexp)
# source://htmlbeautifier//lib/htmlbeautifier/html_parser.rb#8
HtmlBeautifier::HtmlParser::HTML_VOID_ELEMENTS = T.let(T.unsafe(nil), Regexp)
# source://htmlbeautifier//lib/htmlbeautifier/html_parser.rb#20
HtmlBeautifier::HtmlParser::MAPPINGS = T.let(T.unsafe(nil), Array)
# source://htmlbeautifier//lib/htmlbeautifier/parser.rb#6
class HtmlBeautifier::Parser
# @return [Parser] a new instance of Parser
# @yield [_self]
# @yieldparam _self [HtmlBeautifier::Parser] the object that the method was called on
#
# source://htmlbeautifier//lib/htmlbeautifier/parser.rb#7
def initialize; end
# source://htmlbeautifier//lib/htmlbeautifier/parser.rb#12
def map(pattern, method); end
# source://htmlbeautifier//lib/htmlbeautifier/parser.rb#16
def scan(subject, receiver); end
# source://htmlbeautifier//lib/htmlbeautifier/parser.rb#25
def source_line_number; end
# source://htmlbeautifier//lib/htmlbeautifier/parser.rb#21
def source_so_far; end
private
# source://htmlbeautifier//lib/htmlbeautifier/parser.rb#31
def dispatch(receiver); end
# source://htmlbeautifier//lib/htmlbeautifier/parser.rb#40
def extract_params(scanner); end
end
# source://htmlbeautifier//lib/htmlbeautifier/ruby_indenter.rb#4
class HtmlBeautifier::RubyIndenter
# @return [Boolean]
#
# source://htmlbeautifier//lib/htmlbeautifier/ruby_indenter.rb#17
def indent?(lines); end
# @return [Boolean]
#
# source://htmlbeautifier//lib/htmlbeautifier/ruby_indenter.rb#13
def outdent?(lines); end
end
# source://htmlbeautifier//lib/htmlbeautifier/ruby_indenter.rb#5
HtmlBeautifier::RubyIndenter::INDENT_KEYWORDS = T.let(T.unsafe(nil), Array)
# source://htmlbeautifier//lib/htmlbeautifier/ruby_indenter.rb#6
HtmlBeautifier::RubyIndenter::OUTDENT_KEYWORDS = T.let(T.unsafe(nil), Array)
# source://htmlbeautifier//lib/htmlbeautifier/ruby_indenter.rb#7
HtmlBeautifier::RubyIndenter::RUBY_INDENT = T.let(T.unsafe(nil), Regexp)
# source://htmlbeautifier//lib/htmlbeautifier/ruby_indenter.rb#11
HtmlBeautifier::RubyIndenter::RUBY_OUTDENT = T.let(T.unsafe(nil), Regexp)
# source://htmlbeautifier//lib/htmlbeautifier/version.rb#4
module HtmlBeautifier::VERSION; end
# source://htmlbeautifier//lib/htmlbeautifier/version.rb#5
HtmlBeautifier::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
# source://htmlbeautifier//lib/htmlbeautifier/version.rb#6
HtmlBeautifier::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
# source://htmlbeautifier//lib/htmlbeautifier/version.rb#9
HtmlBeautifier::VERSION::STRING = T.let(T.unsafe(nil), String)
# source://htmlbeautifier//lib/htmlbeautifier/version.rb#7
HtmlBeautifier::VERSION::TINY = T.let(T.unsafe(nil), Integer)

1185
sorbet/rbi/gems/http-cookie@1.0.8.rbi generated Normal file

File diff suppressed because it is too large Load Diff

2359
sorbet/rbi/gems/i18n@1.14.6.rbi generated Normal file

File diff suppressed because it is too large Load Diff

9
sorbet/rbi/gems/io-console@0.8.0.rbi generated Normal file
View File

@@ -0,0 +1,9 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `io-console` gem.
# Please instead update this file by running `bin/tapioca gem io-console`.
# THIS IS AN EMPTY RBI FILE.
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem

558
sorbet/rbi/gems/jbuilder@2.13.0.rbi generated Normal file
View File

@@ -0,0 +1,558 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `jbuilder` gem.
# Please instead update this file by running `bin/tapioca gem jbuilder`.
# source://jbuilder//lib/jbuilder/jbuilder.rb#1
class Jbuilder < ::BasicObject
# @return [Jbuilder] a new instance of Jbuilder
# @yield [_self]
# @yieldparam _self [Jbuilder] the object that the method was called on
#
# source://jbuilder//lib/jbuilder.rb#15
def initialize(options = T.unsafe(nil)); end
# Turns the current element into an array and iterates over the passed collection, adding each iteration as
# an element of the resulting array.
#
# Example:
#
# json.array!(@people) do |person|
# json.name person.name
# json.age calculate_age(person.birthday)
# end
#
# [ { "name": David", "age": 32 }, { "name": Jamie", "age": 31 } ]
#
# You can use the call syntax instead of an explicit extract! call:
#
# json.(@people) { |person| ... }
#
# It's generally only needed to use this method for top-level arrays. If you have named arrays, you can do:
#
# json.people(@people) do |person|
# json.name person.name
# json.age calculate_age(person.birthday)
# end
#
# { "people": [ { "name": David", "age": 32 }, { "name": Jamie", "age": 31 } ] }
#
# If you omit the block then you can set the top level array directly:
#
# json.array! [1, 2, 3]
#
# [1,2,3]
#
# source://jbuilder//lib/jbuilder.rb#212
def array!(collection = T.unsafe(nil), *attributes, &block); end
# Returns the attributes of the current builder.
#
# source://jbuilder//lib/jbuilder.rb#267
def attributes!; end
# source://jbuilder//lib/jbuilder.rb#251
def call(object, *attributes, &block); end
# Turns the current element into an array and yields a builder to add a hash.
#
# Example:
#
# json.comments do
# json.child! { json.content "hello" }
# json.child! { json.content "world" }
# end
#
# { "comments": [ { "content": "hello" }, { "content": "world" } ]}
#
# More commonly, you'd use the combined iterator, though:
#
# json.comments(@post.comments) do |comment|
# json.content comment.formatted_content
# end
#
# source://jbuilder//lib/jbuilder.rb#177
def child!; end
# Deeply apply key format to nested hashes and arrays passed to
# methods like set!, merge! or array!.
#
# Example:
#
# json.key_format! camelize: :lower
# json.settings({some_value: "abc"})
#
# { "settings": { "some_value": "abc" }}
#
# json.key_format! camelize: :lower
# json.deep_format_keys!
# json.settings({some_value: "abc"})
#
# { "settings": { "someValue": "abc" }}
#
# source://jbuilder//lib/jbuilder.rb#152
def deep_format_keys!(value = T.unsafe(nil)); end
# Extracts the mentioned attributes or hash elements from the passed object and turns them into attributes of the JSON.
#
# Example:
#
# @person = Struct.new(:name, :age).new('David', 32)
#
# or you can utilize a Hash
#
# @person = { name: 'David', age: 32 }
#
# json.extract! @person, :name, :age
#
# { "name": David", "age": 32 }, { "name": Jamie", "age": 31 }
#
# You can also use the call syntax instead of an explicit extract! call:
#
# json.(@person, :name, :age)
#
# source://jbuilder//lib/jbuilder.rb#243
def extract!(object, *attributes); end
# If you want to skip adding nil values to your JSON hash. This is useful
# for JSON clients that don't deal well with nil values, and would prefer
# not to receive keys which have null values.
#
# Example:
# json.ignore_nil! false
# json.id User.new.id
#
# { "id": null }
#
# json.ignore_nil!
# json.id User.new.id
#
# {}
#
# source://jbuilder//lib/jbuilder.rb#127
def ignore_nil!(value = T.unsafe(nil)); end
# Specifies formatting to be applied to the key. Passing in a name of a function
# will cause that function to be called on the key. So :upcase will upper case
# the key. You can also pass in lambdas for more complex transformations.
#
# Example:
#
# json.key_format! :upcase
# json.author do
# json.name "David"
# json.age 32
# end
#
# { "AUTHOR": { "NAME": "David", "AGE": 32 } }
#
# You can pass parameters to the method using a hash pair.
#
# json.key_format! camelize: :lower
# json.first_name "David"
#
# { "firstName": "David" }
#
# Lambdas can also be used.
#
# json.key_format! ->(key){ "_" + key }
# json.first_name "David"
#
# { "_first_name": "David" }
#
# source://jbuilder//lib/jbuilder.rb#103
def key_format!(*args); end
# Merges hash, array, or Jbuilder instance into current builder.
#
# source://jbuilder//lib/jbuilder.rb#272
def merge!(object); end
# source://jbuilder//lib/jbuilder.rb#67
def method_missing(*args, &block); end
# Returns the nil JSON.
#
# source://jbuilder//lib/jbuilder.rb#260
def nil!; end
# Returns the nil JSON.
#
# source://jbuilder//lib/jbuilder.rb#260
def null!; end
# source://jbuilder//lib/jbuilder.rb#32
def set!(key, value = T.unsafe(nil), *args, &block); end
# Encodes the current builder as JSON.
#
# source://jbuilder//lib/jbuilder.rb#278
def target!; end
private
# @return [Boolean]
#
# source://jbuilder//lib/jbuilder.rb#356
def _blank?(value = T.unsafe(nil)); end
# source://jbuilder//lib/jbuilder.rb#284
def _extract_hash_values(object, attributes); end
# source://jbuilder//lib/jbuilder.rb#288
def _extract_method_values(object, attributes); end
# source://jbuilder//lib/jbuilder.rb#317
def _format_keys(hash_or_array); end
# @return [Boolean]
#
# source://jbuilder//lib/jbuilder.rb#352
def _is_collection?(object); end
# source://jbuilder//lib/jbuilder.rb#313
def _key(key); end
# source://jbuilder//lib/jbuilder.rb#337
def _map_collection(collection); end
# source://jbuilder//lib/jbuilder.rb#292
def _merge_block(key); end
# source://jbuilder//lib/jbuilder.rb#299
def _merge_values(current_value, updates); end
# @return [Boolean]
#
# source://jbuilder//lib/jbuilder.rb#360
def _object_respond_to?(object, *methods); end
# source://jbuilder//lib/jbuilder.rb#343
def _scope; end
# source://jbuilder//lib/jbuilder.rb#329
def _set_value(key, value); end
class << self
# Same as instance method deep_format_keys! except sets the default.
#
# source://jbuilder//lib/jbuilder.rb#157
def deep_format_keys(value = T.unsafe(nil)); end
# Yields a builder and automatically turns the result into a JSON string
#
# source://jbuilder//lib/jbuilder.rb#26
def encode(*args, &block); end
# Same as instance method ignore_nil! except sets the default.
#
# source://jbuilder//lib/jbuilder.rb#132
def ignore_nil(value = T.unsafe(nil)); end
# Same as the instance method key_format! except sets the default.
#
# source://jbuilder//lib/jbuilder.rb#108
def key_format(*args); end
end
end
# source://jbuilder//lib/jbuilder/errors.rb#11
class Jbuilder::ArrayError < ::StandardError
class << self
# source://jbuilder//lib/jbuilder/errors.rb#12
def build(key); end
end
end
# source://jbuilder//lib/jbuilder.rb#30
Jbuilder::BLANK = T.let(T.unsafe(nil), Jbuilder::Blank)
# source://jbuilder//lib/jbuilder/blank.rb#2
class Jbuilder::Blank
# source://jbuilder//lib/jbuilder/blank.rb#3
def ==(other); end
# @return [Boolean]
#
# source://jbuilder//lib/jbuilder/blank.rb#7
def empty?; end
end
# source://jbuilder//lib/jbuilder/collection_renderer.rb#12
module Jbuilder::CollectionRenderable
extend ::ActiveSupport::Concern
mixes_in_class_methods ::Jbuilder::CollectionRenderable::ClassMethods
private
# source://jbuilder//lib/jbuilder/collection_renderer.rb#27
def build_rendered_collection(templates, _spacer); end
# source://jbuilder//lib/jbuilder/collection_renderer.rb#23
def build_rendered_template(content, template, layout = T.unsafe(nil)); end
# source://jbuilder//lib/jbuilder/collection_renderer.rb#31
def json; end
end
# source://jbuilder//lib/jbuilder/collection_renderer.rb#0
module Jbuilder::CollectionRenderable::ClassMethods
# source://jbuilder//lib/jbuilder/collection_renderer.rb#16
def supported?; end
end
# source://jbuilder//lib/jbuilder/collection_renderer.rb#35
class Jbuilder::CollectionRenderable::ScopedIterator < ::SimpleDelegator
include ::ActiveSupport::ToJsonWithActiveSupportEncoder
include ::Enumerable
# @return [ScopedIterator] a new instance of ScopedIterator
#
# source://jbuilder//lib/jbuilder/collection_renderer.rb#38
def initialize(obj, scope); end
# Rails 6.0 support:
#
# source://jbuilder//lib/jbuilder/collection_renderer.rb#44
def each; end
# Rails 6.1 support:
#
# source://jbuilder//lib/jbuilder/collection_renderer.rb#53
def each_with_info; end
end
# Rails 6.0 support:
#
# source://jbuilder//lib/jbuilder/collection_renderer.rb#67
class Jbuilder::CollectionRenderer < ::ActionView::CollectionRenderer
include ::Jbuilder::CollectionRenderable
extend ::Jbuilder::CollectionRenderable::ClassMethods
# @return [CollectionRenderer] a new instance of CollectionRenderer
#
# source://jbuilder//lib/jbuilder/collection_renderer.rb#70
def initialize(lookup_context, options, &scope); end
private
# source://jbuilder//lib/jbuilder/collection_renderer.rb#76
def collection_with_template(view, template, layout, collection); end
end
# source://jbuilder//lib/jbuilder/collection_renderer.rb#110
class Jbuilder::EnumerableCompat < ::SimpleDelegator
# Rails 6.1 requires this.
#
# source://jbuilder//lib/jbuilder/collection_renderer.rb#112
def size(*args, &block); end
end
# source://jbuilder//lib/jbuilder/key_formatter.rb#5
class Jbuilder::KeyFormatter
# @return [KeyFormatter] a new instance of KeyFormatter
#
# source://jbuilder//lib/jbuilder/key_formatter.rb#6
def initialize(*args); end
# source://jbuilder//lib/jbuilder/key_formatter.rb#23
def format(key); end
private
# source://jbuilder//lib/jbuilder/key_formatter.rb#19
def initialize_copy(original); end
end
# source://jbuilder//lib/jbuilder/errors.rb#18
class Jbuilder::MergeError < ::StandardError
class << self
# source://jbuilder//lib/jbuilder/errors.rb#19
def build(current_value, updates); end
end
end
# source://jbuilder//lib/jbuilder/errors.rb#4
class Jbuilder::NullError < ::NoMethodError
class << self
# source://jbuilder//lib/jbuilder/errors.rb#5
def build(key); end
end
end
# source://jbuilder//lib/jbuilder/railtie.rb#5
class Jbuilder::Railtie < ::Rails::Railtie; end
# source://jbuilder//lib/jbuilder/version.rb#2
Jbuilder::VERSION = T.let(T.unsafe(nil), String)
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#280
class JbuilderHandler
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#281
def default_format; end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#281
def default_format=(val); end
class << self
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#284
def call(template, source = T.unsafe(nil)); end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#281
def default_format; end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#281
def default_format=(val); end
end
end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#6
class JbuilderTemplate < ::Jbuilder
# @return [JbuilderTemplate] a new instance of JbuilderTemplate
#
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#13
def initialize(context, *args); end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#117
def array!(collection = T.unsafe(nil), *args); end
# Caches the json constructed within the block passed. Has the same signature as the `cache` helper
# method in `ActionView::Helpers::CacheHelper` and so can be used in the same way.
#
# Example:
#
# json.cache! ['v1', @person], expires_in: 10.minutes do
# json.extract! @person, :name, :age
# end
#
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#67
def cache!(key = T.unsafe(nil), options = T.unsafe(nil)); end
# Conditionally caches the json depending in the condition given as first parameter. Has the same
# signature as the `cache` helper method in `ActionView::Helpers::CacheHelper` and so can be used in
# the same way.
#
# Example:
#
# json.cache_if! !admin?, @person, expires_in: 10.minutes do
# json.extract! @person, :name, :age
# end
#
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#109
def cache_if!(condition, *args, &block); end
# Caches the json structure at the root using a string rather than the hash structure. This is considerably
# faster, but the drawback is that it only works, as the name hints, at the root. So you cannot
# use this approach to cache deeper inside the hierarchy, like in partials or such. Continue to use #cache! there.
#
# Example:
#
# json.cache_root! @person do
# json.extract! @person, :name, :age
# end
#
# # json.extra 'This will not work either, the root must be exclusive'
#
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#90
def cache_root!(key = T.unsafe(nil), options = T.unsafe(nil)); end
# Generates JSON using the template specified with the `:partial` option. For example, the code below will render
# the file `views/comments/_comments.json.jbuilder`, and set a local variable comments with all this message's
# comments, which can be used inside the partial.
#
# Example:
#
# json.partial! 'comments/comments', comments: @message.comments
#
# There are multiple ways to generate a collection of elements as JSON, as ilustrated below:
#
# Example:
#
# json.array! @posts, partial: 'posts/post', as: :post
#
# # or:
# json.partial! 'posts/post', collection: @posts, as: :post
#
# # or:
# json.partial! partial: 'posts/post', collection: @posts, as: :post
#
# # or:
# json.comments @post.comments, partial: 'comments/comment', as: :comment
#
# Aside from that, the `:cached` options is available on Rails >= 6.0. This will cache the rendered results
# effectively using the multi fetch feature.
#
# Example:
#
# json.array! @posts, partial: "posts/post", as: :post, cached: true
#
# json.comments @post.comments, partial: "comments/comment", as: :comment, cached: true
#
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#51
def partial!(*args); end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#127
def set!(name, object = T.unsafe(nil), *args); end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#113
def target!; end
private
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#193
def _cache_fragment_for(key, options, &block); end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#212
def _cache_key(key, options); end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#225
def _fragment_name_with_digest(key, options); end
# @return [Boolean]
#
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#237
def _is_active_model?(object); end
# @return [Boolean]
#
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#233
def _partial_options?(options); end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#198
def _read_fragment_cache(key, options = T.unsafe(nil)); end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#275
def _render_active_model_partial(object); end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#254
def _render_explicit_partial(name_or_options, locals = T.unsafe(nil)); end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#188
def _render_partial(options); end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#139
def _render_partial_with_options(options); end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#241
def _set_inline_partial(name, object, options); end
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#204
def _write_fragment_cache(key, options = T.unsafe(nil)); end
class << self
# Returns the value of attribute template_lookup_options.
#
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#8
def template_lookup_options; end
# Sets the attribute template_lookup_options
#
# @param value the value to set the attribute template_lookup_options to.
#
# source://jbuilder//lib/jbuilder/jbuilder_template.rb#8
def template_lookup_options=(_arg0); end
end
end

View File

@@ -0,0 +1,43 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `kaminari-actionview` gem.
# Please instead update this file by running `bin/tapioca gem kaminari-actionview`.
class ActionView::LogSubscriber < ::ActiveSupport::LogSubscriber
include ::Kaminari::ActionViewExtension::LogSubscriberSilencer
end
# source://kaminari-actionview//lib/kaminari/actionview/version.rb#3
module Kaminari
class << self
# source://kaminari-core/1.2.2/lib/kaminari/config.rb#13
def config; end
# source://kaminari-core/1.2.2/lib/kaminari/config.rb#9
def configure; end
# source://kaminari-core/1.2.2/lib/kaminari/models/array_extension.rb#70
def paginate_array(array, limit: T.unsafe(nil), offset: T.unsafe(nil), total_count: T.unsafe(nil), padding: T.unsafe(nil)); end
end
end
# = Helpers
#
# source://kaminari-actionview//lib/kaminari/actionview/action_view_extension.rb#10
module Kaminari::ActionViewExtension; end
# Monkey-patching AV::LogSubscriber not to log each render_partial
#
# source://kaminari-actionview//lib/kaminari/actionview/action_view_extension.rb#12
module Kaminari::ActionViewExtension::LogSubscriberSilencer
# source://kaminari-actionview//lib/kaminari/actionview/action_view_extension.rb#13
def render_partial(*_arg0); end
end
# source://kaminari-actionview//lib/kaminari/actionview/version.rb#4
module Kaminari::Actionview; end
# source://kaminari-actionview//lib/kaminari/actionview/version.rb#5
Kaminari::Actionview::VERSION = T.let(T.unsafe(nil), String)

View File

@@ -0,0 +1,106 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `kaminari-activerecord` gem.
# Please instead update this file by running `bin/tapioca gem kaminari-activerecord`.
# source://kaminari-activerecord//lib/kaminari/activerecord/version.rb#3
module Kaminari
class << self
# source://kaminari-core/1.2.2/lib/kaminari/config.rb#13
def config; end
# source://kaminari-core/1.2.2/lib/kaminari/config.rb#9
def configure; end
# source://kaminari-core/1.2.2/lib/kaminari/models/array_extension.rb#70
def paginate_array(array, limit: T.unsafe(nil), offset: T.unsafe(nil), total_count: T.unsafe(nil), padding: T.unsafe(nil)); end
end
end
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_extension.rb#6
module Kaminari::ActiveRecordExtension
extend ::ActiveSupport::Concern
mixes_in_class_methods ::Kaminari::ActiveRecordExtension::ClassMethods
end
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_extension.rb#9
module Kaminari::ActiveRecordExtension::ClassMethods
# Future subclasses will pick up the model extension
#
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_extension.rb#11
def inherited(kls); end
end
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_model_extension.rb#6
module Kaminari::ActiveRecordModelExtension
extend ::ActiveSupport::Concern
include ::Kaminari::ConfigurationMethods
mixes_in_class_methods ::Kaminari::ConfigurationMethods::ClassMethods
end
# Active Record specific page scope methods implementations
#
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_relation_methods.rb#5
module Kaminari::ActiveRecordRelationMethods
# Used for page_entry_info
#
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_relation_methods.rb#7
def entry_name(options = T.unsafe(nil)); end
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_relation_methods.rb#12
def reset; end
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_relation_methods.rb#17
def total_count(column_name = T.unsafe(nil), _options = T.unsafe(nil)); end
# Turn this Relation to a "without count mode" Relation.
# Note that the "without count mode" is supposed to be performant but has a feature limitation.
# Pro: paginates without casting an extra SELECT COUNT query
# Con: unable to know the total number of records/pages
#
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_relation_methods.rb#50
def without_count; end
end
# source://kaminari-activerecord//lib/kaminari/activerecord/version.rb#4
module Kaminari::Activerecord; end
# source://kaminari-activerecord//lib/kaminari/activerecord/version.rb#5
Kaminari::Activerecord::VERSION = T.let(T.unsafe(nil), String)
# A module that makes AR::Relation paginatable without having to cast another SELECT COUNT query
#
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_relation_methods.rb#56
module Kaminari::PaginatableWithoutCount
# The page wouldn't be the last page if there's "limit + 1" record
#
# @return [Boolean]
#
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_relation_methods.rb#109
def last_page?; end
# Overwrite AR::Relation#load to actually load one more record to judge if the page has next page
# then store the result in @_has_next ivar
#
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_relation_methods.rb#90
def load; end
# Empty relation needs no pagination
#
# @return [Boolean]
#
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_relation_methods.rb#114
def out_of_range?; end
# Force to raise an exception if #total_count is called explicitly.
#
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_relation_methods.rb#120
def total_count; end
end
# source://kaminari-activerecord//lib/kaminari/activerecord/active_record_relation_methods.rb#57
module Kaminari::PaginatableWithoutCount::LimitValueSetter; end

976
sorbet/rbi/gems/kaminari-core@1.2.2.rbi generated Normal file
View File

@@ -0,0 +1,976 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `kaminari-core` gem.
# Please instead update this file by running `bin/tapioca gem kaminari-core`.
# source://kaminari-core//lib/kaminari/core.rb#3
module Kaminari
class << self
# source://kaminari-core//lib/kaminari/config.rb#13
def config; end
# @yield [config]
#
# source://kaminari-core//lib/kaminari/config.rb#9
def configure; end
# Wrap an Array object to make it paginatable
# ==== Options
# * <tt>:limit</tt> - limit
# * <tt>:offset</tt> - offset
# * <tt>:total_count</tt> - total_count
# * <tt>:padding</tt> - padding
#
# source://kaminari-core//lib/kaminari/models/array_extension.rb#70
def paginate_array(array, limit: T.unsafe(nil), offset: T.unsafe(nil), total_count: T.unsafe(nil), padding: T.unsafe(nil)); end
end
end
# source://kaminari-core//lib/kaminari/config.rb#18
class Kaminari::Config
# @return [Config] a new instance of Config
#
# source://kaminari-core//lib/kaminari/config.rb#22
def initialize; end
# Returns the value of attribute default_per_page.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def default_per_page; end
# Sets the attribute default_per_page
#
# @param value the value to set the attribute default_per_page to.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def default_per_page=(_arg0); end
# Returns the value of attribute left.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def left; end
# Sets the attribute left
#
# @param value the value to set the attribute left to.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def left=(_arg0); end
# Returns the value of attribute max_pages.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def max_pages; end
# Sets the attribute max_pages
#
# @param value the value to set the attribute max_pages to.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def max_pages=(_arg0); end
# Returns the value of attribute max_per_page.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def max_per_page; end
# Sets the attribute max_per_page
#
# @param value the value to set the attribute max_per_page to.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def max_per_page=(_arg0); end
# Returns the value of attribute outer_window.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def outer_window; end
# Sets the attribute outer_window
#
# @param value the value to set the attribute outer_window to.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def outer_window=(_arg0); end
# Returns the value of attribute page_method_name.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def page_method_name; end
# Sets the attribute page_method_name
#
# @param value the value to set the attribute page_method_name to.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def page_method_name=(_arg0); end
# If param_name was given as a callable object, call it when returning
#
# source://kaminari-core//lib/kaminari/config.rb#36
def param_name; end
# Sets the attribute param_name
#
# @param value the value to set the attribute param_name to.
#
# source://kaminari-core//lib/kaminari/config.rb#20
def param_name=(_arg0); end
# Returns the value of attribute params_on_first_page.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def params_on_first_page; end
# Sets the attribute params_on_first_page
#
# @param value the value to set the attribute params_on_first_page to.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def params_on_first_page=(_arg0); end
# Returns the value of attribute right.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def right; end
# Sets the attribute right
#
# @param value the value to set the attribute right to.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def right=(_arg0); end
# Returns the value of attribute window.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def window; end
# Sets the attribute window
#
# @param value the value to set the attribute window to.
#
# source://kaminari-core//lib/kaminari/config.rb#19
def window=(_arg0); end
end
# source://kaminari-core//lib/kaminari/models/configuration_methods.rb#6
module Kaminari::ConfigurationMethods
extend ::ActiveSupport::Concern
mixes_in_class_methods ::Kaminari::ConfigurationMethods::ClassMethods
end
# source://kaminari-core//lib/kaminari/models/configuration_methods.rb#8
module Kaminari::ConfigurationMethods::ClassMethods
# This model's default +per_page+ value
# returns +default_per_page+ value unless explicitly overridden via <tt>paginates_per</tt>
#
# source://kaminari-core//lib/kaminari/models/configuration_methods.rb#19
def default_per_page; end
# Overrides the max_pages value per model when a value is given
# class Article < ActiveRecord::Base
# max_pages 100
# end
#
# Also returns this model's max_pages value (globally configured
# +max_pages+ value unless explicitly overridden) when no value is given
#
# source://kaminari-core//lib/kaminari/models/configuration_methods.rb#44
def max_pages(val = T.unsafe(nil)); end
# source://kaminari-core//lib/kaminari/models/configuration_methods.rb#54
def max_pages_per(val); end
# Overrides the max +per_page+ value per model
# class Article < ActiveRecord::Base
# max_paginates_per 100
# end
#
# source://kaminari-core//lib/kaminari/models/configuration_methods.rb#27
def max_paginates_per(val); end
# This model's max +per_page+ value
# returns +max_per_page+ value unless explicitly overridden via <tt>max_paginates_per</tt>
#
# source://kaminari-core//lib/kaminari/models/configuration_methods.rb#33
def max_per_page; end
# Overrides the default +per_page+ value per model
# class Article < ActiveRecord::Base
# paginates_per 10
# end
#
# source://kaminari-core//lib/kaminari/models/configuration_methods.rb#13
def paginates_per(val); end
end
# source://kaminari-core//lib/kaminari/engine.rb#4
class Kaminari::Engine < ::Rails::Engine
class << self
# source://activesupport/7.2.2.1/lib/active_support/callbacks.rb#70
def __callbacks; end
end
end
# source://kaminari-core//lib/kaminari/helpers/tags.rb#4
module Kaminari::Helpers; end
# Link with page number that appears at the leftmost
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#103
class Kaminari::Helpers::FirstPage < ::Kaminari::Helpers::Tag
include ::Kaminari::Helpers::Link
# source://kaminari-core//lib/kaminari/helpers/tags.rb#105
def page; end
end
# Non-link tag that stands for skipped pages...
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#161
class Kaminari::Helpers::Gap < ::Kaminari::Helpers::Tag; end
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#98
module Kaminari::Helpers::HelperMethods
include ::Kaminari::Helpers::UrlHelper
# A simple "Twitter like" pagination link that creates a link to the next page.
#
# ==== Examples
# Basic usage:
#
# <%= link_to_next_page @items, 'Next Page' %>
#
# Ajax:
#
# <%= link_to_next_page @items, 'Next Page', remote: true %>
#
# By default, it renders nothing if there are no more results on the next page.
# You can customize this output by passing a block.
#
# <%= link_to_next_page @users, 'Next Page' do %>
# <span>No More Pages</span>
# <% end %>
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#172
def link_to_next_page(scope, name, **options); end
# A simple "Twitter like" pagination link that creates a link to the previous page.
#
# ==== Examples
# Basic usage:
#
# <%= link_to_previous_page @items, 'Previous Page' %>
#
# Ajax:
#
# <%= link_to_previous_page @items, 'Previous Page', remote: true %>
#
# By default, it renders nothing if there are no more results on the previous page.
# You can customize this output by passing a block.
#
# <%= link_to_previous_page @users, 'Previous Page' do %>
# <span>At the Beginning</span>
# <% end %>
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#141
def link_to_prev_page(scope, name, **options); end
# A simple "Twitter like" pagination link that creates a link to the previous page.
#
# ==== Examples
# Basic usage:
#
# <%= link_to_previous_page @items, 'Previous Page' %>
#
# Ajax:
#
# <%= link_to_previous_page @items, 'Previous Page', remote: true %>
#
# By default, it renders nothing if there are no more results on the previous page.
# You can customize this output by passing a block.
#
# <%= link_to_previous_page @users, 'Previous Page' do %>
# <span>At the Beginning</span>
# <% end %>
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#141
def link_to_previous_page(scope, name, **options); end
# Renders a helpful message with numbers of displayed vs. total entries.
# Ported from mislav/will_paginate
#
# ==== Examples
# Basic usage:
#
# <%= page_entries_info @posts %>
# #-> Displaying posts 6 - 10 of 26 in total
#
# By default, the message will use the humanized class name of objects
# in collection: for instance, "project types" for ProjectType models.
# The namespace will be cutted out and only the last name will be used.
# Override this with the <tt>:entry_name</tt> parameter:
#
# <%= page_entries_info @posts, entry_name: 'item' %>
# #-> Displaying items 6 - 10 of 26 in total
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#201
def page_entries_info(collection, entry_name: T.unsafe(nil)); end
# A helper that renders the pagination links.
#
# <%= paginate @articles %>
#
# ==== Options
# * <tt>:window</tt> - The "inner window" size (4 by default).
# * <tt>:outer_window</tt> - The "outer window" size (0 by default).
# * <tt>:left</tt> - The "left outer window" size (0 by default).
# * <tt>:right</tt> - The "right outer window" size (0 by default).
# * <tt>:params</tt> - url_for parameters for the links (:controller, :action, etc.)
# * <tt>:param_name</tt> - parameter name for page number in the links (:page by default)
# * <tt>:remote</tt> - Ajax? (false by default)
# * <tt>:paginator_class</tt> - Specify a custom Paginator (Kaminari::Helpers::Paginator by default)
# * <tt>:template</tt> - Specify a custom template renderer for rendering the Paginator (receiver by default)
# * <tt>:ANY_OTHER_VALUES</tt> - Any other hash key & values would be directly passed into each tag as :locals value.
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#116
def paginate(scope, paginator_class: T.unsafe(nil), template: T.unsafe(nil), **options); end
# Renders rel="next" and rel="prev" links to be used in the head.
#
# ==== Examples
# Basic usage:
#
# In head:
# <head>
# <title>My Website</title>
# <%= yield :head %>
# </head>
#
# Somewhere in body:
# <% content_for :head do %>
# <%= rel_next_prev_link_tags @items %>
# <% end %>
#
# #-> <link rel="next" href="/items/page/3"><link rel="prev" href="/items/page/1">
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#236
def rel_next_prev_link_tags(scope, options = T.unsafe(nil)); end
end
# Link with page number that appears at the rightmost
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#111
class Kaminari::Helpers::LastPage < ::Kaminari::Helpers::Tag
include ::Kaminari::Helpers::Link
# source://kaminari-core//lib/kaminari/helpers/tags.rb#113
def page; end
end
# Tag that contains a link
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#74
module Kaminari::Helpers::Link
# target page number
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#76
def page; end
# source://kaminari-core//lib/kaminari/helpers/tags.rb#83
def to_s(locals = T.unsafe(nil)); end
# the link's href
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#80
def url; end
end
# The "next" page of the current page
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#140
class Kaminari::Helpers::NextPage < ::Kaminari::Helpers::Tag
include ::Kaminari::Helpers::Link
# TODO: Remove this initializer before 1.3.0.
#
# @return [NextPage] a new instance of NextPage
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#144
def initialize(template, params: T.unsafe(nil), param_name: T.unsafe(nil), theme: T.unsafe(nil), views_prefix: T.unsafe(nil), **options); end
# source://kaminari-core//lib/kaminari/helpers/tags.rb#155
def page; end
end
# source://kaminari-core//lib/kaminari/helpers/tags.rb#5
Kaminari::Helpers::PARAM_KEY_EXCEPT_LIST = T.let(T.unsafe(nil), Array)
# A page
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#90
class Kaminari::Helpers::Page < ::Kaminari::Helpers::Tag
include ::Kaminari::Helpers::Link
# target page number
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#93
def page; end
# source://kaminari-core//lib/kaminari/helpers/tags.rb#96
def to_s(locals = T.unsafe(nil)); end
end
# The main container tag
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#9
class Kaminari::Helpers::Paginator < ::Kaminari::Helpers::Tag
# @return [Paginator] a new instance of Paginator
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#10
def initialize(template, window: T.unsafe(nil), outer_window: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), inner_window: T.unsafe(nil), **options); end
# enumerate each page providing PageProxy object as the block parameter
# Because of performance reason, this doesn't actually enumerate all pages but pages that are seemingly relevant to the paginator.
# "Relevant" pages are:
# * pages inside the left outer window plus one for showing the gap tag
# * pages inside the inner window plus one on the left plus one on the right for showing the gap tags
# * pages inside the right outer window plus one for showing the gap tag
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#43
def each_page; end
# enumerate each page providing PageProxy object as the block parameter
# Because of performance reason, this doesn't actually enumerate all pages but pages that are seemingly relevant to the paginator.
# "Relevant" pages are:
# * pages inside the left outer window plus one for showing the gap tag
# * pages inside the inner window plus one on the left plus one on the right for showing the gap tags
# * pages inside the right outer window plus one for showing the gap tag
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#43
def each_relevant_page; end
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#67
def first_page_tag; end
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#67
def gap_tag; end
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#67
def last_page_tag; end
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#67
def next_page_tag; end
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#61
def page_tag(page); end
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#67
def prev_page_tag; end
# render given block as a view template
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#28
def render(&block); end
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#73
def to_s; end
private
# delegates view helper methods to @template
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#81
def method_missing(name, *args, &block); end
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#52
def relevant_pages(options); end
end
# Wraps a "page number" and provides some utility methods
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#87
class Kaminari::Helpers::Paginator::PageProxy
include ::Comparable
# @return [PageProxy] a new instance of PageProxy
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#90
def initialize(options, page, last); end
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#177
def +(other); end
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#181
def -(other); end
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#185
def <=>(other); end
# current page or not
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#100
def current?; end
# Should we display the link tag?
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#165
def display_tag?; end
# the first page or not
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#105
def first?; end
# inside the inner window or not
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#144
def inside_window?; end
# the last page or not
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#110
def last?; end
# within the left outer window or not
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#134
def left_outer?; end
# the next page or not
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#120
def next?; end
# the page number
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#95
def number; end
# The page number exceeds the range of pages or not
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#155
def out_of_range?; end
# the previous page or not
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#115
def prev?; end
# relationship with the current page
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#125
def rel; end
# within the right outer window or not
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#139
def right_outer?; end
# Current page is an isolated gap or not
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#149
def single_gap?; end
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#169
def to_i; end
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#173
def to_s; end
# The last rendered tag was "truncated" or not
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/helpers/paginator.rb#160
def was_truncated?; end
end
# The "previous" page of the current page
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#119
class Kaminari::Helpers::PrevPage < ::Kaminari::Helpers::Tag
include ::Kaminari::Helpers::Link
# TODO: Remove this initializer before 1.3.0.
#
# @return [PrevPage] a new instance of PrevPage
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#123
def initialize(template, params: T.unsafe(nil), param_name: T.unsafe(nil), theme: T.unsafe(nil), views_prefix: T.unsafe(nil), **options); end
# source://kaminari-core//lib/kaminari/helpers/tags.rb#134
def page; end
end
# A tag stands for an HTML tag inside the paginator.
# Basically, a tag has its own partial template file, so every tag can be
# rendered into String using its partial template.
#
# The template file should be placed in your app/views/kaminari/ directory
# with underscored class name (besides the "Tag" class. Tag is an abstract
# class, so _tag partial is not needed).
# e.g.) PrevLink -> app/views/kaminari/_prev_link.html.erb
#
# When no matching templates were found in your app, the engine's pre
# installed template will be used.
# e.g.) Paginator -> $GEM_HOME/kaminari-x.x.x/app/views/kaminari/_paginator.html.erb
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#19
class Kaminari::Helpers::Tag
# @return [Tag] a new instance of Tag
#
# source://kaminari-core//lib/kaminari/helpers/tags.rb#20
def initialize(template, params: T.unsafe(nil), param_name: T.unsafe(nil), theme: T.unsafe(nil), views_prefix: T.unsafe(nil), **options); end
# source://kaminari-core//lib/kaminari/helpers/tags.rb#36
def page_url_for(page); end
# source://kaminari-core//lib/kaminari/helpers/tags.rb#31
def to_s(locals = T.unsafe(nil)); end
private
# source://kaminari-core//lib/kaminari/helpers/tags.rb#44
def params_for(page); end
# source://kaminari-core//lib/kaminari/helpers/tags.rb#63
def partial_path; end
end
# The Kaminari::Helpers::UrlHelper module provides useful methods for
# generating a path or url to a particular page. A class must implement the
# following methods:
#
# * <tt>url_for</tt>: A method that generates an actual path
# * <tt>params</tt>: A method that returns query string parameters
# * <tt>request</tt>: A method that returns a Rack::Request object
#
# A normal Rails controller implements all the methods, which make it
# trivial to use this module:
#
# ==== Examples
#
# class UsersController < ApplicationController
# include Kaminari::Helpers::UrlHelper
#
# def index
# @users = User.page(1)
#
# path_to_next_page(@items)
# # => /items?page=2
# end
# end
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#30
module Kaminari::Helpers::UrlHelper
# A helper that calculates the path to the next page.
#
# ==== Examples
# Basic usage:
#
# <%= path_to_next_page @items %>
# #-> /items?page=2
#
# It will return `nil` if there is no next page.
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#76
def next_page_path(scope, options = T.unsafe(nil)); end
# A helper that calculates the url to the next page.
#
# ==== Examples
# Basic usage:
#
# <%= next_page_url @items %>
# #-> http://www.example.org/items?page=2
#
# It will return `nil` if there is no next page.
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#41
def next_page_url(scope, options = T.unsafe(nil)); end
# A helper that calculates the path to the next page.
#
# ==== Examples
# Basic usage:
#
# <%= path_to_next_page @items %>
# #-> /items?page=2
#
# It will return `nil` if there is no next page.
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#76
def path_to_next_page(scope, options = T.unsafe(nil)); end
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#46
def path_to_next_url(scope, options = T.unsafe(nil)); end
# A helper that calculates the path to the previous page.
#
# ==== Examples
# Basic usage:
#
# <%= path_to_prev_page @items %>
# #-> /items
#
# It will return `nil` if there is no previous page.
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#90
def path_to_prev_page(scope, options = T.unsafe(nil)); end
# A helper that calculates the path to the previous page.
#
# ==== Examples
# Basic usage:
#
# <%= path_to_prev_page @items %>
# #-> /items
#
# It will return `nil` if there is no previous page.
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#90
def path_to_previous_page(scope, options = T.unsafe(nil)); end
# A helper that calculates the path to the previous page.
#
# ==== Examples
# Basic usage:
#
# <%= path_to_prev_page @items %>
# #-> /items
#
# It will return `nil` if there is no previous page.
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#90
def prev_page_path(scope, options = T.unsafe(nil)); end
# A helper that calculates the url to the previous page.
#
# ==== Examples
# Basic usage:
#
# <%= prev_page_url @items %>
# #-> http://www.example.org/items
#
# It will return `nil` if there is no previous page.
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#60
def prev_page_url(scope, options = T.unsafe(nil)); end
# A helper that calculates the path to the previous page.
#
# ==== Examples
# Basic usage:
#
# <%= path_to_prev_page @items %>
# #-> /items
#
# It will return `nil` if there is no previous page.
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#90
def previous_page_path(scope, options = T.unsafe(nil)); end
# A helper that calculates the url to the previous page.
#
# ==== Examples
# Basic usage:
#
# <%= prev_page_url @items %>
# #-> http://www.example.org/items
#
# It will return `nil` if there is no previous page.
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#60
def previous_page_url(scope, options = T.unsafe(nil)); end
# A helper that calculates the url to the next page.
#
# ==== Examples
# Basic usage:
#
# <%= next_page_url @items %>
# #-> http://www.example.org/items?page=2
#
# It will return `nil` if there is no next page.
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#41
def url_to_next_page(scope, options = T.unsafe(nil)); end
# A helper that calculates the url to the previous page.
#
# ==== Examples
# Basic usage:
#
# <%= prev_page_url @items %>
# #-> http://www.example.org/items
#
# It will return `nil` if there is no previous page.
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#60
def url_to_prev_page(scope, options = T.unsafe(nil)); end
# A helper that calculates the url to the previous page.
#
# ==== Examples
# Basic usage:
#
# <%= prev_page_url @items %>
# #-> http://www.example.org/items
#
# It will return `nil` if there is no previous page.
#
# source://kaminari-core//lib/kaminari/helpers/helper_methods.rb#60
def url_to_previous_page(scope, options = T.unsafe(nil)); end
end
# source://kaminari-core//lib/kaminari/models/page_scope_methods.rb#4
module Kaminari::PageScopeMethods
# Current page number
#
# source://kaminari-core//lib/kaminari/models/page_scope_methods.rb#47
def current_page; end
# Current per-page number
#
# source://kaminari-core//lib/kaminari/models/page_scope_methods.rb#58
def current_per_page; end
# First page of the collection?
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/models/page_scope_methods.rb#77
def first_page?; end
# Last page of the collection?
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/models/page_scope_methods.rb#82
def last_page?; end
# source://kaminari-core//lib/kaminari/models/page_scope_methods.rb#21
def max_paginates_per(new_max_per_page); end
# Next page number in the collection
#
# source://kaminari-core//lib/kaminari/models/page_scope_methods.rb#67
def next_page; end
# Out of range of the collection?
#
# @return [Boolean]
#
# source://kaminari-core//lib/kaminari/models/page_scope_methods.rb#87
def out_of_range?; end
# @raise [ArgumentError]
#
# source://kaminari-core//lib/kaminari/models/page_scope_methods.rb#27
def padding(num); end
# Specify the <tt>per_page</tt> value for the preceding <tt>page</tt> scope
# Model.page(3).per(10)
#
# source://kaminari-core//lib/kaminari/models/page_scope_methods.rb#7
def per(num, max_per_page: T.unsafe(nil)); end
# Previous page number in the collection
#
# source://kaminari-core//lib/kaminari/models/page_scope_methods.rb#72
def prev_page; end
# Total number of pages
#
# source://kaminari-core//lib/kaminari/models/page_scope_methods.rb#35
def total_pages; end
end
# Kind of Array that can paginate
#
# source://kaminari-core//lib/kaminari/models/array_extension.rb#6
class Kaminari::PaginatableArray < ::Array
include ::Kaminari::ConfigurationMethods::ClassMethods
# ==== Options
# * <tt>:limit</tt> - limit
# * <tt>:offset</tt> - offset
# * <tt>:total_count</tt> - total_count
# * <tt>:padding</tt> - padding
#
# @return [PaginatableArray] a new instance of PaginatableArray
#
# source://kaminari-core//lib/kaminari/models/array_extension.rb#18
def initialize(original_array = T.unsafe(nil), limit: T.unsafe(nil), offset: T.unsafe(nil), total_count: T.unsafe(nil), padding: T.unsafe(nil)); end
# Used for page_entry_info
#
# source://kaminari-core//lib/kaminari/models/array_extension.rb#37
def entry_name(options = T.unsafe(nil)); end
# returns another chunk of the original array
#
# source://kaminari-core//lib/kaminari/models/array_extension.rb#49
def limit(num); end
# source://activesupport/7.2.2.1/lib/active_support/core_ext/module/attr_internal.rb#44
def limit_value; end
# source://activesupport/7.2.2.1/lib/active_support/core_ext/module/attr_internal.rb#44
def limit_value=(_arg0); end
# returns another chunk of the original array
#
# source://kaminari-core//lib/kaminari/models/array_extension.rb#59
def offset(num); end
# source://activesupport/7.2.2.1/lib/active_support/core_ext/module/attr_internal.rb#44
def offset_value; end
# source://activesupport/7.2.2.1/lib/active_support/core_ext/module/attr_internal.rb#44
def offset_value=(_arg0); end
# source://kaminari-core//lib/kaminari/models/array_extension.rb#43
def page(num = T.unsafe(nil)); end
# total item numbers of the original array
#
# source://kaminari-core//lib/kaminari/models/array_extension.rb#54
def total_count; end
end
# source://kaminari-core//lib/kaminari/models/array_extension.rb#9
Kaminari::PaginatableArray::ENTRY = T.let(T.unsafe(nil), String)
# source://kaminari-core//lib/kaminari/railtie.rb#5
class Kaminari::Railtie < ::Rails::Railtie; end
# source://kaminari-core//lib/kaminari/exceptions.rb#4
class Kaminari::ZeroPerPageOperation < ::ZeroDivisionError; end

9
sorbet/rbi/gems/kaminari@1.2.2.rbi generated Normal file
View File

@@ -0,0 +1,9 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `kaminari` gem.
# Please instead update this file by running `bin/tapioca gem kaminari`.
# THIS IS AN EMPTY RBI FILE.
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem

201
sorbet/rbi/gems/libmf@0.4.0.rbi generated Normal file
View File

@@ -0,0 +1,201 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `libmf` gem.
# Please instead update this file by running `bin/tapioca gem libmf`.
# source://libmf//lib/libmf/matrix.rb#1
module Libmf
class << self
# Returns the value of attribute ffi_lib.
#
# source://libmf//lib/libmf.rb#13
def ffi_lib; end
# Sets the attribute ffi_lib
#
# @param value the value to set the attribute ffi_lib to.
#
# source://libmf//lib/libmf.rb#13
def ffi_lib=(_arg0); end
end
end
# source://libmf//lib/libmf.rb#10
class Libmf::Error < ::StandardError; end
# source://libmf//lib/libmf/ffi.rb#2
module Libmf::FFI
extend ::FFI::Library
def calc_accuracy(*_arg0); end
def calc_auc(*_arg0); end
def calc_gkl(*_arg0); end
def calc_logloss(*_arg0); end
def calc_mae(*_arg0); end
def calc_mpr(*_arg0); end
def calc_rmse(*_arg0); end
def mf_cross_validation(*_arg0); end
def mf_destroy_model(*_arg0); end
def mf_get_default_param(*_arg0); end
def mf_load_model(*_arg0); end
def mf_predict(*_arg0); end
def mf_read_problem(*_arg0); end
def mf_save_model(*_arg0); end
def mf_train(*_arg0); end
def mf_train_with_validation(*_arg0); end
class << self
def calc_accuracy(*_arg0); end
def calc_auc(*_arg0); end
def calc_gkl(*_arg0); end
def calc_logloss(*_arg0); end
def calc_mae(*_arg0); end
def calc_mpr(*_arg0); end
def calc_rmse(*_arg0); end
def mf_cross_validation(*_arg0); end
def mf_destroy_model(*_arg0); end
def mf_get_default_param(*_arg0); end
def mf_load_model(*_arg0); end
def mf_predict(*_arg0); end
def mf_read_problem(*_arg0); end
def mf_save_model(*_arg0); end
def mf_train(*_arg0); end
def mf_train_with_validation(*_arg0); end
end
end
# source://libmf//lib/libmf/ffi.rb#38
class Libmf::FFI::Model < ::FFI::Struct
class << self
# source://libmf//lib/libmf/ffi.rb#47
def release(pointer); end
end
end
# source://libmf//lib/libmf/ffi.rb#7
class Libmf::FFI::Node < ::FFI::Struct; end
# source://libmf//lib/libmf/ffi.rb#20
class Libmf::FFI::Parameter < ::FFI::Struct; end
# source://libmf//lib/libmf/ffi.rb#13
class Libmf::FFI::Problem < ::FFI::Struct; end
# source://libmf//lib/libmf/matrix.rb#2
class Libmf::Matrix
# @return [Matrix] a new instance of Matrix
#
# source://libmf//lib/libmf/matrix.rb#5
def initialize; end
# Returns the value of attribute data.
#
# source://libmf//lib/libmf/matrix.rb#3
def data; end
# source://libmf//lib/libmf/matrix.rb#9
def push(row_index, column_index, value); end
end
# source://libmf//lib/libmf/model.rb#2
class Libmf::Model
# @return [Model] a new instance of Model
#
# source://libmf//lib/libmf/model.rb#3
def initialize(**options); end
# source://libmf//lib/libmf/model.rb#91
def accuracy(data); end
# source://libmf//lib/libmf/model.rb#99
def auc(data, transpose); end
# source://libmf//lib/libmf/model.rb#63
def bias; end
# source://libmf//lib/libmf/model.rb#55
def columns; end
# @raise [Error]
#
# source://libmf//lib/libmf/model.rb#26
def cv(data, folds: T.unsafe(nil)); end
# source://libmf//lib/libmf/model.rb#59
def factors; end
# @raise [Error]
#
# source://libmf//lib/libmf/model.rb#7
def fit(data, eval_set: T.unsafe(nil)); end
# source://libmf//lib/libmf/model.rb#83
def gkl(data); end
# @raise [Error]
#
# source://libmf//lib/libmf/model.rb#46
def load_model(path); end
# source://libmf//lib/libmf/model.rb#87
def logloss(data); end
# source://libmf//lib/libmf/model.rb#79
def mae(data); end
# source://libmf//lib/libmf/model.rb#95
def mpr(data, transpose); end
# source://libmf//lib/libmf/model.rb#67
def p_factors(format: T.unsafe(nil)); end
# source://libmf//lib/libmf/model.rb#22
def predict(row, column); end
# source://libmf//lib/libmf/model.rb#71
def q_factors(format: T.unsafe(nil)); end
# source://libmf//lib/libmf/model.rb#75
def rmse(data); end
# source://libmf//lib/libmf/model.rb#51
def rows; end
# @raise [Error]
#
# source://libmf//lib/libmf/model.rb#34
def save(path); end
# @raise [Error]
#
# source://libmf//lib/libmf/model.rb#34
def save_model(path); end
private
# source://libmf//lib/libmf/model.rb#105
def _factors(ptr, n, format); end
# @raise [Error]
#
# source://libmf//lib/libmf/model.rb#161
def create_problem(data); end
# @raise [Error]
#
# source://libmf//lib/libmf/model.rb#116
def model; end
# source://libmf//lib/libmf/model.rb#121
def param; end
class << self
# source://libmf//lib/libmf/model.rb#40
def load(path); end
end
end
# source://libmf//lib/libmf/version.rb#2
Libmf::VERSION = T.let(T.unsafe(nil), String)

1206
sorbet/rbi/gems/listen@3.9.0.rbi generated Normal file

File diff suppressed because it is too large Load Diff

940
sorbet/rbi/gems/logger@1.6.4.rbi generated Normal file
View File

@@ -0,0 +1,940 @@
# typed: false
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `logger` gem.
# Please instead update this file by running `bin/tapioca gem logger`.
# \Class \Logger provides a simple but sophisticated logging utility that
# you can use to create one or more
# {event logs}[https://en.wikipedia.org/wiki/Logging_(software)#Event_logs]
# for your program.
# Each such log contains a chronological sequence of entries
# that provides a record of the program's activities.
#
# == About the Examples
#
# All examples on this page assume that \Logger has been required:
#
# require 'logger'
#
# == Synopsis
#
# Create a log with Logger.new:
#
# # Single log file.
# logger = Logger.new('t.log')
# # Size-based rotated logging: 3 10-megabyte files.
# logger = Logger.new('t.log', 3, 10485760)
# # Period-based rotated logging: daily (also allowed: 'weekly', 'monthly').
# logger = Logger.new('t.log', 'daily')
# # Log to an IO stream.
# logger = Logger.new($stdout)
#
# Add entries (level, message) with Logger#add:
#
# logger.add(Logger::DEBUG, 'Maximal debugging info')
# logger.add(Logger::INFO, 'Non-error information')
# logger.add(Logger::WARN, 'Non-error warning')
# logger.add(Logger::ERROR, 'Non-fatal error')
# logger.add(Logger::FATAL, 'Fatal error')
# logger.add(Logger::UNKNOWN, 'Most severe')
#
# Close the log with Logger#close:
#
# logger.close
#
# == Entries
#
# You can add entries with method Logger#add:
#
# logger.add(Logger::DEBUG, 'Maximal debugging info')
# logger.add(Logger::INFO, 'Non-error information')
# logger.add(Logger::WARN, 'Non-error warning')
# logger.add(Logger::ERROR, 'Non-fatal error')
# logger.add(Logger::FATAL, 'Fatal error')
# logger.add(Logger::UNKNOWN, 'Most severe')
#
# These shorthand methods also add entries:
#
# logger.debug('Maximal debugging info')
# logger.info('Non-error information')
# logger.warn('Non-error warning')
# logger.error('Non-fatal error')
# logger.fatal('Fatal error')
# logger.unknown('Most severe')
#
# When you call any of these methods,
# the entry may or may not be written to the log,
# depending on the entry's severity and on the log level;
# see {Log Level}[rdoc-ref:Logger@Log+Level]
#
# An entry always has:
#
# - A severity (the required argument to #add).
# - An automatically created timestamp.
#
# And may also have:
#
# - A message.
# - A program name.
#
# Example:
#
# logger = Logger.new($stdout)
# logger.add(Logger::INFO, 'My message.', 'mung')
# # => I, [2022-05-07T17:21:46.536234 #20536] INFO -- mung: My message.
#
# The default format for an entry is:
#
# "%s, [%s #%d] %5s -- %s: %s\n"
#
# where the values to be formatted are:
#
# - \Severity (one letter).
# - Timestamp.
# - Process id.
# - \Severity (word).
# - Program name.
# - Message.
#
# You can use a different entry format by:
#
# - Setting a custom format proc (affects following entries);
# see {formatter=}[Logger.html#attribute-i-formatter].
# - Calling any of the methods above with a block
# (affects only the one entry).
# Doing so can have two benefits:
#
# - Context: the block can evaluate the entire program context
# and create a context-dependent message.
# - Performance: the block is not evaluated unless the log level
# permits the entry actually to be written:
#
# logger.error { my_slow_message_generator }
#
# Contrast this with the string form, where the string is
# always evaluated, regardless of the log level:
#
# logger.error("#{my_slow_message_generator}")
#
# === \Severity
#
# The severity of a log entry has two effects:
#
# - Determines whether the entry is selected for inclusion in the log;
# see {Log Level}[rdoc-ref:Logger@Log+Level].
# - Indicates to any log reader (whether a person or a program)
# the relative importance of the entry.
#
# === Timestamp
#
# The timestamp for a log entry is generated automatically
# when the entry is created.
#
# The logged timestamp is formatted by method
# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime]
# using this format string:
#
# '%Y-%m-%dT%H:%M:%S.%6N'
#
# Example:
#
# logger = Logger.new($stdout)
# logger.add(Logger::INFO)
# # => I, [2022-05-07T17:04:32.318331 #20536] INFO -- : nil
#
# You can set a different format using method #datetime_format=.
#
# === Message
#
# The message is an optional argument to an entry method:
#
# logger = Logger.new($stdout)
# logger.add(Logger::INFO, 'My message')
# # => I, [2022-05-07T18:15:37.647581 #20536] INFO -- : My message
#
# For the default entry formatter, <tt>Logger::Formatter</tt>,
# the message object may be:
#
# - A string: used as-is.
# - An Exception: <tt>message.message</tt> is used.
# - Anything else: <tt>message.inspect</tt> is used.
#
# *Note*: Logger::Formatter does not escape or sanitize
# the message passed to it.
# Developers should be aware that malicious data (user input)
# may be in the message, and should explicitly escape untrusted data.
#
# You can use a custom formatter to escape message data;
# see the example at {formatter=}[Logger.html#attribute-i-formatter].
#
# === Program Name
#
# The program name is an optional argument to an entry method:
#
# logger = Logger.new($stdout)
# logger.add(Logger::INFO, 'My message', 'mung')
# # => I, [2022-05-07T18:17:38.084716 #20536] INFO -- mung: My message
#
# The default program name for a new logger may be set in the call to
# Logger.new via optional keyword argument +progname+:
#
# logger = Logger.new('t.log', progname: 'mung')
#
# The default program name for an existing logger may be set
# by a call to method #progname=:
#
# logger.progname = 'mung'
#
# The current program name may be retrieved with method
# {progname}[Logger.html#attribute-i-progname]:
#
# logger.progname # => "mung"
#
# == Log Level
#
# The log level setting determines whether an entry is actually
# written to the log, based on the entry's severity.
#
# These are the defined severities (least severe to most severe):
#
# logger = Logger.new($stdout)
# logger.add(Logger::DEBUG, 'Maximal debugging info')
# # => D, [2022-05-07T17:57:41.776220 #20536] DEBUG -- : Maximal debugging info
# logger.add(Logger::INFO, 'Non-error information')
# # => I, [2022-05-07T17:59:14.349167 #20536] INFO -- : Non-error information
# logger.add(Logger::WARN, 'Non-error warning')
# # => W, [2022-05-07T18:00:45.337538 #20536] WARN -- : Non-error warning
# logger.add(Logger::ERROR, 'Non-fatal error')
# # => E, [2022-05-07T18:02:41.592912 #20536] ERROR -- : Non-fatal error
# logger.add(Logger::FATAL, 'Fatal error')
# # => F, [2022-05-07T18:05:24.703931 #20536] FATAL -- : Fatal error
# logger.add(Logger::UNKNOWN, 'Most severe')
# # => A, [2022-05-07T18:07:54.657491 #20536] ANY -- : Most severe
#
# The default initial level setting is Logger::DEBUG, the lowest level,
# which means that all entries are to be written, regardless of severity:
#
# logger = Logger.new($stdout)
# logger.level # => 0
# logger.add(0, "My message")
# # => D, [2022-05-11T15:10:59.773668 #20536] DEBUG -- : My message
#
# You can specify a different setting in a new logger
# using keyword argument +level+ with an appropriate value:
#
# logger = Logger.new($stdout, level: Logger::ERROR)
# logger = Logger.new($stdout, level: 'error')
# logger = Logger.new($stdout, level: :error)
# logger.level # => 3
#
# With this level, entries with severity Logger::ERROR and higher
# are written, while those with lower severities are not written:
#
# logger = Logger.new($stdout, level: Logger::ERROR)
# logger.add(3)
# # => E, [2022-05-11T15:17:20.933362 #20536] ERROR -- : nil
# logger.add(2) # Silent.
#
# You can set the log level for an existing logger
# with method #level=:
#
# logger.level = Logger::ERROR
#
# These shorthand methods also set the level:
#
# logger.debug! # => 0
# logger.info! # => 1
# logger.warn! # => 2
# logger.error! # => 3
# logger.fatal! # => 4
#
# You can retrieve the log level with method #level.
#
# logger.level = Logger::ERROR
# logger.level # => 3
#
# These methods return whether a given
# level is to be written:
#
# logger.level = Logger::ERROR
# logger.debug? # => false
# logger.info? # => false
# logger.warn? # => false
# logger.error? # => true
# logger.fatal? # => true
#
# == Log File Rotation
#
# By default, a log file is a single file that grows indefinitely
# (until explicitly closed); there is no file rotation.
#
# To keep log files to a manageable size,
# you can use _log_ _file_ _rotation_, which uses multiple log files:
#
# - Each log file has entries for a non-overlapping
# time interval.
# - Only the most recent log file is open and active;
# the others are closed and inactive.
#
# === Size-Based Rotation
#
# For size-based log file rotation, call Logger.new with:
#
# - Argument +logdev+ as a file path.
# - Argument +shift_age+ with a positive integer:
# the number of log files to be in the rotation.
# - Argument +shift_size+ as a positive integer:
# the maximum size (in bytes) of each log file;
# defaults to 1048576 (1 megabyte).
#
# Examples:
#
# logger = Logger.new('t.log', 3) # Three 1-megabyte files.
# logger = Logger.new('t.log', 5, 10485760) # Five 10-megabyte files.
#
# For these examples, suppose:
#
# logger = Logger.new('t.log', 3)
#
# Logging begins in the new log file, +t.log+;
# the log file is "full" and ready for rotation
# when a new entry would cause its size to exceed +shift_size+.
#
# The first time +t.log+ is full:
#
# - +t.log+ is closed and renamed to +t.log.0+.
# - A new file +t.log+ is opened.
#
# The second time +t.log+ is full:
#
# - +t.log.0 is renamed as +t.log.1+.
# - +t.log+ is closed and renamed to +t.log.0+.
# - A new file +t.log+ is opened.
#
# Each subsequent time that +t.log+ is full,
# the log files are rotated:
#
# - +t.log.1+ is removed.
# - +t.log.0 is renamed as +t.log.1+.
# - +t.log+ is closed and renamed to +t.log.0+.
# - A new file +t.log+ is opened.
#
# === Periodic Rotation
#
# For periodic rotation, call Logger.new with:
#
# - Argument +logdev+ as a file path.
# - Argument +shift_age+ as a string period indicator.
#
# Examples:
#
# logger = Logger.new('t.log', 'daily') # Rotate log files daily.
# logger = Logger.new('t.log', 'weekly') # Rotate log files weekly.
# logger = Logger.new('t.log', 'monthly') # Rotate log files monthly.
#
# Example:
#
# logger = Logger.new('t.log', 'daily')
#
# When the given period expires:
#
# - The base log file, +t.log+ is closed and renamed
# with a date-based suffix such as +t.log.20220509+.
# - A new log file +t.log+ is opened.
# - Nothing is removed.
#
# The default format for the suffix is <tt>'%Y%m%d'</tt>,
# which produces a suffix similar to the one above.
# You can set a different format using create-time option
# +shift_period_suffix+;
# see details and suggestions at
# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime].
#
# source://logger//lib/logger/version.rb#3
class Logger
include ::Logger::Severity
# :call-seq:
# Logger.new(logdev, shift_age = 0, shift_size = 1048576, **options)
#
# With the single argument +logdev+,
# returns a new logger with all default options:
#
# Logger.new('t.log') # => #<Logger:0x000001e685dc6ac8>
#
# Argument +logdev+ must be one of:
#
# - A string filepath: entries are to be written
# to the file at that path; if the file at that path exists,
# new entries are appended.
# - An IO stream (typically +$stdout+, +$stderr+. or an open file):
# entries are to be written to the given stream.
# - +nil+ or +File::NULL+: no entries are to be written.
#
# Examples:
#
# Logger.new('t.log')
# Logger.new($stdout)
#
# The keyword options are:
#
# - +level+: sets the log level; default value is Logger::DEBUG.
# See {Log Level}[rdoc-ref:Logger@Log+Level]:
#
# Logger.new('t.log', level: Logger::ERROR)
#
# - +progname+: sets the default program name; default is +nil+.
# See {Program Name}[rdoc-ref:Logger@Program+Name]:
#
# Logger.new('t.log', progname: 'mung')
#
# - +formatter+: sets the entry formatter; default is +nil+.
# See {formatter=}[Logger.html#attribute-i-formatter].
# - +datetime_format+: sets the format for entry timestamp;
# default is +nil+.
# See #datetime_format=.
# - +binmode+: sets whether the logger writes in binary mode;
# default is +false+.
# - +shift_period_suffix+: sets the format for the filename suffix
# for periodic log file rotation; default is <tt>'%Y%m%d'</tt>.
# See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation].
# - +reraise_write_errors+: An array of exception classes, which will
# be reraised if there is an error when writing to the log device.
# The default is to swallow all exceptions raised.
#
# @return [Logger] a new instance of Logger
#
# source://logger//lib/logger.rb#581
def initialize(logdev, shift_age = T.unsafe(nil), shift_size = T.unsafe(nil), level: T.unsafe(nil), progname: T.unsafe(nil), formatter: T.unsafe(nil), datetime_format: T.unsafe(nil), binmode: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), reraise_write_errors: T.unsafe(nil)); end
# Writes the given +msg+ to the log with no formatting;
# returns the number of characters written,
# or +nil+ if no log device exists:
#
# logger = Logger.new($stdout)
# logger << 'My message.' # => 10
#
# Output:
#
# My message.
#
# source://logger//lib/logger.rb#689
def <<(msg); end
# Creates a log entry, which may or may not be written to the log,
# depending on the entry's severity and on the log level.
# See {Log Level}[rdoc-ref:Logger@Log+Level]
# and {Entries}[rdoc-ref:Logger@Entries] for details.
#
# Examples:
#
# logger = Logger.new($stdout, progname: 'mung')
# logger.add(Logger::INFO)
# logger.add(Logger::ERROR, 'No good')
# logger.add(Logger::ERROR, 'No good', 'gnum')
#
# Output:
#
# I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung
# E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good
# E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good
#
# These convenience methods have implicit severity:
#
# - #debug.
# - #info.
# - #warn.
# - #error.
# - #fatal.
# - #unknown.
#
# source://logger//lib/logger.rb#656
def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end
# Closes the logger; returns +nil+:
#
# logger = Logger.new('t.log')
# logger.close # => nil
# logger.info('foo') # Prints "log writing failed. closed stream"
#
# Related: Logger#reopen.
#
# source://logger//lib/logger.rb#736
def close; end
# Returns the date-time format; see #datetime_format=.
#
# source://logger//lib/logger.rb#438
def datetime_format; end
# Sets the date-time format.
#
# Argument +datetime_format+ should be either of these:
#
# - A string suitable for use as a format for method
# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime].
# - +nil+: the logger uses <tt>'%Y-%m-%dT%H:%M:%S.%6N'</tt>.
#
# source://logger//lib/logger.rb#432
def datetime_format=(datetime_format); end
# Equivalent to calling #add with severity <tt>Logger::DEBUG</tt>.
#
# source://logger//lib/logger.rb#695
def debug(progname = T.unsafe(nil), &block); end
# Sets the log level to Logger::DEBUG.
# See {Log Level}[rdoc-ref:Logger@Log+Level].
#
# source://logger//lib/logger.rb#487
def debug!; end
# Returns +true+ if the log level allows entries with severity
# Logger::DEBUG to be written, +false+ otherwise.
# See {Log Level}[rdoc-ref:Logger@Log+Level].
#
# @return [Boolean]
#
# source://logger//lib/logger.rb#482
def debug?; end
# Equivalent to calling #add with severity <tt>Logger::ERROR</tt>.
#
# source://logger//lib/logger.rb#713
def error(progname = T.unsafe(nil), &block); end
# Sets the log level to Logger::ERROR.
# See {Log Level}[rdoc-ref:Logger@Log+Level].
#
# source://logger//lib/logger.rb#520
def error!; end
# Returns +true+ if the log level allows entries with severity
# Logger::ERROR to be written, +false+ otherwise.
# See {Log Level}[rdoc-ref:Logger@Log+Level].
#
# @return [Boolean]
#
# source://logger//lib/logger.rb#515
def error?; end
# Equivalent to calling #add with severity <tt>Logger::FATAL</tt>.
#
# source://logger//lib/logger.rb#719
def fatal(progname = T.unsafe(nil), &block); end
# Sets the log level to Logger::FATAL.
# See {Log Level}[rdoc-ref:Logger@Log+Level].
#
# source://logger//lib/logger.rb#531
def fatal!; end
# Returns +true+ if the log level allows entries with severity
# Logger::FATAL to be written, +false+ otherwise.
# See {Log Level}[rdoc-ref:Logger@Log+Level].
#
# @return [Boolean]
#
# source://logger//lib/logger.rb#526
def fatal?; end
# Sets or retrieves the logger entry formatter proc.
#
# When +formatter+ is +nil+, the logger uses Logger::Formatter.
#
# When +formatter+ is a proc, a new entry is formatted by the proc,
# which is called with four arguments:
#
# - +severity+: The severity of the entry.
# - +time+: A Time object representing the entry's timestamp.
# - +progname+: The program name for the entry.
# - +msg+: The message for the entry (string or string-convertible object).
#
# The proc should return a string containing the formatted entry.
#
# This custom formatter uses
# {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump]
# to escape the message string:
#
# logger = Logger.new($stdout, progname: 'mung')
# original_formatter = logger.formatter || Logger::Formatter.new
# logger.formatter = proc { |severity, time, progname, msg|
# original_formatter.call(severity, time, progname, msg.dump)
# }
# logger.add(Logger::INFO, "hello \n ''")
# logger.add(Logger::INFO, "\f\x00\xff\\\"")
#
# Output:
#
# I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''"
# I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\""
#
# source://logger//lib/logger.rb#473
def formatter; end
# Sets or retrieves the logger entry formatter proc.
#
# When +formatter+ is +nil+, the logger uses Logger::Formatter.
#
# When +formatter+ is a proc, a new entry is formatted by the proc,
# which is called with four arguments:
#
# - +severity+: The severity of the entry.
# - +time+: A Time object representing the entry's timestamp.
# - +progname+: The program name for the entry.
# - +msg+: The message for the entry (string or string-convertible object).
#
# The proc should return a string containing the formatted entry.
#
# This custom formatter uses
# {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump]
# to escape the message string:
#
# logger = Logger.new($stdout, progname: 'mung')
# original_formatter = logger.formatter || Logger::Formatter.new
# logger.formatter = proc { |severity, time, progname, msg|
# original_formatter.call(severity, time, progname, msg.dump)
# }
# logger.add(Logger::INFO, "hello \n ''")
# logger.add(Logger::INFO, "\f\x00\xff\\\"")
#
# Output:
#
# I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''"
# I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\""
#
# source://logger//lib/logger.rb#473
def formatter=(_arg0); end
# Equivalent to calling #add with severity <tt>Logger::INFO</tt>.
#
# source://logger//lib/logger.rb#701
def info(progname = T.unsafe(nil), &block); end
# Sets the log level to Logger::INFO.
# See {Log Level}[rdoc-ref:Logger@Log+Level].
#
# source://logger//lib/logger.rb#498
def info!; end
# Returns +true+ if the log level allows entries with severity
# Logger::INFO to be written, +false+ otherwise.
# See {Log Level}[rdoc-ref:Logger@Log+Level].
#
# @return [Boolean]
#
# source://logger//lib/logger.rb#493
def info?; end
# Logging severity threshold (e.g. <tt>Logger::INFO</tt>).
#
# source://logger//lib/logger.rb#383
def level; end
# Sets the log level; returns +severity+.
# See {Log Level}[rdoc-ref:Logger@Log+Level].
#
# Argument +severity+ may be an integer, a string, or a symbol:
#
# logger.level = Logger::ERROR # => 3
# logger.level = 3 # => 3
# logger.level = 'error' # => "error"
# logger.level = :error # => :error
#
# Logger#sev_threshold= is an alias for Logger#level=.
#
# source://logger//lib/logger.rb#399
def level=(severity); end
# Creates a log entry, which may or may not be written to the log,
# depending on the entry's severity and on the log level.
# See {Log Level}[rdoc-ref:Logger@Log+Level]
# and {Entries}[rdoc-ref:Logger@Entries] for details.
#
# Examples:
#
# logger = Logger.new($stdout, progname: 'mung')
# logger.add(Logger::INFO)
# logger.add(Logger::ERROR, 'No good')
# logger.add(Logger::ERROR, 'No good', 'gnum')
#
# Output:
#
# I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung
# E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good
# E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good
#
# These convenience methods have implicit severity:
#
# - #debug.
# - #info.
# - #warn.
# - #error.
# - #fatal.
# - #unknown.
#
# source://logger//lib/logger.rb#656
def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end
# Program name to include in log messages.
#
# source://logger//lib/logger.rb#422
def progname; end
# Program name to include in log messages.
#
# source://logger//lib/logger.rb#422
def progname=(_arg0); end
# Sets the logger's output stream:
#
# - If +logdev+ is +nil+, reopens the current output stream.
# - If +logdev+ is a filepath, opens the indicated file for append.
# - If +logdev+ is an IO stream
# (usually <tt>$stdout</tt>, <tt>$stderr</tt>, or an open File object),
# opens the stream for append.
#
# Example:
#
# logger = Logger.new('t.log')
# logger.add(Logger::ERROR, 'one')
# logger.close
# logger.add(Logger::ERROR, 'two') # Prints 'log writing failed. closed stream'
# logger.reopen
# logger.add(Logger::ERROR, 'three')
# logger.close
# File.readlines('t.log')
# # =>
# # ["# Logfile created on 2022-05-12 14:21:19 -0500 by logger.rb/v1.5.0\n",
# # "E, [2022-05-12T14:21:27.596726 #22428] ERROR -- : one\n",
# # "E, [2022-05-12T14:23:05.847241 #22428] ERROR -- : three\n"]
#
# source://logger//lib/logger.rb#624
def reopen(logdev = T.unsafe(nil)); end
# Logging severity threshold (e.g. <tt>Logger::INFO</tt>).
#
# source://logger//lib/logger.rb#383
def sev_threshold; end
# Sets the log level; returns +severity+.
# See {Log Level}[rdoc-ref:Logger@Log+Level].
#
# Argument +severity+ may be an integer, a string, or a symbol:
#
# logger.level = Logger::ERROR # => 3
# logger.level = 3 # => 3
# logger.level = 'error' # => "error"
# logger.level = :error # => :error
#
# Logger#sev_threshold= is an alias for Logger#level=.
#
# source://logger//lib/logger.rb#399
def sev_threshold=(severity); end
# Equivalent to calling #add with severity <tt>Logger::UNKNOWN</tt>.
#
# source://logger//lib/logger.rb#725
def unknown(progname = T.unsafe(nil), &block); end
# Equivalent to calling #add with severity <tt>Logger::WARN</tt>.
#
# source://logger//lib/logger.rb#707
def warn(progname = T.unsafe(nil), &block); end
# Sets the log level to Logger::WARN.
# See {Log Level}[rdoc-ref:Logger@Log+Level].
#
# source://logger//lib/logger.rb#509
def warn!; end
# Returns +true+ if the log level allows entries with severity
# Logger::WARN to be written, +false+ otherwise.
# See {Log Level}[rdoc-ref:Logger@Log+Level].
#
# @return [Boolean]
#
# source://logger//lib/logger.rb#504
def warn?; end
# Adjust the log level during the block execution for the current Fiber only
#
# logger.with_level(:debug) do
# logger.debug { "Hello" }
# end
#
# source://logger//lib/logger.rb#408
def with_level(severity); end
private
# source://logger//lib/logger.rb#758
def format_message(severity, datetime, progname, msg); end
# source://logger//lib/logger.rb#745
def format_severity(severity); end
# source://logger//lib/logger.rb#754
def level_key; end
# Guarantee the existence of this ivar even when subclasses don't call the superclass constructor.
#
# source://logger//lib/logger.rb#750
def level_override; end
end
# Default formatter for log messages.
#
# source://logger//lib/logger/formatter.rb#5
class Logger::Formatter
# @return [Formatter] a new instance of Formatter
#
# source://logger//lib/logger/formatter.rb#11
def initialize; end
# source://logger//lib/logger/formatter.rb#15
def call(severity, time, progname, msg); end
# Returns the value of attribute datetime_format.
#
# source://logger//lib/logger/formatter.rb#9
def datetime_format; end
# Sets the attribute datetime_format
#
# @param value the value to set the attribute datetime_format to.
#
# source://logger//lib/logger/formatter.rb#9
def datetime_format=(_arg0); end
private
# source://logger//lib/logger/formatter.rb#21
def format_datetime(time); end
# source://logger//lib/logger/formatter.rb#25
def msg2str(msg); end
end
# source://logger//lib/logger/formatter.rb#7
Logger::Formatter::DatetimeFormat = T.let(T.unsafe(nil), String)
# source://logger//lib/logger/formatter.rb#6
Logger::Formatter::Format = T.let(T.unsafe(nil), String)
# Device used for logging messages.
#
# source://logger//lib/logger/log_device.rb#7
class Logger::LogDevice
include ::Logger::Period
include ::MonitorMixin
# @return [LogDevice] a new instance of LogDevice
#
# source://logger//lib/logger/log_device.rb#14
def initialize(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil), reraise_write_errors: T.unsafe(nil)); end
# source://logger//lib/logger/log_device.rb#43
def close; end
# Returns the value of attribute dev.
#
# source://logger//lib/logger/log_device.rb#10
def dev; end
# Returns the value of attribute filename.
#
# source://logger//lib/logger/log_device.rb#11
def filename; end
# source://logger//lib/logger/log_device.rb#53
def reopen(log = T.unsafe(nil)); end
# source://logger//lib/logger/log_device.rb#32
def write(message); end
private
# source://logger//lib/logger/log_device.rb#143
def add_log_header(file); end
# source://logger//lib/logger/log_device.rb#149
def check_shift_log; end
# source://logger//lib/logger/log_device.rb#119
def create_logfile(filename); end
# source://logger//lib/logger/log_device.rb#91
def fixup_mode(dev, filename); end
# source://logger//lib/logger/log_device.rb#135
def handle_write_errors(mesg); end
# source://logger//lib/logger/log_device.rb#164
def lock_shift_log; end
# source://logger//lib/logger/log_device.rb#106
def open_logfile(filename); end
# source://logger//lib/logger/log_device.rb#76
def set_dev(log); end
# source://logger//lib/logger/log_device.rb#193
def shift_log_age; end
# source://logger//lib/logger/log_device.rb#205
def shift_log_period(period_end); end
end
# :stopdoc:
#
# source://logger//lib/logger/log_device.rb#72
Logger::LogDevice::MODE = T.let(T.unsafe(nil), Integer)
# source://logger//lib/logger/log_device.rb#74
Logger::LogDevice::MODE_TO_CREATE = T.let(T.unsafe(nil), Integer)
# source://logger//lib/logger/log_device.rb#73
Logger::LogDevice::MODE_TO_OPEN = T.let(T.unsafe(nil), Integer)
# source://logger//lib/logger/period.rb#4
module Logger::Period
private
# source://logger//lib/logger/period.rb#9
def next_rotate_time(now, shift_age); end
# source://logger//lib/logger/period.rb#31
def previous_period_end(now, shift_age); end
class << self
# source://logger//lib/logger/period.rb#9
def next_rotate_time(now, shift_age); end
# source://logger//lib/logger/period.rb#31
def previous_period_end(now, shift_age); end
end
end
# source://logger//lib/logger/period.rb#7
Logger::Period::SiD = T.let(T.unsafe(nil), Integer)
# \Severity label for logging (max 5 chars).
#
# source://logger//lib/logger.rb#743
Logger::SEV_LABEL = T.let(T.unsafe(nil), Array)
# Logging severity.
#
# source://logger//lib/logger/severity.rb#5
module Logger::Severity
class << self
# source://logger//lib/logger/severity.rb#29
def coerce(severity); end
end
end
# source://logger//lib/logger/severity.rb#19
Logger::Severity::LEVELS = T.let(T.unsafe(nil), Hash)

1081
sorbet/rbi/gems/loofah@2.23.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

8658
sorbet/rbi/gems/mail@2.8.1.rbi generated Normal file

File diff suppressed because it is too large Load Diff

239
sorbet/rbi/gems/marcel@1.0.4.rbi generated Normal file
View File

@@ -0,0 +1,239 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `marcel` gem.
# Please instead update this file by running `bin/tapioca gem marcel`.
# This file is auto-generated. Instead of editing this file, please
# add MIMEs to data/custom.xml or lib/marcel/mime_type/definitions.rb.
#
# source://marcel//lib/marcel.rb#3
module Marcel; end
# @private
#
# source://marcel//lib/marcel/tables.rb#9
Marcel::EXTENSIONS = T.let(T.unsafe(nil), Hash)
# @private
#
# source://marcel//lib/marcel/tables.rb#2394
Marcel::MAGIC = T.let(T.unsafe(nil), Array)
# Mime type detection
#
# source://marcel//lib/marcel/magic.rb#12
class Marcel::Magic
# Mime type by type string
#
# @return [Magic] a new instance of Magic
#
# source://marcel//lib/marcel/magic.rb#16
def initialize(type); end
# Allow comparison with string
#
# @return [Boolean]
#
# source://marcel//lib/marcel/magic.rb#103
def ==(other); end
# @return [Boolean]
#
# source://marcel//lib/marcel/magic.rb#54
def audio?; end
# Returns true if type is child of parent type
#
# @return [Boolean]
#
# source://marcel//lib/marcel/magic.rb#58
def child_of?(parent); end
# Get mime comment
#
# source://marcel//lib/marcel/magic.rb#68
def comment; end
# Allow comparison with string
#
# @return [Boolean]
#
# source://marcel//lib/marcel/magic.rb#103
def eql?(other); end
# Get string list of file extensions
#
# source://marcel//lib/marcel/magic.rb#63
def extensions; end
# source://marcel//lib/marcel/magic.rb#107
def hash; end
# Mediatype shortcuts
#
# @return [Boolean]
#
# source://marcel//lib/marcel/magic.rb#53
def image?; end
# Returns the value of attribute mediatype.
#
# source://marcel//lib/marcel/magic.rb#13
def mediatype; end
# Returns the value of attribute subtype.
#
# source://marcel//lib/marcel/magic.rb#13
def subtype; end
# Returns true if type is a text format
#
# @return [Boolean]
#
# source://marcel//lib/marcel/magic.rb#50
def text?; end
# Return type as string
#
# source://marcel//lib/marcel/magic.rb#98
def to_s; end
# Returns the value of attribute type.
#
# source://marcel//lib/marcel/magic.rb#13
def type; end
# @return [Boolean]
#
# source://marcel//lib/marcel/magic.rb#55
def video?; end
class << self
# Add custom mime type. Arguments:
# * <i>type</i>: Mime type
# * <i>options</i>: Options hash
#
# Option keys:
# * <i>:extensions</i>: String list or single string of file extensions
# * <i>:parents</i>: String list or single string of parent mime types
# * <i>:magic</i>: Mime magic specification
# * <i>:comment</i>: Comment string
#
# source://marcel//lib/marcel/magic.rb#30
def add(type, options); end
# Lookup all mime types by magic content analysis.
# This is a slower operation.
#
# source://marcel//lib/marcel/magic.rb#93
def all_by_magic(io); end
# Lookup mime type by file extension
#
# source://marcel//lib/marcel/magic.rb#73
def by_extension(ext); end
# Lookup mime type by magic content analysis.
# This is a slow operation.
#
# source://marcel//lib/marcel/magic.rb#86
def by_magic(io); end
# Lookup mime type by filename
#
# source://marcel//lib/marcel/magic.rb#80
def by_path(path); end
# @return [Boolean]
#
# source://marcel//lib/marcel/magic.rb#113
def child?(child, parent); end
# Removes a mime type from the dictionary. You might want to do this if
# you're seeing impossible conflicts (for instance, application/x-gmc-link).
# * <i>type</i>: The mime type to remove. All associated extensions and magic are removed too.
#
# source://marcel//lib/marcel/magic.rb#42
def remove(type); end
private
# source://marcel//lib/marcel/magic.rb#117
def magic_match(io, method); end
# source://marcel//lib/marcel/magic.rb#127
def magic_match_io(io, matches, buffer); end
end
end
# source://marcel//lib/marcel/mime_type.rb#4
class Marcel::MimeType
class << self
# source://marcel//lib/marcel/mime_type.rb#8
def extend(type, extensions: T.unsafe(nil), parents: T.unsafe(nil), magic: T.unsafe(nil)); end
# Returns the most appropriate content type for the given file.
#
# The first argument should be a +Pathname+ or an +IO+. If it is a +Pathname+, the specified
# file will be opened first.
#
# Optional parameters:
# * +name+: file name, if known
# * +extension+: file extension, if known
# * +declared_type+: MIME type, if known
#
# The most appropriate type is determined by the following:
# * type declared by binary magic number data
# * type declared by the first of file name, file extension, or declared MIME type
#
# If no type can be determined, then +application/octet-stream+ is returned.
#
# source://marcel//lib/marcel/mime_type.rb#29
def for(pathname_or_io = T.unsafe(nil), name: T.unsafe(nil), extension: T.unsafe(nil), declared_type: T.unsafe(nil)); end
private
# source://marcel//lib/marcel/mime_type.rb#36
def for_data(pathname_or_io); end
# source://marcel//lib/marcel/mime_type.rb#62
def for_declared_type(declared_type); end
# source://marcel//lib/marcel/mime_type.rb#54
def for_extension(extension); end
# source://marcel//lib/marcel/mime_type.rb#46
def for_name(name); end
# For some document types (notably Microsoft Office) we recognise the main content
# type with magic, but not the specific subclass. In this situation, if we can get a more
# specific class using either the name or declared_type, we should use that in preference
#
# source://marcel//lib/marcel/mime_type.rb#89
def most_specific_type(*candidates); end
# source://marcel//lib/marcel/mime_type.rb#79
def parse_media_type(content_type); end
# source://marcel//lib/marcel/mime_type.rb#71
def with_io(pathname_or_io, &block); end
end
end
# source://marcel//lib/marcel/mime_type.rb#5
Marcel::MimeType::BINARY = T.let(T.unsafe(nil), String)
# @private
#
# source://marcel//lib/marcel/tables.rb#1260
Marcel::TYPE_EXTS = T.let(T.unsafe(nil), Hash)
# Cooltalk Audio
#
# source://marcel//lib/marcel/tables.rb#2151
Marcel::TYPE_PARENTS = T.let(T.unsafe(nil), Hash)
# source://marcel//lib/marcel/version.rb#4
Marcel::VERSION = T.let(T.unsafe(nil), String)

1885
sorbet/rbi/gems/matrix@0.4.2.rbi generated Normal file

File diff suppressed because it is too large Load Diff

487
sorbet/rbi/gems/memory_profiler@1.1.0.rbi generated Normal file
View File

@@ -0,0 +1,487 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `memory_profiler` gem.
# Please instead update this file by running `bin/tapioca gem memory_profiler`.
# source://memory_profiler//lib/memory_profiler/version.rb#3
module MemoryProfiler
class << self
# source://memory_profiler//lib/memory_profiler.rb#15
def report(opts = T.unsafe(nil), &block); end
# source://memory_profiler//lib/memory_profiler.rb#19
def start(opts = T.unsafe(nil)); end
# source://memory_profiler//lib/memory_profiler.rb#26
def stop; end
end
end
# source://memory_profiler//lib/memory_profiler/cli.rb#6
class MemoryProfiler::CLI
# source://memory_profiler//lib/memory_profiler/cli.rb#17
def run(argv); end
private
# source://memory_profiler//lib/memory_profiler/cli.rb#54
def option_parser(options); end
# source://memory_profiler//lib/memory_profiler/cli.rb#134
def profile_command(options, argv); end
# source://memory_profiler//lib/memory_profiler/cli.rb#142
def serialize_hash(hash); end
end
# source://memory_profiler//lib/memory_profiler/cli.rb#7
MemoryProfiler::CLI::BIN_NAME = T.let(T.unsafe(nil), String)
# source://memory_profiler//lib/memory_profiler/cli.rb#13
MemoryProfiler::CLI::DEFAULTS = T.let(T.unsafe(nil), Hash)
# source://memory_profiler//lib/memory_profiler/cli.rb#11
MemoryProfiler::CLI::STATUS_ERROR = T.let(T.unsafe(nil), Integer)
# source://memory_profiler//lib/memory_profiler/cli.rb#10
MemoryProfiler::CLI::STATUS_SUCCESS = T.let(T.unsafe(nil), Integer)
# source://memory_profiler//lib/memory_profiler/cli.rb#8
MemoryProfiler::CLI::VERSION_INFO = T.let(T.unsafe(nil), String)
# source://memory_profiler//lib/memory_profiler/helpers.rb#4
class MemoryProfiler::Helpers
# @return [Helpers] a new instance of Helpers
#
# source://memory_profiler//lib/memory_profiler/helpers.rb#6
def initialize; end
# source://memory_profiler//lib/memory_profiler/helpers.rb#12
def guess_gem(path); end
# source://memory_profiler//lib/memory_profiler/helpers.rb#41
def lookup_class_name(klass); end
# source://memory_profiler//lib/memory_profiler/helpers.rb#27
def lookup_location(file, line); end
# source://memory_profiler//lib/memory_profiler/helpers.rb#45
def lookup_string(obj); end
# source://memory_profiler//lib/memory_profiler/helpers.rb#32
def object_class(obj); end
end
# source://memory_profiler//lib/memory_profiler/helpers.rb#31
MemoryProfiler::Helpers::KERNEL_CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
# source://memory_profiler//lib/memory_profiler/monochrome.rb#5
class MemoryProfiler::Monochrome
# source://memory_profiler//lib/memory_profiler/monochrome.rb#15
def line(text); end
# source://memory_profiler//lib/memory_profiler/monochrome.rb#7
def path(text); end
# source://memory_profiler//lib/memory_profiler/monochrome.rb#11
def string(text); end
end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#5
class MemoryProfiler::Polychrome
# source://memory_profiler//lib/memory_profiler/polychrome.rb#15
def line(text); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#7
def path(text); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#11
def string(text); end
private
# source://memory_profiler//lib/memory_profiler/polychrome.rb#53
def bg_black(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#69
def bg_blue(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#65
def bg_brown(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#77
def bg_cyan(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#81
def bg_gray(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#61
def bg_green(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#73
def bg_magenta(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#57
def bg_red(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#21
def black(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#37
def blue(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#85
def bold(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#33
def brown(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#45
def cyan(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#49
def gray(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#29
def green(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#41
def magenta(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#25
def red(str); end
# source://memory_profiler//lib/memory_profiler/polychrome.rb#89
def reverse_color(str); end
end
# Reporter is the top level API used for generating memory reports.
#
# @example Measure object allocation in a block
# report = Reporter.report(top: 50) do
# 5.times { "foo" }
# end
#
# source://memory_profiler//lib/memory_profiler/reporter.rb#11
class MemoryProfiler::Reporter
# @return [Reporter] a new instance of Reporter
#
# source://memory_profiler//lib/memory_profiler/reporter.rb#18
def initialize(opts = T.unsafe(nil)); end
# Returns the value of attribute generation.
#
# source://memory_profiler//lib/memory_profiler/reporter.rb#16
def generation; end
# Returns the value of attribute report_results.
#
# source://memory_profiler//lib/memory_profiler/reporter.rb#16
def report_results; end
# Collects object allocation and memory of ruby code inside of passed block.
#
# source://memory_profiler//lib/memory_profiler/reporter.rb#73
def run(&block); end
# source://memory_profiler//lib/memory_profiler/reporter.rb#36
def start; end
# source://memory_profiler//lib/memory_profiler/reporter.rb#45
def stop; end
# Returns the value of attribute top.
#
# source://memory_profiler//lib/memory_profiler/reporter.rb#16
def top; end
# Returns the value of attribute trace.
#
# source://memory_profiler//lib/memory_profiler/reporter.rb#16
def trace; end
private
# Iterates through objects in memory of a given generation.
# Stores results along with meta data of objects collected.
#
# source://memory_profiler//lib/memory_profiler/reporter.rb#90
def object_list(generation); end
class << self
# Returns the value of attribute current_reporter.
#
# source://memory_profiler//lib/memory_profiler/reporter.rb#13
def current_reporter; end
# Sets the attribute current_reporter
#
# @param value the value to set the attribute current_reporter to.
#
# source://memory_profiler//lib/memory_profiler/reporter.rb#13
def current_reporter=(_arg0); end
# Helper for generating new reporter and running against block.
#
# @option opts
# @option opts
# @option opts
# @option opts
# @param opts [Hash] the options to create a report with
# @return [MemoryProfiler::Results]
#
# source://memory_profiler//lib/memory_profiler/reporter.rb#32
def report(opts = T.unsafe(nil), &block); end
end
end
# source://memory_profiler//lib/memory_profiler/results.rb#4
class MemoryProfiler::Results
# @return [Results] a new instance of Results
#
# source://memory_profiler//lib/memory_profiler/results.rb#50
def initialize; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def allocated_memory_by_class; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def allocated_memory_by_file; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def allocated_memory_by_gem; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def allocated_memory_by_location; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def allocated_objects_by_class; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def allocated_objects_by_file; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def allocated_objects_by_gem; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def allocated_objects_by_location; end
# source://memory_profiler//lib/memory_profiler/results.rb#170
def normalize_path(path); end
# Output the results of the report
#
# @option opts
# @option opts
# @option opts
# @option opts
# @option opts
# @option opts
# @option opts
# @param options [Hash] the options for output
# @param opts [Hash] a customizable set of options
#
# source://memory_profiler//lib/memory_profiler/results.rb#123
def pretty_print(io = T.unsafe(nil), **options); end
# source://memory_profiler//lib/memory_profiler/results.rb#160
def print_string_reports(io, options); end
# source://memory_profiler//lib/memory_profiler/results.rb#56
def register_results(allocated, retained, top); end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def retained_memory_by_class; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def retained_memory_by_file; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def retained_memory_by_gem; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def retained_memory_by_location; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def retained_objects_by_class; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def retained_objects_by_file; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def retained_objects_by_gem; end
# source://memory_profiler//lib/memory_profiler/results.rb#28
def retained_objects_by_location; end
# source://memory_profiler//lib/memory_profiler/results.rb#77
def scale_bytes(bytes); end
# source://memory_profiler//lib/memory_profiler/results.rb#85
def string_report(data, top); end
# source://memory_profiler//lib/memory_profiler/results.rb#69
def strings_allocated; end
# Sets the attribute strings_allocated
#
# @param value the value to set the attribute strings_allocated to.
#
# source://memory_profiler//lib/memory_profiler/results.rb#46
def strings_allocated=(_arg0); end
# source://memory_profiler//lib/memory_profiler/results.rb#73
def strings_retained; end
# Sets the attribute strings_retained
#
# @param value the value to set the attribute strings_retained to.
#
# source://memory_profiler//lib/memory_profiler/results.rb#46
def strings_retained=(_arg0); end
# Returns the value of attribute total_allocated.
#
# source://memory_profiler//lib/memory_profiler/results.rb#47
def total_allocated; end
# Sets the attribute total_allocated
#
# @param value the value to set the attribute total_allocated to.
#
# source://memory_profiler//lib/memory_profiler/results.rb#47
def total_allocated=(_arg0); end
# Returns the value of attribute total_allocated_memsize.
#
# source://memory_profiler//lib/memory_profiler/results.rb#48
def total_allocated_memsize; end
# Sets the attribute total_allocated_memsize
#
# @param value the value to set the attribute total_allocated_memsize to.
#
# source://memory_profiler//lib/memory_profiler/results.rb#48
def total_allocated_memsize=(_arg0); end
# Returns the value of attribute total_retained.
#
# source://memory_profiler//lib/memory_profiler/results.rb#47
def total_retained; end
# Sets the attribute total_retained
#
# @param value the value to set the attribute total_retained to.
#
# source://memory_profiler//lib/memory_profiler/results.rb#47
def total_retained=(_arg0); end
# Returns the value of attribute total_retained_memsize.
#
# source://memory_profiler//lib/memory_profiler/results.rb#48
def total_retained_memsize; end
# Sets the attribute total_retained_memsize
#
# @param value the value to set the attribute total_retained_memsize to.
#
# source://memory_profiler//lib/memory_profiler/results.rb#48
def total_retained_memsize=(_arg0); end
private
# source://memory_profiler//lib/memory_profiler/results.rb#205
def dump_data(io, type, metric, name, options); end
# source://memory_profiler//lib/memory_profiler/results.rb#225
def dump_strings(io, type, options); end
# source://memory_profiler//lib/memory_profiler/results.rb#201
def print_output(io, topic, detail); end
# source://memory_profiler//lib/memory_profiler/results.rb#195
def print_title(io, title); end
# source://memory_profiler//lib/memory_profiler/results.rb#187
def total_memsize(stat_hash); end
class << self
# source://memory_profiler//lib/memory_profiler/results.rb#21
def register_type(name, stat_attribute); end
end
end
# source://memory_profiler//lib/memory_profiler/results.rb#18
MemoryProfiler::Results::METRICS = T.let(T.unsafe(nil), Array)
# source://memory_profiler//lib/memory_profiler/results.rb#19
MemoryProfiler::Results::NAMES = T.let(T.unsafe(nil), Array)
# source://memory_profiler//lib/memory_profiler/results.rb#17
MemoryProfiler::Results::TYPES = T.let(T.unsafe(nil), Array)
# source://memory_profiler//lib/memory_profiler/results.rb#5
MemoryProfiler::Results::UNIT_PREFIXES = T.let(T.unsafe(nil), Hash)
# source://memory_profiler//lib/memory_profiler/stat.rb#4
class MemoryProfiler::Stat
# @return [Stat] a new instance of Stat
#
# source://memory_profiler//lib/memory_profiler/stat.rb#8
def initialize(class_name, gem, file, location, memsize, string_value); end
# Returns the value of attribute class_name.
#
# source://memory_profiler//lib/memory_profiler/stat.rb#6
def class_name; end
# Returns the value of attribute file.
#
# source://memory_profiler//lib/memory_profiler/stat.rb#6
def file; end
# Returns the value of attribute gem.
#
# source://memory_profiler//lib/memory_profiler/stat.rb#6
def gem; end
# Returns the value of attribute location.
#
# source://memory_profiler//lib/memory_profiler/stat.rb#6
def location; end
# Returns the value of attribute memsize.
#
# source://memory_profiler//lib/memory_profiler/stat.rb#6
def memsize; end
# Returns the value of attribute string_value.
#
# source://memory_profiler//lib/memory_profiler/stat.rb#6
def string_value; end
end
# source://memory_profiler//lib/memory_profiler/stat_hash.rb#4
class MemoryProfiler::StatHash < ::Hash
include ::MemoryProfiler::TopN
end
# source://memory_profiler//lib/memory_profiler/top_n.rb#4
module MemoryProfiler::TopN
# Fast approach for determining the top_n entries in a Hash of Stat objects.
# Returns results for both memory (memsize summed) and objects allocated (count) as a tuple.
#
# source://memory_profiler//lib/memory_profiler/top_n.rb#7
def top_n(max, metric_method); end
# source://memory_profiler//lib/memory_profiler/top_n.rb#14
def top_n_memory(max, metric_method); end
# source://memory_profiler//lib/memory_profiler/top_n.rb#29
def top_n_objects(max, metric_method); end
end
# source://memory_profiler//lib/memory_profiler/version.rb#4
MemoryProfiler::VERSION = T.let(T.unsafe(nil), String)

304
sorbet/rbi/gems/method_source@1.1.0.rbi generated Normal file
View File

@@ -0,0 +1,304 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `method_source` gem.
# Please instead update this file by running `bin/tapioca gem method_source`.
# source://method_source//lib/method_source.rb#163
class Method
include ::MethodSource::SourceLocation::MethodExtensions
include ::MethodSource::MethodExtensions
end
# source://method_source//lib/method_source/version.rb#1
module MethodSource
extend ::MethodSource::CodeHelpers
class << self
# Clear cache.
#
# source://method_source//lib/method_source.rb#59
def clear_cache; end
# Helper method responsible for opening source file and buffering up
# the comments for a specified method. Defined here to avoid polluting
# `Method` class.
#
# @param source_location [Array] The array returned by Method#source_location
# @param method_name [String]
# @raise [SourceNotFoundError]
# @return [String] The comments up to the point of the method.
#
# source://method_source//lib/method_source.rb#38
def comment_helper(source_location, name = T.unsafe(nil)); end
# @deprecated — use MethodSource::CodeHelpers#expression_at
#
# source://method_source//lib/method_source.rb#71
def extract_code(source_location); end
# Load a memoized copy of the lines in a file.
#
# @param file_name [String]
# @param method_name [String]
# @raise [SourceNotFoundError]
# @return [Array<String>] the contents of the file
#
# source://method_source//lib/method_source.rb#51
def lines_for(file_name, name = T.unsafe(nil)); end
# Helper method responsible for extracting method body.
# Defined here to avoid polluting `Method` class.
#
# @param source_location [Array] The array returned by Method#source_location
# @param method_name [String]
# @return [String] The method body
#
# source://method_source//lib/method_source.rb#23
def source_helper(source_location, name = T.unsafe(nil)); end
# @deprecated — use MethodSource::CodeHelpers#complete_expression?
# @return [Boolean]
#
# source://method_source//lib/method_source.rb#64
def valid_expression?(str); end
end
end
# source://method_source//lib/method_source/code_helpers.rb#3
module MethodSource::CodeHelpers
# Retrieve the comment describing the expression on the given line of the given file.
#
# This is useful to get module or method documentation.
#
# @param file [Array<String>, File, String] The file to parse, either as a File or as
# a String or an Array of lines.
# @param line_number [Integer] The line number at which to look.
# NOTE: The first line in a file is line 1!
# @return [String] The comment
#
# source://method_source//lib/method_source/code_helpers.rb#52
def comment_describing(file, line_number); end
# Determine if a string of code is a complete Ruby expression.
#
# @example
# complete_expression?("class Hello") #=> false
# complete_expression?("class Hello; end") #=> true
# complete_expression?("class 123") #=> SyntaxError: unexpected tINTEGER
# @param code [String] The code to validate.
# @raise [SyntaxError] Any SyntaxError that does not represent incompleteness.
# @return [Boolean] Whether or not the code is a complete Ruby expression.
#
# source://method_source//lib/method_source/code_helpers.rb#66
def complete_expression?(str); end
# Retrieve the first expression starting on the given line of the given file.
#
# This is useful to get module or method source code.
#
# line 1!
#
# @option options
# @option options
# @param file [Array<String>, File, String] The file to parse, either as a File or as
# @param line_number [Integer] The line number at which to look.
# NOTE: The first line in a file is
# @param options [Hash] The optional configuration parameters.
# @raise [SyntaxError] If the first complete expression can't be identified
# @return [String] The first complete expression
#
# source://method_source//lib/method_source/code_helpers.rb#20
def expression_at(file, line_number, options = T.unsafe(nil)); end
private
# Get the first expression from the input.
#
# @param lines [Array<String>]
# @param consume [Integer] A number of lines to automatically
# consume (add to the expression buffer) without checking for validity.
# @raise [SyntaxError]
# @return [String] a valid ruby expression
# @yield a clean-up function to run before checking for complete_expression
#
# source://method_source//lib/method_source/code_helpers.rb#92
def extract_first_expression(lines, consume = T.unsafe(nil), &block); end
# Get the last comment from the input.
#
# @param lines [Array<String>]
# @return [String]
#
# source://method_source//lib/method_source/code_helpers.rb#106
def extract_last_comment(lines); end
end
# An exception matcher that matches only subsets of SyntaxErrors that can be
# fixed by adding more input to the buffer.
#
# source://method_source//lib/method_source/code_helpers.rb#124
module MethodSource::CodeHelpers::IncompleteExpression
class << self
# source://method_source//lib/method_source/code_helpers.rb#137
def ===(ex); end
# @return [Boolean]
#
# source://method_source//lib/method_source/code_helpers.rb#149
def rbx?; end
end
end
# source://method_source//lib/method_source/code_helpers.rb#125
MethodSource::CodeHelpers::IncompleteExpression::GENERIC_REGEXPS = T.let(T.unsafe(nil), Array)
# source://method_source//lib/method_source/code_helpers.rb#133
MethodSource::CodeHelpers::IncompleteExpression::RBX_ONLY_REGEXPS = T.let(T.unsafe(nil), Array)
# This module is to be included by `Method` and `UnboundMethod` and
# provides the `#source` functionality
#
# source://method_source//lib/method_source.rb#77
module MethodSource::MethodExtensions
# Return the comments associated with the method class/module.
#
# @example
# MethodSource::MethodExtensions.method(:included).module_comment
# =>
# # This module is to be included by `Method` and `UnboundMethod` and
# # provides the `#source` functionality
# @raise SourceNotFoundException
# @return [String] The method's comments as a string
#
# source://method_source//lib/method_source.rb#139
def class_comment; end
# Return the comments associated with the method as a string.
#
# @example
# Set.instance_method(:clear).comment.display
# =>
# # Removes all elements and returns self.
# @raise SourceNotFoundException
# @return [String] The method's comments as a string
#
# source://method_source//lib/method_source.rb#126
def comment; end
# Return the comments associated with the method class/module.
#
# @example
# MethodSource::MethodExtensions.method(:included).module_comment
# =>
# # This module is to be included by `Method` and `UnboundMethod` and
# # provides the `#source` functionality
# @raise SourceNotFoundException
# @return [String] The method's comments as a string
#
# source://method_source//lib/method_source.rb#139
def module_comment; end
# Return the sourcecode for the method as a string
#
# @example
# Set.instance_method(:clear).source.display
# =>
# def clear
# @hash.clear
# self
# end
# @raise SourceNotFoundException
# @return [String] The method sourcecode as a string
#
# source://method_source//lib/method_source.rb#114
def source; end
class << self
# We use the included hook to patch Method#source on rubinius.
# We need to use the included hook as Rubinius defines a `source`
# on Method so including a module will have no effect (as it's
# higher up the MRO).
#
# @param klass [Class] The class that includes the module.
#
# source://method_source//lib/method_source.rb#84
def included(klass); end
end
end
# source://method_source//lib/method_source/source_location.rb#2
module MethodSource::ReeSourceLocation
# Ruby enterprise edition provides all the information that's
# needed, in a slightly different way.
#
# source://method_source//lib/method_source/source_location.rb#5
def source_location; end
end
# source://method_source//lib/method_source/source_location.rb#10
module MethodSource::SourceLocation; end
# source://method_source//lib/method_source/source_location.rb#11
module MethodSource::SourceLocation::MethodExtensions
# Return the source location of a method for Ruby 1.8.
#
# @return [Array] A two element array. First element is the
# file, second element is the line in the file where the
# method definition is found.
#
# source://method_source//lib/method_source/source_location.rb#40
def source_location; end
private
# source://method_source//lib/method_source/source_location.rb#26
def trace_func(event, file, line, id, binding, classname); end
end
# source://method_source//lib/method_source/source_location.rb#54
module MethodSource::SourceLocation::ProcExtensions
# Return the source location for a Proc (in implementations
# without Proc#source_location)
#
# @return [Array] A two element array. First element is the
# file, second element is the line in the file where the
# proc definition is found.
#
# source://method_source//lib/method_source/source_location.rb#74
def source_location; end
end
# source://method_source//lib/method_source/source_location.rb#81
module MethodSource::SourceLocation::UnboundMethodExtensions
# Return the source location of an instance method for Ruby 1.8.
#
# @return [Array] A two element array. First element is the
# file, second element is the line in the file where the
# method definition is found.
#
# source://method_source//lib/method_source/source_location.rb#101
def source_location; end
end
# An Exception to mark errors that were raised trying to find the source from
# a given source_location.
#
# source://method_source//lib/method_source.rb#16
class MethodSource::SourceNotFoundError < ::StandardError; end
# source://method_source//lib/method_source/version.rb#2
MethodSource::VERSION = T.let(T.unsafe(nil), String)
# source://method_source//lib/method_source.rb#173
class Proc
include ::MethodSource::SourceLocation::ProcExtensions
include ::MethodSource::MethodExtensions
end
# source://method_source//lib/method_source.rb#168
class UnboundMethod
include ::MethodSource::SourceLocation::UnboundMethodExtensions
include ::MethodSource::MethodExtensions
end

173
sorbet/rbi/gems/mini_mime@1.1.5.rbi generated Normal file
View File

@@ -0,0 +1,173 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `mini_mime` gem.
# Please instead update this file by running `bin/tapioca gem mini_mime`.
# source://mini_mime//lib/mini_mime/version.rb#2
module MiniMime
class << self
# source://mini_mime//lib/mini_mime.rb#14
def lookup_by_content_type(mime); end
# source://mini_mime//lib/mini_mime.rb#10
def lookup_by_extension(extension); end
# source://mini_mime//lib/mini_mime.rb#6
def lookup_by_filename(filename); end
end
end
# source://mini_mime//lib/mini_mime.rb#18
module MiniMime::Configuration
class << self
# Returns the value of attribute content_type_db_path.
#
# source://mini_mime//lib/mini_mime.rb#21
def content_type_db_path; end
# Sets the attribute content_type_db_path
#
# @param value the value to set the attribute content_type_db_path to.
#
# source://mini_mime//lib/mini_mime.rb#21
def content_type_db_path=(_arg0); end
# Returns the value of attribute ext_db_path.
#
# source://mini_mime//lib/mini_mime.rb#20
def ext_db_path; end
# Sets the attribute ext_db_path
#
# @param value the value to set the attribute ext_db_path to.
#
# source://mini_mime//lib/mini_mime.rb#20
def ext_db_path=(_arg0); end
end
end
# source://mini_mime//lib/mini_mime.rb#52
class MiniMime::Db
# @return [Db] a new instance of Db
#
# source://mini_mime//lib/mini_mime.rb#173
def initialize; end
# source://mini_mime//lib/mini_mime.rb#182
def lookup_by_content_type(content_type); end
# source://mini_mime//lib/mini_mime.rb#178
def lookup_by_extension(extension); end
class << self
# source://mini_mime//lib/mini_mime.rb#66
def lookup_by_content_type(content_type); end
# source://mini_mime//lib/mini_mime.rb#60
def lookup_by_extension(extension); end
# source://mini_mime//lib/mini_mime.rb#53
def lookup_by_filename(filename); end
end
end
# source://mini_mime//lib/mini_mime.rb#71
class MiniMime::Db::Cache
# @return [Cache] a new instance of Cache
#
# source://mini_mime//lib/mini_mime.rb#72
def initialize(size); end
# source://mini_mime//lib/mini_mime.rb#77
def []=(key, val); end
# source://mini_mime//lib/mini_mime.rb#83
def fetch(key, &blk); end
end
# For Windows support
#
# source://mini_mime//lib/mini_mime.rb#89
MiniMime::Db::PReadFile = File
# source://mini_mime//lib/mini_mime.rb#114
class MiniMime::Db::RandomAccessDb
# @return [RandomAccessDb] a new instance of RandomAccessDb
#
# source://mini_mime//lib/mini_mime.rb#117
def initialize(path, sort_order); end
# source://mini_mime//lib/mini_mime.rb#131
def lookup(val); end
# lifted from marcandre/backports
#
# source://mini_mime//lib/mini_mime.rb#147
def lookup_uncached(val); end
# source://mini_mime//lib/mini_mime.rb#168
def resolve(row); end
end
# source://mini_mime//lib/mini_mime.rb#115
MiniMime::Db::RandomAccessDb::MAX_CACHED = T.let(T.unsafe(nil), Integer)
# source://mini_mime//lib/mini_mime.rb#28
class MiniMime::Info
# @return [Info] a new instance of Info
#
# source://mini_mime//lib/mini_mime.rb#33
def initialize(buffer); end
# source://mini_mime//lib/mini_mime.rb#37
def [](idx); end
# @return [Boolean]
#
# source://mini_mime//lib/mini_mime.rb#47
def binary?; end
# Returns the value of attribute content_type.
#
# source://mini_mime//lib/mini_mime.rb#31
def content_type; end
# Sets the attribute content_type
#
# @param value the value to set the attribute content_type to.
#
# source://mini_mime//lib/mini_mime.rb#31
def content_type=(_arg0); end
# Returns the value of attribute encoding.
#
# source://mini_mime//lib/mini_mime.rb#31
def encoding; end
# Sets the attribute encoding
#
# @param value the value to set the attribute encoding to.
#
# source://mini_mime//lib/mini_mime.rb#31
def encoding=(_arg0); end
# Returns the value of attribute extension.
#
# source://mini_mime//lib/mini_mime.rb#31
def extension; end
# Sets the attribute extension
#
# @param value the value to set the attribute extension to.
#
# source://mini_mime//lib/mini_mime.rb#31
def extension=(_arg0); end
end
# source://mini_mime//lib/mini_mime.rb#29
MiniMime::Info::BINARY_ENCODINGS = T.let(T.unsafe(nil), Array)
# source://mini_mime//lib/mini_mime/version.rb#3
MiniMime::VERSION = T.let(T.unsafe(nil), String)

1547
sorbet/rbi/gems/minitest@5.25.4.rbi generated Normal file

File diff suppressed because it is too large Load Diff

320
sorbet/rbi/gems/msgpack@1.7.5.rbi generated Normal file
View File

@@ -0,0 +1,320 @@
# typed: false
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `msgpack` gem.
# Please instead update this file by running `bin/tapioca gem msgpack`.
# source://msgpack//lib/msgpack/core_ext.rb#67
class Array
include ::Enumerable
include ::MessagePack::CoreExt
private
# source://msgpack//lib/msgpack/core_ext.rb#71
def to_msgpack_with_packer(packer); end
end
# source://msgpack//lib/msgpack/core_ext.rb#37
class FalseClass
include ::MessagePack::CoreExt
private
# source://msgpack//lib/msgpack/core_ext.rb#41
def to_msgpack_with_packer(packer); end
end
# source://msgpack//lib/msgpack/core_ext.rb#47
class Float < ::Numeric
include ::MessagePack::CoreExt
private
# source://msgpack//lib/msgpack/core_ext.rb#51
def to_msgpack_with_packer(packer); end
end
# source://msgpack//lib/msgpack/core_ext.rb#77
class Hash
include ::Enumerable
include ::MessagePack::CoreExt
private
# source://msgpack//lib/msgpack/core_ext.rb#81
def to_msgpack_with_packer(packer); end
end
# source://msgpack//lib/msgpack/core_ext.rb#98
class Integer < ::Numeric
include ::MessagePack::CoreExt
private
# source://msgpack//lib/msgpack/core_ext.rb#102
def to_msgpack_with_packer(packer); end
end
Integer::GMP_VERSION = T.let(T.unsafe(nil), String)
# MessagePack extention packer and unpacker for built-in Time class
#
# source://msgpack//lib/msgpack/version.rb#1
module MessagePack
private
# source://msgpack//lib/msgpack.rb#39
def dump(v, io = T.unsafe(nil), options = T.unsafe(nil)); end
# source://msgpack//lib/msgpack.rb#22
def load(src, param = T.unsafe(nil)); end
# source://msgpack//lib/msgpack.rb#39
def pack(v, io = T.unsafe(nil), options = T.unsafe(nil)); end
# source://msgpack//lib/msgpack.rb#22
def unpack(src, param = T.unsafe(nil)); end
class << self
# source://msgpack//lib/msgpack.rb#39
def dump(v, io = T.unsafe(nil), options = T.unsafe(nil)); end
# source://msgpack//lib/msgpack.rb#22
def load(src, param = T.unsafe(nil)); end
# source://msgpack//lib/msgpack.rb#39
def pack(v, io = T.unsafe(nil), options = T.unsafe(nil)); end
# source://msgpack//lib/msgpack.rb#22
def unpack(src, param = T.unsafe(nil)); end
end
end
# source://msgpack//lib/msgpack/core_ext.rb#2
module MessagePack::CoreExt
# source://msgpack//lib/msgpack/core_ext.rb#3
def to_msgpack(packer_or_io = T.unsafe(nil)); end
end
# source://msgpack//lib/msgpack/core_ext.rb#130
class MessagePack::ExtensionValue < ::Struct
include ::MessagePack::CoreExt
private
# source://msgpack//lib/msgpack/core_ext.rb#134
def to_msgpack_with_packer(packer); end
end
# source://msgpack//lib/msgpack/factory.rb#2
class MessagePack::Factory
# source://msgpack//lib/msgpack/factory.rb#113
def dump(v, *rest); end
# source://msgpack//lib/msgpack/factory.rb#99
def load(src, param = T.unsafe(nil)); end
# source://msgpack//lib/msgpack/factory.rb#113
def pack(v, *rest); end
# source://msgpack//lib/msgpack/factory.rb#120
def pool(size = T.unsafe(nil), **options); end
# see ext for other methods
#
# @raise [FrozenError]
#
# source://msgpack//lib/msgpack/factory.rb#5
def register_type(type, klass, options = T.unsafe(nil)); end
# [ {type: id, class: Class(or nil), packer: arg, unpacker: arg}, ... ]
#
# source://msgpack//lib/msgpack/factory.rb#41
def registered_types(selector = T.unsafe(nil)); end
# @return [Boolean]
#
# source://msgpack//lib/msgpack/factory.rb#86
def type_registered?(klass_or_type, selector = T.unsafe(nil)); end
# source://msgpack//lib/msgpack/factory.rb#99
def unpack(src, param = T.unsafe(nil)); end
end
# source://msgpack//lib/msgpack/factory.rb#128
class MessagePack::Factory::Pool
# @return [Pool] a new instance of Pool
#
# source://msgpack//lib/msgpack/factory.rb#181
def initialize(factory, size, options = T.unsafe(nil)); end
# source://msgpack//lib/msgpack/factory.rb#195
def dump(object); end
# source://msgpack//lib/msgpack/factory.rb#188
def load(data); end
# source://msgpack//lib/msgpack/factory.rb#206
def packer(&block); end
# source://msgpack//lib/msgpack/factory.rb#202
def unpacker(&block); end
end
# source://msgpack//lib/msgpack/factory.rb#130
class MessagePack::Factory::Pool::MemberPool
# @return [MemberPool] a new instance of MemberPool
#
# source://msgpack//lib/msgpack/factory.rb#131
def initialize(size, &block); end
# source://msgpack//lib/msgpack/factory.rb#137
def with; end
end
class MessagePack::HeldBuffer < ::BasicObject; end
# source://msgpack//lib/msgpack/packer.rb#2
class MessagePack::Packer
# @raise [ArgumentError]
#
# source://msgpack//lib/msgpack/packer.rb#9
def register_type(type, klass, method_name = T.unsafe(nil), &block); end
# source://msgpack//lib/msgpack/packer.rb#14
def registered_types; end
# @return [Boolean]
#
# source://msgpack//lib/msgpack/packer.rb#24
def type_registered?(klass_or_type); end
end
# source://msgpack//lib/msgpack/time.rb#5
module MessagePack::Time; end
# source://msgpack//lib/msgpack/time.rb#25
MessagePack::Time::Packer = T.let(T.unsafe(nil), Proc)
# 3-arg Time.at is available Ruby >= 2.5
#
# source://msgpack//lib/msgpack/time.rb#7
MessagePack::Time::TIME_AT_3_AVAILABLE = T.let(T.unsafe(nil), TrueClass)
# source://msgpack//lib/msgpack/time.rb#13
MessagePack::Time::Unpacker = T.let(T.unsafe(nil), Proc)
# a.k.a. "TimeSpec"
#
# source://msgpack//lib/msgpack/timestamp.rb#4
class MessagePack::Timestamp
# @param sec [Integer]
# @param nsec [Integer]
# @return [Timestamp] a new instance of Timestamp
#
# source://msgpack//lib/msgpack/timestamp.rb#24
def initialize(sec, nsec); end
# source://msgpack//lib/msgpack/timestamp.rb#72
def ==(other); end
# @return [Integer]
#
# source://msgpack//lib/msgpack/timestamp.rb#20
def nsec; end
# @return [Integer]
#
# source://msgpack//lib/msgpack/timestamp.rb#17
def sec; end
# source://msgpack//lib/msgpack/timestamp.rb#68
def to_msgpack_ext; end
class << self
# source://msgpack//lib/msgpack/timestamp.rb#29
def from_msgpack_ext(data); end
# source://msgpack//lib/msgpack/timestamp.rb#50
def to_msgpack_ext(sec, nsec); end
end
end
# source://msgpack//lib/msgpack/timestamp.rb#13
MessagePack::Timestamp::TIMESTAMP32_MAX_SEC = T.let(T.unsafe(nil), Integer)
# source://msgpack//lib/msgpack/timestamp.rb#14
MessagePack::Timestamp::TIMESTAMP64_MAX_SEC = T.let(T.unsafe(nil), Integer)
# The timestamp extension type defined in the MessagePack spec.
# See https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type for details.
#
# source://msgpack//lib/msgpack/timestamp.rb#11
MessagePack::Timestamp::TYPE = T.let(T.unsafe(nil), Integer)
class MessagePack::UnexpectedTypeError < ::MessagePack::UnpackError
include ::MessagePack::TypeError
end
# source://msgpack//lib/msgpack/unpacker.rb#2
class MessagePack::Unpacker
# source://msgpack//lib/msgpack/unpacker.rb#9
def register_type(type, klass = T.unsafe(nil), method_name = T.unsafe(nil), &block); end
# source://msgpack//lib/msgpack/unpacker.rb#18
def registered_types; end
# @return [Boolean]
#
# source://msgpack//lib/msgpack/unpacker.rb#28
def type_registered?(klass_or_type); end
end
# source://msgpack//lib/msgpack/core_ext.rb#17
class NilClass
include ::MessagePack::CoreExt
private
# source://msgpack//lib/msgpack/core_ext.rb#21
def to_msgpack_with_packer(packer); end
end
# source://msgpack//lib/msgpack/core_ext.rb#57
class String
include ::Comparable
include ::MessagePack::CoreExt
private
# source://msgpack//lib/msgpack/core_ext.rb#61
def to_msgpack_with_packer(packer); end
end
# source://msgpack//lib/msgpack/symbol.rb#1
class Symbol
include ::Comparable
include ::MessagePack::CoreExt
private
# source://msgpack//lib/msgpack/core_ext.rb#91
def to_msgpack_with_packer(packer); end
class << self
# source://msgpack//lib/msgpack/symbol.rb#12
def from_msgpack_ext(data); end
end
end
# source://msgpack//lib/msgpack/core_ext.rb#27
class TrueClass
include ::MessagePack::CoreExt
private
# source://msgpack//lib/msgpack/core_ext.rb#31
def to_msgpack_with_packer(packer); end
end

308
sorbet/rbi/gems/neighbor@0.5.1.rbi generated Normal file
View File

@@ -0,0 +1,308 @@
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `neighbor` gem.
# Please instead update this file by running `bin/tapioca gem neighbor`.
# source://neighbor//lib/neighbor/mysql.rb#1
module Neighbor; end
# source://neighbor//lib/neighbor/attribute.rb#2
class Neighbor::Attribute < ::ActiveModel::Type::Value
# @return [Attribute] a new instance of Attribute
#
# source://neighbor//lib/neighbor/attribute.rb#5
def initialize(cast_type:, model:, type:, attribute_name:); end
# source://neighbor//lib/neighbor/attribute.rb#3
def cast(*_arg0, **_arg1, &_arg2); end
# source://neighbor//lib/neighbor/attribute.rb#3
def deserialize(*_arg0, **_arg1, &_arg2); end
# source://neighbor//lib/neighbor/attribute.rb#3
def serialize(*_arg0, **_arg1, &_arg2); end
# source://neighbor//lib/neighbor/attribute.rb#3
def type(*_arg0, **_arg1, &_arg2); end
private
# source://neighbor//lib/neighbor/attribute.rb#14
def cast_value(*_arg0, **_arg1, &_arg2); end
# source://neighbor//lib/neighbor/attribute.rb#18
def new_cast_type; end
end
# source://neighbor//lib/neighbor.rb#16
class Neighbor::Error < ::StandardError; end
# source://neighbor//lib/neighbor/railtie.rb#11
module Neighbor::GeneratedAttribute
# source://neighbor//lib/neighbor/railtie.rb#12
def parse_type_and_options(type, *_arg1, **_arg2); end
end
# source://neighbor//lib/neighbor/model.rb#2
module Neighbor::Model
# source://neighbor//lib/neighbor/model.rb#3
def has_neighbors(*attribute_names, dimensions: T.unsafe(nil), normalize: T.unsafe(nil), type: T.unsafe(nil)); end
end
# source://neighbor//lib/neighbor/mysql.rb#2
module Neighbor::MySQL
class << self
# source://neighbor//lib/neighbor/mysql.rb#3
def initialize!; end
end
end
# source://neighbor//lib/neighbor/mysql.rb#23
module Neighbor::MySQL::RegisterTypes
# source://neighbor//lib/neighbor/mysql.rb#24
def initialize_type_map(m); end
# source://neighbor//lib/neighbor/mysql.rb#29
def register_vector_type(m); end
end
# source://neighbor//lib/neighbor/normalized_attribute.rb#2
class Neighbor::NormalizedAttribute < ::ActiveModel::Type::Value
# @return [NormalizedAttribute] a new instance of NormalizedAttribute
#
# source://neighbor//lib/neighbor/normalized_attribute.rb#5
def initialize(cast_type:, model:, attribute_name:); end
# source://neighbor//lib/neighbor/normalized_attribute.rb#11
def cast(*_arg0, **_arg1, &_arg2); end
# source://neighbor//lib/neighbor/normalized_attribute.rb#3
def deserialize(*_arg0, **_arg1, &_arg2); end
# source://neighbor//lib/neighbor/normalized_attribute.rb#3
def serialize(*_arg0, **_arg1, &_arg2); end
# source://neighbor//lib/neighbor/normalized_attribute.rb#3
def type(*_arg0, **_arg1, &_arg2); end
private
# source://neighbor//lib/neighbor/normalized_attribute.rb#17
def cast_value(*_arg0, **_arg1, &_arg2); end
end
# source://neighbor//lib/neighbor/postgresql.rb#2
module Neighbor::PostgreSQL
class << self
# source://neighbor//lib/neighbor/postgresql.rb#3
def initialize!; end
end
end
# source://neighbor//lib/neighbor/postgresql.rb#24
module Neighbor::PostgreSQL::RegisterTypes
# source://neighbor//lib/neighbor/postgresql.rb#25
def initialize_type_map(m = T.unsafe(nil)); end
end
# source://neighbor//lib/neighbor/railtie.rb#2
class Neighbor::Railtie < ::Rails::Railtie; end
# source://neighbor//lib/neighbor/reranking.rb#2
module Neighbor::Reranking
class << self
# source://neighbor//lib/neighbor/reranking.rb#3
def rrf(first_ranking, *rankings, k: T.unsafe(nil)); end
end
end
# source://neighbor//lib/neighbor/sqlite.rb#2
module Neighbor::SQLite
class << self
# note: this is a public API (unlike PostgreSQL and MySQL)
#
# source://neighbor//lib/neighbor/sqlite.rb#4
def initialize!; end
end
end
# source://neighbor//lib/neighbor/sqlite.rb#18
module Neighbor::SQLite::InstanceMethods
# source://neighbor//lib/neighbor/sqlite.rb#19
def configure_connection; end
end
# source://neighbor//lib/neighbor/sparse_vector.rb#2
class Neighbor::SparseVector
# @return [SparseVector] a new instance of SparseVector
#
# source://neighbor//lib/neighbor/sparse_vector.rb#7
def initialize(value, dimensions = T.unsafe(nil)); end
# Returns the value of attribute dimensions.
#
# source://neighbor//lib/neighbor/sparse_vector.rb#3
def dimensions; end
# Returns the value of attribute indices.
#
# source://neighbor//lib/neighbor/sparse_vector.rb#3
def indices; end
# source://neighbor//lib/neighbor/sparse_vector.rb#25
def to_a; end
# source://neighbor//lib/neighbor/sparse_vector.rb#21
def to_s; end
# Returns the value of attribute values.
#
# source://neighbor//lib/neighbor/sparse_vector.rb#3
def values; end
private
# source://neighbor//lib/neighbor/sparse_vector.rb#42
def from_array(arr); end
# source://neighbor//lib/neighbor/sparse_vector.rb#35
def from_hash(data, dimensions); end
class << self
# source://neighbor//lib/neighbor/sparse_vector.rb#56
def from_text(string); end
private
# source://neighbor//lib/neighbor/sparse_vector.rb#70
def from_parts(dimensions, indices, values); end
end
end
# source://neighbor//lib/neighbor/sparse_vector.rb#5
Neighbor::SparseVector::NO_DEFAULT = T.let(T.unsafe(nil), Object)
# source://neighbor//lib/neighbor/type/cube.rb#2
module Neighbor::Type; end
# source://neighbor//lib/neighbor/type/cube.rb#3
class Neighbor::Type::Cube < ::ActiveModel::Type::Value
# source://neighbor//lib/neighbor/type/cube.rb#8
def serialize(value); end
# source://neighbor//lib/neighbor/type/cube.rb#4
def type; end
private
# source://neighbor//lib/neighbor/type/cube.rb#22
def cast_value(value); end
# source://neighbor//lib/neighbor/type/cube.rb#38
def serialize_point(value); end
end
# source://neighbor//lib/neighbor/type/halfvec.rb#3
class Neighbor::Type::Halfvec < ::ActiveModel::Type::Value
# source://neighbor//lib/neighbor/type/halfvec.rb#8
def serialize(value); end
# source://neighbor//lib/neighbor/type/halfvec.rb#4
def type; end
private
# source://neighbor//lib/neighbor/type/halfvec.rb#17
def cast_value(value); end
end
# source://neighbor//lib/neighbor/type/mysql_vector.rb#3
class Neighbor::Type::MysqlVector < ::ActiveModel::Type::Binary
# source://neighbor//lib/neighbor/type/mysql_vector.rb#15
def deserialize(value); end
# source://neighbor//lib/neighbor/type/mysql_vector.rb#8
def serialize(value); end
# source://neighbor//lib/neighbor/type/mysql_vector.rb#4
def type; end
private
# source://neighbor//lib/neighbor/type/mysql_vector.rb#22
def cast_value(value); end
end
# source://neighbor//lib/neighbor/type/sparsevec.rb#3
class Neighbor::Type::Sparsevec < ::ActiveModel::Type::Value
# source://neighbor//lib/neighbor/type/sparsevec.rb#8
def serialize(value); end
# source://neighbor//lib/neighbor/type/sparsevec.rb#4
def type; end
private
# source://neighbor//lib/neighbor/type/sparsevec.rb#17
def cast_value(value); end
end
# source://neighbor//lib/neighbor/type/vector.rb#3
class Neighbor::Type::Vector < ::ActiveModel::Type::Value
# source://neighbor//lib/neighbor/type/vector.rb#8
def serialize(value); end
# source://neighbor//lib/neighbor/type/vector.rb#4
def type; end
private
# source://neighbor//lib/neighbor/type/vector.rb#17
def cast_value(value); end
end
# source://neighbor//lib/neighbor/utils.rb#2
module Neighbor::Utils
class << self
# source://neighbor//lib/neighbor/utils.rb#50
def adapter(model); end
# @return [Boolean]
#
# source://neighbor//lib/neighbor/utils.rb#46
def array?(value); end
# @raise [Error]
#
# source://neighbor//lib/neighbor/utils.rb#33
def normalize(value, column_info:); end
# @return [Boolean]
#
# source://neighbor//lib/neighbor/utils.rb#192
def normalize_required?(adapter, column_type); end
# source://neighbor//lib/neighbor/utils.rb#74
def operator(adapter, column_type, distance); end
# source://neighbor//lib/neighbor/utils.rb#158
def order(adapter, type, operator, quoted_attribute, query); end
# source://neighbor//lib/neighbor/utils.rb#61
def type(adapter, column_type); end
# source://neighbor//lib/neighbor/utils.rb#23
def validate(value, dimensions:, type:, adapter:); end
# source://neighbor//lib/neighbor/utils.rb#3
def validate_dimensions(value, type, expected, adapter); end
# source://neighbor//lib/neighbor/utils.rb#12
def validate_finite(value, type); end
end
end
# source://neighbor//lib/neighbor/version.rb#2
Neighbor::VERSION = T.let(T.unsafe(nil), String)

Some files were not shown because too many files have changed in this diff Show More