From 3a01040ac964764cf672c4c59f3b7d92da8f015a Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 1 Nov 2024 12:11:56 -0400 Subject: [PATCH] Upgrade ruby-lsp requirement to v0.21.2 (#502) Bump our requirement so that we can use the fixes to window show message and the progress additions. --- Gemfile.lock | 4 +- ruby-lsp-rails.gemspec | 2 +- ....1.3.3.rbi => actioncable@8.0.0.beta1.rbi} | 2270 +- ....3.3.rbi => actionmailbox@8.0.0.beta1.rbi} | 336 +- ...1.3.3.rbi => actionmailer@8.0.0.beta1.rbi} | 493 +- ...7.1.3.3.rbi => actionpack@8.0.0.beta1.rbi} | 17200 ++++++++-------- ...7.1.3.3.rbi => actiontext@8.0.0.beta1.rbi} | 1206 +- ...7.1.3.3.rbi => actionview@8.0.0.beta1.rbi} | 4194 ++-- ...@7.1.3.3.rbi => activejob@8.0.0.beta1.rbi} | 552 +- ....1.3.3.rbi => activemodel@8.0.0.beta1.rbi} | 505 +- ...1.3.3.rbi => activerecord@8.0.0.beta1.rbi} | 11539 ++++++----- ....3.3.rbi => activestorage@8.0.0.beta1.rbi} | 1346 +- ....3.3.rbi => activesupport@8.0.0.beta1.rbi} | 3402 +-- sorbet/rbi/gems/benchmark@0.3.0.rbi | 600 + .../{builder@3.2.4.rbi => builder@3.3.0.rbi} | 0 ...by@1.2.3.rbi => concurrent-ruby@1.3.4.rbi} | 72 +- .../{erubi@1.12.0.rbi => erubi@1.13.0.rbi} | 34 +- sorbet/rbi/gems/globalid@1.2.1.rbi | 2 +- .../gems/{i18n@1.14.5.rbi => i18n@1.14.6.rbi} | 160 +- sorbet/rbi/gems/mail@2.8.1.rbi | 24 +- ...initest@5.23.0.rbi => minitest@5.25.1.rbi} | 471 +- ...et-imap@0.4.11.rbi => net-imap@0.4.16.rbi} | 1291 +- ...okogiri@1.16.5.rbi => nokogiri@1.16.7.rbi} | 0 .../gems/{racc@1.7.3.rbi => racc@1.8.1.rbi} | 70 +- sorbet/rbi/gems/rack-session@2.0.0.rbi | 5 +- sorbet/rbi/gems/rack-test@2.1.0.rbi | 5 +- .../gems/{rack@3.0.11.rbi => rack@3.1.7.rbi} | 1672 +- sorbet/rbi/gems/rackup@2.1.0.rbi | 17 - sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi | 44 +- .../rbi/gems/rails-html-sanitizer@1.6.0.rbi | 88 +- ...ails@7.1.3.3.rbi => rails@8.0.0.beta1.rbi} | 0 ...s@7.1.3.3.rbi => railties@8.0.0.beta1.rbi} | 1059 +- sorbet/rbi/gems/rake@13.2.1.rbi | 6 +- sorbet/rbi/gems/rbi@0.2.0.rbi | 4 +- .../gems/{rdoc@6.6.3.1.rbi => rdoc@6.7.0.rbi} | 659 +- .../{reline@0.5.7.rbi => reline@0.5.10.rbi} | 0 sorbet/rbi/gems/rubocop-ast@1.31.3.rbi | 51 +- ...uby-lsp@0.21.0.rbi => ruby-lsp@0.21.2.rbi} | 229 +- sorbet/rbi/gems/securerandom@0.3.1.rbi | 396 + sorbet/rbi/gems/spoom@1.3.0.rbi | 42 +- .../{sqlite3@1.7.3.rbi => sqlite3@2.1.0.rbi} | 966 +- ...{stringio@3.1.0.rbi => stringio@3.1.1.rbi} | 0 sorbet/rbi/gems/tapioca@0.16.2.rbi | 24 +- .../gems/{thor@1.3.1.rbi => thor@1.3.2.rbi} | 88 +- sorbet/rbi/gems/uri@0.13.1.rbi | 2429 +++ sorbet/rbi/gems/useragent@0.16.10.rbi | 9 + sorbet/rbi/gems/yard-sorbet@0.8.1.rbi | 2 +- sorbet/rbi/gems/yard@0.9.36.rbi | 22 +- ...eitwerk@2.6.14.rbi => zeitwerk@2.6.18.rbi} | 203 +- 49 files changed, 30341 insertions(+), 23452 deletions(-) rename sorbet/rbi/gems/{actioncable@7.1.3.3.rbi => actioncable@8.0.0.beta1.rbi} (59%) rename sorbet/rbi/gems/{actionmailbox@7.1.3.3.rbi => actionmailbox@8.0.0.beta1.rbi} (78%) rename sorbet/rbi/gems/{actionmailer@7.1.3.3.rbi => actionmailer@8.0.0.beta1.rbi} (85%) rename sorbet/rbi/gems/{actionpack@7.1.3.3.rbi => actionpack@8.0.0.beta1.rbi} (54%) rename sorbet/rbi/gems/{actiontext@7.1.3.3.rbi => actiontext@8.0.0.beta1.rbi} (50%) rename sorbet/rbi/gems/{actionview@7.1.3.3.rbi => actionview@8.0.0.beta1.rbi} (84%) rename sorbet/rbi/gems/{activejob@7.1.3.3.rbi => activejob@8.0.0.beta1.rbi} (83%) rename sorbet/rbi/gems/{activemodel@7.1.3.3.rbi => activemodel@8.0.0.beta1.rbi} (94%) rename sorbet/rbi/gems/{activerecord@7.1.3.3.rbi => activerecord@8.0.0.beta1.rbi} (85%) rename sorbet/rbi/gems/{activestorage@7.1.3.3.rbi => activestorage@8.0.0.beta1.rbi} (61%) rename sorbet/rbi/gems/{activesupport@7.1.3.3.rbi => activesupport@8.0.0.beta1.rbi} (93%) create mode 100644 sorbet/rbi/gems/benchmark@0.3.0.rbi rename sorbet/rbi/gems/{builder@3.2.4.rbi => builder@3.3.0.rbi} (100%) rename sorbet/rbi/gems/{concurrent-ruby@1.2.3.rbi => concurrent-ruby@1.3.4.rbi} (99%) rename sorbet/rbi/gems/{erubi@1.12.0.rbi => erubi@1.13.0.rbi} (91%) rename sorbet/rbi/gems/{i18n@1.14.5.rbi => i18n@1.14.6.rbi} (96%) rename sorbet/rbi/gems/{minitest@5.23.0.rbi => minitest@5.25.1.rbi} (78%) rename sorbet/rbi/gems/{net-imap@0.4.11.rbi => net-imap@0.4.16.rbi} (91%) rename sorbet/rbi/gems/{nokogiri@1.16.5.rbi => nokogiri@1.16.7.rbi} (100%) rename sorbet/rbi/gems/{racc@1.7.3.rbi => racc@1.8.1.rbi} (67%) rename sorbet/rbi/gems/{rack@3.0.11.rbi => rack@3.1.7.rbi} (80%) rename sorbet/rbi/gems/{rails@7.1.3.3.rbi => rails@8.0.0.beta1.rbi} (100%) rename sorbet/rbi/gems/{railties@7.1.3.3.rbi => railties@8.0.0.beta1.rbi} (81%) rename sorbet/rbi/gems/{rdoc@6.6.3.1.rbi => rdoc@6.7.0.rbi} (95%) rename sorbet/rbi/gems/{reline@0.5.7.rbi => reline@0.5.10.rbi} (100%) rename sorbet/rbi/gems/{ruby-lsp@0.21.0.rbi => ruby-lsp@0.21.2.rbi} (97%) create mode 100644 sorbet/rbi/gems/securerandom@0.3.1.rbi rename sorbet/rbi/gems/{sqlite3@1.7.3.rbi => sqlite3@2.1.0.rbi} (65%) rename sorbet/rbi/gems/{stringio@3.1.0.rbi => stringio@3.1.1.rbi} (100%) rename sorbet/rbi/gems/{thor@1.3.1.rbi => thor@1.3.2.rbi} (98%) create mode 100644 sorbet/rbi/gems/uri@0.13.1.rbi create mode 100644 sorbet/rbi/gems/useragent@0.16.10.rbi rename sorbet/rbi/gems/{zeitwerk@2.6.14.rbi => zeitwerk@2.6.18.rbi} (85%) diff --git a/Gemfile.lock b/Gemfile.lock index a7cb3fb0..68927124 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: ruby-lsp-rails (0.3.21) - ruby-lsp (>= 0.21.0, < 0.22.0) + ruby-lsp (>= 0.21.2, < 0.22.0) GEM remote: https://rubygems.org/ @@ -224,7 +224,7 @@ GEM rubocop (~> 1.51) rubocop-sorbet (0.8.3) rubocop (>= 0.90.0) - ruby-lsp (0.21.0) + ruby-lsp (0.21.2) language_server-protocol (~> 3.17.0) prism (>= 1.2, < 2.0) rbs (>= 3, < 4) diff --git a/ruby-lsp-rails.gemspec b/ruby-lsp-rails.gemspec index 51c3f594..827d0e90 100644 --- a/ruby-lsp-rails.gemspec +++ b/ruby-lsp-rails.gemspec @@ -24,5 +24,5 @@ Gem::Specification.new do |spec| Dir["lib/**/*", "LICENSE.txt", "Rakefile", "README.md"] end - spec.add_dependency("ruby-lsp", ">= 0.21.0", "< 0.22.0") + spec.add_dependency("ruby-lsp", ">= 0.21.2", "< 0.22.0") end diff --git a/sorbet/rbi/gems/actioncable@7.1.3.3.rbi b/sorbet/rbi/gems/actioncable@8.0.0.beta1.rbi similarity index 59% rename from sorbet/rbi/gems/actioncable@7.1.3.3.rbi rename to sorbet/rbi/gems/actioncable@8.0.0.beta1.rbi index aa1c9bd4..af230ff3 100644 --- a/sorbet/rbi/gems/actioncable@7.1.3.3.rbi +++ b/sorbet/rbi/gems/actioncable@8.0.0.beta1.rbi @@ -6,134 +6,142 @@ # :markup: markdown -# :include: actioncable/README.md +# :include: ../README.md # -# source://actioncable/lib/action_cable.rb#48 +# source://actioncable/lib/action_cable.rb#54 module ActionCable private # Singleton instance of the server # - # source://actioncable/lib/action_cable.rb#71 + # source://actioncable/lib/action_cable.rb#77 def server; end class << self - # source://actioncable/lib/action_cable/deprecator.rb#4 + # source://actioncable/lib/action_cable/deprecator.rb#6 def deprecator; end - # Returns the currently loaded version of Action Cable as a +Gem::Version+. + # Returns the currently loaded version of Action Cable as a `Gem::Version`. # - # source://actioncable/lib/action_cable/gem_version.rb#5 + # source://actioncable/lib/action_cable/gem_version.rb#7 def gem_version; end # Singleton instance of the server # - # source://actioncable/lib/action_cable.rb#71 + # source://actioncable/lib/action_cable.rb#77 def server; end - # Returns the currently loaded version of Action Cable as a +Gem::Version+. + # Returns the currently loaded version of Action Cable as a `Gem::Version`. # - # source://actioncable/lib/action_cable/version.rb#7 + # source://actioncable/lib/action_cable/version.rb#9 def version; end end end -# source://actioncable/lib/action_cable/channel/base.rb#8 +# source://actioncable/lib/action_cable/channel/base.rb#10 module ActionCable::Channel; end -# = Action Cable \Channel \Base -# -# The channel provides the basic structure of grouping behavior into logical units when communicating over the WebSocket connection. -# You can think of a channel like a form of controller, but one that's capable of pushing content to the subscriber in addition to simply -# responding to the subscriber's direct requests. -# -# Channel instances are long-lived. A channel object will be instantiated when the cable consumer becomes a subscriber, and then -# lives until the consumer disconnects. This may be seconds, minutes, hours, or even days. That means you have to take special care -# not to do anything silly in a channel that would balloon its memory footprint or whatever. The references are forever, so they won't be released -# as is normally the case with a controller instance that gets thrown away after every request. -# -# Long-lived channels (and connections) also mean you're responsible for ensuring that the data is fresh. If you hold a reference to a user -# record, but the name is changed while that reference is held, you may be sending stale data if you don't take precautions to avoid it. -# -# The upside of long-lived channel instances is that you can use instance variables to keep reference to objects that future subscriber requests -# can interact with. Here's a quick example: -# -# class ChatChannel < ApplicationCable::Channel -# def subscribed -# @room = Chat::Room[params[:room_number]] -# end +# # Action Cable Channel Base +# +# The channel provides the basic structure of grouping behavior into logical +# units when communicating over the WebSocket connection. You can think of a +# channel like a form of controller, but one that's capable of pushing content +# to the subscriber in addition to simply responding to the subscriber's direct +# requests. +# +# Channel instances are long-lived. A channel object will be instantiated when +# the cable consumer becomes a subscriber, and then lives until the consumer +# disconnects. This may be seconds, minutes, hours, or even days. That means you +# have to take special care not to do anything silly in a channel that would +# balloon its memory footprint or whatever. The references are forever, so they +# won't be released as is normally the case with a controller instance that gets +# thrown away after every request. +# +# Long-lived channels (and connections) also mean you're responsible for +# ensuring that the data is fresh. If you hold a reference to a user record, but +# the name is changed while that reference is held, you may be sending stale +# data if you don't take precautions to avoid it. +# +# The upside of long-lived channel instances is that you can use instance +# variables to keep reference to objects that future subscriber requests can +# interact with. Here's a quick example: +# +# class ChatChannel < ApplicationCable::Channel +# def subscribed +# @room = Chat::Room[params[:room_number]] +# end # -# def speak(data) -# @room.speak data, user: current_user +# def speak(data) +# @room.speak data, user: current_user +# end # end -# end # -# The #speak action simply uses the Chat::Room object that was created when the channel was first subscribed to by the consumer when that -# subscriber wants to say something in the room. +# The #speak action simply uses the Chat::Room object that was created when the +# channel was first subscribed to by the consumer when that subscriber wants to +# say something in the room. # -# == Action processing +# ## Action processing # # Unlike subclasses of ActionController::Base, channels do not follow a RESTful # constraint form for their actions. Instead, Action Cable operates through a -# remote-procedure call model. You can declare any public method on the -# channel (optionally taking a data argument), and this method is -# automatically exposed as callable to the client. +# remote-procedure call model. You can declare any public method on the channel +# (optionally taking a `data` argument), and this method is automatically +# exposed as callable to the client. # # Example: # -# class AppearanceChannel < ApplicationCable::Channel -# def subscribed -# @connection_token = generate_connection_token -# end -# -# def unsubscribed -# current_user.disappear @connection_token -# end +# class AppearanceChannel < ApplicationCable::Channel +# def subscribed +# @connection_token = generate_connection_token +# end # -# def appear(data) -# current_user.appear @connection_token, on: data['appearing_on'] -# end +# def unsubscribed +# current_user.disappear @connection_token +# end # -# def away -# current_user.away @connection_token -# end +# def appear(data) +# current_user.appear @connection_token, on: data['appearing_on'] +# end # -# private -# def generate_connection_token -# SecureRandom.hex(36) +# def away +# current_user.away @connection_token # end -# end # -# In this example, the subscribed and unsubscribed methods are not callable methods, as they -# were already declared in ActionCable::Channel::Base, but #appear -# and #away are. #generate_connection_token is also not -# callable, since it's a private method. You'll see that appear accepts a data -# parameter, which it then uses as part of its model call. #away -# does not, since it's simply a trigger action. +# private +# def generate_connection_token +# SecureRandom.hex(36) +# end +# end +# +# In this example, the subscribed and unsubscribed methods are not callable +# methods, as they were already declared in ActionCable::Channel::Base, but +# `#appear` and `#away` are. `#generate_connection_token` is also not callable, +# since it's a private method. You'll see that appear accepts a data parameter, +# which it then uses as part of its model call. `#away` does not, since it's +# simply a trigger action. # -# Also note that in this example, current_user is available because -# it was marked as an identifying attribute on the connection. All such -# identifiers will automatically create a delegation method of the same name -# on the channel instance. +# Also note that in this example, `current_user` is available because it was +# marked as an identifying attribute on the connection. All such identifiers +# will automatically create a delegation method of the same name on the channel +# instance. # -# == Rejecting subscription requests +# ## Rejecting subscription requests # # A channel can reject a subscription request in the #subscribed callback by # invoking the #reject method: # -# class ChatChannel < ApplicationCable::Channel -# def subscribed -# @room = Chat::Room[params[:room_number]] -# reject unless current_user.can_access?(@room) +# class ChatChannel < ApplicationCable::Channel +# def subscribed +# @room = Chat::Room[params[:room_number]] +# reject unless current_user.can_access?(@room) +# end # end -# end # -# In this example, the subscription will be rejected if the -# current_user does not have access to the chat room. On the -# client-side, the Channel#rejected callback will get invoked when -# the server rejects the subscription request. +# In this example, the subscription will be rejected if the `current_user` does +# not have access to the chat room. On the client-side, the `Channel#rejected` +# callback will get invoked when the server rejects the subscription request. # -# source://actioncable/lib/action_cable/channel/base.rb#100 +# source://actioncable/lib/action_cable/channel/base.rb#110 class ActionCable::Channel::Base include ::ActiveSupport::Callbacks include ::ActionCable::Channel::Callbacks @@ -152,283 +160,279 @@ class ActionCable::Channel::Base # @return [Base] a new instance of Base # - # source://actioncable/lib/action_cable/channel/base.rb#147 + # source://actioncable/lib/action_cable/channel/base.rb#156 def initialize(connection, identifier, params = T.unsafe(nil)); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_subscribe_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_unsubscribe_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _subscribe_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _unsubscribe_callbacks; end - # source://actioncable/lib/action_cable/channel/broadcasting.rb#11 - def broadcast_to(model, message, &block); end - - # source://actioncable/lib/action_cable/channel/broadcasting.rb#11 - def broadcasting_for(model, &block); end - - # source://actioncable/lib/action_cable/channel/naming.rb#23 - def channel_name(&block); end - # Returns the value of attribute connection. # - # source://actioncable/lib/action_cable/channel/base.rb#108 + # source://actioncable/lib/action_cable/channel/base.rb#118 def connection; end # Returns the value of attribute identifier. # - # source://actioncable/lib/action_cable/channel/base.rb#108 + # source://actioncable/lib/action_cable/channel/base.rb#118 def identifier; end - # source://actioncable/lib/action_cable/channel/base.rb#109 + # source://actioncable/lib/action_cable/channel/base.rb#119 def logger(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute params. # - # source://actioncable/lib/action_cable/channel/base.rb#108 + # source://actioncable/lib/action_cable/channel/base.rb#118 def params; end - # Extract the action name from the passed data and process it via the channel. The process will ensure - # that the action requested is a public method on the channel declared by the user (so not one of the callbacks - # like #subscribed). + # Extract the action name from the passed data and process it via the channel. + # The process will ensure that the action requested is a public method on the + # channel declared by the user (so not one of the callbacks like #subscribed). # - # source://actioncable/lib/action_cable/channel/base.rb#167 + # source://actioncable/lib/action_cable/channel/base.rb#176 def perform_action(data); end - # source://actioncable/lib/action_cable/channel/periodic_timers.rb#9 + # source://actioncable/lib/action_cable/channel/periodic_timers.rb#11 def periodic_timers=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # This method is called after subscription has been added to the connection - # and confirms or rejects the subscription. + # This method is called after subscription has been added to the connection and + # confirms or rejects the subscription. # - # source://actioncable/lib/action_cable/channel/base.rb#182 + # source://actioncable/lib/action_cable/channel/base.rb#191 def subscribe_to_channel; end - # Called by the cable connection when it's cut, so the channel has a chance to cleanup with callbacks. - # This method is not intended to be called directly by the user. Instead, override the #unsubscribed callback. + # Called by the cable connection when it's cut, so the channel has a chance to + # cleanup with callbacks. This method is not intended to be called directly by + # the user. Instead, override the #unsubscribed callback. # - # source://actioncable/lib/action_cable/channel/base.rb#193 + # source://actioncable/lib/action_cable/channel/base.rb#203 def unsubscribe_from_channel; end private - # source://actioncable/lib/action_cable/channel/base.rb#281 + # source://actioncable/lib/action_cable/channel/base.rb#293 def action_signature(action, data); end - # source://actioncable/lib/action_cable/channel/base.rb#233 + # source://actioncable/lib/action_cable/channel/base.rb#245 def defer_subscription_confirmation!; end # @return [Boolean] # - # source://actioncable/lib/action_cable/channel/base.rb#237 + # source://actioncable/lib/action_cable/channel/base.rb#249 def defer_subscription_confirmation?; end - # source://actioncable/lib/action_cable/channel/base.rb#253 + # source://actioncable/lib/action_cable/channel/base.rb#265 def delegate_connection_identifiers; end - # source://actioncable/lib/action_cable/channel/base.rb#269 + # source://actioncable/lib/action_cable/channel/base.rb#281 def dispatch_action(action, data); end - # source://actioncable/lib/action_cable/channel/base.rb#227 + # source://actioncable/lib/action_cable/channel/base.rb#239 def ensure_confirmation_sent; end - # source://actioncable/lib/action_cable/channel/base.rb#261 + # source://actioncable/lib/action_cable/channel/base.rb#273 def extract_action(data); end - # source://actioncable/lib/action_cable/channel/base.rb#292 + # source://actioncable/lib/action_cable/channel/base.rb#304 def parameter_filter; end # @return [Boolean] # - # source://actioncable/lib/action_cable/channel/base.rb#265 + # source://actioncable/lib/action_cable/channel/base.rb#277 def processable_action?(action); end - # source://actioncable/lib/action_cable/channel/base.rb#245 + # source://actioncable/lib/action_cable/channel/base.rb#257 def reject; end - # source://actioncable/lib/action_cable/channel/base.rb#307 + # source://actioncable/lib/action_cable/channel/base.rb#319 def reject_subscription; end - # Called once a consumer has become a subscriber of the channel. Usually the place to set up any streams - # you want this channel to be sending to the subscriber. + # Called once a consumer has become a subscriber of the channel. Usually the + # place to set up any streams you want this channel to be sending to the + # subscriber. # - # source://actioncable/lib/action_cable/channel/base.rb#202 + # source://actioncable/lib/action_cable/channel/base.rb#213 def subscribed; end # @return [Boolean] # - # source://actioncable/lib/action_cable/channel/base.rb#241 + # source://actioncable/lib/action_cable/channel/base.rb#253 def subscription_confirmation_sent?; end # @return [Boolean] # - # source://actioncable/lib/action_cable/channel/base.rb#249 + # source://actioncable/lib/action_cable/channel/base.rb#261 def subscription_rejected?; end - # Transmit a hash of data to the subscriber. The hash will automatically be wrapped in a JSON envelope with - # the proper channel identifier marked as the recipient. + # Transmit a hash of data to the subscriber. The hash will automatically be + # wrapped in a JSON envelope with the proper channel identifier marked as the + # recipient. # - # source://actioncable/lib/action_cable/channel/base.rb#214 + # source://actioncable/lib/action_cable/channel/base.rb#226 def transmit(data, via: T.unsafe(nil)); end - # source://actioncable/lib/action_cable/channel/base.rb#296 + # source://actioncable/lib/action_cable/channel/base.rb#308 def transmit_subscription_confirmation; end - # source://actioncable/lib/action_cable/channel/base.rb#312 + # source://actioncable/lib/action_cable/channel/base.rb#324 def transmit_subscription_rejection; end - # Called once a consumer has cut its cable connection. Can be used for cleaning up connections or marking - # users as offline or the like. + # Called once a consumer has cut its cable connection. Can be used for cleaning + # up connections or marking users as offline or the like. # - # source://actioncable/lib/action_cable/channel/base.rb#208 + # source://actioncable/lib/action_cable/channel/base.rb#219 def unsubscribed; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _subscribe_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _subscribe_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _unsubscribe_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _unsubscribe_callbacks=(value); end - # A list of method names that should be considered actions. This - # includes all public instance methods on a channel, less - # any internal methods (defined on Base), adding back in - # any methods that are internal, but still exist on the class - # itself. + # A list of method names that should be considered actions. This includes all + # public instance methods on a channel, less any internal methods (defined on + # Base), adding back in any methods that are internal, but still exist on the + # class itself. # - # ==== Returns - # * Set - A set of all methods that should be considered actions. + # #### Returns + # * `Set` - A set of all methods that should be considered actions. # - # source://actioncable/lib/action_cable/channel/base.rb#120 + # source://actioncable/lib/action_cable/channel/base.rb#129 def action_methods; end - # source://actioncable/lib/action_cable/channel/periodic_timers.rb#9 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def periodic_timers; end - # source://actioncable/lib/action_cable/channel/periodic_timers.rb#9 - def periodic_timers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def periodic_timers=(new_value); end - # source://actioncable/lib/action_cable/channel/periodic_timers.rb#9 + # source://actioncable/lib/action_cable/channel/periodic_timers.rb#11 def periodic_timers?; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 - def rescue_handlers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end private - # action_methods are cached and there is sometimes need to refresh - # them. ::clear_action_methods! allows you to do that, so next time - # you run action_methods, they will be recalculated. + # action_methods are cached and there is sometimes need to refresh them. + # ::clear_action_methods! allows you to do that, so next time you run + # action_methods, they will be recalculated. # - # source://actioncable/lib/action_cable/channel/base.rb#136 + # source://actioncable/lib/action_cable/channel/base.rb#145 def clear_action_methods!; end # Refresh the cached action_methods when a new action_method is added. # - # source://actioncable/lib/action_cable/channel/base.rb#141 + # source://actioncable/lib/action_cable/channel/base.rb#150 def method_added(name); end end end -# source://actioncable/lib/action_cable/channel/broadcasting.rb#7 +# source://actioncable/lib/action_cable/channel/broadcasting.rb#9 module ActionCable::Channel::Broadcasting extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionCable::Channel::Broadcasting::ClassMethods + + # source://actioncable/lib/action_cable/channel/broadcasting.rb#45 + def broadcast_to(model, message); end + + # source://actioncable/lib/action_cable/channel/broadcasting.rb#41 + def broadcasting_for(model); end end -# source://actioncable/lib/action_cable/channel/broadcasting.rb#14 +# source://actioncable/lib/action_cable/channel/broadcasting.rb#12 module ActionCable::Channel::Broadcasting::ClassMethods - # Broadcast a hash to a unique broadcasting for this model in this channel. + # Broadcast a hash to a unique broadcasting for this `model` in this channel. # - # source://actioncable/lib/action_cable/channel/broadcasting.rb#16 + # source://actioncable/lib/action_cable/channel/broadcasting.rb#14 def broadcast_to(model, message); end - # Returns a unique broadcasting identifier for this model in this channel: + # Returns a unique broadcasting identifier for this `model` in this channel: # - # CommentsChannel.broadcasting_for("all") # => "comments:all" + # CommentsChannel.broadcasting_for("all") # => "comments:all" # - # You can pass any object as a target (e.g. Active Record model), and it - # would be serialized into a string under the hood. + # You can pass any object as a target (e.g. Active Record model), and it would + # be serialized into a string under the hood. # - # source://actioncable/lib/action_cable/channel/broadcasting.rb#26 + # source://actioncable/lib/action_cable/channel/broadcasting.rb#24 def broadcasting_for(model); end - # source://actioncable/lib/action_cable/channel/broadcasting.rb#30 + private + + # source://actioncable/lib/action_cable/channel/broadcasting.rb#29 def serialize_broadcasting(object); end end -# = Action Cable \Channel \Callbacks +# # Action Cable Channel Callbacks # -# Action Cable Channel provides callback hooks that are invoked during the -# life cycle of a channel: +# Action Cable Channel provides callback hooks that are invoked during the life +# cycle of a channel: # -# * {before_subscribe}[rdoc-ref:ClassMethods#before_subscribe] -# * {after_subscribe}[rdoc-ref:ClassMethods#after_subscribe] (aliased as -# {on_subscribe}[rdoc-ref:ClassMethods#on_subscribe]) -# * {before_unsubscribe}[rdoc-ref:ClassMethods#before_unsubscribe] -# * {after_unsubscribe}[rdoc-ref:ClassMethods#after_unsubscribe] (aliased as -# {on_unsubscribe}[rdoc-ref:ClassMethods#on_unsubscribe]) +# * [before_subscribe](rdoc-ref:ClassMethods#before_subscribe) +# * [after_subscribe](rdoc-ref:ClassMethods#after_subscribe) (aliased as +# [on_subscribe](rdoc-ref:ClassMethods#on_subscribe)) +# * [before_unsubscribe](rdoc-ref:ClassMethods#before_unsubscribe) +# * [after_unsubscribe](rdoc-ref:ClassMethods#after_unsubscribe) (aliased as +# [on_unsubscribe](rdoc-ref:ClassMethods#on_unsubscribe)) # -# ==== Example # -# class ChatChannel < ApplicationCable::Channel -# after_subscribe :send_welcome_message, unless: :subscription_rejected? -# after_subscribe :track_subscription +# #### Example # -# private -# def send_welcome_message -# broadcast_to(...) -# end +# class ChatChannel < ApplicationCable::Channel +# after_subscribe :send_welcome_message, unless: :subscription_rejected? +# after_subscribe :track_subscription # -# def track_subscription -# # ... -# end -# end +# private +# def send_welcome_message +# broadcast_to(...) +# end +# +# def track_subscription +# # ... +# end +# end # -# source://actioncable/lib/action_cable/channel/callbacks.rb#35 +# source://actioncable/lib/action_cable/channel/callbacks.rb#38 module ActionCable::Channel::Callbacks extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -442,172 +446,170 @@ module ActionCable::Channel::Callbacks module GeneratedClassMethods def __callbacks; end def __callbacks=(value); end - def __callbacks?; end end module GeneratedInstanceMethods def __callbacks; end - def __callbacks?; end end end -# source://actioncable/lib/action_cable/channel/callbacks.rb#44 +# source://actioncable/lib/action_cable/channel/callbacks.rb#47 module ActionCable::Channel::Callbacks::ClassMethods - # This callback will be triggered after the Base#subscribed method is - # called, even if the subscription was rejected with the Base#reject - # method. + # This callback will be triggered after the Base#subscribed method is called, + # even if the subscription was rejected with the Base#reject method. # # To trigger the callback only on successful subscriptions, use the # Base#subscription_rejected? method: # - # after_subscribe :my_method, unless: :subscription_rejected? + # after_subscribe :my_method, unless: :subscription_rejected? # - # source://actioncable/lib/action_cable/channel/callbacks.rb#58 + # source://actioncable/lib/action_cable/channel/callbacks.rb#60 def after_subscribe(*methods, &block); end - # source://actioncable/lib/action_cable/channel/callbacks.rb#67 + # source://actioncable/lib/action_cable/channel/callbacks.rb#69 def after_unsubscribe(*methods, &block); end - # source://actioncable/lib/action_cable/channel/callbacks.rb#45 + # source://actioncable/lib/action_cable/channel/callbacks.rb#48 def before_subscribe(*methods, &block); end - # source://actioncable/lib/action_cable/channel/callbacks.rb#63 + # source://actioncable/lib/action_cable/channel/callbacks.rb#65 def before_unsubscribe(*methods, &block); end - # This callback will be triggered after the Base#subscribed method is - # called, even if the subscription was rejected with the Base#reject - # method. + # This callback will be triggered after the Base#subscribed method is called, + # even if the subscription was rejected with the Base#reject method. # # To trigger the callback only on successful subscriptions, use the # Base#subscription_rejected? method: # - # after_subscribe :my_method, unless: :subscription_rejected? + # after_subscribe :my_method, unless: :subscription_rejected? # - # source://actioncable/lib/action_cable/channel/callbacks.rb#58 + # source://actioncable/lib/action_cable/channel/callbacks.rb#60 def on_subscribe(*methods, &block); end - # source://actioncable/lib/action_cable/channel/callbacks.rb#67 + # source://actioncable/lib/action_cable/channel/callbacks.rb#69 def on_unsubscribe(*methods, &block); end end -# = Action Cable \Channel Stub +# # Action Cable Channel Stub # -# Stub +stream_from+ to track streams for the channel. -# Add public aliases for +subscription_confirmation_sent?+ and -# +subscription_rejected?+. +# Stub `stream_from` to track streams for the channel. Add public aliases for +# `subscription_confirmation_sent?` and `subscription_rejected?`. # -# source://actioncable/lib/action_cable/channel/test_case.rb#23 +# source://actioncable/lib/action_cable/channel/test_case.rb#24 module ActionCable::Channel::ChannelStub # @return [Boolean] # - # source://actioncable/lib/action_cable/channel/test_case.rb#24 + # source://actioncable/lib/action_cable/channel/test_case.rb#25 def confirmed?; end # @return [Boolean] # - # source://actioncable/lib/action_cable/channel/test_case.rb#28 + # source://actioncable/lib/action_cable/channel/test_case.rb#29 def rejected?; end # Make periodic timers no-op # - # source://actioncable/lib/action_cable/channel/test_case.rb#45 + # source://actioncable/lib/action_cable/channel/test_case.rb#46 def start_periodic_timers; end - # source://actioncable/lib/action_cable/channel/test_case.rb#36 + # source://actioncable/lib/action_cable/channel/test_case.rb#37 def stop_all_streams; end # Make periodic timers no-op # - # source://actioncable/lib/action_cable/channel/test_case.rb#45 + # source://actioncable/lib/action_cable/channel/test_case.rb#46 def stop_periodic_timers; end - # source://actioncable/lib/action_cable/channel/test_case.rb#32 + # source://actioncable/lib/action_cable/channel/test_case.rb#33 def stream_from(broadcasting, *_arg1); end - # source://actioncable/lib/action_cable/channel/test_case.rb#40 + # source://actioncable/lib/action_cable/channel/test_case.rb#41 def streams; end end -# source://actioncable/lib/action_cable/channel/test_case.rb#49 +# source://actioncable/lib/action_cable/channel/test_case.rb#50 class ActionCable::Channel::ConnectionStub # @return [ConnectionStub] a new instance of ConnectionStub # - # source://actioncable/lib/action_cable/channel/test_case.rb#54 + # source://actioncable/lib/action_cable/channel/test_case.rb#55 def initialize(identifiers = T.unsafe(nil)); end - # source://actioncable/lib/action_cable/channel/test_case.rb#52 + # source://actioncable/lib/action_cable/channel/test_case.rb#53 def config(*_arg0, **_arg1, &_arg2); end - # source://actioncable/lib/action_cable/channel/test_case.rb#71 + # source://actioncable/lib/action_cable/channel/test_case.rb#72 def connection_identifier; end # Returns the value of attribute identifiers. # - # source://actioncable/lib/action_cable/channel/test_case.rb#50 + # source://actioncable/lib/action_cable/channel/test_case.rb#51 def identifiers; end # Returns the value of attribute logger. # - # source://actioncable/lib/action_cable/channel/test_case.rb#50 + # source://actioncable/lib/action_cable/channel/test_case.rb#51 def logger; end - # source://actioncable/lib/action_cable/channel/test_case.rb#52 + # source://actioncable/lib/action_cable/channel/test_case.rb#53 def pubsub(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute server. # - # source://actioncable/lib/action_cable/channel/test_case.rb#50 + # source://actioncable/lib/action_cable/channel/test_case.rb#51 def server; end # Returns the value of attribute subscriptions. # - # source://actioncable/lib/action_cable/channel/test_case.rb#50 + # source://actioncable/lib/action_cable/channel/test_case.rb#51 def subscriptions; end # Returns the value of attribute transmissions. # - # source://actioncable/lib/action_cable/channel/test_case.rb#50 + # source://actioncable/lib/action_cable/channel/test_case.rb#51 def transmissions; end - # source://actioncable/lib/action_cable/channel/test_case.rb#67 + # source://actioncable/lib/action_cable/channel/test_case.rb#68 def transmit(cable_message); end private - # source://actioncable/lib/action_cable/channel/test_case.rb#76 + # source://actioncable/lib/action_cable/channel/test_case.rb#77 def connection_gid(ids); end end -# source://actioncable/lib/action_cable/channel/naming.rb#5 +# source://actioncable/lib/action_cable/channel/naming.rb#7 module ActionCable::Channel::Naming extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionCable::Channel::Naming::ClassMethods + + # source://actioncable/lib/action_cable/channel/naming.rb#23 + def channel_name; end end -# source://actioncable/lib/action_cable/channel/naming.rb#8 +# source://actioncable/lib/action_cable/channel/naming.rb#10 module ActionCable::Channel::Naming::ClassMethods - # Returns the name of the channel, underscored, without the Channel ending. - # If the channel is in a namespace, then the namespaces are represented by single + # Returns the name of the channel, underscored, without the `Channel` ending. If + # the channel is in a namespace, then the namespaces are represented by single # colon separators in the channel name. # - # ChatChannel.channel_name # => 'chat' - # Chats::AppearancesChannel.channel_name # => 'chats:appearances' - # FooChats::BarAppearancesChannel.channel_name # => 'foo_chats:bar_appearances' + # ChatChannel.channel_name # => 'chat' + # Chats::AppearancesChannel.channel_name # => 'chats:appearances' + # FooChats::BarAppearancesChannel.channel_name # => 'foo_chats:bar_appearances' # - # source://actioncable/lib/action_cable/channel/naming.rb#16 + # source://actioncable/lib/action_cable/channel/naming.rb#18 def channel_name; end end -# source://actioncable/lib/action_cable/channel/test_case.rb#10 +# source://actioncable/lib/action_cable/channel/test_case.rb#12 class ActionCable::Channel::NonInferrableChannelError < ::StandardError # @return [NonInferrableChannelError] a new instance of NonInferrableChannelError # - # source://actioncable/lib/action_cable/channel/test_case.rb#11 + # source://actioncable/lib/action_cable/channel/test_case.rb#13 def initialize(name); end end -# source://actioncable/lib/action_cable/channel/periodic_timers.rb#5 +# source://actioncable/lib/action_cable/channel/periodic_timers.rb#7 module ActionCable::Channel::PeriodicTimers extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -640,16 +642,14 @@ module ActionCable::Channel::PeriodicTimers end end -# source://actioncable/lib/action_cable/channel/periodic_timers.rb#15 +# source://actioncable/lib/action_cable/channel/periodic_timers.rb#17 module ActionCable::Channel::PeriodicTimers::ClassMethods - # Periodically performs a task on the channel, like updating an online - # user counter, polling a backend for new status messages, sending - # regular "heartbeat" messages, or doing some internal work and giving - # progress updates. + # Periodically performs a task on the channel, like updating an online user + # counter, polling a backend for new status messages, sending regular + # "heartbeat" messages, or doing some internal work and giving progress updates. # - # Pass a method name or lambda argument or provide a block to call. - # Specify the calling period in seconds using the every: - # keyword argument. + # Pass a method name or lambda argument or provide a block to call. Specify the + # calling period in seconds using the `every:` keyword argument. # # periodically :transmit_progress, every: 5.seconds # @@ -661,257 +661,271 @@ module ActionCable::Channel::PeriodicTimers::ClassMethods def periodically(callback_or_method_name = T.unsafe(nil), every:, &block); end end -# = Action Cable \Channel \Streams +# # Action Cable Channel Streams # -# Streams allow channels to route broadcastings to the subscriber. A broadcasting is, as discussed elsewhere, a pubsub queue where any data -# placed into it is automatically sent to the clients that are connected at that time. It's purely an online queue, though. If you're not -# streaming a broadcasting at the very moment it sends out an update, you will not get that update, even if you connect after it has been sent. +# Streams allow channels to route broadcastings to the subscriber. A +# broadcasting is, as discussed elsewhere, a pubsub queue where any data placed +# into it is automatically sent to the clients that are connected at that time. +# It's purely an online queue, though. If you're not streaming a broadcasting at +# the very moment it sends out an update, you will not get that update, even if +# you connect after it has been sent. # -# Most commonly, the streamed broadcast is sent straight to the subscriber on the client-side. The channel just acts as a connector between -# the two parties (the broadcaster and the channel subscriber). Here's an example of a channel that allows subscribers to get all new -# comments on a given page: +# Most commonly, the streamed broadcast is sent straight to the subscriber on +# the client-side. The channel just acts as a connector between the two parties +# (the broadcaster and the channel subscriber). Here's an example of a channel +# that allows subscribers to get all new comments on a given page: # -# class CommentsChannel < ApplicationCable::Channel -# def follow(data) -# stream_from "comments_for_#{data['recording_id']}" -# end +# class CommentsChannel < ApplicationCable::Channel +# def follow(data) +# stream_from "comments_for_#{data['recording_id']}" +# end # -# def unfollow -# stop_all_streams +# def unfollow +# stop_all_streams +# end # end -# end # -# Based on the above example, the subscribers of this channel will get whatever data is put into the, -# let's say, comments_for_45 broadcasting as soon as it's put there. +# Based on the above example, the subscribers of this channel will get whatever +# data is put into the, let's say, `comments_for_45` broadcasting as soon as +# it's put there. # # An example broadcasting for this channel looks like so: # -# ActionCable.server.broadcast "comments_for_45", { author: 'DHH', content: 'Rails is just swell' } +# ActionCable.server.broadcast "comments_for_45", { author: 'DHH', content: 'Rails is just swell' } # -# If you have a stream that is related to a model, then the broadcasting used can be generated from the model and channel. -# The following example would subscribe to a broadcasting like comments:Z2lkOi8vVGVzdEFwcC9Qb3N0LzE. +# If you have a stream that is related to a model, then the broadcasting used +# can be generated from the model and channel. The following example would +# subscribe to a broadcasting like `comments:Z2lkOi8vVGVzdEFwcC9Qb3N0LzE`. # -# class CommentsChannel < ApplicationCable::Channel -# def subscribed -# post = Post.find(params[:id]) -# stream_for post +# class CommentsChannel < ApplicationCable::Channel +# def subscribed +# post = Post.find(params[:id]) +# stream_for post +# end # end -# end # # You can then broadcast to this channel using: # -# CommentsChannel.broadcast_to(@post, @comment) +# CommentsChannel.broadcast_to(@post, @comment) # -# If you don't just want to parlay the broadcast unfiltered to the subscriber, you can also supply a callback that lets you alter what is sent out. -# The below example shows how you can use this to provide performance introspection in the process: +# If you don't just want to parlay the broadcast unfiltered to the subscriber, +# you can also supply a callback that lets you alter what is sent out. The below +# example shows how you can use this to provide performance introspection in the +# process: # -# class ChatChannel < ApplicationCable::Channel -# def subscribed -# @room = Chat::Room[params[:room_number]] +# class ChatChannel < ApplicationCable::Channel +# def subscribed +# @room = Chat::Room[params[:room_number]] # -# stream_for @room, coder: ActiveSupport::JSON do |message| -# if message['originated_at'].present? -# elapsed_time = (Time.now.to_f - message['originated_at']).round(2) +# stream_for @room, coder: ActiveSupport::JSON do |message| +# if message['originated_at'].present? +# elapsed_time = (Time.now.to_f - message['originated_at']).round(2) # -# ActiveSupport::Notifications.instrument :performance, measurement: 'Chat.message_delay', value: elapsed_time, action: :timing -# logger.info "Message took #{elapsed_time}s to arrive" -# end +# ActiveSupport::Notifications.instrument :performance, measurement: 'Chat.message_delay', value: elapsed_time, action: :timing +# logger.info "Message took #{elapsed_time}s to arrive" +# end # -# transmit message +# transmit message +# end # end # end -# end # # You can stop streaming from all broadcasts by calling #stop_all_streams. # -# source://actioncable/lib/action_cable/channel/streams.rb#67 +# source://actioncable/lib/action_cable/channel/streams.rb#77 module ActionCable::Channel::Streams extend ::ActiveSupport::Concern - # source://actioncable/lib/action_cable/channel/streams.rb#140 + # source://actioncable/lib/action_cable/channel/streams.rb#153 def pubsub(*_arg0, **_arg1, &_arg2); end # Unsubscribes all streams associated with this channel from the pubsub queue. # - # source://actioncable/lib/action_cable/channel/streams.rb#122 + # source://actioncable/lib/action_cable/channel/streams.rb#135 def stop_all_streams; end - # Unsubscribes streams for the model. + # Unsubscribes streams for the `model`. # - # source://actioncable/lib/action_cable/channel/streams.rb#117 + # source://actioncable/lib/action_cable/channel/streams.rb#130 def stop_stream_for(model); end - # Unsubscribes streams from the named broadcasting. + # Unsubscribes streams from the named `broadcasting`. # - # source://actioncable/lib/action_cable/channel/streams.rb#108 + # source://actioncable/lib/action_cable/channel/streams.rb#121 def stop_stream_from(broadcasting); end - # Start streaming the pubsub queue for the model in this channel. Optionally, you can pass a - # callback that'll be used instead of the default of just transmitting the updates straight - # to the subscriber. + # Start streaming the pubsub queue for the `model` in this channel. Optionally, + # you can pass a `callback` that'll be used instead of the default of just + # transmitting the updates straight to the subscriber. # - # Pass coder: ActiveSupport::JSON to decode messages as JSON before passing to the callback. - # Defaults to coder: nil which does no decoding, passes raw messages. + # Pass `coder: ActiveSupport::JSON` to decode messages as JSON before passing to + # the callback. Defaults to `coder: nil` which does no decoding, passes raw + # messages. # - # source://actioncable/lib/action_cable/channel/streams.rb#103 + # source://actioncable/lib/action_cable/channel/streams.rb#116 def stream_for(model, callback = T.unsafe(nil), coder: T.unsafe(nil), &block); end - # Start streaming from the named broadcasting pubsub queue. Optionally, you can pass a callback that'll be used - # instead of the default of just transmitting the updates straight to the subscriber. - # Pass coder: ActiveSupport::JSON to decode messages as JSON before passing to the callback. - # Defaults to coder: nil which does no decoding, passes raw messages. + # Start streaming from the named `broadcasting` pubsub queue. Optionally, you + # can pass a `callback` that'll be used instead of the default of just + # transmitting the updates straight to the subscriber. Pass `coder: + # ActiveSupport::JSON` to decode messages as JSON before passing to the + # callback. Defaults to `coder: nil` which does no decoding, passes raw + # messages. # - # source://actioncable/lib/action_cable/channel/streams.rb#78 + # source://actioncable/lib/action_cable/channel/streams.rb#90 def stream_from(broadcasting, callback = T.unsafe(nil), coder: T.unsafe(nil), &block); end - # Calls stream_for with the given model if it's present to start streaming, + # Calls stream_for with the given `model` if it's present to start streaming, # otherwise rejects the subscription. # - # source://actioncable/lib/action_cable/channel/streams.rb#131 + # source://actioncable/lib/action_cable/channel/streams.rb#144 def stream_or_reject_for(model); end private - # May be overridden to change the default stream handling behavior - # which decodes JSON and transmits to the client. + # May be overridden to change the default stream handling behavior which decodes + # JSON and transmits to the client. # # TODO: Tests demonstrating this. # - # TODO: Room for optimization. Update transmit API to be coder-aware - # so we can no-op when pubsub and connection are both JSON-encoded. - # Then we can skip decode+encode if we're just proxying messages. + # TODO: Room for optimization. Update transmit API to be coder-aware so we can + # no-op when pubsub and connection are both JSON-encoded. Then we can skip + # decode+encode if we're just proxying messages. # - # source://actioncable/lib/action_cable/channel/streams.rb#176 + # source://actioncable/lib/action_cable/channel/streams.rb#189 def default_stream_handler(broadcasting, coder:); end - # source://actioncable/lib/action_cable/channel/streams.rb#197 + # source://actioncable/lib/action_cable/channel/streams.rb#210 def identity_handler; end - # source://actioncable/lib/action_cable/channel/streams.rb#181 + # source://actioncable/lib/action_cable/channel/streams.rb#194 def stream_decoder(handler = T.unsafe(nil), coder:); end - # May be overridden to add instrumentation, logging, specialized error - # handling, or other forms of handler decoration. + # May be overridden to add instrumentation, logging, specialized error handling, + # or other forms of handler decoration. # # TODO: Tests demonstrating this. # - # source://actioncable/lib/action_cable/channel/streams.rb#160 + # source://actioncable/lib/action_cable/channel/streams.rb#173 def stream_handler(broadcasting, user_handler, coder: T.unsafe(nil)); end - # source://actioncable/lib/action_cable/channel/streams.rb#189 + # source://actioncable/lib/action_cable/channel/streams.rb#202 def stream_transmitter(handler = T.unsafe(nil), broadcasting:); end - # source://actioncable/lib/action_cable/channel/streams.rb#142 + # source://actioncable/lib/action_cable/channel/streams.rb#155 def streams; end - # Always wrap the outermost handler to invoke the user handler on the - # worker pool rather than blocking the event loop. + # Always wrap the outermost handler to invoke the user handler on the worker + # pool rather than blocking the event loop. # - # source://actioncable/lib/action_cable/channel/streams.rb#148 + # source://actioncable/lib/action_cable/channel/streams.rb#161 def worker_pool_stream_handler(broadcasting, user_handler, coder: T.unsafe(nil)); end end # Superclass for Action Cable channel functional tests. # -# == Basic example +# ## Basic example # # Functional tests are written as follows: -# 1. First, one uses the +subscribe+ method to simulate subscription creation. -# 2. Then, one asserts whether the current state is as expected. "State" can be anything: -# transmitted messages, subscribed streams, etc. +# 1. First, one uses the `subscribe` method to simulate subscription creation. +# 2. Then, one asserts whether the current state is as expected. "State" can be +# anything: transmitted messages, subscribed streams, etc. +# # # For example: # -# class ChatChannelTest < ActionCable::Channel::TestCase -# def test_subscribed_with_room_number -# # Simulate a subscription creation -# subscribe room_number: 1 +# class ChatChannelTest < ActionCable::Channel::TestCase +# def test_subscribed_with_room_number +# # Simulate a subscription creation +# subscribe room_number: 1 # -# # Asserts that the subscription was successfully created -# assert subscription.confirmed? +# # Asserts that the subscription was successfully created +# assert subscription.confirmed? # -# # Asserts that the channel subscribes connection to a stream -# assert_has_stream "chat_1" +# # Asserts that the channel subscribes connection to a stream +# assert_has_stream "chat_1" # -# # Asserts that the channel subscribes connection to a specific -# # stream created for a model -# assert_has_stream_for Room.find(1) -# end +# # Asserts that the channel subscribes connection to a specific +# # stream created for a model +# assert_has_stream_for Room.find(1) +# end # -# def test_does_not_stream_with_incorrect_room_number -# subscribe room_number: -1 +# def test_does_not_stream_with_incorrect_room_number +# subscribe room_number: -1 # -# # Asserts that not streams was started -# assert_no_streams -# end +# # Asserts that not streams was started +# assert_no_streams +# end # -# def test_does_not_subscribe_without_room_number -# subscribe +# def test_does_not_subscribe_without_room_number +# subscribe # -# # Asserts that the subscription was rejected -# assert subscription.rejected? +# # Asserts that the subscription was rejected +# assert subscription.rejected? +# end # end -# end # # You can also perform actions: -# def test_perform_speak -# subscribe room_number: 1 +# def test_perform_speak +# subscribe room_number: 1 # -# perform :speak, message: "Hello, Rails!" +# perform :speak, message: "Hello, Rails!" # -# assert_equal "Hello, Rails!", transmissions.last["text"] -# end +# assert_equal "Hello, Rails!", transmissions.last["text"] +# end +# +# ## Special methods # -# == Special methods +# ActionCable::Channel::TestCase will also automatically provide the following +# instance methods for use in the tests: # -# ActionCable::Channel::TestCase will also automatically provide the following instance -# methods for use in the tests: +# connection +# : An ActionCable::Channel::ConnectionStub, representing the current HTTP +# connection. # -# connection:: -# An ActionCable::Channel::ConnectionStub, representing the current HTTP connection. -# subscription:: -# An instance of the current channel, created when you call +subscribe+. -# transmissions:: -# A list of all messages that have been transmitted into the channel. +# subscription +# : An instance of the current channel, created when you call `subscribe`. # +# transmissions +# : A list of all messages that have been transmitted into the channel. # -# == Channel is automatically inferred +# +# ## Channel is automatically inferred # # ActionCable::Channel::TestCase will automatically infer the channel under test # from the test class name. If the channel cannot be inferred from the test -# class name, you can explicitly set it with +tests+. -# -# class SpecialEdgeCaseChannelTest < ActionCable::Channel::TestCase -# tests SpecialChannel -# end +# class name, you can explicitly set it with `tests`. # -# == Specifying connection identifiers +# class SpecialEdgeCaseChannelTest < ActionCable::Channel::TestCase +# tests SpecialChannel +# end # -# You need to set up your connection manually to provide values for the identifiers. -# To do this just use: +# ## Specifying connection identifiers # -# stub_connection(user: users(:john)) +# You need to set up your connection manually to provide values for the +# identifiers. To do this just use: # -# == Testing broadcasting +# stub_connection(user: users(:john)) # -# ActionCable::Channel::TestCase enhances ActionCable::TestHelper assertions (e.g. -# +assert_broadcasts+) to handle broadcasting to models: +# ## Testing broadcasting # +# ActionCable::Channel::TestCase enhances ActionCable::TestHelper assertions +# (e.g. `assert_broadcasts`) to handle broadcasting to models: # -# # in your channel -# def speak(data) -# broadcast_to room, text: data["message"] -# end +# # in your channel +# def speak(data) +# broadcast_to room, text: data["message"] +# end # -# def test_speak -# subscribe room_id: rooms(:chat).id +# def test_speak +# subscribe room_id: rooms(:chat).id # -# assert_broadcast_on(rooms(:chat), text: "Hello, Rails!") do -# perform :speak, message: "Hello, Rails!" -# end -# end +# assert_broadcast_on(rooms(:chat), text: "Hello, Rails!") do +# perform :speak, message: "Hello, Rails!" +# end +# end # -# source://actioncable/lib/action_cable/channel/test_case.rb#186 +# source://actioncable/lib/action_cable/channel/test_case.rb#190 class ActionCable::Channel::TestCase < ::ActiveSupport::TestCase include ::ActiveSupport::Testing::ConstantLookup include ::ActionCable::TestHelper @@ -919,34 +933,34 @@ class ActionCable::Channel::TestCase < ::ActiveSupport::TestCase extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods extend ::ActionCable::Channel::TestCase::Behavior::ClassMethods - # source://actioncable/lib/action_cable/channel/test_case.rb#196 + # source://actioncable/lib/action_cable/channel/test_case.rb#200 def _channel_class; end - # source://actioncable/lib/action_cable/channel/test_case.rb#196 + # source://actioncable/lib/action_cable/channel/test_case.rb#200 def _channel_class=(_arg0); end - # source://actioncable/lib/action_cable/channel/test_case.rb#196 + # source://actioncable/lib/action_cable/channel/test_case.rb#200 def _channel_class?; end - # source://actioncable/lib/action_cable/channel/test_case.rb#198 + # source://actioncable/lib/action_cable/channel/test_case.rb#202 def connection; end - # source://actioncable/lib/action_cable/channel/test_case.rb#198 + # source://actioncable/lib/action_cable/channel/test_case.rb#202 def subscription; end class << self - # source://actioncable/lib/action_cable/channel/test_case.rb#196 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _channel_class; end - # source://actioncable/lib/action_cable/channel/test_case.rb#196 - def _channel_class=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _channel_class=(new_value); end - # source://actioncable/lib/action_cable/channel/test_case.rb#196 + # source://actioncable/lib/action_cable/channel/test_case.rb#200 def _channel_class?; end end end -# source://actioncable/lib/action_cable/channel/test_case.rb#187 +# source://actioncable/lib/action_cable/channel/test_case.rb#191 module ActionCable::Channel::TestCase::Behavior include ::ActionCable::TestHelper extend ::ActiveSupport::Concern @@ -957,84 +971,104 @@ module ActionCable::Channel::TestCase::Behavior mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods mixes_in_class_methods ::ActionCable::Channel::TestCase::Behavior::ClassMethods - # source://actioncable/lib/action_cable/channel/test_case.rb#278 + # source://actioncable/lib/action_cable/channel/test_case.rb#282 def assert_broadcast_on(stream_or_object, *args); end - # Enhance TestHelper assertions to handle non-String - # broadcastings + # Enhance TestHelper assertions to handle non-String broadcastings # - # source://actioncable/lib/action_cable/channel/test_case.rb#274 + # source://actioncable/lib/action_cable/channel/test_case.rb#278 def assert_broadcasts(stream_or_object, *args); end + # Asserts that the specified stream has not been started. + # + # def test_assert_no_started_stream + # subscribe + # assert_has_no_stream 'messages' + # end + # + # source://actioncable/lib/action_cable/channel/test_case.rb#326 + def assert_has_no_stream(stream); end + + # Asserts that the specified stream for a model has not started. + # + # def test_assert_no_started_stream_for + # subscribe id: 41 + # assert_has_no_stream_for User.find(42) + # end + # + # source://actioncable/lib/action_cable/channel/test_case.rb#337 + def assert_has_no_stream_for(object); end + # Asserts that the specified stream has been started. # - # def test_assert_started_stream - # subscribe - # assert_has_stream 'messages' - # end + # def test_assert_started_stream + # subscribe + # assert_has_stream 'messages' + # end # - # source://actioncable/lib/action_cable/channel/test_case.rb#300 + # source://actioncable/lib/action_cable/channel/test_case.rb#304 def assert_has_stream(stream); end # Asserts that the specified stream for a model has started. # - # def test_assert_started_stream_for - # subscribe id: 42 - # assert_has_stream_for User.find(42) - # end + # def test_assert_started_stream_for + # subscribe id: 42 + # assert_has_stream_for User.find(42) + # end # - # source://actioncable/lib/action_cable/channel/test_case.rb#311 + # source://actioncable/lib/action_cable/channel/test_case.rb#315 def assert_has_stream_for(object); end # Asserts that no streams have been started. # - # def test_assert_no_started_stream - # subscribe - # assert_no_streams - # end + # def test_assert_no_started_stream + # subscribe + # assert_no_streams + # end # - # source://actioncable/lib/action_cable/channel/test_case.rb#289 + # source://actioncable/lib/action_cable/channel/test_case.rb#293 def assert_no_streams; end # Perform action on a channel. # # NOTE: Must be subscribed. # - # source://actioncable/lib/action_cable/channel/test_case.rb#261 + # source://actioncable/lib/action_cable/channel/test_case.rb#266 def perform(action, data = T.unsafe(nil)); end # Set up test connection with the specified identifiers: # - # class ApplicationCable < ActionCable::Connection::Base - # identified_by :user, :token - # end + # class ApplicationCable < ActionCable::Connection::Base + # identified_by :user, :token + # end # - # stub_connection(user: users[:john], token: 'my-secret-token') + # stub_connection(user: users[:john], token: 'my-secret-token') # - # source://actioncable/lib/action_cable/channel/test_case.rb#239 + # source://actioncable/lib/action_cable/channel/test_case.rb#243 def stub_connection(identifiers = T.unsafe(nil)); end - # Subscribe to the channel under test. Optionally pass subscription parameters as a Hash. + # Subscribe to the channel under test. Optionally pass subscription parameters + # as a Hash. # - # source://actioncable/lib/action_cable/channel/test_case.rb#244 + # source://actioncable/lib/action_cable/channel/test_case.rb#249 def subscribe(params = T.unsafe(nil)); end # Returns messages transmitted into channel # - # source://actioncable/lib/action_cable/channel/test_case.rb#267 + # source://actioncable/lib/action_cable/channel/test_case.rb#272 def transmissions; end # Unsubscribe the subscription under test. # - # source://actioncable/lib/action_cable/channel/test_case.rb#253 + # source://actioncable/lib/action_cable/channel/test_case.rb#258 def unsubscribe; end private - # source://actioncable/lib/action_cable/channel/test_case.rb#320 + # source://actioncable/lib/action_cable/channel/test_case.rb#346 def broadcasting_for(stream_or_object); end - # source://actioncable/lib/action_cable/channel/test_case.rb#316 + # source://actioncable/lib/action_cable/channel/test_case.rb#342 def check_subscribed!; end module GeneratedClassMethods @@ -1050,92 +1084,101 @@ module ActionCable::Channel::TestCase::Behavior end end -# source://actioncable/lib/action_cable/channel/test_case.rb#193 +# source://actioncable/lib/action_cable/channel/test_case.rb#197 ActionCable::Channel::TestCase::Behavior::CHANNEL_IDENTIFIER = T.let(T.unsafe(nil), String) -# source://actioncable/lib/action_cable/channel/test_case.rb#203 +# source://actioncable/lib/action_cable/channel/test_case.rb#207 module ActionCable::Channel::TestCase::Behavior::ClassMethods - # source://actioncable/lib/action_cable/channel/test_case.rb#215 + # source://actioncable/lib/action_cable/channel/test_case.rb#219 def channel_class; end # @raise [NonInferrableChannelError] # - # source://actioncable/lib/action_cable/channel/test_case.rb#223 + # source://actioncable/lib/action_cable/channel/test_case.rb#227 def determine_default_channel(name); end - # source://actioncable/lib/action_cable/channel/test_case.rb#204 + # source://actioncable/lib/action_cable/channel/test_case.rb#208 def tests(channel); end end -# source://actioncable/lib/action_cable/connection/identification.rb#6 +# source://actioncable/lib/action_cable/connection/identification.rb#8 module ActionCable::Connection; end -# source://actioncable/lib/action_cable/connection/test_case.rb#20 +# source://actioncable/lib/action_cable/connection/test_case.rb#22 module ActionCable::Connection::Assertions - # Asserts that the connection is rejected (via +reject_unauthorized_connection+). + # Asserts that the connection is rejected (via + # `reject_unauthorized_connection`). # - # # Asserts that connection without user_id fails - # assert_reject_connection { connect params: { user_id: '' } } + # # Asserts that connection without user_id fails + # assert_reject_connection { connect params: { user_id: '' } } # - # source://actioncable/lib/action_cable/connection/test_case.rb#25 + # source://actioncable/lib/action_cable/connection/test_case.rb#28 def assert_reject_connection(&block); end end -# source://actioncable/lib/action_cable/connection/authorization.rb#5 +# source://actioncable/lib/action_cable/connection/authorization.rb#7 module ActionCable::Connection::Authorization - # Closes the WebSocket connection if it is open and returns an "unauthorized" reason. + # Closes the WebSocket connection if it is open and returns an "unauthorized" + # reason. # # @raise [UnauthorizedError] # - # source://actioncable/lib/action_cable/connection/authorization.rb#9 + # source://actioncable/lib/action_cable/connection/authorization.rb#12 def reject_unauthorized_connection; end end -# source://actioncable/lib/action_cable/connection/authorization.rb#6 +# source://actioncable/lib/action_cable/connection/authorization.rb#8 class ActionCable::Connection::Authorization::UnauthorizedError < ::StandardError; end -# = Action Cable \Connection \Base +# # Action Cable Connection Base # -# For every WebSocket connection the Action Cable server accepts, a Connection object will be instantiated. This instance becomes the parent -# of all of the channel subscriptions that are created from there on. Incoming messages are then routed to these channel subscriptions -# based on an identifier sent by the Action Cable consumer. The Connection itself does not deal with any specific application logic beyond -# authentication and authorization. +# For every WebSocket connection the Action Cable server accepts, a Connection +# object will be instantiated. This instance becomes the parent of all of the +# channel subscriptions that are created from there on. Incoming messages are +# then routed to these channel subscriptions based on an identifier sent by the +# Action Cable consumer. The Connection itself does not deal with any specific +# application logic beyond authentication and authorization. # # Here's a basic example: # -# module ApplicationCable -# class Connection < ActionCable::Connection::Base -# identified_by :current_user -# -# def connect -# self.current_user = find_verified_user -# logger.add_tags current_user.name -# end +# module ApplicationCable +# class Connection < ActionCable::Connection::Base +# identified_by :current_user # -# def disconnect -# # Any cleanup work needed when the cable connection is cut. -# end +# def connect +# self.current_user = find_verified_user +# logger.add_tags current_user.name +# end # -# private -# def find_verified_user -# User.find_by_identity(cookies.encrypted[:identity_id]) || -# reject_unauthorized_connection +# def disconnect +# # Any cleanup work needed when the cable connection is cut. # end +# +# private +# def find_verified_user +# User.find_by_identity(cookies.encrypted[:identity_id]) || +# reject_unauthorized_connection +# end +# end # end -# end # -# First, we declare that this connection can be identified by its current_user. This allows us to later be able to find all connections -# established for that current_user (and potentially disconnect them). You can declare as many -# identification indexes as you like. Declaring an identification means that an attr_accessor is automatically set for that key. +# First, we declare that this connection can be identified by its current_user. +# This allows us to later be able to find all connections established for that +# current_user (and potentially disconnect them). You can declare as many +# identification indexes as you like. Declaring an identification means that an +# attr_accessor is automatically set for that key. # -# Second, we rely on the fact that the WebSocket connection is established with the cookies from the domain being sent along. This makes -# it easy to use signed cookies that were set when logging in via a web interface to authorize the WebSocket connection. +# Second, we rely on the fact that the WebSocket connection is established with +# the cookies from the domain being sent along. This makes it easy to use signed +# cookies that were set when logging in via a web interface to authorize the +# WebSocket connection. # -# Finally, we add a tag to the connection-specific logger with the name of the current user to easily distinguish their messages in the log. +# Finally, we add a tag to the connection-specific logger with the name of the +# current user to easily distinguish their messages in the log. # # Pretty simple, eh? # -# source://actioncable/lib/action_cable/connection/base.rb#48 +# source://actioncable/lib/action_cable/connection/base.rb#57 class ActionCable::Connection::Base include ::ActionCable::Connection::Identification include ::ActionCable::Connection::InternalChannel @@ -1151,260 +1194,261 @@ class ActionCable::Connection::Base # @return [Base] a new instance of Base # - # source://actioncable/lib/action_cable/connection/base.rb#58 + # source://actioncable/lib/action_cable/connection/base.rb#67 def initialize(server, env, coder: T.unsafe(nil)); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _command_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_command_callbacks(&block); end - # source://actioncable/lib/action_cable/connection/base.rb#134 + # source://actioncable/lib/action_cable/connection/base.rb#147 def beat; end # Close the WebSocket connection. # - # source://actioncable/lib/action_cable/connection/base.rb#109 + # source://actioncable/lib/action_cable/connection/base.rb#120 def close(reason: T.unsafe(nil), reconnect: T.unsafe(nil)); end - # source://actioncable/lib/action_cable/connection/base.rb#56 + # source://actioncable/lib/action_cable/connection/base.rb#65 def config(*_arg0, **_arg1, &_arg2); end - # source://actioncable/lib/action_cable/connection/base.rb#90 + # source://actioncable/lib/action_cable/connection/base.rb#101 def dispatch_websocket_message(websocket_message); end # Returns the value of attribute env. # - # source://actioncable/lib/action_cable/connection/base.rb#55 + # source://actioncable/lib/action_cable/connection/base.rb#64 def env; end - # source://actioncable/lib/action_cable/connection/base.rb#56 + # source://actioncable/lib/action_cable/connection/base.rb#65 def event_loop(*_arg0, **_arg1, &_arg2); end - # source://actioncable/lib/action_cable/connection/base.rb#98 + # source://actioncable/lib/action_cable/connection/base.rb#109 def handle_channel_command(payload); end - # source://actioncable/lib/action_cable/connection/identification.rb#11 + # source://actioncable/lib/action_cable/connection/identification.rb#13 def identifiers; end - # source://actioncable/lib/action_cable/connection/identification.rb#11 + # source://actioncable/lib/action_cable/connection/identification.rb#13 def identifiers=(_arg0); end - # source://actioncable/lib/action_cable/connection/identification.rb#11 + # source://actioncable/lib/action_cable/connection/identification.rb#13 def identifiers?; end - # source://actioncable/lib/action_cable/connection/base.rb#155 + # source://actioncable/lib/action_cable/connection/base.rb#168 def inspect; end # Returns the value of attribute logger. # - # source://actioncable/lib/action_cable/connection/base.rb#55 + # source://actioncable/lib/action_cable/connection/base.rb#64 def logger; end - # source://actioncable/lib/action_cable/connection/base.rb#151 + # source://actioncable/lib/action_cable/connection/base.rb#164 def on_close(reason, code); end - # source://actioncable/lib/action_cable/connection/base.rb#146 + # source://actioncable/lib/action_cable/connection/base.rb#159 def on_error(message); end - # source://actioncable/lib/action_cable/connection/base.rb#142 + # source://actioncable/lib/action_cable/connection/base.rb#155 def on_message(message); end - # source://actioncable/lib/action_cable/connection/base.rb#138 + # source://actioncable/lib/action_cable/connection/base.rb#151 def on_open; end - # Called by the server when a new WebSocket connection is established. This configures the callbacks intended for overwriting by the user. - # This method should not be called directly -- instead rely upon on the #connect (and #disconnect) callbacks. + # Called by the server when a new WebSocket connection is established. This + # configures the callbacks intended for overwriting by the user. This method + # should not be called directly -- instead rely upon on the #connect (and + # #disconnect) callbacks. # - # source://actioncable/lib/action_cable/connection/base.rb#74 + # source://actioncable/lib/action_cable/connection/base.rb#85 def process; end # Returns the value of attribute protocol. # - # source://actioncable/lib/action_cable/connection/base.rb#55 + # source://actioncable/lib/action_cable/connection/base.rb#64 def protocol; end - # source://actioncable/lib/action_cable/connection/base.rb#56 + # source://actioncable/lib/action_cable/connection/base.rb#65 def pubsub(*_arg0, **_arg1, &_arg2); end # Decodes WebSocket messages and dispatches them to subscribed channels. # WebSocket message transfer encoding is always JSON. # - # source://actioncable/lib/action_cable/connection/base.rb#86 + # source://actioncable/lib/action_cable/connection/base.rb#97 def receive(websocket_message); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # Invoke a method on the connection asynchronously through the pool of thread workers. + # Invoke a method on the connection asynchronously through the pool of thread + # workers. # - # source://actioncable/lib/action_cable/connection/base.rb#119 + # source://actioncable/lib/action_cable/connection/base.rb#131 def send_async(method, *arguments); end # Returns the value of attribute server. # - # source://actioncable/lib/action_cable/connection/base.rb#55 + # source://actioncable/lib/action_cable/connection/base.rb#64 def server; end - # Return a basic hash of statistics for the connection keyed with identifier, started_at, subscriptions, and request_id. - # This can be returned by a health check against the connection. + # Return a basic hash of statistics for the connection keyed with `identifier`, + # `started_at`, `subscriptions`, and `request_id`. This can be returned by a + # health check against the connection. # - # source://actioncable/lib/action_cable/connection/base.rb#125 + # source://actioncable/lib/action_cable/connection/base.rb#138 def statistics; end # Returns the value of attribute subscriptions. # - # source://actioncable/lib/action_cable/connection/base.rb#55 + # source://actioncable/lib/action_cable/connection/base.rb#64 def subscriptions; end - # source://actioncable/lib/action_cable/connection/base.rb#104 + # source://actioncable/lib/action_cable/connection/base.rb#115 def transmit(cable_message); end # Returns the value of attribute worker_pool. # - # source://actioncable/lib/action_cable/connection/base.rb#55 + # source://actioncable/lib/action_cable/connection/base.rb#64 def worker_pool; end private # @return [Boolean] # - # source://actioncable/lib/action_cable/connection/base.rb#214 + # source://actioncable/lib/action_cable/connection/base.rb#228 def allow_request_origin?; end - # The cookies of the request that initiated the WebSocket connection. Useful for performing authorization checks. + # The cookies of the request that initiated the WebSocket connection. Useful for + # performing authorization checks. # - # source://actioncable/lib/action_cable/connection/base.rb#172 + # source://actioncable/lib/action_cable/connection/base.rb#187 def cookies; end - # source://actioncable/lib/action_cable/connection/base.rb#180 + # source://actioncable/lib/action_cable/connection/base.rb#195 def decode(websocket_message); end - # source://actioncable/lib/action_cable/connection/base.rb#176 + # source://actioncable/lib/action_cable/connection/base.rb#191 def encode(cable_message); end - # source://actioncable/lib/action_cable/connection/base.rb#256 + # source://actioncable/lib/action_cable/connection/base.rb#271 def finished_request_message; end - # source://actioncable/lib/action_cable/connection/base.rb#196 + # source://actioncable/lib/action_cable/connection/base.rb#211 def handle_close; end - # source://actioncable/lib/action_cable/connection/base.rb#184 + # source://actioncable/lib/action_cable/connection/base.rb#199 def handle_open; end - # source://actioncable/lib/action_cable/connection/base.rb#264 + # source://actioncable/lib/action_cable/connection/base.rb#279 def invalid_request_message; end # Returns the value of attribute message_buffer. # - # source://actioncable/lib/action_cable/connection/base.rb#161 + # source://actioncable/lib/action_cable/connection/base.rb#174 def message_buffer; end - # Tags are declared in the server but computed in the connection. This allows us per-connection tailored tags. + # Tags are declared in the server but computed in the connection. This allows us + # per-connection tailored tags. # - # source://actioncable/lib/action_cable/connection/base.rb#242 + # source://actioncable/lib/action_cable/connection/base.rb#257 def new_tagged_logger; end - # The request that initiated the WebSocket connection is available here. This gives access to the environment, cookies, etc. + # The request that initiated the WebSocket connection is available here. This + # gives access to the environment, cookies, etc. # - # source://actioncable/lib/action_cable/connection/base.rb#164 + # source://actioncable/lib/action_cable/connection/base.rb#178 def request; end - # source://actioncable/lib/action_cable/connection/base.rb#233 + # source://actioncable/lib/action_cable/connection/base.rb#247 def respond_to_invalid_request; end - # source://actioncable/lib/action_cable/connection/base.rb#228 + # source://actioncable/lib/action_cable/connection/base.rb#242 def respond_to_successful_request; end - # source://actioncable/lib/action_cable/connection/base.rb#207 + # source://actioncable/lib/action_cable/connection/base.rb#222 def send_welcome_message; end - # source://actioncable/lib/action_cable/connection/base.rb#247 + # source://actioncable/lib/action_cable/connection/base.rb#262 def started_request_message; end - # source://actioncable/lib/action_cable/connection/base.rb#270 + # source://actioncable/lib/action_cable/connection/base.rb#285 def successful_request_message; end # Returns the value of attribute websocket. # - # source://actioncable/lib/action_cable/connection/base.rb#160 + # source://actioncable/lib/action_cable/connection/base.rb#173 def websocket; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _command_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _command_callbacks=(value); end - # source://actioncable/lib/action_cable/connection/identification.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def identifiers; end - # source://actioncable/lib/action_cable/connection/identification.rb#11 - def identifiers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def identifiers=(new_value); end - # source://actioncable/lib/action_cable/connection/identification.rb#11 + # source://actioncable/lib/action_cable/connection/identification.rb#13 def identifiers?; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 - def rescue_handlers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end end end -# = Action Cable \Connection \Callbacks +# # Action Cable Connection Callbacks # -# The {before_command}[rdoc-ref:ClassMethods#before_command], -# {after_command}[rdoc-ref:ClassMethods#after_command], and -# {around_command}[rdoc-ref:ClassMethods#around_command] callbacks are -# invoked when sending commands to the client, such as when subscribing, -# unsubscribing, or performing an action. +# The [before_command](rdoc-ref:ClassMethods#before_command), +# [after_command](rdoc-ref:ClassMethods#after_command), and +# [around_command](rdoc-ref:ClassMethods#around_command) callbacks are invoked +# when sending commands to the client, such as when subscribing, unsubscribing, +# or performing an action. # -# ==== Example +# #### Example # -# module ApplicationCable -# class Connection < ActionCable::Connection::Base -# identified_by :user +# module ApplicationCable +# class Connection < ActionCable::Connection::Base +# identified_by :user # -# around_command :set_current_account +# around_command :set_current_account # -# private +# private # -# def set_current_account -# # Now all channels could use Current.account -# Current.set(account: user.account) { yield } -# end -# end -# end +# def set_current_account +# # Now all channels could use Current.account +# Current.set(account: user.account) { yield } +# end +# end +# end # -# source://actioncable/lib/action_cable/connection/callbacks.rb#32 +# source://actioncable/lib/action_cable/connection/callbacks.rb#34 module ActionCable::Connection::Callbacks extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -1418,114 +1462,112 @@ module ActionCable::Connection::Callbacks module GeneratedClassMethods def __callbacks; end def __callbacks=(value); end - def __callbacks?; end end module GeneratedInstanceMethods def __callbacks; end - def __callbacks?; end end end -# source://actioncable/lib/action_cable/connection/callbacks.rb#40 +# source://actioncable/lib/action_cable/connection/callbacks.rb#42 module ActionCable::Connection::Callbacks::ClassMethods - # source://actioncable/lib/action_cable/connection/callbacks.rb#45 + # source://actioncable/lib/action_cable/connection/callbacks.rb#47 def after_command(*methods, &block); end - # source://actioncable/lib/action_cable/connection/callbacks.rb#49 + # source://actioncable/lib/action_cable/connection/callbacks.rb#51 def around_command(*methods, &block); end - # source://actioncable/lib/action_cable/connection/callbacks.rb#41 + # source://actioncable/lib/action_cable/connection/callbacks.rb#43 def before_command(*methods, &block); end end -# source://actioncable/lib/action_cable/connection/client_socket.rb#11 +# source://actioncable/lib/action_cable/connection/client_socket.rb#13 class ActionCable::Connection::ClientSocket # @return [ClientSocket] a new instance of ClientSocket # - # source://actioncable/lib/action_cable/connection/client_socket.rb#34 + # source://actioncable/lib/action_cable/connection/client_socket.rb#36 def initialize(env, event_target, event_loop, protocols); end # @return [Boolean] # - # source://actioncable/lib/action_cable/connection/client_socket.rb#112 + # source://actioncable/lib/action_cable/connection/client_socket.rb#114 def alive?; end - # source://actioncable/lib/action_cable/connection/client_socket.rb#108 + # source://actioncable/lib/action_cable/connection/client_socket.rb#110 def client_gone; end - # source://actioncable/lib/action_cable/connection/client_socket.rb#90 + # source://actioncable/lib/action_cable/connection/client_socket.rb#92 def close(code = T.unsafe(nil), reason = T.unsafe(nil)); end # Returns the value of attribute env. # - # source://actioncable/lib/action_cable/connection/client_socket.rb#32 + # source://actioncable/lib/action_cable/connection/client_socket.rb#34 def env; end - # source://actioncable/lib/action_cable/connection/client_socket.rb#104 + # source://actioncable/lib/action_cable/connection/client_socket.rb#106 def parse(data); end - # source://actioncable/lib/action_cable/connection/client_socket.rb#116 + # source://actioncable/lib/action_cable/connection/client_socket.rb#118 def protocol; end - # source://actioncable/lib/action_cable/connection/client_socket.rb#69 + # source://actioncable/lib/action_cable/connection/client_socket.rb#71 def rack_response; end - # source://actioncable/lib/action_cable/connection/client_socket.rb#57 + # source://actioncable/lib/action_cable/connection/client_socket.rb#59 def start_driver; end - # source://actioncable/lib/action_cable/connection/client_socket.rb#80 + # source://actioncable/lib/action_cable/connection/client_socket.rb#82 def transmit(message); end # Returns the value of attribute url. # - # source://actioncable/lib/action_cable/connection/client_socket.rb#32 + # source://actioncable/lib/action_cable/connection/client_socket.rb#34 def url; end - # source://actioncable/lib/action_cable/connection/client_socket.rb#74 + # source://actioncable/lib/action_cable/connection/client_socket.rb#76 def write(data); end private - # source://actioncable/lib/action_cable/connection/client_socket.rb#140 + # source://actioncable/lib/action_cable/connection/client_socket.rb#142 def begin_close(reason, code); end - # source://actioncable/lib/action_cable/connection/client_socket.rb#134 + # source://actioncable/lib/action_cable/connection/client_socket.rb#136 def emit_error(message); end - # source://actioncable/lib/action_cable/connection/client_socket.rb#149 + # source://actioncable/lib/action_cable/connection/client_socket.rb#151 def finalize_close; end - # source://actioncable/lib/action_cable/connection/client_socket.rb#121 + # source://actioncable/lib/action_cable/connection/client_socket.rb#123 def open; end - # source://actioncable/lib/action_cable/connection/client_socket.rb#128 + # source://actioncable/lib/action_cable/connection/client_socket.rb#130 def receive_message(data); end class << self - # source://actioncable/lib/action_cable/connection/client_socket.rb#12 + # source://actioncable/lib/action_cable/connection/client_socket.rb#14 def determine_url(env); end # @return [Boolean] # - # source://actioncable/lib/action_cable/connection/client_socket.rb#17 + # source://actioncable/lib/action_cable/connection/client_socket.rb#19 def secure_request?(env); end end end -# source://actioncable/lib/action_cable/connection/client_socket.rb#30 +# source://actioncable/lib/action_cable/connection/client_socket.rb#32 ActionCable::Connection::ClientSocket::CLOSED = T.let(T.unsafe(nil), Integer) -# source://actioncable/lib/action_cable/connection/client_socket.rb#29 +# source://actioncable/lib/action_cable/connection/client_socket.rb#31 ActionCable::Connection::ClientSocket::CLOSING = T.let(T.unsafe(nil), Integer) -# source://actioncable/lib/action_cable/connection/client_socket.rb#27 +# source://actioncable/lib/action_cable/connection/client_socket.rb#29 ActionCable::Connection::ClientSocket::CONNECTING = T.let(T.unsafe(nil), Integer) -# source://actioncable/lib/action_cable/connection/client_socket.rb#28 +# source://actioncable/lib/action_cable/connection/client_socket.rb#30 ActionCable::Connection::ClientSocket::OPEN = T.let(T.unsafe(nil), Integer) -# source://actioncable/lib/action_cable/connection/identification.rb#7 +# source://actioncable/lib/action_cable/connection/identification.rb#9 module ActionCable::Connection::Identification extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -1533,14 +1575,15 @@ module ActionCable::Connection::Identification mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActionCable::Connection::Identification::ClassMethods - # Return a single connection identifier that combines the value of all the registered identifiers into a single gid. + # Return a single connection identifier that combines the value of all the + # registered identifiers into a single gid. # - # source://actioncable/lib/action_cable/connection/identification.rb#27 + # source://actioncable/lib/action_cable/connection/identification.rb#31 def connection_identifier; end private - # source://actioncable/lib/action_cable/connection/identification.rb#36 + # source://actioncable/lib/action_cable/connection/identification.rb#40 def connection_gid(ids); end module GeneratedClassMethods @@ -1556,340 +1599,345 @@ module ActionCable::Connection::Identification end end -# source://actioncable/lib/action_cable/connection/identification.rb#14 +# source://actioncable/lib/action_cable/connection/identification.rb#16 module ActionCable::Connection::Identification::ClassMethods - # Mark a key as being a connection identifier index that can then be used to find the specific connection again later. - # Common identifiers are current_user and current_account, but could be anything, really. + # Mark a key as being a connection identifier index that can then be used to + # find the specific connection again later. Common identifiers are current_user + # and current_account, but could be anything, really. # - # Note that anything marked as an identifier will automatically create a delegate by the same name on any - # channel instances created off the connection. + # Note that anything marked as an identifier will automatically create a + # delegate by the same name on any channel instances created off the connection. # - # source://actioncable/lib/action_cable/connection/identification.rb#20 + # source://actioncable/lib/action_cable/connection/identification.rb#23 def identified_by(*identifiers); end end -# = Action Cable \InternalChannel +# # Action Cable InternalChannel # -# Makes it possible for the RemoteConnection to disconnect a specific connection. +# Makes it possible for the RemoteConnection to disconnect a specific +# connection. # -# source://actioncable/lib/action_cable/connection/internal_channel.rb#8 +# source://actioncable/lib/action_cable/connection/internal_channel.rb#11 module ActionCable::Connection::InternalChannel extend ::ActiveSupport::Concern private - # source://actioncable/lib/action_cable/connection/internal_channel.rb#12 + # source://actioncable/lib/action_cable/connection/internal_channel.rb#15 def internal_channel; end - # source://actioncable/lib/action_cable/connection/internal_channel.rb#33 + # source://actioncable/lib/action_cable/connection/internal_channel.rb#36 def process_internal_message(message); end - # source://actioncable/lib/action_cable/connection/internal_channel.rb#16 + # source://actioncable/lib/action_cable/connection/internal_channel.rb#19 def subscribe_to_internal_channel; end - # source://actioncable/lib/action_cable/connection/internal_channel.rb#27 + # source://actioncable/lib/action_cable/connection/internal_channel.rb#30 def unsubscribe_from_internal_channel; end end -# Allows us to buffer messages received from the WebSocket before the Connection has been fully initialized, and is ready to receive them. +# Allows us to buffer messages received from the WebSocket before the Connection +# has been fully initialized, and is ready to receive them. # -# source://actioncable/lib/action_cable/connection/message_buffer.rb#6 +# source://actioncable/lib/action_cable/connection/message_buffer.rb#9 class ActionCable::Connection::MessageBuffer # @return [MessageBuffer] a new instance of MessageBuffer # - # source://actioncable/lib/action_cable/connection/message_buffer.rb#7 + # source://actioncable/lib/action_cable/connection/message_buffer.rb#10 def initialize(connection); end - # source://actioncable/lib/action_cable/connection/message_buffer.rb#12 + # source://actioncable/lib/action_cable/connection/message_buffer.rb#15 def append(message); end - # source://actioncable/lib/action_cable/connection/message_buffer.rb#28 + # source://actioncable/lib/action_cable/connection/message_buffer.rb#31 def process!; end # @return [Boolean] # - # source://actioncable/lib/action_cable/connection/message_buffer.rb#24 + # source://actioncable/lib/action_cable/connection/message_buffer.rb#27 def processing?; end private - # source://actioncable/lib/action_cable/connection/message_buffer.rb#45 + # source://actioncable/lib/action_cable/connection/message_buffer.rb#48 def buffer(message); end # Returns the value of attribute buffered_messages. # - # source://actioncable/lib/action_cable/connection/message_buffer.rb#35 + # source://actioncable/lib/action_cable/connection/message_buffer.rb#38 def buffered_messages; end # Returns the value of attribute connection. # - # source://actioncable/lib/action_cable/connection/message_buffer.rb#34 + # source://actioncable/lib/action_cable/connection/message_buffer.rb#37 def connection; end - # source://actioncable/lib/action_cable/connection/message_buffer.rb#41 + # source://actioncable/lib/action_cable/connection/message_buffer.rb#44 def receive(message); end - # source://actioncable/lib/action_cable/connection/message_buffer.rb#49 + # source://actioncable/lib/action_cable/connection/message_buffer.rb#52 def receive_buffered_messages; end # @return [Boolean] # - # source://actioncable/lib/action_cable/connection/message_buffer.rb#37 + # source://actioncable/lib/action_cable/connection/message_buffer.rb#40 def valid?(message); end end -# source://actioncable/lib/action_cable/connection/test_case.rb#12 +# source://actioncable/lib/action_cable/connection/test_case.rb#14 class ActionCable::Connection::NonInferrableConnectionError < ::StandardError # @return [NonInferrableConnectionError] a new instance of NonInferrableConnectionError # - # source://actioncable/lib/action_cable/connection/test_case.rb#13 + # source://actioncable/lib/action_cable/connection/test_case.rb#15 def initialize(name); end end -# source://actioncable/lib/action_cable/connection/stream.rb#9 +# source://actioncable/lib/action_cable/connection/stream.rb#11 class ActionCable::Connection::Stream # @return [Stream] a new instance of Stream # - # source://actioncable/lib/action_cable/connection/stream.rb#10 + # source://actioncable/lib/action_cable/connection/stream.rb#12 def initialize(event_loop, socket); end - # source://actioncable/lib/action_cable/connection/stream.rb#26 + # source://actioncable/lib/action_cable/connection/stream.rb#28 def close; end - # source://actioncable/lib/action_cable/connection/stream.rb#22 + # source://actioncable/lib/action_cable/connection/stream.rb#24 def each(&callback); end - # source://actioncable/lib/action_cable/connection/stream.rb#70 + # source://actioncable/lib/action_cable/connection/stream.rb#72 def flush_write_buffer; end - # source://actioncable/lib/action_cable/connection/stream.rb#96 + # source://actioncable/lib/action_cable/connection/stream.rb#98 def hijack_rack_socket; end - # source://actioncable/lib/action_cable/connection/stream.rb#92 + # source://actioncable/lib/action_cable/connection/stream.rb#94 def receive(data); end - # source://actioncable/lib/action_cable/connection/stream.rb#31 + # source://actioncable/lib/action_cable/connection/stream.rb#33 def shutdown; end - # source://actioncable/lib/action_cable/connection/stream.rb#35 + # source://actioncable/lib/action_cable/connection/stream.rb#37 def write(data); end private - # source://actioncable/lib/action_cable/connection/stream.rb#108 + # source://actioncable/lib/action_cable/connection/stream.rb#110 def clean_rack_hijack; end end -# source://actioncable/lib/action_cable/connection/stream_event_loop.rb#7 +# source://actioncable/lib/action_cable/connection/stream_event_loop.rb#9 class ActionCable::Connection::StreamEventLoop # @return [StreamEventLoop] a new instance of StreamEventLoop # - # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#8 + # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#10 def initialize; end - # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#28 + # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#30 def attach(io, stream); end - # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#36 + # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#38 def detach(io, stream); end - # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#21 + # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#23 def post(task = T.unsafe(nil), &block); end - # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#54 + # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#56 def stop; end - # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#17 + # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#19 def timer(interval, &block); end - # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#45 + # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#47 def writes_pending(io); end private - # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#84 + # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#86 def run; end - # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#60 + # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#62 def spawn; end - # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#80 + # source://actioncable/lib/action_cable/connection/stream_event_loop.rb#82 def wakeup; end end -# = Action Cable \Connection \Subscriptions +# # Action Cable Connection Subscriptions # -# Collection class for all the channel subscriptions established on a given connection. Responsible for routing incoming commands that arrive on -# the connection to the proper channel. +# Collection class for all the channel subscriptions established on a given +# connection. Responsible for routing incoming commands that arrive on the +# connection to the proper channel. # -# source://actioncable/lib/action_cable/connection/subscriptions.rb#11 +# source://actioncable/lib/action_cable/connection/subscriptions.rb#14 class ActionCable::Connection::Subscriptions # @return [Subscriptions] a new instance of Subscriptions # - # source://actioncable/lib/action_cable/connection/subscriptions.rb#12 + # source://actioncable/lib/action_cable/connection/subscriptions.rb#15 def initialize(connection); end - # source://actioncable/lib/action_cable/connection/subscriptions.rb#30 + # source://actioncable/lib/action_cable/connection/subscriptions.rb#33 def add(data); end - # source://actioncable/lib/action_cable/connection/subscriptions.rb#17 + # source://actioncable/lib/action_cable/connection/subscriptions.rb#20 def execute_command(data); end - # source://actioncable/lib/action_cable/connection/subscriptions.rb#61 + # source://actioncable/lib/action_cable/connection/subscriptions.rb#64 def identifiers; end - # source://actioncable/lib/action_cable/connection/subscriptions.rb#71 + # source://actioncable/lib/action_cable/connection/subscriptions.rb#74 def logger(*_arg0, **_arg1, &_arg2); end - # source://actioncable/lib/action_cable/connection/subscriptions.rb#57 + # source://actioncable/lib/action_cable/connection/subscriptions.rb#60 def perform_action(data); end - # source://actioncable/lib/action_cable/connection/subscriptions.rb#47 + # source://actioncable/lib/action_cable/connection/subscriptions.rb#50 def remove(data); end - # source://actioncable/lib/action_cable/connection/subscriptions.rb#52 + # source://actioncable/lib/action_cable/connection/subscriptions.rb#55 def remove_subscription(subscription); end - # source://actioncable/lib/action_cable/connection/subscriptions.rb#65 + # source://actioncable/lib/action_cable/connection/subscriptions.rb#68 def unsubscribe_from_all; end private # Returns the value of attribute connection. # - # source://actioncable/lib/action_cable/connection/subscriptions.rb#70 + # source://actioncable/lib/action_cable/connection/subscriptions.rb#73 def connection; end - # source://actioncable/lib/action_cable/connection/subscriptions.rb#73 + # source://actioncable/lib/action_cable/connection/subscriptions.rb#76 def find(data); end # Returns the value of attribute subscriptions. # - # source://actioncable/lib/action_cable/connection/subscriptions.rb#70 + # source://actioncable/lib/action_cable/connection/subscriptions.rb#73 def subscriptions; end end -# = Action Cable \Connection \TaggedLoggerProxy +# # Action Cable Connection TaggedLoggerProxy # -# Allows the use of per-connection tags against the server logger. This wouldn't work using the traditional -# ActiveSupport::TaggedLogging enhanced Rails.logger, as that logger will reset the tags between requests. -# The connection is long-lived, so it needs its own set of tags for its independent duration. +# Allows the use of per-connection tags against the server logger. This wouldn't +# work using the traditional ActiveSupport::TaggedLogging enhanced Rails.logger, +# as that logger will reset the tags between requests. The connection is +# long-lived, so it needs its own set of tags for its independent duration. # -# source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#10 +# source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#13 class ActionCable::Connection::TaggedLoggerProxy # @return [TaggedLoggerProxy] a new instance of TaggedLoggerProxy # - # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#13 + # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#16 def initialize(logger, tags:); end - # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#18 + # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#21 def add_tags(*tags); end - # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#33 + # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#36 def debug(message = T.unsafe(nil), &block); end - # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#33 + # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#36 def error(message = T.unsafe(nil), &block); end - # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#33 + # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#36 def fatal(message = T.unsafe(nil), &block); end - # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#33 + # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#36 def info(message = T.unsafe(nil), &block); end - # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#23 + # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#26 def tag(logger, &block); end # Returns the value of attribute tags. # - # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#11 + # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#14 def tags; end - # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#33 + # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#36 def unknown(message = T.unsafe(nil), &block); end - # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#33 + # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#36 def warn(message = T.unsafe(nil), &block); end private - # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#39 + # source://actioncable/lib/action_cable/connection/tagged_logger_proxy.rb#42 def log(type, message, &block); end end -# = Action Cable \Connection \TestCase +# # Action Cable Connection TestCase # # Unit test Action Cable connections. # -# Useful to check whether a connection's +identified_by+ gets assigned properly +# Useful to check whether a connection's `identified_by` gets assigned properly # and that any improper connection requests are rejected. # -# == Basic example +# ## Basic example # # Unit tests are written as follows: # -# 1. Simulate a connection attempt by calling +connect+. -# 2. Assert state, e.g. identifiers, has been assigned. +# 1. Simulate a connection attempt by calling `connect`. +# 2. Assert state, e.g. identifiers, has been assigned. # # -# class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase -# def test_connects_with_proper_cookie -# # Simulate the connection request with a cookie. -# cookies["user_id"] = users(:john).id +# class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase +# def test_connects_with_proper_cookie +# # Simulate the connection request with a cookie. +# cookies["user_id"] = users(:john).id # -# connect +# connect # -# # Assert the connection identifier matches the fixture. -# assert_equal users(:john).id, connection.user.id -# end +# # Assert the connection identifier matches the fixture. +# assert_equal users(:john).id, connection.user.id +# end # -# def test_rejects_connection_without_proper_cookie -# assert_reject_connection { connect } +# def test_rejects_connection_without_proper_cookie +# assert_reject_connection { connect } +# end # end -# end # -# +connect+ accepts additional information about the HTTP request with the -# +params+, +headers+, +session+, and Rack +env+ options. +# `connect` accepts additional information about the HTTP request with the +# `params`, `headers`, `session`, and Rack `env` options. # -# def test_connect_with_headers_and_query_string -# connect params: { user_id: 1 }, headers: { "X-API-TOKEN" => "secret-my" } +# def test_connect_with_headers_and_query_string +# connect params: { user_id: 1 }, headers: { "X-API-TOKEN" => "secret-my" } # -# assert_equal "1", connection.user.id -# assert_equal "secret-my", connection.token -# end +# assert_equal "1", connection.user.id +# assert_equal "secret-my", connection.token +# end # -# def test_connect_with_params -# connect params: { user_id: 1 } +# def test_connect_with_params +# connect params: { user_id: 1 } # -# assert_equal "1", connection.user.id -# end +# assert_equal "1", connection.user.id +# end # # You can also set up the correct cookies before the connection request: # -# def test_connect_with_cookies -# # Plain cookies: -# cookies["user_id"] = 1 +# def test_connect_with_cookies +# # Plain cookies: +# cookies["user_id"] = 1 # -# # Or signed/encrypted: -# # cookies.signed["user_id"] = 1 -# # cookies.encrypted["user_id"] = 1 +# # Or signed/encrypted: +# # cookies.signed["user_id"] = 1 +# # cookies.encrypted["user_id"] = 1 # -# connect +# connect # -# assert_equal "1", connection.user_id -# end +# assert_equal "1", connection.user_id +# end # -# == \Connection is automatically inferred +# ## Connection is automatically inferred # -# ActionCable::Connection::TestCase will automatically infer the connection under test -# from the test class name. If the channel cannot be inferred from the test -# class name, you can explicitly set it with +tests+. +# ActionCable::Connection::TestCase will automatically infer the connection +# under test from the test class name. If the channel cannot be inferred from +# the test class name, you can explicitly set it with `tests`. # -# class ConnectionTest < ActionCable::Connection::TestCase -# tests ApplicationCable::Connection -# end +# class ConnectionTest < ActionCable::Connection::TestCase +# tests ApplicationCable::Connection +# end # -# source://actioncable/lib/action_cable/connection/test_case.rb#131 +# source://actioncable/lib/action_cable/connection/test_case.rb#141 class ActionCable::Connection::TestCase < ::ActiveSupport::TestCase include ::ActiveSupport::Testing::ConstantLookup include ::ActionCable::Connection::Assertions @@ -1897,31 +1945,31 @@ class ActionCable::Connection::TestCase < ::ActiveSupport::TestCase extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods extend ::ActionCable::Connection::TestCase::Behavior::ClassMethods - # source://actioncable/lib/action_cable/connection/test_case.rb#141 + # source://actioncable/lib/action_cable/connection/test_case.rb#151 def _connection_class; end - # source://actioncable/lib/action_cable/connection/test_case.rb#141 + # source://actioncable/lib/action_cable/connection/test_case.rb#151 def _connection_class=(_arg0); end - # source://actioncable/lib/action_cable/connection/test_case.rb#141 + # source://actioncable/lib/action_cable/connection/test_case.rb#151 def _connection_class?; end - # source://actioncable/lib/action_cable/connection/test_case.rb#143 + # source://actioncable/lib/action_cable/connection/test_case.rb#153 def connection; end class << self - # source://actioncable/lib/action_cable/connection/test_case.rb#141 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _connection_class; end - # source://actioncable/lib/action_cable/connection/test_case.rb#141 - def _connection_class=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _connection_class=(new_value); end - # source://actioncable/lib/action_cable/connection/test_case.rb#141 + # source://actioncable/lib/action_cable/connection/test_case.rb#151 def _connection_class?; end end end -# source://actioncable/lib/action_cable/connection/test_case.rb#132 +# source://actioncable/lib/action_cable/connection/test_case.rb#142 module ActionCable::Connection::TestCase::Behavior include ::ActionCable::Connection::Assertions extend ::ActiveSupport::Concern @@ -1936,25 +1984,25 @@ module ActionCable::Connection::TestCase::Behavior # # Accepts request path as the first argument and the following request options: # - # - params – URL parameters (Hash) - # - headers – request headers (Hash) - # - session – session data (Hash) - # - env – additional Rack env configuration (Hash) + # * params – URL parameters (Hash) + # * headers – request headers (Hash) + # * session – session data (Hash) + # * env – additional Rack env configuration (Hash) # - # source://actioncable/lib/action_cable/connection/test_case.rb#185 + # source://actioncable/lib/action_cable/connection/test_case.rb#195 def connect(path = T.unsafe(nil), **request_params); end - # source://actioncable/lib/action_cable/connection/test_case.rb#205 + # source://actioncable/lib/action_cable/connection/test_case.rb#215 def cookies; end # Exert #disconnect on the connection under test. # - # source://actioncable/lib/action_cable/connection/test_case.rb#198 + # source://actioncable/lib/action_cable/connection/test_case.rb#208 def disconnect; end private - # source://actioncable/lib/action_cable/connection/test_case.rb#210 + # source://actioncable/lib/action_cable/connection/test_case.rb#220 def build_test_request(path, params: T.unsafe(nil), headers: T.unsafe(nil), session: T.unsafe(nil), env: T.unsafe(nil)); end module GeneratedClassMethods @@ -1970,214 +2018,224 @@ module ActionCable::Connection::TestCase::Behavior end end -# source://actioncable/lib/action_cable/connection/test_case.rb#148 +# source://actioncable/lib/action_cable/connection/test_case.rb#158 module ActionCable::Connection::TestCase::Behavior::ClassMethods - # source://actioncable/lib/action_cable/connection/test_case.rb#160 + # source://actioncable/lib/action_cable/connection/test_case.rb#170 def connection_class; end # @raise [NonInferrableConnectionError] # - # source://actioncable/lib/action_cable/connection/test_case.rb#168 + # source://actioncable/lib/action_cable/connection/test_case.rb#178 def determine_default_connection(name); end - # source://actioncable/lib/action_cable/connection/test_case.rb#149 + # source://actioncable/lib/action_cable/connection/test_case.rb#159 def tests(connection); end end -# source://actioncable/lib/action_cable/connection/test_case.rb#135 +# source://actioncable/lib/action_cable/connection/test_case.rb#145 ActionCable::Connection::TestCase::Behavior::DEFAULT_PATH = T.let(T.unsafe(nil), String) -# source://actioncable/lib/action_cable/connection/test_case.rb#47 +# source://actioncable/lib/action_cable/connection/test_case.rb#57 module ActionCable::Connection::TestConnection - # source://actioncable/lib/action_cable/connection/test_case.rb#50 + # source://actioncable/lib/action_cable/connection/test_case.rb#60 def initialize(request); end # Returns the value of attribute logger. # - # source://actioncable/lib/action_cable/connection/test_case.rb#48 + # source://actioncable/lib/action_cable/connection/test_case.rb#58 def logger; end # Returns the value of attribute request. # - # source://actioncable/lib/action_cable/connection/test_case.rb#48 + # source://actioncable/lib/action_cable/connection/test_case.rb#58 def request; end end -# We don't want to use the whole "encryption stack" for connection -# unit-tests, but we want to make sure that users test against the correct types -# of cookies (i.e. signed or encrypted or plain) +# We don't want to use the whole "encryption stack" for connection unit-tests, +# but we want to make sure that users test against the correct types of cookies +# (i.e. signed or encrypted or plain) # -# source://actioncable/lib/action_cable/connection/test_case.rb#33 -class ActionCable::Connection::TestCookieJar < ::ActiveSupport::HashWithIndifferentAccess - # source://actioncable/lib/action_cable/connection/test_case.rb#38 +# source://actioncable/lib/action_cable/connection/test_case.rb#43 +class ActionCable::Connection::TestCookieJar < ::ActionCable::Connection::TestCookies + # source://actioncable/lib/action_cable/connection/test_case.rb#48 def encrypted; end - # source://actioncable/lib/action_cable/connection/test_case.rb#34 + # source://actioncable/lib/action_cable/connection/test_case.rb#44 def signed; end end -# source://actioncable/lib/action_cable/connection/test_case.rb#43 +# source://actioncable/lib/action_cable/connection/test_case.rb#33 +class ActionCable::Connection::TestCookies < ::ActiveSupport::HashWithIndifferentAccess + # source://actioncable/lib/action_cable/connection/test_case.rb#34 + def []=(name, options); end +end + +# source://actioncable/lib/action_cable/connection/test_case.rb#53 class ActionCable::Connection::TestRequest < ::ActionDispatch::TestRequest # Returns the value of attribute cookie_jar. # - # source://actioncable/lib/action_cable/connection/test_case.rb#44 + # source://actioncable/lib/action_cable/connection/test_case.rb#54 def cookie_jar; end # Sets the attribute cookie_jar # # @param value the value to set the attribute cookie_jar to. # - # source://actioncable/lib/action_cable/connection/test_case.rb#44 + # source://actioncable/lib/action_cable/connection/test_case.rb#54 def cookie_jar=(_arg0); end # Returns the value of attribute session. # - # source://actioncable/lib/action_cable/connection/test_case.rb#44 + # source://actioncable/lib/action_cable/connection/test_case.rb#54 def session; end # Sets the attribute session # # @param value the value to set the attribute session to. # - # source://actioncable/lib/action_cable/connection/test_case.rb#44 + # source://actioncable/lib/action_cable/connection/test_case.rb#54 def session=(_arg0); end end -# = Action Cable \Connection \WebSocket +# # Action Cable Connection WebSocket # # Wrap the real socket to minimize the externally-presented API # -# source://actioncable/lib/action_cable/connection/web_socket.rb#10 +# source://actioncable/lib/action_cable/connection/web_socket.rb#12 class ActionCable::Connection::WebSocket # @return [WebSocket] a new instance of WebSocket # - # source://actioncable/lib/action_cable/connection/web_socket.rb#11 + # source://actioncable/lib/action_cable/connection/web_socket.rb#13 def initialize(env, event_target, event_loop, protocols: T.unsafe(nil)); end # @return [Boolean] # - # source://actioncable/lib/action_cable/connection/web_socket.rb#19 + # source://actioncable/lib/action_cable/connection/web_socket.rb#21 def alive?; end - # source://actioncable/lib/action_cable/connection/web_socket.rb#27 - def close; end + # source://actioncable/lib/action_cable/connection/web_socket.rb#29 + def close(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://actioncable/lib/action_cable/connection/web_socket.rb#15 + # source://actioncable/lib/action_cable/connection/web_socket.rb#17 def possible?; end - # source://actioncable/lib/action_cable/connection/web_socket.rb#31 + # source://actioncable/lib/action_cable/connection/web_socket.rb#33 def protocol; end - # source://actioncable/lib/action_cable/connection/web_socket.rb#35 + # source://actioncable/lib/action_cable/connection/web_socket.rb#37 def rack_response; end - # source://actioncable/lib/action_cable/connection/web_socket.rb#23 - def transmit(data); end + # source://actioncable/lib/action_cable/connection/web_socket.rb#25 + def transmit(*_arg0, **_arg1, &_arg2); end private # Returns the value of attribute websocket. # - # source://actioncable/lib/action_cable/connection/web_socket.rb#40 + # source://actioncable/lib/action_cable/connection/web_socket.rb#42 def websocket; end end -# source://actioncable/lib/action_cable/engine.rb#8 +# source://actioncable/lib/action_cable/engine.rb#10 class ActionCable::Engine < ::Rails::Engine class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end end end -# source://actioncable/lib/action_cable/helpers/action_cable_helper.rb#4 +# source://actioncable/lib/action_cable/helpers/action_cable_helper.rb#6 module ActionCable::Helpers; end -# source://actioncable/lib/action_cable/helpers/action_cable_helper.rb#5 +# source://actioncable/lib/action_cable/helpers/action_cable_helper.rb#7 module ActionCable::Helpers::ActionCableHelper - # Returns an "action-cable-url" meta tag with the value of the URL specified in your - # configuration. Ensure this is above your JavaScript tag: + # Returns an "action-cable-url" meta tag with the value of the URL specified in + # your configuration. Ensure this is above your JavaScript tag: # - # - # <%= action_cable_meta_tag %> - # <%= javascript_include_tag 'application', 'data-turbo-track' => 'reload' %> - # + # + # <%= action_cable_meta_tag %> + # <%= javascript_include_tag 'application', 'data-turbo-track' => 'reload' %> + # # - # This is then used by Action Cable to determine the URL of your WebSocket server. - # Your JavaScript can then connect to the server without needing to specify the - # URL directly: + # This is then used by Action Cable to determine the URL of your WebSocket + # server. Your JavaScript can then connect to the server without needing to + # specify the URL directly: # - # import Cable from "@rails/actioncable" - # window.Cable = Cable - # window.App = {} - # App.cable = Cable.createConsumer() + # import Cable from "@rails/actioncable" + # window.Cable = Cable + # window.App = {} + # App.cable = Cable.createConsumer() # # Make sure to specify the correct server location in each of your environment # config files: # - # config.action_cable.mount_path = "/cable123" - # <%= action_cable_meta_tag %> would render: - # => + # config.action_cable.mount_path = "/cable123" + # <%= action_cable_meta_tag %> would render: + # => # - # config.action_cable.url = "ws://actioncable.com" - # <%= action_cable_meta_tag %> would render: - # => + # config.action_cable.url = "ws://actioncable.com" + # <%= action_cable_meta_tag %> would render: + # => # - # source://actioncable/lib/action_cable/helpers/action_cable_helper.rb#34 + # source://actioncable/lib/action_cable/helpers/action_cable_helper.rb#36 def action_cable_meta_tag; end end -# source://actioncable/lib/action_cable.rb#52 +# source://actioncable/lib/action_cable.rb#58 ActionCable::INTERNAL = T.let(T.unsafe(nil), Hash) -# = Action Cable Remote Connections +# # Action Cable Remote Connections # # If you need to disconnect a given connection, you can go through the # RemoteConnections. You can find the connections you're looking for by # searching for the identifier declared on the connection. For example: # -# module ApplicationCable -# class Connection < ActionCable::Connection::Base -# identified_by :current_user -# .... +# module ApplicationCable +# class Connection < ActionCable::Connection::Base +# identified_by :current_user +# .... +# end # end -# end # -# ActionCable.server.remote_connections.where(current_user: User.find(1)).disconnect +# ActionCable.server.remote_connections.where(current_user: User.find(1)).disconnect # -# This will disconnect all the connections established for -# User.find(1), across all servers running on all machines, because -# it uses the internal channel that all of these servers are subscribed to. +# This will disconnect all the connections established for `User.find(1)`, +# across all servers running on all machines, because it uses the internal +# channel that all of these servers are subscribed to. # -# By default, server sends a "disconnect" message with "reconnect" flag set to true. -# You can override it by specifying the +reconnect+ option: +# By default, server sends a "disconnect" message with "reconnect" flag set to +# true. You can override it by specifying the `reconnect` option: # -# ActionCable.server.remote_connections.where(current_user: User.find(1)).disconnect(reconnect: false) +# ActionCable.server.remote_connections.where(current_user: User.find(1)).disconnect(reconnect: false) # -# source://actioncable/lib/action_cable/remote_connections.rb#29 +# source://actioncable/lib/action_cable/remote_connections.rb#31 class ActionCable::RemoteConnections # @return [RemoteConnections] a new instance of RemoteConnections # - # source://actioncable/lib/action_cable/remote_connections.rb#32 + # source://actioncable/lib/action_cable/remote_connections.rb#34 def initialize(server); end # Returns the value of attribute server. # - # source://actioncable/lib/action_cable/remote_connections.rb#30 + # source://actioncable/lib/action_cable/remote_connections.rb#32 def server; end - # source://actioncable/lib/action_cable/remote_connections.rb#36 + # source://actioncable/lib/action_cable/remote_connections.rb#38 def where(identifier); end end -# = Action Cable Remote \Connection +# # Action Cable Remote Connection # -# Represents a single remote connection found via ActionCable.server.remote_connections.where(*). -# Exists solely for the purpose of calling #disconnect on that connection. +# Represents a single remote connection found via +# `ActionCable.server.remote_connections.where(*)`. Exists solely for the +# purpose of calling #disconnect on that connection. # -# source://actioncable/lib/action_cable/remote_connections.rb#45 +# source://actioncable/lib/action_cable/remote_connections.rb#47 class ActionCable::RemoteConnections::RemoteConnection include ::ActionCable::Connection::InternalChannel include ::ActionCable::Connection::Identification @@ -2185,429 +2243,448 @@ class ActionCable::RemoteConnections::RemoteConnection # @return [RemoteConnection] a new instance of RemoteConnection # - # source://actioncable/lib/action_cable/remote_connections.rb#50 + # source://actioncable/lib/action_cable/remote_connections.rb#52 def initialize(server, ids); end # Uses the internal channel to disconnect the connection. # - # source://actioncable/lib/action_cable/remote_connections.rb#56 + # source://actioncable/lib/action_cable/remote_connections.rb#58 def disconnect(reconnect: T.unsafe(nil)); end - # source://actioncable/lib/action_cable/remote_connections.rb#61 + # source://actioncable/lib/action_cable/remote_connections.rb#63 def identifiers; end - # source://actioncable/lib/action_cable/connection/identification.rb#11 + # source://actioncable/lib/action_cable/connection/identification.rb#13 def identifiers=(_arg0); end - # source://actioncable/lib/action_cable/connection/identification.rb#11 + # source://actioncable/lib/action_cable/connection/identification.rb#13 def identifiers?; end protected # Returns the value of attribute server. # - # source://actioncable/lib/action_cable/remote_connections.rb#66 + # source://actioncable/lib/action_cable/remote_connections.rb#68 def server; end private # @raise [InvalidIdentifiersError] # - # source://actioncable/lib/action_cable/remote_connections.rb#69 + # source://actioncable/lib/action_cable/remote_connections.rb#71 def set_identifier_instance_vars(ids); end # @return [Boolean] # - # source://actioncable/lib/action_cable/remote_connections.rb#74 + # source://actioncable/lib/action_cable/remote_connections.rb#76 def valid_identifiers?(ids); end class << self - # source://actioncable/lib/action_cable/connection/identification.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def identifiers; end - # source://actioncable/lib/action_cable/connection/identification.rb#11 - def identifiers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def identifiers=(new_value); end - # source://actioncable/lib/action_cable/connection/identification.rb#11 + # source://actioncable/lib/action_cable/connection/identification.rb#13 def identifiers?; end end end -# source://actioncable/lib/action_cable/remote_connections.rb#46 +# source://actioncable/lib/action_cable/remote_connections.rb#48 class ActionCable::RemoteConnections::RemoteConnection::InvalidIdentifiersError < ::StandardError; end -# source://actioncable/lib/action_cable/server/base.rb#6 +# source://actioncable/lib/action_cable/server/base.rb#8 module ActionCable::Server; end -# = Action Cable \Server \Base +# # Action Cable Server Base # -# A singleton ActionCable::Server instance is available via ActionCable.server. It's used by the Rack process that starts the Action Cable server, but -# is also used by the user to reach the RemoteConnections object, which is used for finding and disconnecting connections across all servers. +# A singleton ActionCable::Server instance is available via ActionCable.server. +# It's used by the Rack process that starts the Action Cable server, but is also +# used by the user to reach the RemoteConnections object, which is used for +# finding and disconnecting connections across all servers. # -# Also, this is the server instance used for broadcasting. See Broadcasting for more information. +# Also, this is the server instance used for broadcasting. See Broadcasting for +# more information. # -# source://actioncable/lib/action_cable/server/base.rb#13 +# source://actioncable/lib/action_cable/server/base.rb#18 class ActionCable::Server::Base include ::ActionCable::Server::Broadcasting include ::ActionCable::Server::Connections # @return [Base] a new instance of Base # - # source://actioncable/lib/action_cable/server/base.rb#26 + # source://actioncable/lib/action_cable/server/base.rb#31 def initialize(config: T.unsafe(nil)); end # Called by Rack to set up the server. # - # source://actioncable/lib/action_cable/server/base.rb#33 + # source://actioncable/lib/action_cable/server/base.rb#38 def call(env); end # Returns the value of attribute config. # - # source://actioncable/lib/action_cable/server/base.rb#19 + # source://actioncable/lib/action_cable/server/base.rb#24 def config; end - # All of the identifiers applied to the connection class associated with this server. + # All of the identifiers applied to the connection class associated with this + # server. # - # source://actioncable/lib/action_cable/server/base.rb#90 + # source://actioncable/lib/action_cable/server/base.rb#102 def connection_identifiers; end - # Disconnect all the connections identified by +identifiers+ on this server or any others via RemoteConnections. + # Disconnect all the connections identified by `identifiers` on this server or + # any others via RemoteConnections. # - # source://actioncable/lib/action_cable/server/base.rb#40 + # source://actioncable/lib/action_cable/server/base.rb#46 def disconnect(identifiers); end - # source://actioncable/lib/action_cable/server/base.rb#65 + # source://actioncable/lib/action_cable/server/base.rb#71 def event_loop; end - # source://actioncable/lib/action_cable/server/base.rb#22 + # source://actioncable/lib/action_cable/server/base.rb#27 def logger(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute mutex. # - # source://actioncable/lib/action_cable/server/base.rb#24 + # source://actioncable/lib/action_cable/server/base.rb#29 def mutex; end # Adapter used for all streams/broadcasting. # - # source://actioncable/lib/action_cable/server/base.rb#85 + # source://actioncable/lib/action_cable/server/base.rb#96 def pubsub; end # Gateway to RemoteConnections. See that class for details. # - # source://actioncable/lib/action_cable/server/base.rb#61 + # source://actioncable/lib/action_cable/server/base.rb#67 def remote_connections; end - # source://actioncable/lib/action_cable/server/base.rb#44 + # source://actioncable/lib/action_cable/server/base.rb#50 def restart; end - # The worker pool is where we run connection callbacks and channel actions. We do as little as possible on the server's main thread. - # The worker pool is an executor service that's backed by a pool of threads working from a task queue. The thread pool size maxes out - # at 4 worker threads by default. Tune the size yourself with config.action_cable.worker_pool_size. + # The worker pool is where we run connection callbacks and channel actions. We + # do as little as possible on the server's main thread. The worker pool is an + # executor service that's backed by a pool of threads working from a task queue. + # The thread pool size maxes out at 4 worker threads by default. Tune the size + # yourself with `config.action_cable.worker_pool_size`. # - # Using Active Record, Redis, etc within your channel actions means you'll get a separate connection from each thread in the worker pool. - # Plan your deployment accordingly: 5 servers each running 5 Puma workers each running an 8-thread worker pool means at least 200 database - # connections. + # Using Active Record, Redis, etc within your channel actions means you'll get a + # separate connection from each thread in the worker pool. Plan your deployment + # accordingly: 5 servers each running 5 Puma workers each running an 8-thread + # worker pool means at least 200 database connections. # - # Also, ensure that your database connection pool size is as least as large as your worker pool size. Otherwise, workers may oversubscribe - # the database connection pool and block while they wait for other workers to release their connections. Use a smaller worker pool or a larger - # database connection pool instead. + # Also, ensure that your database connection pool size is as least as large as + # your worker pool size. Otherwise, workers may oversubscribe the database + # connection pool and block while they wait for other workers to release their + # connections. Use a smaller worker pool or a larger database connection pool + # instead. # - # source://actioncable/lib/action_cable/server/base.rb#80 + # source://actioncable/lib/action_cable/server/base.rb#91 def worker_pool; end class << self - # source://actioncable/lib/action_cable/server/base.rb#17 + # source://actioncable/lib/action_cable/server/base.rb#22 def config; end - # source://actioncable/lib/action_cable/server/base.rb#17 + # source://actioncable/lib/action_cable/server/base.rb#22 def config=(val); end - # source://actioncable/lib/action_cable/server/base.rb#21 + # source://actioncable/lib/action_cable/server/base.rb#26 def logger; end end end -# = Action Cable \Server \Broadcasting +# # Action Cable Server Broadcasting # -# Broadcasting is how other parts of your application can send messages to a channel's subscribers. As explained in Channel, most of the time, these -# broadcastings are streamed directly to the clients subscribed to the named broadcasting. Let's explain with a full-stack example: +# Broadcasting is how other parts of your application can send messages to a +# channel's subscribers. As explained in Channel, most of the time, these +# broadcastings are streamed directly to the clients subscribed to the named +# broadcasting. Let's explain with a full-stack example: # -# class WebNotificationsChannel < ApplicationCable::Channel -# def subscribed -# stream_from "web_notifications_#{current_user.id}" +# class WebNotificationsChannel < ApplicationCable::Channel +# def subscribed +# stream_from "web_notifications_#{current_user.id}" +# end # end -# end # -# # Somewhere in your app this is called, perhaps from a NewCommentJob: -# ActionCable.server.broadcast \ -# "web_notifications_1", { title: "New things!", body: "All that's fit for print" } +# # Somewhere in your app this is called, perhaps from a NewCommentJob: +# ActionCable.server.broadcast \ +# "web_notifications_1", { title: "New things!", body: "All that's fit for print" } # -# # Client-side CoffeeScript, which assumes you've already requested the right to send web notifications: -# App.cable.subscriptions.create "WebNotificationsChannel", -# received: (data) -> -# new Notification data['title'], body: data['body'] +# # Client-side CoffeeScript, which assumes you've already requested the right to send web notifications: +# App.cable.subscriptions.create "WebNotificationsChannel", +# received: (data) -> +# new Notification data['title'], body: data['body'] # -# source://actioncable/lib/action_cable/server/broadcasting.rb#24 +# source://actioncable/lib/action_cable/server/broadcasting.rb#28 module ActionCable::Server::Broadcasting - # Broadcast a hash directly to a named broadcasting. This will later be JSON encoded. + # Broadcast a hash directly to a named `broadcasting`. This will later be JSON + # encoded. # - # source://actioncable/lib/action_cable/server/broadcasting.rb#26 + # source://actioncable/lib/action_cable/server/broadcasting.rb#31 def broadcast(broadcasting, message, coder: T.unsafe(nil)); end - # Returns a broadcaster for a named broadcasting that can be reused. Useful when you have an object that - # may need multiple spots to transmit to a specific broadcasting over and over. + # Returns a broadcaster for a named `broadcasting` that can be reused. Useful + # when you have an object that may need multiple spots to transmit to a specific + # broadcasting over and over. # - # source://actioncable/lib/action_cable/server/broadcasting.rb#32 + # source://actioncable/lib/action_cable/server/broadcasting.rb#38 def broadcaster_for(broadcasting, coder: T.unsafe(nil)); end end -# source://actioncable/lib/action_cable/server/broadcasting.rb#37 +# source://actioncable/lib/action_cable/server/broadcasting.rb#43 class ActionCable::Server::Broadcasting::Broadcaster # @return [Broadcaster] a new instance of Broadcaster # - # source://actioncable/lib/action_cable/server/broadcasting.rb#40 + # source://actioncable/lib/action_cable/server/broadcasting.rb#46 def initialize(server, broadcasting, coder:); end - # source://actioncable/lib/action_cable/server/broadcasting.rb#44 + # source://actioncable/lib/action_cable/server/broadcasting.rb#50 def broadcast(message); end # Returns the value of attribute broadcasting. # - # source://actioncable/lib/action_cable/server/broadcasting.rb#38 + # source://actioncable/lib/action_cable/server/broadcasting.rb#44 def broadcasting; end # Returns the value of attribute coder. # - # source://actioncable/lib/action_cable/server/broadcasting.rb#38 + # source://actioncable/lib/action_cable/server/broadcasting.rb#44 def coder; end # Returns the value of attribute server. # - # source://actioncable/lib/action_cable/server/broadcasting.rb#38 + # source://actioncable/lib/action_cable/server/broadcasting.rb#44 def server; end end -# = Action Cable \Server \Configuration +# # Action Cable Server Configuration # -# An instance of this configuration object is available via ActionCable.server.config, which allows you to tweak Action Cable configuration -# in a \Rails config initializer. +# An instance of this configuration object is available via +# ActionCable.server.config, which allows you to tweak Action Cable +# configuration in a Rails config initializer. # -# source://actioncable/lib/action_cable/server/configuration.rb#11 +# source://actioncable/lib/action_cable/server/configuration.rb#14 class ActionCable::Server::Configuration # @return [Configuration] a new instance of Configuration # - # source://actioncable/lib/action_cable/server/configuration.rb#19 + # source://actioncable/lib/action_cable/server/configuration.rb#22 def initialize; end # Returns the value of attribute allow_same_origin_as_host. # - # source://actioncable/lib/action_cable/server/configuration.rb#14 + # source://actioncable/lib/action_cable/server/configuration.rb#17 def allow_same_origin_as_host; end # Sets the attribute allow_same_origin_as_host # # @param value the value to set the attribute allow_same_origin_as_host to. # - # source://actioncable/lib/action_cable/server/configuration.rb#14 + # source://actioncable/lib/action_cable/server/configuration.rb#17 def allow_same_origin_as_host=(_arg0); end # Returns the value of attribute allowed_request_origins. # - # source://actioncable/lib/action_cable/server/configuration.rb#14 + # source://actioncable/lib/action_cable/server/configuration.rb#17 def allowed_request_origins; end # Sets the attribute allowed_request_origins # # @param value the value to set the attribute allowed_request_origins to. # - # source://actioncable/lib/action_cable/server/configuration.rb#14 + # source://actioncable/lib/action_cable/server/configuration.rb#17 def allowed_request_origins=(_arg0); end # Returns the value of attribute cable. # - # source://actioncable/lib/action_cable/server/configuration.rb#15 + # source://actioncable/lib/action_cable/server/configuration.rb#18 def cable; end # Sets the attribute cable # # @param value the value to set the attribute cable to. # - # source://actioncable/lib/action_cable/server/configuration.rb#15 + # source://actioncable/lib/action_cable/server/configuration.rb#18 def cable=(_arg0); end # Returns the value of attribute connection_class. # - # source://actioncable/lib/action_cable/server/configuration.rb#13 + # source://actioncable/lib/action_cable/server/configuration.rb#16 def connection_class; end # Sets the attribute connection_class # # @param value the value to set the attribute connection_class to. # - # source://actioncable/lib/action_cable/server/configuration.rb#13 + # source://actioncable/lib/action_cable/server/configuration.rb#16 def connection_class=(_arg0); end # Returns the value of attribute disable_request_forgery_protection. # - # source://actioncable/lib/action_cable/server/configuration.rb#14 + # source://actioncable/lib/action_cable/server/configuration.rb#17 def disable_request_forgery_protection; end # Sets the attribute disable_request_forgery_protection # # @param value the value to set the attribute disable_request_forgery_protection to. # - # source://actioncable/lib/action_cable/server/configuration.rb#14 + # source://actioncable/lib/action_cable/server/configuration.rb#17 def disable_request_forgery_protection=(_arg0); end # Returns the value of attribute filter_parameters. # - # source://actioncable/lib/action_cable/server/configuration.rb#14 + # source://actioncable/lib/action_cable/server/configuration.rb#17 def filter_parameters; end # Sets the attribute filter_parameters # # @param value the value to set the attribute filter_parameters to. # - # source://actioncable/lib/action_cable/server/configuration.rb#14 + # source://actioncable/lib/action_cable/server/configuration.rb#17 def filter_parameters=(_arg0); end # Returns the value of attribute health_check_application. # - # source://actioncable/lib/action_cable/server/configuration.rb#17 + # source://actioncable/lib/action_cable/server/configuration.rb#20 def health_check_application; end # Sets the attribute health_check_application # # @param value the value to set the attribute health_check_application to. # - # source://actioncable/lib/action_cable/server/configuration.rb#17 + # source://actioncable/lib/action_cable/server/configuration.rb#20 def health_check_application=(_arg0); end # Returns the value of attribute health_check_path. # - # source://actioncable/lib/action_cable/server/configuration.rb#17 + # source://actioncable/lib/action_cable/server/configuration.rb#20 def health_check_path; end # Sets the attribute health_check_path # # @param value the value to set the attribute health_check_path to. # - # source://actioncable/lib/action_cable/server/configuration.rb#17 + # source://actioncable/lib/action_cable/server/configuration.rb#20 def health_check_path=(_arg0); end # Returns the value of attribute log_tags. # - # source://actioncable/lib/action_cable/server/configuration.rb#12 + # source://actioncable/lib/action_cable/server/configuration.rb#15 def log_tags; end # Sets the attribute log_tags # # @param value the value to set the attribute log_tags to. # - # source://actioncable/lib/action_cable/server/configuration.rb#12 + # source://actioncable/lib/action_cable/server/configuration.rb#15 def log_tags=(_arg0); end # Returns the value of attribute logger. # - # source://actioncable/lib/action_cable/server/configuration.rb#12 + # source://actioncable/lib/action_cable/server/configuration.rb#15 def logger; end # Sets the attribute logger # # @param value the value to set the attribute logger to. # - # source://actioncable/lib/action_cable/server/configuration.rb#12 + # source://actioncable/lib/action_cable/server/configuration.rb#15 def logger=(_arg0); end # Returns the value of attribute mount_path. # - # source://actioncable/lib/action_cable/server/configuration.rb#15 + # source://actioncable/lib/action_cable/server/configuration.rb#18 def mount_path; end # Sets the attribute mount_path # # @param value the value to set the attribute mount_path to. # - # source://actioncable/lib/action_cable/server/configuration.rb#15 + # source://actioncable/lib/action_cable/server/configuration.rb#18 def mount_path=(_arg0); end # Returns the value of attribute precompile_assets. # - # source://actioncable/lib/action_cable/server/configuration.rb#16 + # source://actioncable/lib/action_cable/server/configuration.rb#19 def precompile_assets; end # Sets the attribute precompile_assets # # @param value the value to set the attribute precompile_assets to. # - # source://actioncable/lib/action_cable/server/configuration.rb#16 + # source://actioncable/lib/action_cable/server/configuration.rb#19 def precompile_assets=(_arg0); end - # Returns constant of subscription adapter specified in config/cable.yml. - # If the adapter cannot be found, this will default to the Redis adapter. - # Also makes sure proper dependencies are required. + # Returns constant of subscription adapter specified in config/cable.yml. If the + # adapter cannot be found, this will default to the Redis adapter. Also makes + # sure proper dependencies are required. # - # source://actioncable/lib/action_cable/server/configuration.rb#37 + # source://actioncable/lib/action_cable/server/configuration.rb#40 def pubsub_adapter; end # Returns the value of attribute url. # - # source://actioncable/lib/action_cable/server/configuration.rb#15 + # source://actioncable/lib/action_cable/server/configuration.rb#18 def url; end # Sets the attribute url # # @param value the value to set the attribute url to. # - # source://actioncable/lib/action_cable/server/configuration.rb#15 + # source://actioncable/lib/action_cable/server/configuration.rb#18 def url=(_arg0); end # Returns the value of attribute worker_pool_size. # - # source://actioncable/lib/action_cable/server/configuration.rb#13 + # source://actioncable/lib/action_cable/server/configuration.rb#16 def worker_pool_size; end # Sets the attribute worker_pool_size # # @param value the value to set the attribute worker_pool_size to. # - # source://actioncable/lib/action_cable/server/configuration.rb#13 + # source://actioncable/lib/action_cable/server/configuration.rb#16 def worker_pool_size=(_arg0); end end -# = Action Cable \Server \Connections +# # Action Cable Server Connections # -# Collection class for all the connections that have been established on this specific server. Remember, usually you'll run many Action Cable servers, so -# you can't use this collection as a full list of all of the connections established against your application. Instead, use RemoteConnections for that. +# Collection class for all the connections that have been established on this +# specific server. Remember, usually you'll run many Action Cable servers, so +# you can't use this collection as a full list of all of the connections +# established against your application. Instead, use RemoteConnections for that. # -# source://actioncable/lib/action_cable/server/connections.rb#9 +# source://actioncable/lib/action_cable/server/connections.rb#13 module ActionCable::Server::Connections - # source://actioncable/lib/action_cable/server/connections.rb#16 + # source://actioncable/lib/action_cable/server/connections.rb#20 def add_connection(connection); end - # source://actioncable/lib/action_cable/server/connections.rb#12 + # source://actioncable/lib/action_cable/server/connections.rb#16 def connections; end - # source://actioncable/lib/action_cable/server/connections.rb#33 + # source://actioncable/lib/action_cable/server/connections.rb#39 def open_connections_statistics; end - # source://actioncable/lib/action_cable/server/connections.rb#20 + # source://actioncable/lib/action_cable/server/connections.rb#24 def remove_connection(connection); end - # WebSocket connection implementations differ on when they'll mark a connection as stale. We basically never want a connection to go stale, as you - # then can't rely on being able to communicate with the connection. To solve this, a 3 second heartbeat runs on all connections. If the beat fails, we automatically + # WebSocket connection implementations differ on when they'll mark a connection + # as stale. We basically never want a connection to go stale, as you then can't + # rely on being able to communicate with the connection. To solve this, a 3 + # second heartbeat runs on all connections. If the beat fails, we automatically # disconnect. # - # source://actioncable/lib/action_cable/server/connections.rb#27 + # source://actioncable/lib/action_cable/server/connections.rb#33 def setup_heartbeat_timer; end end -# source://actioncable/lib/action_cable/server/connections.rb#10 +# source://actioncable/lib/action_cable/server/connections.rb#14 ActionCable::Server::Connections::BEAT_INTERVAL = T.let(T.unsafe(nil), Integer) # Worker used by Server.send_async to do connection work in threads. # -# source://actioncable/lib/action_cable/server/worker.rb#10 +# source://actioncable/lib/action_cable/server/worker.rb#12 class ActionCable::Server::Worker include ::ActiveSupport::Callbacks include ::ActionCable::Server::Worker::ActiveRecordConnectionManagement @@ -2616,392 +2693,385 @@ class ActionCable::Server::Worker # @return [Worker] a new instance of Worker # - # source://actioncable/lib/action_cable/server/worker.rb#19 + # source://actioncable/lib/action_cable/server/worker.rb#21 def initialize(max_size: T.unsafe(nil)); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_work_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _work_callbacks; end - # source://actioncable/lib/action_cable/server/worker.rb#46 + # source://actioncable/lib/action_cable/server/worker.rb#48 def async_exec(receiver, *args, connection:, &block); end - # source://actioncable/lib/action_cable/server/worker.rb#50 + # source://actioncable/lib/action_cable/server/worker.rb#52 def async_invoke(receiver, method, *args, connection: T.unsafe(nil), &block); end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#74 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#74 def connection; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#116 def connection=(obj); end # Returns the value of attribute executor. # - # source://actioncable/lib/action_cable/server/worker.rb#17 + # source://actioncable/lib/action_cable/server/worker.rb#19 def executor; end - # Stop processing work: any work that has not already started - # running will be discarded from the queue + # Stop processing work: any work that has not already started running will be + # discarded from the queue # - # source://actioncable/lib/action_cable/server/worker.rb#30 + # source://actioncable/lib/action_cable/server/worker.rb#32 def halt; end - # source://actioncable/lib/action_cable/server/worker.rb#56 + # source://actioncable/lib/action_cable/server/worker.rb#58 def invoke(receiver, method, *args, connection:, &block); end # @return [Boolean] # - # source://actioncable/lib/action_cable/server/worker.rb#34 + # source://actioncable/lib/action_cable/server/worker.rb#36 def stopping?; end - # source://actioncable/lib/action_cable/server/worker.rb#38 + # source://actioncable/lib/action_cable/server/worker.rb#40 def work(connection, &block); end private - # source://actioncable/lib/action_cable/server/worker.rb#68 + # source://actioncable/lib/action_cable/server/worker.rb#70 def logger; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _work_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _work_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 def connection; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 def connection=(obj); end end end -# source://actioncable/lib/action_cable/server/worker/active_record_connection_management.rb#6 +# source://actioncable/lib/action_cable/server/worker/active_record_connection_management.rb#8 module ActionCable::Server::Worker::ActiveRecordConnectionManagement extend ::ActiveSupport::Concern - # source://actioncable/lib/action_cable/server/worker/active_record_connection_management.rb#15 + # source://actioncable/lib/action_cable/server/worker/active_record_connection_management.rb#17 def with_database_connections(&block); end end -# source://actioncable/lib/action_cable/subscription_adapter/async.rb#4 +# source://actioncable/lib/action_cable/subscription_adapter/async.rb#6 module ActionCable::SubscriptionAdapter; end -# source://actioncable/lib/action_cable/subscription_adapter/async.rb#5 +# source://actioncable/lib/action_cable/subscription_adapter/async.rb#7 class ActionCable::SubscriptionAdapter::Async < ::ActionCable::SubscriptionAdapter::Inline private - # source://actioncable/lib/action_cable/subscription_adapter/async.rb#7 + # source://actioncable/lib/action_cable/subscription_adapter/async.rb#9 def new_subscriber_map; end end -# source://actioncable/lib/action_cable/subscription_adapter/async.rb#11 +# source://actioncable/lib/action_cable/subscription_adapter/async.rb#13 class ActionCable::SubscriptionAdapter::Async::AsyncSubscriberMap < ::ActionCable::SubscriptionAdapter::SubscriberMap # @return [AsyncSubscriberMap] a new instance of AsyncSubscriberMap # - # source://actioncable/lib/action_cable/subscription_adapter/async.rb#12 + # source://actioncable/lib/action_cable/subscription_adapter/async.rb#14 def initialize(event_loop); end - # source://actioncable/lib/action_cable/subscription_adapter/async.rb#17 + # source://actioncable/lib/action_cable/subscription_adapter/async.rb#19 def add_subscriber(*_arg0); end - # source://actioncable/lib/action_cable/subscription_adapter/async.rb#21 + # source://actioncable/lib/action_cable/subscription_adapter/async.rb#23 def invoke_callback(*_arg0); end end -# source://actioncable/lib/action_cable/subscription_adapter/base.rb#5 +# source://actioncable/lib/action_cable/subscription_adapter/base.rb#7 class ActionCable::SubscriptionAdapter::Base # @return [Base] a new instance of Base # - # source://actioncable/lib/action_cable/subscription_adapter/base.rb#8 + # source://actioncable/lib/action_cable/subscription_adapter/base.rb#10 def initialize(server); end # @raise [NotImplementedError] # - # source://actioncable/lib/action_cable/subscription_adapter/base.rb#13 + # source://actioncable/lib/action_cable/subscription_adapter/base.rb#15 def broadcast(channel, payload); end - # source://actioncable/lib/action_cable/subscription_adapter/base.rb#29 + # source://actioncable/lib/action_cable/subscription_adapter/base.rb#31 def identifier; end # Returns the value of attribute logger. # - # source://actioncable/lib/action_cable/subscription_adapter/base.rb#6 + # source://actioncable/lib/action_cable/subscription_adapter/base.rb#8 def logger; end # Returns the value of attribute server. # - # source://actioncable/lib/action_cable/subscription_adapter/base.rb#6 + # source://actioncable/lib/action_cable/subscription_adapter/base.rb#8 def server; end # @raise [NotImplementedError] # - # source://actioncable/lib/action_cable/subscription_adapter/base.rb#25 + # source://actioncable/lib/action_cable/subscription_adapter/base.rb#27 def shutdown; end # @raise [NotImplementedError] # - # source://actioncable/lib/action_cable/subscription_adapter/base.rb#17 + # source://actioncable/lib/action_cable/subscription_adapter/base.rb#19 def subscribe(channel, message_callback, success_callback = T.unsafe(nil)); end # @raise [NotImplementedError] # - # source://actioncable/lib/action_cable/subscription_adapter/base.rb#21 + # source://actioncable/lib/action_cable/subscription_adapter/base.rb#23 def unsubscribe(channel, message_callback); end end -# source://actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb#5 +# source://actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb#7 module ActionCable::SubscriptionAdapter::ChannelPrefix - # source://actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb#6 + # source://actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb#8 def broadcast(channel, payload); end - # source://actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb#11 + # source://actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb#13 def subscribe(channel, callback, success_callback = T.unsafe(nil)); end - # source://actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb#16 + # source://actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb#18 def unsubscribe(channel, callback); end private # Returns the channel name, including channel_prefix specified in cable.yml # - # source://actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb#23 + # source://actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb#25 def channel_with_prefix(channel); end end -# source://actioncable/lib/action_cable/subscription_adapter/inline.rb#5 +# source://actioncable/lib/action_cable/subscription_adapter/inline.rb#7 class ActionCable::SubscriptionAdapter::Inline < ::ActionCable::SubscriptionAdapter::Base # @return [Inline] a new instance of Inline # - # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#6 + # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#8 def initialize(*_arg0); end - # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#11 + # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#13 def broadcast(channel, payload); end - # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#23 + # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#25 def shutdown; end - # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#15 + # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#17 def subscribe(channel, callback, success_callback = T.unsafe(nil)); end - # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#19 + # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#21 def unsubscribe(channel, callback); end private - # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#32 + # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#34 def new_subscriber_map; end - # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#28 + # source://actioncable/lib/action_cable/subscription_adapter/inline.rb#30 def subscriber_map; end end -# source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#5 +# source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#7 class ActionCable::SubscriptionAdapter::SubscriberMap # @return [SubscriberMap] a new instance of SubscriberMap # - # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#6 + # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#8 def initialize; end - # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#47 + # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#49 def add_channel(channel, on_success); end - # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#11 + # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#13 def add_subscriber(channel, subscriber, on_success); end - # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#36 + # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#38 def broadcast(channel, message); end - # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#54 + # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#56 def invoke_callback(callback, message); end - # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#51 + # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#53 def remove_channel(channel); end - # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#25 + # source://actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb#27 def remove_subscriber(channel, subscriber); end end -# == \Test adapter for Action Cable +# ## Test adapter for Action Cable # # The test adapter should be used only in testing. Along with -# ActionCable::TestHelper it makes a great tool to test your \Rails application. +# ActionCable::TestHelper it makes a great tool to test your Rails application. # -# To use the test adapter set +adapter+ value to +test+ in your +config/cable.yml+ file. +# To use the test adapter set `adapter` value to `test` in your +# `config/cable.yml` file. # -# NOTE: +Test+ adapter extends the +ActionCable::SubscriptionAdapter::Async+ adapter, -# so it could be used in system tests too. +# NOTE: `Test` adapter extends the `ActionCable::SubscriptionAdapter::Async` +# adapter, so it could be used in system tests too. # -# source://actioncable/lib/action_cable/subscription_adapter/test.rb#14 +# source://actioncable/lib/action_cable/subscription_adapter/test.rb#17 class ActionCable::SubscriptionAdapter::Test < ::ActionCable::SubscriptionAdapter::Async - # source://actioncable/lib/action_cable/subscription_adapter/test.rb#15 + # source://actioncable/lib/action_cable/subscription_adapter/test.rb#18 def broadcast(channel, payload); end - # source://actioncable/lib/action_cable/subscription_adapter/test.rb#20 + # source://actioncable/lib/action_cable/subscription_adapter/test.rb#23 def broadcasts(channel); end - # source://actioncable/lib/action_cable/subscription_adapter/test.rb#28 + # source://actioncable/lib/action_cable/subscription_adapter/test.rb#31 def clear; end - # source://actioncable/lib/action_cable/subscription_adapter/test.rb#24 + # source://actioncable/lib/action_cable/subscription_adapter/test.rb#27 def clear_messages(channel); end private - # source://actioncable/lib/action_cable/subscription_adapter/test.rb#33 + # source://actioncable/lib/action_cable/subscription_adapter/test.rb#36 def channels_data; end end -# source://actioncable/lib/action_cable/test_case.rb#6 +# source://actioncable/lib/action_cable/test_case.rb#8 class ActionCable::TestCase < ::ActiveSupport::TestCase include ::ActionCable::TestHelper end # Provides helper methods for testing Action Cable broadcasting # -# source://actioncable/lib/action_cable/test_helper.rb#5 +# source://actioncable/lib/action_cable/test_helper.rb#7 module ActionCable::TestHelper - # source://actioncable/lib/action_cable/test_helper.rb#16 + # source://actioncable/lib/action_cable/test_helper.rb#18 def after_teardown; end # Asserts that the specified message has been sent to the stream. # - # def test_assert_transmitted_message - # ActionCable.server.broadcast 'messages', text: 'hello' - # assert_broadcast_on('messages', text: 'hello') - # end + # def test_assert_transmitted_message + # ActionCable.server.broadcast 'messages', text: 'hello' + # assert_broadcast_on('messages', text: 'hello') + # end # - # If a block is passed, that block should cause a message with the specified data to be sent. + # If a block is passed, that block should cause a message with the specified + # data to be sent. # - # def test_assert_broadcast_on_again - # assert_broadcast_on('messages', text: 'hello') do - # ActionCable.server.broadcast 'messages', text: 'hello' + # def test_assert_broadcast_on_again + # assert_broadcast_on('messages', text: 'hello') do + # ActionCable.server.broadcast 'messages', text: 'hello' + # end # end - # end # # source://actioncable/lib/action_cable/test_helper.rb#116 def assert_broadcast_on(stream, data, &block); end - # Asserts that the number of broadcasted messages to the stream matches the given number. - # - # def test_broadcasts - # assert_broadcasts 'messages', 0 - # ActionCable.server.broadcast 'messages', { text: 'hello' } - # assert_broadcasts 'messages', 1 - # ActionCable.server.broadcast 'messages', { text: 'world' } - # assert_broadcasts 'messages', 2 - # end + # Asserts that the number of broadcasted messages to the stream matches the + # given number. # - # If a block is passed, that block should cause the specified number of - # messages to be broadcasted. It returns the messages that were broadcasted. - # - # def test_broadcasts_again - # message = assert_broadcasts('messages', 1) do + # def test_broadcasts + # assert_broadcasts 'messages', 0 # ActionCable.server.broadcast 'messages', { text: 'hello' } + # assert_broadcasts 'messages', 1 + # ActionCable.server.broadcast 'messages', { text: 'world' } + # assert_broadcasts 'messages', 2 # end - # assert_equal({ text: 'hello' }, message) # - # messages = assert_broadcasts('messages', 2) do - # ActionCable.server.broadcast 'messages', { text: 'hi' } - # ActionCable.server.broadcast 'messages', { text: 'how are you?' } + # If a block is passed, that block should cause the specified number of messages + # to be broadcasted. + # + # def test_broadcasts_again + # assert_broadcasts('messages', 1) do + # ActionCable.server.broadcast 'messages', { text: 'hello' } + # end + # + # assert_broadcasts('messages', 2) do + # ActionCable.server.broadcast 'messages', { text: 'hi' } + # ActionCable.server.broadcast 'messages', { text: 'how are you?' } + # end # end - # assert_equal 2, messages.length - # assert_equal({ text: 'hi' }, messages.first) - # assert_equal({ text: 'how are you?' }, messages.last) - # end # - # source://actioncable/lib/action_cable/test_helper.rb#49 + # source://actioncable/lib/action_cable/test_helper.rb#48 def assert_broadcasts(stream, number, &block); end # Asserts that no messages have been sent to the stream. # - # def test_no_broadcasts - # assert_no_broadcasts 'messages' - # ActionCable.server.broadcast 'messages', { text: 'hi' } - # assert_broadcasts 'messages', 1 - # end + # def test_no_broadcasts + # assert_no_broadcasts 'messages' + # ActionCable.server.broadcast 'messages', { text: 'hi' } + # assert_broadcasts 'messages', 1 + # end # # If a block is passed, that block should not cause any message to be sent. # - # def test_broadcasts_again - # assert_no_broadcasts 'messages' do - # # No job messages should be sent from this block + # def test_broadcasts_again + # assert_no_broadcasts 'messages' do + # # No job messages should be sent from this block + # end # end - # end # # Note: This assertion is simply a shortcut for: # - # assert_broadcasts 'messages', 0, &block + # assert_broadcasts 'messages', 0, &block # - # source://actioncable/lib/action_cable/test_helper.rb#81 + # source://actioncable/lib/action_cable/test_helper.rb#80 def assert_no_broadcasts(stream, &block); end - # source://actioncable/lib/action_cable/test_helper.rb#6 + # source://actioncable/lib/action_cable/test_helper.rb#8 def before_setup; end - # source://actioncable/lib/action_cable/test_helper.rb#147 + # source://actioncable/lib/action_cable/test_helper.rb#146 def broadcasts(*_arg0, **_arg1, &_arg2); end # Returns the messages that are broadcasted in the block. # - # def test_broadcasts - # messages = capture_broadcasts('messages') do - # ActionCable.server.broadcast 'messages', { text: 'hi' } - # ActionCable.server.broadcast 'messages', { text: 'how are you?' } + # def test_broadcasts + # messages = capture_broadcasts('messages') do + # ActionCable.server.broadcast 'messages', { text: 'hi' } + # ActionCable.server.broadcast 'messages', { text: 'how are you?' } + # end + # assert_equal 2, messages.length + # assert_equal({ text: 'hi' }, messages.first) + # assert_equal({ text: 'how are you?' }, messages.last) # end - # assert_equal 2, messages.length - # assert_equal({ text: 'hi' }, messages.first) - # assert_equal({ text: 'how are you?' }, messages.last) - # end # - # source://actioncable/lib/action_cable/test_helper.rb#97 + # source://actioncable/lib/action_cable/test_helper.rb#96 def capture_broadcasts(stream, &block); end - # source://actioncable/lib/action_cable/test_helper.rb#147 + # source://actioncable/lib/action_cable/test_helper.rb#146 def clear_messages(*_arg0, **_arg1, &_arg2); end - # source://actioncable/lib/action_cable/test_helper.rb#143 + # source://actioncable/lib/action_cable/test_helper.rb#142 def pubsub_adapter; end private - # source://actioncable/lib/action_cable/test_helper.rb#150 + # source://actioncable/lib/action_cable/test_helper.rb#149 def new_broadcasts_from(current_messages, stream, assertion, &block); end end -# source://actioncable/lib/action_cable/gem_version.rb#9 +# source://actioncable/lib/action_cable/gem_version.rb#11 module ActionCable::VERSION; end -# source://actioncable/lib/action_cable/gem_version.rb#10 +# source://actioncable/lib/action_cable/gem_version.rb#12 ActionCable::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) -# source://actioncable/lib/action_cable/gem_version.rb#11 +# source://actioncable/lib/action_cable/gem_version.rb#13 ActionCable::VERSION::MINOR = T.let(T.unsafe(nil), Integer) -# source://actioncable/lib/action_cable/gem_version.rb#13 +# source://actioncable/lib/action_cable/gem_version.rb#15 ActionCable::VERSION::PRE = T.let(T.unsafe(nil), String) -# source://actioncable/lib/action_cable/gem_version.rb#15 +# source://actioncable/lib/action_cable/gem_version.rb#17 ActionCable::VERSION::STRING = T.let(T.unsafe(nil), String) -# source://actioncable/lib/action_cable/gem_version.rb#12 +# source://actioncable/lib/action_cable/gem_version.rb#14 ActionCable::VERSION::TINY = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/actionmailbox@7.1.3.3.rbi b/sorbet/rbi/gems/actionmailbox@8.0.0.beta1.rbi similarity index 78% rename from sorbet/rbi/gems/actionmailbox@7.1.3.3.rbi rename to sorbet/rbi/gems/actionmailbox@8.0.0.beta1.rbi index f5227ad1..88e44e92 100644 --- a/sorbet/rbi/gems/actionmailbox@7.1.3.3.rbi +++ b/sorbet/rbi/gems/actionmailbox@8.0.0.beta1.rbi @@ -6,7 +6,7 @@ # :markup: markdown -# :include: actionmailbox/README.md +# :include: ../README.md # # source://actionmailbox/lib/action_mailbox/gem_version.rb#3 module ActionMailbox @@ -87,13 +87,13 @@ module ActionMailbox # source://actionmailbox/lib/action_mailbox.rb#24 def queues=(val); end - # source://railties/7.1.3.3lib/rails/engine.rb#412 + # source://railties/8.0.0.beta1lib/rails/engine.rb#413 def railtie_helpers_paths; end - # source://railties/7.1.3.3lib/rails/engine.rb#395 + # source://railties/8.0.0.beta1lib/rails/engine.rb#396 def railtie_namespace; end - # source://railties/7.1.3.3lib/rails/engine.rb#416 + # source://railties/8.0.0.beta1lib/rails/engine.rb#417 def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end # source://actionmailbox/lib/action_mailbox.rb#25 @@ -102,10 +102,10 @@ module ActionMailbox # source://actionmailbox/lib/action_mailbox.rb#25 def storage_service=(val); end - # source://railties/7.1.3.3lib/rails/engine.rb#401 + # source://railties/8.0.0.beta1lib/rails/engine.rb#402 def table_name_prefix; end - # source://railties/7.1.3.3lib/rails/engine.rb#408 + # source://railties/8.0.0.beta1lib/rails/engine.rb#409 def use_relative_model_naming?; end # Returns the currently loaded version of Action Mailbox as a +Gem::Version+. @@ -190,16 +190,13 @@ class ActionMailbox::Base # source://actionmailbox/lib/action_mailbox/base.rb#79 def initialize(inbound_email); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _process_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_process_callbacks(&block); end # Immediately sends the given +message+ and changes the inbound email's status to +:bounced+. @@ -229,7 +226,7 @@ class ActionMailbox::Base def inbound_email; end # source://actionmailbox/lib/action_mailbox/base.rb#73 - def logger(&block); end + def logger(&_arg0); end # source://actionmailbox/lib/action_mailbox/base.rb#71 def mail(*_arg0, **_arg1, &_arg2); end @@ -240,13 +237,13 @@ class ActionMailbox::Base # source://actionmailbox/lib/action_mailbox/base.rb#96 def process; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end # source://actionmailbox/lib/action_mailbox/routing.rb#9 @@ -264,31 +261,28 @@ class ActionMailbox::Base def track_status_of_inbound_email; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _process_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _process_callbacks=(value); end # source://actionmailbox/lib/action_mailbox/base.rb#75 def receive(inbound_email); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 - def rescue_handlers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end # source://actionmailbox/lib/action_mailbox/routing.rb#9 @@ -302,7 +296,7 @@ end class ActionMailbox::BaseController < ::ActionController::Base private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end def authenticate_by_password; end @@ -311,11 +305,17 @@ class ActionMailbox::BaseController < ::ActionController::Base def password; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -337,12 +337,10 @@ module ActionMailbox::Callbacks module GeneratedClassMethods def __callbacks; end def __callbacks=(value); end - def __callbacks?; end end module GeneratedInstanceMethods def __callbacks; end - def __callbacks?; end end end @@ -364,8 +362,11 @@ ActionMailbox::Callbacks::TERMINATOR = T.let(T.unsafe(nil), Proc) # source://actionmailbox/lib/action_mailbox/engine.rb#12 class ActionMailbox::Engine < ::Rails::Engine class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end end end @@ -377,10 +378,10 @@ class ActionMailbox::InboundEmail < ::ActionMailbox::Record include ::ActionMailbox::InboundEmail::Incineratable extend ::ActionMailbox::InboundEmail::MessageId::ClassMethods - # source://activerecord/7.1.3.3lib/active_record/autosave_association.rb#160 + # source://activerecord/8.0.0.beta1lib/active_record/autosave_association.rb#162 def autosave_associated_records_for_raw_email_attachment(*args); end - # source://activerecord/7.1.3.3lib/active_record/autosave_association.rb#160 + # source://activerecord/8.0.0.beta1lib/active_record/autosave_association.rb#162 def autosave_associated_records_for_raw_email_blob(*args); end def instrumentation_payload; end @@ -389,109 +390,121 @@ class ActionMailbox::InboundEmail < ::ActionMailbox::Record def source; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _reflections; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _validators; end - # source://activestorage/7.1.3.3lib/active_storage/reflection.rb#53 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def attachment_reflections; end - # source://activerecord/7.1.3.3lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def attachment_reflections=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 + # source://activerecord/8.0.0.beta1lib/active_record/scoping/named.rb#174 def bounced(*args, **_arg1); end - # source://activerecord/7.1.3.3lib/active_record/enum.rb#167 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def defined_enums; end - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activerecord/8.0.0.beta1lib/active_record/scoping/named.rb#174 def delivered(*args, **_arg1); end - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 + # source://activerecord/8.0.0.beta1lib/active_record/scoping/named.rb#174 def failed(*args, **_arg1); end - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 + # source://activerecord/8.0.0.beta1lib/active_record/scoping/named.rb#174 def not_bounced(*args, **_arg1); end - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 + # source://activerecord/8.0.0.beta1lib/active_record/scoping/named.rb#174 def not_delivered(*args, **_arg1); end - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 + # source://activerecord/8.0.0.beta1lib/active_record/scoping/named.rb#174 def not_failed(*args, **_arg1); end - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 + # source://activerecord/8.0.0.beta1lib/active_record/scoping/named.rb#174 def not_pending(*args, **_arg1); end - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 + # source://activerecord/8.0.0.beta1lib/active_record/scoping/named.rb#174 def not_processing(*args, **_arg1); end - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 + # source://activerecord/8.0.0.beta1lib/active_record/scoping/named.rb#174 def pending(*args, **_arg1); end - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 + # source://activerecord/8.0.0.beta1lib/active_record/scoping/named.rb#174 def processing(*args, **_arg1); end - # source://activerecord/7.1.3.3lib/active_record/enum.rb#242 + # source://activerecord/8.0.0.beta1lib/active_record/enum.rb#250 def statuses; end - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 + # source://activerecord/8.0.0.beta1lib/active_record/scoping/named.rb#174 def with_attached_raw_email(*args, **_arg1); end end end module ActionMailbox::InboundEmail::GeneratedAssociationMethods - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#32 def build_raw_email_attachment(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#32 def build_raw_email_blob(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#36 def create_raw_email_attachment(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#40 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#40 def create_raw_email_attachment!(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#36 def create_raw_email_blob(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#40 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#40 def create_raw_email_blob!(*args, &block); end - # source://activestorage/7.1.3.3lib/active_storage/attached/model.rb#99 + # source://activestorage/8.0.0.beta1lib/active_storage/attached/model.rb#113 def raw_email; end - # source://activestorage/7.1.3.3lib/active_storage/attached/model.rb#104 + # source://activestorage/8.0.0.beta1lib/active_storage/attached/model.rb#118 def raw_email=(attachable); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#103 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#104 def raw_email_attachment; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#111 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#112 def raw_email_attachment=(value); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#103 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#104 def raw_email_blob; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#111 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#112 def raw_email_blob=(value); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#19 def reload_raw_email_attachment; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#19 def reload_raw_email_blob; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#23 def reset_raw_email_attachment; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#23 def reset_raw_email_blob; end end @@ -542,12 +555,18 @@ class ActionMailbox::IncinerationJob < ::ActiveJob::Base def perform(inbound_email); end class << self - # source://activejob/7.1.3.3lib/active_job/queue_name.rb#55 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def queue_name; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + def schedule(inbound_email); end end end @@ -560,7 +579,7 @@ class ActionMailbox::Ingresses::Mailgun::InboundEmailsController < ::ActionMailb private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end def authenticate; end @@ -569,11 +588,17 @@ class ActionMailbox::Ingresses::Mailgun::InboundEmailsController < ::ActionMailb def mail; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -601,7 +626,7 @@ class ActionMailbox::Ingresses::Mandrill::InboundEmailsController < ::ActionMail private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end def authenticate; end @@ -611,11 +636,17 @@ class ActionMailbox::Ingresses::Mandrill::InboundEmailsController < ::ActionMail def raw_emails; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -640,15 +671,23 @@ class ActionMailbox::Ingresses::Postmark::InboundEmailsController < ::ActionMail private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end + def mail; end + class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -659,17 +698,23 @@ class ActionMailbox::Ingresses::Relay::InboundEmailsController < ::ActionMailbox private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end def require_valid_rfc822_message; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -680,18 +725,24 @@ class ActionMailbox::Ingresses::Sendgrid::InboundEmailsController < ::ActionMail private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end def envelope; end def mail; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -700,11 +751,17 @@ class ActionMailbox::Record < ::ActiveRecord::Base include ::ActionMailbox::Record::GeneratedAssociationMethods class << self - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _validators; end - # source://activerecord/7.1.3.3lib/active_record/enum.rb#167 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def defined_enums; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end end end @@ -794,8 +851,11 @@ class ActionMailbox::RoutingJob < ::ActiveJob::Base def perform(inbound_email); end class << self - # source://activejob/7.1.3.3lib/active_job/queue_name.rb#55 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def queue_name; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end end end @@ -1673,70 +1733,70 @@ end module Rails class << self - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def app_class; end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def app_class=(_arg0); end - # source://railties/7.1.3.3lib/rails.rb#43 + # source://railties/8.0.0.beta1lib/rails.rb#45 def application; end - # source://railties/7.1.3.3lib/rails.rb#41 + # source://railties/8.0.0.beta1lib/rails.rb#43 def application=(_arg0); end - # source://railties/7.1.3.3lib/rails.rb#123 + # source://railties/8.0.0.beta1lib/rails.rb#126 def autoloaders; end - # source://railties/7.1.3.3lib/rails.rb#54 + # source://railties/8.0.0.beta1lib/rails.rb#56 def backtrace_cleaner; end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def cache; end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def cache=(_arg0); end - # source://railties/7.1.3.3lib/rails.rb#50 + # source://railties/8.0.0.beta1lib/rails.rb#52 def configuration; end - # source://railties/7.1.3.3lib/rails/deprecator.rb#4 + # source://railties/8.0.0.beta1lib/rails/deprecator.rb#4 def deprecator; end - # source://railties/7.1.3.3lib/rails.rb#72 + # source://railties/8.0.0.beta1lib/rails.rb#75 def env; end - # source://railties/7.1.3.3lib/rails.rb#79 + # source://railties/8.0.0.beta1lib/rails.rb#82 def env=(environment); end - # source://railties/7.1.3.3lib/rails.rb#90 + # source://railties/8.0.0.beta1lib/rails.rb#93 def error; end - # source://railties/7.1.3.3lib/rails/gem_version.rb#5 + # source://railties/8.0.0.beta1lib/rails/gem_version.rb#5 def gem_version; end - # source://railties/7.1.3.3lib/rails.rb#103 + # source://railties/8.0.0.beta1lib/rails.rb#106 def groups(*groups); end - # source://railties/7.1.3.3lib/rails.rb#47 + # source://railties/8.0.0.beta1lib/rails.rb#49 def initialize!(*_arg0, **_arg1, &_arg2); end - # source://railties/7.1.3.3lib/rails.rb#47 + # source://railties/8.0.0.beta1lib/rails.rb#49 def initialized?(*_arg0, **_arg1, &_arg2); end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def logger; end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def logger=(_arg0); end - # source://railties/7.1.3.3lib/rails.rb#119 + # source://railties/8.0.0.beta1lib/rails.rb#122 def public_path; end - # source://railties/7.1.3.3lib/rails.rb#63 + # source://railties/8.0.0.beta1lib/rails.rb#65 def root; end - # source://railties/7.1.3.3lib/rails/version.rb#7 + # source://railties/8.0.0.beta1lib/rails/version.rb#7 def version; end end end @@ -1751,12 +1811,15 @@ class Rails::Conductor::ActionMailbox::InboundEmails::SourcesController < ::Rail private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end class << self - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -1768,7 +1831,7 @@ class Rails::Conductor::ActionMailbox::InboundEmailsController < ::Rails::Conduc private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end def create_inbound_email(mail); end @@ -1776,8 +1839,11 @@ class Rails::Conductor::ActionMailbox::InboundEmailsController < ::Rails::Conduc def new_mail; end class << self - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -1786,12 +1852,15 @@ class Rails::Conductor::ActionMailbox::IncineratesController < ::Rails::Conducto private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end class << self - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -1800,36 +1869,51 @@ class Rails::Conductor::ActionMailbox::ReroutesController < ::Rails::Conductor:: private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end def reroute(inbound_email); end class << self - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end class Rails::Conductor::BaseController < ::ActionController::Base private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end def ensure_development_env; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#211 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#212 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout_conditions; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end diff --git a/sorbet/rbi/gems/actionmailer@7.1.3.3.rbi b/sorbet/rbi/gems/actionmailer@8.0.0.beta1.rbi similarity index 85% rename from sorbet/rbi/gems/actionmailer@7.1.3.3.rbi rename to sorbet/rbi/gems/actionmailer@8.0.0.beta1.rbi index 65a18a9b..40669f20 100644 --- a/sorbet/rbi/gems/actionmailer@7.1.3.3.rbi +++ b/sorbet/rbi/gems/actionmailer@8.0.0.beta1.rbi @@ -5,7 +5,7 @@ # Please instead update this file by running `bin/tapioca gem actionmailer`. -# :include: actionmailer/README.rdoc +# :include: ../README.rdoc # # source://actionmailer/lib/action_mailer/gem_version.rb#3 module ActionMailer @@ -511,7 +511,6 @@ class ActionMailer::Base < ::AbstractController::Base include ::AbstractController::Rendering include ::AbstractController::Logger include ::ActiveSupport::Benchmarkable - include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor include ::AbstractController::Helpers include ::AbstractController::Translation include ::AbstractController::AssetPaths @@ -541,58 +540,58 @@ class ActionMailer::Base < ::AbstractController::Base # @return [Base] a new instance of Base # - # source://actionmailer/lib/action_mailer/base.rb#644 + # source://actionmailer/lib/action_mailer/base.rb#643 def initialize; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _deliver_callbacks; end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#13 def _helper_methods; end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#13 def _helper_methods=(_arg0); end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#13 def _helper_methods?; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#216 - def _layout_conditions(&block); end + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#212 + def _layout_conditions; end + + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#212 + def _layout_conditions?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _process_action_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_deliver_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_process_action_callbacks(&block); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching.rb#42 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching.rb#44 def _view_cache_dependencies; end - # source://actionpack/7.1.3.3lib/abstract_controller/caching.rb#42 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching.rb#44 def _view_cache_dependencies=(_arg0); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching.rb#42 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching.rb#44 def _view_cache_dependencies?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def assets_dir=(value); end # Allows you to add attachments to an email, like so: @@ -624,13 +623,13 @@ class ActionMailer::Base < ::AbstractController::Base # # or by index # mail.attachments[0] # => Mail::Part (first attachment) # - # source://actionmailer/lib/action_mailer/base.rb#761 + # source://actionmailer/lib/action_mailer/base.rb#760 def attachments; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end # source://actionmailer/lib/action_mailer/base.rb#502 @@ -642,10 +641,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer/lib/action_mailer/base.rb#502 def default_params?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def default_static_extension=(value); end # source://actionmailer/lib/action_mailer/queued_delivery.rb#9 @@ -688,31 +687,31 @@ class ActionMailer::Base < ::AbstractController::Base # # If the name is a blank string, it returns just the address. # - # source://actionmailer/lib/action_mailer/base.rb#685 + # source://actionmailer/lib/action_mailer/base.rb#684 def email_address_with_name(address, name); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def file_settings; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def file_settings=(_arg0); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def file_settings?; end - # source://actionpack/7.1.3.3lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching/fragments.rb#26 def fragment_cache_keys; end - # source://actionpack/7.1.3.3lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching/fragments.rb#26 def fragment_cache_keys=(_arg0); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching/fragments.rb#26 def fragment_cache_keys?; end # Allows you to pass random and unusual headers to the new +Mail::Message+ @@ -750,19 +749,19 @@ class ActionMailer::Base < ::AbstractController::Base # +nil+ in order to reset the value otherwise another field will be added # for the same header. # - # source://actionmailer/lib/action_mailer/base.rb#723 + # source://actionmailer/lib/action_mailer/base.rb#722 def headers(args = T.unsafe(nil)); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def logger=(value); end # The main method that creates the message and renders the email templates. There are @@ -854,18 +853,18 @@ class ActionMailer::Base < ::AbstractController::Base # format.html # end # - # source://actionmailer/lib/action_mailer/base.rb#870 + # source://actionmailer/lib/action_mailer/base.rb#869 def mail(headers = T.unsafe(nil), &block); end # Returns the name of the mailer object. # - # source://actionmailer/lib/action_mailer/base.rb#678 + # source://actionmailer/lib/action_mailer/base.rb#677 def mailer_name; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def message; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def message=(_arg0); end # source://actionmailer/lib/action_mailer/parameterized.rb#95 @@ -874,10 +873,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer/lib/action_mailer/parameterized.rb#93 def params=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def perform_caching=(value); end # source://actionmailer/lib/action_mailer/delivery_methods.rb#16 @@ -892,7 +891,7 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer/lib/action_mailer/preview.rb#14 def preview_paths; end - # source://actionmailer/lib/action_mailer/base.rb#650 + # source://actionmailer/lib/action_mailer/base.rb#649 def process(method_name, *args, **_arg2); end # source://actionmailer/lib/action_mailer/delivery_methods.rb#15 @@ -901,95 +900,95 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer/lib/action_mailer/delivery_methods.rb#15 def raise_delivery_errors=(val); end - # source://actionpack/7.1.3.3lib/abstract_controller/callbacks.rb#36 + # source://actionpack/8.0.0.beta1lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions; end - # source://actionpack/7.1.3.3lib/abstract_controller/callbacks.rb#36 + # source://actionpack/8.0.0.beta1lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions=(val); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def sendmail_settings; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def sendmail_settings=(_arg0); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def sendmail_settings?; end # source://actionmailer/lib/action_mailer/preview.rb#22 def show_previews; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def smtp_settings; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def smtp_settings=(_arg0); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def smtp_settings?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def test_settings; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def test_settings=(_arg0); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def test_settings?; end private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end - # source://actionmailer/lib/action_mailer/base.rb#1071 + # source://actionmailer/lib/action_mailer/base.rb#1070 def _protected_ivars; end - # source://actionmailer/lib/action_mailer/base.rb#947 + # source://actionmailer/lib/action_mailer/base.rb#946 def apply_defaults(headers); end - # source://actionmailer/lib/action_mailer/base.rb#967 + # source://actionmailer/lib/action_mailer/base.rb#966 def assign_headers_to_message(message, headers); end - # source://actionmailer/lib/action_mailer/base.rb#973 + # source://actionmailer/lib/action_mailer/base.rb#972 def collect_responses(headers, &block); end # @yield [collector] # - # source://actionmailer/lib/action_mailer/base.rb#983 + # source://actionmailer/lib/action_mailer/base.rb#982 def collect_responses_from_block(headers); end - # source://actionmailer/lib/action_mailer/base.rb#997 + # source://actionmailer/lib/action_mailer/base.rb#996 def collect_responses_from_templates(headers); end - # source://actionmailer/lib/action_mailer/base.rb#990 + # source://actionmailer/lib/action_mailer/base.rb#989 def collect_responses_from_text(headers); end - # source://actionmailer/lib/action_mailer/base.rb#957 + # source://actionmailer/lib/action_mailer/base.rb#956 def compute_default(value); end - # source://actionmailer/lib/action_mailer/base.rb#1040 + # source://actionmailer/lib/action_mailer/base.rb#1039 def create_parts_from_responses(m, responses); end # Translates the +subject+ using \Rails I18n class under [mailer_scope, action_name] scope. @@ -997,21 +996,21 @@ class ActionMailer::Base < ::AbstractController::Base # humanized version of the action_name. # If the subject has interpolations, you can pass them through the +interpolations+ parameter. # - # source://actionmailer/lib/action_mailer/base.rb#937 + # source://actionmailer/lib/action_mailer/base.rb#936 def default_i18n_subject(interpolations = T.unsafe(nil)); end - # source://actionmailer/lib/action_mailer/base.rb#1010 + # source://actionmailer/lib/action_mailer/base.rb#1009 def each_template(paths, name, &block); end - # source://actionmailer/lib/action_mailer/base.rb#1053 + # source://actionmailer/lib/action_mailer/base.rb#1052 def insert_part(container, response, charset); end - # source://actionmailer/lib/action_mailer/base.rb#1067 + # source://actionmailer/lib/action_mailer/base.rb#1066 def instrument_name; end # This and #instrument_name is for caching instrument # - # source://actionmailer/lib/action_mailer/base.rb#1060 + # source://actionmailer/lib/action_mailer/base.rb#1059 def instrument_payload(key); end # Used by #mail to set the content type of the message. @@ -1024,92 +1023,89 @@ class ActionMailer::Base < ::AbstractController::Base # attachments, or the message is multipart, then the default content type is # used. # - # source://actionmailer/lib/action_mailer/base.rb#915 + # source://actionmailer/lib/action_mailer/base.rb#914 def set_content_type(m, user_content_type, class_default); end - # source://actionmailer/lib/action_mailer/base.rb#1019 + # source://actionmailer/lib/action_mailer/base.rb#1018 def wrap_inline_attachments(message); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://actionmailer/lib/action_mailer/form_builder.rb#18 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _default_form_builder; end - # source://actionmailer/lib/action_mailer/form_builder.rb#18 - def _default_form_builder=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _default_form_builder=(new_value); end # source://actionmailer/lib/action_mailer/form_builder.rb#18 def _default_form_builder?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _deliver_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _deliver_callbacks=(value); end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _helper_methods; end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 - def _helper_methods=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _helper_methods=(new_value); end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#13 def _helper_methods?; end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#16 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#17 def _helpers; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#211 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#211 - def _layout=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#211 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#211 def _layout?; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#212 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout_conditions; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#212 - def _layout_conditions=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#212 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#212 def _layout_conditions?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _process_action_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _process_action_callbacks=(value); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching.rb#42 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _view_cache_dependencies; end - # source://actionpack/7.1.3.3lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _view_cache_dependencies=(new_value); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching.rb#42 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching.rb#44 def _view_cache_dependencies?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def assets_dir=(value); end # Returns the name of the current mailer. This method is also being used as a path for a view lookup. @@ -1127,10 +1123,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer/lib/action_mailer/base.rb#582 def default(value = T.unsafe(nil)); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end # Sets the defaults through app configuration: @@ -1145,26 +1141,26 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer/lib/action_mailer/base.rb#582 def default_options=(value = T.unsafe(nil)); end - # source://actionmailer/lib/action_mailer/base.rb#502 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_params; end - # source://actionmailer/lib/action_mailer/base.rb#502 - def default_params=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_params=(new_value); end # source://actionmailer/lib/action_mailer/base.rb#502 def default_params?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def default_static_extension=(value); end - # source://actionmailer/lib/action_mailer/queued_delivery.rb#9 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def deliver_later_queue_name; end - # source://actionmailer/lib/action_mailer/queued_delivery.rb#9 - def deliver_later_queue_name=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def deliver_later_queue_name=(new_value); end # source://actionmailer/lib/action_mailer/queued_delivery.rb#9 def deliver_later_queue_name?; end @@ -1179,29 +1175,29 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer/lib/action_mailer/base.rb#597 def deliver_mail(mail); end - # source://actionmailer/lib/action_mailer/queued_delivery.rb#8 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def delivery_job; end - # source://actionmailer/lib/action_mailer/queued_delivery.rb#8 - def delivery_job=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def delivery_job=(new_value); end # source://actionmailer/lib/action_mailer/queued_delivery.rb#8 def delivery_job?; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#19 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def delivery_method; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#19 - def delivery_method=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def delivery_method=(new_value); end # source://actionmailer/lib/action_mailer/delivery_methods.rb#19 def delivery_method?; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#18 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def delivery_methods; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#18 - def delivery_methods=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def delivery_methods=(new_value); end # source://actionmailer/lib/action_mailer/delivery_methods.rb#18 def delivery_methods?; end @@ -1213,40 +1209,40 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer/lib/action_mailer/base.rb#607 def email_address_with_name(address, name); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def file_settings; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 - def file_settings=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def file_settings=(new_value); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def file_settings?; end - # source://actionpack/7.1.3.3lib/abstract_controller/caching/fragments.rb#25 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def fragment_cache_keys; end - # source://actionpack/7.1.3.3lib/abstract_controller/caching/fragments.rb#25 - def fragment_cache_keys=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def fragment_cache_keys=(new_value); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching/fragments.rb#26 def fragment_cache_keys?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def logger=(value); end # Returns the name of the current mailer. This method is also being used as a path for a view lookup. @@ -1260,10 +1256,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer/lib/action_mailer/base.rb#574 def mailer_name=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def perform_caching=(value); end # source://actionmailer/lib/action_mailer/delivery_methods.rb#16 @@ -1290,10 +1286,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer/lib/action_mailer/delivery_methods.rb#15 def raise_delivery_errors=(val); end - # source://actionpack/7.1.3.3lib/abstract_controller/callbacks.rb#36 + # source://actionpack/8.0.0.beta1lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions; end - # source://actionpack/7.1.3.3lib/abstract_controller/callbacks.rb#36 + # source://actionpack/8.0.0.beta1lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions=(val); end # Register an Interceptor which will be called before mail is sent. @@ -1320,28 +1316,28 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer/lib/action_mailer/base.rb#511 def register_observers(*observers); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 - def rescue_handlers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def sendmail_settings; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 - def sendmail_settings=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def sendmail_settings=(new_value); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def sendmail_settings?; end # source://actionmailer/lib/action_mailer/preview.rb#22 @@ -1350,35 +1346,35 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer/lib/action_mailer/preview.rb#22 def show_previews=(val); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def smtp_settings; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 - def smtp_settings=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def smtp_settings=(new_value); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def smtp_settings?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end # Emails do not support relative path links. # # @return [Boolean] # - # source://actionmailer/lib/action_mailer/base.rb#943 + # source://actionmailer/lib/action_mailer/base.rb#942 def supports_path?; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def test_settings; end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 - def test_settings=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def test_settings=(new_value); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#53 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 def test_settings?; end # Unregister a previously registered Interceptor. @@ -1408,14 +1404,14 @@ class ActionMailer::Base < ::AbstractController::Base private # source://actionmailer/lib/action_mailer/base.rb#628 - def method_missing(method_name, *args, **_arg2); end + def method_missing(method_name, *_arg1, **_arg2, &_arg3); end # source://actionmailer/lib/action_mailer/base.rb#558 def observer_class_for(value); end # @return [Boolean] # - # source://actionmailer/lib/action_mailer/base.rb#637 + # source://actionmailer/lib/action_mailer/base.rb#636 def respond_to_missing?(method, include_all = T.unsafe(nil)); end # source://actionmailer/lib/action_mailer/base.rb#615 @@ -1429,43 +1425,43 @@ module ActionMailer::Base::HelperMethods include ::ActionText::ContentHelper include ::ActionText::TagHelper - # source://actionpack/7.1.3.3lib/abstract_controller/caching/fragments.rb#33 - def combined_fragment_cache_key(*args, **_arg1, &block); end + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching/fragments.rb#34 + def combined_fragment_cache_key(*_arg0, **_arg1, &_arg2); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching.rb#43 - def view_cache_dependencies(*args, **_arg1, &block); end + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching.rb#45 + def view_cache_dependencies(*_arg0, **_arg1, &_arg2); end end -# source://actionmailer/lib/action_mailer/base.rb#769 +# source://actionmailer/lib/action_mailer/base.rb#768 class ActionMailer::Base::LateAttachmentsProxy < ::SimpleDelegator - # source://actionmailer/lib/action_mailer/base.rb#771 + # source://actionmailer/lib/action_mailer/base.rb#770 def []=(_name, _content); end - # source://actionmailer/lib/action_mailer/base.rb#770 + # source://actionmailer/lib/action_mailer/base.rb#769 def inline; end private # @raise [RuntimeError] # - # source://actionmailer/lib/action_mailer/base.rb#774 + # source://actionmailer/lib/action_mailer/base.rb#773 def _raise_error; end end -# source://actionmailer/lib/action_mailer/base.rb#664 +# source://actionmailer/lib/action_mailer/base.rb#663 class ActionMailer::Base::NullMail - # source://actionmailer/lib/action_mailer/base.rb#665 + # source://actionmailer/lib/action_mailer/base.rb#664 def body; end - # source://actionmailer/lib/action_mailer/base.rb#666 + # source://actionmailer/lib/action_mailer/base.rb#665 def header; end - # source://actionmailer/lib/action_mailer/base.rb#672 - def method_missing(*args); end + # source://actionmailer/lib/action_mailer/base.rb#671 + def method_missing(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://actionmailer/lib/action_mailer/base.rb#668 + # source://actionmailer/lib/action_mailer/base.rb#667 def respond_to?(string, include_all = T.unsafe(nil)); end end @@ -1486,12 +1482,10 @@ module ActionMailer::Callbacks module GeneratedClassMethods def __callbacks; end def __callbacks=(value); end - def __callbacks?; end end module GeneratedInstanceMethods def __callbacks; end - def __callbacks?; end end end @@ -1556,7 +1550,7 @@ module ActionMailer::DeliveryMethods mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActionMailer::DeliveryMethods::ClassMethods - # source://actionmailer/lib/action_mailer/delivery_methods.rb#80 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#79 def wrap_delivery_behavior!(*args); end module GeneratedClassMethods @@ -1604,7 +1598,7 @@ end # Helpers for creating and wrapping delivery behavior, used by DeliveryMethods. # -# source://actionmailer/lib/action_mailer/delivery_methods.rb#42 +# source://actionmailer/lib/action_mailer/delivery_methods.rb#41 module ActionMailer::DeliveryMethods::ClassMethods # Adds a new delivery method through the given class using the given # symbol as alias and the default options supplied. @@ -1613,16 +1607,16 @@ module ActionMailer::DeliveryMethods::ClassMethods # location: '/usr/sbin/sendmail', # arguments: %w[ -i ] # - # source://actionmailer/lib/action_mailer/delivery_methods.rb#52 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#51 def add_delivery_method(symbol, klass, default_options = T.unsafe(nil)); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#44 - def deliveries(&block); end + # source://actionmailer/lib/action_mailer/delivery_methods.rb#43 + def deliveries(&_arg0); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#44 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#43 def deliveries=(arg); end - # source://actionmailer/lib/action_mailer/delivery_methods.rb#58 + # source://actionmailer/lib/action_mailer/delivery_methods.rb#57 def wrap_delivery_behavior(mail, method = T.unsafe(nil), options = T.unsafe(nil)); end end @@ -1742,8 +1736,11 @@ class ActionMailer::LogSubscriber < ::ActiveSupport::LogSubscriber def process(event); end class << self - # source://activesupport/7.1.3.3lib/active_support/log_subscriber.rb#87 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def log_levels; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end end end @@ -1772,11 +1769,17 @@ class ActionMailer::MailDeliveryJob < ::ActiveJob::Base def mailer_class; end class << self - # source://activejob/7.1.3.3lib/active_job/queue_name.rb#55 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def queue_name; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end end end @@ -2081,98 +2084,98 @@ class ActionMailer::Parameterized::Mailer private # source://actionmailer/lib/action_mailer/parameterized.rb#117 - def method_missing(method_name, *args, **_arg2); end + def method_missing(method_name, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # - # source://actionmailer/lib/action_mailer/parameterized.rb#126 + # source://actionmailer/lib/action_mailer/parameterized.rb#125 def respond_to_missing?(method, include_all = T.unsafe(nil)); end end -# source://actionmailer/lib/action_mailer/parameterized.rb#131 +# source://actionmailer/lib/action_mailer/parameterized.rb#130 class ActionMailer::Parameterized::MessageDelivery < ::ActionMailer::MessageDelivery # @return [MessageDelivery] a new instance of MessageDelivery # - # source://actionmailer/lib/action_mailer/parameterized.rb#132 - def initialize(mailer_class, action, params, *args, **_arg4); end + # source://actionmailer/lib/action_mailer/parameterized.rb#131 + def initialize(mailer_class, action, params, *_arg3, **_arg4, &_arg5); end private - # source://actionmailer/lib/action_mailer/parameterized.rb#146 + # source://actionmailer/lib/action_mailer/parameterized.rb#144 def enqueue_delivery(delivery_method, options = T.unsafe(nil)); end - # source://actionmailer/lib/action_mailer/parameterized.rb#139 + # source://actionmailer/lib/action_mailer/parameterized.rb#137 def processed_mailer; end end -# source://actionmailer/lib/action_mailer/preview.rb#93 +# source://actionmailer/lib/action_mailer/preview.rb#69 class ActionMailer::Preview extend ::ActiveSupport::DescendantsTracker # @return [Preview] a new instance of Preview # - # source://actionmailer/lib/action_mailer/preview.rb#98 + # source://actionmailer/lib/action_mailer/preview.rb#74 def initialize(params = T.unsafe(nil)); end # Returns the value of attribute params. # - # source://actionmailer/lib/action_mailer/preview.rb#96 + # source://actionmailer/lib/action_mailer/preview.rb#72 def params; end class << self # Returns all mailer preview classes. # - # source://actionmailer/lib/action_mailer/preview.rb#104 + # source://actionmailer/lib/action_mailer/preview.rb#80 def all; end # Returns the mail object for the given email name. The registered preview # interceptors will be informed so that they can transform the message # as they would if the mail was actually being delivered. # - # source://actionmailer/lib/action_mailer/preview.rb#112 + # source://actionmailer/lib/action_mailer/preview.rb#88 def call(email, params = T.unsafe(nil)); end # Returns +true+ if the email exists. # # @return [Boolean] # - # source://actionmailer/lib/action_mailer/preview.rb#125 + # source://actionmailer/lib/action_mailer/preview.rb#101 def email_exists?(email); end # Returns all of the available email previews. # - # source://actionmailer/lib/action_mailer/preview.rb#120 + # source://actionmailer/lib/action_mailer/preview.rb#96 def emails; end # Returns +true+ if the preview exists. # # @return [Boolean] # - # source://actionmailer/lib/action_mailer/preview.rb#130 + # source://actionmailer/lib/action_mailer/preview.rb#106 def exists?(preview); end # Find a mailer preview by its underscored class name. # - # source://actionmailer/lib/action_mailer/preview.rb#135 + # source://actionmailer/lib/action_mailer/preview.rb#111 def find(preview); end # Returns the underscored name of the mailer preview without the suffix. # - # source://actionmailer/lib/action_mailer/preview.rb#140 + # source://actionmailer/lib/action_mailer/preview.rb#116 def preview_name; end private - # source://actionmailer/lib/action_mailer/preview.rb#159 + # source://actionmailer/lib/action_mailer/preview.rb#135 def inform_preview_interceptors(message); end - # source://actionmailer/lib/action_mailer/preview.rb#145 + # source://actionmailer/lib/action_mailer/preview.rb#121 def load_previews; end - # source://actionmailer/lib/action_mailer/preview.rb#151 + # source://actionmailer/lib/action_mailer/preview.rb#127 def preview_paths; end - # source://actionmailer/lib/action_mailer/preview.rb#155 + # source://actionmailer/lib/action_mailer/preview.rb#131 def show_previews; end end end @@ -2182,46 +2185,37 @@ module ActionMailer::Previews extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionMailer::Previews::ClassMethods - - # source://actionmailer/lib/action_mailer/preview.rb#28 - def preview_path; end end -# source://actionmailer/lib/action_mailer/preview.rb#36 +# source://actionmailer/lib/action_mailer/preview.rb#28 module ActionMailer::Previews::ClassMethods - # source://actionmailer/lib/action_mailer/preview.rb#45 - def preview_path; end - - # source://actionmailer/lib/action_mailer/preview.rb#37 - def preview_path=(value); end - # Register an Interceptor which will be called before mail is previewed. # Either a class or a string can be passed in as the Interceptor. If a # string is passed in it will be constantized. # - # source://actionmailer/lib/action_mailer/preview.rb#66 + # source://actionmailer/lib/action_mailer/preview.rb#42 def register_preview_interceptor(interceptor); end # Register one or more Interceptors which will be called before mail is previewed. # - # source://actionmailer/lib/action_mailer/preview.rb#54 + # source://actionmailer/lib/action_mailer/preview.rb#30 def register_preview_interceptors(*interceptors); end # Unregister a previously registered Interceptor. # Either a class or a string can be passed in as the Interceptor. If a # string is passed in it will be constantized. # - # source://actionmailer/lib/action_mailer/preview.rb#77 + # source://actionmailer/lib/action_mailer/preview.rb#53 def unregister_preview_interceptor(interceptor); end # Unregister one or more previously registered Interceptors. # - # source://actionmailer/lib/action_mailer/preview.rb#59 + # source://actionmailer/lib/action_mailer/preview.rb#35 def unregister_preview_interceptors(*interceptors); end private - # source://actionmailer/lib/action_mailer/preview.rb#82 + # source://actionmailer/lib/action_mailer/preview.rb#58 def interceptor_class_for(interceptor); end end @@ -2319,14 +2313,17 @@ class ActionMailer::TestCase < ::ActiveSupport::TestCase def _mailer_class?; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionmailer/lib/action_mailer/test_case.rb#41 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _mailer_class; end - # source://actionmailer/lib/action_mailer/test_case.rb#41 - def _mailer_class=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _mailer_class=(new_value); end # source://actionmailer/lib/action_mailer/test_case.rb#41 def _mailer_class?; end @@ -2585,7 +2582,7 @@ module ActionMailer::TestHelper # end # end # - # source://actionmailer/lib/action_mailer/test_helper.rb#211 + # source://actionmailer/lib/action_mailer/test_helper.rb#191 def assert_no_enqueued_emails(&block); end # Returns any emails that are sent in the block. @@ -2603,7 +2600,7 @@ module ActionMailer::TestHelper # assert_equal "Hi there", emails.first.subject # end # - # source://actionmailer/lib/action_mailer/test_helper.rb#269 + # source://actionmailer/lib/action_mailer/test_helper.rb#249 def capture_emails(&block); end # Delivers all enqueued emails. If a block is given, delivers all of the emails @@ -2643,12 +2640,12 @@ module ActionMailer::TestHelper # If the +:at+ option is specified, then only delivers emails enqueued to deliver # immediately or before the given time. # - # source://actionmailer/lib/action_mailer/test_helper.rb#251 + # source://actionmailer/lib/action_mailer/test_helper.rb#231 def deliver_enqueued_emails(queue: T.unsafe(nil), at: T.unsafe(nil), &block); end private - # source://actionmailer/lib/action_mailer/test_helper.rb#278 + # source://actionmailer/lib/action_mailer/test_helper.rb#258 def delivery_job_filter(job); end end diff --git a/sorbet/rbi/gems/actionpack@7.1.3.3.rbi b/sorbet/rbi/gems/actionpack@8.0.0.beta1.rbi similarity index 54% rename from sorbet/rbi/gems/actionpack@7.1.3.3.rbi rename to sorbet/rbi/gems/actionpack@8.0.0.beta1.rbi index ff18cb42..81d4f241 100644 --- a/sorbet/rbi/gems/actionpack@7.1.3.3.rbi +++ b/sorbet/rbi/gems/actionpack@8.0.0.beta1.rbi @@ -5,55 +5,57 @@ # Please instead update this file by running `bin/tapioca gem actionpack`. -# source://actionpack/lib/abstract_controller/deprecator.rb#3 +# :markup: markdown +# +# source://actionpack/lib/abstract_controller/deprecator.rb#5 module AbstractController extend ::ActiveSupport::Autoload class << self - # source://actionpack/lib/abstract_controller/deprecator.rb#4 + # source://actionpack/lib/abstract_controller/deprecator.rb#6 def deprecator; end - # source://actionpack/lib/abstract_controller.rb#25 + # source://actionpack/lib/abstract_controller.rb#27 def eager_load!; end end end # Raised when a non-existing controller action is triggered. # -# source://actionpack/lib/abstract_controller/base.rb#11 +# source://actionpack/lib/abstract_controller/base.rb#13 class AbstractController::ActionNotFound < ::StandardError include ::DidYouMean::Correctable # @return [ActionNotFound] a new instance of ActionNotFound # - # source://actionpack/lib/abstract_controller/base.rb#14 + # source://actionpack/lib/abstract_controller/base.rb#16 def initialize(message = T.unsafe(nil), controller = T.unsafe(nil), action = T.unsafe(nil)); end - # source://actionpack/lib/abstract_controller/base.rb#12 + # source://actionpack/lib/abstract_controller/base.rb#14 def action; end - # source://actionpack/lib/abstract_controller/base.rb#12 + # source://actionpack/lib/abstract_controller/base.rb#14 def controller; end - # source://actionpack/lib/abstract_controller/base.rb#23 + # source://actionpack/lib/abstract_controller/base.rb#25 def corrections; end end -# source://actionpack/lib/abstract_controller/asset_paths.rb#4 +# source://actionpack/lib/abstract_controller/asset_paths.rb#6 module AbstractController::AssetPaths extend ::ActiveSupport::Concern end -# = Abstract Controller \Base +# # Abstract Controller Base # -# AbstractController::Base is a low-level API. Nobody should be -# using it directly, and subclasses (like ActionController::Base) are -# expected to provide their own +render+ method, since rendering means -# different things depending on the context. +# AbstractController::Base is a low-level API. Nobody should be using it +# directly, and subclasses (like ActionController::Base) are expected to provide +# their own `render` method, since rendering means different things depending on +# the context. # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://actionpack/lib/abstract_controller/base.rb#35 +# source://actionpack/lib/abstract_controller/base.rb#37 class AbstractController::Base include ::ActiveSupport::Configurable extend ::ActiveSupport::Configurable::ClassMethods @@ -61,251 +63,248 @@ class AbstractController::Base # Delegates to the class's ::action_methods. # - # source://actionpack/lib/abstract_controller/base.rb#170 + # source://actionpack/lib/abstract_controller/base.rb#172 def action_methods; end # Returns the name of the action this controller is processing. # - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def action_name; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def action_name=(_arg0); end - # Returns true if a method for the action is available and - # can be dispatched, false otherwise. + # Returns true if a method for the action is available and can be dispatched, + # false otherwise. # - # Notice that action_methods.include?("foo") may return - # false and available_action?("foo") returns true because - # this method considers actions that are also available - # through other means, for example, implicit render ones. + # Notice that `action_methods.include?("foo")` may return false and + # `available_action?("foo")` returns true because this method considers actions + # that are also available through other means, for example, implicit render + # ones. # - # ==== Parameters - # * action_name - The name of an action to be tested + # #### Parameters + # * `action_name` - The name of an action to be tested # # @return [Boolean] # - # source://actionpack/lib/abstract_controller/base.rb#184 + # source://actionpack/lib/abstract_controller/base.rb#187 def available_action?(action_name); end # Delegates to the class's ::controller_path. # - # source://actionpack/lib/abstract_controller/base.rb#165 + # source://actionpack/lib/abstract_controller/base.rb#167 def controller_path; end # Returns the formats that can be processed by the controller. # - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def formats; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def formats=(_arg0); end - # source://actionpack/lib/abstract_controller/base.rb#203 + # source://actionpack/lib/abstract_controller/base.rb#204 def inspect; end - # Tests if a response body is set. Used to determine if the - # +process_action+ callback needs to be terminated in - # AbstractController::Callbacks. + # Tests if a response body is set. Used to determine if the `process_action` + # callback needs to be terminated in AbstractController::Callbacks. # # @return [Boolean] # - # source://actionpack/lib/abstract_controller/base.rb#191 + # source://actionpack/lib/abstract_controller/base.rb#193 def performed?; end # Calls the action going through the entire Action Dispatch stack. # - # The actual method that is called is determined by calling - # #method_for_action. If no method can handle the action, then an - # AbstractController::ActionNotFound error is raised. + # The actual method that is called is determined by calling #method_for_action. + # If no method can handle the action, then an AbstractController::ActionNotFound + # error is raised. # - # ==== Returns - # * self + # #### Returns + # * `self` # - # source://actionpack/lib/abstract_controller/base.rb#151 - def process(action, *args, **_arg2); end + # source://actionpack/lib/abstract_controller/base.rb#154 + def process(action, *_arg1, **_arg2, &_arg3); end # Returns the body of the HTTP response sent by the controller. # - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def response_body; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def response_body=(_arg0); end - # Actually call the method associated with the action. Override - # this method if you wish to change how action methods are called, - # not to add additional behavior around it. For example, you would - # override #send_action if you want to inject arguments into the - # method. + # Actually call the method associated with the action. Override this method if + # you wish to change how action methods are called, not to add additional + # behavior around it. For example, you would override #send_action if you want + # to inject arguments into the method. def send_action(*_arg0); end private - # Takes an action name and returns the name of the method that will - # handle the action. + # Takes an action name and returns the name of the method that will handle the + # action. # # It checks if the action name is valid and returns false otherwise. # # See method_for_action for more information. # - # ==== Parameters - # * action_name - An action name to find a method name for + # #### Parameters + # * `action_name` - An action name to find a method name for # - # ==== Returns - # * string - The name of the method that handles the action - # * false - No valid method name could be found. - # Raise +AbstractController::ActionNotFound+. # - # source://actionpack/lib/abstract_controller/base.rb#255 + # #### Returns + # * `string` - The name of the method that handles the action + # * false - No valid method name could be found. + # + # Raise `AbstractController::ActionNotFound`. + # + # source://actionpack/lib/abstract_controller/base.rb#258 def _find_action_name(action_name); end - # If the action name was not found, but a method called "action_missing" - # was found, #method_for_action will return "_handle_action_missing". - # This method calls #action_missing with the current action name. + # If the action name was not found, but a method called "action_missing" was + # found, #method_for_action will return "_handle_action_missing". This method + # calls #action_missing with the current action name. # - # source://actionpack/lib/abstract_controller/base.rb#237 + # source://actionpack/lib/abstract_controller/base.rb#238 def _handle_action_missing(*args); end # Checks if the action name is valid and returns false otherwise. # # @return [Boolean] # - # source://actionpack/lib/abstract_controller/base.rb#291 + # source://actionpack/lib/abstract_controller/base.rb#295 def _valid_action_name?(action_name); end - # Returns true if the name can be considered an action because - # it has a method defined in the controller. + # Returns true if the name can be considered an action because it has a method + # defined in the controller. # - # ==== Parameters - # * name - The name of an action to be tested + # #### Parameters + # * `name` - The name of an action to be tested # # @return [Boolean] # - # source://actionpack/lib/abstract_controller/base.rb#213 + # source://actionpack/lib/abstract_controller/base.rb#215 def action_method?(name); end - # Takes an action name and returns the name of the method that will - # handle the action. In normal cases, this method returns the same - # name as it receives. By default, if #method_for_action receives - # a name that is not an action, it will look for an #action_missing - # method and return "_handle_action_missing" if one is found. + # Takes an action name and returns the name of the method that will handle the + # action. In normal cases, this method returns the same name as it receives. By + # default, if #method_for_action receives a name that is not an action, it will + # look for an #action_missing method and return "_handle_action_missing" if one + # is found. # - # Subclasses may override this method to add additional conditions - # that should be considered an action. For instance, an HTTP controller - # with a template matching the action name is considered to exist. + # Subclasses may override this method to add additional conditions that should + # be considered an action. For instance, an HTTP controller with a template + # matching the action name is considered to exist. # - # If you override this method to handle additional cases, you may - # also provide a method (like +_handle_method_missing+) to handle - # the case. + # If you override this method to handle additional cases, you may also provide a + # method (like `_handle_method_missing`) to handle the case. # - # If none of these conditions are true, and +method_for_action+ - # returns +nil+, an +AbstractController::ActionNotFound+ exception will be raised. + # If none of these conditions are true, and `method_for_action` returns `nil`, + # an `AbstractController::ActionNotFound` exception will be raised. # - # ==== Parameters - # * action_name - An action name to find a method name for + # #### Parameters + # * `action_name` - An action name to find a method name for # - # ==== Returns - # * string - The name of the method that handles the action - # * nil - No method name could be found. # - # source://actionpack/lib/abstract_controller/base.rb#282 + # #### Returns + # * `string` - The name of the method that handles the action + # * `nil` - No method name could be found. + # + # source://actionpack/lib/abstract_controller/base.rb#286 def method_for_action(action_name); end - # Call the action. Override this in a subclass to modify the - # behavior around processing an action. This, and not #process, - # is the intended way to override action dispatching. + # Call the action. Override this in a subclass to modify the behavior around + # processing an action. This, and not #process, is the intended way to override + # action dispatching. # - # Notice that the first argument is the method to be dispatched - # which is *not* necessarily the same as the action name. + # Notice that the first argument is the method to be dispatched which is **not** + # necessarily the same as the action name. # - # source://actionpack/lib/abstract_controller/base.rb#223 + # source://actionpack/lib/abstract_controller/base.rb#225 def process_action(*_arg0, **_arg1, &_arg2); end class << self # Returns the value of attribute abstract. # - # source://actionpack/lib/abstract_controller/base.rb#52 + # source://actionpack/lib/abstract_controller/base.rb#54 def abstract; end - # Define a controller as abstract. See internal_methods for more - # details. + # Define a controller as abstract. See internal_methods for more details. # - # source://actionpack/lib/abstract_controller/base.rb#57 + # source://actionpack/lib/abstract_controller/base.rb#58 def abstract!; end # Returns the value of attribute abstract. # - # source://actionpack/lib/abstract_controller/base.rb#52 + # source://actionpack/lib/abstract_controller/base.rb#54 def abstract?; end - # A list of method names that should be considered actions. This - # includes all public instance methods on a controller, less - # any internal methods (see internal_methods), adding back in - # any methods that are internal, but still exist on the class - # itself. + # A list of method names that should be considered actions. This includes all + # public instance methods on a controller, less any internal methods (see + # internal_methods), adding back in any methods that are internal, but still + # exist on the class itself. # - # ==== Returns - # * Set - A set of all methods that should be considered actions. + # #### Returns + # * `Set` - A set of all methods that should be considered actions. # - # source://actionpack/lib/abstract_controller/base.rb#96 + # source://actionpack/lib/abstract_controller/base.rb#97 def action_methods; end - # action_methods are cached and there is sometimes a need to refresh - # them. ::clear_action_methods! allows you to do that, so next time - # you run action_methods, they will be recalculated. + # action_methods are cached and there is sometimes a need to refresh them. + # ::clear_action_methods! allows you to do that, so next time you run + # action_methods, they will be recalculated. # - # source://actionpack/lib/abstract_controller/base.rb#111 + # source://actionpack/lib/abstract_controller/base.rb#112 def clear_action_methods!; end # Returns the full controller name, underscored, without the ending Controller. # - # class MyApp::MyPostsController < AbstractController::Base + # class MyApp::MyPostsController < AbstractController::Base # - # end + # end # - # MyApp::MyPostsController.controller_path # => "my_app/my_posts" + # MyApp::MyPostsController.controller_path # => "my_app/my_posts" # - # ==== Returns - # * String + # #### Returns + # * `String` # - # source://actionpack/lib/abstract_controller/base.rb#125 + # source://actionpack/lib/abstract_controller/base.rb#127 def controller_path; end - # source://actionpack/lib/abstract_controller/base.rb#135 + # source://actionpack/lib/abstract_controller/base.rb#137 def eager_load!; end - # source://actionpack/lib/abstract_controller/base.rb#61 + # source://actionpack/lib/abstract_controller/base.rb#62 def inherited(klass); end - # A list of all internal methods for a controller. This finds the first - # abstract superclass of a controller, and gets a list of all public - # instance methods on that abstract class. Public instance methods of - # a controller would normally be considered action methods, so methods - # declared on abstract classes are being removed. - # (ActionController::Metal and ActionController::Base are defined as abstract) + # A list of all internal methods for a controller. This finds the first abstract + # superclass of a controller, and gets a list of all public instance methods on + # that abstract class. Public instance methods of a controller would normally be + # considered action methods, so methods declared on abstract classes are being + # removed. (ActionController::Metal and ActionController::Base are defined as + # abstract) # - # source://actionpack/lib/abstract_controller/base.rb#76 + # source://actionpack/lib/abstract_controller/base.rb#77 def internal_methods; end # Refresh the cached action_methods when a new action_method is added. # - # source://actionpack/lib/abstract_controller/base.rb#130 + # source://actionpack/lib/abstract_controller/base.rb#132 def method_added(name); end - # Returns true if the given controller is capable of rendering - # a path. A subclass of +AbstractController::Base+ - # may return false. An Email controller for example does not - # support paths, only full URLs. + # Returns true if the given controller is capable of rendering a path. A + # subclass of `AbstractController::Base` may return false. An Email controller + # for example does not support paths, only full URLs. # # @return [Boolean] # - # source://actionpack/lib/abstract_controller/base.rb#199 + # source://actionpack/lib/abstract_controller/base.rb#200 def supports_path?; end end end -# source://actionpack/lib/abstract_controller/caching.rb#4 +# source://actionpack/lib/abstract_controller/caching.rb#6 module AbstractController::Caching include ::AbstractController::Caching::ConfigMethods extend ::ActiveSupport::Concern @@ -318,14 +317,14 @@ module AbstractController::Caching mixes_in_class_methods ::AbstractController::Caching::ClassMethods mixes_in_class_methods ::AbstractController::Caching::ConfigMethods - # source://actionpack/lib/abstract_controller/caching.rb#52 + # source://actionpack/lib/abstract_controller/caching.rb#54 def view_cache_dependencies; end private # Convenience accessor. # - # source://actionpack/lib/abstract_controller/caching.rb#58 + # source://actionpack/lib/abstract_controller/caching.rb#60 def cache(key, options = T.unsafe(nil), &block); end module GeneratedClassMethods @@ -347,45 +346,44 @@ module AbstractController::Caching end end -# source://actionpack/lib/abstract_controller/caching.rb#46 +# source://actionpack/lib/abstract_controller/caching.rb#48 module AbstractController::Caching::ClassMethods - # source://actionpack/lib/abstract_controller/caching.rb#47 + # source://actionpack/lib/abstract_controller/caching.rb#49 def view_cache_dependency(&dependency); end end -# source://actionpack/lib/abstract_controller/caching.rb#12 +# source://actionpack/lib/abstract_controller/caching.rb#14 module AbstractController::Caching::ConfigMethods - # source://actionpack/lib/abstract_controller/caching.rb#13 + # source://actionpack/lib/abstract_controller/caching.rb#15 def cache_store; end - # source://actionpack/lib/abstract_controller/caching.rb#17 + # source://actionpack/lib/abstract_controller/caching.rb#19 def cache_store=(store); end private # @return [Boolean] # - # source://actionpack/lib/abstract_controller/caching.rb#22 + # source://actionpack/lib/abstract_controller/caching.rb#24 def cache_configured?; end end -# = Abstract Controller Caching \Fragments +# # Abstract Controller Caching Fragments # -# Fragment caching is used for caching various blocks within -# views without caching the entire action as a whole. This is -# useful when certain elements of an action change frequently or -# depend on complicated state while other parts rarely change or -# can be shared amongst multiple parties. The caching is done using -# the +cache+ helper available in the Action View. See +# Fragment caching is used for caching various blocks within views without +# caching the entire action as a whole. This is useful when certain elements of +# an action change frequently or depend on complicated state while other parts +# rarely change or can be shared amongst multiple parties. The caching is done +# using the `cache` helper available in the Action View. See # ActionView::Helpers::CacheHelper for more information. # -# While it's strongly recommended that you use key-based cache -# expiration (see links in CacheHelper for more information), -# it is also possible to manually expire caches. For example: +# While it's strongly recommended that you use key-based cache expiration (see +# links in CacheHelper for more information), it is also possible to manually +# expire caches. For example: # -# expire_fragment('name_of_cache') +# expire_fragment('name_of_cache') # -# source://actionpack/lib/abstract_controller/caching/fragments.rb#20 +# source://actionpack/lib/abstract_controller/caching/fragments.rb#21 module AbstractController::Caching::Fragments extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -393,59 +391,57 @@ module AbstractController::Caching::Fragments mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::AbstractController::Caching::Fragments::ClassMethods - # Given a key (as described in +expire_fragment+), returns - # a key array suitable for use in reading, writing, or expiring a - # cached fragment. All keys begin with :views, - # followed by ENV["RAILS_CACHE_ID"] or ENV["RAILS_APP_VERSION"] if set, - # followed by any controller-wide key prefix values, ending - # with the specified +key+ value. + # Given a key (as described in `expire_fragment`), returns a key array suitable + # for use in reading, writing, or expiring a cached fragment. All keys begin + # with `:views`, followed by `ENV["RAILS_CACHE_ID"]` or + # `ENV["RAILS_APP_VERSION"]` if set, followed by any controller-wide key prefix + # values, ending with the specified `key` value. # - # source://actionpack/lib/abstract_controller/caching/fragments.rb#70 + # source://actionpack/lib/abstract_controller/caching/fragments.rb#68 def combined_fragment_cache_key(key); end # Removes fragments from the cache. # - # +key+ can take one of three forms: + # `key` can take one of three forms: # - # * String - This would normally take the form of a path, like - # pages/45/notes. - # * Hash - Treated as an implicit call to +url_for+, like - # { controller: 'pages', action: 'notes', id: 45} - # * Regexp - Will remove any fragment that matches, so - # %r{pages/\d*/notes} might remove all notes. Make sure you - # don't use anchors in the regex (^ or $) because - # the actual filename matched looks like - # ./cache/filename/path.cache. Note: Regexp expiration is - # only supported on caches that can iterate over all keys (unlike - # memcached). + # * String - This would normally take the form of a path, like + # `pages/45/notes`. + # * Hash - Treated as an implicit call to `url_for`, like `{ controller: + # 'pages', action: 'notes', id: 45}` + # * Regexp - Will remove any fragment that matches, so `%r{pages/\d*/notes}` + # might remove all notes. Make sure you don't use anchors in the regex (`^` + # or `$`) because the actual filename matched looks like + # `./cache/filename/path.cache`. Note: Regexp expiration is only supported + # on caches that can iterate over all keys (unlike memcached). # - # +options+ is passed through to the cache store's +delete+ - # method (or delete_matched, for Regexp keys). # - # source://actionpack/lib/abstract_controller/caching/fragments.rb#134 + # `options` is passed through to the cache store's `delete` method (or + # `delete_matched`, for Regexp keys). + # + # source://actionpack/lib/abstract_controller/caching/fragments.rb#131 def expire_fragment(key, options = T.unsafe(nil)); end - # Check if a cached fragment from the location signified by - # +key+ exists (see +expire_fragment+ for acceptable formats). + # Check if a cached fragment from the location signified by `key` exists (see + # `expire_fragment` for acceptable formats). # # @return [Boolean] # - # source://actionpack/lib/abstract_controller/caching/fragments.rb#107 + # source://actionpack/lib/abstract_controller/caching/fragments.rb#105 def fragment_exist?(key, options = T.unsafe(nil)); end - # source://actionpack/lib/abstract_controller/caching/fragments.rb#147 + # source://actionpack/lib/abstract_controller/caching/fragments.rb#144 def instrument_fragment_cache(name, key, &block); end - # Reads a cached fragment from the location signified by +key+ - # (see +expire_fragment+ for acceptable formats). + # Reads a cached fragment from the location signified by `key` (see + # `expire_fragment` for acceptable formats). # - # source://actionpack/lib/abstract_controller/caching/fragments.rb#95 + # source://actionpack/lib/abstract_controller/caching/fragments.rb#93 def read_fragment(key, options = T.unsafe(nil)); end - # Writes +content+ to the location signified by - # +key+ (see +expire_fragment+ for acceptable formats). + # Writes `content` to the location signified by `key` (see `expire_fragment` for + # acceptable formats). # - # source://actionpack/lib/abstract_controller/caching/fragments.rb#82 + # source://actionpack/lib/abstract_controller/caching/fragments.rb#80 def write_fragment(key, content, options = T.unsafe(nil)); end module GeneratedClassMethods @@ -461,53 +457,50 @@ module AbstractController::Caching::Fragments end end -# source://actionpack/lib/abstract_controller/caching/fragments.rb#37 +# source://actionpack/lib/abstract_controller/caching/fragments.rb#38 module AbstractController::Caching::Fragments::ClassMethods - # Allows you to specify controller-wide key prefixes for - # cache fragments. Pass either a constant +value+, or a block - # which computes a value each time a cache key is generated. + # Allows you to specify controller-wide key prefixes for cache fragments. Pass + # either a constant `value`, or a block which computes a value each time a cache + # key is generated. # - # For example, you may want to prefix all fragment cache keys - # with a global version identifier, so you can easily - # invalidate all caches. + # For example, you may want to prefix all fragment cache keys with a global + # version identifier, so you can easily invalidate all caches. # - # class ApplicationController - # fragment_cache_key "v1" - # end + # class ApplicationController + # fragment_cache_key "v1" + # end # - # When it's time to invalidate all fragments, simply change - # the string constant. Or, progressively roll out the cache - # invalidation using a computed value: + # When it's time to invalidate all fragments, simply change the string constant. + # Or, progressively roll out the cache invalidation using a computed value: # - # class ApplicationController - # fragment_cache_key do - # @account.id.odd? ? "v1" : "v2" + # class ApplicationController + # fragment_cache_key do + # @account.id.odd? ? "v1" : "v2" + # end # end - # end # - # source://actionpack/lib/abstract_controller/caching/fragments.rb#59 + # source://actionpack/lib/abstract_controller/caching/fragments.rb#58 def fragment_cache_key(value = T.unsafe(nil), &key); end end -# = Abstract Controller \Callbacks -# -# Abstract Controller provides hooks during the life cycle of a controller action. -# Callbacks allow you to trigger logic during this cycle. Available callbacks are: +# # Abstract Controller Callbacks # -# * after_action -# * append_after_action -# * append_around_action -# * append_before_action -# * around_action -# * before_action -# * prepend_after_action -# * prepend_around_action -# * prepend_before_action -# * skip_after_action -# * skip_around_action -# * skip_before_action +# Abstract Controller provides hooks during the life cycle of a controller +# action. Callbacks allow you to trigger logic during this cycle. Available +# callbacks are: # -# NOTE: Calling the same callback multiple times will overwrite previous callback definitions. +# * `after_action` +# * `append_after_action` +# * `append_around_action` +# * `append_before_action` +# * `around_action` +# * `before_action` +# * `prepend_after_action` +# * `prepend_around_action` +# * `prepend_before_action` +# * `skip_after_action` +# * `skip_around_action` +# * `skip_before_action` # # source://actionpack/lib/abstract_controller/callbacks.rb#24 module AbstractController::Callbacks @@ -522,21 +515,19 @@ module AbstractController::Callbacks private - # Override AbstractController::Base#process_action to run the - # process_action callbacks around the normal behavior. + # Override `AbstractController::Base#process_action` to run the `process_action` + # callbacks around the normal behavior. # - # source://actionpack/lib/abstract_controller/callbacks.rb#257 + # source://actionpack/lib/abstract_controller/callbacks.rb#259 def process_action(*_arg0, **_arg1, &_arg2); end module GeneratedClassMethods def __callbacks; end def __callbacks=(value); end - def __callbacks?; end end module GeneratedInstanceMethods def __callbacks; end - def __callbacks?; end end end @@ -570,220 +561,218 @@ end # source://actionpack/lib/abstract_controller/callbacks.rb#74 module AbstractController::Callbacks::ClassMethods - # Take callback names and an optional callback proc, normalize them, - # then call the block with each callback. This allows us to abstract - # the normalization across several methods that use it. + # Take callback names and an optional callback proc, normalize them, then call + # the block with each callback. This allows us to abstract the normalization + # across several methods that use it. # - # ==== Parameters - # * callbacks - An array of callbacks, with an optional - # options hash as the last parameter. - # * block - A proc that should be added to the callbacks. + # #### Parameters + # * `callbacks` - An array of callbacks, with an optional options hash as the + # last parameter. + # * `block` - A proc that should be added to the callbacks. # - # ==== Block Parameters - # * name - The callback to be added. - # * options - A hash of options to be used when adding the callback. # - # source://actionpack/lib/abstract_controller/callbacks.rb#119 + # #### Block Parameters + # * `name` - The callback to be added. + # * `options` - A hash of options to be used when adding the callback. + # + # source://actionpack/lib/abstract_controller/callbacks.rb#120 def _insert_callbacks(callbacks, block = T.unsafe(nil)); end - # source://actionpack/lib/abstract_controller/callbacks.rb#99 + # source://actionpack/lib/abstract_controller/callbacks.rb#98 def _normalize_callback_option(options, from, to); end - # If +:only+ or +:except+ are used, convert the options into the - # +:if+ and +:unless+ options of ActiveSupport::Callbacks. + # If `:only` or `:except` are used, convert the options into the `:if` and + # `:unless` options of ActiveSupport::Callbacks. # - # The basic idea is that :only => :index gets converted to - # :if => proc {|c| c.action_name == "index" }. + # The basic idea is that `:only => :index` gets converted to `:if => proc {|c| + # c.action_name == "index" }`. # - # Note that :only has priority over :if in case they - # are used together. + # Note that `:only` has priority over `:if` in case they are used together. # - # only: :index, if: -> { true } # the :if option will be ignored. + # only: :index, if: -> { true } # the :if option will be ignored. # - # Note that :if has priority over :except in case they - # are used together. + # Note that `:if` has priority over `:except` in case they are used together. # - # except: :index, if: -> { true } # the :except option will be ignored. + # except: :index, if: -> { true } # the :except option will be ignored. # - # ==== Options - # * only - The callback should be run only for this action. - # * except - The callback should be run for all actions except this action. + # #### Options + # * `only` - The callback should be run only for this action. + # * `except` - The callback should be run for all actions except this action. # - # source://actionpack/lib/abstract_controller/callbacks.rb#94 + # source://actionpack/lib/abstract_controller/callbacks.rb#93 def _normalize_callback_options(options); end - # source://actionpack/lib/abstract_controller/callbacks.rb#229 + # source://actionpack/lib/abstract_controller/callbacks.rb#231 def after_action(*names, &blk); end - # source://actionpack/lib/abstract_controller/callbacks.rb#229 + # source://actionpack/lib/abstract_controller/callbacks.rb#231 def append_after_action(*names, &blk); end - # source://actionpack/lib/abstract_controller/callbacks.rb#229 + # source://actionpack/lib/abstract_controller/callbacks.rb#231 def append_around_action(*names, &blk); end - # source://actionpack/lib/abstract_controller/callbacks.rb#229 + # source://actionpack/lib/abstract_controller/callbacks.rb#231 def append_before_action(*names, &blk); end - # source://actionpack/lib/abstract_controller/callbacks.rb#229 + # source://actionpack/lib/abstract_controller/callbacks.rb#231 def around_action(*names, &blk); end - # source://actionpack/lib/abstract_controller/callbacks.rb#229 + # source://actionpack/lib/abstract_controller/callbacks.rb#231 def before_action(*names, &blk); end - # source://actionpack/lib/abstract_controller/callbacks.rb#235 + # source://actionpack/lib/abstract_controller/callbacks.rb#237 def prepend_after_action(*names, &blk); end - # source://actionpack/lib/abstract_controller/callbacks.rb#235 + # source://actionpack/lib/abstract_controller/callbacks.rb#237 def prepend_around_action(*names, &blk); end - # source://actionpack/lib/abstract_controller/callbacks.rb#235 + # source://actionpack/lib/abstract_controller/callbacks.rb#237 def prepend_before_action(*names, &blk); end - # source://actionpack/lib/abstract_controller/callbacks.rb#243 + # source://actionpack/lib/abstract_controller/callbacks.rb#245 def skip_after_action(*names); end - # source://actionpack/lib/abstract_controller/callbacks.rb#243 + # source://actionpack/lib/abstract_controller/callbacks.rb#245 def skip_around_action(*names); end - # source://actionpack/lib/abstract_controller/callbacks.rb#243 + # source://actionpack/lib/abstract_controller/callbacks.rb#245 def skip_before_action(*names); end end -# source://actionpack/lib/abstract_controller/collector.rb#6 +# source://actionpack/lib/abstract_controller/collector.rb#8 module AbstractController::Collector - # source://actionpack/lib/abstract_controller/collector.rb#10 - def atom(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def atom(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def bmp(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def bmp(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def css(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def css(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def csv(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def csv(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def gif(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def gif(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def gzip(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def gzip(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def html(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def html(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def ics(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def ics(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def jpeg(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def jpeg(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def js(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def js(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def json(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def json(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def m4a(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def m4a(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def mp3(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def mp3(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def mp4(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def mp4(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def mpeg(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def mpeg(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def multipart_form(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def multipart_form(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def ogg(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def ogg(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def otf(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def otf(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def pdf(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def pdf(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def png(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def png(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def rss(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def rss(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def svg(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def svg(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def text(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def text(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def tiff(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def tiff(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def ttf(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def ttf(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def url_encoded_form(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def url_encoded_form(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def vcf(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def vcf(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def vtt(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def vtt(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def webm(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def webm(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def webp(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def webp(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def woff(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def woff(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def woff2(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def woff2(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def xml(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def xml(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def yaml(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def yaml(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/collector.rb#10 - def zip(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#12 + def zip(*_arg0, **_arg1, &_arg2); end private - # source://actionpack/lib/abstract_controller/collector.rb#26 - def method_missing(symbol, *args, **_arg2, &block); end + # source://actionpack/lib/abstract_controller/collector.rb#27 + def method_missing(symbol, *_arg1, **_arg2, &_arg3); end class << self - # source://actionpack/lib/abstract_controller/collector.rb#7 + # source://actionpack/lib/abstract_controller/collector.rb#9 def generate_method_for_mime(mime); end end end -# source://actionpack/lib/abstract_controller/rendering.rb#9 +# source://actionpack/lib/abstract_controller/rendering.rb#11 class AbstractController::DoubleRenderError < ::AbstractController::Error # @return [DoubleRenderError] a new instance of DoubleRenderError # - # source://actionpack/lib/abstract_controller/rendering.rb#12 + # source://actionpack/lib/abstract_controller/rendering.rb#14 def initialize(message = T.unsafe(nil)); end end -# source://actionpack/lib/abstract_controller/rendering.rb#10 +# source://actionpack/lib/abstract_controller/rendering.rb#12 AbstractController::DoubleRenderError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/abstract_controller/error.rb#4 +# source://actionpack/lib/abstract_controller/error.rb#6 class AbstractController::Error < ::StandardError; end -# source://actionpack/lib/abstract_controller/helpers.rb#7 +# source://actionpack/lib/abstract_controller/helpers.rb#9 module AbstractController::Helpers - include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor extend ::ActiveSupport::Concern extend ::AbstractController::Helpers::Resolution include GeneratedInstanceMethods @@ -791,7 +780,7 @@ module AbstractController::Helpers mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::AbstractController::Helpers::ClassMethods - # source://actionpack/lib/abstract_controller/helpers.rb#44 + # source://actionpack/lib/abstract_controller/helpers.rb#28 def _helpers; end module GeneratedClassMethods @@ -807,7 +796,7 @@ module AbstractController::Helpers end end -# source://actionpack/lib/abstract_controller/helpers.rb#80 +# source://actionpack/lib/abstract_controller/helpers.rb#64 module AbstractController::Helpers::ClassMethods include ::AbstractController::Helpers::Resolution @@ -815,152 +804,144 @@ module AbstractController::Helpers::ClassMethods # # @param value the value to set the attribute _helpers to. # - # source://actionpack/lib/abstract_controller/helpers.rb#92 + # source://actionpack/lib/abstract_controller/helpers.rb#76 def _helpers=(_arg0); end - # source://actionpack/lib/abstract_controller/helpers.rb#231 + # source://actionpack/lib/abstract_controller/helpers.rb#216 def _helpers_for_modification; end - # Clears up all existing helpers in this class, only keeping the helper - # with the same name as this class. + # Clears up all existing helpers in this class, only keeping the helper with the + # same name as this class. # - # source://actionpack/lib/abstract_controller/helpers.rb#222 + # source://actionpack/lib/abstract_controller/helpers.rb#207 def clear_helpers; end # Includes the given modules in the template class. # - # Modules can be specified in different ways. All of the following calls - # include +FooHelper+: + # Modules can be specified in different ways. All of the following calls include + # `FooHelper`: # - # # Module, recommended. - # helper FooHelper + # # Module, recommended. + # helper FooHelper # - # # String/symbol without the "helper" suffix, camel or snake case. - # helper "Foo" - # helper :Foo - # helper "foo" - # helper :foo + # # String/symbol without the "helper" suffix, camel or snake case. + # helper "Foo" + # helper :Foo + # helper "foo" + # helper :foo # - # The last two assume that "foo".camelize returns "Foo". + # The last two assume that `"foo".camelize` returns "Foo". # - # When strings or symbols are passed, the method finds the actual module - # object using String#constantize. Therefore, if the module has not been - # yet loaded, it has to be autoloadable, which is normally the case. + # When strings or symbols are passed, the method finds the actual module object + # using String#constantize. Therefore, if the module has not been yet loaded, it + # has to be autoloadable, which is normally the case. # - # Namespaces are supported. The following calls include +Foo::BarHelper+: + # Namespaces are supported. The following calls include `Foo::BarHelper`: # - # # Module, recommended. - # helper Foo::BarHelper + # # Module, recommended. + # helper Foo::BarHelper # - # # String/symbol without the "helper" suffix, camel or snake case. - # helper "Foo::Bar" - # helper :"Foo::Bar" - # helper "foo/bar" - # helper :"foo/bar" + # # String/symbol without the "helper" suffix, camel or snake case. + # helper "Foo::Bar" + # helper :"Foo::Bar" + # helper "foo/bar" + # helper :"foo/bar" # - # The last two assume that "foo/bar".camelize returns "Foo::Bar". + # The last two assume that `"foo/bar".camelize` returns "Foo::Bar". # - # The method accepts a block too. If present, the block is evaluated in - # the context of the controller helper module. This simple call makes the - # +wadus+ method available in templates of the enclosing controller: + # The method accepts a block too. If present, the block is evaluated in the + # context of the controller helper module. This simple call makes the `wadus` + # method available in templates of the enclosing controller: # - # helper do - # def wadus - # "wadus" + # helper do + # def wadus + # "wadus" + # end # end - # end # # Furthermore, all the above styles can be mixed together: # - # helper FooHelper, "woo", "bar/baz" do - # def wadus - # "wadus" + # helper FooHelper, "woo", "bar/baz" do + # def wadus + # "wadus" + # end # end - # end # - # source://actionpack/lib/abstract_controller/helpers.rb#211 + # source://actionpack/lib/abstract_controller/helpers.rb#196 def helper(*args, &block); end # Declare a controller method as a helper. For example, the following - # makes the +current_user+ and +logged_in?+ controller methods available + # makes the `current_user` and `logged_in?` controller methods available # to the view: - # class ApplicationController < ActionController::Base - # helper_method :current_user, :logged_in? + # class ApplicationController < ActionController::Base + # helper_method :current_user, :logged_in? # - # private - # def current_user - # @current_user ||= User.find_by(id: session[:user]) - # end + # private + # def current_user + # @current_user ||= User.find_by(id: session[:user]) + # end # - # def logged_in? - # current_user != nil - # end - # end + # def logged_in? + # current_user != nil + # end + # end # # In a view: - # <% if logged_in? -%>Welcome, <%= current_user.name %><% end -%> + # <% if logged_in? -%>Welcome, <%= current_user.name %><% end -%> # - # ==== Parameters - # * method[, method] - A name or names of a method on the controller - # to be made available on the view. + # #### Parameters + # * `method[, method]` - A name or names of a method on the controller to be + # made available on the view. # - # source://actionpack/lib/abstract_controller/helpers.rb#140 + # source://actionpack/lib/abstract_controller/helpers.rb#126 def helper_method(*methods); end - # When a class is inherited, wrap its helper module in a new module. - # This ensures that the parent class's module can be changed - # independently of the child class's. + # When a class is inherited, wrap its helper module in a new module. This + # ensures that the parent class's module can be changed independently of the + # child class's. # - # source://actionpack/lib/abstract_controller/helpers.rb#84 + # source://actionpack/lib/abstract_controller/helpers.rb#68 def inherited(klass); end private - # source://actionpack/lib/abstract_controller/helpers.rb#250 + # source://actionpack/lib/abstract_controller/helpers.rb#235 def default_helper_module!; end - # source://actionpack/lib/abstract_controller/helpers.rb#239 + # source://actionpack/lib/abstract_controller/helpers.rb#224 def define_helpers_module(klass, helpers = T.unsafe(nil)); end end -# source://actionpack/lib/abstract_controller/helpers.rb#27 -class AbstractController::Helpers::DeprecatedMissingHelperError < ::LoadError - # @return [DeprecatedMissingHelperError] a new instance of DeprecatedMissingHelperError - # - # source://actionpack/lib/abstract_controller/helpers.rb#28 - def initialize(error, path); end -end - -# source://actionpack/lib/abstract_controller/helpers.rb#48 +# source://actionpack/lib/abstract_controller/helpers.rb#32 module AbstractController::Helpers::Resolution - # source://actionpack/lib/abstract_controller/helpers.rb#64 + # source://actionpack/lib/abstract_controller/helpers.rb#48 def all_helpers_from_path(path); end - # source://actionpack/lib/abstract_controller/helpers.rb#73 + # source://actionpack/lib/abstract_controller/helpers.rb#57 def helper_modules_from_paths(paths); end - # source://actionpack/lib/abstract_controller/helpers.rb#49 + # source://actionpack/lib/abstract_controller/helpers.rb#33 def modules_for_helpers(modules_or_helper_prefixes); end end -# source://actionpack/lib/abstract_controller/logger.rb#6 +# source://actionpack/lib/abstract_controller/logger.rb#8 module AbstractController::Logger extend ::ActiveSupport::Concern include ::ActiveSupport::Benchmarkable end -# source://actionpack/lib/abstract_controller/railties/routes_helpers.rb#6 +# source://actionpack/lib/abstract_controller/railties/routes_helpers.rb#8 module AbstractController::Railties; end -# source://actionpack/lib/abstract_controller/railties/routes_helpers.rb#7 +# source://actionpack/lib/abstract_controller/railties/routes_helpers.rb#9 module AbstractController::Railties::RoutesHelpers class << self - # source://actionpack/lib/abstract_controller/railties/routes_helpers.rb#8 + # source://actionpack/lib/abstract_controller/railties/routes_helpers.rb#10 def with(routes, include_path_helpers = T.unsafe(nil)); end end end -# source://actionpack/lib/abstract_controller/rendering.rb#17 +# source://actionpack/lib/abstract_controller/rendering.rb#19 module AbstractController::Rendering extend ::ActiveSupport::Concern include ::ActionView::ViewPaths @@ -968,134 +949,133 @@ module AbstractController::Rendering mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods # Normalizes arguments and options, and then delegates to render_to_body and - # sticks the result in self.response_body. + # sticks the result in `self.response_body`. # - # Supported options depend on the underlying +render_to_body+ implementation. + # Supported options depend on the underlying `render_to_body` implementation. # - # source://actionpack/lib/abstract_controller/rendering.rb#25 + # source://actionpack/lib/abstract_controller/rendering.rb#27 def render(*args, &block); end # Performs the actual template rendering. # - # source://actionpack/lib/abstract_controller/rendering.rb#49 + # source://actionpack/lib/abstract_controller/rendering.rb#51 def render_to_body(options = T.unsafe(nil)); end # Similar to #render, but only returns the rendered template as a string, - # instead of setting +self.response_body+. + # instead of setting `self.response_body`. # - # If a component extends the semantics of +response_body+ (as ActionController - # extends it to be anything that responds to the method each), this method - # needs to be overridden in order to still return a string. + # If a component extends the semantics of `response_body` (as ActionController + # extends it to be anything that responds to the method each), this method needs + # to be overridden in order to still return a string. # - # source://actionpack/lib/abstract_controller/rendering.rb#43 + # source://actionpack/lib/abstract_controller/rendering.rb#45 def render_to_string(*args, &block); end - # Returns +Content-Type+ of rendered content. + # Returns `Content-Type` of rendered content. # - # source://actionpack/lib/abstract_controller/rendering.rb#53 + # source://actionpack/lib/abstract_controller/rendering.rb#55 def rendered_format; end - # This method should return a hash with assigns. - # You can overwrite this configuration per controller. + # This method should return a hash with assigns. You can overwrite this + # configuration per controller. # - # source://actionpack/lib/abstract_controller/rendering.rb#61 + # source://actionpack/lib/abstract_controller/rendering.rb#63 def view_assigns; end private - # Normalize args by converting render "foo" to - # render action: "foo" and render "foo/bar" to - # render file: "foo/bar". + # Normalize args by converting `render "foo"` to `render action: "foo"` and + # `render "foo/bar"` to `render file: "foo/bar"`. # - # source://actionpack/lib/abstract_controller/rendering.rb#73 + # source://actionpack/lib/abstract_controller/rendering.rb#74 def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end # Normalize options. # - # source://actionpack/lib/abstract_controller/rendering.rb#88 + # source://actionpack/lib/abstract_controller/rendering.rb#89 def _normalize_options(options); end # Normalize args and options. # - # source://actionpack/lib/abstract_controller/rendering.rb#114 + # source://actionpack/lib/abstract_controller/rendering.rb#115 def _normalize_render(*args, &block); end # Process the rendered format. # - # source://actionpack/lib/abstract_controller/rendering.rb#98 + # source://actionpack/lib/abstract_controller/rendering.rb#99 def _process_format(format); end # Process extra options. # - # source://actionpack/lib/abstract_controller/rendering.rb#93 + # source://actionpack/lib/abstract_controller/rendering.rb#94 def _process_options(options); end - # source://actionpack/lib/abstract_controller/rendering.rb#101 + # source://actionpack/lib/abstract_controller/rendering.rb#102 def _process_variant(options); end - # source://actionpack/lib/abstract_controller/rendering.rb#121 + # source://actionpack/lib/abstract_controller/rendering.rb#122 def _protected_ivars; end - # source://actionpack/lib/abstract_controller/rendering.rb#104 + # source://actionpack/lib/abstract_controller/rendering.rb#105 def _set_html_content_type; end - # source://actionpack/lib/abstract_controller/rendering.rb#110 + # source://actionpack/lib/abstract_controller/rendering.rb#111 def _set_rendered_content_type(format); end - # source://actionpack/lib/abstract_controller/rendering.rb#107 + # source://actionpack/lib/abstract_controller/rendering.rb#108 def _set_vary_header; end end -# source://actionpack/lib/abstract_controller/rendering.rb#57 +# source://actionpack/lib/abstract_controller/rendering.rb#59 AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/abstract_controller/translation.rb#6 +# source://actionpack/lib/abstract_controller/translation.rb#8 module AbstractController::Translation - # Delegates to I18n.localize. + # Delegates to `I18n.localize`. # - # source://actionpack/lib/abstract_controller/translation.rb#36 + # source://actionpack/lib/abstract_controller/translation.rb#37 def l(object, **options); end - # Delegates to I18n.localize. + # Delegates to `I18n.localize`. # - # source://actionpack/lib/abstract_controller/translation.rb#36 + # source://actionpack/lib/abstract_controller/translation.rb#37 def localize(object, **options); end - # Delegates to I18n.translate. + # Delegates to `I18n.translate`. # # When the given key starts with a period, it will be scoped by the current - # controller and action. So if you call translate(".foo") from - # PeopleController#index, it will convert the call to - # I18n.translate("people.index.foo"). This makes it less repetitive - # to translate many keys within the same controller / action and gives you a - # simple framework for scoping them consistently. + # controller and action. So if you call `translate(".foo")` from + # `PeopleController#index`, it will convert the call to + # `I18n.translate("people.index.foo")`. This makes it less repetitive to + # translate many keys within the same controller / action and gives you a simple + # framework for scoping them consistently. # - # source://actionpack/lib/abstract_controller/translation.rb#15 + # source://actionpack/lib/abstract_controller/translation.rb#17 def t(key, **options); end - # Delegates to I18n.translate. + # Delegates to `I18n.translate`. # # When the given key starts with a period, it will be scoped by the current - # controller and action. So if you call translate(".foo") from - # PeopleController#index, it will convert the call to - # I18n.translate("people.index.foo"). This makes it less repetitive - # to translate many keys within the same controller / action and gives you a - # simple framework for scoping them consistently. + # controller and action. So if you call `translate(".foo")` from + # `PeopleController#index`, it will convert the call to + # `I18n.translate("people.index.foo")`. This makes it less repetitive to + # translate many keys within the same controller / action and gives you a simple + # framework for scoping them consistently. # - # source://actionpack/lib/abstract_controller/translation.rb#15 + # source://actionpack/lib/abstract_controller/translation.rb#17 def translate(key, **options); end end -# = URL For +# # URL For # -# Includes +url_for+ into the host class (e.g. an abstract controller or mailer). The class -# has to provide a +RouteSet+ by implementing the _routes methods. Otherwise, an -# exception will be raised. +# Includes `url_for` into the host class (e.g. an abstract controller or +# mailer). The class has to provide a `RouteSet` by implementing the `_routes` +# methods. Otherwise, an exception will be raised. # -# Note that this module is completely decoupled from HTTP - the only requirement is a valid -# _routes implementation. +# Note that this module is completely decoupled from HTTP - the only requirement +# is a valid `_routes` implementation. # -# source://actionpack/lib/abstract_controller/url_for.rb#12 +# source://actionpack/lib/abstract_controller/url_for.rb#14 module AbstractController::UrlFor extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -1104,7 +1084,7 @@ module AbstractController::UrlFor mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods - # source://actionpack/lib/abstract_controller/url_for.rb#16 + # source://actionpack/lib/abstract_controller/url_for.rb#18 def _routes; end module GeneratedClassMethods @@ -1120,16 +1100,16 @@ module AbstractController::UrlFor end end -# source://actionpack/lib/abstract_controller/url_for.rb#21 +# source://actionpack/lib/abstract_controller/url_for.rb#23 module AbstractController::UrlFor::ClassMethods - # source://actionpack/lib/abstract_controller/url_for.rb#22 + # source://actionpack/lib/abstract_controller/url_for.rb#24 def _routes; end - # source://actionpack/lib/abstract_controller/url_for.rb#26 + # source://actionpack/lib/abstract_controller/url_for.rb#28 def action_methods; end end -# = Action Controller +# # Action Controller # # Action Controller is a module of Action Pack. # @@ -1137,113 +1117,112 @@ end # implement filters and actions to handle requests. The result of an action is # typically content generated from views. # -# source://actionpack/lib/action_controller/deprecator.rb#3 +# source://actionpack/lib/action_controller/deprecator.rb#5 module ActionController extend ::ActiveSupport::Autoload class << self # See Renderers.add # - # source://actionpack/lib/action_controller/metal/renderers.rb#7 + # source://actionpack/lib/action_controller/metal/renderers.rb#9 def add_renderer(key, &block); end - # source://actionpack/lib/action_controller/deprecator.rb#4 + # source://actionpack/lib/action_controller/deprecator.rb#6 def deprecator; end # See Renderers.remove # - # source://actionpack/lib/action_controller/metal/renderers.rb#12 + # source://actionpack/lib/action_controller/metal/renderers.rb#14 def remove_renderer(key); end end end -# = Action Controller \API +# # Action Controller API # -# API Controller is a lightweight version of ActionController::Base, -# created for applications that don't require all functionalities that a complete -# \Rails controller provides, allowing you to create controllers with just the -# features that you need for API only applications. +# API Controller is a lightweight version of ActionController::Base, created for +# applications that don't require all functionalities that a complete Rails +# controller provides, allowing you to create controllers with just the features +# that you need for API only applications. # -# An API Controller is different from a normal controller in the sense that -# by default it doesn't include a number of features that are usually required -# by browser access only: layouts and templates rendering, -# flash, assets, and so on. This makes the entire controller stack thinner, -# suitable for API applications. It doesn't mean you won't have such -# features if you need them: they're all available for you to include in -# your application, they're just not part of the default API controller stack. +# An API Controller is different from a normal controller in the sense that by +# default it doesn't include a number of features that are usually required by +# browser access only: layouts and templates rendering, flash, assets, and so +# on. This makes the entire controller stack thinner, suitable for API +# applications. It doesn't mean you won't have such features if you need them: +# they're all available for you to include in your application, they're just not +# part of the default API controller stack. # -# Normally, +ApplicationController+ is the only controller that inherits from -# +ActionController::API+. All other controllers in turn inherit from -# +ApplicationController+. +# Normally, `ApplicationController` is the only controller that inherits from +# `ActionController::API`. All other controllers in turn inherit from +# `ApplicationController`. # # A sample controller could look like this: # -# class PostsController < ApplicationController -# def index -# posts = Post.all -# render json: posts +# class PostsController < ApplicationController +# def index +# posts = Post.all +# render json: posts +# end # end -# end # # Request, response, and parameters objects all work the exact same way as # ActionController::Base. # -# == Renders +# ## Renders # -# The default API Controller stack includes all renderers, which means you -# can use render :json and siblings freely in your controllers. Keep -# in mind that templates are not going to be rendered, so you need to ensure -# your controller is calling either render or redirect_to in -# all actions, otherwise it will return 204 No Content. +# The default API Controller stack includes all renderers, which means you can +# use `render :json` and siblings freely in your controllers. Keep in mind that +# templates are not going to be rendered, so you need to ensure your controller +# is calling either `render` or `redirect_to` in all actions, otherwise it will +# return `204 No Content`. # -# def show -# post = Post.find(params[:id]) -# render json: post -# end +# def show +# post = Post.find(params[:id]) +# render json: post +# end # -# == Redirects +# ## Redirects # # Redirects are used to move from one action to another. You can use the -# redirect_to method in your controllers in the same way as in +# `redirect_to` method in your controllers in the same way as in # ActionController::Base. For example: # -# def create -# redirect_to root_url and return if not_authorized? -# # do stuff here -# end +# def create +# redirect_to root_url and return if not_authorized? +# # do stuff here +# end # -# == Adding New Behavior +# ## Adding New Behavior # # In some scenarios you may want to add back some functionality provided by # ActionController::Base that is not present by default in -# +ActionController::API+, for instance MimeResponds. This -# module gives you the respond_to method. Adding it is quite simple, -# you just need to include the module in a specific controller or in -# +ApplicationController+ in case you want it available in your entire -# application: -# -# class ApplicationController < ActionController::API -# include ActionController::MimeResponds -# end -# -# class PostsController < ApplicationController -# def index -# posts = Post.all -# -# respond_to do |format| -# format.json { render json: posts } -# format.xml { render xml: posts } +# `ActionController::API`, for instance `MimeResponds`. This module gives you +# the `respond_to` method. Adding it is quite simple, you just need to include +# the module in a specific controller or in `ApplicationController` in case you +# want it available in your entire application: +# +# class ApplicationController < ActionController::API +# include ActionController::MimeResponds +# end +# +# class PostsController < ApplicationController +# def index +# posts = Post.all +# +# respond_to do |format| +# format.json { render json: posts } +# format.xml { render xml: posts } +# end # end # end -# end # -# Make sure to check the modules included in ActionController::Base -# if you want to use any other functionality that is not provided -# by +ActionController::API+ out of the box. +# Make sure to check the modules included in ActionController::Base if you want +# to use any other functionality that is not provided by `ActionController::API` +# out of the box. # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://actionpack/lib/action_controller/api.rb#91 +# source://actionpack/lib/action_controller/api.rb#92 class ActionController::API < ::ActionController::Metal include ::ActionView::ViewPaths include ::AbstractController::Rendering @@ -1262,6 +1241,11 @@ class ActionController::API < ::ActionController::Metal include ::ActionController::ConditionalGet include ::ActionController::BasicImplicitRender include ::ActionController::StrongParameters + include ::ActionController::RateLimiting + include ::ActionController::Caching + include ::AbstractController::Caching::Fragments + include ::AbstractController::Caching::ConfigMethods + include ::AbstractController::Caching include ::ActionController::DataStreaming include ::ActionController::DefaultHeaders include ::ActionController::Logging @@ -1276,6 +1260,10 @@ class ActionController::API < ::ActionController::Metal extend ::ActionController::Rendering::ClassMethods extend ::ActionController::Renderers::ClassMethods extend ::ActionController::ConditionalGet::ClassMethods + extend ::ActionController::RateLimiting::ClassMethods + extend ::AbstractController::Caching::Fragments::ClassMethods + extend ::AbstractController::Caching::ClassMethods + extend ::AbstractController::Caching::ConfigMethods extend ::ActionController::DefaultHeaders::ClassMethods extend ::ActionController::Logging::ClassMethods extend ::ActiveSupport::Callbacks::ClassMethods @@ -1284,376 +1272,601 @@ class ActionController::API < ::ActionController::Metal extend ::ActionController::Instrumentation::ClassMethods extend ::ActionController::ParamsWrapper::ClassMethods - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _process_action_callbacks; end - # source://actionpack/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/lib/action_controller/metal/renderers.rb#33 def _renderers; end - # source://actionpack/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/lib/action_controller/metal/renderers.rb#33 def _renderers=(_arg0); end - # source://actionpack/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/lib/action_controller/metal/renderers.rb#33 def _renderers?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_process_action_callbacks(&block); end - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies; end + + # source://actionpack/lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies=(_arg0); end + + # source://actionpack/lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies?; end + + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#185 def _wrapper_options; end - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#185 def _wrapper_options=(_arg0); end - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#185 def _wrapper_options?; end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 + def default_static_extension; end + + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 + def default_static_extension=(value); end + + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options; end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options=(_arg0); end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options?; end - # source://actionpack/lib/action_controller/metal/conditional_get.rb#13 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 + def enable_fragment_cache_logging; end + + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 + def enable_fragment_cache_logging=(value); end + + # source://actionpack/lib/action_controller/metal/conditional_get.rb#15 def etaggers; end - # source://actionpack/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#15 def etaggers=(_arg0); end - # source://actionpack/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#15 def etaggers?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://actionpack/lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys; end + + # source://actionpack/lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys=(_arg0); end + + # source://actionpack/lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys?; end + + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def logger=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 + def perform_caching; end + + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 + def perform_caching=(value); end + # source://actionpack/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions; end # source://actionpack/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions=(val); end - # source://actionpack/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/lib/action_controller/metal/redirecting.rb#17 def raise_on_open_redirects; end - # source://actionpack/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/lib/action_controller/metal/redirecting.rb#17 def raise_on_open_redirects=(val); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _process_action_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _process_action_callbacks=(value); end - # source://actionpack/lib/action_controller/metal/renderers.rb#31 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _renderers; end - # source://actionpack/lib/action_controller/metal/renderers.rb#31 - def _renderers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _renderers=(new_value); end - # source://actionpack/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/lib/action_controller/metal/renderers.rb#33 def _renderers?; end - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#187 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def _view_cache_dependencies; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _view_cache_dependencies=(new_value); end + + # source://actionpack/lib/abstract_controller/caching.rb#44 + def _view_cache_dependencies?; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _wrapper_options; end - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#187 - def _wrapper_options=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _wrapper_options=(new_value); end - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#185 def _wrapper_options?; end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 + def default_static_extension; end + + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 + def default_static_extension=(value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_url_options; end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 - def default_url_options=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_url_options=(new_value); end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options?; end - # source://actionpack/lib/action_controller/metal/conditional_get.rb#13 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 + def enable_fragment_cache_logging; end + + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 + def enable_fragment_cache_logging=(value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def etaggers; end - # source://actionpack/lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def etaggers=(new_value); end - # source://actionpack/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#15 def etaggers?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def fragment_cache_keys; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def fragment_cache_keys=(new_value); end + + # source://actionpack/lib/abstract_controller/caching/fragments.rb#26 + def fragment_cache_keys?; end + + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def logger=(value); end - # source://actionpack/lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 + def perform_caching; end + + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 + def perform_caching=(value); end + # source://actionpack/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions; end # source://actionpack/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions=(val); end - # source://actionpack/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/lib/action_controller/metal/redirecting.rb#17 def raise_on_open_redirects; end - # source://actionpack/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/lib/action_controller/metal/redirecting.rb#17 def raise_on_open_redirects=(val); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 - def rescue_handlers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # Shortcut helper that returns all the ActionController::API modules except - # the ones passed as arguments: + # Shortcut helper that returns all the ActionController::API modules except the + # ones passed as arguments: # - # class MyAPIBaseController < ActionController::Metal - # ActionController::API.without_modules(:UrlFor).each do |left| - # include left + # class MyAPIBaseController < ActionController::Metal + # ActionController::API.without_modules(:UrlFor).each do |left| + # include left + # end # end - # end # - # This gives better control over what you want to exclude and makes it easier - # to create an API controller class, instead of listing the modules required + # This gives better control over what you want to exclude and makes it easier to + # create an API controller class, instead of listing the modules required # manually. # - # source://actionpack/lib/action_controller/api.rb#106 + # source://actionpack/lib/action_controller/api.rb#107 def without_modules(*modules); end end end -# source://actionpack/lib/action_controller/api.rb#114 +# source://actionpack/lib/action_controller/api.rb#115 ActionController::API::MODULES = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_controller/metal/exceptions.rb#4 +# source://actionpack/lib/action_controller/metal/exceptions.rb#6 class ActionController::ActionControllerError < ::StandardError; end -# source://actionpack/lib/action_controller/api/api_rendering.rb#4 +# source://actionpack/lib/action_controller/metal/allow_browser.rb#6 +module ActionController::AllowBrowser + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::AllowBrowser::ClassMethods + + private + + # source://actionpack/lib/action_controller/metal/allow_browser.rb#53 + def allow_browser(versions:, block:); end +end + +# source://actionpack/lib/action_controller/metal/allow_browser.rb#63 +class ActionController::AllowBrowser::BrowserBlocker + # @return [BrowserBlocker] a new instance of BrowserBlocker + # + # source://actionpack/lib/action_controller/metal/allow_browser.rb#70 + def initialize(request, versions:); end + + # @return [Boolean] + # + # source://actionpack/lib/action_controller/metal/allow_browser.rb#74 + def blocked?; end + + # Returns the value of attribute request. + # + # source://actionpack/lib/action_controller/metal/allow_browser.rb#68 + def request; end + + # Returns the value of attribute versions. + # + # source://actionpack/lib/action_controller/metal/allow_browser.rb#68 + def versions; end + + private + + # @return [Boolean] + # + # source://actionpack/lib/action_controller/metal/allow_browser.rb#95 + def bot?; end + + # source://actionpack/lib/action_controller/metal/allow_browser.rb#111 + def expanded_versions; end + + # source://actionpack/lib/action_controller/metal/allow_browser.rb#107 + def minimum_browser_version_for_browser; end + + # source://actionpack/lib/action_controller/metal/allow_browser.rb#115 + def normalized_browser_name; end + + # source://actionpack/lib/action_controller/metal/allow_browser.rb#79 + def parsed_user_agent; end + + # @return [Boolean] + # + # source://actionpack/lib/action_controller/metal/allow_browser.rb#87 + def unsupported_browser?; end + + # @return [Boolean] + # + # source://actionpack/lib/action_controller/metal/allow_browser.rb#83 + def user_agent_version_reported?; end + + # @return [Boolean] + # + # source://actionpack/lib/action_controller/metal/allow_browser.rb#99 + def version_below_minimum_required?; end + + # @return [Boolean] + # + # source://actionpack/lib/action_controller/metal/allow_browser.rb#91 + def version_guarded_browser?; end +end + +# source://actionpack/lib/action_controller/metal/allow_browser.rb#64 +ActionController::AllowBrowser::BrowserBlocker::SETS = T.let(T.unsafe(nil), Hash) + +# source://actionpack/lib/action_controller/metal/allow_browser.rb#9 +module ActionController::AllowBrowser::ClassMethods + # Specify the browser versions that will be allowed to access all actions (or + # some, as limited by `only:` or `except:`). Only browsers matched in the hash + # or named set passed to `versions:` will be blocked if they're below the + # versions specified. This means that all other browsers, as well as agents that + # aren't reporting a user-agent header, will be allowed access. + # + # A browser that's blocked will by default be served the file in + # public/406-unsupported-browser.html with a HTTP status code of "406 Not + # Acceptable". + # + # In addition to specifically named browser versions, you can also pass + # `:modern` as the set to restrict support to browsers natively supporting webp + # images, web push, badges, import maps, CSS nesting, and CSS :has. This + # includes Safari 17.2+, Chrome 120+, Firefox 121+, Opera 106+. + # + # You can use https://caniuse.com to check for browser versions supporting the + # features you use. + # + # You can use `ActiveSupport::Notifications` to subscribe to events of browsers + # being blocked using the `browser_block.action_controller` event name. + # + # Examples: + # + # class ApplicationController < ActionController::Base + # # Allow only browsers natively supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has + # allow_browser versions: :modern + # end + # + # class ApplicationController < ActionController::Base + # # All versions of Chrome and Opera will be allowed, but no versions of "internet explorer" (ie). Safari needs to be 16.4+ and Firefox 121+. + # allow_browser versions: { safari: 16.4, firefox: 121, ie: false } + # end + # + # class MessagesController < ApplicationController + # # In addition to the browsers blocked by ApplicationController, also block Opera below 104 and Chrome below 119 for the show action. + # allow_browser versions: { opera: 104, chrome: 119 }, only: :show + # end + # + # source://actionpack/lib/action_controller/metal/allow_browser.rb#47 + def allow_browser(versions:, block: T.unsafe(nil), **options); end +end + +# source://actionpack/lib/action_controller/api/api_rendering.rb#6 module ActionController::ApiRendering extend ::ActiveSupport::Concern include ::ActionController::Rendering mixes_in_class_methods ::ActionController::Rendering::ClassMethods - # source://actionpack/lib/action_controller/api/api_rendering.rb#11 + # source://actionpack/lib/action_controller/api/api_rendering.rb#13 def render_to_body(options = T.unsafe(nil)); end end -# source://actionpack/lib/action_controller/metal/exceptions.rb#7 +# source://actionpack/lib/action_controller/metal/exceptions.rb#9 class ActionController::BadRequest < ::ActionController::ActionControllerError # @return [BadRequest] a new instance of BadRequest # - # source://actionpack/lib/action_controller/metal/exceptions.rb#8 + # source://actionpack/lib/action_controller/metal/exceptions.rb#10 def initialize(msg = T.unsafe(nil)); end end -# = Action Controller \Base +# # Action Controller Base # -# Action Controllers are the core of a web request in \Rails. They are made up of one or more actions that are executed -# on request and then either it renders a template or redirects to another action. An action is defined as a public method -# on the controller, which will automatically be made accessible to the web-server through \Rails Routes. +# Action Controllers are the core of a web request in Rails. They are made up of +# one or more actions that are executed on request and then either it renders a +# template or redirects to another action. An action is defined as a public +# method on the controller, which will automatically be made accessible to the +# web-server through Rails Routes. # -# By default, only the ApplicationController in a \Rails application inherits from +ActionController::Base+. All other -# controllers inherit from ApplicationController. This gives you one class to configure things such as +# By default, only the ApplicationController in a Rails application inherits +# from `ActionController::Base`. All other controllers inherit from +# ApplicationController. This gives you one class to configure things such as # request forgery protection and filtering of sensitive request parameters. # # A sample controller could look like this: # -# class PostsController < ApplicationController -# def index -# @posts = Post.all -# end +# class PostsController < ApplicationController +# def index +# @posts = Post.all +# end # -# def create -# @post = Post.create params[:post] -# redirect_to posts_path +# def create +# @post = Post.create params[:post] +# redirect_to posts_path +# end # end -# end # -# Actions, by default, render a template in the app/views directory corresponding to the name of the controller and action -# after executing code in the action. For example, the +index+ action of the PostsController would render the -# template app/views/posts/index.html.erb by default after populating the @posts instance variable. +# Actions, by default, render a template in the `app/views` directory +# corresponding to the name of the controller and action after executing code in +# the action. For example, the `index` action of the PostsController would +# render the template `app/views/posts/index.html.erb` by default after +# populating the `@posts` instance variable. # -# Unlike index, the create action will not render a template. After performing its main purpose (creating a -# new post), it initiates a redirect instead. This redirect works by returning an external -# 302 Moved HTTP response that takes the user to the index action. +# Unlike index, the create action will not render a template. After performing +# its main purpose (creating a new post), it initiates a redirect instead. This +# redirect works by returning an external `302 Moved` HTTP response that takes +# the user to the index action. # -# These two methods represent the two basic action archetypes used in Action Controllers: Get-and-show and do-and-redirect. -# Most actions are variations on these themes. +# These two methods represent the two basic action archetypes used in Action +# Controllers: Get-and-show and do-and-redirect. Most actions are variations on +# these themes. # -# == Requests +# ## Requests # -# For every request, the router determines the value of the +controller+ and +action+ keys. These determine which controller -# and action are called. The remaining request parameters, the session (if one is available), and the full request with -# all the HTTP headers are made available to the action through accessor methods. Then the action is performed. +# For every request, the router determines the value of the `controller` and +# `action` keys. These determine which controller and action are called. The +# remaining request parameters, the session (if one is available), and the full +# request with all the HTTP headers are made available to the action through +# accessor methods. Then the action is performed. # -# The full request object is available via the request accessor and is primarily used to query for HTTP headers: +# The full request object is available via the request accessor and is primarily +# used to query for HTTP headers: # -# def server_ip -# location = request.env["REMOTE_ADDR"] -# render plain: "This server hosted at #{location}" -# end +# def server_ip +# location = request.env["REMOTE_ADDR"] +# render plain: "This server hosted at #{location}" +# end # -# == Parameters +# ## Parameters # -# All request parameters, whether they come from a query string in the URL or form data submitted through a POST request are -# available through the params method which returns a hash. For example, an action that was performed through -# /posts?category=All&limit=5 will include { "category" => "All", "limit" => "5" } in params. +# All request parameters, whether they come from a query string in the URL or +# form data submitted through a POST request are available through the `params` +# method which returns a hash. For example, an action that was performed through +# `/posts?category=All&limit=5` will include `{ "category" => "All", "limit" => +# "5" }` in `params`. # -# It's also possible to construct multi-dimensional parameter hashes by specifying keys using brackets, such as: +# It's also possible to construct multi-dimensional parameter hashes by +# specifying keys using brackets, such as: # -# -# +# +# # -# A request coming from a form holding these inputs will include { "post" => { "name" => "david", "address" => "hyacintvej" } }. -# If the address input had been named post[address][street], the params would have included -# { "post" => { "address" => { "street" => "hyacintvej" } } }. There's no limit to the depth of the nesting. +# A request coming from a form holding these inputs will include `{ "post" => { +# "name" => "david", "address" => "hyacintvej" } }`. If the address input had +# been named `post[address][street]`, the `params` would have included `{ "post" +# => { "address" => { "street" => "hyacintvej" } } }`. There's no limit to the +# depth of the nesting. # -# == Sessions +# ## Sessions # -# Sessions allow you to store objects in between requests. This is useful for objects that are not yet ready to be persisted, -# such as a Signup object constructed in a multi-paged process, or objects that don't change much and are needed all the time, such -# as a User object for a system that requires login. The session should not be used, however, as a cache for objects where it's likely -# they could be changed unknowingly. It's usually too much work to keep it all synchronized -- something databases already excel at. +# Sessions allow you to store objects in between requests. This is useful for +# objects that are not yet ready to be persisted, such as a Signup object +# constructed in a multi-paged process, or objects that don't change much and +# are needed all the time, such as a User object for a system that requires +# login. The session should not be used, however, as a cache for objects where +# it's likely they could be changed unknowingly. It's usually too much work to +# keep it all synchronized -- something databases already excel at. # -# You can place objects in the session by using the session method, which accesses a hash: +# You can place objects in the session by using the `session` method, which +# accesses a hash: # -# session[:person] = Person.authenticate(user_name, password) +# session[:person] = Person.authenticate(user_name, password) # # You can retrieve it again through the same hash: # -# "Hello #{session[:person]}" +# "Hello #{session[:person]}" # -# For removing objects from the session, you can either assign a single key to +nil+: +# For removing objects from the session, you can either assign a single key to +# `nil`: # -# # removes :person from session -# session[:person] = nil +# # removes :person from session +# session[:person] = nil # -# or you can remove the entire session with +reset_session+. +# or you can remove the entire session with `reset_session`. # # By default, sessions are stored in an encrypted browser cookie (see -# ActionDispatch::Session::CookieStore). Thus the user will not be able to -# read or edit the session data. However, the user can keep a copy of the -# cookie even after it has expired, so you should avoid storing sensitive -# information in cookie-based sessions. +# ActionDispatch::Session::CookieStore). Thus the user will not be able to read +# or edit the session data. However, the user can keep a copy of the cookie even +# after it has expired, so you should avoid storing sensitive information in +# cookie-based sessions. # -# == Responses +# ## Responses # -# Each action results in a response, which holds the headers and document to be sent to the user's browser. The actual response -# object is generated automatically through the use of renders and redirects and requires no user intervention. +# Each action results in a response, which holds the headers and document to be +# sent to the user's browser. The actual response object is generated +# automatically through the use of renders and redirects and requires no user +# intervention. # -# == Renders +# ## Renders # -# Action Controller sends content to the user by using one of five rendering methods. The most versatile and common is the rendering -# of a template. Included in the Action Pack is the Action View, which enables rendering of ERB templates. It's automatically configured. -# The controller passes objects to the view by assigning instance variables: +# Action Controller sends content to the user by using one of five rendering +# methods. The most versatile and common is the rendering of a template. +# Included in the Action Pack is the Action View, which enables rendering of ERB +# templates. It's automatically configured. The controller passes objects to the +# view by assigning instance variables: # -# def show -# @post = Post.find(params[:id]) -# end +# def show +# @post = Post.find(params[:id]) +# end # # Which are then automatically available to the view: # -# Title: <%= @post.title %> +# Title: <%= @post.title %> # -# You don't have to rely on the automated rendering. For example, actions that could result in the rendering of different templates -# will use the manual rendering methods: +# You don't have to rely on the automated rendering. For example, actions that +# could result in the rendering of different templates will use the manual +# rendering methods: # -# def search -# @results = Search.find(params[:query]) -# case @results.count -# when 0 then render action: "no_results" -# when 1 then render action: "show" -# when 2..10 then render action: "show_many" +# def search +# @results = Search.find(params[:query]) +# case @results.count +# when 0 then render action: "no_results" +# when 1 then render action: "show" +# when 2..10 then render action: "show_many" +# end # end -# end # # Read more about writing ERB and Builder templates in ActionView::Base. # -# == Redirects +# ## Redirects # -# Redirects are used to move from one action to another. For example, after a create action, which stores a blog entry to the -# database, we might like to show the user the new entry. Because we're following good DRY principles (Don't Repeat Yourself), we're -# going to reuse (and redirect to) a show action that we'll assume has already been created. The code might look like this: +# Redirects are used to move from one action to another. For example, after a +# `create` action, which stores a blog entry to the database, we might like to +# show the user the new entry. Because we're following good DRY principles +# (Don't Repeat Yourself), we're going to reuse (and redirect to) a `show` +# action that we'll assume has already been created. The code might look like +# this: # -# def create -# @entry = Entry.new(params[:entry]) -# if @entry.save -# # The entry was saved correctly, redirect to show -# redirect_to action: 'show', id: @entry.id -# else -# # things didn't go so well, do something else +# def create +# @entry = Entry.new(params[:entry]) +# if @entry.save +# # The entry was saved correctly, redirect to show +# redirect_to action: 'show', id: @entry.id +# else +# # things didn't go so well, do something else +# end # end -# end # -# In this case, after saving our new entry to the database, the user is redirected to the show method, which is then executed. -# Note that this is an external HTTP-level redirection which will cause the browser to make a second request (a GET to the show action), -# and not some internal re-routing which calls both "create" and then "show" within one request. +# In this case, after saving our new entry to the database, the user is +# redirected to the `show` method, which is then executed. Note that this is an +# external HTTP-level redirection which will cause the browser to make a second +# request (a GET to the show action), and not some internal re-routing which +# calls both "create" and then "show" within one request. # -# Learn more about redirect_to and what options you have in ActionController::Redirecting. +# Learn more about `redirect_to` and what options you have in +# ActionController::Redirecting. # -# == Calling multiple redirects or renders +# ## Calling multiple redirects or renders # -# An action may contain only a single render or a single redirect. Attempting to try to do either again will result in a DoubleRenderError: +# An action may perform only a single render or a single redirect. Attempting to +# do either again will result in a DoubleRenderError: # -# def do_something -# redirect_to action: "elsewhere" -# render action: "overthere" # raises DoubleRenderError -# end +# def do_something +# redirect_to action: "elsewhere" +# render action: "overthere" # raises DoubleRenderError +# end # -# If you need to redirect on the condition of something, then be sure to add "and return" to halt execution. +# If you need to redirect on the condition of something, then be sure to add +# "return" to halt execution. # -# def do_something -# redirect_to(action: "elsewhere") and return if monkeys.nil? -# render action: "overthere" # won't be called if monkeys is nil -# end +# def do_something +# if monkeys.nil? +# redirect_to(action: "elsewhere") +# return +# end +# render action: "overthere" # won't be called if monkeys is nil +# end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://actionpack/lib/action_controller/base.rb#169 +# source://actionpack/lib/action_controller/base.rb#207 class ActionController::Base < ::ActionController::Metal include ::ActionView::ViewPaths include ::AbstractController::Rendering include ::AbstractController::Translation include ::AbstractController::AssetPaths - include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor include ::AbstractController::Helpers include ::ActionController::Helpers include ::ActionDispatch::Routing::PolymorphicRoutes @@ -1689,6 +1902,8 @@ class ActionController::Base < ::ActionController::Metal include ::ActionController::RequestForgeryProtection include ::ActionController::ContentSecurityPolicy include ::ActionController::PermissionsPolicy + include ::ActionController::RateLimiting + include ::ActionController::AllowBrowser include ::ActionController::Streaming include ::ActionController::DataStreaming include ::ActionController::HttpAuthentication::Basic::ControllerMethods @@ -1721,6 +1936,8 @@ class ActionController::Base < ::ActionController::Metal extend ::ActionController::RequestForgeryProtection::ClassMethods extend ::ActionController::ContentSecurityPolicy::ClassMethods extend ::ActionController::PermissionsPolicy::ClassMethods + extend ::ActionController::RateLimiting::ClassMethods + extend ::ActionController::AllowBrowser::ClassMethods extend ::ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods extend ::ActionController::DefaultHeaders::ClassMethods extend ::ActionController::Logging::ClassMethods @@ -1728,208 +1945,202 @@ class ActionController::Base < ::ActionController::Metal extend ::ActionController::Instrumentation::ClassMethods extend ::ActionController::ParamsWrapper::ClassMethods - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://actionpack/lib/abstract_controller/helpers.rb#12 + # source://actionpack/lib/abstract_controller/helpers.rb#13 def _helper_methods; end - # source://actionpack/lib/abstract_controller/helpers.rb#12 + # source://actionpack/lib/abstract_controller/helpers.rb#13 def _helper_methods=(_arg0); end - # source://actionpack/lib/abstract_controller/helpers.rb#12 + # source://actionpack/lib/abstract_controller/helpers.rb#13 def _helper_methods?; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#216 - def _layout_conditions(&block); end + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#212 + def _layout_conditions; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#212 + def _layout_conditions?; end + + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _process_action_callbacks; end - # source://actionpack/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/lib/action_controller/metal/renderers.rb#33 def _renderers; end - # source://actionpack/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/lib/action_controller/metal/renderers.rb#33 def _renderers=(_arg0); end - # source://actionpack/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/lib/action_controller/metal/renderers.rb#33 def _renderers?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_process_action_callbacks(&block); end - # source://actionpack/lib/abstract_controller/caching.rb#42 + # source://actionpack/lib/abstract_controller/caching.rb#44 def _view_cache_dependencies; end - # source://actionpack/lib/abstract_controller/caching.rb#42 + # source://actionpack/lib/abstract_controller/caching.rb#44 def _view_cache_dependencies=(_arg0); end - # source://actionpack/lib/abstract_controller/caching.rb#42 + # source://actionpack/lib/abstract_controller/caching.rb#44 def _view_cache_dependencies?; end - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#185 def _wrapper_options; end - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#185 def _wrapper_options=(_arg0); end - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#185 def _wrapper_options?; end - # source://actionpack/lib/action_controller/metal/flash.rb#36 + # source://actionpack/lib/action_controller/metal/flash.rb#38 def alert; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def allow_forgery_protection; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def allow_forgery_protection=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def assets_dir=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def csrf_token_storage_strategy; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def csrf_token_storage_strategy=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 - def default_protect_from_forgery; end - - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 - def default_protect_from_forgery=(value); end - - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def default_static_extension=(value); end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options; end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options=(_arg0); end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#31 def etag_with_template_digest; end - # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#31 def etag_with_template_digest=(_arg0); end - # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#31 def etag_with_template_digest?; end - # source://actionpack/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#15 def etaggers; end - # source://actionpack/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#15 def etaggers=(_arg0); end - # source://actionpack/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#15 def etaggers?; end - # source://actionpack/lib/action_controller/metal/flash.rb#10 + # source://actionpack/lib/action_controller/metal/flash.rb#12 def flash(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def forgery_protection_origin_check; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def forgery_protection_origin_check=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def forgery_protection_strategy; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def forgery_protection_strategy=(value); end - # source://actionpack/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/lib/abstract_controller/caching/fragments.rb#26 def fragment_cache_keys; end - # source://actionpack/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/lib/abstract_controller/caching/fragments.rb#26 def fragment_cache_keys=(_arg0); end - # source://actionpack/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/lib/abstract_controller/caching/fragments.rb#26 def fragment_cache_keys?; end - # source://actionpack/lib/action_controller/metal/helpers.rb#65 + # source://actionpack/lib/action_controller/metal/helpers.rb#70 def helpers_path; end - # source://actionpack/lib/action_controller/metal/helpers.rb#65 + # source://actionpack/lib/action_controller/metal/helpers.rb#70 def helpers_path=(_arg0); end - # source://actionpack/lib/action_controller/metal/helpers.rb#65 + # source://actionpack/lib/action_controller/metal/helpers.rb#70 def helpers_path?; end - # source://actionpack/lib/action_controller/metal/helpers.rb#66 + # source://actionpack/lib/action_controller/metal/helpers.rb#71 def include_all_helpers; end - # source://actionpack/lib/action_controller/metal/helpers.rb#66 + # source://actionpack/lib/action_controller/metal/helpers.rb#71 def include_all_helpers=(_arg0); end - # source://actionpack/lib/action_controller/metal/helpers.rb#66 + # source://actionpack/lib/action_controller/metal/helpers.rb#71 def include_all_helpers?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def log_warning_on_csrf_failure; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def log_warning_on_csrf_failure=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def logger=(value); end - # source://actionpack/lib/action_controller/metal/flash.rb#36 + # source://actionpack/lib/action_controller/metal/flash.rb#38 def notice; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def per_form_csrf_tokens; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def per_form_csrf_tokens=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def perform_caching=(value); end # source://actionpack/lib/abstract_controller/callbacks.rb#36 @@ -1938,283 +2149,277 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions=(val); end - # source://actionpack/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/lib/action_controller/metal/redirecting.rb#17 def raise_on_open_redirects; end - # source://actionpack/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/lib/action_controller/metal/redirecting.rb#17 def raise_on_open_redirects=(val); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def request_forgery_protection_token; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def request_forgery_protection_token=(value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end - # source://actionpack/lib/action_controller/base.rb#252 + # source://actionpack/lib/action_controller/base.rb#324 def _protected_ivars; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://actionpack/lib/action_controller/form_builder.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _default_form_builder; end - # source://actionpack/lib/action_controller/form_builder.rb#33 - def _default_form_builder=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _default_form_builder=(new_value); end - # source://actionpack/lib/action_controller/form_builder.rb#33 + # source://actionpack/lib/action_controller/form_builder.rb#35 def _default_form_builder?; end - # source://actionpack/lib/action_controller/metal/flash.rb#8 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _flash_types; end - # source://actionpack/lib/action_controller/metal/flash.rb#8 - def _flash_types=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _flash_types=(new_value); end - # source://actionpack/lib/action_controller/metal/flash.rb#8 + # source://actionpack/lib/action_controller/metal/flash.rb#10 def _flash_types?; end - # source://actionpack/lib/abstract_controller/helpers.rb#12 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _helper_methods; end - # source://actionpack/lib/abstract_controller/helpers.rb#12 - def _helper_methods=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _helper_methods=(new_value); end - # source://actionpack/lib/abstract_controller/helpers.rb#12 + # source://actionpack/lib/abstract_controller/helpers.rb#13 def _helper_methods?; end - # source://actionpack/lib/abstract_controller/helpers.rb#16 + # source://actionpack/lib/abstract_controller/helpers.rb#17 def _helpers; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#211 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#211 - def _layout=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#211 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#211 def _layout?; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#212 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout_conditions; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#212 - def _layout_conditions=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#212 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#212 def _layout_conditions?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _process_action_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _process_action_callbacks=(value); end - # source://actionpack/lib/action_controller/metal/renderers.rb#31 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _renderers; end - # source://actionpack/lib/action_controller/metal/renderers.rb#31 - def _renderers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _renderers=(new_value); end - # source://actionpack/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/lib/action_controller/metal/renderers.rb#33 def _renderers?; end - # source://actionpack/lib/abstract_controller/caching.rb#42 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _view_cache_dependencies; end - # source://actionpack/lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _view_cache_dependencies=(new_value); end - # source://actionpack/lib/abstract_controller/caching.rb#42 + # source://actionpack/lib/abstract_controller/caching.rb#44 def _view_cache_dependencies?; end - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#187 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _wrapper_options; end - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#187 - def _wrapper_options=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _wrapper_options=(new_value); end - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#185 def _wrapper_options?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def allow_forgery_protection; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def allow_forgery_protection=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def assets_dir=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def csrf_token_storage_strategy; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def csrf_token_storage_strategy=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 - def default_protect_from_forgery; end - - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 - def default_protect_from_forgery=(value); end - - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def default_static_extension=(value); end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_url_options; end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 - def default_url_options=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_url_options=(new_value); end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def etag_with_template_digest; end - # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#29 - def etag_with_template_digest=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def etag_with_template_digest=(new_value); end - # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#31 def etag_with_template_digest?; end - # source://actionpack/lib/action_controller/metal/conditional_get.rb#13 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def etaggers; end - # source://actionpack/lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def etaggers=(new_value); end - # source://actionpack/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#15 def etaggers?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def forgery_protection_origin_check; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def forgery_protection_origin_check=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def forgery_protection_strategy; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def forgery_protection_strategy=(value); end - # source://actionpack/lib/abstract_controller/caching/fragments.rb#25 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def fragment_cache_keys; end - # source://actionpack/lib/abstract_controller/caching/fragments.rb#25 - def fragment_cache_keys=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def fragment_cache_keys=(new_value); end - # source://actionpack/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/lib/abstract_controller/caching/fragments.rb#26 def fragment_cache_keys?; end - # source://actionpack/lib/action_controller/metal/helpers.rb#65 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def helpers_path; end - # source://actionpack/lib/action_controller/metal/helpers.rb#65 - def helpers_path=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def helpers_path=(new_value); end - # source://actionpack/lib/action_controller/metal/helpers.rb#65 + # source://actionpack/lib/action_controller/metal/helpers.rb#70 def helpers_path?; end - # source://actionpack/lib/action_controller/metal/helpers.rb#66 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def include_all_helpers; end - # source://actionpack/lib/action_controller/metal/helpers.rb#66 - def include_all_helpers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def include_all_helpers=(new_value); end - # source://actionpack/lib/action_controller/metal/helpers.rb#66 + # source://actionpack/lib/action_controller/metal/helpers.rb#71 def include_all_helpers?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def log_warning_on_csrf_failure; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def log_warning_on_csrf_failure=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def logger=(value); end - # source://actionpack/lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def per_form_csrf_tokens; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def per_form_csrf_tokens=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def perform_caching=(value); end # source://actionpack/lib/abstract_controller/callbacks.rb#36 @@ -2223,53 +2428,53 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions=(val); end - # source://actionpack/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/lib/action_controller/metal/redirecting.rb#17 def raise_on_open_redirects; end - # source://actionpack/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/lib/action_controller/metal/redirecting.rb#17 def raise_on_open_redirects=(val); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def request_forgery_protection_token; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def request_forgery_protection_token=(value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 - def rescue_handlers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end # Shortcut helper that returns all the modules included in # ActionController::Base except the ones passed as arguments: # - # class MyBaseController < ActionController::Metal - # ActionController::Base.without_modules(:ParamsWrapper, :Streaming).each do |left| - # include left + # class MyBaseController < ActionController::Metal + # ActionController::Base.without_modules(:ParamsWrapper, :Streaming).each do |left| + # include left + # end # end - # end # - # This gives better control over what you want to exclude and makes it - # easier to create a bare controller class, instead of listing the modules - # required manually. + # This gives better control over what you want to exclude and makes it easier to + # create a bare controller class, instead of listing the modules required + # manually. # - # source://actionpack/lib/action_controller/base.rb#184 + # source://actionpack/lib/action_controller/base.rb#222 def without_modules(*modules); end end end @@ -2279,75 +2484,76 @@ module ActionController::Base::HelperMethods include ::ActionText::ContentHelper include ::ActionText::TagHelper - # source://actionpack/lib/action_controller/metal/flash.rb#39 - def alert(*args, **_arg1, &block); end + # source://actionpack/lib/action_controller/metal/flash.rb#41 + def alert(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/caching/fragments.rb#33 - def combined_fragment_cache_key(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/caching/fragments.rb#34 + def combined_fragment_cache_key(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal/content_security_policy.rb#11 - def content_security_policy?(*args, **_arg1, &block); end + # source://actionpack/lib/action_controller/metal/content_security_policy.rb#13 + def content_security_policy?(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal/content_security_policy.rb#12 - def content_security_policy_nonce(*args, **_arg1, &block); end + # source://actionpack/lib/action_controller/metal/content_security_policy.rb#14 + def content_security_policy_nonce(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal/cookies.rb#8 - def cookies(*args, **_arg1, &block); end + # source://actionpack/lib/action_controller/metal/cookies.rb#10 + def cookies(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal/request_forgery_protection.rb#101 - def form_authenticity_token(*args, **_arg1, &block); end + # source://actionpack/lib/action_controller/metal/request_forgery_protection.rb#102 + def form_authenticity_token(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal/flash.rb#39 - def notice(*args, **_arg1, &block); end + # source://actionpack/lib/action_controller/metal/flash.rb#41 + def notice(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal/request_forgery_protection.rb#102 - def protect_against_forgery?(*args, **_arg1, &block); end + # source://actionpack/lib/action_controller/metal/request_forgery_protection.rb#103 + def protect_against_forgery?(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/abstract_controller/caching.rb#43 - def view_cache_dependencies(*args, **_arg1, &block); end + # source://actionpack/lib/abstract_controller/caching.rb#45 + def view_cache_dependencies(*_arg0, **_arg1, &_arg2); end end -# source://actionpack/lib/action_controller/base.rb#192 +# source://actionpack/lib/action_controller/base.rb#230 ActionController::Base::MODULES = T.let(T.unsafe(nil), Array) # Define some internal variables that should not be propagated to the view. # -# source://actionpack/lib/action_controller/base.rb#247 +# source://actionpack/lib/action_controller/base.rb#318 ActionController::Base::PROTECTED_IVARS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_controller/metal/basic_implicit_render.rb#4 +# source://actionpack/lib/action_controller/metal/basic_implicit_render.rb#6 module ActionController::BasicImplicitRender - # source://actionpack/lib/action_controller/metal/basic_implicit_render.rb#11 + # source://actionpack/lib/action_controller/metal/basic_implicit_render.rb#13 def default_render; end - # source://actionpack/lib/action_controller/metal/basic_implicit_render.rb#5 + # source://actionpack/lib/action_controller/metal/basic_implicit_render.rb#7 def send_action(method, *args); end end -# = Action Controller \Caching +# # Action Controller Caching # -# \Caching is a cheap way of speeding up slow applications by keeping the result of -# calculations, renderings, and database calls around for subsequent requests. +# Caching is a cheap way of speeding up slow applications by keeping the result +# of calculations, renderings, and database calls around for subsequent +# requests. # # You can read more about each approach by clicking the modules below. # # Note: To turn off all caching provided by Action Controller, set -# config.action_controller.perform_caching = false +# config.action_controller.perform_caching = false # -# == \Caching stores +# ## Caching stores # -# All the caching stores from ActiveSupport::Cache are available to be used as backends -# for Action Controller caching. +# All the caching stores from ActiveSupport::Cache are available to be used as +# backends for Action Controller caching. # # Configuration examples (FileStore is the default): # -# config.action_controller.cache_store = :memory_store -# config.action_controller.cache_store = :file_store, '/path/to/cache/directory' -# config.action_controller.cache_store = :mem_cache_store, 'localhost' -# config.action_controller.cache_store = :mem_cache_store, Memcached::Rails.new('localhost:11211') -# config.action_controller.cache_store = MyOwnStore.new('parameter') +# config.action_controller.cache_store = :memory_store +# config.action_controller.cache_store = :file_store, '/path/to/cache/directory' +# config.action_controller.cache_store = :mem_cache_store, 'localhost' +# config.action_controller.cache_store = :mem_cache_store, Memcached::Rails.new('localhost:11211') +# config.action_controller.cache_store = MyOwnStore.new('parameter') # -# source://actionpack/lib/action_controller/caching.rb#26 +# source://actionpack/lib/action_controller/caching.rb#29 module ActionController::Caching extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -2361,10 +2567,10 @@ module ActionController::Caching private - # source://actionpack/lib/action_controller/caching.rb#42 + # source://actionpack/lib/action_controller/caching.rb#45 def instrument_name; end - # source://actionpack/lib/action_controller/caching.rb#34 + # source://actionpack/lib/action_controller/caching.rb#37 def instrument_payload(key); end module GeneratedClassMethods @@ -2386,7 +2592,7 @@ module ActionController::Caching end end -# source://actionpack/lib/action_controller/metal/conditional_get.rb#7 +# source://actionpack/lib/action_controller/metal/conditional_get.rb#9 module ActionController::ConditionalGet include ::ActionController::Head extend ::ActiveSupport::Concern @@ -2395,258 +2601,272 @@ module ActionController::ConditionalGet mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActionController::ConditionalGet::ClassMethods - # Sets the +Cache-Control+ header, overwriting existing directives. This - # method will also ensure an HTTP +Date+ header for client compatibility. + # Sets the `Cache-Control` header, overwriting existing directives. This method + # will also ensure an HTTP `Date` header for client compatibility. + # + # Defaults to issuing the `private` directive, so that intermediate caches must + # not cache the response. + # + # #### Options # - # Defaults to issuing the +private+ directive, so that intermediate caches - # must not cache the response. + # `:public` + # : If true, replaces the default `private` directive with the `public` + # directive. # - # ==== Options + # `:must_revalidate` + # : If true, adds the `must-revalidate` directive. # - # [+:public+] - # If true, replaces the default +private+ directive with the +public+ - # directive. - # [+:must_revalidate+] - # If true, adds the +must-revalidate+ directive. - # [+:stale_while_revalidate+] - # Sets the value of the +stale-while-revalidate+ directive. - # [+:stale_if_error+] - # Sets the value of the +stale-if-error+ directive. + # `:stale_while_revalidate` + # : Sets the value of the `stale-while-revalidate` directive. # - # Any additional key-value pairs are concatenated as directives. For a list - # of supported +Cache-Control+ directives, see the {article on - # MDN}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control]. + # `:stale_if_error` + # : Sets the value of the `stale-if-error` directive. # - # ==== Examples + # `:immutable` + # : If true, adds the `immutable` directive. # - # expires_in 10.minutes - # # => Cache-Control: max-age=600, private # - # expires_in 10.minutes, public: true - # # => Cache-Control: max-age=600, public + # Any additional key-value pairs are concatenated as directives. For a list of + # supported `Cache-Control` directives, see the [article on + # MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control). # - # expires_in 10.minutes, public: true, must_revalidate: true - # # => Cache-Control: max-age=600, public, must-revalidate + # #### Examples # - # expires_in 1.hour, stale_while_revalidate: 60.seconds - # # => Cache-Control: max-age=3600, private, stale-while-revalidate=60 + # expires_in 10.minutes + # # => Cache-Control: max-age=600, private # - # expires_in 1.hour, stale_if_error: 5.minutes - # # => Cache-Control: max-age=3600, private, stale-if-error=300 + # expires_in 10.minutes, public: true + # # => Cache-Control: max-age=600, public # - # expires_in 1.hour, public: true, "s-maxage": 3.hours, "no-transform": true - # # => Cache-Control: max-age=3600, public, s-maxage=10800, no-transform=true + # expires_in 10.minutes, public: true, must_revalidate: true + # # => Cache-Control: max-age=600, public, must-revalidate # - # source://actionpack/lib/action_controller/metal/conditional_get.rb#274 + # expires_in 1.hour, stale_while_revalidate: 60.seconds + # # => Cache-Control: max-age=3600, private, stale-while-revalidate=60 + # + # expires_in 1.hour, stale_if_error: 5.minutes + # # => Cache-Control: max-age=3600, private, stale-if-error=300 + # + # expires_in 1.hour, public: true, "s-maxage": 3.hours, "no-transform": true + # # => Cache-Control: max-age=3600, public, s-maxage=10800, no-transform=true + # + # source://actionpack/lib/action_controller/metal/conditional_get.rb#290 def expires_in(seconds, options = T.unsafe(nil)); end - # Sets an HTTP 1.1 +Cache-Control+ header of no-cache. This means the - # resource will be marked as stale, so clients must always revalidate. + # Sets an HTTP 1.1 `Cache-Control` header of `no-cache`. This means the resource + # will be marked as stale, so clients must always revalidate. # Intermediate/browser caches may still store the asset. # - # source://actionpack/lib/action_controller/metal/conditional_get.rb#292 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#309 def expires_now; end - # Sets the +etag+, +last_modified+, or both on the response, and renders a - # 304 Not Modified response if the request is already fresh. - # - # ==== Options - # - # [+:etag+] - # Sets a "weak" ETag validator on the response. See the +:weak_etag+ option. - # [+:weak_etag+] - # Sets a "weak" ETag validator on the response. Requests that specify an - # +If-None-Match+ header may receive a 304 Not Modified response - # if the ETag matches exactly. - # - # A weak ETag indicates semantic equivalence, not byte-for-byte equality, - # so they're good for caching HTML pages in browser caches. They can't be - # used for responses that must be byte-identical, like serving +Range+ - # requests within a PDF file. - # [+:strong_etag+] - # Sets a "strong" ETag validator on the response. Requests that specify an - # +If-None-Match+ header may receive a 304 Not Modified response - # if the ETag matches exactly. - # - # A strong ETag implies exact equality -- the response must match byte for - # byte. This is necessary for serving +Range+ requests within a large - # video or PDF file, for example, or for compatibility with some CDNs that - # don't support weak ETags. - # [+:last_modified+] - # Sets a "weak" last-update validator on the response. Subsequent requests - # that specify an +If-Modified-Since+ header may receive a 304 Not Modified - # response if +last_modified+ <= +If-Modified-Since+. - # [+:public+] - # By default the +Cache-Control+ header is private. Set this option to - # +true+ if you want your application to be cacheable by other devices, - # such as proxy caches. - # [+:cache_control+] - # When given, will overwrite an existing +Cache-Control+ header. For a - # list of +Cache-Control+ directives, see the {article on - # MDN}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control]. - # [+:template+] - # By default, the template digest for the current controller/action is - # included in ETags. If the action renders a different template, you can - # include its digest instead. If the action doesn't render a template at - # all, you can pass template: false to skip any attempt to check - # for a template digest. - # - # ==== Examples - # - # def show - # @article = Article.find(params[:id]) - # fresh_when(etag: @article, last_modified: @article.updated_at, public: true) - # end - # - # This will send a 304 Not Modified response if the request - # specifies a matching ETag and +If-Modified-Since+ header. Otherwise, it - # will render the +show+ template. + # Sets the `etag`, `last_modified`, or both on the response, and renders a `304 + # Not Modified` response if the request is already fresh. + # + # #### Options + # + # `:etag` + # : Sets a "weak" ETag validator on the response. See the `:weak_etag` option. + # + # `:weak_etag` + # : Sets a "weak" ETag validator on the response. Requests that specify an + # `If-None-Match` header may receive a `304 Not Modified` response if the + # ETag matches exactly. + # + # : A weak ETag indicates semantic equivalence, not byte-for-byte equality, so + # they're good for caching HTML pages in browser caches. They can't be used + # for responses that must be byte-identical, like serving `Range` requests + # within a PDF file. + # + # `:strong_etag` + # : Sets a "strong" ETag validator on the response. Requests that specify an + # `If-None-Match` header may receive a `304 Not Modified` response if the + # ETag matches exactly. + # + # : A strong ETag implies exact equality -- the response must match byte for + # byte. This is necessary for serving `Range` requests within a large video + # or PDF file, for example, or for compatibility with some CDNs that don't + # support weak ETags. + # + # `:last_modified` + # : Sets a "weak" last-update validator on the response. Subsequent requests + # that specify an `If-Modified-Since` header may receive a `304 Not + # Modified` response if `last_modified` <= `If-Modified-Since`. + # + # `:public` + # : By default the `Cache-Control` header is private. Set this option to + # `true` if you want your application to be cacheable by other devices, such + # as proxy caches. + # + # `:cache_control` + # : When given, will overwrite an existing `Cache-Control` header. For a list + # of `Cache-Control` directives, see the [article on + # MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control). + # + # `:template` + # : By default, the template digest for the current controller/action is + # included in ETags. If the action renders a different template, you can + # include its digest instead. If the action doesn't render a template at + # all, you can pass `template: false` to skip any attempt to check for a + # template digest. + # + # + # #### Examples + # + # def show + # @article = Article.find(params[:id]) + # fresh_when(etag: @article, last_modified: @article.updated_at, public: true) + # end + # + # This will send a `304 Not Modified` response if the request specifies a + # matching ETag and `If-Modified-Since` header. Otherwise, it will render the + # `show` template. # # You can also just pass a record: # - # def show - # @article = Article.find(params[:id]) - # fresh_when(@article) - # end + # def show + # @article = Article.find(params[:id]) + # fresh_when(@article) + # end # - # +etag+ will be set to the record, and +last_modified+ will be set to the - # record's +updated_at+. + # `etag` will be set to the record, and `last_modified` will be set to the + # record's `updated_at`. # - # You can also pass an object that responds to +maximum+, such as a - # collection of records: + # You can also pass an object that responds to `maximum`, such as a collection + # of records: # - # def index - # @articles = Article.all - # fresh_when(@articles) - # end + # def index + # @articles = Article.all + # fresh_when(@articles) + # end # - # In this case, +etag+ will be set to the collection, and +last_modified+ - # will be set to maximum(:updated_at) (the timestamp of the most - # recently updated record). + # In this case, `etag` will be set to the collection, and `last_modified` will + # be set to `maximum(:updated_at)` (the timestamp of the most recently updated + # record). # - # When passing a record or a collection, you can still specify other - # options, such as +:public+ and +:cache_control+: + # When passing a record or a collection, you can still specify other options, + # such as `:public` and `:cache_control`: # - # def show - # @article = Article.find(params[:id]) - # fresh_when(@article, public: true, cache_control: { no_cache: true }) - # end + # def show + # @article = Article.find(params[:id]) + # fresh_when(@article, public: true, cache_control: { no_cache: true }) + # end # - # The above will set Cache-Control: public, no-cache in the response. + # The above will set `Cache-Control: public, no-cache` in the response. # # When rendering a different template than the controller/action's default # template, you can indicate which digest to include in the ETag: # - # before_action { fresh_when @article, template: "widgets/show" } + # before_action { fresh_when @article, template: "widgets/show" } # - # source://actionpack/lib/action_controller/metal/conditional_get.rb#128 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#137 def fresh_when(object = T.unsafe(nil), etag: T.unsafe(nil), weak_etag: T.unsafe(nil), strong_etag: T.unsafe(nil), last_modified: T.unsafe(nil), public: T.unsafe(nil), cache_control: T.unsafe(nil), template: T.unsafe(nil)); end # Cache or yield the block. The cache is supposed to never expire. # - # You can use this method when you have an HTTP response that never changes, - # and the browser and proxies should cache it indefinitely. + # You can use this method when you have an HTTP response that never changes, and + # the browser and proxies should cache it indefinitely. # - # * +public+: By default, HTTP responses are private, cached only on the - # user's web browser. To allow proxies to cache the response, set +true+ to - # indicate that they can serve the cached response to all users. + # * `public`: By default, HTTP responses are private, cached only on the + # user's web browser. To allow proxies to cache the response, set `true` to + # indicate that they can serve the cached response to all users. # - # source://actionpack/lib/action_controller/metal/conditional_get.rb#304 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#321 def http_cache_forever(public: T.unsafe(nil)); end - # Sets an HTTP 1.1 +Cache-Control+ header of no-store. This means the - # resource may not be stored in any cache. + # Sets an HTTP 1.1 `Cache-Control` header of `no-store`. This means the resource + # may not be stored in any cache. # - # source://actionpack/lib/action_controller/metal/conditional_get.rb#314 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#331 def no_store; end - # Sets the +etag+ and/or +last_modified+ on the response and checks them - # against the request. If the request doesn't match the provided options, it - # is considered stale, and the response should be rendered from scratch. - # Otherwise, it is fresh, and a 304 Not Modified is sent. + # Sets the `etag` and/or `last_modified` on the response and checks them against + # the request. If the request doesn't match the provided options, it is + # considered stale, and the response should be rendered from scratch. Otherwise, + # it is fresh, and a `304 Not Modified` is sent. # - # ==== Options + # #### Options # # See #fresh_when for supported options. # - # ==== Examples + # #### Examples # - # def show - # @article = Article.find(params[:id]) + # def show + # @article = Article.find(params[:id]) # - # if stale?(etag: @article, last_modified: @article.updated_at) - # @statistics = @article.really_expensive_call - # respond_to do |format| - # # all the supported formats + # if stale?(etag: @article, last_modified: @article.updated_at) + # @statistics = @article.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end # end # end - # end # # You can also just pass a record: # - # def show - # @article = Article.find(params[:id]) + # def show + # @article = Article.find(params[:id]) # - # if stale?(@article) - # @statistics = @article.really_expensive_call - # respond_to do |format| - # # all the supported formats + # if stale?(@article) + # @statistics = @article.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end # end # end - # end # - # +etag+ will be set to the record, and +last_modified+ will be set to the - # record's +updated_at+. + # `etag` will be set to the record, and `last_modified` will be set to the + # record's `updated_at`. # - # You can also pass an object that responds to +maximum+, such as a - # collection of records: + # You can also pass an object that responds to `maximum`, such as a collection + # of records: # - # def index - # @articles = Article.all + # def index + # @articles = Article.all # - # if stale?(@articles) - # @statistics = @articles.really_expensive_call - # respond_to do |format| - # # all the supported formats + # if stale?(@articles) + # @statistics = @articles.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end # end # end - # end # - # In this case, +etag+ will be set to the collection, and +last_modified+ - # will be set to maximum(:updated_at) (the timestamp of the most - # recently updated record). + # In this case, `etag` will be set to the collection, and `last_modified` will + # be set to `maximum(:updated_at)` (the timestamp of the most recently updated + # record). # - # When passing a record or a collection, you can still specify other - # options, such as +:public+ and +:cache_control+: + # When passing a record or a collection, you can still specify other options, + # such as `:public` and `:cache_control`: # - # def show - # @article = Article.find(params[:id]) + # def show + # @article = Article.find(params[:id]) # - # if stale?(@article, public: true, cache_control: { no_cache: true }) - # @statistics = @articles.really_expensive_call - # respond_to do |format| - # # all the supported formats + # if stale?(@article, public: true, cache_control: { no_cache: true }) + # @statistics = @articles.really_expensive_call + # respond_to do |format| + # # all the supported formats + # end # end # end - # end # - # The above will set Cache-Control: public, no-cache in the response. + # The above will set `Cache-Control: public, no-cache` in the response. # # When rendering a different template than the controller/action's default # template, you can indicate which digest to include in the ETag: # - # def show - # super if stale?(@article, template: "widgets/show") - # end + # def show + # super if stale?(@article, template: "widgets/show") + # end # # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/conditional_get.rb#227 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#236 def stale?(object = T.unsafe(nil), **freshness_kwargs); end private - # source://actionpack/lib/action_controller/metal/conditional_get.rb#319 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#336 def combine_etags(validator, options); end module GeneratedClassMethods @@ -2662,28 +2882,28 @@ module ActionController::ConditionalGet end end -# source://actionpack/lib/action_controller/metal/conditional_get.rb#16 +# source://actionpack/lib/action_controller/metal/conditional_get.rb#18 module ActionController::ConditionalGet::ClassMethods - # Allows you to consider additional controller-wide information when generating an ETag. - # For example, if you serve pages tailored depending on who's logged in at the moment, you - # may want to add the current user id to be part of the ETag to prevent unauthorized displaying - # of cached pages. - # - # class InvoicesController < ApplicationController - # etag { current_user&.id } - # - # def show - # # Etag will differ even for the same invoice when it's viewed by a different current_user - # @invoice = Invoice.find(params[:id]) - # fresh_when etag: @invoice + # Allows you to consider additional controller-wide information when generating + # an ETag. For example, if you serve pages tailored depending on who's logged in + # at the moment, you may want to add the current user id to be part of the ETag + # to prevent unauthorized displaying of cached pages. + # + # class InvoicesController < ApplicationController + # etag { current_user&.id } + # + # def show + # # Etag will differ even for the same invoice when it's viewed by a different current_user + # @invoice = Invoice.find(params[:id]) + # fresh_when etag: @invoice + # end # end - # end # - # source://actionpack/lib/action_controller/metal/conditional_get.rb#31 + # source://actionpack/lib/action_controller/metal/conditional_get.rb#33 def etag(&etagger); end end -# source://actionpack/lib/action_controller/metal/content_security_policy.rb#4 +# source://actionpack/lib/action_controller/metal/content_security_policy.rb#6 module ActionController::ContentSecurityPolicy extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -2702,19 +2922,18 @@ module ActionController::ContentSecurityPolicy # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/content_security_policy.rb#73 + # source://actionpack/lib/action_controller/metal/content_security_policy.rb#74 def content_security_policy?; end - # source://actionpack/lib/action_controller/metal/content_security_policy.rb#77 + # source://actionpack/lib/action_controller/metal/content_security_policy.rb#78 def content_security_policy_nonce; end - # source://actionpack/lib/action_controller/metal/content_security_policy.rb#81 + # source://actionpack/lib/action_controller/metal/content_security_policy.rb#82 def current_content_security_policy; end module GeneratedClassMethods def __callbacks; end def __callbacks=(value); end - def __callbacks?; end def _helper_methods; end def _helper_methods=(value); end def _helper_methods?; end @@ -2722,78 +2941,76 @@ module ActionController::ContentSecurityPolicy module GeneratedInstanceMethods def __callbacks; end - def __callbacks?; end def _helper_methods; end def _helper_methods=(value); end def _helper_methods?; end end end -# source://actionpack/lib/action_controller/metal/content_security_policy.rb#15 +# source://actionpack/lib/action_controller/metal/content_security_policy.rb#17 module ActionController::ContentSecurityPolicy::ClassMethods - # Overrides parts of the globally configured +Content-Security-Policy+ - # header: + # Overrides parts of the globally configured `Content-Security-Policy` header: # - # class PostsController < ApplicationController - # content_security_policy do |policy| - # policy.base_uri "https://www.example.com" + # class PostsController < ApplicationController + # content_security_policy do |policy| + # policy.base_uri "https://www.example.com" + # end # end - # end # - # Options can be passed similar to +before_action+. For example, pass - # only: :index to override the header on the index action only: + # Options can be passed similar to `before_action`. For example, pass `only: + # :index` to override the header on the index action only: # - # class PostsController < ApplicationController - # content_security_policy(only: :index) do |policy| - # policy.default_src :self, :https + # class PostsController < ApplicationController + # content_security_policy(only: :index) do |policy| + # policy.default_src :self, :https + # end # end - # end # - # Pass +false+ to remove the +Content-Security-Policy+ header: + # Pass `false` to remove the `Content-Security-Policy` header: # - # class PostsController < ApplicationController - # content_security_policy false, only: :index - # end + # class PostsController < ApplicationController + # content_security_policy false, only: :index + # end # - # source://actionpack/lib/action_controller/metal/content_security_policy.rb#39 + # source://actionpack/lib/action_controller/metal/content_security_policy.rb#40 def content_security_policy(enabled = T.unsafe(nil), **options, &block); end - # Overrides the globally configured +Content-Security-Policy-Report-Only+ + # Overrides the globally configured `Content-Security-Policy-Report-Only` # header: # - # class PostsController < ApplicationController - # content_security_policy_report_only only: :index - # end + # class PostsController < ApplicationController + # content_security_policy_report_only only: :index + # end # - # Pass +false+ to remove the +Content-Security-Policy-Report-Only+ header: + # Pass `false` to remove the `Content-Security-Policy-Report-Only` header: # - # class PostsController < ApplicationController - # content_security_policy_report_only false, only: :index - # end + # class PostsController < ApplicationController + # content_security_policy_report_only false, only: :index + # end # - # source://actionpack/lib/action_controller/metal/content_security_policy.rb#65 + # source://actionpack/lib/action_controller/metal/content_security_policy.rb#66 def content_security_policy_report_only(report_only = T.unsafe(nil), **options); end end -# source://actionpack/lib/action_controller/metal/cookies.rb#4 +# source://actionpack/lib/action_controller/metal/cookies.rb#6 module ActionController::Cookies extend ::ActiveSupport::Concern private - # The cookies for the current request. See ActionDispatch::Cookies for - # more information. + # The cookies for the current request. See ActionDispatch::Cookies for more + # information. # - # source://actionpack/lib/action_controller/metal/cookies.rb#14 + # source://actionpack/lib/action_controller/metal/cookies.rb#16 def cookies; end end -# = Action Controller Data \Streaming +# # Action Controller Data Streaming # # Methods for sending arbitrary data and for streaming files to the browser, # instead of rendering. # -# source://actionpack/lib/action_controller/metal/data_streaming.rb#11 +# source://actionpack/lib/action_controller/metal/data_streaming.rb#13 module ActionController::DataStreaming extend ::ActiveSupport::Concern include ::ActionController::Rendering @@ -2802,127 +3019,134 @@ module ActionController::DataStreaming private - # Sends the given binary data to the browser. This method is similar to - # render plain: data, but also allows you to specify whether - # the browser should display the response as a file attachment (i.e. in a - # download dialog) or as inline data. You may also set the content type, - # the file name, and other things. + # Sends the given binary data to the browser. This method is similar to `render + # plain: data`, but also allows you to specify whether the browser should + # display the response as a file attachment (i.e. in a download dialog) or as + # inline data. You may also set the content type, the file name, and other + # things. # # Options: - # * :filename - suggests a filename for the browser to use. - # * :type - specifies an HTTP content type. Defaults to +application/octet-stream+. - # You can specify either a string or a symbol for a registered type with Mime::Type.register, for example +:json+. - # If omitted, type will be inferred from the file extension specified in :filename. - # If no content type is registered for the extension, the default type +application/octet-stream+ will be used. - # * :disposition - specifies whether the file will be shown inline or downloaded. - # Valid values are "inline" and "attachment" (default). - # * :status - specifies the status code to send with the response. Defaults to 200. + # * `:filename` - suggests a filename for the browser to use. + # * `:type` - specifies an HTTP content type. Defaults to + # `application/octet-stream`. You can specify either a string or a symbol + # for a registered type with `Mime::Type.register`, for example `:json`. If + # omitted, type will be inferred from the file extension specified in + # `:filename`. If no content type is registered for the extension, the + # default type `application/octet-stream` will be used. + # * `:disposition` - specifies whether the file will be shown inline or + # downloaded. Valid values are `"inline"` and `"attachment"` (default). + # * `:status` - specifies the status code to send with the response. Defaults + # to 200. + # # # Generic data download: # - # send_data buffer + # send_data buffer # # Download a dynamically-generated tarball: # - # send_data generate_tgz('dir'), filename: 'dir.tgz' + # send_data generate_tgz('dir'), filename: 'dir.tgz' # # Display an image Active Record in the browser: # - # send_data image.data, type: image.content_type, disposition: 'inline' + # send_data image.data, type: image.content_type, disposition: 'inline' # - # See +send_file+ for more information on HTTP Content-* headers and caching. + # See `send_file` for more information on HTTP `Content-*` headers and caching. # - # source://actionpack/lib/action_controller/metal/data_streaming.rb#111 + # source://actionpack/lib/action_controller/metal/data_streaming.rb#120 def send_data(data, options = T.unsafe(nil)); end - # Sends the file. This uses a server-appropriate method (such as +X-Sendfile+) - # via the +Rack::Sendfile+ middleware. The header to use is set via - # +config.action_dispatch.x_sendfile_header+. - # Your server can also configure this for you by setting the +X-Sendfile-Type+ header. + # Sends the file. This uses a server-appropriate method (such as `X-Sendfile`) + # via the `Rack::Sendfile` middleware. The header to use is set via + # `config.action_dispatch.x_sendfile_header`. Your server can also configure + # this for you by setting the `X-Sendfile-Type` header. # - # Be careful to sanitize the path parameter if it is coming from a web - # page. send_file(params[:path]) allows a malicious user to - # download any file on your server. + # Be careful to sanitize the path parameter if it is coming from a web page. + # `send_file(params[:path])` allows a malicious user to download any file on + # your server. # # Options: - # * :filename - suggests a filename for the browser to use. - # Defaults to File.basename(path). - # * :type - specifies an HTTP content type. - # You can specify either a string or a symbol for a registered type with Mime::Type.register, for example +:json+. - # If omitted, the type will be inferred from the file extension specified in :filename. - # If no content type is registered for the extension, the default type +application/octet-stream+ will be used. - # * :disposition - specifies whether the file will be shown inline or downloaded. - # Valid values are "inline" and "attachment" (default). - # * :status - specifies the status code to send with the response. Defaults to 200. - # * :url_based_filename - set to +true+ if you want the browser to guess the filename from - # the URL, which is necessary for i18n filenames on certain browsers - # (setting :filename overrides this option). - # - # The default +Content-Type+ and +Content-Disposition+ headers are - # set to download arbitrary binary files in as many browsers as - # possible. IE versions 4, 5, 5.5, and 6 are all known to have - # a variety of quirks (especially when downloading over SSL). + # * `:filename` - suggests a filename for the browser to use. Defaults to + # `File.basename(path)`. + # * `:type` - specifies an HTTP content type. You can specify either a string + # or a symbol for a registered type with `Mime::Type.register`, for example + # `:json`. If omitted, the type will be inferred from the file extension + # specified in `:filename`. If no content type is registered for the + # extension, the default type `application/octet-stream` will be used. + # * `:disposition` - specifies whether the file will be shown inline or + # downloaded. Valid values are `"inline"` and `"attachment"` (default). + # * `:status` - specifies the status code to send with the response. Defaults + # to 200. + # * `:url_based_filename` - set to `true` if you want the browser to guess the + # filename from the URL, which is necessary for i18n filenames on certain + # browsers (setting `:filename` overrides this option). + # + # + # The default `Content-Type` and `Content-Disposition` headers are set to + # download arbitrary binary files in as many browsers as possible. IE versions + # 4, 5, 5.5, and 6 are all known to have a variety of quirks (especially when + # downloading over SSL). # # Simple download: # - # send_file '/path/to.zip' + # send_file '/path/to.zip' # # Show a JPEG in the browser: # - # send_file '/path/to.jpeg', type: 'image/jpeg', disposition: 'inline' + # send_file '/path/to.jpeg', type: 'image/jpeg', disposition: 'inline' # # Show a 404 page in the browser: # - # send_file '/path/to/404.html', type: 'text/html; charset=utf-8', disposition: 'inline', status: 404 + # send_file '/path/to/404.html', type: 'text/html; charset=utf-8', disposition: 'inline', status: 404 # - # You can use other Content-* HTTP headers to provide additional - # information to the client. See MDN for a - # {list of HTTP headers}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers]. + # You can use other `Content-*` HTTP headers to provide additional information + # to the client. See MDN for a [list of HTTP + # headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers). # - # Also be aware that the document may be cached by proxies and browsers. - # The +Pragma+ and +Cache-Control+ headers declare how the file may be cached - # by intermediaries. They default to require clients to validate with - # the server before releasing cached responses. See - # https://www.mnot.net/cache_docs/ for an overview of web caching and - # {RFC 9111}[https://www.rfc-editor.org/rfc/rfc9111.html#name-cache-control] - # for the +Cache-Control+ header spec. + # Also be aware that the document may be cached by proxies and browsers. The + # `Pragma` and `Cache-Control` headers declare how the file may be cached by + # intermediaries. They default to require clients to validate with the server + # before releasing cached responses. See https://www.mnot.net/cache_docs/ for an + # overview of web caching and [RFC + # 9111](https://www.rfc-editor.org/rfc/rfc9111.html#name-cache-control) for the + # `Cache-Control` header spec. # # @raise [MissingFile] # - # source://actionpack/lib/action_controller/metal/data_streaming.rb#71 + # source://actionpack/lib/action_controller/metal/data_streaming.rb#76 def send_file(path, options = T.unsafe(nil)); end # @raise [ArgumentError] # - # source://actionpack/lib/action_controller/metal/data_streaming.rb#116 + # source://actionpack/lib/action_controller/metal/data_streaming.rb#125 def send_file_headers!(options); end end -# source://actionpack/lib/action_controller/metal/data_streaming.rb#17 +# source://actionpack/lib/action_controller/metal/data_streaming.rb#19 ActionController::DataStreaming::DEFAULT_SEND_FILE_DISPOSITION = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_controller/metal/data_streaming.rb#16 +# source://actionpack/lib/action_controller/metal/data_streaming.rb#18 ActionController::DataStreaming::DEFAULT_SEND_FILE_TYPE = T.let(T.unsafe(nil), String) -# = Action Controller Default Headers +# # Action Controller Default Headers # -# Allows configuring default headers that will be automatically merged into -# each response. +# Allows configuring default headers that will be automatically merged into each +# response. # -# source://actionpack/lib/action_controller/metal/default_headers.rb#8 +# source://actionpack/lib/action_controller/metal/default_headers.rb#10 module ActionController::DefaultHeaders extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionController::DefaultHeaders::ClassMethods end -# source://actionpack/lib/action_controller/metal/default_headers.rb#11 +# source://actionpack/lib/action_controller/metal/default_headers.rb#13 module ActionController::DefaultHeaders::ClassMethods - # source://actionpack/lib/action_controller/metal/default_headers.rb#12 + # source://actionpack/lib/action_controller/metal/default_headers.rb#14 def make_response!(request); end end -# = Action Controller Etag With \Flash +# # Action Controller Etag With Flash # # When you're using the flash, it's generally used as a conditional on the view. # This means the content of the view depends on the flash. Which in turn means @@ -2930,7 +3154,7 @@ end # in mind. This does that by including the content of the flash as a component # in the ETag that's generated for a response. # -# source://actionpack/lib/action_controller/metal/etag_with_flash.rb#11 +# source://actionpack/lib/action_controller/metal/etag_with_flash.rb#13 module ActionController::EtagWithFlash extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -2952,26 +3176,26 @@ module ActionController::EtagWithFlash end end -# = Action Controller Etag With Template \Digest +# # Action Controller Etag With Template Digest # -# When our views change, they should bubble up into HTTP cache freshness -# and bust browser caches. So the template digest for the current action -# is automatically included in the ETag. +# When our views change, they should bubble up into HTTP cache freshness and +# bust browser caches. So the template digest for the current action is +# automatically included in the ETag. # # Enabled by default for apps that use Action View. Disable by setting # -# config.action_controller.etag_with_template_digest = false +# config.action_controller.etag_with_template_digest = false # -# Override the template to digest by passing +:template+ to +fresh_when+ -# and +stale?+ calls. For example: +# Override the template to digest by passing `:template` to `fresh_when` and +# `stale?` calls. For example: # -# # We're going to render widgets/show, not posts/show -# fresh_when @post, template: 'widgets/show' +# # We're going to render widgets/show, not posts/show +# fresh_when @post, template: 'widgets/show' # -# # We're not going to render a template, so omit it from the ETag. -# fresh_when @post, template: false +# # We're not going to render a template, so omit it from the ETag. +# fresh_when @post, template: false # -# source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#23 +# source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#25 module ActionController::EtagWithTemplateDigest extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -2982,18 +3206,18 @@ module ActionController::EtagWithTemplateDigest private - # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#37 + # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#39 def determine_template_etag(options); end - # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#53 + # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#55 def lookup_and_digest_template(template); end - # Pick the template digest to include in the ETag. If the +:template+ option - # is present, use the named template. If +:template+ is +nil+ or absent, use - # the default controller/action template. If +:template+ is false, omit the - # template digest from the ETag. + # Pick the template digest to include in the ETag. If the `:template` option is + # present, use the named template. If `:template` is `nil` or absent, use the + # default controller/action template. If `:template` is false, omit the template + # digest from the ETag. # - # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#47 + # source://actionpack/lib/action_controller/metal/etag_with_template_digest.rb#49 def pick_template_for_etag(options); end module GeneratedClassMethods @@ -3015,7 +3239,17 @@ module ActionController::EtagWithTemplateDigest end end -# source://actionpack/lib/action_controller/metal/flash.rb#4 +# Raised from `expect!` when an expected parameter is missing or is of an +# incompatible type. +# +# params = ActionController::Parameters.new(a: {}) +# params.expect!(:a) +# # => ActionController::ExpectedParameterMissing: param is missing or the value is empty or invalid: a +# +# source://actionpack/lib/action_controller/metal/strong_parameters.rb#50 +class ActionController::ExpectedParameterMissing < ::ActionController::ParameterMissing; end + +# source://actionpack/lib/action_controller/metal/flash.rb#6 module ActionController::Flash extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -3025,7 +3259,7 @@ module ActionController::Flash private - # source://actionpack/lib/action_controller/metal/flash.rb#51 + # source://actionpack/lib/action_controller/metal/flash.rb#53 def redirect_to(options = T.unsafe(nil), response_options_and_flash = T.unsafe(nil)); end module GeneratedClassMethods @@ -3037,60 +3271,60 @@ module ActionController::Flash module GeneratedInstanceMethods; end end -# source://actionpack/lib/action_controller/metal/flash.rb#14 +# source://actionpack/lib/action_controller/metal/flash.rb#16 module ActionController::Flash::ClassMethods - # source://actionpack/lib/action_controller/metal/flash.rb#45 + # source://actionpack/lib/action_controller/metal/flash.rb#47 def action_methods; end # Creates new flash types. You can pass as many types as you want to create - # flash types other than the default alert and notice in - # your controllers and views. For instance: + # flash types other than the default `alert` and `notice` in your controllers + # and views. For instance: # - # # in application_controller.rb - # class ApplicationController < ActionController::Base - # add_flash_types :warning - # end + # # in application_controller.rb + # class ApplicationController < ActionController::Base + # add_flash_types :warning + # end # - # # in your controller - # redirect_to user_path(@user), warning: "Incomplete profile" + # # in your controller + # redirect_to user_path(@user), warning: "Incomplete profile" # - # # in your view - # <%= warning %> + # # in your view + # <%= warning %> # # This method will automatically define a new method for each of the given # names, and it will be available in your views. # - # source://actionpack/lib/action_controller/metal/flash.rb#32 + # source://actionpack/lib/action_controller/metal/flash.rb#34 def add_flash_types(*types); end end -# = Action Controller Form Builder +# # Action Controller Form Builder # -# Override the default form builder for all views rendered by this -# controller and any of its descendants. Accepts a subclass of +# Override the default form builder for all views rendered by this controller +# and any of its descendants. Accepts a subclass of # ActionView::Helpers::FormBuilder. # # For example, given a form builder: # -# class AdminFormBuilder < ActionView::Helpers::FormBuilder -# def special_field(name) +# class AdminFormBuilder < ActionView::Helpers::FormBuilder +# def special_field(name) +# end # end -# end # # The controller specifies a form builder as its default: # -# class AdminAreaController < ApplicationController -# default_form_builder AdminFormBuilder -# end +# class AdminAreaController < ApplicationController +# default_form_builder AdminFormBuilder +# end # -# Then in the view any form using +form_for+ will be an instance of the +# Then in the view any form using `form_for` will be an instance of the # specified form builder: # -# <%= form_for(@instance) do |builder| %> -# <%= builder.special_field(:name) %> -# <% end %> +# <%= form_for(@instance) do |builder| %> +# <%= builder.special_field(:name) %> +# <% end %> # -# source://actionpack/lib/action_controller/form_builder.rb#29 +# source://actionpack/lib/action_controller/form_builder.rb#31 module ActionController::FormBuilder extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -3100,7 +3334,7 @@ module ActionController::FormBuilder # Default form builder for the controller # - # source://actionpack/lib/action_controller/form_builder.rb#48 + # source://actionpack/lib/action_controller/form_builder.rb#51 def default_form_builder; end module GeneratedClassMethods @@ -3112,103 +3346,107 @@ module ActionController::FormBuilder module GeneratedInstanceMethods; end end -# source://actionpack/lib/action_controller/form_builder.rb#36 +# source://actionpack/lib/action_controller/form_builder.rb#38 module ActionController::FormBuilder::ClassMethods - # Set the form builder to be used as the default for all forms - # in the views rendered by this controller and its subclasses. + # Set the form builder to be used as the default for all forms in the views + # rendered by this controller and its subclasses. # - # ==== Parameters - # * builder - Default form builder, an instance of ActionView::Helpers::FormBuilder + # #### Parameters + # * `builder` - Default form builder, an instance of + # ActionView::Helpers::FormBuilder # - # source://actionpack/lib/action_controller/form_builder.rb#42 + # source://actionpack/lib/action_controller/form_builder.rb#45 def default_form_builder(builder); end end -# source://actionpack/lib/action_controller/metal/head.rb#4 +# source://actionpack/lib/action_controller/metal/head.rb#6 module ActionController::Head - # Returns a response that has no content (merely headers). The options - # argument is interpreted to be a hash of header names and values. - # This allows you to easily return a response that consists only of - # significant headers: + # Returns a response that has no content (merely headers). The options argument + # is interpreted to be a hash of header names and values. This allows you to + # easily return a response that consists only of significant headers: # - # head :created, location: person_path(@person) + # head :created, location: person_path(@person) # - # head :created, location: @person + # head :created, location: @person # # It can also be used to return exceptional conditions: # - # return head(:method_not_allowed) unless request.post? - # return head(:bad_request) unless valid_request? - # render + # return head(:method_not_allowed) unless request.post? + # return head(:bad_request) unless valid_request? + # render # - # See +Rack::Utils::SYMBOL_TO_STATUS_CODE+ for a full list of valid +status+ symbols. + # See `Rack::Utils::SYMBOL_TO_STATUS_CODE` for a full list of valid `status` + # symbols. # - # source://actionpack/lib/action_controller/metal/head.rb#21 + # source://actionpack/lib/action_controller/metal/head.rb#23 def head(status, options = T.unsafe(nil)); end private # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/head.rb#54 + # source://actionpack/lib/action_controller/metal/head.rb#56 def include_content?(status); end end -# = Action Controller \Helpers +# # Action Controller Helpers # -# The \Rails framework provides a large number of helpers for working with assets, dates, forms, -# numbers and model objects, to name a few. These helpers are available to all templates -# by default. +# The Rails framework provides a large number of helpers for working with +# assets, dates, forms, numbers and model objects, to name a few. These helpers +# are available to all templates by default. # -# In addition to using the standard template helpers provided, creating custom helpers to -# extract complicated logic or reusable functionality is strongly encouraged. By default, each controller -# will include all helpers. These helpers are only accessible on the controller through #helpers +# In addition to using the standard template helpers provided, creating custom +# helpers to extract complicated logic or reusable functionality is strongly +# encouraged. By default, each controller will include all helpers. These +# helpers are only accessible on the controller through `#helpers` # -# In previous versions of \Rails the controller will include a helper which -# matches the name of the controller, e.g., MyController will automatically -# include MyHelper. You can revert to the old behavior with the following: +# In previous versions of Rails the controller will include a helper which +# matches the name of the controller, e.g., `MyController` will automatically +# include `MyHelper`. You can revert to the old behavior with the following: # -# # config/application.rb -# class Application < Rails::Application -# config.action_controller.include_all_helpers = false -# end +# # config/application.rb +# class Application < Rails::Application +# config.action_controller.include_all_helpers = false +# end # -# Additional helpers can be specified using the +helper+ class method in ActionController::Base or any -# controller which inherits from it. +# Additional helpers can be specified using the `helper` class method in +# ActionController::Base or any controller which inherits from it. # -# The +to_s+ method from the \Time class can be wrapped in a helper method to display a custom message if -# a \Time object is blank: +# The `to_s` method from the Time class can be wrapped in a helper method to +# display a custom message if a Time object is blank: # -# module FormattedTimeHelper -# def format_time(time, format=:long, blank_message=" ") -# time.blank? ? blank_message : time.to_fs(format) +# module FormattedTimeHelper +# def format_time(time, format=:long, blank_message=" ") +# time.blank? ? blank_message : time.to_fs(format) +# end # end -# end # -# FormattedTimeHelper can now be included in a controller, using the +helper+ class method: +# FormattedTimeHelper can now be included in a controller, using the `helper` +# class method: # -# class EventsController < ActionController::Base -# helper FormattedTimeHelper -# def index -# @events = Event.all +# class EventsController < ActionController::Base +# helper FormattedTimeHelper +# def index +# @events = Event.all +# end # end -# end # -# Then, in any view rendered by EventsController, the format_time method can be called: +# Then, in any view rendered by `EventsController`, the `format_time` method can +# be called: # -# <% @events.each do |event| -%> -#

-# <%= format_time(event.time, :short, "N/A") %> | <%= event.name %> -#

-# <% end -%> +# <% @events.each do |event| -%> +#

+# <%= format_time(event.time, :short, "N/A") %> | <%= event.name %> +#

+# <% end -%> # -# Finally, assuming we have two event instances, one which has a time and one which does not, -# the output might look like this: +# Finally, assuming we have two event instances, one which has a time and one +# which does not, the output might look like this: # -# 23 Aug 11:30 | Carolina Railhawks Soccer Match -# N/A | Carolina Railhawks Training Workshop +# 23 Aug 11:30 | Carolina Railhawks Soccer Match +# N/A | Carolina Railhawks Training Workshop # -# source://actionpack/lib/action_controller/metal/helpers.rb#58 +# source://actionpack/lib/action_controller/metal/helpers.rb#63 module ActionController::Helpers extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -3220,20 +3458,20 @@ module ActionController::Helpers # Provides a proxy to access helper methods from outside the view. # - # source://actionpack/lib/action_controller/metal/helpers.rb#117 + # source://actionpack/lib/action_controller/metal/helpers.rb#125 def helpers; end class << self # Returns the value of attribute helpers_path. # - # source://actionpack/lib/action_controller/metal/helpers.rb#61 + # source://actionpack/lib/action_controller/metal/helpers.rb#66 def helpers_path; end # Sets the attribute helpers_path # # @param value the value to set the attribute helpers_path to. # - # source://actionpack/lib/action_controller/metal/helpers.rb#61 + # source://actionpack/lib/action_controller/metal/helpers.rb#66 def helpers_path=(_arg0); end end @@ -3262,590 +3500,594 @@ module ActionController::Helpers end end -# source://actionpack/lib/action_controller/metal/helpers.rb#69 +# source://actionpack/lib/action_controller/metal/helpers.rb#74 module ActionController::Helpers::ClassMethods # Declares helper accessors for controller attributes. For example, the - # following adds new +name+ and name= instance methods to a - # controller and makes them available to the view: - # attr_accessor :name - # helper_attr :name + # following adds new `name` and `name=` instance methods to a controller and + # makes them available to the view: + # attr_accessor :name + # helper_attr :name # - # ==== Parameters - # * attrs - Names of attributes to be converted into helpers. + # #### Parameters + # * `attrs` - Names of attributes to be converted into helpers. # - # source://actionpack/lib/action_controller/metal/helpers.rb#78 + # source://actionpack/lib/action_controller/metal/helpers.rb#84 def helper_attr(*attrs); end # Provides a proxy to access helper methods from outside the view. # - # Note that the proxy is rendered under a different view context. - # This may cause incorrect behavior with capture methods. Consider - # using {helper}[rdoc-ref:AbstractController::Helpers::ClassMethods#helper] - # instead when using +capture+. + # Note that the proxy is rendered under a different view context. This may cause + # incorrect behavior with capture methods. Consider using + # [helper](rdoc-ref:AbstractController::Helpers::ClassMethods#helper) instead + # when using `capture`. # - # source://actionpack/lib/action_controller/metal/helpers.rb#88 + # source://actionpack/lib/action_controller/metal/helpers.rb#94 def helpers; end - # Override modules_for_helpers to accept +:all+ as argument, which loads - # all helpers in helpers_path. + # Override modules_for_helpers to accept `:all` as argument, which loads all + # helpers in helpers_path. # - # ==== Parameters - # * args - A list of helpers + # #### Parameters + # * `args` - A list of helpers # - # ==== Returns - # * array - A normalized list of modules for the list of helpers provided. # - # source://actionpack/lib/action_controller/metal/helpers.rb#104 + # #### Returns + # * `array` - A normalized list of modules for the list of helpers provided. + # + # source://actionpack/lib/action_controller/metal/helpers.rb#112 def modules_for_helpers(args); end private - # Extract helper names from files in app/helpers/**/*_helper.rb + # Extract helper names from files in `app/helpers/***/**_helper.rb` # - # source://actionpack/lib/action_controller/metal/helpers.rb#111 + # source://actionpack/lib/action_controller/metal/helpers.rb#119 def all_application_helpers; end end # HTTP Basic, Digest, and Token authentication. # -# source://actionpack/lib/action_controller/metal/http_authentication.rb#9 +# source://actionpack/lib/action_controller/metal/http_authentication.rb#11 module ActionController::HttpAuthentication; end -# = HTTP \Basic authentication +# # HTTP Basic authentication # -# === Simple \Basic example +# ### Simple Basic example # -# class PostsController < ApplicationController -# http_basic_authenticate_with name: "dhh", password: "secret", except: :index +# class PostsController < ApplicationController +# http_basic_authenticate_with name: "dhh", password: "secret", except: :index # -# def index -# render plain: "Everyone can see me!" -# end +# def index +# render plain: "Everyone can see me!" +# end # -# def edit -# render plain: "I'm only accessible if you know the password" +# def edit +# render plain: "I'm only accessible if you know the password" +# end # end -# end # -# === Advanced \Basic example +# ### Advanced Basic example # -# Here is a more advanced \Basic example where only Atom feeds and the XML API are protected by HTTP authentication. -# The regular HTML interface is protected by a session approach: +# Here is a more advanced Basic example where only Atom feeds and the XML API +# are protected by HTTP authentication. The regular HTML interface is protected +# by a session approach: # -# class ApplicationController < ActionController::Base -# before_action :set_account, :authenticate +# class ApplicationController < ActionController::Base +# before_action :set_account, :authenticate # -# private -# def set_account -# @account = Account.find_by(url_name: request.subdomains.first) -# end +# private +# def set_account +# @account = Account.find_by(url_name: request.subdomains.first) +# end # -# def authenticate -# case request.format -# when Mime[:xml], Mime[:atom] -# if user = authenticate_with_http_basic { |u, p| @account.users.authenticate(u, p) } -# @current_user = user -# else -# request_http_basic_authentication -# end -# else -# if session_authenticated? -# @current_user = @account.users.find(session[:authenticated][:user_id]) +# def authenticate +# case request.format +# when Mime[:xml], Mime[:atom] +# if user = authenticate_with_http_basic { |u, p| @account.users.authenticate(u, p) } +# @current_user = user +# else +# request_http_basic_authentication +# end # else -# redirect_to(login_url) and return false +# if session_authenticated? +# @current_user = @account.users.find(session[:authenticated][:user_id]) +# else +# redirect_to(login_url) and return false +# end # end # end -# end -# end +# end # # In your integration tests, you can do something like this: # -# def test_access_granted_from_xml -# authorization = ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password) +# def test_access_granted_from_xml +# authorization = ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password) # -# get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } +# get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } # -# assert_equal 200, status -# end +# assert_equal 200, status +# end # -# source://actionpack/lib/action_controller/metal/http_authentication.rb#66 +# source://actionpack/lib/action_controller/metal/http_authentication.rb#69 module ActionController::HttpAuthentication::Basic extend ::ActionController::HttpAuthentication::Basic - # source://actionpack/lib/action_controller/metal/http_authentication.rb#127 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#130 def auth_param(request); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#123 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#126 def auth_scheme(request); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#105 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#108 def authenticate(request, &login_procedure); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#135 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#138 def authentication_request(controller, realm, message); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#119 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#122 def decode_credentials(request); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#131 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#134 def encode_credentials(user_name, password); end # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#111 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#114 def has_basic_credentials?(request); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#115 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#118 def user_name_and_password(request); end end -# source://actionpack/lib/action_controller/metal/http_authentication.rb#69 +# source://actionpack/lib/action_controller/metal/http_authentication.rb#72 module ActionController::HttpAuthentication::Basic::ControllerMethods extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods - # source://actionpack/lib/action_controller/metal/http_authentication.rb#92 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#95 def authenticate_or_request_with_http_basic(realm = T.unsafe(nil), message = T.unsafe(nil), &login_procedure); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#96 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#99 def authenticate_with_http_basic(&login_procedure); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#83 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#86 def http_basic_authenticate_or_request_with(name:, password:, realm: T.unsafe(nil), message: T.unsafe(nil)); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#100 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#103 def request_http_basic_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end end -# source://actionpack/lib/action_controller/metal/http_authentication.rb#72 +# source://actionpack/lib/action_controller/metal/http_authentication.rb#75 module ActionController::HttpAuthentication::Basic::ControllerMethods::ClassMethods - # Enables HTTP \Basic authentication. + # Enables HTTP Basic authentication. # # See ActionController::HttpAuthentication::Basic for example usage. # # @raise [ArgumentError] # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#76 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#79 def http_basic_authenticate_with(name:, password:, realm: T.unsafe(nil), **options); end end -# = HTTP \Digest authentication +# # HTTP Digest authentication # -# === Simple \Digest example +# ### Simple Digest example # -# require "openssl" -# class PostsController < ApplicationController -# REALM = "SuperSecret" -# USERS = {"dhh" => "secret", #plain text password -# "dap" => OpenSSL::Digest::MD5.hexdigest(["dap",REALM,"secret"].join(":"))} #ha1 digest password +# require "openssl" +# class PostsController < ApplicationController +# REALM = "SuperSecret" +# USERS = {"dhh" => "secret", #plain text password +# "dap" => OpenSSL::Digest::MD5.hexdigest(["dap",REALM,"secret"].join(":"))} #ha1 digest password # -# before_action :authenticate, except: [:index] +# before_action :authenticate, except: [:index] # -# def index -# render plain: "Everyone can see me!" -# end +# def index +# render plain: "Everyone can see me!" +# end # -# def edit -# render plain: "I'm only accessible if you know the password" -# end +# def edit +# render plain: "I'm only accessible if you know the password" +# end # -# private -# def authenticate -# authenticate_or_request_with_http_digest(REALM) do |username| -# USERS[username] +# private +# def authenticate +# authenticate_or_request_with_http_digest(REALM) do |username| +# USERS[username] +# end # end -# end -# end +# end # -# === Notes +# ### Notes # -# The +authenticate_or_request_with_http_digest+ block must return the user's password -# or the ha1 digest hash so the framework can appropriately hash to check the user's -# credentials. Returning +nil+ will cause authentication to fail. +# The `authenticate_or_request_with_http_digest` block must return the user's +# password or the ha1 digest hash so the framework can appropriately hash to +# check the user's credentials. Returning `nil` will cause authentication to +# fail. # -# Storing the ha1 hash: MD5(username:realm:password), is better than storing a plain password. If -# the password file or database is compromised, the attacker would be able to use the ha1 hash to -# authenticate as the user at this +realm+, but would not have the user's password to try using at -# other sites. +# Storing the ha1 hash: MD5(username:realm:password), is better than storing a +# plain password. If the password file or database is compromised, the attacker +# would be able to use the ha1 hash to authenticate as the user at this `realm`, +# but would not have the user's password to try using at other sites. # -# In rare instances, web servers or front proxies strip authorization headers before -# they reach your application. You can debug this situation by logging all environment -# variables, and check for HTTP_AUTHORIZATION, amongst others. +# In rare instances, web servers or front proxies strip authorization headers +# before they reach your application. You can debug this situation by logging +# all environment variables, and check for HTTP_AUTHORIZATION, amongst others. # -# source://actionpack/lib/action_controller/metal/http_authentication.rb#185 +# source://actionpack/lib/action_controller/metal/http_authentication.rb#189 module ActionController::HttpAuthentication::Digest extend ::ActionController::HttpAuthentication::Digest - # Returns false on a valid response, true otherwise. + # Returns true on a valid response, false otherwise. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#211 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#215 def authenticate(request, realm, &password_procedure); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#269 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#274 def authentication_header(controller, realm); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#276 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#281 def authentication_request(controller, realm, message = T.unsafe(nil)); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#262 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#267 def decode_credentials(header); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#258 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#263 def decode_credentials_header(request); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#253 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#258 def encode_credentials(http_method, credentials, password, password_is_ha1); end - # Returns the expected response for a request of +http_method+ to +uri+ with the decoded +credentials+ and the expected +password+ - # Optional parameter +password_is_ha1+ is set to +true+ by default, since best practice is to store ha1 digest instead - # of a plain-text password. + # Returns the expected response for a request of `http_method` to `uri` with the + # decoded `credentials` and the expected `password` Optional parameter + # `password_is_ha1` is set to `true` by default, since best practice is to store + # ha1 digest instead of a plain-text password. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#243 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#248 def expected_response(http_method, uri, credentials, password, password_is_ha1 = T.unsafe(nil)); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#249 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#254 def ha1(credentials, password); end # Uses an MD5 digest based on time to generate a value to be used only once. # - # A server-specified data string which should be uniquely generated each time a 401 response is made. - # It is recommended that this string be base64 or hexadecimal data. - # Specifically, since the string is passed in the header lines as a quoted string, the double-quote character is not allowed. - # - # The contents of the nonce are implementation dependent. - # The quality of the implementation depends on a good choice. - # A nonce might, for example, be constructed as the base 64 encoding of - # - # time-stamp H(time-stamp ":" ETag ":" private-key) - # - # where time-stamp is a server-generated time or other non-repeating value, - # ETag is the value of the HTTP ETag header associated with the requested entity, - # and private-key is data known only to the server. - # With a nonce of this form a server would recalculate the hash portion after receiving the client authentication header and - # reject the request if it did not match the nonce from that header or - # if the time-stamp value is not recent enough. In this way the server can limit the time of the nonce's validity. - # The inclusion of the ETag prevents a replay request for an updated version of the resource. - # (Note: including the IP address of the client in the nonce would appear to offer the server the ability - # to limit the reuse of the nonce to the same client that originally got it. - # However, that would break proxy farms, where requests from a single user often go through different proxies in the farm. - # Also, IP address spoofing is not that hard.) - # - # An implementation might choose not to accept a previously used nonce or a previously used digest, in order to - # protect against a replay attack. Or, an implementation might choose to use one-time nonces or digests for - # POST, PUT, or PATCH requests, and a time-stamp for GET requests. For more details on the issues involved see Section 4 - # of this document. - # - # The nonce is opaque to the client. Composed of Time, and hash of Time with secret - # key from the \Rails session secret generated upon creation of project. Ensures - # the time cannot be modified by client. - # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#321 + # A server-specified data string which should be uniquely generated each time a + # 401 response is made. It is recommended that this string be base64 or + # hexadecimal data. Specifically, since the string is passed in the header lines + # as a quoted string, the double-quote character is not allowed. + # + # The contents of the nonce are implementation dependent. The quality of the + # implementation depends on a good choice. A nonce might, for example, be + # constructed as the base 64 encoding of + # + # time-stamp H(time-stamp ":" ETag ":" private-key) + # + # where time-stamp is a server-generated time or other non-repeating value, ETag + # is the value of the HTTP ETag header associated with the requested entity, and + # private-key is data known only to the server. With a nonce of this form a + # server would recalculate the hash portion after receiving the client + # authentication header and reject the request if it did not match the nonce + # from that header or if the time-stamp value is not recent enough. In this way + # the server can limit the time of the nonce's validity. The inclusion of the + # ETag prevents a replay request for an updated version of the resource. (Note: + # including the IP address of the client in the nonce would appear to offer the + # server the ability to limit the reuse of the nonce to the same client that + # originally got it. However, that would break proxy farms, where requests from + # a single user often go through different proxies in the farm. Also, IP address + # spoofing is not that hard.) + # + # An implementation might choose not to accept a previously used nonce or a + # previously used digest, in order to protect against a replay attack. Or, an + # implementation might choose to use one-time nonces or digests for POST, PUT, + # or PATCH requests, and a time-stamp for GET requests. For more details on the + # issues involved see Section 4 of this document. + # + # The nonce is opaque to the client. Composed of Time, and hash of Time with + # secret key from the Rails session secret generated upon creation of project. + # Ensures the time cannot be modified by client. + # + # source://actionpack/lib/action_controller/metal/http_authentication.rb#330 def nonce(secret_key, time = T.unsafe(nil)); end # Opaque based on digest of secret key # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#340 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#348 def opaque(secret_key); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#283 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#288 def secret_token(request); end - # Returns false unless the request credentials response value matches the expected value. - # First try the password as a ha1 digest password. If this fails, then try it as a plain - # text password. + # Returns false unless the request credentials response value matches the + # expected value. First try the password as a ha1 digest password. If this + # fails, then try it as a plain text password. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#218 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#222 def validate_digest_response(request, realm, &password_procedure); end - # Might want a shorter timeout depending on whether the request - # is a PATCH, PUT, or POST, and if the client is a browser or web service. - # Can be much shorter if the Stale directive is implemented. This would - # allow a user to use new nonce without prompting the user again for their - # username and password. + # Might want a shorter timeout depending on whether the request is a PATCH, PUT, + # or POST, and if the client is a browser or web service. Can be much shorter if + # the Stale directive is implemented. This would allow a user to use new nonce + # without prompting the user again for their username and password. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#333 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#341 def validate_nonce(secret_key, request, value, seconds_to_timeout = T.unsafe(nil)); end end -# source://actionpack/lib/action_controller/metal/http_authentication.rb#188 +# source://actionpack/lib/action_controller/metal/http_authentication.rb#192 module ActionController::HttpAuthentication::Digest::ControllerMethods - # Authenticate using an HTTP \Digest, or otherwise render an HTTP header - # requesting the client to send a \Digest. + # Authenticate using an HTTP Digest, or otherwise render an HTTP header + # requesting the client to send a Digest. # # See ActionController::HttpAuthentication::Digest for example usage. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#193 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#197 def authenticate_or_request_with_http_digest(realm = T.unsafe(nil), message = T.unsafe(nil), &password_procedure); end - # Authenticate using an HTTP \Digest. Returns true if authentication is + # Authenticate using an HTTP Digest. Returns true if authentication is # successful, false otherwise. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#199 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#203 def authenticate_with_http_digest(realm = T.unsafe(nil), &password_procedure); end - # Render an HTTP header requesting the client to send a \Digest for + # Render an HTTP header requesting the client to send a Digest for # authentication. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#205 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#209 def request_http_digest_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end end -# = HTTP \Token authentication -# -# === Simple \Token example +# # HTTP Token authentication # -# class PostsController < ApplicationController -# TOKEN = "secret" +# ### Simple Token example # -# before_action :authenticate, except: [ :index ] +# class PostsController < ApplicationController +# TOKEN = "secret" # -# def index -# render plain: "Everyone can see me!" -# end +# before_action :authenticate, except: [ :index ] # -# def edit -# render plain: "I'm only accessible if you know the password" -# end +# def index +# render plain: "Everyone can see me!" +# end # -# private -# def authenticate -# authenticate_or_request_with_http_token do |token, options| -# # Compare the tokens in a time-constant manner, to mitigate -# # timing attacks. -# ActiveSupport::SecurityUtils.secure_compare(token, TOKEN) -# end +# def edit +# render plain: "I'm only accessible if you know the password" # end -# end # +# private +# def authenticate +# authenticate_or_request_with_http_token do |token, options| +# # Compare the tokens in a time-constant manner, to mitigate +# # timing attacks. +# ActiveSupport::SecurityUtils.secure_compare(token, TOKEN) +# end +# end +# end # -# Here is a more advanced Token example where only Atom feeds and the XML API are protected by HTTP token authentication. -# The regular HTML interface is protected by a session approach: +# Here is a more advanced Token example where only Atom feeds and the XML API +# are protected by HTTP token authentication. The regular HTML interface is +# protected by a session approach: # -# class ApplicationController < ActionController::Base -# before_action :set_account, :authenticate +# class ApplicationController < ActionController::Base +# before_action :set_account, :authenticate # -# private -# def set_account -# @account = Account.find_by(url_name: request.subdomains.first) -# end +# private +# def set_account +# @account = Account.find_by(url_name: request.subdomains.first) +# end # -# def authenticate -# case request.format -# when Mime[:xml], Mime[:atom] -# if user = authenticate_with_http_token { |t, o| @account.users.authenticate(t, o) } -# @current_user = user -# else -# request_http_token_authentication -# end -# else -# if session_authenticated? -# @current_user = @account.users.find(session[:authenticated][:user_id]) +# def authenticate +# case request.format +# when Mime[:xml], Mime[:atom] +# if user = authenticate_with_http_token { |t, o| @account.users.authenticate(t, o) } +# @current_user = user +# else +# request_http_token_authentication +# end # else -# redirect_to(login_url) and return false +# if session_authenticated? +# @current_user = @account.users.find(session[:authenticated][:user_id]) +# else +# redirect_to(login_url) and return false +# end # end # end -# end -# end -# +# end # # In your integration tests, you can do something like this: # -# def test_access_granted_from_xml -# authorization = ActionController::HttpAuthentication::Token.encode_credentials(users(:dhh).token) +# def test_access_granted_from_xml +# authorization = ActionController::HttpAuthentication::Token.encode_credentials(users(:dhh).token) # -# get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } -# -# assert_equal 200, status -# end +# get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } # +# assert_equal 200, status +# end # -# On shared hosts, Apache sometimes doesn't pass authentication headers to -# FCGI instances. If your environment matches this description and you cannot +# On shared hosts, Apache sometimes doesn't pass authentication headers to FCGI +# instances. If your environment matches this description and you cannot # authenticate, try this rule in your Apache setup: # -# RewriteRule ^(.*)$ dispatch.fcgi [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L] +# RewriteRule ^(.*)$ dispatch.fcgi [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L] # -# source://actionpack/lib/action_controller/metal/http_authentication.rb#419 +# source://actionpack/lib/action_controller/metal/http_authentication.rb#425 module ActionController::HttpAuthentication::Token extend ::ActionController::HttpAuthentication::Token - # If token Authorization header is present, call the login - # procedure with the present token and options. + # If token Authorization header is present, call the login procedure with the + # present token and options. # - # Returns the return value of +login_procedure+ if a - # token is found. Returns +nil+ if no token is found. + # Returns the return value of `login_procedure` if a token is found. Returns + # `nil` if no token is found. # - # ==== Parameters + # #### Parameters # - # * +controller+ - ActionController::Base instance for the current request. - # * +login_procedure+ - Proc to call if a token is present. The Proc - # should take two arguments: + # * `controller` - ActionController::Base instance for the current request. + # * `login_procedure` - Proc to call if a token is present. The Proc should + # take two arguments: # - # authenticate(controller) { |token, options| ... } + # authenticate(controller) { |token, options| ... } # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#466 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#472 def authenticate(controller, &login_procedure); end # Sets a WWW-Authenticate header to let the client know a token is desired. # # Returns nothing. # - # ==== Parameters + # #### Parameters # - # * +controller+ - ActionController::Base instance for the outgoing response. - # * +realm+ - String realm to use in the header. + # * `controller` - ActionController::Base instance for the outgoing response. + # * `realm` - String realm to use in the header. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#550 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#558 def authentication_request(controller, realm, message = T.unsafe(nil)); end # Encodes the given token and options into an Authorization header value. # # Returns String. # - # ==== Parameters + # #### Parameters # - # * +token+ - String token. - # * +options+ - Optional Hash of the options. + # * `token` - String token. + # * `options` - Optional Hash of the options. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#535 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#542 def encode_credentials(token, options = T.unsafe(nil)); end - # Takes +raw_params+ and turns it into an array of parameters. + # Takes `raw_params` and turns it into an array of parameters. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#501 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#507 def params_array_from(raw_params); end - # This method takes an authorization body and splits up the key-value - # pairs by the standardized :, ;, or \t - # delimiters defined in +AUTHN_PAIR_DELIMITERS+. + # This method takes an authorization body and splits up the key-value pairs by + # the standardized `:`, `;`, or `\t` delimiters defined in + # `AUTHN_PAIR_DELIMITERS`. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#516 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#522 def raw_params(auth); end - # This removes the " characters wrapping the value. + # This removes the `"` characters wrapping the value. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#506 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#512 def rewrite_param_values(array_params); end - # Parses the token and options out of the token Authorization header. - # The value for the Authorization header is expected to have the prefix - # "Token" or "Bearer". If the header looks like this: + # Parses the token and options out of the token Authorization header. The value + # for the Authorization header is expected to have the prefix `"Token"` or + # `"Bearer"`. If the header looks like this: # - # Authorization: Token token="abc", nonce="def" + # Authorization: Token token="abc", nonce="def" # - # Then the returned token is "abc", and the options are - # {nonce: "def"}. + # Then the returned token is `"abc"`, and the options are `{nonce: "def"}`. # - # Returns an +Array+ of [String, Hash] if a token is present. - # Returns +nil+ if no token is found. + # Returns an `Array` of `[String, Hash]` if a token is present. Returns `nil` if + # no token is found. # - # ==== Parameters + # #### Parameters # - # * +request+ - ActionDispatch::Request instance with the current headers. + # * `request` - ActionDispatch::Request instance with the current headers. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#488 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#494 def token_and_options(request); end - # source://actionpack/lib/action_controller/metal/http_authentication.rb#496 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#502 def token_params_from(auth); end end -# source://actionpack/lib/action_controller/metal/http_authentication.rb#422 +# source://actionpack/lib/action_controller/metal/http_authentication.rb#428 ActionController::HttpAuthentication::Token::AUTHN_PAIR_DELIMITERS = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_controller/metal/http_authentication.rb#425 +# source://actionpack/lib/action_controller/metal/http_authentication.rb#431 module ActionController::HttpAuthentication::Token::ControllerMethods - # Authenticate using an HTTP Bearer token, or otherwise render an HTTP - # header requesting the client to send a Bearer token. For the authentication - # to be considered successful, +login_procedure+ should return a non-nil - # value. Typically, the authenticated user is returned. + # Authenticate using an HTTP Bearer token, or otherwise render an HTTP header + # requesting the client to send a Bearer token. For the authentication to be + # considered successful, `login_procedure` must not return a false value. + # Typically, the authenticated user is returned. # # See ActionController::HttpAuthentication::Token for example usage. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#432 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#438 def authenticate_or_request_with_http_token(realm = T.unsafe(nil), message = T.unsafe(nil), &login_procedure); end - # Authenticate using an HTTP Bearer token. - # Returns the return value of +login_procedure+ if a - # token is found. Returns +nil+ if no token is found. + # Authenticate using an HTTP Bearer token. Returns the return value of + # `login_procedure` if a token is found. Returns `nil` if no token is found. # # See ActionController::HttpAuthentication::Token for example usage. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#441 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#446 def authenticate_with_http_token(&login_procedure); end # Render an HTTP header requesting the client to send a Bearer token for # authentication. # - # source://actionpack/lib/action_controller/metal/http_authentication.rb#447 + # source://actionpack/lib/action_controller/metal/http_authentication.rb#452 def request_http_token_authentication(realm = T.unsafe(nil), message = T.unsafe(nil)); end end -# source://actionpack/lib/action_controller/metal/http_authentication.rb#420 +# source://actionpack/lib/action_controller/metal/http_authentication.rb#426 ActionController::HttpAuthentication::Token::TOKEN_KEY = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_controller/metal/http_authentication.rb#421 +# source://actionpack/lib/action_controller/metal/http_authentication.rb#427 ActionController::HttpAuthentication::Token::TOKEN_REGEX = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_controller/metal/http_authentication.rb#510 +# source://actionpack/lib/action_controller/metal/http_authentication.rb#516 ActionController::HttpAuthentication::Token::WHITESPACED_AUTHN_PAIR_DELIMITERS = T.let(T.unsafe(nil), Regexp) -# = Action Controller Implicit Render +# # Action Controller Implicit Render # -# Handles implicit rendering for a controller action that does not -# explicitly respond with +render+, +respond_to+, +redirect+, or +head+. +# Handles implicit rendering for a controller action that does not explicitly +# respond with `render`, `respond_to`, `redirect`, or `head`. # -# For API controllers, the implicit response is always 204 No Content. +# For API controllers, the implicit response is always `204 No Content`. # -# For all other controllers, we use these heuristics to decide whether to -# render a template, raise an error for a missing template, or respond with -# 204 No Content: +# For all other controllers, we use these heuristics to decide whether to render +# a template, raise an error for a missing template, or respond with `204 No +# Content`: # -# First, if we DO find a template, it's rendered. Template lookup accounts -# for the action name, locales, format, variant, template handlers, and more -# (see +render+ for details). +# First, if we DO find a template, it's rendered. Template lookup accounts for +# the action name, locales, format, variant, template handlers, and more (see +# `render` for details). # # Second, if we DON'T find a template but the controller action does have -# templates for other formats, variants, etc., then we trust that you meant -# to provide a template for this response, too, and we raise +# templates for other formats, variants, etc., then we trust that you meant to +# provide a template for this response, too, and we raise # ActionController::UnknownFormat with an explanation. # # Third, if we DON'T find a template AND the request is a page load in a web -# browser (technically, a non-XHR GET request for an HTML response) where -# you reasonably expect to have rendered a template, then we raise +# browser (technically, a non-XHR GET request for an HTML response) where you +# reasonably expect to have rendered a template, then we raise # ActionController::MissingExactTemplate with an explanation. # # Finally, if we DON'T find a template AND the request isn't a browser page -# load, then we implicitly respond with 204 No Content. +# load, then we implicitly respond with `204 No Content`. # -# source://actionpack/lib/action_controller/metal/implicit_render.rb#31 +# source://actionpack/lib/action_controller/metal/implicit_render.rb#33 module ActionController::ImplicitRender include ::ActionController::BasicImplicitRender - # source://actionpack/lib/action_controller/metal/implicit_render.rb#35 + # source://actionpack/lib/action_controller/metal/implicit_render.rb#37 def default_render; end - # source://actionpack/lib/action_controller/metal/implicit_render.rb#54 + # source://actionpack/lib/action_controller/metal/implicit_render.rb#56 def method_for_action(action_name); end private # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/implicit_render.rb#61 + # source://actionpack/lib/action_controller/metal/implicit_render.rb#63 def interactive_browser_request?; end end -# = Action Controller \Instrumentation +# # Action Controller Instrumentation # -# Adds instrumentation to several ends in ActionController::Base. It also provides -# some hooks related with process_action. This allows an ORM like Active Record -# and/or DataMapper to plug in ActionController and show related information. +# Adds instrumentation to several ends in ActionController::Base. It also +# provides some hooks related with process_action. This allows an ORM like +# Active Record and/or DataMapper to plug in ActionController and show related +# information. # # Check ActiveRecord::Railties::ControllerRuntime for an example. # -# source://actionpack/lib/action_controller/metal/instrumentation.rb#14 +# source://actionpack/lib/action_controller/metal/instrumentation.rb#16 module ActionController::Instrumentation extend ::ActiveSupport::Concern include ::ActiveSupport::Benchmarkable @@ -3853,19 +4095,19 @@ module ActionController::Instrumentation mixes_in_class_methods ::ActionController::Instrumentation::ClassMethods - # source://actionpack/lib/action_controller/metal/instrumentation.rb#21 + # source://actionpack/lib/action_controller/metal/instrumentation.rb#23 def initialize(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal/instrumentation.rb#47 + # source://actionpack/lib/action_controller/metal/instrumentation.rb#49 def redirect_to(*_arg0); end - # source://actionpack/lib/action_controller/metal/instrumentation.rb#26 + # source://actionpack/lib/action_controller/metal/instrumentation.rb#28 def render(*_arg0); end - # source://actionpack/lib/action_controller/metal/instrumentation.rb#41 + # source://actionpack/lib/action_controller/metal/instrumentation.rb#43 def send_data(data, options = T.unsafe(nil)); end - # source://actionpack/lib/action_controller/metal/instrumentation.rb#34 + # source://actionpack/lib/action_controller/metal/instrumentation.rb#36 def send_file(path, options = T.unsafe(nil)); end def view_runtime; end @@ -3873,464 +4115,486 @@ module ActionController::Instrumentation private - # Every time after an action is processed, this method is invoked - # with the payload, so you can add more information. + # Every time after an action is processed, this method is invoked with the + # payload, so you can add more information. # - # source://actionpack/lib/action_controller/metal/instrumentation.rb#103 + # source://actionpack/lib/action_controller/metal/instrumentation.rb#105 def append_info_to_payload(payload); end # A hook which allows you to clean up any time, wrongly taken into account in # views, like database querying time. # - # def cleanup_view_runtime - # super - time_taken_in_something_expensive - # end + # def cleanup_view_runtime + # super - time_taken_in_something_expensive + # end # - # source://actionpack/lib/action_controller/metal/instrumentation.rb#97 + # source://actionpack/lib/action_controller/metal/instrumentation.rb#99 def cleanup_view_runtime; end # A hook invoked every time a before callback is halted. # - # source://actionpack/lib/action_controller/metal/instrumentation.rb#87 + # source://actionpack/lib/action_controller/metal/instrumentation.rb#89 def halted_callback_hook(filter, _); end - # source://actionpack/lib/action_controller/metal/instrumentation.rb#57 + # source://actionpack/lib/action_controller/metal/instrumentation.rb#59 def process_action(*_arg0); end end -# source://actionpack/lib/action_controller/metal/instrumentation.rb#107 +# source://actionpack/lib/action_controller/metal/instrumentation.rb#109 module ActionController::Instrumentation::ClassMethods - # A hook which allows other frameworks to log what happened during - # controller process action. This method should return an array - # with the messages to be added. + # A hook which allows other frameworks to log what happened during controller + # process action. This method should return an array with the messages to be + # added. # - # source://actionpack/lib/action_controller/metal/instrumentation.rb#111 + # source://actionpack/lib/action_controller/metal/instrumentation.rb#113 def log_process_action(payload); end end -# source://actionpack/lib/action_controller/metal/request_forgery_protection.rb#8 +# source://actionpack/lib/action_controller/metal/request_forgery_protection.rb#10 class ActionController::InvalidAuthenticityToken < ::ActionController::ActionControllerError; end -# source://actionpack/lib/action_controller/metal/request_forgery_protection.rb#11 +# source://actionpack/lib/action_controller/metal/request_forgery_protection.rb#13 class ActionController::InvalidCrossOriginRequest < ::ActionController::ActionControllerError; end # Raised when initializing Parameters with keys that aren't strings or symbols. # -# ActionController::Parameters.new(123 => 456) -# # => ActionController::InvalidParameterKey: all keys must be Strings or Symbols, got: Integer +# ActionController::Parameters.new(123 => 456) +# # => ActionController::InvalidParameterKey: all keys must be Strings or Symbols, got: Integer # -# source://actionpack/lib/action_controller/metal/strong_parameters.rb#72 +# source://actionpack/lib/action_controller/metal/strong_parameters.rb#85 class ActionController::InvalidParameterKey < ::ArgumentError; end -# = Action Controller \Live +# # Action Controller Live # -# Mix this module into your controller, and all actions in that controller -# will be able to stream data to the client as it's written. +# Mix this module into your controller, and all actions in that controller will +# be able to stream data to the client as it's written. # -# class MyController < ActionController::Base -# include ActionController::Live +# class MyController < ActionController::Base +# include ActionController::Live # -# def stream -# response.headers['Content-Type'] = 'text/event-stream' -# 100.times { -# response.stream.write "hello world\n" -# sleep 1 -# } -# ensure -# response.stream.close +# def stream +# response.headers['Content-Type'] = 'text/event-stream' +# 100.times { +# response.stream.write "hello world\n" +# sleep 1 +# } +# ensure +# response.stream.close +# end # end -# end # -# There are a few caveats with this module. You *cannot* write headers after the -# response has been committed (Response#committed? will return truthy). -# Calling +write+ or +close+ on the response stream will cause the response -# object to be committed. Make sure all headers are set before calling write -# or close on your stream. +# There are a few caveats with this module. You **cannot** write headers after +# the response has been committed (Response#committed? will return truthy). +# Calling `write` or `close` on the response stream will cause the response +# object to be committed. Make sure all headers are set before calling write or +# close on your stream. # -# You *must* call close on your stream when you're finished, otherwise the +# You **must** call close on your stream when you're finished, otherwise the # socket may be left open forever. # # The final caveat is that your actions are executed in a separate thread than -# the main thread. Make sure your actions are thread safe, and this shouldn't -# be a problem (don't share state across threads, etc). +# the main thread. Make sure your actions are thread safe, and this shouldn't be +# a problem (don't share state across threads, etc). # -# Note that \Rails includes +Rack::ETag+ by default, which will buffer your +# Note that Rails includes `Rack::ETag` by default, which will buffer your # response. As a result, streaming responses may not work properly with Rack -# 2.2.x, and you may need to implement workarounds in your application. -# You can either set the +ETag+ or +Last-Modified+ response headers or remove -# +Rack::ETag+ from the middleware stack to address this issue. +# 2.2.x, and you may need to implement workarounds in your application. You can +# either set the `ETag` or `Last-Modified` response headers or remove +# `Rack::ETag` from the middleware stack to address this issue. # -# Here's an example of how you can set the +Last-Modified+ header if your Rack +# Here's an example of how you can set the `Last-Modified` header if your Rack # version is 2.2.x: # -# def stream -# response.headers["Content-Type"] = "text/event-stream" -# response.headers["Last-Modified"] = Time.now.httpdate # Add this line if your Rack version is 2.2.x -# ... -# end +# def stream +# response.headers["Content-Type"] = "text/event-stream" +# response.headers["Last-Modified"] = Time.now.httpdate # Add this line if your Rack version is 2.2.x +# ... +# end # -# source://actionpack/lib/action_controller/metal/live.rb#54 +# source://actionpack/lib/action_controller/metal/live.rb#56 module ActionController::Live extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionController::Live::ClassMethods - # source://actionpack/lib/action_controller/test_case.rb#24 + # source://actionpack/lib/action_controller/test_case.rb#28 def new_controller_thread; end - # source://actionpack/lib/action_controller/metal/live.rb#273 + # source://actionpack/lib/action_controller/metal/live.rb#276 def process(name); end - # source://actionpack/lib/action_controller/metal/live.rb#319 + # source://actionpack/lib/action_controller/metal/live.rb#326 def response_body=(body); end - # Sends a stream to the browser, which is helpful when you're generating exports or other running data where you - # don't want the entire file buffered in memory first. Similar to send_data, but where the data is generated live. + # Sends a stream to the browser, which is helpful when you're generating exports + # or other running data where you don't want the entire file buffered in memory + # first. Similar to send_data, but where the data is generated live. # # Options: - # * :filename - suggests a filename for the browser to use. - # * :type - specifies an HTTP content type. - # You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. - # If omitted, type will be inferred from the file extension specified in :filename. - # If no content type is registered for the extension, the default type 'application/octet-stream' will be used. - # * :disposition - specifies whether the file will be shown inline or downloaded. - # Valid values are 'inline' and 'attachment' (default). + # * `:filename` - suggests a filename for the browser to use. + # * `:type` - specifies an HTTP content type. You can specify either a string + # or a symbol for a registered type with `Mime::Type.register`, for example + # :json. If omitted, type will be inferred from the file extension specified + # in `:filename`. If no content type is registered for the extension, the + # default type 'application/octet-stream' will be used. + # * `:disposition` - specifies whether the file will be shown inline or + # downloaded. Valid values are 'inline' and 'attachment' (default). + # # # Example of generating a csv export: # - # send_stream(filename: "subscribers.csv") do |stream| - # stream.write "email_address,updated_at\n" + # send_stream(filename: "subscribers.csv") do |stream| + # stream.write "email_address,updated_at\n" # - # @subscribers.find_each do |subscriber| - # stream.write "#{subscriber.email_address},#{subscriber.updated_at}\n" - # end - # end + # @subscribers.find_each do |subscriber| + # stream.write "#{subscriber.email_address},#{subscriber.updated_at}\n" + # end + # end # - # source://actionpack/lib/action_controller/metal/live.rb#345 + # source://actionpack/lib/action_controller/metal/live.rb#355 def send_stream(filename:, disposition: T.unsafe(nil), type: T.unsafe(nil)); end private - # source://actionpack/lib/action_controller/metal/live.rb#372 + # source://actionpack/lib/action_controller/metal/live.rb#389 def log_error(exception); end + + # Spawn a new thread to serve up the controller in. This is to get around the + # fact that Rack isn't based around IOs and we need to use a thread to stream + # data from the response bodies. Nobody should call this method except in Rails + # internals. Seriously! + # Disable controller / rendering threads in tests. User tests can access the + # database on the main thread, so they could open a txn, then the controller + # thread will open a new connection and try to access data that's only visible + # to the main thread's txn. This is the problem in #23483. + # + # source://actionpack/lib/action_controller/metal/live.rb#377 + def original_new_controller_thread; end + + class << self + # source://actionpack/lib/action_controller/metal/live.rb#385 + def live_thread_pool_executor; end + end end -# source://actionpack/lib/action_controller/metal/live.rb#146 +# source://actionpack/lib/action_controller/metal/live.rb#151 class ActionController::Live::Buffer < ::ActionDispatch::Response::Buffer include ::MonitorMixin # @return [Buffer] a new instance of Buffer # - # source://actionpack/lib/action_controller/metal/live.rb#162 + # source://actionpack/lib/action_controller/metal/live.rb#166 def initialize(response); end - # Inform the producer/writing thread that the client has - # disconnected; the reading thread is no longer interested in - # anything that's being written. + # Inform the producer/writing thread that the client has disconnected; the + # reading thread is no longer interested in anything that's being written. # # See also #close. # - # source://actionpack/lib/action_controller/metal/live.rb#217 + # source://actionpack/lib/action_controller/metal/live.rb#220 def abort; end - # source://actionpack/lib/action_controller/metal/live.rb#236 + # source://actionpack/lib/action_controller/metal/live.rb#239 def call_on_error; end - # Write a 'close' event to the buffer; the producer/writing thread - # uses this to notify us that it's finished supplying content. + # Write a 'close' event to the buffer; the producer/writing thread uses this to + # notify us that it's finished supplying content. # # See also #abort. # - # source://actionpack/lib/action_controller/metal/live.rb#204 + # source://actionpack/lib/action_controller/metal/live.rb#208 def close; end # Is the client still connected and waiting for content? # - # The result of calling `write` when this is `false` is determined - # by `ignore_disconnect`. + # The result of calling `write` when this is `false` is determined by + # `ignore_disconnect`. # # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/live.rb#228 + # source://actionpack/lib/action_controller/metal/live.rb#231 def connected?; end # Ignore that the client has disconnected. # - # If this value is `true`, calling `write` after the client - # disconnects will result in the written content being silently - # discarded. If this value is `false` (the default), a - # ClientDisconnected exception will be raised. + # If this value is `true`, calling `write` after the client disconnects will + # result in the written content being silently discarded. If this value is + # `false` (the default), a ClientDisconnected exception will be raised. # - # source://actionpack/lib/action_controller/metal/live.rb#160 + # source://actionpack/lib/action_controller/metal/live.rb#164 def ignore_disconnect; end # Ignore that the client has disconnected. # - # If this value is `true`, calling `write` after the client - # disconnects will result in the written content being silently - # discarded. If this value is `false` (the default), a - # ClientDisconnected exception will be raised. + # If this value is `true`, calling `write` after the client disconnects will + # result in the written content being silently discarded. If this value is + # `false` (the default), a ClientDisconnected exception will be raised. # - # source://actionpack/lib/action_controller/metal/live.rb#160 + # source://actionpack/lib/action_controller/metal/live.rb#164 def ignore_disconnect=(_arg0); end - # source://actionpack/lib/action_controller/metal/live.rb#232 + # source://actionpack/lib/action_controller/metal/live.rb#235 def on_error(&block); end - # source://actionpack/lib/action_controller/metal/live.rb#175 + # source://actionpack/lib/action_controller/metal/live.rb#180 def write(string); end - # Same as +write+ but automatically include a newline at the end of the string. + # Same as `write` but automatically include a newline at the end of the string. # - # source://actionpack/lib/action_controller/metal/live.rb#196 + # source://actionpack/lib/action_controller/metal/live.rb#200 def writeln(string); end private - # source://actionpack/lib/action_controller/metal/live.rb#252 + # source://actionpack/lib/action_controller/metal/live.rb#255 def build_queue(queue_size); end - # source://actionpack/lib/action_controller/metal/live.rb#241 + # source://actionpack/lib/action_controller/metal/live.rb#244 def each_chunk(&block); end class << self # Returns the value of attribute queue_size. # - # source://actionpack/lib/action_controller/metal/live.rb#150 + # source://actionpack/lib/action_controller/metal/live.rb#155 def queue_size; end # Sets the attribute queue_size # # @param value the value to set the attribute queue_size to. # - # source://actionpack/lib/action_controller/metal/live.rb#150 + # source://actionpack/lib/action_controller/metal/live.rb#155 def queue_size=(_arg0); end end end -# source://actionpack/lib/action_controller/metal/live.rb#57 +# source://actionpack/lib/action_controller/metal/live.rb#59 module ActionController::Live::ClassMethods - # source://actionpack/lib/action_controller/metal/live.rb#58 + # source://actionpack/lib/action_controller/metal/live.rb#60 def make_response!(request); end end -# source://actionpack/lib/action_controller/metal/live.rb#143 +# source://actionpack/lib/action_controller/metal/live.rb#148 class ActionController::Live::ClientDisconnected < ::RuntimeError; end -# source://actionpack/lib/action_controller/metal/live.rb#257 +# source://actionpack/lib/action_controller/metal/live.rb#260 class ActionController::Live::Response < ::ActionDispatch::Response private - # source://actionpack/lib/action_controller/metal/live.rb#259 + # source://actionpack/lib/action_controller/metal/live.rb#262 def before_committed; end - # source://actionpack/lib/action_controller/metal/live.rb#266 + # source://actionpack/lib/action_controller/metal/live.rb#269 def build_buffer(response, body); end end -# = Action Controller \Live Server Sent Events +# # Action Controller Live Server Sent Events # -# This class provides the ability to write an SSE (Server Sent Event) -# to an IO stream. The class is initialized with a stream and can be used -# to either write a JSON string or an object which can be converted to JSON. +# This class provides the ability to write an SSE (Server Sent Event) to an IO +# stream. The class is initialized with a stream and can be used to either write +# a JSON string or an object which can be converted to JSON. # # Writing an object will convert it into standard SSE format with whatever # options you have configured. You may choose to set the following options: # -# 1) Event. If specified, an event with this name will be dispatched on -# the browser. -# 2) Retry. The reconnection time in milliseconds used when attempting -# to send the event. -# 3) Id. If the connection dies while sending an SSE to the browser, then -# the server will receive a +Last-Event-ID+ header with value equal to +id+. +# `:event` +# : If specified, an event with this name will be dispatched on the browser. # -# After setting an option in the constructor of the SSE object, all future -# SSEs sent across the stream will use those options unless overridden. +# `:retry` +# : The reconnection time in milliseconds used when attempting to send the event. +# +# `:id` +# : If the connection dies while sending an SSE to the browser, then the +# server will receive a `Last-Event-ID` header with value equal to `id`. +# +# After setting an option in the constructor of the SSE object, all future SSEs +# sent across the stream will use those options unless overridden. # # Example Usage: # -# class MyController < ActionController::Base -# include ActionController::Live -# -# def index -# response.headers['Content-Type'] = 'text/event-stream' -# sse = SSE.new(response.stream, retry: 300, event: "event-name") -# sse.write({ name: 'John'}) -# sse.write({ name: 'John'}, id: 10) -# sse.write({ name: 'John'}, id: 10, event: "other-event") -# sse.write({ name: 'John'}, id: 10, event: "other-event", retry: 500) -# ensure -# sse.close +# class MyController < ActionController::Base +# include ActionController::Live +# +# def index +# response.headers['Content-Type'] = 'text/event-stream' +# sse = SSE.new(response.stream, retry: 300, event: "event-name") +# sse.write({ name: 'John'}) +# sse.write({ name: 'John'}, id: 10) +# sse.write({ name: 'John'}, id: 10, event: "other-event") +# sse.write({ name: 'John'}, id: 10, event: "other-event", retry: 500) +# ensure +# sse.close +# end # end -# end # -# Note: SSEs are not currently supported by IE. However, they are supported -# by Chrome, Firefox, Opera, and Safari. +# Note: SSEs are not currently supported by IE. However, they are supported by +# Chrome, Firefox, Opera, and Safari. # -# source://actionpack/lib/action_controller/metal/live.rb#107 +# source://actionpack/lib/action_controller/metal/live.rb#112 class ActionController::Live::SSE # @return [SSE] a new instance of SSE # - # source://actionpack/lib/action_controller/metal/live.rb#110 + # source://actionpack/lib/action_controller/metal/live.rb#115 def initialize(stream, options = T.unsafe(nil)); end - # source://actionpack/lib/action_controller/metal/live.rb#115 + # source://actionpack/lib/action_controller/metal/live.rb#120 def close; end - # source://actionpack/lib/action_controller/metal/live.rb#119 + # source://actionpack/lib/action_controller/metal/live.rb#124 def write(object, options = T.unsafe(nil)); end private - # source://actionpack/lib/action_controller/metal/live.rb#129 + # source://actionpack/lib/action_controller/metal/live.rb#134 def perform_write(json, options); end end -# source://actionpack/lib/action_controller/metal/live.rb#108 +# source://actionpack/lib/action_controller/metal/live.rb#113 ActionController::Live::SSE::PERMITTED_OPTIONS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_controller/test_case.rb#172 +# source://actionpack/lib/action_controller/test_case.rb#176 class ActionController::LiveTestResponse < ::ActionController::Live::Response # Was there a server-side error? # - # source://rack/3.0.11lib/rack/response.rb#186 + # source://rack/3.1.7lib/rack/response.rb#187 def error?; end # Was the URL not found? # - # source://rack/3.0.11lib/rack/response.rb#196 + # source://rack/3.1.7lib/rack/response.rb#197 def missing?; end # Was the response successful? # - # source://rack/3.0.11lib/rack/response.rb#183 + # source://rack/3.1.7lib/rack/response.rb#184 def success?; end end -# source://actionpack/lib/action_controller/log_subscriber.rb#4 +# source://actionpack/lib/action_controller/log_subscriber.rb#6 class ActionController::LogSubscriber < ::ActiveSupport::LogSubscriber - # source://actionpack/lib/action_controller/log_subscriber.rb#78 + # source://actionpack/lib/action_controller/log_subscriber.rb#80 def exist_fragment?(event); end - # source://actionpack/lib/action_controller/log_subscriber.rb#78 + # source://actionpack/lib/action_controller/log_subscriber.rb#80 def expire_fragment(event); end - # source://actionpack/lib/action_controller/log_subscriber.rb#45 + # source://actionpack/lib/action_controller/log_subscriber.rb#47 def halted_callback(event); end - # source://actionpack/lib/action_controller/log_subscriber.rb#88 + # source://actionpack/lib/action_controller/log_subscriber.rb#90 def logger; end - # source://actionpack/lib/action_controller/log_subscriber.rb#24 + # source://actionpack/lib/action_controller/log_subscriber.rb#26 def process_action(event); end - # source://actionpack/lib/action_controller/log_subscriber.rb#78 + # source://actionpack/lib/action_controller/log_subscriber.rb#80 def read_fragment(event); end - # source://actionpack/lib/action_controller/log_subscriber.rb#55 + # source://actionpack/lib/action_controller/log_subscriber.rb#57 def redirect_to(event); end - # source://actionpack/lib/action_controller/log_subscriber.rb#60 + # source://actionpack/lib/action_controller/log_subscriber.rb#62 def send_data(event); end - # source://actionpack/lib/action_controller/log_subscriber.rb#50 + # source://actionpack/lib/action_controller/log_subscriber.rb#52 def send_file(event); end - # source://actionpack/lib/action_controller/log_subscriber.rb#7 + # source://actionpack/lib/action_controller/log_subscriber.rb#9 def start_processing(event); end - # source://actionpack/lib/action_controller/log_subscriber.rb#65 + # source://actionpack/lib/action_controller/log_subscriber.rb#67 def unpermitted_parameters(event); end - # source://actionpack/lib/action_controller/log_subscriber.rb#78 + # source://actionpack/lib/action_controller/log_subscriber.rb#80 def write_fragment(event); end class << self - # source://activesupport/7.1.3.3lib/active_support/log_subscriber.rb#87 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def log_levels; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end end end -# source://actionpack/lib/action_controller/log_subscriber.rb#5 +# source://actionpack/lib/action_controller/log_subscriber.rb#7 ActionController::LogSubscriber::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_controller/metal/logging.rb#4 +# source://actionpack/lib/action_controller/metal/logging.rb#6 module ActionController::Logging extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionController::Logging::ClassMethods end -# source://actionpack/lib/action_controller/metal/logging.rb#7 +# source://actionpack/lib/action_controller/metal/logging.rb#9 module ActionController::Logging::ClassMethods # Set a different log level per request. # - # # Use the debug log level if a particular cookie is set. - # class ApplicationController < ActionController::Base - # log_at :debug, if: -> { cookies[:debug] } - # end + # # Use the debug log level if a particular cookie is set. + # class ApplicationController < ActionController::Base + # log_at :debug, if: -> { cookies[:debug] } + # end # - # source://actionpack/lib/action_controller/metal/logging.rb#15 + # source://actionpack/lib/action_controller/metal/logging.rb#17 def log_at(level, **options); end end -# = Action Controller \Metal +# # Action Controller Metal # -# +ActionController::Metal+ is the simplest possible controller, providing a +# `ActionController::Metal` is the simplest possible controller, providing a # valid Rack interface without the additional niceties provided by # ActionController::Base. # # A sample metal controller might look like this: # -# class HelloController < ActionController::Metal -# def index -# self.response_body = "Hello World!" +# class HelloController < ActionController::Metal +# def index +# self.response_body = "Hello World!" +# end # end -# end # -# And then to route requests to your metal controller, you would add -# something like this to config/routes.rb: +# And then to route requests to your metal controller, you would add something +# like this to `config/routes.rb`: # -# get 'hello', to: HelloController.action(:index) +# get 'hello', to: HelloController.action(:index) # -# The +action+ method returns a valid Rack application for the \Rails -# router to dispatch to. +# The ::action method returns a valid Rack application for the Rails router to +# dispatch to. # -# == \Rendering \Helpers +# ## Rendering Helpers # -# +ActionController::Metal+ by default provides no utilities for rendering -# views, partials, or other responses aside from explicitly calling of -# response_body=, content_type=, and status=. To -# add the render helpers you're used to having in a normal controller, you -# can do the following: +# By default, `ActionController::Metal` provides no utilities for rendering +# views, partials, or other responses aside from some low-level setters such +# as #response_body=, #content_type=, and #status=. To add the render helpers +# you're used to having in a normal controller, you can do the following: # -# class HelloController < ActionController::Metal -# include AbstractController::Rendering -# include ActionView::Layouts -# append_view_path "#{Rails.root}/app/views" +# class HelloController < ActionController::Metal +# include AbstractController::Rendering +# include ActionView::Layouts +# append_view_path "#{Rails.root}/app/views" # -# def index -# render "hello/index" +# def index +# render "hello/index" +# end # end -# end # -# == Redirection \Helpers +# ## Redirection Helpers # # To add redirection helpers to your metal controller, do the following: # -# class HelloController < ActionController::Metal -# include ActionController::Redirecting -# include Rails.application.routes.url_helpers +# class HelloController < ActionController::Metal +# include ActionController::Redirecting +# include Rails.application.routes.url_helpers # -# def index -# redirect_to root_url +# def index +# redirect_to root_url +# end # end -# end # -# == Other \Helpers +# ## Other Helpers # -# You can refer to the modules included in ActionController::Base to see -# other features you can bring into your metal controller. +# You can refer to the modules included in ActionController::Base to see other +# features you can bring into your metal controller. # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # @@ -4340,13 +4604,17 @@ class ActionController::Metal < ::AbstractController::Base # @return [Metal] a new instance of Metal # - # source://actionpack/lib/action_controller/metal.rb#185 + # source://actionpack/lib/action_controller/metal.rb#210 def initialize; end - # source://actionpack/lib/action_controller/metal.rb#182 + # Delegates to ActionDispatch::Response#content_type + # + # source://actionpack/lib/action_controller/metal.rb#204 def content_type(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal.rb#182 + # Delegates to ActionDispatch::Response#content_type= + # + # source://actionpack/lib/action_controller/metal.rb#192 def content_type=(arg); end # Delegates to the class's ::controller_name. @@ -4354,7 +4622,7 @@ class ActionController::Metal < ::AbstractController::Base # source://actionpack/lib/action_controller/metal.rb#156 def controller_name; end - # source://actionpack/lib/action_controller/metal.rb#224 + # source://actionpack/lib/action_controller/metal.rb#249 def dispatch(name, request, response); end # Delegates to ActionDispatch::Response#headers. @@ -4362,118 +4630,131 @@ class ActionController::Metal < ::AbstractController::Base # source://actionpack/lib/action_controller/metal.rb#180 def headers(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal.rb#182 + # Delegates to ActionDispatch::Response#location + # + # source://actionpack/lib/action_controller/metal.rb#200 def location(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal.rb#182 + # Delegates to ActionDispatch::Response#location= + # + # source://actionpack/lib/action_controller/metal.rb#188 def location=(arg); end - # source://actionpack/lib/action_controller/metal.rb#182 + # Delegates to ActionDispatch::Response#media_type + # + # source://actionpack/lib/action_controller/metal.rb#208 def media_type(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal.rb#262 + # source://actionpack/lib/action_controller/metal.rb#288 def middleware_stack; end - # source://actionpack/lib/action_controller/metal.rb#262 + # source://actionpack/lib/action_controller/metal.rb#288 def middleware_stack=(_arg0); end - # source://actionpack/lib/action_controller/metal.rb#262 + # source://actionpack/lib/action_controller/metal.rb#288 def middleware_stack?; end - # source://actionpack/lib/action_controller/metal.rb#194 + # source://actionpack/lib/action_controller/metal.rb#219 def params; end - # source://actionpack/lib/action_controller/metal.rb#198 + # source://actionpack/lib/action_controller/metal.rb#223 def params=(val); end # Tests if render or redirect has already happened. # # @return [Boolean] # - # source://actionpack/lib/action_controller/metal.rb#220 + # source://actionpack/lib/action_controller/metal.rb#245 def performed?; end # :attr_reader: request # # The ActionDispatch::Request instance for the current request. # - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def request; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def request=(_arg0); end - # source://actionpack/lib/action_controller/metal.rb#258 + # source://actionpack/lib/action_controller/metal.rb#284 def reset_session; end # :attr_reader: response # # The ActionDispatch::Response instance for the current response. # - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def response; end - # Assign the response and mark it as committed. No further processing will occur. + # Assign the response and mark it as committed. No further processing will + # occur. # - # source://actionpack/lib/action_controller/metal.rb#242 + # source://actionpack/lib/action_controller/metal.rb#268 def response=(response); end - # source://actionpack/lib/action_controller/metal.rb#209 + # source://actionpack/lib/action_controller/metal.rb#234 def response_body=(body); end - # source://actionpack/lib/action_controller/metal.rb#182 + # Delegates to ActionDispatch::Response#status + # + # source://actionpack/lib/action_controller/metal.rb#196 def response_code(*_arg0, **_arg1, &_arg2); end # The ActionDispatch::Request::Session instance for the current request. # See further details in the - # {Active Controller Session guide}[https://guides.rubyonrails.org/action_controller_overview.html#session]. + # [Active Controller Session guide](https://guides.rubyonrails.org/action_controller_overview.html#session). # # source://actionpack/lib/action_controller/metal.rb#176 def session(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal.rb#249 + # source://actionpack/lib/action_controller/metal.rb#275 def set_request!(request); end - # source://actionpack/lib/action_controller/metal.rb#232 + # source://actionpack/lib/action_controller/metal.rb#257 def set_response!(response); end - # source://actionpack/lib/action_controller/metal.rb#182 + # Delegates to ActionDispatch::Response#status + # + # source://actionpack/lib/action_controller/metal.rb#196 def status(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal.rb#182 + # Delegates to ActionDispatch::Response#status= + # + # source://actionpack/lib/action_controller/metal.rb#184 def status=(arg); end - # source://actionpack/lib/action_controller/metal.rb#254 + # source://actionpack/lib/action_controller/metal.rb#280 def to_a; end - # Basic \url_for that can be overridden for more robust functionality. + # Basic `url_for` that can be overridden for more robust functionality. # - # source://actionpack/lib/action_controller/metal.rb#205 + # source://actionpack/lib/action_controller/metal.rb#230 def url_for(string); end class << self # Returns a Rack endpoint for the given action name. # - # source://actionpack/lib/action_controller/metal.rb#289 + # source://actionpack/lib/action_controller/metal.rb#315 def action(name); end # source://actionpack/lib/action_controller/metal.rb#140 def action_encoding_template(action); end - # Returns the last part of the controller's name, underscored, without the ending - # Controller. For instance, +PostsController+ returns posts. - # Namespaces are left out, so +Admin::PostsController+ returns posts as well. + # Returns the last part of the controller's name, underscored, without the + # ending `Controller`. For instance, `PostsController` returns `posts`. + # Namespaces are left out, so `Admin::PostsController` returns `posts` as well. # - # ==== Returns - # * string + # #### Returns + # * `string` # # source://actionpack/lib/action_controller/metal.rb#130 def controller_name; end - # Direct dispatch to the controller. Instantiates the controller, then - # executes the action named +name+. + # Direct dispatch to the controller. Instantiates the controller, then executes + # the action named `name`. # - # source://actionpack/lib/action_controller/metal.rb#305 + # source://actionpack/lib/action_controller/metal.rb#331 def dispatch(name, req, res); end # source://actionpack/lib/action_controller/metal.rb#134 @@ -4481,33 +4762,33 @@ class ActionController::Metal < ::AbstractController::Base # The middleware stack used by this controller. # - # By default uses a variation of ActionDispatch::MiddlewareStack which - # allows for the following syntax: + # By default uses a variation of ActionDispatch::MiddlewareStack which allows + # for the following syntax: # - # class PostsController < ApplicationController - # use AuthenticationMiddleware, except: [:index, :show] - # end + # class PostsController < ApplicationController + # use AuthenticationMiddleware, except: [:index, :show] + # end # - # Read more about {Rails middleware - # stack}[https://guides.rubyonrails.org/rails_on_rack.html#action-dispatcher-middleware-stack] + # Read more about [Rails middleware stack] + # (https://guides.rubyonrails.org/rails_on_rack.html#action-dispatcher-middleware-stack) # in the guides. # - # source://actionpack/lib/action_controller/metal.rb#284 + # source://actionpack/lib/action_controller/metal.rb#310 def middleware; end - # source://actionpack/lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end - # source://actionpack/lib/action_controller/metal.rb#262 - def middleware_stack=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end - # source://actionpack/lib/action_controller/metal.rb#262 + # source://actionpack/lib/action_controller/metal.rb#288 def middleware_stack?; end # Pushes the given Rack middleware and its arguments to the bottom of the # middleware stack. # - # source://actionpack/lib/action_controller/metal.rb#267 + # source://actionpack/lib/action_controller/metal.rb#293 def use(*_arg0, **_arg1, &_arg2); end private @@ -4519,1482 +4800,1675 @@ class ActionController::Metal < ::AbstractController::Base end end -# source://actionpack/lib/action_controller/metal/exceptions.rb#50 +# source://actionpack/lib/action_controller/metal/exceptions.rb#52 class ActionController::MethodNotAllowed < ::ActionController::ActionControllerError # @return [MethodNotAllowed] a new instance of MethodNotAllowed # - # source://actionpack/lib/action_controller/metal/exceptions.rb#51 + # source://actionpack/lib/action_controller/metal/exceptions.rb#53 def initialize(*allowed_methods); end end -# = Action Controller \MiddlewareStack +# # Action Controller MiddlewareStack # -# Extend ActionDispatch middleware stack to make it aware of options -# allowing the following syntax in controllers: +# Extend ActionDispatch middleware stack to make it aware of options allowing +# the following syntax in controllers: # -# class PostsController < ApplicationController -# use AuthenticationMiddleware, except: [:index, :show] -# end +# class PostsController < ApplicationController +# use AuthenticationMiddleware, except: [:index, :show] +# end # -# source://actionpack/lib/action_controller/metal.rb#16 +# source://actionpack/lib/action_controller/metal.rb#18 class ActionController::MiddlewareStack < ::ActionDispatch::MiddlewareStack - # source://actionpack/lib/action_controller/metal.rb#29 + # source://actionpack/lib/action_controller/metal.rb#31 def build(action, app = T.unsafe(nil), &block); end private - # source://actionpack/lib/action_controller/metal.rb#42 + # source://actionpack/lib/action_controller/metal.rb#44 def build_middleware(klass, args, block); end end -# source://actionpack/lib/action_controller/metal.rb#39 +# source://actionpack/lib/action_controller/metal.rb#41 ActionController::MiddlewareStack::EXCLUDE = T.let(T.unsafe(nil), Proc) -# source://actionpack/lib/action_controller/metal.rb#38 +# source://actionpack/lib/action_controller/metal.rb#40 ActionController::MiddlewareStack::INCLUDE = T.let(T.unsafe(nil), Proc) -# source://actionpack/lib/action_controller/metal.rb#17 +# source://actionpack/lib/action_controller/metal.rb#19 class ActionController::MiddlewareStack::Middleware < ::ActionDispatch::MiddlewareStack::Middleware # @return [Middleware] a new instance of Middleware # - # source://actionpack/lib/action_controller/metal.rb#18 + # source://actionpack/lib/action_controller/metal.rb#20 def initialize(klass, args, actions, strategy, block); end # @return [Boolean] # - # source://actionpack/lib/action_controller/metal.rb#24 + # source://actionpack/lib/action_controller/metal.rb#26 def valid?(action); end end -# source://actionpack/lib/action_controller/metal.rb#40 +# source://actionpack/lib/action_controller/metal.rb#42 ActionController::MiddlewareStack::NULL = T.let(T.unsafe(nil), Proc) -# source://actionpack/lib/action_controller/metal/mime_responds.rb#6 +# source://actionpack/lib/action_controller/metal/mime_responds.rb#8 module ActionController::MimeResponds - # Without web-service support, an action which collects the data for displaying a list of people - # might look something like this: + # Without web-service support, an action which collects the data for displaying + # a list of people might look something like this: # - # def index - # @people = Person.all - # end + # def index + # @people = Person.all + # end # - # That action implicitly responds to all formats, but formats can also be explicitly enumerated: + # That action implicitly responds to all formats, but formats can also be + # explicitly enumerated: # - # def index - # @people = Person.all - # respond_to :html, :js - # end + # def index + # @people = Person.all + # respond_to :html, :js + # end # # Here's the same action, with web-service support baked in: # - # def index - # @people = Person.all + # def index + # @people = Person.all # - # respond_to do |format| - # format.html - # format.js - # format.xml { render xml: @people } + # respond_to do |format| + # format.html + # format.js + # format.xml { render xml: @people } + # end # end - # end # - # What that says is, "if the client wants HTML or JS in response to this action, just respond as we - # would have before, but if the client wants XML, return them the list of people in XML format." - # (\Rails determines the desired response format from the HTTP Accept header submitted by the client.) + # What that says is, "if the client wants HTML or JS in response to this action, + # just respond as we would have before, but if the client wants XML, return them + # the list of people in XML format." (Rails determines the desired response + # format from the HTTP Accept header submitted by the client.) # - # Supposing you have an action that adds a new person, optionally creating their company - # (by name) if it does not already exist, without web-services, it might look like this: + # Supposing you have an action that adds a new person, optionally creating their + # company (by name) if it does not already exist, without web-services, it might + # look like this: # - # def create - # @company = Company.find_or_create_by(name: params[:company][:name]) - # @person = @company.people.create(params[:person]) + # def create + # @company = Company.find_or_create_by(name: params[:company][:name]) + # @person = @company.people.create(params[:person]) # - # redirect_to(person_list_url) - # end + # redirect_to(person_list_url) + # end # # Here's the same action, with web-service support baked in: # - # def create - # company = params[:person].delete(:company) - # @company = Company.find_or_create_by(name: company[:name]) - # @person = @company.people.create(params[:person]) + # def create + # company = params[:person].delete(:company) + # @company = Company.find_or_create_by(name: company[:name]) + # @person = @company.people.create(params[:person]) # - # respond_to do |format| - # format.html { redirect_to(person_list_url) } - # format.js - # format.xml { render xml: @person.to_xml(include: @company) } + # respond_to do |format| + # format.html { redirect_to(person_list_url) } + # format.js + # format.xml { render xml: @person.to_xml(include: @company) } + # end # end - # end # - # If the client wants HTML, we just redirect them back to the person list. If they want JavaScript, - # then it is an Ajax request and we render the JavaScript template associated with this action. - # Lastly, if the client wants XML, we render the created person as XML, but with a twist: we also - # include the person's company in the rendered XML, so you get something like this: + # If the client wants HTML, we just redirect them back to the person list. If + # they want JavaScript, then it is an Ajax request and we render the JavaScript + # template associated with this action. Lastly, if the client wants XML, we + # render the created person as XML, but with a twist: we also include the + # person's company in the rendered XML, so you get something like this: # - # - # ... - # ... - # + # # ... - # ... # ... - # - # + # + # ... + # ... + # ... + # + # # # Note, however, the extra bit at the top of that action: # - # company = params[:person].delete(:company) - # @company = Company.find_or_create_by(name: company[:name]) + # company = params[:person].delete(:company) + # @company = Company.find_or_create_by(name: company[:name]) # - # This is because the incoming XML document (if a web-service request is in process) can only contain a - # single root-node. So, we have to rearrange things so that the request looks like this (url-encoded): + # This is because the incoming XML document (if a web-service request is in + # process) can only contain a single root-node. So, we have to rearrange things + # so that the request looks like this (url-encoded): # - # person[name]=...&person[company][name]=...&... + # person[name]=...&person[company][name]=...&... # # And, like this (xml-encoded): # - # - # ... - # + # # ... - # - # + # + # ... + # + # # - # In other words, we make the request so that it operates on a single entity's person. Then, in the action, - # we extract the company data from the request, find or create the company, and then create the new person - # with the remaining data. + # In other words, we make the request so that it operates on a single entity's + # person. Then, in the action, we extract the company data from the request, + # find or create the company, and then create the new person with the remaining + # data. # - # Note that you can define your own XML parameter parser which would allow you to describe multiple entities - # in a single request (i.e., by wrapping them all in a single root node), but if you just go with the flow - # and accept \Rails' defaults, life will be much easier. + # Note that you can define your own XML parameter parser which would allow you + # to describe multiple entities in a single request (i.e., by wrapping them all + # in a single root node), but if you just go with the flow and accept Rails' + # defaults, life will be much easier. # - # If you need to use a MIME type which isn't supported by default, you can register your own handlers in - # +config/initializers/mime_types.rb+ as follows. + # If you need to use a MIME type which isn't supported by default, you can + # register your own handlers in `config/initializers/mime_types.rb` as follows. # - # Mime::Type.register "image/jpeg", :jpg + # Mime::Type.register "image/jpeg", :jpg # - # +respond_to+ also allows you to specify a common block for different formats by using +any+: + # `respond_to` also allows you to specify a common block for different formats + # by using `any`: # - # def index - # @people = Person.all + # def index + # @people = Person.all # - # respond_to do |format| - # format.html - # format.any(:xml, :json) { render request.format.to_sym => @people } + # respond_to do |format| + # format.html + # format.any(:xml, :json) { render request.format.to_sym => @people } + # end # end - # end # # In the example above, if the format is xml, it will render: # - # render xml: @people + # render xml: @people # # Or if the format is json: # - # render json: @people + # render json: @people # - # +any+ can also be used with no arguments, in which case it will be used for any format requested by - # the user: + # `any` can also be used with no arguments, in which case it will be used for + # any format requested by the user: # - # respond_to do |format| - # format.html - # format.any { redirect_to support_path } - # end + # respond_to do |format| + # format.html + # format.any { redirect_to support_path } + # end # # Formats can have different variants. # - # The request variant is a specialization of the request format, like :tablet, - # :phone, or :desktop. + # The request variant is a specialization of the request format, like `:tablet`, + # `:phone`, or `:desktop`. # - # We often want to render different html/json/xml templates for phones, - # tablets, and desktop browsers. Variants make it easy. + # We often want to render different html/json/xml templates for phones, tablets, + # and desktop browsers. Variants make it easy. # - # You can set the variant in a +before_action+: + # You can set the variant in a `before_action`: # - # request.variant = :tablet if /iPad/.match?(request.user_agent) + # request.variant = :tablet if /iPad/.match?(request.user_agent) # # Respond to variants in the action just like you respond to formats: # - # respond_to do |format| - # format.html do |variant| - # variant.tablet # renders app/views/projects/show.html+tablet.erb - # variant.phone { extra_setup; render ... } - # variant.none { special_setup } # executed only if there is no variant set + # respond_to do |format| + # format.html do |variant| + # variant.tablet # renders app/views/projects/show.html+tablet.erb + # variant.phone { extra_setup; render ... } + # variant.none { special_setup } # executed only if there is no variant set + # end # end - # end # # Provide separate templates for each format and variant: # - # app/views/projects/show.html.erb - # app/views/projects/show.html+tablet.erb - # app/views/projects/show.html+phone.erb + # app/views/projects/show.html.erb + # app/views/projects/show.html+tablet.erb + # app/views/projects/show.html+phone.erb # - # When you're not sharing any code within the format, you can simplify defining variants - # using the inline syntax: + # When you're not sharing any code within the format, you can simplify defining + # variants using the inline syntax: # - # respond_to do |format| - # format.js { render "trash" } - # format.html.phone { redirect_to progress_path } - # format.html.none { render "trash" } - # end + # respond_to do |format| + # format.js { render "trash" } + # format.html.phone { redirect_to progress_path } + # format.html.none { render "trash" } + # end # - # Variants also support common +any+/+all+ block that formats have. + # Variants also support common `any`/`all` block that formats have. # # It works for both inline: # - # respond_to do |format| - # format.html.any { render html: "any" } - # format.html.phone { render html: "phone" } - # end + # respond_to do |format| + # format.html.any { render html: "any" } + # format.html.phone { render html: "phone" } + # end # # and block syntax: # - # respond_to do |format| - # format.html do |variant| - # variant.any(:tablet, :phablet){ render html: "any" } - # variant.phone { render html: "phone" } + # respond_to do |format| + # format.html do |variant| + # variant.any(:tablet, :phablet){ render html: "any" } + # variant.phone { render html: "phone" } + # end # end - # end # # You can also set an array of variants: # - # request.variant = [:tablet, :phone] + # request.variant = [:tablet, :phone] # - # This will work similarly to formats and MIME types negotiation. If there - # is no +:tablet+ variant declared, the +:phone+ variant will be used: + # This will work similarly to formats and MIME types negotiation. If there is no + # `:tablet` variant declared, the `:phone` variant will be used: # - # respond_to do |format| - # format.html.none - # format.html.phone # this gets rendered - # end + # respond_to do |format| + # format.html.none + # format.html.phone # this gets rendered + # end # # @raise [ArgumentError] # @yield [collector] # - # source://actionpack/lib/action_controller/metal/mime_responds.rb#201 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#211 def respond_to(*mimes); end end -# A container for responses available from the current controller for -# requests for different mime-types sent to a particular action. +# A container for responses available from the current controller for requests +# for different mime-types sent to a particular action. # -# The public controller methods +respond_to+ may be called with a block -# that is used to define responses to different mime-types, e.g. -# for +respond_to+ : +# The public controller methods `respond_to` may be called with a block that is +# used to define responses to different mime-types, e.g. for `respond_to` : # -# respond_to do |format| -# format.html -# format.xml { render xml: @people } -# end +# respond_to do |format| +# format.html +# format.xml { render xml: @people } +# end # -# In this usage, the argument passed to the block (+format+ above) is an -# instance of the ActionController::MimeResponds::Collector class. This -# object serves as a container in which available responses can be stored by -# calling any of the dynamically generated, mime-type-specific methods such -# as +html+, +xml+ etc on the Collector. Each response is represented by a -# corresponding block if present. +# In this usage, the argument passed to the block (`format` above) is an +# instance of the ActionController::MimeResponds::Collector class. This object +# serves as a container in which available responses can be stored by calling +# any of the dynamically generated, mime-type-specific methods such as `html`, +# `xml` etc on the Collector. Each response is represented by a corresponding +# block if present. # -# A subsequent call to #negotiate_format(request) will enable the Collector -# to determine which specific mime-type it should respond with for the current +# A subsequent call to #negotiate_format(request) will enable the Collector to +# determine which specific mime-type it should respond with for the current # request, with this response then being accessible by calling #response. # -# source://actionpack/lib/action_controller/metal/mime_responds.rb#242 +# source://actionpack/lib/action_controller/metal/mime_responds.rb#251 class ActionController::MimeResponds::Collector include ::AbstractController::Collector # @return [Collector] a new instance of Collector # - # source://actionpack/lib/action_controller/metal/mime_responds.rb#246 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#255 def initialize(mimes, variant = T.unsafe(nil)); end - # source://actionpack/lib/action_controller/metal/mime_responds.rb#253 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#262 def all(*args, &block); end - # source://actionpack/lib/action_controller/metal/mime_responds.rb#253 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#262 def any(*args, &block); end # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/mime_responds.rb#271 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#280 def any_response?; end - # source://actionpack/lib/action_controller/metal/mime_responds.rb#262 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#271 def custom(mime_type, &block); end # Returns the value of attribute format. # - # source://actionpack/lib/action_controller/metal/mime_responds.rb#244 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#253 def format; end # Sets the attribute format # # @param value the value to set the attribute format to. # - # source://actionpack/lib/action_controller/metal/mime_responds.rb#244 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#253 def format=(_arg0); end - # source://actionpack/lib/action_controller/metal/mime_responds.rb#288 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#297 def negotiate_format(request); end - # source://actionpack/lib/action_controller/metal/mime_responds.rb#275 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#284 def response; end end -# source://actionpack/lib/action_controller/metal/mime_responds.rb#292 +# source://actionpack/lib/action_controller/metal/mime_responds.rb#301 class ActionController::MimeResponds::Collector::VariantCollector # @return [VariantCollector] a new instance of VariantCollector # - # source://actionpack/lib/action_controller/metal/mime_responds.rb#293 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#302 def initialize(variant = T.unsafe(nil)); end - # source://actionpack/lib/action_controller/metal/mime_responds.rb#298 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#307 def all(*args, &block); end - # source://actionpack/lib/action_controller/metal/mime_responds.rb#298 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#307 def any(*args, &block); end - # source://actionpack/lib/action_controller/metal/mime_responds.rb#309 - def method_missing(name, *args, &block); end + # source://actionpack/lib/action_controller/metal/mime_responds.rb#318 + def method_missing(name, *_arg1, &block); end - # source://actionpack/lib/action_controller/metal/mime_responds.rb#313 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#322 def variant; end private - # source://actionpack/lib/action_controller/metal/mime_responds.rb#322 + # source://actionpack/lib/action_controller/metal/mime_responds.rb#331 def variant_key; end end -# source://actionpack/lib/action_controller/metal/exceptions.rb#94 +# source://actionpack/lib/action_controller/metal/exceptions.rb#96 class ActionController::MissingExactTemplate < ::ActionController::UnknownFormat # @return [MissingExactTemplate] a new instance of MissingExactTemplate # - # source://actionpack/lib/action_controller/metal/exceptions.rb#97 + # source://actionpack/lib/action_controller/metal/exceptions.rb#99 def initialize(message, controller, action_name); end # Returns the value of attribute action_name. # - # source://actionpack/lib/action_controller/metal/exceptions.rb#95 + # source://actionpack/lib/action_controller/metal/exceptions.rb#97 def action_name; end # Returns the value of attribute controller. # - # source://actionpack/lib/action_controller/metal/exceptions.rb#95 + # source://actionpack/lib/action_controller/metal/exceptions.rb#97 def controller; end end -# source://actionpack/lib/action_controller/metal/exceptions.rb#59 +# source://actionpack/lib/action_controller/metal/exceptions.rb#61 class ActionController::MissingFile < ::ActionController::ActionControllerError; end -# See Responder#api_behavior +# See `Responder#api_behavior` # -# source://actionpack/lib/action_controller/metal/renderers.rb#17 +# source://actionpack/lib/action_controller/metal/renderers.rb#19 class ActionController::MissingRenderer < ::LoadError # @return [MissingRenderer] a new instance of MissingRenderer # - # source://actionpack/lib/action_controller/metal/renderers.rb#18 + # source://actionpack/lib/action_controller/metal/renderers.rb#20 def initialize(format); end end -# source://actionpack/lib/action_controller/metal/exceptions.rb#56 +# source://actionpack/lib/action_controller/metal/exceptions.rb#58 class ActionController::NotImplemented < ::ActionController::MethodNotAllowed; end # Specify binary encoding for parameters for a given action. # -# source://actionpack/lib/action_controller/metal/parameter_encoding.rb#5 +# source://actionpack/lib/action_controller/metal/parameter_encoding.rb#7 module ActionController::ParameterEncoding extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionController::ParameterEncoding::ClassMethods end -# source://actionpack/lib/action_controller/metal/parameter_encoding.rb#8 +# source://actionpack/lib/action_controller/metal/parameter_encoding.rb#10 module ActionController::ParameterEncoding::ClassMethods - # source://actionpack/lib/action_controller/metal/parameter_encoding.rb#18 + # source://actionpack/lib/action_controller/metal/parameter_encoding.rb#20 def action_encoding_template(action); end - # source://actionpack/lib/action_controller/metal/parameter_encoding.rb#9 + # source://actionpack/lib/action_controller/metal/parameter_encoding.rb#11 def inherited(klass); end - # Specify the encoding for a parameter on an action. - # If not specified the default is UTF-8. + # Specify the encoding for a parameter on an action. If not specified the + # default is UTF-8. # # You can specify a binary (ASCII_8BIT) parameter with: # - # class RepositoryController < ActionController::Base - # # This specifies that file_path is not UTF-8 and is instead ASCII_8BIT - # param_encoding :show, :file_path, Encoding::ASCII_8BIT + # class RepositoryController < ActionController::Base + # # This specifies that file_path is not UTF-8 and is instead ASCII_8BIT + # param_encoding :show, :file_path, Encoding::ASCII_8BIT # - # def show - # @repo = Repository.find_by_filesystem_path params[:file_path] + # def show + # @repo = Repository.find_by_filesystem_path params[:file_path] # - # # params[:repo_name] remains UTF-8 encoded - # @repo_name = params[:repo_name] - # end + # # params[:repo_name] remains UTF-8 encoded + # @repo_name = params[:repo_name] + # end # - # def index - # @repositories = Repository.all + # def index + # @repositories = Repository.all + # end # end - # end # - # The file_path parameter on the show action would be encoded as ASCII-8BIT, - # but all other arguments will remain UTF-8 encoded. - # This is useful in the case where an application must handle data - # but encoding of the data is unknown, like file system data. + # The file_path parameter on the show action would be encoded as ASCII-8BIT, but + # all other arguments will remain UTF-8 encoded. This is useful in the case + # where an application must handle data but encoding of the data is unknown, + # like file system data. # - # source://actionpack/lib/action_controller/metal/parameter_encoding.rb#77 + # source://actionpack/lib/action_controller/metal/parameter_encoding.rb#79 def param_encoding(action, param, encoding); end - # source://actionpack/lib/action_controller/metal/parameter_encoding.rb#14 + # source://actionpack/lib/action_controller/metal/parameter_encoding.rb#16 def setup_param_encode; end - # Specify that a given action's parameters should all be encoded as - # ASCII-8BIT (it "skips" the encoding default of UTF-8). + # Specify that a given action's parameters should all be encoded as ASCII-8BIT + # (it "skips" the encoding default of UTF-8). # # For example, a controller would use it like this: # - # class RepositoryController < ActionController::Base - # skip_parameter_encoding :show + # class RepositoryController < ActionController::Base + # skip_parameter_encoding :show # - # def show - # @repo = Repository.find_by_filesystem_path params[:file_path] + # def show + # @repo = Repository.find_by_filesystem_path params[:file_path] # - # # `repo_name` is guaranteed to be UTF-8, but was ASCII-8BIT, so - # # tag it as such - # @repo_name = params[:repo_name].force_encoding 'UTF-8' - # end + # # `repo_name` is guaranteed to be UTF-8, but was ASCII-8BIT, so + # # tag it as such + # @repo_name = params[:repo_name].force_encoding 'UTF-8' + # end # - # def index - # @repositories = Repository.all + # def index + # @repositories = Repository.all + # end # end - # end # # The show action in the above controller would have all parameter values - # encoded as ASCII-8BIT. This is useful in the case where an application - # must handle data but encoding of the data is unknown, like file system data. + # encoded as ASCII-8BIT. This is useful in the case where an application must + # handle data but encoding of the data is unknown, like file system data. # - # source://actionpack/lib/action_controller/metal/parameter_encoding.rb#48 + # source://actionpack/lib/action_controller/metal/parameter_encoding.rb#50 def skip_parameter_encoding(action); end end # Raised when a required parameter is missing. # -# params = ActionController::Parameters.new(a: {}) -# params.fetch(:b) -# # => ActionController::ParameterMissing: param is missing or the value is empty: b -# params.require(:a) -# # => ActionController::ParameterMissing: param is missing or the value is empty: a +# params = ActionController::Parameters.new(a: {}) +# params.fetch(:b) +# # => ActionController::ParameterMissing: param is missing or the value is empty or invalid: b +# params.require(:a) +# # => ActionController::ParameterMissing: param is missing or the value is empty or invalid: a +# params.expect(a: []) +# # => ActionController::ParameterMissing: param is missing or the value is empty or invalid: a # -# source://actionpack/lib/action_controller/metal/strong_parameters.rb#22 +# source://actionpack/lib/action_controller/metal/strong_parameters.rb#26 class ActionController::ParameterMissing < ::KeyError # @return [ParameterMissing] a new instance of ParameterMissing # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#25 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#29 def initialize(param, keys = T.unsafe(nil)); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#34 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#38 def corrections; end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#23 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#27 def keys; end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#23 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#27 def param; end end -# = Action Controller \Parameters +# # Action Controller Parameters # # Allows you to choose which attributes should be permitted for mass updating # and thus prevent accidentally exposing that which shouldn't be exposed. -# Provides two methods for this purpose: #require and #permit. The former is -# used to mark parameters as required. The latter is used to set the parameter -# as permitted and limit which attributes should be allowed for mass updating. -# -# params = ActionController::Parameters.new({ -# person: { -# name: "Francesco", -# age: 22, -# role: "admin" -# } -# }) # -# permitted = params.require(:person).permit(:name, :age) -# permitted # => #"Francesco", "age"=>22} permitted: true> -# permitted.permitted? # => true +# Provides methods for filtering and requiring params: # -# Person.first.update!(permitted) -# # => # +# * `expect` to safely permit and require parameters in one step. +# * `permit` to filter params for mass assignment. +# * `require` to require a parameter or raise an error. # -# It provides two options that controls the top-level behavior of new instances: -# -# * +permit_all_parameters+ - If it's +true+, all the parameters will be -# permitted by default. The default is +false+. -# * +action_on_unpermitted_parameters+ - Controls behavior when parameters that are not explicitly -# permitted are found. The default value is :log in test and development environments, -# +false+ otherwise. The values can be: -# * +false+ to take no action. -# * :log to emit an ActiveSupport::Notifications.instrument event on the -# unpermitted_parameters.action_controller topic and log at the DEBUG level. -# * :raise to raise an ActionController::UnpermittedParameters exception. +# params = ActionController::Parameters.new({ +# person: { +# name: "Francesco", +# age: 22, +# role: "admin" +# } +# }) +# +# permitted = params.expect(person: [:name, :age]) +# permitted # => #"Francesco", "age"=>22} permitted: true> +# +# Person.first.update!(permitted) +# # => # +# +# Paramaters provides two options that control the top-level behavior of new +# instances: +# +# * `permit_all_parameters` - If it's `true`, all the parameters will be +# permitted by default. The default is `false`. +# * `action_on_unpermitted_parameters` - Controls behavior when parameters +# that are not explicitly permitted are found. The default value is `:log` +# in test and development environments, `false` otherwise. The values can +# be: +# * `false` to take no action. +# * `:log` to emit an `ActiveSupport::Notifications.instrument` event on +# the `unpermitted_parameters.action_controller` topic and log at the +# DEBUG level. +# * `:raise` to raise an ActionController::UnpermittedParameters +# exception. # # Examples: # -# params = ActionController::Parameters.new -# params.permitted? # => false +# params = ActionController::Parameters.new +# params.permitted? # => false # -# ActionController::Parameters.permit_all_parameters = true +# ActionController::Parameters.permit_all_parameters = true # -# params = ActionController::Parameters.new -# params.permitted? # => true +# params = ActionController::Parameters.new +# params.permitted? # => true # -# params = ActionController::Parameters.new(a: "123", b: "456") -# params.permit(:c) -# # => # +# params = ActionController::Parameters.new(a: "123", b: "456") +# params.permit(:c) +# # => # # -# ActionController::Parameters.action_on_unpermitted_parameters = :raise +# ActionController::Parameters.action_on_unpermitted_parameters = :raise # -# params = ActionController::Parameters.new(a: "123", b: "456") -# params.permit(:c) -# # => ActionController::UnpermittedParameters: found unpermitted keys: a, b +# params = ActionController::Parameters.new(a: "123", b: "456") +# params.permit(:c) +# # => ActionController::UnpermittedParameters: found unpermitted keys: a, b # # Please note that these options *are not thread-safe*. In a multi-threaded # environment they should only be set once at boot-time and never mutated at # runtime. # -# You can fetch values of +ActionController::Parameters+ using either -# :key or "key". +# You can fetch values of `ActionController::Parameters` using either `:key` or +# `"key"`. # -# params = ActionController::Parameters.new(key: "value") -# params[:key] # => "value" -# params["key"] # => "value" +# params = ActionController::Parameters.new(key: "value") +# params[:key] # => "value" +# params["key"] # => "value" # -# source://actionpack/lib/action_controller/metal/strong_parameters.rb#140 +# source://actionpack/lib/action_controller/metal/strong_parameters.rb#159 class ActionController::Parameters include ::ActiveSupport::DeepMergeable - # Returns a new +ActionController::Parameters+ instance. - # Also, sets the +permitted+ attribute to the default value of - # ActionController::Parameters.permit_all_parameters. + # Returns a new `ActionController::Parameters` instance. Also, sets the + # `permitted` attribute to the default value of + # `ActionController::Parameters.permit_all_parameters`. # - # class Person < ActiveRecord::Base - # end + # class Person < ActiveRecord::Base + # end # - # params = ActionController::Parameters.new(name: "Francesco") - # params.permitted? # => false - # Person.new(params) # => ActiveModel::ForbiddenAttributesError + # params = ActionController::Parameters.new(name: "Francesco") + # params.permitted? # => false + # Person.new(params) # => ActiveModel::ForbiddenAttributesError # - # ActionController::Parameters.permit_all_parameters = true + # ActionController::Parameters.permit_all_parameters = true # - # params = ActionController::Parameters.new(name: "Francesco") - # params.permitted? # => true - # Person.new(params) # => # + # params = ActionController::Parameters.new(name: "Francesco") + # params.permitted? # => true + # Person.new(params) # => # # # @return [Parameters] a new instance of Parameters # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#269 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#300 def initialize(parameters = T.unsafe(nil), logging_context = T.unsafe(nil)); end - # Returns true if another +Parameters+ object contains the same content and + # Returns true if another `Parameters` object contains the same content and # permitted flag. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#283 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#314 def ==(other); end - # Returns a parameter for the given +key+. If not found, - # returns +nil+. + # Returns a parameter for the given `key`. If not found, returns `nil`. # - # params = ActionController::Parameters.new(person: { name: "Francesco" }) - # params[:person] # => #"Francesco"} permitted: false> - # params[:none] # => nil + # params = ActionController::Parameters.new(person: { name: "Francesco" }) + # params[:person] # => #"Francesco"} permitted: false> + # params[:none] # => nil # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#665 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#810 def [](key); end - # Assigns a value to a given +key+. The given key may still get filtered out + # Assigns a value to a given `key`. The given key may still get filtered out # when #permit is called. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#671 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#816 def []=(key, value); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#243 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#262 def always_permitted_parameters; end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#243 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#262 def always_permitted_parameters=(val); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#229 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#249 def as_json(*_arg0, **_arg1, &_arg2); end - # Returns a new +ActionController::Parameters+ instance with +nil+ values removed. + # Returns a new `ActionController::Parameters` instance with `nil` values + # removed. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#842 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#987 def compact; end - # Removes all +nil+ values in place and returns +self+, or +nil+ if no changes were made. + # Removes all `nil` values in place and returns `self`, or `nil` if no changes + # were made. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#847 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#993 def compact!; end - # Returns a new +ActionController::Parameters+ instance without the blank values. - # Uses Object#blank? for determining if a value is blank. + # Returns a new `ActionController::Parameters` instance without the blank + # values. Uses Object#blank? for determining if a value is blank. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#853 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#999 def compact_blank; end - # Removes all blank values in place and returns self. - # Uses Object#blank? for determining if a value is blank. + # Removes all blank values in place and returns self. Uses Object#blank? for + # determining if a value is blank. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#859 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1005 def compact_blank!; end # Attribute that keeps track of converted arrays, if any, to avoid double - # looping in the common use case permit + mass-assignment. Defined in a - # method to instantiate it only if needed. + # looping in the common use case permit + mass-assignment. Defined in a method + # to instantiate it only if needed. # - # \Testing membership still loops, but it's going to be faster than our own - # loop that converts values. Also, we are not going to build a new array - # object per fetch. + # Testing membership still loops, but it's going to be faster than our own loop + # that converts values. Also, we are not going to build a new array object per + # fetch. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#430 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#448 def converted_arrays; end - # Returns a duplicate +ActionController::Parameters+ instance with the same permitted parameters. + # Returns a duplicate `ActionController::Parameters` instance with the same + # permitted parameters. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#958 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1105 def deep_dup; end # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#894 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1040 def deep_merge?(other_hash); end - # Returns a new +ActionController::Parameters+ instance with the - # results of running +block+ once for every key. This includes the keys - # from the root hash and from all nested hashes and arrays. The values are unchanged. + # Returns a new `ActionController::Parameters` instance with the results of + # running `block` once for every key. This includes the keys from the root hash + # and from all nested hashes and arrays. The values are unchanged. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#793 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#937 def deep_transform_keys(&block); end - # Returns the same +ActionController::Parameters+ instance with - # changed keys. This includes the keys from the root hash and from all - # nested hashes and arrays. The values are unchanged. + # Returns the same `ActionController::Parameters` instance with changed keys. + # This includes the keys from the root hash and from all nested hashes and + # arrays. The values are unchanged. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#802 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#946 def deep_transform_keys!(&block); end - # Deletes a key-value pair from +Parameters+ and returns the value. If - # +key+ is not found, returns +nil+ (or, with optional code block, yields - # +key+ and returns the result). This method is similar to #extract!, which - # returns the corresponding +ActionController::Parameters+ object. + # Deletes a key-value pair from `Parameters` and returns the value. If `key` is + # not found, returns `nil` (or, with optional code block, yields `key` and + # returns the result). This method is similar to #extract!, which returns the + # corresponding `ActionController::Parameters` object. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#811 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#955 def delete(key, &block); end # Removes items that the block evaluates to true and returns self. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#835 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#979 def delete_if(&block); end - # Extracts the nested parameter from the given +keys+ by calling +dig+ - # at each step. Returns +nil+ if any intermediate step is +nil+. + # Extracts the nested parameter from the given `keys` by calling `dig` at each + # step. Returns `nil` if any intermediate step is `nil`. # - # params = ActionController::Parameters.new(foo: { bar: { baz: 1 } }) - # params.dig(:foo, :bar, :baz) # => 1 - # params.dig(:foo, :zot, :xyz) # => nil + # params = ActionController::Parameters.new(foo: { bar: { baz: 1 } }) + # params.dig(:foo, :bar, :baz) # => 1 + # params.dig(:foo, :zot, :xyz) # => nil # - # params2 = ActionController::Parameters.new(foo: [10, 11, 12]) - # params2.dig(:foo, 1) # => 11 + # params2 = ActionController::Parameters.new(foo: [10, 11, 12]) + # params2.dig(:foo, 1) # => 11 # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#709 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#854 def dig(*keys); end - # Convert all hashes in values into parameters, then yield each pair in - # the same way as Hash#each_pair. + # Convert all hashes in values into parameters, then yield each pair in the same + # way as `Hash#each_pair`. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#397 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#415 def each(&block); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#229 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#249 def each_key(*_arg0, **_arg1, &_arg2); end - # Convert all hashes in values into parameters, then yield each pair in - # the same way as Hash#each_pair. + # Convert all hashes in values into parameters, then yield each pair in the same + # way as `Hash#each_pair`. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#397 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#415 def each_pair(&block); end - # Convert all hashes in values into parameters, then yield each value in - # the same way as Hash#each_value. + # Convert all hashes in values into parameters, then yield each value in the + # same way as `Hash#each_value`. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#409 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#427 def each_value(&block); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#229 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#249 def empty?(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#953 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1099 def encode_with(coder); end # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#304 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#322 def eql?(other); end - # Returns a new +ActionController::Parameters+ instance that - # filters out the given +keys+. + # Returns a new `ActionController::Parameters` instance that filters out the + # given `keys`. # - # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) - # params.except(:a, :b) # => #3} permitted: false> - # params.except(:d) # => #1, "b"=>2, "c"=>3} permitted: false> + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.except(:a, :b) # => #3} permitted: false> + # params.except(:d) # => #1, "b"=>2, "c"=>3} permitted: false> # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#738 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#882 def except(*keys); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#229 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#249 def exclude?(*_arg0, **_arg1, &_arg2); end + # `expect` is the preferred way to require and permit parameters. + # It is safer than the previous recommendation to call `permit` and `require` + # in sequence, which could allow user triggered 500 errors. + # + # `expect` is more strict with types to avoid a number of potential pitfalls + # that may be encountered with the `.require.permit` pattern. + # + # For example: + # + # params = ActionController::Parameters.new(comment: { text: "hello" }) + # params.expect(comment: [:text]) + # # => # + # + # params = ActionController::Parameters.new(comment: [{ text: "hello" }, { text: "world" }]) + # params.expect(comment: [:text]) + # # => ActionController::ParameterMissing: param is missing or the value is empty or invalid: comment + # + # In order to permit an array of parameters, the array must be defined + # explicitly. Use double array brackets, an array inside an array, to + # declare that an array of parameters is expected. + # + # params = ActionController::Parameters.new(comments: [{ text: "hello" }, { text: "world" }]) + # params.expect(comments: [[:text]]) + # # => [# "hello" } permitted: true>, + # # # "world" } permitted: true>] + # + # params = ActionController::Parameters.new(comments: { text: "hello" }) + # params.expect(comments: [[:text]]) + # # => ActionController::ParameterMissing: param is missing or the value is empty or invalid: comments + # + # `expect` is intended to protect against array tampering. + # + # params = ActionController::Parameters.new(user: "hack") + # # The previous way of requiring and permitting parameters will error + # params.require(:user).permit(:name, pets: [:name]) # wrong + # # => NoMethodError: undefined method `permit' for an instance of String + # + # # similarly with nested parameters + # params = ActionController::Parameters.new(user: { name: "Martin", pets: { name: "hack" } }) + # user_params = params.require(:user).permit(:name, pets: [:name]) # wrong + # # user_params[:pets] is expected to be an array but is a hash + # + # `expect` solves this by being more strict with types. + # + # params = ActionController::Parameters.new(user: "hack") + # params.expect(user: [ :name, pets: [[:name]] ]) + # # => ActionController::ParameterMissing: param is missing or the value is empty or invalid: user + # + # # with nested parameters + # params = ActionController::Parameters.new(user: { name: "Martin", pets: { name: "hack" } }) + # user_params = params.expect(user: [:name, pets: [[:name]] ]) + # user_params[:pets] # => nil + # + # As the examples show, `expect` requires the `:user` key, and any root keys + # similar to the `.require.permit` pattern. If multiple root keys are + # expected, they will all be required. + # + # params = ActionController::Parameters.new(name: "Martin", pies: [{ type: "dessert", flavor: "pumpkin"}]) + # name, pies = params.expect(:name, pies: [[:type, :flavor]]) + # name # => "Martin" + # pies # => [#"dessert", "flavor"=>"pumpkin"} permitted: true>] + # + # When called with a hash with multiple keys, `expect` will permit the + # parameters and require the keys in the order they are given in the hash, + # returning an array of the permitted parameters. + # + # params = ActionController::Parameters.new(subject: { name: "Martin" }, object: { pie: "pumpkin" }) + # subject, object = params.expect(subject: [:name], object: [:pie]) + # subject # => #"Martin"} permitted: true> + # object # => #"pumpkin"} permitted: true> + # + # Besides being more strict about array vs hash params, `expect` uses permit + # internally, so it will behave similarly. + # + # params = ActionController::Parameters.new({ + # person: { + # name: "Francesco", + # age: 22, + # pets: [{ + # name: "Purplish", + # category: "dogs" + # }] + # } + # }) + # + # permitted = params.expect(person: [ :name, { pets: [[:name]] } ]) + # permitted.permitted? # => true + # permitted[:name] # => "Francesco" + # permitted[:age] # => nil + # permitted[:pets][0][:name] # => "Purplish" + # permitted[:pets][0][:category] # => nil + # + # An array of permitted scalars may be expected with the following: + # + # params = ActionController::Parameters.new(tags: ["rails", "parameters"]) + # permitted = params.expect(tags: []) + # permitted.permitted? # => true + # permitted.is_a?(Array) # => true + # permitted.size # => 2 + # + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#785 + def expect(*filters); end + + # Same as `expect`, but raises an `ActionController::ExpectedParameterMissing` + # instead of `ActionController::ParameterMissing`. Unlike `expect` which + # will render a 400 response, `expect!` will raise an exception that is + # not handled. This is intended for debugging invalid params for an + # internal API where incorrectly formatted params would indicate a bug + # in a client library that should be fixed. + # + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#799 + def expect!(*filters); end + # Removes and returns the key/value pairs matching the given keys. # - # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) - # params.extract!(:a, :b) # => #1, "b"=>2} permitted: false> - # params # => #3} permitted: false> + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.extract!(:a, :b) # => #1, "b"=>2} permitted: false> + # params # => #3} permitted: false> # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#748 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#892 def extract!(*keys); end - # Returns parameter value for the given +key+ separated by +delimiter+. + # Returns parameter value for the given `key` separated by `delimiter`. # - # params = ActionController::Parameters.new(id: "1_123", tags: "ruby,rails") - # params.extract_value(:id) # => ["1", "123"] - # params.extract_value(:tags, delimiter: ",") # => ["ruby", "rails"] - # params.extract_value(:non_existent_key) # => nil + # params = ActionController::Parameters.new(id: "1_123", tags: "ruby,rails") + # params.extract_value(:id) # => ["1", "123"] + # params.extract_value(:tags, delimiter: ",") # => ["ruby", "rails"] + # params.extract_value(:non_existent_key) # => nil # - # Note that if the given +key+'s value contains blank elements, then - # the returned array will include empty strings. + # Note that if the given `key`'s value contains blank elements, then the + # returned array will include empty strings. # - # params = ActionController::Parameters.new(tags: "ruby,rails,,web") - # params.extract_value(:tags) # => ["ruby", "rails", "", "web"] + # params = ActionController::Parameters.new(tags: "ruby,rails,,web") + # params.extract_value(:tags, delimiter: ",") # => ["ruby", "rails", "", "web"] # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#976 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1123 def extract_value(key, delimiter: T.unsafe(nil)); end - # Returns a parameter for the given +key+. If the +key+ - # can't be found, there are several options: With no other arguments, - # it will raise an ActionController::ParameterMissing error; - # if a second argument is given, then that is returned (converted to an - # instance of +ActionController::Parameters+ if possible); if a block - # is given, then that will be run and its result returned. - # - # params = ActionController::Parameters.new(person: { name: "Francesco" }) - # params.fetch(:person) # => #"Francesco"} permitted: false> - # params.fetch(:none) # => ActionController::ParameterMissing: param is missing or the value is empty: none - # params.fetch(:none, {}) # => # - # params.fetch(:none, "Francesco") # => "Francesco" - # params.fetch(:none) { "Francesco" } # => "Francesco" - # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#688 + # Returns a parameter for the given `key`. If the `key` can't be found, there + # are several options: With no other arguments, it will raise an + # ActionController::ParameterMissing error; if a second argument is given, then + # that is returned (converted to an instance of `ActionController::Parameters` + # if possible); if a block is given, then that will be run and its result + # returned. + # + # params = ActionController::Parameters.new(person: { name: "Francesco" }) + # params.fetch(:person) # => #"Francesco"} permitted: false> + # params.fetch(:none) # => ActionController::ParameterMissing: param is missing or the value is empty or invalid: none + # params.fetch(:none, {}) # => # + # params.fetch(:none, "Francesco") # => "Francesco" + # params.fetch(:none) { "Francesco" } # => "Francesco" + # + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#833 def fetch(key, *args); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#229 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#249 def has_key?(*_arg0, **_arg1, &_arg2); end # Returns true if the given value is present for some key in the parameters. # # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#864 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1010 def has_value?(value); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#310 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#328 def hash; end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#229 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#249 def include?(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#935 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1081 def init_with(coder); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#922 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1068 def inspect; end - # Equivalent to Hash#keep_if, but returns +nil+ if no changes were made. + # Equivalent to Hash#keep_if, but returns `nil` if no changes were made. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#822 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#966 def keep_if(&block); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#229 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#249 def key?(*_arg0, **_arg1, &_arg2); end # :method: to_s # # :call-seq: - # to_s() + # to_s() # # Returns the content of the parameters as a string. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#229 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#249 def keys(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#229 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#249 def member?(*_arg0, **_arg1, &_arg2); end - # Returns a new +ActionController::Parameters+ instance with all keys from - # +other_hash+ merged into current hash. + # Returns a new `ActionController::Parameters` instance with all keys from + # `other_hash` merged into current hash. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#878 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1024 def merge(other_hash); end # :call-seq: merge!(other_hash) # - # Returns the current +ActionController::Parameters+ instance with - # +other_hash+ merged into current hash. + # Returns the current `ActionController::Parameters` instance with `other_hash` + # merged into current hash. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#889 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1035 def merge!(other_hash, &block); end - # Returns a new +ActionController::Parameters+ instance that - # includes only the given +filters+ and sets the +permitted+ attribute - # for the object to +true+. This is useful for limiting which attributes - # should be allowed for mass updating. + # Returns a new `ActionController::Parameters` instance that includes only the + # given `filters` and sets the `permitted` attribute for the object to `true`. + # This is useful for limiting which attributes should be allowed for mass + # updating. # - # params = ActionController::Parameters.new(user: { name: "Francesco", age: 22, role: "admin" }) - # permitted = params.require(:user).permit(:name, :age) - # permitted.permitted? # => true - # permitted.has_key?(:name) # => true - # permitted.has_key?(:age) # => true - # permitted.has_key?(:role) # => false + # params = ActionController::Parameters.new(name: "Francesco", age: 22, role: "admin") + # permitted = params.permit(:name, :age) + # permitted.permitted? # => true + # permitted.has_key?(:name) # => true + # permitted.has_key?(:age) # => true + # permitted.has_key?(:role) # => false # # Only permitted scalars pass the filter. For example, given # - # params.permit(:name) + # params.permit(:name) # - # +:name+ passes if it is a key of +params+ whose associated value is of type - # +String+, +Symbol+, +NilClass+, +Numeric+, +TrueClass+, +FalseClass+, - # +Date+, +Time+, +DateTime+, +StringIO+, +IO+, - # ActionDispatch::Http::UploadedFile or +Rack::Test::UploadedFile+. - # Otherwise, the key +:name+ is filtered out. + # `:name` passes if it is a key of `params` whose associated value is of type + # `String`, `Symbol`, `NilClass`, `Numeric`, `TrueClass`, `FalseClass`, `Date`, + # `Time`, `DateTime`, `StringIO`, `IO`, ActionDispatch::Http::UploadedFile or + # `Rack::Test::UploadedFile`. Otherwise, the key `:name` is filtered out. # - # You may declare that the parameter should be an array of permitted scalars - # by mapping it to an empty array: + # You may declare that the parameter should be an array of permitted scalars by + # mapping it to an empty array: # - # params = ActionController::Parameters.new(tags: ["rails", "parameters"]) - # params.permit(tags: []) + # params = ActionController::Parameters.new(tags: ["rails", "parameters"]) + # params.permit(tags: []) # - # Sometimes it is not possible or convenient to declare the valid keys of - # a hash parameter or its internal structure. Just map to an empty hash: + # Sometimes it is not possible or convenient to declare the valid keys of a hash + # parameter or its internal structure. Just map to an empty hash: # - # params.permit(preferences: {}) + # params.permit(preferences: {}) # - # Be careful because this opens the door to arbitrary input. In this - # case, +permit+ ensures values in the returned structure are permitted - # scalars and filters out anything else. + # Be careful because this opens the door to arbitrary input. In this case, + # `permit` ensures values in the returned structure are permitted scalars and + # filters out anything else. # - # You can also use +permit+ on nested parameters, like: + # You can also use `permit` on nested parameters: # - # params = ActionController::Parameters.new({ - # person: { - # name: "Francesco", - # age: 22, - # pets: [{ - # name: "Purplish", - # category: "dogs" - # }] - # } - # }) - # - # permitted = params.permit(person: [ :name, { pets: :name } ]) - # permitted.permitted? # => true - # permitted[:person][:name] # => "Francesco" - # permitted[:person][:age] # => nil - # permitted[:person][:pets][0][:name] # => "Purplish" - # permitted[:person][:pets][0][:category] # => nil - # - # Note that if you use +permit+ in a key that points to a hash, - # it won't allow all the hash. You also need to specify which - # attributes inside the hash should be permitted. - # - # params = ActionController::Parameters.new({ - # person: { - # contact: { - # email: "none@test.com", - # phone: "555-1234" + # params = ActionController::Parameters.new({ + # person: { + # name: "Francesco", + # age: 22, + # pets: [{ + # name: "Purplish", + # category: "dogs" + # }] # } - # } - # }) + # }) # - # params.require(:person).permit(:contact) - # # => # + # permitted = params.permit(person: [ :name, { pets: :name } ]) + # permitted.permitted? # => true + # permitted[:person][:name] # => "Francesco" + # permitted[:person][:age] # => nil + # permitted[:person][:pets][0][:name] # => "Purplish" + # permitted[:person][:pets][0][:category] # => nil # - # params.require(:person).permit(contact: :phone) - # # => ##"555-1234"} permitted: true>} permitted: true> + # This has the added benefit of rejecting user-modified inputs that send a + # string when a hash is expected. # - # params.require(:person).permit(contact: [ :email, :phone ]) - # # => ##"none@test.com", "phone"=>"555-1234"} permitted: true>} permitted: true> + # When followed by `require`, you can both filter and require parameters + # following the typical pattern of a Rails form. The `expect` method was + # made specifically for this use case and is the recommended way to require + # and permit parameters. # - # If your parameters specify multiple parameters indexed by a number, - # you can permit each set of parameters under the numeric key to be the same using the same syntax as permitting a single item. + # permitted = params.expect(person: [:name, :age]) # - # params = ActionController::Parameters.new({ - # person: { - # '0': { - # email: "none@test.com", - # phone: "555-1234" - # }, - # '1': { - # email: "nothing@test.com", - # phone: "555-6789" - # }, - # } - # }) - # params.permit(person: [:email]).to_h - # # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"email"=>"nothing@test.com"}}} + # When using `permit` and `require` separately, pay careful attention to the + # order of the method calls. # - # If you want to specify what keys you want from each numeric key, you can instead specify each one individually + # params = ActionController::Parameters.new(person: { name: "Martin", age: 40, role: "admin" }) + # permitted = params.permit(person: [:name, :age]).require(:person) # correct # - # params = ActionController::Parameters.new({ - # person: { - # '0': { - # email: "none@test.com", - # phone: "555-1234" - # }, - # '1': { - # email: "nothing@test.com", - # phone: "555-6789" - # }, - # } - # }) - # params.permit(person: { '0': [:email], '1': [:phone]}).to_h - # # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"phone"=>"555-6789"}}} + # When require is used first, it is possible for users of your application to + # trigger a NoMethodError when the user, for example, sends a string for :person. + # + # params = ActionController::Parameters.new(person: "tampered") + # permitted = params.require(:person).permit(:name, :age) # not recommended + # # => NoMethodError: undefined method `permit' for an instance of String # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#642 + # Note that if you use `permit` in a key that points to a hash, it won't allow + # all the hash. You also need to specify which attributes inside the hash should + # be permitted. + # + # params = ActionController::Parameters.new({ + # person: { + # contact: { + # email: "none@test.com", + # phone: "555-1234" + # } + # } + # }) + # + # params.permit(person: :contact).require(:person) + # # => # + # + # params.permit(person: { contact: :phone }).require(:person) + # # => ##"555-1234"} permitted: true>} permitted: true> + # + # params.permit(person: { contact: [ :email, :phone ] }).require(:person) + # # => ##"none@test.com", "phone"=>"555-1234"} permitted: true>} permitted: true> + # + # If your parameters specify multiple parameters indexed by a number, you can + # permit each set of parameters under the numeric key to be the same using the + # same syntax as permitting a single item. + # + # params = ActionController::Parameters.new({ + # person: { + # '0': { + # email: "none@test.com", + # phone: "555-1234" + # }, + # '1': { + # email: "nothing@test.com", + # phone: "555-6789" + # }, + # } + # }) + # params.permit(person: [:email]).to_h + # # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"email"=>"nothing@test.com"}}} + # + # If you want to specify what keys you want from each numeric key, you can + # instead specify each one individually + # + # params = ActionController::Parameters.new({ + # person: { + # '0': { + # email: "none@test.com", + # phone: "555-1234" + # }, + # '1': { + # email: "nothing@test.com", + # phone: "555-6789" + # }, + # } + # }) + # params.permit(person: { '0': [:email], '1': [:phone]}).to_h + # # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"phone"=>"555-6789"}}} + # + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#681 def permit(*filters); end - # Sets the +permitted+ attribute to +true+. This can be used to pass - # mass assignment. Returns +self+. + # Sets the `permitted` attribute to `true`. This can be used to pass mass + # assignment. Returns `self`. # - # class Person < ActiveRecord::Base - # end + # class Person < ActiveRecord::Base + # end # - # params = ActionController::Parameters.new(name: "Francesco") - # params.permitted? # => false - # Person.new(params) # => ActiveModel::ForbiddenAttributesError - # params.permit! - # params.permitted? # => true - # Person.new(params) # => # + # params = ActionController::Parameters.new(name: "Francesco") + # params.permitted? # => false + # Person.new(params) # => ActiveModel::ForbiddenAttributesError + # params.permit! + # params.permitted? # => true + # Person.new(params) # => # # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#456 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#474 def permit!; end - # Returns +true+ if the parameter is permitted, +false+ otherwise. + # Returns `true` if the parameter is permitted, `false` otherwise. # - # params = ActionController::Parameters.new - # params.permitted? # => false - # params.permit! - # params.permitted? # => true + # params = ActionController::Parameters.new + # params.permitted? # => false + # params.permit! + # params.permitted? # => true # # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#440 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#458 def permitted?; end - # Returns a new +ActionController::Parameters+ instance with items - # that the block evaluates to true removed. + # Returns a new `ActionController::Parameters` instance with items that the + # block evaluates to true removed. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#830 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#974 def reject(&block); end # Removes items that the block evaluates to true and returns self. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#835 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#979 def reject!(&block); end # This method accepts both a single key and an array of keys. # - # When passed a single key, if it exists and its associated value is - # either present or the singleton +false+, returns said value: + # When passed a single key, if it exists and its associated value is either + # present or the singleton `false`, returns said value: # - # ActionController::Parameters.new(person: { name: "Francesco" }).require(:person) - # # => #"Francesco"} permitted: false> + # ActionController::Parameters.new(person: { name: "Francesco" }).require(:person) + # # => #"Francesco"} permitted: false> # # Otherwise raises ActionController::ParameterMissing: # - # ActionController::Parameters.new.require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person + # ActionController::Parameters.new.require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person # - # ActionController::Parameters.new(person: nil).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person + # ActionController::Parameters.new(person: nil).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person # - # ActionController::Parameters.new(person: "\t").require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person + # ActionController::Parameters.new(person: "\t").require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person # - # ActionController::Parameters.new(person: {}).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person + # ActionController::Parameters.new(person: {}).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person # - # When given an array of keys, the method tries to require each one of them - # in order. If it succeeds, an array with the respective return values is - # returned: + # When given an array of keys, the method tries to require each one of them in + # order. If it succeeds, an array with the respective return values is returned: # - # params = ActionController::Parameters.new(user: { ... }, profile: { ... }) - # user_params, profile_params = params.require([:user, :profile]) + # params = ActionController::Parameters.new(user: { ... }, profile: { ... }) + # user_params, profile_params = params.require([:user, :profile]) # # Otherwise, the method re-raises the first exception found: # - # params = ActionController::Parameters.new(user: {}, profile: {}) - # user_params, profile_params = params.require([:user, :profile]) - # # ActionController::ParameterMissing: param is missing or the value is empty: user + # params = ActionController::Parameters.new(user: {}, profile: {}) + # user_params, profile_params = params.require([:user, :profile]) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: user # - # Technically this method can be used to fetch terminal values: + # This method is not recommended for fetching terminal values because it does + # not permit the values. For example, this can cause problems: # - # # CAREFUL - # params = ActionController::Parameters.new(person: { name: "Finn" }) - # name = params.require(:person).require(:name) # CAREFUL + # # CAREFUL + # params = ActionController::Parameters.new(person: { name: "Finn" }) + # name = params.require(:person).require(:name) # CAREFUL # - # but take into account that at some point those ones have to be permitted: + # It is recommended to use `expect` instead: # - # def person_params - # params.require(:person).permit(:name).tap do |person_params| - # person_params.require(:name) # SAFER + # def person_params + # # params.expect(person: :name).require(:name) # end - # end # - # for example. - # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#517 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#532 def require(key); end # This method accepts both a single key and an array of keys. # - # When passed a single key, if it exists and its associated value is - # either present or the singleton +false+, returns said value: + # When passed a single key, if it exists and its associated value is either + # present or the singleton `false`, returns said value: # - # ActionController::Parameters.new(person: { name: "Francesco" }).require(:person) - # # => #"Francesco"} permitted: false> + # ActionController::Parameters.new(person: { name: "Francesco" }).require(:person) + # # => #"Francesco"} permitted: false> # # Otherwise raises ActionController::ParameterMissing: # - # ActionController::Parameters.new.require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person + # ActionController::Parameters.new.require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person # - # ActionController::Parameters.new(person: nil).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person + # ActionController::Parameters.new(person: nil).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person # - # ActionController::Parameters.new(person: "\t").require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person + # ActionController::Parameters.new(person: "\t").require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person # - # ActionController::Parameters.new(person: {}).require(:person) - # # ActionController::ParameterMissing: param is missing or the value is empty: person + # ActionController::Parameters.new(person: {}).require(:person) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: person # - # When given an array of keys, the method tries to require each one of them - # in order. If it succeeds, an array with the respective return values is - # returned: + # When given an array of keys, the method tries to require each one of them in + # order. If it succeeds, an array with the respective return values is returned: # - # params = ActionController::Parameters.new(user: { ... }, profile: { ... }) - # user_params, profile_params = params.require([:user, :profile]) + # params = ActionController::Parameters.new(user: { ... }, profile: { ... }) + # user_params, profile_params = params.require([:user, :profile]) # # Otherwise, the method re-raises the first exception found: # - # params = ActionController::Parameters.new(user: {}, profile: {}) - # user_params, profile_params = params.require([:user, :profile]) - # # ActionController::ParameterMissing: param is missing or the value is empty: user + # params = ActionController::Parameters.new(user: {}, profile: {}) + # user_params, profile_params = params.require([:user, :profile]) + # # ActionController::ParameterMissing: param is missing or the value is empty or invalid: user # - # Technically this method can be used to fetch terminal values: + # This method is not recommended for fetching terminal values because it does + # not permit the values. For example, this can cause problems: # - # # CAREFUL - # params = ActionController::Parameters.new(person: { name: "Finn" }) - # name = params.require(:person).require(:name) # CAREFUL + # # CAREFUL + # params = ActionController::Parameters.new(person: { name: "Finn" }) + # name = params.require(:person).require(:name) # CAREFUL # - # but take into account that at some point those ones have to be permitted: + # It is recommended to use `expect` instead: # - # def person_params - # params.require(:person).permit(:name).tap do |person_params| - # person_params.require(:name) # SAFER + # def person_params + # # params.expect(person: :name).require(:name) # end - # end - # - # for example. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#517 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#532 def required(key); end - # Returns a new +ActionController::Parameters+ instance with all keys - # from current hash merged into +other_hash+. + # Returns a new `ActionController::Parameters` instance with all keys from + # current hash merged into `other_hash`. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#900 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1046 def reverse_merge(other_hash); end - # Returns the current +ActionController::Parameters+ instance with - # current hash merged into +other_hash+. + # Returns the current `ActionController::Parameters` instance with current hash + # merged into `other_hash`. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#909 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1055 def reverse_merge!(other_hash); end - # Returns a new +ActionController::Parameters+ instance with only - # items that the block evaluates to true. + # Returns a new `ActionController::Parameters` instance with only items that the + # block evaluates to true. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#817 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#961 def select(&block); end - # Equivalent to Hash#keep_if, but returns +nil+ if no changes were made. + # Equivalent to Hash#keep_if, but returns `nil` if no changes were made. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#822 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#966 def select!(&block); end - # Returns a new +ActionController::Parameters+ instance that - # includes only the given +keys+. If the given +keys+ - # don't exist, returns an empty hash. + # Returns a new `ActionController::Parameters` instance that includes only the + # given `keys`. If the given `keys` don't exist, returns an empty hash. # - # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) - # params.slice(:a, :b) # => #1, "b"=>2} permitted: false> - # params.slice(:d) # => # + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.slice(:a, :b) # => #1, "b"=>2} permitted: false> + # params.slice(:d) # => # # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#721 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#865 def slice(*keys); end - # Returns the current +ActionController::Parameters+ instance which - # contains only the given +keys+. + # Returns the current `ActionController::Parameters` instance which contains + # only the given `keys`. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#727 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#871 def slice!(*keys); end - # This is required by ActiveModel attribute assignment, so that user can - # pass +Parameters+ to a mass assignment methods in a model. It should not - # matter as we are using +HashWithIndifferentAccess+ internally. + # This is required by ActiveModel attribute assignment, so that user can pass + # `Parameters` to a mass assignment methods in a model. It should not matter as + # we are using `HashWithIndifferentAccess` internally. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#918 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1064 def stringify_keys; end - # Returns a safe ActiveSupport::HashWithIndifferentAccess - # representation of the parameters with all unpermitted keys removed. + # Returns a safe ActiveSupport::HashWithIndifferentAccess representation of the + # parameters with all unpermitted keys removed. # - # params = ActionController::Parameters.new({ - # name: "Senjougahara Hitagi", - # oddity: "Heavy stone crab" - # }) - # params.to_h - # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash + # params = ActionController::Parameters.new({ + # name: "Senjougahara Hitagi", + # oddity: "Heavy stone crab" + # }) + # params.to_h + # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash # - # safe_params = params.permit(:name) - # safe_params.to_h # => {"name"=>"Senjougahara Hitagi"} + # safe_params = params.permit(:name) + # safe_params.to_h # => {"name"=>"Senjougahara Hitagi"} # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#326 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#344 def to_h(&block); end - # Returns a safe Hash representation of the parameters - # with all unpermitted keys removed. + # Returns a safe `Hash` representation of the parameters with all unpermitted + # keys removed. # - # params = ActionController::Parameters.new({ - # name: "Senjougahara Hitagi", - # oddity: "Heavy stone crab" - # }) - # params.to_hash - # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash + # params = ActionController::Parameters.new({ + # name: "Senjougahara Hitagi", + # oddity: "Heavy stone crab" + # }) + # params.to_hash + # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash # - # safe_params = params.permit(:name) - # safe_params.to_hash # => {"name"=>"Senjougahara Hitagi"} + # safe_params = params.permit(:name) + # safe_params.to_hash # => {"name"=>"Senjougahara Hitagi"} # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#346 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#364 def to_hash; end # Returns a string representation of the receiver suitable for use as a URL # query string: # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # params.to_query - # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash + # params = ActionController::Parameters.new({ + # name: "David", + # nationality: "Danish" + # }) + # params.to_query + # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash # - # safe_params = params.permit(:name, :nationality) - # safe_params.to_query - # # => "name=David&nationality=Danish" + # safe_params = params.permit(:name, :nationality) + # safe_params.to_query + # # => "name=David&nationality=Danish" # # An optional namespace can be passed to enclose key names: # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # safe_params = params.permit(:name, :nationality) - # safe_params.to_query("user") - # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" + # params = ActionController::Parameters.new({ + # name: "David", + # nationality: "Danish" + # }) + # safe_params = params.permit(:name, :nationality) + # safe_params.to_query("user") + # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" # - # The string pairs "key=value" that conform the query string - # are sorted lexicographically in ascending order. + # The string pairs `"key=value"` that conform the query string are sorted + # lexicographically in ascending order. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#376 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#394 def to_param(*args); end # Returns a string representation of the receiver suitable for use as a URL # query string: # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # params.to_query - # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash + # params = ActionController::Parameters.new({ + # name: "David", + # nationality: "Danish" + # }) + # params.to_query + # # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash # - # safe_params = params.permit(:name, :nationality) - # safe_params.to_query - # # => "name=David&nationality=Danish" + # safe_params = params.permit(:name, :nationality) + # safe_params.to_query + # # => "name=David&nationality=Danish" # # An optional namespace can be passed to enclose key names: # - # params = ActionController::Parameters.new({ - # name: "David", - # nationality: "Danish" - # }) - # safe_params = params.permit(:name, :nationality) - # safe_params.to_query("user") - # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" + # params = ActionController::Parameters.new({ + # name: "David", + # nationality: "Danish" + # }) + # safe_params = params.permit(:name, :nationality) + # safe_params.to_query("user") + # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" # - # The string pairs "key=value" that conform the query string - # are sorted lexicographically in ascending order. + # The string pairs `"key=value"` that conform the query string are sorted + # lexicographically in ascending order. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#376 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#394 def to_query(*args); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#229 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#249 def to_s(*_arg0, **_arg1, &_arg2); end # Returns an unsafe, unfiltered ActiveSupport::HashWithIndifferentAccess # representation of the parameters. # - # params = ActionController::Parameters.new({ - # name: "Senjougahara Hitagi", - # oddity: "Heavy stone crab" - # }) - # params.to_unsafe_h - # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} + # params = ActionController::Parameters.new({ + # name: "Senjougahara Hitagi", + # oddity: "Heavy stone crab" + # }) + # params.to_unsafe_h + # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#390 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#408 def to_unsafe_h; end # Returns an unsafe, unfiltered ActiveSupport::HashWithIndifferentAccess # representation of the parameters. # - # params = ActionController::Parameters.new({ - # name: "Senjougahara Hitagi", - # oddity: "Heavy stone crab" - # }) - # params.to_unsafe_h - # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} + # params = ActionController::Parameters.new({ + # name: "Senjougahara Hitagi", + # oddity: "Heavy stone crab" + # }) + # params.to_unsafe_h + # # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"} # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#390 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#408 def to_unsafe_hash; end - # Returns a new +ActionController::Parameters+ instance with the - # results of running +block+ once for every key. The values are unchanged. + # Returns a new `ActionController::Parameters` instance with the results of + # running `block` once for every key. The values are unchanged. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#775 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#919 def transform_keys(&block); end # Performs keys transformation and returns the altered - # +ActionController::Parameters+ instance. + # `ActionController::Parameters` instance. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#784 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#928 def transform_keys!(&block); end - # Returns a new +ActionController::Parameters+ instance with the results of - # running +block+ once for every value. The keys are unchanged. + # Returns a new `ActionController::Parameters` instance with the results of + # running `block` once for every value. The keys are unchanged. # - # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) - # params.transform_values { |x| x * 2 } - # # => #2, "b"=>4, "c"=>6} permitted: false> + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.transform_values { |x| x * 2 } + # # => #2, "b"=>4, "c"=>6} permitted: false> # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#758 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#902 def transform_values; end # Performs values transformation and returns the altered - # +ActionController::Parameters+ instance. + # `ActionController::Parameters` instance. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#767 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#911 def transform_values!; end # Returns true if the given value is present for some key in the parameters. # # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#864 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1010 def value?(value); end # Returns a new array of the values of the parameters. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#419 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#437 def values; end - # Returns values that were assigned to the given +keys+. Note that all the - # +Hash+ objects will be converted to +ActionController::Parameters+. + # Returns values that were assigned to the given `keys`. Note that all the + # `Hash` objects will be converted to `ActionController::Parameters`. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#872 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1018 def values_at(*keys); end - # Returns a new +ActionController::Parameters+ instance with all keys - # from current hash merged into +other_hash+. + # Returns a new `ActionController::Parameters` instance with all keys from + # current hash merged into `other_hash`. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#900 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1046 def with_defaults(other_hash); end - # Returns the current +ActionController::Parameters+ instance with - # current hash merged into +other_hash+. + # Returns the current `ActionController::Parameters` instance with current hash + # merged into `other_hash`. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#909 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1055 def with_defaults!(other_hash); end - # Returns a new +ActionController::Parameters+ instance that - # filters out the given +keys+. + # Returns a new `ActionController::Parameters` instance that filters out the + # given `keys`. # - # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) - # params.except(:a, :b) # => #3} permitted: false> - # params.except(:d) # => #1, "b"=>2, "c"=>3} permitted: false> + # params = ActionController::Parameters.new(a: 1, b: 2, c: 3) + # params.except(:a, :b) # => #3} permitted: false> + # params.except(:d) # => #1, "b"=>2, "c"=>3} permitted: false> # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#738 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#882 def without(*keys); end protected - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#989 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1136 def each_nested_attribute; end # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#985 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1132 def nested_attributes?; end # Returns the value of attribute parameters. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#981 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1128 def parameters; end + # Filters self and optionally checks for unpermitted keys + # + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1143 + def permit_filters(filters, on_unpermitted: T.unsafe(nil), explicit_arrays: T.unsafe(nil)); end + # Sets the attribute permitted # # @param value the value to set the attribute permitted to. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#983 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1130 def permitted=(_arg0); end private + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1205 + def _deep_transform_keys_in_object(object, &block); end + + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1224 + def _deep_transform_keys_in_object!(object, &block); end + + # When an array is expected, you must specify an array explicitly + # using the following format: + # + # params.expect(comments: [[:flavor]]) + # + # Which will match only the following array formats: + # + # { pies: [{ flavor: "rhubarb" }, { flavor: "apple" }] } + # { pies: { "0" => { flavor: "key lime" }, "1" => { flavor: "mince" } } } + # + # When using `permit`, arrays are specified the same way as hashes: + # + # params.expect(pies: [:flavor]) + # + # In this case, `permit` would also allow matching with a hash (or vice versa): + # + # { pies: { flavor: "cherry" } } + # # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1131 - def array_of_permitted_scalars?(value); end + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1269 + def array_filter?(filter); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1018 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1185 def convert_hashes_to_parameters(key, value); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1002 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1169 def convert_parameters_to_hashes(value, using, &block); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1024 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1191 def convert_value_to_parameters(value); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1044 - def each_element(object, filter, &block); end + # Called when an explicit array filter is encountered. + # + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1274 + def each_array_element(object, filter, &block); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1143 - def hash_filter(params, filter); end + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1365 + def hash_filter(params, filter, on_unpermitted: T.unsafe(nil), explicit_arrays: T.unsafe(nil)); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1204 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1450 def initialize_copy(source); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#996 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1163 def new_instance_with_inherited_permitted_status(hash); end # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1137 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1359 def non_scalar?(value); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1187 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1433 def permit_any_in_array(array); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1170 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1416 def permit_any_in_parameters(params); end + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1395 + def permit_array_of_hashes(value, filter, on_unpermitted:, explicit_arrays:); end + + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1391 + def permit_array_of_scalars(value); end + + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1401 + def permit_hash(value, filter, on_unpermitted:, explicit_arrays:); end + + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1411 + def permit_hash_or_array(value, filter, on_unpermitted:, explicit_arrays:); end + + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1377 + def permit_value(value, filter, on_unpermitted:, explicit_arrays:); end + # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1102 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1330 def permitted_scalar?(value); end # Adds existing keys to the params if their values are scalar. # # For example: # - # puts self.keys #=> ["zipcode(90210i)"] - # params = {} + # puts self.keys #=> ["zipcode(90210i)"] + # params = {} # - # permitted_scalar_filter(params, "zipcode") + # permitted_scalar_filter(params, "zipcode") # - # puts params.keys # => ["zipcode"] + # puts params.keys # => ["zipcode"] # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1116 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1344 def permitted_scalar_filter(params, permitted_key); end # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1038 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1245 def specify_numeric_keys?(filter); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1070 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1299 def unpermitted_keys(params); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1057 - def unpermitted_parameters!(params); end + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1285 + def unpermitted_parameters!(params, on_unpermitted: T.unsafe(nil)); end class << self - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#145 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#164 def action_on_unpermitted_parameters; end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#145 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#164 def action_on_unpermitted_parameters=(val); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#245 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#265 def allow_deprecated_parameters_hash_equality; end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#245 - def allow_deprecated_parameters_hash_equality=(val); end + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#272 + def allow_deprecated_parameters_hash_equality=(value); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#243 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#262 def always_permitted_parameters; end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#243 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#262 def always_permitted_parameters=(val); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#926 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1072 def hook_into_yaml_loading; end # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#248 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#279 def nested_attribute?(key, value); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#143 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#162 def permit_all_parameters; end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#143 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#162 def permit_all_parameters=(val); end end end -# source://actionpack/lib/action_controller/metal/strong_parameters.rb#1141 +# source://actionpack/lib/action_controller/metal/strong_parameters.rb#1363 ActionController::Parameters::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_controller/metal/strong_parameters.rb#1142 +# source://actionpack/lib/action_controller/metal/strong_parameters.rb#1364 ActionController::Parameters::EMPTY_HASH = T.let(T.unsafe(nil), Hash) -# This is a list of permitted scalar types that includes the ones -# supported in XML and JSON requests. +# --- Filtering ---------------------------------------------------------- # -# This list is in particular used to filter ordinary requests, \String goes -# as first element to quickly short-circuit the common case. +# This is a list of permitted scalar types that includes the ones supported in +# XML and JSON requests. # -# If you modify this collection please update the one in the #permit doc -# as well. +# This list is in particular used to filter ordinary requests, String goes as +# first element to quickly short-circuit the common case. # -# source://actionpack/lib/action_controller/metal/strong_parameters.rb#1086 +# If you modify this collection please update the one in the #permit doc as +# well. +# +# source://actionpack/lib/action_controller/metal/strong_parameters.rb#1314 ActionController::Parameters::PERMITTED_SCALAR_TYPES = T.let(T.unsafe(nil), Array) -# = Action Controller Params Wrapper +# # Action Controller Params Wrapper # # Wraps the parameters hash into a nested hash. This will allow clients to # submit requests without having to specify any root elements. @@ -6012,8 +6486,8 @@ ActionController::Parameters::PERMITTED_SCALAR_TYPES = T.let(T.unsafe(nil), Arra # wrap_parameters format: [:json, :xml, :url_encoded_form, :multipart_form] # end # -# If you enable +ParamsWrapper+ for +:json+ format, instead of having to -# send JSON parameters like this: +# If you enable `ParamsWrapper` for `:json` format, instead of having to send +# JSON parameters like this: # # {"user": {"name": "Konata"}} # @@ -6022,45 +6496,44 @@ ActionController::Parameters::PERMITTED_SCALAR_TYPES = T.let(T.unsafe(nil), Arra # {"name": "Konata"} # # And it will be wrapped into a nested hash with the key name matching the -# controller's name. For example, if you're posting to +UsersController+, -# your new +params+ hash will look like this: +# controller's name. For example, if you're posting to `UsersController`, your +# new `params` hash will look like this: # # {"name" => "Konata", "user" => {"name" => "Konata"}} # -# You can also specify the key in which the parameters should be wrapped to, -# and also the list of attributes it should wrap by using either +:include+ or -# +:exclude+ options like this: +# You can also specify the key in which the parameters should be wrapped to, and +# also the list of attributes it should wrap by using either `:include` or +# `:exclude` options like this: # # class UsersController < ApplicationController # wrap_parameters :person, include: [:username, :password] # end # -# On Active Record models with no +:include+ or +:exclude+ option set, -# it will only wrap the parameters returned by the class method -# attribute_names. +# On Active Record models with no `:include` or `:exclude` option set, it will +# only wrap the parameters returned by the class method `attribute_names`. # -# If you're going to pass the parameters to an +ActiveModel+ object (such as -# User.new(params[:user])), you might consider passing the model class to -# the method instead. The +ParamsWrapper+ will actually try to determine the -# list of attribute names from the model and only wrap those attributes: +# If you're going to pass the parameters to an `ActiveModel` object (such as +# `User.new(params[:user])`), you might consider passing the model class to the +# method instead. The `ParamsWrapper` will actually try to determine the list of +# attribute names from the model and only wrap those attributes: # # class UsersController < ApplicationController # wrap_parameters Person # end # -# You still could pass +:include+ and +:exclude+ to set the list of attributes +# You still could pass `:include` and `:exclude` to set the list of attributes # you want to wrap. # # By default, if you don't specify the key in which the parameters would be -# wrapped to, +ParamsWrapper+ will actually try to determine if there's -# a model related to it or not. This controller, for example: +# wrapped to, `ParamsWrapper` will actually try to determine if there's a model +# related to it or not. This controller, for example: # # class Admin::UsersController < ApplicationController # end # -# will try to check if +Admin::User+ or +User+ model exists, and use it to -# determine the wrapper key respectively. If both models don't exist, -# it will then fall back to use +user+ as the key. +# will try to check if `Admin::User` or `User` model exists, and use it to +# determine the wrapper key respectively. If both models don't exist, it will +# then fall back to use `user` as the key. # # To disable this functionality for a controller: # @@ -6068,7 +6541,7 @@ ActionController::Parameters::PERMITTED_SCALAR_TYPES = T.let(T.unsafe(nil), Arra # wrap_parameters false # end # -# source://actionpack/lib/action_controller/metal/params_wrapper.rb#82 +# source://actionpack/lib/action_controller/metal/params_wrapper.rb#83 module ActionController::ParamsWrapper extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -6078,38 +6551,38 @@ module ActionController::ParamsWrapper private - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#279 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#277 def _extract_parameters(parameters); end - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#301 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#299 def _perform_parameter_wrapping; end # Returns the list of parameters which will be selected for wrapped. # - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#275 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#273 def _wrap_parameters(parameters); end # Checks if we should perform parameters wrapping. # # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#291 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#289 def _wrapper_enabled?; end # Returns the list of enabled formats. # - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#270 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#268 def _wrapper_formats; end # Returns the wrapper key which will be used to store wrapped parameters. # - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#265 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#263 def _wrapper_key; end - # Performs parameters wrapping upon the request. Called automatically - # by the metal call stack. + # Performs parameters wrapping upon the request. Called automatically by the + # metal call stack. # - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#259 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#257 def process_action(*_arg0); end module GeneratedClassMethods @@ -6125,161 +6598,206 @@ module ActionController::ParamsWrapper end end -# source://actionpack/lib/action_controller/metal/params_wrapper.rb#190 +# source://actionpack/lib/action_controller/metal/params_wrapper.rb#188 module ActionController::ParamsWrapper::ClassMethods - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#191 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#189 def _set_wrapper_options(options); end - # Sets the default wrapper key or model which will be used to determine - # wrapper key and attribute names. Called automatically when the - # module is inherited. + # Sets the default wrapper key or model which will be used to determine wrapper + # key and attribute names. Called automatically when the module is inherited. # - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#246 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#244 def inherited(klass); end - # Sets the name of the wrapper key, or the model which +ParamsWrapper+ - # would use to determine the attribute names from. + # Sets the name of the wrapper key, or the model which `ParamsWrapper` would use + # to determine the attribute names from. # - # ==== Examples - # wrap_parameters format: :xml - # # enables the parameter wrapper for XML format + # #### Examples + # wrap_parameters format: :xml + # # enables the parameter wrapper for XML format # - # wrap_parameters :person - # # wraps parameters into +params[:person]+ hash + # wrap_parameters :person + # # wraps parameters into +params[:person]+ hash # - # wrap_parameters Person - # # wraps parameters by determining the wrapper key from Person class - # # (+person+, in this case) and the list of attribute names + # wrap_parameters Person + # # wraps parameters by determining the wrapper key from Person class + # # (+person+, in this case) and the list of attribute names # - # wrap_parameters include: [:username, :title] - # # wraps only +:username+ and +:title+ attributes from parameters. + # wrap_parameters include: [:username, :title] + # # wraps only +:username+ and +:title+ attributes from parameters. # - # wrap_parameters false - # # disables parameters wrapping for this controller altogether. + # wrap_parameters false + # # disables parameters wrapping for this controller altogether. # - # ==== Options - # * :format - The list of formats in which the parameters wrapper - # will be enabled. - # * :include - The list of attribute names which parameters wrapper - # will wrap into a nested hash. - # * :exclude - The list of attribute names which parameters wrapper - # will exclude from a nested hash. + # #### Options + # * `:format` - The list of formats in which the parameters wrapper will be + # enabled. + # * `:include` - The list of attribute names which parameters wrapper will + # wrap into a nested hash. + # * `:exclude` - The list of attribute names which parameters wrapper will + # exclude from a nested hash. # - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#222 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#221 def wrap_parameters(name_or_model_or_options, options = T.unsafe(nil)); end end -# source://actionpack/lib/action_controller/metal/params_wrapper.rb#85 +# source://actionpack/lib/action_controller/metal/params_wrapper.rb#86 ActionController::ParamsWrapper::EXCLUDE_PARAMETERS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_controller/metal/params_wrapper.rb#89 +# source://actionpack/lib/action_controller/metal/params_wrapper.rb#88 class ActionController::ParamsWrapper::Options < ::Struct - include ::Mutex_m - # @return [Options] a new instance of Options # - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#100 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#97 def initialize(name, format, include, exclude, klass, model); end # Returns the value of attribute include # # @return [Object] the current value of include # - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#110 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#108 def include; end - # source://mutex_m/0.2.0lib/mutex_m.rb#91 - def lock; end - - # source://mutex_m/0.2.0lib/mutex_m.rb#81 - def locked?; end - # Returns the value of attribute model # # @return [Object] the current value of model # - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#106 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#104 def model; end # Returns the value of attribute name # # @return [Object] the current value of name # - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#143 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#141 def name; end - # source://mutex_m/0.2.0lib/mutex_m.rb#76 - def synchronize(&block); end - - # source://mutex_m/0.2.0lib/mutex_m.rb#86 - def try_lock; end - - # source://mutex_m/0.2.0lib/mutex_m.rb#96 - def unlock; end - private - # Determine the wrapper model from the controller's name. By convention, - # this could be done by trying to find the defined model that has the - # same singular name as the controller. For example, +UsersController+ - # will try to find if the +User+ model exists. + # Determine the wrapper model from the controller's name. By convention, this + # could be done by trying to find the defined model that has the same singular + # name as the controller. For example, `UsersController` will try to find if the + # `User` model exists. # - # This method also does namespace lookup. Foo::Bar::UsersController will - # try to find Foo::Bar::User, Foo::User and finally User. + # This method also does namespace lookup. Foo::Bar::UsersController will try to + # find Foo::Bar::User, Foo::User and finally User. # - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#167 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#165 def _default_wrap_model; end class << self - # source://actionpack/lib/action_controller/metal/params_wrapper.rb#92 + # source://actionpack/lib/action_controller/metal/params_wrapper.rb#89 def from_hash(hash); end end end -# source://actionpack/lib/action_controller/metal/permissions_policy.rb#4 +# source://actionpack/lib/action_controller/metal/permissions_policy.rb#6 module ActionController::PermissionsPolicy extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionController::PermissionsPolicy::ClassMethods end -# source://actionpack/lib/action_controller/metal/permissions_policy.rb#7 +# source://actionpack/lib/action_controller/metal/permissions_policy.rb#9 module ActionController::PermissionsPolicy::ClassMethods - # Overrides parts of the globally configured +Feature-Policy+ - # header: + # Overrides parts of the globally configured `Feature-Policy` header: # - # class PagesController < ApplicationController - # permissions_policy do |policy| - # policy.geolocation "https://example.com" + # class PagesController < ApplicationController + # permissions_policy do |policy| + # policy.geolocation "https://example.com" + # end # end - # end # - # Options can be passed similar to +before_action+. For example, pass - # only: :index to override the header on the index action only: + # Options can be passed similar to `before_action`. For example, pass `only: + # :index` to override the header on the index action only: # - # class PagesController < ApplicationController - # permissions_policy(only: :index) do |policy| - # policy.camera :self + # class PagesController < ApplicationController + # permissions_policy(only: :index) do |policy| + # policy.camera :self + # end # end - # end # - # source://actionpack/lib/action_controller/metal/permissions_policy.rb#26 + # source://actionpack/lib/action_controller/metal/permissions_policy.rb#27 def permissions_policy(**options, &block); end end -# source://actionpack/lib/action_controller/railtie.rb#11 +# source://actionpack/lib/action_controller/railtie.rb#13 class ActionController::Railtie < ::Rails::Railtie; end -# source://actionpack/lib/action_controller/railties/helpers.rb#4 +# source://actionpack/lib/action_controller/railties/helpers.rb#6 module ActionController::Railties; end -# source://actionpack/lib/action_controller/railties/helpers.rb#5 +# source://actionpack/lib/action_controller/railties/helpers.rb#7 module ActionController::Railties::Helpers - # source://actionpack/lib/action_controller/railties/helpers.rb#6 + # source://actionpack/lib/action_controller/railties/helpers.rb#8 def inherited(klass); end end -# source://actionpack/lib/action_controller/metal/redirecting.rb#4 +# source://actionpack/lib/action_controller/metal/rate_limiting.rb#6 +module ActionController::RateLimiting + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionController::RateLimiting::ClassMethods + + private + + # source://actionpack/lib/action_controller/metal/rate_limiting.rb#61 + def rate_limiting(to:, within:, by:, with:, store:, name:); end +end + +# source://actionpack/lib/action_controller/metal/rate_limiting.rb#9 +module ActionController::RateLimiting::ClassMethods + # Applies a rate limit to all actions or those specified by the normal + # `before_action` filters with `only:` and `except:`. + # + # The maximum number of requests allowed is specified `to:` and constrained to + # the window of time given by `within:`. + # + # Rate limits are by default unique to the ip address making the request, but + # you can provide your own identity function by passing a callable in the `by:` + # parameter. It's evaluated within the context of the controller processing the + # request. + # + # Requests that exceed the rate limit are refused with a `429 Too Many Requests` + # response. You can specialize this by passing a callable in the `with:` + # parameter. It's evaluated within the context of the controller processing the + # request. + # + # Rate limiting relies on a backing `ActiveSupport::Cache` store and defaults to + # `config.action_controller.cache_store`, which itself defaults to the global + # `config.cache_store`. If you don't want to store rate limits in the same + # datastore as your general caches, you can pass a custom store in the `store` + # parameter. + # + # If you want to use multiple rate limits per controller, you need to give each of + # them and explicit name via the `name:` option. + # + # Examples: + # + # class SessionsController < ApplicationController + # rate_limit to: 10, within: 3.minutes, only: :create + # end + # + # class SignupsController < ApplicationController + # rate_limit to: 1000, within: 10.seconds, + # by: -> { request.domain }, with: -> { redirect_to busy_controller_url, alert: "Too many signups on domain!" }, only: :new + # end + # + # class APIController < ApplicationController + # RATE_LIMIT_STORE = ActiveSupport::Cache::RedisCacheStore.new(url: ENV["REDIS_URL"]) + # rate_limit to: 10, within: 3.minutes, store: RATE_LIMIT_STORE + # end + # + # class SessionsController < ApplicationController + # rate_limit to: 3, within: 2.seconds, name: "short-term" + # rate_limit to: 10, within: 5.minutes, name: "long-term" + # end + # + # source://actionpack/lib/action_controller/metal/rate_limiting.rb#55 + def rate_limit(to:, within:, by: T.unsafe(nil), with: T.unsafe(nil), store: T.unsafe(nil), name: T.unsafe(nil), **options); end +end + +# source://actionpack/lib/action_controller/metal/redirecting.rb#6 module ActionController::Redirecting extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -6292,157 +6810,181 @@ module ActionController::Redirecting mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods - # source://actionpack/lib/action_controller/metal/redirecting.rb#136 + # source://actionpack/lib/action_controller/metal/redirecting.rb#158 def _compute_redirect_to_location(request, options); end - # Soft deprecated alias for #redirect_back_or_to where the +fallback_location+ location is supplied as a keyword argument instead - # of the first positional argument. + # Soft deprecated alias for #redirect_back_or_to where the `fallback_location` + # location is supplied as a keyword argument instead of the first positional + # argument. # - # source://actionpack/lib/action_controller/metal/redirecting.rb#101 + # source://actionpack/lib/action_controller/metal/redirecting.rb#121 def redirect_back(fallback_location:, allow_other_host: T.unsafe(nil), **args); end - # Redirects the browser to the page that issued the request (the referrer) - # if possible, otherwise redirects to the provided default fallback - # location. + # Redirects the browser to the page that issued the request (the referrer) if + # possible, otherwise redirects to the provided default fallback location. # - # The referrer information is pulled from the HTTP +Referer+ (sic) header on - # the request. This is an optional header and its presence on the request is - # subject to browser security settings and user preferences. If the request - # is missing this header, the fallback_location will be used. + # The referrer information is pulled from the HTTP `Referer` (sic) header on the + # request. This is an optional header and its presence on the request is subject + # to browser security settings and user preferences. If the request is missing + # this header, the `fallback_location` will be used. # - # redirect_back_or_to({ action: "show", id: 5 }) - # redirect_back_or_to @post - # redirect_back_or_to "http://www.rubyonrails.org" - # redirect_back_or_to "/images/screenshot.jpg" - # redirect_back_or_to posts_url - # redirect_back_or_to proc { edit_post_url(@post) } - # redirect_back_or_to '/', allow_other_host: false + # redirect_back_or_to({ action: "show", id: 5 }) + # redirect_back_or_to @post + # redirect_back_or_to "http://www.rubyonrails.org" + # redirect_back_or_to "/images/screenshot.jpg" + # redirect_back_or_to posts_url + # redirect_back_or_to proc { edit_post_url(@post) } + # redirect_back_or_to '/', allow_other_host: false # - # ==== Options - # * :allow_other_host - Allow or disallow redirection to the host that is different to the current host, defaults to true. + # #### Options + # * `:allow_other_host` - Allow or disallow redirection to the host that is + # different to the current host, defaults to true. # - # All other options that can be passed to #redirect_to are accepted as - # options, and the behavior is identical. # - # source://actionpack/lib/action_controller/metal/redirecting.rb#127 + # All other options that can be passed to #redirect_to are accepted as options, + # and the behavior is identical. + # + # source://actionpack/lib/action_controller/metal/redirecting.rb#148 def redirect_back_or_to(fallback_location, allow_other_host: T.unsafe(nil), **options); end - # Redirects the browser to the target specified in +options+. This parameter can be any one of: + # Redirects the browser to the target specified in `options`. This parameter can + # be any one of: + # + # * `Hash` - The URL will be generated by calling url_for with the `options`. + # * `Record` - The URL will be generated by calling url_for with the + # `options`, which will reference a named URL for that record. + # * `String` starting with `protocol://` (like `http://`) or a protocol + # relative reference (like `//`) - Is passed straight through as the target + # for redirection. + # * `String` not containing a protocol - The current protocol and host is + # prepended to the string. + # * `Proc` - A block that will be executed in the controller's context. Should + # return any option accepted by `redirect_to`. # - # * Hash - The URL will be generated by calling url_for with the +options+. - # * Record - The URL will be generated by calling url_for with the +options+, which will reference a named URL for that record. - # * String starting with protocol:// (like http://) or a protocol relative reference (like //) - Is passed straight through as the target for redirection. - # * String not containing a protocol - The current protocol and host is prepended to the string. - # * Proc - A block that will be executed in the controller's context. Should return any option accepted by +redirect_to+. # - # === Examples + # ### Examples # - # redirect_to action: "show", id: 5 - # redirect_to @post - # redirect_to "http://www.rubyonrails.org" - # redirect_to "/images/screenshot.jpg" - # redirect_to posts_url - # redirect_to proc { edit_post_url(@post) } + # redirect_to action: "show", id: 5 + # redirect_to @post + # redirect_to "http://www.rubyonrails.org" + # redirect_to "/images/screenshot.jpg" + # redirect_to posts_url + # redirect_to proc { edit_post_url(@post) } # - # The redirection happens as a 302 Found header unless otherwise specified using the :status option: + # The redirection happens as a `302 Found` header unless otherwise specified + # using the `:status` option: # - # redirect_to post_url(@post), status: :found - # redirect_to action: 'atom', status: :moved_permanently - # redirect_to post_url(@post), status: 301 - # redirect_to action: 'atom', status: 302 + # redirect_to post_url(@post), status: :found + # redirect_to action: 'atom', status: :moved_permanently + # redirect_to post_url(@post), status: 301 + # redirect_to action: 'atom', status: 302 # - # The status code can either be a standard {HTTP Status code}[https://www.iana.org/assignments/http-status-codes] as an - # integer, or a symbol representing the downcased, underscored and symbolized description. - # Note that the status code must be a 3xx HTTP code, or redirection will not occur. + # The status code can either be a standard [HTTP Status + # code](https://www.iana.org/assignments/http-status-codes) as an integer, or a + # symbol representing the downcased, underscored and symbolized description. + # Note that the status code must be a 3xx HTTP code, or redirection will not + # occur. # # If you are using XHR requests other than GET or POST and redirecting after the # request then some browsers will follow the redirect using the original request # method. This may lead to undesirable behavior such as a double DELETE. To work - # around this you can return a 303 See Other status code which will be + # around this you can return a `303 See Other` status code which will be # followed using a GET request. # - # redirect_to posts_url, status: :see_other - # redirect_to action: 'index', status: 303 + # redirect_to posts_url, status: :see_other + # redirect_to action: 'index', status: 303 # - # It is also possible to assign a flash message as part of the redirection. There are two special accessors for the commonly used flash names - # +alert+ and +notice+ as well as a general purpose +flash+ bucket. + # It is also possible to assign a flash message as part of the redirection. + # There are two special accessors for the commonly used flash names `alert` and + # `notice` as well as a general purpose `flash` bucket. # - # redirect_to post_url(@post), alert: "Watch it, mister!" - # redirect_to post_url(@post), status: :found, notice: "Pay attention to the road" - # redirect_to post_url(@post), status: 301, flash: { updated_post_id: @post.id } - # redirect_to({ action: 'atom' }, alert: "Something serious happened") + # redirect_to post_url(@post), alert: "Watch it, mister!" + # redirect_to post_url(@post), status: :found, notice: "Pay attention to the road" + # redirect_to post_url(@post), status: 301, flash: { updated_post_id: @post.id } + # redirect_to({ action: 'atom' }, alert: "Something serious happened") # - # Statements after +redirect_to+ in our controller get executed, so +redirect_to+ doesn't stop the execution of the function. - # To terminate the execution of the function immediately after the +redirect_to+, use return. + # Statements after `redirect_to` in our controller get executed, so + # `redirect_to` doesn't stop the execution of the function. To terminate the + # execution of the function immediately after the `redirect_to`, use return. # - # redirect_to post_url(@post) and return + # redirect_to post_url(@post) and return # - # === Open Redirect protection + # ### Open Redirect protection # - # By default, \Rails protects against redirecting to external hosts for your app's safety, so called open redirects. - # Note: this was a new default in \Rails 7.0, after upgrading opt-in by uncommenting the line with +raise_on_open_redirects+ in config/initializers/new_framework_defaults_7_0.rb + # By default, Rails protects against redirecting to external hosts for your + # app's safety, so called open redirects. Note: this was a new default in Rails + # 7.0, after upgrading opt-in by uncommenting the line with + # `raise_on_open_redirects` in + # `config/initializers/new_framework_defaults_7_0.rb` # # Here #redirect_to automatically validates the potentially-unsafe URL: # - # redirect_to params[:redirect_url] + # redirect_to params[:redirect_url] # # Raises UnsafeRedirectError in the case of an unsafe redirect. # - # To allow any external redirects pass allow_other_host: true, though using a user-provided param in that case is unsafe. + # To allow any external redirects pass `allow_other_host: true`, though using a + # user-provided param in that case is unsafe. # - # redirect_to "https://rubyonrails.org", allow_other_host: true + # redirect_to "https://rubyonrails.org", allow_other_host: true # - # See #url_from for more information on what an internal and safe URL is, or how to fall back to an alternate redirect URL in the unsafe case. + # See #url_from for more information on what an internal and safe URL is, or how + # to fall back to an alternate redirect URL in the unsafe case. # # @raise [ActionControllerError] # - # source://actionpack/lib/action_controller/metal/redirecting.rb#84 + # source://actionpack/lib/action_controller/metal/redirecting.rb#103 def redirect_to(options = T.unsafe(nil), response_options = T.unsafe(nil)); end - # Verifies the passed +location+ is an internal URL that's safe to redirect to and returns it, or nil if not. - # Useful to wrap a params provided redirect URL and fall back to an alternate URL to redirect to: + # Verifies the passed `location` is an internal URL that's safe to redirect to + # and returns it, or nil if not. Useful to wrap a params provided redirect URL + # and fall back to an alternate URL to redirect to: # - # redirect_to url_from(params[:redirect_url]) || root_url + # redirect_to url_from(params[:redirect_url]) || root_url # - # The +location+ is considered internal, and safe, if it's on the same host as request.host: + # The `location` is considered internal, and safe, if it's on the same host as + # `request.host`: # - # # If request.host is example.com: - # url_from("https://example.com/profile") # => "https://example.com/profile" - # url_from("http://example.com/profile") # => "http://example.com/profile" - # url_from("http://evil.com/profile") # => nil + # # If request.host is example.com: + # url_from("https://example.com/profile") # => "https://example.com/profile" + # url_from("http://example.com/profile") # => "http://example.com/profile" + # url_from("http://evil.com/profile") # => nil # # Subdomains are considered part of the host: # - # # If request.host is on https://example.com or https://app.example.com, you'd get: - # url_from("https://dev.example.com/profile") # => nil + # # If request.host is on https://example.com or https://app.example.com, you'd get: + # url_from("https://dev.example.com/profile") # => nil # - # NOTE: there's a similarity with {url_for}[rdoc-ref:ActionDispatch::Routing::UrlFor#url_for], which generates an internal URL from various options from within the app, e.g. url_for(@post). - # However, #url_from is meant to take an external parameter to verify as in url_from(params[:redirect_url]). + # NOTE: there's a similarity with + # [url_for](rdoc-ref:ActionDispatch::Routing::UrlFor#url_for), which generates + # an internal URL from various options from within the app, e.g. + # `url_for(@post)`. However, #url_from is meant to take an external parameter to + # verify as in `url_from(params[:redirect_url])`. # - # source://actionpack/lib/action_controller/metal/redirecting.rb#175 + # source://actionpack/lib/action_controller/metal/redirecting.rb#202 def url_from(location); end private - # source://actionpack/lib/action_controller/metal/redirecting.rb#181 + # source://actionpack/lib/action_controller/metal/redirecting.rb#208 def _allow_other_host; end - # source://actionpack/lib/action_controller/metal/redirecting.rb#195 + # source://actionpack/lib/action_controller/metal/redirecting.rb#222 def _enforce_open_redirect_protection(location, allow_other_host:); end - # source://actionpack/lib/action_controller/metal/redirecting.rb#214 + # source://actionpack/lib/action_controller/metal/redirecting.rb#241 def _ensure_url_is_http_header_safe(url); end - # source://actionpack/lib/action_controller/metal/redirecting.rb#185 + # source://actionpack/lib/action_controller/metal/redirecting.rb#212 def _extract_redirect_to_status(options, response_options); end # @return [Boolean] # - # source://actionpack/lib/action_controller/metal/redirecting.rb#203 + # source://actionpack/lib/action_controller/metal/redirecting.rb#230 def _url_host_allowed?(url); end class << self - # source://actionpack/lib/action_controller/metal/redirecting.rb#136 + # source://actionpack/lib/action_controller/metal/redirecting.rb#158 def _compute_redirect_to_location(request, options); end end @@ -6459,130 +7001,135 @@ module ActionController::Redirecting end end -# source://actionpack/lib/action_controller/metal/redirecting.rb#12 +# source://actionpack/lib/action_controller/metal/redirecting.rb#14 ActionController::Redirecting::ILLEGAL_HEADER_VALUE_REGEX = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_controller/metal/redirecting.rb#10 +# source://actionpack/lib/action_controller/metal/redirecting.rb#12 class ActionController::Redirecting::UnsafeRedirectError < ::StandardError; end -# source://actionpack/lib/action_controller/metal/exceptions.rb#14 +# source://actionpack/lib/action_controller/metal/exceptions.rb#16 class ActionController::RenderError < ::ActionController::ActionControllerError; end -# = Action Controller \Renderer +# # Action Controller Renderer # # ActionController::Renderer allows you to render arbitrary templates without # being inside a controller action. # -# You can get a renderer instance by calling +renderer+ on a controller class: +# You can get a renderer instance by calling `renderer` on a controller class: # -# ApplicationController.renderer -# PostsController.renderer +# ApplicationController.renderer +# PostsController.renderer # # and render a template by calling the #render method: # -# ApplicationController.renderer.render template: "posts/show", assigns: { post: Post.first } -# PostsController.renderer.render :show, assigns: { post: Post.first } +# ApplicationController.renderer.render template: "posts/show", assigns: { post: Post.first } +# PostsController.renderer.render :show, assigns: { post: Post.first } # -# As a shortcut, you can also call +render+ directly on the controller class itself: +# As a shortcut, you can also call `render` directly on the controller class +# itself: # -# ApplicationController.render template: "posts/show", assigns: { post: Post.first } -# PostsController.render :show, assigns: { post: Post.first } +# ApplicationController.render template: "posts/show", assigns: { post: Post.first } +# PostsController.render :show, assigns: { post: Post.first } # -# source://actionpack/lib/action_controller/renderer.rb#24 +# source://actionpack/lib/action_controller/renderer.rb#27 class ActionController::Renderer # Initializes a new Renderer. # - # ==== Parameters - # - # * +controller+ - The controller class to instantiate for rendering. - # * +env+ - The Rack env to use for mocking a request when rendering. - # Entries can be typical Rack env keys and values, or they can be any of - # the following, which will be converted appropriately: - # * +:http_host+ - The HTTP host for the incoming request. Converts to - # Rack's +HTTP_HOST+. - # * +:https+ - Boolean indicating whether the incoming request uses HTTPS. - # Converts to Rack's +HTTPS+. - # * +:method+ - The HTTP method for the incoming request, case-insensitive. - # Converts to Rack's +REQUEST_METHOD+. - # * +:script_name+ - The portion of the incoming request's URL path that - # corresponds to the application. Converts to Rack's +SCRIPT_NAME+. - # * +:input+ - The input stream. Converts to Rack's +rack.input+. - # * +defaults+ - Default values for the Rack env. Entries are specified in - # the same format as +env+. +env+ will be merged on top of these values. - # +defaults+ will be retained when calling #new on a renderer instance. - # - # If no +http_host+ is specified, the env HTTP host will be derived from the - # routes' +default_url_options+. In this case, the +https+ boolean and the - # +script_name+ will also be derived from +default_url_options+ if they were - # not specified. Additionally, the +https+ boolean will fall back to - # +Rails.application.config.force_ssl+ if +default_url_options+ does not - # specify a +protocol+. + # #### Parameters + # + # * `controller` - The controller class to instantiate for rendering. + # * `env` - The Rack env to use for mocking a request when rendering. Entries + # can be typical Rack env keys and values, or they can be any of the + # following, which will be converted appropriately: + # * `:http_host` - The HTTP host for the incoming request. Converts to + # Rack's `HTTP_HOST`. + # * `:https` - Boolean indicating whether the incoming request uses HTTPS. + # Converts to Rack's `HTTPS`. + # * `:method` - The HTTP method for the incoming request, + # case-insensitive. Converts to Rack's `REQUEST_METHOD`. + # * `:script_name` - The portion of the incoming request's URL path that + # corresponds to the application. Converts to Rack's `SCRIPT_NAME`. + # * `:input` - The input stream. Converts to Rack's `rack.input`. + # + # * `defaults` - Default values for the Rack env. Entries are specified in the + # same format as `env`. `env` will be merged on top of these values. + # `defaults` will be retained when calling #new on a renderer instance. + # + # + # If no `http_host` is specified, the env HTTP host will be derived from the + # routes' `default_url_options`. In this case, the `https` boolean and the + # `script_name` will also be derived from `default_url_options` if they were not + # specified. Additionally, the `https` boolean will fall back to + # `Rails.application.config.force_ssl` if `default_url_options` does not specify + # a `protocol`. # # @return [Renderer] a new instance of Renderer # - # source://actionpack/lib/action_controller/renderer.rb#106 + # source://actionpack/lib/action_controller/renderer.rb#111 def initialize(controller, env, defaults); end # Returns the value of attribute controller. # - # source://actionpack/lib/action_controller/renderer.rb#25 + # source://actionpack/lib/action_controller/renderer.rb#28 def controller; end - # source://actionpack/lib/action_controller/renderer.rb#117 + # source://actionpack/lib/action_controller/renderer.rb#122 def defaults; end # Creates a new renderer using the same controller, but with a new Rack env. # - # ApplicationController.renderer.new(method: "post") + # ApplicationController.renderer.new(method: "post") # - # source://actionpack/lib/action_controller/renderer.rb#69 + # source://actionpack/lib/action_controller/renderer.rb#72 def new(env = T.unsafe(nil)); end - # source://actionpack/lib/action_controller/renderer.rb#145 - def normalize_env(env, &block); end + # source://actionpack/lib/action_controller/renderer.rb#151 + def normalize_env(env, &_arg1); end - # Renders a template to a string, just like ActionController::Rendering#render_to_string. + # Renders a template to a string, just like + # ActionController::Rendering#render_to_string. # - # source://actionpack/lib/action_controller/renderer.rb#123 + # source://actionpack/lib/action_controller/renderer.rb#129 def render(*args); end - # Renders a template to a string, just like ActionController::Rendering#render_to_string. + # Renders a template to a string, just like + # ActionController::Rendering#render_to_string. # - # source://actionpack/lib/action_controller/renderer.rb#123 + # source://actionpack/lib/action_controller/renderer.rb#129 def render_to_string(*args); end - # Creates a new renderer using the same controller, but with the given - # defaults merged on top of the previous defaults. + # Creates a new renderer using the same controller, but with the given defaults + # merged on top of the previous defaults. # - # source://actionpack/lib/action_controller/renderer.rb#75 + # source://actionpack/lib/action_controller/renderer.rb#78 def with_defaults(defaults); end private - # source://actionpack/lib/action_controller/renderer.rb#147 + # source://actionpack/lib/action_controller/renderer.rb#153 def env_for_request; end class << self # Creates a new renderer using the given controller class. See ::new. # - # source://actionpack/lib/action_controller/renderer.rb#61 + # source://actionpack/lib/action_controller/renderer.rb#64 def for(controller, env = T.unsafe(nil), defaults = T.unsafe(nil)); end - # source://actionpack/lib/action_controller/renderer.rb#32 + # source://actionpack/lib/action_controller/renderer.rb#35 def normalize_env(env); end end end -# source://actionpack/lib/action_controller/renderer.rb#27 +# source://actionpack/lib/action_controller/renderer.rb#30 ActionController::Renderer::DEFAULTS = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_controller/renderer.rb#143 +# source://actionpack/lib/action_controller/renderer.rb#149 ActionController::Renderer::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_controller/renderer.rb#135 +# source://actionpack/lib/action_controller/renderer.rb#141 ActionController::Renderer::RACK_KEY_TRANSLATION = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_controller/metal/renderers.rb#23 +# source://actionpack/lib/action_controller/metal/renderers.rb#25 module ActionController::Renderers extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -6590,71 +7137,70 @@ module ActionController::Renderers mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActionController::Renderers::ClassMethods - # source://actionpack/lib/action_controller/metal/renderers.rb#144 + # source://actionpack/lib/action_controller/metal/renderers.rb#145 def _render_to_body_with_renderer(options); end - # source://actionpack/lib/action_controller/metal/renderers.rb#170 + # source://actionpack/lib/action_controller/metal/renderers.rb#172 def _render_with_renderer_js(js, options); end - # source://actionpack/lib/action_controller/metal/renderers.rb#155 + # source://actionpack/lib/action_controller/metal/renderers.rb#156 def _render_with_renderer_json(json, options); end - # source://actionpack/lib/action_controller/metal/renderers.rb#175 + # source://actionpack/lib/action_controller/metal/renderers.rb#177 def _render_with_renderer_xml(xml, options); end - # Called by +render+ in AbstractController::Rendering - # which sets the return value as the +response_body+. + # Called by `render` in AbstractController::Rendering which sets the return + # value as the `response_body`. # - # If no renderer is found, +super+ returns control to - # ActionView::Rendering.render_to_body, if present. + # If no renderer is found, `super` returns control to + # `ActionView::Rendering.render_to_body`, if present. # - # source://actionpack/lib/action_controller/metal/renderers.rb#140 + # source://actionpack/lib/action_controller/metal/renderers.rb#141 def render_to_body(options); end class << self - # source://actionpack/lib/action_controller/metal/renderers.rb#90 + # source://actionpack/lib/action_controller/metal/renderers.rb#91 def _render_with_renderer_method_name(key); end - # Adds a new renderer to call within controller actions. - # A renderer is invoked by passing its name as an option to - # AbstractController::Rendering#render. To create a renderer - # pass it a name and a block. The block takes two arguments, the first - # is the value paired with its key and the second is the remaining - # hash of options passed to +render+. + # Adds a new renderer to call within controller actions. A renderer is invoked + # by passing its name as an option to AbstractController::Rendering#render. To + # create a renderer pass it a name and a block. The block takes two arguments, + # the first is the value paired with its key and the second is the remaining + # hash of options passed to `render`. # # Create a csv renderer: # - # ActionController::Renderers.add :csv do |obj, options| - # filename = options[:filename] || 'data' - # str = obj.respond_to?(:to_csv) ? obj.to_csv : obj.to_s - # send_data str, type: Mime[:csv], - # disposition: "attachment; filename=#{filename}.csv" - # end + # ActionController::Renderers.add :csv do |obj, options| + # filename = options[:filename] || 'data' + # str = obj.respond_to?(:to_csv) ? obj.to_csv : obj.to_s + # send_data str, type: Mime[:csv], + # disposition: "attachment; filename=#{filename}.csv" + # end # - # Note that we used Mime[:csv] for the csv mime type as it comes with \Rails. + # Note that we used [Mime](:csv) for the csv mime type as it comes with Rails. # For a custom renderer, you'll need to register a mime type with - # Mime::Type.register. + # `Mime::Type.register`. # # To use the csv renderer in a controller action: # - # def show - # @csvable = Csvable.find(params[:id]) - # respond_to do |format| - # format.html - # format.csv { render csv: @csvable, filename: @csvable.name } + # def show + # @csvable = Csvable.find(params[:id]) + # respond_to do |format| + # format.html + # format.csv { render csv: @csvable, filename: @csvable.name } + # end # end - # end # - # source://actionpack/lib/action_controller/metal/renderers.rb#74 + # source://actionpack/lib/action_controller/metal/renderers.rb#75 def add(key, &block); end # This method is the opposite of add method. # # To remove a csv renderer: # - # ActionController::Renderers.remove(:csv) + # ActionController::Renderers.remove(:csv) # - # source://actionpack/lib/action_controller/metal/renderers.rb#84 + # source://actionpack/lib/action_controller/metal/renderers.rb#85 def remove(key); end end @@ -6674,7 +7220,7 @@ end # Used in ActionController::Base and ActionController::API to include all # renderers by default. # -# source://actionpack/lib/action_controller/metal/renderers.rb#36 +# source://actionpack/lib/action_controller/metal/renderers.rb#38 module ActionController::Renderers::All extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -6696,326 +7242,354 @@ module ActionController::Renderers::All end end -# source://actionpack/lib/action_controller/metal/renderers.rb#94 +# source://actionpack/lib/action_controller/metal/renderers.rb#95 module ActionController::Renderers::ClassMethods - # Adds, by name, a renderer or renderers to the +_renderers+ available - # to call within controller actions. + # Adds, by name, a renderer or renderers to the `_renderers` available to call + # within controller actions. # # It is useful when rendering from an ActionController::Metal controller or # otherwise to add an available renderer proc to a specific controller. # - # Both ActionController::Base and ActionController::API - # include ActionController::Renderers::All, making all renderers - # available in the controller. See Renderers::RENDERERS and Renderers.add. + # Both ActionController::Base and ActionController::API include + # ActionController::Renderers::All, making all renderers available in the + # controller. See Renderers::RENDERERS and Renderers.add. # - # Since ActionController::Metal controllers cannot render, the controller - # must include AbstractController::Rendering, ActionController::Rendering, - # and ActionController::Renderers, and have at least one renderer. + # Since ActionController::Metal controllers cannot render, the controller must + # include AbstractController::Rendering, ActionController::Rendering, and + # ActionController::Renderers, and have at least one renderer. # - # Rather than including ActionController::Renderers::All and including all renderers, - # you may specify which renderers to include by passing the renderer name or names to - # +use_renderers+. For example, a controller that includes only the :json renderer - # (+_render_with_renderer_json+) might look like: + # Rather than including ActionController::Renderers::All and including all + # renderers, you may specify which renderers to include by passing the renderer + # name or names to `use_renderers`. For example, a controller that includes only + # the `:json` renderer (`_render_with_renderer_json`) might look like: # - # class MetalRenderingController < ActionController::Metal - # include AbstractController::Rendering - # include ActionController::Rendering - # include ActionController::Renderers + # class MetalRenderingController < ActionController::Metal + # include AbstractController::Rendering + # include ActionController::Rendering + # include ActionController::Renderers # - # use_renderers :json + # use_renderers :json # - # def show - # render json: record + # def show + # render json: record + # end # end - # end # - # You must specify a +use_renderer+, else the +controller.renderer+ and - # +controller._renderers+ will be nil, and the action will fail. + # You must specify a `use_renderer`, else the `controller.renderer` and + # `controller._renderers` will be `nil`, and the action will fail. # - # source://actionpack/lib/action_controller/metal/renderers.rb#128 + # source://actionpack/lib/action_controller/metal/renderers.rb#129 def use_renderer(*args); end - # Adds, by name, a renderer or renderers to the +_renderers+ available - # to call within controller actions. + # Adds, by name, a renderer or renderers to the `_renderers` available to call + # within controller actions. # # It is useful when rendering from an ActionController::Metal controller or # otherwise to add an available renderer proc to a specific controller. # - # Both ActionController::Base and ActionController::API - # include ActionController::Renderers::All, making all renderers - # available in the controller. See Renderers::RENDERERS and Renderers.add. + # Both ActionController::Base and ActionController::API include + # ActionController::Renderers::All, making all renderers available in the + # controller. See Renderers::RENDERERS and Renderers.add. # - # Since ActionController::Metal controllers cannot render, the controller - # must include AbstractController::Rendering, ActionController::Rendering, - # and ActionController::Renderers, and have at least one renderer. + # Since ActionController::Metal controllers cannot render, the controller must + # include AbstractController::Rendering, ActionController::Rendering, and + # ActionController::Renderers, and have at least one renderer. # - # Rather than including ActionController::Renderers::All and including all renderers, - # you may specify which renderers to include by passing the renderer name or names to - # +use_renderers+. For example, a controller that includes only the :json renderer - # (+_render_with_renderer_json+) might look like: + # Rather than including ActionController::Renderers::All and including all + # renderers, you may specify which renderers to include by passing the renderer + # name or names to `use_renderers`. For example, a controller that includes only + # the `:json` renderer (`_render_with_renderer_json`) might look like: # - # class MetalRenderingController < ActionController::Metal - # include AbstractController::Rendering - # include ActionController::Rendering - # include ActionController::Renderers + # class MetalRenderingController < ActionController::Metal + # include AbstractController::Rendering + # include ActionController::Rendering + # include ActionController::Renderers # - # use_renderers :json + # use_renderers :json # - # def show - # render json: record + # def show + # render json: record + # end # end - # end # - # You must specify a +use_renderer+, else the +controller.renderer+ and - # +controller._renderers+ will be nil, and the action will fail. + # You must specify a `use_renderer`, else the `controller.renderer` and + # `controller._renderers` will be `nil`, and the action will fail. # - # source://actionpack/lib/action_controller/metal/renderers.rb#128 + # source://actionpack/lib/action_controller/metal/renderers.rb#129 def use_renderers(*args); end end # A Set containing renderer names that correspond to available renderer procs. -# Default values are :json, :js, :xml. +# Default values are `:json`, `:js`, `:xml`. # -# source://actionpack/lib/action_controller/metal/renderers.rb#28 +# source://actionpack/lib/action_controller/metal/renderers.rb#30 ActionController::Renderers::RENDERERS = T.let(T.unsafe(nil), Set) -# source://actionpack/lib/action_controller/metal/rendering.rb#4 +# source://actionpack/lib/action_controller/metal/rendering.rb#6 module ActionController::Rendering extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionController::Rendering::ClassMethods - # Renders a template and assigns the result to +self.response_body+. + # Renders a template and assigns the result to `self.response_body`. + # + # If no rendering mode option is specified, the template will be derived from + # the first argument. + # + # render "posts/show" + # # => renders app/views/posts/show.html.erb + # + # # In a PostsController action... + # render :show + # # => renders app/views/posts/show.html.erb + # + # If the first argument responds to `render_in`, the template will be rendered + # by calling `render_in` with the current view context. + # + # class Greeting + # def render_in(view_context) + # view_context.render html: "

Hello, World

" + # end + # + # def format + # :html + # end + # end + # + # render(Greeting.new) + # # => "

Hello, World

" # - # If no rendering mode option is specified, the template will be derived - # from the first argument. + # render(renderable: Greeting.new) + # # => "

Hello, World

" # - # render "posts/show" - # # => renders app/views/posts/show.html.erb + # #### Rendering Mode # - # # In a PostsController action... - # render :show - # # => renders app/views/posts/show.html.erb + # `:partial` + # : See ActionView::PartialRenderer for details. # - # If the first argument responds to +render_in+, the template will be - # rendered by calling +render_in+ with the current view context. + # render partial: "posts/form", locals: { post: Post.new } + # # => renders app/views/posts/_form.html.erb # - # ==== \Rendering Mode + # `:file` + # : Renders the contents of a file. This option should **not** be used with + # unsanitized user input. # - # [+:partial+] - # See ActionView::PartialRenderer for details. + # render file: "/path/to/some/file" + # # => renders /path/to/some/file # - # render partial: "posts/form", locals: { post: Post.new } - # # => renders app/views/posts/_form.html.erb + # `:inline` + # : Renders an ERB template string. # - # [+:file+] - # Renders the contents of a file. This option should not be used - # with unsanitized user input. + # @name = "World" + # render inline: "

Hello, <%= @name %>!

" + # # => renders "

Hello, World!

" # - # render file: "/path/to/some/file" - # # => renders /path/to/some/file + # `:body` + # : Renders the provided text, and sets the content type as `text/plain`. # - # [+:inline+] - # Renders an ERB template string. + # render body: "Hello, World!" + # # => renders "Hello, World!" # - # @name = "World" - # render inline: "

Hello, <%= @name %>!

" - # # => renders "

Hello, World!

" + # `:plain` + # : Renders the provided text, and sets the content type as `text/plain`. # - # [+:body+] - # Renders the provided text, and sets the content type as +text/plain+. + # render plain: "Hello, World!" + # # => renders "Hello, World!" # - # render body: "Hello, World!" - # # => renders "Hello, World!" + # `:html` + # : Renders the provided HTML string, and sets the content type as + # `text/html`. If the string is not `html_safe?`, performs HTML escaping on + # the string before rendering. # - # [+:plain+] - # Renders the provided text, and sets the content type as +text/plain+. + # render html: "

Hello, World!

".html_safe + # # => renders "

Hello, World!

" # - # render plain: "Hello, World!" - # # => renders "Hello, World!" + # render html: "

Hello, World!

" + # # => renders "<h1>Hello, World!</h1>" # - # [+:html+] - # Renders the provided HTML string, and sets the content type as +text/html+. - # If the string is not +html_safe?+, performs HTML escaping on the string - # before rendering. + # `:json` + # : Renders the provided object as JSON, and sets the content type as + # `application/json`. If the object is not a string, it will be converted to + # JSON by calling `to_json`. # - # render html: "

Hello, World!

".html_safe - # # => renders "

Hello, World!

" + # render json: { hello: "world" } + # # => renders "{\"hello\":\"world\"}" # - # render html: "

Hello, World!

" - # # => renders "<h1>Hello, World!</h1>" + # `:renderable` + # : Renders the provided object by calling `render_in` with the current view + # context. The response format is determined by calling `format` on the + # renderable if it responds to `format`, falling back to `text/html` by + # default. # - # [+:json+] - # Renders the provided object as JSON, and sets the content type as - # +application/json+. If the object is not a string, it will be converted - # to JSON by calling +to_json+. + # render renderable: Greeting.new + # # => renders "

Hello, World

" # - # render json: { hello: "world" } - # # => renders "{\"hello\":\"world\"}" # # By default, when a rendering mode is specified, no layout template is # rendered. # - # ==== Options + # #### Options # - # [+:assigns+] - # Hash of instance variable assignments for the template. + # `:assigns` + # : Hash of instance variable assignments for the template. # - # render inline: "

Hello, <%= @name %>!

", assigns: { name: "World" } - # # => renders "

Hello, World!

" + # render inline: "

Hello, <%= @name %>!

", assigns: { name: "World" } + # # => renders "

Hello, World!

" # - # [+:locals+] - # Hash of local variable assignments for the template. + # `:locals` + # : Hash of local variable assignments for the template. # - # render inline: "

Hello, <%= name %>!

", locals: { name: "World" } - # # => renders "

Hello, World!

" + # render inline: "

Hello, <%= name %>!

", locals: { name: "World" } + # # => renders "

Hello, World!

" # - # [+:layout+] - # The layout template to render. Can also be +false+ or +true+ to disable - # or (re)enable the default layout template. + # `:layout` + # : The layout template to render. Can also be `false` or `true` to disable or + # (re)enable the default layout template. # - # render "posts/show", layout: "holiday" - # # => renders app/views/posts/show.html.erb with the app/views/layouts/holiday.html.erb layout + # render "posts/show", layout: "holiday" + # # => renders app/views/posts/show.html.erb with the app/views/layouts/holiday.html.erb layout # - # render "posts/show", layout: false - # # => renders app/views/posts/show.html.erb with no layout + # render "posts/show", layout: false + # # => renders app/views/posts/show.html.erb with no layout # - # render inline: "

Hello, World!

", layout: true - # # => renders "

Hello, World!

" with the default layout + # render inline: "

Hello, World!

", layout: true + # # => renders "

Hello, World!

" with the default layout # - # [+:status+] - # The HTTP status code to send with the response. Can be specified as a - # number or as the status name in Symbol form. Defaults to 200. + # `:status` + # : The HTTP status code to send with the response. Can be specified as a + # number or as the status name in Symbol form. Defaults to 200. # - # render "posts/new", status: 422 - # # => renders app/views/posts/new.html.erb with HTTP status code 422 + # render "posts/new", status: 422 + # # => renders app/views/posts/new.html.erb with HTTP status code 422 # - # render "posts/new", status: :unprocessable_entity - # # => renders app/views/posts/new.html.erb with HTTP status code 422 + # render "posts/new", status: :unprocessable_entity + # # => renders app/views/posts/new.html.erb with HTTP status code 422 # # -- # Check for double render errors and set the content_type after rendering. # # @raise [::AbstractController::DoubleRenderError] # - # source://actionpack/lib/action_controller/metal/rendering.rb#137 + # source://actionpack/lib/action_controller/metal/rendering.rb#165 def render(*args); end - # source://actionpack/lib/action_controller/metal/rendering.rb#157 + # source://actionpack/lib/action_controller/metal/rendering.rb#185 def render_to_body(options = T.unsafe(nil)); end # Similar to #render, but only returns the rendered template as a string, - # instead of setting +self.response_body+. + # instead of setting `self.response_body`. # -- # Override render_to_string because body can now be set to a Rack body. # - # source://actionpack/lib/action_controller/metal/rendering.rb#146 + # source://actionpack/lib/action_controller/metal/rendering.rb#174 def render_to_string(*_arg0); end private # Normalize both text and status options. # - # source://actionpack/lib/action_controller/metal/rendering.rb#199 + # source://actionpack/lib/action_controller/metal/rendering.rb#227 def _normalize_options(options); end - # source://actionpack/lib/action_controller/metal/rendering.rb#213 + # source://actionpack/lib/action_controller/metal/rendering.rb#241 def _normalize_text(options); end # Process controller specific options, as status, content-type and location. # - # source://actionpack/lib/action_controller/metal/rendering.rb#222 + # source://actionpack/lib/action_controller/metal/rendering.rb#250 def _process_options(options); end - # source://actionpack/lib/action_controller/metal/rendering.rb#168 + # source://actionpack/lib/action_controller/metal/rendering.rb#196 def _process_variant(options); end - # source://actionpack/lib/action_controller/metal/rendering.rb#174 + # source://actionpack/lib/action_controller/metal/rendering.rb#202 def _render_in_priorities(options); end - # source://actionpack/lib/action_controller/metal/rendering.rb#182 + # source://actionpack/lib/action_controller/metal/rendering.rb#210 def _set_html_content_type; end - # source://actionpack/lib/action_controller/metal/rendering.rb#186 + # source://actionpack/lib/action_controller/metal/rendering.rb#214 def _set_rendered_content_type(format); end - # source://actionpack/lib/action_controller/metal/rendering.rb#192 + # source://actionpack/lib/action_controller/metal/rendering.rb#220 def _set_vary_header; end # Before processing, set the request formats in current controller formats. # - # source://actionpack/lib/action_controller/metal/rendering.rb#163 + # source://actionpack/lib/action_controller/metal/rendering.rb#191 def process_action(*_arg0); end end -# source://actionpack/lib/action_controller/metal/rendering.rb#9 +# source://actionpack/lib/action_controller/metal/rendering.rb#11 module ActionController::Rendering::ClassMethods - # source://actionpack/lib/action_controller/metal/rendering.rb#21 + # source://actionpack/lib/action_controller/metal/rendering.rb#23 def inherited(klass); end - # source://actionpack/lib/action_controller/metal/rendering.rb#11 + # source://actionpack/lib/action_controller/metal/rendering.rb#13 def render(*_arg0, **_arg1, &_arg2); end - # Returns a renderer instance (inherited from ActionController::Renderer) - # for the controller. + # Returns a renderer instance (inherited from ActionController::Renderer) for + # the controller. # - # source://actionpack/lib/action_controller/metal/rendering.rb#15 + # source://actionpack/lib/action_controller/metal/rendering.rb#17 def renderer; end - # source://actionpack/lib/action_controller/metal/rendering.rb#17 + # source://actionpack/lib/action_controller/metal/rendering.rb#19 def setup_renderer!; end end -# source://actionpack/lib/action_controller/metal/rendering.rb#7 +# source://actionpack/lib/action_controller/metal/rendering.rb#9 ActionController::Rendering::RENDER_FORMATS_IN_PRIORITY = T.let(T.unsafe(nil), Array) -# = Action Controller Request Forgery Protection +# # Action Controller Request Forgery Protection # -# Controller actions are protected from Cross-Site Request Forgery (CSRF) attacks -# by including a token in the rendered HTML for your application. This token is -# stored as a random string in the session, to which an attacker does not have -# access. When a request reaches your application, \Rails verifies the received -# token with the token in the session. All requests are checked except GET requests -# as these should be idempotent. Keep in mind that all session-oriented requests -# are CSRF protected by default, including JavaScript and HTML requests. +# Controller actions are protected from Cross-Site Request Forgery (CSRF) +# attacks by including a token in the rendered HTML for your application. This +# token is stored as a random string in the session, to which an attacker does +# not have access. When a request reaches your application, Rails verifies the +# received token with the token in the session. All requests are checked except +# GET requests as these should be idempotent. Keep in mind that all +# session-oriented requests are CSRF protected by default, including JavaScript +# and HTML requests. # # Since HTML and JavaScript requests are typically made from the browser, we -# need to ensure to verify request authenticity for the web browser. We can -# use session-oriented authentication for these types of requests, by using -# the protect_from_forgery method in our controllers. +# need to ensure to verify request authenticity for the web browser. We can use +# session-oriented authentication for these types of requests, by using the +# `protect_from_forgery` method in our controllers. # # GET requests are not protected since they don't have side effects like writing # to the database and don't leak sensitive information. JavaScript requests are -# an exception: a third-party site can use a -# -# The first two characters (">) are required in case the exception -# happens while rendering attributes for a given tag. You can check the real -# cause for the exception in your logger. -# -# == Web server support +# happens because part of the template was already rendered and streamed to the +# client, making it impossible to render a whole exception page. # -# Not all web servers support streaming out-of-the-box. You need to check -# the instructions for each of them. +# Currently, when an exception happens in development or production, Rails will +# automatically stream to the client: # -# ==== Unicorn +# "> # -# Unicorn supports streaming but it needs to be configured. For this, you -# need to create a config file as follow: +# The first two characters (`">`) are required in case the exception happens +# while rendering attributes for a given tag. You can check the real cause for +# the exception in your logger. # -# # unicorn.config.rb -# listen 3000, tcp_nopush: false +# ## Web server support # -# And use it on initialization: +# Rack 3+ compatible servers all support streaming. # -# unicorn_rails --config-file unicorn.config.rb -# -# You may also want to configure other parameters like :tcp_nodelay. -# -# For more information, please check the -# {documentation}[https://bogomips.org/unicorn/Unicorn/Configurator.html#method-i-listen]. -# -# If you are using Unicorn with NGINX, you may need to tweak NGINX. -# \Streaming should work out of the box on Rainbows. -# -# ==== Passenger -# -# Phusion Passenger with NGINX, offers two streaming mechanisms out of the box. -# -# 1. NGINX response buffering mechanism which is dependent on the value of -# +passenger_buffer_response+ option (default is "off"). -# 2. Passenger buffering system which is always 'on' irrespective of the value -# of +passenger_buffer_response+. -# -# When +passenger_buffer_response+ is turned "on", then streaming would be -# done at the NGINX level which waits until the application is done sending -# the response back to the client. -# -# For more information, please check the -# {documentation}[https://www.phusionpassenger.com/docs/references/config_reference/nginx/#passenger_buffer_response]. -# -# source://actionpack/lib/action_controller/metal/streaming.rb#206 +# source://actionpack/lib/action_controller/metal/streaming.rb#169 module ActionController::Streaming private - # Set proper cache control and transfer encoding when streaming - # - # source://actionpack/lib/action_controller/metal/streaming.rb#238 - def _process_options(options); end - - # Call render_body if we are streaming instead of usual +render+. + # Call render_body if we are streaming instead of usual `render`. # - # source://actionpack/lib/action_controller/metal/streaming.rb#252 + # source://actionpack/lib/action_controller/metal/streaming.rb#172 def _render_template(options); end end -# source://actionpack/lib/action_controller/metal/streaming.rb#207 -class ActionController::Streaming::Body - # Store the response body to be chunked. - # - # @return [Body] a new instance of Body - # - # source://actionpack/lib/action_controller/metal/streaming.rb#212 - def initialize(body); end - - # Close the response body if the response body supports it. - # - # source://actionpack/lib/action_controller/metal/streaming.rb#231 - def close; end - - # For each element yielded by the response body, yield - # the element in chunked encoding. - # - # @yield [TAIL] - # - # source://actionpack/lib/action_controller/metal/streaming.rb#218 - def each(&block); end -end - -# source://actionpack/lib/action_controller/metal/streaming.rb#209 -ActionController::Streaming::Body::TAIL = T.let(T.unsafe(nil), String) - -# source://actionpack/lib/action_controller/metal/streaming.rb#208 -ActionController::Streaming::Body::TERM = T.let(T.unsafe(nil), String) - -# = Strong \Parameters +# # Strong Parameters # -# It provides an interface for protecting attributes from end-user -# assignment. This makes Action Controller parameters forbidden -# to be used in Active Model mass assignment until they have been explicitly -# enumerated. +# It provides an interface for protecting attributes from end-user assignment. +# This makes Action Controller parameters forbidden to be used in Active Model +# mass assignment until they have been explicitly enumerated. # # In addition, parameters can be marked as required and flow through a -# predefined raise/rescue flow to end up as a 400 Bad Request with no -# effort. -# -# class PeopleController < ActionController::Base -# # Using "Person.create(params[:person])" would raise an -# # ActiveModel::ForbiddenAttributesError exception because it'd -# # be using mass assignment without an explicit permit step. -# # This is the recommended form: -# def create -# Person.create(person_params) +# predefined raise/rescue flow to end up as a `400 Bad Request` with no effort. +# +# class PeopleController < ActionController::Base +# # Using "Person.create(params[:person])" would raise an +# # ActiveModel::ForbiddenAttributesError exception because it'd +# # be using mass assignment without an explicit permit step. +# # This is the recommended form: +# def create +# Person.create(person_params) +# end +# +# # This will pass with flying colors as long as there's a person key in the +# # parameters, otherwise it'll raise an ActionController::ParameterMissing +# # exception, which will get caught by ActionController::Base and turned +# # into a 400 Bad Request reply. +# def update +# redirect_to current_account.people.find(params[:id]).tap { |person| +# person.update!(person_params) +# } +# end +# +# private +# # Using a private method to encapsulate the permissible parameters is +# # a good pattern since you'll be able to reuse the same permit +# # list between create and update. Also, you can specialize this method +# # with per-user checking of permissible attributes. +# def person_params +# params.expect(person: [:name, :age]) +# end # end # -# # This will pass with flying colors as long as there's a person key in the -# # parameters, otherwise it'll raise an ActionController::ParameterMissing -# # exception, which will get caught by ActionController::Base and turned -# # into a 400 Bad Request reply. -# def update -# redirect_to current_account.people.find(params[:id]).tap { |person| -# person.update!(person_params) -# } +# In order to use `accepts_nested_attributes_for` with Strong Parameters, you +# will need to specify which nested attributes should be permitted. You might +# want to allow `:id` and `:_destroy`, see ActiveRecord::NestedAttributes for +# more information. +# +# class Person +# has_many :pets +# accepts_nested_attributes_for :pets # end # -# private -# # Using a private method to encapsulate the permissible parameters is -# # a good pattern since you'll be able to reuse the same permit -# # list between create and update. Also, you can specialize this method -# # with per-user checking of permissible attributes. -# def person_params -# params.require(:person).permit(:name, :age) +# class PeopleController < ActionController::Base +# def create +# Person.create(person_params) # end -# end # -# In order to use accepts_nested_attributes_for with Strong \Parameters, you -# will need to specify which nested attributes should be permitted. You might want -# to allow +:id+ and +:_destroy+, see ActiveRecord::NestedAttributes for more information. +# ... # -# class Person -# has_many :pets -# accepts_nested_attributes_for :pets -# end +# private # -# class PeopleController < ActionController::Base -# def create -# Person.create(person_params) +# def person_params +# # It's mandatory to specify the nested attributes that should be permitted. +# # If you use `permit` with just the key that points to the nested attributes hash, +# # it will return an empty hash. +# params.expect(person: [ :name, :age, pets_attributes: [ :id, :name, :category ] ]) +# end # end # -# ... -# -# private -# -# def person_params -# # It's mandatory to specify the nested attributes that should be permitted. -# # If you use `permit` with just the key that points to the nested attributes hash, -# # it will return an empty hash. -# params.require(:person).permit(:name, :age, pets_attributes: [ :id, :name, :category ]) -# end -# end -# -# See ActionController::Parameters.require and ActionController::Parameters.permit -# for more information. +# See ActionController::Parameters.expect, +# See ActionController::Parameters.require, and +# ActionController::Parameters.permit for more information. # -# source://actionpack/lib/action_controller/metal/strong_parameters.rb#1278 +# source://actionpack/lib/action_controller/metal/strong_parameters.rb#1524 module ActionController::StrongParameters - # Returns a new ActionController::Parameters object that - # has been instantiated with the request.parameters. + # Returns a new ActionController::Parameters object that has been instantiated + # with the `request.parameters`. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1281 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1527 def params; end - # Assigns the given +value+ to the +params+ hash. If +value+ - # is a Hash, this will create an ActionController::Parameters - # object that has been instantiated with the given +value+ hash. + # Assigns the given `value` to the `params` hash. If `value` is a Hash, this + # will create an ActionController::Parameters object that has been instantiated + # with the given `value` hash. # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1296 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#1542 def params=(value); end end -# source://actionpack/lib/action_controller/template_assertions.rb#4 +# source://actionpack/lib/action_controller/template_assertions.rb#6 module ActionController::TemplateAssertions # @raise [NoMethodError] # - # source://actionpack/lib/action_controller/template_assertions.rb#5 + # source://actionpack/lib/action_controller/template_assertions.rb#7 def assert_template(options = T.unsafe(nil), message = T.unsafe(nil)); end end -# = Action Controller Test Case +# # Action Controller Test Case # -# Superclass for ActionController functional tests. Functional tests allow you to -# test a single controller action per test method. +# Superclass for ActionController functional tests. Functional tests allow you +# to test a single controller action per test method. # -# == Use integration style controller tests over functional style controller tests. +# ## Use integration style controller tests over functional style controller tests. # -# \Rails discourages the use of functional tests in favor of integration tests +# Rails discourages the use of functional tests in favor of integration tests # (use ActionDispatch::IntegrationTest). # -# New \Rails applications no longer generate functional style controller tests and they should -# only be used for backward compatibility. Integration style controller tests perform actual -# requests, whereas functional style controller tests merely simulate a request. Besides, -# integration tests are as fast as functional tests and provide lot of helpers such as +as+, -# +parsed_body+ for effective testing of controller actions including even API endpoints. +# New Rails applications no longer generate functional style controller tests +# and they should only be used for backward compatibility. Integration style +# controller tests perform actual requests, whereas functional style controller +# tests merely simulate a request. Besides, integration tests are as fast as +# functional tests and provide lot of helpers such as `as`, `parsed_body` for +# effective testing of controller actions including even API endpoints. # -# == Basic example +# ## Basic example # # Functional tests are written as follows: -# 1. First, one uses the +get+, +post+, +patch+, +put+, +delete+, or +head+ method to simulate -# an HTTP request. -# 2. Then, one asserts whether the current state is as expected. "State" can be anything: -# the controller's HTTP response, the database contents, etc. +# 1. First, one uses the `get`, `post`, `patch`, `put`, `delete`, or `head` +# method to simulate an HTTP request. +# 2. Then, one asserts whether the current state is as expected. "State" can be +# anything: the controller's HTTP response, the database contents, etc. +# # # For example: # -# class BooksControllerTest < ActionController::TestCase -# def test_create -# # Simulate a POST response with the given HTTP parameters. -# post(:create, params: { book: { title: "Love Hina" }}) +# class BooksControllerTest < ActionController::TestCase +# def test_create +# # Simulate a POST response with the given HTTP parameters. +# post(:create, params: { book: { title: "Love Hina" }}) # -# # Asserts that the controller tried to redirect us to -# # the created book's URI. -# assert_response :found +# # Asserts that the controller tried to redirect us to +# # the created book's URI. +# assert_response :found # -# # Asserts that the controller really put the book in the database. -# assert_not_nil Book.find_by(title: "Love Hina") +# # Asserts that the controller really put the book in the database. +# assert_not_nil Book.find_by(title: "Love Hina") +# end # end -# end # # You can also send a real document in the simulated HTTP request. # -# def test_create -# json = {book: { title: "Love Hina" }}.to_json -# post :create, body: json -# end +# def test_create +# json = {book: { title: "Love Hina" }}.to_json +# post :create, body: json +# end +# +# ## Special instance variables # -# == Special instance variables +# ActionController::TestCase will also automatically provide the following +# instance variables for use in the tests: # -# ActionController::TestCase will also automatically provide the following instance -# variables for use in the tests: +# : The controller instance that will be tested. # -# @controller:: -# The controller instance that will be tested. -# @request:: -# An ActionController::TestRequest, representing the current HTTP -# request. You can modify this object before sending the HTTP request. For example, -# you might want to set some session properties before sending a GET request. -# @response:: -# An ActionDispatch::TestResponse object, representing the response -# of the last HTTP response. In the above example, @response becomes valid -# after calling +post+. If the various assert methods are not sufficient, then you -# may use this object to inspect the HTTP response in detail. +# : An ActionController::TestRequest, representing the current HTTP request. +# You can modify this object before sending the HTTP request. For example, +# you might want to set some session properties before sending a GET +# request. # -# == Controller is automatically inferred +# : An ActionDispatch::TestResponse object, representing the response of the +# last HTTP response. In the above example, `@response` becomes valid after +# calling `post`. If the various assert methods are not sufficient, then you +# may use this object to inspect the HTTP response in detail. +# +# +# ## Controller is automatically inferred # # ActionController::TestCase will automatically infer the controller under test # from the test class name. If the controller cannot be inferred from the test -# class name, you can explicitly set it with +tests+. +# class name, you can explicitly set it with `tests`. +# +# class SpecialEdgeCaseWidgetsControllerTest < ActionController::TestCase +# tests WidgetController +# end # -# class SpecialEdgeCaseWidgetsControllerTest < ActionController::TestCase -# tests WidgetController -# end +# ## Testing controller internals # -# == \Testing controller internals +# In addition to these specific assertions, you also have easy access to various +# collections that the regular test/unit assertions can be used against. These +# collections are: # -# In addition to these specific assertions, you also have easy access to various collections that the regular test/unit assertions -# can be used against. These collections are: +# * session: Objects being saved in the session. +# * flash: The flash objects currently in the session. +# * cookies: Cookies being sent to the user on this request. # -# * session: Objects being saved in the session. -# * flash: The flash objects currently in the session. -# * cookies: \Cookies being sent to the user on this request. # # These collections can be used just like any other hash: # -# assert_equal "Dave", cookies[:name] # makes sure that a cookie called :name was set as "Dave" -# assert flash.empty? # makes sure that there's nothing in the flash +# assert_equal "Dave", cookies[:name] # makes sure that a cookie called :name was set as "Dave" +# assert flash.empty? # makes sure that there's nothing in the flash # -# On top of the collections, you have the complete URL that a given action redirected to available in redirect_to_url. +# On top of the collections, you have the complete URL that a given action +# redirected to available in `redirect_to_url`. # -# For redirects within the same controller, you can even call follow_redirect and the redirect will be followed, triggering another -# action call which can then be asserted against. +# For redirects within the same controller, you can even call follow_redirect +# and the redirect will be followed, triggering another action call which can +# then be asserted against. # -# == Manipulating session and cookie variables +# ## Manipulating session and cookie variables # -# Sometimes you need to set up the session and cookie variables for a test. -# To do this just assign a value to the session or cookie collection: +# Sometimes you need to set up the session and cookie variables for a test. To +# do this just assign a value to the session or cookie collection: # -# session[:key] = "value" -# cookies[:key] = "value" +# session[:key] = "value" +# cookies[:key] = "value" # # To clear the cookies for a test just clear the cookie collection: # -# cookies.clear +# cookies.clear # -# == \Testing named routes +# ## Testing named routes # -# If you're using named routes, they can be easily tested using the original named routes' methods straight in the test case. +# If you're using named routes, they can be easily tested using the original +# named routes' methods straight in the test case. # -# assert_redirected_to page_url(title: 'foo') +# assert_redirected_to page_url(title: 'foo') # -# source://actionpack/lib/action_controller/test_case.rb#345 +# source://actionpack/lib/action_controller/test_case.rb#360 class ActionController::TestCase < ::ActiveSupport::TestCase include ::ActiveSupport::Testing::ConstantLookup include ::ActionDispatch::TestProcess::FixtureFile @@ -7999,37 +8526,40 @@ class ActionController::TestCase < ::ActiveSupport::TestCase extend ::ActionController::TestCase::Behavior::ClassMethods extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # source://actionpack/lib/action_controller/test_case.rb#571 + # source://actionpack/lib/action_controller/test_case.rb#591 def _controller_class; end - # source://actionpack/lib/action_controller/test_case.rb#571 + # source://actionpack/lib/action_controller/test_case.rb#591 def _controller_class=(_arg0); end - # source://actionpack/lib/action_controller/test_case.rb#571 + # source://actionpack/lib/action_controller/test_case.rb#591 def _controller_class?; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/lib/action_controller/test_case.rb#571 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _controller_class; end - # source://actionpack/lib/action_controller/test_case.rb#571 - def _controller_class=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _controller_class=(new_value); end - # source://actionpack/lib/action_controller/test_case.rb#571 + # source://actionpack/lib/action_controller/test_case.rb#591 def _controller_class?; end - # source://actionpack/lib/action_controller/test_case.rb#346 + # source://actionpack/lib/action_controller/test_case.rb#361 def executor_around_each_request; end - # source://actionpack/lib/action_controller/test_case.rb#346 + # source://actionpack/lib/action_controller/test_case.rb#361 def executor_around_each_request=(_arg0); end end end -# source://actionpack/lib/action_controller/test_case.rb#348 +# source://actionpack/lib/action_controller/test_case.rb#363 module ActionController::TestCase::Behavior include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::TestProcess @@ -8048,142 +8578,149 @@ module ActionController::TestCase::Behavior mixes_in_class_methods ::ActionController::TestCase::Behavior::ClassMethods mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # source://actionpack/lib/action_controller/test_case.rb#564 + # source://actionpack/lib/action_controller/test_case.rb#584 def build_response(klass); end - # source://actionpack/lib/action_controller/test_case.rb#524 + # source://actionpack/lib/action_controller/test_case.rb#544 def controller_class_name; end - # Simulate a DELETE request with the given parameters and set/volley the response. - # See +get+ for more details. + # Simulate a DELETE request with the given parameters and set/volley the + # response. See `get` for more details. # - # source://actionpack/lib/action_controller/test_case.rb#439 + # source://actionpack/lib/action_controller/test_case.rb#455 def delete(action, **args); end - # source://actionpack/lib/action_controller/test_case.rb#528 + # source://actionpack/lib/action_controller/test_case.rb#548 def generated_path(generated_extras); end # Simulate a GET request with the given parameters. # - # - +action+: The controller action to call. - # - +params+: The hash with HTTP parameters that you want to pass. This may be +nil+. - # - +body+: The request body with a string that is appropriately encoded - # (application/x-www-form-urlencoded or multipart/form-data). - # - +session+: A hash of parameters to store in the session. This may be +nil+. - # - +flash+: A hash of parameters to store in the flash. This may be +nil+. + # * `action`: The controller action to call. + # * `params`: The hash with HTTP parameters that you want to pass. This may be + # `nil`. + # * `body`: The request body with a string that is appropriately encoded + # (`application/x-www-form-urlencoded` or `multipart/form-data`). + # * `session`: A hash of parameters to store in the session. This may be + # `nil`. + # * `flash`: A hash of parameters to store in the flash. This may be `nil`. # - # You can also simulate POST, PATCH, PUT, DELETE, and HEAD requests with - # +post+, +patch+, +put+, +delete+, and +head+. - # Example sending parameters, session, and setting a flash message: # - # get :show, - # params: { id: 7 }, - # session: { user_id: 1 }, - # flash: { notice: 'This is flash message' } + # You can also simulate POST, PATCH, PUT, DELETE, and HEAD requests with `post`, + # `patch`, `put`, `delete`, and `head`. Example sending parameters, session, and + # setting a flash message: + # + # get :show, + # params: { id: 7 }, + # session: { user_id: 1 }, + # flash: { notice: 'This is flash message' } # # Note that the request method is not verified. The different methods are # available to make the tests more expressive. # - # source://actionpack/lib/action_controller/test_case.rb#413 + # source://actionpack/lib/action_controller/test_case.rb#431 def get(action, **args); end # Simulate a HEAD request with the given parameters and set/volley the response. - # See +get+ for more details. + # See `get` for more details. # - # source://actionpack/lib/action_controller/test_case.rb#445 + # source://actionpack/lib/action_controller/test_case.rb#461 def head(action, **args); end - # Simulate a PATCH request with the given parameters and set/volley the response. - # See +get+ for more details. + # Simulate a PATCH request with the given parameters and set/volley the + # response. See `get` for more details. # - # source://actionpack/lib/action_controller/test_case.rb#427 + # source://actionpack/lib/action_controller/test_case.rb#443 def patch(action, **args); end # Simulate a POST request with the given parameters and set/volley the response. - # See +get+ for more details. + # See `get` for more details. # - # source://actionpack/lib/action_controller/test_case.rb#421 + # source://actionpack/lib/action_controller/test_case.rb#437 def post(action, **args); end - # Simulate an HTTP request to +action+ by specifying request method, - # parameters and set/volley the response. - # - # - +action+: The controller action to call. - # - +method+: Request method used to send the HTTP request. Possible values - # are +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, +HEAD+. Defaults to +GET+. Can be a symbol. - # - +params+: The hash with HTTP parameters that you want to pass. This may be +nil+. - # - +body+: The request body with a string that is appropriately encoded - # (application/x-www-form-urlencoded or multipart/form-data). - # - +session+: A hash of parameters to store in the session. This may be +nil+. - # - +flash+: A hash of parameters to store in the flash. This may be +nil+. - # - +format+: Request format. Defaults to +nil+. Can be string or symbol. - # - +as+: Content type. Defaults to +nil+. Must be a symbol that corresponds - # to a mime type. - # - # Example calling +create+ action and sending two params: - # - # process :create, - # method: 'POST', - # params: { - # user: { name: 'Gaurish Sharma', email: 'user@example.com' } - # }, - # session: { user_id: 1 }, - # flash: { notice: 'This is flash message' } - # - # To simulate +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, and +HEAD+ requests - # prefer using #get, #post, #patch, #put, #delete and #head methods - # respectively which will make tests more expressive. + # Simulate an HTTP request to `action` by specifying request method, parameters + # and set/volley the response. + # + # * `action`: The controller action to call. + # * `method`: Request method used to send the HTTP request. Possible values + # are `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, `HEAD`. Defaults to `GET`. + # Can be a symbol. + # * `params`: The hash with HTTP parameters that you want to pass. This may be + # `nil`. + # * `body`: The request body with a string that is appropriately encoded + # (`application/x-www-form-urlencoded` or `multipart/form-data`). + # * `session`: A hash of parameters to store in the session. This may be + # `nil`. + # * `flash`: A hash of parameters to store in the flash. This may be `nil`. + # * `format`: Request format. Defaults to `nil`. Can be string or symbol. + # * `as`: Content type. Defaults to `nil`. Must be a symbol that corresponds + # to a mime type. + # + # + # Example calling `create` action and sending two params: + # + # process :create, + # method: 'POST', + # params: { + # user: { name: 'Gaurish Sharma', email: 'user@example.com' } + # }, + # session: { user_id: 1 }, + # flash: { notice: 'This is flash message' } + # + # To simulate `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, and `HEAD` requests + # prefer using #get, #post, #patch, #put, #delete and #head methods respectively + # which will make tests more expressive. # # It's not recommended to make more than one request in the same test. Instance # variables that are set in one request will not persist to the next request, - # but it's not guaranteed that all \Rails internal state will be reset. Prefer + # but it's not guaranteed that all Rails internal state will be reset. Prefer # ActionDispatch::IntegrationTest for making multiple requests in the same test. # # Note that the request method is not verified. # - # source://actionpack/lib/action_controller/test_case.rb#484 + # source://actionpack/lib/action_controller/test_case.rb#504 def process(action, method: T.unsafe(nil), params: T.unsafe(nil), session: T.unsafe(nil), body: T.unsafe(nil), flash: T.unsafe(nil), format: T.unsafe(nil), xhr: T.unsafe(nil), as: T.unsafe(nil)); end # Simulate a PUT request with the given parameters and set/volley the response. - # See +get+ for more details. + # See `get` for more details. # - # source://actionpack/lib/action_controller/test_case.rb#433 + # source://actionpack/lib/action_controller/test_case.rb#449 def put(action, **args); end - # source://actionpack/lib/action_controller/test_case.rb#532 + # source://actionpack/lib/action_controller/test_case.rb#552 def query_parameter_names(generated_extras); end # Returns the value of attribute request. # - # source://actionpack/lib/action_controller/test_case.rb#354 + # source://actionpack/lib/action_controller/test_case.rb#369 def request; end # Returns the value of attribute response. # - # source://actionpack/lib/action_controller/test_case.rb#354 + # source://actionpack/lib/action_controller/test_case.rb#369 def response; end - # source://actionpack/lib/action_controller/test_case.rb#536 + # source://actionpack/lib/action_controller/test_case.rb#556 def setup_controller_request_and_response; end private - # source://actionpack/lib/action_controller/test_case.rb#656 + # source://actionpack/lib/action_controller/test_case.rb#677 def check_required_ivars; end - # source://actionpack/lib/action_controller/test_case.rb#652 + # source://actionpack/lib/action_controller/test_case.rb#673 def document_root_element; end - # source://actionpack/lib/action_controller/test_case.rb#607 + # source://actionpack/lib/action_controller/test_case.rb#627 def process_controller_response(action, cookies, xhr); end - # source://actionpack/lib/action_controller/test_case.rb#642 + # source://actionpack/lib/action_controller/test_case.rb#663 def scrub_env!(env); end - # source://actionpack/lib/action_controller/test_case.rb#577 + # source://actionpack/lib/action_controller/test_case.rb#597 def setup_request(controller_class_name, action, parameters, session, flash, xhr); end - # source://actionpack/lib/action_controller/test_case.rb#599 + # source://actionpack/lib/action_controller/test_case.rb#619 def wrap_execution(&block); end module GeneratedClassMethods @@ -8199,202 +8736,202 @@ module ActionController::TestCase::Behavior end end -# source://actionpack/lib/action_controller/test_case.rb#356 +# source://actionpack/lib/action_controller/test_case.rb#371 module ActionController::TestCase::Behavior::ClassMethods - # source://actionpack/lib/action_controller/test_case.rb#378 + # source://actionpack/lib/action_controller/test_case.rb#393 def controller_class; end - # source://actionpack/lib/action_controller/test_case.rb#374 + # source://actionpack/lib/action_controller/test_case.rb#389 def controller_class=(new_class); end - # source://actionpack/lib/action_controller/test_case.rb#386 + # source://actionpack/lib/action_controller/test_case.rb#401 def determine_default_controller_class(name); end - # Sets the controller class name. Useful if the name can't be inferred from test class. - # Normalizes +controller_class+ before using. + # Sets the controller class name. Useful if the name can't be inferred from test + # class. Normalizes `controller_class` before using. # - # tests WidgetController - # tests :widget - # tests 'widget' + # tests WidgetController + # tests :widget + # tests 'widget' # - # source://actionpack/lib/action_controller/test_case.rb#363 + # source://actionpack/lib/action_controller/test_case.rb#378 def tests(controller_class); end end -# ActionController::TestCase will be deprecated and moved to a gem in the future. -# Please use ActionDispatch::IntegrationTest going forward. +# ActionController::TestCase will be deprecated and moved to a gem in the +# future. Please use ActionDispatch::IntegrationTest going forward. # -# source://actionpack/lib/action_controller/test_case.rb#34 +# source://actionpack/lib/action_controller/test_case.rb#38 class ActionController::TestRequest < ::ActionDispatch::TestRequest # @return [TestRequest] a new instance of TestRequest # - # source://actionpack/lib/action_controller/test_case.rb#57 + # source://actionpack/lib/action_controller/test_case.rb#61 def initialize(env, session, controller_class); end - # source://actionpack/lib/action_controller/test_case.rb#76 + # source://actionpack/lib/action_controller/test_case.rb#80 def assign_parameters(routes, controller_path, action, parameters, generated_path, query_string_keys); end - # source://actionpack/lib/action_controller/test_case.rb#72 + # source://actionpack/lib/action_controller/test_case.rb#76 def content_type=(type); end # Returns the value of attribute controller_class. # - # source://actionpack/lib/action_controller/test_case.rb#42 + # source://actionpack/lib/action_controller/test_case.rb#46 def controller_class; end - # source://actionpack/lib/action_controller/test_case.rb#68 + # source://actionpack/lib/action_controller/test_case.rb#72 def query_string=(string); end private - # source://actionpack/lib/action_controller/test_case.rb#167 + # source://actionpack/lib/action_controller/test_case.rb#171 def params_parsers; end class << self # Create a new test request with default `env` values. # - # source://actionpack/lib/action_controller/test_case.rb#45 + # source://actionpack/lib/action_controller/test_case.rb#49 def create(controller_class); end - # source://actionpack/lib/action_controller/test_case.rb#38 + # source://actionpack/lib/action_controller/test_case.rb#42 def new_session; end private - # source://actionpack/lib/action_controller/test_case.rb#52 + # source://actionpack/lib/action_controller/test_case.rb#56 def default_env; end end end -# source://actionpack/lib/action_controller/test_case.rb#35 +# source://actionpack/lib/action_controller/test_case.rb#39 ActionController::TestRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_controller/test_case.rb#139 +# source://actionpack/lib/action_controller/test_case.rb#143 ActionController::TestRequest::ENCODER = T.let(T.unsafe(nil), T.untyped) # Methods #destroy and #load! are overridden to avoid calling methods on the # -# source://actionpack/lib/action_controller/test_case.rb#185 +# source://actionpack/lib/action_controller/test_case.rb#189 class ActionController::TestSession < ::Rack::Session::Abstract::PersistedSecure::SecureSessionHash # @return [TestSession] a new instance of TestSession # - # source://actionpack/lib/action_controller/test_case.rb#188 + # source://actionpack/lib/action_controller/test_case.rb#192 def initialize(session = T.unsafe(nil), id = T.unsafe(nil)); end - # source://actionpack/lib/action_controller/test_case.rb#208 + # source://actionpack/lib/action_controller/test_case.rb#212 def destroy; end - # source://actionpack/lib/action_controller/test_case.rb#212 + # source://actionpack/lib/action_controller/test_case.rb#216 def dig(*keys); end # @return [Boolean] # - # source://actionpack/lib/action_controller/test_case.rb#221 + # source://actionpack/lib/action_controller/test_case.rb#225 def enabled?; end # @return [Boolean] # - # source://actionpack/lib/action_controller/test_case.rb#196 + # source://actionpack/lib/action_controller/test_case.rb#200 def exists?; end - # source://actionpack/lib/action_controller/test_case.rb#217 + # source://actionpack/lib/action_controller/test_case.rb#221 def fetch(key, *args, &block); end - # source://actionpack/lib/action_controller/test_case.rb#225 + # source://actionpack/lib/action_controller/test_case.rb#229 def id_was; end - # source://actionpack/lib/action_controller/test_case.rb#200 + # source://actionpack/lib/action_controller/test_case.rb#204 def keys; end - # source://actionpack/lib/action_controller/test_case.rb#204 + # source://actionpack/lib/action_controller/test_case.rb#208 def values; end private - # source://actionpack/lib/action_controller/test_case.rb#230 + # source://actionpack/lib/action_controller/test_case.rb#234 def load!; end end -# source://actionpack/lib/action_controller/test_case.rb#186 +# source://actionpack/lib/action_controller/test_case.rb#190 ActionController::TestSession::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_controller/metal/testing.rb#4 +# source://actionpack/lib/action_controller/metal/testing.rb#6 module ActionController::Testing; end # Behavior specific to functional tests # -# source://actionpack/lib/action_controller/metal/testing.rb#6 +# source://actionpack/lib/action_controller/metal/testing.rb#8 module ActionController::Testing::Functional - # source://actionpack/lib/action_controller/metal/testing.rb#7 + # source://actionpack/lib/action_controller/metal/testing.rb#9 def clear_instance_variables_between_requests; end - # source://actionpack/lib/action_controller/metal/testing.rb#16 + # source://actionpack/lib/action_controller/metal/testing.rb#18 def recycle!; end end -# Raised when a Parameters instance is not marked as permitted and -# an operation to transform it to hash is called. +# Raised when a Parameters instance is not marked as permitted and an operation +# to transform it to hash is called. # -# params = ActionController::Parameters.new(a: "123", b: "456") -# params.to_h -# # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash +# params = ActionController::Parameters.new(a: "123", b: "456") +# params.to_h +# # => ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash # -# source://actionpack/lib/action_controller/metal/strong_parameters.rb#62 +# source://actionpack/lib/action_controller/metal/strong_parameters.rb#75 class ActionController::UnfilteredParameters < ::ArgumentError # @return [UnfilteredParameters] a new instance of UnfilteredParameters # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#63 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#76 def initialize; end end -# source://actionpack/lib/action_controller/metal/exceptions.rb#73 +# source://actionpack/lib/action_controller/metal/exceptions.rb#75 class ActionController::UnknownFormat < ::ActionController::ActionControllerError; end -# source://actionpack/lib/action_controller/metal/exceptions.rb#70 +# source://actionpack/lib/action_controller/metal/exceptions.rb#72 class ActionController::UnknownHttpMethod < ::ActionController::ActionControllerError; end # Raised when a supplied parameter is not expected and -# ActionController::Parameters.action_on_unpermitted_parameters -# is set to :raise. +# ActionController::Parameters.action_on_unpermitted_parameters is set to +# `:raise`. # -# params = ActionController::Parameters.new(a: "123", b: "456") -# params.permit(:c) -# # => ActionController::UnpermittedParameters: found unpermitted parameters: :a, :b +# params = ActionController::Parameters.new(a: "123", b: "456") +# params.permit(:c) +# # => ActionController::UnpermittedParameters: found unpermitted parameters: :a, :b # -# source://actionpack/lib/action_controller/metal/strong_parameters.rb#47 +# source://actionpack/lib/action_controller/metal/strong_parameters.rb#60 class ActionController::UnpermittedParameters < ::IndexError # @return [UnpermittedParameters] a new instance of UnpermittedParameters # - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#50 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#63 def initialize(params); end - # source://actionpack/lib/action_controller/metal/strong_parameters.rb#48 + # source://actionpack/lib/action_controller/metal/strong_parameters.rb#61 def params; end end -# = Action Controller \UrlFor +# # Action Controller UrlFor # -# Includes +url_for+ into the host class. The class has to provide a +RouteSet+ by implementing -# the _routes method. Otherwise, an exception will be raised. +# Includes `url_for` into the host class. The class has to provide a `RouteSet` +# by implementing the `_routes` method. Otherwise, an exception will be raised. # -# In addition to AbstractController::UrlFor, this module accesses the HTTP layer to define -# URL options like the +host+. In order to do so, this module requires the host class -# to implement +env+ which needs to be Rack-compatible, and +request+ which -# returns an ActionDispatch::Request instance. +# In addition to AbstractController::UrlFor, this module accesses the HTTP layer +# to define URL options like the `host`. In order to do so, this module requires +# the host class to implement `env` which needs to be Rack-compatible, and +# `request` which returns an ActionDispatch::Request instance. # -# class RootUrl -# include ActionController::UrlFor -# include Rails.application.routes.url_helpers +# class RootUrl +# include ActionController::UrlFor +# include Rails.application.routes.url_helpers # -# delegate :env, :request, to: :controller +# delegate :env, :request, to: :controller # -# def initialize(controller) -# @controller = controller -# @url = root_path # named route from the application. +# def initialize(controller) +# @controller = controller +# @url = root_path # named route from the application. +# end # end -# end # -# source://actionpack/lib/action_controller/metal/url_for.rb#25 +# source://actionpack/lib/action_controller/metal/url_for.rb#27 module ActionController::UrlFor extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -8404,10 +8941,10 @@ module ActionController::UrlFor mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::AbstractController::UrlFor::ClassMethods - # source://actionpack/lib/action_controller/metal/url_for.rb#30 + # source://actionpack/lib/action_controller/metal/url_for.rb#32 def initialize(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_controller/metal/url_for.rb#35 + # source://actionpack/lib/action_controller/metal/url_for.rb#37 def url_options; end module GeneratedClassMethods @@ -8423,146 +8960,145 @@ module ActionController::UrlFor end end -# source://actionpack/lib/action_controller/metal/exceptions.rb#25 +# source://actionpack/lib/action_controller/metal/exceptions.rb#27 class ActionController::UrlGenerationError < ::ActionController::ActionControllerError include ::DidYouMean::Correctable # @return [UrlGenerationError] a new instance of UrlGenerationError # - # source://actionpack/lib/action_controller/metal/exceptions.rb#28 + # source://actionpack/lib/action_controller/metal/exceptions.rb#30 def initialize(message, routes = T.unsafe(nil), route_name = T.unsafe(nil), method_name = T.unsafe(nil)); end - # source://actionpack/lib/action_controller/metal/exceptions.rb#39 + # source://actionpack/lib/action_controller/metal/exceptions.rb#41 def corrections; end # Returns the value of attribute method_name. # - # source://actionpack/lib/action_controller/metal/exceptions.rb#26 + # source://actionpack/lib/action_controller/metal/exceptions.rb#28 def method_name; end # Returns the value of attribute route_name. # - # source://actionpack/lib/action_controller/metal/exceptions.rb#26 + # source://actionpack/lib/action_controller/metal/exceptions.rb#28 def route_name; end # Returns the value of attribute routes. # - # source://actionpack/lib/action_controller/metal/exceptions.rb#26 + # source://actionpack/lib/action_controller/metal/exceptions.rb#28 def routes; end end -# = Action Dispatch +# # Action Dispatch # # Action Dispatch is a module of Action Pack. # -# Action Dispatch parses information about the web request, handles -# routing as defined by the user, and does advanced processing related to HTTP -# such as MIME-type negotiation, decoding parameters in POST, PATCH, or PUT -# bodies, handling HTTP caching logic, cookies and sessions. +# Action Dispatch parses information about the web request, handles routing as +# defined by the user, and does advanced processing related to HTTP such as +# MIME-type negotiation, decoding parameters in POST, PATCH, or PUT bodies, +# handling HTTP caching logic, cookies and sessions. # -# source://actionpack/lib/action_dispatch/deprecator.rb#3 +# source://actionpack/lib/action_dispatch/deprecator.rb#5 module ActionDispatch - include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor extend ::ActiveSupport::Autoload - # source://actionpack/lib/action_dispatch.rb#141 + # source://actionpack/lib/action_dispatch.rb#135 def eager_load!; end - # source://actionpack/lib/action_dispatch.rb#127 + # source://actionpack/lib/action_dispatch.rb#121 def test_app; end - # source://actionpack/lib/action_dispatch.rb#127 + # source://actionpack/lib/action_dispatch.rb#121 def test_app=(val); end class << self - # source://actionpack/lib/action_dispatch/deprecator.rb#4 + # source://actionpack/lib/action_dispatch/deprecator.rb#6 def deprecator; end - # source://actionpack/lib/action_dispatch.rb#127 + # source://actionpack/lib/action_dispatch.rb#121 def test_app; end - # source://actionpack/lib/action_dispatch.rb#127 + # source://actionpack/lib/action_dispatch.rb#121 def test_app=(val); end end end -# source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#7 +# source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#9 class ActionDispatch::ActionableExceptions # @return [ActionableExceptions] a new instance of ActionableExceptions # - # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#10 + # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#12 def initialize(app); end - # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#14 + # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#16 def call(env); end - # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#8 + # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#10 def endpoint; end - # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#8 + # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#10 def endpoint=(val); end private # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#24 + # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#26 def actionable_request?(request); end - # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#28 + # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#30 def redirect_to(location); end class << self - # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#8 + # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#10 def endpoint; end - # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#8 + # source://actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb#10 def endpoint=(val); end end end -# This is a class that abstracts away an asserted response. It purposely -# does not inherit from Response because it doesn't need it. That means it -# does not have headers or a body. +# This is a class that abstracts away an asserted response. It purposely does +# not inherit from Response because it doesn't need it. That means it does not +# have headers or a body. # -# source://actionpack/lib/action_dispatch/testing/assertion_response.rb#7 +# source://actionpack/lib/action_dispatch/testing/assertion_response.rb#9 class ActionDispatch::AssertionResponse - # Accepts a specific response status code as an Integer (404) or String - # ('404') or a response status range as a Symbol pseudo-code (:success, - # indicating any 200-299 status code). + # Accepts a specific response status code as an Integer (404) or String ('404') + # or a response status range as a Symbol pseudo-code (:success, indicating any + # 200-299 status code). # # @raise [ArgumentError] # @return [AssertionResponse] a new instance of AssertionResponse # - # source://actionpack/lib/action_dispatch/testing/assertion_response.rb#20 + # source://actionpack/lib/action_dispatch/testing/assertion_response.rb#22 def initialize(code_or_name); end # Returns the value of attribute code. # - # source://actionpack/lib/action_dispatch/testing/assertion_response.rb#8 + # source://actionpack/lib/action_dispatch/testing/assertion_response.rb#10 def code; end - # source://actionpack/lib/action_dispatch/testing/assertion_response.rb#33 + # source://actionpack/lib/action_dispatch/testing/assertion_response.rb#35 def code_and_name; end # Returns the value of attribute name. # - # source://actionpack/lib/action_dispatch/testing/assertion_response.rb#8 + # source://actionpack/lib/action_dispatch/testing/assertion_response.rb#10 def name; end private - # source://actionpack/lib/action_dispatch/testing/assertion_response.rb#38 + # source://actionpack/lib/action_dispatch/testing/assertion_response.rb#40 def code_from_name(name); end - # source://actionpack/lib/action_dispatch/testing/assertion_response.rb#42 + # source://actionpack/lib/action_dispatch/testing/assertion_response.rb#44 def name_from_code(code); end end -# source://actionpack/lib/action_dispatch/testing/assertion_response.rb#10 +# source://actionpack/lib/action_dispatch/testing/assertion_response.rb#12 ActionDispatch::AssertionResponse::GENERIC_RESPONSE_CODES = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/testing/assertions/response.rb#4 +# source://actionpack/lib/action_dispatch/testing/assertions/response.rb#6 module ActionDispatch::Assertions include ::ActionDispatch::Assertions::ResponseAssertions include ::Rails::Dom::Testing::Assertions::DomAssertions @@ -8573,254 +9109,291 @@ module ActionDispatch::Assertions mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # source://actionpack/lib/action_dispatch/testing/assertions.rb#15 + # source://actionpack/lib/action_dispatch/testing/assertions.rb#17 def html_document; end end -# A small suite of assertions that test responses from \Rails applications. +# A small suite of assertions that test responses from Rails applications. # -# source://actionpack/lib/action_dispatch/testing/assertions/response.rb#6 +# source://actionpack/lib/action_dispatch/testing/assertions/response.rb#8 module ActionDispatch::Assertions::ResponseAssertions # Asserts that the response is a redirect to a URL matching the given options. # - # # Asserts that the redirection was to the "index" action on the WeblogController - # assert_redirected_to controller: "weblog", action: "index" + # # Asserts that the redirection was to the "index" action on the WeblogController + # assert_redirected_to controller: "weblog", action: "index" # - # # Asserts that the redirection was to the named route login_url - # assert_redirected_to login_url + # # Asserts that the redirection was to the named route login_url + # assert_redirected_to login_url # - # # Asserts that the redirection was to the URL for @customer - # assert_redirected_to @customer + # # Asserts that the redirection was to the URL for @customer + # assert_redirected_to @customer # - # # Asserts that the redirection matches the regular expression - # assert_redirected_to %r(\Ahttp://example.org) + # # Asserts that the redirection matches the regular expression + # assert_redirected_to %r(\Ahttp://example.org) # - # # Asserts that the redirection has the HTTP status code 301 (Moved - # # Permanently). - # assert_redirected_to "/some/path", status: :moved_permanently + # # Asserts that the redirection has the HTTP status code 301 (Moved + # # Permanently). + # assert_redirected_to "/some/path", status: :moved_permanently # - # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#57 + # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#60 def assert_redirected_to(url_options = T.unsafe(nil), options = T.unsafe(nil), message = T.unsafe(nil)); end # Asserts that the response is one of the following types: # - # * :success - Status code was in the 200-299 range - # * :redirect - Status code was in the 300-399 range - # * :missing - Status code was 404 - # * :error - Status code was in the 500-599 range + # * `:success` - Status code was in the 200-299 range + # * `:redirect` - Status code was in the 300-399 range + # * `:missing` - Status code was 404 + # * `:error` - Status code was in the 500-599 range + # # - # You can also pass an explicit status number like assert_response(501) - # or its symbolic equivalent assert_response(:not_implemented). - # See +Rack::Utils::SYMBOL_TO_STATUS_CODE+ for a full list. + # You can also pass an explicit status number like `assert_response(501)` or its + # symbolic equivalent `assert_response(:not_implemented)`. See + # `Rack::Utils::SYMBOL_TO_STATUS_CODE` for a full list. # - # # Asserts that the response was a redirection - # assert_response :redirect + # # Asserts that the response was a redirection + # assert_response :redirect # - # # Asserts that the response code was status code 401 (unauthorized) - # assert_response 401 + # # Asserts that the response code was status code 401 (unauthorized) + # assert_response 401 # - # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#30 + # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#33 def assert_response(type, message = T.unsafe(nil)); end private - # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#102 + # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#105 def code_with_name(code_or_name); end - # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#86 + # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#89 def generate_response_message(expected, actual = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#96 + # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#99 def location_if_redirected; end - # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#77 + # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#80 def normalize_argument_to_redirection(fragment); end # Proxy to to_param if the object will respond to it. # - # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#73 + # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#76 def parameterize(value); end - # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#91 + # source://actionpack/lib/action_dispatch/testing/assertions/response.rb#94 def response_body_if_short; end end -# source://actionpack/lib/action_dispatch/testing/assertions/response.rb#7 +# source://actionpack/lib/action_dispatch/testing/assertions/response.rb#9 ActionDispatch::Assertions::ResponseAssertions::RESPONSE_PREDICATES = T.let(T.unsafe(nil), Hash) -# Suite of assertions to test routes generated by \Rails and the handling of requests made to them. +# Suite of assertions to test routes generated by Rails and the handling of +# requests made to them. # -# source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#11 +# source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#14 module ActionDispatch::Assertions::RoutingAssertions extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # Asserts that the provided options can be used to generate the provided path. This is the inverse of +assert_recognizes+. - # The +extras+ parameter is used to tell the request the names and values of additional request parameters that would be in - # a query string. The +message+ parameter allows you to specify a custom error message for assertion failures. + # Asserts that the provided options can be used to generate the provided path. + # This is the inverse of `assert_recognizes`. The `extras` parameter is used to + # tell the request the names and values of additional request parameters that + # would be in a query string. The `message` parameter allows you to specify a + # custom error message for assertion failures. # - # The +defaults+ parameter is unused. + # The `defaults` parameter is unused. # - # # Asserts that the default action is generated for a route with no action - # assert_generates "/items", controller: "items", action: "index" + # # Asserts that the default action is generated for a route with no action + # assert_generates "/items", controller: "items", action: "index" # - # # Tests that the list action is properly routed - # assert_generates "/items/list", controller: "items", action: "list" + # # Tests that the list action is properly routed + # assert_generates "/items/list", controller: "items", action: "list" # - # # Tests the generation of a route with a parameter - # assert_generates "/items/list/1", { controller: "items", action: "list", id: "1" } + # # Tests the generation of a route with a parameter + # assert_generates "/items/list/1", { controller: "items", action: "list", id: "1" } # - # # Asserts that the generated route gives us our custom route - # assert_generates "changesets/12", { controller: 'scm', action: 'show_diff', revision: "12" } + # # Asserts that the generated route gives us our custom route + # assert_generates "changesets/12", { controller: 'scm', action: 'show_diff', revision: "12" } # - # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#115 + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#204 def assert_generates(expected_path, options, defaults = T.unsafe(nil), extras = T.unsafe(nil), message = T.unsafe(nil)); end - # Asserts that the routing of the given +path+ was handled correctly and that the parsed options (given in the +expected_options+ hash) - # match +path+. Basically, it asserts that \Rails recognizes the route given by +expected_options+. + # Asserts that the routing of the given `path` was handled correctly and that + # the parsed options (given in the `expected_options` hash) match `path`. + # Basically, it asserts that Rails recognizes the route given by + # `expected_options`. # - # Pass a hash in the second argument (+path+) to specify the request method. This is useful for routes - # requiring a specific HTTP method. The hash should contain a +:path+ with the incoming request path - # and a +:method+ containing the required HTTP verb. + # Pass a hash in the second argument (`path`) to specify the request method. + # This is useful for routes requiring a specific HTTP method. The hash should + # contain a `:path` with the incoming request path and a `:method` containing + # the required HTTP verb. # - # # Asserts that POSTing to /items will call the create action on ItemsController - # assert_recognizes({controller: 'items', action: 'create'}, {path: 'items', method: :post}) + # # Asserts that POSTing to /items will call the create action on ItemsController + # assert_recognizes({controller: 'items', action: 'create'}, {path: 'items', method: :post}) # - # You can also pass in +extras+ with a hash containing URL parameters that would normally be in the query string. This can be used - # to assert that values in the query string will end up in the params hash correctly. To test query strings you must use the extras - # argument because appending the query string on the path directly will not work. For example: + # You can also pass in `extras` with a hash containing URL parameters that would + # normally be in the query string. This can be used to assert that values in the + # query string will end up in the params hash correctly. To test query strings + # you must use the extras argument because appending the query string on the + # path directly will not work. For example: # - # # Asserts that a path of '/items/list/1?view=print' returns the correct options - # assert_recognizes({controller: 'items', action: 'list', id: '1', view: 'print'}, 'items/list/1', { view: "print" }) + # # Asserts that a path of '/items/list/1?view=print' returns the correct options + # assert_recognizes({controller: 'items', action: 'list', id: '1', view: 'print'}, 'items/list/1', { view: "print" }) # - # The +message+ parameter allows you to pass in an error message that is displayed upon failure. + # The `message` parameter allows you to pass in an error message that is + # displayed upon failure. # - # # Check the default route (i.e., the index action) - # assert_recognizes({controller: 'items', action: 'index'}, 'items') + # # Check the default route (i.e., the index action) + # assert_recognizes({controller: 'items', action: 'index'}, 'items') # - # # Test a specific action - # assert_recognizes({controller: 'items', action: 'list'}, 'items/list') + # # Test a specific action + # assert_recognizes({controller: 'items', action: 'list'}, 'items/list') # - # # Test an action with a parameter - # assert_recognizes({controller: 'items', action: 'destroy', id: '1'}, 'items/destroy/1') + # # Test an action with a parameter + # assert_recognizes({controller: 'items', action: 'destroy', id: '1'}, 'items/destroy/1') # - # # Test a custom route - # assert_recognizes({controller: 'items', action: 'show', id: '1'}, 'view/item1') + # # Test a custom route + # assert_recognizes({controller: 'items', action: 'show', id: '1'}, 'view/item1') # - # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#77 + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#164 def assert_recognizes(expected_options, path, extras = T.unsafe(nil), msg = T.unsafe(nil)); end - # Asserts that path and options match both ways; in other words, it verifies that path generates - # options and then that options generates path. This essentially combines +assert_recognizes+ - # and +assert_generates+ into one step. + # Asserts that path and options match both ways; in other words, it verifies + # that `path` generates `options` and then that `options` generates `path`. This + # essentially combines `assert_recognizes` and `assert_generates` into one step. # - # The +extras+ hash allows you to specify options that would normally be provided as a query string to the action. The - # +message+ parameter allows you to specify a custom error message to display upon failure. + # The `extras` hash allows you to specify options that would normally be + # provided as a query string to the action. The `message` parameter allows you + # to specify a custom error message to display upon failure. # - # # Asserts a basic route: a controller with the default action (index) - # assert_routing '/home', controller: 'home', action: 'index' + # # Asserts a basic route: a controller with the default action (index) + # assert_routing '/home', controller: 'home', action: 'index' # - # # Test a route generated with a specific controller, action, and parameter (id) - # assert_routing '/entries/show/23', controller: 'entries', action: 'show', id: 23 + # # Test a route generated with a specific controller, action, and parameter (id) + # assert_routing '/entries/show/23', controller: 'entries', action: 'show', id: 23 # - # # Asserts a basic route (controller + default action), with an error message if it fails - # assert_routing '/store', { controller: 'store', action: 'index' }, {}, {}, 'Route for store index not generated properly' + # # Asserts a basic route (controller + default action), with an error message if it fails + # assert_routing '/store', { controller: 'store', action: 'index' }, {}, {}, 'Route for store index not generated properly' # - # # Tests a route, providing a defaults hash - # assert_routing 'controller/action/9', {id: "9", item: "square"}, {controller: "controller", action: "action"}, {}, {item: "square"} + # # Tests a route, providing a defaults hash + # assert_routing 'controller/action/9', {id: "9", item: "square"}, {controller: "controller", action: "action"}, {}, {item: "square"} # - # # Tests a route with an HTTP method - # assert_routing({ method: 'put', path: '/product/321' }, { controller: "product", action: "update", id: "321" }) + # # Tests a route with an HTTP method + # assert_routing({ method: 'put', path: '/product/321' }, { controller: "product", action: "update", id: "321" }) # - # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#158 + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#248 def assert_routing(path, options, defaults = T.unsafe(nil), extras = T.unsafe(nil), message = T.unsafe(nil)); end # ROUTES TODO: These assertions should really work in an integration context # - # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#191 - def method_missing(selector, *args, **_arg2, &block); end + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#261 + def method_missing(selector, *_arg1, **_arg2, &_arg3); end - # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#42 + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#103 def setup; end - # A helper to make it easier to test different route configurations. - # This method temporarily replaces @routes with a new RouteSet instance. + # A helper to make it easier to test different route configurations. This method + # temporarily replaces @routes with a new RouteSet instance. # - # The new instance is yielded to the passed block. Typically the block - # will create some routes using set.draw { match ... }: + # The new instance is yielded to the passed block. Typically the block will + # create some routes using `set.draw { match ... }`: # - # with_routing do |set| - # set.draw do - # resources :users + # with_routing do |set| + # set.draw do + # resources :users + # end + # assert_equal "/users", users_path # end - # assert_equal "/users", users_path - # end # - # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#183 + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#121 def with_routing(&block); end private # @yield [@routes] # - # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#201 + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#270 def create_routes; end - # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#267 + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#336 def fail_on(exception_class, message); end # Recognizes the route for a given path. # - # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#233 + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#302 def recognized_request_for(path, extras = T.unsafe(nil), msg); end - # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#225 + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#294 def reset_routes(old_routes, old_controller); end end -# source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#14 +# source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#76 module ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # A helper to make it easier to test different route configurations. - # This method temporarily replaces @routes with a new RouteSet instance - # before each test. + # A helper to make it easier to test different route configurations. This method + # temporarily replaces @routes with a new RouteSet instance before each test. # - # The new instance is yielded to the passed block. Typically the block - # will create some routes using set.draw { match ... }: + # The new instance is yielded to the passed block. Typically the block will + # create some routes using `set.draw { match ... }`: # - # with_routing do |set| - # set.draw do - # resources :users + # with_routing do |set| + # set.draw do + # resources :users + # end # end - # end # - # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#28 + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#89 + def with_routing(&block); end +end + +# source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#17 +module ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods + + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#37 + def with_routing(&block); end + + private + + # @yield [routes] + # + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#46 + def create_routes; end + + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#66 + def reset_routes(old_routes, old_integration_session); end +end + +# source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#20 +module ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods + # source://actionpack/lib/action_dispatch/testing/assertions/routing.rb#21 def with_routing(&block); end end -# = Action Dispatch \AssumeSSL +# # Action Dispatch AssumeSSL # -# When proxying through a load balancer that terminates SSL, the forwarded request will appear -# as though it's HTTP instead of HTTPS to the application. This makes redirects and cookie -# security target HTTP instead of HTTPS. This middleware makes the server assume that the -# proxy already terminated SSL, and that the request really is HTTPS. +# When proxying through a load balancer that terminates SSL, the forwarded +# request will appear as though it's HTTP instead of HTTPS to the application. +# This makes redirects and cookie security target HTTP instead of HTTPS. This +# middleware makes the server assume that the proxy already terminated SSL, and +# that the request really is HTTPS. # -# source://actionpack/lib/action_dispatch/middleware/assume_ssl.rb#10 +# source://actionpack/lib/action_dispatch/middleware/assume_ssl.rb#13 class ActionDispatch::AssumeSSL # @return [AssumeSSL] a new instance of AssumeSSL # - # source://actionpack/lib/action_dispatch/middleware/assume_ssl.rb#11 + # source://actionpack/lib/action_dispatch/middleware/assume_ssl.rb#14 def initialize(app); end - # source://actionpack/lib/action_dispatch/middleware/assume_ssl.rb#15 + # source://actionpack/lib/action_dispatch/middleware/assume_ssl.rb#18 def call(env); end end -# = Action Dispatch \Callbacks +# # Action Dispatch Callbacks # # Provides callbacks to be executed before and after dispatching the request. # -# source://actionpack/lib/action_dispatch/middleware/callbacks.rb#7 +# source://actionpack/lib/action_dispatch/middleware/callbacks.rb#9 class ActionDispatch::Callbacks include ::ActiveSupport::Callbacks extend ::ActiveSupport::Callbacks::ClassMethods @@ -8828,908 +9401,920 @@ class ActionDispatch::Callbacks # @return [Callbacks] a new instance of Callbacks # - # source://actionpack/lib/action_dispatch/middleware/callbacks.rb#22 + # source://actionpack/lib/action_dispatch/middleware/callbacks.rb#24 def initialize(app); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _call_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_call_callbacks(&block); end - # source://actionpack/lib/action_dispatch/middleware/callbacks.rb#26 + # source://actionpack/lib/action_dispatch/middleware/callbacks.rb#28 def call(env); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _call_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _call_callbacks=(value); end - # source://actionpack/lib/action_dispatch/middleware/callbacks.rb#17 + # source://actionpack/lib/action_dispatch/middleware/callbacks.rb#19 def after(*args, &block); end - # source://actionpack/lib/action_dispatch/middleware/callbacks.rb#13 + # source://actionpack/lib/action_dispatch/middleware/callbacks.rb#15 def before(*args, &block); end end end -# source://actionpack/lib/action_dispatch/constants.rb#6 +# source://actionpack/lib/action_dispatch/constants.rb#8 module ActionDispatch::Constants; end -# source://actionpack/lib/action_dispatch/constants.rb#21 +# source://actionpack/lib/action_dispatch/constants.rb#23 ActionDispatch::Constants::CONTENT_ENCODING = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/constants.rb#22 +# source://actionpack/lib/action_dispatch/constants.rb#24 ActionDispatch::Constants::CONTENT_SECURITY_POLICY = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/constants.rb#23 +# source://actionpack/lib/action_dispatch/constants.rb#25 ActionDispatch::Constants::CONTENT_SECURITY_POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/constants.rb#25 +# source://actionpack/lib/action_dispatch/constants.rb#27 ActionDispatch::Constants::FEATURE_POLICY = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/constants.rb#24 +# source://actionpack/lib/action_dispatch/constants.rb#26 ActionDispatch::Constants::LOCATION = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/constants.rb#28 +# source://actionpack/lib/action_dispatch/constants.rb#30 ActionDispatch::Constants::SERVER_TIMING = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/constants.rb#29 +# source://actionpack/lib/action_dispatch/constants.rb#31 ActionDispatch::Constants::STRICT_TRANSPORT_SECURITY = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/constants.rb#20 +# source://actionpack/lib/action_dispatch/constants.rb#22 ActionDispatch::Constants::VARY = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/constants.rb#27 +# source://actionpack/lib/action_dispatch/constants.rb#29 ActionDispatch::Constants::X_CASCADE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/constants.rb#26 +# source://actionpack/lib/action_dispatch/constants.rb#28 ActionDispatch::Constants::X_REQUEST_ID = T.let(T.unsafe(nil), String) -# = Action Dispatch Content Security Policy +# # Action Dispatch Content Security Policy # -# Configures the HTTP -# {Content-Security-Policy}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy] -# response header to help protect against XSS and injection attacks. +# Configures the HTTP [Content-Security-Policy] +# (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) +# response header to help protect against XSS and +# injection attacks. # # Example global policy: # -# Rails.application.config.content_security_policy do |policy| -# policy.default_src :self, :https -# policy.font_src :self, :https, :data -# policy.img_src :self, :https, :data -# policy.object_src :none -# policy.script_src :self, :https -# policy.style_src :self, :https +# Rails.application.config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https # -# # Specify URI for violation reports -# policy.report_uri "/csp-violation-report-endpoint" -# end +# # Specify URI for violation reports +# policy.report_uri "/csp-violation-report-endpoint" +# end # -# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#26 +# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#29 class ActionDispatch::ContentSecurityPolicy # @return [ContentSecurityPolicy] a new instance of ContentSecurityPolicy # @yield [_self] # @yieldparam _self [ActionDispatch::ContentSecurityPolicy] the object that the method was called on # - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#174 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#178 def initialize; end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def base_uri(*sources); end - # Specify whether to prevent the user agent from loading any assets over - # HTTP when the page uses HTTPS: + # Specify whether to prevent the user agent from loading any assets over HTTP + # when the page uses HTTPS: # - # policy.block_all_mixed_content + # policy.block_all_mixed_content # - # Pass +false+ to allow it again: + # Pass `false` to allow it again: # - # policy.block_all_mixed_content false + # policy.block_all_mixed_content false # - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#202 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#206 def block_all_mixed_content(enabled = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#291 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#298 def build(context = T.unsafe(nil), nonce = T.unsafe(nil), nonce_directives = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def child_src(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def connect_src(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def default_src(*sources); end # Returns the value of attribute directives. # - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#172 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#176 def directives; end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def font_src(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def form_action(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def frame_ancestors(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def frame_src(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def img_src(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def manifest_src(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def media_src(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def object_src(*sources); end # Restricts the set of plugins that can be embedded: # - # policy.plugin_types "application/x-shockwave-flash" + # policy.plugin_types "application/x-shockwave-flash" # # Leave empty to allow all plugins: # - # policy.plugin_types + # policy.plugin_types # - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#218 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#222 def plugin_types(*types); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def prefetch_src(*sources); end - # Enable the {report-uri}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-uri] - # directive. Violation reports will be sent to the specified URI: + # Enable the [report-uri] + # (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-uri) + # directive. Violation reports will be sent to the + # specified URI: # - # policy.report_uri "/csp-violation-report-endpoint" + # policy.report_uri "/csp-violation-report-endpoint" # - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#231 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#237 def report_uri(uri); end - # Specify asset types for which {Subresource Integrity}[https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity] - # is required: + # Specify asset types for which [Subresource Integrity] + # (https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) is required: # - # policy.require_sri_for :script, :style + # policy.require_sri_for :script, :style # # Leave empty to not require Subresource Integrity: # - # policy.require_sri_for + # policy.require_sri_for # - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#244 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#250 def require_sri_for(*types); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def require_trusted_types_for(*sources); end - # Specify whether a {sandbox}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox] + # Specify whether a [sandbox] + # (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox) # should be enabled for the requested resource: # - # policy.sandbox + # policy.sandbox # # Values can be passed as arguments: # - # policy.sandbox "allow-scripts", "allow-modals" + # policy.sandbox "allow-scripts", "allow-modals" # - # Pass +false+ to disable the sandbox: + # Pass `false` to disable the sandbox: # - # policy.sandbox false + # policy.sandbox false # - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#265 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#272 def sandbox(*values); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def script_src(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def script_src_attr(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def script_src_elem(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def style_src(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def style_src_attr(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def style_src_elem(*sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def trusted_types(*sources); end # Specify whether user agents should treat any assets over HTTP as HTTPS: # - # policy.upgrade_insecure_requests + # policy.upgrade_insecure_requests # - # Pass +false+ to disable it: + # Pass `false` to disable it: # - # policy.upgrade_insecure_requests false + # policy.upgrade_insecure_requests false # - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#283 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#290 def upgrade_insecure_requests(enabled = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#184 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#188 def worker_src(*sources); end private - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#310 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#317 def apply_mapping(source); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#297 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#304 def apply_mappings(sources); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#332 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#339 def build_directive(sources, context); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#316 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#323 def build_directives(context, nonce, nonce_directives); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#179 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#183 def initialize_copy(other); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#354 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#361 def nonce_directive?(directive, nonce_directives); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#336 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#343 def resolve_source(source, context); end end -# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#168 +# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#172 ActionDispatch::ContentSecurityPolicy::DEFAULT_NONCE_DIRECTIVES = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#143 +# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#147 ActionDispatch::ContentSecurityPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#123 +# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#126 ActionDispatch::ContentSecurityPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#27 +# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#30 class ActionDispatch::ContentSecurityPolicy::Middleware # @return [Middleware] a new instance of Middleware # - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#28 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#31 def initialize(app); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#32 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#35 def call(env); end private - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#54 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#57 def header_name(request); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#62 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#65 def policy_present?(headers); end end -# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#68 +# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#71 module ActionDispatch::ContentSecurityPolicy::Request - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#75 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#78 def content_security_policy; end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#79 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#82 def content_security_policy=(policy); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#107 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#110 def content_security_policy_nonce; end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#99 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#102 def content_security_policy_nonce_directives; end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#103 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#106 def content_security_policy_nonce_directives=(generator); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#91 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#94 def content_security_policy_nonce_generator; end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#95 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#98 def content_security_policy_nonce_generator=(generator); end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#83 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#86 def content_security_policy_report_only; end - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#87 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#90 def content_security_policy_report_only=(value); end private - # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#118 + # source://actionpack/lib/action_dispatch/http/content_security_policy.rb#121 def generate_content_security_policy_nonce; end end -# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#72 +# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#75 ActionDispatch::ContentSecurityPolicy::Request::NONCE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#73 +# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#76 ActionDispatch::ContentSecurityPolicy::Request::NONCE_DIRECTIVES = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#71 +# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#74 ActionDispatch::ContentSecurityPolicy::Request::NONCE_GENERATOR = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#69 +# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#72 ActionDispatch::ContentSecurityPolicy::Request::POLICY = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#70 +# source://actionpack/lib/action_dispatch/http/content_security_policy.rb#73 ActionDispatch::ContentSecurityPolicy::Request::POLICY_REPORT_ONLY = T.let(T.unsafe(nil), String) # Read and write data to cookies through ActionController::Cookies#cookies. # -# When reading cookie data, the data is read from the HTTP request header, Cookie. -# When writing cookie data, the data is sent out in the HTTP response header, +Set-Cookie+. +# When reading cookie data, the data is read from the HTTP request header, +# Cookie. When writing cookie data, the data is sent out in the HTTP response +# header, `Set-Cookie`. # # Examples of writing: # -# # Sets a simple session cookie. -# # This cookie will be deleted when the user's browser is closed. -# cookies[:user_name] = "david" +# # Sets a simple session cookie. +# # This cookie will be deleted when the user's browser is closed. +# cookies[:user_name] = "david" # -# # Cookie values are String-based. Other data types need to be serialized. -# cookies[:lat_lon] = JSON.generate([47.68, -122.37]) +# # Cookie values are String-based. Other data types need to be serialized. +# cookies[:lat_lon] = JSON.generate([47.68, -122.37]) # -# # Sets a cookie that expires in 1 hour. -# cookies[:login] = { value: "XJ-122", expires: 1.hour } +# # Sets a cookie that expires in 1 hour. +# cookies[:login] = { value: "XJ-122", expires: 1.hour } # -# # Sets a cookie that expires at a specific time. -# cookies[:login] = { value: "XJ-122", expires: Time.utc(2020, 10, 15, 5) } +# # Sets a cookie that expires at a specific time. +# cookies[:login] = { value: "XJ-122", expires: Time.utc(2020, 10, 15, 5) } # -# # Sets a signed cookie, which prevents users from tampering with its value. -# # It can be read using the signed method `cookies.signed[:name]` -# cookies.signed[:user_id] = current_user.id +# # Sets a signed cookie, which prevents users from tampering with its value. +# cookies.signed[:user_id] = current_user.id +# # It can be read using the signed method. +# cookies.signed[:user_id] # => 123 # -# # Sets an encrypted cookie value before sending it to the client which -# # prevent users from reading and tampering with its value. -# # It can be read using the encrypted method `cookies.encrypted[:name]` -# cookies.encrypted[:discount] = 45 +# # Sets an encrypted cookie value before sending it to the client which +# # prevent users from reading and tampering with its value. +# cookies.encrypted[:discount] = 45 +# # It can be read using the encrypted method. +# cookies.encrypted[:discount] # => 45 # -# # Sets a "permanent" cookie (which expires in 20 years from now). -# cookies.permanent[:login] = "XJ-122" +# # Sets a "permanent" cookie (which expires in 20 years from now). +# cookies.permanent[:login] = "XJ-122" # -# # You can also chain these methods: -# cookies.signed.permanent[:login] = "XJ-122" +# # You can also chain these methods: +# cookies.signed.permanent[:login] = "XJ-122" # # Examples of reading: # -# cookies[:user_name] # => "david" -# cookies.size # => 2 -# JSON.parse(cookies[:lat_lon]) # => [47.68, -122.37] -# cookies.signed[:login] # => "XJ-122" -# cookies.encrypted[:discount] # => 45 +# cookies[:user_name] # => "david" +# cookies.size # => 2 +# JSON.parse(cookies[:lat_lon]) # => [47.68, -122.37] +# cookies.signed[:login] # => "XJ-122" +# cookies.encrypted[:discount] # => 45 # # Example for deleting: # -# cookies.delete :user_name +# cookies.delete :user_name # -# Please note that if you specify a +:domain+ when setting a cookie, you must also specify the domain when deleting the cookie: +# Please note that if you specify a `:domain` when setting a cookie, you must +# also specify the domain when deleting the cookie: # -# cookies[:name] = { -# value: 'a yummy cookie', -# expires: 1.year, -# domain: 'domain.com' -# } +# cookies[:name] = { +# value: 'a yummy cookie', +# expires: 1.year, +# domain: 'domain.com' +# } # -# cookies.delete(:name, domain: 'domain.com') +# cookies.delete(:name, domain: 'domain.com') # # The option symbols for setting cookies are: # -# * :value - The cookie's value. -# * :path - The path for which this cookie applies. Defaults to the root -# of the application. -# * :domain - The domain for which this cookie applies so you can -# restrict to the domain level. If you use a schema like www.example.com -# and want to share session with user.example.com set :domain -# to :all. To support multiple domains, provide an array, and -# the first domain matching request.host will be used. Make -# sure to specify the :domain option with :all or -# Array again when deleting cookies. For more flexibility you -# can set the domain on a per-request basis by specifying :domain -# with a proc. -# -# domain: nil # Does not set cookie domain. (default) -# domain: :all # Allow the cookie for the top most level -# # domain and subdomains. -# domain: %w(.example.com .example.org) # Allow the cookie -# # for concrete domain names. -# domain: proc { Tenant.current.cookie_domain } # Set cookie domain dynamically -# domain: proc { |req| ".sub.#{req.host}" } # Set cookie domain dynamically based on request -# -# -# * :tld_length - When using :domain => :all, this option can be used to explicitly -# set the TLD length when using a short (<= 3 character) domain that is being interpreted as part of a TLD. -# For example, to share cookies between user1.lvh.me and user2.lvh.me, set :tld_length to 2. -# * :expires - The time at which this cookie expires, as a \Time or ActiveSupport::Duration object. -# * :secure - Whether this cookie is only transmitted to HTTPS servers. -# Default is +false+. -# * :httponly - Whether this cookie is accessible via scripting or -# only HTTP. Defaults to +false+. -# * :same_site - The value of the +SameSite+ cookie attribute, which -# determines how this cookie should be restricted in cross-site contexts. -# Possible values are +nil+, +:none+, +:lax+, and +:strict+. Defaults to -# +:lax+. -# -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#188 +# * `:value` - The cookie's value. +# * `:path` - The path for which this cookie applies. Defaults to the root of +# the application. +# * `:domain` - The domain for which this cookie applies so you can restrict +# to the domain level. If you use a schema like www.example.com and want to +# share session with user.example.com set `:domain` to `:all`. To support +# multiple domains, provide an array, and the first domain matching +# `request.host` will be used. Make sure to specify the `:domain` option +# with `:all` or `Array` again when deleting cookies. For more flexibility +# you can set the domain on a per-request basis by specifying `:domain` with +# a proc. +# +# domain: nil # Does not set cookie domain. (default) +# domain: :all # Allow the cookie for the top most level +# # domain and subdomains. +# domain: %w(.example.com .example.org) # Allow the cookie +# # for concrete domain names. +# domain: proc { Tenant.current.cookie_domain } # Set cookie domain dynamically +# domain: proc { |req| ".sub.#{req.host}" } # Set cookie domain dynamically based on request +# +# * `:tld_length` - When using `:domain => :all`, this option can be used to +# explicitly set the TLD length when using a short (<= 3 character) domain +# that is being interpreted as part of a TLD. For example, to share cookies +# between user1.lvh.me and user2.lvh.me, set `:tld_length` to 2. +# * `:expires` - The time at which this cookie expires, as a Time or +# ActiveSupport::Duration object. +# * `:secure` - Whether this cookie is only transmitted to HTTPS servers. +# Default is `false`. +# * `:httponly` - Whether this cookie is accessible via scripting or only +# HTTP. Defaults to `false`. +# * `:same_site` - The value of the `SameSite` cookie attribute, which +# determines how this cookie should be restricted in cross-site contexts. +# Possible values are `nil`, `:none`, `:lax`, and `:strict`. Defaults to +# `:lax`. +# +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#195 class ActionDispatch::Cookies # @return [Cookies] a new instance of Cookies # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#683 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#700 def initialize(app); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#687 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#704 def call(env); end end -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#194 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#201 ActionDispatch::Cookies::AUTHENTICATED_ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#489 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#506 class ActionDispatch::Cookies::AbstractCookieJar include ::ActionDispatch::Cookies::ChainedCookieJars # @return [AbstractCookieJar] a new instance of AbstractCookieJar # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#492 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#509 def initialize(parent_jar); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#496 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#513 def [](name); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#508 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#525 def []=(name, options); end protected - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#520 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#537 def request; end private - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#538 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#555 def commit(name, options); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#531 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#548 def cookie_metadata(name, options); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#523 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#540 def expiry_options(options); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#537 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#554 def parse(name, data, purpose: T.unsafe(nil)); end end -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#200 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#207 ActionDispatch::Cookies::COOKIES_DIGEST = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#201 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#208 ActionDispatch::Cookies::COOKIES_ROTATIONS = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#202 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#209 ActionDispatch::Cookies::COOKIES_SAME_SITE_PROTECTION = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#199 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#206 ActionDispatch::Cookies::COOKIES_SERIALIZER = T.let(T.unsafe(nil), String) -# Include in a cookie jar to allow chaining, e.g. +cookies.permanent.signed+. +# Include in a cookie jar to allow chaining, e.g. `cookies.permanent.signed`. # -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#212 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#219 module ActionDispatch::Cookies::ChainedCookieJars - # Returns a jar that'll automatically encrypt cookie values before sending them to the client and will decrypt them for read. - # If the cookie was tampered with by the user (or a 3rd party), +nil+ will be returned. + # Returns a jar that'll automatically encrypt cookie values before sending them + # to the client and will decrypt them for read. If the cookie was tampered with + # by the user (or a 3rd party), `nil` will be returned. # - # If +config.action_dispatch.encrypted_cookie_salt+ and +config.action_dispatch.encrypted_signed_cookie_salt+ - # are both set, legacy cookies encrypted with HMAC AES-256-CBC will be transparently upgraded. + # If `config.action_dispatch.encrypted_cookie_salt` and + # `config.action_dispatch.encrypted_signed_cookie_salt` are both set, legacy + # cookies encrypted with HMAC AES-256-CBC will be transparently upgraded. # - # This jar requires that you set a suitable secret for the verification on your app's +secret_key_base+. + # This jar requires that you set a suitable secret for the verification on your + # app's `secret_key_base`. # # Example: # - # cookies.encrypted[:discount] = 45 - # # => Set-Cookie: discount=DIQ7fw==--K3n//8vvnSbGq9dA--7Xh91HfLpwzbj1czhBiwOg==; path=/ + # cookies.encrypted[:discount] = 45 + # # => Set-Cookie: discount=DIQ7fw==--K3n//8vvnSbGq9dA--7Xh91HfLpwzbj1czhBiwOg==; path=/ # - # cookies.encrypted[:discount] # => 45 + # cookies.encrypted[:discount] # => 45 # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#258 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#274 def encrypted; end - # Returns a jar that'll automatically set the assigned cookies to have an expiration date 20 years from now. Example: + # Returns a jar that'll automatically set the assigned cookies to have an + # expiration date 20 years from now. Example: # - # cookies.permanent[:prefers_open_id] = true - # # => Set-Cookie: prefers_open_id=true; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT + # cookies.permanent[:prefers_open_id] = true + # # => Set-Cookie: prefers_open_id=true; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT # - # This jar is only meant for writing. You'll read permanent cookies through the regular accessor. + # This jar is only meant for writing. You'll read permanent cookies through the + # regular accessor. # - # This jar allows chaining with the signed jar as well, so you can set permanent, signed cookies. Examples: + # This jar allows chaining with the signed jar as well, so you can set + # permanent, signed cookies. Examples: # - # cookies.permanent.signed[:remember_me] = current_user.id - # # => Set-Cookie: remember_me=BAhU--848956038e692d7046deab32b7131856ab20e14e; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT + # cookies.permanent.signed[:remember_me] = current_user.id + # # => Set-Cookie: remember_me=BAhU--848956038e692d7046deab32b7131856ab20e14e; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#224 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#234 def permanent; end - # Returns a jar that'll automatically generate a signed representation of cookie value and verify it when reading from - # the cookie again. This is useful for creating cookies with values that the user is not supposed to change. If a signed - # cookie was tampered with by the user (or a 3rd party), +nil+ will be returned. + # Returns a jar that'll automatically generate a signed representation of cookie + # value and verify it when reading from the cookie again. This is useful for + # creating cookies with values that the user is not supposed to change. If a + # signed cookie was tampered with by the user (or a 3rd party), `nil` will be + # returned. # - # This jar requires that you set a suitable secret for the verification on your app's +secret_key_base+. + # This jar requires that you set a suitable secret for the verification on your + # app's `secret_key_base`. # # Example: # - # cookies.signed[:discount] = 45 - # # => Set-Cookie: discount=BAhpMg==--2c1c6906c90a3bc4fd54a51ffb41dffa4bf6b5f7; path=/ + # cookies.signed[:discount] = 45 + # # => Set-Cookie: discount=BAhpMg==--2c1c6906c90a3bc4fd54a51ffb41dffa4bf6b5f7; path=/ # - # cookies.signed[:discount] # => 45 + # cookies.signed[:discount] # => 45 # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#240 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#253 def signed; end - # Returns the +signed+ or +encrypted+ jar, preferring +encrypted+ if +secret_key_base+ is set. - # Used by ActionDispatch::Session::CookieStore to avoid the need to introduce new cookie stores. + # Returns the `signed` or `encrypted` jar, preferring `encrypted` if + # `secret_key_base` is set. Used by ActionDispatch::Session::CookieStore to + # avoid the need to introduce new cookie stores. # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#264 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#281 def signed_or_encrypted; end private - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#287 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#304 def encrypted_cookie_cipher; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#281 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#298 def prepare_upgrade_legacy_hmac_aes_cbc_cookies?; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#291 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#308 def signed_cookie_digest; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#274 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#291 def upgrade_legacy_hmac_aes_cbc_cookies?; end end -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#296 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#313 class ActionDispatch::Cookies::CookieJar include ::ActionDispatch::Cookies::ChainedCookieJars include ::Enumerable # @return [CookieJar] a new instance of CookieJar # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#307 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#324 def initialize(request); end - # Returns the value of the cookie by +name+, or +nil+ if no such cookie exists. + # Returns the value of the cookie by `name`, or `nil` if no such cookie exists. # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#328 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#345 def [](name); end - # Sets the cookie named +name+. The second argument may be the cookie's - # value or a hash of options as documented above. + # Sets the cookie named `name`. The second argument may be the cookie's value or + # a hash of options as documented above. # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#362 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#379 def []=(name, options); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#424 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#441 def always_write_cookie; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#424 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#441 def always_write_cookie=(val); end - # Removes all cookies on the client machine by calling delete for each cookie. + # Removes all cookies on the client machine by calling `delete` for each cookie. # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#408 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#425 def clear(options = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#317 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#334 def commit!; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#315 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#332 def committed?; end - # Removes the cookie on the client machine by setting the value to an empty string - # and the expiration date in the past. Like []=, you can pass in - # an options hash to delete cookies with extra data such as a :path. + # Removes the cookie on the client machine by setting the value to an empty + # string and the expiration date in the past. Like `[]=`, you can pass in an + # options hash to delete cookies with extra data such as a `:path`. # - # Returns the value of the cookie, or +nil+ if the cookie does not exist. + # Returns the value of the cookie, or `nil` if the cookie does not exist. # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#387 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#404 def delete(name, options = T.unsafe(nil)); end - # Whether the given cookie is to be deleted by this CookieJar. - # Like []=, you can pass in an options hash to test if a - # deletion applies to a specific :path, :domain etc. + # Whether the given cookie is to be deleted by this CookieJar. Like `[]=`, you + # can pass in an options hash to test if a deletion applies to a specific + # `:path`, `:domain` etc. # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#401 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#418 def deleted?(name, options = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#323 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#340 def each(&block); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#332 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#349 def fetch(name, *args, &block); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#336 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#353 def has_key?(name); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#336 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#353 def key?(name); end # Returns the value of attribute request. # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#305 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#322 def request; end # Returns the cookies as Hash. def to_hash(*_arg0); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#356 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#373 def to_header; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#344 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#361 def update(other_hash); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#349 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#366 def update_cookies_from_jar; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#412 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#429 def write(response); end private - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#427 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#444 def escape(string); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#435 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#452 def handle_options(options); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#431 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#448 def write_cookie?(cookie); end class << self - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#424 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#441 def always_write_cookie; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#424 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#441 def always_write_cookie=(val); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#299 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#316 def build(req, cookies); end end end # Raised when storing more than 4K of session data. # -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#209 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#216 class ActionDispatch::Cookies::CookieOverflow < ::StandardError; end -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#196 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#203 ActionDispatch::Cookies::ENCRYPTED_COOKIE_CIPHER = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#192 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#199 ActionDispatch::Cookies::ENCRYPTED_COOKIE_SALT = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#193 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#200 ActionDispatch::Cookies::ENCRYPTED_SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#631 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#648 class ActionDispatch::Cookies::EncryptedKeyRotatingCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar include ::ActionDispatch::Cookies::SerializedCookieJars # @return [EncryptedKeyRotatingCookieJar] a new instance of EncryptedKeyRotatingCookieJar # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#634 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#651 def initialize(parent_jar); end private - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#676 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#693 def commit(name, options); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#668 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#685 def parse(name, encrypted_message, purpose: T.unsafe(nil)); end end -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#190 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#197 ActionDispatch::Cookies::GENERATOR_KEY = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#189 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#196 ActionDispatch::Cookies::HTTP_HEADER = T.let(T.unsafe(nil), String) # Cookies can typically store 4096 bytes. # -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#206 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#213 ActionDispatch::Cookies::MAX_COOKIE_SIZE = T.let(T.unsafe(nil), Integer) -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#541 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#558 class ActionDispatch::Cookies::PermanentCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar private - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#543 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#560 def commit(name, options); end end -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#198 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#205 ActionDispatch::Cookies::SECRET_KEY_BASE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#197 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#204 ActionDispatch::Cookies::SIGNED_COOKIE_DIGEST = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#191 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#198 ActionDispatch::Cookies::SIGNED_COOKIE_SALT = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#548 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#565 module ActionDispatch::Cookies::SerializedCookieJars protected - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#552 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#569 def digest; end private - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#595 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#612 def check_for_overflow!(name, options); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#591 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#608 def commit(name, options); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#577 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#594 def parse(name, dumped, force_reserialize: T.unsafe(nil), **_arg3); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#571 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#588 def reserialize?(dumped); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#557 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#574 def serializer; end end -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#549 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#566 ActionDispatch::Cookies::SerializedCookieJars::SERIALIZER = ActiveSupport::MessageEncryptor::NullSerializer -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#602 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#619 class ActionDispatch::Cookies::SignedKeyRotatingCookieJar < ::ActionDispatch::Cookies::AbstractCookieJar include ::ActionDispatch::Cookies::SerializedCookieJars # @return [SignedKeyRotatingCookieJar] a new instance of SignedKeyRotatingCookieJar # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#605 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#622 def initialize(parent_jar); end private - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#624 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#641 def commit(name, options); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#618 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#635 def parse(name, signed_message, purpose: T.unsafe(nil)); end end -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#195 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#202 ActionDispatch::Cookies::USE_AUTHENTICATED_COOKIE_ENCRYPTION = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#203 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#210 ActionDispatch::Cookies::USE_COOKIES_WITH_METADATA = T.let(T.unsafe(nil), String) -# = Action Dispatch \DebugExceptions +# # Action Dispatch DebugExceptions # -# This middleware is responsible for logging exceptions and -# showing a debugging page in case the request is local. +# This middleware is responsible for logging exceptions and showing a debugging +# page in case the request is local. # -# source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#13 +# source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#15 class ActionDispatch::DebugExceptions # @return [DebugExceptions] a new instance of DebugExceptions # - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#21 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#23 def initialize(app, routes_app = T.unsafe(nil), response_format = T.unsafe(nil), interceptors = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#28 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#30 def call(env); end private # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#177 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#198 def api_request?(content_type); end - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#114 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#116 def create_template(request, wrapper); end - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#48 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#50 def invoke_interceptors(request, exception, wrapper); end - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#151 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#172 def log_array(logger, lines, request); end - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#133 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#135 def log_error(request, wrapper); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#181 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#202 def log_rescued_responses?(request); end - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#163 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#184 def logger(request); end - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#129 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#131 def render(status, body, format); end - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#56 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#58 def render_exception(request, exception, wrapper); end - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#90 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#92 def render_for_api_request(content_type, wrapper); end - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#76 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#78 def render_for_browser_request(request, wrapper); end - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#171 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#192 def routes_inspector(exception); end - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#167 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#188 def stderr_logger; end class << self - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#14 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#16 def interceptors; end - # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#16 + # source://actionpack/lib/action_dispatch/middleware/debug_exceptions.rb#18 def register_interceptor(object = T.unsafe(nil), &block); end end end -# = Action Dispatch \DebugLocks +# # Action Dispatch DebugLocks # # This middleware can be used to diagnose deadlocks in the autoload interlock. # # To use it, insert it near the top of the middleware stack, using -# config/application.rb: +# `config/application.rb`: # # config.middleware.insert_before Rack::Sendfile, ActionDispatch::DebugLocks # -# After restarting the application and re-triggering the deadlock condition, -# the route /rails/locks will show a summary of all threads currently -# known to the interlock, which lock level they are holding or awaiting, and -# their current backtrace. +# After restarting the application and re-triggering the deadlock condition, the +# route `/rails/locks` will show a summary of all threads currently known to the +# interlock, which lock level they are holding or awaiting, and their current +# backtrace. # # Generally a deadlock will be caused by the interlock conflicting with some # other external lock or blocking I/O call. These cannot be automatically @@ -9741,1105 +10326,1137 @@ end # This middleware exposes operational details of the server, with no access # control. It should only be enabled when in use, and removed thereafter. # -# source://actionpack/lib/action_dispatch/middleware/debug_locks.rb#27 +# source://actionpack/lib/action_dispatch/middleware/debug_locks.rb#29 class ActionDispatch::DebugLocks # @return [DebugLocks] a new instance of DebugLocks # - # source://actionpack/lib/action_dispatch/middleware/debug_locks.rb#28 + # source://actionpack/lib/action_dispatch/middleware/debug_locks.rb#30 def initialize(app, path = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/middleware/debug_locks.rb#33 + # source://actionpack/lib/action_dispatch/middleware/debug_locks.rb#35 def call(env); end private # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/debug_locks.rb#106 + # source://actionpack/lib/action_dispatch/middleware/debug_locks.rb#108 def blocked_by?(victim, blocker, all_threads); end - # source://actionpack/lib/action_dispatch/middleware/debug_locks.rb#47 + # source://actionpack/lib/action_dispatch/middleware/debug_locks.rb#49 def render_details(req); end end -# source://actionpack/lib/action_dispatch/middleware/debug_view.rb#9 +# source://actionpack/lib/action_dispatch/middleware/debug_view.rb#11 class ActionDispatch::DebugView < ::ActionView::Base # @return [DebugView] a new instance of DebugView # - # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#12 + # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#14 def initialize(assigns); end - # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#19 + # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#21 def compiled_method_container; end - # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#47 + # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#49 def debug_hash(object); end - # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#39 + # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#41 def debug_headers(headers); end - # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#27 + # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#29 def debug_params(params); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#23 + # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#25 def error_highlight_available?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#65 + # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#67 def params_valid?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#61 + # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#63 def protect_against_forgery?; end - # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#51 + # source://actionpack/lib/action_dispatch/middleware/debug_view.rb#53 def render(*_arg0); end end -# source://actionpack/lib/action_dispatch/middleware/debug_view.rb#10 +# source://actionpack/lib/action_dispatch/middleware/debug_view.rb#12 ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch.rb#50 -class ActionDispatch::DeprecatedIllegalStateError < ::StandardError; end - -# source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#9 +# source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#11 class ActionDispatch::ExceptionWrapper # @return [ExceptionWrapper] a new instance of ExceptionWrapper # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#48 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#50 def initialize(backtrace_cleaner, exception); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#99 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#101 def actions; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#111 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#113 def annotated_source_code; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#133 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#135 def application_trace; end # Returns the value of attribute backtrace_cleaner. # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#46 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#48 def backtrace_cleaner; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#87 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#89 def corrections; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#210 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#204 def error_highlight_available?; end # Returns the value of attribute exception. # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#46 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#48 def exception; end # Returns the value of attribute exception_class_name. # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#46 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#48 def exception_class_name; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#239 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#234 def exception_id; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#235 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#230 def exception_inspect; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#227 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#222 def exception_name; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#127 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#129 def exception_trace; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#75 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#77 def failures; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#91 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#93 def file_name; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#137 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#139 def framework_trace; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#141 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#143 def full_trace; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#71 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#73 def has_cause?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#79 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#81 def has_corrections?; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#95 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#97 def line_number; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#231 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#226 def message; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#83 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#85 def original_message; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#200 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#194 def rescue_response?; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#10 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#12 def rescue_responses; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#10 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#12 def rescue_responses=(val); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#119 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#121 def rescue_template; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#28 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#30 def rescue_templates; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#28 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#30 def rescue_templates=(val); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#59 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#61 def routing_error?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#177 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#179 def show?(request); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#41 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#43 def silent_exceptions; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#41 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#43 def silent_exceptions=(val); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#204 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#198 def source_extracts; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#223 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#218 def source_to_show_id; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#123 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#125 def status_code; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#67 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#69 def sub_template_message; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#63 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#65 def template_error?; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#215 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#210 def trace_to_show; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#145 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#147 def traces; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#103 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#105 def unwrapped_exception; end # Returns the value of attribute wrapped_causes. # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#46 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#48 def wrapped_causes; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#37 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#39 def wrapper_exceptions; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#37 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#39 def wrapper_exceptions=(val); end private # Returns the value of attribute backtrace. # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#263 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#258 def backtrace; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#265 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#260 def build_backtrace; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#288 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#283 def causes_for(exception); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#298 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#293 def clean_backtrace(*args); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#351 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#346 def extract_file_and_line_number(trace); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#306 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#301 def extract_source(trace); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#335 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#330 def extract_source_fragment_lines(source_lines, line); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#341 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#336 def source_fragment(path, line); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#294 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#289 def wrapped_causes_for(exception, backtrace_cleaner); end class << self - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#10 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#12 def rescue_responses; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#10 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#12 def rescue_responses=(val); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#28 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#30 def rescue_templates; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#28 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#30 def rescue_templates=(val); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#41 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#43 def silent_exceptions; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#41 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#43 def silent_exceptions=(val); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#173 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#175 def status_code_for_exception(class_name); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#37 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#39 def wrapper_exceptions; end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#37 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#39 def wrapper_exceptions=(val); end end end -# source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#244 +# source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#239 class ActionDispatch::ExceptionWrapper::SourceMapLocation # @return [SourceMapLocation] a new instance of SourceMapLocation # - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#245 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#240 def initialize(location, template); end - # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#250 + # source://actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#245 def spot(exc); end end -# source://actionpack/lib/action_dispatch/middleware/executor.rb#6 +# source://actionpack/lib/action_dispatch/middleware/executor.rb#8 class ActionDispatch::Executor # @return [Executor] a new instance of Executor # - # source://actionpack/lib/action_dispatch/middleware/executor.rb#7 + # source://actionpack/lib/action_dispatch/middleware/executor.rb#9 def initialize(app, executor); end - # source://actionpack/lib/action_dispatch/middleware/executor.rb#11 + # source://actionpack/lib/action_dispatch/middleware/executor.rb#13 def call(env); end end -# = Action Dispatch \FileHandler +# # Action Dispatch FileHandler # -# This endpoint serves static files from disk using +Rack::Files+. +# This endpoint serves static files from disk using `Rack::Files`. # -# URL paths are matched with static files according to expected -# conventions: +path+, +path+.html, +path+/index.html. +# URL paths are matched with static files according to expected conventions: +# `path`, `path`.html, `path`/index.html. # -# Precompressed versions of these files are checked first. Brotli (.br) -# and gzip (.gz) files are supported. If +path+.br exists, this +# Precompressed versions of these files are checked first. Brotli (.br) and gzip +# (.gz) files are supported. If `path`.br exists, this endpoint returns that # -# If no matching file is found, this endpoint responds 404 Not Found. +# If no matching file is found, this endpoint responds `404 Not Found`. # -# Pass the +root+ directory to search for matching files, an optional -# index: "index" to change the default +path+/index.html, and optional -# additional response headers. +# Pass the `root` directory to search for matching files, an optional `index: +# "index"` to change the default `path`/index.html, and optional additional +# response headers. # -# source://actionpack/lib/action_dispatch/middleware/static.rb#45 +# source://actionpack/lib/action_dispatch/middleware/static.rb#47 class ActionDispatch::FileHandler # @return [FileHandler] a new instance of FileHandler # - # source://actionpack/lib/action_dispatch/middleware/static.rb#53 + # source://actionpack/lib/action_dispatch/middleware/static.rb#55 def initialize(root, index: T.unsafe(nil), headers: T.unsafe(nil), precompressed: T.unsafe(nil), compressible_content_types: T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/middleware/static.rb#67 + # source://actionpack/lib/action_dispatch/middleware/static.rb#69 def attempt(env); end - # source://actionpack/lib/action_dispatch/middleware/static.rb#63 + # source://actionpack/lib/action_dispatch/middleware/static.rb#65 def call(env); end private - # source://actionpack/lib/action_dispatch/middleware/static.rb#183 + # source://actionpack/lib/action_dispatch/middleware/static.rb#185 def clean_path(path_info); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/static.rb#147 + # source://actionpack/lib/action_dispatch/middleware/static.rb#149 def compressible?(content_type); end # @yield [path, content_type || "text/plain"] # - # source://actionpack/lib/action_dispatch/middleware/static.rb#160 + # source://actionpack/lib/action_dispatch/middleware/static.rb#162 def each_candidate_filepath(path_info); end - # source://actionpack/lib/action_dispatch/middleware/static.rb#151 + # source://actionpack/lib/action_dispatch/middleware/static.rb#153 def each_precompressed_filepath(filepath); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/static.rb#142 + # source://actionpack/lib/action_dispatch/middleware/static.rb#144 def file_readable?(path); end # Match a URI path to a static file to be served. # - # Used by the +Static+ class to negotiate a servable file in the - # +public/+ directory (see Static#call). + # Used by the `Static` class to negotiate a servable file in the `public/` + # directory (see Static#call). # - # Checks for +path+, +path+.html, and +path+/index.html files, - # in that order, including .br and .gzip compressed extensions. + # Checks for `path`, `path`.html, and `path`/index.html files, in that order, + # including .br and .gzip compressed extensions. # # If a matching file is found, the path and necessary response headers # (Content-Type, Content-Encoding) are returned. # - # source://actionpack/lib/action_dispatch/middleware/static.rb#102 + # source://actionpack/lib/action_dispatch/middleware/static.rb#104 def find_file(path_info, accept_encoding:); end - # source://actionpack/lib/action_dispatch/middleware/static.rb#78 + # source://actionpack/lib/action_dispatch/middleware/static.rb#80 def serve(request, filepath, content_headers); end - # source://actionpack/lib/action_dispatch/middleware/static.rb#110 + # source://actionpack/lib/action_dispatch/middleware/static.rb#112 def try_files(filepath, content_type, accept_encoding:); end - # source://actionpack/lib/action_dispatch/middleware/static.rb#120 + # source://actionpack/lib/action_dispatch/middleware/static.rb#122 def try_precompressed_files(filepath, headers, accept_encoding:); end end -# +Accept-Encoding+ value -> file extension +# `Accept-Encoding` value -> file extension # -# source://actionpack/lib/action_dispatch/middleware/static.rb#47 +# source://actionpack/lib/action_dispatch/middleware/static.rb#49 ActionDispatch::FileHandler::PRECOMPRESSED = T.let(T.unsafe(nil), Hash) -# = Action Dispatch \Flash -# -# The flash provides a way to pass temporary primitive-types (String, Array, Hash) between actions. Anything you place in the flash will be exposed -# to the very next action and then cleared out. This is a great way of doing notices and alerts, such as a create -# action that sets flash[:notice] = "Post successfully created" before redirecting to a display action that can -# then expose the flash to its template. Actually, that exposure is automatically done. -# -# class PostsController < ActionController::Base -# def create -# # save post -# flash[:notice] = "Post successfully created" -# redirect_to @post -# end +# # Action Dispatch Flash +# +# The flash provides a way to pass temporary primitive-types (String, Array, +# Hash) between actions. Anything you place in the flash will be exposed to the +# very next action and then cleared out. This is a great way of doing notices +# and alerts, such as a create action that sets `flash[:notice] = "Post +# successfully created"` before redirecting to a display action that can then +# expose the flash to its template. Actually, that exposure is automatically +# done. +# +# class PostsController < ActionController::Base +# def create +# # save post +# flash[:notice] = "Post successfully created" +# redirect_to @post +# end # -# def show -# # doesn't need to assign the flash notice to the template, that's done automatically +# def show +# # doesn't need to assign the flash notice to the template, that's done automatically +# end # end -# end # -# Then in +show.html.erb+: +# Then in `show.html.erb`: # -# <% if flash[:notice] %> -#
<%= flash[:notice] %>
-# <% end %> +# <% if flash[:notice] %> +#
<%= flash[:notice] %>
+# <% end %> # -# Since the +notice+ and +alert+ keys are a common idiom, convenience accessors are available: +# Since the `notice` and `alert` keys are a common idiom, convenience accessors +# are available: # -# flash.alert = "You must be logged in" -# flash.notice = "Post successfully created" +# flash.alert = "You must be logged in" +# flash.notice = "Post successfully created" # -# This example places a string in the flash. And of course, you can put as many as you like at a time too. If you want to pass -# non-primitive types, you will have to handle that in your application. Example: To show messages with links, you will have to -# use sanitize helper. +# This example places a string in the flash. And of course, you can put as many +# as you like at a time too. If you want to pass non-primitive types, you will +# have to handle that in your application. Example: To show messages with links, +# you will have to use sanitize helper. # # Just remember: They'll be gone by the time the next action has been performed. # # See docs on the FlashHash class for more details about the flash. # -# source://actionpack/lib/action_dispatch/middleware/flash.rb#43 +# source://actionpack/lib/action_dispatch/middleware/flash.rb#50 class ActionDispatch::Flash class << self - # source://actionpack/lib/action_dispatch/middleware/flash.rb#300 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#312 def new(app); end end end -# source://actionpack/lib/action_dispatch/middleware/flash.rb#112 +# source://actionpack/lib/action_dispatch/middleware/flash.rb#119 class ActionDispatch::Flash::FlashHash include ::Enumerable # @return [FlashHash] a new instance of FlashHash # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#142 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#149 def initialize(flashes = T.unsafe(nil), discard = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#162 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#169 def [](k); end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#156 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#163 def []=(k, v); end - # Convenience accessor for flash[:alert]. + # Convenience accessor for `flash[:alert]`. # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#268 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#280 def alert; end - # Convenience accessor for flash[:alert]=. + # Convenience accessor for `flash[:alert]=`. # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#273 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#285 def alert=(message); end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#197 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#204 def clear; end - # Immediately deletes the single flash entry. Use this method when you - # want remove the message within the current action. See also #discard. + # Immediately deletes the single flash entry. Use this method when you want + # remove the message within the current action. See also #discard. # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#182 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#189 def delete(key); end - # Marks the entire flash or a single flash entry to be discarded by the end of the current action: + # Marks the entire flash or a single flash entry to be discarded by the end of + # the current action: # # flash.discard # discard the entire flash at the end of the current action # flash.discard(:warning) # discard only the "warning" entry at the end of the current action # - # Use this method when you want to display the message in the current - # action but not in the next one. See also #delete. + # Use this method when you want to display the message in the current action but + # not in the next one. See also #delete. # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#253 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#264 def discard(k = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#202 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#209 def each(&block); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#193 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#200 def empty?; end - # Keeps either the entire current flash or a specific flash entry available for the next action: + # Keeps either the entire current flash or a specific flash entry available for + # the next action: # - # flash.keep # keeps the entire flash - # flash.keep(:notice) # keeps only the "notice" entry, the rest of the flash is discarded + # flash.keep # keeps the entire flash + # flash.keep(:notice) # keeps only the "notice" entry, the rest of the flash is discarded # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#240 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#250 def keep(k = T.unsafe(nil)); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#176 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#183 def key?(name); end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#172 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#179 def keys; end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#166 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#173 def merge!(h); end - # Convenience accessor for flash[:notice]. + # Convenience accessor for `flash[:notice]`. # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#278 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#290 def notice; end - # Convenience accessor for flash[:notice]=. + # Convenience accessor for `flash[:notice]=`. # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#283 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#295 def notice=(message); end - # Sets a flash that will not be available to the next action, only to the current. + # Sets a flash that will not be available to the next action, only to the + # current. # # flash.now[:message] = "Hello current action" # - # This method enables you to use the flash as a central messaging system in your app. - # When you need to pass an object to the next action, you use the standard flash assign ([]=). - # When you need to pass an object to the current action, you use now, and your object will - # vanish when the current action is done. + # This method enables you to use the flash as a central messaging system in your + # app. When you need to pass an object to the next action, you use the standard + # flash assign (`[]=`). When you need to pass an object to the current action, + # you use `now`, and your object will vanish when the current action is done. # - # Entries set via now are accessed the same way as standard entries: flash['my-key']. + # Entries set via `now` are accessed the same way as standard entries: + # `flash['my-key']`. # # Also, brings two convenience accessors: # - # flash.now.alert = "Beware now!" - # # Equivalent to flash.now[:alert] = "Beware now!" + # flash.now.alert = "Beware now!" + # # Equivalent to flash.now[:alert] = "Beware now!" # - # flash.now.notice = "Good luck now!" - # # Equivalent to flash.now[:notice] = "Good luck now!" + # flash.now.notice = "Good luck now!" + # # Equivalent to flash.now[:notice] = "Good luck now!" # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#232 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#241 def now; end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#208 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#215 def replace(h); end # Mark for removal entries that were kept, and delete unkept ones. # - # This method is called automatically by filters, so you generally don't need to care about it. + # This method is called automatically by filters, so you generally don't need to + # care about it. # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#262 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#274 def sweep; end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#189 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#196 def to_hash; end - # Builds a hash containing the flashes to keep for the next request. - # If there are none to keep, returns +nil+. + # Builds a hash containing the flashes to keep for the next request. If there + # are none to keep, returns `nil`. # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#136 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#143 def to_session_value; end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#166 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#173 def update(h); end protected # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#288 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#300 def now_is_loaded?; end private - # source://actionpack/lib/action_dispatch/middleware/flash.rb#148 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#155 def initialize_copy(other); end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#293 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#305 def stringify_array(array); end class << self - # source://actionpack/lib/action_dispatch/middleware/flash.rb#115 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#122 def from_session_value(value); end end end -# source://actionpack/lib/action_dispatch/middleware/flash.rb#83 +# source://actionpack/lib/action_dispatch/middleware/flash.rb#90 class ActionDispatch::Flash::FlashNow # @return [FlashNow] a new instance of FlashNow # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#86 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#93 def initialize(flash); end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#97 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#104 def [](k); end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#90 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#97 def []=(k, v); end - # Convenience accessor for flash.now[:alert]=. + # Convenience accessor for `flash.now[:alert]=`. # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#102 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#109 def alert=(message); end # Returns the value of attribute flash. # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#84 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#91 def flash; end # Sets the attribute flash # # @param value the value to set the attribute flash to. # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#84 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#91 def flash=(_arg0); end - # Convenience accessor for flash.now[:notice]=. + # Convenience accessor for `flash.now[:notice]=`. # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#107 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#114 def notice=(message); end end -# source://actionpack/lib/action_dispatch/middleware/flash.rb#44 +# source://actionpack/lib/action_dispatch/middleware/flash.rb#51 ActionDispatch::Flash::KEY = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/flash.rb#46 +# source://actionpack/lib/action_dispatch/middleware/flash.rb#53 module ActionDispatch::Flash::RequestMethods - # source://actionpack/lib/action_dispatch/middleware/flash.rb#64 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#71 def commit_flash; end # Access the contents of the flash. Returns a ActionDispatch::Flash::FlashHash. # # See ActionDispatch::Flash for example usage. # - # source://actionpack/lib/action_dispatch/middleware/flash.rb#50 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#57 def flash; end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#56 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#63 def flash=(flash); end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#60 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#67 def flash_hash; end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#77 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#84 def reset_session; end end -# = Action Dispatch \HostAuthorization +# # Action Dispatch HostAuthorization # -# This middleware guards from DNS rebinding attacks by explicitly permitting -# the hosts a request can be sent to, and is passed the options set in -# +config.host_authorization+. +# This middleware guards from DNS rebinding attacks by explicitly permitting the +# hosts a request can be sent to, and is passed the options set in +# `config.host_authorization`. # -# Requests can opt-out of Host Authorization with +exclude+: +# Requests can opt-out of Host Authorization with `exclude`: # -# config.host_authorization = { exclude: ->(request) { request.path =~ /healthcheck/ } } +# config.host_authorization = { exclude: ->(request) { request.path =~ /healthcheck/ } } # -# When a request comes to an unauthorized host, the +response_app+ -# application will be executed and rendered. If no +response_app+ is given, a -# default one will run. -# The default response app logs blocked host info with level 'error' and -# responds with 403 Forbidden. The body of the response contains debug info -# if +config.consider_all_requests_local+ is set to true, otherwise the body is empty. +# When a request comes to an unauthorized host, the `response_app` application +# will be executed and rendered. If no `response_app` is given, a default one +# will run. The default response app logs blocked host info with level 'error' +# and responds with `403 Forbidden`. The body of the response contains debug +# info if `config.consider_all_requests_local` is set to true, otherwise the +# body is empty. # -# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#20 +# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#22 class ActionDispatch::HostAuthorization # @return [HostAuthorization] a new instance of HostAuthorization # - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#125 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#127 def initialize(app, hosts, exclude: T.unsafe(nil), response_app: T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#133 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#135 def call(env); end private - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#149 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#151 def blocked_hosts(request); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#161 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#163 def excluded?(request); end - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#165 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#167 def mark_as_authorized(request); end end -# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#21 +# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#23 ActionDispatch::HostAuthorization::ALLOWED_HOSTS_IN_DEVELOPMENT = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#86 +# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#88 class ActionDispatch::HostAuthorization::DefaultResponseApp - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#89 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#91 def call(env); end private - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#120 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#122 def available_logger(request); end - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#112 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#114 def log_error(request); end - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#105 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#107 def response(format, body); end - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#98 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#100 def response_body(request); end end -# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#87 +# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#89 ActionDispatch::HostAuthorization::DefaultResponseApp::RESPONSE_STATUS = T.let(T.unsafe(nil), Integer) -# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#24 +# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#26 ActionDispatch::HostAuthorization::IPV4_HOSTNAME = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#25 +# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#27 ActionDispatch::HostAuthorization::IPV6_HOSTNAME = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#26 +# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#28 ActionDispatch::HostAuthorization::IPV6_HOSTNAME_WITH_PORT = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#22 +# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#24 ActionDispatch::HostAuthorization::PORT_REGEX = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#33 +# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#35 class ActionDispatch::HostAuthorization::Permissions # @return [Permissions] a new instance of Permissions # - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#34 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#36 def initialize(hosts); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#42 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#44 def allows?(host); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#38 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#40 def empty?; end private - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#81 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#83 def extract_hostname(host); end - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#59 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#61 def sanitize_hosts(hosts); end - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#69 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#71 def sanitize_regexp(host); end - # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#73 + # source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#75 def sanitize_string(host); end end -# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#23 +# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#25 ActionDispatch::HostAuthorization::SUBDOMAIN_REGEX = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#27 +# source://actionpack/lib/action_dispatch/middleware/host_authorization.rb#29 ActionDispatch::HostAuthorization::VALID_IP_HOSTNAME = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch.rb#95 +# source://actionpack/lib/action_dispatch.rb#89 module ActionDispatch::Http extend ::ActiveSupport::Autoload end -# source://actionpack/lib/action_dispatch/http/cache.rb#5 +# source://actionpack/lib/action_dispatch/http/cache.rb#7 module ActionDispatch::Http::Cache; end -# source://actionpack/lib/action_dispatch/http/cache.rb#6 +# source://actionpack/lib/action_dispatch/http/cache.rb#8 module ActionDispatch::Http::Cache::Request # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/cache.rb#28 + # source://actionpack/lib/action_dispatch/http/cache.rb#32 def etag_matches?(etag); end - # Check response freshness (+Last-Modified+ and ETag) against request - # +If-Modified-Since+ and +If-None-Match+ conditions. If both headers are - # supplied, both must match, or the request is not considered fresh. + # Check response freshness (`Last-Modified` and `ETag`) against request + # `If-Modified-Since` and `If-None-Match` conditions. + # If both headers are supplied, based on configuration, either `ETag` is preferred over `Last-Modified` + # or both are considered equally. You can adjust the preference with + # `config.action_dispatch.strict_freshness`. + # Reference: http://tools.ietf.org/html/rfc7232#section-6 # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/cache.rb#38 + # source://actionpack/lib/action_dispatch/http/cache.rb#45 def fresh?(response); end - # source://actionpack/lib/action_dispatch/http/cache.rb#10 + # source://actionpack/lib/action_dispatch/http/cache.rb#14 def if_modified_since; end - # source://actionpack/lib/action_dispatch/http/cache.rb#16 + # source://actionpack/lib/action_dispatch/http/cache.rb#20 def if_none_match; end - # source://actionpack/lib/action_dispatch/http/cache.rb#20 + # source://actionpack/lib/action_dispatch/http/cache.rb#24 def if_none_match_etags; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/cache.rb#24 + # source://actionpack/lib/action_dispatch/http/cache.rb#28 def not_modified?(modified_at); end + + # source://actionpack/lib/action_dispatch/http/cache.rb#12 + def strict_freshness; end + + # source://actionpack/lib/action_dispatch/http/cache.rb#12 + def strict_freshness=(val); end + + class << self + # source://actionpack/lib/action_dispatch/http/cache.rb#12 + def strict_freshness; end + + # source://actionpack/lib/action_dispatch/http/cache.rb#12 + def strict_freshness=(val); end + end end -# source://actionpack/lib/action_dispatch/http/cache.rb#7 +# source://actionpack/lib/action_dispatch/http/cache.rb#9 ActionDispatch::Http::Cache::Request::HTTP_IF_MODIFIED_SINCE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/cache.rb#8 +# source://actionpack/lib/action_dispatch/http/cache.rb#10 ActionDispatch::Http::Cache::Request::HTTP_IF_NONE_MATCH = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/cache.rb#51 +# source://actionpack/lib/action_dispatch/http/cache.rb#68 module ActionDispatch::Http::Cache::Response # Returns the value of attribute cache_control. # - # source://actionpack/lib/action_dispatch/http/cache.rb#52 + # source://actionpack/lib/action_dispatch/http/cache.rb#69 def cache_control; end - # source://actionpack/lib/action_dispatch/http/cache.rb#68 + # source://actionpack/lib/action_dispatch/http/cache.rb#85 def date; end - # source://actionpack/lib/action_dispatch/http/cache.rb#78 + # source://actionpack/lib/action_dispatch/http/cache.rb#95 def date=(utc_time); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/cache.rb#74 + # source://actionpack/lib/action_dispatch/http/cache.rb#91 def date?; end - # This method sets a weak ETag validator on the response so browsers - # and proxies may cache the response, keyed on the ETag. On subsequent - # requests, the +If-None-Match+ header is set to the cached ETag. If it - # matches the current ETag, we can return a 304 Not Modified response - # with no body, letting the browser or proxy know that their cache is - # current. Big savings in request time and network bandwidth. + # This method sets a weak ETag validator on the response so browsers and proxies + # may cache the response, keyed on the ETag. On subsequent requests, the + # `If-None-Match` header is set to the cached ETag. If it matches the current + # ETag, we can return a `304 Not Modified` response with no body, letting the + # browser or proxy know that their cache is current. Big savings in request time + # and network bandwidth. # - # Weak ETags are considered to be semantically equivalent but not - # byte-for-byte identical. This is perfect for browser caching of HTML - # pages where we don't care about exact equality, just what the user - # is viewing. + # Weak ETags are considered to be semantically equivalent but not byte-for-byte + # identical. This is perfect for browser caching of HTML pages where we don't + # care about exact equality, just what the user is viewing. # - # Strong ETags are considered byte-for-byte identical. They allow a - # browser or proxy cache to support +Range+ requests, useful for paging - # through a PDF file or scrubbing through a video. Some CDNs only - # support strong ETags and will ignore weak ETags entirely. + # Strong ETags are considered byte-for-byte identical. They allow a browser or + # proxy cache to support `Range` requests, useful for paging through a PDF file + # or scrubbing through a video. Some CDNs only support strong ETags and will + # ignore weak ETags entirely. # - # Weak ETags are what we almost always need, so they're the default. - # Check out #strong_etag= to provide a strong ETag validator. + # Weak ETags are what we almost always need, so they're the default. Check out + # #strong_etag= to provide a strong ETag validator. # - # source://actionpack/lib/action_dispatch/http/cache.rb#101 + # source://actionpack/lib/action_dispatch/http/cache.rb#117 def etag=(weak_validators); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/cache.rb#113 + # source://actionpack/lib/action_dispatch/http/cache.rb#129 def etag?; end - # source://actionpack/lib/action_dispatch/http/cache.rb#54 + # source://actionpack/lib/action_dispatch/http/cache.rb#71 def last_modified; end - # source://actionpack/lib/action_dispatch/http/cache.rb#64 + # source://actionpack/lib/action_dispatch/http/cache.rb#81 def last_modified=(utc_time); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/cache.rb#60 + # source://actionpack/lib/action_dispatch/http/cache.rb#77 def last_modified?; end - # source://actionpack/lib/action_dispatch/http/cache.rb#109 + # source://actionpack/lib/action_dispatch/http/cache.rb#125 def strong_etag=(strong_validators); end - # True if an ETag is set, and it isn't a weak validator (not preceded with W/). + # True if an ETag is set, and it isn't a weak validator (not preceded with + # `W/`). # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/cache.rb#121 + # source://actionpack/lib/action_dispatch/http/cache.rb#138 def strong_etag?; end - # source://actionpack/lib/action_dispatch/http/cache.rb#105 + # source://actionpack/lib/action_dispatch/http/cache.rb#121 def weak_etag=(weak_validators); end - # True if an ETag is set, and it's a weak validator (preceded with W/). + # True if an ETag is set, and it's a weak validator (preceded with `W/`). # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/cache.rb#116 + # source://actionpack/lib/action_dispatch/http/cache.rb#132 def weak_etag?; end private - # source://actionpack/lib/action_dispatch/http/cache.rb#144 + # source://actionpack/lib/action_dispatch/http/cache.rb#161 def cache_control_headers; end - # source://actionpack/lib/action_dispatch/http/cache.rb#138 + # source://actionpack/lib/action_dispatch/http/cache.rb#155 def cache_control_segments; end - # source://actionpack/lib/action_dispatch/http/cache.rb#134 + # source://actionpack/lib/action_dispatch/http/cache.rb#151 def generate_strong_etag(validators); end - # source://actionpack/lib/action_dispatch/http/cache.rb#130 + # source://actionpack/lib/action_dispatch/http/cache.rb#147 def generate_weak_etag(validators); end - # source://actionpack/lib/action_dispatch/http/cache.rb#173 + # source://actionpack/lib/action_dispatch/http/cache.rb#191 def handle_conditional_get!; end - # source://actionpack/lib/action_dispatch/http/cache.rb#183 + # source://actionpack/lib/action_dispatch/http/cache.rb#200 def merge_and_normalize_cache_control!(cache_control); end - # source://actionpack/lib/action_dispatch/http/cache.rb#162 + # source://actionpack/lib/action_dispatch/http/cache.rb#179 def prepare_cache_control!; end end -# source://actionpack/lib/action_dispatch/http/cache.rb#126 +# source://actionpack/lib/action_dispatch/http/cache.rb#143 ActionDispatch::Http::Cache::Response::DATE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/cache.rb#166 +# source://actionpack/lib/action_dispatch/http/cache.rb#183 ActionDispatch::Http::Cache::Response::DEFAULT_CACHE_CONTROL = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/cache.rb#127 +# source://actionpack/lib/action_dispatch/http/cache.rb#189 +ActionDispatch::Http::Cache::Response::IMMUTABLE = T.let(T.unsafe(nil), String) + +# source://actionpack/lib/action_dispatch/http/cache.rb#144 ActionDispatch::Http::Cache::Response::LAST_MODIFIED = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/cache.rb#171 +# source://actionpack/lib/action_dispatch/http/cache.rb#188 ActionDispatch::Http::Cache::Response::MUST_REVALIDATE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/cache.rb#168 +# source://actionpack/lib/action_dispatch/http/cache.rb#185 ActionDispatch::Http::Cache::Response::NO_CACHE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/cache.rb#167 +# source://actionpack/lib/action_dispatch/http/cache.rb#184 ActionDispatch::Http::Cache::Response::NO_STORE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/cache.rb#170 +# source://actionpack/lib/action_dispatch/http/cache.rb#187 ActionDispatch::Http::Cache::Response::PRIVATE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/cache.rb#169 +# source://actionpack/lib/action_dispatch/http/cache.rb#186 ActionDispatch::Http::Cache::Response::PUBLIC = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/cache.rb#128 +# source://actionpack/lib/action_dispatch/http/cache.rb#145 ActionDispatch::Http::Cache::Response::SPECIAL_KEYS = T.let(T.unsafe(nil), Set) -# source://actionpack/lib/action_dispatch/http/content_disposition.rb#5 +# source://actionpack/lib/action_dispatch/http/content_disposition.rb#7 class ActionDispatch::Http::ContentDisposition # @return [ContentDisposition] a new instance of ContentDisposition # - # source://actionpack/lib/action_dispatch/http/content_disposition.rb#12 + # source://actionpack/lib/action_dispatch/http/content_disposition.rb#14 def initialize(disposition:, filename:); end - # source://actionpack/lib/action_dispatch/http/content_disposition.rb#19 + # source://actionpack/lib/action_dispatch/http/content_disposition.rb#21 def ascii_filename; end # Returns the value of attribute disposition. # - # source://actionpack/lib/action_dispatch/http/content_disposition.rb#10 + # source://actionpack/lib/action_dispatch/http/content_disposition.rb#12 def disposition; end # Returns the value of attribute filename. # - # source://actionpack/lib/action_dispatch/http/content_disposition.rb#10 + # source://actionpack/lib/action_dispatch/http/content_disposition.rb#12 def filename; end - # source://actionpack/lib/action_dispatch/http/content_disposition.rb#29 + # source://actionpack/lib/action_dispatch/http/content_disposition.rb#31 def to_s; end - # source://actionpack/lib/action_dispatch/http/content_disposition.rb#25 + # source://actionpack/lib/action_dispatch/http/content_disposition.rb#27 def utf8_filename; end private - # source://actionpack/lib/action_dispatch/http/content_disposition.rb#38 + # source://actionpack/lib/action_dispatch/http/content_disposition.rb#40 def percent_escape(string, pattern); end class << self - # source://actionpack/lib/action_dispatch/http/content_disposition.rb#6 + # source://actionpack/lib/action_dispatch/http/content_disposition.rb#8 def format(disposition:, filename:); end end end -# source://actionpack/lib/action_dispatch/http/content_disposition.rb#23 +# source://actionpack/lib/action_dispatch/http/content_disposition.rb#25 ActionDispatch::Http::ContentDisposition::RFC_5987_ESCAPED_CHAR = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/http/content_disposition.rb#17 +# source://actionpack/lib/action_dispatch/http/content_disposition.rb#19 ActionDispatch::Http::ContentDisposition::TRADITIONAL_ESCAPED_CHAR = T.let(T.unsafe(nil), Regexp) -# = Action Dispatch HTTP Filter Parameters +# # Action Dispatch HTTP Filter Parameters # # Allows you to specify sensitive query string and POST parameters to filter # from the request log. # -# # Replaces values with "[FILTERED]" for keys that match /foo|bar/i. -# env["action_dispatch.parameter_filter"] = [:foo, "bar"] +# # Replaces values with "[FILTERED]" for keys that match /foo|bar/i. +# env["action_dispatch.parameter_filter"] = [:foo, "bar"] # -# For more information about filter behavior, see ActiveSupport::ParameterFilter. +# For more information about filter behavior, see +# ActiveSupport::ParameterFilter. # -# source://actionpack/lib/action_dispatch/http/filter_parameters.rb#16 +# source://actionpack/lib/action_dispatch/http/filter_parameters.rb#19 module ActionDispatch::Http::FilterParameters - # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#21 + # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#24 def initialize; end # Returns a hash of request.env with all sensitive data replaced. # - # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#37 + # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#40 def filtered_env; end # Returns a hash of parameters with all sensitive data replaced. # - # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#30 + # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#33 def filtered_parameters; end # Reconstructs a path with all sensitive GET parameters replaced. # - # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#42 + # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#45 def filtered_path; end - # Returns the +ActiveSupport::ParameterFilter+ object used to filter in this request. + # Returns the `ActiveSupport::ParameterFilter` object used to filter in this + # request. # - # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#47 + # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#51 def parameter_filter; end private - # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#56 + # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#60 def env_filter; end - # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#69 + # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#73 def filtered_query_string; end - # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#63 + # source://actionpack/lib/action_dispatch/http/filter_parameters.rb#67 def parameter_filter_for(filters); end end -# source://actionpack/lib/action_dispatch/http/filter_parameters.rb#17 +# source://actionpack/lib/action_dispatch/http/filter_parameters.rb#20 ActionDispatch::Http::FilterParameters::ENV_MATCH = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/http/filter_parameters.rb#67 +# source://actionpack/lib/action_dispatch/http/filter_parameters.rb#71 ActionDispatch::Http::FilterParameters::KV_RE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/filter_parameters.rb#19 +# source://actionpack/lib/action_dispatch/http/filter_parameters.rb#22 ActionDispatch::Http::FilterParameters::NULL_ENV_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) -# source://actionpack/lib/action_dispatch/http/filter_parameters.rb#18 +# source://actionpack/lib/action_dispatch/http/filter_parameters.rb#21 ActionDispatch::Http::FilterParameters::NULL_PARAM_FILTER = T.let(T.unsafe(nil), ActiveSupport::ParameterFilter) -# source://actionpack/lib/action_dispatch/http/filter_parameters.rb#68 +# source://actionpack/lib/action_dispatch/http/filter_parameters.rb#72 ActionDispatch::Http::FilterParameters::PAIR_RE = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/http/filter_redirect.rb#5 +# source://actionpack/lib/action_dispatch/http/filter_redirect.rb#7 module ActionDispatch::Http::FilterRedirect - # source://actionpack/lib/action_dispatch/http/filter_redirect.rb#8 + # source://actionpack/lib/action_dispatch/http/filter_redirect.rb#10 def filtered_location; end private # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/filter_redirect.rb#25 + # source://actionpack/lib/action_dispatch/http/filter_redirect.rb#27 def location_filter_match?; end - # source://actionpack/lib/action_dispatch/http/filter_redirect.rb#17 + # source://actionpack/lib/action_dispatch/http/filter_redirect.rb#19 def location_filters; end + + # source://actionpack/lib/action_dispatch/http/filter_redirect.rb#37 + def parameter_filtered_location; end end -# source://actionpack/lib/action_dispatch/http/filter_redirect.rb#6 +# source://actionpack/lib/action_dispatch/http/filter_redirect.rb#8 ActionDispatch::Http::FilterRedirect::FILTERED = T.let(T.unsafe(nil), String) -# = Action Dispatch HTTP \Headers +# # Action Dispatch HTTP Headers # # Provides access to the request's HTTP headers from the environment. # -# env = { "CONTENT_TYPE" => "text/plain", "HTTP_USER_AGENT" => "curl/7.43.0" } -# headers = ActionDispatch::Http::Headers.from_hash(env) -# headers["Content-Type"] # => "text/plain" -# headers["User-Agent"] # => "curl/7.43.0" +# env = { "CONTENT_TYPE" => "text/plain", "HTTP_USER_AGENT" => "curl/7.43.0" } +# headers = ActionDispatch::Http::Headers.from_hash(env) +# headers["Content-Type"] # => "text/plain" +# headers["User-Agent"] # => "curl/7.43.0" # # Also note that when headers are mapped to CGI-like variables by the Rack # server, both dashes and underscores are converted to underscores. This # ambiguity cannot be resolved at this stage anymore. Both underscores and # dashes have to be interpreted as if they were originally sent as dashes. # -# # GET / HTTP/1.1 -# # ... -# # User-Agent: curl/7.43.0 -# # X_Custom_Header: token +# # GET / HTTP/1.1 +# # ... +# # User-Agent: curl/7.43.0 +# # X_Custom_Header: token # -# headers["X_Custom_Header"] # => nil -# headers["X-Custom-Header"] # => "token" +# headers["X_Custom_Header"] # => nil +# headers["X-Custom-Header"] # => "token" # -# source://actionpack/lib/action_dispatch/http/headers.rb#26 +# source://actionpack/lib/action_dispatch/http/headers.rb#28 class ActionDispatch::Http::Headers include ::Enumerable # @return [Headers] a new instance of Headers # - # source://actionpack/lib/action_dispatch/http/headers.rb#56 + # source://actionpack/lib/action_dispatch/http/headers.rb#58 def initialize(request); end # Returns the value for the given key mapped to @env. # - # source://actionpack/lib/action_dispatch/http/headers.rb#61 + # source://actionpack/lib/action_dispatch/http/headers.rb#63 def [](key); end # Sets the given value for the key mapped to @env. # - # source://actionpack/lib/action_dispatch/http/headers.rb#66 + # source://actionpack/lib/action_dispatch/http/headers.rb#68 def []=(key, value); end - # Add a value to a multivalued header like +Vary+ or +Accept-Encoding+. + # Add a value to a multivalued header like `Vary` or `Accept-Encoding`. # - # source://actionpack/lib/action_dispatch/http/headers.rb#71 + # source://actionpack/lib/action_dispatch/http/headers.rb#73 def add(key, value); end - # source://actionpack/lib/action_dispatch/http/headers.rb#97 + # source://actionpack/lib/action_dispatch/http/headers.rb#98 def each(&block); end # source://actionpack/lib/action_dispatch/http/headers.rb#118 @@ -10847,669 +11464,667 @@ class ActionDispatch::Http::Headers # Returns the value for the given key mapped to @env. # - # If the key is not found and an optional code block is not provided, - # raises a KeyError exception. + # If the key is not found and an optional code block is not provided, raises a + # `KeyError` exception. # - # If the code block is provided, then it will be run and - # its result returned. + # If the code block is provided, then it will be run and its result returned. # - # source://actionpack/lib/action_dispatch/http/headers.rb#89 + # source://actionpack/lib/action_dispatch/http/headers.rb#90 def fetch(key, default = T.unsafe(nil)); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/headers.rb#75 + # source://actionpack/lib/action_dispatch/http/headers.rb#77 def include?(key); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/headers.rb#75 + # source://actionpack/lib/action_dispatch/http/headers.rb#77 def key?(key); end # Returns a new Http::Headers instance containing the contents of - # headers_or_env and the original instance. + # `headers_or_env` and the original instance. # - # source://actionpack/lib/action_dispatch/http/headers.rb#103 + # source://actionpack/lib/action_dispatch/http/headers.rb#104 def merge(headers_or_env); end - # Adds the contents of headers_or_env to original instance - # entries; duplicate keys are overwritten with the values from - # headers_or_env. + # Adds the contents of `headers_or_env` to original instance entries; duplicate + # keys are overwritten with the values from `headers_or_env`. # # source://actionpack/lib/action_dispatch/http/headers.rb#112 def merge!(headers_or_env); end private - # Converts an HTTP header name to an environment variable name if it is - # not contained within the headers hash. + # Converts an HTTP header name to an environment variable name if it is not + # contained within the headers hash. # # source://actionpack/lib/action_dispatch/http/headers.rb#123 def env_name(key); end class << self - # source://actionpack/lib/action_dispatch/http/headers.rb#52 + # source://actionpack/lib/action_dispatch/http/headers.rb#54 def from_hash(hash); end end end -# source://actionpack/lib/action_dispatch/http/headers.rb#27 +# source://actionpack/lib/action_dispatch/http/headers.rb#29 ActionDispatch::Http::Headers::CGI_VARIABLES = T.let(T.unsafe(nil), Set) -# source://actionpack/lib/action_dispatch/http/headers.rb#80 +# source://actionpack/lib/action_dispatch/http/headers.rb#82 ActionDispatch::Http::Headers::DEFAULT = T.let(T.unsafe(nil), Object) -# source://actionpack/lib/action_dispatch/http/headers.rb#48 +# source://actionpack/lib/action_dispatch/http/headers.rb#50 ActionDispatch::Http::Headers::HTTP_HEADER = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#7 +# source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#9 module ActionDispatch::Http::MimeNegotiation extend ::ActiveSupport::Concern # Returns the accepted MIME type for the request. # - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#54 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#42 def accepts; end - # The MIME type of the HTTP request, such as Mime[:xml]. + # The MIME type of the HTTP request, such as [Mime](:xml). # - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#36 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#24 def content_mime_type; end - # Returns the MIME type for the \format used in the request. + # Returns the MIME type for the format used in the request. # - # GET /posts/5.xml | request.format => Mime[:xml] - # GET /posts/5.xhtml | request.format => Mime[:html] - # GET /posts/5 | request.format => Mime[:html] or Mime[:js], or request.accepts.first + # GET /posts/5.xml | request.format => Mime[:xml] + # GET /posts/5.xhtml | request.format => Mime[:html] + # GET /posts/5 | request.format => Mime[:html] or Mime[:js], or request.accepts.first # - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#75 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#63 def format(_view_path = T.unsafe(nil)); end - # Sets the \format by string extension, which can be used to force custom formats + # Sets the format by string extension, which can be used to force custom formats # that are not controlled by the extension. # - # class ApplicationController < ActionController::Base - # before_action :adjust_format_for_iphone + # class ApplicationController < ActionController::Base + # before_action :adjust_format_for_iphone # - # private - # def adjust_format_for_iphone - # request.format = :iphone if request.env["HTTP_USER_AGENT"][/iPhone/] - # end - # end + # private + # def adjust_format_for_iphone + # request.format = :iphone if request.env["HTTP_USER_AGENT"][/iPhone/] + # end + # end # - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#127 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#115 def format=(extension); end - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#79 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#67 def formats; end - # Sets the \formats by string extensions. This differs from #format= by allowing you - # to set multiple, ordered formats, which is useful when you want to have a fallback. + # Sets the formats by string extensions. This differs from #format= by allowing + # you to set multiple, ordered formats, which is useful when you want to have a + # fallback. # - # In this example, the +:iphone+ format will be used if it's available, otherwise it'll fall back - # to the +:html+ format. + # In this example, the `:iphone` format will be used if it's available, + # otherwise it'll fall back to the `:html` format. # - # class ApplicationController < ActionController::Base - # before_action :adjust_format_for_iphone_with_html_fallback + # class ApplicationController < ActionController::Base + # before_action :adjust_format_for_iphone_with_html_fallback # - # private - # def adjust_format_for_iphone_with_html_fallback - # request.formats = [ :iphone, :html ] if request.env["HTTP_USER_AGENT"][/iPhone/] - # end - # end + # private + # def adjust_format_for_iphone_with_html_fallback + # request.formats = [ :iphone, :html ] if request.env["HTTP_USER_AGENT"][/iPhone/] + # end + # end # - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#146 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#135 def formats=(extensions); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#49 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#37 def has_content_type?; end # Returns the first MIME type that matches the provided array of MIME types. # - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#154 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#143 def negotiate_mime(order); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#166 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#155 def should_apply_vary_header?; end - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#112 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#100 def variant; end - # Sets the \variant for template. + # Sets the variant for template. # - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#102 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#90 def variant=(variant); end private - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#190 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#179 def format_from_path_extension; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#175 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#164 def params_readable?; end - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#186 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#175 def use_accept_header; end - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#181 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#170 def valid_accept_header; end end -# We use normal content negotiation unless you include */* in your list, -# in which case we assume you're a browser and send HTML. +# We use normal content negotiation unless you include **/** in your list, in +# which case we assume you're a browser and send HTML. # -# source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#173 +# source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#162 ActionDispatch::Http::MimeNegotiation::BROWSER_LIKE_ACCEPTS = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#10 +# source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#12 class ActionDispatch::Http::MimeNegotiation::InvalidType < ::Mime::Type::InvalidMimeType; end -# source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#12 +# source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#14 ActionDispatch::Http::MimeNegotiation::RESCUABLE_MIME_FORMAT_ERRORS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/http/parameters.rb#5 +# source://actionpack/lib/action_dispatch/http/parameters.rb#7 module ActionDispatch::Http::Parameters extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionDispatch::Http::Parameters::ClassMethods - # Returns both GET and POST \parameters in a single hash. + # Returns both GET and POST parameters in a single hash. # - # source://actionpack/lib/action_dispatch/http/parameters.rb#50 + # source://actionpack/lib/action_dispatch/http/parameters.rb#52 def parameters; end - # Returns both GET and POST \parameters in a single hash. + # Returns both GET and POST parameters in a single hash. # - # source://actionpack/lib/action_dispatch/http/parameters.rb#50 + # source://actionpack/lib/action_dispatch/http/parameters.rb#52 def params; end - # Returns a hash with the \parameters used to form the \path of the request. + # Returns a hash with the parameters used to form the path of the request. # Returned hash keys are symbols: # - # { action: "my_action", controller: "my_controller" } + # { action: "my_action", controller: "my_controller" } # - # source://actionpack/lib/action_dispatch/http/parameters.rb#82 + # source://actionpack/lib/action_dispatch/http/parameters.rb#84 def path_parameters; end - # source://actionpack/lib/action_dispatch/http/parameters.rb#65 + # source://actionpack/lib/action_dispatch/http/parameters.rb#67 def path_parameters=(parameters); end private - # source://actionpack/lib/action_dispatch/http/parameters.rb#100 + # source://actionpack/lib/action_dispatch/http/parameters.rb#102 def log_parse_error_once; end - # source://actionpack/lib/action_dispatch/http/parameters.rb#112 + # source://actionpack/lib/action_dispatch/http/parameters.rb#114 def params_parsers; end - # source://actionpack/lib/action_dispatch/http/parameters.rb#87 + # source://actionpack/lib/action_dispatch/http/parameters.rb#89 def parse_formatted_parameters(parsers); end end -# source://actionpack/lib/action_dispatch/http/parameters.rb#34 +# source://actionpack/lib/action_dispatch/http/parameters.rb#36 module ActionDispatch::Http::Parameters::ClassMethods # Configure the parameter parser for a given MIME type. # - # It accepts a hash where the key is the symbol of the MIME type - # and the value is a proc. + # It accepts a hash where the key is the symbol of the MIME type and the value + # is a proc. # # original_parsers = ActionDispatch::Request.parameter_parsers # xml_parser = -> (raw_post) { Hash.from_xml(raw_post) || {} } # new_parsers = original_parsers.merge(xml: xml_parser) # ActionDispatch::Request.parameter_parsers = new_parsers # - # source://actionpack/lib/action_dispatch/http/parameters.rb#44 + # source://actionpack/lib/action_dispatch/http/parameters.rb#46 def parameter_parsers=(parsers); end end -# source://actionpack/lib/action_dispatch/http/parameters.rb#10 +# source://actionpack/lib/action_dispatch/http/parameters.rb#12 ActionDispatch::Http::Parameters::DEFAULT_PARSERS = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/http/parameters.rb#8 +# source://actionpack/lib/action_dispatch/http/parameters.rb#10 ActionDispatch::Http::Parameters::PARAMETERS_KEY = T.let(T.unsafe(nil), String) -# Raised when raw data from the request cannot be parsed by the parser -# defined for request's content MIME type. +# Raised when raw data from the request cannot be parsed by the parser defined +# for request's content MIME type. # -# source://actionpack/lib/action_dispatch/http/parameters.rb#19 +# source://actionpack/lib/action_dispatch/http/parameters.rb#21 class ActionDispatch::Http::Parameters::ParseError < ::StandardError # @return [ParseError] a new instance of ParseError # - # source://actionpack/lib/action_dispatch/http/parameters.rb#20 + # source://actionpack/lib/action_dispatch/http/parameters.rb#22 def initialize(message = T.unsafe(nil)); end end -# source://actionpack/lib/action_dispatch/http/url.rb#7 +# source://actionpack/lib/action_dispatch/http/url.rb#9 module ActionDispatch::Http::URL - # source://actionpack/lib/action_dispatch/http/url.rb#179 + # source://actionpack/lib/action_dispatch/http/url.rb#181 def initialize; end - # Returns the \domain part of a \host, such as "rubyonrails.org" in "www.rubyonrails.org". You can specify - # a different tld_length, such as 2 to catch rubyonrails.co.uk in "www.rubyonrails.co.uk". + # Returns the domain part of a host, such as "rubyonrails.org" in + # "www.rubyonrails.org". You can specify a different `tld_length`, such as 2 to + # catch rubyonrails.co.uk in "www.rubyonrails.co.uk". # - # source://actionpack/lib/action_dispatch/http/url.rb#321 + # source://actionpack/lib/action_dispatch/http/url.rb#324 def domain(tld_length = T.unsafe(nil)); end # Returns the host for this request, such as "example.com". # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.host # => "example.com" + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.host # => "example.com" # - # source://actionpack/lib/action_dispatch/http/url.rb#226 + # source://actionpack/lib/action_dispatch/http/url.rb#228 def host; end - # Returns a \host:\port string for this request, such as "example.com" or - # "example.com:8080". Port is only included if it is not a default port - # (80 or 443) + # Returns a host:port string for this request, such as "example.com" or + # "example.com:8080". Port is only included if it is not a default port (80 or + # 443) # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.host_with_port # => "example.com" + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.host_with_port # => "example.com" # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.host_with_port # => "example.com" + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.host_with_port # => "example.com" # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.host_with_port # => "example.com:8080" + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.host_with_port # => "example.com:8080" # - # source://actionpack/lib/action_dispatch/http/url.rb#242 + # source://actionpack/lib/action_dispatch/http/url.rb#244 def host_with_port; end - # Returns a number \port suffix like 8080 if the \port number of this request - # is not the default HTTP \port 80 or HTTPS \port 443. + # Returns a number port suffix like 8080 if the port number of this request is + # not the default HTTP port 80 or HTTPS port 443. # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.optional_port # => nil + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.optional_port # => nil # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.optional_port # => 8080 + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.optional_port # => 8080 # - # source://actionpack/lib/action_dispatch/http/url.rb#292 + # source://actionpack/lib/action_dispatch/http/url.rb#294 def optional_port; end # Returns the port number of this request as an integer. # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.port # => 80 + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.port # => 80 # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.port # => 8080 + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.port # => 8080 # - # source://actionpack/lib/action_dispatch/http/url.rb#253 + # source://actionpack/lib/action_dispatch/http/url.rb#255 def port; end - # Returns a string \port suffix, including colon, like ":8080" if the \port - # number of this request is not the default HTTP \port 80 or HTTPS \port 443. + # Returns a string port suffix, including colon, like ":8080" if the port number + # of this request is not the default HTTP port 80 or HTTPS port 443. # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.port_string # => "" + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.port_string # => "" # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.port_string # => ":8080" + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.port_string # => ":8080" # - # source://actionpack/lib/action_dispatch/http/url.rb#304 + # source://actionpack/lib/action_dispatch/http/url.rb#306 def port_string; end # Returns 'https://' if this is an SSL request and 'http://' otherwise. # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.protocol # => "http://" + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.protocol # => "http://" # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com', 'HTTPS' => 'on' - # req.protocol # => "https://" + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com', 'HTTPS' => 'on' + # req.protocol # => "https://" # - # source://actionpack/lib/action_dispatch/http/url.rb#200 + # source://actionpack/lib/action_dispatch/http/url.rb#202 def protocol; end - # Returns the \host and port for this request, such as "example.com:8080". + # Returns the host and port for this request, such as "example.com:8080". # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.raw_host_with_port # => "example.com" + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.raw_host_with_port # => "example.com" # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.raw_host_with_port # => "example.com:80" + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.raw_host_with_port # => "example.com:80" # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.raw_host_with_port # => "example.com:8080" + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.raw_host_with_port # => "example.com:8080" # - # source://actionpack/lib/action_dispatch/http/url.rb#214 + # source://actionpack/lib/action_dispatch/http/url.rb#216 def raw_host_with_port; end - # source://actionpack/lib/action_dispatch/http/url.rb#12 + # source://actionpack/lib/action_dispatch/http/url.rb#14 def secure_protocol; end - # source://actionpack/lib/action_dispatch/http/url.rb#12 + # source://actionpack/lib/action_dispatch/http/url.rb#14 def secure_protocol=(val); end # Returns the requested port, such as 8080, based on SERVER_PORT # - # req = ActionDispatch::Request.new 'SERVER_PORT' => '80' - # req.server_port # => 80 + # req = ActionDispatch::Request.new 'SERVER_PORT' => '80' + # req.server_port # => 80 # - # req = ActionDispatch::Request.new 'SERVER_PORT' => '8080' - # req.server_port # => 8080 + # req = ActionDispatch::Request.new 'SERVER_PORT' => '8080' + # req.server_port # => 8080 # - # source://actionpack/lib/action_dispatch/http/url.rb#315 + # source://actionpack/lib/action_dispatch/http/url.rb#317 def server_port; end - # Returns the standard \port number for this request's protocol. + # Returns the standard port number for this request's protocol. # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.standard_port # => 80 + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.standard_port # => 80 # - # source://actionpack/lib/action_dispatch/http/url.rb#265 + # source://actionpack/lib/action_dispatch/http/url.rb#267 def standard_port; end # Returns whether this request is using the standard port # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' - # req.standard_port? # => true + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80' + # req.standard_port? # => true # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' - # req.standard_port? # => false + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' + # req.standard_port? # => false # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/url.rb#280 + # source://actionpack/lib/action_dispatch/http/url.rb#282 def standard_port?; end - # Returns all the \subdomains as a string, so "dev.www" would be - # returned for "dev.www.rubyonrails.org". You can specify a different tld_length, - # such as 2 to catch "www" instead of "www.rubyonrails" - # in "www.rubyonrails.co.uk". + # Returns all the subdomains as a string, so `"dev.www"` would be returned for + # "dev.www.rubyonrails.org". You can specify a different `tld_length`, such as 2 + # to catch `"www"` instead of `"www.rubyonrails"` in "www.rubyonrails.co.uk". # - # source://actionpack/lib/action_dispatch/http/url.rb#337 + # source://actionpack/lib/action_dispatch/http/url.rb#339 def subdomain(tld_length = T.unsafe(nil)); end - # Returns all the \subdomains as an array, so ["dev", "www"] would be - # returned for "dev.www.rubyonrails.org". You can specify a different tld_length, - # such as 2 to catch ["www"] instead of ["www", "rubyonrails"] - # in "www.rubyonrails.co.uk". + # Returns all the subdomains as an array, so `["dev", "www"]` would be returned + # for "dev.www.rubyonrails.org". You can specify a different `tld_length`, such + # as 2 to catch `["www"]` instead of `["www", "rubyonrails"]` in + # "www.rubyonrails.co.uk". # - # source://actionpack/lib/action_dispatch/http/url.rb#329 + # source://actionpack/lib/action_dispatch/http/url.rb#332 def subdomains(tld_length = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/http/url.rb#13 + # source://actionpack/lib/action_dispatch/http/url.rb#15 def tld_length; end - # source://actionpack/lib/action_dispatch/http/url.rb#13 + # source://actionpack/lib/action_dispatch/http/url.rb#15 def tld_length=(val); end # Returns the complete URL used for this request. # - # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' - # req.url # => "http://example.com" + # req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com' + # req.url # => "http://example.com" # - # source://actionpack/lib/action_dispatch/http/url.rb#189 + # source://actionpack/lib/action_dispatch/http/url.rb#191 def url; end class << self # Returns the domain part of a host given the domain level. # - # # Top-level domain example - # extract_domain('www.example.com', 1) # => "example.com" - # # Second-level domain example - # extract_domain('dev.www.example.co.uk', 2) # => "example.co.uk" + # # Top-level domain example + # extract_domain('www.example.com', 1) # => "example.com" + # # Second-level domain example + # extract_domain('dev.www.example.co.uk', 2) # => "example.co.uk" # - # source://actionpack/lib/action_dispatch/http/url.rb#22 + # source://actionpack/lib/action_dispatch/http/url.rb#24 def extract_domain(host, tld_length); end # Returns the subdomains of a host as a String given the domain level. # - # # Top-level domain example - # extract_subdomain('www.example.com', 1) # => "www" - # # Second-level domain example - # extract_subdomain('dev.www.example.co.uk', 2) # => "dev.www" + # # Top-level domain example + # extract_subdomain('www.example.com', 1) # => "www" + # # Second-level domain example + # extract_subdomain('dev.www.example.co.uk', 2) # => "dev.www" # - # source://actionpack/lib/action_dispatch/http/url.rb#46 + # source://actionpack/lib/action_dispatch/http/url.rb#48 def extract_subdomain(host, tld_length); end # Returns the subdomains of a host as an Array given the domain level. # - # # Top-level domain example - # extract_subdomains('www.example.com', 1) # => ["www"] - # # Second-level domain example - # extract_subdomains('dev.www.example.co.uk', 2) # => ["dev", "www"] + # # Top-level domain example + # extract_subdomains('www.example.com', 1) # => ["www"] + # # Second-level domain example + # extract_subdomains('dev.www.example.co.uk', 2) # => ["dev", "www"] # - # source://actionpack/lib/action_dispatch/http/url.rb#32 + # source://actionpack/lib/action_dispatch/http/url.rb#34 def extract_subdomains(host, tld_length); end - # source://actionpack/lib/action_dispatch/http/url.rb#58 + # source://actionpack/lib/action_dispatch/http/url.rb#60 def full_url_for(options); end - # source://actionpack/lib/action_dispatch/http/url.rb#70 + # source://actionpack/lib/action_dispatch/http/url.rb#72 def path_for(options); end - # source://actionpack/lib/action_dispatch/http/url.rb#12 + # source://actionpack/lib/action_dispatch/http/url.rb#14 def secure_protocol; end - # source://actionpack/lib/action_dispatch/http/url.rb#12 + # source://actionpack/lib/action_dispatch/http/url.rb#14 def secure_protocol=(val); end - # source://actionpack/lib/action_dispatch/http/url.rb#13 + # source://actionpack/lib/action_dispatch/http/url.rb#15 def tld_length; end - # source://actionpack/lib/action_dispatch/http/url.rb#13 + # source://actionpack/lib/action_dispatch/http/url.rb#15 def tld_length=(val); end - # source://actionpack/lib/action_dispatch/http/url.rb#50 + # source://actionpack/lib/action_dispatch/http/url.rb#52 def url_for(options); end private - # source://actionpack/lib/action_dispatch/http/url.rb#90 + # source://actionpack/lib/action_dispatch/http/url.rb#92 def add_anchor(path, anchor); end - # source://actionpack/lib/action_dispatch/http/url.rb#83 + # source://actionpack/lib/action_dispatch/http/url.rb#85 def add_params(path, params); end - # source://actionpack/lib/action_dispatch/http/url.rb#105 + # source://actionpack/lib/action_dispatch/http/url.rb#107 def build_host_url(host, port, protocol, options, path); end - # source://actionpack/lib/action_dispatch/http/url.rb#96 + # source://actionpack/lib/action_dispatch/http/url.rb#98 def extract_domain_from(host, tld_length); end - # source://actionpack/lib/action_dispatch/http/url.rb#100 + # source://actionpack/lib/action_dispatch/http/url.rb#102 def extract_subdomains_from(host, tld_length); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/url.rb#129 + # source://actionpack/lib/action_dispatch/http/url.rb#131 def named_host?(host); end - # source://actionpack/lib/action_dispatch/http/url.rb#146 + # source://actionpack/lib/action_dispatch/http/url.rb#148 def normalize_host(_host, options); end - # source://actionpack/lib/action_dispatch/http/url.rb#166 + # source://actionpack/lib/action_dispatch/http/url.rb#168 def normalize_port(port, protocol); end - # source://actionpack/lib/action_dispatch/http/url.rb#133 + # source://actionpack/lib/action_dispatch/http/url.rb#135 def normalize_protocol(protocol); end end end -# source://actionpack/lib/action_dispatch/http/url.rb#9 +# source://actionpack/lib/action_dispatch/http/url.rb#11 ActionDispatch::Http::URL::HOST_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/http/url.rb#8 +# source://actionpack/lib/action_dispatch/http/url.rb#10 ActionDispatch::Http::URL::IP_HOST_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/http/url.rb#10 +# source://actionpack/lib/action_dispatch/http/url.rb#12 ActionDispatch::Http::URL::PROTOCOL_REGEXP = T.let(T.unsafe(nil), Regexp) -# = Action Dispatch HTTP \UploadedFile +# # Action Dispatch HTTP UploadedFile # # Models uploaded files. # -# The actual file is accessible via the +tempfile+ accessor, though some -# of its interface is available directly for convenience. +# The actual file is accessible via the `tempfile` accessor, though some of its +# interface is available directly for convenience. # -# Uploaded files are temporary files whose lifespan is one request. When -# the object is finalized Ruby unlinks the file, so there is no need to -# clean them with a separate maintenance task. +# Uploaded files are temporary files whose lifespan is one request. When the +# object is finalized Ruby unlinks the file, so there is no need to clean them +# with a separate maintenance task. # -# source://actionpack/lib/action_dispatch/http/upload.rb#15 +# source://actionpack/lib/action_dispatch/http/upload.rb#17 class ActionDispatch::Http::UploadedFile # @raise [ArgumentError] # @return [UploadedFile] a new instance of UploadedFile # - # source://actionpack/lib/action_dispatch/http/upload.rb#29 + # source://actionpack/lib/action_dispatch/http/upload.rb#31 def initialize(hash); end - # Shortcut for +tempfile.close+. + # Shortcut for `tempfile.close`. # - # source://actionpack/lib/action_dispatch/http/upload.rb#71 + # source://actionpack/lib/action_dispatch/http/upload.rb#73 def close(unlink_now = T.unsafe(nil)); end # A string with the MIME type of the file. # - # source://actionpack/lib/action_dispatch/http/upload.rb#20 + # source://actionpack/lib/action_dispatch/http/upload.rb#22 def content_type; end # A string with the MIME type of the file. # - # source://actionpack/lib/action_dispatch/http/upload.rb#20 + # source://actionpack/lib/action_dispatch/http/upload.rb#22 def content_type=(_arg0); end - # Shortcut for +tempfile.eof?+. + # Shortcut for `tempfile.eof?`. # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/upload.rb#96 + # source://actionpack/lib/action_dispatch/http/upload.rb#98 def eof?; end # A string with the headers of the multipart request. # - # source://actionpack/lib/action_dispatch/http/upload.rb#27 + # source://actionpack/lib/action_dispatch/http/upload.rb#29 def headers; end # A string with the headers of the multipart request. # - # source://actionpack/lib/action_dispatch/http/upload.rb#27 + # source://actionpack/lib/action_dispatch/http/upload.rb#29 def headers=(_arg0); end - # Shortcut for +tempfile.open+. + # Shortcut for `tempfile.open`. # - # source://actionpack/lib/action_dispatch/http/upload.rb#66 + # source://actionpack/lib/action_dispatch/http/upload.rb#68 def open; end # The basename of the file in the client. # - # source://actionpack/lib/action_dispatch/http/upload.rb#17 + # source://actionpack/lib/action_dispatch/http/upload.rb#19 def original_filename; end # The basename of the file in the client. # - # source://actionpack/lib/action_dispatch/http/upload.rb#17 + # source://actionpack/lib/action_dispatch/http/upload.rb#19 def original_filename=(_arg0); end - # Shortcut for +tempfile.path+. + # Shortcut for `tempfile.path`. # - # source://actionpack/lib/action_dispatch/http/upload.rb#76 + # source://actionpack/lib/action_dispatch/http/upload.rb#78 def path; end - # Shortcut for +tempfile.read+. + # Shortcut for `tempfile.read`. # - # source://actionpack/lib/action_dispatch/http/upload.rb#61 + # source://actionpack/lib/action_dispatch/http/upload.rb#63 def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end - # Shortcut for +tempfile.rewind+. + # Shortcut for `tempfile.rewind`. # - # source://actionpack/lib/action_dispatch/http/upload.rb#86 + # source://actionpack/lib/action_dispatch/http/upload.rb#88 def rewind; end - # Shortcut for +tempfile.size+. + # Shortcut for `tempfile.size`. # - # source://actionpack/lib/action_dispatch/http/upload.rb#91 + # source://actionpack/lib/action_dispatch/http/upload.rb#93 def size; end - # A +Tempfile+ object with the actual uploaded file. Note that some of - # its interface is available directly. + # A `Tempfile` object with the actual uploaded file. Note that some of its + # interface is available directly. # - # source://actionpack/lib/action_dispatch/http/upload.rb#24 + # source://actionpack/lib/action_dispatch/http/upload.rb#26 def tempfile; end - # A +Tempfile+ object with the actual uploaded file. Note that some of - # its interface is available directly. + # A `Tempfile` object with the actual uploaded file. Note that some of its + # interface is available directly. # - # source://actionpack/lib/action_dispatch/http/upload.rb#24 + # source://actionpack/lib/action_dispatch/http/upload.rb#26 def tempfile=(_arg0); end - # source://actionpack/lib/action_dispatch/http/upload.rb#100 + # source://actionpack/lib/action_dispatch/http/upload.rb#102 def to_io; end - # Shortcut for +tempfile.to_path+. + # Shortcut for `tempfile.to_path`. # - # source://actionpack/lib/action_dispatch/http/upload.rb#81 + # source://actionpack/lib/action_dispatch/http/upload.rb#83 def to_path; end end -# source://actionpack/lib/action_dispatch/testing/integration.rb#11 +# source://actionpack/lib/action_dispatch/testing/integration.rb#14 module ActionDispatch::Integration; end -# source://actionpack/lib/action_dispatch/testing/integration.rb#12 +# source://actionpack/lib/action_dispatch/testing/integration.rb#15 module ActionDispatch::Integration::RequestHelpers - # Performs a DELETE request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. + # Performs a DELETE request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#39 + # source://actionpack/lib/action_dispatch/testing/integration.rb#42 def delete(path, **args); end - # Follow a single redirect response. If the last response was not a - # redirect, an exception will be raised. Otherwise, the redirect is - # performed on the location header. If the redirection is a 307 or 308 redirect, - # the same HTTP verb will be used when redirecting, otherwise a GET request - # will be performed. Any arguments are passed to the - # underlying request. + # Follow a single redirect response. If the last response was not a redirect, an + # exception will be raised. Otherwise, the redirect is performed on the location + # header. If the redirection is a 307 or 308 redirect, the same HTTP verb will + # be used when redirecting, otherwise a GET request will be performed. Any + # arguments are passed to the underlying request. # # The HTTP_REFERER header will be set to the previous url. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#63 + # source://actionpack/lib/action_dispatch/testing/integration.rb#65 def follow_redirect!(headers: T.unsafe(nil), **args); end - # Performs a GET request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. + # Performs a GET request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#15 + # source://actionpack/lib/action_dispatch/testing/integration.rb#18 def get(path, **args); end - # Performs a HEAD request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. + # Performs a HEAD request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#45 + # source://actionpack/lib/action_dispatch/testing/integration.rb#48 def head(path, **args); end - # Performs an OPTIONS request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. + # Performs an OPTIONS request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#51 + # source://actionpack/lib/action_dispatch/testing/integration.rb#54 def options(path, **args); end - # Performs a PATCH request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. + # Performs a PATCH request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#27 + # source://actionpack/lib/action_dispatch/testing/integration.rb#30 def patch(path, **args); end - # Performs a POST request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. + # Performs a POST request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#21 + # source://actionpack/lib/action_dispatch/testing/integration.rb#24 def post(path, **args); end - # Performs a PUT request with the given parameters. See ActionDispatch::Integration::Session#process - # for more details. + # Performs a PUT request with the given parameters. See + # ActionDispatch::Integration::Session#process for more details. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#33 + # source://actionpack/lib/action_dispatch/testing/integration.rb#36 def put(path, **args); end end -# source://actionpack/lib/action_dispatch/testing/integration.rb#325 +# source://actionpack/lib/action_dispatch/testing/integration.rb#324 module ActionDispatch::Integration::Runner include ::ActionDispatch::Assertions::RoutingAssertions include ::ActionDispatch::Assertions::ResponseAssertions @@ -11519,122 +12134,121 @@ module ActionDispatch::Integration::Runner include ::ActionDispatch::Assertions extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # source://actionpack/lib/action_dispatch/testing/integration.rb#333 + # source://actionpack/lib/action_dispatch/testing/integration.rb#332 def initialize(*args, &blk); end # Returns the value of attribute app. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#330 + # source://actionpack/lib/action_dispatch/testing/integration.rb#329 def app; end - # source://actionpack/lib/action_dispatch/testing/integration.rb#404 + # source://actionpack/lib/action_dispatch/testing/integration.rb#402 def assertions; end - # source://actionpack/lib/action_dispatch/testing/integration.rb#408 + # source://actionpack/lib/action_dispatch/testing/integration.rb#406 def assertions=(assertions); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#376 + # source://actionpack/lib/action_dispatch/testing/integration.rb#375 def assigns(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#338 + # source://actionpack/lib/action_dispatch/testing/integration.rb#337 def before_setup; end - # source://actionpack/lib/action_dispatch/testing/integration.rb#376 + # source://actionpack/lib/action_dispatch/testing/integration.rb#375 def cookies(*_arg0, **_arg1, &_arg2); end - # Copy the instance variables from the current session instance into the - # test instance. + # Copy the instance variables from the current session instance into the test + # instance. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#414 + # source://actionpack/lib/action_dispatch/testing/integration.rb#412 def copy_session_variables!; end - # source://actionpack/lib/action_dispatch/testing/integration.rb#353 + # source://actionpack/lib/action_dispatch/testing/integration.rb#352 def create_session(app); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#420 + # source://actionpack/lib/action_dispatch/testing/integration.rb#418 def default_url_options; end - # source://actionpack/lib/action_dispatch/testing/integration.rb#424 + # source://actionpack/lib/action_dispatch/testing/integration.rb#422 def default_url_options=(options); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#376 + # source://actionpack/lib/action_dispatch/testing/integration.rb#375 def delete(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#376 + # source://actionpack/lib/action_dispatch/testing/integration.rb#375 def follow_redirect!(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#376 + # source://actionpack/lib/action_dispatch/testing/integration.rb#375 def get(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#376 + # source://actionpack/lib/action_dispatch/testing/integration.rb#375 def head(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#343 + # source://actionpack/lib/action_dispatch/testing/integration.rb#342 def integration_session; end - # Open a new session instance. If a block is given, the new session is - # yielded to the block before being returned. + # Open a new session instance. If a block is given, the new session is yielded + # to the block before being returned. # - # session = open_session do |sess| - # sess.extend(CustomAssertions) - # end + # session = open_session do |sess| + # sess.extend(CustomAssertions) + # end # - # By default, a single session is automatically created for you, but you - # can use this method to open multiple sessions that ought to be tested - # simultaneously. + # By default, a single session is automatically created for you, but you can use + # this method to open multiple sessions that ought to be tested simultaneously. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#396 + # source://actionpack/lib/action_dispatch/testing/integration.rb#394 def open_session; end - # source://actionpack/lib/action_dispatch/testing/integration.rb#376 + # source://actionpack/lib/action_dispatch/testing/integration.rb#375 def patch(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#376 + # source://actionpack/lib/action_dispatch/testing/integration.rb#375 def post(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#376 + # source://actionpack/lib/action_dispatch/testing/integration.rb#375 def put(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#365 + # source://actionpack/lib/action_dispatch/testing/integration.rb#364 def remove!; end - # Reset the current session. This is useful for testing multiple sessions - # in a single test case. + # Reset the current session. This is useful for testing multiple sessions in a + # single test case. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#349 + # source://actionpack/lib/action_dispatch/testing/integration.rb#348 def reset!; end - # source://actionpack/lib/action_dispatch/testing/integration.rb#331 + # source://actionpack/lib/action_dispatch/testing/integration.rb#330 def root_session; end - # source://actionpack/lib/action_dispatch/testing/integration.rb#331 + # source://actionpack/lib/action_dispatch/testing/integration.rb#330 def root_session=(_arg0); end private # Delegate unhandled messages to the current session instance. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#434 - def method_missing(method, *args, **_arg2, &block); end + # source://actionpack/lib/action_dispatch/testing/integration.rb#432 + def method_missing(method, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/testing/integration.rb#429 + # source://actionpack/lib/action_dispatch/testing/integration.rb#427 def respond_to_missing?(method, _); end end -# source://actionpack/lib/action_dispatch/testing/integration.rb#328 +# source://actionpack/lib/action_dispatch/testing/integration.rb#327 ActionDispatch::Integration::Runner::APP_SESSIONS = T.let(T.unsafe(nil), Hash) -# An instance of this class represents a set of requests and responses -# performed sequentially by a test process. Because you can instantiate -# multiple sessions and run them side-by-side, you can also mimic (to some -# limited extent) multiple simultaneous users interacting with your system. +# An instance of this class represents a set of requests and responses performed +# sequentially by a test process. Because you can instantiate multiple sessions +# and run them side-by-side, you can also mimic (to some limited extent) +# multiple simultaneous users interacting with your system. # # Typically, you will instantiate a new session using Runner#open_session, -# rather than instantiating a \Session directly. +# rather than instantiating a Session directly. # -# source://actionpack/lib/action_dispatch/testing/integration.rb#89 +# source://actionpack/lib/action_dispatch/testing/integration.rb#91 class ActionDispatch::Integration::Session include ::Minitest::Assertions include ::ActionDispatch::Assertions::RoutingAssertions @@ -11650,405 +12264,404 @@ class ActionDispatch::Integration::Session include ::ActionDispatch::Routing::UrlFor extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods - # Create and initialize a new \Session instance. + # Create and initialize a new Session instance. # # @return [Session] a new instance of Session # - # source://actionpack/lib/action_dispatch/testing/integration.rb#131 + # source://actionpack/lib/action_dispatch/testing/integration.rb#133 def initialize(app); end # The Accept header to send. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#108 + # source://actionpack/lib/action_dispatch/testing/integration.rb#110 def accept; end # The Accept header to send. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#108 + # source://actionpack/lib/action_dispatch/testing/integration.rb#110 def accept=(_arg0); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#95 + # source://actionpack/lib/action_dispatch/testing/integration.rb#97 def body(*_arg0, **_arg1, &_arg2); end # A reference to the controller instance used by the last request. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#117 + # source://actionpack/lib/action_dispatch/testing/integration.rb#119 def controller; end - # A map of the cookies returned by the last response, and which will be - # sent with the next request. + # A map of the cookies returned by the last response, and which will be sent + # with the next request. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#112 + # source://actionpack/lib/action_dispatch/testing/integration.rb#114 def cookies; end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options; end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options=(_arg0); end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options?; end - # source://actionpack/lib/action_dispatch/testing/integration.rb#95 + # source://actionpack/lib/action_dispatch/testing/integration.rb#97 def headers(*_arg0, **_arg1, &_arg2); end # The hostname used in the last request. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#99 + # source://actionpack/lib/action_dispatch/testing/integration.rb#101 def host; end # Sets the attribute host # Set the host name to use in the next request. # - # session.host! "www.example.com" + # session.host! "www.example.com" # # @param value the value to set the attribute host to. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#102 + # source://actionpack/lib/action_dispatch/testing/integration.rb#104 def host!(_arg0); end # Sets the attribute host # # @param value the value to set the attribute host to. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#102 + # source://actionpack/lib/action_dispatch/testing/integration.rb#104 def host=(_arg0); end # Specify whether or not the session should mimic a secure HTTPS request. # - # session.https! - # session.https!(false) + # session.https! + # session.https!(false) # - # source://actionpack/lib/action_dispatch/testing/integration.rb#179 + # source://actionpack/lib/action_dispatch/testing/integration.rb#180 def https!(flag = T.unsafe(nil)); end - # Returns +true+ if the session is mimicking a secure HTTPS request. + # Returns `true` if the session is mimicking a secure HTTPS request. # - # if session.https? - # ... - # end + # if session.https? + # ... + # end # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/testing/integration.rb#188 + # source://actionpack/lib/action_dispatch/testing/integration.rb#189 def https?; end - # source://actionpack/lib/action_dispatch/testing/integration.rb#96 + # source://actionpack/lib/action_dispatch/testing/integration.rb#98 def path(*_arg0, **_arg1, &_arg2); end # Performs the actual request. # - # - +method+: The HTTP method (GET, POST, PATCH, PUT, DELETE, HEAD, OPTIONS) - # as a symbol. - # - +path+: The URI (as a String) on which you want to perform the - # request. - # - +params+: The HTTP parameters that you want to pass. This may - # be +nil+, - # a Hash, or a String that is appropriately encoded - # (application/x-www-form-urlencoded or - # multipart/form-data). - # - +headers+: Additional headers to pass, as a Hash. The headers will be - # merged into the Rack env hash. - # - +env+: Additional env to pass, as a Hash. The headers will be - # merged into the Rack env hash. - # - +xhr+: Set to +true+ if you want to make an Ajax request. - # Adds request headers characteristic of XMLHttpRequest e.g. HTTP_X_REQUESTED_WITH. - # The headers will be merged into the Rack env hash. - # - +as+: Used for encoding the request with different content type. - # Supports +:json+ by default and will set the appropriate request headers. - # The headers will be merged into the Rack env hash. + # * `method`: The HTTP method (GET, POST, PATCH, PUT, DELETE, HEAD, OPTIONS) + # as a symbol. + # * `path`: The URI (as a String) on which you want to perform the request. + # * `params`: The HTTP parameters that you want to pass. This may be `nil`, a + # Hash, or a String that is appropriately encoded + # (`application/x-www-form-urlencoded` or `multipart/form-data`). + # * `headers`: Additional headers to pass, as a Hash. The headers will be + # merged into the Rack env hash. + # * `env`: Additional env to pass, as a Hash. The headers will be merged into + # the Rack env hash. + # * `xhr`: Set to `true` if you want to make an Ajax request. Adds request + # headers characteristic of XMLHttpRequest e.g. HTTP_X_REQUESTED_WITH. The + # headers will be merged into the Rack env hash. + # * `as`: Used for encoding the request with different content type. Supports + # `:json` by default and will set the appropriate request headers. The + # headers will be merged into the Rack env hash. + # # # This method is rarely used directly. Use RequestHelpers#get, - # RequestHelpers#post, or other standard HTTP methods in integration - # tests. +#process+ is only required when using a request method that - # doesn't have a method defined in the integration tests. + # RequestHelpers#post, or other standard HTTP methods in integration tests. + # `#process` is only required when using a request method that doesn't have a + # method defined in the integration tests. # # This method returns the response status, after performing the request. - # Furthermore, if this method was called from an ActionDispatch::IntegrationTest object, - # then that object's @response instance variable will point to a Response object - # which one can use to inspect the details of the response. + # Furthermore, if this method was called from an ActionDispatch::IntegrationTest + # object, then that object's `@response` instance variable will point to a + # Response object which one can use to inspect the details of the response. # # Example: - # process :get, '/author', params: { since: 201501011400 } + # process :get, '/author', params: { since: 201501011400 } # - # source://actionpack/lib/action_dispatch/testing/integration.rb#226 + # source://actionpack/lib/action_dispatch/testing/integration.rb#225 def process(method, path, params: T.unsafe(nil), headers: T.unsafe(nil), env: T.unsafe(nil), xhr: T.unsafe(nil), as: T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#95 + # source://actionpack/lib/action_dispatch/testing/integration.rb#97 def redirect?(*_arg0, **_arg1, &_arg2); end # The remote_addr used in the last request. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#105 + # source://actionpack/lib/action_dispatch/testing/integration.rb#107 def remote_addr; end # The remote_addr used in the last request. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#105 + # source://actionpack/lib/action_dispatch/testing/integration.rb#107 def remote_addr=(_arg0); end # A reference to the request instance used by the last request. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#120 + # source://actionpack/lib/action_dispatch/testing/integration.rb#122 def request; end # A running counter of the number of requests processed. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#126 + # source://actionpack/lib/action_dispatch/testing/integration.rb#128 def request_count; end # A running counter of the number of requests processed. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#126 + # source://actionpack/lib/action_dispatch/testing/integration.rb#128 def request_count=(_arg0); end - # Resets the instance. This can be used to reset the state information - # in an existing session instance, so it can be used from a clean-slate - # condition. + # Resets the instance. This can be used to reset the state information in an + # existing session instance, so it can be used from a clean-slate condition. # - # session.reset! + # session.reset! # - # source://actionpack/lib/action_dispatch/testing/integration.rb#155 + # source://actionpack/lib/action_dispatch/testing/integration.rb#156 def reset!; end # A reference to the response instance used by the last request. # - # source://actionpack/lib/action_dispatch/testing/integration.rb#123 + # source://actionpack/lib/action_dispatch/testing/integration.rb#125 def response; end - # source://actionpack/lib/action_dispatch/testing/integration.rb#95 + # source://actionpack/lib/action_dispatch/testing/integration.rb#97 def status(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#95 + # source://actionpack/lib/action_dispatch/testing/integration.rb#97 def status_message(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#138 + # source://actionpack/lib/action_dispatch/testing/integration.rb#140 def url_options; end private - # source://actionpack/lib/action_dispatch/testing/integration.rb#309 + # source://actionpack/lib/action_dispatch/testing/integration.rb#308 def _mock_session; end # @yield [location] # - # source://actionpack/lib/action_dispatch/testing/integration.rb#317 + # source://actionpack/lib/action_dispatch/testing/integration.rb#316 def build_expanded_path(path); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#313 + # source://actionpack/lib/action_dispatch/testing/integration.rb#312 def build_full_uri(path, env); end class << self - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_url_options; end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 - def default_url_options=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_url_options=(new_value); end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options?; end end end -# source://actionpack/lib/action_dispatch/testing/integration.rb#90 +# source://actionpack/lib/action_dispatch/testing/integration.rb#92 ActionDispatch::Integration::Session::DEFAULT_HOST = T.let(T.unsafe(nil), String) -# An integration test spans multiple controllers and actions, -# tying them all together to ensure they work together as expected. It tests -# more completely than either unit or functional tests do, exercising the -# entire stack, from the dispatcher to the database. +# An integration test spans multiple controllers and actions, tying them all +# together to ensure they work together as expected. It tests more completely +# than either unit or functional tests do, exercising the entire stack, from the +# dispatcher to the database. # -# At its simplest, you simply extend IntegrationTest and write your -# tests using the Integration::RequestHelpers#get and/or +# At its simplest, you simply extend `IntegrationTest` and write your tests +# using the Integration::RequestHelpers#get and/or # Integration::RequestHelpers#post methods: # -# require "test_helper" +# require "test_helper" # -# class ExampleTest < ActionDispatch::IntegrationTest -# fixtures :people +# class ExampleTest < ActionDispatch::IntegrationTest +# fixtures :people # -# def test_login -# # get the login page -# get "/login" -# assert_equal 200, status +# def test_login +# # get the login page +# get "/login" +# assert_equal 200, status # -# # post the login and follow through to the home page -# post "/login", params: { username: people(:jamis).username, -# password: people(:jamis).password } -# follow_redirect! -# assert_equal 200, status -# assert_equal "/home", path +# # post the login and follow through to the home page +# post "/login", params: { username: people(:jamis).username, +# password: people(:jamis).password } +# follow_redirect! +# assert_equal 200, status +# assert_equal "/home", path +# end # end -# end # -# However, you can also have multiple session instances open per test, and -# even extend those instances with assertions and methods to create a very -# powerful testing DSL that is specific for your application. You can even -# reference any named routes you happen to have defined. +# However, you can also have multiple session instances open per test, and even +# extend those instances with assertions and methods to create a very powerful +# testing DSL that is specific for your application. You can even reference any +# named routes you happen to have defined. # -# require "test_helper" +# require "test_helper" # -# class AdvancedTest < ActionDispatch::IntegrationTest -# fixtures :people, :rooms +# class AdvancedTest < ActionDispatch::IntegrationTest +# fixtures :people, :rooms # -# def test_login_and_speak -# jamis, david = login(:jamis), login(:david) -# room = rooms(:office) +# def test_login_and_speak +# jamis, david = login(:jamis), login(:david) +# room = rooms(:office) # -# jamis.enter(room) -# jamis.speak(room, "anybody home?") +# jamis.enter(room) +# jamis.speak(room, "anybody home?") # -# david.enter(room) -# david.speak(room, "hello!") -# end +# david.enter(room) +# david.speak(room, "hello!") +# end # -# private +# private # -# module CustomAssertions -# def enter(room) -# # reference a named route, for maximum internal consistency! -# get(room_url(id: room.id)) -# assert(...) -# ... -# end +# module CustomAssertions +# def enter(room) +# # reference a named route, for maximum internal consistency! +# get(room_url(id: room.id)) +# assert(...) +# ... +# end # -# def speak(room, message) -# post "/say/#{room.id}", xhr: true, params: { message: message } -# assert(...) -# ... +# def speak(room, message) +# post "/say/#{room.id}", xhr: true, params: { message: message } +# assert(...) +# ... +# end # end -# end # -# def login(who) -# open_session do |sess| -# sess.extend(CustomAssertions) -# who = people(who) -# sess.post "/login", params: { username: who.username, -# password: who.password } -# assert(...) +# def login(who) +# open_session do |sess| +# sess.extend(CustomAssertions) +# who = people(who) +# sess.post "/login", params: { username: who.username, +# password: who.password } +# assert(...) +# end # end -# end -# end +# end # # Another longer example would be: # # A simple integration test that exercises multiple controllers: # -# require "test_helper" +# require "test_helper" # -# class UserFlowsTest < ActionDispatch::IntegrationTest -# test "login and browse site" do -# # login via https -# https! -# get "/login" -# assert_response :success +# class UserFlowsTest < ActionDispatch::IntegrationTest +# test "login and browse site" do +# # login via https +# https! +# get "/login" +# assert_response :success # -# post "/login", params: { username: users(:david).username, password: users(:david).password } -# follow_redirect! -# assert_equal '/welcome', path -# assert_equal 'Welcome david!', flash[:notice] +# post "/login", params: { username: users(:david).username, password: users(:david).password } +# follow_redirect! +# assert_equal '/welcome', path +# assert_equal 'Welcome david!', flash[:notice] # -# https!(false) -# get "/articles/all" -# assert_response :success -# assert_select 'h1', 'Articles' +# https!(false) +# get "/articles/all" +# assert_response :success +# assert_select 'h1', 'Articles' +# end # end -# end # # As you can see the integration test involves multiple controllers and # exercises the entire stack from database to dispatcher. In addition you can -# have multiple session instances open simultaneously in a test and extend -# those instances with assertion methods to create a very powerful testing -# DSL (domain-specific language) just for your application. +# have multiple session instances open simultaneously in a test and extend those +# instances with assertion methods to create a very powerful testing DSL +# (domain-specific language) just for your application. # # Here's an example of multiple sessions and custom DSL in an integration test # -# require "test_helper" +# require "test_helper" # -# class UserFlowsTest < ActionDispatch::IntegrationTest -# test "login and browse site" do -# # User david logs in -# david = login(:david) -# # User guest logs in -# guest = login(:guest) +# class UserFlowsTest < ActionDispatch::IntegrationTest +# test "login and browse site" do +# # User david logs in +# david = login(:david) +# # User guest logs in +# guest = login(:guest) # -# # Both are now available in different sessions -# assert_equal 'Welcome david!', david.flash[:notice] -# assert_equal 'Welcome guest!', guest.flash[:notice] +# # Both are now available in different sessions +# assert_equal 'Welcome david!', david.flash[:notice] +# assert_equal 'Welcome guest!', guest.flash[:notice] # -# # User david can browse site -# david.browses_site -# # User guest can browse site as well -# guest.browses_site +# # User david can browse site +# david.browses_site +# # User guest can browse site as well +# guest.browses_site # -# # Continue with other assertions -# end +# # Continue with other assertions +# end # -# private +# private # -# module CustomDsl -# def browses_site -# get "/products/all" -# assert_response :success -# assert_select 'h1', 'Products' +# module CustomDsl +# def browses_site +# get "/products/all" +# assert_response :success +# assert_select 'h1', 'Products' +# end # end -# end # -# def login(user) -# open_session do |sess| -# sess.extend(CustomDsl) -# u = users(user) -# sess.https! -# sess.post "/login", params: { username: u.username, password: u.password } -# assert_equal '/welcome', sess.path -# sess.https!(false) +# def login(user) +# open_session do |sess| +# sess.extend(CustomDsl) +# u = users(user) +# sess.https! +# sess.post "/login", params: { username: u.username, password: u.password } +# assert_equal '/welcome', sess.path +# sess.https!(false) +# end # end -# end -# end +# end # -# See the {request helpers documentation}[rdoc-ref:ActionDispatch::Integration::RequestHelpers] for help on how to -# use +get+, etc. +# See the [request helpers documentation] +# (rdoc-ref:ActionDispatch::Integration::RequestHelpers) for help +# on how to use `get`, etc. # -# === Changing the request encoding +# ### Changing the request encoding # -# You can also test your JSON API easily by setting what the request should -# be encoded as: +# You can also test your JSON API easily by setting what the request should be +# encoded as: # -# require "test_helper" +# require "test_helper" # -# class ApiTest < ActionDispatch::IntegrationTest -# test "creates articles" do -# assert_difference -> { Article.count } do -# post articles_path, params: { article: { title: "Ahoy!" } }, as: :json -# end +# class ApiTest < ActionDispatch::IntegrationTest +# test "creates articles" do +# assert_difference -> { Article.count } do +# post articles_path, params: { article: { title: "Ahoy!" } }, as: :json +# end # -# assert_response :success -# assert_equal({ id: Article.last.id, title: "Ahoy!" }, response.parsed_body) +# assert_response :success +# assert_equal({ id: Article.last.id, title: "Ahoy!" }, response.parsed_body) +# end # end -# end # -# The +as+ option passes an "application/json" Accept header (thereby setting +# The `as` option passes an "application/json" Accept header (thereby setting # the request format to JSON unless overridden), sets the content type to # "application/json" and encodes the parameters as JSON. # -# Calling TestResponse#parsed_body on the response parses the response body based on the -# last response MIME type. +# Calling TestResponse#parsed_body on the response parses the response body +# based on the last response MIME type. # -# Out of the box, only :json is supported. But for any custom MIME -# types you've registered, you can add your own encoders with: +# Out of the box, only `:json` is supported. But for any custom MIME types +# you've registered, you can add your own encoders with: # -# ActionDispatch::IntegrationTest.register_encoder :wibble, -# param_encoder: -> params { params.to_wibble }, -# response_parser: -> body { body } +# ActionDispatch::IntegrationTest.register_encoder :wibble, +# param_encoder: -> params { params.to_wibble }, +# response_parser: -> body { body } # -# Where +param_encoder+ defines how the params should be encoded and -# +response_parser+ defines how the response body should be parsed through +# Where `param_encoder` defines how the params should be encoded and +# `response_parser` defines how the response body should be parsed through # TestResponse#parsed_body. # -# Consult the {Rails Testing Guide}[https://guides.rubyonrails.org/testing.html] for more. +# Consult the [Rails Testing Guide](https://guides.rubyonrails.org/testing.html) +# for more. # -# source://actionpack/lib/action_dispatch/testing/integration.rb#641 +# source://actionpack/lib/action_dispatch/testing/integration.rb#640 class ActionDispatch::IntegrationTest < ::ActiveSupport::TestCase include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::Assertions::RoutingAssertions @@ -12059,14 +12672,17 @@ class ActionDispatch::IntegrationTest < ::ActiveSupport::TestCase include ::ActionDispatch::Assertions include ::ActionDispatch::Integration::Runner include ::ActionController::TemplateAssertions + include ::ActionDispatch::TestHelpers::PageDumpHelper include ::ActionDispatch::IntegrationTest::Behavior include ::ActionDispatch::Routing::PolymorphicRoutes include ::ActionDispatch::Routing::UrlFor include ::ActionDispatch::IntegrationTest::UrlOptions + include ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting extend ::ActionDispatch::IntegrationTest::Behavior::ClassMethods + extend ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods end -# source://actionpack/lib/action_dispatch/testing/integration.rb#651 +# source://actionpack/lib/action_dispatch/testing/integration.rb#650 module ActionDispatch::IntegrationTest::Behavior include ::ActionDispatch::Assertions::RoutingAssertions include ::ActionDispatch::Assertions::ResponseAssertions @@ -12076,136 +12692,139 @@ module ActionDispatch::IntegrationTest::Behavior include ::ActionDispatch::Assertions include ::ActionDispatch::Integration::Runner include ::ActionController::TemplateAssertions + include ::ActionDispatch::TestHelpers::PageDumpHelper extend ::ActiveSupport::Concern include ::ActionDispatch::Routing::UrlFor include ::ActionDispatch::IntegrationTest::UrlOptions + include ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting mixes_in_class_methods ::ActionDispatch::IntegrationTest::Behavior::ClassMethods + mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods - # source://actionpack/lib/action_dispatch/testing/integration.rb#682 + # source://actionpack/lib/action_dispatch/testing/integration.rb#683 def app; end - # source://actionpack/lib/action_dispatch/testing/integration.rb#686 + # source://actionpack/lib/action_dispatch/testing/integration.rb#687 def document_root_element; end end -# source://actionpack/lib/action_dispatch/testing/integration.rb#664 +# source://actionpack/lib/action_dispatch/testing/integration.rb#665 module ActionDispatch::IntegrationTest::Behavior::ClassMethods - # source://actionpack/lib/action_dispatch/testing/integration.rb#665 + # source://actionpack/lib/action_dispatch/testing/integration.rb#666 def app; end - # source://actionpack/lib/action_dispatch/testing/integration.rb#673 + # source://actionpack/lib/action_dispatch/testing/integration.rb#674 def app=(app); end - # source://actionpack/lib/action_dispatch/testing/integration.rb#677 + # source://actionpack/lib/action_dispatch/testing/integration.rb#678 def register_encoder(*args, **options); end end -# source://actionpack/lib/action_dispatch/testing/integration.rb#644 +# source://actionpack/lib/action_dispatch/testing/integration.rb#643 module ActionDispatch::IntegrationTest::UrlOptions extend ::ActiveSupport::Concern - # source://actionpack/lib/action_dispatch/testing/integration.rb#646 + # source://actionpack/lib/action_dispatch/testing/integration.rb#645 def url_options; end end # :stopdoc: # -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#4 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#6 module ActionDispatch::Journey; end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#7 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#9 class ActionDispatch::Journey::Ast # @return [Ast] a new instance of Ast # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#11 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#13 def initialize(tree, formatted); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#37 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#38 def glob?; end # Returns the value of attribute names. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#8 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#10 def names; end # Returns the value of attribute path_params. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#8 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#10 def path_params; end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#23 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#25 def requirements=(requirements); end # Returns the value of attribute tree. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#8 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#10 def root; end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#33 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#34 def route=(route); end # Returns the value of attribute terminals. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#8 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#10 def terminals; end # Returns the value of attribute tree. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#8 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#10 def tree; end # Returns the value of attribute wildcard_options. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#8 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#10 def wildcard_options; end private # Returns the value of attribute stars. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#42 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#43 def stars; end # Returns the value of attribute symbols. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#42 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#43 def symbols; end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#44 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#45 def visit_tree(formatted); end end -# source://actionpack/lib/action_dispatch/journey/visitors.rb#6 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#8 class ActionDispatch::Journey::Format # @return [Format] a new instance of Format # - # source://actionpack/lib/action_dispatch/journey/visitors.rb#22 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#24 def initialize(parts); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#37 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#39 def evaluate(hash); end class << self - # source://actionpack/lib/action_dispatch/journey/visitors.rb#14 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#16 def required_path(symbol); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#18 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#20 def required_segment(symbol); end end end -# source://actionpack/lib/action_dispatch/journey/visitors.rb#7 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#9 ActionDispatch::Journey::Format::ESCAPE_PATH = T.let(T.unsafe(nil), Proc) -# source://actionpack/lib/action_dispatch/journey/visitors.rb#8 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#10 ActionDispatch::Journey::Format::ESCAPE_SEGMENT = T.let(T.unsafe(nil), Proc) -# source://actionpack/lib/action_dispatch/journey/visitors.rb#10 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#12 class ActionDispatch::Journey::Format::Parameter < ::Struct - # source://actionpack/lib/action_dispatch/journey/visitors.rb#11 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#13 def escape(value); end # Returns the value of attribute escaper @@ -12240,1538 +12859,1516 @@ class ActionDispatch::Journey::Format::Parameter < ::Struct end # The Formatter class is used for formatting URLs. For example, parameters -# passed to +url_for+ in Rails will eventually call Formatter#generate. +# passed to `url_for` in Rails will eventually call Formatter#generate. # -# source://actionpack/lib/action_dispatch/journey/formatter.rb#10 +# source://actionpack/lib/action_dispatch/journey/formatter.rb#12 class ActionDispatch::Journey::Formatter # @return [Formatter] a new instance of Formatter # - # source://actionpack/lib/action_dispatch/journey/formatter.rb#13 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#15 def initialize(routes); end - # source://actionpack/lib/action_dispatch/journey/formatter.rb#103 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#105 def clear; end - # source://actionpack/lib/action_dispatch/journey/formatter.rb#59 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#109 + def eager_load!; end + + # source://actionpack/lib/action_dispatch/journey/formatter.rb#61 def generate(name, options, path_parameters); end # Returns the value of attribute routes. # - # source://actionpack/lib/action_dispatch/journey/formatter.rb#11 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#13 def routes; end private - # source://actionpack/lib/action_dispatch/journey/formatter.rb#202 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#209 def build_cache; end - # source://actionpack/lib/action_dispatch/journey/formatter.rb#213 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#220 def cache; end - # source://actionpack/lib/action_dispatch/journey/formatter.rb#108 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#115 def extract_parameterized_parts(route, options, recall); end - # source://actionpack/lib/action_dispatch/journey/formatter.rb#135 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#142 def match_route(name, options); end # Returns an array populated with missing keys if any are present. # - # source://actionpack/lib/action_dispatch/journey/formatter.rb#174 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#181 def missing_keys(route, parts); end - # source://actionpack/lib/action_dispatch/journey/formatter.rb#131 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#138 def named_routes; end - # source://actionpack/lib/action_dispatch/journey/formatter.rb#157 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#164 def non_recursive(cache, options); end - # source://actionpack/lib/action_dispatch/journey/formatter.rb#194 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#201 def possibles(cache, options, depth = T.unsafe(nil)); end end -# source://actionpack/lib/action_dispatch/journey/formatter.rb#32 +# source://actionpack/lib/action_dispatch/journey/formatter.rb#34 class ActionDispatch::Journey::Formatter::MissingRoute # @return [MissingRoute] a new instance of MissingRoute # - # source://actionpack/lib/action_dispatch/journey/formatter.rb#35 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#37 def initialize(constraints, missing_keys, unmatched_keys, routes, name); end # Returns the value of attribute constraints. # - # source://actionpack/lib/action_dispatch/journey/formatter.rb#33 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#35 def constraints; end - # source://actionpack/lib/action_dispatch/journey/formatter.rb#51 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#53 def message; end # Returns the value of attribute missing_keys. # - # source://actionpack/lib/action_dispatch/journey/formatter.rb#33 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#35 def missing_keys; end # Returns the value of attribute name. # - # source://actionpack/lib/action_dispatch/journey/formatter.rb#33 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#35 def name; end - # source://actionpack/lib/action_dispatch/journey/formatter.rb#47 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#49 def params; end # @raise [ActionController::UrlGenerationError] # - # source://actionpack/lib/action_dispatch/journey/formatter.rb#43 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#45 def path(method_name); end # Returns the value of attribute routes. # - # source://actionpack/lib/action_dispatch/journey/formatter.rb#33 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#35 def routes; end # Returns the value of attribute unmatched_keys. # - # source://actionpack/lib/action_dispatch/journey/formatter.rb#33 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#35 def unmatched_keys; end end -# source://actionpack/lib/action_dispatch/journey/formatter.rb#18 +# source://actionpack/lib/action_dispatch/journey/formatter.rb#20 class ActionDispatch::Journey::Formatter::RouteWithParams # @return [RouteWithParams] a new instance of RouteWithParams # - # source://actionpack/lib/action_dispatch/journey/formatter.rb#21 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#23 def initialize(route, parameterized_parts, params); end # Returns the value of attribute params. # - # source://actionpack/lib/action_dispatch/journey/formatter.rb#19 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#21 def params; end - # source://actionpack/lib/action_dispatch/journey/formatter.rb#27 + # source://actionpack/lib/action_dispatch/journey/formatter.rb#29 def path(_); end end -# source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#7 +# source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#9 module ActionDispatch::Journey::GTG; end -# source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#8 +# source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#10 class ActionDispatch::Journey::GTG::Builder # @return [Builder] a new instance of Builder # - # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#13 + # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#15 def initialize(root); end # Returns the value of attribute ast. # - # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#11 + # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#13 def ast; end # Returns the value of attribute endpoints. # - # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#11 + # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#13 def endpoints; end - # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#86 + # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#87 def firstpos(node); end - # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#107 + # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#108 def lastpos(node); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#64 + # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#66 def nullable?(node); end # Returns the value of attribute root. # - # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#11 + # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#13 def root; end - # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#19 + # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#21 def transition_table; end private - # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#129 + # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#130 def build_followpos; end - # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#142 + # source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#143 def symbol(edge); end end -# source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#9 +# source://actionpack/lib/action_dispatch/journey/gtg/builder.rb#11 ActionDispatch::Journey::GTG::Builder::DUMMY_END_NODE = T.let(T.unsafe(nil), ActionDispatch::Journey::Nodes::Dummy) -# source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#8 +# source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#10 class ActionDispatch::Journey::GTG::MatchData # @return [MatchData] a new instance of MatchData # - # source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#11 + # source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#13 def initialize(memos); end # Returns the value of attribute memos. # - # source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#9 + # source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#11 def memos; end end -# source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#16 +# source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#18 class ActionDispatch::Journey::GTG::Simulator # @return [Simulator] a new instance of Simulator # - # source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#21 + # source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#23 def initialize(transition_table); end - # source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#25 + # source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#27 def memos(string); end # Returns the value of attribute tt. # - # source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#19 + # source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#21 def tt; end end -# source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#17 +# source://actionpack/lib/action_dispatch/journey/gtg/simulator.rb#19 ActionDispatch::Journey::GTG::Simulator::INITIAL_STATE = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#8 +# source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#10 class ActionDispatch::Journey::GTG::TransitionTable include ::ActionDispatch::Journey::NFA::Dot # @return [TransitionTable] a new instance of TransitionTable # - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#16 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#18 def initialize; end - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#163 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#165 def []=(from, to, sym); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#32 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#34 def accepting?(state); end - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#28 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#30 def accepting_states; end - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#24 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#26 def add_accepting(state); end - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#36 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#38 def add_memo(idx, memo); end - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#98 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#100 def as_json(options = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#44 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#46 def eclosure(t); end - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#40 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#42 def memo(idx); end # Returns the value of attribute memos. # - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#11 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#13 def memos; end - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#48 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#50 def move(t, full_string, start_index, end_index); end - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#180 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#182 def states; end - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#115 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#117 def to_svg; end - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#187 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#189 def transitions; end - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#125 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#127 def visualizer(paths, title = T.unsafe(nil)); end private - # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#198 + # source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#200 def states_hash_for(sym); end end -# source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#13 +# source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#15 ActionDispatch::Journey::GTG::TransitionTable::DEFAULT_EXP = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#14 +# source://actionpack/lib/action_dispatch/journey/gtg/transition_table.rb#16 ActionDispatch::Journey::GTG::TransitionTable::DEFAULT_EXP_ANCHORED = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/journey/nfa/dot.rb#5 +# source://actionpack/lib/action_dispatch/journey/nfa/dot.rb#7 module ActionDispatch::Journey::NFA; end -# source://actionpack/lib/action_dispatch/journey/nfa/dot.rb#6 +# source://actionpack/lib/action_dispatch/journey/nfa/dot.rb#8 module ActionDispatch::Journey::NFA::Dot - # source://actionpack/lib/action_dispatch/journey/nfa/dot.rb#7 + # source://actionpack/lib/action_dispatch/journey/nfa/dot.rb#9 def to_dot; end end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#67 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#68 module ActionDispatch::Journey::Nodes; end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#180 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#181 class ActionDispatch::Journey::Nodes::Binary < ::ActionDispatch::Journey::Nodes::Node # @return [Binary] a new instance of Binary # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#183 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#184 def initialize(left, right); end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#188 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#189 def children; end # Returns the value of attribute right. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#181 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#182 def right; end # Sets the attribute right # # @param value the value to set the attribute right to. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#181 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#182 def right=(_arg0); end end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#191 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#192 class ActionDispatch::Journey::Nodes::Cat < ::ActionDispatch::Journey::Nodes::Binary # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#192 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#193 def cat?; end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#193 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#194 def type; end end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#132 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#133 class ActionDispatch::Journey::Nodes::Dot < ::ActionDispatch::Journey::Nodes::Terminal - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#133 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#134 def type; end end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#120 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#121 class ActionDispatch::Journey::Nodes::Dummy < ::ActionDispatch::Journey::Nodes::Literal # @return [Dummy] a new instance of Dummy # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#121 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#122 def initialize(x = T.unsafe(nil)); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#125 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#126 def literal?; end end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#157 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#158 class ActionDispatch::Journey::Nodes::Group < ::ActionDispatch::Journey::Nodes::Unary # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#159 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#160 def group?; end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#158 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#159 def type; end end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#115 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#116 class ActionDispatch::Journey::Nodes::Literal < ::ActionDispatch::Journey::Nodes::Terminal # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#116 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#117 def literal?; end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#117 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#118 def type; end end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#68 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#69 class ActionDispatch::Journey::Nodes::Node include ::Enumerable # @return [Node] a new instance of Node # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#73 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#74 def initialize(left); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#106 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#107 def cat?; end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#78 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#79 def each(&block); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#107 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#108 def group?; end # Returns the value of attribute left. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#71 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#72 def left; end # Sets the attribute left # # @param value the value to set the attribute left to. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#71 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#72 def left=(_arg0); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#103 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#104 def literal?; end # Returns the value of attribute memo. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#71 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#72 def memo; end # Sets the attribute memo # # @param value the value to set the attribute memo to. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#71 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#72 def memo=(_arg0); end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#94 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#95 def name; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#105 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#106 def star?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#102 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#103 def symbol?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#104 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#105 def terminal?; end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#86 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#87 def to_dot; end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#82 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#83 def to_s; end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#90 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#91 def to_sym; end # @raise [NotImplementedError] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#98 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#99 def type; end end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#196 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#197 class ActionDispatch::Journey::Nodes::Or < ::ActionDispatch::Journey::Nodes::Node # @return [Or] a new instance of Or # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#199 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#200 def initialize(children); end # Returns the value of attribute children. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#197 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#198 def children; end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#203 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#204 def type; end end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#128 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#129 class ActionDispatch::Journey::Nodes::Slash < ::ActionDispatch::Journey::Nodes::Terminal - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#129 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#130 def type; end end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#162 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#163 class ActionDispatch::Journey::Nodes::Star < ::ActionDispatch::Journey::Nodes::Unary # @return [Star] a new instance of Star # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#165 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#166 def initialize(left); end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#175 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#176 def name; end # Returns the value of attribute regexp. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#163 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#164 def regexp; end # Sets the attribute regexp # # @param value the value to set the attribute regexp to. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#163 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#164 def regexp=(_arg0); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#172 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#173 def star?; end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#173 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#174 def type; end end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#136 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#137 class ActionDispatch::Journey::Nodes::Symbol < ::ActionDispatch::Journey::Nodes::Terminal # @return [Symbol] a new instance of Symbol # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#143 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#144 def initialize(left, regexp = T.unsafe(nil)); end # Returns the value of attribute name. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#139 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#140 def name; end # Returns the value of attribute regexp. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#137 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#138 def regexp; end # Sets the attribute regexp # # @param value the value to set the attribute regexp to. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#137 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#138 def regexp=(_arg0); end # Returns the value of attribute regexp. # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#137 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#138 def symbol; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#150 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#151 def symbol?; end - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#149 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#150 def type; end end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#141 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#142 ActionDispatch::Journey::Nodes::Symbol::DEFAULT_EXP = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#142 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#143 ActionDispatch::Journey::Nodes::Symbol::GREEDY_EXP = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#110 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#111 class ActionDispatch::Journey::Nodes::Terminal < ::ActionDispatch::Journey::Nodes::Node - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#71 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#72 def symbol; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#112 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#113 def terminal?; end end -# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#153 +# source://actionpack/lib/action_dispatch/journey/nodes/node.rb#154 class ActionDispatch::Journey::Nodes::Unary < ::ActionDispatch::Journey::Nodes::Node - # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#154 + # source://actionpack/lib/action_dispatch/journey/nodes/node.rb#155 def children; end end -# source://actionpack/lib/action_dispatch/journey/parser_extras.rb#9 -class ActionDispatch::Journey::Parser < ::Racc::Parser +# source://actionpack/lib/action_dispatch/journey/parser.rb#8 +class ActionDispatch::Journey::Parser include ::ActionDispatch::Journey::Nodes # @return [Parser] a new instance of Parser # - # source://actionpack/lib/action_dispatch/journey/parser_extras.rb#16 + # source://actionpack/lib/action_dispatch/journey/parser.rb#15 def initialize; end - # reduce 0 omitted - # - # source://actionpack/lib/action_dispatch/journey/parser.rb#137 - def _reduce_1(val, _values); end - - # source://actionpack/lib/action_dispatch/journey/parser.rb#165 - def _reduce_10(val, _values); end - - # reduce 14 omitted - # - # source://actionpack/lib/action_dispatch/journey/parser.rb#177 - def _reduce_15(val, _values); end - - # source://actionpack/lib/action_dispatch/journey/parser.rb#181 - def _reduce_16(val, _values); end + # source://actionpack/lib/action_dispatch/journey/parser.rb#20 + def parse(string); end - # source://actionpack/lib/action_dispatch/journey/parser.rb#185 - def _reduce_17(val, _values); end + private - # source://actionpack/lib/action_dispatch/journey/parser.rb#189 - def _reduce_18(val, _values); end + # source://actionpack/lib/action_dispatch/journey/parser.rb#27 + def advance_token; end - # source://actionpack/lib/action_dispatch/journey/parser.rb#141 - def _reduce_2(val, _values); end + # source://actionpack/lib/action_dispatch/journey/parser.rb#31 + def do_parse; end - # reduce 6 omitted - # - # source://actionpack/lib/action_dispatch/journey/parser.rb#153 - def _reduce_7(val, _values); end + # source://actionpack/lib/action_dispatch/journey/parser.rb#58 + def parse_expression; end - # source://actionpack/lib/action_dispatch/journey/parser.rb#157 - def _reduce_8(val, _values); end + # source://actionpack/lib/action_dispatch/journey/parser.rb#35 + def parse_expressions; end - # source://actionpack/lib/action_dispatch/journey/parser.rb#161 - def _reduce_9(val, _values); end + # source://actionpack/lib/action_dispatch/journey/parser.rb#74 + def parse_group; end - # source://actionpack/lib/action_dispatch/journey/parser.rb#193 - def _reduce_none(val, _values); end + # source://actionpack/lib/action_dispatch/journey/parser.rb#52 + def parse_or(lhs); end - # source://actionpack/lib/action_dispatch/journey/parser_extras.rb#25 - def next_token; end + # source://actionpack/lib/action_dispatch/journey/parser.rb#68 + def parse_star; end - # source://actionpack/lib/action_dispatch/journey/parser_extras.rb#20 - def parse(string); end + # source://actionpack/lib/action_dispatch/journey/parser.rb#86 + def parse_terminal; end class << self - # source://actionpack/lib/action_dispatch/journey/parser_extras.rb#12 + # source://actionpack/lib/action_dispatch/journey/parser.rb#11 def parse(string); end end end -# source://actionpack/lib/action_dispatch/journey/parser.rb#92 -ActionDispatch::Journey::Parser::Racc_arg = T.let(T.unsafe(nil), Array) - -# source://actionpack/lib/action_dispatch/journey/parser.rb#131 -ActionDispatch::Journey::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) - -# source://actionpack/lib/action_dispatch/journey/parser.rb#108 -ActionDispatch::Journey::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) - -# source://actionpack/lib/action_dispatch/journey/path/pattern.rb#5 +# source://actionpack/lib/action_dispatch/journey/path/pattern.rb#7 module ActionDispatch::Journey::Path; end -# source://actionpack/lib/action_dispatch/journey/path/pattern.rb#6 +# source://actionpack/lib/action_dispatch/journey/path/pattern.rb#8 class ActionDispatch::Journey::Path::Pattern # @return [Pattern] a new instance of Pattern # - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#9 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#11 def initialize(ast, requirements, separators, anchored); end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#156 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#159 def =~(other); end # Returns the value of attribute anchored. # - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#7 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#9 def anchored; end # Returns the value of attribute ast. # - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#7 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#9 def ast; end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#23 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#25 def build_formatter; end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#27 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#29 def eager_load!; end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#156 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#159 def match(other); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#162 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#165 def match?(other); end # Returns the value of attribute names. # - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#7 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#9 def names; end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#59 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#62 def optional_names; end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#55 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#58 def required_names; end # Returns the value of attribute requirements. # - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#7 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#9 def requirements; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#34 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#36 def requirements_anchored?; end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#174 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#177 def requirements_for_missing_keys_check; end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#166 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#169 def source; end # Returns the value of attribute spec. # - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#7 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#9 def spec; end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#170 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#173 def to_regexp; end private - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#185 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#188 def offsets; end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#181 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#184 def regexp_visitor; end end -# source://actionpack/lib/action_dispatch/journey/path/pattern.rb#65 +# source://actionpack/lib/action_dispatch/journey/path/pattern.rb#68 class ActionDispatch::Journey::Path::Pattern::AnchoredRegexp < ::ActionDispatch::Journey::Visitors::Visitor # @return [AnchoredRegexp] a new instance of AnchoredRegexp # - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#66 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#69 def initialize(separator, matchers); end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#73 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#76 def accept(node); end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#77 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#80 def visit_CAT(node); end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#94 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#97 def visit_DOT(node); end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#90 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#93 def visit_GROUP(node); end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#94 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#97 def visit_LITERAL(node); end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#108 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#111 def visit_OR(node); end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#99 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#102 def visit_SLASH(node); end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#103 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#106 def visit_STAR(node); end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#81 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#84 def visit_SYMBOL(node); end end -# source://actionpack/lib/action_dispatch/journey/path/pattern.rb#121 +# source://actionpack/lib/action_dispatch/journey/path/pattern.rb#124 class ActionDispatch::Journey::Path::Pattern::MatchData # @return [MatchData] a new instance of MatchData # - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#124 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#127 def initialize(names, offsets, match); end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#138 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#141 def [](x); end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#130 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#133 def captures; end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#143 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#146 def length; end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#134 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#137 def named_captures; end # Returns the value of attribute names. # - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#122 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#125 def names; end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#147 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#150 def post_match; end - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#151 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#154 def to_s; end end -# source://actionpack/lib/action_dispatch/journey/path/pattern.rb#114 +# source://actionpack/lib/action_dispatch/journey/path/pattern.rb#117 class ActionDispatch::Journey::Path::Pattern::UnanchoredRegexp < ::ActionDispatch::Journey::Path::Pattern::AnchoredRegexp - # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#115 + # source://actionpack/lib/action_dispatch/journey/path/pattern.rb#118 def accept(node); end end -# source://actionpack/lib/action_dispatch/journey/route.rb#6 +# source://actionpack/lib/action_dispatch/journey/route.rb#8 class ActionDispatch::Journey::Route # +path+ is a path constraint. - # +constraints+ is a hash of constraints to be applied to this route. + # `constraints` is a hash of constraints to be applied to this route. # # @return [Route] a new instance of Route # - # source://actionpack/lib/action_dispatch/journey/route.rb#56 + # source://actionpack/lib/action_dispatch/journey/route.rb#58 def initialize(name:, path:, app: T.unsafe(nil), constraints: T.unsafe(nil), required_defaults: T.unsafe(nil), defaults: T.unsafe(nil), request_method_match: T.unsafe(nil), precedence: T.unsafe(nil), scope_options: T.unsafe(nil), internal: T.unsafe(nil), source_location: T.unsafe(nil)); end # Returns the value of attribute app. # - # source://actionpack/lib/action_dispatch/journey/route.rb#7 + # source://actionpack/lib/action_dispatch/journey/route.rb#9 def app; end # Returns the value of attribute ast. # - # source://actionpack/lib/action_dispatch/journey/route.rb#7 + # source://actionpack/lib/action_dispatch/journey/route.rb#9 def ast; end # Returns the value of attribute constraints. # - # source://actionpack/lib/action_dispatch/journey/route.rb#7 + # source://actionpack/lib/action_dispatch/journey/route.rb#9 def conditions; end # Returns the value of attribute constraints. # - # source://actionpack/lib/action_dispatch/journey/route.rb#7 + # source://actionpack/lib/action_dispatch/journey/route.rb#9 def constraints; end # Returns the value of attribute defaults. # - # source://actionpack/lib/action_dispatch/journey/route.rb#7 + # source://actionpack/lib/action_dispatch/journey/route.rb#9 def defaults; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/route.rb#142 + # source://actionpack/lib/action_dispatch/journey/route.rb#144 def dispatcher?; end - # source://actionpack/lib/action_dispatch/journey/route.rb#78 + # source://actionpack/lib/action_dispatch/journey/route.rb#80 def eager_load!; end - # source://actionpack/lib/action_dispatch/journey/route.rb#120 + # source://actionpack/lib/action_dispatch/journey/route.rb#122 def format(path_options); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/route.rb#138 + # source://actionpack/lib/action_dispatch/journey/route.rb#140 def glob?; end # Returns the value of attribute internal. # - # source://actionpack/lib/action_dispatch/journey/route.rb#7 + # source://actionpack/lib/action_dispatch/journey/route.rb#9 def internal; end - # source://actionpack/lib/action_dispatch/journey/route.rb#164 + # source://actionpack/lib/action_dispatch/journey/route.rb#166 def ip; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/route.rb#146 + # source://actionpack/lib/action_dispatch/journey/route.rb#148 def matches?(request); end # Returns the value of attribute name. # - # source://actionpack/lib/action_dispatch/journey/route.rb#7 + # source://actionpack/lib/action_dispatch/journey/route.rb#9 def name; end - # source://actionpack/lib/action_dispatch/journey/route.rb#115 + # source://actionpack/lib/action_dispatch/journey/route.rb#117 def parts; end # Returns the value of attribute path. # - # source://actionpack/lib/action_dispatch/journey/route.rb#7 + # source://actionpack/lib/action_dispatch/journey/route.rb#9 def path; end # Returns the value of attribute precedence. # - # source://actionpack/lib/action_dispatch/journey/route.rb#7 + # source://actionpack/lib/action_dispatch/journey/route.rb#9 def precedence; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/route.rb#128 + # source://actionpack/lib/action_dispatch/journey/route.rb#130 def required_default?(key); end - # source://actionpack/lib/action_dispatch/journey/route.rb#132 + # source://actionpack/lib/action_dispatch/journey/route.rb#134 def required_defaults; end - # source://actionpack/lib/action_dispatch/journey/route.rb#103 + # source://actionpack/lib/action_dispatch/journey/route.rb#105 def required_keys; end - # source://actionpack/lib/action_dispatch/journey/route.rb#124 + # source://actionpack/lib/action_dispatch/journey/route.rb#126 def required_parts; end - # Needed for `bin/rails routes`. Picks up succinctly defined requirements - # for a route, for example route + # Needed for `bin/rails routes`. Picks up succinctly defined requirements for a + # route, for example route # - # get 'photo/:id', :controller => 'photos', :action => 'show', - # :id => /[A-Z]\d{5}/ + # get 'photo/:id', :controller => 'photos', :action => 'show', + # :id => /[A-Z]\d{5}/ # - # will have {:controller=>"photos", :action=>"show", :id=>/[A-Z]\d{5}/} - # as requirements. + # will have {:controller=>"photos", :action=>"show", :[id=>/](A-Z){5}/} as + # requirements. # - # source://actionpack/lib/action_dispatch/journey/route.rb#93 + # source://actionpack/lib/action_dispatch/journey/route.rb#95 def requirements; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/route.rb#168 + # source://actionpack/lib/action_dispatch/journey/route.rb#170 def requires_matching_verb?; end # Returns the value of attribute scope_options. # - # source://actionpack/lib/action_dispatch/journey/route.rb#7 + # source://actionpack/lib/action_dispatch/journey/route.rb#9 def scope_options; end - # source://actionpack/lib/action_dispatch/journey/route.rb#107 + # source://actionpack/lib/action_dispatch/journey/route.rb#109 def score(supplied_keys); end - # source://actionpack/lib/action_dispatch/journey/route.rb#115 + # source://actionpack/lib/action_dispatch/journey/route.rb#117 def segment_keys; end - # source://actionpack/lib/action_dispatch/journey/route.rb#99 + # source://actionpack/lib/action_dispatch/journey/route.rb#101 def segments; end # Returns the value of attribute source_location. # - # source://actionpack/lib/action_dispatch/journey/route.rb#7 + # source://actionpack/lib/action_dispatch/journey/route.rb#9 def source_location; end - # source://actionpack/lib/action_dispatch/journey/route.rb#172 + # source://actionpack/lib/action_dispatch/journey/route.rb#174 def verb; end private - # source://actionpack/lib/action_dispatch/journey/route.rb#181 + # source://actionpack/lib/action_dispatch/journey/route.rb#183 def match_verb(request); end - # source://actionpack/lib/action_dispatch/journey/route.rb#177 + # source://actionpack/lib/action_dispatch/journey/route.rb#179 def verbs; end class << self - # source://actionpack/lib/action_dispatch/journey/route.rb#47 + # source://actionpack/lib/action_dispatch/journey/route.rb#49 def verb_matcher(verb); end end end -# source://actionpack/lib/action_dispatch/journey/route.rb#12 +# source://actionpack/lib/action_dispatch/journey/route.rb#14 module ActionDispatch::Journey::Route::VerbMatchers; end -# source://actionpack/lib/action_dispatch/journey/route.rb#34 +# source://actionpack/lib/action_dispatch/journey/route.rb#36 class ActionDispatch::Journey::Route::VerbMatchers::All class << self - # source://actionpack/lib/action_dispatch/journey/route.rb#35 + # source://actionpack/lib/action_dispatch/journey/route.rb#37 def call(_); end - # source://actionpack/lib/action_dispatch/journey/route.rb#36 + # source://actionpack/lib/action_dispatch/journey/route.rb#38 def verb; end end end -# source://actionpack/lib/action_dispatch/journey/route.rb#17 +# source://actionpack/lib/action_dispatch/journey/route.rb#19 class ActionDispatch::Journey::Route::VerbMatchers::DELETE class << self - # source://actionpack/lib/action_dispatch/journey/route.rb#19 + # source://actionpack/lib/action_dispatch/journey/route.rb#21 def call(req); end - # source://actionpack/lib/action_dispatch/journey/route.rb#18 + # source://actionpack/lib/action_dispatch/journey/route.rb#20 def verb; end end end -# source://actionpack/lib/action_dispatch/journey/route.rb#17 +# source://actionpack/lib/action_dispatch/journey/route.rb#19 class ActionDispatch::Journey::Route::VerbMatchers::GET class << self - # source://actionpack/lib/action_dispatch/journey/route.rb#19 + # source://actionpack/lib/action_dispatch/journey/route.rb#21 def call(req); end - # source://actionpack/lib/action_dispatch/journey/route.rb#18 + # source://actionpack/lib/action_dispatch/journey/route.rb#20 def verb; end end end -# source://actionpack/lib/action_dispatch/journey/route.rb#17 +# source://actionpack/lib/action_dispatch/journey/route.rb#19 class ActionDispatch::Journey::Route::VerbMatchers::HEAD class << self - # source://actionpack/lib/action_dispatch/journey/route.rb#19 + # source://actionpack/lib/action_dispatch/journey/route.rb#21 def call(req); end - # source://actionpack/lib/action_dispatch/journey/route.rb#18 + # source://actionpack/lib/action_dispatch/journey/route.rb#20 def verb; end end end -# source://actionpack/lib/action_dispatch/journey/route.rb#17 +# source://actionpack/lib/action_dispatch/journey/route.rb#19 class ActionDispatch::Journey::Route::VerbMatchers::LINK class << self - # source://actionpack/lib/action_dispatch/journey/route.rb#19 + # source://actionpack/lib/action_dispatch/journey/route.rb#21 def call(req); end - # source://actionpack/lib/action_dispatch/journey/route.rb#18 + # source://actionpack/lib/action_dispatch/journey/route.rb#20 def verb; end end end -# source://actionpack/lib/action_dispatch/journey/route.rb#17 +# source://actionpack/lib/action_dispatch/journey/route.rb#19 class ActionDispatch::Journey::Route::VerbMatchers::OPTIONS class << self - # source://actionpack/lib/action_dispatch/journey/route.rb#19 + # source://actionpack/lib/action_dispatch/journey/route.rb#21 def call(req); end - # source://actionpack/lib/action_dispatch/journey/route.rb#18 + # source://actionpack/lib/action_dispatch/journey/route.rb#20 def verb; end end end -# source://actionpack/lib/action_dispatch/journey/route.rb#17 +# source://actionpack/lib/action_dispatch/journey/route.rb#19 class ActionDispatch::Journey::Route::VerbMatchers::PATCH class << self - # source://actionpack/lib/action_dispatch/journey/route.rb#19 + # source://actionpack/lib/action_dispatch/journey/route.rb#21 def call(req); end - # source://actionpack/lib/action_dispatch/journey/route.rb#18 + # source://actionpack/lib/action_dispatch/journey/route.rb#20 def verb; end end end -# source://actionpack/lib/action_dispatch/journey/route.rb#17 +# source://actionpack/lib/action_dispatch/journey/route.rb#19 class ActionDispatch::Journey::Route::VerbMatchers::POST class << self - # source://actionpack/lib/action_dispatch/journey/route.rb#19 + # source://actionpack/lib/action_dispatch/journey/route.rb#21 def call(req); end - # source://actionpack/lib/action_dispatch/journey/route.rb#18 + # source://actionpack/lib/action_dispatch/journey/route.rb#20 def verb; end end end -# source://actionpack/lib/action_dispatch/journey/route.rb#17 +# source://actionpack/lib/action_dispatch/journey/route.rb#19 class ActionDispatch::Journey::Route::VerbMatchers::PUT class << self - # source://actionpack/lib/action_dispatch/journey/route.rb#19 + # source://actionpack/lib/action_dispatch/journey/route.rb#21 def call(req); end - # source://actionpack/lib/action_dispatch/journey/route.rb#18 + # source://actionpack/lib/action_dispatch/journey/route.rb#20 def verb; end end end -# source://actionpack/lib/action_dispatch/journey/route.rb#17 +# source://actionpack/lib/action_dispatch/journey/route.rb#19 class ActionDispatch::Journey::Route::VerbMatchers::TRACE class << self - # source://actionpack/lib/action_dispatch/journey/route.rb#19 + # source://actionpack/lib/action_dispatch/journey/route.rb#21 def call(req); end - # source://actionpack/lib/action_dispatch/journey/route.rb#18 + # source://actionpack/lib/action_dispatch/journey/route.rb#20 def verb; end end end -# source://actionpack/lib/action_dispatch/journey/route.rb#17 +# source://actionpack/lib/action_dispatch/journey/route.rb#19 class ActionDispatch::Journey::Route::VerbMatchers::UNLINK class << self - # source://actionpack/lib/action_dispatch/journey/route.rb#19 + # source://actionpack/lib/action_dispatch/journey/route.rb#21 def call(req); end - # source://actionpack/lib/action_dispatch/journey/route.rb#18 + # source://actionpack/lib/action_dispatch/journey/route.rb#20 def verb; end end end -# source://actionpack/lib/action_dispatch/journey/route.rb#24 +# source://actionpack/lib/action_dispatch/journey/route.rb#26 class ActionDispatch::Journey::Route::VerbMatchers::Unknown # @return [Unknown] a new instance of Unknown # - # source://actionpack/lib/action_dispatch/journey/route.rb#27 + # source://actionpack/lib/action_dispatch/journey/route.rb#29 def initialize(verb); end - # source://actionpack/lib/action_dispatch/journey/route.rb#31 + # source://actionpack/lib/action_dispatch/journey/route.rb#33 def call(request); end # Returns the value of attribute verb. # - # source://actionpack/lib/action_dispatch/journey/route.rb#25 + # source://actionpack/lib/action_dispatch/journey/route.rb#27 def verb; end end -# source://actionpack/lib/action_dispatch/journey/route.rb#13 +# source://actionpack/lib/action_dispatch/journey/route.rb#15 ActionDispatch::Journey::Route::VerbMatchers::VERBS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/journey/route.rb#39 +# source://actionpack/lib/action_dispatch/journey/route.rb#41 ActionDispatch::Journey::Route::VerbMatchers::VERB_TO_CLASS = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#5 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#7 class ActionDispatch::Journey::Router # @return [Router] a new instance of Router # - # source://actionpack/lib/action_dispatch/journey/router.rb#20 + # source://actionpack/lib/action_dispatch/journey/router.rb#22 def initialize(routes); end - # source://actionpack/lib/action_dispatch/journey/router.rb#24 + # source://actionpack/lib/action_dispatch/journey/router.rb#26 def eager_load!; end - # source://actionpack/lib/action_dispatch/journey/router.rb#66 + # source://actionpack/lib/action_dispatch/journey/router.rb#68 def recognize(rails_req); end # Returns the value of attribute routes. # - # source://actionpack/lib/action_dispatch/journey/router.rb#18 + # source://actionpack/lib/action_dispatch/journey/router.rb#20 def routes; end # Sets the attribute routes # # @param value the value to set the attribute routes to. # - # source://actionpack/lib/action_dispatch/journey/router.rb#18 + # source://actionpack/lib/action_dispatch/journey/router.rb#20 def routes=(_arg0); end - # source://actionpack/lib/action_dispatch/journey/router.rb#31 + # source://actionpack/lib/action_dispatch/journey/router.rb#33 def serve(req); end - # source://actionpack/lib/action_dispatch/journey/router.rb#79 + # source://actionpack/lib/action_dispatch/journey/router.rb#81 def visualizer; end private - # source://actionpack/lib/action_dispatch/journey/router.rb#93 + # source://actionpack/lib/action_dispatch/journey/router.rb#95 def ast; end - # source://actionpack/lib/action_dispatch/journey/router.rb#101 + # source://actionpack/lib/action_dispatch/journey/router.rb#103 def custom_routes; end - # source://actionpack/lib/action_dispatch/journey/router.rb#105 + # source://actionpack/lib/action_dispatch/journey/router.rb#107 def filter_routes(path); end - # source://actionpack/lib/action_dispatch/journey/router.rb#110 + # source://actionpack/lib/action_dispatch/journey/router.rb#112 def find_routes(req); end - # source://actionpack/lib/action_dispatch/journey/router.rb#135 + # source://actionpack/lib/action_dispatch/journey/router.rb#137 def match_head_routes(routes, req); end - # source://actionpack/lib/action_dispatch/journey/router.rb#87 + # source://actionpack/lib/action_dispatch/journey/router.rb#89 def partitioned_routes; end - # source://actionpack/lib/action_dispatch/journey/router.rb#97 + # source://actionpack/lib/action_dispatch/journey/router.rb#99 def simulator; end end -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#6 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#8 class ActionDispatch::Journey::Router::Utils class << self - # source://actionpack/lib/action_dispatch/journey/router/utils.rb#90 + # source://actionpack/lib/action_dispatch/journey/router/utils.rb#91 def escape_fragment(fragment); end - # source://actionpack/lib/action_dispatch/journey/router/utils.rb#82 + # source://actionpack/lib/action_dispatch/journey/router/utils.rb#83 def escape_path(path); end - # source://actionpack/lib/action_dispatch/journey/router/utils.rb#86 + # source://actionpack/lib/action_dispatch/journey/router/utils.rb#87 def escape_segment(segment); end # Normalizes URI path. # - # Strips off trailing slash and ensures there is a leading slash. - # Also converts downcase URL encoded string to uppercase. + # Strips off trailing slash and ensures there is a leading slash. Also converts + # downcase URL encoded string to uppercase. # - # normalize_path("/foo") # => "/foo" - # normalize_path("/foo/") # => "/foo" - # normalize_path("foo") # => "/foo" - # normalize_path("") # => "/" - # normalize_path("/%ab") # => "/%AB" + # normalize_path("/foo") # => "/foo" + # normalize_path("/foo/") # => "/foo" + # normalize_path("foo") # => "/foo" + # normalize_path("") # => "/" + # normalize_path("/%ab") # => "/%AB" # - # source://actionpack/lib/action_dispatch/journey/router/utils.rb#17 + # source://actionpack/lib/action_dispatch/journey/router/utils.rb#19 def normalize_path(path); end # Replaces any escaped sequences with their unescaped representations. # - # uri = "/topics?title=Ruby%20on%20Rails" - # unescape_uri(uri) #=> "/topics?title=Ruby on Rails" + # uri = "/topics?title=Ruby%20on%20Rails" + # unescape_uri(uri) #=> "/topics?title=Ruby on Rails" # - # source://actionpack/lib/action_dispatch/journey/router/utils.rb#98 + # source://actionpack/lib/action_dispatch/journey/router/utils.rb#99 def unescape_uri(uri); end end end -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#80 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#81 ActionDispatch::Journey::Router::Utils::ENCODER = T.let(T.unsafe(nil), ActionDispatch::Journey::Router::Utils::UriEncoder) -# URI path and fragment escaping -# https://tools.ietf.org/html/rfc3986 +# URI path and fragment escaping https://tools.ietf.org/html/rfc3986 # -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#33 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#34 class ActionDispatch::Journey::Router::Utils::UriEncoder - # source://actionpack/lib/action_dispatch/journey/router/utils.rb#51 + # source://actionpack/lib/action_dispatch/journey/router/utils.rb#52 def escape_fragment(fragment); end - # source://actionpack/lib/action_dispatch/journey/router/utils.rb#55 + # source://actionpack/lib/action_dispatch/journey/router/utils.rb#56 def escape_path(path); end - # source://actionpack/lib/action_dispatch/journey/router/utils.rb#59 + # source://actionpack/lib/action_dispatch/journey/router/utils.rb#60 def escape_segment(segment); end - # source://actionpack/lib/action_dispatch/journey/router/utils.rb#63 + # source://actionpack/lib/action_dispatch/journey/router/utils.rb#64 def unescape_uri(uri); end private - # source://actionpack/lib/action_dispatch/journey/router/utils.rb#69 + # source://actionpack/lib/action_dispatch/journey/router/utils.rb#70 def escape(component, pattern); end - # source://actionpack/lib/action_dispatch/journey/router/utils.rb#73 + # source://actionpack/lib/action_dispatch/journey/router/utils.rb#74 def percent_encode(unsafe); end end -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#40 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#41 ActionDispatch::Journey::Router::Utils::UriEncoder::ALPHA = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#38 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#39 ActionDispatch::Journey::Router::Utils::UriEncoder::DEC2HEX = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#41 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#42 ActionDispatch::Journey::Router::Utils::UriEncoder::DIGIT = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#37 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#38 ActionDispatch::Journey::Router::Utils::UriEncoder::EMPTY = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#34 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#35 ActionDispatch::Journey::Router::Utils::UriEncoder::ENCODE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#45 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#46 ActionDispatch::Journey::Router::Utils::UriEncoder::ESCAPED = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#47 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#48 ActionDispatch::Journey::Router::Utils::UriEncoder::FRAGMENT = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#49 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#50 ActionDispatch::Journey::Router::Utils::UriEncoder::PATH = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#48 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#49 ActionDispatch::Journey::Router::Utils::UriEncoder::SEGMENT = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#43 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#44 ActionDispatch::Journey::Router::Utils::UriEncoder::SUB_DELIMS = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#42 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#43 ActionDispatch::Journey::Router::Utils::UriEncoder::UNRESERVED = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#35 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#36 ActionDispatch::Journey::Router::Utils::UriEncoder::US_ASCII = T.let(T.unsafe(nil), Encoding) -# source://actionpack/lib/action_dispatch/journey/router/utils.rb#36 +# source://actionpack/lib/action_dispatch/journey/router/utils.rb#37 ActionDispatch::Journey::Router::Utils::UriEncoder::UTF_8 = T.let(T.unsafe(nil), Encoding) -# The Routing table. Contains all routes for a system. Routes can be -# added to the table by calling Routes#add_route. +# The Routing table. Contains all routes for a system. Routes can be added to +# the table by calling Routes#add_route. # -# source://actionpack/lib/action_dispatch/journey/routes.rb#7 +# source://actionpack/lib/action_dispatch/journey/routes.rb#9 class ActionDispatch::Journey::Routes include ::Enumerable # @return [Routes] a new instance of Routes # - # source://actionpack/lib/action_dispatch/journey/routes.rb#12 + # source://actionpack/lib/action_dispatch/journey/routes.rb#14 def initialize(routes = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/journey/routes.rb#65 + # source://actionpack/lib/action_dispatch/journey/routes.rb#67 def add_route(name, mapping); end # Returns the value of attribute anchored_routes. # - # source://actionpack/lib/action_dispatch/journey/routes.rb#10 + # source://actionpack/lib/action_dispatch/journey/routes.rb#12 def anchored_routes; end - # source://actionpack/lib/action_dispatch/journey/routes.rb#51 + # source://actionpack/lib/action_dispatch/journey/routes.rb#53 def ast; end - # source://actionpack/lib/action_dispatch/journey/routes.rb#37 + # source://actionpack/lib/action_dispatch/journey/routes.rb#39 def clear; end # Returns the value of attribute custom_routes. # - # source://actionpack/lib/action_dispatch/journey/routes.rb#10 + # source://actionpack/lib/action_dispatch/journey/routes.rb#12 def custom_routes; end - # source://actionpack/lib/action_dispatch/journey/routes.rb#33 + # source://actionpack/lib/action_dispatch/journey/routes.rb#35 def each(&block); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/journey/routes.rb#20 + # source://actionpack/lib/action_dispatch/journey/routes.rb#22 def empty?; end - # source://actionpack/lib/action_dispatch/journey/routes.rb#29 + # source://actionpack/lib/action_dispatch/journey/routes.rb#31 def last; end - # source://actionpack/lib/action_dispatch/journey/routes.rb#24 + # source://actionpack/lib/action_dispatch/journey/routes.rb#26 def length; end - # source://actionpack/lib/action_dispatch/journey/routes.rb#43 + # source://actionpack/lib/action_dispatch/journey/routes.rb#45 def partition_route(route); end # Returns the value of attribute routes. # - # source://actionpack/lib/action_dispatch/journey/routes.rb#10 + # source://actionpack/lib/action_dispatch/journey/routes.rb#12 def routes; end - # source://actionpack/lib/action_dispatch/journey/routes.rb#58 + # source://actionpack/lib/action_dispatch/journey/routes.rb#60 def simulator; end - # source://actionpack/lib/action_dispatch/journey/routes.rb#24 + # source://actionpack/lib/action_dispatch/journey/routes.rb#26 def size; end private - # source://actionpack/lib/action_dispatch/journey/routes.rb#74 + # source://actionpack/lib/action_dispatch/journey/routes.rb#76 def clear_cache!; end end -# source://actionpack/lib/action_dispatch/journey/scanner.rb#7 +# source://actionpack/lib/action_dispatch/journey/scanner.rb#9 class ActionDispatch::Journey::Scanner # @return [Scanner] a new instance of Scanner # - # source://actionpack/lib/action_dispatch/journey/scanner.rb#8 + # source://actionpack/lib/action_dispatch/journey/scanner.rb#28 def initialize; end - # @return [Boolean] - # - # source://actionpack/lib/action_dispatch/journey/scanner.rb#16 - def eos?; end - - # source://actionpack/lib/action_dispatch/journey/scanner.rb#28 - def next_token; end + # source://actionpack/lib/action_dispatch/journey/scanner.rb#48 + def last_literal; end - # source://actionpack/lib/action_dispatch/journey/scanner.rb#20 - def pos; end + # source://actionpack/lib/action_dispatch/journey/scanner.rb#44 + def last_string; end - # source://actionpack/lib/action_dispatch/journey/scanner.rb#24 - def pre_match; end + # source://actionpack/lib/action_dispatch/journey/scanner.rb#37 + def next_token; end - # source://actionpack/lib/action_dispatch/journey/scanner.rb#12 + # source://actionpack/lib/action_dispatch/journey/scanner.rb#33 def scan_setup(str); end private - # takes advantage of String @- deduping capabilities in Ruby 2.5 upwards - # see: https://bugs.ruby-lang.org/issues/13077 - # - # source://actionpack/lib/action_dispatch/journey/scanner.rb#38 - def dedup_scan(regex); end - - # source://actionpack/lib/action_dispatch/journey/scanner.rb#43 + # source://actionpack/lib/action_dispatch/journey/scanner.rb#55 def scan; end end -# source://actionpack/lib/action_dispatch/journey/visitors.rb#53 +# source://actionpack/lib/action_dispatch/journey/scanner.rb#10 +ActionDispatch::Journey::Scanner::STATIC_TOKENS = T.let(T.unsafe(nil), Array) + +# source://actionpack/lib/action_dispatch/journey/scanner.rb#20 +class ActionDispatch::Journey::Scanner::Scanner < ::StringScanner + # source://actionpack/lib/action_dispatch/journey/scanner.rb#22 + def peek_byte; end +end + +# source://actionpack/lib/action_dispatch/journey/visitors.rb#55 module ActionDispatch::Journey::Visitors; end -# source://actionpack/lib/action_dispatch/journey/visitors.rb#194 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#196 class ActionDispatch::Journey::Visitors::Dot < ::ActionDispatch::Journey::Visitors::FunctionalVisitor # @return [Dot] a new instance of Dot # - # source://actionpack/lib/action_dispatch/journey/visitors.rb#195 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#197 def initialize; end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#200 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#202 def accept(node, seed = T.unsafe(nil)); end private - # source://actionpack/lib/action_dispatch/journey/visitors.rb#215 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#217 def binary(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#222 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#224 def nary(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#254 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#256 def terminal(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#229 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#231 def unary(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#239 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#241 def visit_CAT(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#234 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#236 def visit_GROUP(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#249 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#251 def visit_OR(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#244 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#246 def visit_STAR(node, seed); end end -# source://actionpack/lib/action_dispatch/journey/visitors.rb#260 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#262 ActionDispatch::Journey::Visitors::Dot::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::Dot) # Loop through the requirements AST. # -# source://actionpack/lib/action_dispatch/journey/visitors.rb#159 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#161 class ActionDispatch::Journey::Visitors::Each < ::ActionDispatch::Journey::Visitors::FunctionalVisitor - # source://actionpack/lib/action_dispatch/journey/visitors.rb#160 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#162 def visit(node, block); end end -# source://actionpack/lib/action_dispatch/journey/visitors.rb#165 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#167 ActionDispatch::Journey::Visitors::Each::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::Each) -# source://actionpack/lib/action_dispatch/journey/visitors.rb#134 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#136 class ActionDispatch::Journey::Visitors::FormatBuilder < ::ActionDispatch::Journey::Visitors::Visitor - # source://actionpack/lib/action_dispatch/journey/visitors.rb#135 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#137 def accept(node); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#138 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#140 def binary(node); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#136 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#138 def terminal(node); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#142 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#144 def visit_GROUP(n); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#144 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#146 def visit_STAR(n); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#148 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#150 def visit_SYMBOL(n); end end -# source://actionpack/lib/action_dispatch/journey/visitors.rb#95 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#97 class ActionDispatch::Journey::Visitors::FunctionalVisitor - # source://actionpack/lib/action_dispatch/journey/visitors.rb#98 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#100 def accept(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#106 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#108 def binary(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#111 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#113 def nary(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#122 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#124 def terminal(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#116 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#118 def unary(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#102 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#104 def visit(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#109 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#111 def visit_CAT(n, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#126 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#128 def visit_DOT(n, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#119 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#121 def visit_GROUP(n, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#123 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#125 def visit_LITERAL(n, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#114 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#116 def visit_OR(n, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#125 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#127 def visit_SLASH(n, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#120 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#122 def visit_STAR(n, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#124 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#126 def visit_SYMBOL(n, seed); end end -# source://actionpack/lib/action_dispatch/journey/visitors.rb#96 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#98 ActionDispatch::Journey::Visitors::FunctionalVisitor::DISPATCH_CACHE = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/journey/visitors.rb#168 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#170 class ActionDispatch::Journey::Visitors::String < ::ActionDispatch::Journey::Visitors::FunctionalVisitor private - # source://actionpack/lib/action_dispatch/journey/visitors.rb#170 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#172 def binary(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#174 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#176 def nary(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#183 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#185 def terminal(node, seed); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#187 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#189 def visit_GROUP(node, seed); end end -# source://actionpack/lib/action_dispatch/journey/visitors.rb#191 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#193 ActionDispatch::Journey::Visitors::String::INSTANCE = T.let(T.unsafe(nil), ActionDispatch::Journey::Visitors::String) -# source://actionpack/lib/action_dispatch/journey/visitors.rb#54 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#56 class ActionDispatch::Journey::Visitors::Visitor - # source://actionpack/lib/action_dispatch/journey/visitors.rb#57 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#59 def accept(node); end private - # source://actionpack/lib/action_dispatch/journey/visitors.rb#66 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#68 def binary(node); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#72 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#74 def nary(node); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#83 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#85 def terminal(node); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#77 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#79 def unary(node); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#62 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#64 def visit(node); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#70 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#72 def visit_CAT(n); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#87 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#89 def visit_DOT(n); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#80 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#82 def visit_GROUP(n); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#84 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#86 def visit_LITERAL(n); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#75 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#77 def visit_OR(n); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#86 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#88 def visit_SLASH(n); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#81 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#83 def visit_STAR(n); end - # source://actionpack/lib/action_dispatch/journey/visitors.rb#85 + # source://actionpack/lib/action_dispatch/journey/visitors.rb#87 def visit_SYMBOL(n); end end -# source://actionpack/lib/action_dispatch/journey/visitors.rb#55 +# source://actionpack/lib/action_dispatch/journey/visitors.rb#57 ActionDispatch::Journey::Visitors::Visitor::DISPATCH_CACHE = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/log_subscriber.rb#4 +# source://actionpack/lib/action_dispatch/log_subscriber.rb#6 class ActionDispatch::LogSubscriber < ::ActiveSupport::LogSubscriber - # source://actionpack/lib/action_dispatch/log_subscriber.rb#5 + # source://actionpack/lib/action_dispatch/log_subscriber.rb#7 def redirect(event); end class << self - # source://activesupport/7.1.3.3lib/active_support/log_subscriber.rb#87 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def log_levels; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end end end -# = Action Dispatch \MiddlewareStack +# # Action Dispatch MiddlewareStack # -# Read more about {Rails middleware -# stack}[https://guides.rubyonrails.org/rails_on_rack.html#action-dispatcher-middleware-stack] +# Read more about [Rails middleware +# stack](https://guides.rubyonrails.org/rails_on_rack.html#action-dispatcher-middleware-stack) # in the guides. # -# source://actionpack/lib/action_dispatch/middleware/stack.rb#12 +# source://actionpack/lib/action_dispatch/middleware/stack.rb#14 class ActionDispatch::MiddlewareStack include ::Enumerable @@ -13779,520 +14376,513 @@ class ActionDispatch::MiddlewareStack # @yield [_self] # @yieldparam _self [ActionDispatch::MiddlewareStack] the object that the method was called on # - # source://actionpack/lib/action_dispatch/middleware/stack.rb#75 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#76 def initialize(*args); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#92 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#93 def [](i); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#165 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#166 def build(app = T.unsafe(nil), &block); end # Deletes a middleware from the middleware stack. # - # Returns the array of middlewares not including the deleted item, or - # returns nil if the target is not found. + # Returns the array of middlewares not including the deleted item, or returns + # nil if the target is not found. # - # source://actionpack/lib/action_dispatch/middleware/stack.rb#130 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#131 def delete(target); end # Deletes a middleware from the middleware stack. # - # Returns the array of middlewares not including the deleted item, or - # raises +RuntimeError+ if the target is not found. + # Returns the array of middlewares not including the deleted item, or raises + # `RuntimeError` if the target is not found. # - # source://actionpack/lib/action_dispatch/middleware/stack.rb#138 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#139 def delete!(target); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#80 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#81 def each(&block); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#105 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#106 def insert(index, klass, *args, **_arg3, &block); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#113 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#114 def insert_after(index, *args, **_arg2, &block); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#105 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#106 def insert_before(index, klass, *args, **_arg3, &block); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#88 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#89 def last; end # Returns the value of attribute middlewares. # - # source://actionpack/lib/action_dispatch/middleware/stack.rb#73 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#74 def middlewares; end # Sets the attribute middlewares # # @param value the value to set the attribute middlewares to. # - # source://actionpack/lib/action_dispatch/middleware/stack.rb#73 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#74 def middlewares=(_arg0); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#142 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#143 def move(target, source); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#152 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#153 def move_after(target, source); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#142 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#143 def move_before(target, source); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#84 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#85 def size; end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#119 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#120 def swap(target, *args, **_arg2, &block); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#96 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#97 def unshift(klass, *args, **_arg2, &block); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#160 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#161 def use(klass, *args, **_arg2, &block); end private - # source://actionpack/lib/action_dispatch/middleware/stack.rb#177 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#178 def assert_index(index, where); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#183 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#184 def build_middleware(klass, args, block); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#187 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#188 def index_of(klass); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#101 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#102 def initialize_copy(other); end end -# This class is used to instrument the execution of a single middleware. -# It proxies the +call+ method transparently and instruments the method -# call. +# This class is used to instrument the execution of a single middleware. It +# proxies the `call` method transparently and instruments the method call. # -# source://actionpack/lib/action_dispatch/middleware/stack.rb#53 +# source://actionpack/lib/action_dispatch/middleware/stack.rb#54 class ActionDispatch::MiddlewareStack::InstrumentationProxy # @return [InstrumentationProxy] a new instance of InstrumentationProxy # - # source://actionpack/lib/action_dispatch/middleware/stack.rb#56 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#57 def initialize(middleware, class_name); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#64 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#65 def call(env); end end -# source://actionpack/lib/action_dispatch/middleware/stack.rb#54 +# source://actionpack/lib/action_dispatch/middleware/stack.rb#55 ActionDispatch::MiddlewareStack::InstrumentationProxy::EVENT_NAME = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/middleware/stack.rb#13 +# source://actionpack/lib/action_dispatch/middleware/stack.rb#15 class ActionDispatch::MiddlewareStack::Middleware # @return [Middleware] a new instance of Middleware # - # source://actionpack/lib/action_dispatch/middleware/stack.rb#16 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#18 def initialize(klass, args, block); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#24 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#26 def ==(middleware); end # Returns the value of attribute args. # - # source://actionpack/lib/action_dispatch/middleware/stack.rb#14 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#16 def args; end # Returns the value of attribute block. # - # source://actionpack/lib/action_dispatch/middleware/stack.rb#14 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#16 def block; end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#41 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#43 def build(app); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#45 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#47 def build_instrumented(app); end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#33 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#35 def inspect; end # Returns the value of attribute klass. # - # source://actionpack/lib/action_dispatch/middleware/stack.rb#14 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#16 def klass; end - # source://actionpack/lib/action_dispatch/middleware/stack.rb#22 + # source://actionpack/lib/action_dispatch/middleware/stack.rb#24 def name; end end -# source://actionpack/lib/action_dispatch.rb#56 +# source://actionpack/lib/action_dispatch.rb#50 class ActionDispatch::MissingController < ::NameError; end -# = Action Dispatch \PermissionsPolicy +# # Action Dispatch PermissionsPolicy # # Configures the HTTP -# {Feature-Policy}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy] -# response header to specify which browser features the current document and -# its iframes can use. +# [Feature-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy) +# response header to specify which browser features the current +# document and its iframes can use. # # Example global policy: # -# Rails.application.config.permissions_policy do |policy| -# policy.camera :none -# policy.gyroscope :none -# policy.microphone :none -# policy.usb :none -# policy.fullscreen :self -# policy.payment :self, "https://secure.example.com" -# end -# -# The Feature-Policy header has been renamed to Permissions-Policy. -# The Permissions-Policy requires a different implementation and isn't -# yet supported by all browsers. To avoid having to rename this -# middleware in the future we use the new name for the middleware but -# keep the old header name and implementation for now. -# -# source://actionpack/lib/action_dispatch/http/permissions_policy.rb#29 +# Rails.application.config.permissions_policy do |policy| +# policy.camera :none +# policy.gyroscope :none +# policy.microphone :none +# policy.usb :none +# policy.fullscreen :self +# policy.payment :self, "https://secure.example.com" +# end +# +# The Feature-Policy header has been renamed to Permissions-Policy. The +# Permissions-Policy requires a different implementation and isn't yet supported +# by all browsers. To avoid having to rename this middleware in the future we +# use the new name for the middleware but keep the old header name and +# implementation for now. +# +# source://actionpack/lib/action_dispatch/http/permissions_policy.rb#31 class ActionDispatch::PermissionsPolicy # @return [PermissionsPolicy] a new instance of PermissionsPolicy # @yield [_self] # @yieldparam _self [ActionDispatch::PermissionsPolicy] the object that the method was called on # - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#116 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#113 def initialize; end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def accelerometer(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def ambient_light_sensor(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def autoplay(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#154 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#132 def build(context = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def camera(*sources); end # Returns the value of attribute directives. # - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#114 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#111 def directives; end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 + def display_capture(*sources); end + + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def encrypted_media(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def fullscreen(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def geolocation(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def gyroscope(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def hid(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def idle_detection(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 + def keyboard_map(*sources); end + + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def magnetometer(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def microphone(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def midi(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def payment(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def picture_in_picture(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def screen_wake_lock(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def serial(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#136 - def speaker(*sources); end - - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def sync_xhr(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def usb(*sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#136 - def vibrate(*sources); end - - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#136 - def vr(*sources); end - - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#123 def web_share(*sources); end private - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#172 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#150 def apply_mapping(source); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#159 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#137 def apply_mappings(sources); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#190 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#168 def build_directive(sources, context); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#178 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#156 def build_directives(context); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#121 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#118 def initialize_copy(other); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#194 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#172 def resolve_source(source, context); end end # List of available permissions can be found at # https://github.com/w3c/webappsec-permissions-policy/blob/main/features.md#policy-controlled-features # -# source://actionpack/lib/action_dispatch/http/permissions_policy.rb#89 +# source://actionpack/lib/action_dispatch/http/permissions_policy.rb#84 ActionDispatch::PermissionsPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/http/permissions_policy.rb#82 +# source://actionpack/lib/action_dispatch/http/permissions_policy.rb#77 ActionDispatch::PermissionsPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/http/permissions_policy.rb#30 +# source://actionpack/lib/action_dispatch/http/permissions_policy.rb#32 class ActionDispatch::PermissionsPolicy::Middleware # @return [Middleware] a new instance of Middleware # - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#31 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#33 def initialize(app); end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#35 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#37 def call(env); end private # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#55 - def html_response?(headers); end - - # @return [Boolean] - # - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#65 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#60 def policy_empty?(policy); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#61 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#56 def policy_present?(headers); end end -# source://actionpack/lib/action_dispatch/http/permissions_policy.rb#70 +# source://actionpack/lib/action_dispatch/http/permissions_policy.rb#65 module ActionDispatch::PermissionsPolicy::Request - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#73 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#68 def permissions_policy; end - # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#77 + # source://actionpack/lib/action_dispatch/http/permissions_policy.rb#72 def permissions_policy=(policy); end end -# source://actionpack/lib/action_dispatch/http/permissions_policy.rb#71 +# source://actionpack/lib/action_dispatch/http/permissions_policy.rb#66 ActionDispatch::PermissionsPolicy::Request::POLICY = T.let(T.unsafe(nil), String) -# = Action Dispatch \PublicExceptions +# # Action Dispatch PublicExceptions # # When called, this middleware renders an error page. By default if an HTML -# response is expected it will render static error pages from the /public +# response is expected it will render static error pages from the `/public` # directory. For example when this middleware receives a 500 response it will -# render the template found in /public/500.html. -# If an internationalized locale is set, this middleware will attempt to render -# the template in /public/500..html. If an internationalized template -# is not found it will fall back on /public/500.html. +# render the template found in `/public/500.html`. If an internationalized +# locale is set, this middleware will attempt to render the template in +# `/public/500..html`. If an internationalized template is not found it +# will fall back on `/public/500.html`. # # When a request with a content type other than HTML is made, this middleware # will attempt to convert error information into the appropriate response type. # -# source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#16 +# source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#18 class ActionDispatch::PublicExceptions # @return [PublicExceptions] a new instance of PublicExceptions # - # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#19 + # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#21 def initialize(public_path); end - # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#23 + # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#25 def call(env); end # Returns the value of attribute public_path. # - # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#17 + # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#19 def public_path; end # Sets the attribute public_path # # @param value the value to set the attribute public_path to. # - # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#17 + # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#19 def public_path=(_arg0); end private - # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#37 + # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#39 def render(status, content_type, body); end - # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#46 + # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#48 def render_format(status, content_type, body); end - # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#51 + # source://actionpack/lib/action_dispatch/middleware/public_exceptions.rb#53 def render_html(status); end end -# source://actionpack/lib/action_dispatch/railtie.rb#8 +# source://actionpack/lib/action_dispatch/railtie.rb#10 class ActionDispatch::Railtie < ::Rails::Railtie; end -# = Action Dispatch \Reloader +# # Action Dispatch Reloader # # ActionDispatch::Reloader wraps the request with callbacks provided by # ActiveSupport::Reloader, intended to assist with code reloading during # development. # -# ActionDispatch::Reloader is included in the middleware stack only if -# reloading is enabled, which it is by the default in +development+ mode. +# ActionDispatch::Reloader is included in the middleware stack only if reloading +# is enabled, which it is by the default in `development` mode. # -# source://actionpack/lib/action_dispatch/middleware/reloader.rb#12 +# source://actionpack/lib/action_dispatch/middleware/reloader.rb#14 class ActionDispatch::Reloader < ::ActionDispatch::Executor; end -# = Action Dispatch \RemoteIp -# -# This middleware calculates the IP address of the remote client that is -# making the request. It does this by checking various headers that could -# contain the address, and then picking the last-set address that is not -# on the list of trusted IPs. This follows the precedent set by e.g. -# {the Tomcat server}[https://issues.apache.org/bugzilla/show_bug.cgi?id=50453]. -# A more detailed explanation of the algorithm is given at GetIp#calculate_ip. -# -# Some Rack servers concatenate repeated headers, like {HTTP RFC 2616}[https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2] -# requires. Some Rack servers simply drop preceding headers, and only report -# the value that was {given in the last header}[https://andre.arko.net/2011/12/26/repeated-headers-and-ruby-web-servers]. -# If you are behind multiple proxy servers (like NGINX to HAProxy to Unicorn) -# then you should test your Rack server to make sure your data is good. -# -# IF YOU DON'T USE A PROXY, THIS MAKES YOU VULNERABLE TO IP SPOOFING. -# This middleware assumes that there is at least one proxy sitting around -# and setting headers with the client's remote IP address. If you don't use -# a proxy, because you are hosted on e.g. Heroku without SSL, any client can -# claim to have any IP address by setting the +X-Forwarded-For+ header. If you -# care about that, then you need to explicitly drop or ignore those headers -# sometime before this middleware runs. Alternatively, remove this middleware -# to avoid inadvertently relying on it. -# -# source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#29 +# # Action Dispatch RemoteIp +# +# This middleware calculates the IP address of the remote client that is making +# the request. It does this by checking various headers that could contain the +# address, and then picking the last-set address that is not on the list of +# trusted IPs. This follows the precedent set by e.g. [the Tomcat +# server](https://issues.apache.org/bugzilla/show_bug.cgi?id=50453). A more +# detailed explanation of the algorithm is given at GetIp#calculate_ip. +# +# Some Rack servers concatenate repeated headers, like [HTTP RFC +# 2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2) requires. +# Some Rack servers simply drop preceding headers, and only report the value +# that was [given in the last +# header](https://andre.arko.net/2011/12/26/repeated-headers-and-ruby-web-servers). +# If you are behind multiple proxy servers (like NGINX to HAProxy to +# Unicorn) then you should test your Rack server to make sure your data is good. +# +# IF YOU DON'T USE A PROXY, THIS MAKES YOU VULNERABLE TO IP SPOOFING. This +# middleware assumes that there is at least one proxy sitting around and setting +# headers with the client's remote IP address. If you don't use a proxy, because +# you are hosted on e.g. Heroku without SSL, any client can claim to have any IP +# address by setting the `X-Forwarded-For` header. If you care about that, then +# you need to explicitly drop or ignore those headers sometime before this +# middleware runs. Alternatively, remove this middleware to avoid inadvertently +# relying on it. +# +# source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#33 class ActionDispatch::RemoteIp - # Create a new +RemoteIp+ middleware instance. + # Create a new `RemoteIp` middleware instance. # - # The +ip_spoofing_check+ option is on by default. When on, an exception - # is raised if it looks like the client is trying to lie about its own IP - # address. It makes sense to turn off this check on sites aimed at non-IP - # clients (like WAP devices), or behind proxies that set headers in an - # incorrect or confusing way (like AWS ELB). + # The `ip_spoofing_check` option is on by default. When on, an exception is + # raised if it looks like the client is trying to lie about its own IP address. + # It makes sense to turn off this check on sites aimed at non-IP clients (like + # WAP devices), or behind proxies that set headers in an incorrect or confusing + # way (like AWS ELB). # - # The +custom_proxies+ argument can take an enumerable which will be used - # instead of +TRUSTED_PROXIES+. Any proxy setup will put the value you - # want in the middle (or at the beginning) of the +X-Forwarded-For+ list, - # with your proxy servers after it. If your proxies aren't removed, pass - # them in via the +custom_proxies+ parameter. That way, the middleware will - # ignore those IP addresses, and return the one that you want. + # The `custom_proxies` argument can take an enumerable which will be used + # instead of `TRUSTED_PROXIES`. Any proxy setup will put the value you want in + # the middle (or at the beginning) of the `X-Forwarded-For` list, with your + # proxy servers after it. If your proxies aren't removed, pass them in via the + # `custom_proxies` parameter. That way, the middleware will ignore those IP + # addresses, and return the one that you want. # # @return [RemoteIp] a new instance of RemoteIp # - # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#61 + # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#65 def initialize(app, ip_spoofing_check = T.unsafe(nil), custom_proxies = T.unsafe(nil)); end - # Since the IP address may not be needed, we store the object here - # without calculating the IP to keep from slowing down the majority of - # requests. For those requests that do need to know the IP, the - # GetIp#calculate_ip method will calculate the memoized client IP address. + # Since the IP address may not be needed, we store the object here without + # calculating the IP to keep from slowing down the majority of requests. For + # those requests that do need to know the IP, the GetIp#calculate_ip method will + # calculate the memoized client IP address. # - # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#89 + # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#93 def call(env); end # Returns the value of attribute check_ip. # - # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#45 + # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#49 def check_ip; end # Returns the value of attribute proxies. # - # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#45 + # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#49 def proxies; end end -# The GetIp class exists as a way to defer processing of the request data -# into an actual IP address. If the ActionDispatch::Request#remote_ip method -# is called, this class will calculate the value and then memoize it. +# The GetIp class exists as a way to defer processing of the request data into +# an actual IP address. If the ActionDispatch::Request#remote_ip method is +# called, this class will calculate the value and then memoize it. # -# source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#98 +# source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#102 class ActionDispatch::RemoteIp::GetIp # @return [GetIp] a new instance of GetIp # - # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#99 + # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#103 def initialize(req, check_ip, proxies); end - # Sort through the various IP address headers, looking for the IP most - # likely to be the address of the actual remote client making this - # request. + # Sort through the various IP address headers, looking for the IP most likely to + # be the address of the actual remote client making this request. # - # REMOTE_ADDR will be correct if the request is made directly against the - # Ruby process, on e.g. Heroku. When the request is proxied by another - # server like HAProxy or NGINX, the IP address that made the original - # request will be put in an +X-Forwarded-For+ header. If there are multiple - # proxies, that header may contain a list of IPs. Other proxy services - # set the +Client-Ip+ header instead, so we check that too. + # REMOTE_ADDR will be correct if the request is made directly against the Ruby + # process, on e.g. Heroku. When the request is proxied by another server like + # HAProxy or NGINX, the IP address that made the original request will be put in + # an `X-Forwarded-For` header. If there are multiple proxies, that header may + # contain a list of IPs. Other proxy services set the `Client-Ip` header + # instead, so we check that too. # - # As discussed in {this post about Rails IP Spoofing}[https://web.archive.org/web/20170626095448/https://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection/], - # while the first IP in the list is likely to be the "originating" IP, - # it could also have been set by the client maliciously. + # As discussed in [this post about Rails IP + # Spoofing](https://web.archive.org/web/20170626095448/https://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection/), + # while the first IP in the list is likely to be the "originating" IP, it + # could also have been set by the client maliciously. # - # In order to find the first address that is (probably) accurate, we - # take the list of IPs, remove known and trusted proxies, and then take - # the last address left, which was presumably set by one of those proxies. + # In order to find the first address that is (probably) accurate, we take the + # list of IPs, remove known and trusted proxies, and then take the last address + # left, which was presumably set by one of those proxies. # - # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#123 + # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#127 def calculate_ip; end # Memoizes the value returned by #calculate_ip and returns it for # ActionDispatch::Request to use. # - # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#167 + # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#171 def to_s; end private - # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#187 + # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#191 def filter_proxies(ips); end - # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#172 + # source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#176 def ips_from(header); end end -# source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#30 +# source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#34 class ActionDispatch::RemoteIp::IpSpoofAttackError < ::StandardError; end -# The default trusted IPs list simply includes IP addresses that are -# guaranteed by the IP specification to be private addresses. Those will -# not be the ultimate client IP in production, and so are discarded. See +# The default trusted IPs list simply includes IP addresses that are guaranteed +# by the IP specification to be private addresses. Those will not be the +# ultimate client IP in production, and so are discarded. See # https://en.wikipedia.org/wiki/Private_network for details. # -# source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#36 +# source://actionpack/lib/action_dispatch/middleware/remote_ip.rb#40 ActionDispatch::RemoteIp::TRUSTED_PROXIES = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/http/request.rb#18 +# source://actionpack/lib/action_dispatch/http/request.rb#20 class ActionDispatch::Request include ::ActionDispatch::Flash::RequestMethods include ::Rack::Request::Helpers @@ -14309,959 +14899,964 @@ class ActionDispatch::Request # @return [Request] a new instance of Request # - # source://actionpack/lib/action_dispatch/http/request.rb#60 + # source://actionpack/lib/action_dispatch/http/request.rb#64 def initialize(env); end # Override Rack's GET method to support indifferent access. # - # source://actionpack/lib/action_dispatch/http/request.rb#388 + # source://actionpack/lib/action_dispatch/http/request.rb#389 def GET; end # Override Rack's POST method to support indifferent access. # - # source://actionpack/lib/action_dispatch/http/request.rb#404 + # source://actionpack/lib/action_dispatch/http/request.rb#405 def POST; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def accept; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def accept_charset; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def accept_encoding; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def accept_language; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def auth_type; end - # Returns the authorization header regardless of whether it was specified directly or through one of the - # proxy alternatives. + # Returns the authorization header regardless of whether it was specified + # directly or through one of the proxy alternatives. # - # source://actionpack/lib/action_dispatch/http/request.rb#420 + # source://actionpack/lib/action_dispatch/http/request.rb#421 def authorization; end # The request body is an IO input stream. If the RAW_POST_DATA environment # variable is already set, wrap it in a StringIO. # - # source://actionpack/lib/action_dispatch/http/request.rb#349 + # source://actionpack/lib/action_dispatch/http/request.rb#351 def body; end - # source://actionpack/lib/action_dispatch/http/request.rb#370 + # source://actionpack/lib/action_dispatch/http/request.rb#371 def body_stream; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def cache_control; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def client_ip; end - # source://actionpack/lib/action_dispatch/http/request.rb#70 + # source://actionpack/lib/action_dispatch/http/request.rb#74 def commit_cookie_jar!; end - # source://actionpack/lib/action_dispatch/http/request.rb#452 + # source://actionpack/lib/action_dispatch/http/request.rb#453 def commit_csrf_token; end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#64 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#71 def commit_flash; end # Returns the content length of the request as an integer. # - # source://actionpack/lib/action_dispatch/http/request.rb#285 + # source://actionpack/lib/action_dispatch/http/request.rb#286 def content_length; end - # source://actionpack/lib/action_dispatch/http/request.rb#79 + # source://actionpack/lib/action_dispatch/http/request.rb#83 def controller_class; end - # source://actionpack/lib/action_dispatch/http/request.rb#85 + # source://actionpack/lib/action_dispatch/http/request.rb#89 def controller_class_for(name); end - # source://actionpack/lib/action_dispatch/http/request.rb#182 + # source://actionpack/lib/action_dispatch/http/request.rb#185 def controller_instance; end - # source://actionpack/lib/action_dispatch/http/request.rb#186 + # source://actionpack/lib/action_dispatch/http/request.rb#189 def controller_instance=(controller); end - # source://actionpack/lib/action_dispatch/http/request.rb#168 + # source://actionpack/lib/action_dispatch/http/request.rb#171 def engine_script_name(_routes); end - # source://actionpack/lib/action_dispatch/http/request.rb#172 + # source://actionpack/lib/action_dispatch/http/request.rb#175 def engine_script_name=(name); end - # Determine whether the request body contains form-data by checking - # the request +Content-Type+ for one of the media-types: - # +application/x-www-form-urlencoded+ or +multipart/form-data+. The - # list of form-data media types can be modified through the - # +FORM_DATA_MEDIA_TYPES+ array. + # Determine whether the request body contains form-data by checking the request + # `Content-Type` for one of the media-types: `application/x-www-form-urlencoded` + # or `multipart/form-data`. The list of form-data media types can be modified + # through the `FORM_DATA_MEDIA_TYPES` array. # - # A request body is not assumed to contain form-data when no - # +Content-Type+ header is provided and the request_method is POST. + # A request body is not assumed to contain form-data when no `Content-Type` + # header is provided and the request_method is POST. # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/request.rb#366 + # source://actionpack/lib/action_dispatch/http/request.rb#367 def form_data?; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def from; end - # Returns the +String+ full path including params of the last URL requested. + # Returns the `String` full path including params of the last URL requested. # - # # get "/articles" - # request.fullpath # => "/articles" + # # get "/articles" + # request.fullpath # => "/articles" # - # # get "/articles?page=2" - # request.fullpath # => "/articles?page=2" + # # get "/articles?page=2" + # request.fullpath # => "/articles?page=2" # - # source://actionpack/lib/action_dispatch/http/request.rb#264 + # source://actionpack/lib/action_dispatch/http/request.rb#265 def fullpath; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def gateway_interface; end # Provides access to the request's HTTP headers, for example: # - # request.headers["Content-Type"] # => "text/plain" + # request.headers["Content-Type"] # => "text/plain" # - # source://actionpack/lib/action_dispatch/http/request.rb#225 + # source://actionpack/lib/action_dispatch/http/request.rb#227 def headers; end - # source://actionpack/lib/action_dispatch/http/request.rb#190 + # source://actionpack/lib/action_dispatch/http/request.rb#193 def http_auth_salt; end - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#18 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#20 def ignore_accept_header; end - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#18 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#20 def ignore_accept_header=(val); end - # source://actionpack/lib/action_dispatch/http/request.rb#444 + # source://actionpack/lib/action_dispatch/http/request.rb#445 def inspect; end - # Returns the IP address of client as a +String+. + # Returns the IP address of client as a `String`. # - # source://actionpack/lib/action_dispatch/http/request.rb#299 + # source://actionpack/lib/action_dispatch/http/request.rb#300 def ip; end # Returns true if the request has a header matching the given key parameter. # - # request.key? :ip_spoofing_check # => true + # request.key? :ip_spoofing_check # => true # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/request.rb#106 + # source://actionpack/lib/action_dispatch/http/request.rb#110 def key?(key); end # True if the request came from localhost, 127.0.0.1, or ::1. # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/request.rb#428 + # source://actionpack/lib/action_dispatch/http/request.rb#429 def local?; end - # source://actionpack/lib/action_dispatch/http/request.rb#437 + # source://actionpack/lib/action_dispatch/http/request.rb#438 def logger; end - # The +String+ MIME type of the request. + # The `String` MIME type of the request. # - # # get "/articles" - # request.media_type # => "application/x-www-form-urlencoded" + # # get "/articles" + # request.media_type # => "application/x-www-form-urlencoded" # - # source://actionpack/lib/action_dispatch/http/request.rb#280 + # source://actionpack/lib/action_dispatch/http/request.rb#281 def media_type; end - # Returns the original value of the environment's REQUEST_METHOD, - # even if it was overridden by middleware. See #request_method for - # more information. + # Returns the original value of the environment's REQUEST_METHOD, even if it was + # overridden by middleware. See #request_method for more information. # - # For debugging purposes, when called with arguments this method will - # fall back to Object#method + # For debugging purposes, when called with arguments this method will fall back + # to Object#method # - # source://actionpack/lib/action_dispatch/http/request.rb#205 + # source://actionpack/lib/action_dispatch/http/request.rb#207 def method(*args, **_arg1); end # Returns a symbol form of the #method. # - # source://actionpack/lib/action_dispatch/http/request.rb#218 + # source://actionpack/lib/action_dispatch/http/request.rb#220 def method_symbol; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def negotiate; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def origin; end - # Returns a +String+ with the last requested path including their params. + # Returns a `String` with the last requested path including their params. # - # # get '/foo' - # request.original_fullpath # => '/foo' + # # get '/foo' + # request.original_fullpath # => '/foo' # - # # get '/foo?bar' - # request.original_fullpath # => '/foo?bar' + # # get '/foo?bar' + # request.original_fullpath # => '/foo?bar' # - # source://actionpack/lib/action_dispatch/http/request.rb#253 + # source://actionpack/lib/action_dispatch/http/request.rb#254 def original_fullpath; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def original_script_name; end - # Returns the original request URL as a +String+. + # Returns the original request URL as a `String`. # - # # get "/articles?page=2" - # request.original_url # => "http://www.example.com/articles?page=2" + # # get "/articles?page=2" + # request.original_url # => "http://www.example.com/articles?page=2" # - # source://actionpack/lib/action_dispatch/http/request.rb#272 + # source://actionpack/lib/action_dispatch/http/request.rb#273 def original_url; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def path_translated; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def pragma; end # Override Rack's GET method to support indifferent access. # - # source://actionpack/lib/action_dispatch/http/request.rb#388 + # source://actionpack/lib/action_dispatch/http/request.rb#389 def query_parameters; end - # Read the request \body. This is useful for web services that need to - # work with raw requests directly. + # Read the request body. This is useful for web services that need to work with + # raw requests directly. # - # source://actionpack/lib/action_dispatch/http/request.rb#339 + # source://actionpack/lib/action_dispatch/http/request.rb#342 def raw_post; end - # source://rack/3.0.11lib/rack/request.rb#197 + # source://rack/3.1.7lib/rack/request.rb#197 def raw_request_method; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def remote_addr; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def remote_host; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def remote_ident; end - # Returns the IP address of client as a +String+, - # usually set by the RemoteIp middleware. + # Returns the IP address of client as a `String`, usually set by the RemoteIp + # middleware. # - # source://actionpack/lib/action_dispatch/http/request.rb#305 + # source://actionpack/lib/action_dispatch/http/request.rb#306 def remote_ip; end - # source://actionpack/lib/action_dispatch/http/request.rb#309 + # source://actionpack/lib/action_dispatch/http/request.rb#310 def remote_ip=(remote_ip); end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def remote_user; 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). + # 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. + # 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. # - # source://actionpack/lib/action_dispatch/http/request.rb#322 + # source://actionpack/lib/action_dispatch/http/request.rb#325 def request_id; end - # source://actionpack/lib/action_dispatch/http/request.rb#326 + # source://actionpack/lib/action_dispatch/http/request.rb#329 def request_id=(id); end - # Returns the HTTP \method that the application should see. - # In the case where the \method was overridden by a middleware - # (for instance, if a HEAD request was converted to a GET, - # or if a _method parameter was used to determine the \method - # the application should use), this \method returns the overridden - # value, not the original. + # Returns the HTTP method that the application should see. In the case where the + # method was overridden by a middleware (for instance, if a HEAD request was + # converted to a GET, or if a _method parameter was used to determine the method + # the application should use), this method returns the overridden value, not the + # original. # - # source://actionpack/lib/action_dispatch/http/request.rb#144 + # source://actionpack/lib/action_dispatch/http/request.rb#147 def request_method; end - # source://actionpack/lib/action_dispatch/http/request.rb#176 + # source://actionpack/lib/action_dispatch/http/request.rb#179 def request_method=(request_method); end # Returns a symbol form of the #request_method. # - # source://actionpack/lib/action_dispatch/http/request.rb#195 + # source://actionpack/lib/action_dispatch/http/request.rb#198 def request_method_symbol; end # Override Rack's POST method to support indifferent access. # - # source://actionpack/lib/action_dispatch/http/request.rb#404 + # source://actionpack/lib/action_dispatch/http/request.rb#405 def request_parameters; end - # source://actionpack/lib/action_dispatch/http/request.rb#432 + # source://actionpack/lib/action_dispatch/http/request.rb#433 def request_parameters=(params); end - # source://actionpack/lib/action_dispatch/http/request.rb#448 + # source://actionpack/lib/action_dispatch/http/request.rb#449 def reset_csrf_token; end - # source://actionpack/lib/action_dispatch/middleware/flash.rb#77 + # source://actionpack/lib/action_dispatch/middleware/flash.rb#84 def reset_session; end - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#27 - def return_only_media_type_on_content_type; end - - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#20 - def return_only_media_type_on_content_type=(value); end - - # Returns the URI pattern of the matched route for the request, - # using the same format as `bin/rails routes`: + # Returns the URI pattern of the matched route for the request, using the same + # format as `bin/rails routes`: # - # request.route_uri_pattern # => "/:controller(/:action(/:id))(.:format)" + # request.route_uri_pattern # => "/:controller(/:action(/:id))(.:format)" # - # source://actionpack/lib/action_dispatch/http/request.rb#152 + # source://actionpack/lib/action_dispatch/http/request.rb#155 def route_uri_pattern; end - # source://actionpack/lib/action_dispatch/http/request.rb#156 + # source://actionpack/lib/action_dispatch/http/request.rb#159 def route_uri_pattern=(pattern); end - # source://actionpack/lib/action_dispatch/http/request.rb#160 + # source://actionpack/lib/action_dispatch/http/request.rb#163 def routes; end - # source://actionpack/lib/action_dispatch/http/request.rb#164 + # source://actionpack/lib/action_dispatch/http/request.rb#167 def routes=(routes); end - # Early Hints is an HTTP/2 status code that indicates hints to help a client start - # making preparations for processing the final response. + # Early Hints is an HTTP/2 status code that indicates hints to help a client + # start making preparations for processing the final response. # - # If the env contains +rack.early_hints+ then the server accepts HTTP2 push for Link headers. + # If the env contains `rack.early_hints` then the server accepts HTTP2 push for + # link headers. # - # The +send_early_hints+ method accepts a hash of links as follows: + # The `send_early_hints` method accepts a hash of links as follows: # - # send_early_hints("Link" => "; rel=preload; as=style\n; rel=preload") + # send_early_hints("link" => "; rel=preload; as=style,; rel=preload") # - # If you are using +javascript_include_tag+ or +stylesheet_link_tag+ the - # Early Hints headers are included by default if supported. + # If you are using `javascript_include_tag` or `stylesheet_link_tag` the Early + # Hints headers are included by default if supported. # - # source://actionpack/lib/action_dispatch/http/request.rb#240 + # source://actionpack/lib/action_dispatch/http/request.rb#243 def send_early_hints(links); end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def server_name; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def server_protocol; end # Returns the lowercase name of the HTTP server software. # - # source://actionpack/lib/action_dispatch/http/request.rb#333 + # source://actionpack/lib/action_dispatch/http/request.rb#336 def server_software; end - # source://actionpack/lib/action_dispatch/http/request.rb#379 + # source://actionpack/lib/action_dispatch/http/request.rb#380 def session=(session); end - # source://actionpack/lib/action_dispatch/http/request.rb#383 + # source://actionpack/lib/action_dispatch/http/request.rb#384 def session_options=(options); 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). + # 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. + # 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. # - # source://actionpack/lib/action_dispatch/http/request.rb#322 + # source://actionpack/lib/action_dispatch/http/request.rb#325 def uuid; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def version; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def x_csrf_token; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def x_forwarded_for; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def x_forwarded_host; end - # source://actionpack/lib/action_dispatch/http/request.rb#50 + # source://actionpack/lib/action_dispatch/http/request.rb#52 def x_request_id; end - # Returns true if the +X-Requested-With+ header contains "XMLHttpRequest" + # Returns true if the `X-Requested-With` header contains "XMLHttpRequest" # (case-insensitive), which may need to be manually added depending on the # choice of JavaScript libraries and frameworks. # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/request.rb#293 + # source://actionpack/lib/action_dispatch/http/request.rb#294 def xhr?; end - # Returns true if the +X-Requested-With+ header contains "XMLHttpRequest" + # Returns true if the `X-Requested-With` header contains "XMLHttpRequest" # (case-insensitive), which may need to be manually added depending on the # choice of JavaScript libraries and frameworks. # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/request.rb#293 + # source://actionpack/lib/action_dispatch/http/request.rb#294 def xml_http_request?; end private - # source://actionpack/lib/action_dispatch/http/request.rb#457 + # source://actionpack/lib/action_dispatch/http/request.rb#458 def check_method(name); end - # source://actionpack/lib/action_dispatch/http/request.rb#465 + # source://actionpack/lib/action_dispatch/http/request.rb#466 def default_session; end - # source://actionpack/lib/action_dispatch/http/request.rb#469 + # source://actionpack/lib/action_dispatch/http/request.rb#470 def read_body_stream; end + # source://actionpack/lib/action_dispatch/http/request.rb#482 + def reset_stream(body_stream); end + class << self - # source://actionpack/lib/action_dispatch/http/request.rb#56 + # source://actionpack/lib/action_dispatch/http/request.rb#60 def empty; end - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#18 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#20 def ignore_accept_header; end - # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#18 + # source://actionpack/lib/action_dispatch/http/mime_negotiation.rb#20 def ignore_accept_header=(val); end - # source://actionpack/lib/action_dispatch/http/parameters.rb#28 + # source://actionpack/lib/action_dispatch/http/parameters.rb#30 def parameter_parsers; end end end -# source://actionpack/lib/action_dispatch/http/request.rb#314 +# source://actionpack/lib/action_dispatch/http/request.rb#315 ActionDispatch::Request::ACTION_DISPATCH_REQUEST_ID = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/request.rb#34 +# source://actionpack/lib/action_dispatch/http/request.rb#36 ActionDispatch::Request::ENV_METHODS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/http/request.rb#127 +# source://actionpack/lib/action_dispatch/http/request.rb#131 ActionDispatch::Request::HTTP_METHODS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/http/request.rb#129 +# source://actionpack/lib/action_dispatch/http/request.rb#133 ActionDispatch::Request::HTTP_METHOD_LOOKUP = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/http/request.rb#32 +# source://actionpack/lib/action_dispatch/http/request.rb#34 ActionDispatch::Request::LOCALHOST = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/http/request.rb#73 +# source://actionpack/lib/action_dispatch/http/request.rb#77 class ActionDispatch::Request::PASS_NOT_FOUND class << self - # source://actionpack/lib/action_dispatch/http/request.rb#74 + # source://actionpack/lib/action_dispatch/http/request.rb#78 def action(_); end - # source://actionpack/lib/action_dispatch/http/request.rb#76 + # source://actionpack/lib/action_dispatch/http/request.rb#80 def action_encoding_template(action); end - # source://actionpack/lib/action_dispatch/http/request.rb#75 + # source://actionpack/lib/action_dispatch/http/request.rb#79 def call(_); end end end -# HTTP methods from {RFC 2518: HTTP Extensions for Distributed Authoring -- WEBDAV}[https://www.ietf.org/rfc/rfc2518.txt] +# HTTP methods from [RFC 2518: HTTP Extensions for Distributed Authoring -- WEBDAV](https://www.ietf.org/rfc/rfc2518.txt) # -# source://actionpack/lib/action_dispatch/http/request.rb#113 +# source://actionpack/lib/action_dispatch/http/request.rb#117 ActionDispatch::Request::RFC2518 = T.let(T.unsafe(nil), Array) -# HTTP methods from {RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1}[https://www.ietf.org/rfc/rfc2616.txt] +# HTTP methods from [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1](https://www.ietf.org/rfc/rfc2616.txt) # -# source://actionpack/lib/action_dispatch/http/request.rb#111 +# source://actionpack/lib/action_dispatch/http/request.rb#115 ActionDispatch::Request::RFC2616 = T.let(T.unsafe(nil), Array) -# HTTP methods from {RFC 3253: Versioning Extensions to WebDAV}[https://www.ietf.org/rfc/rfc3253.txt] +# HTTP methods from [RFC 3253: Versioning Extensions to WebDAV](https://www.ietf.org/rfc/rfc3253.txt) # -# source://actionpack/lib/action_dispatch/http/request.rb#115 +# source://actionpack/lib/action_dispatch/http/request.rb#119 ActionDispatch::Request::RFC3253 = T.let(T.unsafe(nil), Array) -# HTTP methods from {RFC 3648: WebDAV Ordered Collections Protocol}[https://www.ietf.org/rfc/rfc3648.txt] +# HTTP methods from [RFC 3648: WebDAV Ordered Collections Protocol](https://www.ietf.org/rfc/rfc3648.txt) # -# source://actionpack/lib/action_dispatch/http/request.rb#117 +# source://actionpack/lib/action_dispatch/http/request.rb#121 ActionDispatch::Request::RFC3648 = T.let(T.unsafe(nil), Array) -# HTTP methods from {RFC 3744: WebDAV Access Control Protocol}[https://www.ietf.org/rfc/rfc3744.txt] +# HTTP methods from [RFC 3744: WebDAV Access Control Protocol](https://www.ietf.org/rfc/rfc3744.txt) # -# source://actionpack/lib/action_dispatch/http/request.rb#119 +# source://actionpack/lib/action_dispatch/http/request.rb#123 ActionDispatch::Request::RFC3744 = T.let(T.unsafe(nil), Array) -# HTTP methods from {RFC 4791: Calendaring Extensions to WebDAV}[https://www.ietf.org/rfc/rfc4791.txt] +# HTTP methods from [RFC 4791: Calendaring Extensions to WebDAV](https://www.ietf.org/rfc/rfc4791.txt) # -# source://actionpack/lib/action_dispatch/http/request.rb#123 +# source://actionpack/lib/action_dispatch/http/request.rb#127 ActionDispatch::Request::RFC4791 = T.let(T.unsafe(nil), Array) -# HTTP methods from {RFC 5323: WebDAV SEARCH}[https://www.ietf.org/rfc/rfc5323.txt] +# HTTP methods from [RFC 5323: WebDAV SEARCH](https://www.ietf.org/rfc/rfc5323.txt) # -# source://actionpack/lib/action_dispatch/http/request.rb#121 +# source://actionpack/lib/action_dispatch/http/request.rb#125 ActionDispatch::Request::RFC5323 = T.let(T.unsafe(nil), Array) -# HTTP methods from {RFC 5789: PATCH Method for HTTP}[https://www.ietf.org/rfc/rfc5789.txt] +# HTTP methods from [RFC 5789: PATCH Method for HTTP](https://www.ietf.org/rfc/rfc5789.txt) # -# source://actionpack/lib/action_dispatch/http/request.rb#125 +# source://actionpack/lib/action_dispatch/http/request.rb#129 ActionDispatch::Request::RFC5789 = T.let(T.unsafe(nil), Array) # Session is responsible for lazily loading the session from store. # -# source://actionpack/lib/action_dispatch/request/session.rb#8 +# source://actionpack/lib/action_dispatch/request/session.rb#10 class ActionDispatch::Request::Session # @return [Session] a new instance of Session # - # source://actionpack/lib/action_dispatch/request/session.rb#74 + # source://actionpack/lib/action_dispatch/request/session.rb#76 def initialize(by, req, enabled: T.unsafe(nil)); end - # Returns value of the key stored in the session or - # +nil+ if the given key is not found in the session. + # Returns value of the key stored in the session or `nil` if the given key is + # not found in the session. # - # source://actionpack/lib/action_dispatch/request/session.rb#112 + # source://actionpack/lib/action_dispatch/request/session.rb#114 def [](key); end # Writes given value to given key of the session. # - # source://actionpack/lib/action_dispatch/request/session.rb#152 + # source://actionpack/lib/action_dispatch/request/session.rb#154 def []=(key, value); end # Clears the session. # - # source://actionpack/lib/action_dispatch/request/session.rb#158 + # source://actionpack/lib/action_dispatch/request/session.rb#160 def clear; end # Deletes given key from the session. # - # source://actionpack/lib/action_dispatch/request/session.rb#191 + # source://actionpack/lib/action_dispatch/request/session.rb#193 def delete(key); end - # source://actionpack/lib/action_dispatch/request/session.rb#97 + # source://actionpack/lib/action_dispatch/request/session.rb#99 def destroy; end - # Returns the nested value specified by the sequence of keys, returning - # +nil+ if any intermediate step is +nil+. + # Returns the nested value specified by the sequence of keys, returning `nil` if + # any intermediate step is `nil`. # - # source://actionpack/lib/action_dispatch/request/session.rb#125 + # source://actionpack/lib/action_dispatch/request/session.rb#127 def dig(*keys); end - # source://actionpack/lib/action_dispatch/request/session.rb#242 + # source://actionpack/lib/action_dispatch/request/session.rb#244 def each(&block); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/request/session.rb#237 + # source://actionpack/lib/action_dispatch/request/session.rb#239 def empty?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/request/session.rb#89 + # source://actionpack/lib/action_dispatch/request/session.rb#91 def enabled?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/request/session.rb#227 + # source://actionpack/lib/action_dispatch/request/session.rb#229 def exists?; end - # Returns value of the given key from the session, or raises +KeyError+ - # if can't find the given key and no default value is set. - # Returns default value if specified. + # Returns value of the given key from the session, or raises `KeyError` if can't + # find the given key and no default value is set. Returns default value if + # specified. # - # session.fetch(:foo) - # # => KeyError: key not found: "foo" + # session.fetch(:foo) + # # => KeyError: key not found: "foo" # - # session.fetch(:foo, :bar) - # # => :bar + # session.fetch(:foo, :bar) + # # => :bar # - # session.fetch(:foo) do - # :bar - # end - # # => :bar + # session.fetch(:foo) do + # :bar + # end + # # => :bar # - # source://actionpack/lib/action_dispatch/request/session.rb#210 + # source://actionpack/lib/action_dispatch/request/session.rb#212 def fetch(key, default = T.unsafe(nil), &block); end # Returns true if the session has the given key or false. # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/request/session.rb#132 + # source://actionpack/lib/action_dispatch/request/session.rb#134 def has_key?(key); end - # source://actionpack/lib/action_dispatch/request/session.rb#85 + # source://actionpack/lib/action_dispatch/request/session.rb#87 def id; end - # source://actionpack/lib/action_dispatch/request/session.rb#246 + # source://actionpack/lib/action_dispatch/request/session.rb#248 def id_was; end # Returns true if the session has the given key or false. # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/request/session.rb#132 + # source://actionpack/lib/action_dispatch/request/session.rb#134 def include?(key); end - # source://actionpack/lib/action_dispatch/request/session.rb#219 + # source://actionpack/lib/action_dispatch/request/session.rb#221 def inspect; end # Returns true if the session has the given key or false. # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/request/session.rb#132 + # source://actionpack/lib/action_dispatch/request/session.rb#134 def key?(key); end # Returns keys of the session as Array. # - # source://actionpack/lib/action_dispatch/request/session.rb#140 + # source://actionpack/lib/action_dispatch/request/session.rb#142 def keys; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/request/session.rb#233 + # source://actionpack/lib/action_dispatch/request/session.rb#235 def loaded?; end # Updates the session with given Hash. # - # session.to_hash - # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2"} + # session.to_hash + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2"} # - # session.update({ "foo" => "bar" }) - # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} + # session.update({ "foo" => "bar" }) + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} # - # session.to_hash - # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} + # session.to_hash + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} # - # source://actionpack/lib/action_dispatch/request/session.rb#180 + # source://actionpack/lib/action_dispatch/request/session.rb#182 def merge!(hash); end - # source://actionpack/lib/action_dispatch/request/session.rb#93 + # source://actionpack/lib/action_dispatch/request/session.rb#95 def options; end # Returns the session as Hash. # - # source://actionpack/lib/action_dispatch/request/session.rb#164 + # source://actionpack/lib/action_dispatch/request/session.rb#166 def to_h; end # Returns the session as Hash. # - # source://actionpack/lib/action_dispatch/request/session.rb#164 + # source://actionpack/lib/action_dispatch/request/session.rb#166 def to_hash; end # Updates the session with given Hash. # - # session.to_hash - # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2"} + # session.to_hash + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2"} # - # session.update({ "foo" => "bar" }) - # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} + # session.update({ "foo" => "bar" }) + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} # - # session.to_hash - # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} + # session.to_hash + # # => {"session_id"=>"e29b9ea315edf98aad94cc78c34cc9b2", "foo" => "bar"} # - # source://actionpack/lib/action_dispatch/request/session.rb#180 + # source://actionpack/lib/action_dispatch/request/session.rb#182 def update(hash); end # Returns values of the session as Array. # - # source://actionpack/lib/action_dispatch/request/session.rb#146 + # source://actionpack/lib/action_dispatch/request/session.rb#148 def values; end private - # source://actionpack/lib/action_dispatch/request/session.rb#268 + # source://actionpack/lib/action_dispatch/request/session.rb#270 def load!; end - # source://actionpack/lib/action_dispatch/request/session.rb#264 + # source://actionpack/lib/action_dispatch/request/session.rb#266 def load_for_delete!; end - # source://actionpack/lib/action_dispatch/request/session.rb#252 + # source://actionpack/lib/action_dispatch/request/session.rb#254 def load_for_read!; end - # source://actionpack/lib/action_dispatch/request/session.rb#256 + # source://actionpack/lib/action_dispatch/request/session.rb#258 def load_for_write!; end class << self # Creates a session hash, merging the properties of the previous session if any. # - # source://actionpack/lib/action_dispatch/request/session.rb#17 + # source://actionpack/lib/action_dispatch/request/session.rb#19 def create(store, req, default_options); end - # source://actionpack/lib/action_dispatch/request/session.rb#41 + # source://actionpack/lib/action_dispatch/request/session.rb#43 def delete(req); end - # source://actionpack/lib/action_dispatch/request/session.rb#27 + # source://actionpack/lib/action_dispatch/request/session.rb#29 def disabled(req); end - # source://actionpack/lib/action_dispatch/request/session.rb#33 + # source://actionpack/lib/action_dispatch/request/session.rb#35 def find(req); end - # source://actionpack/lib/action_dispatch/request/session.rb#37 + # source://actionpack/lib/action_dispatch/request/session.rb#39 def set(req, session); end end end -# source://actionpack/lib/action_dispatch/request/session.rb#9 +# source://actionpack/lib/action_dispatch/request/session.rb#11 class ActionDispatch::Request::Session::DisabledSessionError < ::StandardError; end -# source://actionpack/lib/action_dispatch/request/session.rb#10 +# source://actionpack/lib/action_dispatch/request/session.rb#12 ActionDispatch::Request::Session::ENV_SESSION_KEY = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/request/session.rb#11 +# source://actionpack/lib/action_dispatch/request/session.rb#13 ActionDispatch::Request::Session::ENV_SESSION_OPTIONS_KEY = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/request/session.rb#45 +# source://actionpack/lib/action_dispatch/request/session.rb#47 class ActionDispatch::Request::Session::Options # @return [Options] a new instance of Options # - # source://actionpack/lib/action_dispatch/request/session.rb#54 + # source://actionpack/lib/action_dispatch/request/session.rb#56 def initialize(by, default_options); end - # source://actionpack/lib/action_dispatch/request/session.rb#59 + # source://actionpack/lib/action_dispatch/request/session.rb#61 def [](key); end - # source://actionpack/lib/action_dispatch/request/session.rb#69 + # source://actionpack/lib/action_dispatch/request/session.rb#71 def []=(k, v); end - # source://actionpack/lib/action_dispatch/request/session.rb#63 + # source://actionpack/lib/action_dispatch/request/session.rb#65 def id(req); end - # source://actionpack/lib/action_dispatch/request/session.rb#70 + # source://actionpack/lib/action_dispatch/request/session.rb#72 def to_hash; end - # source://actionpack/lib/action_dispatch/request/session.rb#71 + # source://actionpack/lib/action_dispatch/request/session.rb#73 def values_at(*args); end class << self - # source://actionpack/lib/action_dispatch/request/session.rb#50 + # source://actionpack/lib/action_dispatch/request/session.rb#52 def find(req); end - # source://actionpack/lib/action_dispatch/request/session.rb#46 + # source://actionpack/lib/action_dispatch/request/session.rb#48 def set(req, options); end end end # Singleton object used to determine if an optional param wasn't specified. # -# source://actionpack/lib/action_dispatch/request/session.rb#14 +# source://actionpack/lib/action_dispatch/request/session.rb#16 ActionDispatch::Request::Session::Unspecified = T.let(T.unsafe(nil), Object) -# source://actionpack/lib/action_dispatch/request/utils.rb#7 +# source://actionpack/lib/action_dispatch/http/request.rb#58 +ActionDispatch::Request::TRANSFER_ENCODING = T.let(T.unsafe(nil), String) + +# source://actionpack/lib/action_dispatch/request/utils.rb#9 class ActionDispatch::Request::Utils - # source://actionpack/lib/action_dispatch/request/utils.rb#8 + # source://actionpack/lib/action_dispatch/request/utils.rb#10 def perform_deep_munge; end - # source://actionpack/lib/action_dispatch/request/utils.rb#8 + # source://actionpack/lib/action_dispatch/request/utils.rb#10 def perform_deep_munge=(val); end class << self - # source://actionpack/lib/action_dispatch/request/utils.rb#29 + # source://actionpack/lib/action_dispatch/request/utils.rb#31 def check_param_encoding(params); end - # source://actionpack/lib/action_dispatch/request/utils.rb#10 + # source://actionpack/lib/action_dispatch/request/utils.rb#12 def each_param_value(params, &block); end - # source://actionpack/lib/action_dispatch/request/utils.rb#21 + # source://actionpack/lib/action_dispatch/request/utils.rb#23 def normalize_encode_params(params); end - # source://actionpack/lib/action_dispatch/request/utils.rb#8 + # source://actionpack/lib/action_dispatch/request/utils.rb#10 def perform_deep_munge; end - # source://actionpack/lib/action_dispatch/request/utils.rb#8 + # source://actionpack/lib/action_dispatch/request/utils.rb#10 def perform_deep_munge=(val); end - # source://actionpack/lib/action_dispatch/request/utils.rb#44 + # source://actionpack/lib/action_dispatch/request/utils.rb#46 def set_binary_encoding(request, params, controller, action); end end end -# source://actionpack/lib/action_dispatch/request/utils.rb#83 +# source://actionpack/lib/action_dispatch/request/utils.rb#85 class ActionDispatch::Request::Utils::CustomParamEncoder class << self - # source://actionpack/lib/action_dispatch/request/utils.rb#99 + # source://actionpack/lib/action_dispatch/request/utils.rb#101 def action_encoding_template(request, controller, action); end - # source://actionpack/lib/action_dispatch/request/utils.rb#84 + # source://actionpack/lib/action_dispatch/request/utils.rb#86 def encode(request, params, controller, action); end end end # Remove nils from the params hash. # -# source://actionpack/lib/action_dispatch/request/utils.rb#75 +# source://actionpack/lib/action_dispatch/request/utils.rb#77 class ActionDispatch::Request::Utils::NoNilParamEncoder < ::ActionDispatch::Request::Utils::ParamEncoder class << self - # source://actionpack/lib/action_dispatch/request/utils.rb#76 + # source://actionpack/lib/action_dispatch/request/utils.rb#78 def handle_array(params); end end end -# source://actionpack/lib/action_dispatch/request/utils.rb#48 +# source://actionpack/lib/action_dispatch/request/utils.rb#50 class ActionDispatch::Request::Utils::ParamEncoder class << self - # source://actionpack/lib/action_dispatch/request/utils.rb#69 + # source://actionpack/lib/action_dispatch/request/utils.rb#71 def handle_array(params); end # Convert nested Hash to HashWithIndifferentAccess. # - # source://actionpack/lib/action_dispatch/request/utils.rb#50 + # source://actionpack/lib/action_dispatch/request/utils.rb#52 def normalize_encode_params(params); end end end -# source://actionpack/lib/action_dispatch/middleware/cookies.rb#10 +# source://actionpack/lib/action_dispatch/middleware/cookies.rb#12 module ActionDispatch::RequestCookieMethods - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#48 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#50 def authenticated_encrypted_cookie_salt; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#11 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#13 def cookie_jar; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#28 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#30 def cookie_jar=(jar); end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#76 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#78 def cookies_digest; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#80 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#82 def cookies_rotations; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#72 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#74 def cookies_same_site_protection; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#68 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#70 def cookies_serializer; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#56 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#58 def encrypted_cookie_cipher; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#40 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#42 def encrypted_cookie_salt; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#44 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#46 def encrypted_signed_cookie_salt; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#24 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#26 def have_cookie_jar?; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#32 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#34 def key_generator; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#64 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#66 def secret_key_base; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#60 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#62 def signed_cookie_digest; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#36 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#38 def signed_cookie_salt; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#52 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#54 def use_authenticated_cookie_encryption; end - # source://actionpack/lib/action_dispatch/middleware/cookies.rb#84 + # source://actionpack/lib/action_dispatch/middleware/cookies.rb#86 def use_cookies_with_metadata; end end -# source://actionpack/lib/action_dispatch/testing/request_encoder.rb#6 +# source://actionpack/lib/action_dispatch/testing/request_encoder.rb#8 class ActionDispatch::RequestEncoder # @return [RequestEncoder] a new instance of RequestEncoder # - # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#18 + # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#20 def initialize(mime_name, param_encoder, response_parser); end - # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#34 + # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#36 def accept_header; end - # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#30 + # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#32 def content_type; end - # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#38 + # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#40 def encode_params(params); end # Returns the value of attribute response_parser. # - # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#16 + # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#18 def response_parser; end class << self - # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#47 + # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#49 def encoder(name); end - # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#42 + # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#44 def parser(content_type); end - # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#51 + # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#53 def register_encoder(mime_name, param_encoder: T.unsafe(nil), response_parser: T.unsafe(nil)); end end end -# source://actionpack/lib/action_dispatch/testing/request_encoder.rb#7 +# source://actionpack/lib/action_dispatch/testing/request_encoder.rb#9 class ActionDispatch::RequestEncoder::IdentityEncoder - # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#9 + # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#11 def accept_header; end - # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#8 + # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#10 def content_type; end - # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#10 + # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#12 def encode_params(params); end - # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#11 + # source://actionpack/lib/action_dispatch/testing/request_encoder.rb#13 def response_parser; end end -# = Action Dispatch \RequestId +# # Action Dispatch RequestId # -# Makes a unique request id available to the +action_dispatch.request_id+ env variable (which is then accessible -# through ActionDispatch::Request#request_id or the alias ActionDispatch::Request#uuid) and sends -# the same id to the client via the +X-Request-Id+ header. +# Makes a unique request id available to the `action_dispatch.request_id` env +# variable (which is then accessible through ActionDispatch::Request#request_id +# or the alias ActionDispatch::Request#uuid) and sends the same id to the client +# via the `X-Request-Id` header. # -# The unique request id is either based on the +X-Request-Id+ header in the request, which would typically be generated -# by a firewall, load balancer, or the web server, or, if this header is not available, a random uuid. If the -# header is accepted from the outside world, we sanitize it to a max of 255 chars and alphanumeric and dashes only. +# The unique request id is either based on the `X-Request-Id` header in the +# request, which would typically be generated by a firewall, load balancer, or +# the web server, or, if this header is not available, a random uuid. If the +# header is accepted from the outside world, we sanitize it to a max of 255 +# chars and alphanumeric and dashes only. # -# The unique request id can be used to trace a request end-to-end and would typically end up being part of log files -# from multiple pieces of the stack. +# The unique request id can be used to trace a request end-to-end and would +# typically end up being part of log files from multiple pieces of the stack. # -# source://actionpack/lib/action_dispatch/middleware/request_id.rb#19 +# source://actionpack/lib/action_dispatch/middleware/request_id.rb#24 class ActionDispatch::RequestId # @return [RequestId] a new instance of RequestId # - # source://actionpack/lib/action_dispatch/middleware/request_id.rb#20 + # source://actionpack/lib/action_dispatch/middleware/request_id.rb#25 def initialize(app, header:); end - # source://actionpack/lib/action_dispatch/middleware/request_id.rb#25 + # source://actionpack/lib/action_dispatch/middleware/request_id.rb#31 def call(env); end private - # source://actionpack/lib/action_dispatch/middleware/request_id.rb#40 + # source://actionpack/lib/action_dispatch/middleware/request_id.rb#46 def internal_request_id; end - # source://actionpack/lib/action_dispatch/middleware/request_id.rb#32 + # source://actionpack/lib/action_dispatch/middleware/request_id.rb#38 def make_request_id(request_id); end end -# = Action Dispatch \Response +# # Action Dispatch Response # # Represents an HTTP response generated by a controller action. Use it to # retrieve the current state of the response, or customize the response. It can -# either represent a real HTTP response (i.e. one that is meant to be sent -# back to the web browser) or a TestResponse (i.e. one that is generated -# from integration tests). +# either represent a real HTTP response (i.e. one that is meant to be sent back +# to the web browser) or a TestResponse (i.e. one that is generated from +# integration tests). # -# The \Response object for the current request is exposed on controllers as -# ActionController::Metal#response. ActionController::Metal also provides a -# few additional methods that delegate to attributes of the \Response such as +# The Response object for the current request is exposed on controllers as +# ActionController::Metal#response. ActionController::Metal also provides a few +# additional methods that delegate to attributes of the Response such as # ActionController::Metal#headers. # -# Integration tests will likely also want to inspect responses in -# more detail. Methods such as Integration::RequestHelpers#get -# and Integration::RequestHelpers#post return instances of -# TestResponse (which inherits from \Response) for this purpose. +# Integration tests will likely also want to inspect responses in more detail. +# Methods such as Integration::RequestHelpers#get and +# Integration::RequestHelpers#post return instances of TestResponse (which +# inherits from Response) for this purpose. # # For example, the following demo integration test prints the body of the # controller response to the console: # -# class DemoControllerTest < ActionDispatch::IntegrationTest -# def test_print_root_path_to_console -# get('/') -# puts response.body -# end -# end +# class DemoControllerTest < ActionDispatch::IntegrationTest +# def test_print_root_path_to_console +# get('/') +# puts response.body +# end +# end # -# source://actionpack/lib/action_dispatch/http/response.rb#36 +# source://actionpack/lib/action_dispatch/http/response.rb#38 class ActionDispatch::Response include ::Rack::Response::Helpers include ::ActionDispatch::Http::FilterRedirect @@ -15272,378 +15867,378 @@ class ActionDispatch::Response # @yield [_self] # @yieldparam _self [ActionDispatch::Response] the object that the method was called on # - # source://actionpack/lib/action_dispatch/http/response.rb#169 + # source://actionpack/lib/action_dispatch/http/response.rb#171 def initialize(status = T.unsafe(nil), headers = T.unsafe(nil), body = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/http/response.rb#73 + # source://actionpack/lib/action_dispatch/http/response.rb#75 def [](*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_dispatch/http/response.rb#73 + # source://actionpack/lib/action_dispatch/http/response.rb#75 def []=(*_arg0, **_arg1, &_arg2); end # Aliasing these off because AD::Http::Cache::Response defines them. # - # source://rack/3.0.11lib/rack/response.rb#289 + # source://rack/3.1.7lib/rack/response.rb#290 def _cache_control; end - # source://rack/3.0.11lib/rack/response.rb#293 + # source://rack/3.1.7lib/rack/response.rb#294 def _cache_control=(value); end - # source://actionpack/lib/action_dispatch/http/response.rb#382 + # source://actionpack/lib/action_dispatch/http/response.rb#396 def abort; end - # source://actionpack/lib/action_dispatch/http/response.rb#195 + # source://actionpack/lib/action_dispatch/http/response.rb#197 def await_commit; end - # source://actionpack/lib/action_dispatch/http/response.rb#201 + # source://actionpack/lib/action_dispatch/http/response.rb#203 def await_sent; end - # Returns the content of the response as a string. This contains the contents - # of any calls to render. + # Returns the content of the response as a string. This contains the contents of + # any calls to `render`. # - # source://actionpack/lib/action_dispatch/http/response.rb#316 + # source://actionpack/lib/action_dispatch/http/response.rb#330 def body; end # Allows you to manually set or override the response body. # - # source://actionpack/lib/action_dispatch/http/response.rb#325 + # source://actionpack/lib/action_dispatch/http/response.rb#339 def body=(body); end - # source://actionpack/lib/action_dispatch/http/response.rb#369 + # source://actionpack/lib/action_dispatch/http/response.rb#383 def body_parts; end - # The charset of the response. HTML wants to know the encoding of the - # content you're giving them, so we need to send that along. + # The charset of the response. HTML wants to know the encoding of the content + # you're giving them, so we need to send that along. # - # source://actionpack/lib/action_dispatch/http/response.rb#286 + # source://actionpack/lib/action_dispatch/http/response.rb#300 def charset; end - # Sets the HTTP character set. In case of +nil+ parameter - # it sets the charset to +default_charset+. + # Sets the HTTP character set. In case of `nil` parameter it sets the charset to + # `default_charset`. # - # response.charset = 'utf-16' # => 'utf-16' - # response.charset = nil # => 'utf-8' + # response.charset = 'utf-16' # => 'utf-16' + # response.charset = nil # => 'utf-8' # - # source://actionpack/lib/action_dispatch/http/response.rb#275 + # source://actionpack/lib/action_dispatch/http/response.rb#289 def charset=(charset); end - # source://actionpack/lib/action_dispatch/http/response.rb#378 + # source://actionpack/lib/action_dispatch/http/response.rb#392 def close; end - # Returns a string to ensure compatibility with +Net::HTTPResponse+. + # Returns a string to ensure compatibility with `Net::HTTPResponse`. # - # source://actionpack/lib/action_dispatch/http/response.rb#297 + # source://actionpack/lib/action_dispatch/http/response.rb#311 def code; end - # source://actionpack/lib/action_dispatch/http/response.rb#205 + # source://actionpack/lib/action_dispatch/http/response.rb#207 def commit!; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/response.rb#229 + # source://actionpack/lib/action_dispatch/http/response.rb#231 def committed?; end # Content type of response. # - # source://actionpack/lib/action_dispatch/http/response.rb#255 + # source://actionpack/lib/action_dispatch/http/response.rb#269 def content_type; end - # Sets the HTTP response's content MIME type. For example, in the controller - # you could write this: + # Sets the HTTP response's content MIME type. For example, in the controller you + # could write this: # - # response.content_type = "text/plain" + # response.content_type = "text/plain" # - # If a character set has been defined for this response (see charset=) then - # the character set information will also be included in the content type + # If a character set has been defined for this response (see #charset=) then the + # character set information will also be included in the content type # information. # - # source://actionpack/lib/action_dispatch/http/response.rb#245 + # source://actionpack/lib/action_dispatch/http/response.rb#259 def content_type=(content_type); end # Returns the response cookies, converted to a Hash of (name => value) pairs # - # assert_equal 'AuthorOfNewPage', r.cookies['author'] + # assert_equal 'AuthorOfNewPage', r.cookies['author'] # - # source://actionpack/lib/action_dispatch/http/response.rb#406 + # source://actionpack/lib/action_dispatch/http/response.rb#419 def cookies; end - # source://actionpack/lib/action_dispatch/http/response.rb#86 + # source://actionpack/lib/action_dispatch/http/response.rb#88 def default_charset; end - # source://actionpack/lib/action_dispatch/http/response.rb#86 + # source://actionpack/lib/action_dispatch/http/response.rb#88 def default_charset=(val); end - # source://actionpack/lib/action_dispatch/http/response.rb#87 + # source://actionpack/lib/action_dispatch/http/response.rb#89 def default_headers; end - # source://actionpack/lib/action_dispatch/http/response.rb#87 + # source://actionpack/lib/action_dispatch/http/response.rb#89 def default_headers=(val); end - # source://actionpack/lib/action_dispatch/http/response.rb#193 + # source://actionpack/lib/action_dispatch/http/response.rb#195 def delete_header(key); end - # source://actionpack/lib/action_dispatch/http/response.rb#75 + # source://actionpack/lib/action_dispatch/http/response.rb#77 def each(&block); end - # source://actionpack/lib/action_dispatch/http/response.rb#191 + # source://actionpack/lib/action_dispatch/http/response.rb#193 def get_header(key); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/response.rb#190 + # source://actionpack/lib/action_dispatch/http/response.rb#192 def has_header?(key); end # The headers for the response. # - # header["Content-Type"] # => "text/plain" - # header["Content-Type"] = "application/json" - # header["Content-Type"] # => "application/json" + # header["Content-Type"] # => "text/plain" + # header["Content-Type"] = "application/json" + # header["Content-Type"] # => "application/json" # - # Also aliased as +headers+. + # Also aliased as `headers`. # - # headers["Content-Type"] # => "text/plain" - # headers["Content-Type"] = "application/json" - # headers["Content-Type"] # => "application/json" + # headers["Content-Type"] # => "text/plain" + # headers["Content-Type"] = "application/json" + # headers["Content-Type"] # => "application/json" # - # Also aliased as +header+ for compatibility. + # Also aliased as `header` for compatibility. # - # source://actionpack/lib/action_dispatch/http/response.rb#69 + # source://actionpack/lib/action_dispatch/http/response.rb#71 def header; end # The headers for the response. # - # header["Content-Type"] # => "text/plain" - # header["Content-Type"] = "application/json" - # header["Content-Type"] # => "application/json" + # header["Content-Type"] # => "text/plain" + # header["Content-Type"] = "application/json" + # header["Content-Type"] # => "application/json" # - # Also aliased as +headers+. + # Also aliased as `headers`. # - # headers["Content-Type"] # => "text/plain" - # headers["Content-Type"] = "application/json" - # headers["Content-Type"] # => "application/json" + # headers["Content-Type"] # => "text/plain" + # headers["Content-Type"] = "application/json" + # headers["Content-Type"] # => "application/json" # - # Also aliased as +header+ for compatibility. + # Also aliased as `header` for compatibility. # - # source://actionpack/lib/action_dispatch/http/response.rb#69 + # source://actionpack/lib/action_dispatch/http/response.rb#71 def headers; end # Media type of response. # - # source://actionpack/lib/action_dispatch/http/response.rb#260 + # source://actionpack/lib/action_dispatch/http/response.rb#274 def media_type; end # Returns the corresponding message for the current HTTP status code: # - # response.status = 200 - # response.message # => "OK" + # response.status = 200 + # response.message # => "OK" # - # response.status = 404 - # response.message # => "Not Found" + # response.status = 404 + # response.message # => "Not Found" # - # source://actionpack/lib/action_dispatch/http/response.rb#309 + # source://actionpack/lib/action_dispatch/http/response.rb#323 def message; end - # Turns the Response into a Rack-compatible array of the status, headers, - # and body. Allows explicit splatting: + # Turns the Response into a Rack-compatible array of the status, headers, and + # body. Allows explicit splatting: # - # status, headers, body = *response + # status, headers, body = *response # - # source://actionpack/lib/action_dispatch/http/response.rb#397 + # source://actionpack/lib/action_dispatch/http/response.rb#410 def prepare!; end # The location header we'll be responding with. # - # source://rack/3.0.11lib/rack/response.rb#261 + # source://rack/3.1.7lib/rack/response.rb#262 def redirect_url; end # The request that the response is responding to. # - # source://actionpack/lib/action_dispatch/http/response.rb#51 + # source://actionpack/lib/action_dispatch/http/response.rb#53 def request; end # The request that the response is responding to. # - # source://actionpack/lib/action_dispatch/http/response.rb#51 + # source://actionpack/lib/action_dispatch/http/response.rb#53 def request=(_arg0); end - # source://actionpack/lib/action_dispatch/http/response.rb#365 + # source://actionpack/lib/action_dispatch/http/response.rb#379 def reset_body!; end # The response code of the request. # - # source://actionpack/lib/action_dispatch/http/response.rb#292 + # source://actionpack/lib/action_dispatch/http/response.rb#306 def response_code; end - # Send the file stored at +path+ as the response body. + # Send the file stored at `path` as the response body. # - # source://actionpack/lib/action_dispatch/http/response.rb#360 + # source://actionpack/lib/action_dispatch/http/response.rb#374 def send_file(path); end - # source://actionpack/lib/action_dispatch/http/response.rb#213 + # source://actionpack/lib/action_dispatch/http/response.rb#215 def sending!; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/response.rb#228 + # source://actionpack/lib/action_dispatch/http/response.rb#230 def sending?; end - # source://actionpack/lib/action_dispatch/http/response.rb#264 + # source://actionpack/lib/action_dispatch/http/response.rb#278 def sending_file=(v); end - # source://actionpack/lib/action_dispatch/http/response.rb#221 + # source://actionpack/lib/action_dispatch/http/response.rb#223 def sent!; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/response.rb#230 + # source://actionpack/lib/action_dispatch/http/response.rb#232 def sent?; end - # source://actionpack/lib/action_dispatch/http/response.rb#192 + # source://actionpack/lib/action_dispatch/http/response.rb#194 def set_header(key, v); end # The HTTP status code. # - # source://actionpack/lib/action_dispatch/http/response.rb#54 + # source://actionpack/lib/action_dispatch/http/response.rb#56 def status; end # Sets the HTTP status code. # - # source://actionpack/lib/action_dispatch/http/response.rb#233 + # source://actionpack/lib/action_dispatch/http/response.rb#247 def status=(status); end # Returns the corresponding message for the current HTTP status code: # - # response.status = 200 - # response.message # => "OK" + # response.status = 200 + # response.message # => "OK" # - # response.status = 404 - # response.message # => "Not Found" + # response.status = 404 + # response.message # => "Not Found" # - # source://actionpack/lib/action_dispatch/http/response.rb#309 + # source://actionpack/lib/action_dispatch/http/response.rb#323 def status_message; end # The underlying body, as a streamable object. # - # source://actionpack/lib/action_dispatch/http/response.rb#167 + # source://actionpack/lib/action_dispatch/http/response.rb#169 def stream; end - # Turns the Response into a Rack-compatible array of the status, headers, - # and body. Allows explicit splatting: + # Turns the Response into a Rack-compatible array of the status, headers, and + # body. Allows explicit splatting: # - # status, headers, body = *response + # status, headers, body = *response # - # source://actionpack/lib/action_dispatch/http/response.rb#397 + # source://actionpack/lib/action_dispatch/http/response.rb#410 def to_a; end - # source://actionpack/lib/action_dispatch/http/response.rb#320 + # source://actionpack/lib/action_dispatch/http/response.rb#334 def write(string); end private - # source://actionpack/lib/action_dispatch/http/response.rb#477 + # source://actionpack/lib/action_dispatch/http/response.rb#489 def assign_default_content_type_and_charset!; end - # source://actionpack/lib/action_dispatch/http/response.rb#450 + # source://actionpack/lib/action_dispatch/http/response.rb#463 def before_committed; end - # source://actionpack/lib/action_dispatch/http/response.rb#458 + # source://actionpack/lib/action_dispatch/http/response.rb#471 def before_sending; end - # source://actionpack/lib/action_dispatch/http/response.rb#469 + # source://actionpack/lib/action_dispatch/http/response.rb#481 def build_buffer(response, body); end - # source://actionpack/lib/action_dispatch/http/response.rb#527 + # source://actionpack/lib/action_dispatch/http/response.rb#539 def handle_no_content!; end - # source://actionpack/lib/action_dispatch/http/response.rb#473 + # source://actionpack/lib/action_dispatch/http/response.rb#485 def munge_body_object(body); end - # source://actionpack/lib/action_dispatch/http/response.rb#430 + # source://actionpack/lib/action_dispatch/http/response.rb#443 def parse_content_type(content_type); end # Small internal convenience method to get the parsed version of the current # content type header. # - # source://actionpack/lib/action_dispatch/http/response.rb#440 + # source://actionpack/lib/action_dispatch/http/response.rb#453 def parsed_content_type_header; end - # source://actionpack/lib/action_dispatch/http/response.rb#534 + # source://actionpack/lib/action_dispatch/http/response.rb#546 def rack_response(status, headers); end - # source://actionpack/lib/action_dispatch/http/response.rb#444 + # source://actionpack/lib/action_dispatch/http/response.rb#457 def set_content_type(content_type, charset); end class << self - # source://actionpack/lib/action_dispatch/http/response.rb#157 + # source://actionpack/lib/action_dispatch/http/response.rb#159 def create(status = T.unsafe(nil), headers = T.unsafe(nil), body = T.unsafe(nil), default_headers: T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/http/response.rb#86 + # source://actionpack/lib/action_dispatch/http/response.rb#88 def default_charset; end - # source://actionpack/lib/action_dispatch/http/response.rb#86 + # source://actionpack/lib/action_dispatch/http/response.rb#88 def default_charset=(val); end - # source://actionpack/lib/action_dispatch/http/response.rb#87 + # source://actionpack/lib/action_dispatch/http/response.rb#89 def default_headers; end - # source://actionpack/lib/action_dispatch/http/response.rb#87 + # source://actionpack/lib/action_dispatch/http/response.rb#89 def default_headers=(val); end - # source://actionpack/lib/action_dispatch/http/response.rb#162 + # source://actionpack/lib/action_dispatch/http/response.rb#164 def merge_default_headers(original, default); end end end -# source://actionpack/lib/action_dispatch/http/response.rb#98 +# source://actionpack/lib/action_dispatch/http/response.rb#100 class ActionDispatch::Response::Buffer # @return [Buffer] a new instance of Buffer # - # source://actionpack/lib/action_dispatch/http/response.rb#99 + # source://actionpack/lib/action_dispatch/http/response.rb#101 def initialize(response, buf); end # @raise [IOError] # - # source://actionpack/lib/action_dispatch/http/response.rb#120 + # source://actionpack/lib/action_dispatch/http/response.rb#122 def <<(string); end - # source://actionpack/lib/action_dispatch/http/response.rb#139 + # source://actionpack/lib/action_dispatch/http/response.rb#141 def abort; end - # source://actionpack/lib/action_dispatch/http/response.rb#112 + # source://actionpack/lib/action_dispatch/http/response.rb#114 def body; end - # source://actionpack/lib/action_dispatch/http/response.rb#142 + # source://actionpack/lib/action_dispatch/http/response.rb#144 def close; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/response.rb#147 + # source://actionpack/lib/action_dispatch/http/response.rb#149 def closed?; end - # source://actionpack/lib/action_dispatch/http/response.rb#129 + # source://actionpack/lib/action_dispatch/http/response.rb#131 def each(&block); end - # source://actionpack/lib/action_dispatch/http/response.rb#106 + # source://actionpack/lib/action_dispatch/http/response.rb#108 def to_ary; end # @raise [IOError] # - # source://actionpack/lib/action_dispatch/http/response.rb#120 + # source://actionpack/lib/action_dispatch/http/response.rb#122 def write(string); end private - # source://actionpack/lib/action_dispatch/http/response.rb#152 + # source://actionpack/lib/action_dispatch/http/response.rb#154 def each_chunk(&block); end end -# source://actionpack/lib/action_dispatch/http/response.rb#82 +# source://actionpack/lib/action_dispatch/http/response.rb#84 ActionDispatch::Response::CONTENT_TYPE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/response.rb#424 +# source://actionpack/lib/action_dispatch/http/response.rb#437 ActionDispatch::Response::CONTENT_TYPE_PARSER = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/http/response.rb#421 +# source://actionpack/lib/action_dispatch/http/response.rb#434 class ActionDispatch::Response::ContentTypeHeader < ::Struct # Returns the value of attribute charset # @@ -15676,466 +16271,466 @@ class ActionDispatch::Response::ContentTypeHeader < ::Struct end end -# Avoid having to pass an open file handle as the response body. -# Rack::Sendfile will usually intercept the response and uses -# the path directly, so there is no reason to open the file. +# Avoid having to pass an open file handle as the response body. Rack::Sendfile +# will usually intercept the response and uses the path directly, so there is no +# reason to open the file. # -# source://actionpack/lib/action_dispatch/http/response.rb#338 +# source://actionpack/lib/action_dispatch/http/response.rb#352 class ActionDispatch::Response::FileBody # @return [FileBody] a new instance of FileBody # - # source://actionpack/lib/action_dispatch/http/response.rb#341 + # source://actionpack/lib/action_dispatch/http/response.rb#355 def initialize(path); end - # source://actionpack/lib/action_dispatch/http/response.rb#345 + # source://actionpack/lib/action_dispatch/http/response.rb#359 def body; end # Stream the file's contents if Rack::Sendfile isn't present. # - # source://actionpack/lib/action_dispatch/http/response.rb#350 + # source://actionpack/lib/action_dispatch/http/response.rb#364 def each; end - # source://actionpack/lib/action_dispatch/http/response.rb#339 + # source://actionpack/lib/action_dispatch/http/response.rb#353 def to_path; end end # To be deprecated: # -# source://actionpack/lib/action_dispatch/http/response.rb#48 +# source://actionpack/lib/action_dispatch/http/response.rb#50 ActionDispatch::Response::Header = Rack::Headers -# source://actionpack/lib/action_dispatch/http/response.rb#40 +# source://actionpack/lib/action_dispatch/http/response.rb#42 ActionDispatch::Response::Headers = Rack::Headers -# source://actionpack/lib/action_dispatch/http/response.rb#84 +# source://actionpack/lib/action_dispatch/http/response.rb#86 ActionDispatch::Response::NO_CONTENT_CODES = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/http/response.rb#422 +# source://actionpack/lib/action_dispatch/http/response.rb#435 ActionDispatch::Response::NullContentTypeHeader = T.let(T.unsafe(nil), ActionDispatch::Response::ContentTypeHeader) -# source://actionpack/lib/action_dispatch/http/response.rb#485 +# source://actionpack/lib/action_dispatch/http/response.rb#497 class ActionDispatch::Response::RackBody # @return [RackBody] a new instance of RackBody # - # source://actionpack/lib/action_dispatch/http/response.rb#486 + # source://actionpack/lib/action_dispatch/http/response.rb#498 def initialize(response); end - # source://actionpack/lib/action_dispatch/http/response.rb#496 + # source://actionpack/lib/action_dispatch/http/response.rb#508 def body; end - # source://actionpack/lib/action_dispatch/http/response.rb#518 + # source://actionpack/lib/action_dispatch/http/response.rb#530 def call(*arguments, &block); end - # source://actionpack/lib/action_dispatch/http/response.rb#490 + # source://actionpack/lib/action_dispatch/http/response.rb#502 def close; end - # source://actionpack/lib/action_dispatch/http/response.rb#514 + # source://actionpack/lib/action_dispatch/http/response.rb#526 def each(*args, &block); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/response.rb#502 + # source://actionpack/lib/action_dispatch/http/response.rb#514 def respond_to?(method, include_private = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/http/response.rb#510 + # source://actionpack/lib/action_dispatch/http/response.rb#522 def to_ary; end - # source://actionpack/lib/action_dispatch/http/response.rb#522 + # source://actionpack/lib/action_dispatch/http/response.rb#534 def to_path; end end -# source://actionpack/lib/action_dispatch/http/response.rb#500 +# source://actionpack/lib/action_dispatch/http/response.rb#512 ActionDispatch::Response::RackBody::BODY_METHODS = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/http/response.rb#83 +# source://actionpack/lib/action_dispatch/http/response.rb#85 ActionDispatch::Response::SET_COOKIE = T.let(T.unsafe(nil), String) # The routing module provides URL rewriting in native Ruby. It's a way to # redirect incoming requests to controllers and actions. This replaces -# mod_rewrite rules. Best of all, Rails' \Routing works with any web server. -# Routes are defined in config/routes.rb. +# mod_rewrite rules. Best of all, Rails' Routing works with any web server. +# Routes are defined in `config/routes.rb`. # # Think of creating routes as drawing a map for your requests. The map tells # them where to go based on some predefined pattern: # -# Rails.application.routes.draw do -# Pattern 1 tells some request to go to one place -# Pattern 2 tell them to go to another -# ... -# end +# Rails.application.routes.draw do +# Pattern 1 tells some request to go to one place +# Pattern 2 tell them to go to another +# ... +# end # # The following symbols are special: # -# :controller maps to your controller name -# :action maps to an action with your controllers +# :controller maps to your controller name +# :action maps to an action with your controllers # -# Other names simply map to a parameter as in the case of :id. +# Other names simply map to a parameter as in the case of `:id`. # -# == Resources +# ## Resources # -# Resource routing allows you to quickly declare all of the common routes -# for a given resourceful controller. Instead of declaring separate routes -# for your +index+, +show+, +new+, +edit+, +create+, +update+, and +destroy+ -# actions, a resourceful route declares them in a single line of code: +# Resource routing allows you to quickly declare all of the common routes for a +# given resourceful controller. Instead of declaring separate routes for your +# `index`, `show`, `new`, `edit`, `create`, `update`, and `destroy` actions, a +# resourceful route declares them in a single line of code: # -# resources :photos +# resources :photos # -# Sometimes, you have a resource that clients always look up without -# referencing an ID. A common example, /profile always shows the profile of -# the currently logged in user. In this case, you can use a singular resource -# to map /profile (rather than /profile/:id) to the show action. +# Sometimes, you have a resource that clients always look up without referencing +# an ID. A common example, /profile always shows the profile of the currently +# logged in user. In this case, you can use a singular resource to map /profile +# (rather than /profile/:id) to the show action. # -# resource :profile +# resource :profile # -# It's common to have resources that are logically children of other -# resources: +# It's common to have resources that are logically children of other resources: # -# resources :magazines do -# resources :ads -# end +# resources :magazines do +# resources :ads +# end # # You may wish to organize groups of controllers under a namespace. Most -# commonly, you might group a number of administrative controllers under -# an +admin+ namespace. You would place these controllers under the -# app/controllers/admin directory, and you can group them together -# in your router: +# commonly, you might group a number of administrative controllers under an +# `admin` namespace. You would place these controllers under the +# `app/controllers/admin` directory, and you can group them together in your +# router: # -# namespace "admin" do -# resources :posts, :comments -# end +# namespace "admin" do +# resources :posts, :comments +# end # # Alternatively, you can add prefixes to your path without using a separate -# directory by using +scope+. +scope+ takes additional options which -# apply to all enclosed routes. +# directory by using `scope`. `scope` takes additional options which apply to +# all enclosed routes. # -# scope path: "/cpanel", as: 'admin' do -# resources :posts, :comments -# end +# scope path: "/cpanel", as: 'admin' do +# resources :posts, :comments +# end # # For more, see Routing::Mapper::Resources#resources, # Routing::Mapper::Scoping#namespace, and Routing::Mapper::Scoping#scope. # -# == Non-resourceful routes +# ## Non-resourceful routes # -# For routes that don't fit the resources mold, you can use the HTTP helper -# methods get, post, patch, put and delete. +# For routes that don't fit the `resources` mold, you can use the HTTP helper +# methods `get`, `post`, `patch`, `put` and `delete`. # -# get 'post/:id', to: 'posts#show' -# post 'post/:id', to: 'posts#create_comment' +# get 'post/:id', to: 'posts#show' +# post 'post/:id', to: 'posts#create_comment' # -# Now, if you POST to /posts/:id, it will route to the create_comment action. A GET on the same -# URL will route to the show action. +# Now, if you POST to `/posts/:id`, it will route to the `create_comment` +# action. A GET on the same URL will route to the `show` action. # -# If your route needs to respond to more than one HTTP method (or all methods) then using the -# :via option on match is preferable. +# If your route needs to respond to more than one HTTP method (or all methods) +# then using the `:via` option on `match` is preferable. # -# match 'post/:id', to: 'posts#show', via: [:get, :post] +# match 'post/:id', to: 'posts#show', via: [:get, :post] # -# == Named routes +# ## Named routes # -# Routes can be named by passing an :as option, -# allowing for easy reference within your source as +name_of_route_url+ -# for the full URL and +name_of_route_path+ for the URI path. +# Routes can be named by passing an `:as` option, allowing for easy reference +# within your source as `name_of_route_url` for the full URL and +# `name_of_route_path` for the URI path. # # Example: # -# # In config/routes.rb -# get '/login', to: 'accounts#login', as: 'login' +# # In config/routes.rb +# get '/login', to: 'accounts#login', as: 'login' # -# # With render, redirect_to, tests, etc. -# redirect_to login_url +# # With render, redirect_to, tests, etc. +# redirect_to login_url # # Arguments can be passed as well. # -# redirect_to show_item_path(id: 25) +# redirect_to show_item_path(id: 25) # -# Use root as a shorthand to name a route for the root path "/". +# Use `root` as a shorthand to name a route for the root path "/". # -# # In config/routes.rb -# root to: 'blogs#index' +# # In config/routes.rb +# root to: 'blogs#index' # -# # would recognize http://www.example.com/ as -# params = { controller: 'blogs', action: 'index' } +# # would recognize http://www.example.com/ as +# params = { controller: 'blogs', action: 'index' } # -# # and provide these named routes -# root_url # => 'http://www.example.com/' -# root_path # => '/' +# # and provide these named routes +# root_url # => 'http://www.example.com/' +# root_path # => '/' # -# Note: when using +controller+, the route is simply named after the -# method you call on the block parameter rather than map. +# Note: when using `controller`, the route is simply named after the method you +# call on the block parameter rather than map. # -# # In config/routes.rb -# controller :blog do -# get 'blog/show' => :list -# get 'blog/delete' => :delete -# get 'blog/edit' => :edit -# end +# # In config/routes.rb +# controller :blog do +# get 'blog/show' => :list +# get 'blog/delete' => :delete +# get 'blog/edit' => :edit +# end # -# # provides named routes for show, delete, and edit -# link_to @article.title, blog_show_path(id: @article.id) +# # provides named routes for show, delete, and edit +# link_to @article.title, blog_show_path(id: @article.id) # -# == Pretty URLs +# ## Pretty URLs # # Routes can generate pretty URLs. For example: # -# get '/articles/:year/:month/:day', to: 'articles#find_by_id', constraints: { -# year: /\d{4}/, -# month: /\d{1,2}/, -# day: /\d{1,2}/ -# } +# get '/articles/:year/:month/:day', to: 'articles#find_by_id', constraints: { +# year: /\d{4}/, +# month: /\d{1,2}/, +# day: /\d{1,2}/ +# } # # Using the route above, the URL "http://localhost:3000/articles/2005/11/06" # maps to # -# params = {year: '2005', month: '11', day: '06'} +# params = {year: '2005', month: '11', day: '06'} # -# == Regular Expressions and parameters +# ## Regular Expressions and parameters # You can specify a regular expression to define a format for a parameter. # -# controller 'geocode' do -# get 'geocode/:postalcode', to: :show, constraints: { -# postalcode: /\d{5}(-\d{4})?/ -# } -# end +# controller 'geocode' do +# get 'geocode/:postalcode', to: :show, constraints: { +# postalcode: /\d{5}(-\d{4})?/ +# } +# end # # Constraints can include the 'ignorecase' and 'extended syntax' regular # expression modifiers: # -# controller 'geocode' do -# get 'geocode/:postalcode', to: :show, constraints: { -# postalcode: /hx\d\d\s\d[a-z]{2}/i -# } -# end -# -# controller 'geocode' do -# get 'geocode/:postalcode', to: :show, constraints: { -# postalcode: /# Postalcode format -# \d{5} #Prefix -# (-\d{4})? #Suffix -# /x -# } -# end +# controller 'geocode' do +# get 'geocode/:postalcode', to: :show, constraints: { +# postalcode: /hx\d\d\s\d[a-z]{2}/i +# } +# end +# +# controller 'geocode' do +# get 'geocode/:postalcode', to: :show, constraints: { +# postalcode: /# Postalcode format +# \d{5} #Prefix +# (-\d{4})? #Suffix +# /x +# } +# end # -# Using the multiline modifier will raise an +ArgumentError+. -# Encoding regular expression modifiers are silently ignored. The -# match will always use the default encoding or ASCII. +# Using the multiline modifier will raise an `ArgumentError`. Encoding regular +# expression modifiers are silently ignored. The match will always use the +# default encoding or ASCII. # -# == External redirects +# ## External redirects # -# You can redirect any path to another path using the redirect helper in your router: +# You can redirect any path to another path using the redirect helper in your +# router: # -# get "/stories", to: redirect("/posts") +# get "/stories", to: redirect("/posts") # -# == Unicode character routes +# ## Unicode character routes # # You can specify unicode character routes in your router: # -# get "こんにちは", to: "welcome#index" +# get "こんにちは", to: "welcome#index" # -# == Routing to Rack Applications +# ## Routing to Rack Applications # -# Instead of a String, like posts#index, which corresponds to the -# index action in the PostsController, you can specify any Rack application -# as the endpoint for a matcher: +# Instead of a String, like `posts#index`, which corresponds to the index action +# in the PostsController, you can specify any Rack application as the endpoint +# for a matcher: # -# get "/application.js", to: Sprockets +# get "/application.js", to: Sprockets # -# == Reloading routes +# ## Reloading routes # # You can reload routes if you feel you must: # -# Rails.application.reload_routes! +# Rails.application.reload_routes! # -# This will clear all named routes and reload config/routes.rb if the file has been modified from -# last load. To absolutely force reloading, use reload!. +# This will clear all named routes and reload config/routes.rb if the file has +# been modified from last load. To absolutely force reloading, use `reload!`. # -# == Testing Routes +# ## Testing Routes # # The two main methods for testing your routes: # -# === +assert_routing+ +# ### `assert_routing` # -# def test_movie_route_properly_splits -# opts = {controller: "plugin", action: "checkout", id: "2"} -# assert_routing "plugin/checkout/2", opts -# end +# def test_movie_route_properly_splits +# opts = {controller: "plugin", action: "checkout", id: "2"} +# assert_routing "plugin/checkout/2", opts +# end # -# +assert_routing+ lets you test whether or not the route properly resolves into options. +# `assert_routing` lets you test whether or not the route properly resolves into +# options. # -# === +assert_recognizes+ +# ### `assert_recognizes` # -# def test_route_has_options -# opts = {controller: "plugin", action: "show", id: "12"} -# assert_recognizes opts, "/plugins/show/12" -# end +# def test_route_has_options +# opts = {controller: "plugin", action: "show", id: "12"} +# assert_recognizes opts, "/plugins/show/12" +# end # -# Note the subtle difference between the two: +assert_routing+ tests that -# a URL fits options while +assert_recognizes+ tests that a URL -# breaks into parameters properly. +# Note the subtle difference between the two: `assert_routing` tests that a URL +# fits options while `assert_recognizes` tests that a URL breaks into parameters +# properly. # -# In tests you can simply pass the URL or named route to +get+ or +post+. +# In tests you can simply pass the URL or named route to `get` or `post`. # -# def send_to_jail -# get '/jail' -# assert_response :success -# end +# def send_to_jail +# get '/jail' +# assert_response :success +# end # -# def goes_to_login -# get login_url -# #... -# end +# def goes_to_login +# get login_url +# #... +# end # -# == View a list of all your routes +# ## View a list of all your routes # -# $ bin/rails routes +# $ bin/rails routes # -# Target a specific controller with -c, or grep routes -# using -g. Useful in conjunction with --expanded -# which displays routes vertically. +# Target a specific controller with `-c`, or grep routes using `-g`. Useful in +# conjunction with `--expanded` which displays routes vertically. # -# source://actionpack/lib/action_dispatch/routing.rb#246 +# source://actionpack/lib/action_dispatch/routing.rb#248 module ActionDispatch::Routing extend ::ActiveSupport::Autoload end -# source://actionpack/lib/action_dispatch/routing/inspector.rb#153 +# source://actionpack/lib/action_dispatch/routing/inspector.rb#155 module ActionDispatch::Routing::ConsoleFormatter; end -# source://actionpack/lib/action_dispatch/routing/inspector.rb#154 +# source://actionpack/lib/action_dispatch/routing/inspector.rb#156 class ActionDispatch::Routing::ConsoleFormatter::Base # @return [Base] a new instance of Base # - # source://actionpack/lib/action_dispatch/routing/inspector.rb#155 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#157 def initialize; end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#169 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#171 def header(routes); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#172 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#174 def no_routes(routes, filter); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#159 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#161 def result; end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#166 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#168 def section(routes); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#163 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#165 def section_title(title); end end -# source://actionpack/lib/action_dispatch/routing/inspector.rb#226 +# source://actionpack/lib/action_dispatch/routing/inspector.rb#228 class ActionDispatch::Routing::ConsoleFormatter::Expanded < ::ActionDispatch::Routing::ConsoleFormatter::Base # @return [Expanded] a new instance of Expanded # - # source://actionpack/lib/action_dispatch/routing/inspector.rb#227 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#229 def initialize(width: T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#236 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#238 def section(routes); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#232 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#234 def section_title(title); end private - # source://actionpack/lib/action_dispatch/routing/inspector.rb#241 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#243 def draw_expanded_section(routes); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#256 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#258 def route_header(index:); end end -# source://actionpack/lib/action_dispatch/routing/inspector.rb#190 +# source://actionpack/lib/action_dispatch/routing/inspector.rb#192 class ActionDispatch::Routing::ConsoleFormatter::Sheet < ::ActionDispatch::Routing::ConsoleFormatter::Base - # source://actionpack/lib/action_dispatch/routing/inspector.rb#199 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#201 def header(routes); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#195 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#197 def section(routes); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#191 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#193 def section_title(title); end private - # source://actionpack/lib/action_dispatch/routing/inspector.rb#213 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#215 def draw_header(routes); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#204 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#206 def draw_section(routes); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#219 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#221 def widths(routes); end end -# source://actionpack/lib/action_dispatch/routing/inspector.rb#261 +# source://actionpack/lib/action_dispatch/routing/inspector.rb#263 class ActionDispatch::Routing::ConsoleFormatter::Unused < ::ActionDispatch::Routing::ConsoleFormatter::Sheet - # source://actionpack/lib/action_dispatch/routing/inspector.rb#262 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#264 def header(routes); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#270 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#272 def no_routes(routes, filter); end end -# source://actionpack/lib/action_dispatch/routing/endpoint.rb#5 +# source://actionpack/lib/action_dispatch/routing/endpoint.rb#7 class ActionDispatch::Routing::Endpoint - # source://actionpack/lib/action_dispatch/routing/endpoint.rb#9 + # source://actionpack/lib/action_dispatch/routing/endpoint.rb#11 def app; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/endpoint.rb#6 + # source://actionpack/lib/action_dispatch/routing/endpoint.rb#8 def dispatcher?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/endpoint.rb#12 + # source://actionpack/lib/action_dispatch/routing/endpoint.rb#14 def engine?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/endpoint.rb#8 + # source://actionpack/lib/action_dispatch/routing/endpoint.rb#10 def matches?(req); end - # source://actionpack/lib/action_dispatch/routing/endpoint.rb#10 + # source://actionpack/lib/action_dispatch/routing/endpoint.rb#12 def rack_app; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/endpoint.rb#7 + # source://actionpack/lib/action_dispatch/routing/endpoint.rb#9 def redirect?; end end -# source://actionpack/lib/action_dispatch/routing.rb#258 +# source://actionpack/lib/action_dispatch/routing.rb#260 ActionDispatch::Routing::HTTP_METHODS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/routing/inspector.rb#283 +# source://actionpack/lib/action_dispatch/routing/inspector.rb#285 class ActionDispatch::Routing::HtmlTableFormatter # @return [HtmlTableFormatter] a new instance of HtmlTableFormatter # - # source://actionpack/lib/action_dispatch/routing/inspector.rb#284 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#286 def initialize(view); end # The header is part of the HTML page, so we don't construct it here. # - # source://actionpack/lib/action_dispatch/routing/inspector.rb#298 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#300 def header(routes); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#301 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#303 def no_routes(*_arg0); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#314 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#316 def result; end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#293 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#295 def section(routes); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#289 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#291 def section_title(title); end end -# source://actionpack/lib/action_dispatch/routing/mapper.rb#12 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#14 class ActionDispatch::Routing::Mapper include ::ActionDispatch::Routing::Mapper::Base include ::ActionDispatch::Routing::Mapper::HttpHelpers @@ -16147,2232 +16742,2258 @@ class ActionDispatch::Routing::Mapper # @return [Mapper] a new instance of Mapper # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2313 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2357 def initialize(set); end class << self - # source://actionpack/lib/action_dispatch/routing/mapper.rb#16 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#27 def backtrace_cleaner; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#16 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#27 def backtrace_cleaner=(val); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#392 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#429 def normalize_name(name); end - # Invokes Journey::Router::Utils.normalize_path, then ensures that - # /(:locale) becomes (/:locale). Except for root cases, where the - # former is the correct one. + # Invokes Journey::Router::Utils.normalize_path, then ensures that /(:locale) + # becomes (/:locale). Except for root cases, where the former is the correct + # one. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#375 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#414 def normalize_path(path); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#15 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#26 def route_source_locations; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#15 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#26 def route_source_locations=(val); end end end -# source://actionpack/lib/action_dispatch/routing/mapper.rb#396 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#15 +class ActionDispatch::Routing::Mapper::BacktraceCleaner < ::ActiveSupport::BacktraceCleaner + # @return [BacktraceCleaner] a new instance of BacktraceCleaner + # + # source://actionpack/lib/action_dispatch/routing/mapper.rb#16 + def initialize; end +end + +# source://actionpack/lib/action_dispatch/routing/mapper.rb#433 module ActionDispatch::Routing::Mapper::Base - # source://actionpack/lib/action_dispatch/routing/mapper.rb#629 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#657 def default_url_options(options); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#629 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#657 def default_url_options=(options); end # Query if the following named route was already defined. # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#641 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#669 def has_named_route?(name); end # Matches a URL pattern to one or more routes. # - # You should not use the +match+ method in your router - # without specifying an HTTP method. + # You should not use the `match` method in your router without specifying an + # HTTP method. # # If you want to expose your action to both GET and POST, use: # - # # sets :controller, :action, and :id in params - # match ':controller/:action/:id', via: [:get, :post] + # # sets :controller, :action, and :id in params + # match ':controller/:action/:id', via: [:get, :post] # - # Note that +:controller+, +:action+, and +:id+ are interpreted as URL - # query parameters and thus available through +params+ in an action. + # Note that `:controller`, `:action`, and `:id` are interpreted as URL query + # parameters and thus available through `params` in an action. # - # If you want to expose your action to GET, use +get+ in the router: + # If you want to expose your action to GET, use `get` in the router: # # Instead of: # - # match ":controller/:action/:id" + # match ":controller/:action/:id" # # Do: # - # get ":controller/:action/:id" + # get ":controller/:action/:id" # - # Two of these symbols are special, +:controller+ maps to the controller - # and +:action+ to the controller's action. A pattern can also map - # wildcard segments (globs) to params: + # Two of these symbols are special, `:controller` maps to the controller and + # `:action` to the controller's action. A pattern can also map wildcard segments + # (globs) to params: # - # get 'songs/*category/:title', to: 'songs#show' + # get 'songs/*category/:title', to: 'songs#show' # - # # 'songs/rock/classic/stairway-to-heaven' sets - # # params[:category] = 'rock/classic' - # # params[:title] = 'stairway-to-heaven' + # # 'songs/rock/classic/stairway-to-heaven' sets + # # params[:category] = 'rock/classic' + # # params[:title] = 'stairway-to-heaven' # - # To match a wildcard parameter, it must have a name assigned to it. - # Without a variable name to attach the glob parameter to, the route - # can't be parsed. + # To match a wildcard parameter, it must have a name assigned to it. Without a + # variable name to attach the glob parameter to, the route can't be parsed. # - # When a pattern points to an internal route, the route's +:action+ and - # +:controller+ should be set in options or hash shorthand. Examples: + # When a pattern points to an internal route, the route's `:action` and + # `:controller` should be set in options or hash shorthand. Examples: # - # match 'photos/:id' => 'photos#show', via: :get - # match 'photos/:id', to: 'photos#show', via: :get - # match 'photos/:id', controller: 'photos', action: 'show', via: :get + # match 'photos/:id', to: 'photos#show', via: :get + # match 'photos/:id', controller: 'photos', action: 'show', via: :get # - # A pattern can also point to a +Rack+ endpoint i.e. anything that - # responds to +call+: + # A pattern can also point to a `Rack` endpoint i.e. anything that responds to + # `call`: # - # match 'photos/:id', to: -> (hash) { [200, {}, ["Coming soon"]] }, via: :get - # match 'photos/:id', to: PhotoRackApp, via: :get - # # Yes, controller actions are just rack endpoints - # match 'photos/:id', to: PhotosController.action(:show), via: :get + # match 'photos/:id', to: -> (hash) { [200, {}, ["Coming soon"]] }, via: :get + # match 'photos/:id', to: PhotoRackApp, via: :get + # # Yes, controller actions are just rack endpoints + # match 'photos/:id', to: PhotosController.action(:show), via: :get # # Because requesting various HTTP verbs with a single action has security - # implications, you must either specify the actions in - # the via options or use one of the HttpHelpers[rdoc-ref:HttpHelpers] - # instead +match+ + # implications, you must either specify the actions in the via options or use + # one of the [HttpHelpers](rdoc-ref:HttpHelpers) instead `match` # - # === Options + # ### Options # # Any options not seen here are passed on as params with the URL. # - # [:controller] - # The route's controller. + # :controller + # : The route's controller. # - # [:action] - # The route's action. + # :action + # : The route's action. # - # [:param] - # Overrides the default resource identifier +:id+ (name of the - # dynamic segment used to generate the routes). - # You can access that segment from your controller using - # params[<:param>]. - # In your router: + # :param + # : Overrides the default resource identifier `:id` (name of the dynamic + # segment used to generate the routes). You can access that segment from + # your controller using `params[<:param>]`. In your router: # - # resources :users, param: :name + # resources :users, param: :name # - # The +users+ resource here will have the following routes generated for it: + # The `users` resource here will have the following routes generated for it: # - # GET /users(.:format) - # POST /users(.:format) - # GET /users/new(.:format) - # GET /users/:name/edit(.:format) - # GET /users/:name(.:format) - # PATCH/PUT /users/:name(.:format) - # DELETE /users/:name(.:format) + # GET /users(.:format) + # POST /users(.:format) + # GET /users/new(.:format) + # GET /users/:name/edit(.:format) + # GET /users/:name(.:format) + # PATCH/PUT /users/:name(.:format) + # DELETE /users/:name(.:format) # - # You can override ActiveRecord::Base#to_param of a related - # model to construct a URL: + # You can override `ActiveRecord::Base#to_param` of a related model to + # construct a URL: # - # class User < ActiveRecord::Base - # def to_param - # name - # end - # end + # class User < ActiveRecord::Base + # def to_param + # name + # end + # end # - # user = User.find_by(name: 'Phusion') - # user_path(user) # => "/users/Phusion" + # user = User.find_by(name: 'Phusion') + # user_path(user) # => "/users/Phusion" # - # [:path] - # The path prefix for the routes. + # :path + # : The path prefix for the routes. # - # [:module] - # The namespace for :controller. + # :module + # : The namespace for :controller. # - # match 'path', to: 'c#a', module: 'sekret', controller: 'posts', via: :get - # # => Sekret::PostsController + # match 'path', to: 'c#a', module: 'sekret', controller: 'posts', via: :get + # # => Sekret::PostsController # - # See Scoping#namespace for its scope equivalent. + # See `Scoping#namespace` for its scope equivalent. # - # [:as] - # The name used to generate routing helpers. + # :as + # : The name used to generate routing helpers. # - # [:via] - # Allowed HTTP verb(s) for route. + # :via + # : Allowed HTTP verb(s) for route. # - # match 'path', to: 'c#a', via: :get - # match 'path', to: 'c#a', via: [:get, :post] - # match 'path', to: 'c#a', via: :all + # match 'path', to: 'c#a', via: :get + # match 'path', to: 'c#a', via: [:get, :post] + # match 'path', to: 'c#a', via: :all # - # [:to] - # Points to a +Rack+ endpoint. Can be an object that responds to - # +call+ or a string representing a controller's action. + # :to + # : Points to a `Rack` endpoint. Can be an object that responds to `call` or a + # string representing a controller's action. # - # match 'path', to: 'controller#action', via: :get - # match 'path', to: -> (env) { [200, {}, ["Success!"]] }, via: :get - # match 'path', to: RackApp, via: :get + # match 'path', to: 'controller#action', via: :get + # match 'path', to: -> (env) { [200, {}, ["Success!"]] }, via: :get + # match 'path', to: RackApp, via: :get # - # [:on] - # Shorthand for wrapping routes in a specific RESTful context. Valid - # values are +:member+, +:collection+, and +:new+. Only use within - # resource(s) block. For example: + # :on + # : Shorthand for wrapping routes in a specific RESTful context. Valid values + # are `:member`, `:collection`, and `:new`. Only use within `resource(s)` + # block. For example: # - # resource :bar do - # match 'foo', to: 'c#a', on: :member, via: [:get, :post] - # end + # resource :bar do + # match 'foo', to: 'c#a', on: :member, via: [:get, :post] + # end # - # Is equivalent to: + # Is equivalent to: # - # resource :bar do - # member do - # match 'foo', to: 'c#a', via: [:get, :post] - # end - # end + # resource :bar do + # member do + # match 'foo', to: 'c#a', via: [:get, :post] + # end + # end # - # [:constraints] - # Constrains parameters with a hash of regular expressions - # or an object that responds to matches?. In addition, constraints - # other than path can also be specified with any object - # that responds to === (e.g. String, Array, Range, etc.). + # :constraints + # : Constrains parameters with a hash of regular expressions or an object that + # responds to `matches?`. In addition, constraints other than path can also + # be specified with any object that responds to `===` (e.g. String, Array, + # Range, etc.). # - # match 'path/:id', constraints: { id: /[A-Z]\d{5}/ }, via: :get + # match 'path/:id', constraints: { id: /[A-Z]\d{5}/ }, via: :get # - # match 'json_only', constraints: { format: 'json' }, via: :get + # match 'json_only', constraints: { format: 'json' }, via: :get # - # class PermitList - # def matches?(request) request.remote_ip == '1.2.3.4' end - # end - # match 'path', to: 'c#a', constraints: PermitList.new, via: :get + # class PermitList + # def matches?(request) request.remote_ip == '1.2.3.4' end + # end + # match 'path', to: 'c#a', constraints: PermitList.new, via: :get # - # See Scoping#constraints for more examples with its scope - # equivalent. + # See `Scoping#constraints` for more examples with its scope equivalent. # - # [:defaults] - # Sets defaults for parameters + # :defaults + # : Sets defaults for parameters # - # # Sets params[:format] to 'jpg' by default - # match 'path', to: 'c#a', defaults: { format: 'jpg' }, via: :get + # # Sets params[:format] to 'jpg' by default + # match 'path', to: 'c#a', defaults: { format: 'jpg' }, via: :get # - # See Scoping#defaults for its scope equivalent. + # See `Scoping#defaults` for its scope equivalent. # - # [:anchor] - # Boolean to anchor a match pattern. Default is true. When set to - # false, the pattern matches any request prefixed with the given path. + # :anchor + # : Boolean to anchor a `match` pattern. Default is true. When set to false, + # the pattern matches any request prefixed with the given path. # - # # Matches any request starting with 'path' - # match 'path', to: 'c#a', anchor: false, via: :get + # # Matches any request starting with 'path' + # match 'path', to: 'c#a', anchor: false, via: :get # - # [:format] - # Allows you to specify the default value for optional +format+ - # segment or disable it by supplying +false+. + # :format + # : Allows you to specify the default value for optional `format` segment or + # disable it by supplying `false`. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#577 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#609 def match(path, options = T.unsafe(nil)); end # Mount a Rack-based application to be used within the application. # - # mount SomeRackApp, at: "some_route" + # mount SomeRackApp, at: "some_route" # - # Alternatively: + # For options, see `match`, as `mount` uses it internally. # - # mount(SomeRackApp => "some_route") + # All mounted applications come with routing helpers to access them. These are + # named after the class specified, so for the above example the helper is either + # `some_rack_app_path` or `some_rack_app_url`. To customize this helper's name, + # use the `:as` option: # - # For options, see +match+, as +mount+ uses it internally. + # mount(SomeRackApp, at: "some_route", as: "exciting") # - # All mounted applications come with routing helpers to access them. - # These are named after the class specified, so for the above example - # the helper is either +some_rack_app_path+ or +some_rack_app_url+. - # To customize this helper's name, use the +:as+ option: - # - # mount(SomeRackApp => "some_route", as: "exciting") - # - # This will generate the +exciting_path+ and +exciting_url+ helpers - # which can be used to navigate to this mounted app. + # This will generate the `exciting_path` and `exciting_url` helpers which can be + # used to navigate to this mounted app. # # @raise [ArgumentError] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#599 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#627 def mount(app, options = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#634 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#662 def with_default_scope(scope, &block); end private - # source://actionpack/lib/action_dispatch/routing/mapper.rb#650 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#678 def app_name(app, rails_app); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#659 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#687 def define_generate_prefix(app, name); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#646 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#674 def rails_app?(app); end end -# Routing Concerns allow you to declare common routes that can be reused -# inside others resources and routes. +# Routing Concerns allow you to declare common routes that can be reused inside +# others resources and routes. # -# concern :commentable do -# resources :comments -# end +# concern :commentable do +# resources :comments +# end # -# concern :image_attachable do -# resources :images, only: :index -# end +# concern :image_attachable do +# resources :images, only: :index +# end # # These concerns are used in Resources routing: # -# resources :messages, concerns: [:commentable, :image_attachable] +# resources :messages, concerns: [:commentable, :image_attachable] # # or in a scope or namespace: # -# namespace :posts do -# concerns :commentable -# end +# namespace :posts do +# concerns :commentable +# end # -# source://actionpack/lib/action_dispatch/routing/mapper.rb#2025 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#2070 module ActionDispatch::Routing::Mapper::Concerns # Define a routing concern using a name. # - # Concerns may be defined inline, using a block, or handled by - # another object, by passing that object as the second parameter. + # Concerns may be defined inline, using a block, or handled by another object, + # by passing that object as the second parameter. # - # The concern object, if supplied, should respond to call, - # which will receive two parameters: + # The concern object, if supplied, should respond to `call`, which will receive + # two parameters: # - # * The current mapper - # * A hash of options which the concern object may use + # * The current mapper + # * A hash of options which the concern object may use # - # Options may also be used by concerns defined in a block by accepting - # a block parameter. So, using a block, you might do something as - # simple as limit the actions available on certain resources, passing - # standard resource options through the concern: + # Options may also be used by concerns defined in a block by accepting a block + # parameter. So, using a block, you might do something as simple as limit the + # actions available on certain resources, passing standard resource options + # through the concern: # - # concern :commentable do |options| - # resources :comments, options - # end + # concern :commentable do |options| + # resources :comments, options + # end # - # resources :posts, concerns: :commentable - # resources :archived_posts do - # # Don't allow comments on archived posts - # concerns :commentable, only: [:index, :show] - # end + # resources :posts, concerns: :commentable + # resources :archived_posts do + # # Don't allow comments on archived posts + # concerns :commentable, only: [:index, :show] + # end # - # Or, using a callable object, you might implement something more - # specific to your application, which would be out of place in your - # routes file. + # Or, using a callable object, you might implement something more specific to + # your application, which would be out of place in your routes file. # - # # purchasable.rb - # class Purchasable - # def initialize(defaults = {}) - # @defaults = defaults - # end + # # purchasable.rb + # class Purchasable + # def initialize(defaults = {}) + # @defaults = defaults + # end # - # def call(mapper, options = {}) - # options = @defaults.merge(options) - # mapper.resources :purchases - # mapper.resources :receipts - # mapper.resources :returns if options[:returnable] + # def call(mapper, options = {}) + # options = @defaults.merge(options) + # mapper.resources :purchases + # mapper.resources :receipts + # mapper.resources :returns if options[:returnable] + # end # end - # end # - # # routes.rb - # concern :purchasable, Purchasable.new(returnable: true) + # # routes.rb + # concern :purchasable, Purchasable.new(returnable: true) # - # resources :toys, concerns: :purchasable - # resources :electronics, concerns: :purchasable - # resources :pets do - # concerns :purchasable, returnable: false - # end + # resources :toys, concerns: :purchasable + # resources :electronics, concerns: :purchasable + # resources :pets do + # concerns :purchasable, returnable: false + # end # - # Any routing helpers can be used inside a concern. If using a - # callable, they're accessible from the Mapper that's passed to - # call. + # Any routing helpers can be used inside a concern. If using a callable, they're + # accessible from the Mapper that's passed to `call`. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2082 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2125 def concern(name, callable = T.unsafe(nil), &block); end # Use the named concerns # - # resources :posts do - # concerns :commentable - # end + # resources :posts do + # concerns :commentable + # end # # Concerns also work in any routes helper that you want to use: # - # namespace :posts do - # concerns :commentable - # end + # namespace :posts do + # concerns :commentable + # end # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2098 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2141 def concerns(*args); end end -# source://actionpack/lib/action_dispatch/routing/mapper.rb#18 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#29 class ActionDispatch::Routing::Mapper::Constraints < ::ActionDispatch::Routing::Endpoint # @return [Constraints] a new instance of Constraints # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#24 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#35 def initialize(app, constraints, strategy); end # Returns the value of attribute app. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#19 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#30 def app; end # Returns the value of attribute constraints. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#19 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#30 def constraints; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#39 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#50 def dispatcher?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#41 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#52 def matches?(req); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#48 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#59 def serve(req); end private - # source://actionpack/lib/action_dispatch/routing/mapper.rb#55 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#66 def constraint_args(constraint, request); end end -# source://actionpack/lib/action_dispatch/routing/mapper.rb#22 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#33 ActionDispatch::Routing::Mapper::Constraints::CALL = T.let(T.unsafe(nil), Proc) -# source://actionpack/lib/action_dispatch/routing/mapper.rb#21 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#32 ActionDispatch::Routing::Mapper::Constraints::SERVE = T.let(T.unsafe(nil), Proc) -# source://actionpack/lib/action_dispatch/routing/mapper.rb#2110 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#2153 module ActionDispatch::Routing::Mapper::CustomUrls - # Define custom URL helpers that will be added to the application's - # routes. This allows you to override and/or replace the default behavior - # of routing helpers, e.g: + # Define custom URL helpers that will be added to the application's routes. This + # allows you to override and/or replace the default behavior of routing helpers, + # e.g: + # + # direct :homepage do + # "https://rubyonrails.org" + # end # - # direct :homepage do - # "https://rubyonrails.org" - # end + # direct :commentable do |model| + # [ model, anchor: model.dom_id ] + # end # - # direct :commentable do |model| - # [ model, anchor: model.dom_id ] - # end + # direct :main do + # { controller: "pages", action: "index", subdomain: "www" } + # end # - # direct :main do - # { controller: "pages", action: "index", subdomain: "www" } - # end + # The return value from the block passed to `direct` must be a valid set of + # arguments for `url_for` which will actually build the URL string. This can be + # one of the following: # - # The return value from the block passed to +direct+ must be a valid set of - # arguments for +url_for+ which will actually build the URL string. This can - # be one of the following: + # * A string, which is treated as a generated URL + # * A hash, e.g. `{ controller: "pages", action: "index" }` + # * An array, which is passed to `polymorphic_url` + # * An Active Model instance + # * An Active Model class # - # * A string, which is treated as a generated URL - # * A hash, e.g. { controller: "pages", action: "index" } - # * An array, which is passed to +polymorphic_url+ - # * An Active Model instance - # * An Active Model class # - # NOTE: Other URL helpers can be called in the block but be careful not to invoke - # your custom URL helper again otherwise it will result in a stack overflow error. + # NOTE: Other URL helpers can be called in the block but be careful not to + # invoke your custom URL helper again otherwise it will result in a stack + # overflow error. # - # You can also specify default options that will be passed through to - # your URL helper definition, e.g: + # You can also specify default options that will be passed through to your URL + # helper definition, e.g: # - # direct :browse, page: 1, size: 10 do |options| - # [ :products, options.merge(params.permit(:page, :size).to_h.symbolize_keys) ] - # end + # direct :browse, page: 1, size: 10 do |options| + # [ :products, options.merge(params.permit(:page, :size).to_h.symbolize_keys) ] + # end # - # In this instance the +params+ object comes from the context in which the - # block is executed, e.g. generating a URL inside a controller action or a view. - # If the block is executed where there isn't a +params+ object such as this: + # In this instance the `params` object comes from the context in which the block + # is executed, e.g. generating a URL inside a controller action or a view. If + # the block is executed where there isn't a `params` object such as this: # - # Rails.application.routes.url_helpers.browse_path + # Rails.application.routes.url_helpers.browse_path # - # then it will raise a +NameError+. Because of this you need to be aware of the + # then it will raise a `NameError`. Because of this you need to be aware of the # context in which you will use your custom URL helper when defining it. # - # NOTE: The +direct+ method can't be used inside of a scope block such as - # +namespace+ or +scope+ and will raise an error if it detects that it is. + # NOTE: The `direct` method can't be used inside of a scope block such as + # `namespace` or `scope` and will raise an error if it detects that it is. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2158 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2203 def direct(name, options = T.unsafe(nil), &block); end - # Define custom polymorphic mappings of models to URLs. This alters the - # behavior of +polymorphic_url+ and consequently the behavior of - # +link_to+ and +form_for+ when passed a model instance, e.g: + # Define custom polymorphic mappings of models to URLs. This alters the behavior + # of `polymorphic_url` and consequently the behavior of `link_to` and `form_for` + # when passed a model instance, e.g: # - # resource :basket + # resource :basket # - # resolve "Basket" do - # [:basket] - # end + # resolve "Basket" do + # [:basket] + # end # - # This will now generate "/basket" when a +Basket+ instance is passed to - # +link_to+ or +form_for+ instead of the standard "/baskets/:id". + # This will now generate "/basket" when a `Basket` instance is passed to + # `link_to` or `form_for` instead of the standard "/baskets/:id". # - # NOTE: This custom behavior only applies to simple polymorphic URLs where - # a single model instance is passed and not more complicated forms, e.g: + # NOTE: This custom behavior only applies to simple polymorphic URLs where a + # single model instance is passed and not more complicated forms, e.g: # - # # config/routes.rb - # resource :profile - # namespace :admin do - # resources :users - # end + # # config/routes.rb + # resource :profile + # namespace :admin do + # resources :users + # end # - # resolve("User") { [:profile] } + # resolve("User") { [:profile] } # - # # app/views/application/_menu.html.erb - # link_to "Profile", @current_user - # link_to "Profile", [:admin, @current_user] + # # app/views/application/_menu.html.erb + # link_to "Profile", @current_user + # link_to "Profile", [:admin, @current_user] # - # The first +link_to+ will generate "/profile" but the second will generate - # the standard polymorphic URL of "/admin/users/1". + # The first `link_to` will generate "/profile" but the second will generate the + # standard polymorphic URL of "/admin/users/1". # - # You can pass options to a polymorphic mapping - the arity for the block - # needs to be two as the instance is passed as the first argument, e.g: + # You can pass options to a polymorphic mapping - the arity for the block needs + # to be two as the instance is passed as the first argument, e.g: # - # resolve "Basket", anchor: "items" do |basket, options| - # [:basket, options] - # end + # resolve "Basket", anchor: "items" do |basket, options| + # [:basket, options] + # end # - # This generates the URL "/basket#items" because when the last item in an - # array passed to +polymorphic_url+ is a hash then it's treated as options - # to the URL helper that gets called. + # This generates the URL "/basket#items" because when the last item in an array + # passed to `polymorphic_url` is a hash then it's treated as options to the URL + # helper that gets called. # - # NOTE: The +resolve+ method can't be used inside of a scope block such as - # +namespace+ or +scope+ and will raise an error if it detects that it is. + # NOTE: The `resolve` method can't be used inside of a scope block such as + # `namespace` or `scope` and will raise an error if it detects that it is. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2210 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2255 def resolve(*args, &block); end end -# source://actionpack/lib/action_dispatch/routing/mapper.rb#693 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#722 module ActionDispatch::Routing::Mapper::HttpHelpers - # Define a route that only recognizes HTTP DELETE. - # For supported arguments, see match[rdoc-ref:Base#match] + # Define a route that recognizes HTTP CONNECT (and GET) requests. More + # specifically this recognizes HTTP/1 protocol upgrade requests and HTTP/2 + # CONNECT requests with the protocol pseudo header. For supported arguments, + # see [match](rdoc-ref:Base#match) + # + # connect 'live', to: 'live#index' # - # delete 'broccoli', to: 'food#broccoli' + # source://actionpack/lib/action_dispatch/routing/mapper.rb#777 + def connect(*args, &block); end + + # Define a route that only recognizes HTTP DELETE. For supported arguments, see + # [match](rdoc-ref:Base#match) + # + # delete 'broccoli', to: 'food#broccoli' # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#730 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#759 def delete(*args, &block); end - # Define a route that only recognizes HTTP GET. - # For supported arguments, see match[rdoc-ref:Base#match] + # Define a route that only recognizes HTTP GET. For supported arguments, see + # [match](rdoc-ref:Base#match) # - # get 'bacon', to: 'food#bacon' + # get 'bacon', to: 'food#bacon' # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#698 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#727 def get(*args, &block); end - # Define a route that only recognizes HTTP OPTIONS. - # For supported arguments, see match[rdoc-ref:Base#match] + # Define a route that only recognizes HTTP OPTIONS. For supported arguments, see + # [match](rdoc-ref:Base#match) # - # options 'carrots', to: 'food#carrots' + # options 'carrots', to: 'food#carrots' # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#738 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#767 def options(*args, &block); end - # Define a route that only recognizes HTTP PATCH. - # For supported arguments, see match[rdoc-ref:Base#match] + # Define a route that only recognizes HTTP PATCH. For supported arguments, see + # [match](rdoc-ref:Base#match) # - # patch 'bacon', to: 'food#bacon' + # patch 'bacon', to: 'food#bacon' # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#714 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#743 def patch(*args, &block); end - # Define a route that only recognizes HTTP POST. - # For supported arguments, see match[rdoc-ref:Base#match] + # Define a route that only recognizes HTTP POST. For supported arguments, see + # [match](rdoc-ref:Base#match) # - # post 'bacon', to: 'food#bacon' + # post 'bacon', to: 'food#bacon' # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#706 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#735 def post(*args, &block); end - # Define a route that only recognizes HTTP PUT. - # For supported arguments, see match[rdoc-ref:Base#match] + # Define a route that only recognizes HTTP PUT. For supported arguments, see + # [match](rdoc-ref:Base#match) # - # put 'bacon', to: 'food#bacon' + # put 'bacon', to: 'food#bacon' # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#722 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#751 def put(*args, &block); end private - # source://actionpack/lib/action_dispatch/routing/mapper.rb#743 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#782 def map_method(method, args, &block); end end -# source://actionpack/lib/action_dispatch/routing/mapper.rb#72 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#83 class ActionDispatch::Routing::Mapper::Mapping # @return [Mapping] a new instance of Mapping # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#121 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#132 def initialize(set:, ast:, controller:, default_action:, to:, formatted:, via:, options_constraints:, anchor:, scope_params:, options:); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#179 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#190 def application; end # Returns the value of attribute ast. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#76 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#87 def ast; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#183 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#194 def conditions; end # Returns the value of attribute default_action. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#76 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#87 def default_action; end # Returns the value of attribute default_controller. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#76 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#87 def default_controller; end # Returns the value of attribute defaults. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#76 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#87 def defaults; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#172 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#183 def make_route(name, precedence); end # Returns the value of attribute path. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#76 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#87 def path; end # Returns the value of attribute required_defaults. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#76 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#87 def required_defaults; end # Returns the value of attribute requirements. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#76 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#87 def requirements; end # Returns the value of attribute scope_options. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#76 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#87 def scope_options; end # Returns the value of attribute to. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#76 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#87 def to; end private - # source://actionpack/lib/action_dispatch/routing/mapper.rb#318 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#334 def add_controller_module(controller, modyoule); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#279 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#295 def app(blocks); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#337 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#353 def blocks(callable_constraint); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#187 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#198 def build_conditions(current_conditions, request_class); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#291 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#307 def check_controller_and_action(path_params, controller, action); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#306 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#322 def check_part(name, part, path_params, hash); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#344 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#360 def constraints(options, path_params); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#358 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#374 def dispatcher(raise_on_name_error); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#202 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#213 def intern(object); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#275 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#291 def normalize_defaults(options); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#243 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#259 def normalize_format(formatted); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#206 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#217 def normalize_options!(options, path_params, modyoule); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#196 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#207 def request_method; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#362 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#379 def route_source_location; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#237 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#253 def split_constraints(path_params, constraints); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#330 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#346 def translate_controller(controller); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#259 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#275 def verify_regexp_requirements(requirements, wildcard_options); end class << self - # source://actionpack/lib/action_dispatch/routing/mapper.rb#79 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#90 def build(scope, set, ast, controller, default_action, to, via, formatted, options_constraints, anchor, options); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#93 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#104 def check_via(via); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#105 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#116 def normalize_path(path, format); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#117 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#128 def optional_format?(path, format); end end end -# source://actionpack/lib/action_dispatch/routing/mapper.rb#73 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#84 ActionDispatch::Routing::Mapper::Mapping::ANCHOR_CHARACTERS_REGEX = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch/routing/mapper.rb#170 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#181 ActionDispatch::Routing::Mapper::Mapping::JOINED_SEPARATORS = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/routing/mapper.rb#74 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#85 ActionDispatch::Routing::Mapper::Mapping::OPTIONAL_FORMAT_REGEX = T.let(T.unsafe(nil), Regexp) -# Resource routing allows you to quickly declare all of the common routes -# for a given resourceful controller. Instead of declaring separate routes -# for your +index+, +show+, +new+, +edit+, +create+, +update+, and +destroy+ -# actions, a resourceful route declares them in a single line of code: +# Resource routing allows you to quickly declare all of the common routes for a +# given resourceful controller. Instead of declaring separate routes for your +# `index`, `show`, `new`, `edit`, `create`, `update`, and `destroy` actions, a +# resourceful route declares them in a single line of code: # -# resources :photos +# resources :photos # -# Sometimes, you have a resource that clients always look up without -# referencing an ID. A common example, /profile always shows the profile of -# the currently logged in user. In this case, you can use a singular resource -# to map /profile (rather than /profile/:id) to the show action. +# Sometimes, you have a resource that clients always look up without referencing +# an ID. A common example, /profile always shows the profile of the currently +# logged in user. In this case, you can use a singular resource to map /profile +# (rather than /profile/:id) to the show action. # -# resource :profile +# resource :profile # -# It's common to have resources that are logically children of other -# resources: +# It's common to have resources that are logically children of other resources: # -# resources :magazines do -# resources :ads -# end +# resources :magazines do +# resources :ads +# end # # You may wish to organize groups of controllers under a namespace. Most -# commonly, you might group a number of administrative controllers under -# an +admin+ namespace. You would place these controllers under the -# app/controllers/admin directory, and you can group them together -# in your router: +# commonly, you might group a number of administrative controllers under an +# `admin` namespace. You would place these controllers under the +# `app/controllers/admin` directory, and you can group them together in your +# router: # -# namespace "admin" do -# resources :posts, :comments -# end +# namespace "admin" do +# resources :posts, :comments +# end # -# By default the +:id+ parameter doesn't accept dots. If you need to -# use dots as part of the +:id+ parameter add a constraint which -# overrides this restriction, e.g: +# By default the `:id` parameter doesn't accept dots. If you need to use dots as +# part of the `:id` parameter add a constraint which overrides this restriction, +# e.g: # -# resources :articles, id: /[^\/]+/ +# resources :articles, id: /[^\/]+/ # -# This allows any character other than a slash as part of your +:id+. +# This allows any character other than a slash as part of your `:id`. # -# source://actionpack/lib/action_dispatch/routing/mapper.rb#1133 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#1174 module ActionDispatch::Routing::Mapper::Resources # To add a route to the collection: # - # resources :photos do - # collection do - # get 'search' + # resources :photos do + # collection do + # get 'search' + # end # end - # end # - # This will enable \Rails to recognize paths such as /photos/search - # with GET, and route to the search action of +PhotosController+. It will also - # create the search_photos_url and search_photos_path - # route helpers. + # This will enable Rails to recognize paths such as `/photos/search` with GET, + # and route to the search action of `PhotosController`. It will also create the + # `search_photos_url` and `search_photos_path` route helpers. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1511 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1553 def collection(&block); end - # Loads another routes file with the given +name+ located inside the - # +config/routes+ directory. In that file, you can use the normal - # routing DSL, but do not surround it with a - # +Rails.application.routes.draw+ block. + # Loads another routes file with the given `name` located inside the + # `config/routes` directory. In that file, you can use the normal routing DSL, + # but *do not* surround it with a `Rails.application.routes.draw` block. # - # # config/routes.rb - # Rails.application.routes.draw do - # draw :admin # Loads `config/routes/admin.rb` - # draw "third_party/some_gem" # Loads `config/routes/third_party/some_gem.rb` - # end + # # config/routes.rb + # Rails.application.routes.draw do + # draw :admin # Loads `config/routes/admin.rb` + # draw "third_party/some_gem" # Loads `config/routes/third_party/some_gem.rb` + # end # - # # config/routes/admin.rb - # namespace :admin do - # resources :accounts - # end + # # config/routes/admin.rb + # namespace :admin do + # resources :accounts + # end # - # # config/routes/third_party/some_gem.rb - # mount SomeGem::Engine, at: "/some_gem" + # # config/routes/third_party/some_gem.rb + # mount SomeGem::Engine, at: "/some_gem" # - # CAUTION: Use this feature with care. Having multiple routes - # files can negatively impact discoverability and readability. For most - # applications — even those with a few hundred routes — it's easier for - # developers to have a single routes file. + # **CAUTION:** Use this feature with care. Having multiple routes files can + # negatively impact discoverability and readability. For most applications — + # even those with a few hundred routes — it's easier for developers to have a + # single routes file. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1621 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1662 def draw(name); end - # Matches a URL pattern to one or more routes. - # For more information, see match[rdoc-ref:Base#match]. + # Matches a URL pattern to one or more routes. For more information, see + # [match](rdoc-ref:Base#match). # - # match 'path' => 'controller#action', via: :patch - # match 'path', to: 'controller#action', via: :post - # match 'path', 'otherpath', on: :member, via: :get + # match 'path', to: 'controller#action', via: :post + # match 'path', 'otherpath', on: :member, via: :get # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1643 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1683 def match(path, *rest, &block); end # To add a member route, add a member block into the resource block: # - # resources :photos do - # member do - # get 'preview' + # resources :photos do + # member do + # get 'preview' + # end # end - # end # - # This will recognize /photos/1/preview with GET, and route to the - # preview action of +PhotosController+. It will also create the - # preview_photo_url and preview_photo_path helpers. + # This will recognize `/photos/1/preview` with GET, and route to the preview + # action of `PhotosController`. It will also create the `preview_photo_url` and + # `preview_photo_path` helpers. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1532 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1574 def member(&block); end # See ActionDispatch::Routing::Mapper::Scoping#namespace. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1579 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1621 def namespace(path, options = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1558 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1600 def nested(&block); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1548 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1590 def new(&block); end - # Sometimes, you have a resource that clients always look up without - # referencing an ID. A common example, /profile always shows the - # profile of the currently logged in user. In this case, you can use - # a singular resource to map /profile (rather than /profile/:id) to - # the show action: + # Sometimes, you have a resource that clients always look up without referencing + # an ID. A common example, /profile always shows the profile of the currently + # logged in user. In this case, you can use a singular resource to map /profile + # (rather than /profile/:id) to the show action: # - # resource :profile + # resource :profile # - # This creates six different routes in your application, all mapping to - # the +Profiles+ controller (note that the controller is named after - # the plural): + # This creates six different routes in your application, all mapping to the + # `Profiles` controller (note that the controller is named after the plural): # - # GET /profile/new - # GET /profile - # GET /profile/edit - # PATCH/PUT /profile - # DELETE /profile - # POST /profile + # GET /profile/new + # GET /profile + # GET /profile/edit + # PATCH/PUT /profile + # DELETE /profile + # POST /profile # - # If you want instances of a model to work with this resource via - # record identification (e.g. in +form_with+ or +redirect_to+), you - # will need to call resolve[rdoc-ref:CustomUrls#resolve]: + # If you want instances of a model to work with this resource via record + # identification (e.g. in `form_with` or `redirect_to`), you will need to call + # [resolve](rdoc-ref:CustomUrls#resolve): # - # resource :profile - # resolve('Profile') { [:profile] } + # resource :profile + # resolve('Profile') { [:profile] } # - # # Enables this to work with singular routes: - # form_with(model: @profile) {} + # # Enables this to work with singular routes: + # form_with(model: @profile) {} # - # === Options - # Takes same options as resources[rdoc-ref:#resources] + # ### Options + # Takes same options as [resources](rdoc-ref:#resources) # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1303 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1342 def resource(*resources, &block); end - # In \Rails, a resourceful route provides a mapping between HTTP verbs - # and URLs and controller actions. By convention, each action also maps - # to particular CRUD operations in a database. A single entry in the - # routing file, such as + # In Rails, a resourceful route provides a mapping between HTTP verbs and URLs + # and controller actions. By convention, each action also maps to particular + # CRUD operations in a database. A single entry in the routing file, such as # - # resources :photos + # resources :photos # - # creates seven different routes in your application, all mapping to - # the +Photos+ controller: + # creates seven different routes in your application, all mapping to the + # `Photos` controller: # - # GET /photos - # GET /photos/new - # POST /photos - # GET /photos/:id - # GET /photos/:id/edit - # PATCH/PUT /photos/:id - # DELETE /photos/:id + # GET /photos + # GET /photos/new + # POST /photos + # GET /photos/:id + # GET /photos/:id/edit + # PATCH/PUT /photos/:id + # DELETE /photos/:id # # Resources can also be nested infinitely by using this block syntax: # - # resources :photos do - # resources :comments - # end + # resources :photos do + # resources :comments + # end # # This generates the following comments routes: # - # GET /photos/:photo_id/comments - # GET /photos/:photo_id/comments/new - # POST /photos/:photo_id/comments - # GET /photos/:photo_id/comments/:id - # GET /photos/:photo_id/comments/:id/edit - # PATCH/PUT /photos/:photo_id/comments/:id - # DELETE /photos/:photo_id/comments/:id + # GET /photos/:photo_id/comments + # GET /photos/:photo_id/comments/new + # POST /photos/:photo_id/comments + # GET /photos/:photo_id/comments/:id + # GET /photos/:photo_id/comments/:id/edit + # PATCH/PUT /photos/:photo_id/comments/:id + # DELETE /photos/:photo_id/comments/:id # - # === Options - # Takes same options as match[rdoc-ref:Base#match] as well as: + # ### Options + # Takes same options as [match](rdoc-ref:Base#match) as well as: # - # [:path_names] - # Allows you to change the segment component of the +edit+ and +new+ actions. - # Actions not specified are not changed. + # :path_names + # : Allows you to change the segment component of the `edit` and `new` + # actions. Actions not specified are not changed. # - # resources :posts, path_names: { new: "brand_new" } + # resources :posts, path_names: { new: "brand_new" } # - # The above example will now change /posts/new to /posts/brand_new. + # The above example will now change /posts/new to /posts/brand_new. # - # [:path] - # Allows you to change the path prefix for the resource. + # :path + # : Allows you to change the path prefix for the resource. # - # resources :posts, path: 'postings' + # resources :posts, path: 'postings' # - # The resource and all segments will now route to /postings instead of /posts. + # The resource and all segments will now route to /postings instead of + # /posts. # - # [:only] - # Only generate routes for the given actions. + # :only + # : Only generate routes for the given actions. # - # resources :cows, only: :show - # resources :cows, only: [:show, :index] + # resources :cows, only: :show + # resources :cows, only: [:show, :index] # - # [:except] - # Generate all routes except for the given actions. + # :except + # : Generate all routes except for the given actions. # - # resources :cows, except: :show - # resources :cows, except: [:show, :index] + # resources :cows, except: :show + # resources :cows, except: [:show, :index] # - # [:shallow] - # Generates shallow routes for nested resource(s). When placed on a parent resource, - # generates shallow routes for all nested resources. + # :shallow + # : Generates shallow routes for nested resource(s). When placed on a parent + # resource, generates shallow routes for all nested resources. # - # resources :posts, shallow: true do - # resources :comments - # end + # resources :posts, shallow: true do + # resources :comments + # end # - # Is the same as: + # Is the same as: # - # resources :posts do - # resources :comments, except: [:show, :edit, :update, :destroy] - # end - # resources :comments, only: [:show, :edit, :update, :destroy] + # resources :posts do + # resources :comments, except: [:show, :edit, :update, :destroy] + # end + # resources :comments, only: [:show, :edit, :update, :destroy] # - # This allows URLs for resources that otherwise would be deeply nested such - # as a comment on a blog post like /posts/a-long-permalink/comments/1234 - # to be shortened to just /comments/1234. + # This allows URLs for resources that otherwise would be deeply nested such + # as a comment on a blog post like `/posts/a-long-permalink/comments/1234` + # to be shortened to just `/comments/1234`. # - # Set shallow: false on a child resource to ignore a parent's shallow parameter. + # Set `shallow: false` on a child resource to ignore a parent's shallow + # parameter. # - # [:shallow_path] - # Prefixes nested shallow routes with the specified path. + # :shallow_path + # : Prefixes nested shallow routes with the specified path. # - # scope shallow_path: "sekret" do - # resources :posts do - # resources :comments, shallow: true - # end - # end + # scope shallow_path: "sekret" do + # resources :posts do + # resources :comments, shallow: true + # end + # end # - # The +comments+ resource here will have the following routes generated for it: + # The `comments` resource here will have the following routes generated for + # it: # - # post_comments GET /posts/:post_id/comments(.:format) - # post_comments POST /posts/:post_id/comments(.:format) - # new_post_comment GET /posts/:post_id/comments/new(.:format) - # edit_comment GET /sekret/comments/:id/edit(.:format) - # comment GET /sekret/comments/:id(.:format) - # comment PATCH/PUT /sekret/comments/:id(.:format) - # comment DELETE /sekret/comments/:id(.:format) + # post_comments GET /posts/:post_id/comments(.:format) + # post_comments POST /posts/:post_id/comments(.:format) + # new_post_comment GET /posts/:post_id/comments/new(.:format) + # edit_comment GET /sekret/comments/:id/edit(.:format) + # comment GET /sekret/comments/:id(.:format) + # comment PATCH/PUT /sekret/comments/:id(.:format) + # comment DELETE /sekret/comments/:id(.:format) # - # [:shallow_prefix] - # Prefixes nested shallow route names with specified prefix. + # :shallow_prefix + # : Prefixes nested shallow route names with specified prefix. # - # scope shallow_prefix: "sekret" do - # resources :posts do - # resources :comments, shallow: true - # end - # end + # scope shallow_prefix: "sekret" do + # resources :posts do + # resources :comments, shallow: true + # end + # end + # + # The `comments` resource here will have the following routes generated for + # it: # - # The +comments+ resource here will have the following routes generated for it: + # post_comments GET /posts/:post_id/comments(.:format) + # post_comments POST /posts/:post_id/comments(.:format) + # new_post_comment GET /posts/:post_id/comments/new(.:format) + # edit_sekret_comment GET /comments/:id/edit(.:format) + # sekret_comment GET /comments/:id(.:format) + # sekret_comment PATCH/PUT /comments/:id(.:format) + # sekret_comment DELETE /comments/:id(.:format) # - # post_comments GET /posts/:post_id/comments(.:format) - # post_comments POST /posts/:post_id/comments(.:format) - # new_post_comment GET /posts/:post_id/comments/new(.:format) - # edit_sekret_comment GET /comments/:id/edit(.:format) - # sekret_comment GET /comments/:id(.:format) - # sekret_comment PATCH/PUT /comments/:id(.:format) - # sekret_comment DELETE /comments/:id(.:format) + # :format + # : Allows you to specify the default value for optional `format` segment or + # disable it by supplying `false`. # - # [:format] - # Allows you to specify the default value for optional +format+ - # segment or disable it by supplying +false+. + # :param + # : Allows you to override the default param name of `:id` in the URL. # - # [:param] - # Allows you to override the default param name of +:id+ in the URL. # - # === Examples + # ### Examples # - # # routes call +Admin::PostsController+ - # resources :posts, module: "admin" + # # routes call +Admin::PostsController+ + # resources :posts, module: "admin" # - # # resource actions are at /admin/posts. - # resources :posts, path: "admin/posts" + # # resource actions are at /admin/posts. + # resources :posts, path: "admin/posts" # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1469 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1512 def resources(*resources, &block); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1268 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1309 def resources_path_names(options); end - # You can specify what \Rails should route "/" to with the root method: + # You can specify what Rails should route "/" to with the root method: # - # root to: 'pages#main' + # root to: 'pages#main' # - # For options, see +match+, as +root+ uses it internally. + # For options, see `match`, as `root` uses it internally. # # You can also pass a string which will expand # - # root 'pages#main' + # root 'pages#main' # - # You should put the root route at the top of config/routes.rb, - # because this means it will be matched first. As this is the most popular route - # of most \Rails applications, this is beneficial. + # You should put the root route at the top of `config/routes.rb`, because this + # means it will be matched first. As this is the most popular route of most + # Rails applications, this is beneficial. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1690 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1730 def root(path, options = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1587 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1629 def shallow; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1594 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1636 def shallow?; end private # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1754 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1794 def action_options?(options); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1836 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1876 def action_path(name); end # @raise [ArgumentError] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1972 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2017 def add_route(action, controller, options, _path, to, via, formatted, anchor, options_constraints); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1890 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1930 def api_only?; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1749 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1789 def apply_action_options(options); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1715 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1755 def apply_common_behavior_for(method, resources, options, &block); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1812 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1852 def canonical_action?(action); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1957 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2002 def decomposed_match(path, controller, options, _path, to, via, formatted, anchor, options_constraints); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1942 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1987 def get_to_from_path(path, to, action); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1901 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1941 def map_match(paths, options); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1999 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2044 def match_root_route(options); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1852 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1892 def name_for_action(as, action); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1789 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1829 def nested_options; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1770 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1810 def nested_scope?; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1808 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1848 def param_constraint; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1804 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1844 def param_constraint?; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1711 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1751 def parent_resource; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1826 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1866 def path_for_action(action, path); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1894 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1934 def path_scope(path); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1840 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1880 def prefix_name_for_action(as, action); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1766 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1806 def resource_method_scope?; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1781 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1821 def resource_scope(resource, &block); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1762 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1802 def resource_scope?; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1758 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1798 def scope_action_options; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1878 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1918 def set_member_mappings_for_resource; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1798 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1838 def shallow_nesting_depth; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1816 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1856 def shallow_scope; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1953 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1998 def using_match_shorthand?(path); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1774 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1814 def with_scope_level(kind); end end -# source://actionpack/lib/action_dispatch/routing/mapper.rb#1138 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#1179 ActionDispatch::Routing::Mapper::Resources::CANONICAL_ACTIONS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/routing/mapper.rb#1137 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#1178 ActionDispatch::Routing::Mapper::Resources::RESOURCE_OPTIONS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/routing/mapper.rb#1140 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#1181 class ActionDispatch::Routing::Mapper::Resources::Resource # @return [Resource] a new instance of Resource # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1143 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1184 def initialize(entities, api_only, shallow, options = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1168 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1209 def actions; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1176 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1217 def available_actions; end - # Checks for uncountable plurals, and appends "_index" if the plural - # and singular form are the same. + # Checks for uncountable plurals, and appends "_index" if the plural and + # singular form are the same. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1200 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1241 def collection_name; end # Returns the value of attribute path. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1141 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1182 def collection_scope; end # Returns the value of attribute controller. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1141 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1182 def controller; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1160 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1201 def default_actions; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1192 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1233 def member_name; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1210 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1251 def member_scope; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1184 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1225 def name; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1220 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1261 def nested_param; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1224 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1265 def nested_scope; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1216 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1257 def new_scope(new_path); end # Returns the value of attribute param. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1141 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1182 def param; end # Returns the value of attribute path. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1141 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1182 def path; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1188 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1229 def plural; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1204 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1245 def resource_scope; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1228 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1269 def shallow?; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1210 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1251 def shallow_scope; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1232 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1273 def singleton?; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1192 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1233 def singular; end end -# source://actionpack/lib/action_dispatch/routing/mapper.rb#1235 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#1276 class ActionDispatch::Routing::Mapper::Resources::SingletonResource < ::ActionDispatch::Routing::Mapper::Resources::Resource # @return [SingletonResource] a new instance of SingletonResource # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1236 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1277 def initialize(entities, api_only, shallow, options); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1255 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1296 def collection_name; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1243 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1284 def default_actions; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1255 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1296 def member_name; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1141 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1182 def member_scope; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1141 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1182 def nested_scope; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1251 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1292 def plural; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1265 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1306 def singleton?; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1255 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1296 def singular; end end -# CANONICAL_ACTIONS holds all actions that does not need a prefix or -# a path appended since they fit properly in their scope level. +# CANONICAL_ACTIONS holds all actions that does not need a prefix or a path +# appended since they fit properly in their scope level. # -# source://actionpack/lib/action_dispatch/routing/mapper.rb#1136 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#1177 ActionDispatch::Routing::Mapper::Resources::VALID_ON_OPTIONS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/routing/mapper.rb#2224 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#2269 class ActionDispatch::Routing::Mapper::Scope include ::Enumerable # @return [Scope] a new instance of Scope # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2234 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2279 def initialize(hash, parent = T.unsafe(nil), scope_level = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2293 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2338 def [](key); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2260 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2305 def action_name(name_prefix, prefix, collection_name, member_name); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2300 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2346 def each; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2308 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2342 def frame; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2240 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2285 def nested?; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2285 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2330 def new(hash); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2289 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2334 def new_level(level); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2244 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2289 def null?; end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2281 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2326 def options; end # Returns the value of attribute parent. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2232 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2277 def parent; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2256 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2301 def resource_method_scope?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2277 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2322 def resource_scope?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2252 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2297 def resources?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2248 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2293 def root?; end # Returns the value of attribute scope_level. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#2232 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#2277 def scope_level; end end -# source://actionpack/lib/action_dispatch/routing/mapper.rb#2310 -ActionDispatch::Routing::Mapper::Scope::NULL = T.let(T.unsafe(nil), ActionDispatch::Routing::Mapper::Scope) - -# source://actionpack/lib/action_dispatch/routing/mapper.rb#2225 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#2270 ActionDispatch::Routing::Mapper::Scope::OPTIONS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/routing/mapper.rb#2230 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#2275 ActionDispatch::Routing::Mapper::Scope::RESOURCE_METHOD_SCOPES = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/routing/mapper.rb#2229 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#2274 ActionDispatch::Routing::Mapper::Scope::RESOURCE_SCOPES = T.let(T.unsafe(nil), Array) -# You may wish to organize groups of controllers under a namespace. -# Most commonly, you might group a number of administrative controllers -# under an +admin+ namespace. You would place these controllers under -# the app/controllers/admin directory, and you can group them -# together in your router: +# source://actionpack/lib/action_dispatch/routing/mapper.rb#2354 +ActionDispatch::Routing::Mapper::Scope::ROOT = T.let(T.unsafe(nil), ActionDispatch::Routing::Mapper::Scope) + +# You may wish to organize groups of controllers under a namespace. Most +# commonly, you might group a number of administrative controllers under an +# `admin` namespace. You would place these controllers under the +# `app/controllers/admin` directory, and you can group them together in your +# router: # -# namespace "admin" do -# resources :posts, :comments -# end +# namespace "admin" do +# resources :posts, :comments +# end # # This will create a number of routes for each of the posts and comments -# controller. For +Admin::PostsController+, \Rails will create: +# controller. For `Admin::PostsController`, Rails will create: # -# GET /admin/posts -# GET /admin/posts/new -# POST /admin/posts -# GET /admin/posts/1 -# GET /admin/posts/1/edit -# PATCH/PUT /admin/posts/1 -# DELETE /admin/posts/1 +# GET /admin/posts +# GET /admin/posts/new +# POST /admin/posts +# GET /admin/posts/1 +# GET /admin/posts/1/edit +# PATCH/PUT /admin/posts/1 +# DELETE /admin/posts/1 # # If you want to route /posts (without the prefix /admin) to -# +Admin::PostsController+, you could use +# `Admin::PostsController`, you could use # -# scope module: "admin" do -# resources :posts -# end +# scope module: "admin" do +# resources :posts +# end # # or, for a single case # -# resources :posts, module: "admin" +# resources :posts, module: "admin" # -# If you want to route /admin/posts to +PostsController+ -# (without the Admin:: module prefix), you could use +# If you want to route /admin/posts to `PostsController` (without the `Admin::` +# module prefix), you could use # -# scope "/admin" do -# resources :posts -# end +# scope "/admin" do +# resources :posts +# end # # or, for a single case # -# resources :posts, path: "/admin/posts" +# resources :posts, path: "/admin/posts" # -# In each of these cases, the named routes remain the same as if you did -# not use scope. In the last case, the following paths map to -# +PostsController+: +# In each of these cases, the named routes remain the same as if you did not use +# scope. In the last case, the following paths map to `PostsController`: # -# GET /admin/posts -# GET /admin/posts/new -# POST /admin/posts -# GET /admin/posts/1 -# GET /admin/posts/1/edit -# PATCH/PUT /admin/posts/1 -# DELETE /admin/posts/1 +# GET /admin/posts +# GET /admin/posts/new +# POST /admin/posts +# GET /admin/posts/1 +# GET /admin/posts/1/edit +# PATCH/PUT /admin/posts/1 +# DELETE /admin/posts/1 # -# source://actionpack/lib/action_dispatch/routing/mapper.rb#805 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#843 module ActionDispatch::Routing::Mapper::Scoping - # === Parameter Restriction - # Allows you to constrain the nested routes based on a set of rules. - # For instance, in order to change the routes to allow for a dot character in the +id+ parameter: + # ### Parameter Restriction + # Allows you to constrain the nested routes based on a set of rules. For + # instance, in order to change the routes to allow for a dot character in the + # `id` parameter: # - # constraints(id: /\d+\.\d+/) do - # resources :posts - # end + # constraints(id: /\d+\.\d+/) do + # resources :posts + # end # - # Now routes such as +/posts/1+ will no longer be valid, but +/posts/1.1+ will be. - # The +id+ parameter must match the constraint passed in for this example. + # Now routes such as `/posts/1` will no longer be valid, but `/posts/1.1` will + # be. The `id` parameter must match the constraint passed in for this example. # # You may use this to also restrict other parameters: # - # resources :posts do - # constraints(post_id: /\d+\.\d+/) do - # resources :comments + # resources :posts do + # constraints(post_id: /\d+\.\d+/) do + # resources :comments + # end # end - # end # - # === Restricting based on IP + # ### Restricting based on IP # # Routes can also be constrained to an IP or a certain range of IP addresses: # - # constraints(ip: /192\.168\.\d+\.\d+/) do - # resources :posts - # end + # constraints(ip: /192\.168\.\d+\.\d+/) do + # resources :posts + # end # - # Any user connecting from the 192.168.* range will be able to see this resource, - # where as any user connecting outside of this range will be told there is no such route. + # Any user connecting from the 192.168.* range will be able to see this + # resource, where as any user connecting outside of this range will be told + # there is no such route. # - # === Dynamic request matching + # ### Dynamic request matching # # Requests to routes can be constrained based on specific criteria: # - # constraints(-> (req) { /iPhone/.match?(req.env["HTTP_USER_AGENT"]) }) do - # resources :iphones - # end + # constraints(-> (req) { /iPhone/.match?(req.env["HTTP_USER_AGENT"]) }) do + # resources :iphones + # end # - # You are able to move this logic out into a class if it is too complex for routes. - # This class must have a +matches?+ method defined on it which either returns +true+ - # if the user should be given access to that route, or +false+ if the user should not. + # You are able to move this logic out into a class if it is too complex for + # routes. This class must have a `matches?` method defined on it which either + # returns `true` if the user should be given access to that route, or `false` if + # the user should not. # - # class Iphone - # def self.matches?(request) - # /iPhone/.match?(request.env["HTTP_USER_AGENT"]) - # end - # end + # class Iphone + # def self.matches?(request) + # /iPhone/.match?(request.env["HTTP_USER_AGENT"]) + # end + # end # - # An expected place for this code would be +lib/constraints+. + # An expected place for this code would be `lib/constraints`. # # This class is then used like this: # - # constraints(Iphone) do - # resources :iphones - # end + # constraints(Iphone) do + # resources :iphones + # end # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1010 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1051 def constraints(constraints = T.unsafe(nil), &block); end # Scopes routes to a specific controller # - # controller "food" do - # match "bacon", action: :bacon, via: :get - # end + # controller "food" do + # match "bacon", action: :bacon, via: :get + # end # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#895 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#933 def controller(controller); end # Allows you to set default parameters for a route, such as this: - # defaults id: 'home' do - # match 'scoped_pages/(:id)', to: 'pages#show' - # end - # Using this, the +:id+ parameter here will default to 'home'. # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1019 + # defaults id: 'home' do + # match 'scoped_pages/(:id)', to: 'pages#show' + # end + # + # Using this, the `:id` parameter here will default to 'home'. + # + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1062 def defaults(defaults = T.unsafe(nil)); end # Scopes routes to a specific namespace. For example: # - # namespace :admin do - # resources :posts - # end + # namespace :admin do + # resources :posts + # end # # This generates the following routes: # - # admin_posts GET /admin/posts(.:format) admin/posts#index - # admin_posts POST /admin/posts(.:format) admin/posts#create - # new_admin_post GET /admin/posts/new(.:format) admin/posts#new - # edit_admin_post GET /admin/posts/:id/edit(.:format) admin/posts#edit - # admin_post GET /admin/posts/:id(.:format) admin/posts#show - # admin_post PATCH/PUT /admin/posts/:id(.:format) admin/posts#update - # admin_post DELETE /admin/posts/:id(.:format) admin/posts#destroy + # admin_posts GET /admin/posts(.:format) admin/posts#index + # admin_posts POST /admin/posts(.:format) admin/posts#create + # new_admin_post GET /admin/posts/new(.:format) admin/posts#new + # edit_admin_post GET /admin/posts/:id/edit(.:format) admin/posts#edit + # admin_post GET /admin/posts/:id(.:format) admin/posts#show + # admin_post PATCH/PUT /admin/posts/:id(.:format) admin/posts#update + # admin_post DELETE /admin/posts/:id(.:format) admin/posts#destroy # - # === Options + # ### Options # - # The +:path+, +:as+, +:module+, +:shallow_path+, and +:shallow_prefix+ - # options all default to the name of the namespace. + # The `:path`, `:as`, `:module`, `:shallow_path`, and `:shallow_prefix` options + # all default to the name of the namespace. # - # For options, see Base#match. For +:shallow_path+ option, see - # Resources#resources. + # For options, see `Base#match`. For `:shallow_path` option, see + # `Resources#resources`. # - # # accessible through /sekret/posts rather than /admin/posts - # namespace :admin, path: "sekret" do - # resources :posts - # end + # # accessible through /sekret/posts rather than /admin/posts + # namespace :admin, path: "sekret" do + # resources :posts + # end # - # # maps to +Sekret::PostsController+ rather than +Admin::PostsController+ - # namespace :admin, module: "sekret" do - # resources :posts - # end + # # maps to +Sekret::PostsController+ rather than +Admin::PostsController+ + # namespace :admin, module: "sekret" do + # resources :posts + # end # - # # generates +sekret_posts_path+ rather than +admin_posts_path+ - # namespace :admin, as: "sekret" do - # resources :posts - # end + # # generates +sekret_posts_path+ rather than +admin_posts_path+ + # namespace :admin, as: "sekret" do + # resources :posts + # end # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#940 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#978 def namespace(path, options = T.unsafe(nil), &block); end # Scopes a set of routes to the given default options. # # Take the following route definition as an example: # - # scope path: ":account_id", as: "account" do - # resources :projects - # end + # scope path: ":account_id", as: "account" do + # resources :projects + # end # - # This generates helpers such as +account_projects_path+, just like +resources+ does. - # The difference here being that the routes generated are like /:account_id/projects, - # rather than /accounts/:account_id/projects. + # This generates helpers such as `account_projects_path`, just like `resources` + # does. The difference here being that the routes generated are like + # /:account_id/projects, rather than /accounts/:account_id/projects. # - # === Options + # ### Options # - # Takes same options as Base#match and Resources#resources. + # Takes same options as `Base#match` and `Resources#resources`. # - # # route /posts (without the prefix /admin) to +Admin::PostsController+ - # scope module: "admin" do - # resources :posts - # end + # # route /posts (without the prefix /admin) to +Admin::PostsController+ + # scope module: "admin" do + # resources :posts + # end # - # # prefix the posts resource's requests with '/admin' - # scope path: "/admin" do - # resources :posts - # end + # # prefix the posts resource's requests with '/admin' + # scope path: "/admin" do + # resources :posts + # end # - # # prefix the routing helper name: +sekret_posts_path+ instead of +posts_path+ - # scope as: "sekret" do - # resources :posts - # end + # # prefix the routing helper name: +sekret_posts_path+ instead of +posts_path+ + # scope as: "sekret" do + # resources :posts + # end # - # source://actionpack/lib/action_dispatch/routing/mapper.rb#836 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#874 def scope(*args); end private - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1051 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1094 def merge_action_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1035 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1078 def merge_as_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1075 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1118 def merge_blocks_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1067 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1110 def merge_constraints_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1047 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1090 def merge_controller_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1071 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1114 def merge_defaults_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1059 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1102 def merge_format_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1043 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1086 def merge_module_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1081 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1124 def merge_options_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1063 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1106 def merge_path_names_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1027 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1070 def merge_path_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1031 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1074 def merge_shallow_path_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1039 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1082 def merge_shallow_prefix_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1085 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1128 def merge_shallow_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1089 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1132 def merge_to_scope(parent, child); end - # source://actionpack/lib/action_dispatch/routing/mapper.rb#1055 + # source://actionpack/lib/action_dispatch/routing/mapper.rb#1098 def merge_via_scope(parent, child); end end -# source://actionpack/lib/action_dispatch/routing/mapper.rb#888 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#926 ActionDispatch::Routing::Mapper::Scoping::POISON = T.let(T.unsafe(nil), Object) -# source://actionpack/lib/action_dispatch/routing/mapper.rb#13 +# source://actionpack/lib/action_dispatch/routing/mapper.rb#24 ActionDispatch::Routing::Mapper::URL_OPTIONS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/routing/redirection.rb#112 +# source://actionpack/lib/action_dispatch/routing/redirection.rb#114 class ActionDispatch::Routing::OptionRedirect < ::ActionDispatch::Routing::Redirect - # source://actionpack/lib/action_dispatch/routing/redirection.rb#141 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#143 def inspect; end - # source://actionpack/lib/action_dispatch/routing/redirection.rb#11 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#13 def options; end - # source://actionpack/lib/action_dispatch/routing/redirection.rb#115 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#117 def path(params, request); end end -# source://actionpack/lib/action_dispatch/routing/redirection.rb#87 +# source://actionpack/lib/action_dispatch/routing/redirection.rb#89 class ActionDispatch::Routing::PathRedirect < ::ActionDispatch::Routing::Redirect - # source://actionpack/lib/action_dispatch/routing/redirection.rb#102 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#104 def inspect; end - # source://actionpack/lib/action_dispatch/routing/redirection.rb#90 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#92 def path(params, request); end private # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/redirection.rb#107 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#109 def interpolation_required?(string, params); end end -# source://actionpack/lib/action_dispatch/routing/redirection.rb#88 +# source://actionpack/lib/action_dispatch/routing/redirection.rb#90 ActionDispatch::Routing::PathRedirect::URL_PARTS = T.let(T.unsafe(nil), Regexp) -# = Action Dispatch Routing \PolymorphicRoutes +# # Action Dispatch Routing PolymorphicRoutes # -# Polymorphic URL helpers are methods for smart resolution to a named route call when -# given an Active Record model instance. They are to be used in combination with -# ActionController::Resources. +# Polymorphic URL helpers are methods for smart resolution to a named route call +# when given an Active Record model instance. They are to be used in combination +# with ActionController::Resources. # -# These methods are useful when you want to generate the correct URL or path to a RESTful -# resource without having to know the exact type of the record in question. +# These methods are useful when you want to generate the correct URL or path to +# a RESTful resource without having to know the exact type of the record in +# question. # -# Nested resources and/or namespaces are also supported, as illustrated in the example: +# Nested resources and/or namespaces are also supported, as illustrated in the +# example: # -# polymorphic_url([:admin, @article, @comment]) +# polymorphic_url([:admin, @article, @comment]) # # results in: # -# admin_article_comment_url(@article, @comment) +# admin_article_comment_url(@article, @comment) # -# == Usage within the framework +# ## Usage within the framework # -# Polymorphic URL helpers are used in a number of places throughout the \Rails framework: +# Polymorphic URL helpers are used in a number of places throughout the Rails +# framework: # -# * url_for, so you can use it with a record as the argument, e.g. -# url_for(@article); -# * ActionView::Helpers::FormHelper uses polymorphic_path, so you can write -# form_for(@article) without having to specify :url parameter for the form -# action; -# * redirect_to (which, in fact, uses url_for) so you can write -# redirect_to(post) in your controllers; -# * ActionView::Helpers::AtomFeedHelper, so you don't have to explicitly specify URLs -# for feed entries. +# * `url_for`, so you can use it with a record as the argument, e.g. +# `url_for(@article)`; +# * ActionView::Helpers::FormHelper uses `polymorphic_path`, so you can write +# `form_for(@article)` without having to specify `:url` parameter for the +# form action; +# * `redirect_to` (which, in fact, uses `url_for`) so you can write +# `redirect_to(post)` in your controllers; +# * ActionView::Helpers::AtomFeedHelper, so you don't have to explicitly +# specify URLs for feed entries. # -# == Prefixed polymorphic helpers # -# In addition to polymorphic_url and polymorphic_path methods, a -# number of prefixed helpers are available as a shorthand to action: "..." -# in options. Those are: +# ## Prefixed polymorphic helpers +# +# In addition to `polymorphic_url` and `polymorphic_path` methods, a number of +# prefixed helpers are available as a shorthand to `action: "..."` in options. +# Those are: +# +# * `edit_polymorphic_url`, `edit_polymorphic_path` +# * `new_polymorphic_url`, `new_polymorphic_path` # -# * edit_polymorphic_url, edit_polymorphic_path -# * new_polymorphic_url, new_polymorphic_path # # Example usage: # -# edit_polymorphic_path(@post) # => "/posts/1/edit" -# polymorphic_path(@post, format: :pdf) # => "/posts/1.pdf" +# edit_polymorphic_path(@post) # => "/posts/1/edit" +# polymorphic_path(@post, format: :pdf) # => "/posts/1.pdf" # -# == Usage with mounted engines +# ## Usage with mounted engines # # If you are using a mounted engine and you need to use a polymorphic_url # pointing at the engine's routes, pass in the engine's route proxy as the first # argument to the method. For example: # -# polymorphic_url([blog, @post]) # calls blog.post_path(@post) -# form_for([blog, @post]) # => "/blog/posts/1" +# polymorphic_url([blog, @post]) # calls blog.post_path(@post) +# form_for([blog, @post]) # => "/blog/posts/1" # -# source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#59 +# source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#66 module ActionDispatch::Routing::PolymorphicRoutes - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#155 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#162 def edit_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#151 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#158 def edit_polymorphic_url(record_or_hash, options = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#155 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#162 def new_polymorphic_path(record_or_hash, options = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#151 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#158 def new_polymorphic_url(record_or_hash, options = T.unsafe(nil)); end # Returns the path component of a URL for the given record. # - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#126 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#133 def polymorphic_path(record_or_hash_or_array, options = T.unsafe(nil)); end - # Constructs a call to a named RESTful route for the given record and returns the - # resulting URL string. For example: + # Constructs a call to a named RESTful route for the given record and returns + # the resulting URL string. For example: # - # # calls post_url(post) - # polymorphic_url(post) # => "http://example.com/posts/1" - # polymorphic_url([blog, post]) # => "http://example.com/blogs/1/posts/1" - # polymorphic_url([:admin, blog, post]) # => "http://example.com/admin/blogs/1/posts/1" - # polymorphic_url([user, :blog, post]) # => "http://example.com/users/1/blog/posts/1" - # polymorphic_url(Comment) # => "http://example.com/comments" + # # calls post_url(post) + # polymorphic_url(post) # => "http://example.com/posts/1" + # polymorphic_url([blog, post]) # => "http://example.com/blogs/1/posts/1" + # polymorphic_url([:admin, blog, post]) # => "http://example.com/admin/blogs/1/posts/1" + # polymorphic_url([user, :blog, post]) # => "http://example.com/users/1/blog/posts/1" + # polymorphic_url(Comment) # => "http://example.com/comments" # - # ==== Options + # #### Options # - # * :action - Specifies the action prefix for the named route: - # :new or :edit. Default is no prefix. - # * :routing_type - Allowed values are :path or :url. - # Default is :url. + # * `:action` - Specifies the action prefix for the named route: `:new` or + # `:edit`. Default is no prefix. + # * `:routing_type` - Allowed values are `:path` or `:url`. Default is `:url`. # - # Also includes all the options from url_for. These include such - # things as :anchor or :trailing_slash. Example usage - # is given below: # - # polymorphic_url([blog, post], anchor: 'my_anchor') - # # => "http://example.com/blogs/1/posts/1#my_anchor" - # polymorphic_url([blog, post], anchor: 'my_anchor', script_name: "/my_app") - # # => "http://example.com/my_app/blogs/1/posts/1#my_anchor" + # Also includes all the options from `url_for`. These include such things as + # `:anchor` or `:trailing_slash`. Example usage is given below: # - # For all of these options, see the documentation for {url_for}[rdoc-ref:ActionDispatch::Routing::UrlFor]. + # polymorphic_url([blog, post], anchor: 'my_anchor') + # # => "http://example.com/blogs/1/posts/1#my_anchor" + # polymorphic_url([blog, post], anchor: 'my_anchor', script_name: "/my_app") + # # => "http://example.com/my_app/blogs/1/posts/1#my_anchor" # - # ==== Functionality + # For all of these options, see the documentation for + # [url_for](rdoc-ref:ActionDispatch::Routing::UrlFor). # - # # an Article record - # polymorphic_url(record) # same as article_url(record) + # #### Functionality # - # # a Comment record - # polymorphic_url(record) # same as comment_url(record) + # # an Article record + # polymorphic_url(record) # same as article_url(record) # - # # it recognizes new records and maps to the collection - # record = Comment.new - # polymorphic_url(record) # same as comments_url() + # # a Comment record + # polymorphic_url(record) # same as comment_url(record) # - # # the class of a record will also map to the collection - # polymorphic_url(Comment) # same as comments_url() + # # it recognizes new records and maps to the collection + # record = Comment.new + # polymorphic_url(record) # same as comments_url() # - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#103 + # # the class of a record will also map to the collection + # polymorphic_url(Comment) # same as comments_url() + # + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#110 def polymorphic_url(record_or_hash_or_array, options = T.unsafe(nil)); end private - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#170 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#177 def polymorphic_mapping(record); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#166 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#173 def polymorphic_path_for_action(action, record_or_hash, options); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#162 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#169 def polymorphic_url_for_action(action, record_or_hash, options); end end -# source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#178 +# source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#185 class ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder # @return [HelperMethodBuilder] a new instance of HelperMethodBuilder # - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#241 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#248 def initialize(key_strategy, prefix, suffix); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#255 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#262 def handle_class(klass); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#259 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#266 def handle_class_call(target, klass); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#286 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#293 def handle_list(list); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#263 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#270 def handle_model(record); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#277 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#284 def handle_model_call(target, record); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#247 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#254 def handle_string(record); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#251 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#258 def handle_string_call(target, str); end # Returns the value of attribute prefix. # - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#239 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#246 def prefix; end # Returns the value of attribute suffix. # - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#239 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#246 def suffix; end private - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#340 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#347 def get_method_for_class(klass); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#345 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#352 def get_method_for_string(str); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#332 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#339 def polymorphic_mapping(target, record); end class << self - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#189 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#196 def build(action, type); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#181 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#188 def get(action, type); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#187 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#194 def path; end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#203 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#210 def plural(prefix, suffix); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#207 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#214 def polymorphic_method(recipient, record_or_hash_or_array, action, type, options); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#199 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#206 def singular(prefix, suffix); end - # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#186 + # source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#193 def url; end end end -# source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#179 +# source://actionpack/lib/action_dispatch/routing/polymorphic_routes.rb#186 ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder::CACHE = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/routing/redirection.rb#10 +# source://actionpack/lib/action_dispatch/routing/redirection.rb#12 class ActionDispatch::Routing::Redirect < ::ActionDispatch::Routing::Endpoint # @return [Redirect] a new instance of Redirect # - # source://actionpack/lib/action_dispatch/routing/redirection.rb#13 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#15 def initialize(status, block); end # Returns the value of attribute block. # - # source://actionpack/lib/action_dispatch/routing/redirection.rb#11 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#13 def block; end - # source://actionpack/lib/action_dispatch/routing/redirection.rb#33 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#35 def build_response(req); end - # source://actionpack/lib/action_dispatch/routing/redirection.rb#20 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#22 def call(env); end - # source://actionpack/lib/action_dispatch/routing/redirection.rb#65 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#67 def inspect; end - # source://actionpack/lib/action_dispatch/routing/redirection.rb#61 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#63 def path(params, request); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/redirection.rb#18 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#20 def redirect?; end # Returns the value of attribute status. # - # source://actionpack/lib/action_dispatch/routing/redirection.rb#11 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#13 def status; end private - # source://actionpack/lib/action_dispatch/routing/redirection.rb#74 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#76 def escape(params); end - # source://actionpack/lib/action_dispatch/routing/redirection.rb#78 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#80 def escape_fragment(params); end - # source://actionpack/lib/action_dispatch/routing/redirection.rb#82 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#84 def escape_path(params); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/redirection.rb#70 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#72 def relative_path?(path); end end -# source://actionpack/lib/action_dispatch/routing/redirection.rb#146 +# source://actionpack/lib/action_dispatch/routing/redirection.rb#148 module ActionDispatch::Routing::Redirection # Redirect any path to another path: # - # get "/stories" => redirect("/posts") + # get "/stories" => redirect("/posts") # - # This will redirect the user, while ignoring certain parts of the request, including query string, etc. - # /stories, /stories?foo=bar, etc all redirect to /posts. + # This will redirect the user, while ignoring certain parts of the request, + # including query string, etc. `/stories`, `/stories?foo=bar`, etc all redirect + # to `/posts`. # - # The redirect will use a 301 Moved Permanently status code by - # default. This can be overridden with the +:status+ option: + # The redirect will use a `301 Moved Permanently` status code by default. This + # can be overridden with the `:status` option: # - # get "/stories" => redirect("/posts", status: 307) + # get "/stories" => redirect("/posts", status: 307) # # You can also use interpolation in the supplied redirect argument: # - # get 'docs/:article', to: redirect('/wiki/%{article}') + # get 'docs/:article', to: redirect('/wiki/%{article}') # - # Note that if you return a path without a leading slash then the URL is prefixed with the - # current SCRIPT_NAME environment variable. This is typically '/' but may be different in - # a mounted engine or where the application is deployed to a subdirectory of a website. + # Note that if you return a path without a leading slash then the URL is + # prefixed with the current SCRIPT_NAME environment variable. This is typically + # '/' but may be different in a mounted engine or where the application is + # deployed to a subdirectory of a website. # # Alternatively you can use one of the other syntaxes: # - # The block version of redirect allows for the easy encapsulation of any logic associated with - # the redirect in question. Either the params and request are supplied as arguments, or just - # params, depending of how many arguments your block accepts. A string is required as a - # return value. + # The block version of redirect allows for the easy encapsulation of any logic + # associated with the redirect in question. Either the params and request are + # supplied as arguments, or just params, depending of how many arguments your + # block accepts. A string is required as a return value. # - # get 'jokes/:number', to: redirect { |params, request| - # path = (params[:number].to_i.even? ? "wheres-the-beef" : "i-love-lamp") - # "http://#{request.host_with_port}/#{path}" - # } + # get 'jokes/:number', to: redirect { |params, request| + # path = (params[:number].to_i.even? ? "wheres-the-beef" : "i-love-lamp") + # "http://#{request.host_with_port}/#{path}" + # } # - # Note that the do end syntax for the redirect block wouldn't work, as Ruby would pass - # the block to +get+ instead of +redirect+. Use { ... } instead. + # Note that the `do end` syntax for the redirect block wouldn't work, as Ruby + # would pass the block to `get` instead of `redirect`. Use `{ ... }` instead. # - # The options version of redirect allows you to supply only the parts of the URL which need - # to change, it also supports interpolation of the path similar to the first example. + # The options version of redirect allows you to supply only the parts of the URL + # which need to change, it also supports interpolation of the path similar to + # the first example. # - # get 'stores/:name', to: redirect(subdomain: 'stores', path: '/%{name}') - # get 'stores/:name(*all)', to: redirect(subdomain: 'stores', path: '/%{name}%{all}') - # get '/stories', to: redirect(path: '/posts') + # get 'stores/:name', to: redirect(subdomain: 'stores', path: '/%{name}') + # get 'stores/:name(*all)', to: redirect(subdomain: 'stores', path: '/%{name}%{all}') + # get '/stories', to: redirect(path: '/posts') # - # This will redirect the user, while changing only the specified parts of the request, - # for example the +path+ option in the last example. - # /stories, /stories?foo=bar, redirect to /posts and /posts?foo=bar respectively. + # This will redirect the user, while changing only the specified parts of the + # request, for example the `path` option in the last example. `/stories`, + # `/stories?foo=bar`, redirect to `/posts` and `/posts?foo=bar` respectively. # - # Finally, an object which responds to call can be supplied to redirect, allowing you to reuse - # common redirect routes. The call method must accept two arguments, params and request, and return - # a string. + # Finally, an object which responds to call can be supplied to redirect, + # allowing you to reuse common redirect routes. The call method must accept two + # arguments, params and request, and return a string. # - # get 'accounts/:name' => redirect(SubdomainRedirector.new('api')) + # get 'accounts/:name' => redirect(SubdomainRedirector.new('api')) # # @raise [ArgumentError] # - # source://actionpack/lib/action_dispatch/routing/redirection.rb#199 + # source://actionpack/lib/action_dispatch/routing/redirection.rb#204 def redirect(*args, &block); end end -# :stopdoc: +# The RouteSet contains a collection of Route instances, representing the routes +# typically defined in `config/routes.rb`. # -# source://actionpack/lib/action_dispatch/routing/route_set.rb#14 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#17 class ActionDispatch::Routing::RouteSet # @return [RouteSet] a new instance of RouteSet # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#366 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#388 def initialize(config = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#649 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#676 def add_polymorphic_mapping(klass, options, &block); end # @raise [ArgumentError] # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#618 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#645 def add_route(mapping, name); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#653 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#680 def add_url_helper(name, options, &block); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#396 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#419 def api_only?; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#435 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#466 def append(&block); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#879 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#905 def call(env); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#459 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#490 def clear!; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#409 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#440 def default_env; end - # Returns the value of attribute default_scope. - # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#336 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#423 def default_scope; end - # Sets the attribute default_scope - # - # @param value the value to set the attribute default_scope to. - # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#336 - def default_scope=(_arg0); end + # source://actionpack/lib/action_dispatch/routing/route_set.rb#427 + def default_scope=(new_default_scope); end # Returns the value of attribute default_url_options. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#338 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#356 def default_url_options; end # Sets the attribute default_url_options # # @param value the value to set the attribute default_url_options to. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#338 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#356 def default_url_options=(_arg0); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#481 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#511 def define_mounted_helper(name, script_namer = T.unsafe(nil)); end # Returns the value of attribute disable_clear_and_finalize. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#337 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#355 def disable_clear_and_finalize; end # Sets the attribute disable_clear_and_finalize # # @param value the value to set the attribute disable_clear_and_finalize to. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#337 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#355 def disable_clear_and_finalize=(_arg0); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#428 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#459 def draw(&block); end # Returns the value of attribute draw_paths. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#338 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#356 def draw_paths; end # Sets the attribute draw_paths # # @param value the value to set the attribute draw_paths to. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#338 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#356 def draw_paths=(_arg0); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#386 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#408 def eager_load!; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#614 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#641 def empty?; end # Returns the value of attribute env_key. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#339 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#357 def env_key; end - # Generate the path indicated by the arguments, and return an array of - # the keys that were not used to generate it. + # Generate the path indicated by the arguments, and return an array of the keys + # that were not used to generate it. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#794 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#820 def extra_keys(options, recall = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#453 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#484 def finalize!; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#822 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#848 def find_script_name(options); end # Returns the value of attribute formatter. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#336 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#354 def formatter; end # Sets the attribute formatter # # @param value the value to set the attribute formatter to. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#336 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#354 def formatter=(_arg0); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#798 + # Returns a Route matching the given requirements, or `nil` if none are found. + # + # This is intended for use by tools such as Language Servers. + # + # Given the routes are defined as: + # + # resources :posts + # + # Then the following will return the Route for the `show` action: + # + # Rails.application.routes.from_requirements(controller: "posts", action: "show") + # + # source://actionpack/lib/action_dispatch/routing/route_set.rb#29 + def from_requirements(requirements); end + + # source://actionpack/lib/action_dispatch/routing/route_set.rb#824 def generate_extras(options, recall = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#508 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#538 def generate_url_helpers(supports_path); end - # Since the router holds references to many parts of the system - # like engines, controllers and the application itself, inspecting - # the route set can actually be really slow, therefore we default - # alias inspect to to_s. + # Since the router holds references to many parts of the system like engines, + # controllers and the application itself, inspecting the route set can actually + # be really slow, therefore we default alias inspect to to_s. def inspect; end - # Contains all the mounted helpers across different - # engines and the `main_app` helper for the application. - # You can include this in your classes if you want to - # access routes for other engines. + # Contains all the mounted helpers across different engines and the `main_app` + # helper for the application. You can include this in your classes if you want + # to access routes for other engines. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#477 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#507 def mounted_helpers; end # Returns the value of attribute named_routes. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#336 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#354 def named_routes; end # Sets the attribute named_routes # # @param value the value to set the attribute named_routes to. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#336 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#354 def named_routes=(_arg0); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#818 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#844 def optimize_routes_generation?; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#826 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#852 def path_for(options, route_name = T.unsafe(nil), reserved = T.unsafe(nil)); end # Returns the value of attribute polymorphic_mappings. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#339 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#357 def polymorphic_mappings; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#439 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#470 def prepend(&block); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#885 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#911 def recognize_path(path, environment = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#900 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#926 def recognize_path_with_request(req, path, extras, raise_on_missing: T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#392 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#415 def relative_url_root; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#400 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#431 def request_class; end # Returns the value of attribute resources_path_names. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#337 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#355 def resources_path_names; end # Sets the attribute resources_path_names # # @param value the value to set the attribute resources_path_names to. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#337 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#355 def resources_path_names=(_arg0); end # Returns the value of attribute router. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#336 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#354 def router; end # Sets the attribute router # # @param value the value to set the attribute router to. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#336 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#354 def router=(_arg0); end # Returns the value of attribute set. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#336 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#354 def routes; end # Returns the value of attribute set. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#336 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#354 def set; end # Sets the attribute set # # @param value the value to set the attribute set to. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#336 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#354 def set=(_arg0); end - # The +options+ argument must be a hash whose keys are *symbols*. + # The `options` argument must be a hash whose keys are **symbols**. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#831 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#857 def url_for(options, route_name = T.unsafe(nil), url_strategy = T.unsafe(nil), method_name = T.unsafe(nil), reserved = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#500 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#530 def url_helpers(supports_path = T.unsafe(nil)); end private - # source://actionpack/lib/action_dispatch/routing/route_set.rb#443 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#474 def eval_block(block); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#809 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#835 def generate(route_name, options, recall = T.unsafe(nil), method_name = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#404 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#435 def make_request(env); end class << self - # source://actionpack/lib/action_dispatch/routing/route_set.rb#343 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#361 def default_resources_path_names; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#347 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#365 def new_with_config(config); end end end -# source://actionpack/lib/action_dispatch/routing/route_set.rb#362 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#384 class ActionDispatch::Routing::RouteSet::Config < ::Struct # Returns the value of attribute api_only # @@ -18385,6 +19006,17 @@ class ActionDispatch::Routing::RouteSet::Config < ::Struct # @return [Object] the newly set value def api_only=(_); end + # Returns the value of attribute default_scope + # + # @return [Object] the current value of default_scope + def default_scope; end + + # Sets the attribute default_scope + # + # @param value [Object] the value to set the attribute default_scope to. + # @return [Object] the newly set value + def default_scope=(_); end + # Returns the value of attribute relative_url_root # # @return [Object] the current value of relative_url_root @@ -18405,149 +19037,148 @@ class ActionDispatch::Routing::RouteSet::Config < ::Struct end end -# source://actionpack/lib/action_dispatch/routing/route_set.rb#657 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#684 class ActionDispatch::Routing::RouteSet::CustomUrlHelper # @return [CustomUrlHelper] a new instance of CustomUrlHelper # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#660 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#687 def initialize(name, defaults, &block); end # Returns the value of attribute block. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#658 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#685 def block; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#666 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#693 def call(t, args, only_path = T.unsafe(nil)); end # Returns the value of attribute defaults. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#658 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#685 def defaults; end # Returns the value of attribute name. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#658 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#685 def name; end private - # source://actionpack/lib/action_dispatch/routing/route_set.rb#678 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#705 def eval_block(t, args, options); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#682 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#709 def merge_defaults(options); end end -# source://actionpack/lib/action_dispatch/routing/route_set.rb#364 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#386 ActionDispatch::Routing::RouteSet::DEFAULT_CONFIG = T.let(T.unsafe(nil), ActionDispatch::Routing::RouteSet::Config) -# source://actionpack/lib/action_dispatch/routing/route_set.rb#21 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#39 class ActionDispatch::Routing::RouteSet::Dispatcher < ::ActionDispatch::Routing::Endpoint # @return [Dispatcher] a new instance of Dispatcher # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#22 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#40 def initialize(raise_on_name_error); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#26 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#44 def dispatcher?; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#28 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#46 def serve(req); end private - # source://actionpack/lib/action_dispatch/routing/route_set.rb#42 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#60 def controller(req); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#48 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#66 def dispatch(controller, action, req, res); end end -# source://actionpack/lib/action_dispatch/routing/route_set.rb#687 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#714 class ActionDispatch::Routing::RouteSet::Generator # @return [Generator] a new instance of Generator # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#690 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#717 def initialize(named_route, options, recall, set); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#702 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#729 def controller; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#706 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#733 def current_controller; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#777 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#803 def different_controller?; end # Generates a path from routes, returns a RouteWithParams or MissingRoute. # MissingRoute will raise ActionController::UrlGenerationError. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#773 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#799 def generate; end # Returns the value of attribute named_route. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#688 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#715 def named_route; end # Remove leading slashes from controllers # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#761 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#787 def normalize_controller!; end - # This pulls :controller, :action, and :id out of the recall. - # The recall key is only used if there is no key in the options - # or if the key in the options is identical. If any of - # :controller, :action or :id is not found, don't pull any + # This pulls :controller, :action, and :id out of the recall. The recall key is + # only used if there is no key in the options or if the key in the options is + # identical. If any of :controller, :action or :id is not found, don't pull any # more keys from the recall. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#743 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#769 def normalize_controller_action_id!; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#718 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#745 def normalize_options!; end # Returns the value of attribute options. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#688 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#715 def options; end # Returns the value of attribute recall. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#688 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#715 def recall; end # Returns the value of attribute set. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#688 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#715 def set; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#710 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#737 def use_recall_for(key); end - # if the current controller is "foo/bar/baz" and controller: "baz/bat" - # is specified, the controller becomes "foo/baz/bat" + # if the current controller is "foo/bar/baz" and controller: "baz/bat" is + # specified, the controller becomes "foo/baz/bat" # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#751 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#777 def use_relative_controller!; end private # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#783 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#809 def named_route_exists?; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#787 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#813 def segment_keys; end end -# source://actionpack/lib/action_dispatch/routing/route_set.rb#468 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#499 module ActionDispatch::Routing::RouteSet::MountedHelpers extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -18572,422 +19203,423 @@ end # maintains an anonymous module that can be used to install helpers for the # named routes. # -# source://actionpack/lib/action_dispatch/routing/route_set.rb#66 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#84 class ActionDispatch::Routing::RouteSet::NamedRouteCollection include ::Enumerable # @return [NamedRouteCollection] a new instance of NamedRouteCollection # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#71 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#89 def initialize; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#121 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#139 def [](name); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#102 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#120 def []=(name, route); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#102 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#120 def add(name, route); end - # Given a +name+, defines name_path and name_url helpers. - # Used by 'direct', 'resolve', and 'polymorphic' route helpers. + # Given a `name`, defines name_path and name_url helpers. Used by 'direct', + # 'resolve', and 'polymorphic' route helpers. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#149 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#167 def add_url_helper(name, defaults, &block); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#88 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#106 def clear; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#88 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#106 def clear!; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#134 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#152 def each(&block); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#121 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#139 def get(name); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#84 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#102 def helper_names; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#125 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#143 def key?(name); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#143 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#161 def length; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#139 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#157 def names; end # Returns the value of attribute path_helpers_module. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#68 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#86 def path_helpers_module; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#79 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#97 def route_defined?(name); end # Returns the value of attribute url_helpers_module. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#68 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#86 def url_helpers_module; end private - # Create a URL helper allowing ordered parameters to be associated - # with corresponding dynamic segments, so you can do: + # Create a URL helper allowing ordered parameters to be associated with + # corresponding dynamic segments, so you can do: # - # foo_url(bar, baz, bang) + # foo_url(bar, baz, bang) # # Instead of: # - # foo_url(bar: bar, baz: baz, bang: bang) + # foo_url(bar: bar, baz: baz, bang: bang) # # Also allow options hash, so you can do: # - # foo_url(bar, baz, bang, sort_by: 'baz') + # foo_url(bar, baz, bang, sort_by: 'baz') # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#317 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#335 def define_url_helper(mod, name, helper, url_strategy); end # Returns the value of attribute routes. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#68 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#86 def routes; end end -# source://actionpack/lib/action_dispatch/routing/route_set.rb#172 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#190 class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper # @return [UrlHelper] a new instance of UrlHelper # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#255 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#273 def initialize(route, options, route_name); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#262 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#280 def call(t, method_name, args, inner_options, url_strategy); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#274 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#292 def handle_positional_args(controller_options, inner_options, args, result, path_params); end # Returns the value of attribute route_name. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#185 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#203 def route_name; end class << self - # source://actionpack/lib/action_dispatch/routing/route_set.rb#173 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#191 def create(route, options, route_name); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#181 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#199 def optimize_helper?(route); end end end -# source://actionpack/lib/action_dispatch/routing/route_set.rb#187 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#205 class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper::OptimizedUrlHelper < ::ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper # @return [OptimizedUrlHelper] a new instance of OptimizedUrlHelper # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#190 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#208 def initialize(route, options, route_name); end # Returns the value of attribute arg_size. # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#188 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#206 def arg_size; end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#196 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#214 def call(t, method_name, args, inner_options, url_strategy); end private # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#227 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#245 def optimize_routes_generation?(t); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#219 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#237 def optimized_helper(args); end - # source://actionpack/lib/action_dispatch/routing/route_set.rb#231 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#249 def parameterize_args(args); end # @raise [ActionController::UrlGenerationError] # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#242 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#260 def raise_generation_error(args); end end # strategy for building URLs to send to the client # -# source://actionpack/lib/action_dispatch/routing/route_set.rb#333 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#351 ActionDispatch::Routing::RouteSet::PATH = T.let(T.unsafe(nil), Proc) -# source://actionpack/lib/action_dispatch/routing/route_set.rb#814 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#840 ActionDispatch::Routing::RouteSet::RESERVED_OPTIONS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/routing/route_set.rb#53 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#71 class ActionDispatch::Routing::RouteSet::StaticDispatcher < ::ActionDispatch::Routing::RouteSet::Dispatcher # @return [StaticDispatcher] a new instance of StaticDispatcher # - # source://actionpack/lib/action_dispatch/routing/route_set.rb#54 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#72 def initialize(controller_class); end private - # source://actionpack/lib/action_dispatch/routing/route_set.rb#60 + # source://actionpack/lib/action_dispatch/routing/route_set.rb#78 def controller(_); end end -# source://actionpack/lib/action_dispatch/routing/route_set.rb#334 +# source://actionpack/lib/action_dispatch/routing/route_set.rb#352 ActionDispatch::Routing::RouteSet::UNKNOWN = T.let(T.unsafe(nil), Proc) -# source://actionpack/lib/action_dispatch/routing/inspector.rb#8 +# source://actionpack/lib/action_dispatch/routing/inspector.rb#10 class ActionDispatch::Routing::RouteWrapper < ::SimpleDelegator - # source://actionpack/lib/action_dispatch/routing/inspector.rb#54 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#56 def action; end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#26 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#28 def constraints; end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#50 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#52 def controller; end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#15 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#17 def endpoint; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/inspector.rb#62 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#64 def engine?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/inspector.rb#58 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#60 def internal?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/inspector.rb#9 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#11 def matches_filter?(filter, value); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#38 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#40 def name; end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#34 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#36 def path; end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#30 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#32 def rack_app; end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#42 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#44 def reqs; end end # This class is just used for displaying route information when someone -# executes `bin/rails routes` or looks at the RoutingError page. -# People should not use this class. +# executes `bin/rails routes` or looks at the RoutingError page. People should +# not use this class. # -# source://actionpack/lib/action_dispatch/routing/inspector.rb#71 +# source://actionpack/lib/action_dispatch/routing/inspector.rb#73 class ActionDispatch::Routing::RoutesInspector # @return [RoutesInspector] a new instance of RoutesInspector # - # source://actionpack/lib/action_dispatch/routing/inspector.rb#72 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#74 def initialize(routes); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#77 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#79 def format(formatter, filter = T.unsafe(nil)); end private - # source://actionpack/lib/action_dispatch/routing/inspector.rb#141 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#143 def collect_engine_routes(route); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#127 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#129 def collect_routes(routes); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#116 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#118 def filter_routes(filter); end - # source://actionpack/lib/action_dispatch/routing/inspector.rb#97 + # source://actionpack/lib/action_dispatch/routing/inspector.rb#99 def normalize_filter(filter); end end -# source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#7 +# source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#9 class ActionDispatch::Routing::RoutesProxy include ::ActionDispatch::Routing::PolymorphicRoutes include ::ActionDispatch::Routing::UrlFor # @return [RoutesProxy] a new instance of RoutesProxy # - # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#13 + # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#15 def initialize(routes, scope, helpers, script_namer = T.unsafe(nil)); end # Returns the value of attribute routes. # - # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#10 + # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#12 def _routes; end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options; end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options=(_arg0); end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options?; end # Returns the value of attribute routes. # - # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#10 + # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#12 def routes; end # Sets the attribute routes # # @param value the value to set the attribute routes to. # - # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#10 + # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#12 def routes=(_arg0); end # Returns the value of attribute scope. # - # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#10 + # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#12 def scope; end # Sets the attribute scope # # @param value the value to set the attribute scope to. # - # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#10 + # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#12 def scope=(_arg0); end - # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#19 + # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#21 def url_options; end private - # Keeps the part of the script name provided by the global - # context via ENV["SCRIPT_NAME"], which `mount` doesn't know - # about since it depends on the specific request, but use our - # script name resolver for the mount point dependent part. + # Keeps the part of the script name provided by the global context via + # [ENV]("SCRIPT_NAME"), which `mount` doesn't know about since it depends on the + # specific request, but use our script name resolver for the mount point + # dependent part. # - # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#53 + # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#55 def merge_script_names(previous_script_name, new_script_name); end - # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#30 + # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#32 def method_missing(method, *args); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#26 + # source://actionpack/lib/action_dispatch/routing/routes_proxy.rb#28 def respond_to_missing?(method, _); end class << self - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_url_options; end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 - def default_url_options=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_url_options=(new_value); end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#100 def default_url_options?; end end end -# source://actionpack/lib/action_dispatch/routing.rb#257 +# source://actionpack/lib/action_dispatch/routing.rb#259 ActionDispatch::Routing::SEPARATORS = T.let(T.unsafe(nil), Array) -# = Action Dispatch Routing \UrlFor +# # Action Dispatch Routing UrlFor # -# In config/routes.rb you define URL-to-controller mappings, but the reverse +# In `config/routes.rb` you define URL-to-controller mappings, but the reverse # is also possible: a URL can be generated from one of your routing definitions. # URL generation functionality is centralized in this module. # -# See ActionDispatch::Routing for general information about routing and config/routes.rb. +# See ActionDispatch::Routing for general information about routing and +# `config/routes.rb`. # -# Tip: If you need to generate URLs from your models or some other place, +# **Tip:** If you need to generate URLs from your models or some other place, # then ActionDispatch::Routing::UrlFor is what you're looking for. Read on for -# an introduction. In general, this module should not be included on its own, -# as it is usually included by +url_helpers+ (as in Rails.application.routes.url_helpers). -# -# == URL generation from parameters -# -# As you may know, some functions, such as ActionController::Base#url_for -# and ActionView::Helpers::UrlHelper#link_to, can generate URLs given a set -# of parameters. For example, you've probably had the chance to write code -# like this in one of your views: -# -# <%= link_to('Click here', controller: 'users', -# action: 'new', message: 'Welcome!') %> -# # => Click here -# -# +link_to+, and all other functions that require URL generation functionality, -# actually use ActionDispatch::Routing::UrlFor under the hood. And in particular, -# they use the ActionDispatch::Routing::UrlFor#url_for method. One can generate -# the same path as the above example by using the following code: -# -# include ActionDispatch::Routing::UrlFor -# url_for(controller: 'users', -# action: 'new', -# message: 'Welcome!', -# only_path: true) -# # => "/users/new?message=Welcome%21" -# -# Notice the only_path: true part. This is because UrlFor has no -# information about the website hostname that your \Rails app is serving. So if you -# want to include the hostname as well, then you must also pass the :host -# argument: -# -# include UrlFor -# url_for(controller: 'users', -# action: 'new', -# message: 'Welcome!', -# host: 'www.example.com') -# # => "http://www.example.com/users/new?message=Welcome%21" -# -# By default, all controllers and views have access to a special version of +url_for+, -# that already knows what the current hostname is. So if you use +url_for+ in your -# controllers or your views, then you don't need to explicitly pass the :host -# argument. +# an introduction. In general, this module should not be included on its own, as +# it is usually included by `url_helpers` (as in +# `Rails.application.routes.url_helpers`). +# +# ## URL generation from parameters +# +# As you may know, some functions, such as `ActionController::Base#url_for` and +# ActionView::Helpers::UrlHelper#link_to, can generate URLs given a set of +# parameters. For example, you've probably had the chance to write code like +# this in one of your views: +# +# <%= link_to('Click here', controller: 'users', +# action: 'new', message: 'Welcome!') %> +# # => Click here +# +# `link_to`, and all other functions that require URL generation functionality, +# actually use ActionDispatch::Routing::UrlFor under the hood. And in +# particular, they use the ActionDispatch::Routing::UrlFor#url_for method. One +# can generate the same path as the above example by using the following code: +# +# include ActionDispatch::Routing::UrlFor +# url_for(controller: 'users', +# action: 'new', +# message: 'Welcome!', +# only_path: true) +# # => "/users/new?message=Welcome%21" +# +# Notice the `only_path: true` part. This is because UrlFor has no information +# about the website hostname that your Rails app is serving. So if you want to +# include the hostname as well, then you must also pass the `:host` argument: +# +# include UrlFor +# url_for(controller: 'users', +# action: 'new', +# message: 'Welcome!', +# host: 'www.example.com') +# # => "http://www.example.com/users/new?message=Welcome%21" +# +# By default, all controllers and views have access to a special version of +# `url_for`, that already knows what the current hostname is. So if you use +# `url_for` in your controllers or your views, then you don't need to explicitly +# pass the `:host` argument. # # For convenience, mailers also include ActionDispatch::Routing::UrlFor. So -# within mailers, you can use url_for. However, mailers cannot access -# incoming web requests in order to derive hostname information, so you have -# to provide the +:host+ option or set the default host using -# +default_url_options+. For more information on url_for in mailers see the -# ActionMailer::Base documentation. +# within mailers, you can use url_for. However, mailers cannot access incoming +# web requests in order to derive hostname information, so you have to provide +# the `:host` option or set the default host using `default_url_options`. For +# more information on url_for in mailers see the ActionMailer::Base +# documentation. # -# -# == URL generation for named routes +# ## URL generation for named routes # # UrlFor also allows one to access methods that have been auto-generated from # named routes. For example, suppose that you have a 'users' resource in your -# config/routes.rb: +# `config/routes.rb`: # -# resources :users +# resources :users # -# This generates, among other things, the method users_path. By default, -# this method is accessible from your controllers, views, and mailers. If you need -# to access this auto-generated method from other places (such as a model), then -# you can do that by including Rails.application.routes.url_helpers in your class: +# This generates, among other things, the method `users_path`. By default, this +# method is accessible from your controllers, views, and mailers. If you need to +# access this auto-generated method from other places (such as a model), then +# you can do that by including `Rails.application.routes.url_helpers` in your +# class: # -# class User < ActiveRecord::Base -# include Rails.application.routes.url_helpers +# class User < ActiveRecord::Base +# include Rails.application.routes.url_helpers # -# def base_uri -# user_path(self) +# def base_uri +# user_path(self) +# end # end -# end # -# User.find(1).base_uri # => "/users/1" +# User.find(1).base_uri # => "/users/1" # -# source://actionpack/lib/action_dispatch/routing/url_for.rb#89 +# source://actionpack/lib/action_dispatch/routing/url_for.rb#92 module ActionDispatch::Routing::UrlFor include ::ActionDispatch::Routing::PolymorphicRoutes extend ::ActiveSupport::Concern @@ -18995,110 +19627,112 @@ module ActionDispatch::Routing::UrlFor mixes_in_class_methods GeneratedClassMethods - # source://actionpack/lib/action_dispatch/routing/url_for.rb#108 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#111 def initialize(*_arg0, **_arg1, &_arg2); end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#177 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#182 def full_url_for(options = T.unsafe(nil)); end # Allows calling direct or regular named route. # - # resources :buckets + # resources :buckets # - # direct :recordable do |recording| - # route_for(:bucket, recording.bucket) - # end + # direct :recordable do |recording| + # route_for(:bucket, recording.bucket) + # end # - # direct :threadable do |threadable| - # route_for(:recordable, threadable.parent) - # end + # direct :threadable do |threadable| + # route_for(:recordable, threadable.parent) + # end # - # This maintains the context of the original caller on - # whether to return a path or full URL, e.g: + # This maintains the context of the original caller on whether to return a path + # or full URL, e.g: # - # threadable_path(threadable) # => "/buckets/1" - # threadable_url(threadable) # => "http://example.com/buckets/1" + # threadable_path(threadable) # => "/buckets/1" + # threadable_url(threadable) # => "http://example.com/buckets/1" # - # source://actionpack/lib/action_dispatch/routing/url_for.rb#217 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#222 def route_for(name, *args); end - # Generate a URL based on the options provided, +default_url_options+, and the - # routes defined in config/routes.rb. The following options are supported: - # - # * :only_path - If true, the relative URL is returned. Defaults to +false+. - # * :protocol - The protocol to connect to. Defaults to "http". - # * :host - Specifies the host the link should be targeted at. - # If :only_path is false, this option must be - # provided either explicitly, or via +default_url_options+. - # * :subdomain - Specifies the subdomain of the link, using the +tld_length+ - # to split the subdomain from the host. - # If false, removes all subdomains from the host part of the link. - # * :domain - Specifies the domain of the link, using the +tld_length+ - # to split the domain from the host. - # * :tld_length - Number of labels the TLD id composed of, only used if - # :subdomain or :domain are supplied. Defaults to - # ActionDispatch::Http::URL.tld_length, which in turn defaults to 1. - # * :port - Optionally specify the port to connect to. - # * :anchor - An anchor name to be appended to the path. - # * :params - The query parameters to be appended to the path. - # * :path_params - The query parameters that will only be used - # for the named dynamic segments of path. If unused, they will be discarded. - # * :trailing_slash - If true, adds a trailing slash, as in "/archive/2009/". - # * :script_name - Specifies application path relative to domain root. If provided, prepends application path. - # - # Any other key (:controller, :action, etc.) given to - # +url_for+ is forwarded to the Routes module. - # - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', port: '8080' - # # => 'http://somehost.org:8080/tasks/testing' - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', anchor: 'ok', only_path: true - # # => '/tasks/testing#ok' - # url_for controller: 'tasks', action: 'testing', trailing_slash: true - # # => 'http://somehost.org/tasks/testing/' - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', number: '33' - # # => 'http://somehost.org/tasks/testing?number=33' - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp" - # # => 'http://somehost.org/myapp/tasks/testing' - # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp", only_path: true - # # => '/myapp/tasks/testing' + # Generate a URL based on the options provided, `default_url_options`, and the + # routes defined in `config/routes.rb`. The following options are supported: + # + # * `:only_path` - If true, the relative URL is returned. Defaults to `false`. + # * `:protocol` - The protocol to connect to. Defaults to `"http"`. + # * `:host` - Specifies the host the link should be targeted at. If + # `:only_path` is false, this option must be provided either explicitly, or + # via `default_url_options`. + # * `:subdomain` - Specifies the subdomain of the link, using the `tld_length` + # to split the subdomain from the host. If false, removes all subdomains + # from the host part of the link. + # * `:domain` - Specifies the domain of the link, using the `tld_length` to + # split the domain from the host. + # * `:tld_length` - Number of labels the TLD id composed of, only used if + # `:subdomain` or `:domain` are supplied. Defaults to + # `ActionDispatch::Http::URL.tld_length`, which in turn defaults to 1. + # * `:port` - Optionally specify the port to connect to. + # * `:anchor` - An anchor name to be appended to the path. + # * `:params` - The query parameters to be appended to the path. + # * `:path_params` - The query parameters that will only be used for the named + # dynamic segments of path. If unused, they will be discarded. + # * `:trailing_slash` - If true, adds a trailing slash, as in + # `"/archive/2009/"`. + # * `:script_name` - Specifies application path relative to domain root. If + # provided, prepends application path. + # + # + # Any other key (`:controller`, `:action`, etc.) given to `url_for` is forwarded + # to the Routes module. + # + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', port: '8080' + # # => 'http://somehost.org:8080/tasks/testing' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', anchor: 'ok', only_path: true + # # => '/tasks/testing#ok' + # url_for controller: 'tasks', action: 'testing', trailing_slash: true + # # => 'http://somehost.org/tasks/testing/' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', number: '33' + # # => 'http://somehost.org/tasks/testing?number=33' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp" + # # => 'http://somehost.org/myapp/tasks/testing' + # url_for controller: 'tasks', action: 'testing', host: 'somehost.org', script_name: "/myapp", only_path: true + # # => '/myapp/tasks/testing' # # Missing routes keys may be filled in from the current request's parameters - # (e.g. +:controller+, +:action+, +:id+, and any other parameters that are - # placed in the path). Given that the current action has been reached - # through GET /users/1: + # (e.g. `:controller`, `:action`, `:id`, and any other parameters that are + # placed in the path). Given that the current action has been reached through + # `GET /users/1`: # - # url_for(only_path: true) # => '/users/1' - # url_for(only_path: true, action: 'edit') # => '/users/1/edit' - # url_for(only_path: true, action: 'edit', id: 2) # => '/users/2/edit' + # url_for(only_path: true) # => '/users/1' + # url_for(only_path: true, action: 'edit') # => '/users/1/edit' + # url_for(only_path: true, action: 'edit', id: 2) # => '/users/2/edit' # - # Notice that no +:id+ parameter was provided to the first +url_for+ call - # and the helper used the one from the route's path. Any path parameter - # implicitly used by +url_for+ can always be overwritten like shown on the - # last +url_for+ calls. + # Notice that no `:id` parameter was provided to the first `url_for` call and + # the helper used the one from the route's path. Any path parameter implicitly + # used by `url_for` can always be overwritten like shown on the last `url_for` + # calls. # - # source://actionpack/lib/action_dispatch/routing/url_for.rb#173 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#178 def url_for(options = T.unsafe(nil)); end - # Hook overridden in controller to add request information - # with +default_url_options+. Application logic should not - # go into url_options. + # Hook overridden in controller to add request information with + # `default_url_options`. Application logic should not go into url_options. # - # source://actionpack/lib/action_dispatch/routing/url_for.rb#116 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#118 def url_options; end protected # @return [Boolean] # - # source://actionpack/lib/action_dispatch/routing/url_for.rb#222 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#227 def optimize_routes_generation?; end private - # source://actionpack/lib/action_dispatch/routing/url_for.rb#234 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#239 def _routes_context; end - # source://actionpack/lib/action_dispatch/routing/url_for.rb#227 + # source://actionpack/lib/action_dispatch/routing/url_for.rb#232 def _with_routes(routes); end module GeneratedClassMethods @@ -19114,139 +19748,151 @@ module ActionDispatch::Routing::UrlFor end end -# = Action Dispatch \SSL +# # Action Dispatch SSL +# +# This middleware is added to the stack when `config.force_ssl = true`, and is +# passed the options set in `config.ssl_options`. It does three jobs to enforce +# secure HTTP requests: +# +# 1. **TLS redirect**: Permanently redirects `http://` requests to `https://` +# with the same URL host, path, etc. Enabled by default. Set +# `config.ssl_options` to modify the destination URL: +# +# config.ssl_options = { redirect: { host: "secure.widgets.com", port: 8080 }` +# +# Or set `redirect: false` to disable redirection. # -# This middleware is added to the stack when config.force_ssl = true, and is passed -# the options set in +config.ssl_options+. It does three jobs to enforce secure HTTP -# requests: +# Requests can opt-out of redirection with `exclude`: # -# 1. TLS redirect: Permanently redirects +http://+ requests to +https://+ -# with the same URL host, path, etc. Enabled by default. Set +config.ssl_options+ -# to modify the destination URL -# (e.g. redirect: { host: "secure.widgets.com", port: 8080 }), or set -# redirect: false to disable this feature. +# config.ssl_options = { redirect: { exclude: -> request { request.path == "/up" } } } # -# Requests can opt-out of redirection with +exclude+: +# Cookies will not be flagged as secure for excluded requests. # -# config.ssl_options = { redirect: { exclude: -> request { /healthcheck/.match?(request.path) } } } +# When proxying through a load balancer that terminates SSL, the forwarded +# request will appear as though it's HTTP instead of HTTPS to the application. +# This makes redirects and cookie security target HTTP instead of HTTPS. +# To make the server assume that the proxy already terminated SSL, and +# that the request really is HTTPS, set `config.assume_ssl` to `true`: # -# Cookies will not be flagged as secure for excluded requests. +# config.assume_ssl = true # -# 2. Secure cookies: Sets the +secure+ flag on cookies to tell browsers they -# must not be sent along with +http://+ requests. Enabled by default. Set -# +config.ssl_options+ with secure_cookies: false to disable this feature. +# 2. **Secure cookies**: Sets the `secure` flag on cookies to tell browsers +# they must not be sent along with `http://` requests. Enabled by default. +# Set `config.ssl_options` with `secure_cookies: false` to disable this +# feature. # -# 3. HTTP Strict Transport Security (HSTS): Tells the browser to remember -# this site as TLS-only and automatically redirect non-TLS requests. -# Enabled by default. Configure +config.ssl_options+ with hsts: false to disable. +# 3. **HTTP Strict Transport Security (HSTS)**: Tells the browser to remember +# this site as TLS-only and automatically redirect non-TLS requests. Enabled +# by default. Configure `config.ssl_options` with `hsts: false` to disable. # -# Set +config.ssl_options+ with hsts: { ... } to configure HSTS: +# Set `config.ssl_options` with `hsts: { ... }` to configure HSTS: # -# * +expires+: How long, in seconds, these settings will stick. The minimum -# required to qualify for browser preload lists is 1 year. Defaults to -# 2 years (recommended). +# * `expires`: How long, in seconds, these settings will stick. The +# minimum required to qualify for browser preload lists is 1 year. +# Defaults to 2 years (recommended). # -# * +subdomains+: Set to +true+ to tell the browser to apply these settings -# to all subdomains. This protects your cookies from interception by a -# vulnerable site on a subdomain. Defaults to +true+. +# * `subdomains`: Set to `true` to tell the browser to apply these +# settings to all subdomains. This protects your cookies from +# interception by a vulnerable site on a subdomain. Defaults to `true`. # -# * +preload+: Advertise that this site may be included in browsers' -# preloaded HSTS lists. HSTS protects your site on every visit except the -# first visit since it hasn't seen your HSTS header yet. To close this -# gap, browser vendors include a baked-in list of HSTS-enabled sites. -# Go to https://hstspreload.org to submit your site for inclusion. -# Defaults to +false+. +# * `preload`: Advertise that this site may be included in browsers' +# preloaded HSTS lists. HSTS protects your site on every visit *except +# the first visit* since it hasn't seen your HSTS header yet. To close +# this gap, browser vendors include a baked-in list of HSTS-enabled +# sites. Go to https://hstspreload.org to submit your site for +# inclusion. Defaults to `false`. # -# To turn off HSTS, omitting the header is not enough. Browsers will remember the -# original HSTS directive until it expires. Instead, use the header to tell browsers to -# expire HSTS immediately. Setting hsts: false is a shortcut for -# hsts: { expires: 0 }. # -# source://actionpack/lib/action_dispatch/middleware/ssl.rb#51 +# To turn off HSTS, omitting the header is not enough. Browsers will +# remember the original HSTS directive until it expires. Instead, use the +# header to tell browsers to expire HSTS immediately. Setting `hsts: false` +# is a shortcut for `hsts: { expires: 0 }`. +# +# source://actionpack/lib/action_dispatch/middleware/ssl.rb#66 class ActionDispatch::SSL # @return [SSL] a new instance of SSL # - # source://actionpack/lib/action_dispatch/middleware/ssl.rb#63 + # source://actionpack/lib/action_dispatch/middleware/ssl.rb#76 def initialize(app, redirect: T.unsafe(nil), hsts: T.unsafe(nil), secure_cookies: T.unsafe(nil), ssl_default_redirect_status: T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/middleware/ssl.rb#75 + # source://actionpack/lib/action_dispatch/middleware/ssl.rb#88 def call(env); end private # https://tools.ietf.org/html/rfc6797#section-6.1 # - # source://actionpack/lib/action_dispatch/middleware/ssl.rb#109 + # source://actionpack/lib/action_dispatch/middleware/ssl.rb#122 def build_hsts_header(hsts); end - # source://actionpack/lib/action_dispatch/middleware/ssl.rb#116 + # source://actionpack/lib/action_dispatch/middleware/ssl.rb#129 def flag_cookies_as_secure!(headers); end - # source://actionpack/lib/action_dispatch/middleware/ssl.rb#157 + # source://actionpack/lib/action_dispatch/middleware/ssl.rb#170 def https_location_for(request); end - # source://actionpack/lib/action_dispatch/middleware/ssl.rb#94 + # source://actionpack/lib/action_dispatch/middleware/ssl.rb#107 def normalize_hsts_options(options); end - # source://actionpack/lib/action_dispatch/middleware/ssl.rb#140 + # source://actionpack/lib/action_dispatch/middleware/ssl.rb#153 def redirect_to_https(request); end - # source://actionpack/lib/action_dispatch/middleware/ssl.rb#147 + # source://actionpack/lib/action_dispatch/middleware/ssl.rb#160 def redirection_status(request); end - # source://actionpack/lib/action_dispatch/middleware/ssl.rb#90 + # source://actionpack/lib/action_dispatch/middleware/ssl.rb#103 def set_hsts_header!(headers); end class << self - # source://actionpack/lib/action_dispatch/middleware/ssl.rb#59 + # source://actionpack/lib/action_dispatch/middleware/ssl.rb#72 def default_hsts_options; end end end -# Default to 2 years as recommended on hstspreload.org. +# :stopdoc: Default to 2 years as recommended on hstspreload.org. # -# source://actionpack/lib/action_dispatch/middleware/ssl.rb#55 +# source://actionpack/lib/action_dispatch/middleware/ssl.rb#68 ActionDispatch::SSL::HSTS_EXPIRES_IN = T.let(T.unsafe(nil), Integer) -# source://actionpack/lib/action_dispatch/middleware/ssl.rb#57 +# source://actionpack/lib/action_dispatch/middleware/ssl.rb#70 ActionDispatch::SSL::PERMANENT_REDIRECT_REQUEST_METHODS = T.let(T.unsafe(nil), Array) -# source://actionpack/lib/action_dispatch/middleware/server_timing.rb#6 +# source://actionpack/lib/action_dispatch/middleware/server_timing.rb#8 class ActionDispatch::ServerTiming # @return [ServerTiming] a new instance of ServerTiming # - # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#50 + # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#52 def initialize(app); end - # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#56 + # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#58 def call(env); end class << self - # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#46 + # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#48 def unsubscribe; end end end -# source://actionpack/lib/action_dispatch/middleware/server_timing.rb#7 +# source://actionpack/lib/action_dispatch/middleware/server_timing.rb#9 class ActionDispatch::ServerTiming::Subscriber include ::Singleton extend ::Singleton::SingletonClassMethods # @return [Subscriber] a new instance of Subscriber # - # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#11 + # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#13 def initialize; end - # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#15 + # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#17 def call(event); end - # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#21 + # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#23 def collect_events; end - # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#30 + # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#32 def ensure_subscribed; end - # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#38 + # source://actionpack/lib/action_dispatch/middleware/server_timing.rb#40 def unsubscribe; end class << self @@ -19257,33 +19903,33 @@ class ActionDispatch::ServerTiming::Subscriber end end -# source://actionpack/lib/action_dispatch/middleware/server_timing.rb#9 +# source://actionpack/lib/action_dispatch/middleware/server_timing.rb#11 ActionDispatch::ServerTiming::Subscriber::KEY = T.let(T.unsafe(nil), Symbol) -# source://actionpack/lib/action_dispatch.rb#106 +# source://actionpack/lib/action_dispatch.rb#100 module ActionDispatch::Session class << self - # source://actionpack/lib/action_dispatch.rb#113 + # source://actionpack/lib/action_dispatch.rb#107 def resolve_store(session_store); end end end -# source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#95 +# source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#97 class ActionDispatch::Session::AbstractSecureStore < ::Rack::Session::Abstract::PersistedSecure include ::ActionDispatch::Session::Compatibility include ::ActionDispatch::Session::StaleSessionCheck include ::ActionDispatch::Session::SessionObject - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#100 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#102 def generate_sid; end private - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#105 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#107 def set_cookie(request, response, cookie); end end -# source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#84 +# source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#86 class ActionDispatch::Session::AbstractStore < ::Rack::Session::Abstract::Persisted include ::ActionDispatch::Session::Compatibility include ::ActionDispatch::Session::StaleSessionCheck @@ -19291,455 +19937,488 @@ class ActionDispatch::Session::AbstractStore < ::Rack::Session::Abstract::Persis private - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#90 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#92 def set_cookie(request, response, cookie); end end -# = Action Dispatch Session \CacheStore +# # Action Dispatch Session CacheStore # -# A session store that uses an ActiveSupport::Cache::Store to store the sessions. This store is most useful -# if you don't store critical data in your sessions and you don't need them to live for extended periods -# of time. +# A session store that uses an ActiveSupport::Cache::Store to store the +# sessions. This store is most useful if you don't store critical data in your +# sessions and you don't need them to live for extended periods of time. # -# ==== Options -# * cache - The cache to use. If it is not specified, Rails.cache will be used. -# * expire_after - The length of time a session will be stored before automatically expiring. -# By default, the :expires_in option of the cache is used. +# #### Options +# * `cache` - The cache to use. If it is not specified, `Rails.cache` +# will be used. +# * `expire_after` - The length of time a session will be stored before +# automatically expiring. By default, the `:expires_in` option of the cache +# is used. # -# source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#17 +# source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#22 class ActionDispatch::Session::CacheStore < ::ActionDispatch::Session::AbstractSecureStore # @return [CacheStore] a new instance of CacheStore # - # source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#18 + # source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#23 def initialize(app, options = T.unsafe(nil)); end # Remove a session from the cache. # - # source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#44 + # source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#49 def delete_session(env, sid, options); end # Get a session from the cache. # - # source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#25 + # source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#30 def find_session(env, sid); end # Set a session in the cache. # - # source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#33 + # source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#38 def write_session(env, sid, session, options); end private # Turn the session id into a cache key. # - # source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#52 + # source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#57 def cache_key(id); end - # source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#56 + # source://actionpack/lib/action_dispatch/middleware/session/cache_store.rb#61 def get_session_with_fallback(sid); end end -# source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#20 +# source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#22 module ActionDispatch::Session::Compatibility - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#21 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#23 def initialize(app, options = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#26 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#28 def generate_sid; end private - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#33 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#35 def initialize_sid; end - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#38 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#40 def make_request(env); end end -# = Action Dispatch Session \CookieStore +# # Action Dispatch Session CookieStore # -# This cookie-based session store is the \Rails default. It is -# dramatically faster than the alternatives. +# This cookie-based session store is the Rails default. It is dramatically +# faster than the alternatives. # # Sessions typically contain at most a user ID and flash message; both fit -# within the 4096 bytes cookie size limit. A +CookieOverflow+ exception is raised if -# you attempt to store more than 4096 bytes of data. +# within the 4096 bytes cookie size limit. A `CookieOverflow` exception is +# raised if you attempt to store more than 4096 bytes of data. # -# The cookie jar used for storage is automatically configured to be the -# best possible option given your application's configuration. +# The cookie jar used for storage is automatically configured to be the best +# possible option given your application's configuration. # -# Your cookies will be encrypted using your application's +secret_key_base+. This -# goes a step further than signed cookies in that encrypted cookies cannot -# be altered or read by users. This is the default starting in \Rails 4. +# Your cookies will be encrypted using your application's `secret_key_base`. +# This goes a step further than signed cookies in that encrypted cookies cannot +# be altered or read by users. This is the default starting in Rails 4. # # Configure your session store in an initializer: # -# Rails.application.config.session_store :cookie_store, key: '_your_app_session' +# Rails.application.config.session_store :cookie_store, key: '_your_app_session' # -# In the development and test environments your application's +secret_key_base+ is -# generated by \Rails and stored in a temporary file in tmp/local_secret.txt. -# In all other environments, it is stored encrypted in the -# config/credentials.yml.enc file. +# In the development and test environments your application's `secret_key_base` +# is generated by Rails and stored in a temporary file in +# `tmp/local_secret.txt`. In all other environments, it is stored encrypted in +# the `config/credentials.yml.enc` file. # -# If your application was not updated to \Rails 5.2 defaults, the +secret_key_base+ -# will be found in the old config/secrets.yml file. +# If your application was not updated to Rails 5.2 defaults, the +# `secret_key_base` will be found in the old `config/secrets.yml` file. # -# Note that changing your +secret_key_base+ will invalidate all existing session. -# Additionally, you should take care to make sure you are not relying on the -# ability to decode signed cookies generated by your app in external +# Note that changing your `secret_key_base` will invalidate all existing +# session. Additionally, you should take care to make sure you are not relying +# on the ability to decode signed cookies generated by your app in external # applications or JavaScript before changing it. # -# Because CookieStore extends +Rack::Session::Abstract::Persisted+, many of the -# options described there can be used to customize the session cookie that -# is generated. For example: +# Because CookieStore extends `Rack::Session::Abstract::Persisted`, many of the +# options described there can be used to customize the session cookie that is +# generated. For example: # -# Rails.application.config.session_store :cookie_store, expire_after: 14.days +# Rails.application.config.session_store :cookie_store, expire_after: 14.days # # would set the session cookie to expire automatically 14 days after creation. -# Other useful options include :key, :secure, -# :httponly, and :same_site. +# Other useful options include `:key`, `:secure`, `:httponly`, and `:same_site`. # -# source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#51 +# source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#52 class ActionDispatch::Session::CookieStore < ::ActionDispatch::Session::AbstractSecureStore # @return [CookieStore] a new instance of CookieStore # - # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#63 + # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#64 def initialize(app, options = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#69 + # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#70 def delete_session(req, session_id, options); end - # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#76 + # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#77 def load_session(req); end private - # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#123 + # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#124 def cookie_jar(request); end - # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#85 + # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#86 def extract_session_id(req); end - # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#119 + # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#120 def get_cookie(req); end - # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#104 + # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#105 def persistent_session_id!(data, sid = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#115 + # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#116 def set_cookie(request, session_id, cookie); end - # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#92 + # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#93 def unpacked_cookie_data(req); end - # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#110 + # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#111 def write_session(req, sid, session_data, options); end end -# source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#61 +# source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#62 ActionDispatch::Session::CookieStore::DEFAULT_SAME_SITE = T.let(T.unsafe(nil), Proc) -# source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#52 +# source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#53 class ActionDispatch::Session::CookieStore::SessionId # @return [SessionId] a new instance of SessionId # - # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#55 + # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#56 def initialize(session_id, cookie_value = T.unsafe(nil)); end # Returns the value of attribute cookie_value. # - # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#53 + # source://actionpack/lib/action_dispatch/middleware/session/cookie_store.rb#54 def cookie_value; end end -# source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#69 +# source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#71 module ActionDispatch::Session::SessionObject - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#70 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#72 def commit_session(req, res); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#79 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#81 def loaded_session?(session); end - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#75 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#77 def prepare_session(req); end end -# source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#11 +# source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#13 class ActionDispatch::Session::SessionRestoreError < ::StandardError # @return [SessionRestoreError] a new instance of SessionRestoreError # - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#12 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#14 def initialize; end end -# source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#43 +# source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#45 module ActionDispatch::Session::StaleSessionCheck - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#48 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#50 def extract_session_id(env); end - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#44 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#46 def load_session(env); end - # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#52 + # source://actionpack/lib/action_dispatch/middleware/session/abstract_store.rb#54 def stale_session_check!; end end -# = Action Dispatch \ShowExceptions +# # Action Dispatch ShowExceptions # -# This middleware rescues any exception returned by the application -# and calls an exceptions app that will wrap it in a format for the end user. +# This middleware rescues any exception returned by the application and calls an +# exceptions app that will wrap it in a format for the end user. # # The exceptions app should be passed as a parameter on initialization of -# +ShowExceptions+. Every time there is an exception, +ShowExceptions+ will -# store the exception in env["action_dispatch.exception"], rewrite -# the +PATH_INFO+ to the exception status code, and call the Rack app. +# `ShowExceptions`. Every time there is an exception, `ShowExceptions` will +# store the exception in `env["action_dispatch.exception"]`, rewrite the +# `PATH_INFO` to the exception status code, and call the Rack app. # -# In \Rails applications, the exceptions app can be configured with -# +config.exceptions_app+, which defaults to ActionDispatch::PublicExceptions. +# In Rails applications, the exceptions app can be configured with +# `config.exceptions_app`, which defaults to ActionDispatch::PublicExceptions. # -# If the application returns a response with the X-Cascade header -# set to "pass", this middleware will send an empty response as a -# result with the correct status code. If any exception happens inside the -# exceptions app, this middleware catches the exceptions and returns a -# failsafe response. +# If the application returns a response with the `X-Cascade` header set to +# `"pass"`, this middleware will send an empty response as a result with the +# correct status code. If any exception happens inside the exceptions app, this +# middleware catches the exceptions and returns a failsafe response. # -# source://actionpack/lib/action_dispatch/middleware/show_exceptions.rb#24 +# source://actionpack/lib/action_dispatch/middleware/show_exceptions.rb#25 class ActionDispatch::ShowExceptions # @return [ShowExceptions] a new instance of ShowExceptions # - # source://actionpack/lib/action_dispatch/middleware/show_exceptions.rb#25 + # source://actionpack/lib/action_dispatch/middleware/show_exceptions.rb#26 def initialize(app, exceptions_app); end - # source://actionpack/lib/action_dispatch/middleware/show_exceptions.rb#30 + # source://actionpack/lib/action_dispatch/middleware/show_exceptions.rb#31 def call(env); end private - # source://actionpack/lib/action_dispatch/middleware/show_exceptions.rb#64 + # source://actionpack/lib/action_dispatch/middleware/show_exceptions.rb#67 def fallback_to_html_format_if_invalid_mime_type(request); end - # source://actionpack/lib/action_dispatch/middleware/show_exceptions.rb#73 + # source://actionpack/lib/action_dispatch/middleware/show_exceptions.rb#83 def pass_response(status); end - # source://actionpack/lib/action_dispatch/middleware/show_exceptions.rb#44 + # source://actionpack/lib/action_dispatch/middleware/show_exceptions.rb#48 def render_exception(request, wrapper); end end -# = Action Dispatch \Static +# # Action Dispatch Static # -# This middleware serves static files from disk, if available. -# If no file is found, it hands off to the main app. +# This middleware serves static files from disk, if available. If no file is +# found, it hands off to the main app. # -# In \Rails apps, this middleware is configured to serve assets from -# the +public/+ directory. +# In Rails apps, this middleware is configured to serve assets from the +# `public/` directory. # -# Only GET and HEAD requests are served. POST and other HTTP methods -# are handed off to the main app. +# Only GET and HEAD requests are served. POST and other HTTP methods are handed +# off to the main app. # # Only files in the root directory are served; path traversal is denied. # -# source://actionpack/lib/action_dispatch/middleware/static.rb#18 +# source://actionpack/lib/action_dispatch/middleware/static.rb#20 class ActionDispatch::Static # @return [Static] a new instance of Static # - # source://actionpack/lib/action_dispatch/middleware/static.rb#19 + # source://actionpack/lib/action_dispatch/middleware/static.rb#21 def initialize(app, path, index: T.unsafe(nil), headers: T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/middleware/static.rb#24 + # source://actionpack/lib/action_dispatch/middleware/static.rb#26 def call(env); end end -# source://actionpack/lib/action_dispatch/testing/test_process.rb#7 +# source://actionpack/lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#4 +module ActionDispatch::TestHelpers; end + +# source://actionpack/lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#5 +module ActionDispatch::TestHelpers::PageDumpHelper + # Saves the content of response body to a file and tries to open it in your browser. + # Launchy must be present in your Gemfile for the page to open automatically. + # + # source://actionpack/lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#10 + def save_and_open_page(path = T.unsafe(nil)); end + + private + + # source://actionpack/lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#30 + def html_dump_default_path; end + + # source://actionpack/lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#23 + def open_file(path); end + + # @raise [InvalidResponse] + # + # source://actionpack/lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#15 + def save_page(path = T.unsafe(nil)); end +end + +# source://actionpack/lib/action_dispatch/testing/test_helpers/page_dump_helper.rb#6 +class ActionDispatch::TestHelpers::PageDumpHelper::InvalidResponse < ::StandardError; end + +# source://actionpack/lib/action_dispatch/testing/test_process.rb#9 module ActionDispatch::TestProcess include ::ActionDispatch::TestProcess::FixtureFile # @raise [NoMethodError] # - # source://actionpack/lib/action_dispatch/testing/test_process.rb#31 + # source://actionpack/lib/action_dispatch/testing/test_process.rb#35 def assigns(key = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/testing/test_process.rb#45 + # source://actionpack/lib/action_dispatch/testing/test_process.rb#49 def cookies; end - # source://actionpack/lib/action_dispatch/testing/test_process.rb#41 + # source://actionpack/lib/action_dispatch/testing/test_process.rb#45 def flash; end - # source://actionpack/lib/action_dispatch/testing/test_process.rb#49 + # source://actionpack/lib/action_dispatch/testing/test_process.rb#53 def redirect_to_url; end - # source://actionpack/lib/action_dispatch/testing/test_process.rb#37 + # source://actionpack/lib/action_dispatch/testing/test_process.rb#41 def session; end end -# source://actionpack/lib/action_dispatch/testing/test_process.rb#8 +# source://actionpack/lib/action_dispatch/testing/test_process.rb#10 module ActionDispatch::TestProcess::FixtureFile - # Shortcut for Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_fixture_path, path), type): + # Shortcut for + # `Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_f + # ixture_path, path), type)`: # - # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png') } + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png') } # - # Default fixture files location is test/fixtures/files. + # Default fixture files location is `test/fixtures/files`. # - # To upload binary files on Windows, pass :binary as the last parameter. - # This will not affect other platforms: + # To upload binary files on Windows, pass `:binary` as the last parameter. This + # will not affect other platforms: # - # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png', :binary) } + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png', :binary) } # - # source://actionpack/lib/action_dispatch/testing/test_process.rb#19 + # source://actionpack/lib/action_dispatch/testing/test_process.rb#23 def file_fixture_upload(path, mime_type = T.unsafe(nil), binary = T.unsafe(nil)); end - # Shortcut for Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_fixture_path, path), type): + # Shortcut for + # `Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_f + # ixture_path, path), type)`: # - # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png') } + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png') } # - # Default fixture files location is test/fixtures/files. + # Default fixture files location is `test/fixtures/files`. # - # To upload binary files on Windows, pass :binary as the last parameter. - # This will not affect other platforms: + # To upload binary files on Windows, pass `:binary` as the last parameter. This + # will not affect other platforms: # - # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png', :binary) } + # post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png', :binary) } # - # source://actionpack/lib/action_dispatch/testing/test_process.rb#19 + # source://actionpack/lib/action_dispatch/testing/test_process.rb#23 def fixture_file_upload(path, mime_type = T.unsafe(nil), binary = T.unsafe(nil)); end end -# source://actionpack/lib/action_dispatch/testing/test_request.rb#7 +# source://actionpack/lib/action_dispatch/testing/test_request.rb#9 class ActionDispatch::TestRequest < ::ActionDispatch::Request - # source://actionpack/lib/action_dispatch/testing/test_request.rb#66 + # source://actionpack/lib/action_dispatch/testing/test_request.rb#68 def accept=(mime_types); end - # source://actionpack/lib/action_dispatch/testing/test_request.rb#46 + # source://actionpack/lib/action_dispatch/testing/test_request.rb#48 def action=(action_name); end - # source://actionpack/lib/action_dispatch/testing/test_request.rb#30 + # source://actionpack/lib/action_dispatch/testing/test_request.rb#32 def host=(host); end - # source://actionpack/lib/action_dispatch/testing/test_request.rb#50 + # source://actionpack/lib/action_dispatch/testing/test_request.rb#52 def if_modified_since=(last_modified); end - # source://actionpack/lib/action_dispatch/testing/test_request.rb#54 + # source://actionpack/lib/action_dispatch/testing/test_request.rb#56 def if_none_match=(etag); end - # source://actionpack/lib/action_dispatch/testing/test_request.rb#42 + # source://actionpack/lib/action_dispatch/testing/test_request.rb#44 def path=(path); end - # source://actionpack/lib/action_dispatch/testing/test_request.rb#34 + # source://actionpack/lib/action_dispatch/testing/test_request.rb#36 def port=(number); end - # source://actionpack/lib/action_dispatch/testing/test_request.rb#58 + # source://actionpack/lib/action_dispatch/testing/test_request.rb#60 def remote_addr=(addr); end - # source://actionpack/lib/action_dispatch/testing/test_request.rb#26 + # source://actionpack/lib/action_dispatch/testing/test_request.rb#28 def request_method=(method); end - # source://actionpack/lib/action_dispatch/testing/test_request.rb#38 + # source://actionpack/lib/action_dispatch/testing/test_request.rb#40 def request_uri=(uri); end - # source://actionpack/lib/action_dispatch/testing/test_request.rb#62 + # source://actionpack/lib/action_dispatch/testing/test_request.rb#64 def user_agent=(user_agent); end class << self - # Create a new test request with default +env+ values. + # Create a new test request with default `env` values. # - # source://actionpack/lib/action_dispatch/testing/test_request.rb#15 + # source://actionpack/lib/action_dispatch/testing/test_request.rb#17 def create(env = T.unsafe(nil)); end private - # source://actionpack/lib/action_dispatch/testing/test_request.rb#21 + # source://actionpack/lib/action_dispatch/testing/test_request.rb#23 def default_env; end end end -# source://actionpack/lib/action_dispatch/testing/test_request.rb#8 +# source://actionpack/lib/action_dispatch/testing/test_request.rb#10 ActionDispatch::TestRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) -# Integration test methods such as Integration::RequestHelpers#get -# and Integration::RequestHelpers#post return objects of class -# TestResponse, which represent the HTTP response results of the requested -# controller actions. +# Integration test methods such as Integration::RequestHelpers#get and +# Integration::RequestHelpers#post return objects of class TestResponse, which +# represent the HTTP response results of the requested controller actions. # # See Response for more information on controller response objects. # -# source://actionpack/lib/action_dispatch/testing/test_response.rb#12 +# source://actionpack/lib/action_dispatch/testing/test_response.rb#13 class ActionDispatch::TestResponse < ::ActionDispatch::Response # Returns a parsed body depending on the response MIME type. When a parser # corresponding to the MIME type is not found, it returns the raw body. # - # ==== Examples - # get "/posts" - # response.content_type # => "text/html; charset=utf-8" - # response.parsed_body.class # => Nokogiri::HTML5::Document - # response.parsed_body.to_html # => "\n\n..." + # #### Examples + # get "/posts" + # response.content_type # => "text/html; charset=utf-8" + # response.parsed_body.class # => Nokogiri::HTML5::Document + # response.parsed_body.to_html # => "\n\n..." # - # assert_pattern { response.parsed_body.at("main") => { content: "Hello, world" } } + # assert_pattern { response.parsed_body.at("main") => { content: "Hello, world" } } # - # response.parsed_body.at("main") => {name:, content:} - # assert_equal "main", name - # assert_equal "Some main content", content + # response.parsed_body.at("main") => {name:, content:} + # assert_equal "main", name + # assert_equal "Some main content", content # - # get "/posts.json" - # response.content_type # => "application/json; charset=utf-8" - # response.parsed_body.class # => Array - # response.parsed_body # => [{"id"=>42, "title"=>"Title"},... + # get "/posts.json" + # response.content_type # => "application/json; charset=utf-8" + # response.parsed_body.class # => Array + # response.parsed_body # => [{"id"=>42, "title"=>"Title"},... # - # assert_pattern { response.parsed_body => [{ id: 42 }] } + # assert_pattern { response.parsed_body => [{ id: 42 }] } # - # get "/posts/42.json" - # response.content_type # => "application/json; charset=utf-8" - # response.parsed_body.class # => ActiveSupport::HashWithIndifferentAccess - # response.parsed_body # => {"id"=>42, "title"=>"Title"} + # get "/posts/42.json" + # response.content_type # => "application/json; charset=utf-8" + # response.parsed_body.class # => ActiveSupport::HashWithIndifferentAccess + # response.parsed_body # => {"id"=>42, "title"=>"Title"} # - # assert_pattern { response.parsed_body => [{ title: /title/i }] } + # assert_pattern { response.parsed_body => [{ title: /title/i }] } # - # response.parsed_body => {id:, title:} - # assert_equal 42, id - # assert_equal "Title", title + # response.parsed_body => {id:, title:} + # assert_equal 42, id + # assert_equal "Title", title # - # source://actionpack/lib/action_dispatch/testing/test_response.rb#49 + # source://actionpack/lib/action_dispatch/testing/test_response.rb#50 def parsed_body; end - # source://actionpack/lib/action_dispatch/testing/test_response.rb#53 + # source://actionpack/lib/action_dispatch/testing/test_response.rb#54 def response_parser; end class << self - # source://actionpack/lib/action_dispatch/testing/test_response.rb#13 + # source://actionpack/lib/action_dispatch/testing/test_response.rb#14 def from_response(response); end end end -# source://actionpack/lib/action_pack/gem_version.rb#3 +# :markup: markdown +# +# source://actionpack/lib/action_pack/gem_version.rb#5 module ActionPack class << self - # Returns the currently loaded version of Action Pack as a +Gem::Version+. + # Returns the currently loaded version of Action Pack as a `Gem::Version`. # - # source://actionpack/lib/action_pack/gem_version.rb#5 + # source://actionpack/lib/action_pack/gem_version.rb#7 def gem_version; end - # Returns the currently loaded version of Action Pack as a +Gem::Version+. + # Returns the currently loaded version of Action Pack as a `Gem::Version`. # - # source://actionpack/lib/action_pack/version.rb#7 + # source://actionpack/lib/action_pack/version.rb#9 def version; end end end -# source://actionpack/lib/action_pack/gem_version.rb#9 +# source://actionpack/lib/action_pack/gem_version.rb#11 module ActionPack::VERSION; end -# source://actionpack/lib/action_pack/gem_version.rb#10 +# source://actionpack/lib/action_pack/gem_version.rb#12 ActionPack::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) -# source://actionpack/lib/action_pack/gem_version.rb#11 +# source://actionpack/lib/action_pack/gem_version.rb#13 ActionPack::VERSION::MINOR = T.let(T.unsafe(nil), Integer) -# source://actionpack/lib/action_pack/gem_version.rb#13 +# source://actionpack/lib/action_pack/gem_version.rb#15 ActionPack::VERSION::PRE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_pack/gem_version.rb#15 +# source://actionpack/lib/action_pack/gem_version.rb#17 ActionPack::VERSION::STRING = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_pack/gem_version.rb#12 +# source://actionpack/lib/action_pack/gem_version.rb#14 ActionPack::VERSION::TINY = T.let(T.unsafe(nil), Integer) module ActionView::RoutingUrlFor @@ -19747,50 +20426,50 @@ module ActionView::RoutingUrlFor include ::ActionDispatch::Routing::UrlFor end -# source://actionpack/lib/action_dispatch/http/mime_type.rb#5 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#7 module Mime class << self - # source://actionpack/lib/action_dispatch/http/mime_type.rb#49 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#51 def [](type); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#62 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#64 def fetch(type, &block); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#54 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#56 def symbols; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#58 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#60 def valid_symbols?(symbols); end end end -# ALL isn't a real MIME type, so we don't register it for lookup with the -# other concrete types. It's a wildcard match that we use for +respond_to+ -# negotiation internals. +# ALL isn't a real MIME type, so we don't register it for lookup with the other +# concrete types. It's a wildcard match that we use for `respond_to` negotiation +# internals. # -# source://actionpack/lib/action_dispatch/http/mime_type.rb#356 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#363 Mime::ALL = T.let(T.unsafe(nil), Mime::AllType) -# source://actionpack/lib/action_dispatch/http/mime_type.rb#342 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#349 class Mime::AllType < ::Mime::Type include ::Singleton extend ::Singleton::SingletonClassMethods # @return [AllType] a new instance of AllType # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#345 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#352 def initialize; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#349 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#356 def all?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#350 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#357 def html?; end class << self @@ -19801,67 +20480,67 @@ class Mime::AllType < ::Mime::Type end end -# source://actionpack/lib/action_dispatch/http/mime_type.rb#45 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#47 Mime::EXTENSION_LOOKUP = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/http/mime_type.rb#46 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#48 Mime::LOOKUP = T.let(T.unsafe(nil), Hash) -# source://actionpack/lib/action_dispatch/http/mime_type.rb#6 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#8 class Mime::Mimes include ::Enumerable # @return [Mimes] a new instance of Mimes # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#11 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#13 def initialize; end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#21 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#23 def <<(type); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#28 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#30 def delete_if; end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#17 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#19 def each(&block); end # Returns the value of attribute symbols. # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#7 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#9 def symbols; end # :nodoc # # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#39 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#41 def valid_symbols?(symbols); end end -# source://actionpack/lib/action_dispatch/http/mime_type.rb#358 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#365 class Mime::NullType include ::Singleton extend ::Singleton::SingletonClassMethods # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#361 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#368 def nil?; end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#369 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#376 def ref; end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#365 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#372 def to_s; end private - # source://actionpack/lib/action_dispatch/http/mime_type.rb#376 - def method_missing(method, *args); end + # source://actionpack/lib/action_dispatch/http/mime_type.rb#383 + def method_missing(method, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#372 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#379 def respond_to_missing?(method, _); end class << self @@ -19872,221 +20551,220 @@ class Mime::NullType end end -# source://actionpack/lib/action_dispatch/http/mime_type.rb#44 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#46 Mime::SET = T.let(T.unsafe(nil), Mime::Mimes) -# Encapsulates the notion of a MIME type. Can be used at render time, for example, with: +# Encapsulates the notion of a MIME type. Can be used at render time, for +# example, with: # -# class PostsController < ActionController::Base -# def show -# @post = Post.find(params[:id]) +# class PostsController < ActionController::Base +# def show +# @post = Post.find(params[:id]) # -# respond_to do |format| -# format.html -# format.ics { render body: @post.to_ics, mime_type: Mime::Type.lookup("text/calendar") } -# format.xml { render xml: @post } +# respond_to do |format| +# format.html +# format.ics { render body: @post.to_ics, mime_type: Mime::Type.lookup("text/calendar") } +# format.xml { render xml: @post } +# end # end # end -# end # -# source://actionpack/lib/action_dispatch/http/mime_type.rb#81 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#84 class Mime::Type # @return [Type] a new instance of Type # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#257 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#264 def initialize(string, symbol = T.unsafe(nil), synonyms = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#290 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#297 def ==(mime_type); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#282 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#289 def ===(list); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#304 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#311 def =~(mime_type); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#320 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#327 def all?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#297 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#304 def eql?(other); end # Returns the value of attribute hash. # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#248 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#255 def hash; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#316 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#323 def html?; end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#310 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#317 def match?(mime_type); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#278 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#285 def ref; end # Returns the value of attribute symbol. # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#82 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#85 def symbol; end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#266 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#273 def to_s; end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#270 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#277 def to_str; end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#274 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#281 def to_sym; end protected # Returns the value of attribute string. # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#323 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#330 def string; end # Returns the value of attribute synonyms. # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#323 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#330 def synonyms; end private - # source://actionpack/lib/action_dispatch/http/mime_type.rb#329 - def method_missing(method, *args); end + # source://actionpack/lib/action_dispatch/http/mime_type.rb#336 + def method_missing(method, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#337 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#344 def respond_to_missing?(method, include_private = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#327 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#334 def to_a; end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#326 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#333 def to_ary; end class << self - # source://actionpack/lib/action_dispatch/http/mime_type.rb#164 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#167 def lookup(string); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#169 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#175 def lookup_by_extension(extension); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#193 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#200 def parse(accept_header); end - # For an input of 'text', returns [Mime[:json], Mime[:xml], Mime[:ics], - # Mime[:html], Mime[:css], Mime[:csv], Mime[:js], Mime[:yaml], Mime[:text]]. + # For an input of `'text'`, returns `[Mime[:json], Mime[:xml], Mime[:ics], + # Mime[:html], Mime[:css], Mime[:csv], Mime[:js], Mime[:yaml], Mime[:text]]`. # - # For an input of 'application', returns [Mime[:html], Mime[:js], - # Mime[:xml], Mime[:yaml], Mime[:atom], Mime[:json], Mime[:rss], Mime[:url_encoded_form]]. + # For an input of `'application'`, returns `[Mime[:html], Mime[:js], Mime[:xml], + # Mime[:yaml], Mime[:atom], Mime[:json], Mime[:rss], Mime[:url_encoded_form]]`. # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#229 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#236 def parse_data_with_trailing_star(type); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#220 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#227 def parse_trailing_star(accept_header); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#179 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#186 def register(string, symbol, mime_type_synonyms = T.unsafe(nil), extension_synonyms = T.unsafe(nil), skip_lookup = T.unsafe(nil)); end - # Registers an alias that's not used on MIME type lookup, but can be referenced directly. Especially useful for - # rendering different HTML versions depending on the user agent, like an iPhone. + # Registers an alias that's not used on MIME type lookup, but can be referenced + # directly. Especially useful for rendering different HTML versions depending on + # the user agent, like an iPhone. # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#175 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#182 def register_alias(string, symbol, extension_synonyms = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#160 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#163 def register_callback(&block); end # This method is opposite of register method. # # To unregister a MIME type: # - # Mime::Type.unregister(:mobile) + # Mime::Type.unregister(:mobile) # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#238 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#245 def unregister(symbol); end end end # A simple helper class used in parsing the accept header. # -# source://actionpack/lib/action_dispatch/http/mime_type.rb#87 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#90 class Mime::Type::AcceptItem # @return [AcceptItem] a new instance of AcceptItem # - # source://actionpack/lib/action_dispatch/http/mime_type.rb#91 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#94 def initialize(index, name, q = T.unsafe(nil)); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#98 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#101 def <=>(item); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#88 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#91 def index; end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#88 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#91 def index=(_arg0); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#88 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#91 def name; end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#88 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#91 def name=(_arg0); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#88 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#91 def q; end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#88 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#91 def q=(_arg0); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#88 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#91 def to_s; end end -# source://actionpack/lib/action_dispatch/http/mime_type.rb#105 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#108 class Mime::Type::AcceptList class << self - # source://actionpack/lib/action_dispatch/http/mime_type.rb#148 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#151 def find_item_by_name(array, name); end - # source://actionpack/lib/action_dispatch/http/mime_type.rb#106 + # source://actionpack/lib/action_dispatch/http/mime_type.rb#109 def sort!(list); end end end -# source://actionpack/lib/action_dispatch/http/mime_type.rb#255 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#262 class Mime::Type::InvalidMimeType < ::StandardError; end -# source://actionpack/lib/action_dispatch/http/mime_type.rb#250 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#257 Mime::Type::MIME_NAME = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/mime_type.rb#252 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#259 Mime::Type::MIME_PARAMETER = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/mime_type.rb#251 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#258 Mime::Type::MIME_PARAMETER_VALUE = T.let(T.unsafe(nil), String) -# source://actionpack/lib/action_dispatch/http/mime_type.rb#253 +# source://actionpack/lib/action_dispatch/http/mime_type.rb#260 Mime::Type::MIME_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://actionpack/lib/action_dispatch.rb#34 +# source://actionpack/lib/action_dispatch.rb#35 module Rack class << self - # source://rack/3.0.11lib/rack/version.rb#31 + # source://rack/3.1.7lib/rack/version.rb#18 def release; end - - # source://rack/3.0.11lib/rack/version.rb#23 - def version; end end end diff --git a/sorbet/rbi/gems/actiontext@7.1.3.3.rbi b/sorbet/rbi/gems/actiontext@8.0.0.beta1.rbi similarity index 50% rename from sorbet/rbi/gems/actiontext@7.1.3.3.rbi rename to sorbet/rbi/gems/actiontext@8.0.0.beta1.rbi index 85b7f6c1..f453f704 100644 --- a/sorbet/rbi/gems/actiontext@7.1.3.3.rbi +++ b/sorbet/rbi/gems/actiontext@8.0.0.beta1.rbi @@ -6,19 +6,19 @@ # :markup: markdown -# :include: actiontext/README.md +# :include: ../README.md # -# source://actiontext/lib/action_text/gem_version.rb#3 +# source://actiontext/lib/action_text/gem_version.rb#5 module ActionText extend ::ActiveSupport::Autoload class << self - # source://actiontext/lib/action_text/deprecator.rb#4 + # source://actiontext/lib/action_text/deprecator.rb#6 def deprecator; end - # Returns the currently loaded version of Action Text as a +Gem::Version+. + # Returns the currently loaded version of Action Text as a `Gem::Version`. # - # source://actiontext/lib/action_text/gem_version.rb#5 + # source://actiontext/lib/action_text/gem_version.rb#7 def gem_version; end # source://actiontext/lib/action_text.rb#47 @@ -27,141 +27,141 @@ module ActionText # source://actiontext/lib/action_text.rb#53 def html_document_fragment_class; end - # source://railties/7.1.3.3lib/rails/engine.rb#412 + # source://railties/8.0.0.beta1lib/rails/engine.rb#413 def railtie_helpers_paths; end - # source://railties/7.1.3.3lib/rails/engine.rb#395 + # source://railties/8.0.0.beta1lib/rails/engine.rb#396 def railtie_namespace; end - # source://railties/7.1.3.3lib/rails/engine.rb#416 + # source://railties/8.0.0.beta1lib/rails/engine.rb#417 def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end - # source://railties/7.1.3.3lib/rails/engine.rb#401 + # source://railties/8.0.0.beta1lib/rails/engine.rb#402 def table_name_prefix; end - # source://railties/7.1.3.3lib/rails/engine.rb#408 + # source://railties/8.0.0.beta1lib/rails/engine.rb#409 def use_relative_model_naming?; end - # Returns the currently loaded version of Action Text as a +Gem::Version+. + # Returns the currently loaded version of Action Text as a `Gem::Version`. # - # source://actiontext/lib/action_text/version.rb#7 + # source://actiontext/lib/action_text/version.rb#9 def version; end end end -# = Action Text \Attachable +# # Action Text Attachable # # Include this module to make a record attachable to an ActionText::Content. # -# class Person < ApplicationRecord -# include ActionText::Attachable -# end +# class Person < ApplicationRecord +# include ActionText::Attachable +# end # -# person = Person.create! name: "Javan" -# html = %Q() -# content = ActionText::Content.new(html) -# content.attachables # => [person] +# person = Person.create! name: "Javan" +# html = %Q() +# content = ActionText::Content.new(html) +# content.attachables # => [person] # -# source://actiontext/lib/action_text/attachable.rb#16 +# source://actiontext/lib/action_text/attachable.rb#18 module ActionText::Attachable extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionText::Attachable::ClassMethods - # source://actiontext/lib/action_text/attachable.rb#81 + # source://actiontext/lib/action_text/attachable.rb#83 def attachable_content_type; end - # source://actiontext/lib/action_text/attachable.rb#85 + # source://actiontext/lib/action_text/attachable.rb#87 def attachable_filename; end - # source://actiontext/lib/action_text/attachable.rb#89 + # source://actiontext/lib/action_text/attachable.rb#91 def attachable_filesize; end - # source://actiontext/lib/action_text/attachable.rb#93 + # source://actiontext/lib/action_text/attachable.rb#95 def attachable_metadata; end - # Returns the Signed Global ID for the attachable. The purpose of the ID is - # set to 'attachable' so it can't be reused for other purposes. + # Returns the Signed Global ID for the attachable. The purpose of the ID is set + # to 'attachable' so it can't be reused for other purposes. # - # source://actiontext/lib/action_text/attachable.rb#77 + # source://actiontext/lib/action_text/attachable.rb#79 def attachable_sgid; end # @return [Boolean] # - # source://actiontext/lib/action_text/attachable.rb#97 + # source://actiontext/lib/action_text/attachable.rb#99 def previewable_attachable?; end # Returns the path to the partial that is used for rendering the attachable. - # Defaults to +to_partial_path+. + # Defaults to `to_partial_path`. # # Override to render a different partial: # - # class User < ApplicationRecord - # def to_attachable_partial_path - # "users/attachable" + # class User < ApplicationRecord + # def to_attachable_partial_path + # "users/attachable" + # end # end - # end # - # source://actiontext/lib/action_text/attachable.rb#125 + # source://actiontext/lib/action_text/attachable.rb#127 def to_attachable_partial_path; end - # source://actiontext/lib/action_text/attachable.rb#129 + # source://actiontext/lib/action_text/attachable.rb#131 def to_rich_text_attributes(attributes = T.unsafe(nil)); end - # Returns the path to the partial that is used for rendering the attachable - # in Trix. Defaults to +to_partial_path+. + # Returns the path to the partial that is used for rendering the attachable in + # Trix. Defaults to `to_partial_path`. # # Override to render a different partial: # - # class User < ApplicationRecord - # def to_trix_content_attachment_partial_path - # "users/trix_content_attachment" + # class User < ApplicationRecord + # def to_trix_content_attachment_partial_path + # "users/trix_content_attachment" + # end # end - # end # - # source://actiontext/lib/action_text/attachable.rb#111 + # source://actiontext/lib/action_text/attachable.rb#113 def to_trix_content_attachment_partial_path; end private - # source://actiontext/lib/action_text/attachable.rb#142 + # source://actiontext/lib/action_text/attachable.rb#144 def attribute_names_for_serialization; end - # source://actiontext/lib/action_text/attachable.rb#146 + # source://actiontext/lib/action_text/attachable.rb#148 def read_attribute_for_serialization(key); end class << self - # source://actiontext/lib/action_text/attachable.rb#41 + # source://actiontext/lib/action_text/attachable.rb#43 def from_attachable_sgid(sgid, options = T.unsafe(nil)); end - # Extracts the +ActionText::Attachable+ from the attachment HTML node: + # Extracts the `ActionText::Attachable` from the attachment HTML node: # - # person = Person.create! name: "Javan" - # html = %Q() - # fragment = ActionText::Fragment.wrap(html) - # attachment_node = fragment.find_all(ActionText::Attachment.tag_name).first - # ActionText::Attachable.from_node(attachment_node) # => person + # person = Person.create! name: "Javan" + # html = %Q() + # fragment = ActionText::Fragment.wrap(html) + # attachment_node = fragment.find_all(ActionText::Attachment.tag_name).first + # ActionText::Attachable.from_node(attachment_node) # => person # - # source://actiontext/lib/action_text/attachable.rb#29 + # source://actiontext/lib/action_text/attachable.rb#31 def from_node(node); end private - # source://actiontext/lib/action_text/attachable.rb#48 + # source://actiontext/lib/action_text/attachable.rb#50 def attachable_from_sgid(sgid); end end end # source://actiontext/lib/action_text/attachable.rb#0 module ActionText::Attachable::ClassMethods - # source://actiontext/lib/action_text/attachable.rb#56 + # source://actiontext/lib/action_text/attachable.rb#58 def from_attachable_sgid(sgid); end - # source://actiontext/lib/action_text/attachable.rb#70 + # source://actiontext/lib/action_text/attachable.rb#72 def to_missing_attachable_partial_path; end end -# source://actiontext/lib/action_text/attachable.rb#19 +# source://actiontext/lib/action_text/attachable.rb#21 ActionText::Attachable::LOCATOR_NAME = T.let(T.unsafe(nil), String) # source://actiontext/lib/action_text.rb#30 @@ -169,7 +169,7 @@ module ActionText::Attachables extend ::ActiveSupport::Autoload end -# source://actiontext/lib/action_text/attachables/content_attachment.rb#5 +# source://actiontext/lib/action_text/attachables/content_attachment.rb#7 class ActionText::Attachables::ContentAttachment include ::ActiveModel::Validations include ::ActiveSupport::Callbacks @@ -189,205 +189,193 @@ class ActionText::Attachables::ContentAttachment extend ::ActiveModel::Validations::HelperMethods extend ::ActiveModel::Conversion::ClassMethods - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_validate_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _validate_callbacks; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activemodel/8.0.0.beta1lib/active_model/validations.rb#50 def _validators; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activemodel/8.0.0.beta1lib/active_model/validations.rb#50 def _validators?; end - # source://actiontext/lib/action_text/attachables/content_attachment.rb#18 + # source://actiontext/lib/action_text/attachables/content_attachment.rb#20 def attachable_plain_text_representation(caption); end # Returns the value of attribute content. # - # source://actiontext/lib/action_text/attachables/content_attachment.rb#13 + # source://actiontext/lib/action_text/attachables/content_attachment.rb#15 def content; end # Sets the attribute content # # @param value the value to set the attribute content to. # - # source://actiontext/lib/action_text/attachables/content_attachment.rb#13 + # source://actiontext/lib/action_text/attachables/content_attachment.rb#15 def content=(_arg0); end # Returns the value of attribute content_type. # - # source://actiontext/lib/action_text/attachables/content_attachment.rb#13 + # source://actiontext/lib/action_text/attachables/content_attachment.rb#15 def content_type; end # Sets the attribute content_type # # @param value the value to set the attribute content_type to. # - # source://actiontext/lib/action_text/attachables/content_attachment.rb#13 + # source://actiontext/lib/action_text/attachables/content_attachment.rb#15 def content_type=(_arg0); end - # source://activemodel/7.1.3.3lib/active_model/naming.rb#255 - def model_name(&block); end + # source://activemodel/8.0.0.beta1lib/active_model/naming.rb#255 + def model_name(&_arg0); end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 + # source://activemodel/8.0.0.beta1lib/active_model/conversion.rb#32 def param_delimiter=(_arg0); end - # source://actiontext/lib/action_text/attachables/content_attachment.rb#22 + # source://actiontext/lib/action_text/attachables/content_attachment.rb#24 def to_html; end - # source://actiontext/lib/action_text/attachables/content_attachment.rb#30 + # source://actiontext/lib/action_text/attachables/content_attachment.rb#32 def to_partial_path; end - # source://actiontext/lib/action_text/attachables/content_attachment.rb#26 + # source://actiontext/lib/action_text/attachables/content_attachment.rb#28 def to_s; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#67 - def validation_context; end - private - # source://actiontext/lib/action_text/attachables/content_attachment.rb#35 + # source://actiontext/lib/action_text/attachables/content_attachment.rb#37 def content_instance; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#67 - def validation_context=(_arg0); end - class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _validate_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _validate_callbacks=(value); end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _validators; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 - def _validators=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activemodel/8.0.0.beta1lib/active_model/validations.rb#50 def _validators?; end - # source://actiontext/lib/action_text/attachables/content_attachment.rb#8 + # source://actiontext/lib/action_text/attachables/content_attachment.rb#10 def from_node(node); end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def param_delimiter; end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 - def param_delimiter=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def param_delimiter=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 + # source://activemodel/8.0.0.beta1lib/active_model/conversion.rb#32 def param_delimiter?; end end end -# source://actiontext/lib/action_text/attachables/missing_attachable.rb#5 +# source://actiontext/lib/action_text/attachables/missing_attachable.rb#7 class ActionText::Attachables::MissingAttachable extend ::ActiveModel::Naming # @return [MissingAttachable] a new instance of MissingAttachable # - # source://actiontext/lib/action_text/attachables/missing_attachable.rb#10 + # source://actiontext/lib/action_text/attachables/missing_attachable.rb#12 def initialize(sgid); end - # source://actiontext/lib/action_text/attachables/missing_attachable.rb#22 + # source://actiontext/lib/action_text/attachables/missing_attachable.rb#24 def model; end - # source://activemodel/7.1.3.3lib/active_model/naming.rb#255 - def model_name(&block); end + # source://activemodel/8.0.0.beta1lib/active_model/naming.rb#255 + def model_name(&_arg0); end - # source://actiontext/lib/action_text/attachables/missing_attachable.rb#14 + # source://actiontext/lib/action_text/attachables/missing_attachable.rb#16 def to_partial_path; end end -# source://actiontext/lib/action_text/attachables/missing_attachable.rb#8 +# source://actiontext/lib/action_text/attachables/missing_attachable.rb#10 ActionText::Attachables::MissingAttachable::DEFAULT_PARTIAL_PATH = T.let(T.unsafe(nil), String) -# source://actiontext/lib/action_text/attachables/remote_image.rb#5 +# source://actiontext/lib/action_text/attachables/remote_image.rb#7 class ActionText::Attachables::RemoteImage extend ::ActiveModel::Naming # @return [RemoteImage] a new instance of RemoteImage # - # source://actiontext/lib/action_text/attachables/remote_image.rb#30 + # source://actiontext/lib/action_text/attachables/remote_image.rb#32 def initialize(attributes = T.unsafe(nil)); end - # source://actiontext/lib/action_text/attachables/remote_image.rb#37 + # source://actiontext/lib/action_text/attachables/remote_image.rb#39 def attachable_plain_text_representation(caption); end # Returns the value of attribute content_type. # - # source://actiontext/lib/action_text/attachables/remote_image.rb#28 + # source://actiontext/lib/action_text/attachables/remote_image.rb#30 def content_type; end # Returns the value of attribute height. # - # source://actiontext/lib/action_text/attachables/remote_image.rb#28 + # source://actiontext/lib/action_text/attachables/remote_image.rb#30 def height; end - # source://activemodel/7.1.3.3lib/active_model/naming.rb#255 - def model_name(&block); end + # source://activemodel/8.0.0.beta1lib/active_model/naming.rb#255 + def model_name(&_arg0); end - # source://actiontext/lib/action_text/attachables/remote_image.rb#41 + # source://actiontext/lib/action_text/attachables/remote_image.rb#43 def to_partial_path; end # Returns the value of attribute url. # - # source://actiontext/lib/action_text/attachables/remote_image.rb#28 + # source://actiontext/lib/action_text/attachables/remote_image.rb#30 def url; end # Returns the value of attribute width. # - # source://actiontext/lib/action_text/attachables/remote_image.rb#28 + # source://actiontext/lib/action_text/attachables/remote_image.rb#30 def width; end class << self - # source://actiontext/lib/action_text/attachables/remote_image.rb#9 + # source://actiontext/lib/action_text/attachables/remote_image.rb#11 def from_node(node); end private - # source://actiontext/lib/action_text/attachables/remote_image.rb#20 + # source://actiontext/lib/action_text/attachables/remote_image.rb#22 def attributes_from_node(node); end # @return [Boolean] # - # source://actiontext/lib/action_text/attachables/remote_image.rb#16 + # source://actiontext/lib/action_text/attachables/remote_image.rb#18 def content_type_is_image?(content_type); end end end -# = Action Text \Attachment +# # Action Text Attachment # # Attachments serialize attachables to HTML or plain text. # -# class Person < ApplicationRecord -# include ActionText::Attachable -# end +# class Person < ApplicationRecord +# include ActionText::Attachable +# end # -# attachable = Person.create! name: "Javan" -# attachment = ActionText::Attachment.from_attachable(attachable) -# attachment.to_html # => " " " " "[racecar.jpg]" + # attachable = ActiveStorage::Blob.find_by filename: "racecar.jpg" + # attachment = ActionText::Attachment.from_attachable(attachable) + # attachment.to_plain_text # => "[racecar.jpg]" # - # Use the +caption+ when set: + # Use the `caption` when set: # - # attachment = ActionText::Attachment.from_attachable(attachable, caption: "Vroom vroom") - # attachment.to_plain_text # => "[Vroom vroom]" + # attachment = ActionText::Attachment.from_attachable(attachable, caption: "Vroom vroom") + # attachment.to_plain_text # => "[Vroom vroom]" # # The presentation can be overridden by implementing the - # +attachable_plain_text_representation+ method: + # `attachable_plain_text_representation` method: # - # class Person < ApplicationRecord - # include ActionText::Attachable + # class Person < ApplicationRecord + # include ActionText::Attachable # - # def attachable_plain_text_representation - # "[#{name}]" + # def attachable_plain_text_representation + # "[#{name}]" + # end # end - # end # - # attachable = Person.create! name: "Javan" - # attachment = ActionText::Attachment.from_attachable(attachable) - # attachment.to_plain_text # => "[Javan]" + # attachable = Person.create! name: "Javan" + # attachment = ActionText::Attachment.from_attachable(attachable) + # attachment.to_plain_text # => "[Javan]" # - # source://actiontext/lib/action_text/attachment.rb#108 + # source://actiontext/lib/action_text/attachment.rb#110 def to_plain_text; end - # source://actiontext/lib/action_text/attachment.rb#125 + # source://actiontext/lib/action_text/attachment.rb#127 def to_s; end - # source://actiontext/lib/action_text/attachment.rb#79 + # source://actiontext/lib/action_text/attachment.rb#81 def with_full_attributes; end private - # source://actiontext/lib/action_text/attachment.rb#138 + # source://actiontext/lib/action_text/attachment.rb#140 def attachable_attributes; end - # source://actiontext/lib/action_text/attachment.rb#134 + # source://actiontext/lib/action_text/attachment.rb#136 def node_attributes; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/delegation.rb#323 + # source://activesupport/8.0.0.beta1lib/active_support/delegation.rb#179 def respond_to_missing?(name, include_private = T.unsafe(nil)); end - # source://actiontext/lib/action_text/attachment.rb#142 + # source://actiontext/lib/action_text/attachment.rb#144 def sgid_attributes; end class << self - # source://actiontext/lib/action_text/attachment.rb#25 + # source://actiontext/lib/action_text/attachment.rb#27 def fragment_by_canonicalizing_attachments(content); end - # source://actiontext/lib/action_text/attachment.rb#37 + # source://actiontext/lib/action_text/attachment.rb#39 def from_attachable(attachable, attributes = T.unsafe(nil)); end - # source://actiontext/lib/action_text/attachment.rb#33 + # source://actiontext/lib/action_text/attachment.rb#35 def from_attachables(attachables); end - # source://actiontext/lib/action_text/attachment.rb#43 + # source://actiontext/lib/action_text/attachment.rb#45 def from_attributes(attributes, attachable = T.unsafe(nil)); end - # source://actiontext/lib/action_text/attachment.rb#29 + # source://actiontext/lib/action_text/attachment.rb#31 def from_node(node, attachable = T.unsafe(nil)); end - # source://actiontext/lib/action_text/attachment.rb#20 + # source://actiontext/lib/action_text/attachment.rb#22 def tag_name; end - # source://actiontext/lib/action_text/attachment.rb#20 + # source://actiontext/lib/action_text/attachment.rb#22 def tag_name=(val); end private - # source://actiontext/lib/action_text/attachment.rb#50 + # source://actiontext/lib/action_text/attachment.rb#52 def node_from_attributes(attributes); end - # source://actiontext/lib/action_text/attachment.rb#56 + # source://actiontext/lib/action_text/attachment.rb#58 def process_attributes(attributes); end end end -# source://actiontext/lib/action_text/attachment.rb#22 +# source://actiontext/lib/action_text/attachment.rb#24 ActionText::Attachment::ATTRIBUTES = T.let(T.unsafe(nil), Array) -# source://actiontext/lib/action_text/attachment_gallery.rb#4 +# source://actiontext/lib/action_text/attachment_gallery.rb#6 class ActionText::AttachmentGallery include ::ActiveModel::Validations include ::ActiveSupport::Callbacks @@ -546,110 +534,96 @@ class ActionText::AttachmentGallery # @return [AttachmentGallery] a new instance of AttachmentGallery # - # source://actiontext/lib/action_text/attachment_gallery.rb#52 + # source://actiontext/lib/action_text/attachment_gallery.rb#54 def initialize(node); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_validate_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _validate_callbacks; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activemodel/8.0.0.beta1lib/active_model/validations.rb#50 def _validators; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activemodel/8.0.0.beta1lib/active_model/validations.rb#50 def _validators?; end - # source://actiontext/lib/action_text/attachment_gallery.rb#56 + # source://actiontext/lib/action_text/attachment_gallery.rb#58 def attachments; end - # source://actiontext/lib/action_text/attachment_gallery.rb#66 + # source://actiontext/lib/action_text/attachment_gallery.rb#68 def inspect; end - # source://activemodel/7.1.3.3lib/active_model/naming.rb#255 - def model_name(&block); end + # source://activemodel/8.0.0.beta1lib/active_model/naming.rb#255 + def model_name(&_arg0); end # Returns the value of attribute node. # - # source://actiontext/lib/action_text/attachment_gallery.rb#50 + # source://actiontext/lib/action_text/attachment_gallery.rb#52 def node; end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 + # source://activemodel/8.0.0.beta1lib/active_model/conversion.rb#32 def param_delimiter=(_arg0); end - # source://actiontext/lib/action_text/attachment_gallery.rb#62 + # source://actiontext/lib/action_text/attachment_gallery.rb#64 def size; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#67 - def validation_context; end - - private - - # source://activemodel/7.1.3.3lib/active_model/validations.rb#67 - def validation_context=(_arg0); end - class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _validate_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _validate_callbacks=(value); end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _validators; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 - def _validators=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activemodel/8.0.0.beta1lib/active_model/validations.rb#50 def _validators?; end - # source://actiontext/lib/action_text/attachment_gallery.rb#41 + # source://actiontext/lib/action_text/attachment_gallery.rb#43 def attachment_selector; end - # source://actiontext/lib/action_text/attachment_gallery.rb#25 + # source://actiontext/lib/action_text/attachment_gallery.rb#27 def find_attachment_gallery_nodes(content); end - # source://actiontext/lib/action_text/attachment_gallery.rb#11 + # source://actiontext/lib/action_text/attachment_gallery.rb#13 def fragment_by_canonicalizing_attachment_galleries(content); end - # source://actiontext/lib/action_text/attachment_gallery.rb#17 + # source://actiontext/lib/action_text/attachment_gallery.rb#19 def fragment_by_replacing_attachment_gallery_nodes(content); end - # source://actiontext/lib/action_text/attachment_gallery.rb#37 + # source://actiontext/lib/action_text/attachment_gallery.rb#39 def from_node(node); end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def param_delimiter; end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 - def param_delimiter=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def param_delimiter=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 + # source://activemodel/8.0.0.beta1lib/active_model/conversion.rb#32 def param_delimiter?; end - # source://actiontext/lib/action_text/attachment_gallery.rb#45 + # source://actiontext/lib/action_text/attachment_gallery.rb#47 def selector; end end end -# source://actiontext/lib/action_text/attachment_gallery.rb#7 +# source://actiontext/lib/action_text/attachment_gallery.rb#9 ActionText::AttachmentGallery::TAG_NAME = T.let(T.unsafe(nil), String) # source://actiontext/lib/action_text.rb#38 @@ -657,18 +631,18 @@ module ActionText::Attachments extend ::ActiveSupport::Autoload end -# source://actiontext/lib/action_text/attachments/caching.rb#5 +# source://actiontext/lib/action_text/attachments/caching.rb#7 module ActionText::Attachments::Caching - # source://actiontext/lib/action_text/attachments/caching.rb#6 + # source://actiontext/lib/action_text/attachments/caching.rb#8 def cache_key(*args); end private - # source://actiontext/lib/action_text/attachments/caching.rb#11 + # source://actiontext/lib/action_text/attachments/caching.rb#13 def cache_digest; end end -# source://actiontext/lib/action_text/attachments/minification.rb#5 +# source://actiontext/lib/action_text/attachments/minification.rb#7 module ActionText::Attachments::Minification extend ::ActiveSupport::Concern @@ -677,35 +651,35 @@ end # source://actiontext/lib/action_text/attachments/minification.rb#0 module ActionText::Attachments::Minification::ClassMethods - # source://actiontext/lib/action_text/attachments/minification.rb#9 + # source://actiontext/lib/action_text/attachments/minification.rb#11 def fragment_by_minifying_attachments(content); end end -# source://actiontext/lib/action_text/attachments/trix_conversion.rb#7 +# source://actiontext/lib/action_text/attachments/trix_conversion.rb#9 module ActionText::Attachments::TrixConversion extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionText::Attachments::TrixConversion::ClassMethods - # source://actiontext/lib/action_text/attachments/trix_conversion.rb#22 + # source://actiontext/lib/action_text/attachments/trix_conversion.rb#24 def to_trix_attachment(content = T.unsafe(nil)); end private - # source://actiontext/lib/action_text/attachments/trix_conversion.rb#29 + # source://actiontext/lib/action_text/attachments/trix_conversion.rb#31 def trix_attachment_content; end end # source://actiontext/lib/action_text/attachments/trix_conversion.rb#0 module ActionText::Attachments::TrixConversion::ClassMethods - # source://actiontext/lib/action_text/attachments/trix_conversion.rb#11 + # source://actiontext/lib/action_text/attachments/trix_conversion.rb#13 def fragment_by_converting_trix_attachments(content); end - # source://actiontext/lib/action_text/attachments/trix_conversion.rb#17 + # source://actiontext/lib/action_text/attachments/trix_conversion.rb#19 def from_trix_attachment(trix_attachment); end end -# source://actiontext/lib/action_text/attribute.rb#4 +# source://actiontext/lib/action_text/attribute.rb#6 module ActionText::Attribute extend ::ActiveSupport::Concern @@ -714,37 +688,38 @@ end # source://actiontext/lib/action_text/attribute.rb#0 module ActionText::Attribute::ClassMethods - # source://actiontext/lib/action_text/attribute.rb#37 - def has_rich_text(name, encrypted: T.unsafe(nil), strict_loading: T.unsafe(nil)); end + # source://actiontext/lib/action_text/attribute.rb#53 + def has_rich_text(name, encrypted: T.unsafe(nil), strict_loading: T.unsafe(nil), store_if_blank: T.unsafe(nil)); end - # source://actiontext/lib/action_text/attribute.rb#66 + # source://actiontext/lib/action_text/attribute.rb#100 def rich_text_association_names; end - # source://actiontext/lib/action_text/attribute.rb#62 + # source://actiontext/lib/action_text/attribute.rb#95 def with_all_rich_text; end end -# = Action Text \Content +# # Action Text Content # -# The +ActionText::Content+ class wraps an HTML fragment to add support for +# The `ActionText::Content` class wraps an HTML fragment to add support for # parsing, rendering and serialization. It can be used to extract links and -# attachments, convert the fragment to plain text, or serialize the fragment -# to the database. +# attachments, convert the fragment to plain text, or serialize the fragment to +# the database. # # The ActionText::RichText record serializes the `body` attribute as -# +ActionText::Content+. +# `ActionText::Content`. # -# class Message < ActiveRecord::Base -# has_rich_text :content -# end +# class Message < ActiveRecord::Base +# has_rich_text :content +# end # -# message = Message.create!(content: "

Funny times!

") -# body = message.content.body # => # -# body.to_s # => "

Funny times!

" -# body.to_plain_text # => "Funny times!" +# message = Message.create!(content: "

Funny times!

") +# body = message.content.body # => # +# body.to_s # => "

Funny times!

" +# body.to_plain_text # => "Funny times!" # -# source://actiontext/lib/action_text/content.rb#22 +# source://actiontext/lib/action_text/content.rb#24 class ActionText::Content + include ::ActionText::ContentHelper include ::ActionText::Serialization include ::ActionText::Rendering extend ::ActionText::Serialization::ClassMethods @@ -752,127 +727,148 @@ class ActionText::Content # @return [Content] a new instance of Content # - # source://actiontext/lib/action_text/content.rb#37 + # source://actiontext/lib/action_text/content.rb#40 def initialize(content = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actiontext/lib/action_text/content.rb#145 + # source://actiontext/lib/action_text/content.rb#169 def ==(other); end - # source://actiontext/lib/action_text/content.rb#90 + # source://actiontext/lib/action_text/content.rb#93 def append_attachables(attachables); end - # source://actiontext/lib/action_text/content.rb#137 + # source://actiontext/lib/action_text/content.rb#161 def as_json(*_arg0); end # Extracts +ActionText::Attachable+s from the HTML fragment: # - # attachable = ActiveStorage::Blob.first - # html = %Q() - # content = ActionText::Content.new(html) - # content.attachables # => [attachable] + # attachable = ActiveStorage::Blob.first + # html = %Q() + # content = ActionText::Content.new(html) + # content.attachables # => [attachable] # - # source://actiontext/lib/action_text/content.rb#84 + # source://actiontext/lib/action_text/content.rb#87 def attachables; end - # source://actiontext/lib/action_text/content.rb#68 + # source://actiontext/lib/action_text/content.rb#71 def attachment_galleries; end # Extracts +ActionText::Attachment+s from the HTML fragment: # - # attachable = ActiveStorage::Blob.first - # html = %Q() - # content = ActionText::Content.new(html) - # content.attachments # => [#
) + # content = ActionText::Content.new(html) + # content.attachments # => [# ["http://example.com/"] + # html = 'Example' + # content = ActionText::Content.new(html) + # content.links # => ["http://example.com/"] # - # source://actiontext/lib/action_text/content.rb#52 + # source://actiontext/lib/action_text/content.rb#55 def links; end - # source://actiontext/lib/action_text/content.rb#27 + # source://actiontext/lib/action_text/content.rb#30 def present?(*_arg0, **_arg1, &_arg2); end - # source://actiontext/lib/action_text/rendering.rb#12 + # source://actiontext/lib/action_text/rendering.rb#14 def render(*_arg0, **_arg1, &_arg2); end - # source://actiontext/lib/action_text/content.rb#102 + # source://actiontext/lib/action_text/content.rb#109 def render_attachment_galleries(&block); end - # source://actiontext/lib/action_text/content.rb#95 + # source://actiontext/lib/action_text/content.rb#98 def render_attachments(**options, &block); end - # source://actiontext/lib/action_text/content.rb#121 + # source://actiontext/lib/action_text/content.rb#138 def to_html; end - # source://actiontext/lib/action_text/content.rb#129 + # source://actiontext/lib/action_text/content.rb#146 def to_partial_path; end - # Returns the content as plain text with all HTML tags removed. + # Returns a plain-text version of the markup contained by the content, with tags + # removed but HTML entities encoded. + # + # content = ActionText::Content.new("

Funny times!

") + # content.to_plain_text # => "Funny times!" + # + # content = ActionText::Content.new("
safe
") + # content.to_plain_text # => "safeunsafe" # - # content = ActionText::Content.new("

Funny times!

") - # content.to_plain_text # => "Funny times!" + # NOTE: that the returned string is not HTML safe and should not be rendered in + # browsers. # - # source://actiontext/lib/action_text/content.rb#113 + # content = ActionText::Content.new("<script>alert()</script>") + # content.to_plain_text # => "" + # + # source://actiontext/lib/action_text/content.rb#130 def to_plain_text; end - # source://actiontext/lib/action_text/content.rb#125 + # source://actiontext/lib/action_text/content.rb#142 def to_rendered_html_with_layout; end - # source://actiontext/lib/action_text/content.rb#133 + # Safely transforms Content into an HTML String. + # + # content = ActionText::Content.new(content: "

Funny times!

") + # content.to_s # => "

Funny times!

" + # + # content = ActionText::Content.new("
safe
") + # content.to_s # => "
safeunsafe
" + # + # source://actiontext/lib/action_text/content.rb#157 def to_s; end - # source://actiontext/lib/action_text/content.rb#117 + # source://actiontext/lib/action_text/content.rb#134 def to_trix_html; end private - # source://actiontext/lib/action_text/content.rb#162 + # source://actiontext/lib/action_text/content.rb#186 def attachment_for_node(node, with_full_attributes: T.unsafe(nil)); end - # source://actiontext/lib/action_text/content.rb#167 + # source://actiontext/lib/action_text/content.rb#191 def attachment_gallery_for_node(node); end - # source://actiontext/lib/action_text/content.rb#158 + # source://actiontext/lib/action_text/content.rb#182 def attachment_gallery_nodes; end - # source://actiontext/lib/action_text/content.rb#154 + # source://actiontext/lib/action_text/content.rb#178 def attachment_nodes; end class << self - # source://actiontext/lib/action_text/content.rb#30 + # source://actiontext/lib/action_text/content.rb#33 def fragment_by_canonicalizing_content(content); end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 def renderer; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 def renderer=(obj); end end end @@ -886,6 +882,7 @@ module ActionText::ContentHelper def render_action_text_attachments(content); end def render_action_text_content(content); end def sanitize_action_text_content(content); end + def sanitize_content_attachment(content_attachment); end def sanitizer; end def sanitizer=(val); end def sanitizer_allowed_attributes; end @@ -905,256 +902,238 @@ module ActionText::ContentHelper end end -class ActionText::EncryptedRichText < ::ActionText::RichText - include ::ActionText::EncryptedRichText::GeneratedAttributeMethods - include ::ActionText::EncryptedRichText::GeneratedAssociationMethods - - class << self - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 - def _validators; end - - # source://activerecord/7.1.3.3lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads; end - - # source://activerecord/7.1.3.3lib/active_record/enum.rb#167 - def defined_enums; end - - # source://activerecord/7.1.3.3lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes; end - end -end - -module ActionText::EncryptedRichText::GeneratedAssociationMethods; end -module ActionText::EncryptedRichText::GeneratedAttributeMethods; end - -# source://actiontext/lib/action_text/encryption.rb#4 +# source://actiontext/lib/action_text/encryption.rb#6 module ActionText::Encryption - # source://actiontext/lib/action_text/encryption.rb#12 + # source://actiontext/lib/action_text/encryption.rb#14 def decrypt; end - # source://actiontext/lib/action_text/encryption.rb#5 + # source://actiontext/lib/action_text/encryption.rb#7 def encrypt; end private - # source://actiontext/lib/action_text/encryption.rb#24 + # source://actiontext/lib/action_text/encryption.rb#26 def decrypt_rich_texts; end - # source://actiontext/lib/action_text/encryption.rb#20 + # source://actiontext/lib/action_text/encryption.rb#22 def encrypt_rich_texts; end - # source://actiontext/lib/action_text/encryption.rb#32 + # source://actiontext/lib/action_text/encryption.rb#34 def encryptable_rich_texts; end # @return [Boolean] # - # source://actiontext/lib/action_text/encryption.rb#28 + # source://actiontext/lib/action_text/encryption.rb#30 def has_encrypted_rich_texts?; end end -# source://actiontext/lib/action_text/engine.rb#11 +# source://actiontext/lib/action_text/engine.rb#13 class ActionText::Engine < ::Rails::Engine class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end end end -# = Action Text \FixtureSet +# # Action Text FixtureSet # -# Fixtures are a way of organizing data that you want to test against; in -# short, sample data. +# Fixtures are a way of organizing data that you want to test against; in short, +# sample data. # # To learn more about fixtures, read the ActiveRecord::FixtureSet documentation. # -# === YAML +# ### YAML # # Like other Active Record-backed models, ActionText::RichText records inherit -# from ActiveRecord::Base instances and can therefore be populated by -# fixtures. +# from ActiveRecord::Base instances and can therefore be populated by fixtures. # -# Consider an Article class: +# Consider an `Article` class: # -# class Article < ApplicationRecord -# has_rich_text :content -# end +# class Article < ApplicationRecord +# has_rich_text :content +# end # -# To declare fixture data for the related content, first declare fixture -# data for Article instances in test/fixtures/articles.yml: +# To declare fixture data for the related `content`, first declare fixture data +# for `Article` instances in `test/fixtures/articles.yml`: # -# first: -# title: An Article +# first: +# title: An Article # # Then declare the ActionText::RichText fixture data in -# test/fixtures/action_text/rich_texts.yml, making sure to declare -# each entry's record: key as a polymorphic relationship: +# `test/fixtures/action_text/rich_texts.yml`, making sure to declare each +# entry's `record:` key as a polymorphic relationship: # -# first: -# record: first (Article) -# name: content -# body:
Hello, world.
+# first: +# record: first (Article) +# name: content +# body:
Hello, world.
# # When processed, Active Record will insert database records for each fixture # entry and will ensure the Action Text relationship is intact. # -# source://actiontext/lib/action_text/fixture_set.rb#40 +# source://actiontext/lib/action_text/fixture_set.rb#41 class ActionText::FixtureSet class << self - # Fixtures support Action Text attachments as part of their body - # HTML. + # Fixtures support Action Text attachments as part of their `body` HTML. # - # === Examples + # ### Examples # - # For example, consider a second Article fixture declared in - # test/fixtures/articles.yml: + # For example, consider a second `Article` fixture declared in + # `test/fixtures/articles.yml`: # - # second: - # title: Another Article + # second: + # title: Another Article # - # You can attach a mention of articles(:first) to second's - # content by embedding a call to ActionText::FixtureSet.attachment - # in the body: value in test/fixtures/action_text/rich_texts.yml: + # You can attach a mention of `articles(:first)` to `second`'s `content` by + # embedding a call to `ActionText::FixtureSet.attachment` in the `body:` value + # in `test/fixtures/action_text/rich_texts.yml`: # - # second: - # record: second (Article) - # name: content - # body:
Hello, <%= ActionText::FixtureSet.attachment("articles", :first) %>
+ # second: + # record: second (Article) + # name: content + # body:
Hello, <%= ActionText::FixtureSet.attachment("articles", :first) %>
# # source://actiontext/lib/action_text/fixture_set.rb#61 def attachment(fixture_set_name, label, column_type: T.unsafe(nil)); end end end -# source://actiontext/lib/action_text/fragment.rb#4 +# source://actiontext/lib/action_text/fragment.rb#6 class ActionText::Fragment # @return [Fragment] a new instance of Fragment # - # source://actiontext/lib/action_text/fragment.rb#24 + # source://actiontext/lib/action_text/fragment.rb#28 def initialize(source); end - # source://actiontext/lib/action_text/fragment.rb#28 + # source://actiontext/lib/action_text/fragment.rb#26 + def deconstruct(*_arg0, **_arg1, &_arg2); end + + # source://actiontext/lib/action_text/fragment.rb#32 def find_all(selector); end - # source://actiontext/lib/action_text/fragment.rb#37 + # source://actiontext/lib/action_text/fragment.rb#41 def replace(selector); end # Returns the value of attribute source. # - # source://actiontext/lib/action_text/fragment.rb#22 + # source://actiontext/lib/action_text/fragment.rb#24 def source; end - # source://actiontext/lib/action_text/fragment.rb#50 + # source://actiontext/lib/action_text/fragment.rb#54 def to_html; end - # source://actiontext/lib/action_text/fragment.rb#46 + # source://actiontext/lib/action_text/fragment.rb#50 def to_plain_text; end - # source://actiontext/lib/action_text/fragment.rb#54 + # source://actiontext/lib/action_text/fragment.rb#58 def to_s; end # @yield [source = self.source.dup] # - # source://actiontext/lib/action_text/fragment.rb#32 + # source://actiontext/lib/action_text/fragment.rb#36 def update; end class << self - # source://actiontext/lib/action_text/fragment.rb#17 + # source://actiontext/lib/action_text/fragment.rb#19 def from_html(html); end - # source://actiontext/lib/action_text/fragment.rb#6 + # source://actiontext/lib/action_text/fragment.rb#8 def wrap(fragment_or_html); end end end -# source://actiontext/lib/action_text/html_conversion.rb#4 +# source://actiontext/lib/action_text/html_conversion.rb#6 module ActionText::HtmlConversion extend ::ActionText::HtmlConversion - # source://actiontext/lib/action_text/html_conversion.rb#15 + # source://actiontext/lib/action_text/html_conversion.rb#17 def create_element(tag_name, attributes = T.unsafe(nil)); end - # source://actiontext/lib/action_text/html_conversion.rb#11 + # source://actiontext/lib/action_text/html_conversion.rb#13 def fragment_for_html(html); end - # source://actiontext/lib/action_text/html_conversion.rb#7 + # source://actiontext/lib/action_text/html_conversion.rb#9 def node_to_html(node); end private - # source://actiontext/lib/action_text/html_conversion.rb#20 + # source://actiontext/lib/action_text/html_conversion.rb#22 def document; end end -# source://actiontext/lib/action_text/plain_text_conversion.rb#4 +# source://actiontext/lib/action_text/plain_text_conversion.rb#6 module ActionText::PlainTextConversion extend ::ActionText::PlainTextConversion - # source://actiontext/lib/action_text/plain_text_conversion.rb#7 + # source://actiontext/lib/action_text/plain_text_conversion.rb#9 def node_to_plain_text(node); end private - # source://actiontext/lib/action_text/plain_text_conversion.rb#104 + # source://actiontext/lib/action_text/plain_text_conversion.rb#106 def break_if_nested_list(node, text); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#81 + # source://actiontext/lib/action_text/plain_text_conversion.rb#83 def bullet_for_li_node(node, index); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#93 + # source://actiontext/lib/action_text/plain_text_conversion.rb#95 def indentation_for_li_node(node); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#100 + # source://actiontext/lib/action_text/plain_text_conversion.rb#102 def list_node_depth_for_node(node); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#89 + # source://actiontext/lib/action_text/plain_text_conversion.rb#91 def list_node_name_for_li_node(node); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#32 + # source://actiontext/lib/action_text/plain_text_conversion.rb#34 def plain_text_for_block(node, index = T.unsafe(nil)); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#64 + # source://actiontext/lib/action_text/plain_text_conversion.rb#66 def plain_text_for_blockquote_node(node, index); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#48 + # source://actiontext/lib/action_text/plain_text_conversion.rb#50 def plain_text_for_br_node(node, index); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#56 + # source://actiontext/lib/action_text/plain_text_conversion.rb#58 def plain_text_for_div_node(node, index); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#60 + # source://actiontext/lib/action_text/plain_text_conversion.rb#62 def plain_text_for_figcaption_node(node, index); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#32 + # source://actiontext/lib/action_text/plain_text_conversion.rb#34 def plain_text_for_h1_node(node, index = T.unsafe(nil)); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#69 + # source://actiontext/lib/action_text/plain_text_conversion.rb#71 def plain_text_for_li_node(node, index); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#40 + # source://actiontext/lib/action_text/plain_text_conversion.rb#42 def plain_text_for_list(node, index); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#12 + # source://actiontext/lib/action_text/plain_text_conversion.rb#14 def plain_text_for_node(node, index = T.unsafe(nil)); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#20 + # source://actiontext/lib/action_text/plain_text_conversion.rb#22 def plain_text_for_node_children(node); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#40 + # source://actiontext/lib/action_text/plain_text_conversion.rb#42 def plain_text_for_ol_node(node, index); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#32 + # source://actiontext/lib/action_text/plain_text_conversion.rb#34 def plain_text_for_p_node(node, index = T.unsafe(nil)); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#52 + # source://actiontext/lib/action_text/plain_text_conversion.rb#54 def plain_text_for_text_node(node, index); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#40 + # source://actiontext/lib/action_text/plain_text_conversion.rb#42 def plain_text_for_ul_node(node, index); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#28 + # source://actiontext/lib/action_text/plain_text_conversion.rb#30 def plain_text_method_for_node(node); end - # source://actiontext/lib/action_text/plain_text_conversion.rb#77 + # source://actiontext/lib/action_text/plain_text_conversion.rb#79 def remove_trailing_newlines(text); end end @@ -1163,18 +1142,24 @@ class ActionText::Record < ::ActiveRecord::Base include ::ActionText::Record::GeneratedAssociationMethods class << self - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _validators; end - # source://activerecord/7.1.3.3lib/active_record/enum.rb#167 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def defined_enums; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end end end module ActionText::Record::GeneratedAssociationMethods; end module ActionText::Record::GeneratedAttributeMethods; end -# source://actiontext/lib/action_text/rendering.rb#7 +# source://actiontext/lib/action_text/rendering.rb#9 module ActionText::Rendering extend ::ActiveSupport::Concern @@ -1183,143 +1168,41 @@ end # source://actiontext/lib/action_text/rendering.rb#0 module ActionText::Rendering::ClassMethods - # source://actiontext/lib/action_text/rendering.rb#16 + # source://actiontext/lib/action_text/rendering.rb#18 def action_controller_renderer; end - # source://actiontext/lib/action_text/rendering.rb#28 + # source://actiontext/lib/action_text/rendering.rb#30 def render(*args, &block); end - # source://actiontext/lib/action_text/rendering.rb#20 + # source://actiontext/lib/action_text/rendering.rb#22 def with_renderer(renderer); end end -class ActionText::RichText < ::ActionText::Record - include ::ActionText::RichText::GeneratedAttributeMethods - include ::ActionText::RichText::GeneratedAssociationMethods - - # source://activerecord/7.1.3.3lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_embeds_attachments(*args); end - - # source://activerecord/7.1.3.3lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_embeds_blobs(*args); end - - # source://activerecord/7.1.3.3lib/active_record/autosave_association.rb#160 - def autosave_associated_records_for_record(*args); end - - def blank?(*_arg0, **_arg1, &_arg2); end - def empty?(*_arg0, **_arg1, &_arg2); end - def nil?(*_arg0, **_arg1, &_arg2); end - def present?(*_arg0, **_arg1, &_arg2); end - def to_plain_text; end - def to_s(*_arg0, **_arg1, &_arg2); end - def to_trix_html; end - - # source://activerecord/7.1.3.3lib/active_record/autosave_association.rb#160 - def validate_associated_records_for_embeds_attachments(*args); end - - # source://activerecord/7.1.3.3lib/active_record/autosave_association.rb#160 - def validate_associated_records_for_embeds_blobs(*args); end - - class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks; end - - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#11 - def _reflections; end - - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 - def _validators; end - - # source://activestorage/7.1.3.3lib/active_storage/reflection.rb#53 - def attachment_reflections; end - - # source://activerecord/7.1.3.3lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads; end - - # source://activerecord/7.1.3.3lib/active_record/enum.rb#167 - def defined_enums; end - - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 - def with_attached_embeds(*args, **_arg1); end - end -end - -module ActionText::RichText::GeneratedAssociationMethods - # source://activestorage/7.1.3.3lib/active_storage/attached/model.rb#187 - def embeds; end - - # source://activestorage/7.1.3.3lib/active_storage/attached/model.rb#192 - def embeds=(attachables); end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/collection_association.rb#62 - def embeds_attachment_ids; end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/collection_association.rb#72 - def embeds_attachment_ids=(ids); end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#103 - def embeds_attachments; end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#111 - def embeds_attachments=(value); end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/collection_association.rb#62 - def embeds_blob_ids; end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/collection_association.rb#72 - def embeds_blob_ids=(ids); end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#103 - def embeds_blobs; end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#111 - def embeds_blobs=(value); end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#103 - def record; end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#111 - def record=(value); end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/belongs_to.rb#145 - def record_changed?; end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/belongs_to.rb#149 - def record_previously_changed?; end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#19 - def reload_record; end - - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#23 - def reset_record; end -end - -module ActionText::RichText::GeneratedAttributeMethods; end - -# source://actiontext/lib/action_text/serialization.rb#4 +# source://actiontext/lib/action_text/serialization.rb#6 module ActionText::Serialization extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionText::Serialization::ClassMethods - # source://actiontext/lib/action_text/serialization.rb#32 + # source://actiontext/lib/action_text/serialization.rb#34 def _dump(*_arg0); end end # source://actiontext/lib/action_text/serialization.rb#0 module ActionText::Serialization::ClassMethods - # source://actiontext/lib/action_text/serialization.rb#8 + # source://actiontext/lib/action_text/serialization.rb#10 def _load(content); end - # source://actiontext/lib/action_text/serialization.rb#12 + # source://actiontext/lib/action_text/serialization.rb#14 def dump(content); end - # source://actiontext/lib/action_text/serialization.rb#8 + # source://actiontext/lib/action_text/serialization.rb#10 def load(content); end end module ActionText::TagHelper def rich_text_area_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + def rich_textarea_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end class << self def id; end @@ -1327,89 +1210,89 @@ module ActionText::TagHelper end end -# source://actiontext/lib/action_text/trix_attachment.rb#4 +# source://actiontext/lib/action_text/trix_attachment.rb#6 class ActionText::TrixAttachment # @return [TrixAttachment] a new instance of TrixAttachment # - # source://actiontext/lib/action_text/trix_attachment.rb#51 + # source://actiontext/lib/action_text/trix_attachment.rb#53 def initialize(node); end - # source://actiontext/lib/action_text/trix_attachment.rb#55 + # source://actiontext/lib/action_text/trix_attachment.rb#57 def attributes; end # Returns the value of attribute node. # - # source://actiontext/lib/action_text/trix_attachment.rb#49 + # source://actiontext/lib/action_text/trix_attachment.rb#51 def node; end - # source://actiontext/lib/action_text/trix_attachment.rb#59 + # source://actiontext/lib/action_text/trix_attachment.rb#61 def to_html; end - # source://actiontext/lib/action_text/trix_attachment.rb#63 + # source://actiontext/lib/action_text/trix_attachment.rb#65 def to_s; end private - # source://actiontext/lib/action_text/trix_attachment.rb#68 + # source://actiontext/lib/action_text/trix_attachment.rb#70 def attachment_attributes; end - # source://actiontext/lib/action_text/trix_attachment.rb#72 + # source://actiontext/lib/action_text/trix_attachment.rb#74 def composed_attributes; end - # source://actiontext/lib/action_text/trix_attachment.rb#80 + # source://actiontext/lib/action_text/trix_attachment.rb#82 def read_json_attribute(name); end - # source://actiontext/lib/action_text/trix_attachment.rb#76 + # source://actiontext/lib/action_text/trix_attachment.rb#78 def read_json_object_attribute(name); end class << self - # source://actiontext/lib/action_text/trix_attachment.rb#19 + # source://actiontext/lib/action_text/trix_attachment.rb#21 def from_attributes(attributes); end private - # source://actiontext/lib/action_text/trix_attachment.rb#33 + # source://actiontext/lib/action_text/trix_attachment.rb#35 def process_attributes(attributes); end - # source://actiontext/lib/action_text/trix_attachment.rb#37 + # source://actiontext/lib/action_text/trix_attachment.rb#39 def transform_attribute_keys(attributes); end - # source://actiontext/lib/action_text/trix_attachment.rb#41 + # source://actiontext/lib/action_text/trix_attachment.rb#43 def typecast_attribute_values(attributes); end end end -# source://actiontext/lib/action_text/trix_attachment.rb#9 +# source://actiontext/lib/action_text/trix_attachment.rb#11 ActionText::TrixAttachment::ATTRIBUTES = T.let(T.unsafe(nil), Array) -# source://actiontext/lib/action_text/trix_attachment.rb#10 +# source://actiontext/lib/action_text/trix_attachment.rb#12 ActionText::TrixAttachment::ATTRIBUTE_TYPES = T.let(T.unsafe(nil), Hash) -# source://actiontext/lib/action_text/trix_attachment.rb#8 +# source://actiontext/lib/action_text/trix_attachment.rb#10 ActionText::TrixAttachment::COMPOSED_ATTRIBUTES = T.let(T.unsafe(nil), Array) -# source://actiontext/lib/action_text/trix_attachment.rb#6 +# source://actiontext/lib/action_text/trix_attachment.rb#8 ActionText::TrixAttachment::SELECTOR = T.let(T.unsafe(nil), String) -# source://actiontext/lib/action_text/trix_attachment.rb#5 +# source://actiontext/lib/action_text/trix_attachment.rb#7 ActionText::TrixAttachment::TAG_NAME = T.let(T.unsafe(nil), String) -# source://actiontext/lib/action_text/gem_version.rb#9 +# source://actiontext/lib/action_text/gem_version.rb#11 module ActionText::VERSION; end -# source://actiontext/lib/action_text/gem_version.rb#10 +# source://actiontext/lib/action_text/gem_version.rb#12 ActionText::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) -# source://actiontext/lib/action_text/gem_version.rb#11 +# source://actiontext/lib/action_text/gem_version.rb#13 ActionText::VERSION::MINOR = T.let(T.unsafe(nil), Integer) -# source://actiontext/lib/action_text/gem_version.rb#13 +# source://actiontext/lib/action_text/gem_version.rb#15 ActionText::VERSION::PRE = T.let(T.unsafe(nil), String) -# source://actiontext/lib/action_text/gem_version.rb#15 +# source://actiontext/lib/action_text/gem_version.rb#17 ActionText::VERSION::STRING = T.let(T.unsafe(nil), String) -# source://actiontext/lib/action_text/gem_version.rb#12 +# source://actiontext/lib/action_text/gem_version.rb#14 ActionText::VERSION::TINY = T.let(T.unsafe(nil), Integer) module ActionView::Helpers @@ -1426,216 +1309,226 @@ module ActionView::Helpers mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods class << self - # source://actionview/7.1.3.3lib/action_view/helpers.rb#35 + # source://actionview/8.0.0.beta1lib/action_view/helpers.rb#35 def eager_load!; end end end class ActionView::Helpers::FormBuilder - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1715 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1719 def initialize(object_name, object, template, options); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2644 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2648 def button(value = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2468 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2472 def check_box(method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_options_helper.rb#908 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2472 + def checkbox(method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_options_helper.rb#909 def collection_check_boxes(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_options_helper.rb#920 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_options_helper.rb#909 + def collection_checkboxes(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_options_helper.rb#922 def collection_radio_buttons(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_options_helper.rb#860 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_options_helper.rb#861 def collection_select(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def color_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def date_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/date_helper.rb#1237 + # source://actionview/8.0.0.beta1lib/action_view/helpers/date_helper.rb#1237 def date_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def datetime_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def datetime_local_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/date_helper.rb#1261 + # source://actionview/8.0.0.beta1lib/action_view/helpers/date_helper.rb#1261 def datetime_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def email_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2665 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2669 def emitted_hidden_id?; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1684 def field_helpers; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1684 def field_helpers=(_arg0); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1684 def field_helpers?; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1772 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1776 def field_id(method, *suffixes, namespace: T.unsafe(nil), index: T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1792 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1796 def field_name(method, *methods, multiple: T.unsafe(nil), index: T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2322 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2326 def fields(scope = T.unsafe(nil), model: T.unsafe(nil), **options, &block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2284 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2288 def fields_for(record_name, record_object = T.unsafe(nil), fields_options = T.unsafe(nil), &block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2551 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2556 def file_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_options_helper.rb#872 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_options_helper.rb#873 def grouped_collection_select(method, collection, group_method, group_label_method, option_key_method, option_value_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2512 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2517 def hidden_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1752 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1756 def id; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1692 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1696 def index; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2399 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2403 def label(method, text = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def month_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1692 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1696 def multipart; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1695 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1699 def multipart=(multipart); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1692 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1696 def multipart?; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def number_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1690 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1694 def object; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1690 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1694 def object=(_arg0); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1690 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1694 def object_name; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1690 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1694 def object_name=(_arg0); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1690 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1694 def options; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1690 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1694 def options=(_arg0); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def password_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def phone_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2490 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2495 def radio_button(method, tag_value, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def range_field(method, options = T.unsafe(nil)); end def rich_text_area(method, options = T.unsafe(nil)); end + def rich_textarea(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def search_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_options_helper.rb#848 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_options_helper.rb#849 def select(method, choices = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2583 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2588 def submit(value = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def telephone_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def text_area(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def text_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 + def textarea(method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def time_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/date_helper.rb#1249 + # source://actionview/8.0.0.beta1lib/action_view/helpers/date_helper.rb#1249 def time_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_options_helper.rb#884 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_options_helper.rb#885 def time_zone_select(method, priority_zones = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1711 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1715 def to_model; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1707 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1711 def to_partial_path; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def url_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2023 def week_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_options_helper.rb#896 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_options_helper.rb#897 def weekday_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end private - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2750 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2754 def convert_to_legacy_options(options); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2732 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2736 def fields_for_nested_model(name, object, fields_options, block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2703 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2707 def fields_for_with_nested_attributes(association_name, association, options, block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2699 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2703 def nested_attributes_association?(association_name); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2745 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2749 def nested_child_index(name); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2670 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2674 def objectify_options(options); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#2676 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#2680 def submit_default_value; end class << self - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1703 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1707 def _to_partial_path; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1680 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def field_helpers; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1680 - def field_helpers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def field_helpers=(new_value); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1684 def field_helpers?; end end end @@ -1649,141 +1542,148 @@ module ActionView::Helpers::FormHelper mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1586 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1590 def _object_for_form_builder(object); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1343 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1346 def check_box(object_name, method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1373 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1346 + def checkbox(object_name, method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1377 def color_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1437 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1441 def date_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1510 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1514 def datetime_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1510 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1514 def datetime_local_field(object_name, method, options = T.unsafe(nil)); end def default_form_builder; end def default_form_builder=(_arg0); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1564 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1568 def email_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1077 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1079 def fields(scope = T.unsafe(nil), model: T.unsafe(nil), **options, &block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1026 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1028 def fields_for(record_name, record_object = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1245 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1247 def file_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#434 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#435 def form_for(record, options = T.unsafe(nil), &block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#755 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#755 def form_with(model: T.unsafe(nil), scope: T.unsafe(nil), url: T.unsafe(nil), format: T.unsafe(nil), **options, &block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#480 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#481 def form_with_generates_ids; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#480 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#481 def form_with_generates_ids=(val); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#478 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#479 def form_with_generates_remote_forms; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#478 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#479 def form_with_generates_remote_forms=(val); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1212 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1214 def hidden_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1149 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1151 def label(object_name, method, content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1529 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1533 def month_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#482 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#483 def multiple_file_field_include_hidden; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#482 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#483 def multiple_file_field_include_hidden=(val); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1573 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1577 def number_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1194 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1196 def password_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1405 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1409 def phone_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1365 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1369 def radio_button(object_name, method, tag_value, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1582 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1586 def range_field(object_name, method, options = T.unsafe(nil)); end def rich_text_area(object_name, method, options = T.unsafe(nil)); end + def rich_textarea(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1396 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1400 def search_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1405 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1409 def telephone_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1275 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1277 def text_area(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1173 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1175 def text_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1475 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1277 + def textarea(object_name, method, options = T.unsafe(nil)); end + + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1479 def time_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1555 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1559 def url_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1546 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1550 def week_field(object_name, method, options = T.unsafe(nil)); end private - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#464 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#465 def apply_form_for_options!(object, options); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1620 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1624 def default_form_builder_class; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1591 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1595 def html_options_for_form_with(url_for_options = T.unsafe(nil), model = T.unsafe(nil), html: T.unsafe(nil), local: T.unsafe(nil), skip_enforcing_utf8: T.unsafe(nil), **options); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#1606 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#1610 def instantiate_builder(record_name, record_object, options); end class << self - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#480 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#481 def form_with_generates_ids; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#480 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#481 def form_with_generates_ids=(val); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#478 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#479 def form_with_generates_remote_forms; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#478 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#479 def form_with_generates_remote_forms=(val); end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#482 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#483 def multiple_file_field_include_hidden; end - # source://actionview/7.1.3.3lib/action_view/helpers/form_helper.rb#482 + # source://actionview/8.0.0.beta1lib/action_view/helpers/form_helper.rb#483 def multiple_file_field_include_hidden=(val); end end end diff --git a/sorbet/rbi/gems/actionview@7.1.3.3.rbi b/sorbet/rbi/gems/actionview@8.0.0.beta1.rbi similarity index 84% rename from sorbet/rbi/gems/actionview@7.1.3.3.rbi rename to sorbet/rbi/gems/actionview@8.0.0.beta1.rbi index fce44250..7489f83e 100644 --- a/sorbet/rbi/gems/actionview@7.1.3.3.rbi +++ b/sorbet/rbi/gems/actionview@8.0.0.beta1.rbi @@ -6,547 +6,534 @@ class ActionController::Base < ::ActionController::Metal - include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor include ::ActionDispatch::Routing::PolymorphicRoutes include ::ActionController::Head include ::AbstractController::Caching::ConfigMethods include ::ActionController::BasicImplicitRender extend ::AbstractController::Helpers::Resolution - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#13 def _helper_methods; end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#13 def _helper_methods=(_arg0); end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#13 def _helper_methods?; end - # source://actionview/lib/action_view/layouts.rb#216 - def _layout_conditions(&block); end + # source://actionview/lib/action_view/layouts.rb#212 + def _layout_conditions; end + + # source://actionview/lib/action_view/layouts.rb#212 + def _layout_conditions?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _process_action_callbacks; end - # source://actionpack/7.1.3.3lib/action_controller/metal/renderers.rb#31 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/renderers.rb#33 def _renderers; end - # source://actionpack/7.1.3.3lib/action_controller/metal/renderers.rb#31 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/renderers.rb#33 def _renderers=(_arg0); end - # source://actionpack/7.1.3.3lib/action_controller/metal/renderers.rb#31 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/renderers.rb#33 def _renderers?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_process_action_callbacks(&block); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching.rb#42 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching.rb#44 def _view_cache_dependencies; end - # source://actionpack/7.1.3.3lib/abstract_controller/caching.rb#42 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching.rb#44 def _view_cache_dependencies=(_arg0); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching.rb#42 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching.rb#44 def _view_cache_dependencies?; end - # source://actionpack/7.1.3.3lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/params_wrapper.rb#185 def _wrapper_options; end - # source://actionpack/7.1.3.3lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/params_wrapper.rb#185 def _wrapper_options=(_arg0); end - # source://actionpack/7.1.3.3lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/params_wrapper.rb#185 def _wrapper_options?; end - # source://actionpack/7.1.3.3lib/action_controller/metal/flash.rb#36 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/flash.rb#38 def alert; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def allow_forgery_protection; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def allow_forgery_protection=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def assets_dir=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def csrf_token_storage_strategy; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def csrf_token_storage_strategy=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 - def default_protect_from_forgery; end - - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 - def default_protect_from_forgery=(value); end - - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def default_static_extension=(value); end - # source://actionpack/7.1.3.3lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/8.0.0.beta1lib/action_dispatch/routing/url_for.rb#100 def default_url_options; end - # source://actionpack/7.1.3.3lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/8.0.0.beta1lib/action_dispatch/routing/url_for.rb#100 def default_url_options=(_arg0); end - # source://actionpack/7.1.3.3lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/8.0.0.beta1lib/action_dispatch/routing/url_for.rb#100 def default_url_options?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionpack/7.1.3.3lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/etag_with_template_digest.rb#31 def etag_with_template_digest; end - # source://actionpack/7.1.3.3lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/etag_with_template_digest.rb#31 def etag_with_template_digest=(_arg0); end - # source://actionpack/7.1.3.3lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/etag_with_template_digest.rb#31 def etag_with_template_digest?; end - # source://actionpack/7.1.3.3lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/conditional_get.rb#15 def etaggers; end - # source://actionpack/7.1.3.3lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/conditional_get.rb#15 def etaggers=(_arg0); end - # source://actionpack/7.1.3.3lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/conditional_get.rb#15 def etaggers?; end - # source://actionpack/7.1.3.3lib/action_controller/metal/flash.rb#10 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/flash.rb#12 def flash(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def forgery_protection_origin_check; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def forgery_protection_origin_check=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def forgery_protection_strategy; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def forgery_protection_strategy=(value); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching/fragments.rb#26 def fragment_cache_keys; end - # source://actionpack/7.1.3.3lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching/fragments.rb#26 def fragment_cache_keys=(_arg0); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching/fragments.rb#26 def fragment_cache_keys?; end - # source://actionpack/7.1.3.3lib/action_controller/metal/helpers.rb#65 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/helpers.rb#70 def helpers_path; end - # source://actionpack/7.1.3.3lib/action_controller/metal/helpers.rb#65 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/helpers.rb#70 def helpers_path=(_arg0); end - # source://actionpack/7.1.3.3lib/action_controller/metal/helpers.rb#65 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/helpers.rb#70 def helpers_path?; end - # source://actionpack/7.1.3.3lib/action_controller/metal/helpers.rb#66 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/helpers.rb#71 def include_all_helpers; end - # source://actionpack/7.1.3.3lib/action_controller/metal/helpers.rb#66 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/helpers.rb#71 def include_all_helpers=(_arg0); end - # source://actionpack/7.1.3.3lib/action_controller/metal/helpers.rb#66 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/helpers.rb#71 def include_all_helpers?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def log_warning_on_csrf_failure; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def log_warning_on_csrf_failure=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def logger=(value); end - # source://actionpack/7.1.3.3lib/action_controller/metal/flash.rb#36 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/flash.rb#38 def notice; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def per_form_csrf_tokens; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def per_form_csrf_tokens=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def perform_caching=(value); end - # source://actionpack/7.1.3.3lib/abstract_controller/callbacks.rb#36 + # source://actionpack/8.0.0.beta1lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions; end - # source://actionpack/7.1.3.3lib/abstract_controller/callbacks.rb#36 + # source://actionpack/8.0.0.beta1lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions=(val); end - # source://actionpack/7.1.3.3lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/redirecting.rb#17 def raise_on_open_redirects; end - # source://actionpack/7.1.3.3lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/redirecting.rb#17 def raise_on_open_redirects=(val); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def request_forgery_protection_token; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def request_forgery_protection_token=(value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end private - # source://actionview/lib/action_view/layouts.rb#330 + # source://actionview/lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end - # source://actionpack/7.1.3.3lib/action_controller/base.rb#252 + # source://actionpack/8.0.0.beta1lib/action_controller/base.rb#324 def _protected_ivars; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://actionpack/7.1.3.3lib/action_controller/form_builder.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _default_form_builder; end - # source://actionpack/7.1.3.3lib/action_controller/form_builder.rb#33 - def _default_form_builder=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _default_form_builder=(new_value); end - # source://actionpack/7.1.3.3lib/action_controller/form_builder.rb#33 + # source://actionpack/8.0.0.beta1lib/action_controller/form_builder.rb#35 def _default_form_builder?; end - # source://actionpack/7.1.3.3lib/action_controller/metal/flash.rb#8 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _flash_types; end - # source://actionpack/7.1.3.3lib/action_controller/metal/flash.rb#8 - def _flash_types=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _flash_types=(new_value); end - # source://actionpack/7.1.3.3lib/action_controller/metal/flash.rb#8 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/flash.rb#10 def _flash_types?; end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _helper_methods; end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 - def _helper_methods=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _helper_methods=(new_value); end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#13 def _helper_methods?; end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#16 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#17 def _helpers; end - # source://actionview/lib/action_view/layouts.rb#211 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout; end - # source://actionview/lib/action_view/layouts.rb#211 - def _layout=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end # source://actionview/lib/action_view/layouts.rb#211 def _layout?; end - # source://actionview/lib/action_view/layouts.rb#212 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout_conditions; end - # source://actionview/lib/action_view/layouts.rb#212 - def _layout_conditions=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end # source://actionview/lib/action_view/layouts.rb#212 def _layout_conditions?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _process_action_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _process_action_callbacks=(value); end - # source://actionpack/7.1.3.3lib/action_controller/metal/renderers.rb#31 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _renderers; end - # source://actionpack/7.1.3.3lib/action_controller/metal/renderers.rb#31 - def _renderers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _renderers=(new_value); end - # source://actionpack/7.1.3.3lib/action_controller/metal/renderers.rb#31 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/renderers.rb#33 def _renderers?; end - # source://actionpack/7.1.3.3lib/abstract_controller/caching.rb#42 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _view_cache_dependencies; end - # source://actionpack/7.1.3.3lib/abstract_controller/caching.rb#42 - def _view_cache_dependencies=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _view_cache_dependencies=(new_value); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching.rb#42 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching.rb#44 def _view_cache_dependencies?; end - # source://actionpack/7.1.3.3lib/action_controller/metal/params_wrapper.rb#187 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _wrapper_options; end - # source://actionpack/7.1.3.3lib/action_controller/metal/params_wrapper.rb#187 - def _wrapper_options=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _wrapper_options=(new_value); end - # source://actionpack/7.1.3.3lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/params_wrapper.rb#185 def _wrapper_options?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def allow_forgery_protection; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def allow_forgery_protection=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def assets_dir=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def csrf_token_storage_strategy; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def csrf_token_storage_strategy=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 - def default_protect_from_forgery; end - - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 - def default_protect_from_forgery=(value); end - - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def default_static_extension=(value); end - # source://actionpack/7.1.3.3lib/action_dispatch/routing/url_for.rb#97 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_url_options; end - # source://actionpack/7.1.3.3lib/action_dispatch/routing/url_for.rb#97 - def default_url_options=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_url_options=(new_value); end - # source://actionpack/7.1.3.3lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/8.0.0.beta1lib/action_dispatch/routing/url_for.rb#100 def default_url_options?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionpack/7.1.3.3lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def etag_with_template_digest; end - # source://actionpack/7.1.3.3lib/action_controller/metal/etag_with_template_digest.rb#29 - def etag_with_template_digest=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def etag_with_template_digest=(new_value); end - # source://actionpack/7.1.3.3lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/etag_with_template_digest.rb#31 def etag_with_template_digest?; end - # source://actionpack/7.1.3.3lib/action_controller/metal/conditional_get.rb#13 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def etaggers; end - # source://actionpack/7.1.3.3lib/action_controller/metal/conditional_get.rb#13 - def etaggers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def etaggers=(new_value); end - # source://actionpack/7.1.3.3lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/conditional_get.rb#15 def etaggers?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def forgery_protection_origin_check; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def forgery_protection_origin_check=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def forgery_protection_strategy; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def forgery_protection_strategy=(value); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching/fragments.rb#25 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def fragment_cache_keys; end - # source://actionpack/7.1.3.3lib/abstract_controller/caching/fragments.rb#25 - def fragment_cache_keys=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def fragment_cache_keys=(new_value); end - # source://actionpack/7.1.3.3lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/8.0.0.beta1lib/abstract_controller/caching/fragments.rb#26 def fragment_cache_keys?; end - # source://actionpack/7.1.3.3lib/action_controller/metal/helpers.rb#65 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def helpers_path; end - # source://actionpack/7.1.3.3lib/action_controller/metal/helpers.rb#65 - def helpers_path=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def helpers_path=(new_value); end - # source://actionpack/7.1.3.3lib/action_controller/metal/helpers.rb#65 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/helpers.rb#70 def helpers_path?; end - # source://actionpack/7.1.3.3lib/action_controller/metal/helpers.rb#66 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def include_all_helpers; end - # source://actionpack/7.1.3.3lib/action_controller/metal/helpers.rb#66 - def include_all_helpers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def include_all_helpers=(new_value); end - # source://actionpack/7.1.3.3lib/action_controller/metal/helpers.rb#66 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/helpers.rb#71 def include_all_helpers?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def log_warning_on_csrf_failure; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def log_warning_on_csrf_failure=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def logger=(value); end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def per_form_csrf_tokens; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def per_form_csrf_tokens=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def perform_caching=(value); end - # source://actionpack/7.1.3.3lib/abstract_controller/callbacks.rb#36 + # source://actionpack/8.0.0.beta1lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions; end - # source://actionpack/7.1.3.3lib/abstract_controller/callbacks.rb#36 + # source://actionpack/8.0.0.beta1lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions=(val); end - # source://actionpack/7.1.3.3lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/redirecting.rb#17 def raise_on_open_redirects; end - # source://actionpack/7.1.3.3lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/8.0.0.beta1lib/action_controller/metal/redirecting.rb#17 def raise_on_open_redirects=(val); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def request_forgery_protection_token; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def request_forgery_protection_token=(value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 - def rescue_handlers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#115 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.1.3.3lib/active_support/configurable.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end - # source://actionpack/7.1.3.3lib/action_controller/base.rb#184 + # source://actionpack/8.0.0.beta1lib/action_controller/base.rb#222 def without_modules(*modules); end end end -# :include: actionview/README.rdoc +# :include: ../README.rdoc # # source://actionview/lib/action_view/gem_version.rb#3 module ActionView @@ -809,6 +796,23 @@ class ActionView::ActionViewError < ::StandardError; end # This is useful in cases where you aren't sure if the local variable has been assigned. Alternatively, you could also use # defined? headline to first check if the variable has been assigned before using it. # +# By default, templates will accept any locals as keyword arguments. To restrict what locals a template accepts, add a locals: magic comment: +# +# <%# locals: (headline:) %> +# +# Headline: <%= headline %> +# +# In cases where the local variables are optional, declare the keyword argument with a default value: +# +# <%# locals: (headline: nil) %> +# +# <% unless headline.nil? %> +# Headline: <%= headline %> +# <% end %> +# +# Read more about strict locals in {Action View Overview}[https://guides.rubyonrails.org/action_view_overview.html#strict-locals] +# in the guides. +# # === Template caching # # By default, \Rails will compile each template to a method in order to render it. When you alter a template, @@ -865,10 +869,9 @@ class ActionView::ActionViewError < ::StandardError; end # end # end # -# For more information on Builder please consult the {source -# code}[https://github.com/jimweirich/builder]. +# For more information on Builder please consult the {source code}[https://github.com/rails/builder]. # -# source://actionview/lib/action_view/base.rb#141 +# source://actionview/lib/action_view/base.rb#157 class ActionView::Base include ::ActionView::Context include ::ERB::Escape @@ -911,51 +914,51 @@ class ActionView::Base # # @return [Base] a new instance of Base # - # source://actionview/lib/action_view/base.rb#228 + # source://actionview/lib/action_view/base.rb#244 def initialize(lookup_context, assigns, controller); end - # source://actionview/lib/action_view/base.rb#165 + # source://actionview/lib/action_view/base.rb#181 def _routes; end - # source://actionview/lib/action_view/base.rb#165 + # source://actionview/lib/action_view/base.rb#181 def _routes=(_arg0); end - # source://actionview/lib/action_view/base.rb#165 + # source://actionview/lib/action_view/base.rb#181 def _routes?; end - # source://actionview/lib/action_view/base.rb#245 + # source://actionview/lib/action_view/base.rb#261 def _run(method, template, locals, buffer, add_to_stack: T.unsafe(nil), has_strict_locals: T.unsafe(nil), &block); end - # source://actionview/lib/action_view/base.rb#163 + # source://actionview/lib/action_view/base.rb#179 def annotate_rendered_view_with_filenames; end - # source://actionview/lib/action_view/base.rb#163 + # source://actionview/lib/action_view/base.rb#179 def annotate_rendered_view_with_filenames=(val); end - # source://actionview/lib/action_view/base.rb#207 + # source://actionview/lib/action_view/base.rb#223 def assign(new_assigns); end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def assigns; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def assigns=(_arg0); end - # source://actionview/lib/action_view/base.rb#160 + # source://actionview/lib/action_view/base.rb#176 def automatically_disable_submit_tag; end - # source://actionview/lib/action_view/base.rb#160 + # source://actionview/lib/action_view/base.rb#176 def automatically_disable_submit_tag=(val); end # @raise [NotImplementedError] # - # source://actionview/lib/action_view/base.rb#270 + # source://actionview/lib/action_view/base.rb#287 def compiled_method_container; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def config; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attr_internal.rb#44 def config=(_arg0); end # source://actionview/lib/action_view/helpers/translation_helper.rb#18 @@ -964,104 +967,104 @@ class ActionView::Base # source://actionview/lib/action_view/helpers/translation_helper.rb#18 def debug_missing_translation=(val); end - # source://actionview/lib/action_view/base.rb#157 + # source://actionview/lib/action_view/base.rb#173 def default_formats; end - # source://actionview/lib/action_view/base.rb#157 + # source://actionview/lib/action_view/base.rb#173 def default_formats=(val); end - # source://actionview/lib/action_view/base.rb#145 + # source://actionview/lib/action_view/base.rb#161 def field_error_proc; end - # source://actionview/lib/action_view/base.rb#145 + # source://actionview/lib/action_view/base.rb#161 def field_error_proc=(val); end - # source://actionview/lib/action_view/base.rb#205 + # source://actionview/lib/action_view/base.rb#221 def formats(*_arg0, **_arg1, &_arg2); end - # source://actionview/lib/action_view/base.rb#205 + # source://actionview/lib/action_view/base.rb#221 def formats=(arg); end - # source://actionview/lib/action_view/base.rb#278 + # source://actionview/lib/action_view/base.rb#295 def in_rendering_context(options); end - # source://actionview/lib/action_view/base.rb#205 + # source://actionview/lib/action_view/base.rb#221 def locale(*_arg0, **_arg1, &_arg2); end - # source://actionview/lib/action_view/base.rb#205 + # source://actionview/lib/action_view/base.rb#221 def locale=(arg); end - # source://actionview/lib/action_view/base.rb#166 + # source://actionview/lib/action_view/base.rb#182 def logger; end - # source://actionview/lib/action_view/base.rb#166 + # source://actionview/lib/action_view/base.rb#182 def logger=(_arg0); end - # source://actionview/lib/action_view/base.rb#166 + # source://actionview/lib/action_view/base.rb#182 def logger?; end # Returns the value of attribute lookup_context. # - # source://actionview/lib/action_view/base.rb#202 + # source://actionview/lib/action_view/base.rb#218 def lookup_context; end - # source://actionview/lib/action_view/base.rb#154 + # source://actionview/lib/action_view/base.rb#170 def prefix_partial_path_with_controller_namespace; end - # source://actionview/lib/action_view/base.rb#154 + # source://actionview/lib/action_view/base.rb#170 def prefix_partial_path_with_controller_namespace=(_arg0); end - # source://actionview/lib/action_view/base.rb#154 + # source://actionview/lib/action_view/base.rb#170 def prefix_partial_path_with_controller_namespace?; end - # source://actionview/lib/action_view/base.rb#149 + # source://actionview/lib/action_view/base.rb#165 def streaming_completion_on_exception; end - # source://actionview/lib/action_view/base.rb#149 + # source://actionview/lib/action_view/base.rb#165 def streaming_completion_on_exception=(val); end - # source://actionview/lib/action_view/base.rb#205 + # source://actionview/lib/action_view/base.rb#221 def view_paths(*_arg0, **_arg1, &_arg2); end - # source://actionview/lib/action_view/base.rb#205 + # source://actionview/lib/action_view/base.rb#221 def view_paths=(arg); end # Returns the value of attribute view_renderer. # - # source://actionview/lib/action_view/base.rb#202 + # source://actionview/lib/action_view/base.rb#218 def view_renderer; end class << self - # source://actionview/lib/action_view/base.rb#165 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _routes; end - # source://actionview/lib/action_view/base.rb#165 - def _routes=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _routes=(new_value); end - # source://actionview/lib/action_view/base.rb#165 + # source://actionview/lib/action_view/base.rb#181 def _routes?; end - # source://actionview/lib/action_view/base.rb#163 + # source://actionview/lib/action_view/base.rb#179 def annotate_rendered_view_with_filenames; end - # source://actionview/lib/action_view/base.rb#163 + # source://actionview/lib/action_view/base.rb#179 def annotate_rendered_view_with_filenames=(val); end - # source://actionview/lib/action_view/base.rb#160 + # source://actionview/lib/action_view/base.rb#176 def automatically_disable_submit_tag; end - # source://actionview/lib/action_view/base.rb#160 + # source://actionview/lib/action_view/base.rb#176 def automatically_disable_submit_tag=(val); end - # source://actionview/lib/action_view/base.rb#171 + # source://actionview/lib/action_view/base.rb#187 def cache_template_loading; end - # source://actionview/lib/action_view/base.rb#175 + # source://actionview/lib/action_view/base.rb#191 def cache_template_loading=(value); end # @return [Boolean] # - # source://actionview/lib/action_view/base.rb#197 + # source://actionview/lib/action_view/base.rb#213 def changed?(other); end # source://actionview/lib/action_view/helpers/translation_helper.rb#18 @@ -1070,68 +1073,68 @@ class ActionView::Base # source://actionview/lib/action_view/helpers/translation_helper.rb#18 def debug_missing_translation=(val); end - # source://actionview/lib/action_view/helpers/form_helper.rb#2759 + # source://actionview/lib/action_view/helpers/form_helper.rb#2763 def default_form_builder; end - # source://actionview/lib/action_view/helpers/form_helper.rb#2759 + # source://actionview/lib/action_view/helpers/form_helper.rb#2763 def default_form_builder=(val); end - # source://actionview/lib/action_view/base.rb#157 + # source://actionview/lib/action_view/base.rb#173 def default_formats; end - # source://actionview/lib/action_view/base.rb#157 + # source://actionview/lib/action_view/base.rb#173 def default_formats=(val); end # :stopdoc: # - # source://actionview/lib/action_view/base.rb#214 + # source://actionview/lib/action_view/base.rb#230 def empty; end - # source://actionview/lib/action_view/base.rb#169 + # source://actionview/lib/action_view/base.rb#185 def erb_trim_mode=(arg); end - # source://actionview/lib/action_view/base.rb#145 + # source://actionview/lib/action_view/base.rb#161 def field_error_proc; end - # source://actionview/lib/action_view/base.rb#145 + # source://actionview/lib/action_view/base.rb#161 def field_error_proc=(val); end - # source://actionview/lib/action_view/base.rb#166 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def logger; end - # source://actionview/lib/action_view/base.rb#166 - def logger=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def logger=(new_value); end - # source://actionview/lib/action_view/base.rb#166 + # source://actionview/lib/action_view/base.rb#182 def logger?; end - # source://actionview/lib/action_view/base.rb#154 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def prefix_partial_path_with_controller_namespace; end - # source://actionview/lib/action_view/base.rb#154 - def prefix_partial_path_with_controller_namespace=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def prefix_partial_path_with_controller_namespace=(new_value); end - # source://actionview/lib/action_view/base.rb#154 + # source://actionview/lib/action_view/base.rb#170 def prefix_partial_path_with_controller_namespace?; end - # source://actionview/lib/action_view/base.rb#149 + # source://actionview/lib/action_view/base.rb#165 def streaming_completion_on_exception; end - # source://actionview/lib/action_view/base.rb#149 + # source://actionview/lib/action_view/base.rb#165 def streaming_completion_on_exception=(val); end - # source://actionview/lib/action_view/base.rb#222 + # source://actionview/lib/action_view/base.rb#238 def with_context(context, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end - # source://actionview/lib/action_view/base.rb#183 + # source://actionview/lib/action_view/base.rb#199 def with_empty_template_cache; end - # source://actionview/lib/action_view/base.rb#218 + # source://actionview/lib/action_view/base.rb#234 def with_view_paths(view_paths, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end # @return [Boolean] # - # source://actionview/lib/action_view/base.rb#179 + # source://actionview/lib/action_view/base.rb#195 def xss_safe?; end end end @@ -1146,26 +1149,29 @@ class ActionView::CacheExpiry::ViewReloader # source://actionview/lib/action_view/cache_expiry.rb#6 def initialize(watcher:, &block); end - # source://actionview/lib/action_view/cache_expiry.rb#22 + # source://actionview/lib/action_view/cache_expiry.rb#21 def execute; end # @return [Boolean] # - # source://actionview/lib/action_view/cache_expiry.rb#18 + # source://actionview/lib/action_view/cache_expiry.rb#16 def updated?; end private - # source://actionview/lib/action_view/cache_expiry.rb#58 + # source://actionview/lib/action_view/cache_expiry.rb#64 def all_view_paths; end - # source://actionview/lib/action_view/cache_expiry.rb#54 + # source://actionview/lib/action_view/cache_expiry.rb#37 + def build_watcher; end + + # source://actionview/lib/action_view/cache_expiry.rb#60 def dirs_to_watch; end - # source://actionview/lib/action_view/cache_expiry.rb#36 + # source://actionview/lib/action_view/cache_expiry.rb#55 def rebuild_watcher; end - # source://actionview/lib/action_view/cache_expiry.rb#32 + # source://actionview/lib/action_view/cache_expiry.rb#33 def reload!; end end @@ -1355,13 +1361,13 @@ class ActionView::DependencyTracker extend ::ActiveSupport::Autoload class << self - # source://actionview/lib/action_view/dependency_tracker.rb#16 + # source://actionview/lib/action_view/dependency_tracker.rb#17 def find_dependencies(name, template, view_paths = T.unsafe(nil)); end - # source://actionview/lib/action_view/dependency_tracker.rb#23 + # source://actionview/lib/action_view/dependency_tracker.rb#24 def register_tracker(extension, tracker); end - # source://actionview/lib/action_view/dependency_tracker.rb#34 + # source://actionview/lib/action_view/dependency_tracker.rb#35 def remove_tracker(handler); end end end @@ -1390,7 +1396,7 @@ class ActionView::DependencyTracker::ERBTracker # source://actionview/lib/action_view/dependency_tracker/erb_tracker.rb#88 def directory; end - # source://actionview/lib/action_view/dependency_tracker/erb_tracker.rb#145 + # source://actionview/lib/action_view/dependency_tracker/erb_tracker.rb#157 def explicit_dependencies; end # Returns the value of attribute name. @@ -1401,9 +1407,6 @@ class ActionView::DependencyTracker::ERBTracker # source://actionview/lib/action_view/dependency_tracker/erb_tracker.rb#92 def render_dependencies; end - # source://actionview/lib/action_view/dependency_tracker/erb_tracker.rb#133 - def resolve_directories(wildcard_dependencies); end - # source://actionview/lib/action_view/dependency_tracker/erb_tracker.rb#84 def source; end @@ -1470,55 +1473,83 @@ ActionView::DependencyTracker::ERBTracker::STRING = T.let(T.unsafe(nil), Regexp) # source://actionview/lib/action_view/dependency_tracker/erb_tracker.rb#16 ActionView::DependencyTracker::ERBTracker::VARIABLE_OR_METHOD_CHAIN = T.let(T.unsafe(nil), Regexp) -# source://actionview/lib/action_view/dependency_tracker/ripper_tracker.rb#5 -class ActionView::DependencyTracker::RipperTracker - # @return [RipperTracker] a new instance of RipperTracker +# source://actionview/lib/action_view/dependency_tracker/ruby_tracker.rb#5 +class ActionView::DependencyTracker::RubyTracker + # @return [RubyTracker] a new instance of RubyTracker # - # source://actionview/lib/action_view/dependency_tracker/ripper_tracker.rb#20 - def initialize(name, template, view_paths = T.unsafe(nil)); end + # source://actionview/lib/action_view/dependency_tracker/ruby_tracker.rb#20 + def initialize(name, template, view_paths = T.unsafe(nil), parser_class: T.unsafe(nil)); end - # source://actionview/lib/action_view/dependency_tracker/ripper_tracker.rb#12 + # source://actionview/lib/action_view/dependency_tracker/ruby_tracker.rb#12 def dependencies; end private - # source://actionview/lib/action_view/dependency_tracker/ripper_tracker.rb#38 + # source://actionview/lib/action_view/dependency_tracker/ruby_tracker.rb#38 def explicit_dependencies; end # Returns the value of attribute name. # - # source://actionview/lib/action_view/dependency_tracker/ripper_tracker.rb#25 + # source://actionview/lib/action_view/dependency_tracker/ruby_tracker.rb#26 def name; end - # source://actionview/lib/action_view/dependency_tracker/ripper_tracker.rb#27 + # source://actionview/lib/action_view/dependency_tracker/ruby_tracker.rb#28 def render_dependencies; end - # source://actionview/lib/action_view/dependency_tracker/ripper_tracker.rb#46 - def resolve_directories(wildcard_dependencies); end - # Returns the value of attribute template. # - # source://actionview/lib/action_view/dependency_tracker/ripper_tracker.rb#25 + # source://actionview/lib/action_view/dependency_tracker/ruby_tracker.rb#26 def template; end # Returns the value of attribute view_paths. # - # source://actionview/lib/action_view/dependency_tracker/ripper_tracker.rb#25 + # source://actionview/lib/action_view/dependency_tracker/ruby_tracker.rb#26 def view_paths; end class << self - # source://actionview/lib/action_view/dependency_tracker/ripper_tracker.rb#8 + # source://actionview/lib/action_view/dependency_tracker/ruby_tracker.rb#8 def call(name, template, view_paths = T.unsafe(nil)); end # @return [Boolean] # - # source://actionview/lib/action_view/dependency_tracker/ripper_tracker.rb#16 + # source://actionview/lib/action_view/dependency_tracker/ruby_tracker.rb#16 def supports_view_paths?; end end end -# source://actionview/lib/action_view/dependency_tracker/ripper_tracker.rb#6 -ActionView::DependencyTracker::RipperTracker::EXPLICIT_DEPENDENCY = T.let(T.unsafe(nil), Regexp) +# source://actionview/lib/action_view/dependency_tracker/ruby_tracker.rb#6 +ActionView::DependencyTracker::RubyTracker::EXPLICIT_DEPENDENCY = T.let(T.unsafe(nil), Regexp) + +# source://actionview/lib/action_view/dependency_tracker/wildcard_resolver.rb#5 +class ActionView::DependencyTracker::WildcardResolver + # @return [WildcardResolver] a new instance of WildcardResolver + # + # source://actionview/lib/action_view/dependency_tracker/wildcard_resolver.rb#6 + def initialize(view_paths, dependencies); end + + # source://actionview/lib/action_view/dependency_tracker/wildcard_resolver.rb#13 + def resolve; end + + private + + # Returns the value of attribute explicit_dependencies. + # + # source://actionview/lib/action_view/dependency_tracker/wildcard_resolver.rb#20 + def explicit_dependencies; end + + # source://actionview/lib/action_view/dependency_tracker/wildcard_resolver.rb#22 + def resolved_wildcard_dependencies; end + + # Returns the value of attribute view_paths. + # + # source://actionview/lib/action_view/dependency_tracker/wildcard_resolver.rb#20 + def view_paths; end + + # Returns the value of attribute wildcard_dependencies. + # + # source://actionview/lib/action_view/dependency_tracker/wildcard_resolver.rb#20 + def wildcard_dependencies; end +end # source://actionview/lib/action_view/digestor.rb#6 class ActionView::Digestor @@ -1624,67 +1655,67 @@ class ActionView::EncodingError < ::StandardError; end # A resolver that loads files from the filesystem. # -# source://actionview/lib/action_view/template/resolver.rb#93 +# source://actionview/lib/action_view/template/resolver.rb#90 class ActionView::FileSystemResolver < ::ActionView::Resolver # @raise [ArgumentError] # @return [FileSystemResolver] a new instance of FileSystemResolver # - # source://actionview/lib/action_view/template/resolver.rb#96 + # source://actionview/lib/action_view/template/resolver.rb#93 def initialize(path); end # @return [Boolean] # - # source://actionview/lib/action_view/template/resolver.rb#115 + # source://actionview/lib/action_view/template/resolver.rb#112 def ==(resolver); end - # source://actionview/lib/action_view/template/resolver.rb#120 + # source://actionview/lib/action_view/template/resolver.rb#117 def all_template_paths; end - # source://actionview/lib/action_view/template/resolver.rb#129 + # source://actionview/lib/action_view/template/resolver.rb#126 def built_templates; end - # source://actionview/lib/action_view/template/resolver.rb#104 + # source://actionview/lib/action_view/template/resolver.rb#101 def clear_cache; end # @return [Boolean] # - # source://actionview/lib/action_view/template/resolver.rb#115 + # source://actionview/lib/action_view/template/resolver.rb#112 def eql?(resolver); end # Returns the value of attribute path. # - # source://actionview/lib/action_view/template/resolver.rb#94 + # source://actionview/lib/action_view/template/resolver.rb#91 def path; end - # source://actionview/lib/action_view/template/resolver.rb#110 + # source://actionview/lib/action_view/template/resolver.rb#107 def to_path; end - # source://actionview/lib/action_view/template/resolver.rb#110 + # source://actionview/lib/action_view/template/resolver.rb#107 def to_s; end private - # source://actionview/lib/action_view/template/resolver.rb#134 + # source://actionview/lib/action_view/template/resolver.rb#131 def _find_all(name, prefix, partial, details, key, locals); end - # source://actionview/lib/action_view/template/resolver.rb#153 + # source://actionview/lib/action_view/template/resolver.rb#150 def build_unbound_template(template); end - # source://actionview/lib/action_view/template/resolver.rb#211 + # source://actionview/lib/action_view/template/resolver.rb#208 def escape_entry(entry); end - # source://actionview/lib/action_view/template/resolver.rb#183 + # source://actionview/lib/action_view/template/resolver.rb#180 def filter_and_sort_by_details(templates, requested_details); end - # source://actionview/lib/action_view/template/resolver.rb#149 + # source://actionview/lib/action_view/template/resolver.rb#146 def source_for_template(template); end # Safe glob within @path # - # source://actionview/lib/action_view/template/resolver.rb#198 + # source://actionview/lib/action_view/template/resolver.rb#195 def template_glob(glob); end - # source://actionview/lib/action_view/template/resolver.rb#166 + # source://actionview/lib/action_view/template/resolver.rb#163 def unbound_templates_from_path(path); end end @@ -1816,7 +1847,7 @@ module ActionView::Helpers::AssetTagHelper # audio_tag(user.name_pronunciation_audio) # # => # - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#581 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#593 def audio_tag(*sources); end # Returns a link tag that browsers and feed readers can use to auto-detect @@ -1847,7 +1878,7 @@ module ActionView::Helpers::AssetTagHelper # auto_discovery_link_tag(:rss, "http://www.example.com/feed.rss", {title: "Example RSS"}) # # => # - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#259 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#271 def auto_discovery_link_tag(type = T.unsafe(nil), url_options = T.unsafe(nil), tag_options = T.unsafe(nil)); end # Returns a link tag for a favicon managed by the asset pipeline. @@ -1878,7 +1909,7 @@ module ActionView::Helpers::AssetTagHelper # favicon_link_tag 'mb-icon.png', rel: 'apple-touch-icon', type: 'image/png' # # => # - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#300 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#312 def favicon_link_tag(source = T.unsafe(nil), options = T.unsafe(nil)); end # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#26 @@ -1939,7 +1970,7 @@ module ActionView::Helpers::AssetTagHelper # image_tag(user.avatar.variant(resize_to_limit: [100, 100]), size: '100') # # => # - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#418 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#430 def image_tag(source, options = T.unsafe(nil)); end # Returns an HTML script tag for each of the +sources+ provided. @@ -1983,6 +2014,8 @@ module ActionView::Helpers::AssetTagHelper # attribute, which indicates to the browser that the script is meant to # be executed after the document has been parsed. Additionally, prevents # sending the Preload Links header. + # * :nopush - Specify if the use of server push is not desired + # for the script. Defaults to +true+. # # Any other specified options will be treated as HTML attributes for the # +script+ tag. @@ -2024,7 +2057,7 @@ module ActionView::Helpers::AssetTagHelper # javascript_include_tag "http://www.example.com/xmlhr.js", defer: true # # => # - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#111 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#113 def javascript_include_tag(*sources); end # Returns an HTML picture tag for the +sources+. If +sources+ is a string, @@ -2067,7 +2100,7 @@ module ActionView::Helpers::AssetTagHelper # picture_tag(user.profile_picture) # # => # - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#479 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#491 def picture_tag(*sources, &block); end # Returns a link tag that browsers can use to preload the +source+. @@ -2105,7 +2138,7 @@ module ActionView::Helpers::AssetTagHelper # preload_link_tag("/media/audio.ogg", nopush: true) # # => # - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#343 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#355 def preload_link_tag(source, options = T.unsafe(nil)); end # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#27 @@ -2135,6 +2168,10 @@ module ActionView::Helpers::AssetTagHelper # that path. # * :skip_pipeline - This option is used to bypass the asset pipeline # when it is set to true. + # * :nonce - When set to true, adds an automatic nonce value if + # you have Content Security Policy enabled. + # * :nopush - Specify if the use of server push is not desired + # for the stylesheet. Defaults to +true+. # # ==== Examples # @@ -2160,7 +2197,10 @@ module ActionView::Helpers::AssetTagHelper # # => # # # - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#193 + # stylesheet_link_tag "style", nonce: true + # # => + # + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#202 def stylesheet_link_tag(*sources); end # Returns an HTML video tag for the +sources+. If +sources+ is a string, @@ -2212,29 +2252,29 @@ module ActionView::Helpers::AssetTagHelper # video_tag(user.intro_video) # # => # - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#549 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#561 def video_tag(*sources); end private - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#622 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#634 def check_for_image_tag_errors(options); end - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#613 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#625 def extract_dimensions(size); end # @yield [options] # - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#586 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#598 def multiple_sources_tag_builder(type, sources); end - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#603 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#615 def resolve_asset_source(asset_type, source, skip_pipeline); end - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#628 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#640 def resolve_link_as(extname, mime_type); end - # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#642 + # source://actionview/lib/action_view/helpers/asset_tag_helper.rb#654 def send_preload_links_header(preload_links, max_header_size: T.unsafe(nil)); end class << self @@ -2267,7 +2307,7 @@ end # Some HTTP client and proxies have a 4kiB header limit, but more importantly # including preload links has diminishing returns so it's best to not go overboard # -# source://actionview/lib/action_view/helpers/asset_tag_helper.rb#640 +# source://actionview/lib/action_view/helpers/asset_tag_helper.rb#652 ActionView::Helpers::AssetTagHelper::MAX_HEADER_SIZE = T.let(T.unsafe(nil), Integer) # = Action View Asset URL \Helpers @@ -3118,11 +3158,11 @@ module ActionView::Helpers::CacheHelper # render 'comments/comments' # render('comments/comments') # - # render "header" translates to render("comments/header") + # render "header" # translates to render("comments/header") # - # render(@topic) translates to render("topics/topic") - # render(topics) translates to render("topics/topic") - # render(message.topics) translates to render("topics/topic") + # render(@topic) # translates to render("topics/topic") + # render(topics) # translates to render("topics/topic") + # render(message.topics) # translates to render("topics/topic") # # It's not possible to derive all render calls like that, though. # Here are a few examples of things that can't be derived: @@ -3135,6 +3175,14 @@ module ActionView::Helpers::CacheHelper # render partial: 'attachments/attachment', collection: group_of_attachments # render partial: 'documents/document', collection: @project.documents.where(published: true).order('created_at') # + # One last type of dependency can be determined implicitly: + # + # render "maintenance_tasks/runs/info/#{run.status}" + # + # Because the value passed to render ends in interpolation, Action View + # will mark all partials within the "maintenace_tasks/runs/info" folder as + # dependencies. + # # === Explicit dependencies # # Sometimes you'll have template dependencies that can't be derived at all. This is typically @@ -3208,7 +3256,7 @@ module ActionView::Helpers::CacheHelper # This will include both records as part of the cache key and updating either of them will # expire the cache. # - # source://actionview/lib/action_view/helpers/cache_helper.rb#168 + # source://actionview/lib/action_view/helpers/cache_helper.rb#176 def cache(name = T.unsafe(nil), options = T.unsafe(nil), &block); end # This helper returns the name of a cache key for a given fragment cache @@ -3217,7 +3265,7 @@ module ActionView::Helpers::CacheHelper # cannot be manually expired unless you know the exact key which is the # case when using memcached. # - # source://actionview/lib/action_view/helpers/cache_helper.rb#240 + # source://actionview/lib/action_view/helpers/cache_helper.rb#248 def cache_fragment_name(name = T.unsafe(nil), skip_digest: T.unsafe(nil), digest_path: T.unsafe(nil)); end # Cache fragments of a view if +condition+ is true @@ -3227,7 +3275,7 @@ module ActionView::Helpers::CacheHelper # <%= render project.topics %> # <% end %> # - # source://actionview/lib/action_view/helpers/cache_helper.rb#215 + # source://actionview/lib/action_view/helpers/cache_helper.rb#223 def cache_if(condition, name = T.unsafe(nil), options = T.unsafe(nil), &block); end # Cache fragments of a view unless +condition+ is true @@ -3237,7 +3285,7 @@ module ActionView::Helpers::CacheHelper # <%= render project.topics %> # <% end %> # - # source://actionview/lib/action_view/helpers/cache_helper.rb#231 + # source://actionview/lib/action_view/helpers/cache_helper.rb#239 def cache_unless(condition, name = T.unsafe(nil), options = T.unsafe(nil), &block); end # Returns whether the current view fragment is within a +cache+ block. @@ -3250,10 +3298,10 @@ module ActionView::Helpers::CacheHelper # # @return [Boolean] # - # source://actionview/lib/action_view/helpers/cache_helper.rb#188 + # source://actionview/lib/action_view/helpers/cache_helper.rb#196 def caching?; end - # source://actionview/lib/action_view/helpers/cache_helper.rb#248 + # source://actionview/lib/action_view/helpers/cache_helper.rb#256 def digest_path_from_template(template); end # Raises +UncacheableFragmentError+ when called from within a +cache+ block. @@ -3272,34 +3320,34 @@ module ActionView::Helpers::CacheHelper # # @raise [UncacheableFragmentError] # - # source://actionview/lib/action_view/helpers/cache_helper.rb#205 + # source://actionview/lib/action_view/helpers/cache_helper.rb#213 def uncacheable!; end private - # source://actionview/lib/action_view/helpers/cache_helper.rb#270 + # source://actionview/lib/action_view/helpers/cache_helper.rb#278 def fragment_for(name = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://actionview/lib/action_view/helpers/cache_helper.rb#259 + # source://actionview/lib/action_view/helpers/cache_helper.rb#267 def fragment_name_with_digest(name, digest_path); end - # source://actionview/lib/action_view/helpers/cache_helper.rb#280 + # source://actionview/lib/action_view/helpers/cache_helper.rb#288 def read_fragment_for(name, options); end - # source://actionview/lib/action_view/helpers/cache_helper.rb#284 + # source://actionview/lib/action_view/helpers/cache_helper.rb#292 def write_fragment_for(name, options, &block); end end -# source://actionview/lib/action_view/helpers/cache_helper.rb#289 +# source://actionview/lib/action_view/helpers/cache_helper.rb#297 module ActionView::Helpers::CacheHelper::CachingRegistry extend ::ActionView::Helpers::CacheHelper::CachingRegistry # @return [Boolean] # - # source://actionview/lib/action_view/helpers/cache_helper.rb#292 + # source://actionview/lib/action_view/helpers/cache_helper.rb#300 def caching?; end - # source://actionview/lib/action_view/helpers/cache_helper.rb#296 + # source://actionview/lib/action_view/helpers/cache_helper.rb#304 def track_caching; end end @@ -3673,7 +3721,7 @@ module ActionView::Helpers::CsrfHelper # You don't need to use these tags for regular forms as they generate their own hidden fields. # # For Ajax requests other than GETs, extract the "csrf-token" from the meta-tag and send as the - # +X-CSRF-Token+ HTTP header. If you are using rails-ujs, this happens automatically. + # +X-CSRF-Token+ HTTP header. # For backwards compatibility. # # source://actionview/lib/action_view/helpers/csrf_helper.rb#22 @@ -3692,7 +3740,7 @@ module ActionView::Helpers::CsrfHelper # You don't need to use these tags for regular forms as they generate their own hidden fields. # # For Ajax requests other than GETs, extract the "csrf-token" from the meta-tag and send as the - # +X-CSRF-Token+ HTTP header. If you are using rails-ujs, this happens automatically. + # +X-CSRF-Token+ HTTP header. # # source://actionview/lib/action_view/helpers/csrf_helper.rb#22 def csrf_meta_tags; end @@ -4654,17 +4702,17 @@ end # # A +FormBuilder+ object is associated with a particular model object and # allows you to generate fields associated with the model object. The -# +FormBuilder+ object is yielded when using +form_for+ or +fields_for+. +# +FormBuilder+ object is yielded when using +form_with+ or +fields_for+. # For example: # -# <%= form_for @person do |person_form| %> +# <%= form_with model: @person do |person_form| %> # Name: <%= person_form.text_field :name %> -# Admin: <%= person_form.check_box :admin %> +# Admin: <%= person_form.checkbox :admin %> # <% end %> # # In the above block, a +FormBuilder+ object is yielded as the # +person_form+ variable. This allows you to generate the +text_field+ -# and +check_box+ fields by specifying their eponymous methods, which +# and +checkbox+ fields by specifying their eponymous methods, which # modify the underlying template and associates the @person model object # with the form. # @@ -4693,7 +4741,7 @@ end # # The +div_radio_button+ code from above can now be used as follows: # -# <%= form_for @person, :builder => MyFormBuilder do |f| %> +# <%= form_with model: @person, :builder => MyFormBuilder do |f| %> # I am a child: <%= f.div_radio_button(:admin, "child") %> # I am an adult: <%= f.div_radio_button(:admin, "adult") %> # <% end -%> @@ -4707,18 +4755,17 @@ class ActionView::Helpers::FormBuilder # @return [FormBuilder] a new instance of FormBuilder # - # source://actionview/lib/action_view/helpers/form_helper.rb#1715 + # source://actionview/lib/action_view/helpers/form_helper.rb#1719 def initialize(object_name, object, template, options); end # Add the submit button for the given form. When no value is given, it checks # if the object is a new resource or not to create the proper label: # - # <%= form_for @post do |f| %> + # <%= form_with model: @article do |f| %> # <%= f.button %> # <% end %> - # - # In the example above, if @post is a new record, it will use "Create Post" as - # button label; otherwise, it uses "Update Post". + # In the example above, if @article is a new record, it will use "Create Article" as + # button label; otherwise, it uses "Update Article". # # Those labels can be customized using I18n under the +helpers.submit+ key # (the same as submit helper) and using %{model} for translation interpolation: @@ -4734,15 +4781,15 @@ class ActionView::Helpers::FormBuilder # en: # helpers: # submit: - # post: + # article: # create: "Add %{model}" # # ==== Examples - # button("Create post") - # # => + # button("Create article") + # # => # # button(:draft, value: true) - # # => + # # => # # button do # content_tag(:strong, 'Ask me!') @@ -4755,17 +4802,17 @@ class ActionView::Helpers::FormBuilder # content_tag(:strong, text) # end # # => # # button(:draft, value: true) do # content_tag(:strong, "Save as draft") # end - # # => # - # source://actionview/lib/action_view/helpers/form_helper.rb#2644 + # source://actionview/lib/action_view/helpers/form_helper.rb#2648 def button(value = T.unsafe(nil), options = T.unsafe(nil), &block); end # Returns a checkbox tag tailored for accessing a specified attribute (identified by +method+) on an object @@ -4806,7 +4853,7 @@ class ActionView::Helpers::FormBuilder # within an array-like parameter, as in # # <%= fields_for "project[invoice_attributes][]", invoice, index: nil do |form| %> - # <%= form.check_box :paid %> + # <%= form.checkbox :paid %> # ... # <% end %> # @@ -4814,41 +4861,122 @@ class ActionView::Helpers::FormBuilder # the elements of the array. For each item with a checked check box you # get an extra ghost item with only that attribute, assigned to "0". # - # In that case it is preferable to either use +check_box_tag+ or to use + # In that case it is preferable to either use +checkbox_tag+ or to use # hashes instead of arrays. # # ==== Examples # - # # Let's say that @post.validated? is 1: - # check_box("validated") - # # => - # # + # # Let's say that @article.validated? is 1: + # checkbox("validated") + # # => + # # # # # Let's say that @puppy.gooddog is "no": - # check_box("gooddog", {}, "yes", "no") + # checkbox("gooddog", {}, "yes", "no") # # => # # # # # Let's say that @eula.accepted is "no": - # check_box("accepted", { class: 'eula_check' }, "yes", "no") + # checkbox("accepted", { class: 'eula_check' }, "yes", "no") # # => # # # - # source://actionview/lib/action_view/helpers/form_helper.rb#2468 + # source://actionview/lib/action_view/helpers/form_helper.rb#2472 def check_box(method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end - # Wraps ActionView::Helpers::FormOptionsHelper#collection_check_boxes for form builders: + # Returns a checkbox tag tailored for accessing a specified attribute (identified by +method+) on an object + # assigned to the template (identified by +object+). This object must be an instance object (@object) and not a local object. + # It's intended that +method+ returns an integer and if that integer is above zero, then the checkbox is checked. + # Additional options on the input tag can be passed as a hash with +options+. The +checked_value+ defaults to 1 + # while the default +unchecked_value+ is set to 0 which is convenient for boolean values. + # + # ==== Options + # + # * Any standard HTML attributes for the tag can be passed in, for example +:class+. + # * :checked - +true+ or +false+ forces the state of the checkbox to be checked or not. + # * :include_hidden - If set to false, the auxiliary hidden field described below will not be generated. + # + # ==== Gotcha + # + # The HTML specification says unchecked check boxes are not successful, and + # thus web browsers do not send them. Unfortunately this introduces a gotcha: + # if an +Invoice+ model has a +paid+ flag, and in the form that edits a paid + # invoice the user unchecks its check box, no +paid+ parameter is sent. So, + # any mass-assignment idiom like + # + # @invoice.update(params[:invoice]) + # + # wouldn't update the flag. + # + # To prevent this the helper generates an auxiliary hidden field before + # every check box. The hidden field has the same name and its + # attributes mimic an unchecked check box. + # + # This way, the client either sends only the hidden field (representing + # the check box is unchecked), or both fields. Since the HTML specification + # says key/value pairs have to be sent in the same order they appear in the + # form, and parameters extraction gets the last occurrence of any repeated + # key in the query string, that works for ordinary forms. + # + # Unfortunately that workaround does not work when the check box goes + # within an array-like parameter, as in + # + # <%= fields_for "project[invoice_attributes][]", invoice, index: nil do |form| %> + # <%= form.checkbox :paid %> + # ... + # <% end %> + # + # because parameter name repetition is precisely what \Rails seeks to distinguish + # the elements of the array. For each item with a checked check box you + # get an extra ghost item with only that attribute, assigned to "0". + # + # In that case it is preferable to either use +checkbox_tag+ or to use + # hashes instead of arrays. + # + # ==== Examples + # + # # Let's say that @article.validated? is 1: + # checkbox("validated") + # # => + # # + # + # # Let's say that @puppy.gooddog is "no": + # checkbox("gooddog", {}, "yes", "no") + # # => + # # + # + # # Let's say that @eula.accepted is "no": + # checkbox("accepted", { class: 'eula_check' }, "yes", "no") + # # => + # # + # + # source://actionview/lib/action_view/helpers/form_helper.rb#2472 + def checkbox(method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end + + # Wraps ActionView::Helpers::FormOptionsHelper#collection_checkboxes for form builders: # # <%= form_for @post do |f| %> - # <%= f.collection_check_boxes :author_ids, Author.all, :id, :name_with_initial %> + # <%= f.collection_checkboxes :author_ids, Author.all, :id, :name_with_initial %> # <%= f.submit %> # <% end %> # # Please refer to the documentation of the base helper for details. # - # source://actionview/lib/action_view/helpers/form_options_helper.rb#908 + # source://actionview/lib/action_view/helpers/form_options_helper.rb#909 def collection_check_boxes(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + # Wraps ActionView::Helpers::FormOptionsHelper#collection_checkboxes for form builders: + # + # <%= form_for @post do |f| %> + # <%= f.collection_checkboxes :author_ids, Author.all, :id, :name_with_initial %> + # <%= f.submit %> + # <% end %> + # + # Please refer to the documentation of the base helper for details. + # + # source://actionview/lib/action_view/helpers/form_options_helper.rb#909 + def collection_checkboxes(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + # Wraps ActionView::Helpers::FormOptionsHelper#collection_radio_buttons for form builders: # # <%= form_for @post do |f| %> @@ -4858,7 +4986,7 @@ class ActionView::Helpers::FormBuilder # # Please refer to the documentation of the base helper for details. # - # source://actionview/lib/action_view/helpers/form_options_helper.rb#920 + # source://actionview/lib/action_view/helpers/form_options_helper.rb#922 def collection_radio_buttons(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Wraps ActionView::Helpers::FormOptionsHelper#collection_select for form builders: @@ -4870,13 +4998,13 @@ class ActionView::Helpers::FormBuilder # # Please refer to the documentation of the base helper for details. # - # source://actionview/lib/action_view/helpers/form_options_helper.rb#860 + # source://actionview/lib/action_view/helpers/form_options_helper.rb#861 def collection_select(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/lib/action_view/helpers/form_helper.rb#2023 def color_field(method, options = T.unsafe(nil)); end - # source://actionview/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/lib/action_view/helpers/form_helper.rb#2023 def date_field(method, options = T.unsafe(nil)); end # Wraps ActionView::Helpers::DateHelper#date_select for form builders: @@ -4891,10 +5019,10 @@ class ActionView::Helpers::FormBuilder # source://actionview/lib/action_view/helpers/date_helper.rb#1237 def date_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/lib/action_view/helpers/form_helper.rb#2023 def datetime_field(method, options = T.unsafe(nil)); end - # source://actionview/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/lib/action_view/helpers/form_helper.rb#2023 def datetime_local_field(method, options = T.unsafe(nil)); end # Wraps ActionView::Helpers::DateHelper#datetime_select for form builders: @@ -4909,21 +5037,21 @@ class ActionView::Helpers::FormBuilder # source://actionview/lib/action_view/helpers/date_helper.rb#1261 def datetime_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/lib/action_view/helpers/form_helper.rb#2023 def email_field(method, options = T.unsafe(nil)); end # @return [Boolean] # - # source://actionview/lib/action_view/helpers/form_helper.rb#2665 + # source://actionview/lib/action_view/helpers/form_helper.rb#2669 def emitted_hidden_id?; end - # source://actionview/lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/lib/action_view/helpers/form_helper.rb#1684 def field_helpers; end - # source://actionview/lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/lib/action_view/helpers/form_helper.rb#1684 def field_helpers=(_arg0); end - # source://actionview/lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/lib/action_view/helpers/form_helper.rb#1684 def field_helpers?; end # Generate an HTML id attribute value for the given field @@ -4931,7 +5059,7 @@ class ActionView::Helpers::FormBuilder # Return the value generated by the FormBuilder for the given # attribute name. # - # <%= form_for @post do |f| %> + # <%= form_with model: @article do |f| %> # <%= f.label :title %> # <%= f.text_field :title, aria: { describedby: f.field_id(:title, :error) } %> # <%= tag.span("is blank", id: f.field_id(:title, :error) %> @@ -4940,10 +5068,10 @@ class ActionView::Helpers::FormBuilder # In the example above, the element built by # the call to FormBuilder#text_field declares an # aria-describedby attribute referencing the - # element, sharing a common id root (post_title, in this + # element, sharing a common id root (article_title, in this # case). # - # source://actionview/lib/action_view/helpers/form_helper.rb#1772 + # source://actionview/lib/action_view/helpers/form_helper.rb#1776 def field_id(method, *suffixes, namespace: T.unsafe(nil), index: T.unsafe(nil)); end # Generate an HTML name attribute value for the given name and @@ -4952,46 +5080,46 @@ class ActionView::Helpers::FormBuilder # Return the value generated by the FormBuilder for the given # attribute name. # - # <%= form_for @post do |f| %> + # <%= form_with model: @article do |f| %> # <%= f.text_field :title, name: f.field_name(:title, :subtitle) %> - # <%# => %> + # <%# => %> # <% end %> # - # <%= form_for @post do |f| %> + # <%= form_with model: @article do |f| %> # <%= f.text_field :tag, name: f.field_name(:tag, multiple: true) %> - # <%# => %> + # <%# => %> # <% end %> # - # source://actionview/lib/action_view/helpers/form_helper.rb#1792 + # source://actionview/lib/action_view/helpers/form_helper.rb#1796 def field_name(method, *methods, multiple: T.unsafe(nil), index: T.unsafe(nil)); end # See the docs for the ActionView::Helpers::FormHelper#fields helper method. # - # source://actionview/lib/action_view/helpers/form_helper.rb#2322 + # source://actionview/lib/action_view/helpers/form_helper.rb#2326 def fields(scope = T.unsafe(nil), model: T.unsafe(nil), **options, &block); end - # Creates a scope around a specific model object like form_for, but + # Creates a scope around a specific model object like form_with, but # doesn't create the form tags themselves. This makes fields_for suitable # for specifying additional model objects in the same form. # - # Although the usage and purpose of +fields_for+ is similar to +form_for+'s, - # its method signature is slightly different. Like +form_for+, it yields + # Although the usage and purpose of +fields_for+ is similar to +form_with+'s, + # its method signature is slightly different. Like +form_with+, it yields # a FormBuilder object associated with a particular model object to a block, # and within the block allows methods to be called on the builder to # generate fields associated with the model object. Fields may reflect # a model object in two ways - how they are named (hence how submitted # values appear within the +params+ hash in the controller) and what - # default values are shown when the form the fields appear in is first - # displayed. In order for both of these features to be specified independently, + # default values are shown when the form fields are first displayed. + # In order for both of these features to be specified independently, # both an object name (represented by either a symbol or string) and the # object itself can be passed to the method separately - # - # <%= form_for @person do |person_form| %> + # <%= form_with model: @person do |person_form| %> # First name: <%= person_form.text_field :first_name %> # Last name : <%= person_form.text_field :last_name %> # # <%= fields_for :permission, @person.permission do |permission_fields| %> - # Admin? : <%= permission_fields.check_box :admin %> + # Admin? : <%= permission_fields.checkbox :admin %> # <% end %> # # <%= person_form.submit %> @@ -5008,7 +5136,7 @@ class ActionView::Helpers::FormBuilder # object to +fields_for+ - # # <%= fields_for :permission do |permission_fields| %> - # Admin?: <%= permission_fields.check_box :admin %> + # Admin?: <%= permission_fields.checkbox :admin %> # <% end %> # # ...in which case, if :permission also happens to be the name of an @@ -5020,7 +5148,7 @@ class ActionView::Helpers::FormBuilder # name has been omitted) - # # <%= fields_for @person.permission do |permission_fields| %> - # Admin?: <%= permission_fields.check_box :admin %> + # Admin?: <%= permission_fields.checkbox :admin %> # <% end %> # # and +fields_for+ will derive the required name of the field from the @@ -5035,10 +5163,10 @@ class ActionView::Helpers::FormBuilder # name and value parameters are provided and the provided value has the shape of an # option Hash. To remove the ambiguity, explicitly pass an option Hash, even if empty. # - # <%= form_for @person do |person_form| %> + # <%= form_with model: @person do |person_form| %> # ... # <%= fields_for :permission, @person.permission, {} do |permission_fields| %> - # Admin?: <%= check_box_tag permission_fields.field_name(:admin), @person.permission[:admin] %> + # Admin?: <%= checkbox_tag permission_fields.field_name(:admin), @person.permission[:admin] %> # <% end %> # ... # <% end %> @@ -5079,7 +5207,7 @@ class ActionView::Helpers::FormBuilder # # This model can now be used with a nested fields_for, like so: # - # <%= form_for @person do |person_form| %> + # <%= form_with model: @person do |person_form| %> # ... # <%= person_form.fields_for :address do |address_fields| %> # Street : <%= address_fields.text_field :street %> @@ -5109,11 +5237,11 @@ class ActionView::Helpers::FormBuilder # with a value that evaluates to +true+, you will destroy the associated # model (e.g. 1, '1', true, or 'true'): # - # <%= form_for @person do |person_form| %> + # <%= form_with model: @person do |person_form| %> # ... # <%= person_form.fields_for :address do |address_fields| %> # ... - # Delete: <%= address_fields.check_box :_destroy %> + # Delete: <%= address_fields.checkbox :_destroy %> # <% end %> # ... # <% end %> @@ -5150,7 +5278,7 @@ class ActionView::Helpers::FormBuilder # the nested fields_for call will be repeated for each instance in the # collection: # - # <%= form_for @person do |person_form| %> + # <%= form_with model: @person do |person_form| %> # ... # <%= person_form.fields_for :projects do |project_fields| %> # <% if project_fields.object.active? %> @@ -5162,7 +5290,7 @@ class ActionView::Helpers::FormBuilder # # It's also possible to specify the instance to be used: # - # <%= form_for @person do |person_form| %> + # <%= form_with model: @person do |person_form| %> # ... # <% @person.projects.each do |project| %> # <% if project.active? %> @@ -5176,7 +5304,7 @@ class ActionView::Helpers::FormBuilder # # Or a collection to be used: # - # <%= form_for @person do |person_form| %> + # <%= form_with model: @person do |person_form| %> # ... # <%= person_form.fields_for :projects, @active_projects do |project_fields| %> # Name: <%= project_fields.text_field :name %> @@ -5198,10 +5326,10 @@ class ActionView::Helpers::FormBuilder # parameter with a value that evaluates to +true+ # (e.g. 1, '1', true, or 'true'): # - # <%= form_for @person do |person_form| %> + # <%= form_with model: @person do |person_form| %> # ... # <%= person_form.fields_for :projects do |project_fields| %> - # Delete: <%= project_fields.check_box :_destroy %> + # Delete: <%= project_fields.checkbox :_destroy %> # <% end %> # ... # <% end %> @@ -5210,7 +5338,7 @@ class ActionView::Helpers::FormBuilder # object in the array. For this purpose, the index method # is available in the FormBuilder object. # - # <%= form_for @person do |person_form| %> + # <%= form_with model: @person do |person_form| %> # ... # <%= person_form.fields_for :projects do |project_fields| %> # Project #<%= project_fields.index %> @@ -5224,7 +5352,7 @@ class ActionView::Helpers::FormBuilder # hidden field is not needed and you can pass include_id: false # to prevent fields_for from rendering it automatically. # - # source://actionview/lib/action_view/helpers/form_helper.rb#2284 + # source://actionview/lib/action_view/helpers/form_helper.rb#2288 def fields_for(record_name, record_object = T.unsafe(nil), fields_options = T.unsafe(nil), &block); end # Returns a file upload input tag tailored for accessing a specified attribute (identified by +method+) on an object @@ -5246,23 +5374,23 @@ class ActionView::Helpers::FormBuilder # file_field(:avatar) # # => # - # # Let's say that @post has image: + # # Let's say that @article has image: # file_field(:image, :multiple => true) - # # => + # # => # - # # Let's say that @post has attached: + # # Let's say that @article has attached: # file_field(:attached, accept: 'text/html') - # # => + # # => # - # # Let's say that @post has image: + # # Let's say that @article has image: # file_field(:image, accept: 'image/png,image/gif,image/jpeg') - # # => + # # => # # # Let's say that @attachment has file: # file_field(:file, class: 'file_input') # # => # - # source://actionview/lib/action_view/helpers/form_helper.rb#2551 + # source://actionview/lib/action_view/helpers/form_helper.rb#2556 def file_field(method, options = T.unsafe(nil)); end # Wraps ActionView::Helpers::FormOptionsHelper#grouped_collection_select for form builders: @@ -5274,7 +5402,7 @@ class ActionView::Helpers::FormBuilder # # Please refer to the documentation of the base helper for details. # - # source://actionview/lib/action_view/helpers/form_options_helper.rb#872 + # source://actionview/lib/action_view/helpers/form_options_helper.rb#873 def grouped_collection_select(method, collection, group_method, group_label_method, option_key_method, option_value_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end # Returns a hidden input tag tailored for accessing a specified attribute (identified by +method+) on an object @@ -5287,22 +5415,22 @@ class ActionView::Helpers::FormBuilder # hidden_field(:pass_confirm) # # => # - # # Let's say that @post.tag_list returns "blog, ruby": + # # Let's say that @article.tag_list returns "blog, ruby": # hidden_field(:tag_list) - # # => + # # => # # # Let's say that @user.token returns "abcde": # hidden_field(:token) # # => # - # source://actionview/lib/action_view/helpers/form_helper.rb#2512 + # source://actionview/lib/action_view/helpers/form_helper.rb#2517 def hidden_field(method, options = T.unsafe(nil)); end # Generate an HTML id attribute value. # # return the
element's id attribute. # - # <%= form_for @post do |f| %> + # <%= form_with model: @article do |f| %> # <%# ... %> # # <% content_for :sticky_footer do %> @@ -5316,12 +5444,12 @@ class ActionView::Helpers::FormBuilder #
# - # ==== Deprecated: \Rails UJS attributes + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#568 + def button_tag(content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # :call-seq: + # checkbox_tag(name, options = {}) + # checkbox_tag(name, value, options = {}) + # checkbox_tag(name, value, checked, options = {}) # - # Prior to \Rails 7, \Rails shipped with a JavaScript library called @rails/ujs on by default. Following \Rails 7, - # this library is no longer on by default. This library integrated with the following options: + # Creates a check box form input tag. # - # * confirm: 'question?' - If present, the - # unobtrusive JavaScript drivers will provide a prompt with - # the question specified. If the user accepts, the form is - # processed normally, otherwise no action is taken. - # * :disable_with - Value of this parameter will be - # used as the value for a disabled version of the submit - # button when the form is submitted. This feature is provided - # by the unobtrusive JavaScript driver. + # ==== Options + # * :value - The value of the input. Defaults to "1". + # * :checked - If set to true, the checkbox will be checked by default. + # * :disabled - If set to true, the user will not be able to use this input. + # * Any other key creates standard HTML options for the tag. # - # button_tag "Save", data: { confirm: "Are you sure?" } - # # => + # ==== Examples + # checkbox_tag 'accept' + # # => # - # button_tag "Checkout", data: { disable_with: "Please wait..." } - # # => + # checkbox_tag 'rock', 'rock music' + # # => # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#605 - def button_tag(content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end + # checkbox_tag 'receive_email', 'yes', true + # # => + # + # checkbox_tag 'tos', 'yes', false, class: 'accept_tos' + # # => + # + # checkbox_tag 'eula', 'accepted', false, disabled: true + # # => + # + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#456 + def check_box_tag(name, *args); end # :call-seq: - # check_box_tag(name, options = {}) - # check_box_tag(name, value, options = {}) - # check_box_tag(name, value, checked, options = {}) + # checkbox_tag(name, options = {}) + # checkbox_tag(name, value, options = {}) + # checkbox_tag(name, value, checked, options = {}) # # Creates a check box form input tag. # @@ -8040,23 +8364,23 @@ module ActionView::Helpers::FormTagHelper # * Any other key creates standard HTML options for the tag. # # ==== Examples - # check_box_tag 'accept' + # checkbox_tag 'accept' # # => # - # check_box_tag 'rock', 'rock music' + # checkbox_tag 'rock', 'rock music' # # => # - # check_box_tag 'receive_email', 'yes', true + # checkbox_tag 'receive_email', 'yes', true # # => # - # check_box_tag 'tos', 'yes', false, class: 'accept_tos' + # checkbox_tag 'tos', 'yes', false, class: 'accept_tos' # # => # - # check_box_tag 'eula', 'accepted', false, disabled: true + # checkbox_tag 'eula', 'accepted', false, disabled: true # # => # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#455 - def check_box_tag(name, *args); end + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#456 + def checkbox_tag(name, *args); end # Creates a text field of type "color". # @@ -8078,7 +8402,7 @@ module ActionView::Helpers::FormTagHelper # color_field_tag 'color', '#DEF726', class: 'special_input', disabled: true # # => # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#703 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#668 def color_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "date". @@ -8092,16 +8416,16 @@ module ActionView::Helpers::FormTagHelper # date_field_tag 'name' # # => # - # date_field_tag 'date', '01/01/2014' - # # => + # date_field_tag 'date', '2014-12-31' + # # => # # date_field_tag 'date', nil, class: 'special_input' # # => # - # date_field_tag 'date', '01/01/2014', class: 'special_input', disabled: true - # # => + # date_field_tag 'date', '2014-12-31', class: 'special_input', disabled: true + # # => # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#773 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#738 def date_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "datetime-local". @@ -8115,7 +8439,21 @@ module ActionView::Helpers::FormTagHelper # * :step - The acceptable value granularity. # * :include_seconds - Include seconds in the output timestamp format (true by default). # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#801 + # ==== Examples + # + # datetime_field_tag 'name' + # # => + # + # datetime_field_tag 'datetime', '2014-01-01T01:01' + # # => + # + # datetime_field_tag 'datetime', nil, class: 'special_input' + # # => + # + # datetime_field_tag 'datetime', '2014-01-01T01:01', class: 'special_input', disabled: true + # # => + # + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#797 def datetime_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "datetime-local". @@ -8129,7 +8467,21 @@ module ActionView::Helpers::FormTagHelper # * :step - The acceptable value granularity. # * :include_seconds - Include seconds in the output timestamp format (true by default). # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#801 + # ==== Examples + # + # datetime_field_tag 'name' + # # => + # + # datetime_field_tag 'datetime', '2014-01-01T01:01' + # # => + # + # datetime_field_tag 'datetime', nil, class: 'special_input' + # # => + # + # datetime_field_tag 'datetime', '2014-01-01T01:01', class: 'special_input', disabled: true + # # => + # + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#797 def datetime_local_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # source://actionview/lib/action_view/helpers/form_tag_helper.rb#29 @@ -8158,7 +8510,7 @@ module ActionView::Helpers::FormTagHelper # email_field_tag 'email', 'email@example.com', class: 'special_input', disabled: true # # => # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#875 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#899 def email_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # source://actionview/lib/action_view/helpers/form_tag_helper.rb#26 @@ -8222,9 +8574,33 @@ module ActionView::Helpers::FormTagHelper # <% end %> # # =>

# - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#677 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#640 def field_set_tag(legend = T.unsafe(nil), options = T.unsafe(nil), &block); end + # Creates a field set for grouping HTML form elements. + # + # legend will become the fieldset's title (optional as per W3C). + # options accept the same values as tag. + # + # ==== Examples + # <%= field_set_tag do %> + #

<%= text_field_tag 'name' %>

+ # <% end %> + # # =>

+ # + # <%= field_set_tag 'Your details' do %> + #

<%= text_field_tag 'name' %>

+ # <% end %> + # # =>
Your details

+ # + # <%= field_set_tag nil, class: 'format' do %> + #

<%= text_field_tag 'name' %>

+ # <% end %> + # # =>

+ # + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#640 + def fieldset_tag(legend = T.unsafe(nil), options = T.unsafe(nil), &block); end + # Creates a file upload field. If you are using file uploads then you will also need # to set the multipart option for the form tag: # @@ -8365,7 +8741,7 @@ module ActionView::Helpers::FormTagHelper # image_submit_tag("save.png", data: { confirm: "Are you sure?" }) # # => # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#651 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#614 def image_submit_tag(source, options = T.unsafe(nil)); end # Creates a label element. Accepts a block. @@ -8396,7 +8772,21 @@ module ActionView::Helpers::FormTagHelper # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#816 + # ==== Examples + # + # month_field_tag 'name' + # # => + # + # month_field_tag 'month', '2014-01' + # # => + # + # month_field_tag 'month', nil, class: 'special_input' + # # => + # + # month_field_tag 'month', '2014-01', class: 'special_input', disabled: true + # # => + # + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#826 def month_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a number field. @@ -8444,7 +8834,7 @@ module ActionView::Helpers::FormTagHelper # number_field_tag 'quantity', '1', class: 'special_input', disabled: true # # => # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#923 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#947 def number_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a password field, a masked text field that will hide the users input behind a mask character. @@ -8500,7 +8890,7 @@ module ActionView::Helpers::FormTagHelper # telephone_field_tag 'tel', '0123456789', class: 'special_input', disabled: true # # => # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#749 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#714 def phone_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # :call-seq: @@ -8528,7 +8918,7 @@ module ActionView::Helpers::FormTagHelper # radio_button_tag 'color', "green", true, class: "color_input" # # => # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#491 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#493 def radio_button_tag(name, value, *args); end # Creates a range form element. @@ -8537,7 +8927,18 @@ module ActionView::Helpers::FormTagHelper # # Supports the same options as #number_field_tag. # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#937 + # ==== Examples + # + # range_field_tag 'quantity', '1' + # # => + # + # range_field_tag 'quantity', in: 1...10 + # # => + # + # range_field_tag 'quantity', min: 1, max: 10, step: 2 + # # => # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#726 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#691 def search_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a dropdown selection box, or if the :multiple option is set to true, a multiple @@ -8645,26 +9046,7 @@ module ActionView::Helpers::FormTagHelper # submit_tag "Edit", class: "edit_button" # # => # - # ==== Deprecated: \Rails UJS attributes - # - # Prior to \Rails 7, \Rails shipped with the JavaScript library called @rails/ujs on by default. Following \Rails 7, - # this library is no longer on by default. This library integrated with the following options: - # - # * confirm: 'question?' - If present the unobtrusive JavaScript - # drivers will provide a prompt with the question specified. If the user accepts, - # the form is processed normally, otherwise no action is taken. - # * :disable_with - Value of this parameter will be used as the value for a - # disabled version of the submit button when the form is submitted. This feature is - # provided by the unobtrusive JavaScript driver. To disable this feature for a single submit tag - # pass :data => { disable_with: false } Defaults to value attribute. - # - # submit_tag "Complete sale", data: { disable_with: "Submitting..." } - # # => - # - # submit_tag "Save", data: { confirm: "Are you sure?" } - # # => - # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#544 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#527 def submit_tag(value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "tel". @@ -8687,7 +9069,7 @@ module ActionView::Helpers::FormTagHelper # telephone_field_tag 'tel', '0123456789', class: 'special_input', disabled: true # # => # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#749 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#714 def telephone_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text input area; use a textarea for longer text inputs such as blog posts or descriptions. @@ -8702,22 +9084,22 @@ module ActionView::Helpers::FormTagHelper # * Any other key creates standard HTML attributes for the tag. # # ==== Examples - # text_area_tag 'post' + # textarea_tag 'post' # # => # - # text_area_tag 'bio', @user.bio + # textarea_tag 'bio', @user.bio # # => # - # text_area_tag 'body', nil, rows: 10, cols: 25 + # textarea_tag 'body', nil, rows: 10, cols: 25 # # => # - # text_area_tag 'body', nil, size: "25x10" + # textarea_tag 'body', nil, size: "25x10" # # => # - # text_area_tag 'description', "Description goes here.", disabled: true + # textarea_tag 'description', "Description goes here.", disabled: true # # => # - # text_area_tag 'comment', nil, class: 'comment_input' + # textarea_tag 'comment', nil, class: 'comment_input' # # => # # source://actionview/lib/action_view/helpers/form_tag_helper.rb#413 @@ -8763,6 +9145,39 @@ module ActionView::Helpers::FormTagHelper # source://actionview/lib/action_view/helpers/form_tag_helper.rb#263 def text_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + # Creates a text input area; use a textarea for longer text inputs such as blog posts or descriptions. + # + # ==== Options + # * :size - A string specifying the dimensions (columns by rows) of the textarea (e.g., "25x10"). + # * :rows - Specify the number of rows in the textarea + # * :cols - Specify the number of columns in the textarea + # * :disabled - If set to true, the user will not be able to use this input. + # * :escape - By default, the contents of the text input are HTML escaped. + # If you need unescaped contents, set this to false. + # * Any other key creates standard HTML attributes for the tag. + # + # ==== Examples + # textarea_tag 'post' + # # => + # + # textarea_tag 'bio', @user.bio + # # => + # + # textarea_tag 'body', nil, rows: 10, cols: 25 + # # => + # + # textarea_tag 'body', nil, size: "25x10" + # # => + # + # textarea_tag 'description', "Description goes here.", disabled: true + # # => + # + # textarea_tag 'comment', nil, class: 'comment_input' + # # => + # + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#413 + def textarea_tag(name, content = T.unsafe(nil), options = T.unsafe(nil)); end + # Creates a text field of type "time". # # ==== Options @@ -8774,7 +9189,24 @@ module ActionView::Helpers::FormTagHelper # * :step - The acceptable value granularity. # * :include_seconds - Include seconds and ms in the output timestamp format (true by default). # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#787 + # ==== Examples + # + # time_field_tag 'name' + # # => + # + # time_field_tag 'time', '01:01' + # # => + # + # time_field_tag 'time', nil, class: 'special_input' + # # => + # + # time_field_tag 'time', '01:01', include_seconds: true + # # => + # + # time_field_tag 'time', '01:01', min: '00:00', max: '23:59', step: 1 + # # => + # + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#769 def time_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "url". @@ -8797,13 +9229,13 @@ module ActionView::Helpers::FormTagHelper # url_field_tag 'url', 'http://rubyonrails.org', class: 'special_input', disabled: true # # => # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#852 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#876 def url_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates the hidden UTF-8 enforcer tag. Override this method in a helper # to customize the tag. # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#943 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#978 def utf8_enforcer_tag; end # Creates a text field of type "week". @@ -8816,32 +9248,46 @@ module ActionView::Helpers::FormTagHelper # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#829 + # ==== Examples + # + # week_field_tag 'name' + # # => + # + # week_field_tag 'week', '2014-W01' + # # => + # + # week_field_tag 'week', nil, class: 'special_input' + # # => + # + # week_field_tag 'week', '2014-W01', class: 'special_input', disabled: true + # # => + # + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#853 def week_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end private - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#1040 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#1075 def convert_direct_upload_option_to_url(options); end - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#978 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#1013 def extra_tags_for_form(html_options); end - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#1008 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#1043 def form_tag_html(html_options); end - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#1014 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#1049 def form_tag_with_body(html_options, content); end - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#951 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#986 def html_options_for_form(url_for_options, options); end # see http://www.w3.org/TR/html4/types.html#type-name # - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#1021 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#1056 def sanitize_to_id(name); end - # source://actionview/lib/action_view/helpers/form_tag_helper.rb#1025 + # source://actionview/lib/action_view/helpers/form_tag_helper.rb#1060 def set_default_disable_with(value, tag_options); end class << self @@ -9089,11 +9535,11 @@ module ActionView::Helpers::OutputSafetyHelper # the supplied separator, are HTML escaped unless they are HTML # safe, and the returned string is marked as HTML safe. # - # safe_join([raw("

foo

"), "

bar

"], "
") - # # => "

foo

<br /><p>bar</p>" + # safe_join([tag.p("foo"), "

bar

"], "
") + # # => "

foo

<br><p>bar</p>" # - # safe_join([raw("

foo

"), raw("

bar

")], raw("
")) - # # => "

foo


bar

" + # safe_join([tag.p("foo"), tag.p("bar")], tag.br) + # # => "

foo


bar

" # # source://actionview/lib/action_view/helpers/output_safety_helper.rb#33 def safe_join(array, sep = T.unsafe(nil)); end @@ -9106,86 +9552,194 @@ module ActionView::Helpers::OutputSafetyHelper def to_sentence(array, options = T.unsafe(nil)); end end -# = Action View \Rendering \Helpers +# # Action View Rendering Helpers # -# Implements methods that allow rendering from a view context. -# In order to use this module, all you need is to implement -# view_renderer that returns an ActionView::Renderer object. +# Implements methods that allow rendering from a view context. In order to use +# this module, all you need is to implement view_renderer that returns an +# ActionView::Renderer object. # -# source://actionview/lib/action_view/helpers/rendering_helper.rb#10 +# source://actionview/lib/action_view/helpers/rendering_helper.rb#12 module ActionView::Helpers::RenderingHelper # Overrides _layout_for in the context object so it supports the case a block is - # passed to a partial. Returns the contents that are yielded to a layout, given a - # name or a block. + # passed to a partial. Returns the contents that are yielded to a layout, given + # a name or a block. # - # You can think of a layout as a method that is called with a block. If the user calls - # yield :some_name, the block, by default, returns content_for(:some_name). - # If the user calls simply +yield+, the default block returns content_for(:layout). + # You can think of a layout as a method that is called with a block. If the user + # calls `yield :some_name`, the block, by default, returns + # `content_for(:some_name)`. If the user calls simply `yield`, the default block + # returns `content_for(:layout)`. # # The user can override this default by passing a block to the layout: # - # # The template - # <%= render layout: "my_layout" do %> - # Content - # <% end %> + # # The template + # <%= render layout: "my_layout" do %> + # Content + # <% end %> # - # # The layout - # - # <%= yield %> - # + # # The layout + # + # <%= yield %> + # # - # In this case, instead of the default block, which would return content_for(:layout), - # this method returns the block that was passed in to render :layout, and the response + # In this case, instead of the default block, which would return `content_for(:layout)`, + # this method returns the block that was passed in to `render :layout`, and the response # would be # - # - # Content - # + # + # Content + # # - # Finally, the block can take block arguments, which can be passed in by +yield+: + # Finally, the block can take block arguments, which can be passed in by + # `yield`: # - # # The template - # <%= render layout: "my_layout" do |customer| %> - # Hello <%= customer.name %> - # <% end %> + # # The template + # <%= render layout: "my_layout" do |customer| %> + # Hello <%= customer.name %> + # <% end %> # - # # The layout - # - # <%= yield Struct.new(:name).new("David") %> - # + # # The layout + # + # <%= yield Struct.new(:name).new("David") %> + # # - # In this case, the layout would receive the block passed into render :layout, + # In this case, the layout would receive the block passed into `render :layout`, # and the struct specified would be passed into the block as an argument. The result # would be # - # - # Hello David - # + # + # Hello David + # # - # source://actionview/lib/action_view/helpers/rendering_helper.rb#97 + # source://actionview/lib/action_view/helpers/rendering_helper.rb#207 def _layout_for(*args, &block); end - # Returns the result of a render that's dictated by the options hash. The primary options are: + # Renders a template and returns the result. + # + # Pass the template to render as the first argument. This is shorthand + # syntax for partial rendering, so the template filename should be + # prefixed with an underscore. The partial renderer looks for the partial + # template in the directory of the calling template first. + # + # <% # app/views/posts/new.html.erb %> + # <%= render "form" %> + # # => renders app/views/posts/_form.html.erb + # + # Use the complete view path to render a partial from another directory. + # + # <% # app/views/posts/show.html.erb %> + # <%= render "comments/form" %> + # # => renders app/views/comments/_form.html.erb + # + # Without the rendering mode, the second argument can be a Hash of local + # variable assignments for the template. + # + # <% # app/views/posts/new.html.erb %> + # <%= render "form", post: Post.new %> + # # => renders app/views/posts/_form.html.erb + # + # If the first argument responds to `render_in`, the template will be rendered + # by calling `render_in` with the current view context. + # + # class Greeting + # def render_in(view_context) + # view_context.render html: "

Hello, World

" + # end + # + # def format + # :html + # end + # end + # + # <%= render Greeting.new %> + # # => "

Hello, World

" + # + # #### Rendering Mode + # + # Pass the rendering mode as first argument to override it. + # + # `:partial` + # : See ActionView::PartialRenderer for details. + # + # <%= render partial: "form", locals: { post: Post.new } %> + # # => renders app/views/posts/_form.html.erb # - # * :partial - See ActionView::PartialRenderer. - # * :file - Renders an explicit template file (this used to be the old default), add +:locals+ to pass in those. - # * :inline - Renders an inline template similar to how it's done in the controller. - # * :plain - Renders the text passed in out. Setting the content - # type as text/plain. - # * :html - Renders the HTML safe string passed in out, otherwise - # performs HTML escape on the string first. Setting the content type as - # text/html. - # * :body - Renders the text passed in, and inherits the content - # type of text/plain from ActionDispatch::Response object. + # `:file` + # : Renders the contents of a file. This option should **not** be used with + # unsanitized user input. # - # If no options hash is passed or if :update is specified, then: + # <%= render file: "/path/to/some/file" %> + # # => renders /path/to/some/file # - # If an object responding to +render_in+ is passed, +render_in+ is called on the object, - # passing in the current view context. + # `:inline` + # : Renders an ERB template string. # - # Otherwise, a partial is rendered using the second parameter as the locals hash. + # <% name = "World" %> + # <%= render inline: "

Hello, <%= name %>!

" %> + # # => renders "

Hello, World!

" # - # source://actionview/lib/action_view/helpers/rendering_helper.rb#30 + # `:body` + # : Renders the provided text, and sets the format as `:text`. + # + # <%= render body: "Hello, World!" %> + # # => renders "Hello, World!" + # + # `:plain` + # : Renders the provided text, and sets the format as `:text`. + # + # <%= render plain: "Hello, World!" %> + # # => renders "Hello, World!" + # + # `:html` + # : Renders the provided HTML string, and sets the format as + # `:html`. If the string is not `html_safe?`, performs HTML escaping on + # the string before rendering. + # + # <%= render html: "

Hello, World!

".html_safe %> + # # => renders "

Hello, World!

" + # + # <%= render html: "

Hello, World!

" %> + # # => renders "<h1>Hello, World!</h1>" + # + # `:renderable` + # : Renders the provided object by calling `render_in` with the current view + # context. The format is determined by calling `format` on the + # renderable if it responds to `format`, falling back to `:html` by + # default. + # + # <%= render renderable: Greeting.new %> + # # => renders "

Hello, World

" + # + # + # #### Options + # + # `:locals` + # : Hash of local variable assignments for the template. + # + # <%= render inline: "

Hello, <%= name %>!

", locals: { name: "World" } %> + # # => renders "

Hello, World!

" + # + # `:formats` + # : Override the current format to render a template for a different format. + # + # <% # app/views/posts/show.html.erb %> + # <%= render template: "posts/content", formats: [:text] %> + # # => renders app/views/posts/content.text.erb + # + # `:variants` + # : Render a template for a different variant. + # + # <% # app/views/posts/show.html.erb %> + # <%= render template: "posts/content", variants: [:tablet] %> + # # => renders app/views/posts/content.html+tablet.erb + # + # `:handlers` + # : Render a template for a different handler. + # + # <% # app/views/posts/show.html.erb %> + # <%= render template: "posts/content", handlers: [:builder] %> + # # => renders app/views/posts/content.html.builder + # + # source://actionview/lib/action_view/helpers/rendering_helper.rb#138 def render(options = T.unsafe(nil), locals = T.unsafe(nil), &block); end end @@ -9474,7 +10028,7 @@ end # Provides methods to generate HTML tags programmatically both as a modern # HTML5 compliant builder style and legacy XHTML compliant tags. # -# source://actionview/lib/action_view/helpers/tag_helper.rb#15 +# source://actionview/lib/action_view/helpers/tag_helper.rb#17 module ActionView::Helpers::TagHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper @@ -9493,7 +10047,7 @@ module ActionView::Helpers::TagHelper # cdata_section("hello]]>world") # # => world]]> # - # source://actionview/lib/action_view/helpers/tag_helper.rb#386 + # source://actionview/lib/action_view/helpers/tag_helper.rb#574 def cdata_section(content); end # Returns a string of tokens built from +args+. @@ -9508,7 +10062,7 @@ module ActionView::Helpers::TagHelper # token_list(nil, false, 123, "", "foo", { bar: true }) # # => "123 foo bar" # - # source://actionview/lib/action_view/helpers/tag_helper.rb#366 + # source://actionview/lib/action_view/helpers/tag_helper.rb#554 def class_names(*args); end # Returns an HTML block tag of type +name+ surrounding the +content+. Add @@ -9540,7 +10094,7 @@ module ActionView::Helpers::TagHelper # <% end -%> # # =>
Hello world!
# - # source://actionview/lib/action_view/helpers/tag_helper.rb#346 + # source://actionview/lib/action_view/helpers/tag_helper.rb#532 def content_tag(name, content_or_options_with_block = T.unsafe(nil), options = T.unsafe(nil), escape = T.unsafe(nil), &block); end # Returns an escaped version of +html+ without affecting existing escaped entities. @@ -9551,7 +10105,7 @@ module ActionView::Helpers::TagHelper # escape_once("<< Accept & Checkout") # # => "<< Accept & Checkout" # - # source://actionview/lib/action_view/helpers/tag_helper.rb#398 + # source://actionview/lib/action_view/helpers/tag_helper.rb#586 def escape_once(html); end # Returns an HTML tag. @@ -9631,6 +10185,14 @@ module ActionView::Helpers::TagHelper # # A void element: # tag.br # =>
# + # Note that when using the block form options should be wrapped in + # parenthesis. + # + # <%= tag.a(href: "/about", class: "font-bold") do %> + # About the author + # <% end %> + # # => About the author + # # === Building HTML attributes # # Transforms a Hash into HTML attributes, ready to be interpolated into @@ -9693,7 +10255,7 @@ module ActionView::Helpers::TagHelper # tag("div", class: { highlight: current_user.admin? }) # # =>
# - # source://actionview/lib/action_view/helpers/tag_helper.rb#309 + # source://actionview/lib/action_view/helpers/tag_helper.rb#495 def tag(name = T.unsafe(nil), options = T.unsafe(nil), open = T.unsafe(nil), escape = T.unsafe(nil)); end # Returns a string of tokens built from +args+. @@ -9708,94 +10270,496 @@ module ActionView::Helpers::TagHelper # token_list(nil, false, 123, "", "foo", { bar: true }) # # => "123 foo bar" # - # source://actionview/lib/action_view/helpers/tag_helper.rb#366 + # source://actionview/lib/action_view/helpers/tag_helper.rb#554 def token_list(*args); end private - # source://actionview/lib/action_view/helpers/tag_helper.rb#403 + # source://actionview/lib/action_view/helpers/tag_helper.rb#596 def build_tag_values(*args); end - # source://actionview/lib/action_view/helpers/tag_helper.rb#423 + # @raise [ArgumentError] + # + # source://actionview/lib/action_view/helpers/tag_helper.rb#591 + def ensure_valid_html5_tag_name(name); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#616 def tag_builder; end class << self - # source://actionview/lib/action_view/helpers/tag_helper.rb#403 + # source://actionview/lib/action_view/helpers/tag_helper.rb#596 def build_tag_values(*args); end + + # @raise [ArgumentError] + # + # source://actionview/lib/action_view/helpers/tag_helper.rb#591 + def ensure_valid_html5_tag_name(name); end end end -# source://actionview/lib/action_view/helpers/tag_helper.rb#32 +# source://actionview/lib/action_view/helpers/tag_helper.rb#34 ActionView::Helpers::TagHelper::ARIA_PREFIXES = T.let(T.unsafe(nil), Set) -# source://actionview/lib/action_view/helpers/tag_helper.rb#19 +# source://actionview/lib/action_view/helpers/tag_helper.rb#21 ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES = T.let(T.unsafe(nil), Set) -# source://actionview/lib/action_view/helpers/tag_helper.rb#33 +# source://actionview/lib/action_view/helpers/tag_helper.rb#35 ActionView::Helpers::TagHelper::DATA_PREFIXES = T.let(T.unsafe(nil), Set) -# source://actionview/lib/action_view/helpers/tag_helper.rb#41 +# source://actionview/lib/action_view/helpers/tag_helper.rb#43 ActionView::Helpers::TagHelper::PRE_CONTENT_STRINGS = T.let(T.unsafe(nil), Hash) -# source://actionview/lib/action_view/helpers/tag_helper.rb#35 +# source://actionview/lib/action_view/helpers/tag_helper.rb#37 ActionView::Helpers::TagHelper::TAG_TYPES = T.let(T.unsafe(nil), Hash) -# source://actionview/lib/action_view/helpers/tag_helper.rb#45 +# source://actionview/lib/action_view/helpers/tag_helper.rb#47 class ActionView::Helpers::TagHelper::TagBuilder include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper # @return [TagBuilder] a new instance of TagBuilder # - # source://actionview/lib/action_view/helpers/tag_helper.rb#52 + # source://actionview/lib/action_view/helpers/tag_helper.rb#232 def initialize(view_context); end - # Transforms a Hash into HTML Attributes, ready to be interpolated into - # ERB. - # + # source://actionview/lib/action_view/helpers/tag_helper.rb#128 + def a(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#129 + def abbr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#130 + def address(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#114 + def animate(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#115 + def animate_motion(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#116 + def animate_transform(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#100 + def area(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#131 + def article(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#132 + def aside(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # Transforms a Hash into HTML Attributes, ready to be interpolated into + # ERB. + # # > # # => # - # source://actionview/lib/action_view/helpers/tag_helper.rb#61 + # source://actionview/lib/action_view/helpers/tag_helper.rb#241 def attributes(attributes); end - # source://actionview/lib/action_view/helpers/tag_helper.rb#132 + # source://actionview/lib/action_view/helpers/tag_helper.rb#133 + def audio(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#134 + def b(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#101 + def base(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#135 + def bdi(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#136 + def bdo(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#137 + def blockquote(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#138 + def body(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#306 def boolean_tag_option(key); end - # source://actionview/lib/action_view/helpers/tag_helper.rb#79 + # source://actionview/lib/action_view/helpers/tag_helper.rb#102 + def br(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#139 + def button(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#140 + def canvas(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#141 + def caption(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#117 + def circle(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#142 + def cite(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#143 + def code(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#103 + def col(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#144 + def colgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#255 def content_tag_string(name, content, options, escape = T.unsafe(nil)); end - # source://actionview/lib/action_view/helpers/tag_helper.rb#65 - def p(*arguments, **options, &block); end + # source://actionview/lib/action_view/helpers/tag_helper.rb#145 + def data(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end - # source://actionview/lib/action_view/helpers/tag_helper.rb#136 + # source://actionview/lib/action_view/helpers/tag_helper.rb#146 + def datalist(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#147 + def dd(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#148 + def del(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#51 + def deprecated_void_content(name); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#149 + def details(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#150 + def dfn(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#151 + def dialog(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#152 + def div(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#153 + def dl(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#154 + def dt(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#118 + def ellipse(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#155 + def em(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#104 + def embed(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#156 + def fieldset(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#157 + def figcaption(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#158 + def figure(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#159 + def footer(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#160 + def form(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#161 + def h1(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#162 + def h2(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#163 + def h3(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#164 + def h4(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#165 + def h5(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#166 + def h6(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#167 + def head(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#168 + def header(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#169 + def hgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#105 + def hr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#170 + def html(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#171 + def i(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#172 + def iframe(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#106 + def img(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#107 + def input(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#173 + def ins(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#174 + def kbd(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#108 + def keygen(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#175 + def label(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#176 + def legend(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#177 + def li(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#119 + def line(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#109 + def link(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#178 + def main(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#179 + def map(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#180 + def mark(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#181 + def menu(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#110 + def meta(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#182 + def meter(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#183 + def nav(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#184 + def noscript(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#185 + def object(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#186 + def ol(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#187 + def optgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#188 + def option(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#189 + def output(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#190 + def p(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#120 + def path(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#191 + def picture(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#121 + def polygon(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#122 + def polyline(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#192 + def portal(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#193 + def pre(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#194 + def progress(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#195 + def q(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#123 + def rect(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#196 + def rp(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#197 + def rt(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#198 + def ruby(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#199 + def s(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#200 + def samp(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#201 + def script(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#202 + def search(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#203 + def section(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#204 + def select(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#251 + def self_closing_tag_string(name, options, escape = T.unsafe(nil), tag_suffix = T.unsafe(nil)); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#124 + def set(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#205 + def slot(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#206 + def small(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#111 + def source(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#207 + def span(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#125 + def stop(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#208 + def strong(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#209 + def style(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#210 + def sub(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#211 + def summary(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#212 + def sup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#213 + def table(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#310 def tag_option(key, value, escape); end - # source://actionview/lib/action_view/helpers/tag_helper.rb#90 + # source://actionview/lib/action_view/helpers/tag_helper.rb#264 def tag_options(options, escape = T.unsafe(nil)); end - # source://actionview/lib/action_view/helpers/tag_helper.rb#69 - def tag_string(name, content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + # source://actionview/lib/action_view/helpers/tag_helper.rb#245 + def tag_string(name, content = T.unsafe(nil), options, escape: T.unsafe(nil), &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#214 + def tbody(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#215 + def td(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#216 + def template(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#217 + def textarea(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#218 + def tfoot(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#219 + def th(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#220 + def thead(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#221 + def time(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#222 + def title(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#223 + def tr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#112 + def track(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#224 + def u(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#225 + def ul(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#126 + def use(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#226 + def var(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#227 + def video(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#127 + def view(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#113 + def wbr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end private - # source://actionview/lib/action_view/helpers/tag_helper.rb#166 - def method_missing(called, *args, **options, &block); end + # source://actionview/lib/action_view/helpers/tag_helper.rb#340 + def method_missing(called, *args, escape: T.unsafe(nil), **options, &block); end - # source://actionview/lib/action_view/helpers/tag_helper.rb#154 + # source://actionview/lib/action_view/helpers/tag_helper.rb#328 def prefix_tag_option(prefix, key, value, escape); end # @return [Boolean] # - # source://actionview/lib/action_view/helpers/tag_helper.rb#162 + # source://actionview/lib/action_view/helpers/tag_helper.rb#336 def respond_to_missing?(*args); end -end -# source://actionview/lib/action_view/helpers/tag_helper.rb#49 -ActionView::Helpers::TagHelper::TagBuilder::HTML_VOID_ELEMENTS = T.let(T.unsafe(nil), Set) + class << self + # source://actionview/lib/action_view/helpers/tag_helper.rb#61 + def define_element(name, code_generator:, method_name: T.unsafe(nil)); end + + # source://actionview/lib/action_view/helpers/tag_helper.rb#86 + def define_self_closing_element(name, code_generator:, method_name: T.unsafe(nil)); end -# source://actionview/lib/action_view/helpers/tag_helper.rb#50 -ActionView::Helpers::TagHelper::TagBuilder::SVG_SELF_CLOSING_ELEMENTS = T.let(T.unsafe(nil), Set) + # source://actionview/lib/action_view/helpers/tag_helper.rb#72 + def define_void_element(name, code_generator:, method_name: T.unsafe(nil)); end + end +end # source://actionview/lib/action_view/helpers/tags.rb#5 module ActionView::Helpers::Tags @@ -9915,15 +10879,15 @@ class ActionView::Helpers::Tags::CollectionCheckBoxes < ::ActionView::Helpers::T include ::ActionView::Helpers::Tags::CollectionHelpers include ::ActionView::Helpers::FormOptionsHelper - # source://actionview/lib/action_view/helpers/tags/collection_check_boxes.rb#21 + # source://actionview/lib/action_view/helpers/tags/collection_check_boxes.rb#22 def render(&block); end private - # source://actionview/lib/action_view/helpers/tags/collection_check_boxes.rb#30 + # source://actionview/lib/action_view/helpers/tags/collection_check_boxes.rb#31 def hidden_field_name; end - # source://actionview/lib/action_view/helpers/tags/collection_check_boxes.rb#26 + # source://actionview/lib/action_view/helpers/tags/collection_check_boxes.rb#27 def render_component(builder); end end @@ -9931,6 +10895,9 @@ end class ActionView::Helpers::Tags::CollectionCheckBoxes::CheckBoxBuilder < ::ActionView::Helpers::Tags::CollectionHelpers::Builder # source://actionview/lib/action_view/helpers/tags/collection_check_boxes.rb#13 def check_box(extra_html_options = T.unsafe(nil)); end + + # source://actionview/lib/action_view/helpers/tags/collection_check_boxes.rb#13 + def checkbox(extra_html_options = T.unsafe(nil)); end end # source://actionview/lib/action_view/helpers/tags/collection_helpers.rb#6 @@ -11021,8 +11988,9 @@ module ActionView::Helpers::UrlHelper # +:form_class+ option within +html_options+. It defaults to # "button_to" to allow styling of the form and its children. # - # The form submits a POST request by default. You can specify a different - # HTTP verb via the +:method+ option within +html_options+. + # The form submits a POST request by default if the object is not persisted; + # conversely, if the object is persisted, it will submit a PATCH request. + # To specify a different HTTP verb use the +:method+ option within +html_options+. # # If the HTML button generated from +button_to+ does not work with your layout, you can # consider using the +link_to+ method with the +data-turbo-method+ @@ -11093,33 +12061,7 @@ module ActionView::Helpers::UrlHelper # # # # " # - # ==== Deprecated: \Rails UJS Attributes - # - # Prior to \Rails 7, \Rails shipped with a JavaScript library called @rails/ujs on by default. Following \Rails 7, - # this library is no longer on by default. This library integrated with the following options: - # - # * :remote - If set to true, will allow @rails/ujs to control the - # submit behavior. By default this behavior is an Ajax submit. - # - # @rails/ujs also integrated with the following +:data+ options: - # - # * confirm: "question?" - This will allow @rails/ujs - # to prompt with the question specified (in this case, the - # resulting text would be question?). If the user accepts, the - # button is processed normally, otherwise no action is taken. - # * :disable_with - Value of this parameter will be - # used as the value for a disabled version of the submit - # button when the form is submitted. - # - # ===== \Rails UJS Examples - # - # <%= button_to "Create", { action: "create" }, remote: true, form: { "data-type" => "json" } %> - # # => "
- # # - # # - # #
" - # - # source://actionview/lib/action_view/helpers/url_helper.rb#357 + # source://actionview/lib/action_view/helpers/url_helper.rb#296 def button_to(name = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # source://actionview/lib/action_view/helpers/url_helper.rb#35 @@ -11128,9 +12070,54 @@ module ActionView::Helpers::UrlHelper # source://actionview/lib/action_view/helpers/url_helper.rb#35 def button_to_generates_button_tag=(val); end + # True if the current request URI was generated by the given +options+. + # + # ==== Examples + # Let's say we're in the http://www.example.com/shop/checkout?order=desc&page=1 action. + # + # current_page?(action: 'process') + # # => false + # + # current_page?(action: 'checkout') + # # => true + # + # current_page?(controller: 'library', action: 'checkout') + # # => false + # + # current_page?(controller: 'shop', action: 'checkout') + # # => true + # + # current_page?(controller: 'shop', action: 'checkout', order: 'asc') + # # => false + # + # current_page?(controller: 'shop', action: 'checkout', order: 'desc', page: '1') + # # => true + # + # current_page?(controller: 'shop', action: 'checkout', order: 'desc', page: '2') + # # => false + # + # current_page?('http://www.example.com/shop/checkout') + # # => true + # + # current_page?('http://www.example.com/shop/checkout', check_parameters: true) + # # => false + # + # current_page?('/shop/checkout') + # # => true + # + # current_page?('http://www.example.com/shop/checkout?order=desc&page=1') + # # => true + # + # Let's say we're in the http://www.example.com/products action with method POST in case of invalid product. + # + # current_page?(controller: 'product', action: 'index') + # # => false + # + # We can also pass in the symbol arguments instead of strings. + # # @return [Boolean] # - # source://actionview/lib/action_view/helpers/url_helper.rb#609 + # source://actionview/lib/action_view/helpers/url_helper.rb#548 def current_page?(options = T.unsafe(nil), check_parameters: T.unsafe(nil), **options_as_kwargs); end # Creates an anchor element of the given +name+ using a URL created by the set of +options+. @@ -11265,43 +12252,7 @@ module ActionView::Helpers::UrlHelper # link_to "Visit Other Site", "https://rubyonrails.org/", data: { turbo_confirm: "Are you sure?" } # # => Visit Other Site # - # ==== Deprecated: \Rails UJS Attributes - # - # Prior to \Rails 7, \Rails shipped with a JavaScript library called @rails/ujs on by default. Following \Rails 7, - # this library is no longer on by default. This library integrated with the following options: - # - # * method: symbol of HTTP verb - This modifier will dynamically - # create an HTML form and immediately submit the form for processing using - # the HTTP verb specified. Useful for having links perform a POST operation - # in dangerous actions like deleting a record (which search bots can follow - # while spidering your site). Supported verbs are :post, :delete, :patch, and :put. - # Note that if the user has JavaScript disabled, the request will fall back - # to using GET. If href: '#' is used and the user has JavaScript - # disabled clicking the link will have no effect. If you are relying on the - # POST behavior, you should check for it in your controller's action by using - # the request object's methods for post?, delete?, patch?, or put?. - # * remote: true - This will allow @rails/ujs - # to make an Ajax request to the URL in question instead of following - # the link. - # - # @rails/ujs also integrated with the following +:data+ options: - # - # * confirm: "question?" - This will allow @rails/ujs - # to prompt with the question specified (in this case, the - # resulting text would be question?). If the user accepts, the - # link is processed normally, otherwise no action is taken. - # * :disable_with - Value of this parameter will be used as the - # name for a disabled version of the link. - # - # ===== \Rails UJS Examples - # - # link_to "Remove Profile", profile_path(@profile), method: :delete - # # => Remove Profile - # - # link_to "Visit Other Site", "http://www.rubyonrails.org/", data: { confirm: "Are you sure?" } - # # => Visit Other Site - # - # source://actionview/lib/action_view/helpers/url_helper.rb#234 + # source://actionview/lib/action_view/helpers/url_helper.rb#198 def link_to(name = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a link tag of the given +name+ using a URL created by the set of @@ -11324,7 +12275,7 @@ module ActionView::Helpers::UrlHelper # # If they are logged in... # # => my_username # - # source://actionview/lib/action_view/helpers/url_helper.rb#498 + # source://actionview/lib/action_view/helpers/url_helper.rb#437 def link_to_if(condition, name, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a link tag of the given +name+ using a URL created by the set of @@ -11348,7 +12299,7 @@ module ActionView::Helpers::UrlHelper # # If not... # # => Reply # - # source://actionview/lib/action_view/helpers/url_helper.rb#475 + # source://actionview/lib/action_view/helpers/url_helper.rb#414 def link_to_unless(condition, name, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a link tag of the given +name+ using a URL created by the set of @@ -11390,7 +12341,7 @@ module ActionView::Helpers::UrlHelper # end # %> # - # source://actionview/lib/action_view/helpers/url_helper.rb#451 + # source://actionview/lib/action_view/helpers/url_helper.rb#390 def link_to_unless_current(name, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a mailto link tag to the specified +email_address+, which is @@ -11432,7 +12383,7 @@ module ActionView::Helpers::UrlHelper # Email me: me@domain.com # # - # source://actionview/lib/action_view/helpers/url_helper.rb#548 + # source://actionview/lib/action_view/helpers/url_helper.rb#487 def mail_to(email_address, name = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a TEL anchor link tag to the specified +phone_number+. When the @@ -11471,7 +12422,7 @@ module ActionView::Helpers::UrlHelper # Phone me: # # - # source://actionview/lib/action_view/helpers/url_helper.rb#743 + # source://actionview/lib/action_view/helpers/url_helper.rb#669 def phone_to(phone_number, name = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates an SMS anchor link tag to the specified +phone_number+. When the @@ -11515,7 +12466,7 @@ module ActionView::Helpers::UrlHelper # Text me: # # - # source://actionview/lib/action_view/helpers/url_helper.rb#692 + # source://actionview/lib/action_view/helpers/url_helper.rb#618 def sms_to(phone_number, name = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Basic implementation of url_for to allow use helpers without routes existence @@ -11531,29 +12482,29 @@ module ActionView::Helpers::UrlHelper # source://actionview/lib/action_view/helpers/url_helper.rb#55 def _filtered_referrer; end - # source://actionview/lib/action_view/helpers/url_helper.rb#786 + # source://actionview/lib/action_view/helpers/url_helper.rb#712 def add_method_to_attributes!(html_options, method); end - # source://actionview/lib/action_view/helpers/url_helper.rb#757 + # source://actionview/lib/action_view/helpers/url_helper.rb#683 def convert_options_to_data_attributes(options, html_options); end # @return [Boolean] # - # source://actionview/lib/action_view/helpers/url_helper.rb#780 + # source://actionview/lib/action_view/helpers/url_helper.rb#706 def link_to_remote_options?(options); end - # source://actionview/lib/action_view/helpers/url_helper.rb#797 + # source://actionview/lib/action_view/helpers/url_helper.rb#723 def method_for_options(options); end # @return [Boolean] # - # source://actionview/lib/action_view/helpers/url_helper.rb#815 + # source://actionview/lib/action_view/helpers/url_helper.rb#741 def method_not_get_method?(method); end - # source://actionview/lib/action_view/helpers/url_helper.rb#834 + # source://actionview/lib/action_view/helpers/url_helper.rb#760 def method_tag(method); end - # source://actionview/lib/action_view/helpers/url_helper.rb#880 + # source://actionview/lib/action_view/helpers/url_helper.rb#806 def remove_trailing_slash!(url_string); end # Returns an array of hashes each containing :name and :value keys @@ -11573,13 +12524,13 @@ module ActionView::Helpers::UrlHelper # to_form_params({ name: 'Denmark' }, 'country') # # => [{name: 'country[name]', value: 'Denmark'}] # - # source://actionview/lib/action_view/helpers/url_helper.rb#854 + # source://actionview/lib/action_view/helpers/url_helper.rb#780 def to_form_params(attribute, namespace = T.unsafe(nil)); end - # source://actionview/lib/action_view/helpers/url_helper.rb#820 + # source://actionview/lib/action_view/helpers/url_helper.rb#746 def token_tag(token = T.unsafe(nil), form_options: T.unsafe(nil)); end - # source://actionview/lib/action_view/helpers/url_helper.rb#772 + # source://actionview/lib/action_view/helpers/url_helper.rb#698 def url_target(name, options); end class << self @@ -11606,7 +12557,7 @@ module ActionView::Helpers::UrlHelper::ClassMethods def _url_for_modules; end end -# source://actionview/lib/action_view/helpers/url_helper.rb#807 +# source://actionview/lib/action_view/helpers/url_helper.rb#733 ActionView::Helpers::UrlHelper::STRINGIFIED_COMMON_METHODS = T.let(T.unsafe(nil), Hash) # This is a class to fix I18n global state. Whenever you provide I18n.locale during a request, @@ -11843,11 +12794,11 @@ module ActionView::Layouts mixes_in_class_methods ::ActionView::Rendering::ClassMethods mixes_in_class_methods ::ActionView::Layouts::ClassMethods - # source://actionview/lib/action_view/layouts.rb#363 + # source://actionview/lib/action_view/layouts.rb#361 def initialize(*_arg0); end - # source://actionview/lib/action_view/layouts.rb#352 - def _normalize_options(options); end + # source://actionview/lib/action_view/layouts.rb#350 + def _process_render_template_options(options); end def action_has_layout=(_arg0); end @@ -11860,14 +12811,14 @@ module ActionView::Layouts # # @return [Boolean] # - # source://actionview/lib/action_view/layouts.rb#374 + # source://actionview/lib/action_view/layouts.rb#372 def action_has_layout?; end private # @return [Boolean] # - # source://actionview/lib/action_view/layouts.rb#379 + # source://actionview/lib/action_view/layouts.rb#377 def _conditional_layout?; end # Returns the default layout for this controller. @@ -11881,17 +12832,17 @@ module ActionView::Layouts # ==== Returns # * template - The template object for the default layout (or +nil+) # - # source://actionview/lib/action_view/layouts.rb#417 + # source://actionview/lib/action_view/layouts.rb#415 def _default_layout(lookup_context, formats, require_layout = T.unsafe(nil)); end # @return [Boolean] # - # source://actionview/lib/action_view/layouts.rb#432 + # source://actionview/lib/action_view/layouts.rb#430 def _include_layout?(options); end # This will be overwritten by _write_layout_method # - # source://actionview/lib/action_view/layouts.rb#384 + # source://actionview/lib/action_view/layouts.rb#382 def _layout(*_arg0); end # Determine the layout for a given name, taking into account the name type. @@ -11899,10 +12850,10 @@ module ActionView::Layouts # ==== Parameters # * name - The name of the template # - # source://actionview/lib/action_view/layouts.rb#390 + # source://actionview/lib/action_view/layouts.rb#388 def _layout_for_option(name); end - # source://actionview/lib/action_view/layouts.rb#403 + # source://actionview/lib/action_view/layouts.rb#401 def _normalize_layout(value); end module GeneratedClassMethods @@ -11914,20 +12865,23 @@ module ActionView::Layouts def _layout_conditions?; end end - module GeneratedInstanceMethods; end + module GeneratedInstanceMethods + def _layout_conditions; end + def _layout_conditions?; end + end end -# source://actionview/lib/action_view/layouts.rb#219 +# source://actionview/lib/action_view/layouts.rb#217 module ActionView::Layouts::ClassMethods # Creates a _layout method to be called by _default_layout . # # If a layout is not explicitly mentioned then look for a layout with the controller's name. # if nothing is found then try same procedure to find super class's layout. # - # source://actionview/lib/action_view/layouts.rb#285 + # source://actionview/lib/action_view/layouts.rb#283 def _write_layout_method; end - # source://actionview/lib/action_view/layouts.rb#220 + # source://actionview/lib/action_view/layouts.rb#218 def inherited(klass); end # Specify the layout to use for this class. @@ -11952,7 +12906,7 @@ module ActionView::Layouts::ClassMethods # * +:only+ - A list of actions to apply this layout to. # * +:except+ - Apply this layout to all actions but this one. # - # source://actionview/lib/action_view/layouts.rb#271 + # source://actionview/lib/action_view/layouts.rb#269 def layout(layout, conditions = T.unsafe(nil)); end private @@ -11963,14 +12917,14 @@ module ActionView::Layouts::ClassMethods # ==== Returns # * String - A template name # - # source://actionview/lib/action_view/layouts.rb#347 + # source://actionview/lib/action_view/layouts.rb#345 def _implied_layout_name; end end # This module is mixed in if layout conditions are provided. This means # that if no layout conditions are used, this method is not used # -# source://actionview/lib/action_view/layouts.rb#227 +# source://actionview/lib/action_view/layouts.rb#225 module ActionView::Layouts::ClassMethods::LayoutConditions private @@ -11983,7 +12937,7 @@ module ActionView::Layouts::ClassMethods::LayoutConditions # # @return [Boolean] # - # source://actionview/lib/action_view/layouts.rb#235 + # source://actionview/lib/action_view/layouts.rb#233 def _conditional_layout?; end end @@ -12014,18 +12968,21 @@ class ActionView::LogSubscriber < ::ActiveSupport::LogSubscriber private - # source://actionview/lib/action_view/log_subscriber.rb#117 + # source://actionview/lib/action_view/log_subscriber.rb#121 def cache_message(payload); end - # source://actionview/lib/action_view/log_subscriber.rb#109 + # source://actionview/lib/action_view/log_subscriber.rb#113 def render_count(payload); end class << self - # source://actionview/lib/action_view/log_subscriber.rb#101 + # source://actionview/lib/action_view/log_subscriber.rb#105 def attach_to(*_arg0); end - # source://activesupport/7.1.3.3lib/active_support/log_subscriber.rb#87 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def log_levels; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end end end @@ -12036,6 +12993,11 @@ class ActionView::LogSubscriber::Start # source://actionview/lib/action_view/log_subscriber.rb#97 def finish(name, id, payload); end + # @return [Boolean] + # + # source://actionview/lib/action_view/log_subscriber.rb#100 + def silenced?(_); end + # source://actionview/lib/action_view/log_subscriber.rb#79 def start(name, id, payload); end end @@ -12927,8 +13889,11 @@ end # source://actionview/lib/action_view/railtie.rb#8 class ActionView::Railtie < ::Rails::Engine class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end end end @@ -13070,802 +14035,88 @@ ActionView::RecordIdentifier::JOIN = T.let(T.unsafe(nil), String) # source://actionview/lib/action_view/record_identifier.rb#67 ActionView::RecordIdentifier::NEW = T.let(T.unsafe(nil), String) -# source://actionview/lib/action_view/ripper_ast_parser.rb#6 -class ActionView::RenderParser - # @return [RenderParser] a new instance of RenderParser +# source://actionview/lib/action_view/render_parser.rb#4 +module ActionView::RenderParser; end + +# source://actionview/lib/action_view/render_parser.rb#5 +ActionView::RenderParser::ALL_KNOWN_KEYS = T.let(T.unsafe(nil), Array) + +# source://actionview/lib/action_view/render_parser.rb#8 +class ActionView::RenderParser::Base + # @return [Base] a new instance of Base # - # source://actionview/lib/action_view/render_parser.rb#7 + # source://actionview/lib/action_view/render_parser.rb#9 def initialize(name, code); end - # source://actionview/lib/action_view/render_parser.rb#13 - def render_calls; end - private - # source://actionview/lib/action_view/render_parser.rb#22 + # source://actionview/lib/action_view/render_parser.rb#15 def directory; end - # source://actionview/lib/action_view/render_parser.rb#184 - def layout_to_virtual_path(layout_path); end - - # Convert - # render("foo", ...) - # into either - # render(template: "foo", ...) - # or - # render(partial: "foo", ...) - # - # source://actionview/lib/action_view/render_parser.rb#40 - def normalize_args(string, options_hash); end - - # source://actionview/lib/action_view/render_parser.rb#72 - def parse_hash(node); end - - # source://actionview/lib/action_view/render_parser.rb#76 - def parse_hash_to_symbols(node); end - - # source://actionview/lib/action_view/render_parser.rb#48 - def parse_render(node); end - - # source://actionview/lib/action_view/render_parser.rb#95 - def parse_render_from_options(options_hash); end + # source://actionview/lib/action_view/render_parser.rb#19 + def partial_to_virtual_path(render_type, partial_path); end +end - # source://actionview/lib/action_view/render_parser.rb#155 - def parse_str(node); end +# source://actionview/lib/action_view/render_parser.rb#37 +ActionView::RenderParser::Default = ActionView::RenderParser::PrismRenderParser - # source://actionview/lib/action_view/render_parser.rb#159 - def parse_sym(node); end +# source://actionview/lib/action_view/render_parser/prism_render_parser.rb#5 +class ActionView::RenderParser::PrismRenderParser < ::ActionView::RenderParser::Base + # source://actionview/lib/action_view/render_parser/prism_render_parser.rb#6 + def render_calls; end - # source://actionview/lib/action_view/render_parser.rb#176 - def partial_to_virtual_path(render_type, partial_path); end + private - # @return [Boolean] + # Accept a call node and return a hash of options for the render call. + # If it doesn't match the expected format, return nil. # - # source://actionview/lib/action_view/render_parser.rb#164 - def render_template_with_layout?(render_type, options_hash); end + # source://actionview/lib/action_view/render_parser/prism_render_parser.rb#43 + def render_call_options(node); end - # @return [Boolean] + # Accept the node that is being passed in the position of the template + # and return the template name and whether or not it is an object + # template. # - # source://actionview/lib/action_view/render_parser.rb#170 - def render_template_with_spacer?(options_hash); end - - # source://actionview/lib/action_view/render_parser.rb#26 - def resolve_path_directory(path); end + # source://actionview/lib/action_view/render_parser/prism_render_parser.rb#97 + def render_call_template(node); end end -# source://actionview/lib/action_view/render_parser.rb#90 -ActionView::RenderParser::ALL_KNOWN_KEYS = T.let(T.unsafe(nil), Array) - -# source://actionview/lib/action_view/render_parser.rb#92 +# source://actionview/lib/action_view/render_parser.rb#6 ActionView::RenderParser::RENDER_TYPE_KEYS = T.let(T.unsafe(nil), Array) -# source://actionview/lib/action_view/ripper_ast_parser.rb#7 -module ActionView::RenderParser::RipperASTParser - extend ::ActionView::RenderParser::RipperASTParser - - # source://actionview/lib/action_view/ripper_ast_parser.rb#188 - def parse_render_nodes(code); end -end - -# source://actionview/lib/action_view/ripper_ast_parser.rb#8 -class ActionView::RenderParser::RipperASTParser::Node < ::Array - # @return [Node] a new instance of Node +# = Action View \Renderer +# +# This is the main entry point for rendering. It basically delegates +# to other objects like TemplateRenderer and PartialRenderer which +# actually renders the template. +# +# The Renderer will parse the options from the +render+ or +render_body+ +# method and render a partial or a template based on the options. The +# +TemplateRenderer+ and +PartialRenderer+ objects are wrappers which do all +# the setup and logic necessary to render a view and a new object is created +# each time +render+ is called. +# +# source://actionview/lib/action_view/renderer/renderer.rb#15 +class ActionView::Renderer + # @return [Renderer] a new instance of Renderer # - # source://actionview/lib/action_view/ripper_ast_parser.rb#11 - def initialize(type, arr, opts = T.unsafe(nil)); end + # source://actionview/lib/action_view/renderer/renderer.rb#18 + def initialize(lookup_context); end - # source://actionview/lib/action_view/ripper_ast_parser.rb#35 - def argument_nodes; end + # source://actionview/lib/action_view/renderer/renderer.rb#52 + def cache_hits; end - # @return [Boolean] + # Returns the value of attribute lookup_context. # - # source://actionview/lib/action_view/ripper_ast_parser.rb#57 - def call?; end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#65 - def call_method_name; end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#16 - def children; end + # source://actionview/lib/action_view/renderer/renderer.rb#16 + def lookup_context; end - # @return [Boolean] + # Sets the attribute lookup_context # - # source://actionview/lib/action_view/ripper_ast_parser.rb#25 - def fcall?; end - - # @return [Boolean] + # @param value the value to set the attribute lookup_context to. # - # source://actionview/lib/action_view/ripper_ast_parser.rb#29 - def fcall_named?(name); end - - # @return [Boolean] - # - # source://actionview/lib/action_view/ripper_ast_parser.rb#74 - def hash?; end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#88 - def hash_from_body(body); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#20 - def inspect; end - - # @return [Boolean] - # - # source://actionview/lib/action_view/ripper_ast_parser.rb#45 - def string?; end - - # @return [Boolean] - # - # source://actionview/lib/action_view/ripper_ast_parser.rb#96 - def symbol?; end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#78 - def to_hash; end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#69 - def to_string; end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#100 - def to_symbol; end - - # Returns the value of attribute type. - # - # source://actionview/lib/action_view/ripper_ast_parser.rb#9 - def type; end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#61 - def variable_name; end - - # @return [Boolean] - # - # source://actionview/lib/action_view/ripper_ast_parser.rb#49 - def variable_reference?; end - - # @return [Boolean] - # - # source://actionview/lib/action_view/ripper_ast_parser.rb#53 - def vcall?; end -end - -# source://actionview/lib/action_view/ripper_ast_parser.rb#111 -class ActionView::RenderParser::RipperASTParser::NodeParser < ::Ripper - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_BEGIN(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_CHAR(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_END(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on___end__(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_alias(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_alias_error(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_aref(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_aref_field(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_arg_ambiguous(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_arg_paren(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_args_add(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_args_add_block(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_args_add_star(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_args_forward(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#116 - def on_args_new(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_array(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_aryptn(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_assign(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_assign_error(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_assoc_new(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_assoc_splat(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_assoclist_from_args(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_backref(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_backtick(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_bare_assoc_hash(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_begin(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_binary(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_block_var(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_blockarg(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_bodystmt(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_brace_block(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_break(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_call(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_case(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_class(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_class_name_error(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_comma(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_command(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_command_call(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_comment(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_const(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_const_path_field(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_const_path_ref(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_const_ref(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_cvar(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_def(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_defined(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_defs(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_do_block(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_dot2(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_dot3(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_dyna_symbol(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_else(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_elsif(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_embdoc(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_embdoc_beg(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_embdoc_end(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_embexpr_beg(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_embexpr_end(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_embvar(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_ensure(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_excessed_comma(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_fcall(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_field(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_float(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_fndptn(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_for(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_gvar(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_hash(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_heredoc_beg(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_heredoc_dedent(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_heredoc_end(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_hshptn(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_ident(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_if(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_if_mod(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_ifop(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_ignored_nl(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_ignored_sp(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_imaginary(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_in(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_int(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_ivar(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_kw(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_kwrest_param(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_label(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_label_end(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_lambda(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_lbrace(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_lbracket(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_lparen(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_magic_comment(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_massign(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_method_add_arg(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_method_add_block(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_mlhs_add(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_mlhs_add_post(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_mlhs_add_star(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#116 - def on_mlhs_new(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_mlhs_paren(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_module(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_mrhs_add(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_mrhs_add_star(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#116 - def on_mrhs_new(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_mrhs_new_from_args(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_next(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_nl(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_nokw_param(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_op(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_opassign(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_operator_ambiguous(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_param_error(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_params(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_paren(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_parse_error(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_period(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_program(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_qsymbols_add(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_qsymbols_beg(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#116 - def on_qsymbols_new(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_qwords_add(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_qwords_beg(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#116 - def on_qwords_new(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_rational(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_rbrace(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_rbracket(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_redo(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_regexp_add(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_regexp_beg(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_regexp_end(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_regexp_literal(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#116 - def on_regexp_new(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_rescue(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_rescue_mod(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_rest_param(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_retry(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_return(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_return0(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_rparen(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_sclass(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_semicolon(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_sp(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_stmts_add(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#116 - def on_stmts_new(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_string_add(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_string_concat(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_string_content(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_string_dvar(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_string_embexpr(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_string_literal(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_super(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_symbeg(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_symbol(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_symbol_literal(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_symbols_add(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_symbols_beg(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#116 - def on_symbols_new(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_tlambda(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_tlambeg(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_top_const_field(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_top_const_ref(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_tstring_beg(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_tstring_content(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_tstring_end(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_unary(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_undef(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_unless(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_unless_mod(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_until(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_until_mod(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_var_alias(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_var_field(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_var_ref(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_vcall(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_void_stmt(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_when(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_while(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_while_mod(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_word_add(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#116 - def on_word_new(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_words_add(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_words_beg(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#116 - def on_words_new(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#140 - def on_words_sep(tok); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#123 - def on_xstring_add(list, item); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_xstring_literal(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#116 - def on_xstring_new(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_yield(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_yield0(*args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#131 - def on_zsuper(*args); end -end - -# source://actionview/lib/action_view/ripper_ast_parser.rb#147 -class ActionView::RenderParser::RipperASTParser::RenderCallExtractor < ::ActionView::RenderParser::RipperASTParser::NodeParser - # @return [RenderCallExtractor] a new instance of RenderCallExtractor - # - # source://actionview/lib/action_view/ripper_ast_parser.rb#152 - def initialize(*args); end - - # Returns the value of attribute render_calls. - # - # source://actionview/lib/action_view/ripper_ast_parser.rb#148 - def render_calls; end - - private - - # source://actionview/lib/action_view/ripper_ast_parser.rb#177 - def on_arg_paren(content); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#163 - def on_command(name, *args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#159 - def on_fcall(name, *args); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#181 - def on_paren(content); end - - # source://actionview/lib/action_view/ripper_ast_parser.rb#167 - def on_render_call(node); end -end - -# source://actionview/lib/action_view/ripper_ast_parser.rb#150 -ActionView::RenderParser::RipperASTParser::RenderCallExtractor::METHODS_TO_PARSE = T.let(T.unsafe(nil), Array) - -# = Action View \Renderer -# -# This is the main entry point for rendering. It basically delegates -# to other objects like TemplateRenderer and PartialRenderer which -# actually renders the template. -# -# The Renderer will parse the options from the +render+ or +render_body+ -# method and render a partial or a template based on the options. The -# +TemplateRenderer+ and +PartialRenderer+ objects are wrappers which do all -# the setup and logic necessary to render a view and a new object is created -# each time +render+ is called. -# -# source://actionview/lib/action_view/renderer/renderer.rb#15 -class ActionView::Renderer - # @return [Renderer] a new instance of Renderer - # - # source://actionview/lib/action_view/renderer/renderer.rb#18 - def initialize(lookup_context); end - - # source://actionview/lib/action_view/renderer/renderer.rb#58 - def cache_hits; end - - # Returns the value of attribute lookup_context. - # - # source://actionview/lib/action_view/renderer/renderer.rb#16 - def lookup_context; end - - # Sets the attribute lookup_context - # - # @param value the value to set the attribute lookup_context to. - # - # source://actionview/lib/action_view/renderer/renderer.rb#16 - def lookup_context=(_arg0); end + # source://actionview/lib/action_view/renderer/renderer.rb#16 + def lookup_context=(_arg0); end # Main render entry point shared by Action View and Action Controller. # @@ -13881,32 +14132,25 @@ class ActionView::Renderer # source://actionview/lib/action_view/renderer/renderer.rb#40 def render_body(context, options); end - # Direct access to partial rendering. - # - # source://actionview/lib/action_view/renderer/renderer.rb#54 + # source://actionview/lib/action_view/renderer/renderer.rb#48 def render_partial(context, options, &block); end - # source://actionview/lib/action_view/renderer/renderer.rb#66 - def render_partial_to_object(context, options, &block); end - - # Direct access to template rendering. - # - # source://actionview/lib/action_view/renderer/renderer.rb#49 - def render_template(context, options); end - - # source://actionview/lib/action_view/renderer/renderer.rb#62 - def render_template_to_object(context, options); end - # source://actionview/lib/action_view/renderer/renderer.rb#27 def render_to_object(context, options); end private - # source://actionview/lib/action_view/renderer/renderer.rb#109 + # source://actionview/lib/action_view/renderer/renderer.rb#103 def collection_from_object(object); end - # source://actionview/lib/action_view/renderer/renderer.rb#102 + # source://actionview/lib/action_view/renderer/renderer.rb#96 def collection_from_options(options); end + + # source://actionview/lib/action_view/renderer/renderer.rb#61 + def render_partial_to_object(context, options, &block); end + + # source://actionview/lib/action_view/renderer/renderer.rb#57 + def render_template_to_object(context, options); end end # source://actionview/lib/action_view/rendering.rb#26 @@ -13928,9 +14172,6 @@ module ActionView::Rendering # source://actionview/lib/action_view/rendering.rb#119 def render_to_body(options = T.unsafe(nil)); end - # Returns the value of attribute rendered_format. - # - # source://actionview/lib/action_view/rendering.rb#30 def rendered_format; end # An instance of a view class. The default view class is ActionView::Base. @@ -13960,22 +14201,22 @@ module ActionView::Rendering # Normalize args by converting render "foo" to render action: "foo" and # render "foo/bar" to render template: "foo/bar". # - # source://actionview/lib/action_view/rendering.rb#152 + # source://actionview/lib/action_view/rendering.rb#153 def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end - # Normalize options. - # - # source://actionview/lib/action_view/rendering.rb#176 - def _normalize_options(options); end - # Assign the rendered format to look up context. # - # source://actionview/lib/action_view/rendering.rb#145 + # source://actionview/lib/action_view/rendering.rb#146 def _process_format(format); end + # Normalize options. + # + # source://actionview/lib/action_view/rendering.rb#177 + def _process_render_template_options(options); end + # Find and render a template based on the options given. # - # source://actionview/lib/action_view/rendering.rb#126 + # source://actionview/lib/action_view/rendering.rb#127 def _render_template(options); end end @@ -14004,36 +14245,34 @@ end # = Action View Resolver # -# source://actionview/lib/action_view/template/resolver.rb#12 +# source://actionview/lib/action_view/template/resolver.rb#11 class ActionView::Resolver - include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor - - # source://actionview/lib/action_view/template/resolver.rb#72 + # source://actionview/lib/action_view/template/resolver.rb#69 def all_template_paths; end - # source://actionview/lib/action_view/template/resolver.rb#67 + # source://actionview/lib/action_view/template/resolver.rb#64 def built_templates; end - # source://actionview/lib/action_view/template/resolver.rb#53 + # source://actionview/lib/action_view/template/resolver.rb#50 def caching; end - # source://actionview/lib/action_view/template/resolver.rb#53 + # source://actionview/lib/action_view/template/resolver.rb#50 def caching=(val); end - # source://actionview/lib/action_view/template/resolver.rb#82 - def caching?(&block); end + # source://actionview/lib/action_view/template/resolver.rb#79 + def caching?(&_arg0); end - # source://actionview/lib/action_view/template/resolver.rb#59 + # source://actionview/lib/action_view/template/resolver.rb#56 def clear_cache; end # Normalizes the arguments and passes it on to find_templates. # - # source://actionview/lib/action_view/template/resolver.rb#63 + # source://actionview/lib/action_view/template/resolver.rb#60 def find_all(name, prefix = T.unsafe(nil), partial = T.unsafe(nil), details = T.unsafe(nil), key = T.unsafe(nil), locals = T.unsafe(nil)); end private - # source://actionview/lib/action_view/template/resolver.rb#78 + # source://actionview/lib/action_view/template/resolver.rb#75 def _find_all(name, prefix, partial, details, key, locals); end # This is what child classes implement. No defaults are needed @@ -14042,31 +14281,31 @@ class ActionView::Resolver # # @raise [NotImplementedError] # - # source://actionview/lib/action_view/template/resolver.rb#87 + # source://actionview/lib/action_view/template/resolver.rb#84 def find_templates(name, prefix, partial, details, locals = T.unsafe(nil)); end class << self - # source://actionview/lib/action_view/template/resolver.rb#53 + # source://actionview/lib/action_view/template/resolver.rb#50 def caching; end - # source://actionview/lib/action_view/template/resolver.rb#53 + # source://actionview/lib/action_view/template/resolver.rb#50 def caching=(val); end - # source://actionview/lib/action_view/template/resolver.rb#53 + # source://actionview/lib/action_view/template/resolver.rb#50 def caching?; end end end -# source://actionview/lib/action_view/template/resolver.rb#15 +# source://actionview/lib/action_view/template/resolver.rb#12 class ActionView::Resolver::PathParser - # source://actionview/lib/action_view/template/resolver.rb#18 + # source://actionview/lib/action_view/template/resolver.rb#15 def build_path_regex; end - # source://actionview/lib/action_view/template/resolver.rb#39 + # source://actionview/lib/action_view/template/resolver.rb#36 def parse(path); end end -# source://actionview/lib/action_view/template/resolver.rb#16 +# source://actionview/lib/action_view/template/resolver.rb#13 class ActionView::Resolver::PathParser::ParsedPath < ::Struct # Returns the value of attribute details # @@ -14103,7 +14342,7 @@ end module ActionView::RoutingUrlFor include ::ActionDispatch::Routing::PolymorphicRoutes - # source://actionpack/7.1.3.3lib/action_dispatch/routing/url_for.rb#99 + # source://actionpack/8.0.0.beta1lib/action_dispatch/routing/url_for.rb#102 def default_url_options=(val); end # Returns the URL for the set of +options+ provided. This takes the @@ -14205,7 +14444,7 @@ module ActionView::RoutingUrlFor def optimize_routes_generation?; end class << self - # source://actionpack/7.1.3.3lib/action_dispatch/routing/url_for.rb#99 + # source://actionpack/8.0.0.beta1lib/action_dispatch/routing/url_for.rb#102 def default_url_options=(val); end end end @@ -14286,18 +14525,18 @@ end # * Support streaming from child templates, partials and so on. # * Rack::Cache needs to support streaming bodies # -# source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#13 +# source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#12 class ActionView::StreamingTemplateRenderer < ::ActionView::TemplateRenderer # For streaming, instead of rendering a given a template, we return a Body # object that responds to each. This object is initialized with a block # that knows how to render the template. # - # source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#45 + # source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#44 def render_template(view, template, layout_name = T.unsafe(nil), locals = T.unsafe(nil)); end private - # source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#57 + # source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#56 def delayed_render(buffer, template, layout, view, locals); end end @@ -14305,21 +14544,21 @@ end # It is initialized with a block that, when called, starts # rendering the template. # -# source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#14 +# source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#13 class ActionView::StreamingTemplateRenderer::Body # @return [Body] a new instance of Body # - # source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#15 + # source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#14 def initialize(&start); end - # source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#19 + # source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#18 def each(&block); end private # This is the same logging logic as in ShowExceptions middleware. # - # source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#31 + # source://actionview/lib/action_view/renderer/streaming_template_renderer.rb#30 def log_error(exception); end end @@ -14339,14 +14578,14 @@ end # = Action View \Template # -# source://actionview/lib/action_view/template.rb#8 +# source://actionview/lib/action_view/template.rb#7 class ActionView::Template extend ::ActiveSupport::Autoload extend ::ActionView::Template::Handlers # @return [Template] a new instance of Template # - # source://actionview/lib/action_view/template.rb#186 + # source://actionview/lib/action_view/template.rb#199 def initialize(source, identifier, handler, locals:, format: T.unsafe(nil), variant: T.unsafe(nil), virtual_path: T.unsafe(nil)); end # This method is responsible for properly setting the encoding of the @@ -14359,44 +14598,44 @@ class ActionView::Template # before passing the source on to the template engine, leaving a # blank line in its stead. # - # source://actionview/lib/action_view/template.rb#297 + # source://actionview/lib/action_view/template.rb#311 def encode!; end # Returns the value of attribute format. # - # source://actionview/lib/action_view/template.rb#182 + # source://actionview/lib/action_view/template.rb#195 def format; end # Returns the value of attribute handler. # - # source://actionview/lib/action_view/template.rb#181 + # source://actionview/lib/action_view/template.rb#194 def handler; end # Returns the value of attribute identifier. # - # source://actionview/lib/action_view/template.rb#181 + # source://actionview/lib/action_view/template.rb#194 def identifier; end - # source://actionview/lib/action_view/template.rb#276 + # source://actionview/lib/action_view/template.rb#290 def inspect; end # The locals this template has been or will be compiled for, or nil if this # is a strict locals template. # - # source://actionview/lib/action_view/template.rb#210 + # source://actionview/lib/action_view/template.rb#223 def locals; end # Exceptions are marshalled when using the parallel test runner with DRb, so we need # to ensure that references to the template object can be marshalled as well. This means forgoing # the marshalling of the compiler mutex and instantiating that again on unmarshalling. # - # source://actionview/lib/action_view/template.rb#363 + # source://actionview/lib/action_view/template.rb#377 def marshal_dump; end - # source://actionview/lib/action_view/template.rb#367 + # source://actionview/lib/action_view/template.rb#381 def marshal_load(array); end - # source://actionview/lib/action_view/template.rb#372 + # source://actionview/lib/action_view/template.rb#386 def method_name; end # Render a template. If the template was not compiled yet, it is done @@ -14406,16 +14645,16 @@ class ActionView::Template # we use a bang in this instrumentation because you don't want to # consume this in production. This is only slow if it's being listened to. # - # source://actionview/lib/action_view/template.rb#248 + # source://actionview/lib/action_view/template.rb#261 def render(view, locals, buffer = T.unsafe(nil), implicit_locals: T.unsafe(nil), add_to_stack: T.unsafe(nil), &block); end - # source://actionview/lib/action_view/template.rb#272 + # source://actionview/lib/action_view/template.rb#286 def short_identifier; end - # source://actionview/lib/action_view/template.rb#280 + # source://actionview/lib/action_view/template.rb#294 def source; end - # source://actionview/lib/action_view/template.rb#218 + # source://actionview/lib/action_view/template.rb#231 def spot(location); end # This method is responsible for marking a template as having strict locals @@ -14428,14 +14667,14 @@ class ActionView::Template # Strict locals are useful for validating template arguments and for # specifying defaults. # - # source://actionview/lib/action_view/template.rb#342 + # source://actionview/lib/action_view/template.rb#356 def strict_locals!; end # Returns whether a template is using strict locals. # # @return [Boolean] # - # source://actionview/lib/action_view/template.rb#356 + # source://actionview/lib/action_view/template.rb#370 def strict_locals?; end # Returns whether the underlying handler supports streaming. If so, @@ -14443,31 +14682,31 @@ class ActionView::Template # # @return [Boolean] # - # source://actionview/lib/action_view/template.rb#238 + # source://actionview/lib/action_view/template.rb#251 def supports_streaming?; end # Translate an error location returned by ErrorHighlight to the correct # source location inside the template. # - # source://actionview/lib/action_view/template.rb#228 + # source://actionview/lib/action_view/template.rb#241 def translate_location(backtrace_location, spot); end - # source://actionview/lib/action_view/template.rb#268 + # source://actionview/lib/action_view/template.rb#282 def type; end # Returns the value of attribute variable. # - # source://actionview/lib/action_view/template.rb#182 + # source://actionview/lib/action_view/template.rb#195 def variable; end # Returns the value of attribute variant. # - # source://actionview/lib/action_view/template.rb#182 + # source://actionview/lib/action_view/template.rb#195 def variant; end # Returns the value of attribute virtual_path. # - # source://actionview/lib/action_view/template.rb#182 + # source://actionview/lib/action_view/template.rb#195 def virtual_path; end private @@ -14484,54 +14723,54 @@ class ActionView::Template # In general, this means that templates will be UTF-8 inside of Rails, # regardless of the original source encoding. # - # source://actionview/lib/action_view/template.rb#472 + # source://actionview/lib/action_view/template.rb#490 def compile(mod); end # Compile a template. This method ensures a template is compiled # just once and removes the source after it is compiled. # - # source://actionview/lib/action_view/template.rb#394 + # source://actionview/lib/action_view/template.rb#408 def compile!(view); end # This method compiles the source of the template. The compilation of templates # involves setting strict_locals! if applicable, encoding the template, and setting # frozen string literal. # - # source://actionview/lib/action_view/template.rb#419 + # source://actionview/lib/action_view/template.rb#433 def compiled_source; end - # source://actionview/lib/action_view/template.rb#381 + # source://actionview/lib/action_view/template.rb#395 def find_node_by_id(node, node_id); end - # source://actionview/lib/action_view/template.rb#518 + # source://actionview/lib/action_view/template.rb#539 def handle_render_error(view, e); end - # source://actionview/lib/action_view/template.rb#540 + # source://actionview/lib/action_view/template.rb#564 def identifier_method_name; end - # source://actionview/lib/action_view/template.rb#544 + # source://actionview/lib/action_view/template.rb#568 def instrument(action, &block); end - # source://actionview/lib/action_view/template.rb#552 + # source://actionview/lib/action_view/template.rb#576 def instrument_payload; end - # source://actionview/lib/action_view/template.rb#548 + # source://actionview/lib/action_view/template.rb#572 def instrument_render_template(&block); end - # source://actionview/lib/action_view/template.rb#527 + # source://actionview/lib/action_view/template.rb#551 def locals_code; end - # source://actionview/lib/action_view/template.rb#510 + # source://actionview/lib/action_view/template.rb#531 def offset; end class << self - # source://actionview/lib/action_view/template.rb#167 + # source://actionview/lib/action_view/template.rb#180 def frozen_string_literal; end - # source://actionview/lib/action_view/template.rb#167 + # source://actionview/lib/action_view/template.rb#180 def frozen_string_literal=(_arg0); end - # source://actionview/lib/action_view/template.rb#171 + # source://actionview/lib/action_view/template.rb#184 def mime_types_implementation=(implementation); end end end @@ -14683,11 +14922,11 @@ class ActionView::Template::Handlers::Builder def require_engine; end class << self - # source://actionview/lib/action_view/template/handlers/builder.rb#6 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_format; end - # source://actionview/lib/action_view/template/handlers/builder.rb#6 - def default_format=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_format=(new_value); end # source://actionview/lib/action_view/template/handlers/builder.rb#6 def default_format?; end @@ -14765,38 +15004,38 @@ class ActionView::Template::Handlers::ERB # source://actionview/lib/action_view/template/handlers/erb.rb#29 def call(template, source); end - # source://actionview/lib/action_view/template/handlers/erb.rb#17 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def erb_implementation; end - # source://actionview/lib/action_view/template/handlers/erb.rb#17 - def erb_implementation=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def erb_implementation=(new_value); end # source://actionview/lib/action_view/template/handlers/erb.rb#17 def erb_implementation?; end - # source://actionview/lib/action_view/template/handlers/erb.rb#14 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def erb_trim_mode; end - # source://actionview/lib/action_view/template/handlers/erb.rb#14 - def erb_trim_mode=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def erb_trim_mode=(new_value); end # source://actionview/lib/action_view/template/handlers/erb.rb#14 def erb_trim_mode?; end - # source://actionview/lib/action_view/template/handlers/erb.rb#20 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def escape_ignore_list; end - # source://actionview/lib/action_view/template/handlers/erb.rb#20 - def escape_ignore_list=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def escape_ignore_list=(new_value); end # source://actionview/lib/action_view/template/handlers/erb.rb#20 def escape_ignore_list?; end - # source://actionview/lib/action_view/template/handlers/erb.rb#23 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def strip_trailing_newlines; end - # source://actionview/lib/action_view/template/handlers/erb.rb#23 - def strip_trailing_newlines=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def strip_trailing_newlines=(new_value); end # source://actionview/lib/action_view/template/handlers/erb.rb#23 def strip_trailing_newlines?; end @@ -14861,12 +15100,15 @@ end # source://actionview/lib/action_view/template/inline.rb#8 ActionView::Template::Inline::Finalizer = T.let(T.unsafe(nil), Proc) -# source://actionview/lib/action_view/template.rb#284 +# source://actionview/lib/action_view/template.rb#298 ActionView::Template::LEADING_ENCODING_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://actionview/lib/action_view/template.rb#184 +# source://actionview/lib/action_view/template.rb#197 ActionView::Template::NONE = T.let(T.unsafe(nil), Object) +# source://actionview/lib/action_view/template.rb#548 +ActionView::Template::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) + # = Action View RawFile Template # # source://actionview/lib/action_view/template/raw_file.rb#6 @@ -14904,7 +15146,7 @@ class ActionView::Template::Renderable # source://actionview/lib/action_view/template/renderable.rb#7 def initialize(renderable); end - # source://actionview/lib/action_view/template/renderable.rb#19 + # source://actionview/lib/action_view/template/renderable.rb#25 def format; end # source://actionview/lib/action_view/template/renderable.rb#11 @@ -14914,7 +15156,7 @@ class ActionView::Template::Renderable def render(context, *args); end end -# source://actionview/lib/action_view/template.rb#11 +# source://actionview/lib/action_view/template.rb#10 ActionView::Template::STRICT_LOCALS_REGEX = T.let(T.unsafe(nil), Regexp) # SimpleType is mostly just a stub implementation for when Action View @@ -15012,7 +15254,7 @@ class ActionView::Template::Text def type=(_arg0); end end -# source://actionview/lib/action_view/template.rb#176 +# source://actionview/lib/action_view/template.rb#189 ActionView::Template::Types = Mime # source://actionview/lib/action_view/template_details.rb#4 @@ -15249,7 +15491,6 @@ class ActionView::TestCase < ::ActiveSupport::TestCase include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions include ::ActionDispatch::Assertions - include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor include ::AbstractController::Helpers include ::ActiveSupport::Benchmarkable include ::ActionView::Helpers::ActiveModelHelper @@ -15294,13 +15535,13 @@ class ActionView::TestCase < ::ActiveSupport::TestCase extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods extend ::ActionView::TestCase::Behavior::ClassMethods - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#13 def _helper_methods; end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#13 def _helper_methods=(_arg0); end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#13 def _helper_methods?; end # source://actionview/lib/action_view/helpers/translation_helper.rb#18 @@ -15310,28 +15551,31 @@ class ActionView::TestCase < ::ActiveSupport::TestCase def debug_missing_translation=(val); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _helper_methods; end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 - def _helper_methods=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _helper_methods=(new_value); end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#13 def _helper_methods?; end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#16 + # source://actionpack/8.0.0.beta1lib/abstract_controller/helpers.rb#17 def _helpers; end - # source://actionview/lib/action_view/test_case.rb#201 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def content_class; end - # source://actionview/lib/action_view/test_case.rb#201 - def content_class=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def content_class=(new_value); end - # source://actionview/lib/action_view/test_case.rb#201 + # source://actionview/lib/action_view/test_case.rb#200 def content_class?; end # source://actionview/lib/action_view/helpers/translation_helper.rb#18 @@ -15378,42 +15622,8 @@ module ActionView::TestCase::Behavior mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods mixes_in_class_methods ::ActionView::TestCase::Behavior::ClassMethods - # source://actionview/lib/action_view/test_case.rb#298 - def _routes; end - - # source://actionview/lib/action_view/test_case.rb#233 - def config; end - - # Returns the value of attribute controller. - # - # source://actionview/lib/action_view/test_case.rb#63 - def controller; end - - # Sets the attribute controller - # - # @param value the value to set the attribute controller to. - # - # source://actionview/lib/action_view/test_case.rb#63 - def controller=(_arg0); end - - # source://actionview/lib/action_view/test_case.rb#62 - def lookup_context(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute output_buffer. - # - # source://actionview/lib/action_view/test_case.rb#63 - def output_buffer; end - - # Sets the attribute output_buffer + # :method: rendered # - # @param value the value to set the attribute output_buffer to. - # - # source://actionview/lib/action_view/test_case.rb#63 - def output_buffer=(_arg0); end - - # source://actionview/lib/action_view/test_case.rb#237 - def render(options = T.unsafe(nil), local_assigns = T.unsafe(nil), &block); end - # Returns the content rendered by the last +render+ call. # # The returned object behaves like a string but also exposes a number of methods @@ -15462,10 +15672,55 @@ module ActionView::TestCase::Behavior # assert_pattern { rendered.json => { title: "Hello, world" } } # end # - # source://actionview/lib/action_view/test_case.rb#294 + # source://actionview/lib/action_view/test_case.rb#297 + def _routes; end + + # source://actionview/lib/action_view/test_case.rb#232 + def config; end + + # Returns the value of attribute controller. + # + # source://actionview/lib/action_view/test_case.rb#63 + def controller; end + + # Sets the attribute controller + # + # @param value the value to set the attribute controller to. + # + # source://actionview/lib/action_view/test_case.rb#63 + def controller=(_arg0); end + + # source://actionview/lib/action_view/test_case.rb#62 + def lookup_context(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute output_buffer. + # + # source://actionview/lib/action_view/test_case.rb#63 + def output_buffer; end + + # Sets the attribute output_buffer + # + # @param value the value to set the attribute output_buffer to. + # + # source://actionview/lib/action_view/test_case.rb#63 + def output_buffer=(_arg0); end + + # source://actionview/lib/action_view/test_case.rb#236 + def render(options = T.unsafe(nil), local_assigns = T.unsafe(nil), &block); end + + # Returns the value of attribute rendered. + # + # source://actionview/lib/action_view/test_case.rb#63 def rendered; end - # source://actionview/lib/action_view/test_case.rb#243 + # Sets the attribute rendered + # + # @param value the value to set the attribute rendered to. + # + # source://actionview/lib/action_view/test_case.rb#63 + def rendered=(_arg0); end + + # source://actionview/lib/action_view/test_case.rb#242 def rendered_views; end # Returns the value of attribute request. @@ -15480,35 +15735,35 @@ module ActionView::TestCase::Behavior # source://actionview/lib/action_view/test_case.rb#63 def request=(_arg0); end - # source://actionview/lib/action_view/test_case.rb#221 + # source://actionview/lib/action_view/test_case.rb#220 def setup_with_controller; end private - # source://actionview/lib/action_view/test_case.rb#405 + # source://actionview/lib/action_view/test_case.rb#404 def _user_defined_ivars; end # The instance of ActionView::Base that is used by +render+. # - # source://actionview/lib/action_view/test_case.rb#357 + # source://actionview/lib/action_view/test_case.rb#356 def _view; end # Need to experiment if this priority is the best one: rendered => output_buffer # - # source://actionview/lib/action_view/test_case.rb#333 + # source://actionview/lib/action_view/test_case.rb#332 def document_root_element; end - # source://actionview/lib/action_view/test_case.rb#419 - def method_missing(selector, *args, **_arg2); end + # source://actionview/lib/action_view/test_case.rb#418 + def method_missing(selector, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # - # source://actionview/lib/action_view/test_case.rb#436 + # source://actionview/lib/action_view/test_case.rb#434 def respond_to_missing?(name, include_private = T.unsafe(nil)); end # The instance of ActionView::Base that is used by +render+. # - # source://actionview/lib/action_view/test_case.rb#357 + # source://actionview/lib/action_view/test_case.rb#356 def view; end # Returns a Hash of instance variables and their values, as defined by @@ -15516,7 +15771,7 @@ module ActionView::TestCase::Behavior # rendered. This is generally intended for internal use and extension # frameworks. # - # source://actionview/lib/action_view/test_case.rb#413 + # source://actionview/lib/action_view/test_case.rb#412 def view_assigns; end module GeneratedClassMethods @@ -15540,14 +15795,14 @@ module ActionView::TestCase::Behavior::ClassMethods # source://actionview/lib/action_view/test_case.rb#164 def determine_default_helper_class(name); end - # source://actionview/lib/action_view/test_case.rb#184 + # source://actionview/lib/action_view/test_case.rb#183 def helper_class; end # Sets the attribute helper_class # # @param value the value to set the attribute helper_class to. # - # source://actionview/lib/action_view/test_case.rb#182 + # source://actionview/lib/action_view/test_case.rb#181 def helper_class=(_arg0); end # source://actionview/lib/action_view/test_case.rb#170 @@ -15556,7 +15811,7 @@ module ActionView::TestCase::Behavior::ClassMethods # source://actionview/lib/action_view/test_case.rb#66 def inherited(descendant); end - # source://actionview/lib/action_view/test_case.rb#188 + # source://actionview/lib/action_view/test_case.rb#187 def new(*_arg0); end # Register a callable to parse rendered content for a given template @@ -15637,32 +15892,32 @@ module ActionView::TestCase::Behavior::ClassMethods private - # source://actionview/lib/action_view/test_case.rb#194 + # source://actionview/lib/action_view/test_case.rb#193 def include_helper_modules!; end end -# source://actionview/lib/action_view/test_case.rb#370 +# source://actionview/lib/action_view/test_case.rb#369 ActionView::TestCase::Behavior::INTERNAL_IVARS = T.let(T.unsafe(nil), Array) -# source://actionview/lib/action_view/test_case.rb#337 +# source://actionview/lib/action_view/test_case.rb#336 module ActionView::TestCase::Behavior::Locals - # source://actionview/lib/action_view/test_case.rb#340 + # source://actionview/lib/action_view/test_case.rb#339 def render(options = T.unsafe(nil), local_assigns = T.unsafe(nil)); end # Returns the value of attribute rendered_views. # - # source://actionview/lib/action_view/test_case.rb#338 + # source://actionview/lib/action_view/test_case.rb#337 def rendered_views; end # Sets the attribute rendered_views # # @param value the value to set the attribute rendered_views to. # - # source://actionview/lib/action_view/test_case.rb#338 + # source://actionview/lib/action_view/test_case.rb#337 def rendered_views=(_arg0); end end -# source://actionview/lib/action_view/test_case.rb#302 +# source://actionview/lib/action_view/test_case.rb#301 class ActionView::TestCase::Behavior::RenderedViewContent < ::String # source://actionview/lib/action_view/test_case.rb#150 def html; end @@ -15673,34 +15928,34 @@ end # Need to experiment if this priority is the best one: rendered => output_buffer # -# source://actionview/lib/action_view/test_case.rb#306 +# source://actionview/lib/action_view/test_case.rb#305 class ActionView::TestCase::Behavior::RenderedViewsCollection # @return [RenderedViewsCollection] a new instance of RenderedViewsCollection # - # source://actionview/lib/action_view/test_case.rb#307 + # source://actionview/lib/action_view/test_case.rb#306 def initialize; end - # source://actionview/lib/action_view/test_case.rb#311 + # source://actionview/lib/action_view/test_case.rb#310 def add(view, locals); end - # source://actionview/lib/action_view/test_case.rb#316 + # source://actionview/lib/action_view/test_case.rb#315 def locals_for(view); end - # source://actionview/lib/action_view/test_case.rb#320 + # source://actionview/lib/action_view/test_case.rb#319 def rendered_views; end # @return [Boolean] # - # source://actionview/lib/action_view/test_case.rb#324 + # source://actionview/lib/action_view/test_case.rb#323 def view_rendered?(view, expected_locals); end end # source://actionview/lib/action_view/test_case.rb#0 module ActionView::TestCase::HelperMethods - # source://actionview/lib/action_view/test_case.rb#215 + # source://actionview/lib/action_view/test_case.rb#214 def _test_case; end - # source://actionview/lib/action_view/test_case.rb#211 + # source://actionview/lib/action_view/test_case.rb#210 def protect_against_forgery?; end end @@ -15755,7 +16010,7 @@ class ActionView::TestCase::TestController < ::ActionController::Base private - # source://actionview/lib/action_view/layouts.rb#330 + # source://actionview/lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end class << self @@ -15772,8 +16027,11 @@ class ActionView::TestCase::TestController < ::ActionController::Base # source://actionview/lib/action_view/test_case.rb#23 def controller_path=(_arg0); end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end diff --git a/sorbet/rbi/gems/activejob@7.1.3.3.rbi b/sorbet/rbi/gems/activejob@8.0.0.beta1.rbi similarity index 83% rename from sorbet/rbi/gems/activejob@7.1.3.3.rbi rename to sorbet/rbi/gems/activejob@8.0.0.beta1.rbi index ba3fb187..b73f8c7d 100644 --- a/sorbet/rbi/gems/activejob@7.1.3.3.rbi +++ b/sorbet/rbi/gems/activejob@8.0.0.beta1.rbi @@ -6,7 +6,7 @@ # :markup: markdown -# :include: activejob/README.md +# :include: ../README.md # # source://activejob/lib/active_job/gem_version.rb#3 module ActiveJob @@ -28,19 +28,19 @@ module ActiveJob # Queue adapters may communicate the enqueue status of each job by setting # successfully_enqueued and/or enqueue_error on the passed-in job instances. # - # source://activejob/lib/active_job/enqueuing.rb#16 + # source://activejob/lib/active_job/enqueuing.rb#14 def perform_all_later(*jobs); end - # source://activejob/lib/active_job.rb#53 + # source://activejob/lib/active_job.rb#52 def use_big_decimal_serializer; end - # source://activejob/lib/active_job.rb#53 - def use_big_decimal_serializer=(_arg0); end + # source://activejob/lib/active_job.rb#58 + def use_big_decimal_serializer=(value); end - # source://activejob/lib/active_job.rb#61 + # source://activejob/lib/active_job.rb#69 def verbose_enqueue_logs; end - # source://activejob/lib/active_job.rb#61 + # source://activejob/lib/active_job.rb#69 def verbose_enqueue_logs=(_arg0); end # Returns the currently loaded version of Active Job as a +Gem::Version+. @@ -77,41 +77,41 @@ module ActiveJob::Arguments private - # source://activejob/lib/active_job/arguments.rb#201 + # source://activejob/lib/active_job/arguments.rb#190 def convert_to_global_id_hash(argument); end # @return [Boolean] # - # source://activejob/lib/active_job/arguments.rb#148 + # source://activejob/lib/active_job/arguments.rb#137 def custom_serialized?(hash); end - # source://activejob/lib/active_job/arguments.rb#119 + # source://activejob/lib/active_job/arguments.rb#110 def deserialize_argument(argument); end - # source://activejob/lib/active_job/arguments.rb#144 + # source://activejob/lib/active_job/arguments.rb#133 def deserialize_global_id(hash); end - # source://activejob/lib/active_job/arguments.rb#158 + # source://activejob/lib/active_job/arguments.rb#147 def deserialize_hash(serialized_hash); end # source://activejob/lib/active_job/arguments.rb#71 def serialize_argument(argument); end - # source://activejob/lib/active_job/arguments.rb#152 + # source://activejob/lib/active_job/arguments.rb#141 def serialize_hash(argument); end - # source://activejob/lib/active_job/arguments.rb#171 + # source://activejob/lib/active_job/arguments.rb#160 def serialize_hash_key(key); end - # source://activejob/lib/active_job/arguments.rb#182 + # source://activejob/lib/active_job/arguments.rb#171 def serialize_indifferent_hash(indifferent_hash); end # @return [Boolean] # - # source://activejob/lib/active_job/arguments.rb#140 + # source://activejob/lib/active_job/arguments.rb#129 def serialized_global_id?(hash); end - # source://activejob/lib/active_job/arguments.rb#188 + # source://activejob/lib/active_job/arguments.rb#177 def transform_symbol_keys(hash, symbol_keys); end end @@ -209,22 +209,19 @@ class ActiveJob::Base extend ::ActiveJob::Exceptions::ClassMethods extend ::ActiveJob::TestHelper::TestQueueAdapter::ClassMethods - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _enqueue_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _perform_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_enqueue_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_perform_callbacks(&block); end # source://activejob/lib/active_job/exceptions.rb#12 @@ -236,14 +233,14 @@ class ActiveJob::Base # source://activejob/lib/active_job/exceptions.rb#12 def after_discard_procs?; end - # source://activejob/lib/active_job/logging.rb#11 + # source://activejob/lib/active_job/logging.rb#15 def logger; end - # source://activejob/lib/active_job/logging.rb#11 + # source://activejob/lib/active_job/logging.rb#15 def logger=(val); end - # source://activejob/lib/active_job/queue_adapter.rb#26 - def queue_adapter(&block); end + # source://activejob/lib/active_job/queue_adapter.rb#27 + def queue_adapter(&_arg0); end # source://activejob/lib/active_job/queue_name.rb#57 def queue_name_prefix; end @@ -254,129 +251,132 @@ class ActiveJob::Base # source://activejob/lib/active_job/queue_name.rb#57 def queue_name_prefix?; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _enqueue_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _enqueue_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _perform_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _perform_callbacks=(value); end - # source://activejob/lib/active_job/queue_adapter.rb#24 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _queue_adapter; end - # source://activejob/lib/active_job/queue_adapter.rb#24 - def _queue_adapter=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _queue_adapter=(new_value); end - # source://activejob/lib/active_job/queue_adapter.rb#23 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _queue_adapter_name; end - # source://activejob/lib/active_job/queue_adapter.rb#23 - def _queue_adapter_name=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _queue_adapter_name=(new_value); end - # source://activejob/lib/active_job/test_helper.rb#19 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _test_adapter; end - # source://activejob/lib/active_job/test_helper.rb#19 - def _test_adapter=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _test_adapter=(new_value); end - # source://activejob/lib/active_job/exceptions.rb#12 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def after_discard_procs; end - # source://activejob/lib/active_job/exceptions.rb#12 - def after_discard_procs=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def after_discard_procs=(new_value); end # source://activejob/lib/active_job/exceptions.rb#12 def after_discard_procs?; end - # source://activejob/lib/active_job/logging.rb#12 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def enqueue_after_transaction_commit; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def enqueue_after_transaction_commit=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def log_arguments; end - # source://activejob/lib/active_job/logging.rb#12 - def log_arguments=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def log_arguments=(new_value); end - # source://activejob/lib/active_job/logging.rb#12 + # source://activejob/lib/active_job/logging.rb#26 def log_arguments?; end - # source://activejob/lib/active_job/logging.rb#11 + # source://activejob/lib/active_job/logging.rb#15 def logger; end - # source://activejob/lib/active_job/logging.rb#11 + # source://activejob/lib/active_job/logging.rb#15 def logger=(val); end - # source://activejob/lib/active_job/queue_priority.rb#49 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def priority; end - # source://activejob/lib/active_job/queue_priority.rb#49 - def priority=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def priority=(new_value); end # source://activejob/lib/active_job/queue_priority.rb#49 def priority?; end - # source://activejob/lib/active_job/queue_name.rb#55 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def queue_name; end - # source://activejob/lib/active_job/queue_name.rb#55 - def queue_name=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end # source://activejob/lib/active_job/queue_name.rb#55 def queue_name?; end - # source://activejob/lib/active_job/queue_name.rb#56 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def queue_name_delimiter; end - # source://activejob/lib/active_job/queue_name.rb#56 - def queue_name_delimiter=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def queue_name_delimiter=(new_value); end # source://activejob/lib/active_job/queue_name.rb#56 def queue_name_delimiter?; end - # source://activejob/lib/active_job/queue_name.rb#57 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def queue_name_prefix; end - # source://activejob/lib/active_job/queue_name.rb#57 - def queue_name_prefix=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def queue_name_prefix=(new_value); end # source://activejob/lib/active_job/queue_name.rb#57 def queue_name_prefix?; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 - def rescue_handlers=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://activejob/lib/active_job/exceptions.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def retry_jitter; end - # source://activejob/lib/active_job/exceptions.rb#11 - def retry_jitter=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def retry_jitter=(new_value); end end end @@ -392,9 +392,7 @@ end # * around_perform # * after_perform # -# NOTE: Calling the same callback multiple times will overwrite previous callback definitions. -# -# source://activejob/lib/active_job/callbacks.rb#21 +# source://activejob/lib/active_job/callbacks.rb#18 module ActiveJob::Callbacks extend ::ActiveSupport::Concern extend ::ActiveSupport::Callbacks @@ -407,35 +405,30 @@ module ActiveJob::Callbacks mixes_in_class_methods ::ActiveJob::Callbacks::ClassMethods class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#8 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _execute_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_execute_callbacks(&block); end end module GeneratedClassMethods def __callbacks; end def __callbacks=(value); end - def __callbacks?; end end module GeneratedInstanceMethods def __callbacks; end - def __callbacks?; end end end # These methods will be included into any Active Job object, adding # callbacks for +perform+ and +enqueue+ methods. # -# source://activejob/lib/active_job/callbacks.rb#37 +# source://activejob/lib/active_job/callbacks.rb#34 module ActiveJob::Callbacks::ClassMethods # Defines a callback that will get called right after the # job is enqueued. @@ -453,7 +446,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob/lib/active_job/callbacks.rb#144 + # source://activejob/lib/active_job/callbacks.rb#141 def after_enqueue(*filters, &blk); end # Defines a callback that will get called right after the @@ -471,7 +464,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob/lib/active_job/callbacks.rb#72 + # source://activejob/lib/active_job/callbacks.rb#69 def after_perform(*filters, &blk); end # Defines a callback that will get called around the enqueuing @@ -491,7 +484,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob/lib/active_job/callbacks.rb#165 + # source://activejob/lib/active_job/callbacks.rb#162 def around_enqueue(*filters, &blk); end # Defines a callback that will get called around the job's perform method. @@ -523,7 +516,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob/lib/active_job/callbacks.rb#105 + # source://activejob/lib/active_job/callbacks.rb#102 def around_perform(*filters, &blk); end # Defines a callback that will get called right before the @@ -541,7 +534,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob/lib/active_job/callbacks.rb#124 + # source://activejob/lib/active_job/callbacks.rb#121 def before_enqueue(*filters, &blk); end # Defines a callback that will get called right before the @@ -559,7 +552,7 @@ module ActiveJob::Callbacks::ClassMethods # end # end # - # source://activejob/lib/active_job/callbacks.rb#53 + # source://activejob/lib/active_job/callbacks.rb#50 def before_perform(*filters, &blk); end end @@ -594,12 +587,9 @@ module ActiveJob::Core # Creates a new job instance. Takes the arguments that will be # passed to the perform method. # - # source://activejob/lib/active_job/core.rb#95 + # source://activejob/lib/active_job/core.rb#93 def initialize(*arguments, **_arg1); end - # source://activejob/lib/active_job/core.rb#18 - def _scheduled_at_time; end - # Job arguments # # source://activejob/lib/active_job/core.rb#12 @@ -637,27 +627,27 @@ module ActiveJob::Core # end # end # - # source://activejob/lib/active_job/core.rb#153 + # source://activejob/lib/active_job/core.rb#150 def deserialize(job_data); end # Track any exceptions raised by the backend so callers can inspect the errors. # - # source://activejob/lib/active_job/core.rb#58 + # source://activejob/lib/active_job/core.rb#56 def enqueue_error; end # Track any exceptions raised by the backend so callers can inspect the errors. # - # source://activejob/lib/active_job/core.rb#58 + # source://activejob/lib/active_job/core.rb#56 def enqueue_error=(_arg0); end # Track when a job was enqueued # - # source://activejob/lib/active_job/core.rb#48 + # source://activejob/lib/active_job/core.rb#46 def enqueued_at; end # Track when a job was enqueued # - # source://activejob/lib/active_job/core.rb#48 + # source://activejob/lib/active_job/core.rb#46 def enqueued_at=(_arg0); end # Hash that contains the number of times this job handled errors for each specific retry_on declaration. @@ -665,7 +655,7 @@ module ActiveJob::Core # while its associated value holds the number of executions where the corresponding retry_on # declaration handled one of its listed exceptions. # - # source://activejob/lib/active_job/core.rb#39 + # source://activejob/lib/active_job/core.rb#37 def exception_executions; end # Hash that contains the number of times this job handled errors for each specific retry_on declaration. @@ -673,57 +663,57 @@ module ActiveJob::Core # while its associated value holds the number of executions where the corresponding retry_on # declaration handled one of its listed exceptions. # - # source://activejob/lib/active_job/core.rb#39 + # source://activejob/lib/active_job/core.rb#37 def exception_executions=(_arg0); end # Number of times this job has been executed (which increments on every retry, like after an exception). # - # source://activejob/lib/active_job/core.rb#33 + # source://activejob/lib/active_job/core.rb#31 def executions; end # Number of times this job has been executed (which increments on every retry, like after an exception). # - # source://activejob/lib/active_job/core.rb#33 + # source://activejob/lib/active_job/core.rb#31 def executions=(_arg0); end # Job Identifier # - # source://activejob/lib/active_job/core.rb#21 + # source://activejob/lib/active_job/core.rb#19 def job_id; end # Job Identifier # - # source://activejob/lib/active_job/core.rb#21 + # source://activejob/lib/active_job/core.rb#19 def job_id=(_arg0); end # I18n.locale to be used during the job. # - # source://activejob/lib/active_job/core.rb#42 + # source://activejob/lib/active_job/core.rb#40 def locale; end # I18n.locale to be used during the job. # - # source://activejob/lib/active_job/core.rb#42 + # source://activejob/lib/active_job/core.rb#40 def locale=(_arg0); end # Priority that the job will have (lower is more priority). # - # source://activejob/lib/active_job/core.rb#27 + # source://activejob/lib/active_job/core.rb#25 def priority=(_arg0); end # ID optionally provided by adapter # - # source://activejob/lib/active_job/core.rb#30 + # source://activejob/lib/active_job/core.rb#28 def provider_job_id; end # ID optionally provided by adapter # - # source://activejob/lib/active_job/core.rb#30 + # source://activejob/lib/active_job/core.rb#28 def provider_job_id=(_arg0); end # Queue in which the job will reside. # - # source://activejob/lib/active_job/core.rb#24 + # source://activejob/lib/active_job/core.rb#22 def queue_name=(_arg0); end # Time when the job should be performed @@ -731,13 +721,15 @@ module ActiveJob::Core # source://activejob/lib/active_job/core.rb#16 def scheduled_at; end - # source://activejob/lib/active_job/core.rb#177 - def scheduled_at=(value); end + # Time when the job should be performed + # + # source://activejob/lib/active_job/core.rb#16 + def scheduled_at=(_arg0); end # Returns a hash with the job data that can safely be passed to the # queuing adapter. # - # source://activejob/lib/active_job/core.rb#110 + # source://activejob/lib/active_job/core.rb#107 def serialize; end # Sets the attribute serialized_arguments @@ -749,57 +741,57 @@ module ActiveJob::Core # Configures the job with the given options. # - # source://activejob/lib/active_job/core.rb#168 + # source://activejob/lib/active_job/core.rb#165 def set(options = T.unsafe(nil)); end # Track whether the adapter received the job successfully. # - # source://activejob/lib/active_job/core.rb#51 + # source://activejob/lib/active_job/core.rb#49 def successfully_enqueued=(_arg0); end # @return [Boolean] # - # source://activejob/lib/active_job/core.rb#53 + # source://activejob/lib/active_job/core.rb#51 def successfully_enqueued?; end # Timezone to be used during the job. # - # source://activejob/lib/active_job/core.rb#45 + # source://activejob/lib/active_job/core.rb#43 def timezone; end # Timezone to be used during the job. # - # source://activejob/lib/active_job/core.rb#45 + # source://activejob/lib/active_job/core.rb#43 def timezone=(_arg0); end private # @return [Boolean] # - # source://activejob/lib/active_job/core.rb#213 + # source://activejob/lib/active_job/core.rb#198 def arguments_serialized?; end - # source://activejob/lib/active_job/core.rb#209 + # source://activejob/lib/active_job/core.rb#194 def deserialize_arguments(serialized_args); end - # source://activejob/lib/active_job/core.rb#198 + # source://activejob/lib/active_job/core.rb#183 def deserialize_arguments_if_needed; end - # source://activejob/lib/active_job/core.rb#205 + # source://activejob/lib/active_job/core.rb#190 def serialize_arguments(arguments); end - # source://activejob/lib/active_job/core.rb#190 + # source://activejob/lib/active_job/core.rb#175 def serialize_arguments_if_needed(arguments); end end # These methods will be included into any Active Job object, adding # helpers for de/serialization and creation of job instances. # -# source://activejob/lib/active_job/core.rb#62 +# source://activejob/lib/active_job/core.rb#60 module ActiveJob::Core::ClassMethods # Creates a new job instance from a hash created with +serialize+ # - # source://activejob/lib/active_job/core.rb#64 + # source://activejob/lib/active_job/core.rb#62 def deserialize(job_data); end # Creates a job preconfigured with the given options. You can call @@ -821,7 +813,7 @@ module ActiveJob::Core::ClassMethods # VideoJob.set(queue: :some_queue, wait_until: Time.now.tomorrow).perform_later(Video.last) # VideoJob.set(queue: :some_queue, wait: 5.minutes, priority: 10).perform_later(Video.last) # - # source://activejob/lib/active_job/core.rb#88 + # source://activejob/lib/active_job/core.rb#86 def set(options = T.unsafe(nil)); end end @@ -837,16 +829,26 @@ class ActiveJob::DeserializationError < ::StandardError def initialize; end end +# source://activejob/lib/active_job/enqueue_after_transaction_commit.rb#4 +module ActiveJob::EnqueueAfterTransactionCommit + private + + # source://activejob/lib/active_job/enqueue_after_transaction_commit.rb#6 + def raw_enqueue; end +end + # Can be raised by adapters if they wish to communicate to the caller a reason # why the adapter was unexpectedly unable to enqueue a job. # -# source://activejob/lib/active_job/enqueuing.rb#10 +# source://activejob/lib/active_job/enqueuing.rb#8 class ActiveJob::EnqueueError < ::StandardError; end -# source://activejob/lib/active_job/enqueuing.rb#42 +# source://activejob/lib/active_job/enqueuing.rb#40 module ActiveJob::Enqueuing extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActiveJob::Enqueuing::ClassMethods # Enqueues the job to be performed by the queue adapter. @@ -865,13 +867,25 @@ module ActiveJob::Enqueuing # my_job_instance.enqueue wait_until: Date.tomorrow.midnight # my_job_instance.enqueue priority: 10 # - # source://activejob/lib/active_job/enqueuing.rb#89 + # source://activejob/lib/active_job/enqueuing.rb#113 def enqueue(options = T.unsafe(nil)); end + + private + + # source://activejob/lib/active_job/enqueuing.rb#129 + def raw_enqueue; end + + module GeneratedClassMethods + def enqueue_after_transaction_commit; end + def enqueue_after_transaction_commit=(value); end + end + + module GeneratedInstanceMethods; end end # Includes the +perform_later+ method for job initialization. # -# source://activejob/lib/active_job/enqueuing.rb#46 +# source://activejob/lib/active_job/enqueuing.rb#58 module ActiveJob::Enqueuing::ClassMethods # Push a job onto the queue. By default the arguments must be either String, # Integer, Float, NilClass, TrueClass, FalseClass, BigDecimal, Symbol, Date, @@ -881,19 +895,31 @@ module ActiveJob::Enqueuing::ClassMethods # custom serializers. # # Returns an instance of the job class queued with arguments available in - # Job#arguments or false if the enqueue did not succeed. + # Job#arguments or +false+ if the enqueue did not succeed. # # After the attempted enqueue, the job will be yielded to an optional block. # + # If Active Job is used conjointly with Active Record, and #perform_later is called + # inside an Active Record transaction, then the enqueue is implicitly deferred to after + # the transaction is committed, or dropped if it's rolled back. In such case #perform_later + # will return the job instance like if it was successfully enqueued, but will still return + # +false+ if a callback prevented the job from being enqueued. + # + # This behavior can be changed on a per job basis: + # + # class NotificationJob < ApplicationJob + # self.enqueue_after_transaction_commit = false + # end + # # @yield [job] # - # source://activejob/lib/active_job/enqueuing.rb#58 + # source://activejob/lib/active_job/enqueuing.rb#82 def perform_later(*_arg0, **_arg1, &_arg2); end private - # source://activejob/lib/active_job/enqueuing.rb#68 - def job_or_instantiate(*args, **_arg1); end + # source://activejob/lib/active_job/enqueuing.rb#92 + def job_or_instantiate(*args, **_arg1, &_); end end # Provides behavior for retrying and discarding jobs on exceptions. @@ -929,21 +955,21 @@ module ActiveJob::Exceptions # end # end # - # source://activejob/lib/active_job/exceptions.rb#157 + # source://activejob/lib/active_job/exceptions.rb#151 def retry_job(options = T.unsafe(nil)); end private - # source://activejob/lib/active_job/exceptions.rb#167 + # source://activejob/lib/active_job/exceptions.rb#161 def determine_delay(seconds_or_duration_or_algorithm:, executions:, jitter: T.unsafe(nil)); end - # source://activejob/lib/active_job/exceptions.rb#188 + # source://activejob/lib/active_job/exceptions.rb#182 def determine_jitter_for_delay(delay, jitter); end - # source://activejob/lib/active_job/exceptions.rb#193 + # source://activejob/lib/active_job/exceptions.rb#187 def executions_for(exceptions); end - # source://activejob/lib/active_job/exceptions.rb#202 + # source://activejob/lib/active_job/exceptions.rb#196 def run_after_discard_procs(exception); end module GeneratedClassMethods @@ -976,7 +1002,7 @@ module ActiveJob::Exceptions::ClassMethods # # end # - # source://activejob/lib/active_job/exceptions.rb#130 + # source://activejob/lib/active_job/exceptions.rb#124 def after_discard(&blk); end # Discard the job with no attempts to retry, if the exception is raised. This is useful when the subject of the job, @@ -984,7 +1010,7 @@ module ActiveJob::Exceptions::ClassMethods # # You can also pass a block that'll be invoked. This block is yielded with the job instance as the first and the error instance as the second parameter. # - # `retry_on` and `discard_on` handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for + # +retry_on+ and +discard_on+ handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for # which exception.is_a?(klass) holds true is the one invoked, if any. # # ==== Example @@ -1001,7 +1027,7 @@ module ActiveJob::Exceptions::ClassMethods # end # end # - # source://activejob/lib/active_job/exceptions.rb#109 + # source://activejob/lib/active_job/exceptions.rb#103 def discard_on(*exceptions); end # Catch the exception and reschedule job for re-execution after so many seconds, for a specific number of attempts. @@ -1012,7 +1038,7 @@ module ActiveJob::Exceptions::ClassMethods # You can also pass a block that'll be invoked if the retry attempts fail for custom logic rather than letting # the exception bubble up. This block is yielded with the job instance as the first and the error instance as the second parameter. # - # `retry_on` and `discard_on` handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for + # +retry_on+ and +discard_on+ handlers are searched from bottom to top, and up the class hierarchy. The handler of the first class for # which exception.is_a?(klass) holds true is the one invoked, if any. # # ==== Options @@ -1020,8 +1046,8 @@ module ActiveJob::Exceptions::ClassMethods # as a computing proc that takes the number of executions so far as an argument, or as a symbol reference of # :polynomially_longer, which applies the wait algorithm of ((executions**4) + (Kernel.rand * (executions**4) * jitter)) + 2 # (first wait ~3s, then ~18s, then ~83s, etc) - # * :attempts - Re-enqueues the job the specified number of times (default: 5 attempts) or a symbol reference of :unlimited - # to retry the job until it succeeds + # * :attempts - Enqueues the job the specified number of times (default: 5 attempts) or a symbol reference of :unlimited + # to retry the job until it succeeds. The number of attempts includes the original job execution. # * :queue - Re-enqueues the job on a different queue # * :priority - Re-enqueues the job with a different priority # * :jitter - A random delay of wait time used when calculating backoff. The default is 15% (0.15) which represents the upper bound of possible wait time (expressed as a percentage) @@ -1055,7 +1081,7 @@ module ActiveJob::Exceptions::ClassMethods def retry_on(*exceptions, wait: T.unsafe(nil), attempts: T.unsafe(nil), queue: T.unsafe(nil), priority: T.unsafe(nil), jitter: T.unsafe(nil)); end end -# source://activejob/lib/active_job/exceptions.rb#164 +# source://activejob/lib/active_job/exceptions.rb#158 ActiveJob::Exceptions::JITTER_DEFAULT = T.let(T.unsafe(nil), Object) # = Active Job \Execution @@ -1065,7 +1091,7 @@ ActiveJob::Exceptions::JITTER_DEFAULT = T.let(T.unsafe(nil), Object) # {rescue_from}[rdoc-ref:ActiveSupport::Rescuable::ClassMethods#rescue_from] # are handled. # -# source://activejob/lib/active_job/execution.rb#13 +# source://activejob/lib/active_job/execution.rb#12 module ActiveJob::Execution extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -1075,7 +1101,7 @@ module ActiveJob::Execution mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods mixes_in_class_methods ::ActiveJob::Execution::ClassMethods - # source://activejob/lib/active_job/execution.rb#61 + # source://activejob/lib/active_job/execution.rb#60 def perform(*_arg0); end # Performs the job immediately. The job is not sent to the queuing adapter @@ -1090,12 +1116,12 @@ module ActiveJob::Execution # # puts MyJob.new(*args).perform_now # => "Hello World!" # - # source://activejob/lib/active_job/execution.rb#46 + # source://activejob/lib/active_job/execution.rb#45 def perform_now; end private - # source://activejob/lib/active_job/execution.rb#66 + # source://activejob/lib/active_job/execution.rb#65 def _perform_job; end module GeneratedClassMethods @@ -1113,16 +1139,16 @@ end # Includes methods for executing and performing jobs instantly. # -# source://activejob/lib/active_job/execution.rb#18 +# source://activejob/lib/active_job/execution.rb#17 module ActiveJob::Execution::ClassMethods - # source://activejob/lib/active_job/execution.rb#27 + # source://activejob/lib/active_job/execution.rb#26 def execute(job_data); end # Performs the job immediately. # # MyJob.perform_now("mike") # - # source://activejob/lib/active_job/execution.rb#23 + # source://activejob/lib/active_job/execution.rb#22 def perform_now(*_arg0, **_arg1, &_arg2); end end @@ -1185,15 +1211,15 @@ class ActiveJob::LogSubscriber < ::ActiveSupport::LogSubscriber # source://activejob/lib/active_job/log_subscriber.rb#145 def args_info(job); end - # source://activejob/lib/active_job/log_subscriber.rb#203 + # source://activejob/lib/active_job/log_subscriber.rb#200 + def enqueue_source_location; end + + # source://activejob/lib/active_job/log_subscriber.rb#217 def enqueued_jobs_message(adapter, enqueued_jobs); end # source://activejob/lib/active_job/log_subscriber.rb#183 def error(progname = T.unsafe(nil), &block); end - # source://activejob/lib/active_job/log_subscriber.rb#199 - def extract_enqueue_source_location(locations); end - # source://activejob/lib/active_job/log_subscriber.rb#154 def format(arg); end @@ -1213,17 +1239,20 @@ class ActiveJob::LogSubscriber < ::ActiveSupport::LogSubscriber def scheduled_at(event); end class << self - # source://activejob/lib/active_job/log_subscriber.rb#7 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def backtrace_cleaner; end - # source://activejob/lib/active_job/log_subscriber.rb#7 - def backtrace_cleaner=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def backtrace_cleaner=(new_value); end # source://activejob/lib/active_job/log_subscriber.rb#7 def backtrace_cleaner?; end - # source://activesupport/7.1.3.3lib/active_support/log_subscriber.rb#87 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def log_levels; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end end end @@ -1234,17 +1263,17 @@ module ActiveJob::Logging mixes_in_class_methods GeneratedClassMethods - # source://activejob/lib/active_job/logging.rb#17 + # source://activejob/lib/active_job/logging.rb#31 def perform_now; end private # @return [Boolean] # - # source://activejob/lib/active_job/logging.rb#31 + # source://activejob/lib/active_job/logging.rb#45 def logger_tagged_by_active_job?; end - # source://activejob/lib/active_job/logging.rb#22 + # source://activejob/lib/active_job/logging.rb#36 def tag_logger(*tags, &block); end module GeneratedClassMethods @@ -1259,9 +1288,10 @@ end # = Active Job Queue adapter # # The +ActiveJob::QueueAdapter+ module is used to load the -# correct adapter. The default queue adapter is the +:async+ queue. +# correct adapter. The default queue adapter is +:async+, +# which loads the ActiveJob::QueueAdapters::AsyncAdapter. # -# source://activejob/lib/active_job/queue_adapter.rb#19 +# source://activejob/lib/active_job/queue_adapter.rb#20 module ActiveJob::QueueAdapter extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -1281,19 +1311,19 @@ end # Includes the setter method for changing the active queue adapter. # -# source://activejob/lib/active_job/queue_adapter.rb#32 +# source://activejob/lib/active_job/queue_adapter.rb#31 module ActiveJob::QueueAdapter::ClassMethods # Returns the backend queue provider. The default queue adapter - # is the +:async+ queue. See QueueAdapters for more information. + # is +:async+. See QueueAdapters for more information. # - # source://activejob/lib/active_job/queue_adapter.rb#35 + # source://activejob/lib/active_job/queue_adapter.rb#34 def queue_adapter; end # Specify the backend queue provider. The default queue adapter # is the +:async+ queue. See QueueAdapters for more # information. # - # source://activejob/lib/active_job/queue_adapter.rb#48 + # source://activejob/lib/active_job/queue_adapter.rb#49 def queue_adapter=(name_or_adapter); end # Returns string denoting the name of the configured queue adapter. @@ -1304,16 +1334,16 @@ module ActiveJob::QueueAdapter::ClassMethods private - # source://activejob/lib/active_job/queue_adapter.rb#64 + # source://activejob/lib/active_job/queue_adapter.rb#66 def assign_adapter(adapter_name, queue_adapter); end # @return [Boolean] # - # source://activejob/lib/active_job/queue_adapter.rb#71 + # source://activejob/lib/active_job/queue_adapter.rb#73 def queue_adapter?(object); end end -# source://activejob/lib/active_job/queue_adapter.rb#69 +# source://activejob/lib/active_job/queue_adapter.rb#71 ActiveJob::QueueAdapter::ClassMethods::QUEUE_ADAPTER_METHODS = T.let(T.unsafe(nil), Array) # = Active Job adapters @@ -1327,7 +1357,6 @@ ActiveJob::QueueAdapter::ClassMethods::QUEUE_ADAPTER_METHODS = T.let(T.unsafe(ni # * {Resque}[https://github.com/resque/resque] # * {Sidekiq}[https://sidekiq.org] # * {Sneakers}[https://github.com/jondot/sneakers] -# * {Sucker Punch}[https://github.com/brandonhilkert/sucker_punch] # * Please Note: We are not accepting pull requests for new adapters. See the {README}[link:files/activejob/README_md.html] for more details. # # For testing and development Active Job has three built-in adapters: @@ -1347,7 +1376,6 @@ ActiveJob::QueueAdapter::ClassMethods::QUEUE_ADAPTER_METHODS = T.let(T.unsafe(ni # | Resque | Yes | Yes | Yes (Gem) | Queue | Global | Yes | # | Sidekiq | Yes | Yes | Yes | Queue | No | Job | # | Sneakers | Yes | Yes | No | Queue | Queue | No | -# | Sucker Punch | Yes | Yes | Yes | No | No | No | # | Active Job Async | Yes | Yes | Yes | No | No | No | # | Active Job Inline | No | Yes | N/A | N/A | N/A | N/A | # | Active Job Test | No | Yes | N/A | N/A | N/A | N/A | @@ -1426,7 +1454,7 @@ ActiveJob::QueueAdapter::ClassMethods::QUEUE_ADAPTER_METHODS = T.let(T.unsafe(ni # N/A: The adapter does not run in a separate process, and therefore doesn't # support retries. # -# source://activejob/lib/active_job/queue_adapters.rb#114 +# source://activejob/lib/active_job/queue_adapters.rb#112 module ActiveJob::QueueAdapters extend ::ActiveSupport::Autoload @@ -1436,14 +1464,42 @@ module ActiveJob::QueueAdapters # ActiveJob::QueueAdapters.lookup(:sidekiq) # # => ActiveJob::QueueAdapters::SidekiqAdapter # - # source://activejob/lib/active_job/queue_adapters.rb#137 + # source://activejob/lib/active_job/queue_adapters.rb#135 def lookup(name); end end end -# source://activejob/lib/active_job/queue_adapters.rb#129 +# source://activejob/lib/active_job/queue_adapters.rb#127 ActiveJob::QueueAdapters::ADAPTER = T.let(T.unsafe(nil), String) +# = Active Job Abstract Adapter +# +# Active Job supports multiple job queue systems. ActiveJob::QueueAdapters::AbstractAdapter +# forms the abstraction layer which makes this possible. +# +# source://activejob/lib/active_job/queue_adapters/abstract_adapter.rb#9 +class ActiveJob::QueueAdapters::AbstractAdapter + # @raise [NotImplementedError] + # + # source://activejob/lib/active_job/queue_adapters/abstract_adapter.rb#18 + def enqueue(job); end + + # Defines whether enqueuing should happen implicitly to after commit when called + # from inside a transaction. Most adapters should return true, but some adapters + # that use the same database as Active Record and are transaction aware can return + # false to continue enqueuing jobs as part of the transaction. + # + # @return [Boolean] + # + # source://activejob/lib/active_job/queue_adapters/abstract_adapter.rb#14 + def enqueue_after_transaction_commit?; end + + # @raise [NotImplementedError] + # + # source://activejob/lib/active_job/queue_adapters/abstract_adapter.rb#22 + def enqueue_at(job, timestamp); end +end + # = Active Job Async adapter # # The Async adapter runs jobs with an in-process thread pool. @@ -1469,7 +1525,7 @@ ActiveJob::QueueAdapters::ADAPTER = T.let(T.unsafe(nil), String) # short-lived jobs. Fine for dev/test; bad for production. # # source://activejob/lib/active_job/queue_adapters/async_adapter.rb#33 -class ActiveJob::QueueAdapters::AsyncAdapter +class ActiveJob::QueueAdapters::AsyncAdapter < ::ActiveJob::QueueAdapters::AbstractAdapter # See {Concurrent::ThreadPoolExecutor}[https://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/ThreadPoolExecutor.html] for executor options. # # @return [AsyncAdapter] a new instance of AsyncAdapter @@ -1557,13 +1613,18 @@ ActiveJob::QueueAdapters::AsyncAdapter::Scheduler::DEFAULT_EXECUTOR_OPTIONS = T. # Rails.application.config.active_job.queue_adapter = :inline # # source://activejob/lib/active_job/queue_adapters/inline_adapter.rb#13 -class ActiveJob::QueueAdapters::InlineAdapter - # source://activejob/lib/active_job/queue_adapters/inline_adapter.rb#14 +class ActiveJob::QueueAdapters::InlineAdapter < ::ActiveJob::QueueAdapters::AbstractAdapter + # source://activejob/lib/active_job/queue_adapters/inline_adapter.rb#18 def enqueue(job); end + # @return [Boolean] + # + # source://activejob/lib/active_job/queue_adapters/inline_adapter.rb#14 + def enqueue_after_transaction_commit?; end + # @raise [NotImplementedError] # - # source://activejob/lib/active_job/queue_adapters/inline_adapter.rb#18 + # source://activejob/lib/active_job/queue_adapters/inline_adapter.rb#22 def enqueue_at(*_arg0); end end @@ -1578,7 +1639,12 @@ end # Rails.application.config.active_job.queue_adapter = :test # # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#14 -class ActiveJob::QueueAdapters::TestAdapter +class ActiveJob::QueueAdapters::TestAdapter < ::ActiveJob::QueueAdapters::AbstractAdapter + # @return [TestAdapter] a new instance of TestAdapter + # + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#18 + def initialize(enqueue_after_transaction_commit: T.unsafe(nil)); end + # Returns the value of attribute at. # # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#15 @@ -1591,15 +1657,32 @@ class ActiveJob::QueueAdapters::TestAdapter # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#15 def at=(_arg0); end - # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#28 + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#36 def enqueue(job); end - # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#33 + # Returns the value of attribute enqueue_after_transaction_commit. + # + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#15 + def enqueue_after_transaction_commit; end + + # Sets the attribute enqueue_after_transaction_commit + # + # @param value the value to set the attribute enqueue_after_transaction_commit to. + # + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#15 + def enqueue_after_transaction_commit=(_arg0); end + + # @return [Boolean] + # + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#22 + def enqueue_after_transaction_commit?; end + + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#41 def enqueue_at(job, timestamp); end # Provides a store of all the enqueued jobs with the TestAdapter so you can check them. # - # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#19 + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#27 def enqueued_jobs; end # Sets the attribute enqueued_jobs @@ -1647,7 +1730,7 @@ class ActiveJob::QueueAdapters::TestAdapter # Provides a store of all the performed jobs with the TestAdapter so you can check them. # - # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#24 + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#32 def performed_jobs; end # Sets the attribute performed_jobs @@ -1683,33 +1766,33 @@ class ActiveJob::QueueAdapters::TestAdapter private - # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#79 + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#87 def filter_as_proc(filter); end # @return [Boolean] # - # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#57 + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#65 def filtered?(job); end # @return [Boolean] # - # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#71 + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#79 def filtered_job_class?(job); end # @return [Boolean] # - # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#65 + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#73 def filtered_queue?(job); end # @return [Boolean] # - # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#61 + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#69 def filtered_time?(job); end - # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#39 + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#47 def job_to_hash(job, extras = T.unsafe(nil)); end - # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#48 + # source://activejob/lib/active_job/queue_adapters/test_adapter.rb#56 def perform_or_enqueue(perform, job, job_data); end end @@ -2031,7 +2114,7 @@ end # end # end # -# source://activejob/lib/active_job/serializers/object_serializer.rb#24 +# source://activejob/lib/active_job/serializers/object_serializer.rb#26 class ActiveJob::Serializers::ObjectSerializer include ::Singleton extend ::Singleton::SingletonClassMethods @@ -2040,19 +2123,19 @@ class ActiveJob::Serializers::ObjectSerializer # # @raise [NotImplementedError] # - # source://activejob/lib/active_job/serializers/object_serializer.rb#42 + # source://activejob/lib/active_job/serializers/object_serializer.rb#44 def deserialize(json); end # Serializes an argument to a JSON primitive type. # - # source://activejob/lib/active_job/serializers/object_serializer.rb#37 + # source://activejob/lib/active_job/serializers/object_serializer.rb#39 def serialize(hash); end # Determines if an argument should be serialized by a serializer. # # @return [Boolean] # - # source://activejob/lib/active_job/serializers/object_serializer.rb#32 + # source://activejob/lib/active_job/serializers/object_serializer.rb#34 def serialize?(argument); end private @@ -2061,17 +2144,17 @@ class ActiveJob::Serializers::ObjectSerializer # # @raise [NotImplementedError] # - # source://activejob/lib/active_job/serializers/object_serializer.rb#48 + # source://activejob/lib/active_job/serializers/object_serializer.rb#50 def klass; end class << self - # source://activejob/lib/active_job/serializers/object_serializer.rb#28 + # source://activejob/lib/active_job/serializers/object_serializer.rb#30 def deserialize(*_arg0, **_arg1, &_arg2); end - # source://activejob/lib/active_job/serializers/object_serializer.rb#28 + # source://activejob/lib/active_job/serializers/object_serializer.rb#30 def serialize(*_arg0, **_arg1, &_arg2); end - # source://activejob/lib/active_job/serializers/object_serializer.rb#28 + # source://activejob/lib/active_job/serializers/object_serializer.rb#30 def serialize?(*_arg0, **_arg1, &_arg2); end private @@ -2160,7 +2243,7 @@ end module ActiveJob::TestHelper include ::ActiveSupport::Testing::Assertions - # source://activejob/lib/active_job/test_helper.rb#53 + # source://activejob/lib/active_job/test_helper.rb#56 def after_teardown; end # Asserts that the number of enqueued jobs matches the given number. @@ -2217,7 +2300,7 @@ module ActiveJob::TestHelper # end # end # - # source://activejob/lib/active_job/test_helper.rb#120 + # source://activejob/lib/active_job/test_helper.rb#122 def assert_enqueued_jobs(number, only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end # Asserts that the job has been enqueued with the given arguments. @@ -2273,7 +2356,7 @@ module ActiveJob::TestHelper # end # end # - # source://activejob/lib/active_job/test_helper.rb#396 + # source://activejob/lib/active_job/test_helper.rb#406 def assert_enqueued_with(job: T.unsafe(nil), args: T.unsafe(nil), at: T.unsafe(nil), queue: T.unsafe(nil), priority: T.unsafe(nil), &block); end # Asserts that no jobs have been enqueued. @@ -2323,7 +2406,7 @@ module ActiveJob::TestHelper # # assert_enqueued_jobs 0, &block # - # source://activejob/lib/active_job/test_helper.rb#182 + # source://activejob/lib/active_job/test_helper.rb#186 def assert_no_enqueued_jobs(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end # Asserts that no jobs have been performed. @@ -2379,7 +2462,7 @@ module ActiveJob::TestHelper # # assert_performed_jobs 0, &block # - # source://activejob/lib/active_job/test_helper.rb#340 + # source://activejob/lib/active_job/test_helper.rb#348 def assert_no_performed_jobs(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end # Asserts that the number of performed jobs matches the given number. @@ -2469,7 +2552,7 @@ module ActiveJob::TestHelper # end # end # - # source://activejob/lib/active_job/test_helper.rb#272 + # source://activejob/lib/active_job/test_helper.rb#278 def assert_performed_jobs(number, only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end # Asserts that the job has been performed with the given arguments. @@ -2529,7 +2612,7 @@ module ActiveJob::TestHelper # end # end # - # source://activejob/lib/active_job/test_helper.rb#498 + # source://activejob/lib/active_job/test_helper.rb#510 def assert_performed_with(job: T.unsafe(nil), args: T.unsafe(nil), at: T.unsafe(nil), queue: T.unsafe(nil), priority: T.unsafe(nil), &block); end # source://activejob/lib/active_job/test_helper.rb#41 @@ -2603,7 +2686,7 @@ module ActiveJob::TestHelper # If queue_adapter_for_test is overridden to return a different adapter, # +perform_enqueued_jobs+ will merely execute the block. # - # source://activejob/lib/active_job/test_helper.rb#606 + # source://activejob/lib/active_job/test_helper.rb#620 def perform_enqueued_jobs(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), at: T.unsafe(nil), &block); end # source://activejob/lib/active_job/test_helper.rb#9 @@ -2618,7 +2701,7 @@ module ActiveJob::TestHelper # assert_instance_of CustomQueueAdapter, HelloJob.queue_adapter # end # - # source://activejob/lib/active_job/test_helper.rb#644 + # source://activejob/lib/active_job/test_helper.rb#661 def queue_adapter; end # Returns a queue adapter instance to use with all Active Job test helpers. @@ -2626,52 +2709,55 @@ module ActiveJob::TestHelper # Override this method to specify a different adapter. The adapter must # implement the same interface as ActiveJob::QueueAdapters::TestAdapter. # - # source://activejob/lib/active_job/test_helper.rb#63 + # source://activejob/lib/active_job/test_helper.rb#66 def queue_adapter_for_test; end private - # source://activejob/lib/active_job/test_helper.rb#653 + # source://activejob/lib/active_job/test_helper.rb#676 def clear_enqueued_jobs; end - # source://activejob/lib/active_job/test_helper.rb#657 + # source://activejob/lib/active_job/test_helper.rb#680 def clear_performed_jobs; end - # source://activejob/lib/active_job/test_helper.rb#722 + # source://activejob/lib/active_job/test_helper.rb#745 def deserialize_args_for_assertion(job); end - # source://activejob/lib/active_job/test_helper.rb#693 + # source://activejob/lib/active_job/test_helper.rb#716 def enqueued_jobs_with(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), at: T.unsafe(nil), &block); end - # source://activejob/lib/active_job/test_helper.rb#687 + # source://activejob/lib/active_job/test_helper.rb#710 def filter_as_proc(filter); end - # source://activejob/lib/active_job/test_helper.rb#701 + # source://activejob/lib/active_job/test_helper.rb#724 def flush_enqueued_jobs(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), at: T.unsafe(nil)); end - # source://activejob/lib/active_job/test_helper.rb#729 + # source://activejob/lib/active_job/test_helper.rb#752 def instantiate_job(payload, skip_deserialize_arguments: T.unsafe(nil)); end - # source://activejob/lib/active_job/test_helper.rb#661 + # source://activejob/lib/active_job/test_helper.rb#684 def jobs_with(jobs, only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), at: T.unsafe(nil)); end - # source://activejob/lib/active_job/test_helper.rb#697 + # source://activejob/lib/active_job/test_helper.rb#720 def performed_jobs_with(only: T.unsafe(nil), except: T.unsafe(nil), queue: T.unsafe(nil), &block); end - # source://activejob/lib/active_job/test_helper.rb#709 + # source://activejob/lib/active_job/test_helper.rb#732 def prepare_args_for_assertion(args); end - # source://activejob/lib/active_job/test_helper.rb#736 + # source://activejob/lib/active_job/test_helper.rb#759 def queue_adapter_changed_jobs; end + # source://activejob/lib/active_job/test_helper.rb#666 + def require_active_job_test_adapter!(method); end + # @return [Boolean] # - # source://activejob/lib/active_job/test_helper.rb#649 + # source://activejob/lib/active_job/test_helper.rb#672 def using_test_adapter?; end # @raise [ArgumentError] # - # source://activejob/lib/active_job/test_helper.rb#743 + # source://activejob/lib/active_job/test_helper.rb#766 def validate_option(only: T.unsafe(nil), except: T.unsafe(nil)); end end diff --git a/sorbet/rbi/gems/activemodel@7.1.3.3.rbi b/sorbet/rbi/gems/activemodel@8.0.0.beta1.rbi similarity index 94% rename from sorbet/rbi/gems/activemodel@7.1.3.3.rbi rename to sorbet/rbi/gems/activemodel@8.0.0.beta1.rbi index 84ea8a2f..f1ac313b 100644 --- a/sorbet/rbi/gems/activemodel@7.1.3.3.rbi +++ b/sorbet/rbi/gems/activemodel@8.0.0.beta1.rbi @@ -5,7 +5,7 @@ # Please instead update this file by running `bin/tapioca gem activemodel`. -# :include: activemodel/README.rdoc +# :include: ../README.rdoc # # source://activemodel/lib/active_model/gem_version.rb#3 module ActiveModel @@ -138,7 +138,6 @@ module ActiveModel::API module GeneratedClassMethods def __callbacks; end def __callbacks=(value); end - def __callbacks?; end def _validators; end def _validators=(value); end def _validators?; end @@ -149,7 +148,6 @@ module ActiveModel::API module GeneratedInstanceMethods def __callbacks; end - def __callbacks?; end def _validators; end def _validators?; end def param_delimiter=(value); end @@ -469,6 +467,29 @@ module ActiveModel::AttributeAssignment # source://activemodel/lib/active_model/attribute_assignment.rb#28 def assign_attributes(new_attributes); end + # Like `BasicObject#method_missing`, `#attribute_writer_missing` is invoked + # when `#assign_attributes` is passed an unknown attribute name. + # + # By default, `#attribute_writer_missing` raises an UnknownAttributeError. + # + # class Rectangle + # include ActiveModel::AttributeAssignment + # + # attr_accessor :length, :width + # + # def attribute_writer_missing(name, value) + # Rails.logger.warn "Tried to assign to unknown attribute #{name}" + # end + # end + # + # rectangle = Rectangle.new + # rectangle.assign_attributes(height: 10) # => Logs "Tried to assign to unknown attribute 'height'" + # + # @raise [UnknownAttributeError] + # + # source://activemodel/lib/active_model/attribute_assignment.rb#56 + def attribute_writer_missing(name, value); end + # Allows you to set all the attributes by passing in a hash of attributes with # keys matching the attribute names. # @@ -494,10 +515,10 @@ module ActiveModel::AttributeAssignment private - # source://activemodel/lib/active_model/attribute_assignment.rb#46 + # source://activemodel/lib/active_model/attribute_assignment.rb#67 def _assign_attribute(k, v); end - # source://activemodel/lib/active_model/attribute_assignment.rb#40 + # source://activemodel/lib/active_model/attribute_assignment.rb#61 def _assign_attributes(attributes); end end @@ -561,8 +582,8 @@ module ActiveModel::AttributeMethods # attribute method. If so, we tell +attribute_missing+ to dispatch the # attribute. This method can be overloaded to customize the behavior. # - # source://activemodel/lib/active_model/attribute_methods.rb#498 - def attribute_missing(match, *args, **_arg2, &block); end + # source://activemodel/lib/active_model/attribute_methods.rb#520 + def attribute_missing(match, *_arg1, **_arg2, &_arg3); end # Allows access to the object attributes, which are held in the hash # returned by attributes, as though they were first-class @@ -575,12 +596,12 @@ module ActiveModel::AttributeMethods # class belonging to the +clients+ table with a +master_id+ foreign key # can instantiate master through Client#master. # - # source://activemodel/lib/active_model/attribute_methods.rb#484 - def method_missing(method, *args, **_arg2, &block); end + # source://activemodel/lib/active_model/attribute_methods.rb#507 + def method_missing(method, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # - # source://activemodel/lib/active_model/attribute_methods.rb#507 + # source://activemodel/lib/active_model/attribute_methods.rb#528 def respond_to?(method, include_private_methods = T.unsafe(nil)); end # A +Person+ instance with a +name+ attribute can ask @@ -590,23 +611,23 @@ module ActiveModel::AttributeMethods private - # source://activemodel/lib/active_model/attribute_methods.rb#535 + # source://activemodel/lib/active_model/attribute_methods.rb#556 def _read_attribute(attr); end # @return [Boolean] # - # source://activemodel/lib/active_model/attribute_methods.rb#520 + # source://activemodel/lib/active_model/attribute_methods.rb#541 def attribute_method?(attr_name); end # Returns a struct representing the matching attribute method. # The struct's attributes are prefix, base and suffix. # - # source://activemodel/lib/active_model/attribute_methods.rb#526 + # source://activemodel/lib/active_model/attribute_methods.rb#547 def matched_attribute_method(method_name); end # @raise [ActiveModel::MissingAttributeError] # - # source://activemodel/lib/active_model/attribute_methods.rb#531 + # source://activemodel/lib/active_model/attribute_methods.rb#552 def missing_attribute(attr_name, stack); end module GeneratedClassMethods @@ -626,7 +647,7 @@ module ActiveModel::AttributeMethods end end -# source://activemodel/lib/active_model/attribute_methods.rb#539 +# source://activemodel/lib/active_model/attribute_methods.rb#560 module ActiveModel::AttributeMethods::AttrNames class << self # We want to generate the methods via module_eval rather than @@ -644,18 +665,18 @@ module ActiveModel::AttributeMethods::AttrNames # Making it frozen means that it doesn't get duped when used to # key the @attributes in read_attribute. # - # source://activemodel/lib/active_model/attribute_methods.rb#556 + # source://activemodel/lib/active_model/attribute_methods.rb#577 def define_attribute_accessor_method(owner, attr_name, writer: T.unsafe(nil)); end end end -# source://activemodel/lib/active_model/attribute_methods.rb#540 +# source://activemodel/lib/active_model/attribute_methods.rb#561 ActiveModel::AttributeMethods::AttrNames::DEF_SAFE_NAME = T.let(T.unsafe(nil), Regexp) # source://activemodel/lib/active_model/attribute_methods.rb#68 ActiveModel::AttributeMethods::CALL_COMPILABLE_REGEXP = T.let(T.unsafe(nil), Regexp) -# source://activemodel/lib/active_model/attribute_methods.rb#76 +# source://activemodel/lib/active_model/attribute_methods.rb#75 module ActiveModel::AttributeMethods::ClassMethods # Allows you to make aliases for attributes. # @@ -681,25 +702,25 @@ module ActiveModel::AttributeMethods::ClassMethods # person.name_short? # => true # person.nickname_short? # => true # - # source://activemodel/lib/active_model/attribute_methods.rb#204 + # source://activemodel/lib/active_model/attribute_methods.rb#203 def alias_attribute(new_name, old_name); end - # source://activemodel/lib/active_model/attribute_methods.rb#224 + # source://activemodel/lib/active_model/attribute_methods.rb#226 def alias_attribute_method_definition(code_generator, pattern, new_name, old_name); end - # source://activemodel/lib/active_model/attribute_methods.rb#375 + # source://activemodel/lib/active_model/attribute_methods.rb#382 def aliases_by_attribute_name; end # Returns the original name for the alias +name+ # - # source://activemodel/lib/active_model/attribute_methods.rb#258 + # source://activemodel/lib/active_model/attribute_methods.rb#245 def attribute_alias(name); end # Is +new_name+ an alias? # # @return [Boolean] # - # source://activemodel/lib/active_model/attribute_methods.rb#253 + # source://activemodel/lib/active_model/attribute_methods.rb#240 def attribute_alias?(new_name); end # Declares a method available for all attributes with the given prefix @@ -733,7 +754,7 @@ module ActiveModel::AttributeMethods::ClassMethods # person.reset_name_to_default! # person.name # => 'Default Name' # - # source://activemodel/lib/active_model/attribute_methods.rb#176 + # source://activemodel/lib/active_model/attribute_methods.rb#175 def attribute_method_affix(*affixes); end # Declares a method available for all attributes with the given prefix. @@ -767,7 +788,7 @@ module ActiveModel::AttributeMethods::ClassMethods # person.clear_name # person.name # => nil # - # source://activemodel/lib/active_model/attribute_methods.rb#107 + # source://activemodel/lib/active_model/attribute_methods.rb#106 def attribute_method_prefix(*prefixes, parameters: T.unsafe(nil)); end # Declares a method available for all attributes with the given suffix. @@ -800,7 +821,7 @@ module ActiveModel::AttributeMethods::ClassMethods # person.name # => "Bob" # person.name_short? # => true # - # source://activemodel/lib/active_model/attribute_methods.rb#141 + # source://activemodel/lib/active_model/attribute_methods.rb#140 def attribute_method_suffix(*suffixes, parameters: T.unsafe(nil)); end # Declares an attribute that should be prefixed and suffixed by @@ -832,8 +853,11 @@ module ActiveModel::AttributeMethods::ClassMethods # person.name # => "Bob" # person.name_short? # => true # - # source://activemodel/lib/active_model/attribute_methods.rb#324 - def define_attribute_method(attr_name, _owner: T.unsafe(nil)); end + # source://activemodel/lib/active_model/attribute_methods.rb#311 + def define_attribute_method(attr_name, _owner: T.unsafe(nil), as: T.unsafe(nil)); end + + # source://activemodel/lib/active_model/attribute_methods.rb#320 + def define_attribute_method_pattern(pattern, attr_name, owner:, as:, override: T.unsafe(nil)); end # Declares the attributes that should be prefixed and suffixed by # +ActiveModel::AttributeMethods+. @@ -859,13 +883,13 @@ module ActiveModel::AttributeMethods::ClassMethods # end # end # - # source://activemodel/lib/active_model/attribute_methods.rb#285 + # source://activemodel/lib/active_model/attribute_methods.rb#272 def define_attribute_methods(*attr_names); end - # source://activemodel/lib/active_model/attribute_methods.rb#212 + # source://activemodel/lib/active_model/attribute_methods.rb#211 def eagerly_generate_alias_attribute_methods(new_name, old_name); end - # source://activemodel/lib/active_model/attribute_methods.rb#218 + # source://activemodel/lib/active_model/attribute_methods.rb#217 def generate_alias_attribute_methods(code_generator, new_name, old_name); end # Removes all the previously dynamically defined methods from the class, including alias attribute methods. @@ -894,7 +918,7 @@ module ActiveModel::AttributeMethods::ClassMethods # person.name_short? # => NoMethodError # person.first_name # => NoMethodError # - # source://activemodel/lib/active_model/attribute_methods.rb#368 + # source://activemodel/lib/active_model/attribute_methods.rb#375 def undefine_attribute_methods; end private @@ -909,69 +933,75 @@ module ActiveModel::AttributeMethods::ClassMethods # significantly (in our case our test suite finishes 10% faster with # this cache). # - # source://activemodel/lib/active_model/attribute_methods.rb#408 + # source://activemodel/lib/active_model/attribute_methods.rb#417 def attribute_method_patterns_cache; end - # source://activemodel/lib/active_model/attribute_methods.rb#412 + # source://activemodel/lib/active_model/attribute_methods.rb#421 def attribute_method_patterns_matching(method_name); end + # source://activemodel/lib/active_model/attribute_methods.rb#445 + def build_mangled_name(name); end + + # source://activemodel/lib/active_model/attribute_methods.rb#455 + def define_call(code_generator, name, target_name, mangled_name, parameters, call_args, namespace:, as:); end + # Define a method `name` in `mod` that dispatches to `send` # using the given `extra` args. This falls back on `send` # if the called name cannot be compiled. # - # source://activemodel/lib/active_model/attribute_methods.rb#421 - def define_proxy_call(code_generator, name, proxy_target, parameters, *call_args, namespace:); end + # source://activemodel/lib/active_model/attribute_methods.rb#430 + def define_proxy_call(code_generator, name, proxy_target, parameters, *call_args, namespace:, as: T.unsafe(nil)); end - # source://activemodel/lib/active_model/attribute_methods.rb#391 + # source://activemodel/lib/active_model/attribute_methods.rb#400 def generated_attribute_methods; end - # source://activemodel/lib/active_model/attribute_methods.rb#380 + # source://activemodel/lib/active_model/attribute_methods.rb#387 def inherited(base); end # @return [Boolean] # - # source://activemodel/lib/active_model/attribute_methods.rb#395 + # source://activemodel/lib/active_model/attribute_methods.rb#404 def instance_method_already_implemented?(method_name); end - # source://activemodel/lib/active_model/attribute_methods.rb#387 + # source://activemodel/lib/active_model/attribute_methods.rb#396 def resolve_attribute_name(name); end end -# source://activemodel/lib/active_model/attribute_methods.rb#448 +# source://activemodel/lib/active_model/attribute_methods.rb#471 class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodPattern # @return [AttributeMethodPattern] a new instance of AttributeMethodPattern # - # source://activemodel/lib/active_model/attribute_methods.rb#453 + # source://activemodel/lib/active_model/attribute_methods.rb#476 def initialize(prefix: T.unsafe(nil), suffix: T.unsafe(nil), parameters: T.unsafe(nil)); end - # source://activemodel/lib/active_model/attribute_methods.rb#462 + # source://activemodel/lib/active_model/attribute_methods.rb#485 def match(method_name); end - # source://activemodel/lib/active_model/attribute_methods.rb#468 + # source://activemodel/lib/active_model/attribute_methods.rb#491 def method_name(attr_name); end # Returns the value of attribute parameters. # - # source://activemodel/lib/active_model/attribute_methods.rb#449 + # source://activemodel/lib/active_model/attribute_methods.rb#472 def parameters; end # Returns the value of attribute prefix. # - # source://activemodel/lib/active_model/attribute_methods.rb#449 + # source://activemodel/lib/active_model/attribute_methods.rb#472 def prefix; end # Returns the value of attribute proxy_target. # - # source://activemodel/lib/active_model/attribute_methods.rb#449 + # source://activemodel/lib/active_model/attribute_methods.rb#472 def proxy_target; end # Returns the value of attribute suffix. # - # source://activemodel/lib/active_model/attribute_methods.rb#449 + # source://activemodel/lib/active_model/attribute_methods.rb#472 def suffix; end end -# source://activemodel/lib/active_model/attribute_methods.rb#451 +# source://activemodel/lib/active_model/attribute_methods.rb#474 class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodPattern::AttributeMethod < ::Struct # Returns the value of attribute attr_name # @@ -1004,9 +1034,6 @@ class ActiveModel::AttributeMethods::ClassMethods::AttributeMethodPattern::Attri end end -# source://activemodel/lib/active_model/attribute_methods.rb#69 -ActiveModel::AttributeMethods::FORWARD_PARAMETERS = T.let(T.unsafe(nil), String) - # source://activemodel/lib/active_model/attribute_methods.rb#67 ActiveModel::AttributeMethods::NAME_COMPILABLE_REGEXP = T.let(T.unsafe(nil), Regexp) @@ -1090,64 +1117,155 @@ end # source://activemodel/lib/active_model/attribute_registration.rb#11 module ActiveModel::AttributeRegistration::ClassMethods - # source://activemodel/lib/active_model/attribute_registration.rb#22 + # source://activemodel/lib/active_model/attribute_registration.rb#31 def _default_attributes; end # source://activemodel/lib/active_model/attribute_registration.rb#12 def attribute(name, type = T.unsafe(nil), default: T.unsafe(nil), **options); end - # source://activemodel/lib/active_model/attribute_registration.rb#26 + # source://activemodel/lib/active_model/attribute_registration.rb#37 def attribute_types; end + # source://activemodel/lib/active_model/attribute_registration.rb#23 + def decorate_attributes(names = T.unsafe(nil), &decorator); end + + # source://activemodel/lib/active_model/attribute_registration.rb#43 + def type_for_attribute(attribute_name, &block); end + private - # source://activemodel/lib/active_model/attribute_registration.rb#48 - def apply_pending_attributes(attribute_set); end + # source://activemodel/lib/active_model/attribute_registration.rb#81 + def apply_pending_attribute_modifications(attribute_set); end - # source://activemodel/lib/active_model/attribute_registration.rb#58 - def build_default_attributes; end + # Hook for other modules to override. The attribute type is passed + # through this method immediately after it is resolved, before any type + # decorations are applied. + # + # source://activemodel/lib/active_model/attribute_registration.rb#112 + def hook_attribute_type(attribute, type); end - # source://activemodel/lib/active_model/attribute_registration.rb#43 - def pending_attribute(name); end + # source://activemodel/lib/active_model/attribute_registration.rb#77 + def pending_attribute_modifications; end - # source://activemodel/lib/active_model/attribute_registration.rb#62 + # source://activemodel/lib/active_model/attribute_registration.rb#91 def reset_default_attributes; end - # source://activemodel/lib/active_model/attribute_registration.rb#68 + # source://activemodel/lib/active_model/attribute_registration.rb#96 + def reset_default_attributes!; end + + # source://activemodel/lib/active_model/attribute_registration.rb#101 def resolve_attribute_name(name); end - # source://activemodel/lib/active_model/attribute_registration.rb#72 + # source://activemodel/lib/active_model/attribute_registration.rb#105 def resolve_type_name(name, **options); end end -# source://activemodel/lib/active_model/attribute_registration.rb#33 -class ActiveModel::AttributeRegistration::ClassMethods::PendingAttribute - # source://activemodel/lib/active_model/attribute_registration.rb#36 - def apply_to(attribute); end +# source://activemodel/lib/active_model/attribute_registration.rb#67 +class ActiveModel::AttributeRegistration::ClassMethods::PendingDecorator < ::Struct + # source://activemodel/lib/active_model/attribute_registration.rb#68 + def apply_to(attribute_set); end + + # Returns the value of attribute decorator + # + # @return [Object] the current value of decorator + def decorator; end + + # Sets the attribute decorator + # + # @param value [Object] the value to set the attribute decorator to. + # @return [Object] the newly set value + def decorator=(_); end + + # Returns the value of attribute names + # + # @return [Object] the current value of names + def names; end + + # Sets the attribute names + # + # @param value [Object] the value to set the attribute names to. + # @return [Object] the newly set value + def names=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://activemodel/lib/active_model/attribute_registration.rb#61 +class ActiveModel::AttributeRegistration::ClassMethods::PendingDefault < ::Struct + # source://activemodel/lib/active_model/attribute_registration.rb#62 + def apply_to(attribute_set); end - # Returns the value of attribute default. + # Returns the value of attribute default # - # source://activemodel/lib/active_model/attribute_registration.rb#34 + # @return [Object] the current value of default def default; end # Sets the attribute default # - # @param value the value to set the attribute default to. + # @param value [Object] the value to set the attribute default to. + # @return [Object] the newly set value + def default=(_); end + + # Returns the value of attribute name # - # source://activemodel/lib/active_model/attribute_registration.rb#34 - def default=(_arg0); end + # @return [Object] the current value of name + def name; end - # Returns the value of attribute type. + # Sets the attribute name # - # source://activemodel/lib/active_model/attribute_registration.rb#34 + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://activemodel/lib/active_model/attribute_registration.rb#54 +class ActiveModel::AttributeRegistration::ClassMethods::PendingType < ::Struct + # source://activemodel/lib/active_model/attribute_registration.rb#55 + def apply_to(attribute_set); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + # Returns the value of attribute type + # + # @return [Object] the current value of type def type; end # Sets the attribute type # - # @param value the value to set the attribute type to. - # - # source://activemodel/lib/active_model/attribute_registration.rb#34 - def type=(_arg0); end + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value + def type=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end end # source://activemodel/lib/active_model/attribute_set/builder.rb#6 @@ -1338,7 +1456,7 @@ module ActiveModel::Attributes mixes_in_class_methods ::ActiveModel::AttributeMethods::ClassMethods mixes_in_class_methods ::ActiveModel::Attributes::ClassMethods - # source://activemodel/lib/active_model/attributes.rb#93 + # source://activemodel/lib/active_model/attributes.rb#106 def initialize(*_arg0); end # Returns an array of attribute names as strings. @@ -1353,7 +1471,7 @@ module ActiveModel::Attributes # person = Person.new # person.attribute_names # => ["name", "age"] # - # source://activemodel/lib/active_model/attributes.rb#133 + # source://activemodel/lib/active_model/attributes.rb#146 def attribute_names; end # Returns a hash of all the attributes with their names as keys and the @@ -1372,24 +1490,24 @@ module ActiveModel::Attributes # # person.attributes # => { "name" => "Francesco", "age" => 22} # - # source://activemodel/lib/active_model/attributes.rb#118 + # source://activemodel/lib/active_model/attributes.rb#131 def attributes; end - # source://activemodel/lib/active_model/attributes.rb#137 + # source://activemodel/lib/active_model/attributes.rb#150 def freeze; end private - # source://activemodel/lib/active_model/attributes.rb#143 + # source://activemodel/lib/active_model/attributes.rb#156 def _write_attribute(attr_name, value); end - # source://activemodel/lib/active_model/attributes.rb#148 + # source://activemodel/lib/active_model/attributes.rb#161 def attribute(attr_name); end - # source://activemodel/lib/active_model/attributes.rb#143 + # source://activemodel/lib/active_model/attributes.rb#156 def attribute=(attr_name, value); end - # source://activemodel/lib/active_model/attributes.rb#98 + # source://activemodel/lib/active_model/attributes.rb#111 def initialize_dup(other); end module GeneratedClassMethods @@ -1449,8 +1567,8 @@ module ActiveModel::Attributes::ClassMethods private - # source://activemodel/lib/active_model/attributes.rb#79 - def define_method_attribute=(name, owner:); end + # source://activemodel/lib/active_model/attributes.rb#92 + def define_method_attribute=(canonical_name, owner:, as: T.unsafe(nil)); end end # +BlockValidator+ is a special +EachValidator+ which receives a block on initialization @@ -1525,7 +1643,7 @@ end # Would only create the +after_create+ and +before_create+ callback methods in # your class. # -# NOTE: Calling the same callback multiple times will overwrite previous callback definitions. +# NOTE: Defining the same callback multiple times will overwrite previous callback definitions. # # source://activemodel/lib/active_model/callbacks.rb#65 module ActiveModel::Callbacks @@ -1841,29 +1959,29 @@ module ActiveModel::Dirty # # @return [Boolean] # - # source://activemodel/lib/active_model/dirty.rb#293 + # source://activemodel/lib/active_model/dirty.rb#294 def attribute_changed?(attr_name, **options); end # @return [Boolean] # - # source://activemodel/lib/active_model/dirty.rb#360 + # source://activemodel/lib/active_model/dirty.rb#361 def attribute_changed_in_place?(attr_name); end # Dispatch target for {*_previously_changed?}[rdoc-label:method-i-2A_previously_changed-3F] attribute methods. # # @return [Boolean] # - # source://activemodel/lib/active_model/dirty.rb#303 + # source://activemodel/lib/active_model/dirty.rb#304 def attribute_previously_changed?(attr_name, **options); end # Dispatch target for {*_previously_was}[rdoc-label:method-i-2A_previously_was] attribute methods. # - # source://activemodel/lib/active_model/dirty.rb#308 + # source://activemodel/lib/active_model/dirty.rb#309 def attribute_previously_was(attr_name); end # Dispatch target for {*_was}[rdoc-label:method-i-2A_was] attribute methods. # - # source://activemodel/lib/active_model/dirty.rb#298 + # source://activemodel/lib/active_model/dirty.rb#299 def attribute_was(attr_name); end # Returns an array with the name of the attributes with unsaved changes. @@ -1872,7 +1990,7 @@ module ActiveModel::Dirty # person.name = 'bob' # person.changed # => ["name"] # - # source://activemodel/lib/active_model/dirty.rb#288 + # source://activemodel/lib/active_model/dirty.rb#289 def changed; end # Returns +true+ if any of the attributes has unsaved changes, +false+ otherwise. @@ -1883,7 +2001,7 @@ module ActiveModel::Dirty # # @return [Boolean] # - # source://activemodel/lib/active_model/dirty.rb#279 + # source://activemodel/lib/active_model/dirty.rb#280 def changed?; end # Returns a hash of the attributes with unsaved changes indicating their original @@ -1893,7 +2011,7 @@ module ActiveModel::Dirty # person.name = 'robert' # person.changed_attributes # => {"name" => "bob"} # - # source://activemodel/lib/active_model/dirty.rb#336 + # source://activemodel/lib/active_model/dirty.rb#337 def changed_attributes; end # Returns a hash of changed attributes indicating their original @@ -1903,21 +2021,21 @@ module ActiveModel::Dirty # person.name = 'bob' # person.changes # => { "name" => ["bill", "bob"] } # - # source://activemodel/lib/active_model/dirty.rb#346 + # source://activemodel/lib/active_model/dirty.rb#347 def changes; end # Clears dirty data and moves +changes+ to +previous_changes+ and # +mutations_from_database+ to +mutations_before_last_save+ respectively. # - # source://activemodel/lib/active_model/dirty.rb#265 + # source://activemodel/lib/active_model/dirty.rb#266 def changes_applied; end - # source://activemodel/lib/active_model/dirty.rb#324 + # source://activemodel/lib/active_model/dirty.rb#325 def clear_attribute_changes(attr_names); end # Clears all dirty data: current changes and previous changes. # - # source://activemodel/lib/active_model/dirty.rb#318 + # source://activemodel/lib/active_model/dirty.rb#319 def clear_changes_information; end # Returns a hash of attributes that were changed before the model was saved. @@ -1927,52 +2045,52 @@ module ActiveModel::Dirty # person.save # person.previous_changes # => {"name" => ["bob", "robert"]} # - # source://activemodel/lib/active_model/dirty.rb#356 + # source://activemodel/lib/active_model/dirty.rb#357 def previous_changes; end # Restore all previous data of the provided attributes. # - # source://activemodel/lib/active_model/dirty.rb#313 + # source://activemodel/lib/active_model/dirty.rb#314 def restore_attributes(attr_names = T.unsafe(nil)); end private # Dispatch target for *_change attribute methods. # - # source://activemodel/lib/active_model/dirty.rb#392 + # source://activemodel/lib/active_model/dirty.rb#393 def attribute_change(attr_name); end # Dispatch target for *_previous_change attribute methods. # - # source://activemodel/lib/active_model/dirty.rb#397 + # source://activemodel/lib/active_model/dirty.rb#398 def attribute_previous_change(attr_name); end # Dispatch target for *_will_change! attribute methods. # - # source://activemodel/lib/active_model/dirty.rb#402 + # source://activemodel/lib/active_model/dirty.rb#403 def attribute_will_change!(attr_name); end - # source://activemodel/lib/active_model/dirty.rb#371 + # source://activemodel/lib/active_model/dirty.rb#372 def clear_attribute_change(attr_name); end - # source://activemodel/lib/active_model/dirty.rb#383 + # source://activemodel/lib/active_model/dirty.rb#384 def forget_attribute_assignments; end - # source://activemodel/lib/active_model/dirty.rb#365 + # source://activemodel/lib/active_model/dirty.rb#366 def init_internals; end # source://activemodel/lib/active_model/dirty.rb#248 def initialize_dup(other); end - # source://activemodel/lib/active_model/dirty.rb#387 + # source://activemodel/lib/active_model/dirty.rb#388 def mutations_before_last_save; end - # source://activemodel/lib/active_model/dirty.rb#375 + # source://activemodel/lib/active_model/dirty.rb#376 def mutations_from_database; end # Dispatch target for restore_*! attribute methods. # - # source://activemodel/lib/active_model/dirty.rb#407 + # source://activemodel/lib/active_model/dirty.rb#408 def restore_attribute!(attr_name); end module GeneratedClassMethods @@ -2175,11 +2293,11 @@ class ActiveModel::Error # source://activemodel/lib/active_model/error.rb#64 def generate_message(attribute, type, base, options); end - # source://activemodel/lib/active_model/error.rb#13 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def i18n_customize_full_message; end - # source://activemodel/lib/active_model/error.rb#13 - def i18n_customize_full_message=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def i18n_customize_full_message=(new_value); end # source://activemodel/lib/active_model/error.rb#13 def i18n_customize_full_message?; end @@ -3028,7 +3146,6 @@ module ActiveModel::Model module GeneratedClassMethods def __callbacks; end def __callbacks=(value); end - def __callbacks?; end def _validators; end def _validators=(value); end def _validators?; end @@ -3039,7 +3156,6 @@ module ActiveModel::Model module GeneratedInstanceMethods def __callbacks; end - def __callbacks?; end def _validators; end def _validators?; end def param_delimiter=(value); end @@ -3477,9 +3593,13 @@ module ActiveModel::SecurePassword::ClassMethods # validations: false as an argument. This allows complete # customizability of validation behavior. # + # Finally, a password reset token that's valid for 15 minutes after issue + # is automatically configured when +reset_token+ is set to true (which it is by default) + # and the object reponds to +generates_token_for+ (which Active Records do). + # # To use +has_secure_password+, add bcrypt (~> 3.1.7) to your Gemfile: # - # gem 'bcrypt', '~> 3.1.7' + # gem "bcrypt", "~> 3.1.7" # # ==== Examples # @@ -3536,16 +3656,28 @@ module ActiveModel::SecurePassword::ClassMethods # account.is_guest = true # account.valid? # => true # - # source://activemodel/lib/active_model/secure_password.rb#101 - def has_secure_password(attribute = T.unsafe(nil), validations: T.unsafe(nil)); end + # ===== Using the password reset token + # + # user = User.create!(name: "david", password: "123", password_confirmation: "123") + # token = user.password_reset_token + # User.find_by_password_reset_token(token) # returns user + # + # # 16 minutes later... + # User.find_by_password_reset_token(token) # returns nil + # + # # raises ActiveSupport::MessageVerifier::InvalidSignature since the token is expired + # User.find_by_password_reset_token!(token) + # + # source://activemodel/lib/active_model/secure_password.rb#116 + def has_secure_password(attribute = T.unsafe(nil), validations: T.unsafe(nil), reset_token: T.unsafe(nil)); end end -# source://activemodel/lib/active_model/secure_password.rb#148 +# source://activemodel/lib/active_model/secure_password.rb#182 class ActiveModel::SecurePassword::InstanceMethodsOnActivation < ::Module # @return [InstanceMethodsOnActivation] a new instance of InstanceMethodsOnActivation # - # source://activemodel/lib/active_model/secure_password.rb#149 - def initialize(attribute); end + # source://activemodel/lib/active_model/secure_password.rb#183 + def initialize(attribute, reset_token:); end end # BCrypt hash function can handle maximum 72 bytes, and if we pass @@ -3581,8 +3713,8 @@ ActiveModel::SecurePassword::MAX_PASSWORD_LENGTH_ALLOWED = T.let(T.unsafe(nil), # An +attributes+ hash must be defined and should contain any attributes you # need to be serialized. Attributes must be strings, not symbols. # When called, serializable hash will use instance methods that match the name -# of the attributes hash's keys. In order to override this behavior, take a look -# at the private method +read_attribute_for_serialization+. +# of the attributes hash's keys. In order to override this behavior, override +# the +read_attribute_for_serialization+ method. # # ActiveModel::Serializers::JSON module automatically includes # the +ActiveModel::Serialization+ module, so there is no need to @@ -3700,7 +3832,7 @@ module ActiveModel::Serialization private - # source://activemodel/lib/active_model/serialization.rb#152 + # source://activemodel/lib/active_model/serialization.rb#170 def attribute_names_for_serialization; end # Add associations specified via the :include option. @@ -3916,12 +4048,12 @@ module ActiveModel::Translation # # Specify +options+ with additional translating options. # - # source://activemodel/lib/active_model/translation.rb#46 + # source://activemodel/lib/active_model/translation.rb#48 def human_attribute_name(attribute, options = T.unsafe(nil)); end # Returns the +i18n_scope+ for the class. Override if you want custom lookup. # - # source://activemodel/lib/active_model/translation.rb#26 + # source://activemodel/lib/active_model/translation.rb#28 def i18n_scope; end # When localizing a string, it goes through the lookup returned by this @@ -3929,11 +4061,19 @@ module ActiveModel::Translation # ActiveModel::Errors#full_messages and # ActiveModel::Translation#human_attribute_name. # - # source://activemodel/lib/active_model/translation.rb#34 + # source://activemodel/lib/active_model/translation.rb#36 def lookup_ancestors; end + + class << self + # source://activemodel/lib/active_model/translation.rb#25 + def raise_on_missing_translations; end + + # source://activemodel/lib/active_model/translation.rb#25 + def raise_on_missing_translations=(_arg0); end + end end -# source://activemodel/lib/active_model/translation.rb#38 +# source://activemodel/lib/active_model/translation.rb#40 ActiveModel::Translation::MISSING_TRANSLATION = T.let(T.unsafe(nil), Integer) # source://activemodel/lib/active_model/type/helpers/accepts_multiparameter_time.rb#4 @@ -4404,7 +4544,11 @@ module ActiveModel::Type::Helpers::TimeValue private - # source://activemodel/lib/active_model/type/helpers/time_value.rb#73 + # BUG: Wrapping the Time object with Time.at because Time.new with `in:` in Ruby 3.2.0 + # used to return an invalid Time object + # see: https://bugs.ruby-lang.org/issues/19292 + # + # source://activemodel/lib/active_model/type/helpers/time_value.rb#88 def fast_string_to_time(string); end # source://activemodel/lib/active_model/type/helpers/time_value.rb#47 @@ -4416,7 +4560,7 @@ ActiveModel::Type::Helpers::TimeValue::ISO_DATETIME = T.let(T.unsafe(nil), Regex # source://activemodel/lib/active_model/type/helpers/timezone.rb#8 module ActiveModel::Type::Helpers::Timezone - # source://activemodel/lib/active_model/type/helpers/timezone.rb#13 + # source://activemodel/lib/active_model/type/helpers/timezone.rb#17 def default_timezone; end # @return [Boolean] @@ -4588,7 +4732,7 @@ class ActiveModel::Type::Registry def initialize; end # source://activemodel/lib/active_model/type/registry.rb#23 - def lookup(symbol, *args, **_arg2); end + def lookup(symbol, *_arg1, **_arg2, &_arg3); end # source://activemodel/lib/active_model/type/registry.rb#15 def register(type_name, klass = T.unsafe(nil), &block); end @@ -4600,7 +4744,7 @@ class ActiveModel::Type::Registry # Returns the value of attribute registrations. # - # source://activemodel/lib/active_model/type/registry.rb#35 + # source://activemodel/lib/active_model/type/registry.rb#34 def registrations; end end @@ -4950,6 +5094,21 @@ ActiveModel::VERSION::STRING = T.let(T.unsafe(nil), String) # source://activemodel/lib/active_model/gem_version.rb#12 ActiveModel::VERSION::TINY = T.let(T.unsafe(nil), Integer) +# source://activemodel/lib/active_model/validations.rb#484 +class ActiveModel::ValidationContext + # Returns the value of attribute context. + # + # source://activemodel/lib/active_model/validations.rb#485 + def context; end + + # Sets the attribute context + # + # @param value the value to set the attribute context to. + # + # source://activemodel/lib/active_model/validations.rb#485 + def context=(_arg0); end +end + # = Active \Model \ValidationError # # Raised by validate! when the model is invalid. Use the @@ -4961,16 +5120,16 @@ ActiveModel::VERSION::TINY = T.let(T.unsafe(nil), Integer) # puts invalid.model.errors # end # -# source://activemodel/lib/active_model/validations.rb#460 +# source://activemodel/lib/active_model/validations.rb#474 class ActiveModel::ValidationError < ::StandardError # @return [ValidationError] a new instance of ValidationError # - # source://activemodel/lib/active_model/validations.rb#463 + # source://activemodel/lib/active_model/validations.rb#477 def initialize(model); end # Returns the value of attribute model. # - # source://activemodel/lib/active_model/validations.rb#461 + # source://activemodel/lib/active_model/validations.rb#475 def model; end end @@ -5035,9 +5194,12 @@ module ActiveModel::Validations # person.valid? # => false # person.errors # => # # - # source://activemodel/lib/active_model/validations.rb#330 + # source://activemodel/lib/active_model/validations.rb#309 def errors; end + # source://activemodel/lib/active_model/validations.rb#353 + def freeze; end + # Performs the opposite of valid?. Returns +true+ if errors were # added, +false+ otherwise. # @@ -5070,7 +5232,7 @@ module ActiveModel::Validations # # @return [Boolean] # - # source://activemodel/lib/active_model/validations.rb#402 + # source://activemodel/lib/active_model/validations.rb#389 def invalid?(context = T.unsafe(nil)); end # Hook method defining how an attribute value should be retrieved. By default @@ -5123,7 +5285,7 @@ module ActiveModel::Validations # # @return [Boolean] # - # source://activemodel/lib/active_model/validations.rb#363 + # source://activemodel/lib/active_model/validations.rb#342 def valid?(context = T.unsafe(nil)); end # Runs all the specified validations and returns +true+ if no errors were @@ -5158,7 +5320,7 @@ module ActiveModel::Validations # # @return [Boolean] # - # source://activemodel/lib/active_model/validations.rb#363 + # source://activemodel/lib/active_model/validations.rb#342 def validate(context = T.unsafe(nil)); end # Runs all the validations within the specified context. Returns +true+ if @@ -5167,7 +5329,7 @@ module ActiveModel::Validations # Validations with no :on option will run no matter the context. Validations with # some :on option will only run in the specified context. # - # source://activemodel/lib/active_model/validations.rb#411 + # source://activemodel/lib/active_model/validations.rb#398 def validate!(context = T.unsafe(nil)); end # Passes the record off to the class or classes specified and allows them @@ -5210,28 +5372,52 @@ module ActiveModel::Validations # source://activemodel/lib/active_model/validations/with.rb#144 def validates_with(*args, &block); end + # Returns the context when running validations. + # + # This is useful when running validations except a certain context (opposite to the +on+ option). + # + # class Person + # include ActiveModel::Validations + # + # attr_accessor :name + # validates :name, presence: true, if: -> { validation_context != :custom } + # end + # + # person = Person.new + # person.valid? #=> false + # person.valid?(:new) #=> false + # person.valid?(:custom) #=> true + # + # source://activemodel/lib/active_model/validations.rb#435 + def validation_context; end + private - # source://activemodel/lib/active_model/validations.rb#434 + # source://activemodel/lib/active_model/validations.rb#444 + def context_for_validation; end + + # source://activemodel/lib/active_model/validations.rb#448 def init_internals; end # Clean the +Errors+ object if instance is duped. # - # source://activemodel/lib/active_model/validations.rb#312 + # source://activemodel/lib/active_model/validations.rb#291 def initialize_dup(other); end # @raise [ValidationError] # - # source://activemodel/lib/active_model/validations.rb#445 + # source://activemodel/lib/active_model/validations.rb#459 def raise_validation_error; end - # source://activemodel/lib/active_model/validations.rb#440 + # source://activemodel/lib/active_model/validations.rb#454 def run_validations!; end + # source://activemodel/lib/active_model/validations.rb#440 + def validation_context=(context); end + module GeneratedClassMethods def __callbacks; end def __callbacks=(value); end - def __callbacks?; end def _validators; end def _validators=(value); end def _validators?; end @@ -5239,7 +5425,6 @@ module ActiveModel::Validations module GeneratedInstanceMethods def __callbacks; end - def __callbacks?; end def _validators; end def _validators?; end end @@ -5342,12 +5527,10 @@ module ActiveModel::Validations::Callbacks module GeneratedClassMethods def __callbacks; end def __callbacks=(value); end - def __callbacks?; end end module GeneratedInstanceMethods def __callbacks; end - def __callbacks?; end end end @@ -5414,7 +5597,7 @@ module ActiveModel::Validations::Callbacks::ClassMethods def set_options_for_callback(options); end end -# source://activemodel/lib/active_model/validations.rb#74 +# source://activemodel/lib/active_model/validations.rb#53 module ActiveModel::Validations::ClassMethods # Returns +true+ if +attribute+ is an attribute method, +false+ otherwise. # @@ -5429,7 +5612,7 @@ module ActiveModel::Validations::ClassMethods # # @return [Boolean] # - # source://activemodel/lib/active_model/validations.rb#284 + # source://activemodel/lib/active_model/validations.rb#263 def attribute_method?(attribute); end # Clears all of the validators and validations. @@ -5470,12 +5653,12 @@ module ActiveModel::Validations::ClassMethods # # Person._validate_callbacks.empty? # => true # - # source://activemodel/lib/active_model/validations.rb#248 + # source://activemodel/lib/active_model/validations.rb#227 def clear_validators!; end # Copy validators on inheritance. # - # source://activemodel/lib/active_model/validations.rb#289 + # source://activemodel/lib/active_model/validations.rb#268 def inherited(base); end # Adds a validation method or block to the class. This is useful when @@ -5539,7 +5722,7 @@ module ActiveModel::Validations::ClassMethods # # NOTE: Calling +validate+ multiple times on the same method will overwrite previous definitions. # - # source://activemodel/lib/active_model/validations.rb#171 + # source://activemodel/lib/active_model/validations.rb#150 def validate(*args, &block); end # This method is a shortcut to all default validators and any custom @@ -5547,7 +5730,7 @@ module ActiveModel::Validations::ClassMethods # validators can be overridden inside specific classes by creating # custom validator classes in their place such as PresenceValidator. # - # Examples of using the default \Rails validators: + # Examples of using the default Rails validators: # # validates :username, absence: true # validates :terms, acceptance: true @@ -5698,7 +5881,7 @@ module ActiveModel::Validations::ClassMethods # method, proc, or string should return or evaluate to a +true+ or +false+ # value. # - # source://activemodel/lib/active_model/validations.rb#104 + # source://activemodel/lib/active_model/validations.rb#83 def validates_each(*attr_names, &block); end # Passes the record off to the class or classes specified and allows them @@ -5791,7 +5974,7 @@ module ActiveModel::Validations::ClassMethods # # # # # ] # - # source://activemodel/lib/active_model/validations.rb#206 + # source://activemodel/lib/active_model/validations.rb#185 def validators; end # List all validators that are being used to validate a specific attribute. @@ -5810,7 +5993,7 @@ module ActiveModel::Validations::ClassMethods # # #, # # ] # - # source://activemodel/lib/active_model/validations.rb#268 + # source://activemodel/lib/active_model/validations.rb#247 def validators_on(*attributes); end private @@ -5824,11 +6007,11 @@ module ActiveModel::Validations::ClassMethods # source://activemodel/lib/active_model/validations/validates.rb#157 def _validates_default_keys; end - # source://activemodel/lib/active_model/validations.rb#298 + # source://activemodel/lib/active_model/validations.rb#277 def predicate_for_validation_context(context); end end -# source://activemodel/lib/active_model/validations.rb#108 +# source://activemodel/lib/active_model/validations.rb#87 ActiveModel::Validations::ClassMethods::VALID_OPTIONS_FOR_VALIDATE = T.let(T.unsafe(nil), Array) # source://activemodel/lib/active_model/validations/clusivity.rb#8 diff --git a/sorbet/rbi/gems/activerecord@7.1.3.3.rbi b/sorbet/rbi/gems/activerecord@8.0.0.beta1.rbi similarity index 85% rename from sorbet/rbi/gems/activerecord@7.1.3.3.rbi rename to sorbet/rbi/gems/activerecord@8.0.0.beta1.rbi index 210b3194..6d74175f 100644 --- a/sorbet/rbi/gems/activerecord@7.1.3.3.rbi +++ b/sorbet/rbi/gems/activerecord@8.0.0.beta1.rbi @@ -5,7 +5,7 @@ # Please instead update this file by running `bin/tapioca gem activerecord`. -# :include: activerecord/README.rdoc +# :include: ../README.rdoc # # source://activerecord/lib/active_record/gem_version.rb#3 module ActiveRecord @@ -13,102 +13,128 @@ module ActiveRecord extend ::ActiveSupport::Autoload class << self - # source://activerecord/lib/active_record.rb#342 + # source://activerecord/lib/active_record.rb#392 def action_on_strict_loading_violation; end - # source://activerecord/lib/active_record.rb#342 + # source://activerecord/lib/active_record.rb#392 def action_on_strict_loading_violation=(_arg0); end - # source://activerecord/lib/active_record.rb#422 + # Registers a block to be called after all the current transactions have been + # committed. + # + # If there is no currently open transaction, the block is called immediately. + # + # If there are multiple nested transactions, the block is called after the outermost one + # has been committed, + # + # If any of the currently open transactions is rolled back, the block is never called. + # + # If multiple transactions are open across multiple databases, the block will be invoked + # if and once all of them have been committed. But note that nesting transactions across + # two distinct databases is a sharding anti-pattern that comes with a world of hurts. + # + # source://activerecord/lib/active_record.rb#572 + def after_all_transactions_commit(&block); end + + # source://activerecord/lib/active_record.rb#592 + def all_open_transactions; end + + # source://activerecord/lib/active_record.rb#462 def allow_deprecated_singular_associations_name; end - # source://activerecord/lib/active_record.rb#422 - def allow_deprecated_singular_associations_name=(_arg0); end + # source://activerecord/lib/active_record.rb#469 + def allow_deprecated_singular_associations_name=(value); end - # source://activerecord/lib/active_record.rb#335 + # source://activerecord/lib/active_record.rb#385 def application_record_class; end - # source://activerecord/lib/active_record.rb#335 + # source://activerecord/lib/active_record.rb#385 def application_record_class=(_arg0); end - # source://activerecord/lib/active_record.rb#263 + # source://activerecord/lib/active_record.rb#291 def async_query_executor; end - # source://activerecord/lib/active_record.rb#263 + # source://activerecord/lib/active_record.rb#291 def async_query_executor=(_arg0); end - # source://activerecord/lib/active_record.rb#317 + # source://activerecord/lib/active_record.rb#356 def before_committed_on_all_records; end - # source://activerecord/lib/active_record.rb#317 + # source://activerecord/lib/active_record.rb#356 def before_committed_on_all_records=(_arg0); end - # source://activerecord/lib/active_record.rb#314 + # source://activerecord/lib/active_record.rb#353 def belongs_to_required_validates_foreign_key; end - # source://activerecord/lib/active_record.rb#314 + # source://activerecord/lib/active_record.rb#353 def belongs_to_required_validates_foreign_key=(_arg0); end - # source://activerecord/lib/active_record.rb#323 + # source://activerecord/lib/active_record.rb#362 def commit_transaction_on_non_local_return; end - # source://activerecord/lib/active_record.rb#323 - def commit_transaction_on_non_local_return=(_arg0); end + # source://activerecord/lib/active_record.rb#369 + def commit_transaction_on_non_local_return=(value); end - # source://activerecord/lib/active_record.rb#209 - def db_warnings_action; end + # source://activerecord/lib/active_record.rb#211 + def database_cli; end # source://activerecord/lib/active_record.rb#211 + def database_cli=(_arg0); end + + # source://activerecord/lib/active_record.rb#233 + def db_warnings_action; end + + # source://activerecord/lib/active_record.rb#235 def db_warnings_action=(action); end - # source://activerecord/lib/active_record.rb#236 + # source://activerecord/lib/active_record.rb#262 def db_warnings_ignore; end - # source://activerecord/lib/active_record.rb#236 + # source://activerecord/lib/active_record.rb#262 def db_warnings_ignore=(_arg0); end - # source://activerecord/lib/active_record.rb#192 + # source://activerecord/lib/active_record.rb#214 def default_timezone; end # Determines whether to use Time.utc (using :utc) or Time.local (using :local) when pulling # dates and times from the database. This is set to :utc by default. # - # source://activerecord/lib/active_record.rb#196 + # source://activerecord/lib/active_record.rb#218 def default_timezone=(default_timezone); end # source://activerecord/lib/active_record/deprecator.rb#4 def deprecator; end - # source://activerecord/lib/active_record.rb#177 + # source://activerecord/lib/active_record.rb#182 def disable_prepared_statements; end - # source://activerecord/lib/active_record.rb#177 + # source://activerecord/lib/active_record.rb#182 def disable_prepared_statements=(_arg0); end # Explicitly closes all database connections in all pools. # - # source://activerecord/lib/active_record.rb#476 + # source://activerecord/lib/active_record.rb#555 def disconnect_all!; end - # source://activerecord/lib/active_record.rb#382 + # source://activerecord/lib/active_record.rb#440 def dump_schema_after_migration; end - # source://activerecord/lib/active_record.rb#382 + # source://activerecord/lib/active_record.rb#440 def dump_schema_after_migration=(_arg0); end - # source://activerecord/lib/active_record.rb#392 + # source://activerecord/lib/active_record.rb#450 def dump_schemas; end - # source://activerecord/lib/active_record.rb#392 + # source://activerecord/lib/active_record.rb#450 def dump_schemas=(_arg0); end - # source://activerecord/lib/active_record.rb#465 + # source://activerecord/lib/active_record.rb#544 def eager_load!; end - # source://activerecord/lib/active_record.rb#361 + # source://activerecord/lib/active_record.rb#411 def error_on_ignored_order; end - # source://activerecord/lib/active_record.rb#361 + # source://activerecord/lib/active_record.rb#411 def error_on_ignored_order=(_arg0); end # Returns the currently loaded version of Active Record as a +Gem::Version+. @@ -116,135 +142,159 @@ module ActiveRecord # source://activerecord/lib/active_record/gem_version.rb#5 def gem_version; end - # source://activerecord/lib/active_record.rb#454 + # source://activerecord/lib/active_record.rb#505 def generate_secure_token_on; end - # source://activerecord/lib/active_record.rb#454 + # source://activerecord/lib/active_record.rb#505 def generate_secure_token_on=(_arg0); end - # source://activerecord/lib/active_record.rb#286 + # source://activerecord/lib/active_record.rb#314 def global_executor_concurrency; end # Set the +global_executor_concurrency+. This configuration value can only be used # with the global thread pool async query executor. # - # source://activerecord/lib/active_record.rb#278 + # source://activerecord/lib/active_record.rb#306 def global_executor_concurrency=(global_executor_concurrency); end - # source://activerecord/lib/active_record.rb#266 + # source://activerecord/lib/active_record.rb#294 def global_thread_pool_async_query_executor; end - # source://activerecord/lib/active_record.rb#290 + # source://activerecord/lib/active_record.rb#329 def index_nested_attribute_errors; end - # source://activerecord/lib/active_record.rb#290 + # source://activerecord/lib/active_record.rb#329 def index_nested_attribute_errors=(_arg0); end - # source://activerecord/lib/active_record.rb#183 + # source://activerecord/lib/active_record.rb#189 def lazily_load_schema_cache; end - # source://activerecord/lib/active_record.rb#183 + # source://activerecord/lib/active_record.rb#189 def lazily_load_schema_cache=(_arg0); end # @raise [ArgumentError] # - # source://activerecord/lib/active_record.rb#245 + # source://activerecord/lib/active_record.rb#271 def legacy_connection_handling=(_); end - # source://activerecord/lib/active_record.rb#308 + # source://activerecord/lib/active_record.rb#347 def maintain_test_schema; end - # source://activerecord/lib/active_record.rb#308 + # source://activerecord/lib/active_record.rb#347 def maintain_test_schema=(_arg0); end - # source://activerecord/lib/active_record.rb#457 + # source://activerecord/lib/active_record.rb#508 def marshalling_format_version; end - # source://activerecord/lib/active_record.rb#461 + # source://activerecord/lib/active_record.rb#512 def marshalling_format_version=(value); end - # source://activerecord/lib/active_record.rb#373 + # source://activerecord/lib/active_record.rb#431 def migration_strategy; end - # source://activerecord/lib/active_record.rb#373 + # source://activerecord/lib/active_record.rb#431 def migration_strategy=(_arg0); end - # source://activerecord/lib/active_record.rb#425 + # source://activerecord/lib/active_record.rb#319 + def permanent_connection_checkout; end + + # Defines whether +ActiveRecord::Base.connection+ is allowed, deprecated, or entirely disallowed. + # + # source://activerecord/lib/active_record.rb#322 + def permanent_connection_checkout=(value); end + + # source://activerecord/lib/active_record.rb#535 + def protocol_adapters; end + + # source://activerecord/lib/active_record.rb#535 + def protocol_adapters=(_arg0); end + + # source://activerecord/lib/active_record.rb#476 def query_transformers; end - # source://activerecord/lib/active_record.rb#425 + # source://activerecord/lib/active_record.rb#476 def query_transformers=(_arg0); end - # source://activerecord/lib/active_record.rb#305 + # source://activerecord/lib/active_record.rb#344 def queues; end - # source://activerecord/lib/active_record.rb#305 + # source://activerecord/lib/active_record.rb#344 def queues=(_arg0); end - # source://activerecord/lib/active_record.rb#440 + # source://activerecord/lib/active_record.rb#491 def raise_int_wider_than_64bit; end - # source://activerecord/lib/active_record.rb#440 + # source://activerecord/lib/active_record.rb#491 def raise_int_wider_than_64bit=(_arg0); end - # source://activerecord/lib/active_record.rb#311 + # source://activerecord/lib/active_record.rb#350 def raise_on_assign_to_attr_readonly; end - # source://activerecord/lib/active_record.rb#311 + # source://activerecord/lib/active_record.rb#350 def raise_on_assign_to_attr_readonly=(_arg0); end - # source://activerecord/lib/active_record.rb#242 + # source://activerecord/lib/active_record.rb#268 def reading_role; end - # source://activerecord/lib/active_record.rb#242 + # source://activerecord/lib/active_record.rb#268 def reading_role=(_arg0); end - # source://activerecord/lib/active_record.rb#320 + # source://activerecord/lib/active_record.rb#359 def run_after_transaction_callbacks_in_order_defined; end - # source://activerecord/lib/active_record.rb#320 + # source://activerecord/lib/active_record.rb#359 def run_after_transaction_callbacks_in_order_defined=(_arg0); end - # source://activerecord/lib/active_record.rb#189 + # Checks to see if the +table_name+ is ignored by checking + # against the +schema_cache_ignored_tables+ option. + # + # ActiveRecord.schema_cache_ignored_table?(:developers) + # + # @return [Boolean] + # + # source://activerecord/lib/active_record.rb#205 + def schema_cache_ignored_table?(table_name); end + + # source://activerecord/lib/active_record.rb#197 def schema_cache_ignored_tables; end - # source://activerecord/lib/active_record.rb#189 + # source://activerecord/lib/active_record.rb#197 def schema_cache_ignored_tables=(_arg0); end - # source://activerecord/lib/active_record.rb#353 + # source://activerecord/lib/active_record.rb#403 def schema_format; end - # source://activerecord/lib/active_record.rb#353 + # source://activerecord/lib/active_record.rb#403 def schema_format=(_arg0); end - # source://activerecord/lib/active_record.rb#395 - def suppress_multiple_database_warning; end - - # source://activerecord/lib/active_record.rb#402 - def suppress_multiple_database_warning=(value); end - - # source://activerecord/lib/active_record.rb#367 + # source://activerecord/lib/active_record.rb#417 def timestamped_migrations; end - # source://activerecord/lib/active_record.rb#367 + # source://activerecord/lib/active_record.rb#417 def timestamped_migrations=(_arg0); end - # source://activerecord/lib/active_record.rb#432 + # source://activerecord/lib/active_record.rb#483 def use_yaml_unsafe_load; end - # source://activerecord/lib/active_record.rb#432 + # source://activerecord/lib/active_record.rb#483 def use_yaml_unsafe_load=(_arg0); end - # source://activerecord/lib/active_record.rb#298 + # source://activerecord/lib/active_record.rb#425 + def validate_migration_timestamps; end + + # source://activerecord/lib/active_record.rb#425 + def validate_migration_timestamps=(_arg0); end + + # source://activerecord/lib/active_record.rb#337 def verbose_query_logs; end - # source://activerecord/lib/active_record.rb#298 + # source://activerecord/lib/active_record.rb#337 def verbose_query_logs=(_arg0); end - # source://activerecord/lib/active_record.rb#415 + # source://activerecord/lib/active_record.rb#459 def verify_foreign_keys_for_fixtures; end - # source://activerecord/lib/active_record.rb#415 + # source://activerecord/lib/active_record.rb#459 def verify_foreign_keys_for_fixtures=(_arg0); end # Returns the currently loaded version of Active Record as a +Gem::Version+. @@ -252,22 +302,22 @@ module ActiveRecord # source://activerecord/lib/active_record/version.rb#7 def version; end - # source://activerecord/lib/active_record.rb#332 + # source://activerecord/lib/active_record.rb#382 def warn_on_records_fetched_greater_than; end - # source://activerecord/lib/active_record.rb#332 + # source://activerecord/lib/active_record.rb#382 def warn_on_records_fetched_greater_than=(_arg0); end - # source://activerecord/lib/active_record.rb#239 + # source://activerecord/lib/active_record.rb#265 def writing_role; end - # source://activerecord/lib/active_record.rb#239 + # source://activerecord/lib/active_record.rb#265 def writing_role=(_arg0); end - # source://activerecord/lib/active_record.rb#447 + # source://activerecord/lib/active_record.rb#498 def yaml_column_permitted_classes; end - # source://activerecord/lib/active_record.rb#447 + # source://activerecord/lib/active_record.rb#498 def yaml_column_permitted_classes=(_arg0); end end end @@ -276,39 +326,39 @@ end # # Generic Active Record exception class. # -# source://activerecord/lib/active_record/errors.rb#7 +# source://activerecord/lib/active_record/errors.rb#11 class ActiveRecord::ActiveRecordError < ::StandardError; end # Superclass for all errors raised from an Active Record adapter. # -# source://activerecord/lib/active_record/errors.rb#59 +# source://activerecord/lib/active_record/errors.rb#55 class ActiveRecord::AdapterError < ::ActiveRecord::ActiveRecordError # @return [AdapterError] a new instance of AdapterError # - # source://activerecord/lib/active_record/errors.rb#60 + # source://activerecord/lib/active_record/errors.rb#56 def initialize(message = T.unsafe(nil), connection_pool: T.unsafe(nil)); end # Returns the value of attribute connection_pool. # - # source://activerecord/lib/active_record/errors.rb#65 + # source://activerecord/lib/active_record/errors.rb#61 def connection_pool; end end # Raised when Active Record cannot find database adapter specified in # +config/database.yml+ or programmatically. # -# source://activerecord/lib/active_record/errors.rb#55 +# source://activerecord/lib/active_record/errors.rb#51 class ActiveRecord::AdapterNotFound < ::ActiveRecord::ActiveRecordError; end # Raised when adapter not specified on connection (or configuration file # +config/database.yml+ misses adapter field). # -# source://activerecord/lib/active_record/errors.rb#46 +# source://activerecord/lib/active_record/errors.rb#42 class ActiveRecord::AdapterNotSpecified < ::ActiveRecord::ActiveRecordError; end # AdapterTimeout will be raised when database clients times out while waiting from the server. # -# source://activerecord/lib/active_record/errors.rb#550 +# source://activerecord/lib/active_record/errors.rb#577 class ActiveRecord::AdapterTimeout < ::ActiveRecord::QueryAborted; end # See ActiveRecord::Aggregations::ClassMethods for documentation @@ -542,34 +592,34 @@ module ActiveRecord::Aggregations::ClassMethods def writer_method(name, class_name, mapping, allow_nil, converter); end end -# source://activerecord/lib/active_record/associations.rb#203 +# source://activerecord/lib/active_record/associations/errors.rb#203 class ActiveRecord::AmbiguousSourceReflectionForThroughAssociation < ::ActiveRecord::ActiveRecordError # @return [AmbiguousSourceReflectionForThroughAssociation] a new instance of AmbiguousSourceReflectionForThroughAssociation # - # source://activerecord/lib/active_record/associations.rb#204 + # source://activerecord/lib/active_record/associations/errors.rb#204 def initialize(klass, macro, association_name, options, possible_sources); end end -# source://activerecord/lib/active_record/associations.rb#4 +# source://activerecord/lib/active_record/associations/errors.rb#4 class ActiveRecord::AssociationNotFoundError < ::ActiveRecord::ConfigurationError include ::DidYouMean::Correctable # @return [AssociationNotFoundError] a new instance of AssociationNotFoundError # - # source://activerecord/lib/active_record/associations.rb#7 + # source://activerecord/lib/active_record/associations/errors.rb#7 def initialize(record = T.unsafe(nil), association_name = T.unsafe(nil)); end # Returns the value of attribute association_name. # - # source://activerecord/lib/active_record/associations.rb#5 + # source://activerecord/lib/active_record/associations/errors.rb#5 def association_name; end - # source://activerecord/lib/active_record/associations.rb#20 + # source://activerecord/lib/active_record/associations/errors.rb#20 def corrections; end # Returns the value of attribute record. # - # source://activerecord/lib/active_record/associations.rb#5 + # source://activerecord/lib/active_record/associations/errors.rb#5 def record; end end @@ -632,12 +682,12 @@ end # # Comments are not patches, this assignment raises AssociationTypeMismatch. # @ticket.patches << Comment.new(content: "Please attach tests to your patch.") # -# source://activerecord/lib/active_record/errors.rb#37 +# source://activerecord/lib/active_record/errors.rb#33 class ActiveRecord::AssociationTypeMismatch < ::ActiveRecord::ActiveRecordError; end # See ActiveRecord::Associations::ClassMethods for documentation. # -# source://activerecord/lib/active_record/associations.rb#267 +# source://activerecord/lib/active_record/associations.rb#5 module ActiveRecord::Associations extend ::ActiveSupport::Autoload extend ::ActiveSupport::Concern @@ -646,34 +696,34 @@ module ActiveRecord::Associations # Returns the association instance for the given name, instantiating it if it doesn't already exist # - # source://activerecord/lib/active_record/associations.rb#313 + # source://activerecord/lib/active_record/associations.rb#51 def association(name); end # @return [Boolean] # - # source://activerecord/lib/active_record/associations.rb#327 + # source://activerecord/lib/active_record/associations.rb#65 def association_cached?(name); end private # Returns the specified association instance if it exists, +nil+ otherwise. # - # source://activerecord/lib/active_record/associations.rb#343 + # source://activerecord/lib/active_record/associations.rb#81 def association_instance_get(name); end # Set the specified association instance. # - # source://activerecord/lib/active_record/associations.rb#348 + # source://activerecord/lib/active_record/associations.rb#86 def association_instance_set(name, association); end - # source://activerecord/lib/active_record/associations.rb#337 + # source://activerecord/lib/active_record/associations.rb#75 def init_internals; end - # source://activerecord/lib/active_record/associations.rb#331 + # source://activerecord/lib/active_record/associations.rb#69 def initialize_dup(*_arg0); end class << self - # source://activerecord/lib/active_record/associations.rb#306 + # source://activerecord/lib/active_record/associations.rb#44 def eager_load!; end end end @@ -686,27 +736,30 @@ class ActiveRecord::Associations::AliasTracker # # @return [AliasTracker] a new instance of AliasTracker # - # source://activerecord/lib/active_record/associations/alias_tracker.rb#49 - def initialize(connection, aliases); end + # source://activerecord/lib/active_record/associations/alias_tracker.rb#51 + def initialize(table_alias_length, aliases); end - # source://activerecord/lib/active_record/associations/alias_tracker.rb#54 + # source://activerecord/lib/active_record/associations/alias_tracker.rb#56 def aliased_table_for(arel_table, table_name = T.unsafe(nil)); end # Returns the value of attribute aliases. # - # source://activerecord/lib/active_record/associations/alias_tracker.rb#76 + # source://activerecord/lib/active_record/associations/alias_tracker.rb#78 def aliases; end private - # source://activerecord/lib/active_record/associations/alias_tracker.rb#79 + # source://activerecord/lib/active_record/associations/alias_tracker.rb#81 + def table_alias_for(table_name); end + + # source://activerecord/lib/active_record/associations/alias_tracker.rb#85 def truncate(name); end class << self # source://activerecord/lib/active_record/associations/alias_tracker.rb#9 - def create(connection, initial_table, joins, aliases = T.unsafe(nil)); end + def create(pool, initial_table, joins, aliases = T.unsafe(nil)); end - # source://activerecord/lib/active_record/associations/alias_tracker.rb#26 + # source://activerecord/lib/active_record/associations/alias_tracker.rb#28 def initial_count_for(connection, name, table_joins); end end end @@ -749,10 +802,21 @@ class ActiveRecord::Associations::Association # source://activerecord/lib/active_record/associations/association.rb#41 def initialize(owner, reflection); end - # source://activerecord/lib/active_record/associations/association.rb#206 + # source://activerecord/lib/active_record/associations/association.rb#190 + def async_load_target; end + + # Whether the association represent a single record + # or a collection of records. + # + # @return [Boolean] + # + # source://activerecord/lib/active_record/associations/association.rb#229 + def collection?; end + + # source://activerecord/lib/active_record/associations/association.rb#219 def create(attributes = T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/associations/association.rb#210 + # source://activerecord/lib/active_record/associations/association.rb#223 def create!(attributes = T.unsafe(nil), &block); end # Returns the value of attribute disable_joins. @@ -760,22 +824,22 @@ class ActiveRecord::Associations::Association # source://activerecord/lib/active_record/associations/association.rb#37 def disable_joins; end - # source://activerecord/lib/active_record/associations/association.rb#155 + # source://activerecord/lib/active_record/associations/association.rb#161 def extensions; end - # source://activerecord/lib/active_record/associations/association.rb#196 + # source://activerecord/lib/active_record/associations/association.rb#209 def initialize_attributes(record, except_from_scope_attributes = T.unsafe(nil)); end - # source://activerecord/lib/active_record/associations/association.rb#139 + # source://activerecord/lib/active_record/associations/association.rb#145 def inversed_from(record); end - # source://activerecord/lib/active_record/associations/association.rb#143 + # source://activerecord/lib/active_record/associations/association.rb#149 def inversed_from_queries(record); end # Returns the class of the target. belongs_to polymorphic overrides this to look at the # polymorphic_type field on the owner. # - # source://activerecord/lib/active_record/associations/association.rb#151 + # source://activerecord/lib/active_record/associations/association.rb#157 def klass; end # Loads the \target if needed and returns it. @@ -789,27 +853,27 @@ class ActiveRecord::Associations::Association # ActiveRecord::RecordNotFound is rescued within the method, and it is # not reraised. The proxy is \reset and +nil+ is the return value. # - # source://activerecord/lib/active_record/associations/association.rb#175 + # source://activerecord/lib/active_record/associations/association.rb#181 def load_target; end # Asserts the \target has been loaded setting the \loaded flag to +true+. # - # source://activerecord/lib/active_record/associations/association.rb#80 + # source://activerecord/lib/active_record/associations/association.rb#86 def loaded!; end # Has the \target been already \loaded? # # @return [Boolean] # - # source://activerecord/lib/active_record/associations/association.rb#75 + # source://activerecord/lib/active_record/associations/association.rb#81 def loaded?; end # We can't dump @reflection and @through_reflection since it contains the scope proc # - # source://activerecord/lib/active_record/associations/association.rb#185 + # source://activerecord/lib/active_record/associations/association.rb#198 def marshal_dump; end - # source://activerecord/lib/active_record/associations/association.rb#190 + # source://activerecord/lib/active_record/associations/association.rb#203 def marshal_load(data); end # source://activerecord/lib/active_record/associations/association.rb#39 @@ -829,34 +893,34 @@ class ActiveRecord::Associations::Association # Reloads the \target and returns +self+ on success. # The QueryCache is cleared if +force+ is true. # - # source://activerecord/lib/active_record/associations/association.rb#66 + # source://activerecord/lib/active_record/associations/association.rb#72 def reload(force = T.unsafe(nil)); end # Remove the inverse association, if possible # - # source://activerecord/lib/active_record/associations/association.rb#133 + # source://activerecord/lib/active_record/associations/association.rb#139 def remove_inverse_instance(record); end # Resets the \loaded flag to +false+ and sets the \target to +nil+. # - # source://activerecord/lib/active_record/associations/association.rb#54 + # source://activerecord/lib/active_record/associations/association.rb#61 def reset; end - # source://activerecord/lib/active_record/associations/association.rb#60 + # source://activerecord/lib/active_record/associations/association.rb#66 def reset_negative_cache; end - # source://activerecord/lib/active_record/associations/association.rb#113 + # source://activerecord/lib/active_record/associations/association.rb#119 def reset_scope; end - # source://activerecord/lib/active_record/associations/association.rb#101 + # source://activerecord/lib/active_record/associations/association.rb#107 def scope; end # Set the inverse association, if possible # - # source://activerecord/lib/active_record/associations/association.rb#118 + # source://activerecord/lib/active_record/associations/association.rb#124 def set_inverse_instance(record); end - # source://activerecord/lib/active_record/associations/association.rb#125 + # source://activerecord/lib/active_record/associations/association.rb#131 def set_inverse_instance_from_queries(record); end # The target is stale if the target no longer points to the record(s) that the @@ -868,17 +932,15 @@ class ActiveRecord::Associations::Association # # @return [Boolean] # - # source://activerecord/lib/active_record/associations/association.rb#91 + # source://activerecord/lib/active_record/associations/association.rb#97 def stale_target?; end - # Returns the value of attribute target. - # - # source://activerecord/lib/active_record/associations/association.rb#37 + # source://activerecord/lib/active_record/associations/association.rb#53 def target; end # Sets the target of this association to \target, and the \loaded flag to +true+. # - # source://activerecord/lib/active_record/associations/association.rb#96 + # source://activerecord/lib/active_record/associations/association.rb#102 def target=(target); end private @@ -890,34 +952,34 @@ class ActiveRecord::Associations::Association # by scope.scoping { ... } or unscoped { ... } etc, which affects the scope which # actually gets built. # - # source://activerecord/lib/active_record/associations/association.rb#269 + # source://activerecord/lib/active_record/associations/association.rb#296 def association_scope; end - # source://activerecord/lib/active_record/associations/association.rb#352 + # source://activerecord/lib/active_record/associations/association.rb#379 def build_record(attributes); end - # source://activerecord/lib/active_record/associations/association.rb#367 + # source://activerecord/lib/active_record/associations/association.rb#394 def enqueue_destroy_association(options); end # Reader and writer methods call this so that consistent errors are presented # when the association target class does not exist. # - # source://activerecord/lib/active_record/associations/association.rb#217 + # source://activerecord/lib/active_record/associations/association.rb#236 def ensure_klass_exists!; end - # source://activerecord/lib/active_record/associations/association.rb#221 - def find_target; end + # source://activerecord/lib/active_record/associations/association.rb#240 + def find_target(async: T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord/lib/active_record/associations/association.rb#289 + # source://activerecord/lib/active_record/associations/association.rb#316 def find_target?; end # Returns true if record contains the foreign_key # # @return [Boolean] # - # source://activerecord/lib/active_record/associations/association.rb#339 + # source://activerecord/lib/active_record/associations/association.rb#366 def foreign_key_for?(record); end # Returns true if there is a foreign key present on the owner which @@ -931,22 +993,22 @@ class ActiveRecord::Associations::Association # # @return [Boolean] # - # source://activerecord/lib/active_record/associations/association.rb#301 + # source://activerecord/lib/active_record/associations/association.rb#328 def foreign_key_present?; end # @return [Boolean] # - # source://activerecord/lib/active_record/associations/association.rb#375 + # source://activerecord/lib/active_record/associations/association.rb#402 def inversable?(record); end - # source://activerecord/lib/active_record/associations/association.rb#319 + # source://activerecord/lib/active_record/associations/association.rb#346 def inverse_association_for(record); end # Can be redefined by subclasses, notably polymorphic belongs_to # The record parameter is necessary to support polymorphic inverses as we must check for # the association in the specific class of the record. # - # source://activerecord/lib/active_record/associations/association.rb#328 + # source://activerecord/lib/active_record/associations/association.rb#355 def inverse_reflection_for(record); end # Returns true if inverse association on the given record needs to be set. @@ -954,32 +1016,32 @@ class ActiveRecord::Associations::Association # # @return [Boolean] # - # source://activerecord/lib/active_record/associations/association.rb#334 + # source://activerecord/lib/active_record/associations/association.rb#361 def invertible_for?(record); end # @return [Boolean] # - # source://activerecord/lib/active_record/associations/association.rb#380 + # source://activerecord/lib/active_record/associations/association.rb#407 def matches_foreign_key?(record); end # Raises ActiveRecord::AssociationTypeMismatch unless +record+ is of # the kind of the class of the associated objects. Meant to be used as # a safety check when you are about to assign an associated record. # - # source://activerecord/lib/active_record/associations/association.rb#308 + # source://activerecord/lib/active_record/associations/association.rb#335 def raise_on_type_mismatch!(record); end - # source://activerecord/lib/active_record/associations/association.rb#285 + # source://activerecord/lib/active_record/associations/association.rb#312 def scope_for_create; end # Returns true if statement cache should be skipped on the association reader. # # @return [Boolean] # - # source://activerecord/lib/active_record/associations/association.rb#360 + # source://activerecord/lib/active_record/associations/association.rb#387 def skip_statement_cache?(scope); end - # source://activerecord/lib/active_record/associations/association.rb#245 + # source://activerecord/lib/active_record/associations/association.rb#272 def skip_strict_loading(&block); end # This should be implemented to return the values of the relevant key(s) on the owner, @@ -988,18 +1050,18 @@ class ActiveRecord::Associations::Association # # This is only relevant to certain associations, which is why it returns +nil+ by default. # - # source://activerecord/lib/active_record/associations/association.rb#349 + # source://activerecord/lib/active_record/associations/association.rb#376 def stale_state; end # Can be overridden (i.e. in ThroughAssociation) to merge in other scopes (i.e. the # through association's scope) # - # source://activerecord/lib/active_record/associations/association.rb#281 + # source://activerecord/lib/active_record/associations/association.rb#308 def target_scope; end # @return [Boolean] # - # source://activerecord/lib/active_record/associations/association.rb#253 + # source://activerecord/lib/active_record/associations/association.rb#280 def violates_strict_loading?; end end @@ -1129,15 +1191,15 @@ class ActiveRecord::Associations::BelongsToAssociation < ::ActiveRecord::Associa # @return [Boolean] # - # source://activerecord/lib/active_record/associations/belongs_to_association.rb#141 + # source://activerecord/lib/active_record/associations/belongs_to_association.rb#149 def foreign_key_present?; end # @return [Boolean] # - # source://activerecord/lib/active_record/associations/belongs_to_association.rb#145 + # source://activerecord/lib/active_record/associations/belongs_to_association.rb#153 def invertible_for?(record); end - # source://activerecord/lib/active_record/associations/belongs_to_association.rb#137 + # source://activerecord/lib/active_record/associations/belongs_to_association.rb#145 def primary_key(klass); end # source://activerecord/lib/active_record/associations/belongs_to_association.rb#89 @@ -1151,7 +1213,7 @@ class ActiveRecord::Associations::BelongsToAssociation < ::ActiveRecord::Associa # source://activerecord/lib/active_record/associations/belongs_to_association.rb#122 def require_counter_update?; end - # source://activerecord/lib/active_record/associations/belongs_to_association.rb#150 + # source://activerecord/lib/active_record/associations/belongs_to_association.rb#158 def stale_state; end # source://activerecord/lib/active_record/associations/belongs_to_association.rb#103 @@ -1198,7 +1260,7 @@ class ActiveRecord::Associations::BelongsToPolymorphicAssociation < ::ActiveReco def stale_state; end end -# source://activerecord/lib/active_record/associations.rb#280 +# source://activerecord/lib/active_record/associations.rb#18 module ActiveRecord::Associations::Builder; end # source://activerecord/lib/active_record/associations/builder/association.rb#15 @@ -1226,16 +1288,16 @@ class ActiveRecord::Associations::Builder::Association private - # source://activerecord/lib/active_record/associations/builder/association.rb#144 + # source://activerecord/lib/active_record/associations/builder/association.rb#145 def add_after_commit_jobs_callback(model, dependent); end - # source://activerecord/lib/active_record/associations/builder/association.rb#139 + # source://activerecord/lib/active_record/associations/builder/association.rb#140 def add_destroy_callbacks(model, reflection); end # source://activerecord/lib/active_record/associations/builder/association.rb#53 def build_scope(scope); end - # source://activerecord/lib/active_record/associations/builder/association.rb#129 + # source://activerecord/lib/active_record/associations/builder/association.rb#130 def check_dependent_options(dependent, model); end # Defines the setter and getter methods for the association @@ -1245,25 +1307,25 @@ class ActiveRecord::Associations::Builder::Association # # Post.first.comments and Post.first.comments= methods are defined by this method... # - # source://activerecord/lib/active_record/associations/builder/association.rb#94 + # source://activerecord/lib/active_record/associations/builder/association.rb#95 def define_accessors(model, reflection); end - # source://activerecord/lib/active_record/associations/builder/association.rb#76 + # source://activerecord/lib/active_record/associations/builder/association.rb#77 def define_callbacks(model, reflection); end - # source://activerecord/lib/active_record/associations/builder/association.rb#121 + # source://activerecord/lib/active_record/associations/builder/association.rb#122 def define_change_tracking_methods(model, reflection); end # source://activerecord/lib/active_record/associations/builder/association.rb#73 def define_extensions(model, name); end - # source://activerecord/lib/active_record/associations/builder/association.rb#101 + # source://activerecord/lib/active_record/associations/builder/association.rb#102 def define_readers(mixin, name); end - # source://activerecord/lib/active_record/associations/builder/association.rb#117 + # source://activerecord/lib/active_record/associations/builder/association.rb#118 def define_validations(model, reflection); end - # source://activerecord/lib/active_record/associations/builder/association.rb#109 + # source://activerecord/lib/active_record/associations/builder/association.rb#110 def define_writers(mixin, name); end # @raise [NotImplementedError] @@ -1273,7 +1335,7 @@ class ActiveRecord::Associations::Builder::Association # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/associations/builder/association.rb#125 + # source://activerecord/lib/active_record/associations/builder/association.rb#126 def valid_dependent_options; end # source://activerecord/lib/active_record/associations/builder/association.rb#65 @@ -1290,7 +1352,7 @@ ActiveRecord::Associations::Builder::Association::VALID_OPTIONS = T.let(T.unsafe # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#4 class ActiveRecord::Associations::Builder::BelongsTo < ::ActiveRecord::Associations::Builder::SingularAssociation class << self - # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#43 + # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#44 def touch_record(o, changes, foreign_key, name, touch); end private @@ -1298,22 +1360,22 @@ class ActiveRecord::Associations::Builder::BelongsTo < ::ActiveRecord::Associati # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#27 def add_counter_cache_callbacks(model, reflection); end - # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#102 + # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#103 def add_default_callbacks(model, reflection); end - # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#108 + # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#109 def add_destroy_callbacks(model, reflection); end - # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#78 + # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#79 def add_touch_callbacks(model, reflection); end # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#20 def define_callbacks(model, reflection); end - # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#143 + # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#144 def define_change_tracking_methods(model, reflection); end - # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#112 + # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#113 def define_validations(model, reflection); end # source://activerecord/lib/active_record/associations/builder/belongs_to.rb#5 @@ -1405,7 +1467,7 @@ class ActiveRecord::Associations::Builder::HasMany < ::ActiveRecord::Association # source://activerecord/lib/active_record/associations/builder/has_many.rb#5 def macro; end - # source://activerecord/lib/active_record/associations/builder/has_many.rb#18 + # source://activerecord/lib/active_record/associations/builder/has_many.rb#17 def valid_dependent_options; end # source://activerecord/lib/active_record/associations/builder/has_many.rb#9 @@ -1416,27 +1478,27 @@ end # source://activerecord/lib/active_record/associations/builder/has_one.rb#4 class ActiveRecord::Associations::Builder::HasOne < ::ActiveRecord::Associations::Builder::SingularAssociation class << self - # source://activerecord/lib/active_record/associations/builder/has_one.rb#38 + # source://activerecord/lib/active_record/associations/builder/has_one.rb#37 def touch_record(record, name, touch); end private - # source://activerecord/lib/active_record/associations/builder/has_one.rb#27 + # source://activerecord/lib/active_record/associations/builder/has_one.rb#26 def add_destroy_callbacks(model, reflection); end - # source://activerecord/lib/active_record/associations/builder/has_one.rb#47 + # source://activerecord/lib/active_record/associations/builder/has_one.rb#46 def add_touch_callbacks(model, reflection); end - # source://activerecord/lib/active_record/associations/builder/has_one.rb#22 + # source://activerecord/lib/active_record/associations/builder/has_one.rb#21 def define_callbacks(model, reflection); end - # source://activerecord/lib/active_record/associations/builder/has_one.rb#31 + # source://activerecord/lib/active_record/associations/builder/has_one.rb#30 def define_validations(model, reflection); end # source://activerecord/lib/active_record/associations/builder/has_one.rb#5 def macro; end - # source://activerecord/lib/active_record/associations/builder/has_one.rb#18 + # source://activerecord/lib/active_record/associations/builder/has_one.rb#17 def valid_dependent_options; end # source://activerecord/lib/active_record/associations/builder/has_one.rb#9 @@ -1754,21 +1816,43 @@ end # after_add: :congratulate_client, # after_remove: :log_after_remove # -# def congratulate_client(record) +# def congratulate_client(client) # # ... # end # -# def log_after_remove(record) +# def log_after_remove(client) # # ... # end # end # +# Callbacks can be defined in three ways: +# +# 1. A symbol that references a method defined on the class with the +# associated collection. For example, after_add: :congratulate_client +# invokes Firm#congratulate_client(client). +# 2. A callable with a signature that accepts both the record with the +# associated collection and the record being added or removed. For +# example, after_add: ->(firm, client) { ... }. +# 3. An object that responds to the callback name. For example, passing +# after_add: CallbackObject.new invokes CallbackObject#after_add(firm, +# client). +# # It's possible to stack callbacks by passing them as an array. Example: # +# class CallbackObject +# def after_add(firm, client) +# firm.log << "after_adding #{client.id}" +# end +# end +# # class Firm < ActiveRecord::Base # has_many :clients, # dependent: :destroy, -# after_add: [:congratulate_client, -> (firm, record) { firm.log << "after_adding#{record.id}" }], +# after_add: [ +# :congratulate_client, +# -> (firm, client) { firm.log << "after_adding #{client.id}" }, +# CallbackObject.new +# ], # after_remove: :log_after_remove # end # @@ -2383,7 +2467,7 @@ end # All of the association macros can be specialized through options. This makes cases # more complex than the simple and guessable ones possible. # -# source://activerecord/lib/active_record/associations.rb#1272 +# source://activerecord/lib/active_record/associations.rb#1032 module ActiveRecord::Associations::ClassMethods # Specifies a one-to-one association with another class. This method should only be used # if this class contains the foreign key. If the other class contains the foreign key, @@ -2491,15 +2575,25 @@ module ActiveRecord::Associations::ClassMethods # named #{table_name}_count (such as +comments_count+ for a belonging Comment class) # is used on the associate class (such as a Post class) - that is the migration for # #{table_name}_count is created on the associate class (such that Post.comments_count will - # return the count cached, see note below). You can also specify a custom counter + # return the count cached). You can also specify a custom counter # cache column by providing a column name instead of a +true+/+false+ value to this # option (e.g., counter_cache: :my_custom_counter.) - # Note: Specifying a counter cache will add it to that model's list of readonly attributes - # using +attr_readonly+. - # [+:polymorphic+] - # Specify this association is a polymorphic association by passing +true+. + # + # Starting to use counter caches on existing large tables can be troublesome, because the column + # values must be backfilled separately of the column addition (to not lock the table for too long) + # and before the use of +:counter_cache+ (otherwise methods like +size+/+any?+/etc, which use + # counter caches internally, can produce incorrect results). To safely backfill the values while keeping + # counter cache columns updated with the child records creation/removal and to avoid the mentioned methods + # use the possibly incorrect counter cache column values and always get the results from the database, + # use counter_cache: { active: false }. + # If you also need to specify a custom column name, use counter_cache: { active: false, column: :my_custom_counter }. + # # Note: If you've enabled the counter cache, then you may want to add the counter cache attribute # to the +attr_readonly+ list in the associated classes (e.g. class Post; attr_readonly :comments_count; end). + # [+:polymorphic+] + # Specify this association is a polymorphic association by passing +true+. + # Note: Since polymorphic associations rely on storing class names in the database, make sure to update the class names in the + # *_type polymorphic type column of the corresponding rows. # [+:validate+] # When set to +true+, validates new objects added to association when saving the parent object. +false+ by default. # If you want to ensure associated objects are revalidated on every update, use +validates_associated+. @@ -2557,9 +2651,9 @@ module ActiveRecord::Associations::ClassMethods # belongs_to :user, optional: true # belongs_to :account, default: -> { company.account } # belongs_to :account, strict_loading: true - # belong_to :note, query_constraints: [:organization_id, :note_id] + # belongs_to :note, query_constraints: [:organization_id, :note_id] # - # source://activerecord/lib/active_record/associations.rb#1886 + # source://activerecord/lib/active_record/associations.rb#1677 def belongs_to(name, scope = T.unsafe(nil), **options); end # Specifies a many-to-many relationship with another class. This associates two classes via an @@ -2579,7 +2673,7 @@ module ActiveRecord::Associations::ClassMethods # The join table should not have a primary key or a model associated with it. You must manually generate the # join table with a migration such as this: # - # class CreateDevelopersProjectsJoinTable < ActiveRecord::Migration[7.1] + # class CreateDevelopersProjectsJoinTable < ActiveRecord::Migration[8.0] # def change # create_join_table :developers, :projects # end @@ -2739,7 +2833,7 @@ module ActiveRecord::Associations::ClassMethods # has_and_belongs_to_many :categories, -> { readonly } # has_and_belongs_to_many :categories, strict_loading: true # - # source://activerecord/lib/active_record/associations.rb#2067 + # source://activerecord/lib/active_record/associations.rb#1858 def has_and_belongs_to_many(name, scope = T.unsafe(nil), **options, &extension); end # Specifies a one-to-many association. The following methods for retrieval and query of @@ -2978,6 +3072,21 @@ module ActiveRecord::Associations::ClassMethods # Serves as a composite foreign key. Defines the list of columns to be used to query the associated object. # This is an optional option. By default Rails will attempt to derive the value automatically. # When the value is set the Array size must match associated model's primary key or +query_constraints+ size. + # [+:index_errors+] + # Allows differentiation of multiple validation errors from the association records, by including + # an index in the error attribute name, e.g. +roles[2].level+. + # When set to +true+, the index is based on association order, i.e. database order, with yet to be + # persisted new records placed at the end. + # When set to +:nested_attributes_order+, the index is based on the record order received by + # nested attributes setter, when accepts_nested_attributes_for is used. + # [:before_add] + # Defines an {association callback}[rdoc-ref:Associations::ClassMethods@Association+callbacks] that gets triggered before an object is added to the association collection. + # [:after_add] + # Defines an {association callback}[rdoc-ref:Associations::ClassMethods@Association+callbacks] that gets triggered after an object is added to the association collection. + # [:before_remove] + # Defines an {association callback}[rdoc-ref:Associations::ClassMethods@Association+callbacks] that gets triggered before an object is removed from the association collection. + # [:after_remove] + # Defines an {association callback}[rdoc-ref:Associations::ClassMethods@Association+callbacks] that gets triggered after an object is removed from the association collection. # # Option examples: # has_many :comments, -> { order("posted_on") } @@ -2991,8 +3100,9 @@ module ActiveRecord::Associations::ClassMethods # has_many :subscribers, through: :subscriptions, disable_joins: true # has_many :comments, strict_loading: true # has_many :comments, query_constraints: [:blog_id, :post_id] + # has_many :comments, index_errors: :nested_attributes_order # - # source://activerecord/lib/active_record/associations.rb#1522 + # source://activerecord/lib/active_record/associations.rb#1298 def has_many(name, scope = T.unsafe(nil), **options, &extension); end # Specifies a one-to-one association with another class. This method should only be used @@ -3132,9 +3242,14 @@ module ActiveRecord::Associations::ClassMethods # When set to +true+, validates new objects added to association when saving the parent object. +false+ by default. # If you want to ensure associated objects are revalidated on every update, use +validates_associated+. # [+:autosave+] - # If true, always save the associated object or destroy it if marked for destruction, - # when saving the parent object. If false, never save or destroy the associated object. - # By default, only save the associated object if it's a new record. + # If +true+, always saves the associated object or destroys it if marked for destruction, + # when saving the parent object. + # If +false+, never save or destroy the associated object. + # + # By default, only saves the associated object if it's a new record. Setting this option + # to +true+ also enables validations on the associated object unless explicitly disabled + # with validate: false. This is because saving an object with invalid associated + # objects would fail, so any associated objects will go through validation checks. # # Note that NestedAttributes::ClassMethods#accepts_nested_attributes_for sets # :autosave to true. @@ -3177,7 +3292,7 @@ module ActiveRecord::Associations::ClassMethods # has_one :credit_card, strict_loading: true # has_one :employment_record_book, query_constraints: [:organization_id, :employee_id] # - # source://activerecord/lib/active_record/associations.rb#1708 + # source://activerecord/lib/active_record/associations.rb#1489 def has_one(name, scope = T.unsafe(nil), **options); end end @@ -3205,18 +3320,23 @@ end # If you need to work on all current children, new and existing records, # +load_target+ and the +loaded+ flag are your friends. # -# source://activerecord/lib/active_record/associations/collection_association.rb#31 +# source://activerecord/lib/active_record/associations/collection_association.rb#30 class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associations::Association - # source://activerecord/lib/active_record/associations/collection_association.rb#277 + # source://activerecord/lib/active_record/associations/collection_association.rb#281 def add_to_target(record, skip_callbacks: T.unsafe(nil), replace: T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/associations/collection_association.rb#115 + # source://activerecord/lib/active_record/associations/collection_association.rb#117 def build(attributes = T.unsafe(nil), &block); end + # @return [Boolean] + # + # source://activerecord/lib/active_record/associations/collection_association.rb#316 + def collection?; end + # Add +records+ to this association. Since +<<+ flattens its argument list # and inserts each record, +push+ and +concat+ behave identically. # - # source://activerecord/lib/active_record/associations/collection_association.rb#125 + # source://activerecord/lib/active_record/associations/collection_association.rb#127 def concat(*records); end # Removes +records+ from this association calling +before_remove+ and @@ -3227,7 +3347,7 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # are actually removed from the database, that depends precisely on # +delete_records+. They are in any case removed from the collection. # - # source://activerecord/lib/active_record/associations/collection_association.rb#184 + # source://activerecord/lib/active_record/associations/collection_association.rb#186 def delete(*records); end # Removes all records from the association without calling callbacks @@ -3244,7 +3364,7 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # # See delete for more info. # - # source://activerecord/lib/active_record/associations/collection_association.rb#148 + # source://activerecord/lib/active_record/associations/collection_association.rb#150 def delete_all(dependent = T.unsafe(nil)); end # Deletes the +records+ and removes them from this association calling @@ -3253,14 +3373,14 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # Note that this method removes records from the database ignoring the # +:dependent+ option. # - # source://activerecord/lib/active_record/associations/collection_association.rb#193 + # source://activerecord/lib/active_record/associations/collection_association.rb#195 def destroy(*records); end # Destroy all the records from this association. # # See destroy for more info. # - # source://activerecord/lib/active_record/associations/collection_association.rb#170 + # source://activerecord/lib/active_record/associations/collection_association.rb#172 def destroy_all; end # Returns true if the collection is empty. @@ -3274,55 +3394,61 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # # @return [Boolean] # - # source://activerecord/lib/active_record/associations/collection_association.rb#230 + # source://activerecord/lib/active_record/associations/collection_association.rb#232 def empty?; end - # source://activerecord/lib/active_record/associations/collection_association.rb#92 + # source://activerecord/lib/active_record/associations/collection_association.rb#94 def find(*args); end # @return [Boolean] # - # source://activerecord/lib/active_record/associations/collection_association.rb#304 + # source://activerecord/lib/active_record/associations/collection_association.rb#308 def find_from_target?; end # Implements the ids reader method, e.g. foo.item_ids for Foo.has_many :items # - # source://activerecord/lib/active_record/associations/collection_association.rb#49 + # source://activerecord/lib/active_record/associations/collection_association.rb#51 def ids_reader; end # Implements the ids writer method, e.g. foo.item_ids= for Foo.has_many :items # - # source://activerecord/lib/active_record/associations/collection_association.rb#60 + # source://activerecord/lib/active_record/associations/collection_association.rb#62 def ids_writer(ids); end # @return [Boolean] # - # source://activerecord/lib/active_record/associations/collection_association.rb#256 + # source://activerecord/lib/active_record/associations/collection_association.rb#258 def include?(record); end - # source://activerecord/lib/active_record/associations/collection_association.rb#268 + # source://activerecord/lib/active_record/associations/collection_association.rb#272 def load_target; end + # source://activerecord/lib/active_record/associations/collection_association.rb#31 + def nested_attributes_target; end + + # source://activerecord/lib/active_record/associations/collection_association.rb#31 + def nested_attributes_target=(_arg0); end + # @return [Boolean] # - # source://activerecord/lib/active_record/associations/collection_association.rb#300 + # source://activerecord/lib/active_record/associations/collection_association.rb#304 def null_scope?; end # Implements the reader method, e.g. foo.items for Foo.has_many :items # - # source://activerecord/lib/active_record/associations/collection_association.rb#32 + # source://activerecord/lib/active_record/associations/collection_association.rb#34 def reader; end # Replace this collection with +other_array+. This will perform a diff # and delete/add only records that have changed. # - # source://activerecord/lib/active_record/associations/collection_association.rb#240 + # source://activerecord/lib/active_record/associations/collection_association.rb#242 def replace(other_array); end - # source://activerecord/lib/active_record/associations/collection_association.rb#85 + # source://activerecord/lib/active_record/associations/collection_association.rb#87 def reset; end - # source://activerecord/lib/active_record/associations/collection_association.rb#294 + # source://activerecord/lib/active_record/associations/collection_association.rb#298 def scope; end # Returns the size of the collection by executing a SELECT COUNT(*) @@ -3336,34 +3462,34 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # This method is abstract in the sense that it relies on # +count_records+, which is a method descendants have to provide. # - # source://activerecord/lib/active_record/associations/collection_association.rb#207 + # source://activerecord/lib/active_record/associations/collection_association.rb#209 def size; end - # source://activerecord/lib/active_record/associations/collection_association.rb#281 + # source://activerecord/lib/active_record/associations/collection_association.rb#285 def target=(record); end # Implements the writer method, e.g. foo.items= for Foo.has_many :items # - # source://activerecord/lib/active_record/associations/collection_association.rb#44 + # source://activerecord/lib/active_record/associations/collection_association.rb#46 def writer(records); end private - # source://activerecord/lib/active_record/associations/collection_association.rb#346 + # source://activerecord/lib/active_record/associations/collection_association.rb#354 def _create_record(attributes, raise = T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/associations/collection_association.rb#484 + # source://activerecord/lib/active_record/associations/collection_association.rb#492 def callback(method, record); end - # source://activerecord/lib/active_record/associations/collection_association.rb#490 + # source://activerecord/lib/active_record/associations/collection_association.rb#498 def callbacks_for(callback_name); end # @raise [ActiveRecord::Rollback] # - # source://activerecord/lib/active_record/associations/collection_association.rb#430 + # source://activerecord/lib/active_record/associations/collection_association.rb#438 def concat_records(records, raise = T.unsafe(nil)); end - # source://activerecord/lib/active_record/associations/collection_association.rb#377 + # source://activerecord/lib/active_record/associations/collection_association.rb#385 def delete_or_destroy(records, method); end # Delete the given records from the association, @@ -3372,23 +3498,23 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/associations/collection_association.rb#406 + # source://activerecord/lib/active_record/associations/collection_association.rb#414 def delete_records(records, method); end # If the :inverse_of option has been # specified, then #find scans the entire collection. # - # source://activerecord/lib/active_record/associations/collection_association.rb#513 + # source://activerecord/lib/active_record/associations/collection_association.rb#521 def find_by_scan(*args); end # @return [Boolean] # - # source://activerecord/lib/active_record/associations/collection_association.rb#499 + # source://activerecord/lib/active_record/associations/collection_association.rb#507 def include_in_memory?(record); end # Do the relevant stuff to insert the given record into the association collection. # - # source://activerecord/lib/active_record/associations/collection_association.rb#369 + # source://activerecord/lib/active_record/associations/collection_association.rb#377 def insert_record(record, validate = T.unsafe(nil), raise = T.unsafe(nil), &block); end # We have some records loaded from the database (persisted) and some that are @@ -3402,22 +3528,22 @@ class ActiveRecord::Associations::CollectionAssociation < ::ActiveRecord::Associ # * Any changes made to attributes on objects in the memory array are to be preserved # * Otherwise, attributes should have the value found in the database # - # source://activerecord/lib/active_record/associations/collection_association.rb#327 + # source://activerecord/lib/active_record/associations/collection_association.rb#335 def merge_target_lists(persisted, memory); end - # source://activerecord/lib/active_record/associations/collection_association.rb#391 + # source://activerecord/lib/active_record/associations/collection_association.rb#399 def remove_records(existing_records, records, method); end - # source://activerecord/lib/active_record/associations/collection_association.rb#422 + # source://activerecord/lib/active_record/associations/collection_association.rb#430 def replace_common_records_in_memory(new_target, original_target); end - # source://activerecord/lib/active_record/associations/collection_association.rb#449 + # source://activerecord/lib/active_record/associations/collection_association.rb#457 def replace_on_target(record, skip_callbacks, replace:, inversing: T.unsafe(nil)); end - # source://activerecord/lib/active_record/associations/collection_association.rb#410 + # source://activerecord/lib/active_record/associations/collection_association.rb#418 def replace_records(new_target, original_target); end - # source://activerecord/lib/active_record/associations/collection_association.rb#313 + # source://activerecord/lib/active_record/associations/collection_association.rb#321 def transaction(&block); end end @@ -3477,7 +3603,7 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # # # # ] # - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1036 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1049 def <<(*records); end # Equivalent to Array#==. Returns +true+ if the two arrays @@ -3508,28 +3634,31 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # person.pets == other # # => true # - # source://activerecord/lib/active_record/associations/collection_proxy.rb#967 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#980 def ==(other); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def _select!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 + def all(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def and(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def and!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def annotate(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def annotate!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def annotate_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def annotate_values=(arg); end # Adds one or more +records+ to the collection by setting their foreign keys @@ -3554,10 +3683,10 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # # # # ] # - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1036 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1049 def append(*records); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def arel(*_arg0, **_arg1, &_arg2); end # Returns a new object of the collection type that has been instantiated @@ -3600,7 +3729,7 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # running an SQL query into the database, the +updated_at+ column of # the object is not changed. # - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1053 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1066 def clear; end # Adds one or more +records+ to the collection by setting their foreign keys @@ -3625,10 +3754,10 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # # # # ] # - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1036 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1049 def concat(*records); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def construct_join_dependency(*_arg0, **_arg1, &_arg2); end # Returns a new object of the collection type that has been instantiated with @@ -3677,16 +3806,16 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # source://activerecord/lib/active_record/associations/collection_proxy.rb#365 def create!(attributes = T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def create_with(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def create_with!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def create_with_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def create_with_value=(arg); end # Deletes the +records+ supplied from the collection according to the strategy @@ -3990,28 +4119,28 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # source://activerecord/lib/active_record/associations/collection_proxy.rb#501 def destroy_all; end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def distinct(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def distinct!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def distinct_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def distinct_value=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def eager_load(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def eager_load!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def eager_load_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def eager_load_values=(arg); end # Returns +true+ if the collection is empty. If the collection has been @@ -4038,31 +4167,31 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # source://activerecord/lib/active_record/associations/collection_proxy.rb#831 def empty?; end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def except(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def excluding(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def excluding!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def extending(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def extending!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def extending_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def extending_values=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def extensions(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def extract_associated(*_arg0, **_arg1, &_arg2); end # Finds an object in the collection responding to the +id+. Uses the same @@ -4095,43 +4224,43 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # source://activerecord/lib/active_record/associations/collection_proxy.rb#138 def find(*args); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def from(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def from!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def from_clause(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def from_clause=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def group(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def group!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def group_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def group_values=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def having(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def having!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def having_clause(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def having_clause=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def in_order_of(*_arg0, **_arg1, &_arg2); end # Returns +true+ if the given +record+ is present in the collection. @@ -4150,49 +4279,49 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # source://activerecord/lib/active_record/associations/collection_proxy.rb#927 def include?(record); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def includes(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def includes!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def includes_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def includes_values=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def insert(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def insert!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def insert_all(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def insert_all!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1105 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1118 def inspect; end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def invert_where(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def invert_where!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def joins(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def joins!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def joins_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def joins_values=(arg); end # Returns the last record, or the last +n+ records, from the collection. @@ -4225,34 +4354,34 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # source://activerecord/lib/active_record/associations/collection_proxy.rb#259 def last(limit = T.unsafe(nil)); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def left_joins(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def left_outer_joins(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def left_outer_joins!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def left_outer_joins_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def left_outer_joins_values=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def limit(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def limit!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def limit_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def limit_value=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def load_async(*_arg0, **_arg1, &_arg2); end # source://activerecord/lib/active_record/associations/collection_proxy.rb#44 @@ -4280,22 +4409,22 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # source://activerecord/lib/active_record/associations/collection_proxy.rb#53 def loaded?; end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def lock(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def lock!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def lock_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def lock_value=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def merge(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def merge!(*_arg0, **_arg1, &_arg2); end # Returns a new object of the collection type that has been instantiated @@ -4326,84 +4455,98 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # source://activerecord/lib/active_record/associations/collection_proxy.rb#318 def new(attributes = T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def none(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def none!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def null_relation?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def offset(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def offset!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def offset_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def offset_value=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def only(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def optimizer_hints(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def optimizer_hints!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def optimizer_hints_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def optimizer_hints_values=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def or(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def or!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def order(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def order!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def order_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def order_values=(arg); end # source://activerecord/lib/active_record/associations/collection_proxy.rb#728 def pluck(*column_names); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def preload(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def preload!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def preload_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def preload_values=(arg); end # @raise [NoMethodError] # - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1043 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1056 def prepend(*args); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1110 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1123 def pretty_print(pp); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#931 + # Returns the association object for the collection. + # + # class Person < ActiveRecord::Base + # has_many :pets + # end + # + # person.pets.proxy_association + # # => # + # + # Returns the same object as person.association(:pets), + # allowing you to make calls like person.pets.proxy_association.owner. + # + # See Associations::ClassMethods@Association+extensions for more. + # + # source://activerecord/lib/active_record/associations/collection_proxy.rb#944 def proxy_association; end # Adds one or more +records+ to the collection by setting their foreign keys @@ -4428,19 +4571,19 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # # # # ] # - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1036 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1049 def push(*records); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def readonly(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def readonly!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def readonly_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def readonly_value=(arg); end # :method: to_ary @@ -4482,25 +4625,25 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # # # # # ] # - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1011 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1024 def records; end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def references(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def references!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def references_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def references_values=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def regroup(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def regroup!(*_arg0, **_arg1, &_arg2); end # Reloads the collection from the database. Returns +self+. @@ -4518,19 +4661,19 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # person.pets.reload # fetches pets from the database # # => [#] # - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1072 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1085 def reload; end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def reorder(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def reorder!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def reordering_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def reordering_value=(arg); end # Replaces this collection with +other_array+. This will perform a diff @@ -4559,10 +4702,10 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # source://activerecord/lib/active_record/associations/collection_proxy.rb#391 def replace(other_array); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def reselect(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def reselect!(*_arg0, **_arg1, &_arg2); end # Unloads the association. Returns +self+. @@ -4582,39 +4725,39 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # person.pets # fetches pets from the database # # => [#] # - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1093 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1106 def reset; end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1099 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1112 def reset_scope; end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def reverse_order(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def reverse_order!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def reverse_order_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def reverse_order_value=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def rewhere(*_arg0, **_arg1, &_arg2); end # Returns a Relation object for the records in this association # - # source://activerecord/lib/active_record/associations/collection_proxy.rb#936 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#949 def scope; end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def scoping(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def select_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def select_values=(arg); end # Returns the size of the collection. If the collection hasn't been loaded, @@ -4645,34 +4788,34 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # source://activerecord/lib/active_record/associations/collection_proxy.rb#782 def size; end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def skip_preloading!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def skip_query_cache!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def skip_query_cache_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def skip_query_cache_value=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def spawn(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def strict_loading(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def strict_loading!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def strict_loading_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def strict_loading_value=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def structurally_compatible?(*_arg0, **_arg1, &_arg2); end # Gives a record (or N records if a parameter is supplied) from the collection @@ -4707,76 +4850,82 @@ class ActiveRecord::Associations::CollectionProxy < ::ActiveRecord::Relation # source://activerecord/lib/active_record/associations/collection_proxy.rb#40 def target; end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def uniq!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def unscope(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def unscope!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def unscope_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def unscope_values=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def upsert(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def upsert_all(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def where(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def where!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def where_clause(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def where_clause=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def with(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def with!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 + def with_recursive(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 + def with_recursive!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def with_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def with_values=(arg); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1124 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 def without(*_arg0, **_arg1, &_arg2); end private - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1145 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1158 def exec_queries; end # @return [Boolean] # - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1141 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1154 def find_from_target?; end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1132 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1145 def find_nth_from_last(index); end - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1127 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1140 def find_nth_with_limit(index, limit); end # @return [Boolean] # - # source://activerecord/lib/active_record/associations/collection_proxy.rb#1137 + # source://activerecord/lib/active_record/associations/collection_proxy.rb#1150 def null_scope?; end end @@ -4930,8 +5079,10 @@ class ActiveRecord::Associations::HasManyThroughAssociation < ::ActiveRecord::As # source://activerecord/lib/active_record/associations/has_many_through_association.rb#187 def distribution(array); end + # @raise [NotImplementedError] + # # source://activerecord/lib/active_record/associations/has_many_through_association.rb#219 - def find_target; end + def find_target(async: T.unsafe(nil)); end # source://activerecord/lib/active_record/associations/has_many_through_association.rb#177 def intersection(a, b); end @@ -4940,7 +5091,7 @@ class ActiveRecord::Associations::HasManyThroughAssociation < ::ActiveRecord::As # # @return [Boolean] # - # source://activerecord/lib/active_record/associations/has_many_through_association.rb#226 + # source://activerecord/lib/active_record/associations/has_many_through_association.rb#227 def invertible_for?(record); end # source://activerecord/lib/active_record/associations/has_many_through_association.rb#183 @@ -5082,7 +5233,7 @@ class ActiveRecord::Associations::JoinDependency # source://activerecord/lib/active_record/associations/join_dependency.rb#242 def construct(ar_parent, parent, row, seen, model_cache, strict_loading_value); end - # source://activerecord/lib/active_record/associations/join_dependency.rb#280 + # source://activerecord/lib/active_record/associations/join_dependency.rb#278 def construct_model(record, node, row, model_cache, id, strict_loading_value); end # source://activerecord/lib/active_record/associations/join_dependency.rb#223 @@ -5214,7 +5365,7 @@ class ActiveRecord::Associations::JoinDependency::JoinAssociation < ::ActiveReco # @return [Boolean] # - # source://activerecord/lib/active_record/associations/join_dependency/join_association.rb#78 + # source://activerecord/lib/active_record/associations/join_dependency/join_association.rb#81 def readonly?; end # Returns the value of attribute reflection. @@ -5224,7 +5375,7 @@ class ActiveRecord::Associations::JoinDependency::JoinAssociation < ::ActiveReco # @return [Boolean] # - # source://activerecord/lib/active_record/associations/join_dependency/join_association.rb#84 + # source://activerecord/lib/active_record/associations/join_dependency/join_association.rb#87 def strict_loading?; end # Returns the value of attribute table. @@ -5246,8 +5397,8 @@ class ActiveRecord::Associations::JoinDependency::JoinAssociation < ::ActiveReco private - # source://activerecord/lib/active_record/associations/join_dependency/join_association.rb#91 - def append_constraints(join, constraints); end + # source://activerecord/lib/active_record/associations/join_dependency/join_association.rb#94 + def append_constraints(connection, join, constraints); end end # source://activerecord/lib/active_record/associations/join_dependency/join_base.rb#8 @@ -5338,6 +5489,33 @@ class ActiveRecord::Associations::JoinDependency::JoinPart def table_name(*_arg0, **_arg1, &_arg2); end end +# source://activerecord/lib/active_record/associations/nested_error.rb#7 +class ActiveRecord::Associations::NestedError < ::ActiveModel::NestedError + # @return [NestedError] a new instance of NestedError + # + # source://activerecord/lib/active_record/associations/nested_error.rb#8 + def initialize(association, inner_error); end + + private + + # Returns the value of attribute association. + # + # source://activerecord/lib/active_record/associations/nested_error.rb#16 + def association; end + + # source://activerecord/lib/active_record/associations/nested_error.rb#18 + def compute_attribute(inner_error); end + + # source://activerecord/lib/active_record/associations/nested_error.rb#33 + def index; end + + # source://activerecord/lib/active_record/associations/nested_error.rb#28 + def index_errors_setting; end + + # source://activerecord/lib/active_record/associations/nested_error.rb#37 + def ordered_records; end +end + # = Active Record \Preloader # # Implements the details of eager loading of Active Record associations. @@ -5535,24 +5713,24 @@ class ActiveRecord::Associations::Preloader::Association # source://activerecord/lib/active_record/associations/preloader/association.rb#245 def associate_records_to_owner(owner, records); end - # source://activerecord/lib/active_record/associations/preloader/association.rb#281 + # source://activerecord/lib/active_record/associations/preloader/association.rb#282 def association_key_type; end - # source://activerecord/lib/active_record/associations/preloader/association.rb#293 + # source://activerecord/lib/active_record/associations/preloader/association.rb#294 def build_scope; end - # source://activerecord/lib/active_record/associations/preloader/association.rb#309 + # source://activerecord/lib/active_record/associations/preloader/association.rb#310 def cascade_strict_loading(scope); end - # source://activerecord/lib/active_record/associations/preloader/association.rb#273 + # source://activerecord/lib/active_record/associations/preloader/association.rb#274 def convert_key(key); end - # source://activerecord/lib/active_record/associations/preloader/association.rb#265 + # source://activerecord/lib/active_record/associations/preloader/association.rb#266 def derive_key(owner, key); end # @return [Boolean] # - # source://activerecord/lib/active_record/associations/preloader/association.rb#257 + # source://activerecord/lib/active_record/associations/preloader/association.rb#258 def key_conversion_required?; end # Returns the value of attribute model. @@ -5565,7 +5743,7 @@ class ActiveRecord::Associations::Preloader::Association # source://activerecord/lib/active_record/associations/preloader/association.rb#241 def owner_key_name; end - # source://activerecord/lib/active_record/associations/preloader/association.rb#285 + # source://activerecord/lib/active_record/associations/preloader/association.rb#286 def owner_key_type; end # Returns the value of attribute owners. @@ -5583,7 +5761,7 @@ class ActiveRecord::Associations::Preloader::Association # source://activerecord/lib/active_record/associations/preloader/association.rb#238 def reflection; end - # source://activerecord/lib/active_record/associations/preloader/association.rb#289 + # source://activerecord/lib/active_record/associations/preloader/association.rb#290 def reflection_scope; end end @@ -5709,22 +5887,22 @@ class ActiveRecord::Associations::Preloader::Branch # @return [Boolean] # - # source://activerecord/lib/active_record/associations/preloader/branch.rb#66 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#72 def done?; end - # source://activerecord/lib/active_record/associations/preloader/branch.rb#21 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#27 def future_classes; end - # source://activerecord/lib/active_record/associations/preloader/branch.rb#74 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#80 def grouped_records; end - # source://activerecord/lib/active_record/associations/preloader/branch.rb#25 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#31 def immediate_future_classes; end - # source://activerecord/lib/active_record/associations/preloader/branch.rb#47 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#53 def likely_reflections; end - # source://activerecord/lib/active_record/associations/preloader/branch.rb#112 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#118 def loaders; end # Returns the value of attribute parent. @@ -5734,10 +5912,10 @@ class ActiveRecord::Associations::Preloader::Branch # @return [Boolean] # - # source://activerecord/lib/active_record/associations/preloader/branch.rb#102 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#108 def polymorphic?; end - # source://activerecord/lib/active_record/associations/preloader/branch.rb#62 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#68 def preloaded_records; end # Sets the attribute preloaded_records @@ -5747,15 +5925,15 @@ class ActiveRecord::Associations::Preloader::Branch # source://activerecord/lib/active_record/associations/preloader/branch.rb#9 def preloaded_records=(_arg0); end - # source://activerecord/lib/active_record/associations/preloader/branch.rb#85 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#91 def preloaders_for_reflection(reflection, reflection_records); end # @return [Boolean] # - # source://activerecord/lib/active_record/associations/preloader/branch.rb#54 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#60 def root?; end - # source://activerecord/lib/active_record/associations/preloader/branch.rb#70 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#76 def runnable_loaders; end # Returns the value of attribute scope. @@ -5763,28 +5941,28 @@ class ActiveRecord::Associations::Preloader::Branch # source://activerecord/lib/active_record/associations/preloader/branch.rb#8 def scope; end - # source://activerecord/lib/active_record/associations/preloader/branch.rb#58 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#64 def source_records; end - # source://activerecord/lib/active_record/associations/preloader/branch.rb#37 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#43 def target_classes; end private - # source://activerecord/lib/active_record/associations/preloader/branch.rb#120 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#126 def build_children(children); end # Returns a class containing the logic needed to load preload the data # and attach it to a relation. The class returned implements a `run` method # that accepts a preloader. # - # source://activerecord/lib/active_record/associations/preloader/branch.rb#137 + # source://activerecord/lib/active_record/associations/preloader/branch.rb#143 def preloader_for(reflection); end end # source://activerecord/lib/active_record/associations/preloader/through_association.rb#6 class ActiveRecord::Associations::Preloader::ThroughAssociation < ::ActiveRecord::Associations::Preloader::Association - # source://activerecord/lib/active_record/associations/preloader/through_association.rb#51 + # source://activerecord/lib/active_record/associations/preloader/through_association.rb#49 def future_classes; end # source://activerecord/lib/active_record/associations/preloader/through_association.rb#7 @@ -5793,53 +5971,53 @@ class ActiveRecord::Associations::Preloader::ThroughAssociation < ::ActiveRecord # source://activerecord/lib/active_record/associations/preloader/through_association.rb#11 def records_by_owner; end - # source://activerecord/lib/active_record/associations/preloader/through_association.rb#41 + # source://activerecord/lib/active_record/associations/preloader/through_association.rb#39 def runnable_loaders; end private # @return [Boolean] # - # source://activerecord/lib/active_record/associations/preloader/through_association.rb#67 + # source://activerecord/lib/active_record/associations/preloader/through_association.rb#65 def data_available?; end - # source://activerecord/lib/active_record/associations/preloader/through_association.rb#76 + # source://activerecord/lib/active_record/associations/preloader/through_association.rb#74 def middle_records; end - # source://activerecord/lib/active_record/associations/preloader/through_association.rb#100 + # source://activerecord/lib/active_record/associations/preloader/through_association.rb#98 def preload_index; end - # source://activerecord/lib/active_record/associations/preloader/through_association.rb#72 + # source://activerecord/lib/active_record/associations/preloader/through_association.rb#70 def source_preloaders; end - # source://activerecord/lib/active_record/associations/preloader/through_association.rb#92 + # source://activerecord/lib/active_record/associations/preloader/through_association.rb#90 def source_records_by_owner; end - # source://activerecord/lib/active_record/associations/preloader/through_association.rb#88 + # source://activerecord/lib/active_record/associations/preloader/through_association.rb#86 def source_reflection; end - # source://activerecord/lib/active_record/associations/preloader/through_association.rb#80 + # source://activerecord/lib/active_record/associations/preloader/through_association.rb#78 def through_preloaders; end - # source://activerecord/lib/active_record/associations/preloader/through_association.rb#96 + # source://activerecord/lib/active_record/associations/preloader/through_association.rb#94 def through_records_by_owner; end - # source://activerecord/lib/active_record/associations/preloader/through_association.rb#84 + # source://activerecord/lib/active_record/associations/preloader/through_association.rb#82 def through_reflection; end - # source://activerecord/lib/active_record/associations/preloader/through_association.rb#106 + # source://activerecord/lib/active_record/associations/preloader/through_association.rb#104 def through_scope; end end # source://activerecord/lib/active_record/associations/singular_association.rb#6 class ActiveRecord::Associations::SingularAssociation < ::ActiveRecord::Associations::Association - # source://activerecord/lib/active_record/associations/singular_association.rb#22 + # source://activerecord/lib/active_record/associations/singular_association.rb#29 def build(attributes = T.unsafe(nil), &block); end # Implements the reload reader method, e.g. foo.reload_bar for # Foo.has_one :bar # - # source://activerecord/lib/active_record/associations/singular_association.rb#30 + # source://activerecord/lib/active_record/associations/singular_association.rb#37 def force_reload_reader; end # Implements the reader method, e.g. foo.bar for Foo.has_one :bar @@ -5847,30 +6025,35 @@ class ActiveRecord::Associations::SingularAssociation < ::ActiveRecord::Associat # source://activerecord/lib/active_record/associations/singular_association.rb#7 def reader; end - # Implements the writer method, e.g. foo.bar= for Foo.belongs_to :bar + # Resets the \loaded flag to +false+ and sets the \target to +nil+. # # source://activerecord/lib/active_record/associations/singular_association.rb#18 + def reset; end + + # Implements the writer method, e.g. foo.bar= for Foo.belongs_to :bar + # + # source://activerecord/lib/active_record/associations/singular_association.rb#25 def writer(record); end private # @raise [RecordInvalid] # - # source://activerecord/lib/active_record/associations/singular_association.rb#56 + # source://activerecord/lib/active_record/associations/singular_association.rb#67 def _create_record(attributes, raise_error = T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/associations/singular_association.rb#40 - def find_target; end + # source://activerecord/lib/active_record/associations/singular_association.rb#47 + def find_target(async: T.unsafe(nil)); end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/associations/singular_association.rb#48 + # source://activerecord/lib/active_record/associations/singular_association.rb#59 def replace(record); end - # source://activerecord/lib/active_record/associations/singular_association.rb#36 + # source://activerecord/lib/active_record/associations/singular_association.rb#43 def scope_for_create; end - # source://activerecord/lib/active_record/associations/singular_association.rb#52 + # source://activerecord/lib/active_record/associations/singular_association.rb#63 def set_new_record(record); end end @@ -5937,79 +6120,64 @@ module ActiveRecord::Associations::ThroughAssociation def transaction(&block); end end -# source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#4 +# source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#7 class ActiveRecord::AsynchronousQueriesTracker # @return [AsynchronousQueriesTracker] a new instance of AsynchronousQueriesTracker # - # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#46 + # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#45 def initialize; end - # Returns the value of attribute current_session. - # - # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#44 + # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#49 def current_session; end - # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#55 - def finalize_session; end + # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#58 + def finalize_session(wait = T.unsafe(nil)); end - # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#50 + # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#53 def start_session; end class << self - # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#39 + # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#40 def complete(asynchronous_queries_tracker); end - # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#31 + # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#32 def install_executor_hooks(executor = T.unsafe(nil)); end - # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#35 + # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#36 def run; end end end -# source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#5 -module ActiveRecord::AsynchronousQueriesTracker::NullSession - class << self - # @return [Boolean] - # - # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#7 - def active?; end - - # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#11 - def finalize; end - end -end - -# source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#16 +# source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#8 class ActiveRecord::AsynchronousQueriesTracker::Session # @return [Session] a new instance of Session # - # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#17 + # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#9 def initialize; end # @return [Boolean] # - # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#21 + # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#14 def active?; end - # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#25 - def finalize; end + # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#22 + def finalize(wait = T.unsafe(nil)); end + + # source://activerecord/lib/active_record/asynchronous_queries_tracker.rb#18 + def synchronize(&block); end end # AsynchronousQueryInsideTransactionError will be raised when attempting # to perform an asynchronous query from inside a transaction # -# source://activerecord/lib/active_record/errors.rb#509 +# source://activerecord/lib/active_record/errors.rb#536 class ActiveRecord::AsynchronousQueryInsideTransactionError < ::ActiveRecord::ActiveRecordError; end # source://activerecord/lib/active_record/attribute_assignment.rb#4 module ActiveRecord::AttributeAssignment - include ::ActiveModel::ForbiddenAttributesProtection - include ::ActiveModel::AttributeAssignment - private - # source://activerecord/lib/active_record/attribute_assignment.rb#8 + # source://activerecord/lib/active_record/attribute_assignment.rb#6 def _assign_attributes(attributes); end # Instantiates objects for all attribute classes that needs more than one constructor parameter. This is done @@ -6019,24 +6187,24 @@ module ActiveRecord::AttributeAssignment # parentheses to have the parameters typecasted before they're used in the constructor. Use i for Integer and # f for Float. If all the values for a given attribute are empty, the attribute will be set to +nil+. # - # source://activerecord/lib/active_record/attribute_assignment.rb#38 + # source://activerecord/lib/active_record/attribute_assignment.rb#36 def assign_multiparameter_attributes(pairs); end # Assign any deferred nested attributes after the base attributes have been set. # - # source://activerecord/lib/active_record/attribute_assignment.rb#28 + # source://activerecord/lib/active_record/attribute_assignment.rb#26 def assign_nested_parameter_attributes(pairs); end - # source://activerecord/lib/active_record/attribute_assignment.rb#44 + # source://activerecord/lib/active_record/attribute_assignment.rb#42 def execute_callstack_for_multiparameter_attributes(callstack); end - # source://activerecord/lib/active_record/attribute_assignment.rb#62 + # source://activerecord/lib/active_record/attribute_assignment.rb#60 def extract_callstack_for_multiparameter_attributes(pairs); end - # source://activerecord/lib/active_record/attribute_assignment.rb#80 + # source://activerecord/lib/active_record/attribute_assignment.rb#78 def find_parameter_position(multiparameter_name); end - # source://activerecord/lib/active_record/attribute_assignment.rb#76 + # source://activerecord/lib/active_record/attribute_assignment.rb#74 def type_cast_attribute_value(multiparameter_name, value); end end @@ -6044,27 +6212,27 @@ end # {ActiveRecord::Base#attributes=}[rdoc-ref:AttributeAssignment#attributes=] method. # The exception has an +attribute+ property that is the name of the offending attribute. # -# source://activerecord/lib/active_record/errors.rb#422 +# source://activerecord/lib/active_record/errors.rb#449 class ActiveRecord::AttributeAssignmentError < ::ActiveRecord::ActiveRecordError # @return [AttributeAssignmentError] a new instance of AttributeAssignmentError # - # source://activerecord/lib/active_record/errors.rb#425 + # source://activerecord/lib/active_record/errors.rb#452 def initialize(message = T.unsafe(nil), exception = T.unsafe(nil), attribute = T.unsafe(nil)); end # Returns the value of attribute attribute. # - # source://activerecord/lib/active_record/errors.rb#423 + # source://activerecord/lib/active_record/errors.rb#450 def attribute; end # Returns the value of attribute exception. # - # source://activerecord/lib/active_record/errors.rb#423 + # source://activerecord/lib/active_record/errors.rb#450 def exception; end end # = Active Record Attribute Methods # -# source://activerecord/lib/active_record/attribute_methods.rb#8 +# source://activerecord/lib/active_record/attribute_methods.rb#7 module ActiveRecord::AttributeMethods extend ::ActiveSupport::Concern extend ::ActiveSupport::Autoload @@ -6111,7 +6279,7 @@ module ActiveRecord::AttributeMethods # person[:organization_id] # => ActiveModel::MissingAttributeError: missing attribute 'organization_id' for Person # person[:id] # => nil # - # source://activerecord/lib/active_record/attribute_methods.rb#412 + # source://activerecord/lib/active_record/attribute_methods.rb#414 def [](attr_name); end # Updates the attribute identified by +attr_name+ using the specified @@ -6124,12 +6292,12 @@ module ActiveRecord::AttributeMethods # person[:date_of_birth] = "2004-12-12" # person[:date_of_birth] # => Date.new(2004, 12, 12) # - # source://activerecord/lib/active_record/attribute_methods.rb#425 + # source://activerecord/lib/active_record/attribute_methods.rb#427 def []=(attr_name, value); end # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods.rb#319 + # source://activerecord/lib/active_record/attribute_methods.rb#321 def _has_attribute?(attr_name); end # Returns the name of all database fields which have been read from this @@ -6161,7 +6329,7 @@ module ActiveRecord::AttributeMethods # end # end # - # source://activerecord/lib/active_record/attribute_methods.rb#457 + # source://activerecord/lib/active_record/attribute_methods.rb#459 def accessed_fields; end # Returns an #inspect-like string for the value of the @@ -6180,7 +6348,7 @@ module ActiveRecord::AttributeMethods # person.attribute_for_inspect(:tag_ids) # # => "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]" # - # source://activerecord/lib/active_record/attribute_methods.rb#362 + # source://activerecord/lib/active_record/attribute_methods.rb#364 def attribute_for_inspect(attr_name); end # Returns an array of names for the attributes available on this object. @@ -6192,7 +6360,7 @@ module ActiveRecord::AttributeMethods # person.attribute_names # # => ["id", "created_at", "updated_at", "name", "age"] # - # source://activerecord/lib/active_record/attribute_methods.rb#331 + # source://activerecord/lib/active_record/attribute_methods.rb#333 def attribute_names; end # Returns +true+ if the specified +attribute+ has been set by the user or by a @@ -6213,7 +6381,7 @@ module ActiveRecord::AttributeMethods # # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods.rb#384 + # source://activerecord/lib/active_record/attribute_methods.rb#386 def attribute_present?(attr_name); end # Returns a hash of all the attributes with their names as keys and the values of the attributes as values. @@ -6225,7 +6393,7 @@ module ActiveRecord::AttributeMethods # person.attributes # # => {"id"=>3, "created_at"=>Sun, 21 Oct 2012 04:53:04, "updated_at"=>Sun, 21 Oct 2012 04:53:04, "name"=>"Francesco", "age"=>22} # - # source://activerecord/lib/active_record/attribute_methods.rb#343 + # source://activerecord/lib/active_record/attribute_methods.rb#345 def attributes; end # Returns +true+ if the given attribute is in the attributes hash, otherwise +false+. @@ -6242,7 +6410,7 @@ module ActiveRecord::AttributeMethods # # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods.rb#313 + # source://activerecord/lib/active_record/attribute_methods.rb#315 def has_attribute?(attr_name); end # A Person object with a name attribute can ask person.respond_to?(:name), @@ -6264,40 +6432,48 @@ module ActiveRecord::AttributeMethods # # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods.rb#286 + # source://activerecord/lib/active_record/attribute_methods.rb#290 def respond_to?(name, include_private = T.unsafe(nil)); end private # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods.rb#462 + # source://activerecord/lib/active_record/attribute_methods.rb#494 def attribute_method?(attr_name); end # Filters out the virtual columns and also primary keys, from the attribute names, when the primary # key is to be generated (e.g. the id attribute has no value). # - # source://activerecord/lib/active_record/attribute_methods.rb#483 + # source://activerecord/lib/active_record/attribute_methods.rb#514 def attributes_for_create(attribute_names); end # Filters the primary keys, readonly attributes and virtual columns from the attribute names. # - # source://activerecord/lib/active_record/attribute_methods.rb#472 + # source://activerecord/lib/active_record/attribute_methods.rb#503 def attributes_for_update(attribute_names); end - # source://activerecord/lib/active_record/attribute_methods.rb#467 + # source://activerecord/lib/active_record/attribute_methods.rb#498 def attributes_with_values(attribute_names); end - # source://activerecord/lib/active_record/attribute_methods.rb#491 + # source://activerecord/lib/active_record/attribute_methods.rb#522 def format_for_inspect(name, value); end + # source://activerecord/lib/active_record/attribute_methods.rb#474 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods.rb#507 + # source://activerecord/lib/active_record/attribute_methods.rb#538 def pk_attribute?(name); end + # @return [Boolean] + # + # source://activerecord/lib/active_record/attribute_methods.rb#464 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + class << self - # source://activerecord/lib/active_record/attribute_methods.rb#31 + # source://activerecord/lib/active_record/attribute_methods.rb#30 def dangerous_attribute_methods; end end @@ -6439,17 +6615,32 @@ module ActiveRecord::AttributeMethods::BeforeTypeCast def attribute_for_database(attr_name); end end -# source://activerecord/lib/active_record/attribute_methods.rb#42 +# source://activerecord/lib/active_record/attribute_methods.rb#41 module ActiveRecord::AttributeMethods::ClassMethods # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods.rb#255 + # source://activerecord/lib/active_record/attribute_methods.rb#259 def _has_attribute?(attr_name); end - # source://activerecord/lib/active_record/attribute_methods.rb#53 + # Allows you to make aliases for attributes. + # + # class Person < ActiveRecord::Base + # alias_attribute :nickname, :name + # end + # + # person = Person.create(name: 'Bob') + # person.name # => "Bob" + # person.nickname # => "Bob" + # + # The alias can also be used for querying: + # + # Person.where(nickname: "Bob") + # # SELECT "people".* FROM "people" WHERE "people"."name" = "Bob" + # + # source://activerecord/lib/active_record/attribute_methods.rb#66 def alias_attribute(new_name, old_name); end - # source://activerecord/lib/active_record/attribute_methods.rb#85 + # source://activerecord/lib/active_record/attribute_methods.rb#87 def alias_attribute_method_definition(code_generator, pattern, new_name, old_name); end # Returns +true+ if +attribute+ is an attribute method and table exists, @@ -6464,9 +6655,14 @@ module ActiveRecord::AttributeMethods::ClassMethods # # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods.rb#219 + # source://activerecord/lib/active_record/attribute_methods.rb#223 def attribute_method?(attribute); end + # @return [Boolean] + # + # source://activerecord/lib/active_record/attribute_methods.rb#98 + def attribute_methods_generated?; end + # Returns an array of column names as strings if it's not an abstract class and # table exists. Otherwise it returns an empty array. # @@ -6476,7 +6672,7 @@ module ActiveRecord::AttributeMethods::ClassMethods # Person.attribute_names # # => ["id", "created_at", "updated_at", "name", "age"] # - # source://activerecord/lib/active_record/attribute_methods.rb#231 + # source://activerecord/lib/active_record/attribute_methods.rb#235 def attribute_names; end # A method name is 'dangerous' if it is already (re)defined by Active Record, but @@ -6484,7 +6680,7 @@ module ActiveRecord::AttributeMethods::ClassMethods # # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods.rb#178 + # source://activerecord/lib/active_record/attribute_methods.rb#182 def dangerous_attribute_method?(name); end # A class method is 'dangerous' if it is already (re)defined by Active Record, but @@ -6492,19 +6688,22 @@ module ActiveRecord::AttributeMethods::ClassMethods # # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods.rb#196 + # source://activerecord/lib/active_record/attribute_methods.rb#200 def dangerous_class_method?(method_name); end # Generates all the attribute related methods for columns in the database # accessors, mutators and query methods. # - # source://activerecord/lib/active_record/attribute_methods.rb#126 + # source://activerecord/lib/active_record/attribute_methods.rb#104 def define_attribute_methods; end - # source://activerecord/lib/active_record/attribute_methods.rb#63 + # source://activerecord/lib/active_record/attribute_methods.rb#76 def eagerly_generate_alias_attribute_methods(_new_name, _old_name); end - # source://activerecord/lib/active_record/attribute_methods.rb#67 + # source://activerecord/lib/active_record/attribute_methods.rb#80 + def generate_alias_attribute_methods(code_generator, new_name, old_name); end + + # source://activerecord/lib/active_record/attribute_methods.rb#126 def generate_alias_attributes; end # Returns true if the given attribute exists, otherwise false. @@ -6520,10 +6719,10 @@ module ActiveRecord::AttributeMethods::ClassMethods # # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods.rb#249 + # source://activerecord/lib/active_record/attribute_methods.rb#253 def has_attribute?(attr_name); end - # source://activerecord/lib/active_record/attribute_methods.rb#43 + # source://activerecord/lib/active_record/attribute_methods.rb#42 def initialize_generated_modules; end # Raises an ActiveRecord::DangerousAttributeError exception when an @@ -6543,23 +6742,72 @@ module ActiveRecord::AttributeMethods::ClassMethods # # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods.rb#160 + # source://activerecord/lib/active_record/attribute_methods.rb#164 def instance_method_already_implemented?(method_name); end # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods.rb#182 + # source://activerecord/lib/active_record/attribute_methods.rb#186 def method_defined_within?(name, klass, superklass = T.unsafe(nil)); end - # source://activerecord/lib/active_record/attribute_methods.rb#138 + # source://activerecord/lib/active_record/attribute_methods.rb#142 def undefine_attribute_methods; end private - # source://activerecord/lib/active_record/attribute_methods.rb#260 + # source://activerecord/lib/active_record/attribute_methods.rb#264 def inherited(child_class); end end +# source://activerecord/lib/active_record/attribute_methods/composite_primary_key.rb#5 +module ActiveRecord::AttributeMethods::CompositePrimaryKey + # Returns the primary key column's value. If the primary key is composite, + # returns an array of the primary key column values. + # + # source://activerecord/lib/active_record/attribute_methods/composite_primary_key.rb#8 + def id; end + + # Sets the primary key column's value. If the primary key is composite, + # raises TypeError when the set value not enumerable. + # + # source://activerecord/lib/active_record/attribute_methods/composite_primary_key.rb#26 + def id=(value); end + + # Queries the primary key column's value. If the primary key is composite, + # all primary key column values must be queryable. + # + # @return [Boolean] + # + # source://activerecord/lib/active_record/attribute_methods/composite_primary_key.rb#37 + def id?; end + + # Returns the primary key column's value before type cast. If the primary key is composite, + # returns an array of primary key column values before type cast. + # + # source://activerecord/lib/active_record/attribute_methods/composite_primary_key.rb#47 + def id_before_type_cast; end + + # source://activerecord/lib/active_record/attribute_methods/composite_primary_key.rb#75 + def id_for_database; end + + # Returns the primary key column's value from the database. If the primary key is composite, + # returns an array of primary key column values from database. + # + # source://activerecord/lib/active_record/attribute_methods/composite_primary_key.rb#67 + def id_in_database; end + + # Returns the primary key column's previous value. If the primary key is composite, + # returns an array of primary key column previous values. + # + # source://activerecord/lib/active_record/attribute_methods/composite_primary_key.rb#57 + def id_was; end + + # @return [Boolean] + # + # source://activerecord/lib/active_record/attribute_methods/composite_primary_key.rb#16 + def primary_key_values_present?; end +end + # = Active Record Attribute Methods \Dirty # # Provides a way to track changes in your Active Record models. It adds all @@ -6587,7 +6835,7 @@ end # person.name_in_database # => "Alice" # person.saved_change_to_name? # => true # person.saved_change_to_name # => ["Allison", "Alice"] -# person.name_before_last_change # => "Allison" +# person.name_before_last_save # => "Allison" # # Similar to ActiveModel::Dirty, methods can be invoked as # +saved_change_to_name?+ or by passing an argument to the generic method @@ -6788,25 +7036,11 @@ module ActiveRecord::AttributeMethods::Dirty end end -# source://activerecord/lib/active_record/attribute_methods.rb#26 -class ActiveRecord::AttributeMethods::GeneratedAttributeMethods < ::Module - include ::Mutex_m +# source://activerecord/lib/active_record/attribute_methods.rb#25 +class ActiveRecord::AttributeMethods::GeneratedAttributeMethods < ::Module; end - # source://mutex_m/0.2.0lib/mutex_m.rb#91 - def lock; end - - # source://mutex_m/0.2.0lib/mutex_m.rb#81 - def locked?; end - - # source://mutex_m/0.2.0lib/mutex_m.rb#76 - def synchronize(&block); end - - # source://mutex_m/0.2.0lib/mutex_m.rb#86 - def try_lock; end - - # source://mutex_m/0.2.0lib/mutex_m.rb#96 - def unlock; end -end +# source://activerecord/lib/active_record/attribute_methods.rb#26 +ActiveRecord::AttributeMethods::GeneratedAttributeMethods::LOCK = T.let(T.unsafe(nil), Monitor) # = Active Record Attribute Methods Primary Key # @@ -6825,7 +7059,7 @@ module ActiveRecord::AttributeMethods::PrimaryKey # Sets the primary key column's value. If the primary key is composite, # raises TypeError when the set value not enumerable. # - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#34 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#30 def id=(value); end # Queries the primary key column's value. If the primary key is composite, @@ -6833,33 +7067,33 @@ module ActiveRecord::AttributeMethods::PrimaryKey # # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#45 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#36 def id?; end # Returns the primary key column's value before type cast. If the primary key is composite, # returns an array of primary key column values before type cast. # - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#55 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#42 def id_before_type_cast; end - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#83 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#58 def id_for_database; end # Returns the primary key column's value from the database. If the primary key is composite, # returns an array of primary key column values from database. # - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#75 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#54 def id_in_database; end # Returns the primary key column's previous value. If the primary key is composite, # returns an array of primary key column previous values. # - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#65 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#48 def id_was; end # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#26 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#24 def primary_key_values_present?; end # Returns this record's primary key value wrapped in an array if one is @@ -6872,35 +7106,35 @@ module ActiveRecord::AttributeMethods::PrimaryKey # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#92 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#63 def attribute_method?(attr_name); end end -# source://activerecord/lib/active_record/attribute_methods/primary_key.rb#96 +# source://activerecord/lib/active_record/attribute_methods/primary_key.rb#67 module ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#118 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#87 def composite_primary_key?; end # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#104 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#75 def dangerous_attribute_method?(method_name); end - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#136 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#106 def get_primary_key(base_name); end # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#100 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#71 def instance_method_already_implemented?(method_name); end # Defines the primary key field -- can be overridden in subclasses. # Overwriting will negate any effect of the +primary_key_prefix_type+ # setting, though. # - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#111 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#82 def primary_key; end # Sets the name of the primary key column. @@ -6919,31 +7153,28 @@ module ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods # # Project.primary_key # => "foo_id" # - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#165 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#133 def primary_key=(value); end # Returns a quoted version of the primary key name, used to construct # SQL statements. # - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#124 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#94 def quoted_primary_key; end - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#128 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#98 def reset_primary_key; end private - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#172 - def derive_primary_key(value); end - - # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#180 + # source://activerecord/lib/active_record/attribute_methods/primary_key.rb#146 def inherited(base); end end -# source://activerecord/lib/active_record/attribute_methods/primary_key.rb#97 +# source://activerecord/lib/active_record/attribute_methods/primary_key.rb#68 ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods::ID_ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Set) -# source://activerecord/lib/active_record/attribute_methods/primary_key.rb#98 +# source://activerecord/lib/active_record/attribute_methods/primary_key.rb#69 ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods::PRIMARY_KEY_NOT_SET = T.let(T.unsafe(nil), BasicObject) # = Active Record Attribute Methods \Query @@ -6967,7 +7198,7 @@ module ActiveRecord::AttributeMethods::Query def query_cast_attribute(attr_name, value); end end -# source://activerecord/lib/active_record/attribute_methods.rb#24 +# source://activerecord/lib/active_record/attribute_methods.rb#23 ActiveRecord::AttributeMethods::RESTRICTED_CLASS_METHODS = T.let(T.unsafe(nil), Array) # = Active Record Attribute Methods \Read @@ -6981,7 +7212,7 @@ module ActiveRecord::AttributeMethods::Read # This method exists to avoid the expensive primary_key check internally, without # breaking compatibility with the read_attribute API # - # source://activerecord/lib/active_record/attribute_methods/read.rb#50 + # source://activerecord/lib/active_record/attribute_methods/read.rb#38 def _read_attribute(attr_name, &block); end # Returns the value of the attribute identified by +attr_name+ after it @@ -6997,7 +7228,7 @@ module ActiveRecord::AttributeMethods::Read # This method exists to avoid the expensive primary_key check internally, without # breaking compatibility with the read_attribute API # - # source://activerecord/lib/active_record/attribute_methods/read.rb#50 + # source://activerecord/lib/active_record/attribute_methods/read.rb#38 def attribute(attr_name, &block); end end @@ -7006,7 +7237,7 @@ module ActiveRecord::AttributeMethods::Read::ClassMethods private # source://activerecord/lib/active_record/attribute_methods/read.rb#11 - def define_method_attribute(name, owner:); end + def define_method_attribute(canonical_name, owner:, as: T.unsafe(nil)); end end # = Active Record Attribute Methods \Serialization @@ -7190,16 +7421,16 @@ module ActiveRecord::AttributeMethods::Serialization::ClassMethods # end # # source://activerecord/lib/active_record/attribute_methods/serialization.rb#183 - def serialize(attr_name, class_name_or_coder = T.unsafe(nil), coder: T.unsafe(nil), type: T.unsafe(nil), yaml: T.unsafe(nil), **options); end + def serialize(attr_name, coder: T.unsafe(nil), type: T.unsafe(nil), yaml: T.unsafe(nil), **options); end private - # source://activerecord/lib/active_record/attribute_methods/serialization.rb#228 + # source://activerecord/lib/active_record/attribute_methods/serialization.rb#208 def build_column_serializer(attr_name, coder, type, yaml = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods/serialization.rb#245 + # source://activerecord/lib/active_record/attribute_methods/serialization.rb#225 def type_incompatible_with_serialize?(cast_type, coder, type); end end @@ -7241,21 +7472,24 @@ module ActiveRecord::AttributeMethods::TimeZoneConversion end end -# source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#71 +# source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#75 module ActiveRecord::AttributeMethods::TimeZoneConversion::ClassMethods - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#72 - def define_attribute(name, cast_type, **_arg2); end - private # @return [Boolean] # - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#80 + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#85 def create_time_zone_conversion_attribute?(name, cast_type); end + + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#77 + def hook_attribute_type(name, cast_type); end end # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#8 class ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#35 + def ==(other); end + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#17 def cast(value); end @@ -7264,13 +7498,13 @@ class ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter private - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#36 + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#40 def convert_time_to_time_zone(value); end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#52 + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#56 def map_avoiding_infinite_recursion(value); end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#48 + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#52 def set_time_zone_without_conversion(value); end class << self @@ -7313,7 +7547,7 @@ module ActiveRecord::AttributeMethods::Write::ClassMethods private # source://activerecord/lib/active_record/attribute_methods/write.rb#15 - def define_method_attribute=(name, owner:); end + def define_method_attribute=(canonical_name, owner:, as: T.unsafe(nil)); end end # See ActiveRecord::Attributes::ClassMethods for documentation @@ -7321,225 +7555,21 @@ end # source://activerecord/lib/active_record/attributes.rb#7 module ActiveRecord::Attributes extend ::ActiveSupport::Concern - include GeneratedInstanceMethods + include ::ActiveModel::AttributeRegistration - mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveModel::AttributeRegistration::ClassMethods mixes_in_class_methods ::ActiveRecord::Attributes::ClassMethods - - module GeneratedClassMethods - def attributes_to_define_after_schema_loads; end - def attributes_to_define_after_schema_loads=(value); end - def attributes_to_define_after_schema_loads?; end - end - - module GeneratedInstanceMethods; end end # = Active Record \Attributes # -# source://activerecord/lib/active_record/attributes.rb#14 +# source://activerecord/lib/active_record/attributes.rb#12 module ActiveRecord::Attributes::ClassMethods - # Defines an attribute with a type on this model. It will override the - # type of existing attributes if needed. This allows control over how - # values are converted to and from SQL when assigned to a model. It also - # changes the behavior of values passed to - # {ActiveRecord::Base.where}[rdoc-ref:QueryMethods#where]. This will let you use - # your domain objects across much of Active Record, without having to - # rely on implementation details or monkey patching. - # - # +name+ The name of the methods to define attribute methods for, and the - # column which this will persist to. - # - # +cast_type+ A symbol such as +:string+ or +:integer+, or a type object - # to be used for this attribute. See the examples below for more - # information about providing custom type objects. - # - # ==== Options - # - # The following options are accepted: - # - # +default+ The default value to use when no value is provided. If this option - # is not passed, the previous default value (if any) will be used. - # Otherwise, the default will be +nil+. - # - # +array+ (PostgreSQL only) specifies that the type should be an array (see the - # examples below). - # - # +range+ (PostgreSQL only) specifies that the type should be a range (see the - # examples below). - # - # When using a symbol for +cast_type+, extra options are forwarded to the - # constructor of the type object. - # - # ==== Examples - # - # The type detected by Active Record can be overridden. - # - # # db/schema.rb - # create_table :store_listings, force: true do |t| - # t.decimal :price_in_cents - # end - # - # # app/models/store_listing.rb - # class StoreListing < ActiveRecord::Base - # end - # - # store_listing = StoreListing.new(price_in_cents: '10.1') - # - # # before - # store_listing.price_in_cents # => BigDecimal(10.1) - # - # class StoreListing < ActiveRecord::Base - # attribute :price_in_cents, :integer - # end - # - # # after - # store_listing.price_in_cents # => 10 - # - # A default can also be provided. - # - # # db/schema.rb - # create_table :store_listings, force: true do |t| - # t.string :my_string, default: "original default" - # end - # - # StoreListing.new.my_string # => "original default" - # - # # app/models/store_listing.rb - # class StoreListing < ActiveRecord::Base - # attribute :my_string, :string, default: "new default" - # end - # - # StoreListing.new.my_string # => "new default" - # - # class Product < ActiveRecord::Base - # attribute :my_default_proc, :datetime, default: -> { Time.now } - # end - # - # Product.new.my_default_proc # => 2015-05-30 11:04:48 -0600 - # sleep 1 - # Product.new.my_default_proc # => 2015-05-30 11:04:49 -0600 - # - # \Attributes do not need to be backed by a database column. - # - # # app/models/my_model.rb - # class MyModel < ActiveRecord::Base - # attribute :my_string, :string - # attribute :my_int_array, :integer, array: true - # attribute :my_float_range, :float, range: true - # end - # - # model = MyModel.new( - # my_string: "string", - # my_int_array: ["1", "2", "3"], - # my_float_range: "[1,3.5]", - # ) - # model.attributes - # # => - # { - # my_string: "string", - # my_int_array: [1, 2, 3], - # my_float_range: 1.0..3.5 - # } - # - # Passing options to the type constructor - # - # # app/models/my_model.rb - # class MyModel < ActiveRecord::Base - # attribute :small_int, :integer, limit: 2 - # end - # - # MyModel.create(small_int: 65537) - # # => Error: 65537 is out of range for the limit of two bytes - # - # ==== Creating Custom Types - # - # Users may also define their own custom types, as long as they respond - # to the methods defined on the value type. The method +deserialize+ or - # +cast+ will be called on your type object, with raw input from the - # database or from your controllers. See ActiveModel::Type::Value for the - # expected API. It is recommended that your type objects inherit from an - # existing type, or from ActiveRecord::Type::Value - # - # class MoneyType < ActiveRecord::Type::Integer - # def cast(value) - # if !value.kind_of?(Numeric) && value.include?('$') - # price_in_dollars = value.gsub(/\$/, '').to_f - # super(price_in_dollars * 100) - # else - # super - # end - # end - # end - # - # # config/initializers/types.rb - # ActiveRecord::Type.register(:money, MoneyType) - # - # # app/models/store_listing.rb - # class StoreListing < ActiveRecord::Base - # attribute :price_in_cents, :money - # end - # - # store_listing = StoreListing.new(price_in_cents: '$10.00') - # store_listing.price_in_cents # => 1000 - # - # For more details on creating custom types, see the documentation for - # ActiveModel::Type::Value. For more details on registering your types - # to be referenced by a symbol, see ActiveRecord::Type.register. You can - # also pass a type object directly, in place of a symbol. - # - # ==== \Querying - # - # When {ActiveRecord::Base.where}[rdoc-ref:QueryMethods#where] is called, it will - # use the type defined by the model class to convert the value to SQL, - # calling +serialize+ on your type object. For example: - # - # class Money < Struct.new(:amount, :currency) - # end - # - # class MoneyType < ActiveRecord::Type::Value - # def initialize(currency_converter:) - # @currency_converter = currency_converter - # end - # - # # value will be the result of +deserialize+ or - # # +cast+. Assumed to be an instance of +Money+ in - # # this case. - # def serialize(value) - # value_in_bitcoins = @currency_converter.convert_to_bitcoins(value) - # value_in_bitcoins.amount - # end - # end - # - # # config/initializers/types.rb - # ActiveRecord::Type.register(:money, MoneyType) - # - # # app/models/product.rb - # class Product < ActiveRecord::Base - # currency_converter = ConversionRatesFromTheInternet.new - # attribute :price_in_bitcoins, :money, currency_converter: currency_converter - # end - # - # Product.where(price_in_bitcoins: Money.new(5, "USD")) - # # SELECT * FROM products WHERE price_in_bitcoins = 0.02230 - # - # Product.where(price_in_bitcoins: Money.new(5, "GBP")) - # # SELECT * FROM products WHERE price_in_bitcoins = 0.03412 - # - # ==== Dirty Tracking - # - # The type of an attribute is given the opportunity to change how dirty - # tracking is performed. The methods +changed?+ and +changed_in_place?+ - # will be called from ActiveModel::Dirty. See the documentation for those - # methods in ActiveModel::Type::Value for more details. - # - # source://activerecord/lib/active_record/attributes.rb#208 - def attribute(name, cast_type = T.unsafe(nil), default: T.unsafe(nil), **options); end + # source://activerecord/lib/active_record/attributes.rb#241 + def _default_attributes; end - # This is the low level API which sits beneath +attribute+. It only - # accepts type objects, and will do its work immediately instead of - # waiting for the schema to load. Automatic schema detection and - # ClassMethods#attribute both call this under the hood. While this method + # This API only accepts type objects, and will do its work immediately instead of + # waiting for the schema to load. While this method # is provided so it can be used by plugin authors, application code # should probably use ClassMethods#attribute. # @@ -7555,19 +7585,30 @@ module ActiveRecord::Attributes::ClassMethods # +user_provided_default+ Whether the default value should be cast using # +cast+ or +deserialize+. # - # source://activerecord/lib/active_record/attributes.rb#253 + # source://activerecord/lib/active_record/attributes.rb#231 def define_attribute(name, cast_type, default: T.unsafe(nil), user_provided_default: T.unsafe(nil)); end - # source://activerecord/lib/active_record/attributes.rb#263 - def load_schema!; end + protected + + # source://activerecord/lib/active_record/attributes.rb#268 + def reload_schema_from_cache(*_arg0); end private - # source://activerecord/lib/active_record/attributes.rb#275 + # source://activerecord/lib/active_record/attributes.rb#277 def define_default_attribute(name, value, type, from_user:); end + + # source://activerecord/lib/active_record/attributes.rb#293 + def reset_default_attributes; end + + # source://activerecord/lib/active_record/attributes.rb#297 + def resolve_type_name(name, **options); end + + # source://activerecord/lib/active_record/attributes.rb#301 + def type_for_column(connection, column); end end -# source://activerecord/lib/active_record/attributes.rb#272 +# source://activerecord/lib/active_record/attributes.rb#274 ActiveRecord::Attributes::ClassMethods::NO_DEFAULT_PROVIDED = T.let(T.unsafe(nil), Object) # = Active Record Autosave Association @@ -7705,31 +7746,36 @@ ActiveRecord::Attributes::ClassMethods::NO_DEFAULT_PROVIDED = T.let(T.unsafe(nil # exception is if a custom validation context is used, in which case the validations # will always fire on the associated records. # -# source://activerecord/lib/active_record/autosave_association.rb#138 +# source://activerecord/lib/active_record/autosave_association.rb#140 module ActiveRecord::AutosaveAssociation extend ::ActiveSupport::Concern mixes_in_class_methods ::ActiveRecord::AutosaveAssociation::ClassMethods + # @return [Boolean] + # + # source://activerecord/lib/active_record/autosave_association.rb#284 + def autosaving_belongs_to_for?(association); end + # Returns whether or not this record has been changed in any way (including whether # any of its nested autosave associations are likewise changed) # # @return [Boolean] # - # source://activerecord/lib/active_record/autosave_association.rb#271 + # source://activerecord/lib/active_record/autosave_association.rb#275 def changed_for_autosave?; end # Returns the association for the parent being destroyed. # # Used to avoid updating the counter cache unnecessarily. # - # source://activerecord/lib/active_record/autosave_association.rb#265 + # source://activerecord/lib/active_record/autosave_association.rb#269 def destroyed_by_association; end # Records the association that is being destroyed and destroying this # record in the process. # - # source://activerecord/lib/active_record/autosave_association.rb#258 + # source://activerecord/lib/active_record/autosave_association.rb#262 def destroyed_by_association=(reflection); end # Marks this record to be destroyed as part of the parent's save transaction. @@ -7738,7 +7784,7 @@ module ActiveRecord::AutosaveAssociation # # Only useful if the :autosave option on the parent is enabled for this associated model. # - # source://activerecord/lib/active_record/autosave_association.rb#245 + # source://activerecord/lib/active_record/autosave_association.rb#249 def mark_for_destruction; end # Returns whether or not this record will be destroyed as part of the parent's save transaction. @@ -7747,42 +7793,47 @@ module ActiveRecord::AutosaveAssociation # # @return [Boolean] # - # source://activerecord/lib/active_record/autosave_association.rb#252 + # source://activerecord/lib/active_record/autosave_association.rb#256 def marked_for_destruction?; end # Reloads the attributes of the object as usual and clears marked_for_destruction flag. # - # source://activerecord/lib/active_record/autosave_association.rb#234 + # source://activerecord/lib/active_record/autosave_association.rb#238 def reload(options = T.unsafe(nil)); end + # @return [Boolean] + # + # source://activerecord/lib/active_record/autosave_association.rb#279 + def validating_belongs_to_for?(association); end + private - # source://activerecord/lib/active_record/autosave_association.rb#554 + # source://activerecord/lib/active_record/autosave_association.rb#582 def _ensure_no_duplicate_errors; end # If the record is new or it has changed, returns true. # # @return [Boolean] # - # source://activerecord/lib/active_record/autosave_association.rb#475 + # source://activerecord/lib/active_record/autosave_association.rb#500 def _record_changed?(reflection, record, key); end # Is used as an around_save callback to check while saving a collection # association whether or not the parent was a new record before saving. # - # source://activerecord/lib/active_record/autosave_association.rb#371 + # source://activerecord/lib/active_record/autosave_association.rb#392 def around_save_collection_association; end # Returns the record for an association collection that should be validated # or saved. If +autosave+ is +false+ only new records will be returned, # unless the parent is/was a new record itself. # - # source://activerecord/lib/active_record/autosave_association.rb#284 + # source://activerecord/lib/active_record/autosave_association.rb#298 def associated_records_to_validate_or_save(association, new_record, autosave); end # @return [Boolean] # - # source://activerecord/lib/active_record/autosave_association.rb#482 + # source://activerecord/lib/active_record/autosave_association.rb#507 def association_foreign_key_changed?(reflection, record, key); end # Returns whether or not the association is valid and applies any errors to @@ -7791,23 +7842,18 @@ module ActiveRecord::AutosaveAssociation # # @return [Boolean] # - # source://activerecord/lib/active_record/autosave_association.rb#335 - def association_valid?(reflection, record, index = T.unsafe(nil)); end + # source://activerecord/lib/active_record/autosave_association.rb#371 + def association_valid?(association, record); end - # source://activerecord/lib/active_record/autosave_association.rb#534 + # source://activerecord/lib/active_record/autosave_association.rb#566 def compute_primary_key(reflection, record); end - # @return [Boolean] - # - # source://activerecord/lib/active_record/autosave_association.rb#550 - def custom_validation_context?; end - - # source://activerecord/lib/active_record/autosave_association.rb#276 + # source://activerecord/lib/active_record/autosave_association.rb#290 def init_internals; end # @return [Boolean] # - # source://activerecord/lib/active_record/autosave_association.rb#491 + # source://activerecord/lib/active_record/autosave_association.rb#516 def inverse_polymorphic_association_changed?(reflection, record); end # Go through nested autosave associations that are loaded in memory (without loading @@ -7816,17 +7862,14 @@ module ActiveRecord::AutosaveAssociation # # @return [Boolean] # - # source://activerecord/lib/active_record/autosave_association.rb#297 + # source://activerecord/lib/active_record/autosave_association.rb#311 def nested_records_changed_for_autosave?; end - # source://activerecord/lib/active_record/autosave_association.rb#361 - def normalize_reflection_attribute(indexed_attribute, reflection, index, attribute); end - # Saves the associated record if it's new or :autosave is enabled. # # In addition, it will destroy the association if it was marked for destruction. # - # source://activerecord/lib/active_record/autosave_association.rb#502 + # source://activerecord/lib/active_record/autosave_association.rb#526 def save_belongs_to_association(reflection); end # Saves any new associated records, or all loaded autosave associations if @@ -7838,7 +7881,7 @@ module ActiveRecord::AutosaveAssociation # This all happens inside a transaction, _if_ the Transactions module is included into # ActiveRecord::Base after the AutosaveAssociation module, which it does by default. # - # source://activerecord/lib/active_record/autosave_association.rb#388 + # source://activerecord/lib/active_record/autosave_association.rb#409 def save_collection_association(reflection); end # Saves the associated record if it's new or :autosave is enabled @@ -7850,35 +7893,41 @@ module ActiveRecord::AutosaveAssociation # This all happens inside a transaction, _if_ the Transactions module is included into # ActiveRecord::Base after the AutosaveAssociation module, which it does by default. # - # source://activerecord/lib/active_record/autosave_association.rb#442 + # source://activerecord/lib/active_record/autosave_association.rb#463 def save_has_one_association(reflection); end + # Validate the association if :validate or :autosave is + # turned on for the belongs_to association. + # + # source://activerecord/lib/active_record/autosave_association.rb#343 + def validate_belongs_to_association(reflection); end + # Validate the associated records if :validate or # :autosave is turned on for the association specified by # +reflection+. # - # source://activerecord/lib/active_record/autosave_association.rb#324 + # source://activerecord/lib/active_record/autosave_association.rb#360 def validate_collection_association(reflection); end # Validate the association if :validate or :autosave is - # turned on for the association. + # turned on for the has_one association. # - # source://activerecord/lib/active_record/autosave_association.rb#315 - def validate_single_association(reflection); end + # source://activerecord/lib/active_record/autosave_association.rb#329 + def validate_has_one_association(reflection); end end -# source://activerecord/lib/active_record/autosave_association.rb#141 +# source://activerecord/lib/active_record/autosave_association.rb#143 module ActiveRecord::AutosaveAssociation::AssociationBuilderExtension class << self - # source://activerecord/lib/active_record/autosave_association.rb#142 + # source://activerecord/lib/active_record/autosave_association.rb#144 def build(model, reflection); end - # source://activerecord/lib/active_record/autosave_association.rb#146 + # source://activerecord/lib/active_record/autosave_association.rb#148 def valid_options; end end end -# source://activerecord/lib/active_record/autosave_association.rb#155 +# source://activerecord/lib/active_record/autosave_association.rb#157 module ActiveRecord::AutosaveAssociation::ClassMethods private @@ -7894,13 +7943,13 @@ module ActiveRecord::AutosaveAssociation::ClassMethods # check if the save or validation methods have already been defined # before actually defining them. # - # source://activerecord/lib/active_record/autosave_association.rb#187 + # source://activerecord/lib/active_record/autosave_association.rb#189 def add_autosave_association_callbacks(reflection); end - # source://activerecord/lib/active_record/autosave_association.rb#217 + # source://activerecord/lib/active_record/autosave_association.rb#219 def define_autosave_validation_callbacks(reflection); end - # source://activerecord/lib/active_record/autosave_association.rb#157 + # source://activerecord/lib/active_record/autosave_association.rb#159 def define_non_cyclic_method(name, &block); end end @@ -8124,7 +8173,7 @@ end # # Connections are usually created through # {ActiveRecord::Base.establish_connection}[rdoc-ref:ConnectionHandling#establish_connection] and retrieved -# by ActiveRecord::Base.connection. All classes inheriting from ActiveRecord::Base will use this +# by ActiveRecord::Base.lease_connection. All classes inheriting from ActiveRecord::Base will use this # connection. But you can also set a class-specific connection. For example, if Course is an # ActiveRecord::Base, but resides in a different database, you can just say Course.establish_connection # and Course and all of its subclasses will use this connection instead. @@ -8174,6 +8223,13 @@ end # source://activerecord/lib/active_record/base.rb#282 class ActiveRecord::Base include ::ActionText::Encryption + include ::ActiveModel::Validations + include ::ActiveSupport::Callbacks + include ::ActiveModel::Validations::HelperMethods + include ::ActiveModel::Conversion + include ::ActiveModel::ForbiddenAttributesProtection + include ::ActiveModel::AttributeAssignment + include ::ActiveModel::API include ::ActiveModel::Access include ::ActiveRecord::Core include ::ActiveRecord::Persistence @@ -8184,16 +8240,11 @@ class ActiveRecord::Base include ::ActiveRecord::Scoping::Default include ::ActiveRecord::Scoping::Named include ::ActiveRecord::Sanitization - include ::ActiveModel::ForbiddenAttributesProtection - include ::ActiveModel::AttributeAssignment include ::ActiveRecord::AttributeAssignment - include ::ActiveModel::Conversion include ::ActiveRecord::Integration - include ::ActiveModel::Validations - include ::ActiveSupport::Callbacks - include ::ActiveModel::Validations::HelperMethods include ::ActiveRecord::Validations include ::ActiveRecord::CounterCache + include ::ActiveModel::AttributeRegistration include ::ActiveRecord::Attributes include ::ActiveRecord::Locking::Optimistic include ::ActiveRecord::Locking::Pessimistic @@ -8236,13 +8287,18 @@ class ActiveRecord::Base include ::ActiveStorage::Attached::Model include ::ActiveStorage::Reflection::ActiveRecordExtensions include ::ActionText::Attribute + extend ::ActiveModel::Validations::ClassMethods extend ::ActiveModel::Naming - extend ::ActiveSupport::Benchmarkable + extend ::ActiveModel::Callbacks + extend ::ActiveSupport::Callbacks::ClassMethods extend ::ActiveSupport::DescendantsTracker + extend ::ActiveModel::Translation + extend ::ActiveModel::Validations::HelperMethods + extend ::ActiveModel::Conversion::ClassMethods + extend ::ActiveSupport::Benchmarkable extend ::ActiveRecord::ConnectionHandling extend ::ActiveRecord::QueryCache::ClassMethods extend ::ActiveRecord::Querying - extend ::ActiveModel::Translation extend ::ActiveRecord::Translation extend ::ActiveRecord::DynamicMatchers extend ::ActiveRecord::DelegatedType @@ -8259,14 +8315,10 @@ class ActiveRecord::Base extend ::ActiveRecord::Scoping::Default::ClassMethods extend ::ActiveRecord::Scoping::Named::ClassMethods extend ::ActiveRecord::Sanitization::ClassMethods - extend ::ActiveModel::Conversion::ClassMethods extend ::ActiveRecord::Integration::ClassMethods - extend ::ActiveModel::Validations::ClassMethods - extend ::ActiveModel::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveModel::Validations::HelperMethods extend ::ActiveRecord::Validations::ClassMethods extend ::ActiveRecord::CounterCache::ClassMethods + extend ::ActiveModel::AttributeRegistration::ClassMethods extend ::ActiveRecord::Attributes::ClassMethods extend ::ActiveRecord::Locking::Optimistic::ClassMethods extend ::ActiveRecord::Encryption::EncryptableRecord::ClassMethods @@ -8298,28 +8350,25 @@ class ActiveRecord::Base extend ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods extend ::ActionText::Attribute::ClassMethods - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _before_commit_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _commit_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _create_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _destroy_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _find_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _initialize_callbacks; end # source://activerecord/lib/active_record/reflection.rb#11 @@ -8328,64 +8377,64 @@ class ActiveRecord::Base # source://activerecord/lib/active_record/reflection.rb#11 def _reflections?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _rollback_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_before_commit_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_commit_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_create_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_destroy_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_find_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_initialize_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_rollback_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_save_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_touch_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_update_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_validate_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_validation_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _save_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _touch_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _update_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _validate_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _validation_callbacks; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activemodel/8.0.0.beta1lib/active_model/validations.rb#50 def _validators; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activemodel/8.0.0.beta1lib/active_model/validations.rb#50 def _validators?; end # source://activerecord/lib/active_record/reflection.rb#12 @@ -8394,22 +8443,22 @@ class ActiveRecord::Base # source://activerecord/lib/active_record/reflection.rb#12 def aggregate_reflections?; end - # source://activestorage/7.1.3.3lib/active_storage/reflection.rb#53 + # source://activestorage/8.0.0.beta1lib/active_storage/reflection.rb#53 def attachment_reflections; end - # source://activestorage/7.1.3.3lib/active_storage/reflection.rb#53 + # source://activestorage/8.0.0.beta1lib/active_storage/reflection.rb#53 def attachment_reflections?; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#72 + # source://activemodel/8.0.0.beta1lib/active_model/attribute_methods.rb#71 def attribute_aliases; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#72 + # source://activemodel/8.0.0.beta1lib/active_model/attribute_methods.rb#71 def attribute_aliases?; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#73 + # source://activemodel/8.0.0.beta1lib/active_model/attribute_methods.rb#72 def attribute_method_patterns; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#73 + # source://activemodel/8.0.0.beta1lib/active_model/attribute_methods.rb#72 def attribute_method_patterns?; end # source://activerecord/lib/active_record/reflection.rb#13 @@ -8418,6 +8467,12 @@ class ActiveRecord::Base # source://activerecord/lib/active_record/reflection.rb#13 def automatic_scope_inversing?; end + # source://activerecord/lib/active_record/reflection.rb#14 + def automatically_invert_plural_associations; end + + # source://activerecord/lib/active_record/reflection.rb#14 + def automatically_invert_plural_associations?; end + # source://activerecord/lib/active_record/integration.rb#16 def cache_timestamp_format; end @@ -8436,19 +8491,25 @@ class ActiveRecord::Base # source://activerecord/lib/active_record/integration.rb#32 def collection_cache_versioning?; end - # source://activerecord/lib/active_record/model_schema.rb#178 - def column_for_attribute(name, &block); end + # source://activerecord/lib/active_record/model_schema.rb#183 + def column_for_attribute(name, &_arg1); end + + # source://activerecord/lib/active_record/counter_cache.rb#10 + def counter_cached_association_names; end - # source://activerecord/lib/active_record/core.rb#97 + # source://activerecord/lib/active_record/counter_cache.rb#10 + def counter_cached_association_names?; end + + # source://activerecord/lib/active_record/core.rb#98 def default_connection_handler; end - # source://activerecord/lib/active_record/core.rb#97 + # source://activerecord/lib/active_record/core.rb#98 def default_connection_handler?; end - # source://activerecord/lib/active_record/core.rb#99 + # source://activerecord/lib/active_record/core.rb#100 def default_role; end - # source://activerecord/lib/active_record/core.rb#99 + # source://activerecord/lib/active_record/core.rb#100 def default_role?; end # source://activerecord/lib/active_record/scoping/default.rb#20 @@ -8457,10 +8518,10 @@ class ActiveRecord::Base # source://activerecord/lib/active_record/scoping/default.rb#19 def default_scopes; end - # source://activerecord/lib/active_record/core.rb#101 + # source://activerecord/lib/active_record/core.rb#102 def default_shard; end - # source://activerecord/lib/active_record/core.rb#101 + # source://activerecord/lib/active_record/core.rb#102 def default_shard?; end # source://activerecord/lib/active_record/enum.rb#167 @@ -8473,7 +8534,7 @@ class ActiveRecord::Base def destroy_association_async_batch_size; end # source://activerecord/lib/active_record/core.rb#37 - def destroy_association_async_job(&block); end + def destroy_association_async_job(&_arg0); end # source://activerecord/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes; end @@ -8484,10 +8545,10 @@ class ActiveRecord::Base # source://activerecord/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes?; end - # source://activemodel/7.1.3.3lib/active_model/serializers/json.rb#15 + # source://activemodel/8.0.0.beta1lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.1.3.3lib/active_model/serializers/json.rb#15 + # source://activemodel/8.0.0.beta1lib/active_model/serializers/json.rb#15 def include_root_in_json?; end # source://activerecord/lib/active_record/locking/optimistic.rb#56 @@ -8502,8 +8563,8 @@ class ActiveRecord::Base # source://activerecord/lib/active_record/core.rb#22 def logger?; end - # source://activemodel/7.1.3.3lib/active_model/naming.rb#255 - def model_name(&block); end + # source://activemodel/8.0.0.beta1lib/active_model/naming.rb#255 + def model_name(&_arg0); end # source://activerecord/lib/active_record/nested_attributes.rb#15 def nested_attributes_options; end @@ -8520,7 +8581,7 @@ class ActiveRecord::Base # source://activerecord/lib/active_record/normalization.rb#8 def normalized_attributes?; end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 + # source://activemodel/8.0.0.beta1lib/active_model/conversion.rb#32 def param_delimiter=(_arg0); end # source://activerecord/lib/active_record/attribute_methods/dirty.rb#50 @@ -8535,16 +8596,16 @@ class ActiveRecord::Base # source://activerecord/lib/active_record/attribute_methods/dirty.rb#49 def partial_updates?; end - # source://activerecord/lib/active_record/model_schema.rb#163 + # source://activerecord/lib/active_record/model_schema.rb#168 def pluralize_table_names; end - # source://activerecord/lib/active_record/model_schema.rb#163 + # source://activerecord/lib/active_record/model_schema.rb#168 def pluralize_table_names?; end - # source://activerecord/lib/active_record/model_schema.rb#158 + # source://activerecord/lib/active_record/model_schema.rb#163 def primary_key_prefix_type; end - # source://activerecord/lib/active_record/model_schema.rb#158 + # source://activerecord/lib/active_record/model_schema.rb#163 def primary_key_prefix_type?; end # source://activerecord/lib/active_record/timestamp.rb#47 @@ -8562,10 +8623,10 @@ class ActiveRecord::Base # source://activerecord/lib/active_record/signed_id.rb#13 def signed_id_verifier_secret?; end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#71 def skip_time_zone_conversion_for_attributes; end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#71 def skip_time_zone_conversion_for_attributes?; end # source://activerecord/lib/active_record/inheritance.rb#43 @@ -8580,308 +8641,306 @@ class ActiveRecord::Base # source://activerecord/lib/active_record/inheritance.rb#47 def store_full_sti_class?; end - # source://activerecord/lib/active_record/model_schema.rb#159 + # source://activerecord/lib/active_record/model_schema.rb#164 def table_name_prefix; end - # source://activerecord/lib/active_record/model_schema.rb#159 + # source://activerecord/lib/active_record/model_schema.rb#164 def table_name_prefix?; end - # source://activerecord/lib/active_record/model_schema.rb#160 + # source://activerecord/lib/active_record/model_schema.rb#165 def table_name_suffix; end - # source://activerecord/lib/active_record/model_schema.rb#160 + # source://activerecord/lib/active_record/model_schema.rb#165 def table_name_suffix?; end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#70 def time_zone_aware_attributes; end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#70 def time_zone_aware_attributes?; end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#72 def time_zone_aware_types; end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#72 def time_zone_aware_types?; end - # source://activerecord/lib/active_record/model_schema.rb#178 - def type_for_attribute(attr_name, &block); end - - # source://activemodel/7.1.3.3lib/active_model/validations.rb#67 - def validation_context; end - - private - - # source://activemodel/7.1.3.3lib/active_model/validations.rb#67 - def validation_context=(_arg0); end + # source://activerecord/lib/active_record/model_schema.rb#183 + def type_for_attribute(*_arg0, **_arg1, &_arg2); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activerecord/lib/active_record/readonly_attributes.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _attr_readonly; end - # source://activerecord/lib/active_record/readonly_attributes.rb#11 - def _attr_readonly=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _attr_readonly=(new_value); end # source://activerecord/lib/active_record/readonly_attributes.rb#11 def _attr_readonly?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _before_commit_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _before_commit_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _commit_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _commit_callbacks=(value); end - # source://activerecord/lib/active_record/counter_cache.rb#9 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _counter_cache_columns; end - # source://activerecord/lib/active_record/counter_cache.rb#9 - def _counter_cache_columns=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _counter_cache_columns=(new_value); end # source://activerecord/lib/active_record/counter_cache.rb#9 def _counter_cache_columns?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _create_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _create_callbacks=(value); end - # source://activerecord/lib/active_record/core.rb#24 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _destroy_association_async_job; end - # source://activerecord/lib/active_record/core.rb#24 - def _destroy_association_async_job=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _destroy_association_async_job=(new_value); end # source://activerecord/lib/active_record/core.rb#24 def _destroy_association_async_job?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _destroy_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _destroy_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _find_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _find_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _initialize_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _initialize_callbacks=(value); end - # source://activerecord/lib/active_record/reflection.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _reflections; end - # source://activerecord/lib/active_record/reflection.rb#11 - def _reflections=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end # source://activerecord/lib/active_record/reflection.rb#11 def _reflections?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _rollback_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _rollback_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _save_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _save_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _touch_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _touch_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _update_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _update_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _validate_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _validate_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _validation_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _validation_callbacks=(value); end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _validators; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 - def _validators=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activemodel/8.0.0.beta1lib/active_model/validations.rb#50 def _validators?; end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_create(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_destroy(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_find(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_initialize(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_save(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_touch(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_update(*args, **options, &block); end - # source://activerecord/lib/active_record/reflection.rb#12 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def aggregate_reflections; end - # source://activerecord/lib/active_record/reflection.rb#12 - def aggregate_reflections=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def aggregate_reflections=(new_value); end # source://activerecord/lib/active_record/reflection.rb#12 def aggregate_reflections?; end - # source://activerecord/lib/active_record/core.rb#105 + # source://activerecord/lib/active_record/core.rb#109 def application_record_class?; end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#137 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#137 def around_create(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#137 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#137 def around_destroy(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#137 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#137 def around_save(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#137 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#137 def around_update(*args, **options, &block); end - # source://activerecord/lib/active_record/core.rb#125 + # source://activerecord/lib/active_record/core.rb#129 def asynchronous_queries_session; end - # source://activerecord/lib/active_record/core.rb#129 + # source://activerecord/lib/active_record/core.rb#133 def asynchronous_queries_tracker; end - # source://activestorage/7.1.3.3lib/active_storage/reflection.rb#53 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def attachment_reflections; end - # source://activestorage/7.1.3.3lib/active_storage/reflection.rb#53 - def attachment_reflections=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def attachment_reflections=(new_value); end - # source://activestorage/7.1.3.3lib/active_storage/reflection.rb#53 + # source://activestorage/8.0.0.beta1lib/active_storage/reflection.rb#53 def attachment_reflections?; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#72 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def attribute_aliases; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#72 - def attribute_aliases=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def attribute_aliases=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#72 + # source://activemodel/8.0.0.beta1lib/active_model/attribute_methods.rb#71 def attribute_aliases?; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#73 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def attribute_method_patterns; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#73 - def attribute_method_patterns=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def attribute_method_patterns=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#73 + # source://activemodel/8.0.0.beta1lib/active_model/attribute_methods.rb#72 def attribute_method_patterns?; end - # source://activerecord/lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def attributes_for_inspect; end - # source://activerecord/lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def attributes_for_inspect=(new_value); end - # source://activerecord/lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads?; end + # source://activerecord/lib/active_record/core.rb#107 + def attributes_for_inspect?; end - # source://activerecord/lib/active_record/reflection.rb#13 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def automatic_scope_inversing; end - # source://activerecord/lib/active_record/reflection.rb#13 - def automatic_scope_inversing=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def automatic_scope_inversing=(new_value); end # source://activerecord/lib/active_record/reflection.rb#13 def automatic_scope_inversing?; end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#130 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def automatically_invert_plural_associations; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def automatically_invert_plural_associations=(new_value); end + + # source://activerecord/lib/active_record/reflection.rb#14 + def automatically_invert_plural_associations?; end + + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#130 def before_create(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#130 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#130 def before_destroy(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#130 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#130 def before_save(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#130 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#130 def before_update(*args, **options, &block); end - # source://activerecord/lib/active_record/core.rb#89 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def belongs_to_required_by_default; end - # source://activerecord/lib/active_record/core.rb#89 - def belongs_to_required_by_default=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def belongs_to_required_by_default=(new_value); end # source://activerecord/lib/active_record/core.rb#89 def belongs_to_required_by_default?; end - # source://activerecord/lib/active_record/integration.rb#16 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def cache_timestamp_format; end - # source://activerecord/lib/active_record/integration.rb#16 - def cache_timestamp_format=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def cache_timestamp_format=(new_value); end # source://activerecord/lib/active_record/integration.rb#16 def cache_timestamp_format?; end - # source://activerecord/lib/active_record/integration.rb#24 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def cache_versioning; end - # source://activerecord/lib/active_record/integration.rb#24 - def cache_versioning=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def cache_versioning=(new_value); end # source://activerecord/lib/active_record/integration.rb#24 def cache_versioning?; end - # source://activerecord/lib/active_record/integration.rb#32 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def collection_cache_versioning; end - # source://activerecord/lib/active_record/integration.rb#32 - def collection_cache_versioning=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def collection_cache_versioning=(new_value); end # source://activerecord/lib/active_record/integration.rb#32 def collection_cache_versioning?; end @@ -8892,181 +8951,190 @@ class ActiveRecord::Base # source://activerecord/lib/active_record/core.rb#71 def configurations=(config); end - # source://activerecord/lib/active_record/core.rb#189 + # source://activerecord/lib/active_record/core.rb#193 def connected_to_stack; end - # source://activerecord/lib/active_record/core.rb#203 + # source://activerecord/lib/active_record/core.rb#207 def connection_class; end - # source://activerecord/lib/active_record/core.rb#199 + # source://activerecord/lib/active_record/core.rb#203 def connection_class=(b); end - # source://activerecord/lib/active_record/core.rb#207 + # source://activerecord/lib/active_record/core.rb#211 def connection_class?; end - # source://activerecord/lib/active_record/core.rb#211 + # source://activerecord/lib/active_record/core.rb#215 def connection_class_for_self; end - # source://activerecord/lib/active_record/core.rb#117 + # source://activerecord/lib/active_record/core.rb#121 def connection_handler; end - # source://activerecord/lib/active_record/core.rb#121 + # source://activerecord/lib/active_record/core.rb#125 def connection_handler=(handler); end - # source://activerecord/lib/active_record/core.rb#180 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def counter_cached_association_names; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def counter_cached_association_names=(new_value); end + + # source://activerecord/lib/active_record/counter_cache.rb#10 + def counter_cached_association_names?; end + + # source://activerecord/lib/active_record/core.rb#184 def current_preventing_writes; end - # source://activerecord/lib/active_record/core.rb#143 + # source://activerecord/lib/active_record/core.rb#147 def current_role; end - # source://activerecord/lib/active_record/core.rb#161 + # source://activerecord/lib/active_record/core.rb#165 def current_shard; end - # source://activerecord/lib/active_record/attribute_methods/serialization.rb#20 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_column_serializer; end - # source://activerecord/lib/active_record/attribute_methods/serialization.rb#20 - def default_column_serializer=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_column_serializer=(new_value); end # source://activerecord/lib/active_record/attribute_methods/serialization.rb#20 def default_column_serializer?; end - # source://activerecord/lib/active_record/core.rb#97 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_connection_handler; end - # source://activerecord/lib/active_record/core.rb#97 - def default_connection_handler=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_connection_handler=(new_value); end - # source://activerecord/lib/active_record/core.rb#97 + # source://activerecord/lib/active_record/core.rb#98 def default_connection_handler?; end - # source://activerecord/lib/active_record/core.rb#99 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_role; end - # source://activerecord/lib/active_record/core.rb#99 - def default_role=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_role=(new_value); end - # source://activerecord/lib/active_record/core.rb#99 + # source://activerecord/lib/active_record/core.rb#100 def default_role?; end - # source://activerecord/lib/active_record/scoping/default.rb#20 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_scope_override; end - # source://activerecord/lib/active_record/scoping/default.rb#20 - def default_scope_override=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_scope_override=(new_value); end - # source://activerecord/lib/active_record/scoping/default.rb#19 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_scopes; end - # source://activerecord/lib/active_record/scoping/default.rb#19 - def default_scopes=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_scopes=(new_value); end - # source://activerecord/lib/active_record/core.rb#101 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_shard; end - # source://activerecord/lib/active_record/core.rb#101 - def default_shard=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_shard=(new_value); end - # source://activerecord/lib/active_record/core.rb#101 + # source://activerecord/lib/active_record/core.rb#102 def default_shard?; end - # source://activerecord/lib/active_record/enum.rb#167 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def defined_enums; end - # source://activerecord/lib/active_record/enum.rb#167 - def defined_enums=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end # source://activerecord/lib/active_record/enum.rb#167 def defined_enums?; end - # source://activerecord/lib/active_record/core.rb#47 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def destroy_association_async_batch_size; end - # source://activerecord/lib/active_record/core.rb#47 - def destroy_association_async_batch_size=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def destroy_association_async_batch_size=(new_value); end # source://activerecord/lib/active_record/core.rb#27 def destroy_association_async_job; end - # source://activerecord/lib/active_record/core.rb#24 - def destroy_association_async_job=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def destroy_association_async_job=(new_value); end - # source://activerecord/lib/active_record/encryption/encryptable_record.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def encrypted_attributes; end - # source://activerecord/lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def encrypted_attributes=(new_value); end # source://activerecord/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes?; end - # source://activerecord/lib/active_record/core.rb#87 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def enumerate_columns_in_select_statements; end - # source://activerecord/lib/active_record/core.rb#87 - def enumerate_columns_in_select_statements=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def enumerate_columns_in_select_statements=(new_value); end # source://activerecord/lib/active_record/core.rb#87 def enumerate_columns_in_select_statements?; end - # source://activerecord/lib/active_record/token_for.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def generated_token_verifier; end - # source://activerecord/lib/active_record/token_for.rb#11 - def generated_token_verifier=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def generated_token_verifier=(new_value); end - # source://activerecord/lib/active_record/core.rb#93 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def has_many_inversing; end - # source://activerecord/lib/active_record/core.rb#93 - def has_many_inversing=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def has_many_inversing=(new_value); end - # source://activerecord/lib/active_record/core.rb#93 + # source://activerecord/lib/active_record/core.rb#94 def has_many_inversing?; end - # source://activerecord/lib/active_record/model_schema.rb#165 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def immutable_strings_by_default; end - # source://activerecord/lib/active_record/model_schema.rb#165 - def immutable_strings_by_default=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def immutable_strings_by_default=(new_value); end - # source://activerecord/lib/active_record/model_schema.rb#165 + # source://activerecord/lib/active_record/model_schema.rb#170 def immutable_strings_by_default?; end - # source://activerecord/lib/active_record/model_schema.rb#164 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def implicit_order_column; end - # source://activerecord/lib/active_record/model_schema.rb#164 - def implicit_order_column=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def implicit_order_column=(new_value); end - # source://activerecord/lib/active_record/model_schema.rb#164 + # source://activerecord/lib/active_record/model_schema.rb#169 def implicit_order_column?; end - # source://activemodel/7.1.3.3lib/active_model/serializers/json.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def include_root_in_json; end - # source://activemodel/7.1.3.3lib/active_model/serializers/json.rb#15 - def include_root_in_json=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def include_root_in_json=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/serializers/json.rb#15 + # source://activemodel/8.0.0.beta1lib/active_model/serializers/json.rb#15 def include_root_in_json?; end - # source://activerecord/lib/active_record/model_schema.rb#167 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def inheritance_column; end - # source://activerecord/lib/active_record/model_schema.rb#321 + # source://activerecord/lib/active_record/model_schema.rb#326 def inheritance_column=(value); end - # source://activerecord/lib/active_record/model_schema.rb#167 + # source://activerecord/lib/active_record/model_schema.rb#172 def inheritance_column?; end - # source://activerecord/lib/active_record/model_schema.rb#162 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def internal_metadata_table_name; end - # source://activerecord/lib/active_record/model_schema.rb#162 - def internal_metadata_table_name=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def internal_metadata_table_name=(new_value); end - # source://activerecord/lib/active_record/model_schema.rb#162 + # source://activerecord/lib/active_record/model_schema.rb#167 def internal_metadata_table_name?; end # source://activerecord/lib/active_record/store.rb#101 @@ -9075,217 +9143,226 @@ class ActiveRecord::Base # source://activerecord/lib/active_record/store.rb#101 def local_stored_attributes=(_arg0); end - # source://activerecord/lib/active_record/locking/optimistic.rb#56 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def lock_optimistically; end - # source://activerecord/lib/active_record/locking/optimistic.rb#56 - def lock_optimistically=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def lock_optimistically=(new_value); end # source://activerecord/lib/active_record/locking/optimistic.rb#56 def lock_optimistically?; end - # source://activerecord/lib/active_record/core.rb#22 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def logger; end - # source://activerecord/lib/active_record/core.rb#22 - def logger=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def logger=(new_value); end # source://activerecord/lib/active_record/core.rb#22 def logger?; end - # source://activerecord/lib/active_record/nested_attributes.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def nested_attributes_options; end - # source://activerecord/lib/active_record/nested_attributes.rb#15 - def nested_attributes_options=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def nested_attributes_options=(new_value); end # source://activerecord/lib/active_record/nested_attributes.rb#15 def nested_attributes_options?; end - # source://activerecord/lib/active_record/normalization.rb#8 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def normalized_attributes; end - # source://activerecord/lib/active_record/normalization.rb#8 - def normalized_attributes=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def normalized_attributes=(new_value); end # source://activerecord/lib/active_record/normalization.rb#8 def normalized_attributes?; end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def param_delimiter; end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 - def param_delimiter=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def param_delimiter=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 + # source://activemodel/8.0.0.beta1lib/active_model/conversion.rb#32 def param_delimiter?; end - # source://activerecord/lib/active_record/attribute_methods/dirty.rb#50 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def partial_inserts; end - # source://activerecord/lib/active_record/attribute_methods/dirty.rb#50 - def partial_inserts=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def partial_inserts=(new_value); end # source://activerecord/lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts?; end - # source://activerecord/lib/active_record/attribute_methods/dirty.rb#49 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def partial_updates; end - # source://activerecord/lib/active_record/attribute_methods/dirty.rb#49 - def partial_updates=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def partial_updates=(new_value); end # source://activerecord/lib/active_record/attribute_methods/dirty.rb#49 def partial_updates?; end - # source://activerecord/lib/active_record/model_schema.rb#163 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def pluralize_table_names; end - # source://activerecord/lib/active_record/model_schema.rb#163 - def pluralize_table_names=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def pluralize_table_names=(new_value); end - # source://activerecord/lib/active_record/model_schema.rb#163 + # source://activerecord/lib/active_record/model_schema.rb#168 def pluralize_table_names?; end - # source://activerecord/lib/active_record/model_schema.rb#158 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def primary_key_prefix_type; end - # source://activerecord/lib/active_record/model_schema.rb#158 - def primary_key_prefix_type=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def primary_key_prefix_type=(new_value); end - # source://activerecord/lib/active_record/model_schema.rb#158 + # source://activerecord/lib/active_record/model_schema.rb#163 def primary_key_prefix_type?; end - # source://activerecord/lib/active_record/timestamp.rb#47 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def record_timestamps; end - # source://activerecord/lib/active_record/timestamp.rb#47 - def record_timestamps=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def record_timestamps=(new_value); end # source://activerecord/lib/active_record/timestamp.rb#47 def record_timestamps?; end - # source://activerecord/lib/active_record/core.rb#95 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def run_commit_callbacks_on_first_saved_instances_in_transaction; end - # source://activerecord/lib/active_record/core.rb#95 - def run_commit_callbacks_on_first_saved_instances_in_transaction=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def run_commit_callbacks_on_first_saved_instances_in_transaction=(new_value); end - # source://activerecord/lib/active_record/core.rb#95 + # source://activerecord/lib/active_record/core.rb#96 def run_commit_callbacks_on_first_saved_instances_in_transaction?; end - # source://activerecord/lib/active_record/model_schema.rb#161 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def schema_migrations_table_name; end - # source://activerecord/lib/active_record/model_schema.rb#161 - def schema_migrations_table_name=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def schema_migrations_table_name=(new_value); end - # source://activerecord/lib/active_record/model_schema.rb#161 + # source://activerecord/lib/active_record/model_schema.rb#166 def schema_migrations_table_name?; end - # source://activerecord/lib/active_record/core.rb#103 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def shard_selector; end - # source://activerecord/lib/active_record/core.rb#103 - def shard_selector=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def shard_selector=(new_value); end - # source://activerecord/lib/active_record/core.rb#103 + # source://activerecord/lib/active_record/core.rb#104 def shard_selector?; end - # source://activerecord/lib/active_record/signed_id.rb#13 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def signed_id_verifier_secret; end - # source://activerecord/lib/active_record/signed_id.rb#13 - def signed_id_verifier_secret=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def signed_id_verifier_secret=(new_value); end # source://activerecord/lib/active_record/signed_id.rb#13 def signed_id_verifier_secret?; end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def skip_time_zone_conversion_for_attributes; end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#67 - def skip_time_zone_conversion_for_attributes=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def skip_time_zone_conversion_for_attributes=(new_value); end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#71 def skip_time_zone_conversion_for_attributes?; end - # source://activerecord/lib/active_record/inheritance.rb#43 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def store_full_class_name; end - # source://activerecord/lib/active_record/inheritance.rb#43 - def store_full_class_name=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def store_full_class_name=(new_value); end # source://activerecord/lib/active_record/inheritance.rb#43 def store_full_class_name?; end - # source://activerecord/lib/active_record/inheritance.rb#47 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def store_full_sti_class; end - # source://activerecord/lib/active_record/inheritance.rb#47 - def store_full_sti_class=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def store_full_sti_class=(new_value); end # source://activerecord/lib/active_record/inheritance.rb#47 def store_full_sti_class?; end - # source://activerecord/lib/active_record/core.rb#91 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def strict_loading_by_default; end - # source://activerecord/lib/active_record/core.rb#91 - def strict_loading_by_default=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def strict_loading_by_default=(new_value); end # source://activerecord/lib/active_record/core.rb#91 def strict_loading_by_default?; end - # source://activerecord/lib/active_record/core.rb#226 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def strict_loading_mode; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def strict_loading_mode=(new_value); end + + # source://activerecord/lib/active_record/core.rb#92 + def strict_loading_mode?; end + + # source://activerecord/lib/active_record/core.rb#230 def strict_loading_violation!(owner:, reflection:); end - # source://activerecord/lib/active_record/model_schema.rb#159 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def table_name_prefix; end - # source://activerecord/lib/active_record/model_schema.rb#159 - def table_name_prefix=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def table_name_prefix=(new_value); end - # source://activerecord/lib/active_record/model_schema.rb#159 + # source://activerecord/lib/active_record/model_schema.rb#164 def table_name_prefix?; end - # source://activerecord/lib/active_record/model_schema.rb#160 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def table_name_suffix; end - # source://activerecord/lib/active_record/model_schema.rb#160 - def table_name_suffix=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def table_name_suffix=(new_value); end - # source://activerecord/lib/active_record/model_schema.rb#160 + # source://activerecord/lib/active_record/model_schema.rb#165 def table_name_suffix?; end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def time_zone_aware_attributes; end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#66 - def time_zone_aware_attributes=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def time_zone_aware_attributes=(new_value); end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#70 def time_zone_aware_attributes?; end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def time_zone_aware_types; end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#68 - def time_zone_aware_types=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def time_zone_aware_types=(new_value); end - # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb#72 def time_zone_aware_types?; end - # source://activerecord/lib/active_record/token_for.rb#10 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def token_definitions; end - # source://activerecord/lib/active_record/token_for.rb#10 - def token_definitions=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def token_definitions=(new_value); end private - # source://activerecord/lib/active_record/model_schema.rb#167 - def _inheritance_column=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _inheritance_column=(new_value); end end end @@ -9326,11 +9403,13 @@ module ActiveRecord::Batches # # ==== Options # * :batch_size - Specifies the size of the batch. Defaults to 1000. - # * :start - Specifies the primary key value to start from, inclusive of the value. - # * :finish - Specifies the primary key value to end at, inclusive of the value. + # * :start - Specifies the cursor column value to start from, inclusive of the value. + # * :finish - Specifies the cursor column value to end at, inclusive of the value. # * :error_on_ignore - Overrides the application config to specify if an error should be raised when # an order is present in the relation. - # * :order - Specifies the primary key order (can be +:asc+ or +:desc+ or an array consisting + # * :cursor - Specifies the column to use for batching (can be a column name or an array + # of column names). Defaults to primary key. + # * :order - Specifies the cursor column order (can be +:asc+ or +:desc+ or an array consisting # of :asc or :desc). Defaults to +:asc+. # # class Order < ActiveRecord::Base @@ -9362,14 +9441,18 @@ module ActiveRecord::Batches # # NOTE: Order can be ascending (:asc) or descending (:desc). It is automatically set to # ascending on the primary key ("id ASC"). - # This also means that this method only works when the primary key is + # This also means that this method only works when the cursor column is # orderable (e.g. an integer or string). # + # NOTE: When using custom columns for batching, they should include at least one unique column + # (e.g. primary key) as a tiebreaker. Also, to reduce the likelihood of race conditions, + # all columns should be static (unchangeable after it was set). + # # NOTE: By its nature, batch processing is subject to race conditions if # other processes are modifying the database. # - # source://activerecord/lib/active_record/relation/batches.rb#79 - def find_each(start: T.unsafe(nil), finish: T.unsafe(nil), batch_size: T.unsafe(nil), error_on_ignore: T.unsafe(nil), order: T.unsafe(nil), &block); end + # source://activerecord/lib/active_record/relation/batches.rb#85 + def find_each(start: T.unsafe(nil), finish: T.unsafe(nil), batch_size: T.unsafe(nil), error_on_ignore: T.unsafe(nil), cursor: T.unsafe(nil), order: T.unsafe(nil), &block); end # Yields each batch of records that was found by the find options as # an array. @@ -9391,11 +9474,13 @@ module ActiveRecord::Batches # # ==== Options # * :batch_size - Specifies the size of the batch. Defaults to 1000. - # * :start - Specifies the primary key value to start from, inclusive of the value. - # * :finish - Specifies the primary key value to end at, inclusive of the value. + # * :start - Specifies the cursor column value to start from, inclusive of the value. + # * :finish - Specifies the cursor column value to end at, inclusive of the value. # * :error_on_ignore - Overrides the application config to specify if an error should be raised when # an order is present in the relation. - # * :order - Specifies the primary key order (can be +:asc+ or +:desc+ or an array consisting + # * :cursor - Specifies the column to use for batching (can be a column name or an array + # of column names). Defaults to primary key. + # * :order - Specifies the cursor column order (can be +:asc+ or +:desc+ or an array consisting # of :asc or :desc). Defaults to +:asc+. # # class Order < ActiveRecord::Base @@ -9422,14 +9507,18 @@ module ActiveRecord::Batches # # NOTE: Order can be ascending (:asc) or descending (:desc). It is automatically set to # ascending on the primary key ("id ASC"). - # This also means that this method only works when the primary key is + # This also means that this method only works when the cursor column is # orderable (e.g. an integer or string). # + # NOTE: When using custom columns for batching, they should include at least one unique column + # (e.g. primary key) as a tiebreaker. Also, to reduce the likelihood of race conditions, + # all columns should be static (unchangeable after it was set). + # # NOTE: By its nature, batch processing is subject to race conditions if # other processes are modifying the database. # - # source://activerecord/lib/active_record/relation/batches.rb#148 - def find_in_batches(start: T.unsafe(nil), finish: T.unsafe(nil), batch_size: T.unsafe(nil), error_on_ignore: T.unsafe(nil), order: T.unsafe(nil)); end + # source://activerecord/lib/active_record/relation/batches.rb#161 + def find_in_batches(start: T.unsafe(nil), finish: T.unsafe(nil), batch_size: T.unsafe(nil), error_on_ignore: T.unsafe(nil), cursor: T.unsafe(nil), order: T.unsafe(nil)); end # Yields ActiveRecord::Relation objects to work with a batch of records. # @@ -9455,11 +9544,13 @@ module ActiveRecord::Batches # ==== Options # * :of - Specifies the size of the batch. Defaults to 1000. # * :load - Specifies if the relation should be loaded. Defaults to false. - # * :start - Specifies the primary key value to start from, inclusive of the value. - # * :finish - Specifies the primary key value to end at, inclusive of the value. + # * :start - Specifies the cursor column value to start from, inclusive of the value. + # * :finish - Specifies the cursor column value to end at, inclusive of the value. # * :error_on_ignore - Overrides the application config to specify if an error should be raised when # an order is present in the relation. - # * :order - Specifies the primary key order (can be +:asc+ or +:desc+ or an array consisting + # * :cursor - Specifies the column to use for batching (can be a column name or an array + # of column names). Defaults to primary key. + # * :order - Specifies the cursor column order (can be +:asc+ or +:desc+ or an array consisting # of :asc or :desc). Defaults to +:asc+. # # class Order < ActiveRecord::Base @@ -9503,43 +9594,56 @@ module ActiveRecord::Batches # # NOTE: Order can be ascending (:asc) or descending (:desc). It is automatically set to # ascending on the primary key ("id ASC"). - # This also means that this method only works when the primary key is + # This also means that this method only works when the cursor column is # orderable (e.g. an integer or string). # + # NOTE: When using custom columns for batching, they should include at least one unique column + # (e.g. primary key) as a tiebreaker. Also, to reduce the likelihood of race conditions, + # all columns should be static (unchangeable after it was set). + # # NOTE: By its nature, batch processing is subject to race conditions if # other processes are modifying the database. # - # source://activerecord/lib/active_record/relation/batches.rb#239 - def in_batches(of: T.unsafe(nil), start: T.unsafe(nil), finish: T.unsafe(nil), load: T.unsafe(nil), error_on_ignore: T.unsafe(nil), order: T.unsafe(nil), use_ranges: T.unsafe(nil), &block); end + # source://activerecord/lib/active_record/relation/batches.rb#259 + def in_batches(of: T.unsafe(nil), start: T.unsafe(nil), finish: T.unsafe(nil), load: T.unsafe(nil), error_on_ignore: T.unsafe(nil), cursor: T.unsafe(nil), order: T.unsafe(nil), use_ranges: T.unsafe(nil), &block); end private - # source://activerecord/lib/active_record/relation/batches.rb#325 + # source://activerecord/lib/active_record/relation/batches.rb#369 def act_on_ignored_order(error_on_ignore); end - # source://activerecord/lib/active_record/relation/batches.rb#297 - def apply_finish_limit(relation, finish, batch_orders); end + # source://activerecord/lib/active_record/relation/batches.rb#341 + def apply_finish_limit(relation, cursor, finish, batch_orders); end - # source://activerecord/lib/active_record/relation/batches.rb#284 - def apply_limits(relation, start, finish, batch_orders); end + # source://activerecord/lib/active_record/relation/batches.rb#328 + def apply_limits(relation, cursor, start, finish, batch_orders); end - # source://activerecord/lib/active_record/relation/batches.rb#290 - def apply_start_limit(relation, start, batch_orders); end + # source://activerecord/lib/active_record/relation/batches.rb#334 + def apply_start_limit(relation, cursor, start, batch_orders); end - # source://activerecord/lib/active_record/relation/batches.rb#304 - def batch_condition(relation, columns, values, operators); end + # source://activerecord/lib/active_record/relation/batches.rb#348 + def batch_condition(relation, cursor, values, operators); end - # source://activerecord/lib/active_record/relation/batches.rb#339 - def batch_on_loaded_relation(relation:, start:, finish:, order:, batch_limit:); end + # source://activerecord/lib/active_record/relation/batches.rb#379 + def batch_on_loaded_relation(relation:, start:, finish:, cursor:, order:, batch_limit:); end - # source://activerecord/lib/active_record/relation/batches.rb#364 - def batch_on_unloaded_relation(relation:, start:, finish:, load:, order:, use_ranges:, remaining:, batch_limit:); end + # source://activerecord/lib/active_record/relation/batches.rb#426 + def batch_on_unloaded_relation(relation:, start:, finish:, load:, cursor:, order:, use_ranges:, remaining:, batch_limit:); end - # source://activerecord/lib/active_record/relation/batches.rb#319 - def build_batch_orders(order); end + # source://activerecord/lib/active_record/relation/batches.rb#363 + def build_batch_orders(cursor, order); end - # source://activerecord/lib/active_record/relation/batches.rb#335 - def get_the_order_of_primary_key(order); end + # This is a custom implementation of `<=>` operator, + # which also takes into account how the collection will be ordered. + # + # source://activerecord/lib/active_record/relation/batches.rb#414 + def compare_values_for_order(values1, values2, order); end + + # source://activerecord/lib/active_record/relation/batches.rb#305 + def ensure_valid_options_for_batching!(cursor, start, finish, order); end + + # source://activerecord/lib/active_record/relation/batches.rb#408 + def record_cursor_values(record, cursor); end end # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#5 @@ -9549,11 +9653,11 @@ class ActiveRecord::Batches::BatchEnumerator # @return [BatchEnumerator] a new instance of BatchEnumerator # # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#8 - def initialize(relation:, of: T.unsafe(nil), start: T.unsafe(nil), finish: T.unsafe(nil), order: T.unsafe(nil), use_ranges: T.unsafe(nil)); end + def initialize(relation:, cursor:, of: T.unsafe(nil), start: T.unsafe(nil), finish: T.unsafe(nil), order: T.unsafe(nil), use_ranges: T.unsafe(nil)); end # The size of the batches yielded by the BatchEnumerator. # - # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#27 + # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#28 def batch_size; end # Deletes records in batches. Returns the total number of rows affected. @@ -9562,16 +9666,16 @@ class ActiveRecord::Batches::BatchEnumerator # # See Relation#delete_all for details of how each batch is deleted. # - # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#65 + # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#66 def delete_all; end - # Destroys records in batches. + # Destroys records in batches. Returns the total number of rows affected. # # Person.where("age < 10").in_batches.destroy_all # # See Relation#destroy_all for details of how each batch is destroyed. # - # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#85 + # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#97 def destroy_all; end # Yields an ActiveRecord::Relation object for each batch of records. @@ -9580,7 +9684,7 @@ class ActiveRecord::Batches::BatchEnumerator # relation.update_all(awesome: true) # end # - # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#94 + # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#108 def each(&block); end # Looping through a collection of records from the database (using the @@ -9605,31 +9709,40 @@ class ActiveRecord::Batches::BatchEnumerator # person.award_trophy(index + 1) # end # - # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#52 + # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#53 def each_record(&block); end # The primary key value at which the BatchEnumerator ends, inclusive of the value. # - # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#21 + # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#22 def finish; end # The relation from which the BatchEnumerator yields batches. # - # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#24 + # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#25 def relation; end # The primary key value from which the BatchEnumerator starts, inclusive of the value. # - # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#18 + # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#19 def start; end + # Touches records in batches. Returns the total number of rows affected. + # + # Person.in_batches.touch_all + # + # See Relation#touch_all for details of how each batch is touched. + # + # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#86 + def touch_all(*_arg0, **_arg1, &_arg2); end + # Updates records in batches. Returns the total number of rows affected. # # Person.in_batches.update_all("age = age + 1") # # See Relation#update_all for details of how each batch is updated. # - # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#74 + # source://activerecord/lib/active_record/relation/batches/batch_enumerator.rb#75 def update_all(updates); end end @@ -9658,7 +9771,7 @@ module ActiveRecord::Calculations # Same as #ids, but performs the query asynchronously and returns an # ActiveRecord::Promise. # - # source://activerecord/lib/active_record/relation/calculations.rb#397 + # source://activerecord/lib/active_record/relation/calculations.rb#405 def async_ids; end # Same as #maximum, but performs the query asynchronously and returns an @@ -9676,13 +9789,13 @@ module ActiveRecord::Calculations # Same as #pick, but performs the query asynchronously and returns an # ActiveRecord::Promise. # - # source://activerecord/lib/active_record/relation/calculations.rb#353 + # source://activerecord/lib/active_record/relation/calculations.rb#359 def async_pick(*column_names); end # Same as #pluck, but performs the query asynchronously and returns an # ActiveRecord::Promise. # - # source://activerecord/lib/active_record/relation/calculations.rb#324 + # source://activerecord/lib/active_record/relation/calculations.rb#330 def async_pluck(*column_names); end # Same as #sum, but performs the query asynchronously and returns an @@ -9786,9 +9899,9 @@ module ActiveRecord::Calculations # Returns the base model's ID's for the relation using the table's primary key # # Person.ids # SELECT people.id FROM people - # Person.joins(:companies).ids # SELECT people.id FROM people INNER JOIN companies ON companies.id = people.company_id + # Person.joins(:company).ids # SELECT people.id FROM people INNER JOIN companies ON companies.id = people.company_id # - # source://activerecord/lib/active_record/relation/calculations.rb#361 + # source://activerecord/lib/active_record/relation/calculations.rb#367 def ids; end # Calculates the maximum value on a given column. The value is returned @@ -9824,7 +9937,7 @@ module ActiveRecord::Calculations # # SELECT people.name, people.email_address FROM people WHERE id = 1 LIMIT 1 # # => [ 'David', 'david@loudthinking.com' ] # - # source://activerecord/lib/active_record/relation/calculations.rb#342 + # source://activerecord/lib/active_record/relation/calculations.rb#348 def pick(*column_names); end # Use #pluck as a shortcut to select one or more attributes without @@ -9856,13 +9969,17 @@ module ActiveRecord::Calculations # # SELECT people.id FROM people WHERE people.age = 21 LIMIT 5 # # => [2, 3] # + # Comment.joins(:person).pluck(:id, person: [:id]) + # # SELECT comments.id, people.id FROM comments INNER JOIN people on comments.person_id = people.id + # # => [[1, 2], [2, 2]] + # # Person.pluck(Arel.sql('DATEDIFF(updated_at, created_at)')) # # SELECT DATEDIFF(updated_at, created_at) FROM people # # => ['0', '27761', '173'] # # See also #ids. # - # source://activerecord/lib/active_record/relation/calculations.rb#283 + # source://activerecord/lib/active_record/relation/calculations.rb#287 def pluck(*column_names); end # Calculates the sum of values on a given column. The value is returned @@ -9887,52 +10004,57 @@ module ActiveRecord::Calculations private - # source://activerecord/lib/active_record/relation/calculations.rb#441 + # source://activerecord/lib/active_record/relation/calculations.rb#449 def aggregate_column(column_name); end # @return [Boolean] # - # source://activerecord/lib/active_record/relation/calculations.rb#402 + # source://activerecord/lib/active_record/relation/calculations.rb#410 def all_attributes?(column_names); end - # source://activerecord/lib/active_record/relation/calculations.rb#626 + # source://activerecord/lib/active_record/relation/calculations.rb#664 def build_count_subquery(relation, column_name, distinct); end # @return [Boolean] # - # source://activerecord/lib/active_record/relation/calculations.rb#437 + # source://activerecord/lib/active_record/relation/calculations.rb#657 + def build_count_subquery?(operation, column_name, distinct); end + + # @return [Boolean] + # + # source://activerecord/lib/active_record/relation/calculations.rb#445 def distinct_select?(column_name); end - # source://activerecord/lib/active_record/relation/calculations.rb#492 + # source://activerecord/lib/active_record/relation/calculations.rb#502 def execute_grouped_calculation(operation, column_name, distinct); end - # source://activerecord/lib/active_record/relation/calculations.rb#453 + # source://activerecord/lib/active_record/relation/calculations.rb#461 def execute_simple_calculation(operation, column_name, distinct); end # @return [Boolean] # - # source://activerecord/lib/active_record/relation/calculations.rb#406 + # source://activerecord/lib/active_record/relation/calculations.rb#414 def has_include?(column_name); end - # source://activerecord/lib/active_record/relation/calculations.rb#574 + # source://activerecord/lib/active_record/relation/calculations.rb#589 def lookup_cast_type_from_join_dependencies(name, join_dependencies = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/calculations.rb#449 + # source://activerecord/lib/active_record/relation/calculations.rb#457 def operation_over_aggregate_column(column, operation, distinct); end - # source://activerecord/lib/active_record/relation/calculations.rb#410 + # source://activerecord/lib/active_record/relation/calculations.rb#418 def perform_calculation(operation, column_name); end - # source://activerecord/lib/active_record/relation/calculations.rb#617 + # source://activerecord/lib/active_record/relation/calculations.rb#632 def select_for_count; end - # source://activerecord/lib/active_record/relation/calculations.rb#599 + # source://activerecord/lib/active_record/relation/calculations.rb#614 def type_cast_calculated_value(value, operation, type); end - # source://activerecord/lib/active_record/relation/calculations.rb#582 + # source://activerecord/lib/active_record/relation/calculations.rb#597 def type_cast_pluck_values(result, columns); end - # source://activerecord/lib/active_record/relation/calculations.rb#569 + # source://activerecord/lib/active_record/relation/calculations.rb#584 def type_for(field, &block); end end @@ -10273,12 +10395,10 @@ module ActiveRecord::Callbacks module GeneratedClassMethods def __callbacks; end def __callbacks=(value); end - def __callbacks?; end end module GeneratedInstanceMethods def __callbacks; end - def __callbacks?; end end end @@ -10290,7 +10410,7 @@ module ActiveRecord::Callbacks::ClassMethods include ::ActiveModel::Callbacks end -# source://activerecord/lib/active_record.rb#122 +# source://activerecord/lib/active_record.rb#125 module ActiveRecord::Coders; end # source://activerecord/lib/active_record/coders/column_serializer.rb#5 @@ -10374,31 +10494,31 @@ class ActiveRecord::Coders::YAMLColumn::SafeCoder def load(payload); end end -# source://activerecord/lib/active_record/associations.rb#187 +# source://activerecord/lib/active_record/associations/errors.rb#187 class ActiveRecord::CompositePrimaryKeyMismatchError < ::ActiveRecord::ActiveRecordError # @return [CompositePrimaryKeyMismatchError] a new instance of CompositePrimaryKeyMismatchError # - # source://activerecord/lib/active_record/associations.rb#190 + # source://activerecord/lib/active_record/associations/errors.rb#190 def initialize(reflection = T.unsafe(nil)); end # Returns the value of attribute reflection. # - # source://activerecord/lib/active_record/associations.rb#188 + # source://activerecord/lib/active_record/associations/errors.rb#188 def reflection; end end -# source://activerecord/lib/active_record/migration.rb#175 +# source://activerecord/lib/active_record/migration.rb#188 class ActiveRecord::ConcurrentMigrationError < ::ActiveRecord::MigrationError # @return [ConcurrentMigrationError] a new instance of ConcurrentMigrationError # - # source://activerecord/lib/active_record/migration.rb#179 + # source://activerecord/lib/active_record/migration.rb#192 def initialize(message = T.unsafe(nil)); end end -# source://activerecord/lib/active_record/migration.rb#176 +# source://activerecord/lib/active_record/migration.rb#189 ActiveRecord::ConcurrentMigrationError::DEFAULT_MESSAGE = T.let(T.unsafe(nil), String) -# source://activerecord/lib/active_record/migration.rb#177 +# source://activerecord/lib/active_record/migration.rb#190 ActiveRecord::ConcurrentMigrationError::RELEASE_LOCK_FAILED_MESSAGE = T.let(T.unsafe(nil), String) # Raised when association is being configured improperly or user tries to use @@ -10407,12 +10527,30 @@ ActiveRecord::ConcurrentMigrationError::RELEASE_LOCK_FAILED_MESSAGE = T.let(T.un # {ActiveRecord::Base.has_and_belongs_to_many}[rdoc-ref:Associations::ClassMethods#has_and_belongs_to_many] # associations. # -# source://activerecord/lib/active_record/errors.rb#369 +# source://activerecord/lib/active_record/errors.rb#390 class ActiveRecord::ConfigurationError < ::ActiveRecord::ActiveRecordError; end -# source://activerecord/lib/active_record/connection_adapters.rb#4 +# source://activerecord/lib/active_record/connection_adapters.rb#6 module ActiveRecord::ConnectionAdapters extend ::ActiveSupport::Autoload + + class << self + # Registers a custom database adapter. + # + # Can also be used to define aliases. + # + # == Example + # + # ActiveRecord::ConnectionAdapters.register("megadb", "MegaDB::ActiveRecordAdapter", "mega_db/active_record_adapter") + # + # ActiveRecord::ConnectionAdapters.register("mysql", "ActiveRecord::ConnectionAdapters::TrilogyAdapter", "active_record/connection_adapters/trilogy_adapter") + # + # source://activerecord/lib/active_record/connection_adapters.rb#22 + def register(name, class_name, path = T.unsafe(nil)); end + + # source://activerecord/lib/active_record/connection_adapters.rb#26 + def resolve(adapter_name); end + end end # = Active Record Abstract Adapter @@ -10425,7 +10563,7 @@ end # and +:limit+ options, etc. # # All the concrete database adapters follow the interface laid down in this class. -# {ActiveRecord::Base.connection}[rdoc-ref:ConnectionHandling#connection] returns an AbstractAdapter object, which +# {ActiveRecord::Base.lease_connection}[rdoc-ref:ConnectionHandling#lease_connection] returns an AbstractAdapter object, which # you can use. # # Most of the methods in the adapter are useful during migrations. Most @@ -10443,28 +10581,26 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter include ::ActiveRecord::ConnectionAdapters::Savepoints extend ::ActiveSupport::Callbacks::ClassMethods extend ::ActiveSupport::DescendantsTracker + extend ::ActiveRecord::ConnectionAdapters::Quoting::ClassMethods # @return [AbstractAdapter] a new instance of AbstractAdapter # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#128 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#126 def initialize(config_or_deprecated_connection, deprecated_logger = T.unsafe(nil), deprecated_connection_options = T.unsafe(nil), deprecated_config = T.unsafe(nil)); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _checkin_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _checkout_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_checkin_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_checkout_callbacks(&block); end # Checks whether the connection to the database is still active. This includes @@ -10473,35 +10609,28 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#674 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#659 def active?; end # Returns the human-readable name of the adapter. Use mixed case - one # can always use downcase if needed. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#377 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#356 def adapter_name; end # This is meant to be implemented by the adapters that support custom enum types # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#612 - def add_enum_value(*_arg0); end + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#591 + def add_enum_value(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#619 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#606 def advisory_locks_enabled?; end - # Override to check all foreign key constraints in a database. - # - # @return [Boolean] - # - # source://activesupport/7.1.3.3lib/active_support/deprecation/method_wrappers.rb#46 - def all_foreign_keys_valid?(*args, **_arg1, &block); end - # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#586 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#565 def async_enabled?; end # Called by ActiveRecord::InsertAll, @@ -10510,48 +10639,57 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # should be overridden by adapters to implement common features with # non-standard syntax like handling duplicates or returning values. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#859 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#843 def build_insert_sql(insert); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#830 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#814 def case_insensitive_comparison(attribute, value); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#826 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#810 def case_sensitive_comparison(attribute, value); end # Override to check all foreign key constraints in a database. # The adapter should raise a +ActiveRecord::StatementInvalid+ if foreign key # constraints are not met. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#666 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#644 def check_all_foreign_keys_valid!; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#208 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#207 def check_if_write_query(sql); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#874 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#858 def check_version; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#799 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#783 def clean!; end # Clear any caching the database adapter may be doing. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#754 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#740 def clear_cache!(new_connection: T.unsafe(nil)); end # Check the connection back in to the connection pool # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#846 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#830 def close; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#794 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#778 def connect!; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#313 + # Checks whether the connection to the database was established. This doesn't + # include checking whether the database is actually capable of responding, i.e. + # whether the connection is stale. + # + # @return [Boolean] + # + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#652 + def connected?; end + + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#292 def connection_class; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#222 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#217 def connection_retries; end # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#23 @@ -10559,26 +10697,31 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # This is meant to be implemented by the adapters that support custom enum types # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#600 - def create_enum(*_arg0); end + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#579 + def create_enum(*_arg0, **_arg1, &_arg2); end + + # This is meant to be implemented by the adapters that support virtual tables + # + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#599 + def create_virtual_table(*_arg0); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#386 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#365 def database_exists?; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#870 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#854 def database_version; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#850 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#834 def default_index_type?(index); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#234 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#229 def default_timezone; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#822 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#806 def default_uniqueness_comparison(attribute, value); end # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#23 @@ -10586,12 +10729,12 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # This is meant to be implemented by the adapters that support extensions # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#592 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#571 def disable_extension(name, **_arg1); end # Override to turn off referential integrity while executing &block. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#650 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#637 def disable_referential_integrity; end # Immediately forget this connection ever existed. Unlike disconnect!, @@ -10601,23 +10744,28 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # undefined. This is called internally just before a forked process gets # rid of a connection that belonged to its parent. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#729 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#715 def discard!; end # Disconnects from the database if already connected. Otherwise, this # method does nothing. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#717 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#701 def disconnect!; end # This is meant to be implemented by the adapters that support custom enum types # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#604 - def drop_enum(*_arg0); end + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#583 + def drop_enum(*_arg0, **_arg1, &_arg2); end + + # This is meant to be implemented by the adapters that support virtual tables + # + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#603 + def drop_virtual_table(*_arg0); end # This is meant to be implemented by the adapters that support extensions # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#596 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#575 def enable_extension(name, **_arg1); end # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#23 @@ -10631,12 +10779,12 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # this method must only be called while holding connection pool's mutex # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#334 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#313 def expire; end # A list of extensions, to be filled in by adapters that support them. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#638 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#625 def extensions; end # This is meant to be implemented by the adapters that support advisory @@ -10644,10 +10792,10 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # # Return true if we got the lock, otherwise false # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#627 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#614 def get_advisory_lock(lock_id); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#867 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#851 def get_database_version; end # Returns the value of attribute owner. @@ -10657,18 +10805,18 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # A list of index algorithms, to be filled by adapters that support them. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#643 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#630 def index_algorithms; end # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#23 def insert(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#261 - def internal_metadata; end + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#175 + def inspect; end # this method must only be called while holding connection pool's mutex # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#298 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#277 def lease; end # Returns the value of attribute lock. @@ -10676,7 +10824,7 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#45 def lock; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#183 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#182 def lock_thread=(lock_thread); end # Returns the value of attribute logger. @@ -10684,12 +10832,6 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#45 def logger; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#253 - def migration_context; end - - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#249 - def migrations_paths; end - # Returns the value of attribute owner. # # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#45 @@ -10709,20 +10851,20 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#426 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#405 def prefetch_primary_key?(table_name = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#265 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#244 def prepared_statements; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#265 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#244 def prepared_statements?; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#270 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#249 def prepared_statements_disabled_cache; end # Determines whether writes are currently being prevented. @@ -10732,7 +10874,7 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#242 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#237 def preventing_writes?; end # Provides access to the underlying database driver for this adapter. For @@ -10746,14 +10888,14 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # this client. If that is the case, generally you'll want to invalidate # the query cache using +ActiveRecord::Base.clear_query_cache+. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#814 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#798 def raw_connection; end # Disconnects from the database if already connected, and establishes a new # connection with the database. Implementors should define private #reconnect # instead. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#680 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#665 def reconnect!(restore_transactions: T.unsafe(nil)); end # This is meant to be implemented by the adapters that support advisory @@ -10761,29 +10903,29 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # # Return true if we released the lock, otherwise false # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#634 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#621 def release_advisory_lock(lock_id); end # This is meant to be implemented by the adapters that support custom enum types # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#608 - def rename_enum(*_arg0); end + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#587 + def rename_enum(*_arg0, **_arg1, &_arg2); end # This is meant to be implemented by the adapters that support custom enum types # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#616 - def rename_enum_value(*_arg0); end + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#595 + def rename_enum_value(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#214 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#213 def replica?; end # Returns true if its required to reload the connection between requests for development mode. # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#767 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#753 def requires_reloading?; end # Reset the state of this connection, directing the DBMS to clear @@ -10795,24 +10937,24 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # should call super immediately after resetting the connection (and while # still holding @lock). # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#741 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#727 def reset!; end # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#23 def restart_db_transaction(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#226 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#221 def retry_deadline; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#582 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#561 def return_value_after_insert?(column); end # The role (e.g. +:writing+) for the current connection. In a # non-multi role application, +:writing+ is returned. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#319 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#298 def role; end # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#23 @@ -10826,87 +10968,84 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#410 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#389 def savepoint_errors_invalidate_transactions?; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#329 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#308 def schema_cache; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#257 - def schema_migration; end - # Returns the version identifier of the schema currently available in # the database. This is generally equal to the number of the highest- # numbered migration that has been executed, or 0 if no schema # information is present / the database is empty. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#881 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#865 def schema_version; end # Seconds since this connection was returned to the pool # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#363 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#342 def seconds_idle; end # The shard (e.g. +:default+) for the current connection. In # a non-sharded application, +:default+ is returned. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#325 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#304 def shard; end # this method must only be called while holding connection pool's mutex (and a desire for segfaults) # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#350 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#329 def steal!; end # Does this adapter support application-enforced advisory locking? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#419 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#398 def supports_advisory_locks?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#399 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#378 def supports_bulk_alter?; end # Does this adapter support creating check constraints? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#491 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#470 def supports_check_constraints?; end # Does this adapter support metadata comments on database objects (tables, columns, indexes)? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#526 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#505 def supports_comments?; end # Can comments for tables, columns, and indexes be specified in create/alter table statements? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#531 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#510 def supports_comments_in_create?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#550 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#529 def supports_common_table_expressions?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#574 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#553 def supports_concurrent_connections?; end # Does this adapter support datetime with precision? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#516 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#495 def supports_datetime_with_precision?; end # Does this adapter support DDL rollbacks in transactions? That is, would @@ -10914,70 +11053,70 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#395 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#374 def supports_ddl_transactions?; end # Does this adapter support creating deferrable constraints? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#486 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#465 def supports_deferrable_constraints?; end # Does this adapter support creating exclusion constraints? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#496 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#475 def supports_exclusion_constraints?; end # Does this adapter support explain? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#455 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#434 def supports_explain?; end # Does this adapter support expression indices? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#450 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#429 def supports_expression_index?; end # Does this adapter support database extensions? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#465 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#444 def supports_extensions?; end # Does this adapter support creating foreign key constraints? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#476 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#455 def supports_foreign_keys?; end # Does this adapter support foreign/external tables? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#541 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#520 def supports_foreign_tables?; end # Does this adapter support including non-key columns? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#445 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#424 def supports_index_include?; end # Does this adapter support index sort order? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#435 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#414 def supports_index_sort_order?; end # Does this adapter support creating indexes in the same statement as @@ -10985,122 +11124,122 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#471 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#450 def supports_indexes_in_create?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#570 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#549 def supports_insert_conflict_target?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#562 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#541 def supports_insert_on_duplicate_skip?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#566 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#545 def supports_insert_on_duplicate_update?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#558 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#537 def supports_insert_returning?; end # Does this adapter support JSON data type? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#521 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#500 def supports_json?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#554 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#533 def supports_lazy_transactions?; end # Does this adapter support materialized views? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#511 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#490 def supports_materialized_views?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#578 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#557 def supports_nulls_not_distinct?; end # Does this adapter support optimizer hints? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#546 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#525 def supports_optimizer_hints?; end # Does this adapter support partial indices? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#440 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#419 def supports_partial_index?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#430 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#409 def supports_partitioned_indexes?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#414 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#393 def supports_restart_db_transaction?; end # Does this adapter support savepoints? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#404 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#383 def supports_savepoints?; end # Does this adapter support setting the isolation level for a transaction? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#460 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#439 def supports_transaction_isolation?; end # Does this adapter support creating unique constraints? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#501 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#480 def supports_unique_constraints?; end # Does this adapter support creating invalid constraints? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#481 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#460 def supports_validate_constraints?; end # Does this adapter support views? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#506 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#485 def supports_views?; end # Does this adapter support virtual columns? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#536 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#515 def supports_virtual_columns?; end # Removes the connection from the pool and disconnect it. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#748 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#734 def throw_away!; end # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#23 @@ -11109,7 +11248,7 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#23 def truncate_tables(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#368 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#347 def unprepared_statement; end # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#23 @@ -11117,19 +11256,14 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#218 - def use_metadata_table?; end - - # @return [Boolean] - # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#293 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#272 def valid_type?(type); end # Checks whether the connection to the database is still active (i.e. not stale). # This is done under the hood by calling #active?. If the connection # is no longer active, then this method will reconnect to the database. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#774 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#760 def verify!; end # Returns the value of attribute visitor. @@ -11137,7 +11271,7 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#45 def visitor; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#198 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#197 def with_instrumenter(instrumenter, &block); end private @@ -11146,13 +11280,13 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # to both be thread-safe and not rely upon actual server communication. # This is useful for e.g. string escaping methods. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1099 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1084 def any_raw_connection; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1204 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1181 def arel_visitor; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1088 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1073 def backoff(counter); end # Builds the result object. @@ -11160,24 +11294,24 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # This is an internal hook to make possible connection adapters to build # custom result objects with connection-specific data. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1215 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1192 def build_result(columns:, rows:, column_types: T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1208 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1185 def build_statement_pool; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#840 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#824 def can_perform_case_insensitive_comparison_for?(column); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1190 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1167 def collector; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1179 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1156 def column_for(table_name, column_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1185 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1162 def column_for_attribute(attribute); end # Perform any necessary initialization upon the newly-established @@ -11187,51 +11321,48 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # Implementations may assume this method will only be called while # holding @lock (or from #initialize). # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1226 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1203 def configure_connection; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1229 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1207 def default_prepared_statements; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1116 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1101 def extended_type_map_key; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1074 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1059 def invalidate_transaction(exception); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1142 - def log(sql, name = T.unsafe(nil), binds = T.unsafe(nil), type_casted_binds = T.unsafe(nil), statement_name = T.unsafe(nil), async: T.unsafe(nil), &block); end + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1129 + def log(sql, name = T.unsafe(nil), binds = T.unsafe(nil), type_casted_binds = T.unsafe(nil), async: T.unsafe(nil), &block); end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1092 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1077 def reconnect; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#962 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#946 def reconnect_can_restore_state?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1070 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1054 def retryable_connection_error?(exception); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1081 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1066 def retryable_query_error?(exception); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1158 - def transform_query(sql); end - - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1165 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1146 def translate_exception(exception, message:, sql:, binds:); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1132 - def translate_exception_class(e, sql, binds); end + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1117 + def translate_exception_class(native_error, sql, binds); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1122 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1107 def type_map; end # Similar to any_raw_connection, but ensures it is validated and @@ -11240,19 +11371,19 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # server... but some drivers fail if they know the connection has gone # away. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1108 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1093 def valid_raw_connection; end # Mark the connection as verified. Call this inside a # `with_raw_connection` block only when the block is guaranteed to # exercise the raw connection. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1066 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1050 def verified!; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1233 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1211 def warning_ignored?(warning); end # Lock the monitor, ensure we're properly connected and @@ -11288,86 +11419,78 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # still-yielded connection in the outer block), but we currently # provide no special enforcement there. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#999 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#983 def with_raw_connection(allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil)); end - # @return [Boolean] - # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#1175 - def without_prepared_statement?(binds); end - class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _checkin_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _checkin_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _checkout_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _checkout_callbacks=(value); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#89 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#87 def build_read_query_regexp(*parts); end # Does the database for this adapter exist? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#382 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#361 def database_exists?(config); end # Opens a database console session. # # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#124 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#122 def dbconsole(config, options = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#893 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#877 def extended_type_map(default_timezone:); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#95 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#93 def find_cmd_and_exec(commands, *args); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#886 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#870 def register_class_with_precision(mapping, key, klass, **kwargs); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#68 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#66 def type_cast_config_to_boolean(config); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#58 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#56 def type_cast_config_to_integer(config); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#76 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#74 def validate_default_timezone(config); end private - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#953 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#937 def extract_limit(sql_type); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#949 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#933 def extract_precision(sql_type); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#942 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#926 def extract_scale(sql_type); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#902 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#886 def initialize_type_map(m); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#935 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#919 def register_class_with_limit(mapping, key, klass); end end end @@ -11378,52 +11501,46 @@ ActiveRecord::ConnectionAdapters::AbstractAdapter::ADAPTER_NAME = T.let(T.unsafe # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#42 ActiveRecord::ConnectionAdapters::AbstractAdapter::COMMENT_REGEX = T.let(T.unsafe(nil), Regexp) -# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#86 +# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#84 ActiveRecord::ConnectionAdapters::AbstractAdapter::DEFAULT_READ_QUERY = T.let(T.unsafe(nil), Array) -# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#196 +# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#195 ActiveRecord::ConnectionAdapters::AbstractAdapter::EXCEPTION_IMMEDIATE = T.let(T.unsafe(nil), Hash) -# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#195 +# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#194 ActiveRecord::ConnectionAdapters::AbstractAdapter::EXCEPTION_NEVER = T.let(T.unsafe(nil), Hash) -# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#959 +# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#943 ActiveRecord::ConnectionAdapters::AbstractAdapter::EXTENDED_TYPE_MAPS = T.let(T.unsafe(nil), Concurrent::Map) -# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#180 -ActiveRecord::ConnectionAdapters::AbstractAdapter::FIBER_LOCK = T.let(T.unsafe(nil), ActiveSupport::Concurrency::LoadInterlockAwareMonitor) - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#41 ActiveRecord::ConnectionAdapters::AbstractAdapter::SIMPLE_INT = T.let(T.unsafe(nil), Regexp) -# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#177 -ActiveRecord::ConnectionAdapters::AbstractAdapter::THREAD_LOCK = T.let(T.unsafe(nil), ActiveSupport::Concurrency::ThreadLoadInterlockAwareMonitor) - -# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#958 +# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#942 ActiveRecord::ConnectionAdapters::AbstractAdapter::TYPE_MAP = T.let(T.unsafe(nil), ActiveRecord::Type::TypeMap) -# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#274 +# source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#253 class ActiveRecord::ConnectionAdapters::AbstractAdapter::Version include ::Comparable # @return [Version] a new instance of Version # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#279 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#258 def initialize(version_string, full_version_string = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#284 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#263 def <=>(version_string); end # Returns the value of attribute full_version_string. # - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#277 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#256 def full_version_string; end - # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#288 + # source://activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#267 def to_s; end end -# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#12 +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#11 module ActiveRecord::ConnectionAdapters::AbstractPool; end # source://activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb#114 @@ -11499,66 +11616,83 @@ class ActiveRecord::ConnectionAdapters::AlterTable def name; end end -# source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#149 +# source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#143 class ActiveRecord::ConnectionAdapters::BoundSchemaReflection # @return [BoundSchemaReflection] a new instance of BoundSchemaReflection # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#150 - def initialize(abstract_schema_reflection, connection); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#160 + def initialize(abstract_schema_reflection, pool); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#175 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#185 def add(name); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#163 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#173 def cached?(table_name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#155 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#165 def clear!; end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#211 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#217 def clear_data_source_cache!(name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#183 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#193 def columns(table_name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#187 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#197 def columns_hash(table_name); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#191 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#201 def columns_hash?(table_name); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#171 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#181 def data_source_exists?(name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#179 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#189 def data_sources(name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#199 - def database_version; end - - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#215 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#221 def dump_to(filename); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#195 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#205 def indexes(table_name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#159 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#169 def load!; end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#167 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#177 def primary_keys(table_name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#207 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#213 def size; end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#203 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#209 def version; end + + class << self + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#155 + def for_lone_connection(abstract_schema_reflection, connection); end + end +end + +# :nodoc +# +# source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#144 +class ActiveRecord::ConnectionAdapters::BoundSchemaReflection::FakePool + # @return [FakePool] a new instance of FakePool + # + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#145 + def initialize(connection); end + + # @yield [@connection] + # + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#149 + def with_connection; end end # source://activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb#118 @@ -12015,11 +12149,11 @@ end # about the model. The model needs to pass a connection specification name to the handler, # in order to look up the correct connection pool. # -# source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#57 +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#56 class ActiveRecord::ConnectionAdapters::ConnectionHandler # @return [ConnectionHandler] a new instance of ConnectionHandler # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#77 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#73 def initialize; end # Returns true if there are any active connections among the connection @@ -12027,27 +12161,24 @@ class ActiveRecord::ConnectionAdapters::ConnectionHandler # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#173 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#154 def active_connections?(role = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#97 - def all_connection_pools; end - # Returns any connections in use by the current thread back to the pool, # and also returns connections to the pool cached by threads that are no # longer alive. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#185 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#161 def clear_active_connections!(role = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#206 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#175 def clear_all_connections!(role = T.unsafe(nil)); end # Clears the cache which maps classes. # # See ConnectionPool#clear_reloadable_connections! for details. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#197 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#171 def clear_reloadable_connections!(role = T.unsafe(nil)); end # Returns true if a connection that's accessible to this class has @@ -12055,44 +12186,44 @@ class ActiveRecord::ConnectionAdapters::ConnectionHandler # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#251 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#197 def connected?(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end - # Returns the pools for a connection handler and given role. If +:all+ is passed, + # Returns the pools for a connection handler and given role. If +:all+ is passed, # all pools belonging to the connection handler will be returned. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#107 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#92 def connection_pool_list(role = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#93 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#86 def connection_pool_names; end - # Returns the pools for a connection handler and given role. If +:all+ is passed, + # Returns the pools for a connection handler and given role. If +:all+ is passed, # all pools belonging to the connection handler will be returned. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#107 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#92 def connection_pools(role = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#120 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#101 def each_connection_pool(role = T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#131 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#112 def establish_connection(config, owner_name: T.unsafe(nil), role: T.unsafe(nil), shard: T.unsafe(nil), clobber: T.unsafe(nil)); end # Disconnects all currently idle connections. # # See ConnectionPool#flush! for details. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#218 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#182 def flush_idle_connections!(role = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#85 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#78 def prevent_writes; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#89 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#82 def prevent_writes=(prevent_writes); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#256 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#202 def remove_connection_pool(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end # Locate the connection of the nearest super class. This can be an @@ -12100,38 +12231,35 @@ class ActiveRecord::ConnectionAdapters::ConnectionHandler # opened and set as the active connection for the class it was defined # for (not necessarily the current class). # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#231 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#190 def retrieve_connection(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end # Retrieving the connection pool happens a lot, so we cache it in @connection_name_to_pool_manager. # This makes retrieving the connection pool O(1) once the process is warm. # When a connection is established or removed, we invalidate the cache. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#265 - def retrieve_connection_pool(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil)); end + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#211 + def retrieve_connection_pool(connection_name, role: T.unsafe(nil), shard: T.unsafe(nil), strict: T.unsafe(nil)); end private # Returns the value of attribute connection_name_to_pool_manager. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#271 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#237 def connection_name_to_pool_manager; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#287 - def deprecation_for_pool_handling(method); end - - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#356 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#279 def determine_owner_name(owner_name, config); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#304 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#253 def disconnect_pool_from_pool_manager(pool_manager, role, shard); end # Returns the pool manager for a connection name / identifier. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#274 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#240 def get_pool_manager(connection_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#283 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#249 def pool_managers; end # Returns an instance of PoolConfig for a given adapter. @@ -12146,36 +12274,33 @@ class ActiveRecord::ConnectionAdapters::ConnectionHandler # # @raise [AdapterNotSpecified] # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#323 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#272 def resolve_pool_config(config, connection_name, role, shard); end # Get the existing pool manager or initialize and assign a new one. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#279 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#245 def set_pool_manager(connection_name); end end -# source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#58 -ActiveRecord::ConnectionAdapters::ConnectionHandler::FINALIZER = T.let(T.unsafe(nil), Proc) - -# source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#61 +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#57 class ActiveRecord::ConnectionAdapters::ConnectionHandler::StringConnectionName # @return [StringConnectionName] a new instance of StringConnectionName # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#64 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#60 def initialize(name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#72 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#68 def current_preventing_writes; end # Returns the value of attribute name. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#62 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#58 def name; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#68 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb#64 def primary_class?; end end @@ -12202,7 +12327,7 @@ end # Connections can be obtained and used from a connection pool in several # ways: # -# 1. Simply use {ActiveRecord::Base.connection}[rdoc-ref:ConnectionHandling.connection]. +# 1. Simply use {ActiveRecord::Base.lease_connection}[rdoc-ref:ConnectionHandling#lease_connection]. # When you're done with the connection(s) and wish it to be returned to the pool, you call # {ActiveRecord::Base.connection_handler.clear_active_connections!}[rdoc-ref:ConnectionAdapters::ConnectionHandler#clear_active_connections!]. # This is the default behavior for Active Record when used in conjunction with @@ -12246,10 +12371,10 @@ end # * private methods that require being called in a +synchronize+ blocks # are now explicitly documented # -# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#8 +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#7 class ActiveRecord::ConnectionAdapters::ConnectionPool - include ::MonitorMixin include ::ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration + include ::MonitorMixin include ::ActiveRecord::ConnectionAdapters::AbstractPool # Creates a new ConnectionPool object. +pool_config+ is a PoolConfig @@ -12261,35 +12386,46 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # # @return [ConnectionPool] a new instance of ConnectionPool # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#120 - def initialize(pool_config); end + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#117 + def initialize(*_arg0, **_arg1, &_arg2); end + + # Returns true if there is an open connection being used for the current thread. + # + # This method only works for connections that have been obtained through + # #lease_connection or #with_connection methods. Connections obtained through + # #checkout will not be detected by #active_connection? + # + # @return [Boolean] + # + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#352 + def active_connection; end # Returns true if there is an open connection being used for the current thread. # # This method only works for connections that have been obtained through - # #connection or #with_connection methods. Connections obtained through + # #lease_connection or #with_connection methods. Connections obtained through # #checkout will not be detected by #active_connection? # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#196 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#352 def active_connection?; end # Returns the value of attribute async_executor. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#110 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#191 def async_executor; end # Returns the value of attribute automatic_reconnect. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#109 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#190 def automatic_reconnect; end # Sets the attribute automatic_reconnect # # @param value the value to set the attribute automatic_reconnect to. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#109 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#190 def automatic_reconnect=(_arg0); end # Check-in a database connection back into the pool, indicating that you @@ -12298,7 +12434,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # +conn+: an AbstractAdapter object, which was obtained by earlier by # calling #checkout on this pool. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#363 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#546 def checkin(conn); end # Check-out a database connection from the pool, indicating that you want @@ -12316,19 +12452,22 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # Raises: # - ActiveRecord::ConnectionTimeoutError no connection can be obtained from the pool. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#352 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#523 def checkout(checkout_timeout = T.unsafe(nil)); end + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#132 + def checkout_and_verify(connection); end + # Returns the value of attribute checkout_timeout. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#109 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#190 def checkout_timeout; end # Sets the attribute checkout_timeout # # @param value the value to set the attribute checkout_timeout to. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#109 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#190 def checkout_timeout=(_arg0); end # Clears the cache which maps classes and re-connects connections that @@ -12339,7 +12478,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # connections in the pool within a timeout interval (default duration is # spec.db_config.checkout_timeout * 2 seconds). # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#310 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#481 def clear_reloadable_connections(raise_on_acquisition_timeout = T.unsafe(nil)); end # Clears the cache which maps classes and re-connects connections that @@ -12351,31 +12490,22 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # clears the cache and reloads connections without any regard for other # connection owning threads. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#334 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#505 def clear_reloadable_connections!; end # Returns true if a connection has already been opened. # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#233 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#403 def connected?; end - # Retrieve the connection associated with the current thread, or call - # #checkout to obtain one if necessary. - # - # #connection can be called any number of times; the connection is - # held in a cache keyed by a thread. - # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#181 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#294 def connection; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#185 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#343 def connection_class; end - # source://activesupport/7.1.3.3lib/active_support/deprecation/method_wrappers.rb#46 - def connection_klass(*args, **_arg1, &block); end - # Returns an array containing the connections currently in the pool. # Access to the array does not require synchronization on the pool because # the array is newly created and not retained by the pool. @@ -12388,12 +12518,12 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # thread-safety guarantees of the underlying method. Many of the methods # on connection adapter classes are inherently multi-thread unsafe. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#248 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#418 def connections; end # Returns the value of attribute db_config. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#110 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#191 def db_config; end # Discards all connections in the pool (even if they're currently @@ -12402,12 +12532,12 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # # See AbstractAdapter#discard! # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#289 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#460 def discard!; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#299 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#470 def discarded?; end # Disconnects all connections in the pool, and clears the pool. @@ -12417,7 +12547,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # connections in the pool within a timeout interval (default duration is # spec.db_config.checkout_timeout * 2 seconds). # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#258 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#428 def disconnect(raise_on_acquisition_timeout = T.unsafe(nil)); end # Disconnects all connections in the pool, and clears the pool. @@ -12427,43 +12557,69 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # spec.db_config.checkout_timeout * 2 seconds), then the pool is forcefully # disconnected without any regard for other connection owning threads. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#280 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#451 def disconnect!; end # Disconnect all connections that have been idle for at least # +minimum_idle+ seconds. Connections currently checked out, or that were # checked in less than +minimum_idle+ seconds ago, are unaffected. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#435 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#619 def flush(minimum_idle = T.unsafe(nil)); end # Disconnect all currently idle connections. Connections currently checked # out are unaffected. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#457 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#641 def flush!; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#164 - def lock_thread=(lock_thread); end + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#247 + def inspect; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#275 + def internal_metadata; end + + # Retrieve the connection associated with the current thread, or call + # #checkout to obtain one if necessary. + # + # #lease_connection can be called any number of times; the connection is + # held in a cache keyed by a thread. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#284 + def lease_connection; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#462 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#263 + def migration_context; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#267 + def migrations_paths; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#646 def num_waiting_in_queue; end + # @return [Boolean] + # + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#290 + def permanent_lease?; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#302 + def pin_connection!(lock_thread); end + # Returns the value of attribute pool_config. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#110 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#191 def pool_config; end # Recover lost connections for the pool. A lost connection can occur if # a programmer forgets to checkin a connection at the end of a thread # or a thread dies unexpectedly. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#412 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#596 def reap; end # Returns the value of attribute reaper. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#110 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#191 def reaper; end # Signal that the thread is finished with the current connection. @@ -12471,61 +12627,73 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # and returns the connection to the pool. # # This method only works for connections that have been obtained through - # #connection or #with_connection methods, connections obtained through + # #lease_connection or #with_connection methods, connections obtained through # #checkout will not be automatically released. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#207 - def release_connection(owner_thread = T.unsafe(nil)); end + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#364 + def release_connection(existing_lease = T.unsafe(nil)); end # Remove a connection from the connection pool. The connection will # remain open and active but will no longer be managed by this pool. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#380 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#564 def remove(conn); end # Returns the value of attribute role. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#110 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#191 def role; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#483 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#667 def schedule_query(future_result); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#112 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#254 + def schema_cache; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#271 + def schema_migration; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#193 def schema_reflection(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#112 - def schema_reflection=(arg); end + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#258 + def schema_reflection=(schema_reflection); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#193 + def server_version(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute shard. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#110 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#191 def shard; end # Returns the value of attribute size. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#110 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#191 def size; end # Returns the connection pool's usage statistic. # # ActiveRecord::Base.connection_pool.stat # => { size: 15, connections: 1, busy: 1, dead: 0, idle: 0, waiting: 0, checkout_timeout: 5 } # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#469 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#653 def stat; end + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#317 + def unpin_connection!; end + # Yields a connection from the connection pool to the block. If no connection # is already checked out by the current thread, a connection will be checked # out from the pool, yielded to the block, and then returned to the pool when # the block is finished. If a connection has already been checked out on the - # current thread, such as via #connection or #with_connection, that existing + # current thread, such as via #lease_connection or #with_connection, that existing # connection will be the one yielded and it will not be returned to the pool # automatically at the end of the block; it is expected that such an existing # connection will be properly returned to the pool by the code that checked # it out. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#222 - def with_connection; end + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#381 + def with_connection(prevent_permanent_checkout: T.unsafe(nil)); end private @@ -12541,63 +12709,51 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # Implementation detail: the connection returned by +acquire_connection+ # will already be "+connection.lease+ -ed" to the current thread. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#647 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#825 def acquire_connection(checkout_timeout); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#716 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#895 def adopt_connection(conn); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#541 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#716 def attempt_to_checkout_all_existing_connections(raise_on_acquisition_timeout = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#489 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#677 def build_async_executor; end # -- # this is unfortunately not concurrent # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#507 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#695 def bulk_make_new_connections(num_new_conns_needed); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#726 - def checkout_and_verify(c); end - # -- # Must be called in a synchronize block. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#587 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#765 def checkout_for_exclusive_access(checkout_timeout); end # @raise [ConnectionNotEstablished] # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#721 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#906 def checkout_new_connection; end - # -- - # From the discussion on GitHub: - # https://github.com/rails/rails/pull/14938#commitcomment-6601951 - # This hook-in method allows for easier monkey-patching fixes needed by - # JRuby users that use Fibers. - # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#522 - def connection_cache_key(thread); end + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#673 + def connection_lease; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#526 - def current_thread; end - - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#675 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#855 def new_connection; end # -- # if owner_thread param is omitted, this must be called in synchronize block # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#670 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#850 def release(conn, owner_thread = T.unsafe(nil)); end # -- # if owner_thread param is omitted, this must be called in synchronize block # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#670 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#850 def remove_connection_from_thread_cache(conn, owner_thread = T.unsafe(nil)); end # If the pool is not at a @size limit, establish new connection. Connecting @@ -12606,7 +12762,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # Implementation constraint: a newly established connection returned by this # method must be in the +.leased+ state. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#689 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#868 def try_to_checkout_new_connection; end # Take control of all existing connections so a "group" action such as @@ -12614,42 +12770,42 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # wrap it in +synchronize+ because some pool's actions are allowed # to be performed outside of the main +synchronize+ block. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#534 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#709 def with_exclusively_acquired_all_connections(raise_on_acquisition_timeout = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#607 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#785 def with_new_connections_blocked; end end # Adds the ability to turn a basic fair FIFO queue into one # biased to some thread. # -# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#138 +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#137 module ActiveRecord::ConnectionAdapters::ConnectionPool::BiasableQueue - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#178 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#177 def with_a_bias_for(thread); end end -# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#139 +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#138 class ActiveRecord::ConnectionAdapters::ConnectionPool::BiasableQueue::BiasedConditionVariable # semantics of condition variables guarantee that +broadcast+, +broadcast_on_biased+, # +signal+ and +wait+ methods are only called while holding a lock # # @return [BiasedConditionVariable] a new instance of BiasedConditionVariable # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#142 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#141 def initialize(lock, other_cond, preferred_thread); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#149 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#148 def broadcast; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#154 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#153 def broadcast_on_biased; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#159 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#158 def signal; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#168 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#167 def wait(timeout); end end @@ -12659,54 +12815,106 @@ end # @lock as the main pool) so that a returned connection is already # leased and there is no need to re-enter synchronized block. # -# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#199 +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#198 class ActiveRecord::ConnectionAdapters::ConnectionPool::ConnectionLeasingQueue < ::ActiveRecord::ConnectionAdapters::ConnectionPool::Queue include ::ActiveRecord::ConnectionAdapters::ConnectionPool::BiasableQueue private - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#203 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#202 def internal_poll(timeout); end end +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#141 +class ActiveRecord::ConnectionAdapters::ConnectionPool::Lease + # @return [Lease] a new instance of Lease + # + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#144 + def initialize; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#156 + def clear(connection); end + + # Returns the value of attribute connection. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#142 + def connection; end + + # Sets the attribute connection + # + # @param value the value to set the attribute connection to. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#142 + def connection=(_arg0); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#149 + def release; end + + # Returns the value of attribute sticky. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#142 + def sticky; end + + # Sets the attribute sticky + # + # @param value the value to set the attribute sticky to. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#142 + def sticky=(_arg0); end +end + +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#167 +class ActiveRecord::ConnectionAdapters::ConnectionPool::LeaseRegistry + # @return [LeaseRegistry] a new instance of LeaseRegistry + # + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#168 + def initialize; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#173 + def [](context); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#179 + def clear; end +end + # = Active Record Connection Pool \Queue # # Threadsafe, fair, LIFO queue. Meant to be used by ConnectionPool # with which it shares a Monitor. # -# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#13 +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#12 class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue # @return [Queue] a new instance of Queue # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#14 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#13 def initialize(lock = T.unsafe(nil)); end # Add +element+ to the queue. Never blocks. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#37 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#36 def add(element); end # Test if any threads are currently waiting on the queue. # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#22 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#21 def any_waiting?; end # Remove all elements from the queue. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#52 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#51 def clear; end # If +element+ is in the queue, remove and return it, or +nil+. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#45 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#44 def delete(element); end # Returns the number of threads currently waiting on this # queue. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#30 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#29 def num_waiting; end # Remove the head of the queue. @@ -12724,7 +12932,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue # - ActiveRecord::ConnectionTimeoutError if +timeout+ is given and no element # becomes available within +timeout+ seconds, # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#72 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#71 def poll(timeout = T.unsafe(nil)); end private @@ -12733,7 +12941,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#86 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#85 def any?; end # A thread can remove an element from the queue without @@ -12743,31 +12951,31 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool::Queue # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#94 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#93 def can_remove_no_wait?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#77 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#76 def internal_poll(timeout); end # Remove and return the head of the queue if the number of # available elements is strictly greater than the number of # threads currently waiting. Otherwise, return +nil+. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#106 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#105 def no_wait_poll; end # Removes and returns the head of the queue if possible, or +nil+. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#99 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#98 def remove; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#81 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#80 def synchronize(&block); end # Waits on the queue up to +timeout+ seconds, then removes and # returns the head of the queue. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#112 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb#111 def wait_poll(timeout); end end @@ -12780,37 +12988,57 @@ end # Configure the frequency by setting +reaping_frequency+ in your database # YAML file (default 60 seconds). # -# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#17 +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#16 class ActiveRecord::ConnectionAdapters::ConnectionPool::Reaper # @return [Reaper] a new instance of Reaper # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#20 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#19 def initialize(pool, frequency); end # Returns the value of attribute frequency. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#18 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#17 def frequency; end # Returns the value of attribute pool. # - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#18 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#17 def pool; end # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#71 def run; end class << self - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#30 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#29 def register_pool(pool, frequency); end private - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#41 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb#40 def spawn_thread(frequency); end end end +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#120 +class ActiveRecord::ConnectionAdapters::ConnectionPool::WeakThreadKeyMap + # FIXME: On 3.3 we could use ObjectSpace::WeakKeyMap + # but it currently cause GC crashes: https://github.com/byroot/rails/pull/3 + # + # @return [WeakThreadKeyMap] a new instance of WeakThreadKeyMap + # + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#123 + def initialize; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#131 + def [](key); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#135 + def []=(key, value); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#127 + def clear; end +end + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb#120 class ActiveRecord::ConnectionAdapters::CreateIndexDefinition < ::Struct # Returns the value of attribute algorithm @@ -12889,38 +13117,41 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # Register a record with the current transaction so that its after_commit and after_rollback callbacks # can be called. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#390 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#405 def add_transaction_record(record, ensure_finalize = T.unsafe(nil)); end # Begins the transaction (and turns off auto-committing). # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#395 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#410 def begin_db_transaction; end + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#412 + def begin_deferred_transaction(isolation_level = T.unsafe(nil)); end + # Begins the transaction with the isolation level set. Raises an error by # default; adapters that support setting the isolation level should implement # this method. # # @raise [ActiveRecord::TransactionIsolationError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#409 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#432 def begin_isolated_db_transaction(isolation); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#352 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#367 def begin_transaction(*_arg0, **_arg1, &_arg2); end # This is used in the StatementCache object. It returns an object that # can be used to query the database repeatedly. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#54 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#56 def cacheable_query(klass, arel); end # Commits the transaction (and turns on auto-committing). # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#414 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#446 def commit_db_transaction; end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#352 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#367 def commit_transaction(*_arg0, **_arg1, &_arg2); end # Executes an INSERT query and returns the new record's ID @@ -12935,37 +13166,37 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # `nil` is the default value and maintains default behavior. If an array of column names is passed - # an array of is returned from the method representing values of the specified columns from the inserted row. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#189 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#195 def create(arel, name = T.unsafe(nil), pk = T.unsafe(nil), id_value = T.unsafe(nil), sequence_name = T.unsafe(nil), binds = T.unsafe(nil), returning: T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#352 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#367 def current_transaction(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#436 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#468 def default_sequence_name(table, column); end # Executes the delete statement and returns the number of rows affected. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#206 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#212 def delete(arel, name = T.unsafe(nil), binds = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#352 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#367 def dirty_current_transaction(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#352 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#367 def disable_lazy_transactions!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#468 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#498 def empty_insert_statement_value(primary_key = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#352 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#367 def enable_lazy_transactions!(*_arg0, **_arg1, &_arg2); end # Executes delete +sql+ statement in the context of this connection using # +binds+ as the bind substitutes. +name+ is logged along with # the executed +sql+ statement. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#159 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#165 def exec_delete(sql, name = T.unsafe(nil), binds = T.unsafe(nil)); end # Executes insert +sql+ statement in the context of this connection using @@ -12975,10 +13206,10 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # `nil` is the default value and maintains default behavior. If an array of column names is passed - # the result will contain values of the specified columns from the inserted row. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#151 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#157 def exec_insert(sql, name = T.unsafe(nil), binds = T.unsafe(nil), pk = T.unsafe(nil), sequence_name = T.unsafe(nil), returning: T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#170 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#176 def exec_insert_all(sql, name); end # Executes +sql+ statement in the context of this connection using @@ -12989,20 +13220,20 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # will be cleared. If the query is read-only, consider using #select_all # instead. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#141 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#147 def exec_query(sql, name = T.unsafe(nil), binds = T.unsafe(nil), prepare: T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#430 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#462 def exec_restart_db_transaction; end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#424 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#456 def exec_rollback_db_transaction; end # Executes update +sql+ statement in the context of this connection using # +binds+ as the bind substitutes. +name+ is logged along with # the executed +sql+ statement. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#166 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#172 def exec_update(sql, name = T.unsafe(nil), binds = T.unsafe(nil)); end # Executes the SQL statement in the context of this connection and returns @@ -13020,12 +13251,12 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # method may be manually memory managed. Consider using #exec_query # wrapper instead. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#130 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#136 def execute(sql, name = T.unsafe(nil), allow_retry: T.unsafe(nil)); end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#174 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#180 def explain(arel, binds = T.unsafe(nil), options = T.unsafe(nil)); end # Returns an Arel SQL literal for the CURRENT_TIMESTAMP for usage with @@ -13034,7 +13265,7 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # Adapters supporting datetime with precision should override this to # provide as much precision as is available. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#506 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#536 def high_precision_current_timestamp; end # Executes an INSERT query and returns the new record's ID @@ -13049,7 +13280,7 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # `nil` is the default value and maintains default behavior. If an array of column names is passed - # an array of is returned from the method representing values of the specified columns from the inserted row. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#189 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#195 def insert(arel, name = T.unsafe(nil), pk = T.unsafe(nil), id_value = T.unsafe(nil), sequence_name = T.unsafe(nil), binds = T.unsafe(nil), returning: T.unsafe(nil)); end # Inserts the given fixture into the table. Overridden in adapters that require @@ -13058,56 +13289,71 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # We keep this method to provide fallback # for databases like SQLite that do not support bulk inserts. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#450 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#482 def insert_fixture(fixture, table_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#454 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#486 def insert_fixtures_set(fixture_set, tables_to_delete = T.unsafe(nil)); end - # @raise [NotImplementedError] + # Execute a query and returns an ActiveRecord::Result # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#510 - def internal_exec_query(sql, name = T.unsafe(nil), binds = T.unsafe(nil), prepare: T.unsafe(nil), async: T.unsafe(nil)); end + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#546 + def internal_exec_query(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#357 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#372 def mark_transaction_written_if_write(sql); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#352 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#367 def materialize_transactions(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#352 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#367 def open_transactions(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#107 - def query(sql, name = T.unsafe(nil)); end + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#113 + def query(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#105 + def query_value(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#99 - def query_value(sql, name = T.unsafe(nil)); end + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#109 + def query_values(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#103 - def query_values(sql, name = T.unsafe(nil)); end + # Same as raw_execute but returns an ActiveRecord::Result object. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#541 + def raw_exec_query(*_arg0, **_arg1, &_arg2); end + + # Hook point called after an isolated DB transaction is committed + # or rolled back. + # Most adapters don't need to implement anything because the isolation + # level is set on a per transaction basis. + # But some databases like SQLite set it on a per connection level + # and need to explicitly reset it after commit or rollback. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#442 + def reset_isolation_level; end # Set the sequence to the max value of the table's column. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#441 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#473 def reset_sequence!(table, column, sequence = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#368 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#383 def reset_transaction(restore: T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#426 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#458 def restart_db_transaction; end # Rolls back the transaction (and turns on auto-committing). Must be # done if the transaction block raises an exception or returns false. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#418 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#450 def rollback_db_transaction; end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#432 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#464 def rollback_to_savepoint(name = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#352 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#367 def rollback_transaction(*_arg0, **_arg1, &_arg2); end # Sanitizes the given LIMIT parameter in order to prevent SQL injection. @@ -13117,35 +13363,35 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # # Returns Integer and Arel::Nodes::SqlLiteral limits as is. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#478 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#508 def sanitize_limit(limit); end # Returns an ActiveRecord::Result instance. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#67 - def select_all(arel, name = T.unsafe(nil), binds = T.unsafe(nil), preparable: T.unsafe(nil), async: T.unsafe(nil)); end + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#69 + def select_all(arel, name = T.unsafe(nil), binds = T.unsafe(nil), preparable: T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil)); end # Returns a record hash with the column names as keys and column values # as values. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#78 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#84 def select_one(arel, name = T.unsafe(nil), binds = T.unsafe(nil), async: T.unsafe(nil)); end # Returns an array of arrays containing the field values. # Order is the same as that returned by +columns+. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#95 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#101 def select_rows(arel, name = T.unsafe(nil), binds = T.unsafe(nil), async: T.unsafe(nil)); end # Returns a single value from a record # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#83 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#89 def select_value(arel, name = T.unsafe(nil), binds = T.unsafe(nil), async: T.unsafe(nil)); end # Returns an array of the values of the first column in a select: # select_values("SELECT id FROM companies LIMIT 3") => [1,2,3] # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#89 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#95 def select_values(arel, name = T.unsafe(nil), binds = T.unsafe(nil)); end # Converts an arel AST to SQL @@ -13156,6 +13402,17 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # Runs the given block in a database transaction, and returns the result # of the block. # + # == Transaction callbacks + # + # #transaction yields an ActiveRecord::Transaction object on which it is + # possible to register callback: + # + # ActiveRecord::Base.transaction do |transaction| + # transaction.before_commit { puts "before commit!" } + # transaction.after_commit { puts "after commit!" } + # transaction.after_rollback { puts "after rollback!" } + # end + # # == Nested transactions support # # #transaction calls can be nested. By default, this makes all database @@ -13223,9 +13480,9 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # #transaction will raise exceptions when it tries to release the # already-automatically-released savepoints: # - # Model.connection.transaction do # BEGIN - # Model.connection.transaction(requires_new: true) do # CREATE SAVEPOINT active_record_1 - # Model.connection.create_table(...) + # Model.lease_connection.transaction do # BEGIN + # Model.lease_connection.transaction(requires_new: true) do # CREATE SAVEPOINT active_record_1 + # Model.lease_connection.create_table(...) # # active_record_1 now automatically released # end # RELEASE SAVEPOINT active_record_1 <--- BOOM! database error! # end @@ -13262,41 +13519,41 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # isolation level. # :args: (requires_new: nil, isolation: nil, &block) # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#337 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#352 def transaction(requires_new: T.unsafe(nil), isolation: T.unsafe(nil), joinable: T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#397 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#420 def transaction_isolation_levels; end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#350 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#365 def transaction_manager; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#364 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#379 def transaction_open?; end # Executes the truncate statement. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#212 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#218 def truncate(table_name, name = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#216 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#222 def truncate_tables(*table_names); end # Executes the update statement and returns the number of rows affected. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#200 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#206 def update(arel, name = T.unsafe(nil), binds = T.unsafe(nil)); end # Fixture value is quoted by Arel, however scalar values # are not quotable. In this case we want to convert # the column value to YAML. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#489 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#519 def with_yaml_fallback(value); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#352 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#367 def within_new_transaction(*_arg0, **_arg1, &_arg2); end # Determines whether the SQL statement is a write query. @@ -13304,76 +13561,95 @@ module ActiveRecord::ConnectionAdapters::DatabaseStatements # @raise [NotImplementedError] # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#112 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#118 def write_query?(sql); end private - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#668 + # @raise [NotImplementedError] + # + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#570 + def affected_rows(raw_result); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#732 def arel_from_relation(relation); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#541 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#607 def build_fixture_sql(fixtures, table_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#583 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#649 def build_fixture_statements(fixture_set); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#590 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#656 def build_truncate_statement(table_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#594 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#660 def build_truncate_statements(table_names); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#604 + # Receive a native adapter result object and returns an ActiveRecord::Result object. + # + # @raise [NotImplementedError] + # + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#566 + def cast_result(raw_result); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#666 def combine_multi_statements(total_sql); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#537 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#603 def default_insert_value(column); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#524 - def execute_batch(statements, name = T.unsafe(nil)); end + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#594 + def execute_batch(statements, name = T.unsafe(nil), **kwargs); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#676 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#740 def extract_table_ref_from_insert_sql(sql); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#515 - def internal_execute(sql, name = T.unsafe(nil), allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil)); end + # Same as #internal_exec_query, but yields a native adapter result + # + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#589 + def internal_execute(sql, name = T.unsafe(nil), binds = T.unsafe(nil), prepare: T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#655 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#719 def last_inserted_id(result); end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#530 - def raw_execute(sql, name, async: T.unsafe(nil), allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil)); end + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#561 + def perform_query(raw_connection, sql, binds, type_casted_binds, prepare:, notification_payload:, batch:); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#574 + def preprocess_query(sql); end + + # Lowest level way to execute a query. Doesn't check for illegal writes, doesn't annotate queries, yields a native result object. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#552 + def raw_execute(sql, name = T.unsafe(nil), binds = T.unsafe(nil), prepare: T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil), materialize_transactions: T.unsafe(nil), batch: T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#659 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#723 def returning_column_values(result); end # Returns an ActiveRecord::Result instance. # - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#609 - def select(sql, name = T.unsafe(nil), binds = T.unsafe(nil), prepare: T.unsafe(nil), async: T.unsafe(nil)); end + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#671 + def select(sql, name = T.unsafe(nil), binds = T.unsafe(nil), prepare: T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#663 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#727 def single_value_from_rows(rows); end - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#638 + # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#702 def sql_for_insert(sql, pk, binds, returning); end # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#17 - def to_sql_and_binds(arel_or_sql_string, binds = T.unsafe(nil), preparable = T.unsafe(nil)); end - - # source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#600 - def with_multi_statements; end + def to_sql_and_binds(arel_or_sql_string, binds = T.unsafe(nil), preparable = T.unsafe(nil), allow_retry = T.unsafe(nil)); end end -# source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#534 +# source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#600 ActiveRecord::ConnectionAdapters::DatabaseStatements::DEFAULT_INSERT_VALUE = T.let(T.unsafe(nil), Arel::Nodes::SqlLiteral) # This is a safe default, even if not high precision on all databases # -# source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#498 +# source://activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#528 ActiveRecord::ConnectionAdapters::DatabaseStatements::HIGH_PRECISION_CURRENT_TIMESTAMP = T.let(T.unsafe(nil), Arel::Nodes::SqlLiteral) # source://activerecord/lib/active_record/connection_adapters/deduplicable.rb#5 @@ -13575,91 +13851,117 @@ class ActiveRecord::ConnectionAdapters::NullColumn < ::ActiveRecord::ConnectionA def initialize(name, **_arg1); end end -# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#15 +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#14 class ActiveRecord::ConnectionAdapters::NullPool include ::ActiveRecord::ConnectionAdapters::AbstractPool - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#32 + # @return [NullPool] a new instance of NullPool + # + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#24 + def initialize; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#42 def async_executor; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#30 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#40 def checkin(_); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#29 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#39 def connection_class; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#33 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#44 def db_config; end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#31 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#48 + def dirties_query_cache; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#41 def remove(_); end - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#25 + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#38 + def schema_cache; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#34 def schema_reflection; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#30 + def server_version(connection); end end -# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#23 +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#22 ActiveRecord::ConnectionAdapters::NullPool::NULL_CONFIG = T.let(T.unsafe(nil), ActiveRecord::ConnectionAdapters::NullPool::NullConfig) -# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#18 +# source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#17 class ActiveRecord::ConnectionAdapters::NullPool::NullConfig - # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#19 - def method_missing(*_arg0); end + # source://activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#18 + def method_missing(*_arg0, **_arg1, &_arg2); end end -# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#106 +# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#110 class ActiveRecord::ConnectionAdapters::NullTransaction - # @return [NullTransaction] a new instance of NullTransaction - # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#107 - def initialize; end - - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#112 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#115 def add_record(record, _ = T.unsafe(nil)); end + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#123 + def after_commit; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#124 + def after_rollback; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#122 + def before_commit; end + # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#109 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#112 def closed?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#115 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#118 def dirty!; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#114 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#117 def dirty?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#117 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#120 def invalidate!; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#116 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#119 def invalidated?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#111 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#114 def joinable?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#110 - def open?; end + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#121 + def materialized?; end # @return [Boolean] # # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#113 + def open?; end + + # @return [Boolean] + # + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#116 def restartable?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#108 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#111 def state; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#125 + def user_transaction; end end # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#5 class ActiveRecord::ConnectionAdapters::PoolConfig - include ::Mutex_m + include ::MonitorMixin # @return [PoolConfig] a new instance of PoolConfig # @@ -13678,7 +13980,7 @@ class ActiveRecord::ConnectionAdapters::PoolConfig # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#10 def connection_class=(_arg0); end - # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#39 + # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#44 def connection_name; end # Returns the value of attribute db_config. @@ -13686,19 +13988,13 @@ class ActiveRecord::ConnectionAdapters::PoolConfig # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#8 def db_config; end - # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#68 + # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#69 def discard_pool!; end - # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#47 + # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#52 def disconnect!(automatic_reconnect: T.unsafe(nil)); end - # source://mutex_m/0.2.0lib/mutex_m.rb#91 - def lock; end - - # source://mutex_m/0.2.0lib/mutex_m.rb#81 - def locked?; end - - # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#62 + # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#65 def pool; end # Returns the value of attribute role. @@ -13716,20 +14012,21 @@ class ActiveRecord::ConnectionAdapters::PoolConfig # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#9 def schema_reflection=(_arg0); end + # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#40 + def server_version(connection); end + + # Sets the attribute server_version + # + # @param value the value to set the attribute server_version to. + # + # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#9 + def server_version=(_arg0); end + # Returns the value of attribute shard. # # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#8 def shard; end - # source://mutex_m/0.2.0lib/mutex_m.rb#76 - def synchronize(&block); end - - # source://mutex_m/0.2.0lib/mutex_m.rb#86 - def try_lock; end - - # source://mutex_m/0.2.0lib/mutex_m.rb#96 - def unlock; end - class << self # source://activerecord/lib/active_record/connection_adapters/pool_config.rb#20 def discard_pools!; end @@ -13796,15 +14093,15 @@ class ActiveRecord::ConnectionAdapters::PrimaryKeyDefinition < ::Struct end end -# source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#7 +# source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#8 module ActiveRecord::ConnectionAdapters::QueryCache - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#55 + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#196 def initialize(*_arg0); end # Enable the query cache within the block. # - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#63 - def cache; end + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#206 + def cache(&block); end # Clears the query cache. # @@ -13813,94 +14110,201 @@ module ActiveRecord::ConnectionAdapters::QueryCache # the same SQL query and repeatedly return the same result each time, silently # undermining the randomness you were expecting. # - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#94 + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#232 def clear_query_cache; end - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#75 + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#222 def disable_query_cache!; end - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#71 + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#210 def enable_query_cache!; end # Returns the value of attribute query_cache. # - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#53 + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#194 def query_cache; end - # Returns the value of attribute query_cache_enabled. + # Sets the attribute query_cache # - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#53 + # @param value the value to set the attribute query_cache to. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#194 + def query_cache=(_arg0); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#201 def query_cache_enabled; end - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#100 - def select_all(arel, name = T.unsafe(nil), binds = T.unsafe(nil), preparable: T.unsafe(nil), async: T.unsafe(nil)); end + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#236 + def select_all(arel, name = T.unsafe(nil), binds = T.unsafe(nil), preparable: T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil)); end # Disable the query cache within the block. # - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#81 - def uncached; end + # Set dirties: false to prevent query caches on all connections from being cleared by write operations. + # (By default, write operations dirty all connections' query caches in case they are replicas whose cache would now be outdated.) + # + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#218 + def uncached(dirties: T.unsafe(nil), &block); end private # Database adapters can override this method to # provide custom cache information. # - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#171 + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#308 def cache_notification_info(sql, name, binds); end - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#142 - def cache_sql(sql, name, binds); end + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#300 + def cache_notification_info_result(sql, name, binds, result); end - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#182 - def configure_query_cache!; end + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#278 + def cache_sql(sql, name, binds); end - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#120 + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#260 def lookup_sql_cache(sql, name, binds); end + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#256 + def unset_query_cache!; end + class << self # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#20 def dirties_query_cache(base, *method_names); end - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#11 + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#12 def included(base); end end end -# source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#32 +# source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#116 module ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#33 - def initialize(*_arg0); end + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#117 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#132 + def checkout_and_verify(connection); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#177 + def clear_query_cache; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#173 + def dirties_query_cache; end + + # Disable the query cache within the block. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#139 + def disable_query_cache(dirties: T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#43 + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#164 def disable_query_cache!; end - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#38 + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#149 + def enable_query_cache; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#159 def enable_query_cache!; end - # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#48 + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#187 + def query_cache; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#169 def query_cache_enabled; end end -# source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#8 +# source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#9 ActiveRecord::ConnectionAdapters::QueryCache::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) +# source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#97 +class ActiveRecord::ConnectionAdapters::QueryCache::QueryCacheRegistry + # @return [QueryCacheRegistry] a new instance of QueryCacheRegistry + # + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#98 + def initialize; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#109 + def clear; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#103 + def compute_if_absent(context); end +end + +# source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#34 +class ActiveRecord::ConnectionAdapters::QueryCache::Store + # @return [Store] a new instance of Store + # + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#39 + def initialize(version, max_size); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#58 + def [](key); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#83 + def clear; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#67 + def compute_if_absent(key); end + + # Returns the value of attribute dirties. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#35 + def dirties; end + + # Sets the attribute dirties + # + # @param value the value to set the attribute dirties to. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#35 + def dirties=(_arg0); end + + # Returns the value of attribute dirties. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#35 + def dirties?; end + + # @return [Boolean] + # + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#53 + def empty?; end + + # Returns the value of attribute enabled. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#35 + def enabled; end + + # Sets the attribute enabled + # + # @param value the value to set the attribute enabled to. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#35 + def enabled=(_arg0); end + + # Returns the value of attribute enabled. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#35 + def enabled?; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#48 + def size; end + + private + + # source://activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb#89 + def check_version; end +end + # = Active Record Connection Adapters \Quoting # # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#9 module ActiveRecord::ConnectionAdapters::Quoting + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveRecord::ConnectionAdapters::Quoting::ClassMethods + # Cast a value to be used as a bound parameter of unknown type. For example, # MySQL might perform dangerous castings when comparing a string to a number, # so this method will cast numbers to string. # - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#69 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#112 def cast_bound_value(value); end - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#180 - def column_name_matcher; end - - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#184 - def column_name_with_order_matcher; end - # If you are having to call this function, you are likely doing something # wrong. The column does not have sufficient type information if the user # provided a custom type on the class level either explicitly (via @@ -13911,42 +14315,32 @@ module ActiveRecord::ConnectionAdapters::Quoting # (varchar vs binary) for example. The type used to get this primitive # should have been provided before reaching the connection adapter. # - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#82 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#125 def lookup_cast_type_from_column(column); end # Quotes the column value to help prevent # {SQL injection attacks}[https://en.wikipedia.org/wiki/SQL_injection]. # - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#12 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#73 def quote(value); end - # Quote a value to be used as a bound parameter of unknown type. For example, - # MySQL might perform dangerous castings when comparing a string to a number, - # so this method will cast numbers to string. - # - # Deprecated: Consider `Arel.sql("... ? ...", value)` or - # +sanitize_sql+ instead. + # Quotes the column name. # - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#57 - def quote_bound_value(value); end - - # Quotes the column name. Defaults to no quoting. - # - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#93 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#136 def quote_column_name(column_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#114 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#157 def quote_default_expression(value, column); end # Quotes a string, escaping any ' (single quote) and \ (backslash) # characters. # - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#88 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#131 def quote_string(s); end - # Quotes the table name. Defaults to column name quoting. + # Quotes the table name. # - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#98 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#141 def quote_table_name(table_name); end # Override to return the quoted table name for assignment. Defaults to @@ -13958,93 +14352,105 @@ module ActiveRecord::ConnectionAdapters::Quoting # We override this in the sqlite3 and postgresql adapters to use only # the column name (as per syntax requirements). # - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#110 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#153 def quote_table_name_for_assignment(table, attr); end - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#163 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#206 def quoted_binary(value); end # Quote date/time values for use in SQL input. Includes microseconds # if the value is a Time responding to usec. # - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#141 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#184 def quoted_date(value); end - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#131 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#174 def quoted_false; end - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#158 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#201 def quoted_time(value); end - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#123 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#166 def quoted_true; end - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#167 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#210 def sanitize_as_sql_comment(value); end # Cast a +value+ to a type that the database understands. For example, # SQLite does not understand dates, so this method will convert a Date # to a String. # - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#36 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#94 def type_cast(value); end - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#135 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#178 def unquoted_false; end - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#127 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#170 def unquoted_true; end private - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#244 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#234 def lookup_cast_type(sql_type); end - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#234 + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#224 def type_casted_binds(binds); end - - # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#248 - def warn_quote_duration_deprecated; end end -# Regexp for column names (with or without a table name prefix). -# Matches the following: -# -# "#{table_name}.#{column_name}" -# "#{column_name}" -# -# source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#193 -ActiveRecord::ConnectionAdapters::Quoting::COLUMN_NAME = T.let(T.unsafe(nil), Regexp) +# source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#12 +module ActiveRecord::ConnectionAdapters::Quoting::ClassMethods + # Regexp for column names (with or without a table name prefix). + # Matches the following: + # + # "#{table_name}.#{column_name}" + # "#{column_name}" + # + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#18 + def column_name_matcher; end -# Regexp for column names with order (with or without a table name prefix, -# with or without various order modifiers). Matches the following: -# -# "#{table_name}.#{column_name}" -# "#{table_name}.#{column_name} #{direction}" -# "#{table_name}.#{column_name} #{direction} NULLS FIRST" -# "#{table_name}.#{column_name} NULLS LAST" -# "#{column_name}" -# "#{column_name} #{direction}" -# "#{column_name} #{direction} NULLS FIRST" -# "#{column_name} NULLS LAST" -# -# source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#217 -ActiveRecord::ConnectionAdapters::Quoting::COLUMN_NAME_WITH_ORDER = T.let(T.unsafe(nil), Regexp) + # Regexp for column names with order (with or without a table name prefix, + # with or without various order modifiers). Matches the following: + # + # "#{table_name}.#{column_name}" + # "#{table_name}.#{column_name} #{direction}" + # "#{table_name}.#{column_name} #{direction} NULLS FIRST" + # "#{table_name}.#{column_name} NULLS LAST" + # "#{column_name}" + # "#{column_name} #{direction}" + # "#{column_name} #{direction} NULLS FIRST" + # "#{column_name} NULLS LAST" + # + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#44 + def column_name_with_order_matcher; end + + # Quotes the column name. Must be implemented by subclasses + # + # @raise [NotImplementedError] + # + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#61 + def quote_column_name(column_name); end + + # Quotes the table name. Defaults to column name quoting. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/quoting.rb#66 + def quote_table_name(table_name); end +end # = Active Record Real \Transaction # -# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#368 +# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#449 class ActiveRecord::ConnectionAdapters::RealTransaction < ::ActiveRecord::ConnectionAdapters::Transaction - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#399 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#487 def commit; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#369 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#450 def materialize!; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#379 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#464 def restart; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#393 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#478 def rollback; end end @@ -14126,58 +14532,58 @@ end # = Active Record Restart Parent \Transaction # -# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#295 +# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#376 class ActiveRecord::ConnectionAdapters::RestartParentTransaction < ::ActiveRecord::ConnectionAdapters::Transaction # @return [RestartParentTransaction] a new instance of RestartParentTransaction # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#296 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#377 def initialize(connection, parent_transaction, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#315 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#396 def commit; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#319 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#400 def full_rollback?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#308 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#389 def materialize!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#308 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#389 def materialized?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#308 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#389 def restart(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#310 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#391 def rollback; end end # = Active Record Savepoint \Transaction # -# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#323 +# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#404 class ActiveRecord::ConnectionAdapters::SavepointTransaction < ::ActiveRecord::ConnectionAdapters::Transaction # @return [SavepointTransaction] a new instance of SavepointTransaction # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#324 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#405 def initialize(connection, savepoint_name, parent_transaction, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#358 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#439 def commit; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#364 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#445 def full_rollback?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#336 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#417 def materialize!; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#341 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#422 def restart; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#350 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#431 def rollback; end end @@ -14200,130 +14606,115 @@ end # = Active Record Connection Adapters Schema Cache # -# source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#221 +# source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#227 class ActiveRecord::ConnectionAdapters::SchemaCache # @return [SchemaCache] a new instance of SchemaCache # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#261 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#255 def initialize; end # Add internal cache for table with +table_name+. # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#325 - def add(connection, table_name); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#326 + def add(pool, table_name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#398 - def add_all(connection); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#396 + def add_all(pool); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#303 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#294 def cached?(table_name); end # Clear out internal caches for the data source +name+. # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#390 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#388 def clear_data_source_cache!(_connection, name); end # Get the columns for a table # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#340 - def columns(connection, table_name); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#338 + def columns(pool, table_name); end # Get the columns for a table as a hash, key is the column name # value is the column object. # # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#352 - def columns_hash(connection, table_name); end + def columns_hash(pool, table_name); end # Checks whether the columns hash is already cached for a table. # # @return [Boolean] # # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#359 - def columns_hash?(connection, table_name); end + def columns_hash?(_pool, table_name); end # A cached lookup for table existence. # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#316 - def data_source_exists?(connection, name); end - - # source://activesupport/7.1.3.3lib/active_support/deprecation/method_wrappers.rb#46 - def data_sources(*args, **_arg1, &block); end - - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#373 - def database_version(connection); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#309 + def data_source_exists?(pool, name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#407 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#406 def dump_to(filename); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#280 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#273 def encode_with(coder); end # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#363 - def indexes(connection, table_name); end + def indexes(pool, table_name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#289 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#281 def init_with(coder); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#417 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#416 def marshal_dump; end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#421 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#420 def marshal_load(array); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#307 - def primary_keys(connection, table_name); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#298 + def primary_keys(pool, table_name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#381 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#379 def schema_version; end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#385 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#383 def size; end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#377 - def version(connection); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#375 + def version(pool); end private - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#449 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#448 def deep_deduplicate(value); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#441 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#440 def derive_columns_hash_and_deduplicate_values; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#435 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#436 def ignored_table?(table_name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#271 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#264 def initialize_dup(other); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#468 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#461 def open(filename); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#462 - def prepare_data_sources(connection); end - - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#429 - def tables_to_cache(connection); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#428 + def tables_to_cache(pool); end class << self - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#234 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#228 def _load_from(filename); end - # source://activesupport/7.1.3.3lib/active_support/deprecation/method_wrappers.rb#46 - def load_from(*args, **_arg1, &block); end - - # source://activesupport/7.1.3.3lib/active_support/deprecation/method_wrappers.rb#46 - def new(*args, **_arg1, &block); end - private - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#250 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#244 def read(filename, &block); end end end @@ -14510,77 +14901,71 @@ class ActiveRecord::ConnectionAdapters::SchemaReflection # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#16 def initialize(cache_path, cache = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#45 - def add(connection, name); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#41 + def add(pool, name); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#87 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#79 def cached?(table_name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#25 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#21 def clear!; end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#81 - def clear_data_source_cache!(connection, name); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#73 + def clear_data_source_cache!(pool, name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#53 - def columns(connection, table_name); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#49 + def columns(pool, table_name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#57 - def columns_hash(connection, table_name); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#53 + def columns_hash(pool, table_name); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#61 - def columns_hash?(connection, table_name); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#57 + def columns_hash?(pool, table_name); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#41 - def data_source_exists?(connection, name); end - - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#49 - def data_sources(connection, name); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#37 + def data_source_exists?(pool, name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#69 - def database_version(connection); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#45 + def data_sources(pool, name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#99 - def dump_to(connection, filename); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#91 + def dump_to(pool, filename); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#65 - def indexes(connection, table_name); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#61 + def indexes(pool, table_name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#31 - def load!(connection); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#27 + def load!(pool); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#37 - def primary_keys(connection, table_name); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#33 + def primary_keys(pool, table_name); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#21 - def set_schema_cache(cache); end - - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#77 - def size(connection); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#69 + def size(pool); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#73 - def version(connection); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#65 + def version(pool); end private - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#114 - def cache(connection); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#106 + def cache(pool); end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#108 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#100 def empty_cache; end - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#124 - def load_cache(connection); end + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#116 + def load_cache(pool); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#118 + # source://activerecord/lib/active_record/connection_adapters/schema_cache.rb#110 def possible_cache_available?; end class << self @@ -14661,7 +15046,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # add_reference(:products, :supplier, foreign_key: { to_table: :firms }) # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1030 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1063 def add_belongs_to(table_name, ref_name, **options); end # Adds a new check constraint to the table. +expression+ is a String @@ -14681,7 +15066,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # [:validate] # (PostgreSQL only) Specify whether or not the constraint should be validated. Defaults to +true+. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1260 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1293 def add_check_constraint(table_name, expression, if_not_exists: T.unsafe(nil), **options); end # Add a new +type+ column named +column_name+ to +table_name+. @@ -14774,10 +15159,10 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # Ignores the method call if the column exists # add_column(:shapes, :triangle, 'polygon', if_not_exists: true) # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#620 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#636 def add_column(table_name, column_name, type, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#627 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#643 def add_columns(table_name, *column_names, type:, **options); end # Adds a new foreign key. +from_table+ is the table with the key column, @@ -14847,7 +15232,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # (PostgreSQL only) Specify whether or not the foreign key should be deferrable. Valid values are booleans or # +:deferred+ or +:immediate+ to specify the default behavior. Defaults to +false+. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1140 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1173 def add_foreign_key(from_table, to_table, **options); end # Adds a new index to the table. +column_name+ can be a single Symbol, or @@ -14938,6 +15323,16 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # Note: only supported by PostgreSQL. # + # ====== Creating an index where NULLs are treated equally + # + # add_index(:people, :last_name, nulls_not_distinct: true) + # + # generates: + # + # CREATE INDEX index_people_on_last_name ON people (last_name) NULLS NOT DISTINCT + # + # Note: only supported by PostgreSQL version 15.0.0 and greater. + # # ====== Creating an index with a specific method # # add_index(:developers, :name, using: 'btree') @@ -14975,18 +15370,21 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # ====== Creating an index with a specific algorithm # # add_index(:developers, :name, algorithm: :concurrently) - # # CREATE INDEX CONCURRENTLY developers_on_name on developers (name) + # # CREATE INDEX CONCURRENTLY developers_on_name on developers (name) -- PostgreSQL # - # Note: only supported by PostgreSQL. + # add_index(:developers, :name, algorithm: :inplace) + # # CREATE INDEX `index_developers_on_name` ON `developers` (`name`) ALGORITHM = INPLACE -- MySQL + # + # Note: only supported by PostgreSQL and MySQL. # # Concurrently adding an index is not supported in a transaction. # # For more information see the {"Transactional Migrations" section}[rdoc-ref:Migration]. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#886 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#915 def add_index(table_name, column_name, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1436 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1470 def add_index_options(table_name, column_name, name: T.unsafe(nil), if_not_exists: T.unsafe(nil), internal: T.unsafe(nil), **options); end # Adds a reference. The reference column is a bigint by default, @@ -15036,7 +15434,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # add_reference(:products, :supplier, foreign_key: { to_table: :firms }) # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1030 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1063 def add_reference(table_name, ref_name, **options); end # Adds timestamps (+created_at+ and +updated_at+) columns to +table_name+. @@ -15044,10 +15442,10 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # add_timestamps(:suppliers, null: true) # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1419 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1453 def add_timestamps(table_name, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1325 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1358 def assume_migrated_upto_version(version); end # Builds an AlterTable object for adding a column to a table. @@ -15056,7 +15454,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # if the same arguments were passed to #add_column. See #add_column for information about # passing a +table_name+, +column_name+, +type+ and other options that can be passed. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#638 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#654 def build_add_column_definition(table_name, column_name, type, **options); end # Builds a ChangeColumnDefaultDefinition object. @@ -15067,7 +15465,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#722 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#738 def build_change_column_default_definition(table_name, column_name, default_or_changes); end # Builds a CreateIndexDefinition object. @@ -15076,7 +15474,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # if the same arguments were passed to #add_index. See #add_index for information about # passing a +table_name+, +column_name+, and other additional options that can be passed. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#896 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#925 def build_create_index_definition(table_name, column_name, **options); end # Builds a TableDefinition object for a join table. @@ -15085,7 +15483,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # if the same arguments were passed to #create_join_table. See #create_join_table for # information about what arguments should be passed. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#394 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#408 def build_create_join_table_definition(table_1, table_2, column_options: T.unsafe(nil), **options); end # Returns a TableDefinition object containing information about the table that would be created @@ -15094,10 +15492,10 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @yield [table_definition] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#328 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#333 def build_create_table_definition(table_name, id: T.unsafe(nil), primary_key: T.unsafe(nil), force: T.unsafe(nil), **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1515 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1549 def bulk_change_table(table_name, operations); end # Changes the column's definition according to the new options. @@ -15108,7 +15506,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#695 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#711 def change_column(table_name, column_name, type, **options); end # Changes the comment for a column or removes it if +nil+. @@ -15120,7 +15518,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1497 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1531 def change_column_comment(table_name, column_name, comment_or_changes); end # Sets a new default value for a column: @@ -15139,7 +15537,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#713 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#729 def change_column_default(table_name, column_name, default_or_changes); end # Sets or removes a NOT NULL constraint on a column. The +null+ flag @@ -15161,7 +15559,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#742 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#758 def change_column_null(table_name, column_name, null, default = T.unsafe(nil)); end # A block for changing columns in +table+. @@ -15243,7 +15641,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # See also Table for details on all of the various column transformations. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#496 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#510 def change_table(table_name, base = T.unsafe(nil), **options); end # Changes the comment for a table or removes it if +nil+. @@ -15255,7 +15653,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1487 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1521 def change_table_comment(table_name, comment_or_changes); end # Checks to see if a check constraint exists on a table for a given check constraint definition. @@ -15264,10 +15662,10 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1309 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1342 def check_constraint_exists?(table_name, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1272 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1305 def check_constraint_options(table_name, expression, options); end # Returns an array of check constraints for the given table. @@ -15275,7 +15673,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1240 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1273 def check_constraints(table_name); end # Checks to see if a column exists in a given table. @@ -15311,7 +15709,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # columns_for_distinct("posts.id", ["posts.created_at desc"]) # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1385 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1419 def columns_for_distinct(columns, orders); end # Creates a new join table with the name created using the lexical order of the first two @@ -15320,6 +15718,15 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # Creates a table called 'assemblies_parts' with no id. # create_join_table(:assemblies, :parts) # + # # Creates a table called 'paper_boxes_papers' with no id. + # create_join_table('papers', 'paper_boxes') + # + # A duplicate prefix is combined into a single prefix. This is useful for + # namespaced models like Music::Artist and Music::Record: + # + # # Creates a table called 'music_artists_records' with no id. + # create_join_table('music_artists', 'music_records') + # # You can pass an +options+ hash which can include the following keys: # [:table_name] # Sets the table name, overriding the default. @@ -15352,10 +15759,10 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # part_id bigint NOT NULL, # ) ENGINE=InnoDB DEFAULT CHARSET=utf8 # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#375 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#389 def create_join_table(table_1, table_2, column_options: T.unsafe(nil), **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1501 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1535 def create_schema_dumper(options); end # Creates a new table with the name +table_name+. +table_name+ may either @@ -15519,7 +15926,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#34 def data_sources; end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1389 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1423 def distinct_relation_for_primary_key(relation); end # Drops the join table specified by the given arguments. @@ -15529,10 +15936,10 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # to provide one in a migration's +change+ method so it can be reverted. # In that case, the block will be used by #create_join_table. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#413 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#427 def drop_join_table(table_1, table_2, **options); end - # Drops a table from the database. + # Drops a table or tables from the database. # # [:force] # Set to +:cascade+ to drop dependent objects as well. @@ -15543,15 +15950,15 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # Although this command ignores most +options+ and the block if one is given, # it can be helpful to provide these in a migration's +change+ method so it can be reverted. - # In that case, +options+ and the block will be used by #create_table. + # In that case, +options+ and the block will be used by #create_table except if you provide more than one table which is not supported. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#526 - def drop_table(table_name, **options); end + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#540 + def drop_table(*table_names, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1316 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1349 def dump_schema_information; end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1208 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1241 def foreign_key_column_for(table_name, column_name); end # Checks to see if a foreign key exists on a table for a given foreign key definition. @@ -15567,10 +15974,10 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1204 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1237 def foreign_key_exists?(from_table, to_table = T.unsafe(nil), **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1213 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1246 def foreign_key_options(from_table, to_table, options); end # Returns an array of foreign keys for the given table. @@ -15578,10 +15985,10 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1070 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1103 def foreign_keys(table_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1464 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1498 def index_algorithm(algorithm); end # Checks to see if an index exists on a table for a given index definition. @@ -15606,14 +16013,14 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#102 def index_exists?(table_name, column_name, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#963 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#992 def index_name(table_name, options); end # Verifies the existence of an index with a given name. # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#978 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1011 def index_name_exists?(table_name, index_name); end # Returns an array of indexes for the given table. @@ -15623,12 +16030,12 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#81 def indexes(table_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1321 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1354 def internal_string_options_for_primary_key; end # Returns the maximum length of an index name in bytes. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1553 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1587 def max_index_name_size; end # Returns a hash of mappings from the abstract data types to the native @@ -15640,7 +16047,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1477 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1511 def options_include_default?(options); end # Returns just a table's primary key @@ -15648,7 +16055,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#145 def primary_key(table_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1470 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1504 def quoted_columns_for_index(column_names, options); end # Removes the reference(s). Also removes a +type+ column if one exists. @@ -15665,7 +16072,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # remove_reference(:products, :user, foreign_key: true) # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1049 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1082 def remove_belongs_to(table_name, ref_name, foreign_key: T.unsafe(nil), polymorphic: T.unsafe(nil), **options); end # Removes the given check constraint from the table. Removing a check constraint @@ -15682,7 +16089,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # to provide this in a migration's +change+ method so it can be reverted. # In that case, +expression+ will be used by #add_check_constraint. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1291 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1324 def remove_check_constraint(table_name, expression = T.unsafe(nil), if_exists: T.unsafe(nil), **options); end # Removes the column from the table definition. @@ -15701,7 +16108,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # remove_column(:suppliers, :qualification, if_exists: true) # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#683 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#699 def remove_column(table_name, column_name, type = T.unsafe(nil), **options); end # Removes the given columns from the table definition. @@ -15712,7 +16119,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # remove_columns(:suppliers, :qualification, :experience, type: :string, null: false) # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#659 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#675 def remove_columns(table_name, *column_names, type: T.unsafe(nil), **options); end # Removes the given foreign key from the table. Any option parameters provided @@ -15746,7 +16153,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # [:to_table] # The name of the table that contains the referenced primary key. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1181 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1214 def remove_foreign_key(from_table, to_table = T.unsafe(nil), **options); end # Removes the given index from the table. @@ -15786,7 +16193,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # For more information see the {"Transactional Migrations" section}[rdoc-ref:Migration]. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#937 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#966 def remove_index(table_name, column_name = T.unsafe(nil), **options); end # Removes the reference(s). Also removes a +type+ column if one exists. @@ -15803,14 +16210,14 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # remove_reference(:products, :user, foreign_key: true) # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1049 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1082 def remove_reference(table_name, ref_name, foreign_key: T.unsafe(nil), polymorphic: T.unsafe(nil), **options); end # Removes the timestamp columns (+created_at+ and +updated_at+) from the table definition. # # remove_timestamps(:suppliers) # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1428 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1462 def remove_timestamps(table_name, **options); end # Renames a column. @@ -15819,7 +16226,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#750 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#766 def rename_column(table_name, column_name, new_column_name); end # Renames an index. @@ -15828,7 +16235,7 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # rename_index :people, 'index_people_on_last_name', 'index_users_on_last_name' # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#951 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#980 def rename_index(table_name, old_name, new_name); end # Renames a table. @@ -15837,13 +16244,13 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#510 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#524 def rename_table(table_name, new_name, **_arg2); end # Returns an instance of SchemaCreation, which can be used to visit a schema definition # object and return DDL. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1511 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1545 def schema_creation; end # Truncates a table alias according to the limits of the current adapter. @@ -15873,24 +16280,24 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#51 def tables; end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1345 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1379 def type_to_sql(type, limit: T.unsafe(nil), precision: T.unsafe(nil), scale: T.unsafe(nil), **_arg4); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1432 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1466 def update_table_definition(table_name, base); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1505 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1539 def use_foreign_keys?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1544 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1578 def valid_column_definition_options; end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1548 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1582 def valid_primary_key_options; end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1540 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1574 def valid_table_definition_options; end # Checks to see if the view +view_name+ exists on the database. @@ -15909,144 +16316,144 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements private - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1797 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1831 def add_column_for_alter(table_name, column_name, type, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1582 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1616 def add_index_sort_order(quoted_columns, **options); end # Overridden by the MySQL adapter for supporting index lengths and by # the PostgreSQL adapter for supporting operator classes. # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1599 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1633 def add_options_for_index_columns(quoted_columns, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1820 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1854 def add_timestamps_for_alter(table_name, **options); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1789 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1823 def can_remove_index_by_name?(column_name, options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1803 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1837 def change_column_default_for_alter(table_name, column_name, default_or_changes); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1757 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1791 def check_constraint_for(table_name, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1763 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1797 def check_constraint_for!(table_name, expression: T.unsafe(nil), **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1747 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1781 def check_constraint_name(table_name, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1578 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1612 def column_options_keys; end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1665 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1699 def create_alter_table(name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1661 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1695 def create_table_definition(name, **options); end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1850 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1884 def data_source_sql(name = T.unsafe(nil), type: T.unsafe(nil)); end # Try to identify whether the given column name is an expression # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1705 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1739 def expression_column_name?(column_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1735 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1769 def extract_foreign_key_action(specifier); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1780 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1814 def extract_new_comment_value(default_or_changes); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1780 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1814 def extract_new_default_value(default_or_changes); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1677 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1711 def fetch_type_metadata(sql_type); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1725 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1759 def foreign_key_for(from_table, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1730 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1764 def foreign_key_for!(from_table, to_table: T.unsafe(nil), **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1715 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1749 def foreign_key_name(table_name, options); end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1743 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1777 def foreign_keys_enabled?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1558 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1592 def generate_index_name(table_name, column); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1688 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1722 def index_column_names(column_names); end # @raise [ArgumentError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1607 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1641 def index_name_for_remove(table_name, column_name, options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1696 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1730 def index_name_options(column_names); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1837 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1871 def insert_versions_sql(versions); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1589 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1623 def options_for_index_columns(options); end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1854 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1888 def quoted_scope(name = T.unsafe(nil), type: T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1793 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1827 def reference_name_for_table(table_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1812 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1846 def remove_column_for_alter(table_name, column_name, type = T.unsafe(nil), **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1816 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1850 def remove_columns_for_alter(table_name, *column_names, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1833 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1867 def remove_timestamps_for_alter(table_name, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1648 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1682 def rename_column_indexes(table_name, column_name, new_column_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1808 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1842 def rename_column_sql(table_name, column_name, new_column_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1639 - def rename_table_indexes(table_name, new_name); end + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1673 + def rename_table_indexes(table_name, new_name, **options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1709 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1743 def strip_table_name_prefix_and_suffix(table_name); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1572 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1606 def validate_change_column_null_argument!(value); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1669 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1703 def validate_create_table_options!(options); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1768 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1802 def validate_index_length!(table_name, new_name, internal = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1774 + # source://activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#1808 def validate_table_length!(table_name); end end @@ -16459,7 +16866,7 @@ end # Inside migration files, the +t+ object in {create_table}[rdoc-ref:SchemaStatements#create_table] # is actually of this type: # -# class SomeMigration < ActiveRecord::Migration[7.1] +# class SomeMigration < ActiveRecord::Migration[8.0] # def up # create_table :foo do |t| # puts t.class # => "ActiveRecord::ConnectionAdapters::TableDefinition" @@ -16743,78 +17150,87 @@ class ActiveRecord::ConnectionAdapters::TableDefinition def valid_column_definition_options; end end -# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#120 +# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#128 class ActiveRecord::ConnectionAdapters::Transaction # @return [Transaction] a new instance of Transaction # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#126 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#153 def initialize(connection, isolation: T.unsafe(nil), joinable: T.unsafe(nil), run_commit_callbacks: T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#147 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#185 def add_record(record, ensure_finalize = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#208 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#203 + def after_commit(&block); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#211 + def after_rollback(&block); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#195 + def before_commit(&block); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#274 def before_commit_records; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#251 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#181 def closed?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#228 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#298 def commit_records; end # Returns the value of attribute connection. # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#121 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#148 def connection; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#139 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#169 def dirty!; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#143 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#173 def dirty?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#249 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#327 def full_rollback?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#171 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#233 def incomplete!; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#124 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#151 def invalidate!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#124 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#151 def invalidated?(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute isolation_level. # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#121 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#148 def isolation_level; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#250 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#328 def joinable?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#175 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#237 def materialize!; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#180 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#242 def materialized?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#252 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#177 def open?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#157 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#219 def records; end # Can this transaction's current state be recreated by @@ -16822,237 +17238,258 @@ class ActiveRecord::ConnectionAdapters::Transaction # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#167 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#229 def restartable?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#184 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#246 def restore!; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#192 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#254 def rollback_records; end # Returns the value of attribute savepoint_name. # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#121 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#148 def savepoint_name; end # Returns the value of attribute state. # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#121 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#148 def state; end + # Returns the value of attribute user_transaction. + # + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#148 + def user_transaction; end + # Returns the value of attribute written. # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#122 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#149 def written; end # Sets the attribute written # # @param value the value to set the attribute written to. # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#122 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#149 def written=(_arg0); end + protected + + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#331 + def append_callbacks(callbacks); end + private - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#267 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#348 def prepare_instances_to_run_callbacks_on(records); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#259 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#340 def run_action_on_records(records, instances_to_run_callbacks_on); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#255 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#336 def unique_records; end end -# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#77 +# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#129 +class ActiveRecord::ConnectionAdapters::Transaction::Callback + # @return [Callback] a new instance of Callback + # + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#130 + def initialize(event, callback); end + + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#139 + def after_commit; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#143 + def after_rollback; end + + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#135 + def before_commit; end +end + +# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#79 class ActiveRecord::ConnectionAdapters::TransactionInstrumenter # @return [TransactionInstrumenter] a new instance of TransactionInstrumenter # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#78 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#80 def initialize(payload = T.unsafe(nil)); end # @raise [InstrumentationNotStartedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#97 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#101 def finish(outcome); end # @raise [InstrumentationAlreadyStartedError] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#88 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#90 def start; end end -# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#86 +# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#88 class ActiveRecord::ConnectionAdapters::TransactionInstrumenter::InstrumentationAlreadyStartedError < ::ActiveRecord::ActiveRecordError; end -# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#85 +# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#87 class ActiveRecord::ConnectionAdapters::TransactionInstrumenter::InstrumentationNotStartedError < ::ActiveRecord::ActiveRecordError; end -# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#406 +# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#497 class ActiveRecord::ConnectionAdapters::TransactionManager # @return [TransactionManager] a new instance of TransactionManager # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#407 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#498 def initialize(connection); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#415 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#506 def begin_transaction(isolation: T.unsafe(nil), joinable: T.unsafe(nil), _lazy: T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#502 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#593 def commit_transaction; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#588 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#661 def current_transaction; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#470 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#561 def dirty_current_transaction; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#457 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#548 def disable_lazy_transactions!; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#462 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#553 def enable_lazy_transactions!; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#466 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#557 def lazy_transactions_enabled?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#486 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#577 def materialize_transactions; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#584 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#657 def open_transactions; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#482 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#573 def restorable?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#474 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#565 def restore_transactions; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#519 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#610 def rollback_transaction(transaction = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#531 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#622 def within_new_transaction(isolation: T.unsafe(nil), joinable: T.unsafe(nil)); end private # Deallocate invalidated prepared statements outside of the transaction # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#596 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#669 def after_failure_actions(transaction, error); end end -# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#593 +# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#666 ActiveRecord::ConnectionAdapters::TransactionManager::NULL_TRANSACTION = T.let(T.unsafe(nil), ActiveRecord::ConnectionAdapters::NullTransaction) # = Active Record Connection Adapters Transaction State # -# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#6 +# source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#8 class ActiveRecord::ConnectionAdapters::TransactionState # @return [TransactionState] a new instance of TransactionState # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#7 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#9 def initialize(state = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#12 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#14 def add_child(state); end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#64 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#66 def commit!; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#21 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#23 def committed?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#45 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#47 def completed?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#17 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#19 def finalized?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#68 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#70 def full_commit!; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#54 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#56 def full_rollback!; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#25 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#27 def fully_committed?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#41 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#43 def fully_completed?; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#33 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#35 def fully_rolledback?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#59 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#61 def invalidate!; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#37 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#39 def invalidated?; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#72 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#74 def nullify!; end - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#49 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#51 def rollback!; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#29 + # source://activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#31 def rolledback?; end end # ConnectionFailed will be raised when the network connection to the # database fails while sending a query or waiting for its result. # -# source://activerecord/lib/active_record/errors.rb#555 +# source://activerecord/lib/active_record/errors.rb#582 class ActiveRecord::ConnectionFailed < ::ActiveRecord::QueryAborted; end # = Active Record Connection Handling # # source://activerecord/lib/active_record/connection_handling.rb#5 module ActiveRecord::ConnectionHandling - # source://activerecord/lib/active_record/connection_handling.rb#319 - def clear_active_connections!(role = T.unsafe(nil)); end - - # source://activerecord/lib/active_record/connection_handling.rb#329 - def clear_all_connections!(role = T.unsafe(nil)); end + # source://activerecord/lib/active_record/connection_handling.rb#338 + def adapter_class; end - # source://activerecord/lib/active_record/connection_handling.rb#315 + # source://activerecord/lib/active_record/connection_handling.rb#372 def clear_cache!; end # Clears the query cache for all connections associated with the current thread. # - # source://activerecord/lib/active_record/connection_handling.rb#244 + # source://activerecord/lib/active_record/connection_handling.rb#258 def clear_query_caches_for_current_thread; end - # source://activerecord/lib/active_record/connection_handling.rb#324 - def clear_reloadable_connections!(role = T.unsafe(nil)); end - # Returns +true+ if Active Record is connected. # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_handling.rb#291 + # source://activerecord/lib/active_record/connection_handling.rb#351 def connected?; end # Connects to a role (e.g. writing, reading, or a custom role) and/or @@ -17082,7 +17519,7 @@ module ActiveRecord::ConnectionHandling # Dog.first # finds first Dog record stored on the shard one replica # end # - # source://activerecord/lib/active_record/connection_handling.rb#134 + # source://activerecord/lib/active_record/connection_handling.rb#136 def connected_to(role: T.unsafe(nil), shard: T.unsafe(nil), prevent_writes: T.unsafe(nil), &blk); end # Returns true if role is the current connected role and/or @@ -17102,9 +17539,19 @@ module ActiveRecord::ConnectionHandling # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_handling.rb#239 + # source://activerecord/lib/active_record/connection_handling.rb#253 def connected_to?(role:, shard: T.unsafe(nil)); end + # Passes the block to +connected_to+ for every +shard+ the + # model is configured to connect to (if any), and returns the + # results in an array. + # + # Optionally, +role+ and/or +prevent_writes+ can be passed which + # will be forwarded to each +connected_to+ call. + # + # source://activerecord/lib/active_record/connection_handling.rb#186 + def connected_to_all_shards(role: T.unsafe(nil), prevent_writes: T.unsafe(nil), &blk); end + # Connects a role and/or shard to the provided connection names. Optionally +prevent_writes+ # can be passed to block writes on a connection. +reading+ will automatically set # +prevent_writes+ to true. @@ -17119,7 +17566,7 @@ module ActiveRecord::ConnectionHandling # Person.first # Read from primary writer # end # - # source://activerecord/lib/active_record/connection_handling.rb#163 + # source://activerecord/lib/active_record/connection_handling.rb#165 def connected_to_many(*classes, role:, shard: T.unsafe(nil), prevent_writes: T.unsafe(nil)); end # Use a specified connection. @@ -17130,14 +17577,12 @@ module ActiveRecord::ConnectionHandling # It is not recommended to use this method in a request since it # does not yield to a block like +connected_to+. # - # source://activerecord/lib/active_record/connection_handling.rb#185 + # source://activerecord/lib/active_record/connection_handling.rb#199 def connecting_to(role: T.unsafe(nil), shard: T.unsafe(nil), prevent_writes: T.unsafe(nil)); end - # Returns the connection currently associated with the class. This can - # also be used to "borrow" the connection to do database work unrelated - # to any of the specific Active Records. + # Soft deprecated. Use +#with_connection+ or +#lease_connection+ instead. # - # source://activerecord/lib/active_record/connection_handling.rb#253 + # source://activerecord/lib/active_record/connection_handling.rb#274 def connection; end # Returns the db_config object from the associated connection: @@ -17148,22 +17593,22 @@ module ActiveRecord::ConnectionHandling # # Use only for reading. # - # source://activerecord/lib/active_record/connection_handling.rb#278 + # source://activerecord/lib/active_record/connection_handling.rb#334 def connection_db_config; end - # source://activerecord/lib/active_record/connection_handling.rb#282 + # source://activerecord/lib/active_record/connection_handling.rb#342 def connection_pool; end # Returns the connection specification name from the current class or its parent. # - # source://activerecord/lib/active_record/connection_handling.rb#260 + # source://activerecord/lib/active_record/connection_handling.rb#316 def connection_specification_name; end # Sets the attribute connection_specification_name # # @param value the value to set the attribute connection_specification_name to. # - # source://activerecord/lib/active_record/connection_handling.rb#257 + # source://activerecord/lib/active_record/connection_handling.rb#313 def connection_specification_name=(_arg0); end # Connects a model to the databases specified. The +database+ keyword @@ -17242,12 +17687,18 @@ module ActiveRecord::ConnectionHandling # source://activerecord/lib/active_record/connection_handling.rb#50 def establish_connection(config_or_env = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_handling.rb#334 - def flush_idle_connections!(role = T.unsafe(nil)); end + # Returns the connection currently associated with the class. This can + # also be used to "borrow" the connection to do database work unrelated + # to any of the specific Active Records. + # The connection will remain leased for the entire duration of the request + # or job, or until +#release_connection+ is called. + # + # source://activerecord/lib/active_record/connection_handling.rb#269 + def lease_connection; end # @return [Boolean] # - # source://activerecord/lib/active_record/connection_handling.rb#267 + # source://activerecord/lib/active_record/connection_handling.rb#323 def primary_class?; end # Prohibit swapping shards while inside of the passed block. @@ -17257,22 +17708,38 @@ module ActiveRecord::ConnectionHandling # is useful in cases you're using sharding to provide per-request # database isolation. # - # source://activerecord/lib/active_record/connection_handling.rb#197 + # source://activerecord/lib/active_record/connection_handling.rb#211 def prohibit_shard_swapping(enabled = T.unsafe(nil)); end - # source://activerecord/lib/active_record/connection_handling.rb#295 - def remove_connection(name = T.unsafe(nil)); end + # Return the currently leased connection into the pool + # + # source://activerecord/lib/active_record/connection_handling.rb#298 + def release_connection; end + + # source://activerecord/lib/active_record/connection_handling.rb#355 + def remove_connection; end - # source://activerecord/lib/active_record/connection_handling.rb#286 + # source://activerecord/lib/active_record/connection_handling.rb#346 def retrieve_connection; end + # source://activerecord/lib/active_record/connection_handling.rb#368 + def schema_cache; end + + # source://activerecord/lib/active_record/connection_handling.rb#376 + def shard_keys; end + # Determine whether or not shard swapping is currently prohibited # # @return [Boolean] # - # source://activerecord/lib/active_record/connection_handling.rb#206 + # source://activerecord/lib/active_record/connection_handling.rb#220 def shard_swapping_prohibited?; end + # @return [Boolean] + # + # source://activerecord/lib/active_record/connection_handling.rb#380 + def sharded?; end + # Prevent writing to the database regardless of role. # # In some cases you may want to prevent writes to the database @@ -17285,21 +17752,29 @@ module ActiveRecord::ConnectionHandling # See +READ_QUERY+ for the queries that are blocked by this # method. # - # source://activerecord/lib/active_record/connection_handling.rb#221 + # source://activerecord/lib/active_record/connection_handling.rb#235 def while_preventing_writes(enabled = T.unsafe(nil), &block); end + # Checkouts a connection from the pool, yield it and then check it back in. + # If a connection was already leased via #lease_connection or a parent call to + # #with_connection, that same connection is yieled. + # If #lease_connection is called inside the block, the connection won't be checked + # back in. + # If #connection is called inside the block, the connection won't be checked back in + # unless the +prevent_permanent_checkout+ argument is set to +true+. + # + # source://activerecord/lib/active_record/connection_handling.rb#309 + def with_connection(prevent_permanent_checkout: T.unsafe(nil), &block); end + private - # source://activerecord/lib/active_record/connection_handling.rb#368 + # source://activerecord/lib/active_record/connection_handling.rb#405 def append_to_connected_to_stack(entry); end - # source://activerecord/lib/active_record/connection_handling.rb#340 - def deprecation_for_delegation(method); end - - # source://activerecord/lib/active_record/connection_handling.rb#348 + # source://activerecord/lib/active_record/connection_handling.rb#385 def resolve_config_for_connection(config_or_env); end - # source://activerecord/lib/active_record/connection_handling.rb#357 + # source://activerecord/lib/active_record/connection_handling.rb#394 def with_role_and_shard(role, shard, prevent_writes); end end @@ -17309,18 +17784,44 @@ ActiveRecord::ConnectionHandling::DEFAULT_ENV = T.let(T.unsafe(nil), Proc) # source://activerecord/lib/active_record/connection_handling.rb#6 ActiveRecord::ConnectionHandling::RAILS_ENV = T.let(T.unsafe(nil), Proc) +# Raised when a database connection pool is requested but +# has not been defined. +# +# source://activerecord/lib/active_record/errors.rb#89 +class ActiveRecord::ConnectionNotDefined < ::ActiveRecord::ConnectionNotEstablished + # @return [ConnectionNotDefined] a new instance of ConnectionNotDefined + # + # source://activerecord/lib/active_record/errors.rb#90 + def initialize(message = T.unsafe(nil), connection_name: T.unsafe(nil), role: T.unsafe(nil), shard: T.unsafe(nil)); end + + # Returns the value of attribute connection_name. + # + # source://activerecord/lib/active_record/errors.rb#97 + def connection_name; end + + # Returns the value of attribute role. + # + # source://activerecord/lib/active_record/errors.rb#97 + def role; end + + # Returns the value of attribute shard. + # + # source://activerecord/lib/active_record/errors.rb#97 + def shard; end +end + # Raised when connection to the database could not been established (for example when -# {ActiveRecord::Base.connection=}[rdoc-ref:ConnectionHandling#connection] +# {ActiveRecord::Base.lease_connection=}[rdoc-ref:ConnectionHandling#lease_connection] # is given a +nil+ object). # -# source://activerecord/lib/active_record/errors.rb#71 +# source://activerecord/lib/active_record/errors.rb#67 class ActiveRecord::ConnectionNotEstablished < ::ActiveRecord::AdapterError # @return [ConnectionNotEstablished] a new instance of ConnectionNotEstablished # - # source://activerecord/lib/active_record/errors.rb#72 + # source://activerecord/lib/active_record/errors.rb#68 def initialize(message = T.unsafe(nil), connection_pool: T.unsafe(nil)); end - # source://activerecord/lib/active_record/errors.rb#76 + # source://activerecord/lib/active_record/errors.rb#72 def set_pool(connection_pool); end end @@ -17328,7 +17829,7 @@ end # acquisition timeout period: because max connections in pool # are in use. # -# source://activerecord/lib/active_record/errors.rb#88 +# source://activerecord/lib/active_record/errors.rb#84 class ActiveRecord::ConnectionTimeoutError < ::ActiveRecord::ConnectionNotEstablished; end # = Active Record \Core @@ -17354,12 +17855,12 @@ module ActiveRecord::Core # @yield [_self] # @yieldparam _self [ActiveRecord::Core] the object that the method was called on # - # source://activerecord/lib/active_record/core.rb#446 + # source://activerecord/lib/active_record/core.rb#452 def initialize(attributes = T.unsafe(nil)); end # Allows sort on objects # - # source://activerecord/lib/active_record/core.rb#633 + # source://activerecord/lib/active_record/core.rb#639 def <=>(other_object); end # Returns true if +comparison_object+ is the same exact object, or +comparison_object+ @@ -17372,15 +17873,15 @@ module ActiveRecord::Core # Note also that destroying a record preserves its ID in the model instance, so deleted # models are still comparable. # - # source://activerecord/lib/active_record/core.rb#599 + # source://activerecord/lib/active_record/core.rb#605 def ==(comparison_object); end # @return [Boolean] # - # source://activerecord/lib/active_record/core.rb#645 + # source://activerecord/lib/active_record/core.rb#651 def blank?; end - # source://activerecord/lib/active_record/core.rb#713 + # source://activerecord/lib/active_record/core.rb#724 def connection_handler; end # Populate +coder+ with attributes about this record that should be @@ -17396,7 +17897,7 @@ module ActiveRecord::Core # Post.new.encode_with(coder) # coder # => {"attributes" => {"id" => nil, ... }} # - # source://activerecord/lib/active_record/core.rb#555 + # source://activerecord/lib/active_record/core.rb#561 def encode_with(coder); end # Returns true if +comparison_object+ is the same exact object, or +comparison_object+ @@ -17409,27 +17910,32 @@ module ActiveRecord::Core # Note also that destroying a record preserves its ID in the model instance, so deleted # models are still comparable. # - # source://activerecord/lib/active_record/core.rb#599 + # source://activerecord/lib/active_record/core.rb#605 def eql?(comparison_object); end # Clone and freeze the attributes hash such that associations are still # accessible, even on destroyed records, but cloned models will not be # frozen. # - # source://activerecord/lib/active_record/core.rb#622 + # source://activerecord/lib/active_record/core.rb#628 def freeze; end # Returns +true+ if the attributes hash has been frozen. # # @return [Boolean] # - # source://activerecord/lib/active_record/core.rb#628 + # source://activerecord/lib/active_record/core.rb#634 def frozen?; end + # Returns the full contents of the record as a nicely formatted string. + # + # source://activerecord/lib/active_record/core.rb#734 + def full_inspect; end + # Delegates to id in order to allow two records of the same type and id to work with something like: # [ Person.find(1), Person.find(2), Person.find(3) ] & [ Person.find(1), Person.find(4) ] # => [ Person.find(1) ] # - # source://activerecord/lib/active_record/core.rb#609 + # source://activerecord/lib/active_record/core.rb#615 def hash; end # Initialize an empty model object from +coder+. +coder+ should be @@ -17447,7 +17953,7 @@ module ActiveRecord::Core # post.init_with(coder) # post.title # => 'hello world' # - # source://activerecord/lib/active_record/core.rb#473 + # source://activerecord/lib/active_record/core.rb#479 def init_with(coder, &block); end # Initialize an empty model object from +attributes+. @@ -17457,23 +17963,23 @@ module ActiveRecord::Core # @yield [_self] # @yieldparam _self [ActiveRecord::Core] the object that the method was called on # - # source://activerecord/lib/active_record/core.rb#483 + # source://activerecord/lib/active_record/core.rb#489 def init_with_attributes(attributes, new_record = T.unsafe(nil)); end - # Returns the contents of the record as a nicely formatted string. + # Returns the attributes specified by .attributes_for_inspect as a nicely formatted string. # - # source://activerecord/lib/active_record/core.rb#718 + # source://activerecord/lib/active_record/core.rb#729 def inspect; end # @return [Boolean] # - # source://activerecord/lib/active_record/core.rb#641 + # source://activerecord/lib/active_record/core.rb#647 def present?; end # Takes a PP and prettily prints this record to it, allowing you to get a nice result from pp record # when pp is required. # - # source://activerecord/lib/active_record/core.rb#736 + # source://activerecord/lib/active_record/core.rb#740 def pretty_print(pp); end # Marks this record as read only. @@ -17482,14 +17988,14 @@ module ActiveRecord::Core # customer.readonly! # customer.save # Raises an ActiveRecord::ReadOnlyRecord # - # source://activerecord/lib/active_record/core.rb#709 + # source://activerecord/lib/active_record/core.rb#720 def readonly!; end # Returns +true+ if the record is read only. # # @return [Boolean] # - # source://activerecord/lib/active_record/core.rb#650 + # source://activerecord/lib/active_record/core.rb#656 def readonly?; end # Sets the record to strict_loading mode. This will raise an error @@ -17522,45 +18028,61 @@ module ActiveRecord::Core # user.comments.first.ratings.to_a # => ActiveRecord::StrictLoadingViolationError # - # source://activerecord/lib/active_record/core.rb#688 + # source://activerecord/lib/active_record/core.rb#694 def strict_loading!(value = T.unsafe(nil), mode: T.unsafe(nil)); end # Returns +true+ if the record is in strict_loading mode. # # @return [Boolean] # - # source://activerecord/lib/active_record/core.rb#655 + # source://activerecord/lib/active_record/core.rb#661 def strict_loading?; end + # Returns +true+ if the record uses strict_loading with +:all+ mode enabled. + # + # @return [Boolean] + # + # source://activerecord/lib/active_record/core.rb#711 + def strict_loading_all?; end + # Returns the value of attribute strict_loading_mode. # - # source://activerecord/lib/active_record/core.rb#697 + # source://activerecord/lib/active_record/core.rb#703 def strict_loading_mode; end # Returns +true+ if the record uses strict_loading with +:n_plus_one_only+ mode enabled. # # @return [Boolean] # - # source://activerecord/lib/active_record/core.rb#700 + # source://activerecord/lib/active_record/core.rb#706 def strict_loading_n_plus_one_only?; end private + # source://activerecord/lib/active_record/core.rb#830 + def all_attributes_for_inspect; end + + # source://activerecord/lib/active_record/core.rb#826 + def attributes_for_inspect; end + # @return [Boolean] # - # source://activerecord/lib/active_record/core.rb#793 + # source://activerecord/lib/active_record/core.rb#796 def custom_inspect_method_defined?; end - # source://activerecord/lib/active_record/core.rb#772 + # source://activerecord/lib/active_record/core.rb#776 def init_internals; end - # source://activerecord/lib/active_record/core.rb#525 + # source://activerecord/lib/active_record/core.rb#531 def initialize_dup(other); end - # source://activerecord/lib/active_record/core.rb#790 + # source://activerecord/lib/active_record/core.rb#793 def initialize_internals_callback; end - # source://activerecord/lib/active_record/core.rb#804 + # source://activerecord/lib/active_record/core.rb#811 + def inspect_with_attributes(attributes_to_list); end + + # source://activerecord/lib/active_record/core.rb#807 def inspection_filter; end # +Array#flatten+ will call +#to_ary+ (recursively) on each of the elements of @@ -17572,13 +18094,16 @@ module ActiveRecord::Core # # See also https://tenderlovemaking.com/2011/06/28/til-its-ok-to-return-nil-from-to_ary.html # - # source://activerecord/lib/active_record/core.rb#768 + # source://activerecord/lib/active_record/core.rb#772 def to_ary; end module GeneratedClassMethods def _destroy_association_async_job; end def _destroy_association_async_job=(value); end def _destroy_association_async_job?; end + def attributes_for_inspect; end + def attributes_for_inspect=(value); end + def attributes_for_inspect?; end def belongs_to_required_by_default; end def belongs_to_required_by_default=(value); end def belongs_to_required_by_default?; end @@ -17611,6 +18136,9 @@ module ActiveRecord::Core def strict_loading_by_default; end def strict_loading_by_default=(value); end def strict_loading_by_default?; end + def strict_loading_mode; end + def strict_loading_mode=(value); end + def strict_loading_mode?; end end module GeneratedInstanceMethods @@ -17626,76 +18154,76 @@ module ActiveRecord::Core end end -# source://activerecord/lib/active_record/core.rb#238 +# source://activerecord/lib/active_record/core.rb#242 module ActiveRecord::Core::ClassMethods # Returns an instance of +Arel::Table+ loaded with the current table name. # - # source://activerecord/lib/active_record/core.rb#364 + # source://activerecord/lib/active_record/core.rb#368 def arel_table; end - # source://activerecord/lib/active_record/core.rb#376 - def cached_find_by_statement(key, &block); end + # source://activerecord/lib/active_record/core.rb#380 + def cached_find_by_statement(connection, key, &block); end # Returns columns which shouldn't be exposed while calling +#inspect+. # - # source://activerecord/lib/active_record/core.rb#322 + # source://activerecord/lib/active_record/core.rb#326 def filter_attributes; end # Specifies columns which shouldn't be exposed while calling +#inspect+. # - # source://activerecord/lib/active_record/core.rb#331 + # source://activerecord/lib/active_record/core.rb#335 def filter_attributes=(filter_attributes); end - # source://activerecord/lib/active_record/core.rb#243 + # source://activerecord/lib/active_record/core.rb#247 def find(*ids); end - # source://activerecord/lib/active_record/core.rb#256 + # source://activerecord/lib/active_record/core.rb#260 def find_by(*args); end - # source://activerecord/lib/active_record/core.rb#303 + # source://activerecord/lib/active_record/core.rb#307 def find_by!(*args); end - # source://activerecord/lib/active_record/core.rb#311 + # source://activerecord/lib/active_record/core.rb#315 def generated_association_methods; end - # source://activerecord/lib/active_record/core.rb#239 + # source://activerecord/lib/active_record/core.rb#243 def initialize_find_by_cache; end - # source://activerecord/lib/active_record/core.rb#307 + # source://activerecord/lib/active_record/core.rb#311 def initialize_generated_modules; end # Returns a string like 'Post(id:integer, title:string, body:text)' # - # source://activerecord/lib/active_record/core.rb#348 + # source://activerecord/lib/active_record/core.rb#352 def inspect; end - # source://activerecord/lib/active_record/core.rb#336 + # source://activerecord/lib/active_record/core.rb#340 def inspection_filter; end - # source://activerecord/lib/active_record/core.rb#368 + # source://activerecord/lib/active_record/core.rb#372 def predicate_builder; end - # source://activerecord/lib/active_record/core.rb#372 + # source://activerecord/lib/active_record/core.rb#376 def type_caster; end private - # source://activerecord/lib/active_record/core.rb#418 + # source://activerecord/lib/active_record/core.rb#422 def cached_find_by(keys, values); end - # source://activerecord/lib/active_record/core.rb#382 + # source://activerecord/lib/active_record/core.rb#386 def inherited(subclass); end - # source://activerecord/lib/active_record/core.rb#404 + # source://activerecord/lib/active_record/core.rb#408 def relation; end - # source://activerecord/lib/active_record/core.rb#414 + # source://activerecord/lib/active_record/core.rb#418 def table_metadata; end end -# source://activerecord/lib/active_record/core.rb#797 +# source://activerecord/lib/active_record/core.rb#800 class ActiveRecord::Core::InspectionMask - # source://activerecord/lib/active_record/core.rb#798 + # source://activerecord/lib/active_record/core.rb#801 def pretty_print(pp); end end @@ -17711,29 +18239,37 @@ module ActiveRecord::CounterCache private - # source://activerecord/lib/active_record/counter_cache.rb#186 + # source://activerecord/lib/active_record/counter_cache.rb#200 def _create_record(attribute_names = T.unsafe(nil)); end - # source://activerecord/lib/active_record/counter_cache.rb#196 - def destroy_row; end + # @return [Boolean] + # + # source://activerecord/lib/active_record/counter_cache.rb#226 + def _foreign_keys_equal?(fkey1, fkey2); end - # source://activerecord/lib/active_record/counter_cache.rb#211 - def each_counter_cached_associations; end + # source://activerecord/lib/active_record/counter_cache.rb#210 + def destroy_row; end module GeneratedClassMethods def _counter_cache_columns; end def _counter_cache_columns=(value); end def _counter_cache_columns?; end + def counter_cached_association_names; end + def counter_cached_association_names=(value); end + def counter_cached_association_names?; end end - module GeneratedInstanceMethods; end + module GeneratedInstanceMethods + def counter_cached_association_names; end + def counter_cached_association_names?; end + end end -# source://activerecord/lib/active_record/counter_cache.rb#12 +# source://activerecord/lib/active_record/counter_cache.rb#13 module ActiveRecord::CounterCache::ClassMethods # @return [Boolean] # - # source://activerecord/lib/active_record/counter_cache.rb#180 + # source://activerecord/lib/active_record/counter_cache.rb#182 def counter_cache_column?(name); end # Decrement a numeric field by one, via a direct SQL update. @@ -17763,7 +18299,7 @@ module ActiveRecord::CounterCache::ClassMethods # # and update the updated_at value. # DiscussionBoard.decrement_counter(:posts_count, 5, touch: true) # - # source://activerecord/lib/active_record/counter_cache.rb#176 + # source://activerecord/lib/active_record/counter_cache.rb#178 def decrement_counter(counter_name, id, by: T.unsafe(nil), touch: T.unsafe(nil)); end # Increment a numeric field by one, via a direct SQL update. @@ -17795,9 +18331,12 @@ module ActiveRecord::CounterCache::ClassMethods # # and update the updated_at value. # DiscussionBoard.increment_counter(:posts_count, 5, touch: true) # - # source://activerecord/lib/active_record/counter_cache.rb#146 + # source://activerecord/lib/active_record/counter_cache.rb#148 def increment_counter(counter_name, id, by: T.unsafe(nil), touch: T.unsafe(nil)); end + # source://activerecord/lib/active_record/counter_cache.rb#186 + def load_schema!; end + # Resets one or more counter caches to their correct value using an SQL # count query. This is useful when adding new counter caches, or if the # counter has been corrupted or modified directly by SQL. @@ -17819,7 +18358,7 @@ module ActiveRecord::CounterCache::ClassMethods # # attributes. # Post.reset_counters(1, :comments, touch: true) # - # source://activerecord/lib/active_record/counter_cache.rb#33 + # source://activerecord/lib/active_record/counter_cache.rb#34 def reset_counters(id, *counters, touch: T.unsafe(nil)); end # A generic "counter updater" implementation, intended primarily to be @@ -17864,19 +18403,19 @@ module ActiveRecord::CounterCache::ClassMethods # # `updated_at` = '2016-10-13T09:59:23-05:00' # # WHERE id IN (10, 15) # - # source://activerecord/lib/active_record/counter_cache.rb#114 + # source://activerecord/lib/active_record/counter_cache.rb#115 def update_counters(id, counters); end end # Raised when attribute has a name reserved by Active Record (when attribute # has name of one of Active Record instance methods). # -# source://activerecord/lib/active_record/errors.rb#413 +# source://activerecord/lib/active_record/errors.rb#440 class ActiveRecord::DangerousAttributeError < ::ActiveRecord::ActiveRecordError; end # Raised when creating a database if it exists. # -# source://activerecord/lib/active_record/errors.rb#336 +# source://activerecord/lib/active_record/errors.rb#357 class ActiveRecord::DatabaseAlreadyExists < ::ActiveRecord::StatementInvalid; end # = Active Record Database Configurations @@ -18096,14 +18635,14 @@ class ActiveRecord::DatabaseConfigurations::ConnectionUrlResolver # Converts the given URL to a full connection hash. # - # source://activerecord/lib/active_record/database_configurations/connection_url_resolver.rb#39 + # source://activerecord/lib/active_record/database_configurations/connection_url_resolver.rb#38 def to_hash; end private # Returns name of the database. # - # source://activerecord/lib/active_record/database_configurations/connection_url_resolver.rb#84 + # source://activerecord/lib/active_record/database_configurations/connection_url_resolver.rb#89 def database_from_path; end # Converts the query parameters of the URI into a hash. @@ -18116,18 +18655,21 @@ class ActiveRecord::DatabaseConfigurations::ConnectionUrlResolver # "localhost" # # => {} # - # source://activerecord/lib/active_record/database_configurations/connection_url_resolver.rb#61 + # source://activerecord/lib/active_record/database_configurations/connection_url_resolver.rb#60 def query_hash; end - # source://activerecord/lib/active_record/database_configurations/connection_url_resolver.rb#65 + # source://activerecord/lib/active_record/database_configurations/connection_url_resolver.rb#64 def raw_config; end + # source://activerecord/lib/active_record/database_configurations/connection_url_resolver.rb#82 + def resolved_adapter; end + # Returns the value of attribute uri. # - # source://activerecord/lib/active_record/database_configurations/connection_url_resolver.rb#46 + # source://activerecord/lib/active_record/database_configurations/connection_url_resolver.rb#45 def uri; end - # source://activerecord/lib/active_record/database_configurations/connection_url_resolver.rb#48 + # source://activerecord/lib/active_record/database_configurations/connection_url_resolver.rb#47 def uri_parser; end end @@ -18144,28 +18686,25 @@ class ActiveRecord::DatabaseConfigurations::DatabaseConfig # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#32 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#43 def _database=(database); end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#36 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#47 def adapter; end - # source://activerecord/lib/active_record/database_configurations/database_config.rb#20 - def adapter_class_method; end - - # source://activerecord/lib/active_record/database_configurations/database_config.rb#16 - def adapter_method; end + # source://activerecord/lib/active_record/database_configurations/database_config.rb#17 + def adapter_class; end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#60 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#71 def checkout_timeout; end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#28 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#39 def database; end # source://activerecord/lib/active_record/database_configurations/database_config.rb#9 @@ -18173,206 +18712,224 @@ class ActiveRecord::DatabaseConfigurations::DatabaseConfig # @return [Boolean] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#80 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#91 def for_current_env?; end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#24 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#35 def host; end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#68 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#79 def idle_timeout; end + # source://activerecord/lib/active_record/database_configurations/database_config.rb#21 + def inspect; end + # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#52 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#63 def max_queue; end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#48 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#59 def max_threads; end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#76 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#87 def migrations_paths; end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#44 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#55 def min_threads; end # source://activerecord/lib/active_record/database_configurations/database_config.rb#9 def name; end + # source://activerecord/lib/active_record/database_configurations/database_config.rb#25 + def new_connection; end + # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#40 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#51 def pool; end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#56 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#67 def query_cache; end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#64 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#75 def reaping_frequency; end # @raise [NotImplementedError] # @return [Boolean] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#72 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#83 def replica?; end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/database_configurations/database_config.rb#84 + # source://activerecord/lib/active_record/database_configurations/database_config.rb#95 def schema_cache_path; end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://activerecord/lib/active_record/database_configurations/database_config.rb#99 + def use_metadata_table?; end + + # source://activerecord/lib/active_record/database_configurations/database_config.rb#29 + def validate!; end end -# = Active Record Database Hash Config +# # Active Record Database Hash Config # -# A +HashConfig+ object is created for each database configuration entry that -# is created from a hash. +# A `HashConfig` object is created for each database configuration entry that is +# created from a hash. # # A hash config: # -# { "development" => { "database" => "db_name" } } +# { "development" => { "database" => "db_name" } } # # Becomes: # -# # +# # # # See ActiveRecord::DatabaseConfigurations for more info. # -# source://activerecord/lib/active_record/database_configurations/hash_config.rb#20 +# source://activerecord/lib/active_record/database_configurations/hash_config.rb#22 class ActiveRecord::DatabaseConfigurations::HashConfig < ::ActiveRecord::DatabaseConfigurations::DatabaseConfig - # Initialize a new +HashConfig+ object + # Initialize a new `HashConfig` object # - # ==== Options + # #### Parameters # - # * :env_name - The \Rails environment, i.e. "development". - # * :name - The db config name. In a standard two-tier - # database configuration this will default to "primary". In a multiple - # database three-tier database configuration this corresponds to the name - # used in the second tier, for example "primary_readonly". - # * :config - The config hash. This is the hash that contains the - # database adapter, name, and other important information for database - # connections. + # * `env_name` - The Rails environment, i.e. "development". + # * `name` - The db config name. In a standard two-tier database configuration + # this will default to "primary". In a multiple database three-tier database + # configuration this corresponds to the name used in the second tier, for + # example "primary_readonly". + # * `configuration_hash` - The config hash. This is the hash that contains the + # database adapter, name, and other important information for database + # connections. # # @return [HashConfig] a new instance of HashConfig # - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#36 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#38 def initialize(env_name, name, configuration_hash); end - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#67 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#68 def _database=(database); end - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#106 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#107 def adapter; end - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#91 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#92 def checkout_timeout; end # Returns the value of attribute configuration_hash. # - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#21 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#23 def configuration_hash; end - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#63 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#64 def database; end # @return [Boolean] # - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#149 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#153 def database_tasks?; end # source://activerecord/lib/active_record/database_configurations/hash_config.rb#117 - def default_schema_cache_path; end + def default_schema_cache_path(db_dir = T.unsafe(nil)); end - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#55 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#56 def host; end - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#101 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#102 def idle_timeout; end - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#121 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#125 def lazy_schema_cache_path; end - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#87 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#88 def max_queue; end - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#79 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#80 def max_threads; end - # The migrations paths for a database configuration. If the - # +migrations_paths+ key is present in the config, +migrations_paths+ - # will return its value. + # The migrations paths for a database configuration. If the `migrations_paths` + # key is present in the config, `migrations_paths` will return its value. # - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#51 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#52 def migrations_paths; end - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#75 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#76 def min_threads; end - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#71 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#72 def pool; end # @return [Boolean] # - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#125 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#129 def primary?; end - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#83 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#84 def query_cache; end - # +reaping_frequency+ is configurable mostly for historical reasons, but it could - # also be useful if someone wants a very low +idle_timeout+. + # `reaping_frequency` is configurable mostly for historical reasons, but it + # could also be useful if someone wants a very low `idle_timeout`. # - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#97 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#98 def reaping_frequency; end # Determines whether a database configuration is for a replica / readonly - # connection. If the +replica+ key is present in the config, +replica?+ will - # return +true+. + # connection. If the `replica` key is present in the config, `replica?` will + # return `true`. # # @return [Boolean] # - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#44 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#46 def replica?; end - # The path to the schema cache dump file for a database. - # If omitted, the filename will be read from ENV or a - # default will be derived. + # The path to the schema cache dump file for a database. If omitted, the + # filename will be read from ENV or a default will be derived. # # source://activerecord/lib/active_record/database_configurations/hash_config.rb#113 def schema_cache_path; end - # Determines whether to dump the schema/structure files and the - # filename that should be used. + # Determines whether to dump the schema/structure files and the filename that + # should be used. # - # If +configuration_hash[:schema_dump]+ is set to +false+ or +nil+ - # the schema will not be dumped. + # If `configuration_hash[:schema_dump]` is set to `false` or `nil` the schema + # will not be dumped. # - # If the config option is set that will be used. Otherwise \Rails - # will generate the filename from the database config name. + # If the config option is set that will be used. Otherwise Rails will generate + # the filename from the database config name. # - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#137 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#141 def schema_dump(format = T.unsafe(nil)); end - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#59 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#60 def socket; end + # @return [Boolean] + # + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#157 + def use_metadata_table?; end + private - # source://activerecord/lib/active_record/database_configurations/hash_config.rb#154 + # source://activerecord/lib/active_record/database_configurations/hash_config.rb#162 def schema_file_type(format); end end @@ -18429,36 +18986,45 @@ class ActiveRecord::DatabaseConfigurations::UrlConfig < ::ActiveRecord::Database # Return a Hash that can be merged into the main config that represents # the passed in url # - # source://activerecord/lib/active_record/database_configurations/url_config.rb#50 + # source://activerecord/lib/active_record/database_configurations/url_config.rb#69 def build_url_hash; end + + # source://activerecord/lib/active_record/database_configurations/url_config.rb#61 + def to_boolean!(configuration_hash, key); end end # Raised when connection to the database could not been established because it was not # able to connect to the host or when the authorization failed. # -# source://activerecord/lib/active_record/errors.rb#93 +# source://activerecord/lib/active_record/errors.rb#102 class ActiveRecord::DatabaseConnectionError < ::ActiveRecord::ConnectionNotEstablished # @return [DatabaseConnectionError] a new instance of DatabaseConnectionError # - # source://activerecord/lib/active_record/errors.rb#94 + # source://activerecord/lib/active_record/errors.rb#103 def initialize(message = T.unsafe(nil)); end class << self - # source://activerecord/lib/active_record/errors.rb#99 + # source://activerecord/lib/active_record/errors.rb#108 def hostname_error(hostname); end - # source://activerecord/lib/active_record/errors.rb#106 + # source://activerecord/lib/active_record/errors.rb#115 def username_error(username); end end end +# DatabaseVersionError will be raised when the database version is not supported, or when +# the database version cannot be determined. +# +# source://activerecord/lib/active_record/errors.rb#610 +class ActiveRecord::DatabaseVersionError < ::ActiveRecord::ActiveRecordError; end + # Deadlocked will be raised when a transaction is rolled # back by the database when a deadlock is encountered. # # This is a subclass of TransactionRollbackError, please make sure to check # its documentation to be aware of its caveats. # -# source://activerecord/lib/active_record/errors.rb#525 +# source://activerecord/lib/active_record/errors.rb#552 class ActiveRecord::Deadlocked < ::ActiveRecord::TransactionRollbackError; end # = Delegated types @@ -18494,7 +19060,7 @@ class ActiveRecord::Deadlocked < ::ActiveRecord::TransactionRollbackError; end # # Let's look at that entry/message/comment example using delegated types: # -# # Schema: entries[ id, account_id, creator_id, created_at, updated_at, entryable_type, entryable_id ] +# # Schema: entries[ id, account_id, creator_id, entryable_type, entryable_id, created_at, updated_at ] # class Entry < ApplicationRecord # belongs_to :account # belongs_to :creator @@ -18509,12 +19075,12 @@ class ActiveRecord::Deadlocked < ::ActiveRecord::TransactionRollbackError; end # end # end # -# # Schema: messages[ id, subject, body ] +# # Schema: messages[ id, subject, body, created_at, updated_at ] # class Message < ApplicationRecord # include Entryable # end # -# # Schema: comments[ id, content ] +# # Schema: comments[ id, content, created_at, updated_at ] # class Comment < ApplicationRecord # include Entryable # end @@ -18560,17 +19126,37 @@ class ActiveRecord::Deadlocked < ::ActiveRecord::TransactionRollbackError; end # You create a new record that uses delegated typing by creating the delegator and delegatee at the same time, # like so: # -# Entry.create! entryable: Comment.new(content: "Hello!"), creator: Current.user +# Entry.create! entryable: Comment.new(content: "Hello!"), creator: Current.user, account: Current.account # # If you need more complicated composition, or you need to perform dependent validation, you should build a factory # method or class to take care of the complicated needs. This could be as simple as: # # class Entry < ApplicationRecord -# def self.create_with_comment(content, creator: Current.user) -# create! entryable: Comment.new(content: content), creator: creator +# def self.create_with_comment(content, creator: Current.user, account: Current.account) +# create! entryable: Comment.new(content: content), creator: creator, account: account # end # end # +# == Querying across records +# +# A consequence of delegated types is that querying attributes spread across multiple classes becomes slightly more +# tricky, but not impossible. +# +# The simplest method is to join the "superclass" to the "subclass" and apply the query parameters (i.e. #where) +# in appropriate places: +# +# Comment.joins(:entry).where(comments: { content: 'Hello!' }, entry: { creator: Current.user } ) +# +# For convenience, add a scope on the concern. Now all classes that implement the concern will automatically include +# the method: +# +# # app/models/concerns/entryable.rb +# scope :with_entry, ->(attrs) { joins(:entry).where(entry: attrs) } +# +# Now the query can be shortened significantly: +# +# Comment.where(content: 'Hello!').with_entry(creator: Current.user) +# # == Adding further delegation # # The delegated type shouldn't just answer the question of what the underlying class is called. In fact, that's @@ -18611,7 +19197,7 @@ class ActiveRecord::Deadlocked < ::ActiveRecord::TransactionRollbackError; end # entry.entryable.id # => 2 # entry.entryable.subject # => 'Smiling' # -# source://activerecord/lib/active_record/delegated_type.rb#155 +# source://activerecord/lib/active_record/delegated_type.rb#175 module ActiveRecord::DelegatedType # Defines this as a class that'll delegate its type for the passed +role+ to the class references in +types+. # That'll create a polymorphic +belongs_to+ relationship to that +role+, and it'll add all the delegated @@ -18669,136 +19255,151 @@ module ActiveRecord::DelegatedType # Entry#message_uuid # => returns entryable_uuid, when entryable_type == "Message", otherwise nil # Entry#comment_uuid # => returns entryable_uuid, when entryable_type == "Comment", otherwise nil # - # source://activerecord/lib/active_record/delegated_type.rb#211 + # source://activerecord/lib/active_record/delegated_type.rb#231 def delegated_type(role, types:, **options); end private - # source://activerecord/lib/active_record/delegated_type.rb#217 + # source://activerecord/lib/active_record/delegated_type.rb#237 def define_delegated_type_methods(role, types:, options:); end end -# source://activerecord/lib/active_record/relation/delegation.rb#7 +# source://activerecord/lib/active_record/relation/delegation.rb#6 module ActiveRecord::Delegation extend ::ActiveSupport::Concern mixes_in_class_methods ::ActiveRecord::Delegation::ClassMethods - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def &(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def +(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def -(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def [](*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def as_json(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def compact(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#105 + # source://activerecord/lib/active_record/relation/delegation.rb#106 def connection(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def each(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def encode_with(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def in_groups(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def in_groups_of(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def index(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def intersect?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def join(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def length(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#105 + # source://activerecord/lib/active_record/relation/delegation.rb#106 + def name(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/relation/delegation.rb#106 def primary_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def reverse(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def rindex(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def rotate(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def sample(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#106 + def sanitize_sql_like(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/relation/delegation.rb#101 def shuffle(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def slice(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def split(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#106 + def table_name(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/relation/delegation.rb#101 def to_formatted_s(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def to_fs(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def to_sentence(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#101 def to_xml(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#105 + # source://activerecord/lib/active_record/relation/delegation.rb#106 def transaction(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation/delegation.rb#100 + # source://activerecord/lib/active_record/relation/delegation.rb#106 + def unscoped(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/relation/delegation.rb#106 + def with_connection(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/relation/delegation.rb#101 def |(*_arg0, **_arg1, &_arg2); end private # @return [Boolean] # - # source://activerecord/lib/active_record/relation/delegation.rb#142 + # source://activerecord/lib/active_record/relation/delegation.rb#150 def respond_to_missing?(method, _); end class << self - # source://activerecord/lib/active_record/relation/delegation.rb#9 + # source://activerecord/lib/active_record/relation/delegation.rb#8 def delegated_classes; end - # source://activerecord/lib/active_record/relation/delegation.rb#18 + # source://activerecord/lib/active_record/relation/delegation.rb#17 def uncacheable_methods; end end end -# source://activerecord/lib/active_record/relation/delegation.rb#130 +# source://activerecord/lib/active_record/relation/delegation.rb#138 module ActiveRecord::Delegation::ClassMethods - # source://activerecord/lib/active_record/relation/delegation.rb#131 - def create(klass, *args, **kwargs); end + # source://activerecord/lib/active_record/relation/delegation.rb#139 + def create(model, *_arg1, **_arg2, &_arg3); end private - # source://activerecord/lib/active_record/relation/delegation.rb#136 - def relation_class_for(klass); end + # source://activerecord/lib/active_record/relation/delegation.rb#144 + def relation_class_for(model); end end -# source://activerecord/lib/active_record/relation/delegation.rb#107 +# source://activerecord/lib/active_record/relation/delegation.rb#108 module ActiveRecord::Delegation::ClassSpecificRelation extend ::ActiveSupport::Concern @@ -18806,79 +19407,70 @@ module ActiveRecord::Delegation::ClassSpecificRelation private - # source://activerecord/lib/active_record/relation/delegation.rb#117 - def method_missing(method, *args, **_arg2, &block); end + # source://activerecord/lib/active_record/relation/delegation.rb#118 + def method_missing(method, *_arg1, **_arg2, &_arg3); end end -# source://activerecord/lib/active_record/relation/delegation.rb#110 +# source://activerecord/lib/active_record/relation/delegation.rb#111 module ActiveRecord::Delegation::ClassSpecificRelation::ClassMethods - # source://activerecord/lib/active_record/relation/delegation.rb#111 + # source://activerecord/lib/active_record/relation/delegation.rb#112 def name; end end -# source://activerecord/lib/active_record/relation/delegation.rb#25 +# source://activerecord/lib/active_record/relation/delegation.rb#24 module ActiveRecord::Delegation::DelegateCache - # source://activerecord/lib/active_record/relation/delegation.rb#50 + # source://activerecord/lib/active_record/relation/delegation.rb#52 def generate_relation_method(method); end - # source://activerecord/lib/active_record/relation/delegation.rb#45 + # source://activerecord/lib/active_record/relation/delegation.rb#47 def inherited(child_class); end - # source://activerecord/lib/active_record/relation/delegation.rb#30 + # source://activerecord/lib/active_record/relation/delegation.rb#32 def initialize_relation_delegate_cache; end - # source://activerecord/lib/active_record/relation/delegation.rb#26 + # source://activerecord/lib/active_record/relation/delegation.rb#28 def relation_delegate_class(klass); end protected - # source://activerecord/lib/active_record/relation/delegation.rb#55 + # source://activerecord/lib/active_record/relation/delegation.rb#57 def include_relation_methods(delegate); end private - # source://activerecord/lib/active_record/relation/delegation.rb#61 + # source://activerecord/lib/active_record/relation/delegation.rb#63 def generated_relation_methods; end + + class << self + # source://activerecord/lib/active_record/relation/delegation.rb#26 + def delegate_base_methods; end + + # source://activerecord/lib/active_record/relation/delegation.rb#26 + def delegate_base_methods=(_arg0); end + end end -# source://activerecord/lib/active_record/relation/delegation.rb#69 +# source://activerecord/lib/active_record/relation/delegation.rb#71 class ActiveRecord::Delegation::GeneratedRelationMethods < ::Module - include ::Mutex_m - - # source://activerecord/lib/active_record/relation/delegation.rb#72 + # source://activerecord/lib/active_record/relation/delegation.rb#74 def generate_method(method); end - - # source://mutex_m/0.2.0lib/mutex_m.rb#91 - def lock; end - - # source://mutex_m/0.2.0lib/mutex_m.rb#81 - def locked?; end - - # source://mutex_m/0.2.0lib/mutex_m.rb#76 - def synchronize(&block); end - - # source://mutex_m/0.2.0lib/mutex_m.rb#86 - def try_lock; end - - # source://mutex_m/0.2.0lib/mutex_m.rb#96 - def unlock; end end +# source://activerecord/lib/active_record/relation/delegation.rb#72 +ActiveRecord::Delegation::GeneratedRelationMethods::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) + # This error is raised when trying to destroy a parent instance in N:1 or 1:1 associations # (has_many, has_one) when there is at least 1 child associated instance. # ex: if @project.tasks.size > 0, DeleteRestrictionError will be raised when trying to destroy @project # -# source://activerecord/lib/active_record/associations.rb#256 +# source://activerecord/lib/active_record/associations/errors.rb#256 class ActiveRecord::DeleteRestrictionError < ::ActiveRecord::ActiveRecordError # @return [DeleteRestrictionError] a new instance of DeleteRestrictionError # - # source://activerecord/lib/active_record/associations.rb#257 + # source://activerecord/lib/active_record/associations/errors.rb#257 def initialize(name = T.unsafe(nil)); end end -# source://activerecord/lib/active_record/errors.rb#13 -class ActiveRecord::DeprecatedActiveJobRequiredError < ::ActiveRecord::ActiveRecordError; end - # source://activerecord/lib/active_record/destroy_association_async_job.rb#4 class ActiveRecord::DestroyAssociationAsyncError < ::StandardError; end @@ -18899,11 +19491,17 @@ class ActiveRecord::DestroyAssociationAsyncJob < ::ActiveJob::Base def owner_destroyed?(owner, ensuring_owner_was_method); end class << self - # source://activejob/7.1.3.3lib/active_job/queue_name.rb#55 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def queue_name; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end end end @@ -18934,19 +19532,19 @@ class ActiveRecord::DisableJoinsAssociationRelation < ::ActiveRecord::Relation def load; end end -# source://activerecord/lib/active_record/migration.rb#104 +# source://activerecord/lib/active_record/migration.rb#102 class ActiveRecord::DuplicateMigrationNameError < ::ActiveRecord::MigrationError # @return [DuplicateMigrationNameError] a new instance of DuplicateMigrationNameError # - # source://activerecord/lib/active_record/migration.rb#105 + # source://activerecord/lib/active_record/migration.rb#103 def initialize(name = T.unsafe(nil)); end end -# source://activerecord/lib/active_record/migration.rb#94 +# source://activerecord/lib/active_record/migration.rb#92 class ActiveRecord::DuplicateMigrationVersionError < ::ActiveRecord::MigrationError # @return [DuplicateMigrationVersionError] a new instance of DuplicateMigrationVersionError # - # source://activerecord/lib/active_record/migration.rb#95 + # source://activerecord/lib/active_record/migration.rb#93 def initialize(version = T.unsafe(nil)); end end @@ -18955,7 +19553,7 @@ module ActiveRecord::DynamicMatchers private # source://activerecord/lib/active_record/dynamic_matchers.rb#15 - def method_missing(name, *arguments, &block); end + def method_missing(name, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # @@ -19066,11 +19664,11 @@ end # Eager loading polymorphic associations is only possible with # {ActiveRecord::Relation#preload}[rdoc-ref:QueryMethods#preload]. # -# source://activerecord/lib/active_record/associations.rb#243 +# source://activerecord/lib/active_record/associations/errors.rb#243 class ActiveRecord::EagerLoadPolymorphicError < ::ActiveRecord::ActiveRecordError # @return [EagerLoadPolymorphicError] a new instance of EagerLoadPolymorphicError # - # source://activerecord/lib/active_record/associations.rb#244 + # source://activerecord/lib/active_record/associations/errors.rb#244 def initialize(reflection = T.unsafe(nil)); end end @@ -19085,10 +19683,10 @@ module ActiveRecord::Encryption # source://activerecord/lib/active_record/encryption/configurable.rb#10 def config; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#74 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#74 def custom_contexts; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#116 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#116 def custom_contexts=(obj); end # source://activerecord/lib/active_record/encryption/contexts.rb#17 @@ -19107,10 +19705,10 @@ module ActiveRecord::Encryption # source://activerecord/lib/active_record/encryption/configurable.rb#10 def config; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 def custom_contexts; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 def custom_contexts=(obj); end # source://activerecord/lib/active_record/encryption/contexts.rb#17 @@ -19267,7 +19865,7 @@ ActiveRecord::Encryption::Cipher::DEFAULT_ENCODING = T.let(T.unsafe(nil), Encodi class ActiveRecord::Encryption::Config # @return [Config] a new instance of Config # - # source://activerecord/lib/active_record/encryption/config.rb#13 + # source://activerecord/lib/active_record/encryption/config.rb#14 def initialize; end # Returns the value of attribute add_to_filter_parameters. @@ -19282,9 +19880,21 @@ class ActiveRecord::Encryption::Config # source://activerecord/lib/active_record/encryption/config.rb#9 def add_to_filter_parameters=(_arg0); end + # Returns the value of attribute compressor. + # + # source://activerecord/lib/active_record/encryption/config.rb#9 + def compressor; end + + # Sets the attribute compressor + # + # @param value the value to set the attribute compressor to. + # + # source://activerecord/lib/active_record/encryption/config.rb#9 + def compressor=(_arg0); end + # Returns the value of attribute deterministic_key. # - # source://activerecord/lib/active_record/encryption/config.rb#41 + # source://activerecord/lib/active_record/encryption/config.rb#42 def deterministic_key; end # Sets the attribute deterministic_key @@ -19342,13 +19952,13 @@ class ActiveRecord::Encryption::Config # source://activerecord/lib/active_record/encryption/config.rb#9 def forced_encoding_for_deterministic_encryption=(_arg0); end - # source://activerecord/lib/active_record/encryption/config.rb#36 + # source://activerecord/lib/active_record/encryption/config.rb#37 def has_deterministic_key?; end - # source://activerecord/lib/active_record/encryption/config.rb#36 + # source://activerecord/lib/active_record/encryption/config.rb#37 def has_key_derivation_salt?; end - # source://activerecord/lib/active_record/encryption/config.rb#36 + # source://activerecord/lib/active_record/encryption/config.rb#37 def has_primary_key?; end # Returns the value of attribute hash_digest_class. @@ -19365,7 +19975,7 @@ class ActiveRecord::Encryption::Config # Returns the value of attribute key_derivation_salt. # - # source://activerecord/lib/active_record/encryption/config.rb#41 + # source://activerecord/lib/active_record/encryption/config.rb#42 def key_derivation_salt; end # Sets the attribute key_derivation_salt @@ -19379,7 +19989,7 @@ class ActiveRecord::Encryption::Config # # config.active_record.encryption.previous = [ { key_provider: MyOldKeyProvider.new } ] # - # source://activerecord/lib/active_record/encryption/config.rb#20 + # source://activerecord/lib/active_record/encryption/config.rb#21 def previous=(previous_schemes_properties); end # Returns the value of attribute previous_schemes. @@ -19396,7 +20006,7 @@ class ActiveRecord::Encryption::Config # Returns the value of attribute primary_key. # - # source://activerecord/lib/active_record/encryption/config.rb#41 + # source://activerecord/lib/active_record/encryption/config.rb#42 def primary_key; end # Sets the attribute primary_key @@ -19418,7 +20028,7 @@ class ActiveRecord::Encryption::Config # source://activerecord/lib/active_record/encryption/config.rb#9 def store_key_references=(_arg0); end - # source://activerecord/lib/active_record/encryption/config.rb#26 + # source://activerecord/lib/active_record/encryption/config.rb#27 def support_sha1_for_non_deterministic_encryption=(value); end # Returns the value of attribute support_unencrypted_data. @@ -19447,10 +20057,10 @@ class ActiveRecord::Encryption::Config private - # source://activerecord/lib/active_record/encryption/config.rb#63 + # source://activerecord/lib/active_record/encryption/config.rb#65 def add_previous_scheme(**properties); end - # source://activerecord/lib/active_record/encryption/config.rb#48 + # source://activerecord/lib/active_record/encryption/config.rb#49 def set_defaults; end end @@ -19704,7 +20314,7 @@ module ActiveRecord::Encryption::EncryptableRecord::ClassMethods def deterministic_encrypted_attributes; end # source://activerecord/lib/active_record/encryption/encryptable_record.rb#49 - def encrypts(*names, key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous: T.unsafe(nil), **context_properties); end + def encrypts(*names, key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous: T.unsafe(nil), compress: T.unsafe(nil), compressor: T.unsafe(nil), **context_properties); end # source://activerecord/lib/active_record/encryption/encryptable_record.rb#65 def source_attribute_from_preserved_attribute(attribute_name); end @@ -19715,7 +20325,7 @@ module ActiveRecord::Encryption::EncryptableRecord::ClassMethods def add_length_validation_for_encrypted_columns; end # source://activerecord/lib/active_record/encryption/encryptable_record.rb#84 - def encrypt_attribute(name, key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous: T.unsafe(nil), **context_properties); end + def encrypt_attribute(name, key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous: T.unsafe(nil), compress: T.unsafe(nil), compressor: T.unsafe(nil), **context_properties); end # source://activerecord/lib/active_record/encryption/encryptable_record.rb#78 def global_previous_schemes_for(scheme); end @@ -19746,7 +20356,7 @@ ActiveRecord::Encryption::EncryptableRecord::ORIGINAL_ATTRIBUTE_PREFIX = T.let(T # for that attribute. # # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#10 -class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveRecord::Type::Text +class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveModel::Type::Value include ::ActiveModel::Type::Helpers::Mutable # === Options @@ -19815,6 +20425,9 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveRecord::Type::T # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#61 def support_unencrypted_data?; end + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#16 + def type(*_arg0, **_arg1, &_arg2); end + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#15 def with_context(*_arg0, **_arg1, &_arg2); end @@ -19823,25 +20436,34 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveRecord::Type::T # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#74 def build_previous_types_for(schemes); end - # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#150 + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#162 def clean_text_scheme; end - # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#84 + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#174 + def database_type_to_text(value); end + + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#102 def decrypt(value); end - # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#146 + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#84 + def decrypt_as_text(value); end + + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#158 def decryption_options; end - # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#132 + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#146 def encrypt(value); end - # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#142 + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#136 + def encrypt_as_text(value); end + + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#154 def encryption_options; end - # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#138 + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#150 def encryptor; end - # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#110 + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#114 def handle_deserialize_error(error, value); end # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#66 @@ -19855,18 +20477,21 @@ class ActiveRecord::Encryption::EncryptedAttributeType < ::ActiveRecord::Type::T # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#70 def previous_types_without_clean_text; end - # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#126 + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#130 def serialize_with_current(value); end - # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#122 + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#126 def serialize_with_oldest(value); end # @return [Boolean] # - # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#118 + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#122 def serialize_with_oldest?; end - # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#102 + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#166 + def text_to_database_type(value); end + + # source://activerecord/lib/active_record/encryption/encrypted_attribute_type.rb#106 def try_to_deserialize_with_previous_encrypted_types(value); end end @@ -19898,9 +20523,38 @@ end # It interacts with a KeyProvider for getting the keys, and delegate to # ActiveRecord::Encryption::Cipher the actual encryption algorithm. # -# source://activerecord/lib/active_record/encryption/encryptor.rb#14 +# source://activerecord/lib/active_record/encryption/encryptor.rb#13 class ActiveRecord::Encryption::Encryptor - # Decrypts a +clean_text+ and returns the result as clean text + # === Options + # + # * :compress - Boolean indicating whether records should be compressed before encryption. + # Defaults to +true+. + # * :compressor - The compressor to use. + # 1. If compressor is provided, it will be used. + # 2. If not, it will use ActiveRecord::Encryption.config.compressor which default value is +Zlib+. + # If you want to use a custom compressor, it must respond to +deflate+ and +inflate+. + # + # @return [Encryptor] a new instance of Encryptor + # + # source://activerecord/lib/active_record/encryption/encryptor.rb#25 + def initialize(compress: T.unsafe(nil), compressor: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activerecord/lib/active_record/encryption/encryptor.rb#84 + def binary?; end + + # @return [Boolean] + # + # source://activerecord/lib/active_record/encryption/encryptor.rb#88 + def compress?; end + + # The compressor to use for compressing the payload + # + # source://activerecord/lib/active_record/encryption/encryptor.rb#15 + def compressor; end + + # Decrypts an +encrypted_text+ and returns the result as clean text # # === Options # @@ -19912,7 +20566,7 @@ class ActiveRecord::Encryption::Encryptor # Cipher-specific options that will be passed to the Cipher configured in # +ActiveRecord::Encryption.cipher+ # - # source://activerecord/lib/active_record/encryption/encryptor.rb#52 + # source://activerecord/lib/active_record/encryption/encryptor.rb#67 def decrypt(encrypted_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end # Encrypts +clean_text+ and returns the encrypted result @@ -19935,67 +20589,67 @@ class ActiveRecord::Encryption::Encryptor # Cipher-specific options that will be passed to the Cipher configured in # +ActiveRecord::Encryption.cipher+ # - # source://activerecord/lib/active_record/encryption/encryptor.rb#34 + # source://activerecord/lib/active_record/encryption/encryptor.rb#49 def encrypt(clear_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end # Returns whether the text is encrypted or not # # @return [Boolean] # - # source://activerecord/lib/active_record/encryption/encryptor.rb#62 + # source://activerecord/lib/active_record/encryption/encryptor.rb#77 def encrypted?(text); end private - # source://activerecord/lib/active_record/encryption/encryptor.rb#88 + # source://activerecord/lib/active_record/encryption/encryptor.rb#111 def build_encrypted_message(clear_text, key_provider:, cipher_options:); end - # source://activerecord/lib/active_record/encryption/encryptor.rb#84 + # source://activerecord/lib/active_record/encryption/encryptor.rb#107 def cipher; end - # source://activerecord/lib/active_record/encryption/encryptor.rb#122 + # source://activerecord/lib/active_record/encryption/encryptor.rb#144 def compress(data); end # Under certain threshold, ZIP compression is actually worse that not compressing # - # source://activerecord/lib/active_record/encryption/encryptor.rb#114 + # source://activerecord/lib/active_record/encryption/encryptor.rb#136 def compress_if_worth_it(string); end - # source://activerecord/lib/active_record/encryption/encryptor.rb#74 + # source://activerecord/lib/active_record/encryption/encryptor.rb#97 def default_key_provider; end - # source://activerecord/lib/active_record/encryption/encryptor.rb#102 + # source://activerecord/lib/active_record/encryption/encryptor.rb#125 def deserialize_message(message); end - # source://activerecord/lib/active_record/encryption/encryptor.rb#142 + # source://activerecord/lib/active_record/encryption/encryptor.rb#164 def force_encoding_if_needed(value); end - # source://activerecord/lib/active_record/encryption/encryptor.rb#150 + # source://activerecord/lib/active_record/encryption/encryptor.rb#172 def forced_encoding_for_deterministic_encryption; end - # source://activerecord/lib/active_record/encryption/encryptor.rb#98 + # source://activerecord/lib/active_record/encryption/encryptor.rb#121 def serialize_message(message); end - # source://activerecord/lib/active_record/encryption/encryptor.rb#109 + # source://activerecord/lib/active_record/encryption/encryptor.rb#131 def serializer; end - # source://activerecord/lib/active_record/encryption/encryptor.rb#136 + # source://activerecord/lib/active_record/encryption/encryptor.rb#158 def uncompress(data); end - # source://activerecord/lib/active_record/encryption/encryptor.rb#128 + # source://activerecord/lib/active_record/encryption/encryptor.rb#150 def uncompress_if_needed(data, compressed); end - # source://activerecord/lib/active_record/encryption/encryptor.rb#78 + # source://activerecord/lib/active_record/encryption/encryptor.rb#101 def validate_payload_type(clear_text); end end -# source://activerecord/lib/active_record/encryption/encryptor.rb#70 +# source://activerecord/lib/active_record/encryption/encryptor.rb#93 ActiveRecord::Encryption::Encryptor::DECRYPT_ERRORS = T.let(T.unsafe(nil), Array) -# source://activerecord/lib/active_record/encryption/encryptor.rb#71 +# source://activerecord/lib/active_record/encryption/encryptor.rb#94 ActiveRecord::Encryption::Encryptor::ENCODING_ERRORS = T.let(T.unsafe(nil), Array) -# source://activerecord/lib/active_record/encryption/encryptor.rb#72 +# source://activerecord/lib/active_record/encryption/encryptor.rb#95 ActiveRecord::Encryption::Encryptor::THRESHOLD_TO_JUSTIFY_COMPRESSION = T.let(T.unsafe(nil), Integer) # Implements a simple envelope encryption approach where: @@ -20088,30 +20742,30 @@ module ActiveRecord::Encryption::ExtendedDeterministicQueries end end -# source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#132 +# source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#134 class ActiveRecord::Encryption::ExtendedDeterministicQueries::AdditionalValue # @return [AdditionalValue] a new instance of AdditionalValue # - # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#135 + # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#137 def initialize(value, type); end # Returns the value of attribute type. # - # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#133 + # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#135 def type; end # Returns the value of attribute value. # - # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#133 + # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#135 def value; end private - # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#141 + # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#143 def process(value); end end -# source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#122 +# source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#124 module ActiveRecord::Encryption::ExtendedDeterministicQueries::CoreQueries extend ::ActiveSupport::Concern @@ -20120,7 +20774,7 @@ end # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#0 module ActiveRecord::Encryption::ExtendedDeterministicQueries::CoreQueries::ClassMethods - # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#126 + # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#128 def find_by(*args); end end @@ -20136,31 +20790,31 @@ module ActiveRecord::Encryption::ExtendedDeterministicQueries::EncryptedQuery private - # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#87 + # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#89 def additional_values_for(value, type); end - # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#69 + # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#71 def process_encrypted_query_argument(value, check_for_additional_values, type); end end end -# source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#146 +# source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#148 module ActiveRecord::Encryption::ExtendedDeterministicQueries::ExtendedEncryptableType - # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#147 + # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#149 def serialize(data); end end -# source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#95 +# source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#97 module ActiveRecord::Encryption::ExtendedDeterministicQueries::RelationQueries # @return [Boolean] # - # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#100 + # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#102 def exists?(*args); end - # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#104 + # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#106 def scope_for_create; end - # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#96 + # source://activerecord/lib/active_record/encryption/extended_deterministic_queries.rb#98 def where(*args); end end @@ -20281,7 +20935,7 @@ class ActiveRecord::Encryption::KeyProvider # source://activerecord/lib/active_record/encryption/key_provider.rb#32 def decryption_keys(encrypted_message); end - # Returns the first key in the list as the active key to perform encryptions + # Returns the last key in the list as the active key to perform encryptions # # When +ActiveRecord::Encryption.config.store_key_references+ is true, the key will include # a public tag referencing the key itself. That key will be stored in the public @@ -20362,6 +21016,11 @@ end # # source://activerecord/lib/active_record/encryption/message_serializer.rb#23 class ActiveRecord::Encryption::MessageSerializer + # @return [Boolean] + # + # source://activerecord/lib/active_record/encryption/message_serializer.rb#36 + def binary?; end + # @raise [ActiveRecord::Encryption::Errors::ForbiddenClass] # # source://activerecord/lib/active_record/encryption/message_serializer.rb#31 @@ -20372,25 +21031,25 @@ class ActiveRecord::Encryption::MessageSerializer private - # source://activerecord/lib/active_record/encryption/message_serializer.rb#81 + # source://activerecord/lib/active_record/encryption/message_serializer.rb#85 def decode_if_needed(value); end - # source://activerecord/lib/active_record/encryption/message_serializer.rb#73 + # source://activerecord/lib/active_record/encryption/message_serializer.rb#77 def encode_if_needed(value); end - # source://activerecord/lib/active_record/encryption/message_serializer.rb#67 + # source://activerecord/lib/active_record/encryption/message_serializer.rb#71 def headers_to_json(headers); end - # source://activerecord/lib/active_record/encryption/message_serializer.rb#60 + # source://activerecord/lib/active_record/encryption/message_serializer.rb#64 def message_to_json(message); end - # source://activerecord/lib/active_record/encryption/message_serializer.rb#37 + # source://activerecord/lib/active_record/encryption/message_serializer.rb#41 def parse_message(data, level); end - # source://activerecord/lib/active_record/encryption/message_serializer.rb#52 + # source://activerecord/lib/active_record/encryption/message_serializer.rb#56 def parse_properties(headers, level); end - # source://activerecord/lib/active_record/encryption/message_serializer.rb#42 + # source://activerecord/lib/active_record/encryption/message_serializer.rb#46 def validate_message_data_format(data, level); end end @@ -20399,6 +21058,11 @@ end # # source://activerecord/lib/active_record/encryption/null_encryptor.rb#7 class ActiveRecord::Encryption::NullEncryptor + # @return [Boolean] + # + # source://activerecord/lib/active_record/encryption/null_encryptor.rb#20 + def binary?; end + # source://activerecord/lib/active_record/encryption/null_encryptor.rb#12 def decrypt(encrypted_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end @@ -20490,8 +21154,8 @@ class ActiveRecord::Encryption::Properties # source://activerecord/lib/active_record/encryption/properties.rb#20 def key?(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/delegation.rb#331 - def method_missing(method, *args, **_arg2, &block); end + # source://activesupport/8.0.0.beta1lib/active_support/delegation.rb#187 + def method_missing(method, *_arg1, **_arg2, &_arg3); end # source://activerecord/lib/active_record/encryption/properties.rb#68 def to_h; end @@ -20506,7 +21170,7 @@ class ActiveRecord::Encryption::Properties # source://activerecord/lib/active_record/encryption/properties.rb#73 def data; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/delegation.rb#323 + # source://activesupport/8.0.0.beta1lib/active_support/delegation.rb#179 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end @@ -20526,6 +21190,11 @@ ActiveRecord::Encryption::Properties::DEFAULT_PROPERTIES = T.let(T.unsafe(nil), # # source://activerecord/lib/active_record/encryption/read_only_null_encryptor.rb#10 class ActiveRecord::Encryption::ReadOnlyNullEncryptor + # @return [Boolean] + # + # source://activerecord/lib/active_record/encryption/read_only_null_encryptor.rb#23 + def binary?; end + # source://activerecord/lib/active_record/encryption/read_only_null_encryptor.rb#15 def decrypt(encrypted_text, key_provider: T.unsafe(nil), cipher_options: T.unsafe(nil)); end @@ -20551,37 +21220,37 @@ class ActiveRecord::Encryption::Scheme # @return [Scheme] a new instance of Scheme # # source://activerecord/lib/active_record/encryption/scheme.rb#13 - def initialize(key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous_schemes: T.unsafe(nil), **context_properties); end + def initialize(key_provider: T.unsafe(nil), key: T.unsafe(nil), deterministic: T.unsafe(nil), support_unencrypted_data: T.unsafe(nil), downcase: T.unsafe(nil), ignore_case: T.unsafe(nil), previous_schemes: T.unsafe(nil), compress: T.unsafe(nil), compressor: T.unsafe(nil), **context_properties); end # @return [Boolean] # - # source://activerecord/lib/active_record/encryption/scheme.rb#73 + # source://activerecord/lib/active_record/encryption/scheme.rb#78 def compatible_with?(other_scheme); end # @return [Boolean] # - # source://activerecord/lib/active_record/encryption/scheme.rb#39 + # source://activerecord/lib/active_record/encryption/scheme.rb#44 def deterministic?; end # @return [Boolean] # - # source://activerecord/lib/active_record/encryption/scheme.rb#35 + # source://activerecord/lib/active_record/encryption/scheme.rb#40 def downcase?; end # @return [Boolean] # - # source://activerecord/lib/active_record/encryption/scheme.rb#47 + # source://activerecord/lib/active_record/encryption/scheme.rb#52 def fixed?; end # @return [Boolean] # - # source://activerecord/lib/active_record/encryption/scheme.rb#31 + # source://activerecord/lib/active_record/encryption/scheme.rb#36 def ignore_case?; end - # source://activerecord/lib/active_record/encryption/scheme.rb#52 + # source://activerecord/lib/active_record/encryption/scheme.rb#57 def key_provider; end - # source://activerecord/lib/active_record/encryption/scheme.rb#56 + # source://activerecord/lib/active_record/encryption/scheme.rb#61 def merge(other_scheme); end # Returns the value of attribute previous_schemes. @@ -20598,26 +21267,29 @@ class ActiveRecord::Encryption::Scheme # @return [Boolean] # - # source://activerecord/lib/active_record/encryption/scheme.rb#43 + # source://activerecord/lib/active_record/encryption/scheme.rb#48 def support_unencrypted_data?; end - # source://activerecord/lib/active_record/encryption/scheme.rb#60 + # source://activerecord/lib/active_record/encryption/scheme.rb#65 def to_h; end - # source://activerecord/lib/active_record/encryption/scheme.rb#65 + # source://activerecord/lib/active_record/encryption/scheme.rb#70 def with_context(&block); end private - # source://activerecord/lib/active_record/encryption/scheme.rb#83 - def build_key_provider; end - - # source://activerecord/lib/active_record/encryption/scheme.rb#91 + # source://activerecord/lib/active_record/encryption/scheme.rb#102 def default_key_provider; end + # source://activerecord/lib/active_record/encryption/scheme.rb#96 + def deterministic_key_provider; end + + # source://activerecord/lib/active_record/encryption/scheme.rb#90 + def key_provider_from_key; end + # @raise [Errors::Configuration] # - # source://activerecord/lib/active_record/encryption/scheme.rb#78 + # source://activerecord/lib/active_record/encryption/scheme.rb#83 def validate_config!; end end @@ -20787,27 +21459,30 @@ module ActiveRecord::Enum private - # source://activerecord/lib/active_record/enum.rb#234 + # source://activerecord/lib/active_record/enum.rb#241 def _enum(name, values, prefix: T.unsafe(nil), suffix: T.unsafe(nil), scopes: T.unsafe(nil), instance_methods: T.unsafe(nil), validate: T.unsafe(nil), **options); end - # source://activerecord/lib/active_record/enum.rb#329 + # source://activerecord/lib/active_record/enum.rb#339 def _enum_methods_module; end - # source://activerecord/lib/active_record/enum.rb#337 + # source://activerecord/lib/active_record/enum.rb#347 def assert_valid_enum_definition_values(values); end - # source://activerecord/lib/active_record/enum.rb#370 + # source://activerecord/lib/active_record/enum.rb#374 + def assert_valid_enum_options(options); end + + # source://activerecord/lib/active_record/enum.rb#387 def detect_enum_conflict!(enum_name, method_name, klass_method = T.unsafe(nil)); end - # source://activerecord/lib/active_record/enum.rb#394 + # source://activerecord/lib/active_record/enum.rb#411 def detect_negative_enum_conditions!(method_names); end - # source://activerecord/lib/active_record/enum.rb#229 + # source://activerecord/lib/active_record/enum.rb#236 def inherited(base); end # @raise [ArgumentError] # - # source://activerecord/lib/active_record/enum.rb#384 + # source://activerecord/lib/active_record/enum.rb#401 def raise_conflict_error(enum_name, method_name, type: T.unsafe(nil), source: T.unsafe(nil)); end class << self @@ -20816,24 +21491,24 @@ module ActiveRecord::Enum end end -# source://activerecord/lib/active_record/enum.rb#364 +# source://activerecord/lib/active_record/enum.rb#381 ActiveRecord::Enum::ENUM_CONFLICT_MESSAGE = T.let(T.unsafe(nil), String) -# source://activerecord/lib/active_record/enum.rb#297 +# source://activerecord/lib/active_record/enum.rb#307 class ActiveRecord::Enum::EnumMethods < ::Module # @return [EnumMethods] a new instance of EnumMethods # - # source://activerecord/lib/active_record/enum.rb#298 + # source://activerecord/lib/active_record/enum.rb#308 def initialize(klass); end private - # source://activerecord/lib/active_record/enum.rb#305 + # source://activerecord/lib/active_record/enum.rb#315 def define_enum_methods(name, value_method_name, value, scopes, instance_methods); end # Returns the value of attribute klass. # - # source://activerecord/lib/active_record/enum.rb#303 + # source://activerecord/lib/active_record/enum.rb#313 def klass; end end @@ -20882,19 +21557,19 @@ class ActiveRecord::Enum::EnumType < ::ActiveModel::Type::Value def name; end end -# source://activerecord/lib/active_record/migration.rb#204 +# source://activerecord/lib/active_record/migration.rb#217 class ActiveRecord::EnvironmentMismatchError < ::ActiveRecord::ActiveRecordError # @return [EnvironmentMismatchError] a new instance of EnvironmentMismatchError # - # source://activerecord/lib/active_record/migration.rb#205 + # source://activerecord/lib/active_record/migration.rb#218 def initialize(current: T.unsafe(nil), stored: T.unsafe(nil)); end end -# source://activerecord/lib/active_record/migration.rb#218 +# source://activerecord/lib/active_record/migration.rb#231 class ActiveRecord::EnvironmentStorageError < ::ActiveRecord::ActiveRecordError # @return [EnvironmentStorageError] a new instance of EnvironmentStorageError # - # source://activerecord/lib/active_record/migration.rb#219 + # source://activerecord/lib/active_record/migration.rb#232 def initialize; end end @@ -20903,7 +21578,7 @@ end # {ActiveRecord::Base.connection_pool.disconnect!}[rdoc-ref:ConnectionAdapters::ConnectionPool#disconnect!] # or {ActiveRecord::Base.connection_handler.clear_reloadable_connections!}[rdoc-ref:ConnectionAdapters::ConnectionHandler#clear_reloadable_connections!]. # -# source://activerecord/lib/active_record/errors.rb#119 +# source://activerecord/lib/active_record/errors.rb#128 class ActiveRecord::ExclusiveConnectionTimeoutError < ::ActiveRecord::ConnectionTimeoutError; end # source://activerecord/lib/active_record/explain.rb#6 @@ -20922,14 +21597,11 @@ module ActiveRecord::Explain private - # source://activerecord/lib/active_record/explain.rb#54 - def build_explain_clause(options = T.unsafe(nil)); end + # source://activerecord/lib/active_record/explain.rb#55 + def build_explain_clause(connection, options = T.unsafe(nil)); end - # source://activerecord/lib/active_record/explain.rb#62 - def connection_explain(sql, binds, options); end - - # source://activerecord/lib/active_record/explain.rb#39 - def render_bind(attr); end + # source://activerecord/lib/active_record/explain.rb#40 + def render_bind(connection, attr); end end # This is a thread locals registry for EXPLAIN. For example @@ -21052,7 +21724,7 @@ module ActiveRecord::FinderMethods # # @return [Boolean] # - # source://activerecord/lib/active_record/relation/finder_methods.rb#349 + # source://activerecord/lib/active_record/relation/finder_methods.rb#357 def exists?(conditions = T.unsafe(nil)); end # Find the fifth record. @@ -21062,13 +21734,13 @@ module ActiveRecord::FinderMethods # Person.offset(3).fifth # returns the fifth object from OFFSET 3 (which is OFFSET 7) # Person.where(["user_name = :u", { u: user_name }]).fifth # - # source://activerecord/lib/active_record/relation/finder_methods.rb#263 + # source://activerecord/lib/active_record/relation/finder_methods.rb#271 def fifth; end # Same as #fifth but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord/lib/active_record/relation/finder_methods.rb#269 + # source://activerecord/lib/active_record/relation/finder_methods.rb#277 def fifth!; end # Find by id - This can either be a specific id (ID), a list of ids (ID, ID, ID), or an array of ids ([ID, ID, ID]). @@ -21153,7 +21825,15 @@ module ActiveRecord::FinderMethods # Person.where(name: 'Spartacus', rating: 4).pluck(:field1, :field2) # # returns an Array of the required fields. # - # source://activerecord/lib/active_record/relation/finder_methods.rb#90 + # ==== Edge Cases + # + # Person.find(37) # raises ActiveRecord::RecordNotFound exception if the record with the given ID does not exist. + # Person.find([37]) # raises ActiveRecord::RecordNotFound exception if the record with the given ID in the input array does not exist. + # Person.find(nil) # raises ActiveRecord::RecordNotFound exception if the argument is nil. + # Person.find([]) # returns an empty array if the argument is an empty array. + # Person.find # raises ActiveRecord::RecordNotFound exception if the argument is not provided. + # + # source://activerecord/lib/active_record/relation/finder_methods.rb#98 def find(*args); end # Finds the first record matching the specified conditions. There @@ -21165,13 +21845,13 @@ module ActiveRecord::FinderMethods # Post.find_by name: 'Spartacus', rating: 4 # Post.find_by "published_at < ?", 2.weeks.ago # - # source://activerecord/lib/active_record/relation/finder_methods.rb#103 + # source://activerecord/lib/active_record/relation/finder_methods.rb#111 def find_by(arg, *args); end # Like #find_by, except that if no record is found, raises # an ActiveRecord::RecordNotFound error. # - # source://activerecord/lib/active_record/relation/finder_methods.rb#109 + # source://activerecord/lib/active_record/relation/finder_methods.rb#117 def find_by!(arg, *args); end # Finds the sole matching record. Raises ActiveRecord::RecordNotFound if no @@ -21180,7 +21860,7 @@ module ActiveRecord::FinderMethods # # Product.find_sole_by(["price = %?", price]) # - # source://activerecord/lib/active_record/relation/finder_methods.rb#152 + # source://activerecord/lib/active_record/relation/finder_methods.rb#160 def find_sole_by(arg, *args); end # Find the first record (or first N records if a parameter is supplied). @@ -21192,13 +21872,13 @@ module ActiveRecord::FinderMethods # Person.order("created_on DESC").offset(5).first # Person.first(3) # returns the first three objects fetched by SELECT * FROM people ORDER BY people.id LIMIT 3 # - # source://activerecord/lib/active_record/relation/finder_methods.rb#165 + # source://activerecord/lib/active_record/relation/finder_methods.rb#173 def first(limit = T.unsafe(nil)); end # Same as #first but raises ActiveRecord::RecordNotFound if no record # is found. Note that #first! accepts no arguments. # - # source://activerecord/lib/active_record/relation/finder_methods.rb#175 + # source://activerecord/lib/active_record/relation/finder_methods.rb#183 def first!; end # Find the forty-second record. Also known as accessing "the reddit". @@ -21208,13 +21888,13 @@ module ActiveRecord::FinderMethods # Person.offset(3).forty_two # returns the forty-second object from OFFSET 3 (which is OFFSET 44) # Person.where(["user_name = :u", { u: user_name }]).forty_two # - # source://activerecord/lib/active_record/relation/finder_methods.rb#279 + # source://activerecord/lib/active_record/relation/finder_methods.rb#287 def forty_two; end # Same as #forty_two but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord/lib/active_record/relation/finder_methods.rb#285 + # source://activerecord/lib/active_record/relation/finder_methods.rb#293 def forty_two!; end # Find the fourth record. @@ -21224,13 +21904,13 @@ module ActiveRecord::FinderMethods # Person.offset(3).fourth # returns the fourth object from OFFSET 3 (which is OFFSET 6) # Person.where(["user_name = :u", { u: user_name }]).fourth # - # source://activerecord/lib/active_record/relation/finder_methods.rb#247 + # source://activerecord/lib/active_record/relation/finder_methods.rb#255 def fourth; end # Same as #fourth but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord/lib/active_record/relation/finder_methods.rb#253 + # source://activerecord/lib/active_record/relation/finder_methods.rb#261 def fourth!; end # Returns true if the relation contains the given record or false otherwise. @@ -21241,7 +21921,7 @@ module ActiveRecord::FinderMethods # # @return [Boolean] # - # source://activerecord/lib/active_record/relation/finder_methods.rb#377 + # source://activerecord/lib/active_record/relation/finder_methods.rb#389 def include?(record); end # Find the last record (or last N records if a parameter is supplied). @@ -21260,13 +21940,13 @@ module ActiveRecord::FinderMethods # # [#, #, #] # - # source://activerecord/lib/active_record/relation/finder_methods.rb#194 + # source://activerecord/lib/active_record/relation/finder_methods.rb#202 def last(limit = T.unsafe(nil)); end # Same as #last but raises ActiveRecord::RecordNotFound if no record # is found. Note that #last! accepts no arguments. # - # source://activerecord/lib/active_record/relation/finder_methods.rb#205 + # source://activerecord/lib/active_record/relation/finder_methods.rb#213 def last!; end # Returns true if the relation contains the given record or false otherwise. @@ -21277,7 +21957,7 @@ module ActiveRecord::FinderMethods # # @return [Boolean] # - # source://activerecord/lib/active_record/relation/finder_methods.rb#377 + # source://activerecord/lib/active_record/relation/finder_methods.rb#389 def member?(record); end # This method is called whenever no records are found with either a single @@ -21289,7 +21969,7 @@ module ActiveRecord::FinderMethods # the expected number of results should be provided in the +expected_size+ # argument. # - # source://activerecord/lib/active_record/relation/finder_methods.rb#405 + # source://activerecord/lib/active_record/relation/finder_methods.rb#417 def raise_record_not_found_exception!(ids = T.unsafe(nil), result_size = T.unsafe(nil), expected_size = T.unsafe(nil), key = T.unsafe(nil), not_found_ids = T.unsafe(nil)); end # Find the second record. @@ -21299,13 +21979,13 @@ module ActiveRecord::FinderMethods # Person.offset(3).second # returns the second object from OFFSET 3 (which is OFFSET 4) # Person.where(["user_name = :u", { u: user_name }]).second # - # source://activerecord/lib/active_record/relation/finder_methods.rb#215 + # source://activerecord/lib/active_record/relation/finder_methods.rb#223 def second; end # Same as #second but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord/lib/active_record/relation/finder_methods.rb#221 + # source://activerecord/lib/active_record/relation/finder_methods.rb#229 def second!; end # Find the second-to-last record. @@ -21315,13 +21995,13 @@ module ActiveRecord::FinderMethods # Person.offset(3).second_to_last # returns the second-to-last object from OFFSET 3 # Person.where(["user_name = :u", { u: user_name }]).second_to_last # - # source://activerecord/lib/active_record/relation/finder_methods.rb#311 + # source://activerecord/lib/active_record/relation/finder_methods.rb#319 def second_to_last; end # Same as #second_to_last but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord/lib/active_record/relation/finder_methods.rb#317 + # source://activerecord/lib/active_record/relation/finder_methods.rb#325 def second_to_last!; end # Finds the sole matching record. Raises ActiveRecord::RecordNotFound if no @@ -21330,7 +22010,7 @@ module ActiveRecord::FinderMethods # # Product.where(["price = %?", price]).sole # - # source://activerecord/lib/active_record/relation/finder_methods.rb#135 + # source://activerecord/lib/active_record/relation/finder_methods.rb#143 def sole; end # Gives a record (or N records if a parameter is supplied) without any implied @@ -21341,13 +22021,13 @@ module ActiveRecord::FinderMethods # Person.take(5) # returns 5 objects fetched by SELECT * FROM people LIMIT 5 # Person.where(["name LIKE '%?'", name]).take # - # source://activerecord/lib/active_record/relation/finder_methods.rb#120 + # source://activerecord/lib/active_record/relation/finder_methods.rb#128 def take(limit = T.unsafe(nil)); end # Same as #take but raises ActiveRecord::RecordNotFound if no record # is found. Note that #take! accepts no arguments. # - # source://activerecord/lib/active_record/relation/finder_methods.rb#126 + # source://activerecord/lib/active_record/relation/finder_methods.rb#134 def take!; end # Find the third record. @@ -21357,13 +22037,13 @@ module ActiveRecord::FinderMethods # Person.offset(3).third # returns the third object from OFFSET 3 (which is OFFSET 5) # Person.where(["user_name = :u", { u: user_name }]).third # - # source://activerecord/lib/active_record/relation/finder_methods.rb#231 + # source://activerecord/lib/active_record/relation/finder_methods.rb#239 def third; end # Same as #third but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord/lib/active_record/relation/finder_methods.rb#237 + # source://activerecord/lib/active_record/relation/finder_methods.rb#245 def third!; end # Find the third-to-last record. @@ -21373,183 +22053,182 @@ module ActiveRecord::FinderMethods # Person.offset(3).third_to_last # returns the third-to-last object from OFFSET 3 # Person.where(["user_name = :u", { u: user_name }]).third_to_last # - # source://activerecord/lib/active_record/relation/finder_methods.rb#295 + # source://activerecord/lib/active_record/relation/finder_methods.rb#303 def third_to_last; end # Same as #third_to_last but raises ActiveRecord::RecordNotFound if no record # is found. # - # source://activerecord/lib/active_record/relation/finder_methods.rb#301 + # source://activerecord/lib/active_record/relation/finder_methods.rb#309 def third_to_last!; end private - # source://activerecord/lib/active_record/relation/finder_methods.rb#634 + # source://activerecord/lib/active_record/relation/finder_methods.rb#648 def _order_columns; end - # source://activerecord/lib/active_record/relation/finder_methods.rb#445 + # source://activerecord/lib/active_record/relation/finder_methods.rb#457 def apply_join_dependency(eager_loading: T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/finder_methods.rb#426 + # source://activerecord/lib/active_record/relation/finder_methods.rb#438 def construct_relation_for_exists(conditions); end - # source://activerecord/lib/active_record/relation/finder_methods.rb#622 + # source://activerecord/lib/active_record/relation/finder_methods.rb#636 def find_last(limit); end - # source://activerecord/lib/active_record/relation/finder_methods.rb#584 + # source://activerecord/lib/active_record/relation/finder_methods.rb#598 def find_nth(index); end - # source://activerecord/lib/active_record/relation/finder_methods.rb#608 + # source://activerecord/lib/active_record/relation/finder_methods.rb#622 def find_nth_from_last(index); end - # source://activerecord/lib/active_record/relation/finder_methods.rb#589 + # source://activerecord/lib/active_record/relation/finder_methods.rb#603 def find_nth_with_limit(index, limit); end - # source://activerecord/lib/active_record/relation/finder_methods.rb#506 + # source://activerecord/lib/active_record/relation/finder_methods.rb#520 def find_one(id); end - # source://activerecord/lib/active_record/relation/finder_methods.rb#527 + # source://activerecord/lib/active_record/relation/finder_methods.rb#541 def find_some(ids); end - # source://activerecord/lib/active_record/relation/finder_methods.rb#553 + # source://activerecord/lib/active_record/relation/finder_methods.rb#567 def find_some_ordered(ids); end - # source://activerecord/lib/active_record/relation/finder_methods.rb#568 + # source://activerecord/lib/active_record/relation/finder_methods.rb#582 def find_take; end - # source://activerecord/lib/active_record/relation/finder_methods.rb#576 + # source://activerecord/lib/active_record/relation/finder_methods.rb#590 def find_take_with_limit(limit); end # @raise [UnknownPrimaryKey] # - # source://activerecord/lib/active_record/relation/finder_methods.rb#477 + # source://activerecord/lib/active_record/relation/finder_methods.rb#491 def find_with_ids(*ids); end - # source://activerecord/lib/active_record/relation/finder_methods.rb#626 + # source://activerecord/lib/active_record/relation/finder_methods.rb#640 def ordered_relation; end # @return [Boolean] # - # source://activerecord/lib/active_record/relation/finder_methods.rb#473 + # source://activerecord/lib/active_record/relation/finder_methods.rb#487 def using_limitable_reflections?(reflections); end end # source://activerecord/lib/active_record/relation/finder_methods.rb#7 ActiveRecord::FinderMethods::ONE_AS_ONE = T.let(T.unsafe(nil), String) -# source://activerecord/lib/active_record/fixtures.rb#802 +# source://activerecord/lib/active_record/fixtures.rb#807 class ActiveRecord::Fixture include ::Enumerable # @return [Fixture] a new instance of Fixture # - # source://activerecord/lib/active_record/fixtures.rb#813 + # source://activerecord/lib/active_record/fixtures.rb#818 def initialize(fixture, model_class); end - # source://activerecord/lib/active_record/fixtures.rb#826 + # source://activerecord/lib/active_record/fixtures.rb#831 def [](key); end - # source://activerecord/lib/active_record/fixtures.rb#818 + # source://activerecord/lib/active_record/fixtures.rb#823 def class_name; end - # source://activerecord/lib/active_record/fixtures.rb#822 + # source://activerecord/lib/active_record/fixtures.rb#827 def each(&block); end # @raise [FixtureClassNotFound] # - # source://activerecord/lib/active_record/fixtures.rb#832 + # source://activerecord/lib/active_record/fixtures.rb#837 def find; end # Returns the value of attribute fixture. # - # source://activerecord/lib/active_record/fixtures.rb#811 + # source://activerecord/lib/active_record/fixtures.rb#816 def fixture; end # Returns the value of attribute model_class. # - # source://activerecord/lib/active_record/fixtures.rb#811 + # source://activerecord/lib/active_record/fixtures.rb#816 def model_class; end # Returns the value of attribute fixture. # - # source://activerecord/lib/active_record/fixtures.rb#811 + # source://activerecord/lib/active_record/fixtures.rb#816 def to_hash; end end -# source://activerecord/lib/active_record/fixtures.rb#805 +# source://activerecord/lib/active_record/fixtures.rb#810 class ActiveRecord::Fixture::FixtureError < ::StandardError; end -# source://activerecord/lib/active_record/fixtures.rb#808 +# source://activerecord/lib/active_record/fixtures.rb#813 class ActiveRecord::Fixture::FormatError < ::ActiveRecord::Fixture::FixtureError; end -# source://activerecord/lib/active_record/fixtures.rb#12 +# source://activerecord/lib/active_record/fixtures.rb#11 class ActiveRecord::FixtureClassNotFound < ::ActiveRecord::ActiveRecordError; end # source://activerecord/lib/active_record/future_result.rb#4 class ActiveRecord::FutureResult # @return [FutureResult] a new instance of FutureResult # - # source://activerecord/lib/active_record/future_result.rb#55 + # source://activerecord/lib/active_record/future_result.rb#66 def initialize(pool, *args, **kwargs); end - # source://activerecord/lib/active_record/future_result.rb#83 + # source://activerecord/lib/active_record/future_result.rb#94 def cancel; end # @return [Boolean] # - # source://activerecord/lib/active_record/future_result.rb#124 + # source://activerecord/lib/active_record/future_result.rb#139 def canceled?; end - # source://activerecord/lib/active_record/future_result.rb#50 + # source://activerecord/lib/active_record/future_result.rb#62 def empty?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/future_result.rb#79 + # source://activerecord/lib/active_record/future_result.rb#90 def execute!(connection); end - # source://activerecord/lib/active_record/future_result.rb#89 + # source://activerecord/lib/active_record/future_result.rb#100 def execute_or_skip; end # Returns the value of attribute lock_wait. # - # source://activerecord/lib/active_record/future_result.rb#53 + # source://activerecord/lib/active_record/future_result.rb#64 def lock_wait; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/delegation.rb#331 - def method_missing(method, *args, **_arg2, &block); end - # @return [Boolean] # - # source://activerecord/lib/active_record/future_result.rb#120 + # source://activerecord/lib/active_record/future_result.rb#135 def pending?; end - # source://activerecord/lib/active_record/future_result.rb#107 + # source://activerecord/lib/active_record/future_result.rb#122 def result; end - # source://activerecord/lib/active_record/future_result.rb#74 + # source://activerecord/lib/active_record/future_result.rb#85 def schedule!(session); end - # source://activerecord/lib/active_record/future_result.rb#70 + # source://activerecord/lib/active_record/future_result.rb#81 def then(&block); end - # source://activerecord/lib/active_record/future_result.rb#50 + # source://activerecord/lib/active_record/future_result.rb#62 def to_a(*_arg0, **_arg1, &_arg2); end private - # source://activerecord/lib/active_record/future_result.rb#152 + # source://activerecord/lib/active_record/future_result.rb#169 def exec_query(connection, *args, **kwargs); end - # source://activerecord/lib/active_record/future_result.rb#129 + # source://activerecord/lib/active_record/future_result.rb#144 def execute_or_wait; end - # source://activerecord/lib/active_record/future_result.rb#144 + # source://activerecord/lib/active_record/future_result.rb#161 def execute_query(connection, async: T.unsafe(nil)); end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/delegation.rb#323 - def respond_to_missing?(name, include_private = T.unsafe(nil)); end + class << self + # source://activerecord/lib/active_record/future_result.rb#53 + def wrap(result); end + end end -# source://activerecord/lib/active_record/future_result.rb#48 +# source://activerecord/lib/active_record/future_result.rb#51 class ActiveRecord::FutureResult::Canceled < ::ActiveRecord::ActiveRecordError; end # source://activerecord/lib/active_record/future_result.rb#5 @@ -21591,135 +22270,120 @@ class ActiveRecord::FutureResult::EventBuffer # source://activerecord/lib/active_record/future_result.rb#27 def initialize(future_result, instrumenter); end - # source://activerecord/lib/active_record/future_result.rb#39 + # source://activerecord/lib/active_record/future_result.rb#42 def flush; end # source://activerecord/lib/active_record/future_result.rb#33 def instrument(name, payload = T.unsafe(nil), &block); end end -# source://activerecord/lib/active_record/future_result.rb#156 +# source://activerecord/lib/active_record/future_result.rb#173 class ActiveRecord::FutureResult::SelectAll < ::ActiveRecord::FutureResult private - # source://activerecord/lib/active_record/future_result.rb#158 + # source://activerecord/lib/active_record/future_result.rb#175 def exec_query(*_arg0, **_arg1); end end -# source://activerecord/lib/active_record/associations.rb#74 +# source://activerecord/lib/active_record/associations/errors.rb#74 class ActiveRecord::HasManyThroughAssociationNotFoundError < ::ActiveRecord::ActiveRecordError include ::DidYouMean::Correctable # @return [HasManyThroughAssociationNotFoundError] a new instance of HasManyThroughAssociationNotFoundError # - # source://activerecord/lib/active_record/associations.rb#77 + # source://activerecord/lib/active_record/associations/errors.rb#77 def initialize(owner_class = T.unsafe(nil), reflection = T.unsafe(nil)); end - # source://activerecord/lib/active_record/associations.rb#90 + # source://activerecord/lib/active_record/associations/errors.rb#90 def corrections; end # Returns the value of attribute owner_class. # - # source://activerecord/lib/active_record/associations.rb#75 + # source://activerecord/lib/active_record/associations/errors.rb#75 def owner_class; end # Returns the value of attribute reflection. # - # source://activerecord/lib/active_record/associations.rb#75 + # source://activerecord/lib/active_record/associations/errors.rb#75 def reflection; end end -# source://activerecord/lib/active_record/associations.rb#124 +# source://activerecord/lib/active_record/associations/errors.rb#124 class ActiveRecord::HasManyThroughAssociationPointlessSourceTypeError < ::ActiveRecord::ActiveRecordError # @return [HasManyThroughAssociationPointlessSourceTypeError] a new instance of HasManyThroughAssociationPointlessSourceTypeError # - # source://activerecord/lib/active_record/associations.rb#125 + # source://activerecord/lib/active_record/associations/errors.rb#125 def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil), source_reflection = T.unsafe(nil)); end end -# source://activerecord/lib/active_record/associations.rb#104 +# source://activerecord/lib/active_record/associations/errors.rb#104 class ActiveRecord::HasManyThroughAssociationPolymorphicSourceError < ::ActiveRecord::ActiveRecordError # @return [HasManyThroughAssociationPolymorphicSourceError] a new instance of HasManyThroughAssociationPolymorphicSourceError # - # source://activerecord/lib/active_record/associations.rb#105 + # source://activerecord/lib/active_record/associations/errors.rb#105 def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil), source_reflection = T.unsafe(nil)); end end -# source://activerecord/lib/active_record/associations.rb#114 +# source://activerecord/lib/active_record/associations/errors.rb#114 class ActiveRecord::HasManyThroughAssociationPolymorphicThroughError < ::ActiveRecord::ActiveRecordError # @return [HasManyThroughAssociationPolymorphicThroughError] a new instance of HasManyThroughAssociationPolymorphicThroughError # - # source://activerecord/lib/active_record/associations.rb#115 + # source://activerecord/lib/active_record/associations/errors.rb#115 def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil)); end end -# source://activerecord/lib/active_record/associations.rb#218 +# source://activerecord/lib/active_record/associations/errors.rb#218 class ActiveRecord::HasManyThroughCantAssociateThroughHasOneOrManyReflection < ::ActiveRecord::ThroughCantAssociateThroughHasOneOrManyReflection; end -# source://activerecord/lib/active_record/associations.rb#234 +# source://activerecord/lib/active_record/associations/errors.rb#234 class ActiveRecord::HasManyThroughNestedAssociationsAreReadonly < ::ActiveRecord::ThroughNestedAssociationsAreReadonly; end -# source://activerecord/lib/active_record/associations.rb#167 +# source://activerecord/lib/active_record/associations/errors.rb#167 class ActiveRecord::HasManyThroughOrderError < ::ActiveRecord::ActiveRecordError # @return [HasManyThroughOrderError] a new instance of HasManyThroughOrderError # - # source://activerecord/lib/active_record/associations.rb#168 + # source://activerecord/lib/active_record/associations/errors.rb#168 def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil), through_reflection = T.unsafe(nil)); end end -# source://activerecord/lib/active_record/associations.rb#154 +# source://activerecord/lib/active_record/associations/errors.rb#154 class ActiveRecord::HasManyThroughSourceAssociationNotFoundError < ::ActiveRecord::ActiveRecordError # @return [HasManyThroughSourceAssociationNotFoundError] a new instance of HasManyThroughSourceAssociationNotFoundError # - # source://activerecord/lib/active_record/associations.rb#155 + # source://activerecord/lib/active_record/associations/errors.rb#155 def initialize(reflection = T.unsafe(nil)); end end -# source://activerecord/lib/active_record/associations.rb#144 +# source://activerecord/lib/active_record/associations/errors.rb#144 class ActiveRecord::HasOneAssociationPolymorphicThroughError < ::ActiveRecord::ActiveRecordError # @return [HasOneAssociationPolymorphicThroughError] a new instance of HasOneAssociationPolymorphicThroughError # - # source://activerecord/lib/active_record/associations.rb#145 + # source://activerecord/lib/active_record/associations/errors.rb#145 def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil)); end end -# source://activerecord/lib/active_record/associations.rb#134 +# source://activerecord/lib/active_record/associations/errors.rb#134 class ActiveRecord::HasOneThroughCantAssociateThroughCollection < ::ActiveRecord::ActiveRecordError # @return [HasOneThroughCantAssociateThroughCollection] a new instance of HasOneThroughCantAssociateThroughCollection # - # source://activerecord/lib/active_record/associations.rb#135 + # source://activerecord/lib/active_record/associations/errors.rb#135 def initialize(owner_class_name = T.unsafe(nil), reflection = T.unsafe(nil), through_reflection = T.unsafe(nil)); end end -# source://activerecord/lib/active_record/associations.rb#221 +# source://activerecord/lib/active_record/associations/errors.rb#221 class ActiveRecord::HasOneThroughCantAssociateThroughHasOneOrManyReflection < ::ActiveRecord::ThroughCantAssociateThroughHasOneOrManyReflection; end -# source://activerecord/lib/active_record/associations.rb#237 +# source://activerecord/lib/active_record/associations/errors.rb#237 class ActiveRecord::HasOneThroughNestedAssociationsAreReadonly < ::ActiveRecord::ThroughNestedAssociationsAreReadonly; end -# source://activerecord/lib/active_record/migration.rb#124 +# source://activerecord/lib/active_record/migration.rb#122 class ActiveRecord::IllegalMigrationNameError < ::ActiveRecord::MigrationError # @return [IllegalMigrationNameError] a new instance of IllegalMigrationNameError # - # source://activerecord/lib/active_record/migration.rb#125 + # source://activerecord/lib/active_record/migration.rb#123 def initialize(name = T.unsafe(nil)); end end -# Raised when a relation cannot be mutated because it's already loaded. -# -# class Task < ActiveRecord::Base -# end -# -# relation = Task.all -# relation.loaded? # => true -# -# # Methods which try to mutate a loaded relation fail. -# relation.where!(title: 'TODO') # => ActiveRecord::ImmutableRelation -# relation.limit!(5) # => ActiveRecord::ImmutableRelation -# -# source://activerecord/lib/active_record/errors.rb#471 -class ActiveRecord::ImmutableRelation < ::ActiveRecord::ActiveRecordError; end - # = Single table inheritance # # Active Record allows inheritance by storing the name of the class in a column that by @@ -21767,13 +22431,13 @@ module ActiveRecord::Inheritance # do Reply.new without having to set Reply[Reply.inheritance_column] = "Reply" yourself. # No such attribute would be set for objects of the Message class in that example. # - # source://activerecord/lib/active_record/inheritance.rb#357 + # source://activerecord/lib/active_record/inheritance.rb#359 def ensure_proper_type; end - # source://activerecord/lib/active_record/inheritance.rb#341 + # source://activerecord/lib/active_record/inheritance.rb#343 def initialize_dup(other); end - # source://activerecord/lib/active_record/inheritance.rb#347 + # source://activerecord/lib/active_record/inheritance.rb#349 def initialize_internals_callback; end module GeneratedClassMethods @@ -21930,7 +22594,7 @@ module ActiveRecord::Inheritance::ClassMethods # source://activerecord/lib/active_record/inheritance.rb#82 def descends_from_active_record?; end - # source://activerecord/lib/active_record/inheritance.rb#224 + # source://activerecord/lib/active_record/inheritance.rb#226 def dup; end # @return [Boolean] @@ -21949,12 +22613,12 @@ module ActiveRecord::Inheritance::ClassMethods # # It is used to find the class correspondent to the value stored in the polymorphic type column. # - # source://activerecord/lib/active_record/inheritance.rb#216 + # source://activerecord/lib/active_record/inheritance.rb#218 def polymorphic_class_for(name); end # Returns the value to be stored in the polymorphic type column for Polymorphic Associations. # - # source://activerecord/lib/active_record/inheritance.rb#209 + # source://activerecord/lib/active_record/inheritance.rb#211 def polymorphic_name; end # Sets the application record class for Active Record @@ -21984,10 +22648,10 @@ module ActiveRecord::Inheritance::ClassMethods # Returns the class type of the record using the current module as a prefix. So descendants of # MyApp::Business::Account would appear as MyApp::Business::AccountSubclass. # - # source://activerecord/lib/active_record/inheritance.rb#240 + # source://activerecord/lib/active_record/inheritance.rb#242 def compute_type(type_name); end - # source://activerecord/lib/active_record/inheritance.rb#268 + # source://activerecord/lib/active_record/inheritance.rb#270 def set_base_class; end private @@ -21996,30 +22660,30 @@ module ActiveRecord::Inheritance::ClassMethods # record instance. For single-table inheritance, we check the record # for a +type+ column and return the corresponding class. # - # source://activerecord/lib/active_record/inheritance.rb#297 + # source://activerecord/lib/active_record/inheritance.rb#299 def discriminate_class_for_record(record); end - # source://activerecord/lib/active_record/inheritance.rb#309 + # source://activerecord/lib/active_record/inheritance.rb#311 def find_sti_class(type_name); end - # source://activerecord/lib/active_record/inheritance.rb#285 + # source://activerecord/lib/active_record/inheritance.rb#287 def inherited(subclass); end - # source://activerecord/lib/active_record/inheritance.rb#232 + # source://activerecord/lib/active_record/inheritance.rb#234 def initialize_clone(other); end # Detect the subclass from the inheritance column of attrs. If the inheritance column value # is not self or a valid subclass, raises ActiveRecord::SubclassNotFound # - # source://activerecord/lib/active_record/inheritance.rb#329 + # source://activerecord/lib/active_record/inheritance.rb#331 def subclass_from_attributes(attrs); end - # source://activerecord/lib/active_record/inheritance.rb#320 + # source://activerecord/lib/active_record/inheritance.rb#322 def type_condition(table = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord/lib/active_record/inheritance.rb#305 + # source://activerecord/lib/active_record/inheritance.rb#307 def using_single_table_inheritance?(record); end end @@ -22027,15 +22691,15 @@ end class ActiveRecord::InsertAll # @return [InsertAll] a new instance of InsertAll # - # source://activerecord/lib/active_record/insert_all.rb#10 - def initialize(model, inserts, on_duplicate:, update_only: T.unsafe(nil), returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end + # source://activerecord/lib/active_record/insert_all.rb#18 + def initialize(relation, connection, inserts, on_duplicate:, update_only: T.unsafe(nil), returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end # Returns the value of attribute connection. # # source://activerecord/lib/active_record/insert_all.rb#7 def connection; end - # source://activerecord/lib/active_record/insert_all.rb#41 + # source://activerecord/lib/active_record/insert_all.rb#48 def execute; end # Returns the value of attribute inserts. @@ -22050,10 +22714,10 @@ class ActiveRecord::InsertAll # TODO: Consider renaming this method, as it only conditionally extends keys, not always # - # source://activerecord/lib/active_record/insert_all.rb#86 + # source://activerecord/lib/active_record/insert_all.rb#92 def keys_including_timestamps; end - # source://activerecord/lib/active_record/insert_all.rb#67 + # source://activerecord/lib/active_record/insert_all.rb#73 def map_key_with_value; end # Returns the value of attribute model. @@ -22066,12 +22730,12 @@ class ActiveRecord::InsertAll # source://activerecord/lib/active_record/insert_all.rb#8 def on_duplicate; end - # source://activerecord/lib/active_record/insert_all.rb#54 + # source://activerecord/lib/active_record/insert_all.rb#61 def primary_keys; end # @return [Boolean] # - # source://activerecord/lib/active_record/insert_all.rb#81 + # source://activerecord/lib/active_record/insert_all.rb#87 def record_timestamps?; end # Returns the value of attribute returning. @@ -22081,7 +22745,7 @@ class ActiveRecord::InsertAll # @return [Boolean] # - # source://activerecord/lib/active_record/insert_all.rb#59 + # source://activerecord/lib/active_record/insert_all.rb#65 def skip_duplicates?; end # Returns the value of attribute unique_by. @@ -22089,12 +22753,12 @@ class ActiveRecord::InsertAll # source://activerecord/lib/active_record/insert_all.rb#8 def unique_by; end - # source://activerecord/lib/active_record/insert_all.rb#50 + # source://activerecord/lib/active_record/insert_all.rb#57 def updatable_columns; end # @return [Boolean] # - # source://activerecord/lib/active_record/insert_all.rb#63 + # source://activerecord/lib/active_record/insert_all.rb#69 def update_duplicates?; end # Returns the value of attribute update_only. @@ -22109,146 +22773,146 @@ class ActiveRecord::InsertAll private - # source://activerecord/lib/active_record/insert_all.rb#125 + # source://activerecord/lib/active_record/insert_all.rb#129 def configure_on_duplicate_update_logic; end # @return [Boolean] # - # source://activerecord/lib/active_record/insert_all.rb#141 + # source://activerecord/lib/active_record/insert_all.rb#145 def custom_update_sql_provided?; end # @raise [ArgumentError] # - # source://activerecord/lib/active_record/insert_all.rb#209 + # source://activerecord/lib/active_record/insert_all.rb#212 def disallow_raw_sql!(value); end - # source://activerecord/lib/active_record/insert_all.rb#170 + # source://activerecord/lib/active_record/insert_all.rb#173 def ensure_valid_options_for_connection!; end - # source://activerecord/lib/active_record/insert_all.rb#145 + # source://activerecord/lib/active_record/insert_all.rb#149 def find_unique_index_for(unique_by); end # @return [Boolean] # - # source://activerecord/lib/active_record/insert_all.rb#97 + # source://activerecord/lib/active_record/insert_all.rb#101 def has_attribute_aliases?(attributes); end - # source://activerecord/lib/active_record/insert_all.rb#194 + # source://activerecord/lib/active_record/insert_all.rb#197 def readonly_columns; end - # source://activerecord/lib/active_record/insert_all.rb#121 + # source://activerecord/lib/active_record/insert_all.rb#125 def resolve_attribute_alias(attribute); end - # source://activerecord/lib/active_record/insert_all.rb#110 + # source://activerecord/lib/active_record/insert_all.rb#114 def resolve_attribute_aliases; end - # source://activerecord/lib/active_record/insert_all.rb#101 + # source://activerecord/lib/active_record/insert_all.rb#105 def resolve_sti; end - # Returns the value of attribute scope_attributes. - # - # source://activerecord/lib/active_record/insert_all.rb#95 - def scope_attributes; end - - # source://activerecord/lib/active_record/insert_all.rb#218 + # source://activerecord/lib/active_record/insert_all.rb#221 def timestamps_for_create; end - # source://activerecord/lib/active_record/insert_all.rb#189 + # source://activerecord/lib/active_record/insert_all.rb#192 def to_sql; end - # source://activerecord/lib/active_record/insert_all.rb#198 + # source://activerecord/lib/active_record/insert_all.rb#201 def unique_by_columns; end - # source://activerecord/lib/active_record/insert_all.rb#165 + # source://activerecord/lib/active_record/insert_all.rb#169 def unique_indexes; end - # source://activerecord/lib/active_record/insert_all.rb#203 + # source://activerecord/lib/active_record/insert_all.rb#206 def verify_attributes(attributes); end + + class << self + # source://activerecord/lib/active_record/insert_all.rb#11 + def execute(relation, *_arg1, **_arg2, &_arg3); end + end end -# source://activerecord/lib/active_record/insert_all.rb#222 +# source://activerecord/lib/active_record/insert_all.rb#225 class ActiveRecord::InsertAll::Builder # @return [Builder] a new instance of Builder # - # source://activerecord/lib/active_record/insert_all.rb#227 + # source://activerecord/lib/active_record/insert_all.rb#230 def initialize(insert_all); end - # source://activerecord/lib/active_record/insert_all.rb#262 + # source://activerecord/lib/active_record/insert_all.rb#265 def conflict_target; end - # source://activerecord/lib/active_record/insert_all.rb#231 + # source://activerecord/lib/active_record/insert_all.rb#234 def into; end - # source://activerecord/lib/active_record/insert_all.rb#225 + # source://activerecord/lib/active_record/insert_all.rb#228 def keys(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/insert_all.rb#225 + # source://activerecord/lib/active_record/insert_all.rb#228 def keys_including_timestamps(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute model. # - # source://activerecord/lib/active_record/insert_all.rb#223 + # source://activerecord/lib/active_record/insert_all.rb#226 def model; end - # source://activerecord/lib/active_record/insert_all.rb#286 + # source://activerecord/lib/active_record/insert_all.rb#289 def raw_update_sql; end - # source://activerecord/lib/active_record/insert_all.rb#286 + # source://activerecord/lib/active_record/insert_all.rb#289 def raw_update_sql?; end - # source://activerecord/lib/active_record/insert_all.rb#225 + # source://activerecord/lib/active_record/insert_all.rb#228 def record_timestamps?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/insert_all.rb#246 + # source://activerecord/lib/active_record/insert_all.rb#249 def returning; end - # source://activerecord/lib/active_record/insert_all.rb#225 + # source://activerecord/lib/active_record/insert_all.rb#228 def skip_duplicates?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/insert_all.rb#276 + # source://activerecord/lib/active_record/insert_all.rb#279 def touch_model_timestamps_unless(&block); end - # source://activerecord/lib/active_record/insert_all.rb#272 + # source://activerecord/lib/active_record/insert_all.rb#275 def updatable_columns; end - # source://activerecord/lib/active_record/insert_all.rb#225 + # source://activerecord/lib/active_record/insert_all.rb#228 def update_duplicates?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/insert_all.rb#235 + # source://activerecord/lib/active_record/insert_all.rb#238 def values_list; end private - # source://activerecord/lib/active_record/insert_all.rb#299 + # source://activerecord/lib/active_record/insert_all.rb#302 def columns_list; end # Returns the value of attribute connection. # - # source://activerecord/lib/active_record/insert_all.rb#293 + # source://activerecord/lib/active_record/insert_all.rb#296 def connection; end # @raise [UnknownAttributeError] # - # source://activerecord/lib/active_record/insert_all.rb#303 + # source://activerecord/lib/active_record/insert_all.rb#306 def extract_types_from_columns_on(table_name, keys:); end - # source://activerecord/lib/active_record/insert_all.rb#312 + # source://activerecord/lib/active_record/insert_all.rb#315 def format_columns(columns); end # Returns the value of attribute insert_all. # - # source://activerecord/lib/active_record/insert_all.rb#293 + # source://activerecord/lib/active_record/insert_all.rb#296 def insert_all; end - # source://activerecord/lib/active_record/insert_all.rb#320 + # source://activerecord/lib/active_record/insert_all.rb#323 def quote_column(column); end - # source://activerecord/lib/active_record/insert_all.rb#316 + # source://activerecord/lib/active_record/insert_all.rb#319 def quote_columns(columns); end # @return [Boolean] # - # source://activerecord/lib/active_record/insert_all.rb#295 + # source://activerecord/lib/active_record/insert_all.rb#298 def touch_timestamp_attribute?(column_name); end end @@ -22345,7 +23009,7 @@ module ActiveRecord::Integration # https://github.com/postgres/postgres/commit/3e1beda2cde3495f41290e1ece5d544525810214 # to account for this we pad the output with zeros # - # source://activerecord/lib/active_record/integration.rb#197 + # source://activerecord/lib/active_record/integration.rb#200 def raw_timestamp_to_cache_version(timestamp); end module GeneratedClassMethods @@ -22415,9 +23079,9 @@ class ActiveRecord::InternalMetadata # @return [InternalMetadata] a new instance of InternalMetadata # # source://activerecord/lib/active_record/internal_metadata.rb#18 - def initialize(connection); end + def initialize(pool); end - # source://activerecord/lib/active_record/internal_metadata.rb#45 + # source://activerecord/lib/active_record/internal_metadata.rb#47 def [](key); end # source://activerecord/lib/active_record/internal_metadata.rb#39 @@ -22428,63 +23092,58 @@ class ActiveRecord::InternalMetadata # source://activerecord/lib/active_record/internal_metadata.rb#16 def arel_table; end - # Returns the value of attribute connection. - # - # source://activerecord/lib/active_record/internal_metadata.rb#16 - def connection; end - - # source://activerecord/lib/active_record/internal_metadata.rb#59 + # source://activerecord/lib/active_record/internal_metadata.rb#65 def count; end # Creates an internal metadata table with columns +key+ and +value+ # - # source://activerecord/lib/active_record/internal_metadata.rb#75 + # source://activerecord/lib/active_record/internal_metadata.rb#85 def create_table; end - # source://activerecord/lib/active_record/internal_metadata.rb#66 + # source://activerecord/lib/active_record/internal_metadata.rb#74 def create_table_and_set_flags(environment, schema_sha1 = T.unsafe(nil)); end - # source://activerecord/lib/active_record/internal_metadata.rb#53 + # source://activerecord/lib/active_record/internal_metadata.rb#57 def delete_all_entries; end - # source://activerecord/lib/active_record/internal_metadata.rb#87 + # source://activerecord/lib/active_record/internal_metadata.rb#99 def drop_table; end # @return [Boolean] # - # source://activerecord/lib/active_record/internal_metadata.rb#23 + # source://activerecord/lib/active_record/internal_metadata.rb#35 def enabled?; end - # source://activerecord/lib/active_record/internal_metadata.rb#27 + # source://activerecord/lib/active_record/internal_metadata.rb#23 def primary_key; end # @return [Boolean] # - # source://activerecord/lib/active_record/internal_metadata.rb#93 + # source://activerecord/lib/active_record/internal_metadata.rb#107 def table_exists?; end - # source://activerecord/lib/active_record/internal_metadata.rb#35 + # source://activerecord/lib/active_record/internal_metadata.rb#31 def table_name; end - # source://activerecord/lib/active_record/internal_metadata.rb#31 + # source://activerecord/lib/active_record/internal_metadata.rb#27 def value_key; end private - # source://activerecord/lib/active_record/internal_metadata.rb#116 - def create_entry(key, value); end + # source://activerecord/lib/active_record/internal_metadata.rb#130 + def create_entry(connection, key, value); end - # source://activerecord/lib/active_record/internal_metadata.rb#112 - def current_time; end + # source://activerecord/lib/active_record/internal_metadata.rb#126 + def current_time(connection); end - # source://activerecord/lib/active_record/internal_metadata.rb#140 - def select_entry(key); end + # source://activerecord/lib/active_record/internal_metadata.rb#154 + def select_entry(connection, key); end - # source://activerecord/lib/active_record/internal_metadata.rb#128 - def update_entry(key, new_value); end + # source://activerecord/lib/active_record/internal_metadata.rb#142 + def update_entry(connection, key, new_value); end - # source://activerecord/lib/active_record/internal_metadata.rb#98 - def update_or_create_entry(key, value); end + # source://activerecord/lib/active_record/internal_metadata.rb#112 + def update_or_create_entry(connection, key, value); end end # source://activerecord/lib/active_record/internal_metadata.rb#13 @@ -22493,42 +23152,50 @@ class ActiveRecord::InternalMetadata::NullInternalMetadata; end # Raised when a record cannot be inserted or updated because it references a non-existent record, # or when a record cannot be deleted because a parent record references it. # -# source://activerecord/lib/active_record/errors.rb#213 +# source://activerecord/lib/active_record/errors.rb#234 class ActiveRecord::InvalidForeignKey < ::ActiveRecord::WrappedDatabaseException; end -# source://activerecord/lib/active_record/associations.rb#33 +# source://activerecord/lib/active_record/migration.rb#132 +class ActiveRecord::InvalidMigrationTimestampError < ::ActiveRecord::MigrationError + # @return [InvalidMigrationTimestampError] a new instance of InvalidMigrationTimestampError + # + # source://activerecord/lib/active_record/migration.rb#133 + def initialize(version = T.unsafe(nil), name = T.unsafe(nil)); end +end + +# source://activerecord/lib/active_record/associations/errors.rb#33 class ActiveRecord::InverseOfAssociationNotFoundError < ::ActiveRecord::ActiveRecordError include ::DidYouMean::Correctable # @return [InverseOfAssociationNotFoundError] a new instance of InverseOfAssociationNotFoundError # - # source://activerecord/lib/active_record/associations.rb#36 + # source://activerecord/lib/active_record/associations/errors.rb#36 def initialize(reflection = T.unsafe(nil), associated_class = T.unsafe(nil)); end # Returns the value of attribute associated_class. # - # source://activerecord/lib/active_record/associations.rb#34 + # source://activerecord/lib/active_record/associations/errors.rb#34 def associated_class; end - # source://activerecord/lib/active_record/associations.rb#49 + # source://activerecord/lib/active_record/associations/errors.rb#49 def corrections; end # Returns the value of attribute reflection. # - # source://activerecord/lib/active_record/associations.rb#34 + # source://activerecord/lib/active_record/associations/errors.rb#34 def reflection; end end -# source://activerecord/lib/active_record/associations.rb#62 +# source://activerecord/lib/active_record/associations/errors.rb#62 class ActiveRecord::InverseOfAssociationRecursiveError < ::ActiveRecord::ActiveRecordError # @return [InverseOfAssociationRecursiveError] a new instance of InverseOfAssociationRecursiveError # - # source://activerecord/lib/active_record/associations.rb#64 + # source://activerecord/lib/active_record/associations/errors.rb#64 def initialize(reflection = T.unsafe(nil)); end # Returns the value of attribute reflection. # - # source://activerecord/lib/active_record/associations.rb#63 + # source://activerecord/lib/active_record/associations/errors.rb#63 def reflection; end end @@ -22536,7 +23203,7 @@ end # For example the following migration is not reversible. # Rolling back this migration will raise an ActiveRecord::IrreversibleMigration error. # -# class IrreversibleMigrationExample < ActiveRecord::Migration[7.1] +# class IrreversibleMigrationExample < ActiveRecord::Migration[8.0] # def change # create_table :distributors do |t| # t.string :zipcode @@ -22554,7 +23221,7 @@ end # # 1. Define #up and #down methods instead of #change: # -# class ReversibleMigrationExample < ActiveRecord::Migration[7.1] +# class ReversibleMigrationExample < ActiveRecord::Migration[8.0] # def up # create_table :distributors do |t| # t.string :zipcode @@ -22579,7 +23246,7 @@ end # # 2. Use the #reversible method in #change method: # -# class ReversibleMigrationExample < ActiveRecord::Migration[7.1] +# class ReversibleMigrationExample < ActiveRecord::Migration[8.0] # def change # create_table :distributors do |t| # t.string :zipcode @@ -22604,13 +23271,13 @@ end # end # end # -# source://activerecord/lib/active_record/migration.rb#91 +# source://activerecord/lib/active_record/migration.rb#89 class ActiveRecord::IrreversibleMigration < ::ActiveRecord::MigrationError; end # IrreversibleOrderError is raised when a relation's order is too complex for # +reverse_order+ to automatically reverse. # -# source://activerecord/lib/active_record/errors.rb#530 +# source://activerecord/lib/active_record/errors.rb#557 class ActiveRecord::IrreversibleOrderError < ::ActiveRecord::ActiveRecordError; end # source://activerecord/lib/active_record/legacy_yaml_adapter.rb#4 @@ -22623,10 +23290,10 @@ end # LockWaitTimeout will be raised when lock wait timeout exceeded. # -# source://activerecord/lib/active_record/errors.rb#538 +# source://activerecord/lib/active_record/errors.rb#565 class ActiveRecord::LockWaitTimeout < ::ActiveRecord::StatementInvalid; end -# source://activerecord/lib/active_record.rb#143 +# source://activerecord/lib/active_record.rb#148 module ActiveRecord::Locking extend ::ActiveSupport::Autoload end @@ -22635,22 +23302,22 @@ end # `nil` values to `lock_version`, and not result in `ActiveRecord::StaleObjectError` # during update record. # -# source://activerecord/lib/active_record/locking/optimistic.rb#205 +# source://activerecord/lib/active_record/locking/optimistic.rb#206 class ActiveRecord::Locking::LockingType - # source://activerecord/lib/active_record/locking/optimistic.rb#210 + # source://activerecord/lib/active_record/locking/optimistic.rb#211 def deserialize(value); end - # source://activerecord/lib/active_record/locking/optimistic.rb#222 + # source://activerecord/lib/active_record/locking/optimistic.rb#223 def encode_with(coder); end - # source://activerecord/lib/active_record/locking/optimistic.rb#218 + # source://activerecord/lib/active_record/locking/optimistic.rb#219 def init_with(coder); end - # source://activerecord/lib/active_record/locking/optimistic.rb#214 + # source://activerecord/lib/active_record/locking/optimistic.rb#215 def serialize(value); end class << self - # source://activerecord/lib/active_record/locking/optimistic.rb#206 + # source://activerecord/lib/active_record/locking/optimistic.rb#207 def new(subtype); end end end @@ -22667,7 +23334,7 @@ end # == Usage # # Active Record supports optimistic locking if the +lock_version+ field is present. Each update to the -# record increments the +lock_version+ column and the locking facilities ensure that records instantiated twice +# record increments the integer column +lock_version+ and the locking facilities ensure that records instantiated twice # will let the last one saved raise a +StaleObjectError+ if the first was also updated. Example: # # p1 = Person.find(1) @@ -22758,9 +23425,6 @@ end # source://activerecord/lib/active_record/locking/optimistic.rb#154 module ActiveRecord::Locking::Optimistic::ClassMethods - # source://activerecord/lib/active_record/locking/optimistic.rb#185 - def define_attribute(name, cast_type, **_arg2); end - # The version column used for optimistic locking. Defaults to +lock_version+. # # source://activerecord/lib/active_record/locking/optimistic.rb#171 @@ -22793,7 +23457,10 @@ module ActiveRecord::Locking::Optimistic::ClassMethods private - # source://activerecord/lib/active_record/locking/optimistic.rb#193 + # source://activerecord/lib/active_record/locking/optimistic.rb#186 + def hook_attribute_type(name, cast_type); end + + # source://activerecord/lib/active_record/locking/optimistic.rb#194 def inherited(base); end end @@ -22893,62 +23560,56 @@ class ActiveRecord::LogSubscriber < ::ActiveSupport::LogSubscriber # source://activerecord/lib/active_record/log_subscriber.rb#7 def backtrace_cleaner?; end - # source://activerecord/lib/active_record/log_subscriber.rb#39 + # source://activerecord/lib/active_record/log_subscriber.rb#18 def sql(event); end - # source://activerecord/lib/active_record/log_subscriber.rb#30 + # source://activerecord/lib/active_record/log_subscriber.rb#9 def strict_loading_violation(event); end private - # source://activerecord/lib/active_record/log_subscriber.rb#101 + # source://activerecord/lib/active_record/log_subscriber.rb#80 def colorize_payload_name(name, payload_name); end - # source://activerecord/lib/active_record/log_subscriber.rb#134 + # source://activerecord/lib/active_record/log_subscriber.rb#113 def debug(progname = T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/log_subscriber.rb#164 + # source://activerecord/lib/active_record/log_subscriber.rb#143 def filter(name, value); end - # source://activerecord/lib/active_record/log_subscriber.rb#142 + # source://activerecord/lib/active_record/log_subscriber.rb#121 def log_query_source; end - # source://activerecord/lib/active_record/log_subscriber.rb#130 + # source://activerecord/lib/active_record/log_subscriber.rb#109 def logger; end - # source://activerecord/lib/active_record/log_subscriber.rb#151 + # source://activerecord/lib/active_record/log_subscriber.rb#130 def query_source_location; end - # source://activerecord/lib/active_record/log_subscriber.rb#86 + # source://activerecord/lib/active_record/log_subscriber.rb#65 def render_bind(attr, value); end - # source://activerecord/lib/active_record/log_subscriber.rb#109 + # source://activerecord/lib/active_record/log_subscriber.rb#88 def sql_color(sql); end - # source://activerecord/lib/active_record/log_subscriber.rb#82 + # source://activerecord/lib/active_record/log_subscriber.rb#61 def type_casted_binds(casted_binds); end class << self - # source://activerecord/lib/active_record/log_subscriber.rb#7 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def backtrace_cleaner; end - # source://activerecord/lib/active_record/log_subscriber.rb#7 - def backtrace_cleaner=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def backtrace_cleaner=(new_value); end # source://activerecord/lib/active_record/log_subscriber.rb#7 def backtrace_cleaner?; end - # source://activesupport/7.1.3.3lib/active_support/log_subscriber.rb#87 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def log_levels; end - # source://activerecord/lib/active_record/log_subscriber.rb#23 - def reset_runtime; end - - # source://activerecord/lib/active_record/log_subscriber.rb#16 - def runtime; end - - # source://activerecord/lib/active_record/log_subscriber.rb#9 - def runtime=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end end end @@ -22977,7 +23638,7 @@ module ActiveRecord::Marshalling::Methods def marshal_load(state); end end -# source://activerecord/lib/active_record.rb#161 +# source://activerecord/lib/active_record.rb#166 module ActiveRecord::Middleware extend ::ActiveSupport::Autoload end @@ -23253,7 +23914,7 @@ end # # Example of a simple migration: # -# class AddSsl < ActiveRecord::Migration[7.1] +# class AddSsl < ActiveRecord::Migration[8.0] # def up # add_column :accounts, :ssl_enabled, :boolean, default: true # end @@ -23273,7 +23934,7 @@ end # # Example of a more complex migration that also needs to initialize data: # -# class AddSystemSettings < ActiveRecord::Migration[7.1] +# class AddSystemSettings < ActiveRecord::Migration[8.0] # def up # create_table :system_settings do |t| # t.string :name @@ -23360,7 +24021,7 @@ end # # === Deletion # -# * drop_table(name): Drops the table called +name+. +# * drop_table(*names): Drops the given tables. # * drop_join_table(table_1, table_2, options): Drops the join table # specified by the given arguments. # * remove_column(table_name, column_name, type, options): Removes the column @@ -23402,7 +24063,7 @@ end # $ bin/rails generate migration add_fieldname_to_tablename fieldname:string # # This will generate the file timestamp_add_fieldname_to_tablename.rb, which will look like this: -# class AddFieldnameToTablename < ActiveRecord::Migration[7.1] +# class AddFieldnameToTablename < ActiveRecord::Migration[8.0] # def change # add_column :tablenames, :fieldname, :string # end @@ -23428,7 +24089,7 @@ end # # Not all migrations change the schema. Some just fix the data: # -# class RemoveEmptyTags < ActiveRecord::Migration[7.1] +# class RemoveEmptyTags < ActiveRecord::Migration[8.0] # def up # Tag.all.each { |tag| tag.destroy if tag.pages.empty? } # end @@ -23441,7 +24102,7 @@ end # # Others remove columns when they migrate up instead of down: # -# class RemoveUnnecessaryItemAttributes < ActiveRecord::Migration[7.1] +# class RemoveUnnecessaryItemAttributes < ActiveRecord::Migration[8.0] # def up # remove_column :items, :incomplete_items_count # remove_column :items, :completed_items_count @@ -23455,7 +24116,7 @@ end # # And sometimes you need to do something in SQL not abstracted directly by migrations: # -# class MakeJoinUnique < ActiveRecord::Migration[7.1] +# class MakeJoinUnique < ActiveRecord::Migration[8.0] # def up # execute "ALTER TABLE `pages_linked_pages` ADD UNIQUE `page_id_linked_page_id` (`page_id`,`linked_page_id`)" # end @@ -23472,7 +24133,7 @@ end # Base#reset_column_information in order to ensure that the model has the # latest column data from after the new column was added. Example: # -# class AddPeopleSalary < ActiveRecord::Migration[7.1] +# class AddPeopleSalary < ActiveRecord::Migration[8.0] # def up # add_column :people, :salary, :integer # Person.reset_column_information @@ -23488,7 +24149,7 @@ end # them to the console as they happen, along with benchmarks describing how # long each step took. # -# You can quiet them down by setting ActiveRecord::Migration.verbose = false. +# You can quiet them down by setting ActiveRecord::Migration.verbose = false. # # You can also insert your own messages and benchmarks by using the +say_with_time+ # method: @@ -23512,7 +24173,11 @@ end # # 20080717013526_your_migration_name.rb # -# The prefix is a generation timestamp (in UTC). +# The prefix is a generation timestamp (in UTC). Timestamps should not be +# modified manually. To validate that migration timestamps adhere to the +# format Active Record expects, you can use the following configuration option: +# +# config.active_record.validate_migration_timestamps = true # # If you'd prefer to use numeric prefixes, you can turn timestamped migrations # off by setting: @@ -23530,7 +24195,7 @@ end # To define a reversible migration, define the +change+ method in your # migration like this: # -# class TenderloveMigration < ActiveRecord::Migration[7.1] +# class TenderloveMigration < ActiveRecord::Migration[8.0] # def change # create_table(:horses) do |t| # t.column :content, :text @@ -23560,7 +24225,7 @@ end # can't execute inside a transaction though, and for these situations # you can turn the automatic transactions off. # -# class ChangeEnum < ActiveRecord::Migration[7.1] +# class ChangeEnum < ActiveRecord::Migration[8.0] # disable_ddl_transaction! # # def up @@ -23571,64 +24236,67 @@ end # Remember that you can still open your own transactions, even if you # are in a Migration with self.disable_ddl_transaction!. # -# source://activerecord/lib/active_record/migration.rb#555 +# source://activerecord/lib/active_record/migration.rb#572 class ActiveRecord::Migration # @return [Migration] a new instance of Migration # - # source://activerecord/lib/active_record/migration.rb#796 + # source://activerecord/lib/active_record/migration.rb#805 def initialize(name = T.unsafe(nil), version = T.unsafe(nil)); end - # source://activerecord/lib/active_record/migration.rb#1000 + # source://activerecord/lib/active_record/migration.rb#1010 def announce(message); end - # source://activerecord/lib/active_record/migration.rb#1031 + # source://activerecord/lib/active_record/migration.rb#1041 def connection; end - # source://activerecord/lib/active_record/migration.rb#1052 + # source://activerecord/lib/active_record/migration.rb#1045 + def connection_pool; end + + # source://activerecord/lib/active_record/migration.rb#1066 def copy(destination, sources, options = T.unsafe(nil)); end - # source://activerecord/lib/active_record/migration.rb#789 + # source://activerecord/lib/active_record/migration.rb#792 def disable_ddl_transaction; end - # source://activerecord/lib/active_record/migration.rb#952 + # source://activerecord/lib/active_record/migration.rb#962 def down; end - # source://activerecord/lib/active_record/migration.rb#980 + # source://activerecord/lib/active_record/migration.rb#990 def exec_migration(conn, direction); end - # source://activerecord/lib/active_record/migration.rb#802 + # source://activerecord/lib/active_record/migration.rb#812 def execution_strategy; end - # source://activerecord/lib/active_record/migration.rb#1035 + # source://activerecord/lib/active_record/migration.rb#1049 def method_missing(method, *arguments, **_arg2, &block); end # Execute this migration in the named direction # - # source://activerecord/lib/active_record/migration.rb#959 + # source://activerecord/lib/active_record/migration.rb#969 def migrate(direction); end # Returns the value of attribute name. # - # source://activerecord/lib/active_record/migration.rb#794 + # source://activerecord/lib/active_record/migration.rb#803 def name; end # Sets the attribute name # # @param value the value to set the attribute name to. # - # source://activerecord/lib/active_record/migration.rb#794 + # source://activerecord/lib/active_record/migration.rb#803 def name=(_arg0); end # Determines the version number of the next migration. # - # source://activerecord/lib/active_record/migration.rb#1119 + # source://activerecord/lib/active_record/migration.rb#1133 def next_migration_number(number); end # Finds the correct table name given an Active Record object. # Uses the Active Record object's own table_name, or pre/suffix from the # options passed in. # - # source://activerecord/lib/active_record/migration.rb#1110 + # source://activerecord/lib/active_record/migration.rb#1124 def proper_table_name(name, options = T.unsafe(nil)); end # Used to specify an operation that can be run in one direction or another. @@ -23640,7 +24308,7 @@ class ActiveRecord::Migration # when the three columns 'first_name', 'last_name' and 'full_name' exist, # even when migrating down: # - # class SplitNameMigration < ActiveRecord::Migration[7.1] + # class SplitNameMigration < ActiveRecord::Migration[8.0] # def change # add_column :users, :first_name, :string # add_column :users, :last_name, :string @@ -23658,7 +24326,7 @@ class ActiveRecord::Migration # end # end # - # source://activerecord/lib/active_record/migration.rb#904 + # source://activerecord/lib/active_record/migration.rb#914 def reversible; end # Reverses the migration commands for the given block and @@ -23668,7 +24336,7 @@ class ActiveRecord::Migration # and create the table 'apples' on the way up, and the reverse # on the way down. # - # class FixTLMigration < ActiveRecord::Migration[7.1] + # class FixTLMigration < ActiveRecord::Migration[8.0] # def change # revert do # create_table(:horses) do |t| @@ -23687,7 +24355,7 @@ class ActiveRecord::Migration # # require_relative "20121212123456_tenderlove_migration" # - # class FixupTLMigration < ActiveRecord::Migration[7.1] + # class FixupTLMigration < ActiveRecord::Migration[8.0] # def change # revert TenderloveMigration # @@ -23699,12 +24367,12 @@ class ActiveRecord::Migration # # This command can be nested. # - # source://activerecord/lib/active_record/migration.rb#847 + # source://activerecord/lib/active_record/migration.rb#857 def revert(*migration_classes, &block); end # @return [Boolean] # - # source://activerecord/lib/active_record/migration.rb#864 + # source://activerecord/lib/active_record/migration.rb#874 def reverting?; end # Runs the given migration classes. @@ -23713,33 +24381,33 @@ class ActiveRecord::Migration # - +:direction+ - Default is +:up+. # - +:revert+ - Default is +false+. # - # source://activerecord/lib/active_record/migration.rb#932 + # source://activerecord/lib/active_record/migration.rb#942 def run(*migration_classes); end # Takes a message argument and outputs it as is. # A second boolean argument can be passed to specify whether to indent or not. # - # source://activerecord/lib/active_record/migration.rb#1008 + # source://activerecord/lib/active_record/migration.rb#1018 def say(message, subitem = T.unsafe(nil)); end # Outputs text along with how long it took to run its block. # If the block returns an integer it assumes it is the number of rows affected. # - # source://activerecord/lib/active_record/migration.rb#1014 + # source://activerecord/lib/active_record/migration.rb#1024 def say_with_time(message); end # Takes a block as an argument and suppresses any output generated by the block. # - # source://activerecord/lib/active_record/migration.rb#1024 + # source://activerecord/lib/active_record/migration.rb#1034 def suppress_messages; end # Builds a hash for use in ActiveRecord::Migration#proper_table_name using # the Active Record object's table_name prefix and suffix # - # source://activerecord/lib/active_record/migration.rb#1129 + # source://activerecord/lib/active_record/migration.rb#1143 def table_name_options(config = T.unsafe(nil)); end - # source://activerecord/lib/active_record/migration.rb#946 + # source://activerecord/lib/active_record/migration.rb#956 def up; end # Used to specify an operation that is only run when migrating up @@ -23748,7 +24416,7 @@ class ActiveRecord::Migration # In the following example, the new column +published+ will be given # the value +true+ for all existing records. # - # class AddPublishedToPosts < ActiveRecord::Migration[7.1] + # class AddPublishedToPosts < ActiveRecord::Migration[8.0] # def change # add_column :posts, :published, :boolean, default: false # up_only do @@ -23757,48 +24425,54 @@ class ActiveRecord::Migration # end # end # - # source://activerecord/lib/active_record/migration.rb#923 + # source://activerecord/lib/active_record/migration.rb#933 def up_only(&block); end - # source://activerecord/lib/active_record/migration.rb#793 + # :singleton-method: verbose + # + # Specifies if migrations will write the actions they are taking to the console as they + # happen, along with benchmarks describing how long each step took. Defaults to + # true. + # + # source://activerecord/lib/active_record/migration.rb#802 def verbose; end - # source://activerecord/lib/active_record/migration.rb#793 + # source://activerecord/lib/active_record/migration.rb#802 def verbose=(val); end # Returns the value of attribute version. # - # source://activerecord/lib/active_record/migration.rb#794 + # source://activerecord/lib/active_record/migration.rb#803 def version; end # Sets the attribute version # # @param value the value to set the attribute version to. # - # source://activerecord/lib/active_record/migration.rb#794 + # source://activerecord/lib/active_record/migration.rb#803 def version=(_arg0); end - # source://activerecord/lib/active_record/migration.rb#996 + # source://activerecord/lib/active_record/migration.rb#1006 def write(text = T.unsafe(nil)); end private - # source://activerecord/lib/active_record/migration.rb#1161 + # source://activerecord/lib/active_record/migration.rb#1175 def command_recorder; end - # source://activerecord/lib/active_record/migration.rb#1137 + # source://activerecord/lib/active_record/migration.rb#1151 def execute_block; end - # source://activerecord/lib/active_record/migration.rb#1145 + # source://activerecord/lib/active_record/migration.rb#1159 def format_arguments(arguments); end # @return [Boolean] # - # source://activerecord/lib/active_record/migration.rb#1157 + # source://activerecord/lib/active_record/migration.rb#1171 def internal_option?(option_name); end class << self - # source://activerecord/lib/active_record/migration.rb#613 + # source://activerecord/lib/active_record/migration.rb#630 def [](version); end # Raises ActiveRecord::PendingMigrationError error if any migrations are pending @@ -23807,26 +24481,19 @@ class ActiveRecord::Migration # source://activerecord/lib/active_record/migration.rb#698 def check_all_pending!; end - # Raises ActiveRecord::PendingMigrationError error if any migrations are pending. - # - # This is deprecated in favor of +check_all_pending!+ - # - # source://activerecord/lib/active_record/migration.rb#682 - def check_pending!(connection = T.unsafe(nil)); end - - # source://activerecord/lib/active_record/migration.rb#751 + # source://activerecord/lib/active_record/migration.rb#744 def check_pending_migrations; end - # source://activerecord/lib/active_record/migration.rb#617 + # source://activerecord/lib/active_record/migration.rb#634 def current_version; end - # source://activerecord/lib/active_record/migration.rb#672 + # source://activerecord/lib/active_record/migration.rb#689 def delegate; end - # source://activerecord/lib/active_record/migration.rb#672 + # source://activerecord/lib/active_record/migration.rb#689 def delegate=(_arg0); end - # source://activerecord/lib/active_record/migration.rb#673 + # source://activerecord/lib/active_record/migration.rb#690 def disable_ddl_transaction; end # Disable the transaction wrapping this migration. @@ -23834,55 +24501,58 @@ class ActiveRecord::Migration # # For more details read the {"Transactional Migrations" section above}[rdoc-ref:Migration]. # - # source://activerecord/lib/active_record/migration.rb#747 + # source://activerecord/lib/active_record/migration.rb#740 def disable_ddl_transaction!; end - # source://activerecord/lib/active_record/migration.rb#673 + # source://activerecord/lib/active_record/migration.rb#690 def disable_ddl_transaction=(_arg0); end - # source://activerecord/lib/active_record/migration.rb#601 + # source://activerecord/lib/active_record/migration.rb#618 def inherited(subclass); end # source://activerecord/lib/active_record/migration.rb#714 def load_schema_if_pending!; end - # source://activerecord/lib/active_record/migration.rb#728 + # source://activerecord/lib/active_record/migration.rb#722 def maintain_test_schema!; end - # source://activerecord/lib/active_record/migration.rb#734 - def method_missing(name, *args, **_arg2, &block); end + # source://activerecord/lib/active_record/migration.rb#728 + def method_missing(name, *_arg1, **_arg2, &_arg3); end - # source://activerecord/lib/active_record/migration.rb#739 + # source://activerecord/lib/active_record/migration.rb#732 def migrate(direction); end - # source://activerecord/lib/active_record/migration.rb#675 + # source://activerecord/lib/active_record/migration.rb#692 def nearest_delegate; end # @return [Boolean] # - # source://activerecord/lib/active_record/migration.rb#623 + # source://activerecord/lib/active_record/migration.rb#640 def valid_version_format?(version_string); end - # source://activerecord/lib/active_record/migration.rb#793 + # source://activerecord/lib/active_record/migration.rb#802 def verbose; end - # source://activerecord/lib/active_record/migration.rb#793 + # source://activerecord/lib/active_record/migration.rb#802 def verbose=(val); end private # @return [Boolean] # - # source://activerecord/lib/active_record/migration.rb#760 + # source://activerecord/lib/active_record/migration.rb#753 def any_schema_needs_update?; end - # source://activerecord/lib/active_record/migration.rb#766 + # source://activerecord/lib/active_record/migration.rb#759 def db_configs_in_current_env; end - # source://activerecord/lib/active_record/migration.rb#784 + # source://activerecord/lib/active_record/migration.rb#777 def env; end - # source://activerecord/lib/active_record/migration.rb#770 + # source://activerecord/lib/active_record/migration.rb#781 + def load_schema!; end + + # source://activerecord/lib/active_record/migration.rb#763 def pending_migrations; end end end @@ -23890,22 +24560,22 @@ end # This class is used to verify that all migrations have been run before # loading a web page if config.active_record.migration_error is set to +:page_load+. # -# source://activerecord/lib/active_record/migration.rb#632 +# source://activerecord/lib/active_record/migration.rb#649 class ActiveRecord::Migration::CheckPending # @return [CheckPending] a new instance of CheckPending # - # source://activerecord/lib/active_record/migration.rb#633 + # source://activerecord/lib/active_record/migration.rb#650 def initialize(app, file_watcher: T.unsafe(nil)); end - # source://activerecord/lib/active_record/migration.rb#640 + # source://activerecord/lib/active_record/migration.rb#657 def call(env); end private - # source://activerecord/lib/active_record/migration.rb#659 + # source://activerecord/lib/active_record/migration.rb#676 def build_watcher(&block); end - # source://activerecord/lib/active_record/migration.rb#666 + # source://activerecord/lib/active_record/migration.rb#683 def connection; end end @@ -23929,10 +24599,12 @@ end # * change_table_comment (must supply a +:from+ and +:to+ option) # * create_enum # * create_join_table +# * create_virtual_table # * create_table # * disable_extension # * drop_enum (must supply a list of values) # * drop_join_table +# * drop_virtual_table (must supply options) # * drop_table (must supply a block) # * enable_extension # * remove_column (must supply a type) @@ -23950,116 +24622,128 @@ end # * rename_index # * rename_table # -# source://activerecord/lib/active_record/migration/command_recorder.rb#45 +# source://activerecord/lib/active_record/migration/command_recorder.rb#47 class ActiveRecord::Migration::CommandRecorder include ::ActiveRecord::Migration::JoinTable include ::ActiveRecord::Migration::CommandRecorder::StraightReversions # @return [CommandRecorder] a new instance of CommandRecorder # - # source://activerecord/lib/active_record/migration/command_recorder.rb#63 + # source://activerecord/lib/active_record/migration/command_recorder.rb#67 def initialize(delegate = T.unsafe(nil)); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def add_belongs_to(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def add_check_constraint(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def add_column(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def add_enum_value(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def add_exclusion_constraint(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def add_foreign_key(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def add_index(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def add_reference(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def add_timestamps(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def add_unique_constraint(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def change_column(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def change_column_comment(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def change_column_default(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def change_column_null(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#132 + # source://activerecord/lib/active_record/migration/command_recorder.rb#136 def change_table(table_name, **options); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def change_table_comment(*args, **_arg1, &block); end # Returns the value of attribute commands. # - # source://activerecord/lib/active_record/migration/command_recorder.rb#61 + # source://activerecord/lib/active_record/migration/command_recorder.rb#65 def commands; end # Sets the attribute commands # # @param value the value to set the attribute commands to. # - # source://activerecord/lib/active_record/migration/command_recorder.rb#61 + # source://activerecord/lib/active_record/migration/command_recorder.rb#65 def commands=(_arg0); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def create_enum(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def create_join_table(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 + def create_schema(*args, **_arg1, &block); end + + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def create_table(*args, **_arg1, &block); end + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 + def create_virtual_table(*args, **_arg1, &block); end + # Returns the value of attribute delegate. # - # source://activerecord/lib/active_record/migration/command_recorder.rb#61 + # source://activerecord/lib/active_record/migration/command_recorder.rb#65 def delegate; end # Sets the attribute delegate # # @param value the value to set the attribute delegate to. # - # source://activerecord/lib/active_record/migration/command_recorder.rb#61 + # source://activerecord/lib/active_record/migration/command_recorder.rb#65 def delegate=(_arg0); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def disable_extension(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def drop_enum(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def drop_join_table(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 + def drop_schema(*args, **_arg1, &block); end + + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def drop_table(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 + def drop_virtual_table(*args, **_arg1, &block); end + + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def enable_extension(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def execute(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def execute_block(*args, **_arg1, &block); end # Returns the inverse of the given command. For example: @@ -24077,13 +24761,13 @@ class ActiveRecord::Migration::CommandRecorder # # @raise [IrreversibleMigration] # - # source://activerecord/lib/active_record/migration/command_recorder.rb#110 + # source://activerecord/lib/active_record/migration/command_recorder.rb#114 def inverse_of(command, args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_add_belongs_to(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_remove_belongs_to(args, &block); end # Record +command+. +command+ should be a method name and arguments. @@ -24091,55 +24775,55 @@ class ActiveRecord::Migration::CommandRecorder # # recorder.record(:method_name, [:arg1, :arg2]) # - # source://activerecord/lib/active_record/migration/command_recorder.rb#90 + # source://activerecord/lib/active_record/migration/command_recorder.rb#94 def record(*command, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def remove_belongs_to(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def remove_check_constraint(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def remove_column(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def remove_columns(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def remove_exclusion_constraint(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def remove_foreign_key(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def remove_index(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def remove_reference(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def remove_timestamps(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def remove_unique_constraint(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def rename_column(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def rename_enum(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def rename_enum_value(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def rename_index(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def rename_table(*args, **_arg1, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#144 + # source://activerecord/lib/active_record/migration/command_recorder.rb#148 def replay(migration); end # While executing the given block, the recorded will be in reverting mode. @@ -24150,198 +24834,215 @@ class ActiveRecord::Migration::CommandRecorder # recorder.revert{ recorder.record(:rename_table, [:old, :new]) } # # same effect as recorder.record(:rename_table, [:new, :old]) # - # source://activerecord/lib/active_record/migration/command_recorder.rb#76 + # source://activerecord/lib/active_record/migration/command_recorder.rb#80 def revert; end # Returns the value of attribute reverting. # - # source://activerecord/lib/active_record/migration/command_recorder.rb#61 + # source://activerecord/lib/active_record/migration/command_recorder.rb#65 def reverting; end # Sets the attribute reverting # # @param value the value to set the attribute reverting to. # - # source://activerecord/lib/active_record/migration/command_recorder.rb#61 + # source://activerecord/lib/active_record/migration/command_recorder.rb#65 def reverting=(_arg0); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#123 + # source://activerecord/lib/active_record/migration/command_recorder.rb#127 def transaction(*args, **_arg1, &block); end private - # source://activerecord/lib/active_record/migration/command_recorder.rb#313 + # source://activerecord/lib/active_record/migration/command_recorder.rb#324 def invert_add_check_constraint(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#274 + # source://activerecord/lib/active_record/migration/command_recorder.rb#285 def invert_add_foreign_key(args); end # @raise [ActiveRecord::IrreversibleMigration] # - # source://activerecord/lib/active_record/migration/command_recorder.rb#335 + # source://activerecord/lib/active_record/migration/command_recorder.rb#346 def invert_add_unique_constraint(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#293 + # source://activerecord/lib/active_record/migration/command_recorder.rb#304 def invert_change_column_comment(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#259 + # source://activerecord/lib/active_record/migration/command_recorder.rb#270 def invert_change_column_default(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#269 + # source://activerecord/lib/active_record/migration/command_recorder.rb#280 def invert_change_column_null(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#303 + # source://activerecord/lib/active_record/migration/command_recorder.rb#314 def invert_change_table_comment(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#191 + # source://activerecord/lib/active_record/migration/command_recorder.rb#197 def invert_create_table(args, &block); end # @raise [ActiveRecord::IrreversibleMigration] # - # source://activerecord/lib/active_record/migration/command_recorder.rb#349 + # source://activerecord/lib/active_record/migration/command_recorder.rb#360 def invert_drop_enum(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#198 + # source://activerecord/lib/active_record/migration/command_recorder.rb#204 def invert_drop_table(args, &block); end # @raise [ActiveRecord::IrreversibleMigration] # - # source://activerecord/lib/active_record/migration/command_recorder.rb#321 + # source://activerecord/lib/active_record/migration/command_recorder.rb#386 + def invert_drop_virtual_table(args); end + + # @raise [ActiveRecord::IrreversibleMigration] + # + # source://activerecord/lib/active_record/migration/command_recorder.rb#332 def invert_remove_check_constraint(args); end # @raise [ActiveRecord::IrreversibleMigration] # - # source://activerecord/lib/active_record/migration/command_recorder.rb#215 + # source://activerecord/lib/active_record/migration/command_recorder.rb#226 def invert_remove_column(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#220 + # source://activerecord/lib/active_record/migration/command_recorder.rb#231 def invert_remove_columns(args); end # @raise [ActiveRecord::IrreversibleMigration] # - # source://activerecord/lib/active_record/migration/command_recorder.rb#330 + # source://activerecord/lib/active_record/migration/command_recorder.rb#341 def invert_remove_exclusion_constraint(args); end # @raise [ActiveRecord::IrreversibleMigration] # - # source://activerecord/lib/active_record/migration/command_recorder.rb#279 + # source://activerecord/lib/active_record/migration/command_recorder.rb#290 def invert_remove_foreign_key(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#238 + # source://activerecord/lib/active_record/migration/command_recorder.rb#249 def invert_remove_index(args); end # @raise [ActiveRecord::IrreversibleMigration] # - # source://activerecord/lib/active_record/migration/command_recorder.rb#342 + # source://activerecord/lib/active_record/migration/command_recorder.rb#353 def invert_remove_unique_constraint(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#233 + # source://activerecord/lib/active_record/migration/command_recorder.rb#244 def invert_rename_column(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#355 + # source://activerecord/lib/active_record/migration/command_recorder.rb#366 def invert_rename_enum(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#365 + # source://activerecord/lib/active_record/migration/command_recorder.rb#376 def invert_rename_enum_value(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#228 + # source://activerecord/lib/active_record/migration/command_recorder.rb#239 def invert_rename_index(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#208 + # source://activerecord/lib/active_record/migration/command_recorder.rb#219 def invert_rename_table(args); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#180 + # source://activerecord/lib/active_record/migration/command_recorder.rb#186 def invert_transaction(args, &block); end # Forwards any missing method call to the \target. # - # source://activerecord/lib/active_record/migration/command_recorder.rb#380 - def method_missing(method, *args, **_arg2, &block); end + # source://activerecord/lib/active_record/migration/command_recorder.rb#397 + def method_missing(method, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # - # source://activerecord/lib/active_record/migration/command_recorder.rb#375 + # source://activerecord/lib/active_record/migration/command_recorder.rb#392 def respond_to_missing?(method, _); end end -# source://activerecord/lib/active_record/migration/command_recorder.rb#46 +# source://activerecord/lib/active_record/migration/command_recorder.rb#48 ActiveRecord::Migration::CommandRecorder::ReversibleAndIrreversibleMethods = T.let(T.unsafe(nil), Array) -# source://activerecord/lib/active_record/migration/command_recorder.rb#151 +# source://activerecord/lib/active_record/migration/command_recorder.rb#155 module ActiveRecord::Migration::CommandRecorder::StraightReversions - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_add_check_constraint(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_add_column(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_add_exclusion_constraint(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_add_foreign_key(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_add_index(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_add_reference(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_add_timestamps(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_add_unique_constraint(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_create_enum(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_create_join_table(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 + def invert_create_schema(args, &block); end + + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_create_table(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 + def invert_create_virtual_table(args, &block); end + + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_disable_extension(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_drop_enum(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_drop_join_table(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 + def invert_drop_schema(args, &block); end + + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_drop_table(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 + def invert_drop_virtual_table(args, &block); end + + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_enable_extension(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_execute_block(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_remove_check_constraint(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_remove_column(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_remove_exclusion_constraint(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_remove_foreign_key(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_remove_index(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_remove_reference(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_remove_timestamps(args, &block); end - # source://activerecord/lib/active_record/migration/command_recorder.rb#170 + # source://activerecord/lib/active_record/migration/command_recorder.rb#176 def invert_remove_unique_constraint(args, &block); end end @@ -24353,294 +25054,303 @@ module ActiveRecord::Migration::Compatibility end end -# source://activerecord/lib/active_record/migration/compatibility.rb#405 +# source://activerecord/lib/active_record/migration/compatibility.rb#416 class ActiveRecord::Migration::Compatibility::V4_2 < ::ActiveRecord::Migration::Compatibility::V5_0 - # source://activerecord/lib/active_record/migration/compatibility.rb#423 + # source://activerecord/lib/active_record/migration/compatibility.rb#434 def add_belongs_to(table_name, ref_name, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#423 + # source://activerecord/lib/active_record/migration/compatibility.rb#434 def add_reference(table_name, ref_name, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#429 + # source://activerecord/lib/active_record/migration/compatibility.rb#440 def add_timestamps(table_name, **options); end # @return [Boolean] # - # source://activerecord/lib/active_record/migration/compatibility.rb#434 + # source://activerecord/lib/active_record/migration/compatibility.rb#445 def index_exists?(table_name, column_name, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#445 + # source://activerecord/lib/active_record/migration/compatibility.rb#456 def remove_index(table_name, column_name = T.unsafe(nil), **options); end private - # source://activerecord/lib/active_record/migration/compatibility.rb#451 + # source://activerecord/lib/active_record/migration/compatibility.rb#462 def compatible_table_definition(t); end - # source://activerecord/lib/active_record/migration/compatibility.rb#458 + # source://activerecord/lib/active_record/migration/compatibility.rb#469 def index_name_for_remove(table_name, column_name, options); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#406 +# source://activerecord/lib/active_record/migration/compatibility.rb#417 module ActiveRecord::Migration::Compatibility::V4_2::TableDefinition - # source://activerecord/lib/active_record/migration/compatibility.rb#407 + # source://activerecord/lib/active_record/migration/compatibility.rb#418 def belongs_to(*_arg0, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#407 + # source://activerecord/lib/active_record/migration/compatibility.rb#418 def references(*_arg0, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#413 + # source://activerecord/lib/active_record/migration/compatibility.rb#424 def timestamps(**options); end private - # source://activerecord/lib/active_record/migration/compatibility.rb#419 + # source://activerecord/lib/active_record/migration/compatibility.rb#430 def raise_on_if_exist_options(options); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#336 +# source://activerecord/lib/active_record/migration/compatibility.rb#347 class ActiveRecord::Migration::Compatibility::V5_0 < ::ActiveRecord::Migration::Compatibility::V5_1 - # source://activerecord/lib/active_record/migration/compatibility.rb#391 + # source://activerecord/lib/active_record/migration/compatibility.rb#402 def add_belongs_to(table_name, ref_name, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#381 + # source://activerecord/lib/active_record/migration/compatibility.rb#392 def add_column(table_name, column_name, type, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#391 + # source://activerecord/lib/active_record/migration/compatibility.rb#402 def add_reference(table_name, ref_name, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#376 + # source://activerecord/lib/active_record/migration/compatibility.rb#387 def create_join_table(table_1, table_2, column_options: T.unsafe(nil), **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#353 + # source://activerecord/lib/active_record/migration/compatibility.rb#364 def create_table(table_name, **options); end private - # source://activerecord/lib/active_record/migration/compatibility.rb#397 + # source://activerecord/lib/active_record/migration/compatibility.rb#408 def compatible_table_definition(t); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#337 +# source://activerecord/lib/active_record/migration/compatibility.rb#348 module ActiveRecord::Migration::Compatibility::V5_0::TableDefinition - # source://activerecord/lib/active_record/migration/compatibility.rb#343 + # source://activerecord/lib/active_record/migration/compatibility.rb#354 def belongs_to(*args, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#338 + # source://activerecord/lib/active_record/migration/compatibility.rb#349 def primary_key(name, type = T.unsafe(nil), **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#343 + # source://activerecord/lib/active_record/migration/compatibility.rb#354 def references(*args, **options); end private - # source://activerecord/lib/active_record/migration/compatibility.rb#349 + # source://activerecord/lib/active_record/migration/compatibility.rb#360 def raise_on_if_exist_options(options); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#315 +# source://activerecord/lib/active_record/migration/compatibility.rb#326 class ActiveRecord::Migration::Compatibility::V5_1 < ::ActiveRecord::Migration::Compatibility::V5_2 - # source://activerecord/lib/active_record/migration/compatibility.rb#316 + # source://activerecord/lib/active_record/migration/compatibility.rb#327 def change_column(table_name, column_name, type, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#327 + # source://activerecord/lib/active_record/migration/compatibility.rb#338 def create_table(table_name, **options); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#259 +# source://activerecord/lib/active_record/migration/compatibility.rb#270 class ActiveRecord::Migration::Compatibility::V5_2 < ::ActiveRecord::Migration::Compatibility::V6_0 - # source://activerecord/lib/active_record/migration/compatibility.rb#293 + # source://activerecord/lib/active_record/migration/compatibility.rb#304 def add_timestamps(table_name, **options); end private - # source://activerecord/lib/active_record/migration/compatibility.rb#306 + # source://activerecord/lib/active_record/migration/compatibility.rb#317 def command_recorder; end - # source://activerecord/lib/active_record/migration/compatibility.rb#299 + # source://activerecord/lib/active_record/migration/compatibility.rb#310 def compatible_table_definition(t); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#279 +# source://activerecord/lib/active_record/migration/compatibility.rb#290 module ActiveRecord::Migration::Compatibility::V5_2::CommandRecorder - # source://activerecord/lib/active_record/migration/compatibility.rb#284 + # source://activerecord/lib/active_record/migration/compatibility.rb#295 def invert_change_column_comment(args); end - # source://activerecord/lib/active_record/migration/compatibility.rb#288 + # source://activerecord/lib/active_record/migration/compatibility.rb#299 def invert_change_table_comment(args); end - # source://activerecord/lib/active_record/migration/compatibility.rb#280 + # source://activerecord/lib/active_record/migration/compatibility.rb#291 def invert_transaction(args, &block); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#260 +# source://activerecord/lib/active_record/migration/compatibility.rb#271 module ActiveRecord::Migration::Compatibility::V5_2::TableDefinition - # source://activerecord/lib/active_record/migration/compatibility.rb#266 + # source://activerecord/lib/active_record/migration/compatibility.rb#277 def column(name, type, index: T.unsafe(nil), **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#261 + # source://activerecord/lib/active_record/migration/compatibility.rb#272 def timestamps(**options); end private - # source://activerecord/lib/active_record/migration/compatibility.rb#275 + # source://activerecord/lib/active_record/migration/compatibility.rb#286 def raise_on_duplicate_column(name); end - # source://activerecord/lib/active_record/migration/compatibility.rb#272 + # source://activerecord/lib/active_record/migration/compatibility.rb#283 def raise_on_if_exist_options(options); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#216 +# source://activerecord/lib/active_record/migration/compatibility.rb#227 class ActiveRecord::Migration::Compatibility::V6_0 < ::ActiveRecord::Migration::Compatibility::V6_1 - # source://activerecord/lib/active_record/migration/compatibility.rb#240 + # source://activerecord/lib/active_record/migration/compatibility.rb#251 def add_belongs_to(table_name, ref_name, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#240 + # source://activerecord/lib/active_record/migration/compatibility.rb#251 def add_reference(table_name, ref_name, **options); end private - # source://activerecord/lib/active_record/migration/compatibility.rb#251 + # source://activerecord/lib/active_record/migration/compatibility.rb#262 def compatible_table_definition(t); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#217 +# source://activerecord/lib/active_record/migration/compatibility.rb#228 class ActiveRecord::Migration::Compatibility::V6_0::ReferenceDefinition < ::ActiveRecord::ConnectionAdapters::ReferenceDefinition - # source://activerecord/lib/active_record/migration/compatibility.rb#218 + # source://activerecord/lib/active_record/migration/compatibility.rb#229 def index_options(table_name); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#223 +# source://activerecord/lib/active_record/migration/compatibility.rb#234 module ActiveRecord::Migration::Compatibility::V6_0::TableDefinition - # source://activerecord/lib/active_record/migration/compatibility.rb#224 + # source://activerecord/lib/active_record/migration/compatibility.rb#235 def belongs_to(*args, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#230 + # source://activerecord/lib/active_record/migration/compatibility.rb#241 def column(name, type, index: T.unsafe(nil), **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#224 + # source://activerecord/lib/active_record/migration/compatibility.rb#235 def references(*args, **options); end private - # source://activerecord/lib/active_record/migration/compatibility.rb#236 + # source://activerecord/lib/active_record/migration/compatibility.rb#247 def raise_on_if_exist_options(options); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#153 +# source://activerecord/lib/active_record/migration/compatibility.rb#164 class ActiveRecord::Migration::Compatibility::V6_1 < ::ActiveRecord::Migration::Compatibility::V7_0 - # source://activerecord/lib/active_record/migration/compatibility.rb#168 + # source://activerecord/lib/active_record/migration/compatibility.rb#179 def add_column(table_name, column_name, type, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#177 + # source://activerecord/lib/active_record/migration/compatibility.rb#188 def change_column(table_name, column_name, type, **options); end private - # source://activerecord/lib/active_record/migration/compatibility.rb#208 + # source://activerecord/lib/active_record/migration/compatibility.rb#219 def compatible_table_definition(t); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#154 +# source://activerecord/lib/active_record/migration/compatibility.rb#165 class ActiveRecord::Migration::Compatibility::V6_1::PostgreSQLCompat class << self - # source://activerecord/lib/active_record/migration/compatibility.rb#155 + # source://activerecord/lib/active_record/migration/compatibility.rb#166 def compatible_timestamp_type(type, connection); end end end -# source://activerecord/lib/active_record/migration/compatibility.rb#186 +# source://activerecord/lib/active_record/migration/compatibility.rb#197 module ActiveRecord::Migration::Compatibility::V6_1::TableDefinition - # source://activerecord/lib/active_record/migration/compatibility.rb#192 + # source://activerecord/lib/active_record/migration/compatibility.rb#203 def change(name, type, index: T.unsafe(nil), **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#197 + # source://activerecord/lib/active_record/migration/compatibility.rb#208 def column(name, type, index: T.unsafe(nil), **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#187 + # source://activerecord/lib/active_record/migration/compatibility.rb#198 def new_column_definition(name, type, **options); end private - # source://activerecord/lib/active_record/migration/compatibility.rb#203 + # source://activerecord/lib/active_record/migration/compatibility.rb#214 def raise_on_if_exist_options(options); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#35 -class ActiveRecord::Migration::Compatibility::V7_0 < ::ActiveRecord::Migration::Current +# source://activerecord/lib/active_record/migration/compatibility.rb#40 +class ActiveRecord::Migration::Compatibility::V7_0 < ::ActiveRecord::Migration::Compatibility::V7_1 include ::ActiveRecord::Migration::Compatibility::V7_0::LegacyIndexName - # source://activerecord/lib/active_record/migration/compatibility.rb#100 + # source://activerecord/lib/active_record/migration/compatibility.rb#110 def add_belongs_to(table_name, ref_name, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#90 + # source://activerecord/lib/active_record/migration/compatibility.rb#100 def add_column(table_name, column_name, type, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#137 + # source://activerecord/lib/active_record/migration/compatibility.rb#148 def add_foreign_key(from_table, to_table, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#95 + # source://activerecord/lib/active_record/migration/compatibility.rb#105 def add_index(table_name, column_name, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#100 + # source://activerecord/lib/active_record/migration/compatibility.rb#110 def add_reference(table_name, ref_name, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#118 + # source://activerecord/lib/active_record/migration/compatibility.rb#129 def change_column(table_name, column_name, type, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#126 + # source://activerecord/lib/active_record/migration/compatibility.rb#137 def change_column_null(table_name, column_name, null, default = T.unsafe(nil)); end - # source://activerecord/lib/active_record/migration/compatibility.rb#106 + # source://activerecord/lib/active_record/migration/compatibility.rb#116 def create_table(table_name, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#130 + # source://activerecord/lib/active_record/migration/compatibility.rb#141 def disable_extension(name, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#113 + # source://activerecord/lib/active_record/migration/compatibility.rb#123 def rename_table(table_name, new_name, **options); end private - # source://activerecord/lib/active_record/migration/compatibility.rb#145 + # source://activerecord/lib/active_record/migration/compatibility.rb#156 def compatible_table_definition(t); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#36 +# source://activerecord/lib/active_record/migration/compatibility.rb#41 module ActiveRecord::Migration::Compatibility::V7_0::LegacyIndexName private # @return [Boolean] # - # source://activerecord/lib/active_record/migration/compatibility.rb#60 + # source://activerecord/lib/active_record/migration/compatibility.rb#65 def expression_column_name?(column_name); end - # source://activerecord/lib/active_record/migration/compatibility.rb#52 + # source://activerecord/lib/active_record/migration/compatibility.rb#57 def index_name_options(column_names); end - # source://activerecord/lib/active_record/migration/compatibility.rb#38 + # source://activerecord/lib/active_record/migration/compatibility.rb#43 def legacy_index_name(table_name, options); end end -# source://activerecord/lib/active_record/migration/compatibility.rb#65 +# source://activerecord/lib/active_record/migration/compatibility.rb#70 module ActiveRecord::Migration::Compatibility::V7_0::TableDefinition include ::ActiveRecord::Migration::Compatibility::V7_0::LegacyIndexName - # source://activerecord/lib/active_record/migration/compatibility.rb#73 + # source://activerecord/lib/active_record/migration/compatibility.rb#78 def change(name, type, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#68 + # source://activerecord/lib/active_record/migration/compatibility.rb#73 def column(name, type, **options); end - # source://activerecord/lib/active_record/migration/compatibility.rb#78 + # source://activerecord/lib/active_record/migration/compatibility.rb#83 def index(column_name, **options); end + # source://activerecord/lib/active_record/migration/compatibility.rb#88 + def references(*args, **options); end + private - # source://activerecord/lib/active_record/migration/compatibility.rb#84 + # source://activerecord/lib/active_record/migration/compatibility.rb#94 def raise_on_if_exist_options(options); end end +# source://activerecord/lib/active_record/migration/compatibility.rb#37 +class ActiveRecord::Migration::Compatibility::V7_1 < ::ActiveRecord::Migration::Compatibility::V7_2; end + +# source://activerecord/lib/active_record/migration/compatibility.rb#34 +class ActiveRecord::Migration::Compatibility::V7_2 < ::ActiveRecord::Migration::Current; end + # This file exists to ensure that old migrations run the same way they did before a Rails upgrade. # e.g. if you write a migration on Rails 6.1, then upgrade to Rails 7, the migration should do the same thing to your # database as it did when you were running Rails 6.1 @@ -24649,8 +25359,7 @@ end # New migration functionality that will never be backward compatible should be added directly to `ActiveRecord::Migration`. # # There are classes for each prior Rails version. Each class descends from the *next* Rails version, so: -# 7.0 < 7.1 -# 5.2 < 6.0 < 6.1 < 7.0 < 7.1 +# 5.2 < 6.0 < 6.1 < 7.0 < 7.1 < 7.2 < 8.0 # # If you are introducing new migration functionality that should only apply from Rails 7 onward, then you should # find the class that immediately precedes it (6.1), and override the relevant migration methods to undo your changes. @@ -24659,27 +25368,27 @@ end # class sets the value of `precision` to `nil` if it's not explicitly provided. This way, the default value will not apply # for migrations written for 5.2, but will for migrations written for 6.0. # -# source://activerecord/lib/active_record/migration/compatibility.rb#33 -ActiveRecord::Migration::Compatibility::V7_1 = ActiveRecord::Migration::Current +# source://activerecord/lib/active_record/migration/compatibility.rb#32 +ActiveRecord::Migration::Compatibility::V8_0 = ActiveRecord::Migration::Current # This must be defined before the inherited hook, below # -# source://activerecord/lib/active_record/migration.rb#563 +# source://activerecord/lib/active_record/migration.rb#580 class ActiveRecord::Migration::Current < ::ActiveRecord::Migration - # source://activerecord/lib/active_record/migration.rb#572 + # source://activerecord/lib/active_record/migration.rb#589 def change_table(table_name, **options); end - # source://activerecord/lib/active_record/migration.rb#596 + # source://activerecord/lib/active_record/migration.rb#613 def compatible_table_definition(t); end - # source://activerecord/lib/active_record/migration.rb#580 + # source://activerecord/lib/active_record/migration.rb#597 def create_join_table(table_1, table_2, **options); end - # source://activerecord/lib/active_record/migration.rb#564 + # source://activerecord/lib/active_record/migration.rb#581 def create_table(table_name, **options); end - # source://activerecord/lib/active_record/migration.rb#588 - def drop_table(table_name, **options); end + # source://activerecord/lib/active_record/migration.rb#605 + def drop_table(*table_names, **options); end end # The default strategy for executing migrations. Delegates method calls @@ -24689,16 +25398,16 @@ end class ActiveRecord::Migration::DefaultStrategy < ::ActiveRecord::Migration::ExecutionStrategy private - # source://activerecord/lib/active_record/migration/default_strategy.rb#18 + # source://activerecord/lib/active_record/migration/default_strategy.rb#17 def connection; end # source://activerecord/lib/active_record/migration/default_strategy.rb#9 - def method_missing(method, *arguments, **_arg2, &block); end + def method_missing(method, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # - # source://activerecord/lib/active_record/migration/default_strategy.rb#14 - def respond_to_missing?(method, *_arg1); end + # source://activerecord/lib/active_record/migration/default_strategy.rb#13 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end end # ExecutionStrategy is used by the migration to respond to any method calls @@ -24733,12 +25442,12 @@ module ActiveRecord::Migration::JoinTable def join_table_name(table_1, table_2); end end -# source://activerecord/lib/active_record/migration.rb#621 +# source://activerecord/lib/active_record/migration.rb#638 ActiveRecord::Migration::MigrationFilenameRegexp = T.let(T.unsafe(nil), Regexp) -# source://activerecord/lib/active_record/migration.rb#868 +# source://activerecord/lib/active_record/migration.rb#878 class ActiveRecord::Migration::ReversibleBlockHelper < ::Struct - # source://activerecord/lib/active_record/migration.rb#873 + # source://activerecord/lib/active_record/migration.rb#883 def down; end # Returns the value of attribute reverting @@ -24752,7 +25461,7 @@ class ActiveRecord::Migration::ReversibleBlockHelper < ::Struct # @return [Object] the newly set value def reverting=(_); end - # source://activerecord/lib/active_record/migration.rb#869 + # source://activerecord/lib/active_record/migration.rb#879 def up; end class << self @@ -24774,36 +25483,36 @@ end # a +SchemaMigration+ object per database. From the Rake tasks, \Rails will # handle this for you. # -# source://activerecord/lib/active_record/migration.rb#1202 +# source://activerecord/lib/active_record/migration.rb#1216 class ActiveRecord::MigrationContext # @return [MigrationContext] a new instance of MigrationContext # - # source://activerecord/lib/active_record/migration.rb#1205 + # source://activerecord/lib/active_record/migration.rb#1219 def initialize(migrations_paths, schema_migration = T.unsafe(nil), internal_metadata = T.unsafe(nil)); end - # source://activerecord/lib/active_record/migration.rb#1347 + # source://activerecord/lib/active_record/migration.rb#1345 def current_environment; end - # source://activerecord/lib/active_record/migration.rb#1303 + # source://activerecord/lib/active_record/migration.rb#1295 def current_version; end - # source://activerecord/lib/active_record/migration.rb#1277 + # source://activerecord/lib/active_record/migration.rb#1269 def down(target_version = T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/migration.rb#1263 + # source://activerecord/lib/active_record/migration.rb#1255 def forward(steps = T.unsafe(nil)); end - # source://activerecord/lib/active_record/migration.rb#1295 + # source://activerecord/lib/active_record/migration.rb#1287 def get_all_versions; end # Returns the value of attribute internal_metadata. # - # source://activerecord/lib/active_record/migration.rb#1203 + # source://activerecord/lib/active_record/migration.rb#1217 def internal_metadata; end # @raise [NoEnvironmentInSchemaError] # - # source://activerecord/lib/active_record/migration.rb#1355 + # source://activerecord/lib/active_record/migration.rb#1353 def last_stored_environment; end # Runs the migrations in the +migrations_path+. @@ -24820,90 +25529,103 @@ class ActiveRecord::MigrationContext # If none of the conditions are met, +up+ will be run with # the +target_version+. # - # source://activerecord/lib/active_record/migration.rb#1246 + # source://activerecord/lib/active_record/migration.rb#1238 def migrate(target_version = T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/migration.rb#1316 + # source://activerecord/lib/active_record/migration.rb#1308 def migrations; end # Returns the value of attribute migrations_paths. # - # source://activerecord/lib/active_record/migration.rb#1203 + # source://activerecord/lib/active_record/migration.rb#1217 def migrations_paths; end - # source://activerecord/lib/active_record/migration.rb#1329 + # source://activerecord/lib/active_record/migration.rb#1324 def migrations_status; end # @return [Boolean] # - # source://activerecord/lib/active_record/migration.rb#1308 + # source://activerecord/lib/active_record/migration.rb#1300 def needs_migration?; end - # source://activerecord/lib/active_record/migration.rb#1291 + # source://activerecord/lib/active_record/migration.rb#1283 def open; end - # source://activerecord/lib/active_record/migration.rb#1312 + # source://activerecord/lib/active_record/migration.rb#1304 def pending_migration_versions; end # @return [Boolean] # - # source://activerecord/lib/active_record/migration.rb#1351 + # source://activerecord/lib/active_record/migration.rb#1349 def protected_environment?; end - # source://activerecord/lib/active_record/migration.rb#1259 + # source://activerecord/lib/active_record/migration.rb#1251 def rollback(steps = T.unsafe(nil)); end - # source://activerecord/lib/active_record/migration.rb#1287 + # source://activerecord/lib/active_record/migration.rb#1279 def run(direction, target_version); end # Returns the value of attribute schema_migration. # - # source://activerecord/lib/active_record/migration.rb#1203 + # source://activerecord/lib/active_record/migration.rb#1217 def schema_migration; end - # source://activerecord/lib/active_record/migration.rb#1267 + # source://activerecord/lib/active_record/migration.rb#1259 def up(target_version = T.unsafe(nil), &block); end private - # source://activerecord/lib/active_record/migration.rb#1366 + # source://activerecord/lib/active_record/migration.rb#1365 def connection; end - # source://activerecord/lib/active_record/migration.rb#1370 + # source://activerecord/lib/active_record/migration.rb#1369 + def connection_pool; end + + # source://activerecord/lib/active_record/migration.rb#1373 def migration_files; end - # source://activerecord/lib/active_record/migration.rb#1379 + # source://activerecord/lib/active_record/migration.rb#1390 def move(direction, steps); end - # source://activerecord/lib/active_record/migration.rb#1375 + # source://activerecord/lib/active_record/migration.rb#1378 def parse_migration_filename(filename); end + + # @return [Boolean] + # + # source://activerecord/lib/active_record/migration.rb#1386 + def valid_migration_timestamp?(version); end + + # @return [Boolean] + # + # source://activerecord/lib/active_record/migration.rb#1382 + def validate_timestamp?; end end -# source://activerecord/lib/active_record/migration.rb#13 +# source://activerecord/lib/active_record/migration.rb#11 class ActiveRecord::MigrationError < ::ActiveRecord::ActiveRecordError # @return [MigrationError] a new instance of MigrationError # - # source://activerecord/lib/active_record/migration.rb#14 + # source://activerecord/lib/active_record/migration.rb#12 def initialize(message = T.unsafe(nil)); end end # MigrationProxy is used to defer loading of the actual migration classes # until they are needed # -# source://activerecord/lib/active_record/migration.rb#1168 +# source://activerecord/lib/active_record/migration.rb#1182 class ActiveRecord::MigrationProxy < ::Struct # @return [MigrationProxy] a new instance of MigrationProxy # - # source://activerecord/lib/active_record/migration.rb#1169 + # source://activerecord/lib/active_record/migration.rb#1183 def initialize(name, version, filename, scope); end - # source://activerecord/lib/active_record/migration.rb#1178 + # source://activerecord/lib/active_record/migration.rb#1192 def announce(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/migration.rb#1174 + # source://activerecord/lib/active_record/migration.rb#1188 def basename; end - # source://activerecord/lib/active_record/migration.rb#1178 + # source://activerecord/lib/active_record/migration.rb#1192 def disable_ddl_transaction(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute filename @@ -24917,7 +25639,7 @@ class ActiveRecord::MigrationProxy < ::Struct # @return [Object] the newly set value def filename=(_); end - # source://activerecord/lib/active_record/migration.rb#1178 + # source://activerecord/lib/active_record/migration.rb#1192 def migrate(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute name @@ -24953,15 +25675,15 @@ class ActiveRecord::MigrationProxy < ::Struct # @return [Object] the newly set value def version=(_); end - # source://activerecord/lib/active_record/migration.rb#1178 + # source://activerecord/lib/active_record/migration.rb#1192 def write(*_arg0, **_arg1, &_arg2); end private - # source://activerecord/lib/active_record/migration.rb#1185 + # source://activerecord/lib/active_record/migration.rb#1199 def load_migration; end - # source://activerecord/lib/active_record/migration.rb#1181 + # source://activerecord/lib/active_record/migration.rb#1195 def migration; end class << self @@ -24973,161 +25695,161 @@ class ActiveRecord::MigrationProxy < ::Struct end end -# source://activerecord/lib/active_record/migration.rb#1399 +# source://activerecord/lib/active_record/migration.rb#1410 class ActiveRecord::Migrator # @return [Migrator] a new instance of Migrator # - # source://activerecord/lib/active_record/migration.rb#1415 + # source://activerecord/lib/active_record/migration.rb#1426 def initialize(direction, migrations, schema_migration, internal_metadata, target_version = T.unsafe(nil)); end - # source://activerecord/lib/active_record/migration.rb#1433 + # source://activerecord/lib/active_record/migration.rb#1444 def current; end - # source://activerecord/lib/active_record/migration.rb#1433 + # source://activerecord/lib/active_record/migration.rb#1444 def current_migration; end - # source://activerecord/lib/active_record/migration.rb#1429 + # source://activerecord/lib/active_record/migration.rb#1440 def current_version; end - # source://activerecord/lib/active_record/migration.rb#1478 + # source://activerecord/lib/active_record/migration.rb#1489 def load_migrated; end - # source://activerecord/lib/active_record/migration.rb#1446 + # source://activerecord/lib/active_record/migration.rb#1457 def migrate; end - # source://activerecord/lib/active_record/migration.rb#1474 + # source://activerecord/lib/active_record/migration.rb#1485 def migrated; end - # source://activerecord/lib/active_record/migration.rb#1465 + # source://activerecord/lib/active_record/migration.rb#1476 def migrations; end - # source://activerecord/lib/active_record/migration.rb#1469 + # source://activerecord/lib/active_record/migration.rb#1480 def pending_migrations; end - # source://activerecord/lib/active_record/migration.rb#1438 + # source://activerecord/lib/active_record/migration.rb#1449 def run; end - # source://activerecord/lib/active_record/migration.rb#1454 + # source://activerecord/lib/active_record/migration.rb#1465 def runnable; end private - # source://activerecord/lib/active_record/migration.rb#1483 + # source://activerecord/lib/active_record/migration.rb#1494 def connection; end # Wrap the migration in a transaction only if supported by the adapter. # - # source://activerecord/lib/active_record/migration.rb#1578 + # source://activerecord/lib/active_record/migration.rb#1589 def ddl_transaction(migration, &block); end # @return [Boolean] # - # source://activerecord/lib/active_record/migration.rb#1573 + # source://activerecord/lib/active_record/migration.rb#1584 def down?; end - # source://activerecord/lib/active_record/migration.rb#1522 + # source://activerecord/lib/active_record/migration.rb#1533 def execute_migration_in_transaction(migration); end - # source://activerecord/lib/active_record/migration.rb#1543 + # source://activerecord/lib/active_record/migration.rb#1554 def finish; end - # source://activerecord/lib/active_record/migration.rb#1610 + # source://activerecord/lib/active_record/migration.rb#1621 def generate_migrator_advisory_lock_id; end # Return true if a valid version is not provided. # # @return [Boolean] # - # source://activerecord/lib/active_record/migration.rb#1518 + # source://activerecord/lib/active_record/migration.rb#1529 def invalid_target?; end # Used for running multiple migrations up to or down to a certain value. # - # source://activerecord/lib/active_record/migration.rb#1497 + # source://activerecord/lib/active_record/migration.rb#1508 def migrate_without_lock; end # @return [Boolean] # - # source://activerecord/lib/active_record/migration.rb#1513 + # source://activerecord/lib/active_record/migration.rb#1524 def ran?(migration); end # Stores the current environment in the database. # - # source://activerecord/lib/active_record/migration.rb#1507 + # source://activerecord/lib/active_record/migration.rb#1518 def record_environment; end - # source://activerecord/lib/active_record/migration.rb#1559 + # source://activerecord/lib/active_record/migration.rb#1570 def record_version_state_after_migrating(version); end # Used for running a specific migration. # # @raise [UnknownMigrationVersionError] # - # source://activerecord/lib/active_record/migration.rb#1488 + # source://activerecord/lib/active_record/migration.rb#1499 def run_without_lock; end - # source://activerecord/lib/active_record/migration.rb#1547 + # source://activerecord/lib/active_record/migration.rb#1558 def start; end - # source://activerecord/lib/active_record/migration.rb#1539 + # source://activerecord/lib/active_record/migration.rb#1550 def target; end # @return [Boolean] # - # source://activerecord/lib/active_record/migration.rb#1569 + # source://activerecord/lib/active_record/migration.rb#1580 def up?; end # @return [Boolean] # - # source://activerecord/lib/active_record/migration.rb#1590 + # source://activerecord/lib/active_record/migration.rb#1601 def use_advisory_lock?; end # @return [Boolean] # - # source://activerecord/lib/active_record/migration.rb#1586 + # source://activerecord/lib/active_record/migration.rb#1597 def use_transaction?(migration); end # @raise [DuplicateMigrationNameError] # - # source://activerecord/lib/active_record/migration.rb#1551 + # source://activerecord/lib/active_record/migration.rb#1562 def validate(migrations); end - # source://activerecord/lib/active_record/migration.rb#1594 + # source://activerecord/lib/active_record/migration.rb#1605 def with_advisory_lock; end class << self # For cases where a table doesn't exist like loading from schema cache # - # source://activerecord/lib/active_record/migration.rb#1404 + # source://activerecord/lib/active_record/migration.rb#1415 def current_version; end # Returns the value of attribute migrations_paths. # - # source://activerecord/lib/active_record/migration.rb#1401 + # source://activerecord/lib/active_record/migration.rb#1412 def migrations_paths; end # Sets the attribute migrations_paths # # @param value the value to set the attribute migrations_paths to. # - # source://activerecord/lib/active_record/migration.rb#1401 + # source://activerecord/lib/active_record/migration.rb#1412 def migrations_paths=(_arg0); end end end -# source://activerecord/lib/active_record/migration.rb#1609 +# source://activerecord/lib/active_record/migration.rb#1620 ActiveRecord::Migrator::MIGRATOR_SALT = T.let(T.unsafe(nil), Integer) # Raised when a foreign key constraint cannot be added because the column type does not match the referenced column type. # -# source://activerecord/lib/active_record/errors.rb#217 +# source://activerecord/lib/active_record/errors.rb#238 class ActiveRecord::MismatchedForeignKey < ::ActiveRecord::StatementInvalid # @return [MismatchedForeignKey] a new instance of MismatchedForeignKey # - # source://activerecord/lib/active_record/errors.rb#218 + # source://activerecord/lib/active_record/errors.rb#239 def initialize(message: T.unsafe(nil), sql: T.unsafe(nil), binds: T.unsafe(nil), table: T.unsafe(nil), foreign_key: T.unsafe(nil), target_table: T.unsafe(nil), primary_key: T.unsafe(nil), primary_key_column: T.unsafe(nil), query_parser: T.unsafe(nil), connection_pool: T.unsafe(nil)); end - # source://activerecord/lib/active_record/errors.rb#254 + # source://activerecord/lib/active_record/errors.rb#275 def set_query(sql, binds); end end @@ -25149,7 +25871,7 @@ module ActiveRecord::ModelSchema # music_artists, music_records => music_artists_records # music.artists, music.records => music.artists_records # - # source://activerecord/lib/active_record/model_schema.rb#191 + # source://activerecord/lib/active_record/model_schema.rb#196 def derive_join_table_name(first_table, second_table); end end @@ -25195,24 +25917,18 @@ module ActiveRecord::ModelSchema end end -# source://activerecord/lib/active_record/model_schema.rb#195 +# source://activerecord/lib/active_record/model_schema.rb#200 module ActiveRecord::ModelSchema::ClassMethods - # source://activerecord/lib/active_record/model_schema.rb#498 - def _default_attributes; end - - # source://activerecord/lib/active_record/model_schema.rb#434 - def _returning_columns_for_insert; end - - # source://activerecord/lib/active_record/model_schema.rb#440 - def attribute_types; end + # source://activerecord/lib/active_record/model_schema.rb#437 + def _returning_columns_for_insert(connection); end - # source://activerecord/lib/active_record/model_schema.rb#416 + # source://activerecord/lib/active_record/model_schema.rb#421 def attributes_builder; end # Returns a hash where the keys are column names and the values are # default values when instantiating the Active Record object for this table. # - # source://activerecord/lib/active_record/model_schema.rb#493 + # source://activerecord/lib/active_record/model_schema.rb#473 def column_defaults; end # Returns the column object for the named attribute. @@ -25229,36 +25945,36 @@ module ActiveRecord::ModelSchema::ClassMethods # person.column_for_attribute(:nothing) # # => #, ...> # - # source://activerecord/lib/active_record/model_schema.rb#484 + # source://activerecord/lib/active_record/model_schema.rb#464 def column_for_attribute(name); end # Returns an array of column names as strings. # - # source://activerecord/lib/active_record/model_schema.rb#504 + # source://activerecord/lib/active_record/model_schema.rb#479 def column_names; end - # source://activerecord/lib/active_record/model_schema.rb#429 + # source://activerecord/lib/active_record/model_schema.rb#433 def columns; end - # source://activerecord/lib/active_record/model_schema.rb#424 + # source://activerecord/lib/active_record/model_schema.rb#428 def columns_hash; end # Returns an array of column objects where the primary id, all columns ending in "_id" or "_count", # and columns used for single table inheritance have been removed. # - # source://activerecord/lib/active_record/model_schema.rb#515 + # source://activerecord/lib/active_record/model_schema.rb#490 def content_columns; end - # source://activerecord/lib/active_record/model_schema.rb#298 + # source://activerecord/lib/active_record/model_schema.rb#303 def full_table_name_prefix; end - # source://activerecord/lib/active_record/model_schema.rb#302 + # source://activerecord/lib/active_record/model_schema.rb#307 def full_table_name_suffix; end # The list of columns names the model should ignore. Ignored columns won't have attribute # accessors defined, and won't be referenced in SQL queries. # - # source://activerecord/lib/active_record/model_schema.rb#327 + # source://activerecord/lib/active_record/model_schema.rb#332 def ignored_columns; end # Sets the columns names the model should ignore. Ignored columns won't have attribute @@ -25293,16 +26009,19 @@ module ActiveRecord::ModelSchema::ClassMethods # user = Project.create!(name: "First Project") # user.category # => raises NoMethodError # - # source://activerecord/lib/active_record/model_schema.rb#362 + # source://activerecord/lib/active_record/model_schema.rb#367 def ignored_columns=(columns); end - # source://activerecord/lib/active_record/model_schema.rb#558 + # Load the model's schema information either from the schema cache + # or directly from the database. + # + # source://activerecord/lib/active_record/model_schema.rb#535 def load_schema; end # Returns the next value that will be used as the primary key on # an insert statement. # - # source://activerecord/lib/active_record/model_schema.rb#407 + # source://activerecord/lib/active_record/model_schema.rb#412 def next_sequence_value; end # Determines if the primary key values should be selected from their @@ -25310,26 +26029,26 @@ module ActiveRecord::ModelSchema::ClassMethods # # @return [Boolean] # - # source://activerecord/lib/active_record/model_schema.rb#401 + # source://activerecord/lib/active_record/model_schema.rb#406 def prefetch_primary_key?; end # The array of names of environments where destructive actions should be prohibited. By default, # the value is ["production"]. # - # source://activerecord/lib/active_record/model_schema.rb#308 + # source://activerecord/lib/active_record/model_schema.rb#313 def protected_environments; end # Sets an array of names of environments where destructive actions should be prohibited. # - # source://activerecord/lib/active_record/model_schema.rb#317 + # source://activerecord/lib/active_record/model_schema.rb#322 def protected_environments=(environments); end # Returns a quoted version of the table name, used to construct SQL statements. # - # source://activerecord/lib/active_record/model_schema.rb#281 + # source://activerecord/lib/active_record/model_schema.rb#286 def quoted_table_name; end - # source://activerecord/lib/active_record/model_schema.rb#321 + # source://activerecord/lib/active_record/model_schema.rb#326 def real_inheritance_column=(value); end # Resets all the cached information about columns, which will cause them @@ -25339,7 +26058,7 @@ module ActiveRecord::ModelSchema::ClassMethods # when just after creating a table you want to populate it with some default # values, e.g.: # - # class CreateJobLevels < ActiveRecord::Migration[7.1] + # class CreateJobLevels < ActiveRecord::Migration[8.0] # def up # create_table :job_levels do |t| # t.integer :id @@ -25359,18 +26078,18 @@ module ActiveRecord::ModelSchema::ClassMethods # end # end # - # source://activerecord/lib/active_record/model_schema.rb#549 + # source://activerecord/lib/active_record/model_schema.rb#524 def reset_column_information; end - # source://activerecord/lib/active_record/model_schema.rb#375 + # source://activerecord/lib/active_record/model_schema.rb#380 def reset_sequence_name; end # Computes the table name, (re)sets it internally, and returns it. # - # source://activerecord/lib/active_record/model_schema.rb#286 + # source://activerecord/lib/active_record/model_schema.rb#291 def reset_table_name; end - # source://activerecord/lib/active_record/model_schema.rb#367 + # source://activerecord/lib/active_record/model_schema.rb#372 def sequence_name; end # Sets the name of the sequence to use when generating ids to the given @@ -25388,17 +26107,17 @@ module ActiveRecord::ModelSchema::ClassMethods # self.sequence_name = "projectseq" # default would have been "project_seq" # end # - # source://activerecord/lib/active_record/model_schema.rb#394 + # source://activerecord/lib/active_record/model_schema.rb#399 def sequence_name=(value); end - # source://activerecord/lib/active_record/model_schema.rb#508 + # source://activerecord/lib/active_record/model_schema.rb#483 def symbol_column_to_string(name_symbol); end # Indicates whether the table associated with this class exists # # @return [Boolean] # - # source://activerecord/lib/active_record/model_schema.rb#412 + # source://activerecord/lib/active_record/model_schema.rb#417 def table_exists?; end # Guesses the table name (in forced lower-case) based on the name of the class in the @@ -25461,7 +26180,7 @@ module ActiveRecord::ModelSchema::ClassMethods # self.table_name = "mice" # end # - # source://activerecord/lib/active_record/model_schema.rb#255 + # source://activerecord/lib/active_record/model_schema.rb#260 def table_name; end # Sets the table name explicitly. Example: @@ -25470,59 +26189,44 @@ module ActiveRecord::ModelSchema::ClassMethods # self.table_name = "project" # end # - # source://activerecord/lib/active_record/model_schema.rb#265 + # source://activerecord/lib/active_record/model_schema.rb#270 def table_name=(value); end - # Returns the type of the attribute with the given name, after applying - # all modifiers. This method is the only valid source of information for - # anything related to the types of a model's attributes. This method will - # access the database and load the model's schema if it is required. - # - # The return value of this method will implement the interface described - # by ActiveModel::Type::Value (though the object itself may not subclass - # it). - # - # +attr_name+ The name of the attribute to retrieve the type for. Must be - # a string or a symbol. - # - # source://activerecord/lib/active_record/model_schema.rb#460 - def type_for_attribute(attr_name, &block); end - - # source://activerecord/lib/active_record/model_schema.rb#445 + # source://activerecord/lib/active_record/model_schema.rb#447 def yaml_encoder; end protected - # source://activerecord/lib/active_record/model_schema.rb#573 + # source://activerecord/lib/active_record/model_schema.rb#550 def initialize_load_schema_monitor; end - # source://activerecord/lib/active_record/model_schema.rb#577 + # source://activerecord/lib/active_record/model_schema.rb#554 def reload_schema_from_cache(recursive = T.unsafe(nil)); end private - # source://activerecord/lib/active_record/model_schema.rb#657 - def _convert_type_from_options(type); end - # Computes and returns a table name according to default conventions. # - # source://activerecord/lib/active_record/model_schema.rb#641 + # source://activerecord/lib/active_record/model_schema.rb#607 def compute_table_name; end - # source://activerecord/lib/active_record/model_schema.rb#600 + # source://activerecord/lib/active_record/model_schema.rb#575 def inherited(child_class); end - # source://activerecord/lib/active_record/model_schema.rb#613 + # source://activerecord/lib/active_record/model_schema.rb#588 def load_schema!; end # @return [Boolean] # - # source://activerecord/lib/active_record/model_schema.rb#609 + # source://activerecord/lib/active_record/model_schema.rb#584 def schema_loaded?; end + # source://activerecord/lib/active_record/model_schema.rb#623 + def type_for_column(connection, column); end + # Guesses the table name, but does not decorate it with prefix and suffix information. # - # source://activerecord/lib/active_record/model_schema.rb#635 + # source://activerecord/lib/active_record/model_schema.rb#601 def undecorated_table_name(model_name); end end @@ -25531,16 +26235,16 @@ end # method. The exception has an +errors+ property that contains an array of AttributeAssignmentError # objects, each corresponding to the error while assigning to an attribute. # -# source://activerecord/lib/active_record/errors.rb#436 +# source://activerecord/lib/active_record/errors.rb#463 class ActiveRecord::MultiparameterAssignmentErrors < ::ActiveRecord::ActiveRecordError # @return [MultiparameterAssignmentErrors] a new instance of MultiparameterAssignmentErrors # - # source://activerecord/lib/active_record/errors.rb#439 + # source://activerecord/lib/active_record/errors.rb#466 def initialize(errors = T.unsafe(nil)); end # Returns the value of attribute errors. # - # source://activerecord/lib/active_record/errors.rb#437 + # source://activerecord/lib/active_record/errors.rb#464 def errors; end end @@ -25565,7 +26269,7 @@ module ActiveRecord::NestedAttributes # @return [Boolean] # - # source://activerecord/lib/active_record/nested_attributes.rb#606 + # source://activerecord/lib/active_record/nested_attributes.rb#614 def allow_destroy?(association_name); end # Assigns the given attributes to the collection association. @@ -25596,7 +26300,7 @@ module ActiveRecord::NestedAttributes # { id: '2', _destroy: true } # ]) # - # source://activerecord/lib/active_record/nested_attributes.rb#482 + # source://activerecord/lib/active_record/nested_attributes.rb#487 def assign_nested_attributes_for_collection_association(association_name, attributes_collection); end # Assigns the given attributes to the association. @@ -25619,7 +26323,7 @@ module ActiveRecord::NestedAttributes # Updates a record with the +attributes+ or marks it for destruction if # +allow_destroy+ is +true+ and has_destroy_flag? returns +true+. # - # source://activerecord/lib/active_record/nested_attributes.rb#568 + # source://activerecord/lib/active_record/nested_attributes.rb#576 def assign_to_or_mark_for_destruction(record, attributes, allow_destroy); end # Determines if a record with the particular +attributes+ should be @@ -25628,7 +26332,7 @@ module ActiveRecord::NestedAttributes # # Returns false if there is a +destroy_flag+ on the attributes. # - # source://activerecord/lib/active_record/nested_attributes.rb#590 + # source://activerecord/lib/active_record/nested_attributes.rb#598 def call_reject_if(association_name, attributes); end # Takes in a limit and checks if the attributes_collection has too many @@ -25638,19 +26342,22 @@ module ActiveRecord::NestedAttributes # Raises TooManyRecords error if the attributes_collection is # larger than the limit. # - # source://activerecord/lib/active_record/nested_attributes.rb#548 + # source://activerecord/lib/active_record/nested_attributes.rb#556 def check_record_limit!(limit, attributes_collection); end + # source://activerecord/lib/active_record/nested_attributes.rb#624 + def find_record_by_id(klass, records, id); end + # Determines if a hash contains a truthy _destroy key. # # @return [Boolean] # - # source://activerecord/lib/active_record/nested_attributes.rb#574 + # source://activerecord/lib/active_record/nested_attributes.rb#582 def has_destroy_flag?(hash); end # @raise [RecordNotFound] # - # source://activerecord/lib/active_record/nested_attributes.rb#610 + # source://activerecord/lib/active_record/nested_attributes.rb#618 def raise_nested_attributes_record_not_found!(association_name, record_id); end # Determines if a new record should be rejected by checking @@ -25659,14 +26366,14 @@ module ActiveRecord::NestedAttributes # # @return [Boolean] # - # source://activerecord/lib/active_record/nested_attributes.rb#581 + # source://activerecord/lib/active_record/nested_attributes.rb#589 def reject_new_record?(association_name, attributes); end # Only take into account the destroy flag if :allow_destroy is true # # @return [Boolean] # - # source://activerecord/lib/active_record/nested_attributes.rb#602 + # source://activerecord/lib/active_record/nested_attributes.rb#610 def will_be_destroyed?(association_name, attributes); end module GeneratedClassMethods @@ -26050,45 +26757,45 @@ ActiveRecord::NestedAttributes::UNASSIGNABLE_KEYS = T.let(T.unsafe(nil), Array) # Raised when a given database does not exist. # -# source://activerecord/lib/active_record/errors.rb#307 +# source://activerecord/lib/active_record/errors.rb#328 class ActiveRecord::NoDatabaseError < ::ActiveRecord::StatementInvalid include ::ActiveSupport::ActionableError extend ::ActiveSupport::ActionableError::ClassMethods # @return [NoDatabaseError] a new instance of NoDatabaseError # - # source://activerecord/lib/active_record/errors.rb#314 + # source://activerecord/lib/active_record/errors.rb#335 def initialize(message = T.unsafe(nil), connection_pool: T.unsafe(nil)); end - # source://activesupport/7.1.3.3lib/active_support/actionable_error.rb#17 + # source://activesupport/8.0.0.beta1lib/active_support/actionable_error.rb#17 def _actions; end - # source://activesupport/7.1.3.3lib/active_support/actionable_error.rb#17 + # source://activesupport/8.0.0.beta1lib/active_support/actionable_error.rb#17 def _actions=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/actionable_error.rb#17 + # source://activesupport/8.0.0.beta1lib/active_support/actionable_error.rb#17 def _actions?; end class << self - # source://activesupport/7.1.3.3lib/active_support/actionable_error.rb#17 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _actions; end - # source://activesupport/7.1.3.3lib/active_support/actionable_error.rb#17 - def _actions=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _actions=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/actionable_error.rb#17 + # source://activesupport/8.0.0.beta1lib/active_support/actionable_error.rb#17 def _actions?; end - # source://activerecord/lib/active_record/errors.rb#319 + # source://activerecord/lib/active_record/errors.rb#340 def db_error(db_name); end end end -# source://activerecord/lib/active_record/migration.rb#184 +# source://activerecord/lib/active_record/migration.rb#197 class ActiveRecord::NoEnvironmentInSchemaError < ::ActiveRecord::MigrationError # @return [NoEnvironmentInSchemaError] a new instance of NoEnvironmentInSchemaError # - # source://activerecord/lib/active_record/migration.rb#185 + # source://activerecord/lib/active_record/migration.rb#198 def initialize; end end @@ -26181,7 +26888,7 @@ module ActiveRecord::Normalization private - # source://activerecord/lib/active_record/normalization.rb#114 + # source://activerecord/lib/active_record/normalization.rb#112 def normalize_changed_in_place_attributes; end module GeneratedClassMethods @@ -26210,7 +26917,7 @@ module ActiveRecord::Normalization::ClassMethods # User.normalize_value_for(:email, " CRUISE-CONTROL@EXAMPLE.COM\n") # # => "cruise-control@example.com" # - # source://activerecord/lib/active_record/normalization.rb#108 + # source://activerecord/lib/active_record/normalization.rb#106 def normalize_value_for(name, value); end # Declares a normalization for one or more attributes. The normalization @@ -26274,66 +26981,65 @@ module ActiveRecord::Normalization::ClassMethods def normalizes(*names, with:, apply_to_nil: T.unsafe(nil)); end end -# source://activerecord/lib/active_record/normalization.rb#120 +# source://activerecord/lib/active_record/normalization.rb#118 class ActiveRecord::Normalization::NormalizedValueType include ::ActiveModel::Type::SerializeCastValue extend ::ActiveModel::Type::SerializeCastValue::ClassMethods # @return [NormalizedValueType] a new instance of NormalizedValueType # - # source://activerecord/lib/active_record/normalization.rb#126 + # source://activerecord/lib/active_record/normalization.rb#124 def initialize(cast_type:, normalizer:, normalize_nil:); end - # source://activerecord/lib/active_record/normalization.rb#145 + # source://activerecord/lib/active_record/normalization.rb#143 def ==(other); end - # source://activerecord/lib/active_record/normalization.rb#133 + # source://activerecord/lib/active_record/normalization.rb#131 def cast(value); end # Returns the value of attribute cast_type. # - # source://activerecord/lib/active_record/normalization.rb#123 + # source://activerecord/lib/active_record/normalization.rb#121 def cast_type; end - # source://activerecord/lib/active_record/normalization.rb#145 + # source://activerecord/lib/active_record/normalization.rb#143 def eql?(other); end - # source://activerecord/lib/active_record/normalization.rb#153 + # source://activerecord/lib/active_record/normalization.rb#151 def hash; end - # source://activerecord/lib/active_record/normalization.rb#157 def inspect; end # Returns the value of attribute normalize_nil. # - # source://activerecord/lib/active_record/normalization.rb#123 + # source://activerecord/lib/active_record/normalization.rb#121 def normalize_nil; end # Returns the value of attribute normalize_nil. # - # source://activerecord/lib/active_record/normalization.rb#123 + # source://activerecord/lib/active_record/normalization.rb#121 def normalize_nil?; end # Returns the value of attribute normalizer. # - # source://activerecord/lib/active_record/normalization.rb#123 + # source://activerecord/lib/active_record/normalization.rb#121 def normalizer; end - # source://activerecord/lib/active_record/normalization.rb#137 + # source://activerecord/lib/active_record/normalization.rb#135 def serialize(value); end - # source://activerecord/lib/active_record/normalization.rb#141 + # source://activerecord/lib/active_record/normalization.rb#139 def serialize_cast_value(value); end private - # source://activerecord/lib/active_record/normalization.rb#162 + # source://activerecord/lib/active_record/normalization.rb#158 def normalize(value); end end # Raised when a record cannot be inserted or updated because it would violate a not null constraint. # -# source://activerecord/lib/active_record/errors.rb#272 +# source://activerecord/lib/active_record/errors.rb#293 class ActiveRecord::NotNullViolation < ::ActiveRecord::StatementInvalid; end # source://activerecord/lib/active_record/migration/pending_migration_connection.rb#4 @@ -26342,51 +27048,51 @@ class ActiveRecord::PendingMigrationConnection # source://activerecord/lib/active_record/migration/pending_migration_connection.rb#17 def current_preventing_writes; end - # source://activerecord/lib/active_record/migration/pending_migration_connection.rb#5 - def establish_temporary_connection(db_config, &block); end - # @return [Boolean] # # source://activerecord/lib/active_record/migration/pending_migration_connection.rb#13 def primary_class?; end + + # source://activerecord/lib/active_record/migration/pending_migration_connection.rb#5 + def with_temporary_pool(db_config, &block); end end end -# source://activerecord/lib/active_record/migration.rb#134 +# source://activerecord/lib/active_record/migration.rb#148 class ActiveRecord::PendingMigrationError < ::ActiveRecord::MigrationError include ::ActiveSupport::ActionableError extend ::ActiveSupport::ActionableError::ClassMethods # @return [PendingMigrationError] a new instance of PendingMigrationError # - # source://activerecord/lib/active_record/migration.rb#146 + # source://activerecord/lib/active_record/migration.rb#160 def initialize(message = T.unsafe(nil), pending_migrations: T.unsafe(nil)); end - # source://activesupport/7.1.3.3lib/active_support/actionable_error.rb#17 + # source://activesupport/8.0.0.beta1lib/active_support/actionable_error.rb#17 def _actions; end - # source://activesupport/7.1.3.3lib/active_support/actionable_error.rb#17 + # source://activesupport/8.0.0.beta1lib/active_support/actionable_error.rb#17 def _actions=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/actionable_error.rb#17 + # source://activesupport/8.0.0.beta1lib/active_support/actionable_error.rb#17 def _actions?; end private - # source://activerecord/lib/active_record/migration.rb#170 - def connection; end + # source://activerecord/lib/active_record/migration.rb#183 + def connection_pool; end - # source://activerecord/lib/active_record/migration.rb#156 + # source://activerecord/lib/active_record/migration.rb#169 def detailed_migration_message(pending_migrations); end class << self - # source://activesupport/7.1.3.3lib/active_support/actionable_error.rb#17 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _actions; end - # source://activesupport/7.1.3.3lib/active_support/actionable_error.rb#17 - def _actions=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _actions=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/actionable_error.rb#17 + # source://activesupport/8.0.0.beta1lib/active_support/actionable_error.rb#17 def _actions?; end end end @@ -26414,7 +27120,7 @@ module ActiveRecord::Persistence # # If you want to change the STI column as well, use #becomes! instead. # - # source://activerecord/lib/active_record/persistence.rb#814 + # source://activerecord/lib/active_record/persistence.rb#487 def becomes(klass); end # Wrapper around #becomes that also changes the instance's STI column value. @@ -26424,14 +27130,14 @@ module ActiveRecord::Persistence # Note: The old instance's STI column value will be changed too, as both objects # share the same set of attributes. # - # source://activerecord/lib/active_record/persistence.rb#835 + # source://activerecord/lib/active_record/persistence.rb#508 def becomes!(klass); end # Initializes +attribute+ to zero if +nil+ and subtracts the value passed as +by+ (default is 1). # The decrement is performed directly on the underlying attribute, no setter is invoked. # Only makes sense for number-based attributes. Returns +self+. # - # source://activerecord/lib/active_record/persistence.rb#982 + # source://activerecord/lib/active_record/persistence.rb#655 def decrement(attribute, by = T.unsafe(nil)); end # Wrapper around #decrement that writes the update to the database. @@ -26441,7 +27147,7 @@ module ActiveRecord::Persistence # +update_counters+, see that for more. # Returns +self+. # - # source://activerecord/lib/active_record/persistence.rb#992 + # source://activerecord/lib/active_record/persistence.rb#665 def decrement!(attribute, by = T.unsafe(nil), touch: T.unsafe(nil)); end # Deletes the record in the database and freezes this instance to @@ -26457,7 +27163,7 @@ module ActiveRecord::Persistence # callbacks or any :dependent association # options, use #destroy. # - # source://activerecord/lib/active_record/persistence.rb#766 + # source://activerecord/lib/active_record/persistence.rb#439 def delete; end # Deletes the record in the database and freezes this instance to reflect @@ -26468,7 +27174,7 @@ module ActiveRecord::Persistence # and #destroy returns +false+. # See ActiveRecord::Callbacks for further details. # - # source://activerecord/lib/active_record/persistence.rb#780 + # source://activerecord/lib/active_record/persistence.rb#453 def destroy; end # Deletes the record in the database and freezes this instance to reflect @@ -26479,21 +27185,21 @@ module ActiveRecord::Persistence # and #destroy! raises ActiveRecord::RecordNotDestroyed. # See ActiveRecord::Callbacks for further details. # - # source://activerecord/lib/active_record/persistence.rb#796 + # source://activerecord/lib/active_record/persistence.rb#469 def destroy!; end # Returns true if this object has been destroyed, otherwise returns false. # # @return [Boolean] # - # source://activerecord/lib/active_record/persistence.rb#682 + # source://activerecord/lib/active_record/persistence.rb#355 def destroyed?; end # Initializes +attribute+ to zero if +nil+ and adds the value passed as +by+ (default is 1). # The increment is performed directly on the underlying attribute, no setter is invoked. # Only makes sense for number-based attributes. Returns +self+. # - # source://activerecord/lib/active_record/persistence.rb#959 + # source://activerecord/lib/active_record/persistence.rb#632 def increment(attribute, by = T.unsafe(nil)); end # Wrapper around #increment that writes the update to the database. @@ -26503,7 +27209,7 @@ module ActiveRecord::Persistence # +update_counters+, see that for more. # Returns +self+. # - # source://activerecord/lib/active_record/persistence.rb#971 + # source://activerecord/lib/active_record/persistence.rb#644 def increment!(attribute, by = T.unsafe(nil), touch: T.unsafe(nil)); end # Returns true if this object hasn't been saved yet -- that is, a record @@ -26511,7 +27217,7 @@ module ActiveRecord::Persistence # # @return [Boolean] # - # source://activerecord/lib/active_record/persistence.rb#665 + # source://activerecord/lib/active_record/persistence.rb#338 def new_record?; end # Returns true if the record is persisted, i.e. it's not a new record and it was @@ -26519,7 +27225,7 @@ module ActiveRecord::Persistence # # @return [Boolean] # - # source://activerecord/lib/active_record/persistence.rb#688 + # source://activerecord/lib/active_record/persistence.rb#361 def persisted?; end # Returns true if this object was just created -- that is, prior to the last @@ -26528,14 +27234,14 @@ module ActiveRecord::Persistence # # @return [Boolean] # - # source://activerecord/lib/active_record/persistence.rb#672 + # source://activerecord/lib/active_record/persistence.rb#345 def previously_new_record?; end # Returns true if this object was previously persisted but now it has been deleted. # # @return [Boolean] # - # source://activerecord/lib/active_record/persistence.rb#677 + # source://activerecord/lib/active_record/persistence.rb#350 def previously_persisted?; end # Reloads the record from the database. @@ -26586,7 +27292,7 @@ module ActiveRecord::Persistence # end # end # - # source://activerecord/lib/active_record/persistence.rb#1069 + # source://activerecord/lib/active_record/persistence.rb#742 def reload(options = T.unsafe(nil)); end # :call-seq: @@ -26614,7 +27320,7 @@ module ActiveRecord::Persistence # Attributes marked as readonly are silently ignored if the record is # being updated. # - # source://activerecord/lib/active_record/persistence.rb#717 + # source://activerecord/lib/active_record/persistence.rb#390 def save(**options, &block); end # :call-seq: @@ -26644,7 +27350,7 @@ module ActiveRecord::Persistence # # Unless an error is raised, returns true. # - # source://activerecord/lib/active_record/persistence.rb#750 + # source://activerecord/lib/active_record/persistence.rb#423 def save!(**options, &block); end # Assigns to +attribute+ the boolean opposite of attribute?. So @@ -26659,7 +27365,7 @@ module ActiveRecord::Persistence # user.toggle(:banned) # user.banned? # => true # - # source://activerecord/lib/active_record/persistence.rb#1008 + # source://activerecord/lib/active_record/persistence.rb#681 def toggle(attribute); end # Wrapper around #toggle that saves the record. This method differs from @@ -26667,7 +27373,7 @@ module ActiveRecord::Persistence # Saving is not subjected to validation checks. Returns +true+ if the # record could be saved. # - # source://activerecord/lib/active_record/persistence.rb#1017 + # source://activerecord/lib/active_record/persistence.rb#690 def toggle!(attribute); end # Saves the record with the updated_at/on attributes set to the current time @@ -26704,20 +27410,20 @@ module ActiveRecord::Persistence # ball = Ball.new # ball.touch(:updated_at) # => raises ActiveRecordError # - # source://activerecord/lib/active_record/persistence.rb#1120 + # source://activerecord/lib/active_record/persistence.rb#793 def touch(*names, time: T.unsafe(nil)); end # Updates the attributes of the model from the passed-in hash and saves the # record, all wrapped in a transaction. If the object is invalid, the saving # will fail and false will be returned. # - # source://activerecord/lib/active_record/persistence.rb#890 + # source://activerecord/lib/active_record/persistence.rb#563 def update(attributes); end # Updates its receiver just like #update but calls #save! instead # of +save+, so an exception is raised if the record is invalid and saving will fail. # - # source://activerecord/lib/active_record/persistence.rb#901 + # source://activerecord/lib/active_record/persistence.rb#574 def update!(attributes); end # Updates a single attribute and saves the record. @@ -26733,7 +27439,7 @@ module ActiveRecord::Persistence # # Also see #update_column. # - # source://activerecord/lib/active_record/persistence.rb#857 + # source://activerecord/lib/active_record/persistence.rb#530 def update_attribute(name, value); end # Updates a single attribute and saves the record. @@ -26751,12 +27457,12 @@ module ActiveRecord::Persistence # and #update_attribute! raises ActiveRecord::RecordNotSaved. See # ActiveRecord::Callbacks for further details. # - # source://activerecord/lib/active_record/persistence.rb#879 + # source://activerecord/lib/active_record/persistence.rb#552 def update_attribute!(name, value); end # Equivalent to update_columns(name => value). # - # source://activerecord/lib/active_record/persistence.rb#911 + # source://activerecord/lib/active_record/persistence.rb#584 def update_column(name, value); end # Updates the attributes directly in the database issuing an UPDATE SQL @@ -26778,7 +27484,7 @@ module ActiveRecord::Persistence # # @raise [ActiveRecordError] # - # source://activerecord/lib/active_record/persistence.rb#931 + # source://activerecord/lib/active_record/persistence.rb#604 def update_columns(attributes); end private @@ -26789,35 +27495,35 @@ module ActiveRecord::Persistence # @yield [_self] # @yieldparam _self [ActiveRecord::Persistence] the object that the method was called on # - # source://activerecord/lib/active_record/persistence.rb#1247 + # source://activerecord/lib/active_record/persistence.rb#920 def _create_record(attribute_names = T.unsafe(nil)); end - # source://activerecord/lib/active_record/persistence.rb#1197 + # source://activerecord/lib/active_record/persistence.rb#870 def _delete_row; end - # source://activerecord/lib/active_record/persistence.rb#1153 + # source://activerecord/lib/active_record/persistence.rb#826 def _find_record(options); end - # source://activerecord/lib/active_record/persistence.rb#1164 + # source://activerecord/lib/active_record/persistence.rb#837 def _in_memory_query_constraints_hash; end - # source://activerecord/lib/active_record/persistence.rb#1179 + # source://activerecord/lib/active_record/persistence.rb#852 def _query_constraints_hash; end # @raise [ReadOnlyRecord] # - # source://activerecord/lib/active_record/persistence.rb#1281 + # source://activerecord/lib/active_record/persistence.rb#957 def _raise_readonly_record_error; end - # source://activerecord/lib/active_record/persistence.rb#1273 + # source://activerecord/lib/active_record/persistence.rb#949 def _raise_record_not_destroyed; end # @raise [ActiveRecordError] # - # source://activerecord/lib/active_record/persistence.rb#1285 + # source://activerecord/lib/active_record/persistence.rb#961 def _raise_record_not_touched_error; end - # source://activerecord/lib/active_record/persistence.rb#1201 + # source://activerecord/lib/active_record/persistence.rb#874 def _touch_row(attribute_names, time); end # Updates the associated record with values matching those of the instance attributes. @@ -26826,49 +27532,49 @@ module ActiveRecord::Persistence # @yield [_self] # @yieldparam _self [ActiveRecord::Persistence] the object that the method was called on # - # source://activerecord/lib/active_record/persistence.rb#1227 + # source://activerecord/lib/active_record/persistence.rb#900 def _update_record(attribute_names = T.unsafe(nil)); end - # source://activerecord/lib/active_record/persistence.rb#1211 + # source://activerecord/lib/active_record/persistence.rb#884 def _update_row(attribute_names, attempted_action = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord/lib/active_record/persistence.rb#1174 + # source://activerecord/lib/active_record/persistence.rb#847 def apply_scoping?(options); end - # source://activerecord/lib/active_record/persistence.rb#1218 + # source://activerecord/lib/active_record/persistence.rb#891 def create_or_update(**_arg0, &block); end # A hook to be overridden by association modules. # - # source://activerecord/lib/active_record/persistence.rb#1190 + # source://activerecord/lib/active_record/persistence.rb#863 def destroy_associations; end - # source://activerecord/lib/active_record/persistence.rb#1193 + # source://activerecord/lib/active_record/persistence.rb#866 def destroy_row; end - # source://activerecord/lib/active_record/persistence.rb#1141 + # source://activerecord/lib/active_record/persistence.rb#814 def init_internals; end - # source://activerecord/lib/active_record/persistence.rb#1147 + # source://activerecord/lib/active_record/persistence.rb#820 def strict_loaded_associations; end # @raise [ActiveRecordError] # - # source://activerecord/lib/active_record/persistence.rb#1269 + # source://activerecord/lib/active_record/persistence.rb#945 def verify_readonly_attribute(name); end end # source://activerecord/lib/active_record/persistence.rb#10 module ActiveRecord::Persistence::ClassMethods - # source://activerecord/lib/active_record/persistence.rb#611 + # source://activerecord/lib/active_record/persistence.rb#282 def _delete_record(constraints); end - # source://activerecord/lib/active_record/persistence.rb#569 - def _insert_record(values, returning); end + # source://activerecord/lib/active_record/persistence.rb#238 + def _insert_record(connection, values, returning); end - # source://activerecord/lib/active_record/persistence.rb#594 + # source://activerecord/lib/active_record/persistence.rb#263 def _update_record(values, constraints); end # Builds an object (or multiple objects) and returns either the built object or a list of built @@ -26901,7 +27607,7 @@ module ActiveRecord::Persistence::ClassMethods # names is derived from +query_constraints_list+ or +primary_key+. This method # is for internal use when the primary key is to be treated as an array. # - # source://activerecord/lib/active_record/persistence.rb#510 + # source://activerecord/lib/active_record/persistence.rb#234 def composite_query_constraints_list; end # Creates an object (or multiple objects) and saves it to the database, if validations pass. @@ -26941,212 +27647,11 @@ module ActiveRecord::Persistence::ClassMethods # source://activerecord/lib/active_record/persistence.rb#50 def create!(attributes = T.unsafe(nil), &block); end - # Deletes the row with a primary key matching the +id+ argument, using an - # SQL +DELETE+ statement, and returns the number of rows deleted. Active - # Record objects are not instantiated, so the object's callbacks are not - # executed, including any :dependent association options. - # - # You can delete multiple rows at once by passing an Array of ids. - # - # Note: Although it is often much faster than the alternative, #destroy, - # skipping callbacks might bypass business logic in your application - # that ensures referential integrity or performs other essential jobs. - # - # ==== Examples - # - # # Delete a single row - # Todo.delete(1) - # - # # Delete multiple rows - # Todo.delete([2,3,4]) - # - # source://activerecord/lib/active_record/persistence.rb#565 - def delete(id_or_array); end - - # Destroy an object (or multiple objects) that has the given id. The object is instantiated first, - # therefore all callbacks and filters are fired off before the object is deleted. This method is - # less efficient than #delete but allows cleanup methods and other actions to be run. - # - # This essentially finds the object (or multiple objects) with the given id, creates a new object - # from the attributes, and then calls destroy on it. - # - # ==== Parameters - # - # * +id+ - This should be the id or an array of ids to be destroyed. - # - # ==== Examples - # - # # Destroy a single object - # Todo.destroy(1) - # - # # Destroy multiple objects - # todos = [1,2,3] - # Todo.destroy(todos) - # - # source://activerecord/lib/active_record/persistence.rb#533 - def destroy(id); end - # @return [Boolean] # - # source://activerecord/lib/active_record/persistence.rb#495 + # source://activerecord/lib/active_record/persistence.rb#219 def has_query_constraints?; end - # Inserts a single record into the database in a single SQL INSERT - # statement. It does not instantiate any models nor does it trigger - # Active Record callbacks or validations. Though passed values - # go through Active Record's type casting and serialization. - # - # See #insert_all for documentation. - # - # source://activerecord/lib/active_record/persistence.rb#96 - def insert(attributes, returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end - - # Inserts a single record into the database in a single SQL INSERT - # statement. It does not instantiate any models nor does it trigger - # Active Record callbacks or validations. Though passed values - # go through Active Record's type casting and serialization. - # - # See #insert_all! for more. - # - # source://activerecord/lib/active_record/persistence.rb#185 - def insert!(attributes, returning: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end - - # Inserts multiple records into the database in a single SQL INSERT - # statement. It does not instantiate any models nor does it trigger - # Active Record callbacks or validations. Though passed values - # go through Active Record's type casting and serialization. - # - # The +attributes+ parameter is an Array of Hashes. Every Hash determines - # the attributes for a single row and must have the same keys. - # - # Rows are considered to be unique by every unique index on the table. Any - # duplicate rows are skipped. - # Override with :unique_by (see below). - # - # Returns an ActiveRecord::Result with its contents based on - # :returning (see below). - # - # ==== Options - # - # [:returning] - # (PostgreSQL and SQLite3 only) An array of attributes to return for all successfully - # inserted records, which by default is the primary key. - # Pass returning: %w[ id name ] for both id and name - # or returning: false to omit the underlying RETURNING SQL - # clause entirely. - # - # You can also pass an SQL string if you need more control on the return values - # (for example, returning: Arel.sql("id, name as new_name")). - # - # [:unique_by] - # (PostgreSQL and SQLite only) By default rows are considered to be unique - # by every unique index on the table. Any duplicate rows are skipped. - # - # To skip rows according to just one unique index pass :unique_by. - # - # Consider a Book model where no duplicate ISBNs make sense, but if any - # row has an existing id, or is not unique by another unique index, - # ActiveRecord::RecordNotUnique is raised. - # - # Unique indexes can be identified by columns or name: - # - # unique_by: :isbn - # unique_by: %i[ author_id name ] - # unique_by: :index_books_on_isbn - # - # [:record_timestamps] - # By default, automatic setting of timestamp columns is controlled by - # the model's record_timestamps config, matching typical - # behavior. - # - # To override this and force automatic setting of timestamp columns one - # way or the other, pass :record_timestamps: - # - # record_timestamps: true # Always set timestamps automatically - # record_timestamps: false # Never set timestamps automatically - # - # Because it relies on the index information from the database - # :unique_by is recommended to be paired with - # Active Record's schema_cache. - # - # ==== Example - # - # # Insert records and skip inserting any duplicates. - # # Here "Eloquent Ruby" is skipped because its id is not unique. - # - # Book.insert_all([ - # { id: 1, title: "Rework", author: "David" }, - # { id: 1, title: "Eloquent Ruby", author: "Russ" } - # ]) - # - # # insert_all works on chained scopes, and you can use create_with - # # to set default attributes for all inserted records. - # - # author.books.create_with(created_at: Time.now).insert_all([ - # { id: 1, title: "Rework" }, - # { id: 2, title: "Eloquent Ruby" } - # ]) - # - # source://activerecord/lib/active_record/persistence.rb#175 - def insert_all(attributes, returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end - - # Inserts multiple records into the database in a single SQL INSERT - # statement. It does not instantiate any models nor does it trigger - # Active Record callbacks or validations. Though passed values - # go through Active Record's type casting and serialization. - # - # The +attributes+ parameter is an Array of Hashes. Every Hash determines - # the attributes for a single row and must have the same keys. - # - # Raises ActiveRecord::RecordNotUnique if any rows violate a - # unique index on the table. In that case, no rows are inserted. - # - # To skip duplicate rows, see #insert_all. To replace them, see #upsert_all. - # - # Returns an ActiveRecord::Result with its contents based on - # :returning (see below). - # - # ==== Options - # - # [:returning] - # (PostgreSQL and SQLite3 only) An array of attributes to return for all successfully - # inserted records, which by default is the primary key. - # Pass returning: %w[ id name ] for both id and name - # or returning: false to omit the underlying RETURNING SQL - # clause entirely. - # - # You can also pass an SQL string if you need more control on the return values - # (for example, returning: Arel.sql("id, name as new_name")). - # - # [:record_timestamps] - # By default, automatic setting of timestamp columns is controlled by - # the model's record_timestamps config, matching typical - # behavior. - # - # To override this and force automatic setting of timestamp columns one - # way or the other, pass :record_timestamps: - # - # record_timestamps: true # Always set timestamps automatically - # record_timestamps: false # Never set timestamps automatically - # - # ==== Examples - # - # # Insert multiple records - # Book.insert_all!([ - # { title: "Rework", author: "David" }, - # { title: "Eloquent Ruby", author: "Russ" } - # ]) - # - # # Raises ActiveRecord::RecordNotUnique because "Eloquent Ruby" - # # does not have a unique id. - # Book.insert_all!([ - # { id: 1, title: "Rework", author: "David" }, - # { id: 1, title: "Eloquent Ruby", author: "Russ" } - # ]) - # - # source://activerecord/lib/active_record/persistence.rb#242 - def insert_all!(attributes, returning: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end - # Given an attributes hash, +instantiate+ returns a new instance of # the appropriate class. Accepts only keys as strings. # @@ -27158,11 +27663,11 @@ module ActiveRecord::Persistence::ClassMethods # See ActiveRecord::Inheritance#discriminate_class_for_record to see # how this "single-table" inheritance mapping is implemented. # - # source://activerecord/lib/active_record/persistence.rb#376 + # source://activerecord/lib/active_record/persistence.rb#100 def instantiate(attributes, column_types = T.unsafe(nil), &block); end # Accepts a list of attribute names to be used in the WHERE clause - # of SELECT / UPDATE / DELETE queries and in the ORDER BY clause for `#first` and `#last` finder methods. + # of SELECT / UPDATE / DELETE queries and in the ORDER BY clause for +#first+ and +#last+ finder methods. # # class Developer < ActiveRecord::Base # query_constraints :company_id, :id @@ -27175,7 +27680,7 @@ module ActiveRecord::Persistence::ClassMethods # developer.update!(name: "Nikita") # # UPDATE "developers" SET "name" = 'Nikita' WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 # - # It is possible to update attribute used in the query_by clause: + # # It is possible to update an attribute used in the query_constraints clause: # developer.update!(company_id: 2) # # UPDATE "developers" SET "company_id" = 2 WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 # @@ -27194,10 +27699,10 @@ module ActiveRecord::Persistence::ClassMethods # # @raise [ArgumentError] # - # source://activerecord/lib/active_record/persistence.rb#488 + # source://activerecord/lib/active_record/persistence.rb#212 def query_constraints(*columns_list); end - # source://activerecord/lib/active_record/persistence.rb#499 + # source://activerecord/lib/active_record/persistence.rb#223 def query_constraints_list; end # Updates an object (or multiple objects) and saves it to the database, if validations pass. @@ -27228,142 +27733,22 @@ module ActiveRecord::Persistence::ClassMethods # it is preferred to use {update_all}[rdoc-ref:Relation#update_all] # for updating all records in a single query. # - # source://activerecord/lib/active_record/persistence.rb#408 + # source://activerecord/lib/active_record/persistence.rb#132 def update(id = T.unsafe(nil), attributes); end # Updates the object (or multiple objects) just like #update but calls #update! instead # of +update+, so an exception is raised if the record is invalid and saving will fail. # - # source://activerecord/lib/active_record/persistence.rb#434 + # source://activerecord/lib/active_record/persistence.rb#158 def update!(id = T.unsafe(nil), attributes); end - # Updates or inserts (upserts) a single record into the database in a - # single SQL INSERT statement. It does not instantiate any models nor does - # it trigger Active Record callbacks or validations. Though passed values - # go through Active Record's type casting and serialization. - # - # See #upsert_all for documentation. - # - # source://activerecord/lib/active_record/persistence.rb#252 - def upsert(attributes, **kwargs); end - - # Updates or inserts (upserts) multiple records into the database in a - # single SQL INSERT statement. It does not instantiate any models nor does - # it trigger Active Record callbacks or validations. Though passed values - # go through Active Record's type casting and serialization. - # - # The +attributes+ parameter is an Array of Hashes. Every Hash determines - # the attributes for a single row and must have the same keys. - # - # Returns an ActiveRecord::Result with its contents based on - # :returning (see below). - # - # By default, +upsert_all+ will update all the columns that can be updated when - # there is a conflict. These are all the columns except primary keys, read-only - # columns, and columns covered by the optional +unique_by+. - # - # ==== Options - # - # [:returning] - # (PostgreSQL and SQLite3 only) An array of attributes to return for all successfully - # inserted records, which by default is the primary key. - # Pass returning: %w[ id name ] for both id and name - # or returning: false to omit the underlying RETURNING SQL - # clause entirely. - # - # You can also pass an SQL string if you need more control on the return values - # (for example, returning: Arel.sql("id, name as new_name")). - # - # [:unique_by] - # (PostgreSQL and SQLite only) By default rows are considered to be unique - # by every unique index on the table. Any duplicate rows are skipped. - # - # To skip rows according to just one unique index pass :unique_by. - # - # Consider a Book model where no duplicate ISBNs make sense, but if any - # row has an existing id, or is not unique by another unique index, - # ActiveRecord::RecordNotUnique is raised. - # - # Unique indexes can be identified by columns or name: - # - # unique_by: :isbn - # unique_by: %i[ author_id name ] - # unique_by: :index_books_on_isbn - # - # Because it relies on the index information from the database - # :unique_by is recommended to be paired with - # Active Record's schema_cache. - # - # [:on_duplicate] - # Configure the SQL update sentence that will be used in case of conflict. - # - # NOTE: If you use this option you must provide all the columns you want to update - # by yourself. - # - # Example: - # - # Commodity.upsert_all( - # [ - # { id: 2, name: "Copper", price: 4.84 }, - # { id: 4, name: "Gold", price: 1380.87 }, - # { id: 6, name: "Aluminium", price: 0.35 } - # ], - # on_duplicate: Arel.sql("price = GREATEST(commodities.price, EXCLUDED.price)") - # ) - # - # See the related +:update_only+ option. Both options can't be used at the same time. - # - # [:update_only] - # Provide a list of column names that will be updated in case of conflict. If not provided, - # +upsert_all+ will update all the columns that can be updated. These are all the columns - # except primary keys, read-only columns, and columns covered by the optional +unique_by+ - # - # Example: - # - # Commodity.upsert_all( - # [ - # { id: 2, name: "Copper", price: 4.84 }, - # { id: 4, name: "Gold", price: 1380.87 }, - # { id: 6, name: "Aluminium", price: 0.35 } - # ], - # update_only: [:price] # Only prices will be updated - # ) - # - # See the related +:on_duplicate+ option. Both options can't be used at the same time. - # - # [:record_timestamps] - # By default, automatic setting of timestamp columns is controlled by - # the model's record_timestamps config, matching typical - # behavior. - # - # To override this and force automatic setting of timestamp columns one - # way or the other, pass :record_timestamps: - # - # record_timestamps: true # Always set timestamps automatically - # record_timestamps: false # Never set timestamps automatically - # - # ==== Examples - # - # # Inserts multiple records, performing an upsert when records have duplicate ISBNs. - # # Here "Eloquent Ruby" overwrites "Rework" because its ISBN is duplicate. - # - # Book.upsert_all([ - # { title: "Rework", author: "David", isbn: "1" }, - # { title: "Eloquent Ruby", author: "Russ", isbn: "1" } - # ], unique_by: :isbn) - # - # Book.find_by(isbn: "1").title # => "Eloquent Ruby" - # - # source://activerecord/lib/active_record/persistence.rb#362 - def upsert_all(attributes, on_duplicate: T.unsafe(nil), update_only: T.unsafe(nil), returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end - private # Called by +_update_record+ and +_delete_record+ # to build `where` clause from default scopes. # Skips empty scopes. # - # source://activerecord/lib/active_record/persistence.rb#655 + # source://activerecord/lib/active_record/persistence.rb#328 def build_default_constraint; end # Called by +instantiate+ to decide which class to use for a new @@ -27372,16 +27757,16 @@ module ActiveRecord::Persistence::ClassMethods # See +ActiveRecord::Inheritance#discriminate_class_for_record+ for # the single-table inheritance discriminator. # - # source://activerecord/lib/active_record/persistence.rb#648 + # source://activerecord/lib/active_record/persistence.rb#321 def discriminate_class_for_record(record); end - # source://activerecord/lib/active_record/persistence.rb#628 + # source://activerecord/lib/active_record/persistence.rb#301 def inherited(subclass); end # Given a class, an attributes hash, +instantiate_instance_of+ returns a # new instance of the class. Accepts only keys as strings. # - # source://activerecord/lib/active_record/persistence.rb#638 + # source://activerecord/lib/active_record/persistence.rb#311 def instantiate_instance_of(klass, attributes, column_types = T.unsafe(nil), &block); end end @@ -27429,18 +27814,18 @@ class ActiveRecord::PredicateBuilder private - # source://activerecord/lib/active_record/relation/predicate_builder.rb#150 + # source://activerecord/lib/active_record/relation/predicate_builder.rb#155 def convert_dot_notation_to_hash(attributes); end - # source://activerecord/lib/active_record/relation/predicate_builder.rb#140 + # source://activerecord/lib/active_record/relation/predicate_builder.rb#145 def grouping_queries(queries); end - # source://activerecord/lib/active_record/relation/predicate_builder.rb#172 + # source://activerecord/lib/active_record/relation/predicate_builder.rb#177 def handler_for(object); end # Returns the value of attribute table. # - # source://activerecord/lib/active_record/relation/predicate_builder.rb#138 + # source://activerecord/lib/active_record/relation/predicate_builder.rb#143 def table; end class << self @@ -27641,7 +28026,7 @@ end # Raised when PostgreSQL returns 'cached plan must not change result type' and # we cannot retry gracefully (e.g. inside a transaction) # -# source://activerecord/lib/active_record/errors.rb#341 +# source://activerecord/lib/active_record/errors.rb#362 class ActiveRecord::PreparedStatementCacheExpired < ::ActiveRecord::StatementInvalid; end # Raised when the number of placeholders in an SQL fragment passed to @@ -27652,7 +28037,7 @@ class ActiveRecord::PreparedStatementCacheExpired < ::ActiveRecord::StatementInv # # Location.where("lat = ? AND lng = ?", 53.7362) # -# source://activerecord/lib/active_record/errors.rb#303 +# source://activerecord/lib/active_record/errors.rb#324 class ActiveRecord::PreparedStatementInvalid < ::ActiveRecord::ActiveRecordError; end # source://activerecord/lib/active_record/promise.rb#4 @@ -27729,17 +28114,17 @@ class ActiveRecord::Promise::Complete < ::ActiveRecord::Promise def status; end end -# source://activerecord/lib/active_record/migration.rb#195 +# source://activerecord/lib/active_record/migration.rb#208 class ActiveRecord::ProtectedEnvironmentError < ::ActiveRecord::ActiveRecordError # @return [ProtectedEnvironmentError] a new instance of ProtectedEnvironmentError # - # source://activerecord/lib/active_record/migration.rb#196 + # source://activerecord/lib/active_record/migration.rb#209 def initialize(env = T.unsafe(nil)); end end # Superclass for errors that have been aborted (either by client or server). # -# source://activerecord/lib/active_record/errors.rb#534 +# source://activerecord/lib/active_record/errors.rb#561 class ActiveRecord::QueryAborted < ::ActiveRecord::StatementInvalid; end # = Active Record Query Cache @@ -27747,13 +28132,13 @@ class ActiveRecord::QueryAborted < ::ActiveRecord::StatementInvalid; end # source://activerecord/lib/active_record/query_cache.rb#5 class ActiveRecord::QueryCache class << self - # source://activerecord/lib/active_record/query_cache.rb#32 + # source://activerecord/lib/active_record/query_cache.rb#41 def complete(pools); end - # source://activerecord/lib/active_record/query_cache.rb#40 + # source://activerecord/lib/active_record/query_cache.rb#52 def install_executor_hooks(executor = T.unsafe(nil)); end - # source://activerecord/lib/active_record/query_cache.rb#28 + # source://activerecord/lib/active_record/query_cache.rb#37 def run; end end end @@ -27769,13 +28154,16 @@ module ActiveRecord::QueryCache::ClassMethods # Disable the query cache within the block if Active Record is configured. # If it's not, it will execute the given block. # - # source://activerecord/lib/active_record/query_cache.rb#19 - def uncached(&block); end + # Set dirties: false to prevent query caches on all connections from being cleared by write operations. + # (By default, write operations dirty all connections' query caches in case they are replicas whose cache would now be outdated.) + # + # source://activerecord/lib/active_record/query_cache.rb#28 + def uncached(dirties: T.unsafe(nil), &block); end end # QueryCanceled will be raised when canceling statement due to user request. # -# source://activerecord/lib/active_record/errors.rb#546 +# source://activerecord/lib/active_record/errors.rb#573 class ActiveRecord::QueryCanceled < ::ActiveRecord::QueryAborted; end # = Active Record Query Logs @@ -27800,6 +28188,7 @@ class ActiveRecord::QueryCanceled < ::ActiveRecord::QueryAborted; end # * +socket+ # * +db_host+ # * +database+ +# * +source_location+ # # Action Controller adds default tags when loaded: # @@ -27848,121 +28237,143 @@ class ActiveRecord::QueryCanceled < ::ActiveRecord::QueryAborted; end # source://activerecord/lib/active_record/query_logs_formatter.rb#4 module ActiveRecord::QueryLogs class << self - # source://activerecord/lib/active_record/query_logs.rb#77 + # source://activerecord/lib/active_record/query_logs.rb#115 def cache_query_log_tags; end - # source://activerecord/lib/active_record/query_logs.rb#77 - def cache_query_log_tags=(val); end + # source://activerecord/lib/active_record/query_logs.rb#115 + def cache_query_log_tags=(_arg0); end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 def cached_comment; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 + # source://activesupport/8.0.0.beta1lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 def cached_comment=(obj); end - # source://activerecord/lib/active_record/query_logs.rb#82 + # source://activerecord/lib/active_record/query_logs.rb#139 def call(sql, connection); end - # source://activerecord/lib/active_record/query_logs.rb#94 + # source://activerecord/lib/active_record/query_logs.rb#151 def clear_cache; end - # source://activerecord/lib/active_record/query_logs.rb#76 + # source://activerecord/lib/active_record/query_logs.rb#115 def prepend_comment; end - # source://activerecord/lib/active_record/query_logs.rb#76 - def prepend_comment=(val); end + # source://activerecord/lib/active_record/query_logs.rb#115 + def prepend_comment=(_arg0); end + + # source://activerecord/lib/active_record/query_logs.rb#156 + def query_source_location; end - # source://activerecord/lib/active_record/query_logs.rb#74 + # source://activerecord/lib/active_record/query_logs.rb#114 def taggings; end - # source://activerecord/lib/active_record/query_logs.rb#74 - def taggings=(val); end + # source://activerecord/lib/active_record/query_logs.rb#117 + def taggings=(taggings); end - # source://activerecord/lib/active_record/query_logs.rb#75 + # source://activerecord/lib/active_record/query_logs.rb#114 def tags; end - # source://activerecord/lib/active_record/query_logs.rb#75 - def tags=(val); end + # source://activerecord/lib/active_record/query_logs.rb#122 + def tags=(tags); end - # source://activerecord/lib/active_record/query_logs.rb#78 + # source://activerecord/lib/active_record/query_logs.rb#114 def tags_formatter; end - # source://activerecord/lib/active_record/query_logs.rb#78 - def tags_formatter=(val); end - - # Updates the formatter to be what the passed in format is. - # - # source://activerecord/lib/active_record/query_logs.rb#99 - def update_formatter(format); end + # source://activerecord/lib/active_record/query_logs.rb#127 + def tags_formatter=(format); end private + # source://activerecord/lib/active_record/query_logs.rb#186 + def build_handler(name, handler = T.unsafe(nil)); end + # Returns an SQL comment +String+ containing the query log tags. # Sets and returns a cached comment if cache_query_log_tags is +true+. # - # source://activerecord/lib/active_record/query_logs.rb#116 + # source://activerecord/lib/active_record/query_logs.rb#203 def comment(connection); end - # source://activerecord/lib/active_record/query_logs.rb#136 + # source://activerecord/lib/active_record/query_logs.rb#219 def escape_sql_comment(content); end - # source://activerecord/lib/active_record/query_logs.rb#124 - def formatter; end + # source://activerecord/lib/active_record/query_logs.rb#172 + def rebuild_handlers; end - # source://activerecord/lib/active_record/query_logs.rb#149 + # source://activerecord/lib/active_record/query_logs.rb#232 def tag_content(connection); end - # source://activerecord/lib/active_record/query_logs.rb#128 + # source://activerecord/lib/active_record/query_logs.rb#211 def uncached_comment(connection); end end end -# source://activerecord/lib/active_record/query_logs_formatter.rb#5 -class ActiveRecord::QueryLogs::LegacyFormatter - # @return [LegacyFormatter] a new instance of LegacyFormatter +# source://activerecord/lib/active_record/query_logs.rb#75 +class ActiveRecord::QueryLogs::GetKeyHandler + # @return [GetKeyHandler] a new instance of GetKeyHandler # - # source://activerecord/lib/active_record/query_logs_formatter.rb#6 - def initialize; end + # source://activerecord/lib/active_record/query_logs.rb#76 + def initialize(name); end - # Formats the key value pairs into a string. + # source://activerecord/lib/active_record/query_logs.rb#80 + def call(context); end +end + +# source://activerecord/lib/active_record/query_logs.rb#85 +class ActiveRecord::QueryLogs::IdentityHandler + # @return [IdentityHandler] a new instance of IdentityHandler # - # source://activerecord/lib/active_record/query_logs_formatter.rb#11 - def format(pairs); end + # source://activerecord/lib/active_record/query_logs.rb#86 + def initialize(value); end - private + # source://activerecord/lib/active_record/query_logs.rb#90 + def call(_context); end +end - # source://activerecord/lib/active_record/query_logs_formatter.rb#20 - def format_value(value); end +# source://activerecord/lib/active_record/query_logs_formatter.rb#5 +module ActiveRecord::QueryLogs::LegacyFormatter + class << self + # Formats the key value pairs into a string. + # + # source://activerecord/lib/active_record/query_logs_formatter.rb#8 + def format(key, value); end - # Returns the value of attribute key_value_separator. - # - # source://activerecord/lib/active_record/query_logs_formatter.rb#18 - def key_value_separator; end + # source://activerecord/lib/active_record/query_logs_formatter.rb#12 + def join(pairs); end + end end -# source://activerecord/lib/active_record/query_logs_formatter.rb#25 -class ActiveRecord::QueryLogs::SQLCommenter < ::ActiveRecord::QueryLogs::LegacyFormatter - # @return [SQLCommenter] a new instance of SQLCommenter - # - # source://activerecord/lib/active_record/query_logs_formatter.rb#26 - def initialize; end +# source://activerecord/lib/active_record/query_logs_formatter.rb#18 +class ActiveRecord::QueryLogs::SQLCommenter + class << self + # source://activerecord/lib/active_record/query_logs_formatter.rb#20 + def format(key, value); end - # source://activerecord/lib/active_record/query_logs_formatter.rb#30 - def format(pairs); end + # source://activerecord/lib/active_record/query_logs_formatter.rb#24 + def join(pairs); end + end +end - private +# source://activerecord/lib/active_record/query_logs.rb#95 +class ActiveRecord::QueryLogs::ZeroArityHandler + # @return [ZeroArityHandler] a new instance of ZeroArityHandler + # + # source://activerecord/lib/active_record/query_logs.rb#96 + def initialize(proc); end - # source://activerecord/lib/active_record/query_logs_formatter.rb#36 - def format_value(value); end + # source://activerecord/lib/active_record/query_logs.rb#100 + def call(_context); end end # source://activerecord/lib/active_record/relation/query_methods.rb#9 module ActiveRecord::QueryMethods include ::ActiveModel::ForbiddenAttributesProtection - # source://activerecord/lib/active_record/relation/query_methods.rb#405 + # source://activerecord/lib/active_record/relation/query_methods.rb#428 def _select!(*fields); end + # source://activerecord/lib/active_record/relation/query_methods.rb#260 + def all; end + # Returns a new relation, which is the logical intersection of this relation and the one passed # as an argument. # @@ -27973,10 +28384,10 @@ module ActiveRecord::QueryMethods # Post.where(id: [1, 2]).and(Post.where(id: [2, 3])) # # SELECT `posts`.* FROM `posts` WHERE `posts`.`id` IN (1, 2) AND `posts`.`id` IN (2, 3) # - # source://activerecord/lib/active_record/relation/query_methods.rb#1034 + # source://activerecord/lib/active_record/relation/query_methods.rb#1133 def and(other); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1042 + # source://activerecord/lib/active_record/relation/query_methods.rb#1141 def and!(other); end # Adds an SQL comment to queries generated from this relation. For example: @@ -27991,26 +28402,26 @@ module ActiveRecord::QueryMethods # # Some escaping is performed, however untrusted user input should not be used. # - # source://activerecord/lib/active_record/relation/query_methods.rb#1428 + # source://activerecord/lib/active_record/relation/query_methods.rb#1527 def annotate(*args); end # Like #annotate, but modifies relation in place. # - # source://activerecord/lib/active_record/relation/query_methods.rb#1434 + # source://activerecord/lib/active_record/relation/query_methods.rb#1533 def annotate!(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def annotate_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def annotate_values=(value); end # Returns the Arel object associated with the relation. # - # source://activerecord/lib/active_record/relation/query_methods.rb#1489 + # source://activerecord/lib/active_record/relation/query_methods.rb#1592 def arel(aliases = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1493 + # source://activerecord/lib/active_record/relation/query_methods.rb#1596 def construct_join_dependency(associations, join_type); end # Sets attributes to be used when creating new records from a @@ -28027,16 +28438,16 @@ module ActiveRecord::QueryMethods # users = users.create_with(nil) # users.new.name # => 'Oscar' # - # source://activerecord/lib/active_record/relation/query_methods.rb#1245 + # source://activerecord/lib/active_record/relation/query_methods.rb#1344 def create_with(value); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1249 + # source://activerecord/lib/active_record/relation/query_methods.rb#1348 def create_with!(value); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def create_with_value; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def create_with_value=(value); end # Specifies whether the records should be unique or not. For example: @@ -28050,18 +28461,18 @@ module ActiveRecord::QueryMethods # User.select(:name).distinct.distinct(false) # # You can also remove the uniqueness # - # source://activerecord/lib/active_record/relation/query_methods.rb#1309 + # source://activerecord/lib/active_record/relation/query_methods.rb#1408 def distinct(value = T.unsafe(nil)); end # Like #distinct, but modifies relation in place. # - # source://activerecord/lib/active_record/relation/query_methods.rb#1314 + # source://activerecord/lib/active_record/relation/query_methods.rb#1413 def distinct!(value = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def distinct_value; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def distinct_value=(value); end # Specify associations +args+ to be eager loaded using a LEFT OUTER JOIN. @@ -28091,16 +28502,16 @@ module ActiveRecord::QueryMethods # NOTE: Loading the associations in a join can result in many rows that # contain redundant data and it performs poorly at scale. # - # source://activerecord/lib/active_record/relation/query_methods.rb#267 + # source://activerecord/lib/active_record/relation/query_methods.rb#290 def eager_load(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#272 + # source://activerecord/lib/active_record/relation/query_methods.rb#295 def eager_load!(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def eager_load_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def eager_load_values=(value); end # Excludes the specified record (or collection of records) from the resulting @@ -28112,6 +28523,9 @@ module ActiveRecord::QueryMethods # Post.excluding(post_one, post_two) # # SELECT "posts".* FROM "posts" WHERE "posts"."id" NOT IN (1, 2) # + # Post.excluding(Post.drafts) + # # SELECT "posts".* FROM "posts" WHERE "posts"."id" NOT IN (3, 4, 5) + # # This can also be called on associations. As with the above example, either # a single record of collection thereof may be specified: # @@ -28127,10 +28541,10 @@ module ActiveRecord::QueryMethods # is passed in) are not instances of the same model that the relation is # scoping. # - # source://activerecord/lib/active_record/relation/query_methods.rb#1470 + # source://activerecord/lib/active_record/relation/query_methods.rb#1572 def excluding(*records); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1482 + # source://activerecord/lib/active_record/relation/query_methods.rb#1585 def excluding!(records); end # Used to extend a scope with additional methods, either through @@ -28170,19 +28584,19 @@ module ActiveRecord::QueryMethods # end # end # - # source://activerecord/lib/active_record/relation/query_methods.rb#1355 + # source://activerecord/lib/active_record/relation/query_methods.rb#1454 def extending(*modules, &block); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1363 + # source://activerecord/lib/active_record/relation/query_methods.rb#1462 def extending!(*modules, &block); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def extending_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def extending_values=(value); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def extensions; end # Extracts a named +association+ from the relation. The named association is first preloaded, @@ -28195,7 +28609,7 @@ module ActiveRecord::QueryMethods # # account.memberships.preload(:user).collect(&:user) # - # source://activerecord/lib/active_record/relation/query_methods.rb#318 + # source://activerecord/lib/active_record/relation/query_methods.rb#341 def extract_associated(association); end # Specifies the table from which the records will be fetched. For example: @@ -28229,16 +28643,16 @@ module ActiveRecord::QueryMethods # # FROM colors c, JSONB_ARRAY_ELEMENTS(colored_things) AS colorvalues(colorvalue) # # WHERE (colorvalue->>'color' = 'red') # - # source://activerecord/lib/active_record/relation/query_methods.rb#1290 + # source://activerecord/lib/active_record/relation/query_methods.rb#1389 def from(value, subquery_name = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1294 + # source://activerecord/lib/active_record/relation/query_methods.rb#1393 def from!(value, subquery_name = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def from_clause; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def from_clause=(value); end # Allows to specify a group attribute: @@ -28262,16 +28676,16 @@ module ActiveRecord::QueryMethods # User.select([:id, :first_name]).group(:id, :first_name).first(3) # # => [#, #, #] # - # source://activerecord/lib/active_record/relation/query_methods.rb#512 + # source://activerecord/lib/active_record/relation/query_methods.rb#571 def group(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#517 + # source://activerecord/lib/active_record/relation/query_methods.rb#576 def group!(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def group_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def group_values=(value); end # Allows to specify a HAVING clause. Note that you can't use HAVING @@ -28279,19 +28693,20 @@ module ActiveRecord::QueryMethods # # Order.having('SUM(price) > 30').group('user_id') # - # source://activerecord/lib/active_record/relation/query_methods.rb#1096 + # source://activerecord/lib/active_record/relation/query_methods.rb#1195 def having(opts, *rest); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1100 + # source://activerecord/lib/active_record/relation/query_methods.rb#1199 def having!(opts, *rest); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def having_clause; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def having_clause=(value); end - # Allows to specify an order by a specific set of values. + # Applies an ORDER BY clause based on a given +column+, + # ordered and filtered by a specific set of +values+. # # User.in_order_of(:id, [1, 5, 3]) # # SELECT "users".* FROM "users" @@ -28302,8 +28717,44 @@ module ActiveRecord::QueryMethods # # WHEN "users"."id" = 3 THEN 3 # # END ASC # - # source://activerecord/lib/active_record/relation/query_methods.rb#620 - def in_order_of(column, values); end + # +column+ can point to an enum column; the actual query generated may be different depending + # on the database adapter and the column definition. + # + # class Conversation < ActiveRecord::Base + # enum :status, [ :active, :archived ] + # end + # + # Conversation.in_order_of(:status, [:archived, :active]) + # # SELECT "conversations".* FROM "conversations" + # # WHERE "conversations"."status" IN (1, 0) + # # ORDER BY CASE + # # WHEN "conversations"."status" = 1 THEN 1 + # # WHEN "conversations"."status" = 0 THEN 2 + # # END ASC + # + # +values+ can also include +nil+. + # + # Conversation.in_order_of(:status, [nil, :archived, :active]) + # # SELECT "conversations".* FROM "conversations" + # # WHERE ("conversations"."status" IN (1, 0) OR "conversations"."status" IS NULL) + # # ORDER BY CASE + # # WHEN "conversations"."status" IS NULL THEN 1 + # # WHEN "conversations"."status" = 1 THEN 2 + # # WHEN "conversations"."status" = 0 THEN 3 + # # END ASC + # + # +filter+ can be set to +false+ to include all results instead of only the ones specified in +values+. + # + # Conversation.in_order_of(:status, [:archived, :active], filter: false) + # # SELECT "conversations".* FROM "conversations" + # # ORDER BY CASE + # # WHEN "conversations"."status" = 1 THEN 1 + # # WHEN "conversations"."status" = 0 THEN 2 + # # ELSE 3 + # # END ASC + # + # source://activerecord/lib/active_record/relation/query_methods.rb#715 + def in_order_of(column, values, filter: T.unsafe(nil)); end # Specify associations +args+ to be eager loaded to prevent N + 1 queries. # A separate query is performed for each association, unless a join is @@ -28369,16 +28820,16 @@ module ActiveRecord::QueryMethods # and will only include posts named "example", even when a # matching user has other additional posts. # - # source://activerecord/lib/active_record/relation/query_methods.rb#231 + # source://activerecord/lib/active_record/relation/query_methods.rb#250 def includes(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#236 + # source://activerecord/lib/active_record/relation/query_methods.rb#255 def includes!(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def includes_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def includes_values=(value); end # Allows you to invert an entire where clause instead of manually applying conditions. @@ -28410,10 +28861,10 @@ module ActiveRecord::QueryMethods # User.where(role: 'admin').inactive # # WHERE NOT (`role` = 'admin' AND `accepted` = 1 AND `locked` = 0) # - # source://activerecord/lib/active_record/relation/query_methods.rb#1000 + # source://activerecord/lib/active_record/relation/query_methods.rb#1099 def invert_where; end - # source://activerecord/lib/active_record/relation/query_methods.rb#1004 + # source://activerecord/lib/active_record/relation/query_methods.rb#1103 def invert_where!; end # Performs JOINs on +args+. The given symbol(s) should match the name of @@ -28445,16 +28896,16 @@ module ActiveRecord::QueryMethods # User.joins("LEFT JOIN bookmarks ON bookmarks.bookmarkable_type = 'Post' AND bookmarks.user_id = users.id") # # SELECT "users".* FROM "users" LEFT JOIN bookmarks ON bookmarks.bookmarkable_type = 'Post' AND bookmarks.user_id = users.id # - # source://activerecord/lib/active_record/relation/query_methods.rb#767 + # source://activerecord/lib/active_record/relation/query_methods.rb#866 def joins(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#772 + # source://activerecord/lib/active_record/relation/query_methods.rb#871 def joins!(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def joins_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def joins_values=(value); end # Performs LEFT OUTER JOINs on +args+: @@ -28462,7 +28913,7 @@ module ActiveRecord::QueryMethods # User.left_outer_joins(:posts) # # SELECT "users".* FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id" # - # source://activerecord/lib/active_record/relation/query_methods.rb#782 + # source://activerecord/lib/active_record/relation/query_methods.rb#881 def left_joins(*args); end # Performs LEFT OUTER JOINs on +args+: @@ -28470,16 +28921,16 @@ module ActiveRecord::QueryMethods # User.left_outer_joins(:posts) # # SELECT "users".* FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id" # - # source://activerecord/lib/active_record/relation/query_methods.rb#782 + # source://activerecord/lib/active_record/relation/query_methods.rb#881 def left_outer_joins(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#788 + # source://activerecord/lib/active_record/relation/query_methods.rb#887 def left_outer_joins!(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def left_outer_joins_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def left_outer_joins_values=(value); end # Specifies a limit for the number of records to retrieve. @@ -28488,31 +28939,31 @@ module ActiveRecord::QueryMethods # # User.limit(10).limit(20) # generated SQL has 'LIMIT 20' # - # source://activerecord/lib/active_record/relation/query_methods.rb#1110 + # source://activerecord/lib/active_record/relation/query_methods.rb#1209 def limit(value); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1114 + # source://activerecord/lib/active_record/relation/query_methods.rb#1213 def limit!(value); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def limit_value; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def limit_value=(value); end # Specifies locking settings (default to +true+). For more information # on locking, please see ActiveRecord::Locking. # - # source://activerecord/lib/active_record/relation/query_methods.rb#1137 + # source://activerecord/lib/active_record/relation/query_methods.rb#1236 def lock(locks = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1141 + # source://activerecord/lib/active_record/relation/query_methods.rb#1240 def lock!(locks = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def lock_value; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def lock_value=(value); end # Returns a chainable relation with zero records. @@ -28543,15 +28994,15 @@ module ActiveRecord::QueryMethods # end # end # - # source://activerecord/lib/active_record/relation/query_methods.rb#1180 + # source://activerecord/lib/active_record/relation/query_methods.rb#1279 def none; end - # source://activerecord/lib/active_record/relation/query_methods.rb#1184 + # source://activerecord/lib/active_record/relation/query_methods.rb#1283 def none!; end # @return [Boolean] # - # source://activerecord/lib/active_record/relation/query_methods.rb#1192 + # source://activerecord/lib/active_record/relation/query_methods.rb#1291 def null_relation?; end # Specifies the number of rows to skip before returning rows. @@ -28562,16 +29013,16 @@ module ActiveRecord::QueryMethods # # User.offset(10).order("name ASC") # - # source://activerecord/lib/active_record/relation/query_methods.rb#1126 + # source://activerecord/lib/active_record/relation/query_methods.rb#1225 def offset(value); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1130 + # source://activerecord/lib/active_record/relation/query_methods.rb#1229 def offset!(value); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def offset_value; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def offset_value=(value); end # Specify optimizer hints to be used in the SELECT statement. @@ -28586,16 +29037,16 @@ module ActiveRecord::QueryMethods # Topic.optimizer_hints("SeqScan(topics)", "Parallel(topics 8)") # # SELECT /*+ SeqScan(topics) Parallel(topics 8) */ "topics".* FROM "topics" # - # source://activerecord/lib/active_record/relation/query_methods.rb#1384 + # source://activerecord/lib/active_record/relation/query_methods.rb#1483 def optimizer_hints(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1389 + # source://activerecord/lib/active_record/relation/query_methods.rb#1488 def optimizer_hints!(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def optimizer_hints_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def optimizer_hints_values=(value); end # Returns a new relation, which is the logical union of this relation and the one passed as an @@ -28608,10 +29059,10 @@ module ActiveRecord::QueryMethods # Post.where("id = 1").or(Post.where("author_id = 3")) # # SELECT `posts`.* FROM `posts` WHERE ((id = 1) OR (author_id = 3)) # - # source://activerecord/lib/active_record/relation/query_methods.rb#1066 + # source://activerecord/lib/active_record/relation/query_methods.rb#1165 def or(other); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1078 + # source://activerecord/lib/active_record/relation/query_methods.rb#1177 def or!(other); end # Applies an ORDER BY clause to a query. @@ -28667,18 +29118,18 @@ module ActiveRecord::QueryMethods # User.order(Arel.sql("payload->>'kind'")) # # SELECT "users".* FROM "users" ORDER BY payload->>'kind' # - # source://activerecord/lib/active_record/relation/query_methods.rb#595 + # source://activerecord/lib/active_record/relation/query_methods.rb#654 def order(*args); end # Same as #order but operates on relation in-place instead of copying. # - # source://activerecord/lib/active_record/relation/query_methods.rb#603 + # source://activerecord/lib/active_record/relation/query_methods.rb#662 def order!(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def order_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def order_values=(value); end # Specify associations +args+ to be eager loaded using separate queries. @@ -28704,16 +29155,16 @@ module ActiveRecord::QueryMethods # # SELECT "friends".* FROM "friends" WHERE "friends"."user_id" IN (1,2,3,4,5) # # SELECT ... # - # source://activerecord/lib/active_record/relation/query_methods.rb#299 + # source://activerecord/lib/active_record/relation/query_methods.rb#322 def preload(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#304 + # source://activerecord/lib/active_record/relation/query_methods.rb#327 def preload!(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def preload_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def preload_values=(value); end # Mark a relation as readonly. Attempting to update a record will result in @@ -28729,16 +29180,16 @@ module ActiveRecord::QueryMethods # users.first.save # => true # - # source://activerecord/lib/active_record/relation/query_methods.rb#1208 + # source://activerecord/lib/active_record/relation/query_methods.rb#1307 def readonly(value = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1212 + # source://activerecord/lib/active_record/relation/query_methods.rb#1311 def readonly!(value = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def readonly_value; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def readonly_value=(value); end # Use to indicate that the given +table_names+ are referenced by an SQL string, @@ -28752,16 +29203,16 @@ module ActiveRecord::QueryMethods # User.includes(:posts).where("posts.name = 'foo'").references(:posts) # # Query now knows the string references posts, so adds a JOIN # - # source://activerecord/lib/active_record/relation/query_methods.rb#332 + # source://activerecord/lib/active_record/relation/query_methods.rb#355 def references(*table_names); end - # source://activerecord/lib/active_record/relation/query_methods.rb#337 + # source://activerecord/lib/active_record/relation/query_methods.rb#360 def references!(*table_names); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def references_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def references_values=(value); end # Allows you to change a previously set group statement. @@ -28775,12 +29226,12 @@ module ActiveRecord::QueryMethods # This is short-hand for unscope(:group).group(fields). # Note that we're unscoping the entire group statement. # - # source://activerecord/lib/active_record/relation/query_methods.rb#532 + # source://activerecord/lib/active_record/relation/query_methods.rb#591 def regroup(*args); end # Same as #regroup but operates on relation in-place instead of copying. # - # source://activerecord/lib/active_record/relation/query_methods.rb#538 + # source://activerecord/lib/active_record/relation/query_methods.rb#597 def regroup!(*args); end # Replaces any existing order defined on the relation with the specified order. @@ -28793,18 +29244,18 @@ module ActiveRecord::QueryMethods # # generates a query with ORDER BY id ASC, name ASC. # - # source://activerecord/lib/active_record/relation/query_methods.rb#651 + # source://activerecord/lib/active_record/relation/query_methods.rb#750 def reorder(*args); end # Same as #reorder but operates on relation in-place instead of copying. # - # source://activerecord/lib/active_record/relation/query_methods.rb#659 + # source://activerecord/lib/active_record/relation/query_methods.rb#758 def reorder!(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def reordering_value; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def reordering_value=(value); end # Allows you to change a previously set select statement. @@ -28818,28 +29269,28 @@ module ActiveRecord::QueryMethods # This is short-hand for unscope(:select).select(fields). # Note that we're unscoping the entire select statement. # - # source://activerecord/lib/active_record/relation/query_methods.rb#480 + # source://activerecord/lib/active_record/relation/query_methods.rb#539 def reselect(*args); end # Same as #reselect but operates on relation in-place instead of copying. # - # source://activerecord/lib/active_record/relation/query_methods.rb#487 + # source://activerecord/lib/active_record/relation/query_methods.rb#546 def reselect!(*args); end # Reverse the existing order clause on the relation. # # User.order('name ASC').reverse_order # generated SQL has 'ORDER BY name DESC' # - # source://activerecord/lib/active_record/relation/query_methods.rb#1397 + # source://activerecord/lib/active_record/relation/query_methods.rb#1496 def reverse_order; end - # source://activerecord/lib/active_record/relation/query_methods.rb#1401 + # source://activerecord/lib/active_record/relation/query_methods.rb#1500 def reverse_order!; end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def reverse_order_value; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def reverse_order_value=(value); end # Allows you to change a previously set where condition for a given attribute, instead of appending to that condition. @@ -28856,7 +29307,7 @@ module ActiveRecord::QueryMethods # This is short-hand for unscope(where: conditions.keys).where(conditions). # Note that unlike reorder, we're only unscoping the named conditions -- not the entire where statement. # - # source://activerecord/lib/active_record/relation/query_methods.rb#960 + # source://activerecord/lib/active_record/relation/query_methods.rb#1059 def rewhere(conditions); end # Works in two unique ways. @@ -28908,25 +29359,25 @@ module ActiveRecord::QueryMethods # Model.select(:field).first.other_field # # => ActiveModel::MissingAttributeError: missing attribute 'other_field' for Model # - # source://activerecord/lib/active_record/relation/query_methods.rb#390 + # source://activerecord/lib/active_record/relation/query_methods.rb#413 def select(*fields); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def select_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def select_values=(value); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1412 + # source://activerecord/lib/active_record/relation/query_methods.rb#1511 def skip_preloading!; end - # source://activerecord/lib/active_record/relation/query_methods.rb#1407 + # source://activerecord/lib/active_record/relation/query_methods.rb#1506 def skip_query_cache!(value = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def skip_query_cache_value; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def skip_query_cache_value=(value); end # Sets the returned relation to strict_loading mode. This will raise an error @@ -28936,16 +29387,16 @@ module ActiveRecord::QueryMethods # user.comments.to_a # => ActiveRecord::StrictLoadingViolationError # - # source://activerecord/lib/active_record/relation/query_methods.rb#1223 + # source://activerecord/lib/active_record/relation/query_methods.rb#1322 def strict_loading(value = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1227 + # source://activerecord/lib/active_record/relation/query_methods.rb#1326 def strict_loading!(value = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def strict_loading_value; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def strict_loading_value=(value); end # Checks whether the given relation is structurally compatible with this relation, to determine @@ -28961,12 +29412,12 @@ module ActiveRecord::QueryMethods # # @return [Boolean] # - # source://activerecord/lib/active_record/relation/query_methods.rb#1020 + # source://activerecord/lib/active_record/relation/query_methods.rb#1119 def structurally_compatible?(other); end # Deduplicate multiple values. # - # source://activerecord/lib/active_record/relation/query_methods.rb#1440 + # source://activerecord/lib/active_record/relation/query_methods.rb#1539 def uniq!(name); end # Removes an unwanted relation that is already defined on a chain of relations. @@ -29002,16 +29453,16 @@ module ActiveRecord::QueryMethods # # has_many :comments, -> { unscope(where: :trashed) } # - # source://activerecord/lib/active_record/relation/query_methods.rb#705 + # source://activerecord/lib/active_record/relation/query_methods.rb#804 def unscope(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#710 + # source://activerecord/lib/active_record/relation/query_methods.rb#809 def unscope!(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def unscope_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def unscope_values=(value); end # Returns a new relation, which is the result of filtering the current relation @@ -29154,16 +29605,16 @@ module ActiveRecord::QueryMethods # If the condition is any blank-ish object, then #where is a no-op and returns # the current relation. # - # source://activerecord/lib/active_record/relation/query_methods.rb#932 + # source://activerecord/lib/active_record/relation/query_methods.rb#1031 def where(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#942 + # source://activerecord/lib/active_record/relation/query_methods.rb#1041 def where!(opts, *rest); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def where_clause; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def where_clause=(value); end # Add a Common Table Expression (CTE) that you can then reference within another SELECT statement. @@ -29178,6 +29629,17 @@ module ActiveRecord::QueryMethods # # ) # # SELECT * FROM posts # + # You can also pass an array of sub-queries to be joined in a +UNION ALL+. + # + # Post.with(posts_with_tags_or_comments: [Post.where("tags_count > ?", 0), Post.where("comments_count > ?", 0)]) + # # => ActiveRecord::Relation + # # WITH posts_with_tags_or_comments AS ( + # # (SELECT * FROM posts WHERE (tags_count > 0)) + # # UNION ALL + # # (SELECT * FROM posts WHERE (comments_count > 0)) + # # ) + # # SELECT * FROM posts + # # Once you define Common Table Expression you can use custom +FROM+ value or +JOIN+ to reference it. # # Post.with(posts_with_tags: Post.where("tags_count > ?", 0)).from("posts_with_tags AS posts") @@ -29216,18 +29678,41 @@ module ActiveRecord::QueryMethods # .with(posts_with_comments: Post.where("comments_count > ?", 0)) # .with(posts_with_tags: Post.where("tags_count > ?", 0)) # - # source://activerecord/lib/active_record/relation/query_methods.rb#459 + # @raise [ArgumentError] + # + # source://activerecord/lib/active_record/relation/query_methods.rb#493 def with(*args); end # Like #with, but modifies relation in place. # - # source://activerecord/lib/active_record/relation/query_methods.rb#465 + # source://activerecord/lib/active_record/relation/query_methods.rb#500 def with!(*args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # Add a recursive Common Table Expression (CTE) that you can then reference within another SELECT statement. + # + # Post.with_recursive(post_and_replies: [Post.where(id: 42), Post.joins('JOIN post_and_replies ON posts.in_reply_to_id = post_and_replies.id')]) + # # => ActiveRecord::Relation + # # WITH post_and_replies AS ( + # # (SELECT * FROM posts WHERE id = 42) + # # UNION ALL + # # (SELECT * FROM posts JOIN posts_and_replies ON posts.in_reply_to_id = posts_and_replies.id) + # # ) + # # SELECT * FROM posts + # + # See `#with` for more information. + # + # source://activerecord/lib/active_record/relation/query_methods.rb#517 + def with_recursive(*args); end + + # Like #with_recursive but modifies the relation in place. + # + # source://activerecord/lib/active_record/relation/query_methods.rb#523 + def with_recursive!(*args); end + + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def with_values; end - # source://activerecord/lib/active_record/relation/query_methods.rb#159 + # source://activerecord/lib/active_record/relation/query_methods.rb#178 def with_values=(value); end # Excludes the specified record (or collection of records) from the resulting @@ -29239,6 +29724,9 @@ module ActiveRecord::QueryMethods # Post.excluding(post_one, post_two) # # SELECT "posts".* FROM "posts" WHERE "posts"."id" NOT IN (1, 2) # + # Post.excluding(Post.drafts) + # # SELECT "posts".* FROM "posts" WHERE "posts"."id" NOT IN (3, 4, 5) + # # This can also be called on associations. As with the above example, either # a single record of collection thereof may be specified: # @@ -29254,73 +29742,85 @@ module ActiveRecord::QueryMethods # is passed in) are not instances of the same model that the relation is # scoping. # - # source://activerecord/lib/active_record/relation/query_methods.rb#1470 + # source://activerecord/lib/active_record/relation/query_methods.rb#1572 def without(*records); end protected - # source://activerecord/lib/active_record/relation/query_methods.rb#1539 + # source://activerecord/lib/active_record/relation/query_methods.rb#1654 def async!; end - # source://activerecord/lib/active_record/relation/query_methods.rb#1508 + # source://activerecord/lib/active_record/relation/query_methods.rb#1611 def build_having_clause(opts, rest = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1500 + # source://activerecord/lib/active_record/relation/query_methods.rb#1603 def build_subquery(subquery_alias, select_value); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1508 + # source://activerecord/lib/active_record/relation/query_methods.rb#1611 def build_where_clause(opts, rest = T.unsafe(nil)); end private - # source://activerecord/lib/active_record/relation/query_methods.rb#1792 + # source://activerecord/lib/active_record/relation/query_methods.rb#1951 def arel_column(field); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1775 + # source://activerecord/lib/active_record/relation/query_methods.rb#1932 def arel_columns(columns); end - # @raise [ImmutableRelation] + # source://activerecord/lib/active_record/relation/query_methods.rb#2192 + def arel_columns_from_hash(fields); end + + # @raise [UnmodifiableRelation] # - # source://activerecord/lib/active_record/relation/query_methods.rb#1573 - def assert_mutability!; end + # source://activerecord/lib/active_record/relation/query_methods.rb#1728 + def assert_modifiable!; end - # source://activerecord/lib/active_record/relation/query_methods.rb#1545 + # source://activerecord/lib/active_record/relation/query_methods.rb#1660 def async; end - # source://activerecord/lib/active_record/relation/query_methods.rb#1578 - def build_arel(aliases = T.unsafe(nil)); end + # source://activerecord/lib/active_record/relation/query_methods.rb#1732 + def build_arel(connection, aliases = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1936 - def build_case_for_value_position(column, values); end + # source://activerecord/lib/active_record/relation/query_methods.rb#1684 + def build_bound_sql_literal(statement, values); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1607 + # source://activerecord/lib/active_record/relation/query_methods.rb#2121 + def build_case_for_value_position(column, values, filter: T.unsafe(nil)); end + + # source://activerecord/lib/active_record/relation/query_methods.rb#1761 def build_cast_value(name, value); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1611 + # source://activerecord/lib/active_record/relation/query_methods.rb#1765 def build_from; end - # source://activerecord/lib/active_record/relation/query_methods.rb#1653 + # source://activerecord/lib/active_record/relation/query_methods.rb#1807 def build_join_buckets; end - # source://activerecord/lib/active_record/relation/query_methods.rb#1562 + # source://activerecord/lib/active_record/relation/query_methods.rb#1717 def build_join_dependencies; end - # source://activerecord/lib/active_record/relation/query_methods.rb#1709 + # source://activerecord/lib/active_record/relation/query_methods.rb#1863 def build_joins(join_sources, aliases = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1854 + # source://activerecord/lib/active_record/relation/query_methods.rb#1664 + def build_named_bound_sql_literal(statement, values); end + + # source://activerecord/lib/active_record/relation/query_methods.rb#2013 def build_order(arel); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1731 + # source://activerecord/lib/active_record/relation/query_methods.rb#1885 def build_select(arel); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1741 + # source://activerecord/lib/active_record/relation/query_methods.rb#1895 def build_with(arel); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1767 + # source://activerecord/lib/active_record/relation/query_methods.rb#1913 + def build_with_expression_from_value(value); end + + # source://activerecord/lib/active_record/relation/query_methods.rb#1924 def build_with_join_node(name, kind = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1753 + # source://activerecord/lib/active_record/relation/query_methods.rb#1907 def build_with_value_from_hash(hash); end # Checks to make sure that the arguments are not blank. Note that if some @@ -29340,88 +29840,91 @@ module ActiveRecord::QueryMethods # ... # end # - # source://activerecord/lib/active_record/relation/query_methods.rb#1985 + # source://activerecord/lib/active_record/relation/query_methods.rb#2171 def check_if_method_has_arguments!(method_name, args, message = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1911 + # source://activerecord/lib/active_record/relation/query_methods.rb#2082 def column_references(order_args); end # @return [Boolean] # - # source://activerecord/lib/active_record/relation/query_methods.rb#1843 + # source://activerecord/lib/active_record/relation/query_methods.rb#2002 def does_not_support_reverse?(order); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1556 + # source://activerecord/lib/active_record/relation/query_methods.rb#1711 def each_join_dependencies(join_dependencies = T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1549 + # source://activerecord/lib/active_record/relation/query_methods.rb#2107 + def extract_table_name_from(string); end + + # source://activerecord/lib/active_record/relation/query_methods.rb#2035 + def flattened_args(args); end + + # source://activerecord/lib/active_record/relation/query_methods.rb#1704 def lookup_table_klass_from_join_dependencies(table_name); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1926 + # source://activerecord/lib/active_record/relation/query_methods.rb#2111 def order_column(field); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1874 + # source://activerecord/lib/active_record/relation/query_methods.rb#2039 def preprocess_order_args(order_args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1996 + # source://activerecord/lib/active_record/relation/query_methods.rb#2182 def process_select_args(fields); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1945 + # source://activerecord/lib/active_record/relation/query_methods.rb#2131 def resolve_arel_attributes(attrs); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1814 + # source://activerecord/lib/active_record/relation/query_methods.rb#1973 def reverse_sql_order(order_query); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1905 + # source://activerecord/lib/active_record/relation/query_methods.rb#2076 def sanitize_order_arguments(order_args); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1638 + # source://activerecord/lib/active_record/relation/query_methods.rb#1792 def select_association_list(associations, stashed_joins = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation/query_methods.rb#1626 + # source://activerecord/lib/active_record/relation/query_methods.rb#1780 def select_named_joins(join_names, stashed_joins = T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/relation/query_methods.rb#2036 + # source://activerecord/lib/active_record/relation/query_methods.rb#2222 def structurally_incompatible_values_for(other); end # @return [Boolean] # - # source://activerecord/lib/active_record/relation/query_methods.rb#1808 + # source://activerecord/lib/active_record/relation/query_methods.rb#1967 def table_name_matches?(from); end - # source://activerecord/lib/active_record/relation/query_methods.rb#2006 - def transform_select_hash_values(fields); end - - # source://activerecord/lib/active_record/relation/query_methods.rb#1862 + # source://activerecord/lib/active_record/relation/query_methods.rb#2021 def validate_order_args(args); end end # A wrapper to distinguish CTE joins from other nodes. # -# source://activerecord/lib/active_record/relation/query_methods.rb#132 +# source://activerecord/lib/active_record/relation/query_methods.rb#151 class ActiveRecord::QueryMethods::CTEJoin # @return [CTEJoin] a new instance of CTEJoin # - # source://activerecord/lib/active_record/relation/query_methods.rb#135 + # source://activerecord/lib/active_record/relation/query_methods.rb#154 def initialize(name); end - # source://activerecord/lib/active_record/relation/query_methods.rb#133 + # source://activerecord/lib/active_record/relation/query_methods.rb#152 def name; end end -# source://activerecord/lib/active_record/relation/query_methods.rb#140 +# source://activerecord/lib/active_record/relation/query_methods.rb#159 ActiveRecord::QueryMethods::FROZEN_EMPTY_ARRAY = T.let(T.unsafe(nil), Array) -# source://activerecord/lib/active_record/relation/query_methods.rb#141 +# source://activerecord/lib/active_record/relation/query_methods.rb#160 ActiveRecord::QueryMethods::FROZEN_EMPTY_HASH = T.let(T.unsafe(nil), Hash) -# source://activerecord/lib/active_record/relation/query_methods.rb#2031 +# source://activerecord/lib/active_record/relation/query_methods.rb#2217 ActiveRecord::QueryMethods::STRUCTURAL_VALUE_METHODS = T.let(T.unsafe(nil), Array) -# source://activerecord/lib/active_record/relation/query_methods.rb#1859 +# source://activerecord/lib/active_record/relation/query_methods.rb#2018 ActiveRecord::QueryMethods::VALID_DIRECTIONS = T.let(T.unsafe(nil), Set) -# source://activerecord/lib/active_record/relation/query_methods.rb#667 +# source://activerecord/lib/active_record/relation/query_methods.rb#766 ActiveRecord::QueryMethods::VALID_UNSCOPING_VALUES = T.let(T.unsafe(nil), Set) # +WhereChain+ objects act as placeholder for queries in which +where+ does not have any parameter. @@ -29453,7 +29956,20 @@ class ActiveRecord::QueryMethods::WhereChain # # INNER JOIN "comments" ON "comments"."post_id" = "posts"."id" # # WHERE "authors"."id" IS NOT NULL AND "comments"."id" IS NOT NULL # - # source://activerecord/lib/active_record/relation/query_methods.rb#75 + # You can define join type in the scope and +associated+ will not use `JOIN` by default. + # + # Post.left_joins(:author).where.associated(:author) + # # SELECT "posts".* FROM "posts" + # # LEFT OUTER JOIN "authors" "authors"."id" = "posts"."author_id" + # # WHERE "authors"."id" IS NOT NULL + # + # Post.left_joins(:comments).where.associated(:author) + # # SELECT "posts".* FROM "posts" + # # INNER JOIN "authors" ON "authors"."id" = "posts"."author_id" + # # LEFT OUTER JOIN "comments" ON "comments"."post_id" = "posts"."id" + # # WHERE "author"."id" IS NOT NULL + # + # source://activerecord/lib/active_record/relation/query_methods.rb#88 def associated(*associations); end # Returns a new relation with left outer joins and where clause to identify @@ -29475,7 +29991,7 @@ class ActiveRecord::QueryMethods::WhereChain # # LEFT OUTER JOIN "comments" ON "comments"."post_id" = "posts"."id" # # WHERE "authors"."id" IS NULL AND "comments"."id" IS NULL # - # source://activerecord/lib/active_record/relation/query_methods.rb#107 + # source://activerecord/lib/active_record/relation/query_methods.rb#124 def missing(*associations); end # Returns a new relation expressing WHERE + NOT condition according to @@ -29514,68 +30030,68 @@ class ActiveRecord::QueryMethods::WhereChain private - # source://activerecord/lib/active_record/relation/query_methods.rb#122 + # source://activerecord/lib/active_record/relation/query_methods.rb#140 def scope_association_reflection(association); end end # source://activerecord/lib/active_record/querying.rb#4 module ActiveRecord::Querying - # source://activerecord/lib/active_record/querying.rb#65 + # source://activerecord/lib/active_record/querying.rb#71 def _load_from_sql(result_set, &block); end - # source://activerecord/lib/active_record/querying.rb#61 - def _query_by_sql(sql, binds = T.unsafe(nil), preparable: T.unsafe(nil), async: T.unsafe(nil)); end + # source://activerecord/lib/active_record/querying.rb#67 + def _query_by_sql(connection, sql, binds = T.unsafe(nil), preparable: T.unsafe(nil), async: T.unsafe(nil), allow_retry: T.unsafe(nil)); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def and(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def annotate(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def any?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def async_average(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def async_count(*_arg0, **_arg1, &_arg2); end # Same as #count_by_sql but perform the query asynchronously and returns an ActiveRecord::Promise. # - # source://activerecord/lib/active_record/querying.rb#106 + # source://activerecord/lib/active_record/querying.rb#116 def async_count_by_sql(sql); end # Same as #find_by_sql but perform the query asynchronously and returns an ActiveRecord::Promise. # - # source://activerecord/lib/active_record/querying.rb#55 - def async_find_by_sql(sql, binds = T.unsafe(nil), preparable: T.unsafe(nil), &block); end + # source://activerecord/lib/active_record/querying.rb#59 + def async_find_by_sql(sql, binds = T.unsafe(nil), preparable: T.unsafe(nil), allow_retry: T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def async_ids(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def async_maximum(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def async_minimum(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def async_pick(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def async_pluck(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def async_sum(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def average(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def calculate(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def count(*_arg0, **_arg1, &_arg2); end # Returns the result of an SQL statement that should only include a COUNT(*) in the SELECT part. @@ -29591,64 +30107,70 @@ module ActiveRecord::Querying # # * +sql+ - An SQL statement which should return a count query from the database, see the example above. # - # source://activerecord/lib/active_record/querying.rb#101 + # source://activerecord/lib/active_record/querying.rb#109 def count_by_sql(sql); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def create_or_find_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def create_or_find_by!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def create_with(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 + def delete(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/querying.rb#24 def delete_all(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def delete_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 + def destroy(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/querying.rb#24 def destroy_all(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def destroy_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def distinct(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def eager_load(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def except(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def excluding(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def exists?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def extending(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def extract_associated(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def fifth(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def fifth!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def find(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def find_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def find_by!(*_arg0, **_arg1, &_arg2); end # Executes a custom SQL query against your database and returns all the results. The results will @@ -29677,220 +30199,241 @@ module ActiveRecord::Querying # Note that building your own SQL query string from user input may expose your application to # injection attacks (https://guides.rubyonrails.org/security.html#sql-injection). # - # source://activerecord/lib/active_record/querying.rb#50 - def find_by_sql(sql, binds = T.unsafe(nil), preparable: T.unsafe(nil), &block); end + # source://activerecord/lib/active_record/querying.rb#51 + def find_by_sql(sql, binds = T.unsafe(nil), preparable: T.unsafe(nil), allow_retry: T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def find_each(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def find_in_batches(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def find_or_create_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def find_or_create_by!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def find_or_initialize_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def find_sole_by(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def first(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def first!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def first_or_create(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def first_or_create!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def first_or_initialize(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def forty_two(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def forty_two!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def fourth(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def fourth!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def from(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def group(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def having(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def ids(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def in_batches(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def in_order_of(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def includes(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 + def insert(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/querying.rb#24 + def insert!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/querying.rb#24 + def insert_all(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/querying.rb#24 + def insert_all!(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/querying.rb#24 def invert_where(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def joins(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def last(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def last!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def left_joins(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def left_outer_joins(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def limit(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def lock(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def many?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def maximum(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def merge(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def minimum(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def none(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def none?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def offset(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def one?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def only(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def optimizer_hints(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def or(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def order(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def pick(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def pluck(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def preload(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def readonly(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def references(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def regroup(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def reorder(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def reselect(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def rewhere(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def second(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def second!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def second_to_last(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def second_to_last!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def select(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def sole(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def strict_loading(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def sum(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def take(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def take!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def third(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def third!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def third_to_last(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def third_to_last!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def touch_all(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def unscope(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def update_all(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 + def upsert(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/querying.rb#24 + def upsert_all(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/querying.rb#24 def where(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 def with(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/querying.rb#23 + # source://activerecord/lib/active_record/querying.rb#24 + def with_recursive(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/querying.rb#24 def without(*_arg0, **_arg1, &_arg2); end end @@ -29902,22 +30445,19 @@ ActiveRecord::Querying::QUERYING_METHODS = T.let(T.unsafe(nil), Array) # source://activerecord/lib/active_record/railtie.rb#16 class ActiveRecord::Railtie < ::Rails::Railtie; end -# source://activerecord/lib/active_record/railtie.rb#230 -ActiveRecord::Railtie::SQLITE3_PRODUCTION_WARN = T.let(T.unsafe(nil), String) - # Raised when values that executed are out of range. # -# source://activerecord/lib/active_record/errors.rb#280 +# source://activerecord/lib/active_record/errors.rb#301 class ActiveRecord::RangeError < ::ActiveRecord::StatementInvalid; end # Raised when a write to the database is attempted on a read only connection. # -# source://activerecord/lib/active_record/errors.rb#123 +# source://activerecord/lib/active_record/errors.rb#132 class ActiveRecord::ReadOnlyError < ::ActiveRecord::ActiveRecordError; end # Raised on attempt to update record that is instantiated as read only. # -# source://activerecord/lib/active_record/errors.rb#373 +# source://activerecord/lib/active_record/errors.rb#394 class ActiveRecord::ReadOnlyRecord < ::ActiveRecord::ActiveRecordError; end # source://activerecord/lib/active_record/readonly_attributes.rb#4 @@ -30007,73 +30547,86 @@ class ActiveRecord::RecordInvalid < ::ActiveRecord::ActiveRecordError end # Raised by {ActiveRecord::Base#destroy!}[rdoc-ref:Persistence#destroy!] -# when a call to {#destroy}[rdoc-ref:Persistence#destroy] -# would return false. +# when a record cannot be destroyed due to any of the +# before_destroy callbacks throwing +:abort+. See +# ActiveRecord::Callbacks for further details. # -# begin -# complex_operation_that_internally_calls_destroy! -# rescue ActiveRecord::RecordNotDestroyed => invalid -# puts invalid.record.errors +# class User < ActiveRecord::Base +# before_destroy do +# throw :abort if still_active? +# end # end # -# source://activerecord/lib/active_record/errors.rb#161 +# User.first.destroy! # => raises an ActiveRecord::RecordNotDestroyed +# +# source://activerecord/lib/active_record/errors.rb#182 class ActiveRecord::RecordNotDestroyed < ::ActiveRecord::ActiveRecordError # @return [RecordNotDestroyed] a new instance of RecordNotDestroyed # - # source://activerecord/lib/active_record/errors.rb#164 + # source://activerecord/lib/active_record/errors.rb#185 def initialize(message = T.unsafe(nil), record = T.unsafe(nil)); end # Returns the value of attribute record. # - # source://activerecord/lib/active_record/errors.rb#162 + # source://activerecord/lib/active_record/errors.rb#183 def record; end end # Raised when Active Record cannot find a record by given id or set of ids. # -# source://activerecord/lib/active_record/errors.rb#127 +# source://activerecord/lib/active_record/errors.rb#136 class ActiveRecord::RecordNotFound < ::ActiveRecord::ActiveRecordError # @return [RecordNotFound] a new instance of RecordNotFound # - # source://activerecord/lib/active_record/errors.rb#130 + # source://activerecord/lib/active_record/errors.rb#139 def initialize(message = T.unsafe(nil), model = T.unsafe(nil), primary_key = T.unsafe(nil), id = T.unsafe(nil)); end # Returns the value of attribute id. # - # source://activerecord/lib/active_record/errors.rb#128 + # source://activerecord/lib/active_record/errors.rb#137 def id; end # Returns the value of attribute model. # - # source://activerecord/lib/active_record/errors.rb#128 + # source://activerecord/lib/active_record/errors.rb#137 def model; end # Returns the value of attribute primary_key. # - # source://activerecord/lib/active_record/errors.rb#128 + # source://activerecord/lib/active_record/errors.rb#137 def primary_key; end end # Raised by {ActiveRecord::Base#save!}[rdoc-ref:Persistence#save!] and -# {ActiveRecord::Base.create!}[rdoc-ref:Persistence::ClassMethods#create!] -# methods when a record is invalid and cannot be saved. +# {ActiveRecord::Base.update_attribute!}[rdoc-ref:Persistence#update_attribute!] +# methods when a record failed to validate or cannot be saved due to any of the +# before_* callbacks throwing +:abort+. See +# ActiveRecord::Callbacks for further details. +# +# class Product < ActiveRecord::Base +# before_save do +# throw :abort if price < 0 +# end +# end # -# source://activerecord/lib/active_record/errors.rb#142 +# Product.create! # => raises an ActiveRecord::RecordNotSaved +# +# source://activerecord/lib/active_record/errors.rb#161 class ActiveRecord::RecordNotSaved < ::ActiveRecord::ActiveRecordError # @return [RecordNotSaved] a new instance of RecordNotSaved # - # source://activerecord/lib/active_record/errors.rb#145 + # source://activerecord/lib/active_record/errors.rb#164 def initialize(message = T.unsafe(nil), record = T.unsafe(nil)); end # Returns the value of attribute record. # - # source://activerecord/lib/active_record/errors.rb#143 + # source://activerecord/lib/active_record/errors.rb#162 def record; end end # Raised when a record cannot be inserted or updated because it would violate a uniqueness constraint. # -# source://activerecord/lib/active_record/errors.rb#208 +# source://activerecord/lib/active_record/errors.rb#229 class ActiveRecord::RecordNotUnique < ::ActiveRecord::WrappedDatabaseException; end # = Active Record Reflection @@ -30088,18 +30641,18 @@ module ActiveRecord::Reflection mixes_in_class_methods ::ActiveRecord::Reflection::ClassMethods class << self - # source://activerecord/lib/active_record/reflection.rb#28 + # source://activerecord/lib/active_record/reflection.rb#29 def add_aggregate_reflection(ar, name, reflection); end - # source://activerecord/lib/active_record/reflection.rb#22 + # source://activerecord/lib/active_record/reflection.rb#23 def add_reflection(ar, name, reflection); end - # source://activerecord/lib/active_record/reflection.rb#17 + # source://activerecord/lib/active_record/reflection.rb#18 def create(macro, name, scope, options, ar); end private - # source://activestorage/7.1.3.3lib/active_storage/reflection.rb#37 + # source://activestorage/8.0.0.beta1lib/active_storage/reflection.rb#37 def reflection_class_for(macro); end end @@ -30113,6 +30666,9 @@ module ActiveRecord::Reflection def automatic_scope_inversing; end def automatic_scope_inversing=(value); end def automatic_scope_inversing?; end + def automatically_invert_plural_associations; end + def automatically_invert_plural_associations=(value); end + def automatically_invert_plural_associations?; end end module GeneratedInstanceMethods @@ -30122,6 +30678,8 @@ module ActiveRecord::Reflection def aggregate_reflections?; end def automatic_scope_inversing; end def automatic_scope_inversing?; end + def automatically_invert_plural_associations; end + def automatically_invert_plural_associations?; end end end @@ -30139,29 +30697,29 @@ end # PolymorphicReflection # RuntimeReflection # -# source://activerecord/lib/active_record/reflection.rb#156 +# source://activerecord/lib/active_record/reflection.rb#163 class ActiveRecord::Reflection::AbstractReflection # @return [AbstractReflection] a new instance of AbstractReflection # - # source://activerecord/lib/active_record/reflection.rb#157 + # source://activerecord/lib/active_record/reflection.rb#164 def initialize; end - # source://activerecord/lib/active_record/reflection.rb#308 + # source://activerecord/lib/active_record/reflection.rb#328 def alias_candidate(name); end # Returns a new, unsaved instance of the associated class. +attributes+ will # be passed to the class's constructor. # - # source://activerecord/lib/active_record/reflection.rb#175 + # source://activerecord/lib/active_record/reflection.rb#182 def build_association(attributes, &block); end - # source://activerecord/lib/active_record/reflection.rb#316 + # source://activerecord/lib/active_record/reflection.rb#336 def build_scope(table, predicate_builder = T.unsafe(nil), klass = T.unsafe(nil)); end - # source://activerecord/lib/active_record/reflection.rb#312 + # source://activerecord/lib/active_record/reflection.rb#332 def chain; end - # source://activerecord/lib/active_record/reflection.rb#255 + # source://activerecord/lib/active_record/reflection.rb#264 def check_validity_of_inverse!; end # Returns the class name for the macro. @@ -30169,31 +30727,39 @@ class ActiveRecord::Reflection::AbstractReflection # composed_of :balance, class_name: 'Money' returns 'Money' # has_many :clients returns 'Client' # - # source://activerecord/lib/active_record/reflection.rb#183 + # source://activerecord/lib/active_record/reflection.rb#190 def class_name; end - # source://activerecord/lib/active_record/reflection.rb#233 + # source://activerecord/lib/active_record/reflection.rb#240 def constraints; end - # source://activerecord/lib/active_record/reflection.rb#237 + # source://activerecord/lib/active_record/reflection.rb#244 def counter_cache_column; end # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#304 + # source://activerecord/lib/active_record/reflection.rb#324 def counter_must_be_updated_by_has_many?; end - # Returns whether a counter cache should be used for this association. + # Returns whether this association has a counter cache and its column values were backfilled + # (and so it is used internally by methods like +size+/+any?+/etc). + # + # @return [Boolean] + # + # source://activerecord/lib/active_record/reflection.rb#315 + def has_active_cached_counter?; end + + # Returns whether this association has a counter cache. # # The counter_cache option must be given on either the owner or inverse # association, and the column must be present on the owner. # # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#298 + # source://activerecord/lib/active_record/reflection.rb#307 def has_cached_counter?; end - # source://activerecord/lib/active_record/reflection.rb#249 + # source://activerecord/lib/active_record/reflection.rb#258 def inverse_of; end # We need to avoid the following situation: @@ -30207,12 +30773,12 @@ class ActiveRecord::Reflection::AbstractReflection # # Hence this method. # - # source://activerecord/lib/active_record/reflection.rb#276 + # source://activerecord/lib/active_record/reflection.rb#285 def inverse_updates_counter_cache?; end # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#290 + # source://activerecord/lib/active_record/reflection.rb#299 def inverse_updates_counter_in_memory?; end # We need to avoid the following situation: @@ -30226,127 +30792,127 @@ class ActiveRecord::Reflection::AbstractReflection # # Hence this method. # - # source://activerecord/lib/active_record/reflection.rb#276 + # source://activerecord/lib/active_record/reflection.rb#285 def inverse_which_updates_counter_cache; end - # source://activerecord/lib/active_record/reflection.rb#193 + # source://activerecord/lib/active_record/reflection.rb#200 def join_scope(table, foreign_table, foreign_klass); end - # source://activerecord/lib/active_record/reflection.rb#220 + # source://activerecord/lib/active_record/reflection.rb#227 def join_scopes(table, predicate_builder, klass = T.unsafe(nil), record = T.unsafe(nil)); end - # source://activerecord/lib/active_record/reflection.rb#228 + # source://activerecord/lib/active_record/reflection.rb#235 def klass_join_scope(table, predicate_builder); end # Returns a list of scopes that should be applied for this Reflection # object when querying the database. # - # source://activerecord/lib/active_record/reflection.rb#189 + # source://activerecord/lib/active_record/reflection.rb#196 def scopes; end # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#324 + # source://activerecord/lib/active_record/reflection.rb#344 def strict_loading?; end - # source://activerecord/lib/active_record/reflection.rb#328 + # source://activerecord/lib/active_record/reflection.rb#348 def strict_loading_violation_message(owner); end - # source://activerecord/lib/active_record/reflection.rb#169 + # source://activerecord/lib/active_record/reflection.rb#176 def table_name; end # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#165 + # source://activerecord/lib/active_record/reflection.rb#172 def through_reflection?; end protected # FIXME: this is a horrible name # - # source://activerecord/lib/active_record/reflection.rb#335 + # source://activerecord/lib/active_record/reflection.rb#355 def actual_source_reflection; end private - # source://activerecord/lib/active_record/reflection.rb#348 + # source://activerecord/lib/active_record/reflection.rb#368 def ensure_option_not_given_as_class!(option_name); end - # source://activerecord/lib/active_record/reflection.rb#340 + # source://activerecord/lib/active_record/reflection.rb#360 def predicate_builder(table); end - # source://activerecord/lib/active_record/reflection.rb#344 + # source://activerecord/lib/active_record/reflection.rb#364 def primary_key(klass); end end # Holds all the metadata about an aggregation as it was specified in the # Active Record class. # -# source://activerecord/lib/active_record/reflection.rb#452 +# source://activerecord/lib/active_record/reflection.rb#488 class ActiveRecord::Reflection::AggregateReflection < ::ActiveRecord::Reflection::MacroReflection - # source://activerecord/lib/active_record/reflection.rb#453 + # source://activerecord/lib/active_record/reflection.rb#489 def mapping; end end # Holds all the metadata about an association as it was specified in the # Active Record class. # -# source://activerecord/lib/active_record/reflection.rb#461 +# source://activerecord/lib/active_record/reflection.rb#497 class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflection::MacroReflection # @return [AssociationReflection] a new instance of AssociationReflection # - # source://activerecord/lib/active_record/reflection.rb#489 + # source://activerecord/lib/active_record/reflection.rb#525 def initialize(name, scope, options, active_record); end - # source://activerecord/lib/active_record/reflection.rb#537 + # source://activerecord/lib/active_record/reflection.rb#595 def active_record_primary_key; end - # source://activerecord/lib/active_record/reflection.rb#683 + # source://activerecord/lib/active_record/reflection.rb#741 def add_as_polymorphic_through(reflection, seed); end - # source://activerecord/lib/active_record/reflection.rb#679 + # source://activerecord/lib/active_record/reflection.rb#737 def add_as_source(seed); end - # source://activerecord/lib/active_record/reflection.rb#687 + # source://activerecord/lib/active_record/reflection.rb#745 def add_as_through(seed); end # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/reflection.rb#669 + # source://activerecord/lib/active_record/reflection.rb#727 def association_class; end - # source://activerecord/lib/active_record/reflection.rb#529 + # source://activerecord/lib/active_record/reflection.rb#587 def association_foreign_key; end - # source://activerecord/lib/active_record/reflection.rb#533 + # source://activerecord/lib/active_record/reflection.rb#591 def association_primary_key(klass = T.unsafe(nil)); end - # source://activerecord/lib/active_record/reflection.rb#501 + # source://activerecord/lib/active_record/reflection.rb#548 def association_scope_cache(klass, owner, &block); end # Returns +true+ if +self+ is a +belongs_to+ reflection. # # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#664 + # source://activerecord/lib/active_record/reflection.rb#722 def belongs_to?; end - # source://activerecord/lib/active_record/reflection.rb#580 + # source://activerecord/lib/active_record/reflection.rb#638 def check_eager_loadable!; end - # source://activerecord/lib/active_record/reflection.rb#568 + # source://activerecord/lib/active_record/reflection.rb#626 def check_validity!; end # This is for clearing cache on the reflection. Useful for tests that need to compare # SQL queries on associations. # - # source://activerecord/lib/active_record/reflection.rb#612 + # source://activerecord/lib/active_record/reflection.rb#670 def clear_association_scope_cache; end # A chain of reflections from this one back to the owner. For more see the explanation in # ThroughReflection. # - # source://activerecord/lib/active_record/reflection.rb#606 + # source://activerecord/lib/active_record/reflection.rb#664 def collect_join_chain; end # Returns whether or not this association reflection is for a collection @@ -30355,53 +30921,53 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#646 + # source://activerecord/lib/active_record/reflection.rb#704 def collection?; end - # source://activerecord/lib/active_record/reflection.rb#462 + # source://activerecord/lib/active_record/reflection.rb#498 def compute_class(name); end - # source://activerecord/lib/active_record/reflection.rb#691 + # source://activerecord/lib/active_record/reflection.rb#749 def extensions; end - # source://activerecord/lib/active_record/reflection.rb#513 + # source://activerecord/lib/active_record/reflection.rb#562 def foreign_key(infer_from_inverse_of: T.unsafe(nil)); end # Returns the value of attribute foreign_type. # - # source://activerecord/lib/active_record/reflection.rb#486 + # source://activerecord/lib/active_record/reflection.rb#522 def foreign_type; end # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#624 + # source://activerecord/lib/active_record/reflection.rb#682 def has_inverse?; end # Returns +true+ if +self+ is a +has_one+ reflection. # # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#667 + # source://activerecord/lib/active_record/reflection.rb#725 def has_one?; end # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#620 + # source://activerecord/lib/active_record/reflection.rb#678 def has_scope?; end - # source://activerecord/lib/active_record/reflection.rb#564 + # source://activerecord/lib/active_record/reflection.rb#622 def join_foreign_key; end - # source://activerecord/lib/active_record/reflection.rb#592 + # source://activerecord/lib/active_record/reflection.rb#650 def join_id_for(owner); end - # source://activerecord/lib/active_record/reflection.rb#556 + # source://activerecord/lib/active_record/reflection.rb#614 def join_primary_key(klass = T.unsafe(nil)); end - # source://activerecord/lib/active_record/reflection.rb#560 + # source://activerecord/lib/active_record/reflection.rb#618 def join_primary_type; end - # source://activerecord/lib/active_record/reflection.rb#509 + # source://activerecord/lib/active_record/reflection.rb#558 def join_table; end # Returns the macro type. @@ -30410,44 +30976,44 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @raise [NotImplementedError] # - # source://activerecord/lib/active_record/reflection.rb#641 + # source://activerecord/lib/active_record/reflection.rb#699 def macro; end # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#616 + # source://activerecord/lib/active_record/reflection.rb#674 def nested?; end # Reflection # - # source://activerecord/lib/active_record/reflection.rb#487 + # source://activerecord/lib/active_record/reflection.rb#523 def parent_reflection; end # Reflection # - # source://activerecord/lib/active_record/reflection.rb#487 + # source://activerecord/lib/active_record/reflection.rb#523 def parent_reflection=(_arg0); end # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#671 + # source://activerecord/lib/active_record/reflection.rb#729 def polymorphic?; end - # source://activerecord/lib/active_record/reflection.rb#628 + # source://activerecord/lib/active_record/reflection.rb#686 def polymorphic_inverse_of(associated_class); end - # source://activerecord/lib/active_record/reflection.rb#675 + # source://activerecord/lib/active_record/reflection.rb#733 def polymorphic_name; end - # source://activerecord/lib/active_record/reflection.rb#600 + # source://activerecord/lib/active_record/reflection.rb#658 def source_reflection; end - # source://activerecord/lib/active_record/reflection.rb#596 + # source://activerecord/lib/active_record/reflection.rb#654 def through_reflection; end # Returns the value of attribute type. # - # source://activerecord/lib/active_record/reflection.rb#486 + # source://activerecord/lib/active_record/reflection.rb#522 def type; end # Returns whether or not the association should be validated as part of @@ -30462,14 +31028,14 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#659 + # source://activerecord/lib/active_record/reflection.rb#717 def validate?; end private # returns either +nil+ or the inverse association name that it finds. # - # source://activerecord/lib/active_record/reflection.rb#708 + # source://activerecord/lib/active_record/reflection.rb#766 def automatic_inverse_of; end # Checks to see if the reflection doesn't have any options that prevent @@ -30481,26 +31047,26 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#746 + # source://activerecord/lib/active_record/reflection.rb#808 def can_find_inverse_of_automatically?(reflection, inverse_reflection = T.unsafe(nil)); end - # source://activerecord/lib/active_record/reflection.rb#767 + # source://activerecord/lib/active_record/reflection.rb#829 def derive_class_name; end - # source://activerecord/lib/active_record/reflection.rb#785 + # source://activerecord/lib/active_record/reflection.rb#847 def derive_fk_query_constraints(foreign_key); end - # source://activerecord/lib/active_record/reflection.rb#773 + # source://activerecord/lib/active_record/reflection.rb#835 def derive_foreign_key(infer_from_inverse_of: T.unsafe(nil)); end - # source://activerecord/lib/active_record/reflection.rb#823 + # source://activerecord/lib/active_record/reflection.rb#887 def derive_join_table; end # Attempts to find the inverse association name automatically. # If it cannot find a suitable inverse association name, it returns # +nil+. # - # source://activerecord/lib/active_record/reflection.rb#699 + # source://activerecord/lib/active_record/reflection.rb#757 def inverse_name; end # Scopes on the potential inverse reflection prevent automatic @@ -30512,7 +31078,7 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#759 + # source://activerecord/lib/active_record/reflection.rb#821 def scope_allows_automatic_inverse_of?(reflection, inverse_reflection); end # Checks if the inverse reflection that is returned from the @@ -30522,42 +31088,42 @@ class ActiveRecord::Reflection::AssociationReflection < ::ActiveRecord::Reflecti # # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#732 + # source://activerecord/lib/active_record/reflection.rb#794 def valid_inverse_reflection?(reflection); end end -# source://activerecord/lib/active_record/reflection.rb#856 +# source://activerecord/lib/active_record/reflection.rb#920 class ActiveRecord::Reflection::BelongsToReflection < ::ActiveRecord::Reflection::AssociationReflection - # source://activerecord/lib/active_record/reflection.rb#861 + # source://activerecord/lib/active_record/reflection.rb#925 def association_class; end # klass option is necessary to support loading polymorphic associations # - # source://activerecord/lib/active_record/reflection.rb#870 + # source://activerecord/lib/active_record/reflection.rb#934 def association_primary_key(klass = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#859 + # source://activerecord/lib/active_record/reflection.rb#923 def belongs_to?; end - # source://activerecord/lib/active_record/reflection.rb#888 + # source://activerecord/lib/active_record/reflection.rb#956 def join_foreign_key; end - # source://activerecord/lib/active_record/reflection.rb#892 + # source://activerecord/lib/active_record/reflection.rb#960 def join_foreign_type; end - # source://activerecord/lib/active_record/reflection.rb#884 + # source://activerecord/lib/active_record/reflection.rb#952 def join_primary_key(klass = T.unsafe(nil)); end - # source://activerecord/lib/active_record/reflection.rb#857 + # source://activerecord/lib/active_record/reflection.rb#921 def macro; end private # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#897 + # source://activerecord/lib/active_record/reflection.rb#965 def can_find_inverse_of_automatically?(*_arg0); end end @@ -30572,24 +31138,27 @@ end # MacroReflection class has info for AggregateReflection and AssociationReflection # classes. # -# source://activerecord/lib/active_record/reflection.rb#59 +# source://activerecord/lib/active_record/reflection.rb#60 module ActiveRecord::Reflection::ClassMethods - # source://activerecord/lib/active_record/reflection.rb#121 + # source://activerecord/lib/active_record/reflection.rb#126 def _reflect_on_association(association); end - # source://activerecord/lib/active_record/reflection.rb#130 + # source://activerecord/lib/active_record/reflection.rb#137 def clear_reflections_cache; end + # source://activerecord/lib/active_record/reflection.rb#82 + def normalized_reflections; end + # Returns the AggregateReflection object for the named +aggregation+ (use the symbol). # # Account.reflect_on_aggregation(:balance) # => the balance AggregateReflection # - # source://activerecord/lib/active_record/reflection.rb#69 + # source://activerecord/lib/active_record/reflection.rb#70 def reflect_on_aggregation(aggregation); end # Returns an array of AggregateReflection objects for all the aggregations in the class. # - # source://activerecord/lib/active_record/reflection.rb#61 + # source://activerecord/lib/active_record/reflection.rb#62 def reflect_on_all_aggregations; end # Returns an array of AssociationReflection objects for all the @@ -30602,12 +31171,12 @@ module ActiveRecord::Reflection::ClassMethods # Account.reflect_on_all_associations # returns an array of all associations # Account.reflect_on_all_associations(:has_many) # returns an array of all has_many associations # - # source://activerecord/lib/active_record/reflection.rb#106 + # source://activerecord/lib/active_record/reflection.rb#111 def reflect_on_all_associations(macro = T.unsafe(nil)); end # Returns an array of AssociationReflection objects for all associations which have :autosave enabled. # - # source://activerecord/lib/active_record/reflection.rb#126 + # source://activerecord/lib/active_record/reflection.rb#131 def reflect_on_all_autosave_associations; end # Returns the AssociationReflection object for the +association+ (use the symbol). @@ -30615,86 +31184,89 @@ module ActiveRecord::Reflection::ClassMethods # Account.reflect_on_association(:owner) # returns the owner AssociationReflection # Invoice.reflect_on_association(:line_items).macro # returns :has_many # - # source://activerecord/lib/active_record/reflection.rb#117 + # source://activerecord/lib/active_record/reflection.rb#122 def reflect_on_association(association); end # Returns a Hash of name of the reflection as the key and an AssociationReflection as the value. # # Account.reflections # => {"balance" => AggregateReflection} # - # source://activerecord/lib/active_record/reflection.rb#77 + # source://activerecord/lib/active_record/reflection.rb#78 def reflections; end private - # source://activerecord/lib/active_record/reflection.rb#135 + # source://activerecord/lib/active_record/reflection.rb#142 def inherited(subclass); end end -# source://activerecord/lib/active_record/reflection.rb#902 +# source://activerecord/lib/active_record/reflection.rb#970 class ActiveRecord::Reflection::HasAndBelongsToManyReflection < ::ActiveRecord::Reflection::AssociationReflection # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#905 + # source://activerecord/lib/active_record/reflection.rb#973 def collection?; end - # source://activerecord/lib/active_record/reflection.rb#903 + # source://activerecord/lib/active_record/reflection.rb#971 def macro; end end -# source://activerecord/lib/active_record/reflection.rb#828 +# source://activerecord/lib/active_record/reflection.rb#892 class ActiveRecord::Reflection::HasManyReflection < ::ActiveRecord::Reflection::AssociationReflection - # source://activerecord/lib/active_record/reflection.rb#833 + # source://activerecord/lib/active_record/reflection.rb#897 def association_class; end # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#831 + # source://activerecord/lib/active_record/reflection.rb#895 def collection?; end - # source://activerecord/lib/active_record/reflection.rb#829 + # source://activerecord/lib/active_record/reflection.rb#893 def macro; end end -# source://activerecord/lib/active_record/reflection.rb#842 +# source://activerecord/lib/active_record/reflection.rb#906 class ActiveRecord::Reflection::HasOneReflection < ::ActiveRecord::Reflection::AssociationReflection - # source://activerecord/lib/active_record/reflection.rb#847 + # source://activerecord/lib/active_record/reflection.rb#911 def association_class; end # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#845 + # source://activerecord/lib/active_record/reflection.rb#909 def has_one?; end - # source://activerecord/lib/active_record/reflection.rb#843 + # source://activerecord/lib/active_record/reflection.rb#907 def macro; end end # Base class for AggregateReflection and AssociationReflection. Objects of # AggregateReflection and AssociationReflection are returned by the Reflection::ClassMethods. # -# source://activerecord/lib/active_record/reflection.rb#357 +# source://activerecord/lib/active_record/reflection.rb#377 class ActiveRecord::Reflection::MacroReflection < ::ActiveRecord::Reflection::AbstractReflection # @return [MacroReflection] a new instance of MacroReflection # - # source://activerecord/lib/active_record/reflection.rb#376 + # source://activerecord/lib/active_record/reflection.rb#396 def initialize(name, scope, options, active_record); end # Returns +true+ if +self+ and +other_aggregation+ have the same +name+ attribute, +active_record+ attribute, # and +other_aggregation+ has an options hash assigned to it. # - # source://activerecord/lib/active_record/reflection.rb#421 + # source://activerecord/lib/active_record/reflection.rb#448 def ==(other_aggregation); end + # source://activerecord/lib/active_record/reflection.rb#434 + def _klass(class_name); end + # Returns the value of attribute active_record. # - # source://activerecord/lib/active_record/reflection.rb#372 + # source://activerecord/lib/active_record/reflection.rb#392 def active_record; end - # source://activerecord/lib/active_record/reflection.rb#388 + # source://activerecord/lib/active_record/reflection.rb#407 def autosave=(autosave); end - # source://activerecord/lib/active_record/reflection.rb#415 + # source://activerecord/lib/active_record/reflection.rb#442 def compute_class(name); end # Returns the class for the macro. @@ -30713,7 +31285,7 @@ class ActiveRecord::Reflection::MacroReflection < ::ActiveRecord::Reflection::Ab # a new association object. Use +build_association+ or +create_association+ # instead. This allows plugins to hook into association object creation. # - # source://activerecord/lib/active_record/reflection.rb#411 + # source://activerecord/lib/active_record/reflection.rb#430 def klass; end # Returns the name of the macro. @@ -30721,7 +31293,7 @@ class ActiveRecord::Reflection::MacroReflection < ::ActiveRecord::Reflection::Ab # composed_of :balance, class_name: 'Money' returns :balance # has_many :clients returns :clients # - # source://activerecord/lib/active_record/reflection.rb#362 + # source://activerecord/lib/active_record/reflection.rb#382 def name; end # Returns the hash of options used for the macro. @@ -30729,163 +31301,164 @@ class ActiveRecord::Reflection::MacroReflection < ::ActiveRecord::Reflection::Ab # composed_of :balance, class_name: 'Money' returns { class_name: "Money" } # has_many :clients returns {} # - # source://activerecord/lib/active_record/reflection.rb#370 + # source://activerecord/lib/active_record/reflection.rb#390 def options; end - # source://activerecord/lib/active_record/reflection.rb#374 + # source://activerecord/lib/active_record/reflection.rb#394 def plural_name; end # Returns the value of attribute scope. # - # source://activerecord/lib/active_record/reflection.rb#364 + # source://activerecord/lib/active_record/reflection.rb#384 def scope; end - # source://activerecord/lib/active_record/reflection.rb#429 + # source://activerecord/lib/active_record/reflection.rb#456 def scope_for(relation, owner = T.unsafe(nil)); end private - # source://activerecord/lib/active_record/reflection.rb#434 + # source://activerecord/lib/active_record/reflection.rb#461 def derive_class_name; end - # @raise [ArgumentError] - # - # source://activerecord/lib/active_record/reflection.rb#438 - def validate_reflection!; end + # source://activerecord/lib/active_record/reflection.rb#465 + def normalize_options(options); end end -# source://activerecord/lib/active_record/reflection.rb#1166 +# source://activerecord/lib/active_record/reflection.rb#1236 class ActiveRecord::Reflection::PolymorphicReflection < ::ActiveRecord::Reflection::AbstractReflection # @return [PolymorphicReflection] a new instance of PolymorphicReflection # - # source://activerecord/lib/active_record/reflection.rb#1170 + # source://activerecord/lib/active_record/reflection.rb#1240 def initialize(reflection, previous_reflection); end - # source://activerecord/lib/active_record/reflection.rb#1181 + # source://activerecord/lib/active_record/reflection.rb#1251 def constraints; end - # source://activerecord/lib/active_record/reflection.rb#1167 + # source://activerecord/lib/active_record/reflection.rb#1237 def join_foreign_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1167 + # source://activerecord/lib/active_record/reflection.rb#1237 def join_primary_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1176 + # source://activerecord/lib/active_record/reflection.rb#1246 def join_scopes(table, predicate_builder, klass = T.unsafe(nil), record = T.unsafe(nil)); end - # source://activerecord/lib/active_record/reflection.rb#1167 + # source://activerecord/lib/active_record/reflection.rb#1237 def klass(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1167 + # source://activerecord/lib/active_record/reflection.rb#1237 def name(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1167 + # source://activerecord/lib/active_record/reflection.rb#1237 def plural_name(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1167 + # source://activerecord/lib/active_record/reflection.rb#1237 def scope(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1167 + # source://activerecord/lib/active_record/reflection.rb#1237 def scope_for(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1167 + # source://activerecord/lib/active_record/reflection.rb#1237 def type(*_arg0, **_arg1, &_arg2); end private - # source://activerecord/lib/active_record/reflection.rb#1186 + # source://activerecord/lib/active_record/reflection.rb#1256 def source_type_scope; end end -# source://activerecord/lib/active_record/reflection.rb#1193 +# source://activerecord/lib/active_record/reflection.rb#1263 class ActiveRecord::Reflection::RuntimeReflection < ::ActiveRecord::Reflection::AbstractReflection # @return [RuntimeReflection] a new instance of RuntimeReflection # - # source://activerecord/lib/active_record/reflection.rb#1196 + # source://activerecord/lib/active_record/reflection.rb#1266 def initialize(reflection, association); end - # source://activerecord/lib/active_record/reflection.rb#1206 + # source://activerecord/lib/active_record/reflection.rb#1276 def aliased_table; end - # source://activerecord/lib/active_record/reflection.rb#1214 + # source://activerecord/lib/active_record/reflection.rb#1284 def all_includes; end - # source://activerecord/lib/active_record/reflection.rb#1194 + # source://activerecord/lib/active_record/reflection.rb#1264 def constraints(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1194 + # source://activerecord/lib/active_record/reflection.rb#1264 def join_foreign_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1210 + # source://activerecord/lib/active_record/reflection.rb#1280 def join_primary_key(klass = T.unsafe(nil)); end - # source://activerecord/lib/active_record/reflection.rb#1202 + # source://activerecord/lib/active_record/reflection.rb#1272 def klass; end - # source://activerecord/lib/active_record/reflection.rb#1194 + # source://activerecord/lib/active_record/reflection.rb#1264 def scope(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1194 + # source://activerecord/lib/active_record/reflection.rb#1264 def type(*_arg0, **_arg1, &_arg2); end end # Holds all the metadata about a :through association as it was specified # in the Active Record class. # -# source://activerecord/lib/active_record/reflection.rb#912 +# source://activerecord/lib/active_record/reflection.rb#980 class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection::AbstractReflection # @return [ThroughReflection] a new instance of ThroughReflection # - # source://activerecord/lib/active_record/reflection.rb#916 + # source://activerecord/lib/active_record/reflection.rb#984 def initialize(delegate_reflection); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 + def _klass(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/reflection.rb#1233 def active_record(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#913 + # source://activerecord/lib/active_record/reflection.rb#981 def active_record_primary_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1128 + # source://activerecord/lib/active_record/reflection.rb#1198 def add_as_polymorphic_through(reflection, seed); end - # source://activerecord/lib/active_record/reflection.rb#1124 + # source://activerecord/lib/active_record/reflection.rb#1194 def add_as_source(seed); end - # source://activerecord/lib/active_record/reflection.rb#1132 + # source://activerecord/lib/active_record/reflection.rb#1202 def add_as_through(seed); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def association_class(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#913 + # source://activerecord/lib/active_record/reflection.rb#981 def association_foreign_key(*_arg0, **_arg1, &_arg2); end # We want to use the klass from this reflection, rather than just delegate straight to # the source_reflection, because the source_reflection may be polymorphic. We still # need to respect the source_reflection's :primary_key option, though. # - # source://activerecord/lib/active_record/reflection.rb#1021 + # source://activerecord/lib/active_record/reflection.rb#1091 def association_primary_key(klass = T.unsafe(nil)); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def association_scope_cache(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def autosave=(arg); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def belongs_to?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def check_eager_loadable!(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1078 + # source://activerecord/lib/active_record/reflection.rb#1148 def check_validity!; end # This is for clearing cache on the reflection. Useful for tests that need to compare # SQL queries on associations. # - # source://activerecord/lib/active_record/reflection.rb#993 + # source://activerecord/lib/active_record/reflection.rb#1063 def clear_association_scope_cache; end # Returns an array of reflections which are involved in this association. Each item in the @@ -30905,103 +31478,103 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: # # => [, # ] # - # source://activerecord/lib/active_record/reflection.rb#987 + # source://activerecord/lib/active_record/reflection.rb#1057 def collect_join_chain; end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def collection?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def compute_class(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1118 + # source://activerecord/lib/active_record/reflection.rb#1188 def constraints; end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def extensions(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#913 + # source://activerecord/lib/active_record/reflection.rb#981 def foreign_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#913 + # source://activerecord/lib/active_record/reflection.rb#981 def foreign_type(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def has_inverse?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def has_one?(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#1007 + # source://activerecord/lib/active_record/reflection.rb#1077 def has_scope?; end - # source://activerecord/lib/active_record/reflection.rb#913 + # source://activerecord/lib/active_record/reflection.rb#981 def join_foreign_key(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#913 + # source://activerecord/lib/active_record/reflection.rb#981 def join_id_for(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1031 + # source://activerecord/lib/active_record/reflection.rb#1101 def join_primary_key(klass = T.unsafe(nil)); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def join_primary_type(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1003 + # source://activerecord/lib/active_record/reflection.rb#1073 def join_scopes(table, predicate_builder, klass = T.unsafe(nil), record = T.unsafe(nil)); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def join_table(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#929 + # source://activerecord/lib/active_record/reflection.rb#997 def klass; end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def macro(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def name(*_arg0, **_arg1, &_arg2); end # A through association is nested if there would be more than one join table # # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#1014 + # source://activerecord/lib/active_record/reflection.rb#1084 def nested?; end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def options(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def parent_reflection(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def parent_reflection=(arg); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def plural_name(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def polymorphic?(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def polymorphic_inverse_of(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def polymorphic_name(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def scope(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def scope_for(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#999 + # source://activerecord/lib/active_record/reflection.rb#1069 def scopes; end - # source://activerecord/lib/active_record/reflection.rb#1070 + # source://activerecord/lib/active_record/reflection.rb#1140 def source_options; end # Returns the source of the through reflection. It checks both a singularized @@ -31021,10 +31594,10 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: # tags_reflection.source_reflection # # => # - # source://activerecord/lib/active_record/reflection.rb#950 + # source://activerecord/lib/active_record/reflection.rb#1018 def source_reflection; end - # source://activerecord/lib/active_record/reflection.rb#1050 + # source://activerecord/lib/active_record/reflection.rb#1120 def source_reflection_name; end # Gets an array of possible :through source reflection names in both singular and plural form. @@ -31038,10 +31611,10 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: # tags_reflection.source_reflection_names # # => [:tag, :tags] # - # source://activerecord/lib/active_record/reflection.rb#1046 + # source://activerecord/lib/active_record/reflection.rb#1116 def source_reflection_names; end - # source://activerecord/lib/active_record/reflection.rb#1074 + # source://activerecord/lib/active_record/reflection.rb#1144 def through_options; end # Returns the AssociationReflection object specified in the :through option @@ -31056,41 +31629,41 @@ class ActiveRecord::Reflection::ThroughReflection < ::ActiveRecord::Reflection:: # tags_reflection.through_reflection # # => # - # source://activerecord/lib/active_record/reflection.rb#966 + # source://activerecord/lib/active_record/reflection.rb#1036 def through_reflection; end # @return [Boolean] # - # source://activerecord/lib/active_record/reflection.rb#925 + # source://activerecord/lib/active_record/reflection.rb#993 def through_reflection?; end - # source://activerecord/lib/active_record/reflection.rb#913 + # source://activerecord/lib/active_record/reflection.rb#981 def type(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/reflection.rb#1163 + # source://activerecord/lib/active_record/reflection.rb#1233 def validate?(*_arg0, **_arg1, &_arg2); end protected # FIXME: this is a horrible name # - # source://activerecord/lib/active_record/reflection.rb#1137 + # source://activerecord/lib/active_record/reflection.rb#1207 def actual_source_reflection; end private - # source://activerecord/lib/active_record/reflection.rb#1144 + # source://activerecord/lib/active_record/reflection.rb#1214 def collect_join_reflections(seed); end # Returns the value of attribute delegate_reflection. # - # source://activerecord/lib/active_record/reflection.rb#1142 + # source://activerecord/lib/active_record/reflection.rb#1212 def delegate_reflection; end - # source://activerecord/lib/active_record/reflection.rb#1155 + # source://activerecord/lib/active_record/reflection.rb#1225 def derive_class_name; end - # source://activerecord/lib/active_record/reflection.rb#1153 + # source://activerecord/lib/active_record/reflection.rb#1223 def inverse_name; end end @@ -31107,22 +31680,24 @@ class ActiveRecord::Relation include ::ActiveRecord::SpawnMethods include ::ActiveRecord::Calculations include ::ActiveRecord::FinderMethods + include ::ActiveRecord::TokenFor::RelationMethods + include ::ActiveRecord::SignedId::RelationMethods extend ::ActiveRecord::Delegation::ClassMethods # @return [Relation] a new instance of Relation # - # source://activerecord/lib/active_record/relation.rb#28 - def initialize(klass, table: T.unsafe(nil), predicate_builder: T.unsafe(nil), values: T.unsafe(nil)); end + # source://activerecord/lib/active_record/relation.rb#77 + def initialize(model, table: T.unsafe(nil), predicate_builder: T.unsafe(nil), values: T.unsafe(nil)); end # Compares two relations for equality. # - # source://activerecord/lib/active_record/relation.rb#813 + # source://activerecord/lib/active_record/relation.rb#1246 def ==(other); end - # source://activerecord/lib/active_record/relation.rb#471 + # source://activerecord/lib/active_record/relation.rb#545 def _exec_scope(*_arg0, **_arg1, &_arg2); end - # source://activerecord/lib/active_record/relation.rb#863 + # source://activerecord/lib/active_record/relation.rb#1300 def alias_tracker(joins = T.unsafe(nil), aliases = T.unsafe(nil)); end # Returns true if there are any records. @@ -31134,19 +31709,19 @@ class ActiveRecord::Relation # # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#312 + # source://activerecord/lib/active_record/relation.rb#384 def any?(*args); end # @yield [attr, bind] # - # source://activerecord/lib/active_record/relation.rb#46 + # source://activerecord/lib/active_record/relation.rb#95 def bind_attribute(name, value); end # Returns true if relation is blank. # # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#834 + # source://activerecord/lib/active_record/relation.rb#1267 def blank?; end # Initializes new record from relation while maintaining the current @@ -31162,7 +31737,7 @@ class ActiveRecord::Relation # user = users.new { |user| user.name = 'Oscar' } # user.name # => Oscar # - # source://activerecord/lib/active_record/relation.rb#69 + # source://activerecord/lib/active_record/relation.rb#118 def build(attributes = T.unsafe(nil), &block); end # Returns a stable cache key that can be used to identify this query. @@ -31183,12 +31758,12 @@ class ActiveRecord::Relation # # Product.where("name like ?", "%Game%").cache_key(:last_reviewed_at) # - # source://activerecord/lib/active_record/relation.rb#359 + # source://activerecord/lib/active_record/relation.rb#431 def cache_key(timestamp_column = T.unsafe(nil)); end # Returns a cache key along with the version. # - # source://activerecord/lib/active_record/relation.rb#438 + # source://activerecord/lib/active_record/relation.rb#512 def cache_key_with_version; end # Returns a cache version that can be used together with the cache key to form @@ -31202,7 +31777,7 @@ class ActiveRecord::Relation # # SELECT COUNT(*), MAX("products"."updated_at") FROM "products" WHERE (name like '%Cosmic Encounter%') # - # source://activerecord/lib/active_record/relation.rb#386 + # source://activerecord/lib/active_record/relation.rb#458 def cache_version(timestamp_column = T.unsafe(nil)); end # Tries to create a new record with the same scoped attributes @@ -31225,7 +31800,7 @@ class ActiveRecord::Relation # users.create(name: nil) # validation on name # # => # # - # source://activerecord/lib/active_record/relation.rb#98 + # source://activerecord/lib/active_record/relation.rb#147 def create(attributes = T.unsafe(nil), &block); end # Similar to #create, but calls @@ -31235,7 +31810,7 @@ class ActiveRecord::Relation # Expects arguments in the same format as # {ActiveRecord::Base.create!}[rdoc-ref:Persistence::ClassMethods#create!]. # - # source://activerecord/lib/active_record/relation.rb#113 + # source://activerecord/lib/active_record/relation.rb#162 def create!(attributes = T.unsafe(nil), &block); end # Attempts to create a record with the given attributes in a table that has a unique database constraint @@ -31262,22 +31837,46 @@ class ActiveRecord::Relation # the problem of running out of integers, if the underlying table is still stuck on a primary # key of type int (note: All \Rails apps since 5.1+ have defaulted to bigint, which is not liable # to this problem). + # * Columns with unique database constraints should not have uniqueness validations defined, + # otherwise #create will fail due to validation errors and #find_by will never be called. # # This method will return a record if all given attributes are covered by unique constraints # (unless the INSERT -> DELETE -> SELECT race condition is triggered), but if creation was attempted # and failed due to validation errors it won't be persisted, you get what #create returns in # such situation. # - # source://activerecord/lib/active_record/relation.rb#215 + # source://activerecord/lib/active_record/relation.rb#266 def create_or_find_by(attributes, &block); end # Like #create_or_find_by, but calls # {create!}[rdoc-ref:Persistence::ClassMethods#create!] so an exception # is raised if the created record is invalid. # - # source://activerecord/lib/active_record/relation.rb#228 + # source://activerecord/lib/active_record/relation.rb#281 def create_or_find_by!(attributes, &block); end + # Deletes the row with a primary key matching the +id+ argument, using an + # SQL +DELETE+ statement, and returns the number of rows deleted. Active + # Record objects are not instantiated, so the object's callbacks are not + # executed, including any :dependent association options. + # + # You can delete multiple rows at once by passing an Array of ids. + # + # Note: Although it is often much faster than the alternative, #destroy, + # skipping callbacks might bypass business logic in your application + # that ensures referential integrity or performs other essential jobs. + # + # ==== Examples + # + # # Delete a single row + # Todo.delete(1) + # + # # Delete multiple rows + # Todo.delete([2,3,4]) + # + # source://activerecord/lib/active_record/relation.rb#1050 + def delete(id_or_array); end + # Deletes the records without instantiating the records # first, and hence not calling the {#destroy}[rdoc-ref:Persistence#destroy] # method nor invoking callbacks. @@ -31297,7 +31896,7 @@ class ActiveRecord::Relation # Post.distinct.delete_all # # => ActiveRecord::ActiveRecordError: delete_all doesn't support distinct # - # source://activerecord/lib/active_record/relation.rb#646 + # source://activerecord/lib/active_record/relation.rb#1004 def delete_all; end # Finds and deletes all records matching the specified conditions. @@ -31310,9 +31909,32 @@ class ActiveRecord::Relation # Person.delete_by(name: 'Spartacus', rating: 4) # Person.delete_by("published_at < ?", 2.weeks.ago) # - # source://activerecord/lib/active_record/relation.rb#689 + # source://activerecord/lib/active_record/relation.rb#1112 def delete_by(*args); end + # Destroy an object (or multiple objects) that has the given id. The object is instantiated first, + # therefore all callbacks and filters are fired off before the object is deleted. This method is + # less efficient than #delete but allows cleanup methods and other actions to be run. + # + # This essentially finds the object (or multiple objects) with the given id, creates a new object + # from the attributes, and then calls destroy on it. + # + # ==== Parameters + # + # * +id+ - This should be the id or an array of ids to be destroyed. + # + # ==== Examples + # + # # Destroy a single object + # Todo.destroy(1) + # + # # Destroy multiple objects + # todos = [1,2,3] + # Todo.destroy(todos) + # + # source://activerecord/lib/active_record/relation.rb#1076 + def destroy(id); end + # Destroys the records by instantiating each # record and calling its {#destroy}[rdoc-ref:Persistence#destroy] method. # Each object's callbacks are executed (including :dependent association options). @@ -31330,7 +31952,7 @@ class ActiveRecord::Relation # # Person.where(age: 0..18).destroy_all # - # source://activerecord/lib/active_record/relation.rb#624 + # source://activerecord/lib/active_record/relation.rb#982 def destroy_all; end # Finds and destroys all records matching the specified conditions. @@ -31343,44 +31965,61 @@ class ActiveRecord::Relation # Person.destroy_by(name: 'Spartacus', rating: 4) # Person.destroy_by("published_at < ?", 2.weeks.ago) # - # source://activerecord/lib/active_record/relation.rb#676 + # source://activerecord/lib/active_record/relation.rb#1099 def destroy_by(*args); end # Returns true if relation needs eager loading. # # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#798 + # source://activerecord/lib/active_record/relation.rb#1231 def eager_loading?; end # Returns true if there are no records. # # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#283 + # source://activerecord/lib/active_record/relation.rb#355 def empty?; end # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#855 + # source://activerecord/lib/active_record/relation.rb#1292 def empty_scope?; end # Serializes the relation objects Array. # - # source://activerecord/lib/active_record/relation.rb#269 + # source://activerecord/lib/active_record/relation.rb#341 def encode_with(coder); end # Runs EXPLAIN on the query or queries triggered by this relation and # returns the result as a string. The string is formatted imitating the # ones printed by the database shell. # + # User.all.explain + # # EXPLAIN SELECT `users`.* FROM `users` + # # ... + # # Note that this method actually runs the queries, since the results of some # are needed by the next ones when eager loading is going on. # + # To run EXPLAIN on queries created by +first+, +pluck+ and +count+, call + # these methods on +explain+: + # + # User.all.explain.count + # # EXPLAIN SELECT COUNT(*) FROM `users` + # # ... + # + # The column name can be passed if required: + # + # User.all.explain.maximum(:id) + # # EXPLAIN SELECT MAX(`users`.`id`) FROM `users` + # # ... + # # Please see further details in the # {Active Record Query Interface guide}[https://guides.rubyonrails.org/active_record_querying.html#running-explain]. # - # source://activerecord/lib/active_record/relation.rb#253 + # source://activerecord/lib/active_record/relation.rb#325 def explain(*options); end # Finds the first record with the given attributes, or creates a record @@ -31425,37 +32064,193 @@ class ActiveRecord::Relation # doesn't have a relevant unique constraint it could be the case that # you end up with two or more similar records. # - # source://activerecord/lib/active_record/relation.rb#175 + # source://activerecord/lib/active_record/relation.rb#224 def find_or_create_by(attributes, &block); end # Like #find_or_create_by, but calls # {create!}[rdoc-ref:Persistence::ClassMethods#create!] so an exception # is raised if the created record is invalid. # - # source://activerecord/lib/active_record/relation.rb#182 + # source://activerecord/lib/active_record/relation.rb#231 def find_or_create_by!(attributes, &block); end # Like #find_or_create_by, but calls {new}[rdoc-ref:Core#new] # instead of {create}[rdoc-ref:Persistence::ClassMethods#create]. # - # source://activerecord/lib/active_record/relation.rb#240 + # source://activerecord/lib/active_record/relation.rb#295 def find_or_initialize_by(attributes, &block); end - # source://activerecord/lib/active_record/relation.rb#122 + # source://activerecord/lib/active_record/relation.rb#171 def first_or_create(attributes = T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/relation.rb#126 + # source://activerecord/lib/active_record/relation.rb#175 def first_or_create!(attributes = T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/relation.rb#130 + # source://activerecord/lib/active_record/relation.rb#179 def first_or_initialize(attributes = T.unsafe(nil), &block); end # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#859 + # source://activerecord/lib/active_record/relation.rb#1296 def has_limit_or_offset?; end - # source://activerecord/lib/active_record/relation.rb#846 + # Inserts a single record into the database in a single SQL INSERT + # statement. It does not instantiate any models nor does it trigger + # Active Record callbacks or validations. Though passed values + # go through Active Record's type casting and serialization. + # + # See #insert_all for documentation. + # + # source://activerecord/lib/active_record/relation.rb#637 + def insert(attributes, returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end + + # Inserts a single record into the database in a single SQL INSERT + # statement. It does not instantiate any models nor does it trigger + # Active Record callbacks or validations. Though passed values + # go through Active Record's type casting and serialization. + # + # See #insert_all! for more. + # + # source://activerecord/lib/active_record/relation.rb#726 + def insert!(attributes, returning: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end + + # Inserts multiple records into the database in a single SQL INSERT + # statement. It does not instantiate any models nor does it trigger + # Active Record callbacks or validations. Though passed values + # go through Active Record's type casting and serialization. + # + # The +attributes+ parameter is an Array of Hashes. Every Hash determines + # the attributes for a single row and must have the same keys. + # + # Rows are considered to be unique by every unique index on the table. Any + # duplicate rows are skipped. + # Override with :unique_by (see below). + # + # Returns an ActiveRecord::Result with its contents based on + # :returning (see below). + # + # ==== Options + # + # [:returning] + # (PostgreSQL, SQLite3, and MariaDB only) An array of attributes to return for all successfully + # inserted records, which by default is the primary key. + # Pass returning: %w[ id name ] for both id and name + # or returning: false to omit the underlying RETURNING SQL + # clause entirely. + # + # You can also pass an SQL string if you need more control on the return values + # (for example, returning: Arel.sql("id, name as new_name")). + # + # [:unique_by] + # (PostgreSQL and SQLite only) By default rows are considered to be unique + # by every unique index on the table. Any duplicate rows are skipped. + # + # To skip rows according to just one unique index pass :unique_by. + # + # Consider a Book model where no duplicate ISBNs make sense, but if any + # row has an existing id, or is not unique by another unique index, + # ActiveRecord::RecordNotUnique is raised. + # + # Unique indexes can be identified by columns or name: + # + # unique_by: :isbn + # unique_by: %i[ author_id name ] + # unique_by: :index_books_on_isbn + # + # [:record_timestamps] + # By default, automatic setting of timestamp columns is controlled by + # the model's record_timestamps config, matching typical + # behavior. + # + # To override this and force automatic setting of timestamp columns one + # way or the other, pass :record_timestamps: + # + # record_timestamps: true # Always set timestamps automatically + # record_timestamps: false # Never set timestamps automatically + # + # Because it relies on the index information from the database + # :unique_by is recommended to be paired with + # Active Record's schema_cache. + # + # ==== Example + # + # # Insert records and skip inserting any duplicates. + # # Here "Eloquent Ruby" is skipped because its id is not unique. + # + # Book.insert_all([ + # { id: 1, title: "Rework", author: "David" }, + # { id: 1, title: "Eloquent Ruby", author: "Russ" } + # ]) + # + # # insert_all works on chained scopes, and you can use create_with + # # to set default attributes for all inserted records. + # + # author.books.create_with(created_at: Time.now).insert_all([ + # { id: 1, title: "Rework" }, + # { id: 2, title: "Eloquent Ruby" } + # ]) + # + # source://activerecord/lib/active_record/relation.rb#716 + def insert_all(attributes, returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end + + # Inserts multiple records into the database in a single SQL INSERT + # statement. It does not instantiate any models nor does it trigger + # Active Record callbacks or validations. Though passed values + # go through Active Record's type casting and serialization. + # + # The +attributes+ parameter is an Array of Hashes. Every Hash determines + # the attributes for a single row and must have the same keys. + # + # Raises ActiveRecord::RecordNotUnique if any rows violate a + # unique index on the table. In that case, no rows are inserted. + # + # To skip duplicate rows, see #insert_all. To replace them, see #upsert_all. + # + # Returns an ActiveRecord::Result with its contents based on + # :returning (see below). + # + # ==== Options + # + # [:returning] + # (PostgreSQL, SQLite3, and MariaDB only) An array of attributes to return for all successfully + # inserted records, which by default is the primary key. + # Pass returning: %w[ id name ] for both id and name + # or returning: false to omit the underlying RETURNING SQL + # clause entirely. + # + # You can also pass an SQL string if you need more control on the return values + # (for example, returning: Arel.sql("id, name as new_name")). + # + # [:record_timestamps] + # By default, automatic setting of timestamp columns is controlled by + # the model's record_timestamps config, matching typical + # behavior. + # + # To override this and force automatic setting of timestamp columns one + # way or the other, pass :record_timestamps: + # + # record_timestamps: true # Always set timestamps automatically + # record_timestamps: false # Never set timestamps automatically + # + # ==== Examples + # + # # Insert multiple records + # Book.insert_all!([ + # { title: "Rework", author: "David" }, + # { title: "Eloquent Ruby", author: "Russ" } + # ]) + # + # # Raises ActiveRecord::RecordNotUnique because "Eloquent Ruby" + # # does not have a unique id. + # Book.insert_all!([ + # { id: 1, title: "Rework", author: "David" }, + # { id: 1, title: "Eloquent Ruby", author: "Russ" } + # ]) + # + # source://activerecord/lib/active_record/relation.rb#783 + def insert_all!(attributes, returning: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end + + # source://activerecord/lib/active_record/relation.rb#1283 def inspect; end # Joins that are also marked for preloading. In which case we should just eager load them. @@ -31463,12 +32258,12 @@ class ActiveRecord::Relation # represent the same association, but that aren't matched by this. Also, we could have # nested hashes which partially match, e.g. { a: :b } & { a: [:b, :c] } # - # source://activerecord/lib/active_record/relation.rb#808 + # source://activerecord/lib/active_record/relation.rb#1241 def joined_includes_values; end - # Returns the value of attribute klass. + # Returns the value of attribute model. # - # source://activerecord/lib/active_record/relation.rb#22 + # source://activerecord/lib/active_record/relation.rb#71 def klass; end # Causes the records to be loaded from the database if they have not @@ -31478,7 +32273,7 @@ class ActiveRecord::Relation # # Post.where(published: true).load # => # # - # source://activerecord/lib/active_record/relation.rb#740 + # source://activerecord/lib/active_record/relation.rb#1172 def load(&block); end # Schedule the query to be performed from a background thread pool. @@ -31492,40 +32287,37 @@ class ActiveRecord::Relation # for queries to actually be executed concurrently. Otherwise it defaults to # executing them in the foreground. # - # +load_async+ will also fall back to executing in the foreground in the test environment when transactional - # fixtures are enabled. - # # If the query was actually executed in the background, the Active Record logs will show # it by prefixing the log line with ASYNC: # # ASYNC Post Load (0.0ms) (db time 2ms) SELECT "posts".* FROM "posts" LIMIT 100 # - # source://activerecord/lib/active_record/relation.rb#711 + # source://activerecord/lib/active_record/relation.rb#1131 def load_async; end # Returns the value of attribute loaded. # - # source://activerecord/lib/active_record/relation.rb#22 + # source://activerecord/lib/active_record/relation.rb#71 def loaded; end # Returns the value of attribute loaded. # - # source://activerecord/lib/active_record/relation.rb#22 + # source://activerecord/lib/active_record/relation.rb#71 def loaded?; end - # source://activerecord/lib/active_record/relation/query_methods.rb#155 + # source://activerecord/lib/active_record/relation/query_methods.rb#174 def locked?; end # Returns true if there is more than one record. # # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#334 + # source://activerecord/lib/active_record/relation.rb#406 def many?; end - # Returns the value of attribute klass. + # Returns the value of attribute model. # - # source://activerecord/lib/active_record/relation.rb#22 + # source://activerecord/lib/active_record/relation.rb#71 def model; end # Initializes new record from relation while maintaining the current @@ -31541,7 +32333,7 @@ class ActiveRecord::Relation # user = users.new { |user| user.name = 'Oscar' } # user.name # => Oscar # - # source://activerecord/lib/active_record/relation.rb#69 + # source://activerecord/lib/active_record/relation.rb#118 def new(attributes = T.unsafe(nil), &block); end # Returns true if there are no records. @@ -31553,7 +32345,7 @@ class ActiveRecord::Relation # # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#299 + # source://activerecord/lib/active_record/relation.rb#371 def none?(*args); end # Returns true if there is exactly one record. @@ -31565,29 +32357,34 @@ class ActiveRecord::Relation # # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#325 + # source://activerecord/lib/active_record/relation.rb#397 def one?(*args); end # Returns the value of attribute predicate_builder. # - # source://activerecord/lib/active_record/relation.rb#22 + # source://activerecord/lib/active_record/relation.rb#71 def predicate_builder; end - # source://activerecord/lib/active_record/relation.rb#877 + # source://activerecord/lib/active_record/relation.rb#1314 def preload_associations(records); end - # source://activerecord/lib/active_record/relation.rb#824 + # source://activerecord/lib/active_record/relation.rb#1257 def pretty_print(pp); end - # source://activerecord/lib/active_record/relation.rb#263 + # @return [Boolean] + # + # source://activerecord/lib/active_record/relation.rb#1271 + def readonly?; end + + # source://activerecord/lib/active_record/relation.rb#335 def records; end # Forces reloading of relation. # - # source://activerecord/lib/active_record/relation.rb#750 + # source://activerecord/lib/active_record/relation.rb#1182 def reload; end - # source://activerecord/lib/active_record/relation.rb#755 + # source://activerecord/lib/active_record/relation.rb#1187 def reset; end # Returns true if the relation was scheduled on the background @@ -31595,10 +32392,10 @@ class ActiveRecord::Relation # # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#730 + # source://activerecord/lib/active_record/relation.rb#1162 def scheduled?; end - # source://activerecord/lib/active_record/relation.rb#791 + # source://activerecord/lib/active_record/relation.rb#1224 def scope_for_create; end # Scope all queries to the current scope. @@ -31616,39 +32413,42 @@ class ActiveRecord::Relation # Please check unscoped if you want to remove all previous scopes (including # the default_scope) during the execution of a block. # - # source://activerecord/lib/active_record/relation.rb#460 + # source://activerecord/lib/active_record/relation.rb#534 def scoping(all_queries: T.unsafe(nil), &block); end # Returns size of the records. # - # source://activerecord/lib/active_record/relation.rb#274 + # source://activerecord/lib/active_record/relation.rb#346 def size; end # Returns the value of attribute skip_preloading_value. # - # source://activerecord/lib/active_record/relation.rb#23 + # source://activerecord/lib/active_record/relation.rb#72 def skip_preloading_value; end # Sets the attribute skip_preloading_value # # @param value the value to set the attribute skip_preloading_value to. # - # source://activerecord/lib/active_record/relation.rb#23 + # source://activerecord/lib/active_record/relation.rb#72 def skip_preloading_value=(_arg0); end # Returns the value of attribute table. # - # source://activerecord/lib/active_record/relation.rb#22 + # source://activerecord/lib/active_record/relation.rb#71 def table; end + # source://activerecord/lib/active_record/relation.rb#1150 + def then(&block); end + # Converts relation objects to Array. # - # source://activerecord/lib/active_record/relation.rb#258 + # source://activerecord/lib/active_record/relation.rb#330 def to_a; end # Converts relation objects to Array. # - # source://activerecord/lib/active_record/relation.rb#258 + # source://activerecord/lib/active_record/relation.rb#330 def to_ary; end # Returns sql statement for the relation. @@ -31656,7 +32456,7 @@ class ActiveRecord::Relation # User.where(name: 'Oscar').to_sql # # SELECT "users".* FROM "users" WHERE "users"."name" = 'Oscar' # - # source://activerecord/lib/active_record/relation.rb#771 + # source://activerecord/lib/active_record/relation.rb#1203 def to_sql; end # Touches all records in the current relation, setting the +updated_at+/+updated_on+ attributes to the current time or the time specified. @@ -31683,13 +32483,13 @@ class ActiveRecord::Relation # Person.where(name: 'David').touch_all # # => "UPDATE \"people\" SET \"updated_at\" = '2018-01-04 22:55:23.132670' WHERE \"people\".\"name\" = 'David'" # - # source://activerecord/lib/active_record/relation.rb#604 + # source://activerecord/lib/active_record/relation.rb#962 def touch_all(*names, time: T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation.rb#533 + # source://activerecord/lib/active_record/relation.rb#614 def update(id = T.unsafe(nil), attributes); end - # source://activerecord/lib/active_record/relation.rb#541 + # source://activerecord/lib/active_record/relation.rb#622 def update!(id = T.unsafe(nil), attributes); end # Updates all records in the current relation with details given. This method constructs a single SQL UPDATE @@ -31723,7 +32523,7 @@ class ActiveRecord::Relation # # @raise [ArgumentError] # - # source://activerecord/lib/active_record/relation.rb#507 + # source://activerecord/lib/active_record/relation.rb#581 def update_all(updates); end # Updates the counters of the records in the current relation. @@ -31739,13 +32539,133 @@ class ActiveRecord::Relation # # For Posts by a given author increment the comment_count by 1. # Post.where(author_id: author.id).update_counters(comment_count: 1) # - # source://activerecord/lib/active_record/relation.rb#561 + # source://activerecord/lib/active_record/relation.rb#919 def update_counters(counters); end - # source://activerecord/lib/active_record/relation.rb#838 + # Updates or inserts (upserts) a single record into the database in a + # single SQL INSERT statement. It does not instantiate any models nor does + # it trigger Active Record callbacks or validations. Though passed values + # go through Active Record's type casting and serialization. + # + # See #upsert_all for documentation. + # + # source://activerecord/lib/active_record/relation.rb#793 + def upsert(attributes, **kwargs); end + + # Updates or inserts (upserts) multiple records into the database in a + # single SQL INSERT statement. It does not instantiate any models nor does + # it trigger Active Record callbacks or validations. Though passed values + # go through Active Record's type casting and serialization. + # + # The +attributes+ parameter is an Array of Hashes. Every Hash determines + # the attributes for a single row and must have the same keys. + # + # Returns an ActiveRecord::Result with its contents based on + # :returning (see below). + # + # By default, +upsert_all+ will update all the columns that can be updated when + # there is a conflict. These are all the columns except primary keys, read-only + # columns, and columns covered by the optional +unique_by+. + # + # ==== Options + # + # [:returning] + # (PostgreSQL, SQLite3, and MariaDB only) An array of attributes to return for all successfully + # inserted records, which by default is the primary key. + # Pass returning: %w[ id name ] for both id and name + # or returning: false to omit the underlying RETURNING SQL + # clause entirely. + # + # You can also pass an SQL string if you need more control on the return values + # (for example, returning: Arel.sql("id, name as new_name")). + # + # [:unique_by] + # (PostgreSQL and SQLite only) By default rows are considered to be unique + # by every unique index on the table. Any duplicate rows are skipped. + # + # To skip rows according to just one unique index pass :unique_by. + # + # Consider a Book model where no duplicate ISBNs make sense, but if any + # row has an existing id, or is not unique by another unique index, + # ActiveRecord::RecordNotUnique is raised. + # + # Unique indexes can be identified by columns or name: + # + # unique_by: :isbn + # unique_by: %i[ author_id name ] + # unique_by: :index_books_on_isbn + # + # Because it relies on the index information from the database + # :unique_by is recommended to be paired with + # Active Record's schema_cache. + # + # [:on_duplicate] + # Configure the SQL update sentence that will be used in case of conflict. + # + # NOTE: If you use this option you must provide all the columns you want to update + # by yourself. + # + # Example: + # + # Commodity.upsert_all( + # [ + # { id: 2, name: "Copper", price: 4.84 }, + # { id: 4, name: "Gold", price: 1380.87 }, + # { id: 6, name: "Aluminium", price: 0.35 } + # ], + # on_duplicate: Arel.sql("price = GREATEST(commodities.price, EXCLUDED.price)") + # ) + # + # See the related +:update_only+ option. Both options can't be used at the same time. + # + # [:update_only] + # Provide a list of column names that will be updated in case of conflict. If not provided, + # +upsert_all+ will update all the columns that can be updated. These are all the columns + # except primary keys, read-only columns, and columns covered by the optional +unique_by+ + # + # Example: + # + # Commodity.upsert_all( + # [ + # { id: 2, name: "Copper", price: 4.84 }, + # { id: 4, name: "Gold", price: 1380.87 }, + # { id: 6, name: "Aluminium", price: 0.35 } + # ], + # update_only: [:price] # Only prices will be updated + # ) + # + # See the related +:on_duplicate+ option. Both options can't be used at the same time. + # + # [:record_timestamps] + # By default, automatic setting of timestamp columns is controlled by + # the model's record_timestamps config, matching typical + # behavior. + # + # To override this and force automatic setting of timestamp columns one + # way or the other, pass :record_timestamps: + # + # record_timestamps: true # Always set timestamps automatically + # record_timestamps: false # Never set timestamps automatically + # + # ==== Examples + # + # # Inserts multiple records, performing an upsert when records have duplicate ISBNs. + # # Here "Eloquent Ruby" overwrites "Rework" because its ISBN is duplicate. + # + # Book.upsert_all([ + # { title: "Rework", author: "David", isbn: "1" }, + # { title: "Eloquent Ruby", author: "Russ", isbn: "1" } + # ], unique_by: :isbn) + # + # Book.find_by(isbn: "1").title # => "Eloquent Ruby" + # + # source://activerecord/lib/active_record/relation.rb#903 + def upsert_all(attributes, on_duplicate: T.unsafe(nil), update_only: T.unsafe(nil), returning: T.unsafe(nil), unique_by: T.unsafe(nil), record_timestamps: T.unsafe(nil)); end + + # source://activerecord/lib/active_record/relation.rb#1275 def values; end - # source://activerecord/lib/active_record/relation.rb#842 + # source://activerecord/lib/active_record/relation.rb#1279 def values_for_queries; end # Returns a hash of where conditions. @@ -31753,83 +32673,123 @@ class ActiveRecord::Relation # User.where(name: 'Oscar').where_values_hash # # => {name: "Oscar"} # - # source://activerecord/lib/active_record/relation.rb#787 + # source://activerecord/lib/active_record/relation.rb#1220 def where_values_hash(relation_table_name = T.unsafe(nil)); end protected - # source://activerecord/lib/active_record/relation.rb#887 + # source://activerecord/lib/active_record/relation.rb#1324 def load_records(records); end private - # source://activerecord/lib/active_record/relation.rb#913 + # source://activerecord/lib/active_record/relation.rb#1350 def _create(attributes, &block); end - # source://activerecord/lib/active_record/relation.rb#917 + # source://activerecord/lib/active_record/relation.rb#1354 def _create!(attributes, &block); end - # source://activerecord/lib/active_record/relation.rb#948 + # source://activerecord/lib/active_record/relation.rb#1389 def _increment_attribute(attribute, value = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation.rb#909 + # source://activerecord/lib/active_record/relation.rb#1346 def _new(attributes, &block); end - # source://activerecord/lib/active_record/relation.rb#921 + # source://activerecord/lib/active_record/relation.rb#1358 def _scoping(scope, registry, all_queries = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation.rb#937 + # source://activerecord/lib/active_record/relation.rb#1374 def _substitute_values(values); end # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#893 + # source://activerecord/lib/active_record/relation.rb#1330 def already_in_scope?(registry); end - # source://activerecord/lib/active_record/relation.rb#364 + # source://activerecord/lib/active_record/relation.rb#436 def compute_cache_key(timestamp_column = T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation.rb#393 + # source://activerecord/lib/active_record/relation.rb#465 def compute_cache_version(timestamp_column); end - # source://activerecord/lib/active_record/relation.rb#901 + # source://activerecord/lib/active_record/relation.rb#1338 def current_scope_restoring_block(&block); end - # source://activerecord/lib/active_record/relation.rb#975 + # source://activerecord/lib/active_record/relation.rb#1416 def exec_main_query(async: T.unsafe(nil)); end - # source://activerecord/lib/active_record/relation.rb#955 + # source://activerecord/lib/active_record/relation.rb#1396 def exec_queries(&block); end # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#897 + # source://activerecord/lib/active_record/relation.rb#1334 def global_scope?(registry); end - # source://activerecord/lib/active_record/relation.rb#41 + # source://activerecord/lib/active_record/relation.rb#90 def initialize_copy(other); end - # source://activerecord/lib/active_record/relation.rb#1003 + # source://activerecord/lib/active_record/relation.rb#1448 def instantiate_records(rows, &block); end - # source://activerecord/lib/active_record/relation.rb#1046 + # source://activerecord/lib/active_record/relation.rb#1491 def limited_count; end # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#1022 + # source://activerecord/lib/active_record/relation.rb#1467 def references_eager_loaded_tables?; end - # source://activerecord/lib/active_record/relation.rb#1014 + # source://activerecord/lib/active_record/relation.rb#1459 def skip_query_cache_if_necessary(&block); end - # source://activerecord/lib/active_record/relation.rb#1039 + # source://activerecord/lib/active_record/relation.rb#1484 def tables_in_string(string); end end -# source://activerecord/lib/active_record/relation.rb#14 +# source://activerecord/lib/active_record/relation.rb#62 ActiveRecord::Relation::CLAUSE_METHODS = T.let(T.unsafe(nil), Array) +# source://activerecord/lib/active_record/relation.rb#6 +class ActiveRecord::Relation::ExplainProxy + # @return [ExplainProxy] a new instance of ExplainProxy + # + # source://activerecord/lib/active_record/relation.rb#7 + def initialize(relation, options); end + + # source://activerecord/lib/active_record/relation.rb#16 + def average(column_name); end + + # source://activerecord/lib/active_record/relation.rb#20 + def count(column_name = T.unsafe(nil)); end + + # source://activerecord/lib/active_record/relation.rb#24 + def first(limit = T.unsafe(nil)); end + + # source://activerecord/lib/active_record/relation.rb#12 + def inspect; end + + # source://activerecord/lib/active_record/relation.rb#28 + def last(limit = T.unsafe(nil)); end + + # source://activerecord/lib/active_record/relation.rb#32 + def maximum(column_name); end + + # source://activerecord/lib/active_record/relation.rb#36 + def minimum(column_name); end + + # source://activerecord/lib/active_record/relation.rb#40 + def pluck(*column_names); end + + # source://activerecord/lib/active_record/relation.rb#44 + def sum(identity_or_column = T.unsafe(nil)); end + + private + + # source://activerecord/lib/active_record/relation.rb#49 + def exec_explain(&block); end +end + # source://activerecord/lib/active_record/relation/from_clause.rb#5 class ActiveRecord::Relation::FromClause # @return [FromClause] a new instance of FromClause @@ -31869,14 +32829,14 @@ class ActiveRecord::Relation::HashMerger # @return [HashMerger] a new instance of HashMerger # # source://activerecord/lib/active_record/relation/merger.rb#10 - def initialize(relation, hash, rewhere = T.unsafe(nil)); end + def initialize(relation, hash); end # Returns the value of attribute hash. # # source://activerecord/lib/active_record/relation/merger.rb#8 def hash; end - # source://activerecord/lib/active_record/relation/merger.rb#18 + # source://activerecord/lib/active_record/relation/merger.rb#17 def merge; end # Applying values to a relation has some side effects. E.g. @@ -31884,7 +32844,7 @@ class ActiveRecord::Relation::HashMerger # build a relation to merge in rather than directly merging # the values. # - # source://activerecord/lib/active_record/relation/merger.rb#26 + # source://activerecord/lib/active_record/relation/merger.rb#25 def other; end # Returns the value of attribute relation. @@ -31893,67 +32853,67 @@ class ActiveRecord::Relation::HashMerger def relation; end end -# source://activerecord/lib/active_record/relation.rb#15 +# source://activerecord/lib/active_record/relation.rb#63 ActiveRecord::Relation::INVALID_METHODS_FOR_DELETE_ALL = T.let(T.unsafe(nil), Array) -# source://activerecord/lib/active_record/relation.rb#6 +# source://activerecord/lib/active_record/relation.rb#54 ActiveRecord::Relation::MULTI_VALUE_METHODS = T.let(T.unsafe(nil), Array) -# source://activerecord/lib/active_record/relation/merger.rb#44 +# source://activerecord/lib/active_record/relation/merger.rb#43 class ActiveRecord::Relation::Merger # @return [Merger] a new instance of Merger # - # source://activerecord/lib/active_record/relation/merger.rb#47 - def initialize(relation, other, rewhere = T.unsafe(nil)); end + # source://activerecord/lib/active_record/relation/merger.rb#46 + def initialize(relation, other); end - # source://activerecord/lib/active_record/relation/merger.rb#60 + # source://activerecord/lib/active_record/relation/merger.rb#58 def merge; end # Returns the value of attribute other. # - # source://activerecord/lib/active_record/relation/merger.rb#45 + # source://activerecord/lib/active_record/relation/merger.rb#44 def other; end # Returns the value of attribute relation. # - # source://activerecord/lib/active_record/relation/merger.rb#45 + # source://activerecord/lib/active_record/relation/merger.rb#44 def relation; end # Returns the value of attribute values. # - # source://activerecord/lib/active_record/relation/merger.rb#45 + # source://activerecord/lib/active_record/relation/merger.rb#44 def values; end private - # source://activerecord/lib/active_record/relation/merger.rb#178 + # source://activerecord/lib/active_record/relation/merger.rb#176 def merge_clauses; end - # source://activerecord/lib/active_record/relation/merger.rb#119 + # source://activerecord/lib/active_record/relation/merger.rb#117 def merge_joins; end - # source://activerecord/lib/active_record/relation/merger.rb#157 + # source://activerecord/lib/active_record/relation/merger.rb#155 def merge_multi_values; end - # source://activerecord/lib/active_record/relation/merger.rb#138 + # source://activerecord/lib/active_record/relation/merger.rb#136 def merge_outer_joins; end - # source://activerecord/lib/active_record/relation/merger.rb#98 + # source://activerecord/lib/active_record/relation/merger.rb#96 def merge_preloads; end - # source://activerecord/lib/active_record/relation/merger.rb#86 + # source://activerecord/lib/active_record/relation/merger.rb#84 def merge_select_values; end - # source://activerecord/lib/active_record/relation/merger.rb#170 + # source://activerecord/lib/active_record/relation/merger.rb#168 def merge_single_values; end # @return [Boolean] # - # source://activerecord/lib/active_record/relation/merger.rb#188 + # source://activerecord/lib/active_record/relation/merger.rb#186 def replace_from_clause?; end end -# source://activerecord/lib/active_record/relation/merger.rb#54 +# source://activerecord/lib/active_record/relation/merger.rb#52 ActiveRecord::Relation::Merger::NORMAL_VALUES = T.let(T.unsafe(nil), Array) # source://activerecord/lib/active_record/relation/query_attribute.rb#7 @@ -32004,23 +32964,23 @@ class ActiveRecord::Relation::QueryAttribute < ::ActiveModel::Attribute def infinity?(value); end end -# source://activerecord/lib/active_record/relation.rb#11 +# source://activerecord/lib/active_record/relation.rb#59 ActiveRecord::Relation::SINGLE_VALUE_METHODS = T.let(T.unsafe(nil), Array) -# source://activerecord/lib/active_record/relation.rb#867 +# source://activerecord/lib/active_record/relation.rb#1304 class ActiveRecord::Relation::StrictLoadingScope class << self # @return [Boolean] # - # source://activerecord/lib/active_record/relation.rb#868 + # source://activerecord/lib/active_record/relation.rb#1305 def empty_scope?; end - # source://activerecord/lib/active_record/relation.rb#872 + # source://activerecord/lib/active_record/relation.rb#1309 def strict_loading_value; end end end -# source://activerecord/lib/active_record/relation.rb#17 +# source://activerecord/lib/active_record/relation.rb#65 ActiveRecord::Relation::VALUE_METHODS = T.let(T.unsafe(nil), Array) # source://activerecord/lib/active_record/relation/where_clause.rb#7 @@ -32056,7 +33016,7 @@ class ActiveRecord::Relation::WhereClause # source://activerecord/lib/active_record/relation/where_clause.rb#75 def eql?(other); end - # source://activerecord/lib/active_record/relation/where_clause.rb#36 + # source://activerecord/lib/active_record/relation/where_clause.rb#32 def except(*columns); end # source://activerecord/lib/active_record/relation/where_clause.rb#110 @@ -32069,9 +33029,9 @@ class ActiveRecord::Relation::WhereClause def invert; end # source://activerecord/lib/active_record/relation/where_clause.rb#26 - def merge(other, rewhere = T.unsafe(nil)); end + def merge(other); end - # source://activerecord/lib/active_record/relation/where_clause.rb#40 + # source://activerecord/lib/active_record/relation/where_clause.rb#36 def or(other); end # source://activerecord/lib/active_record/relation/where_clause.rb#61 @@ -32100,31 +33060,28 @@ class ActiveRecord::Relation::WhereClause # @return [Boolean] # - # source://activerecord/lib/active_record/relation/where_clause.rb#171 + # source://activerecord/lib/active_record/relation/where_clause.rb#159 def equality_node?(node); end - # source://activerecord/lib/active_record/relation/where_clause.rb#186 + # source://activerecord/lib/active_record/relation/where_clause.rb#174 def except_predicates(columns); end # source://activerecord/lib/active_record/relation/where_clause.rb#136 def extract_attribute(node); end - # source://activerecord/lib/active_record/relation/where_clause.rb#221 + # source://activerecord/lib/active_record/relation/where_clause.rb#209 def extract_node_value(node); end - # source://activerecord/lib/active_record/relation/where_clause.rb#175 + # source://activerecord/lib/active_record/relation/where_clause.rb#163 def invert_predicate(node); end - # source://activerecord/lib/active_record/relation/where_clause.rb#210 + # source://activerecord/lib/active_record/relation/where_clause.rb#198 def non_empty_predicates; end - # source://activerecord/lib/active_record/relation/where_clause.rb#159 - def predicates_unreferenced_by(other); end - - # source://activerecord/lib/active_record/relation/where_clause.rb#199 + # source://activerecord/lib/active_record/relation/where_clause.rb#187 def predicates_with_wrapped_sql_literals; end - # source://activerecord/lib/active_record/relation/where_clause.rb#214 + # source://activerecord/lib/active_record/relation/where_clause.rb#202 def wrap_sql_literal(node); end class << self @@ -32133,7 +33090,7 @@ class ActiveRecord::Relation::WhereClause end end -# source://activerecord/lib/active_record/relation/where_clause.rb#209 +# source://activerecord/lib/active_record/relation/where_clause.rb#197 ActiveRecord::Relation::WhereClause::ARRAY_WITH_EMPTY_STRING = T.let(T.unsafe(nil), Array) # = Active Record \Result @@ -32142,7 +33099,7 @@ ActiveRecord::Relation::WhereClause::ARRAY_WITH_EMPTY_STRING = T.let(T.unsafe(ni # {#exec_query}[rdoc-ref:ConnectionAdapters::DatabaseStatements#exec_query] # on any database connection adapter. For example: # -# result = ActiveRecord::Base.connection.exec_query('SELECT id, title, body FROM posts') +# result = ActiveRecord::Base.lease_connection.exec_query('SELECT id, title, body FROM posts') # result # => # # # # Get the column names of the result: @@ -32174,104 +33131,155 @@ class ActiveRecord::Result # @return [Result] a new instance of Result # - # source://activerecord/lib/active_record/result.rb#49 + # source://activerecord/lib/active_record/result.rb#102 def initialize(columns, rows, column_types = T.unsafe(nil)); end - # source://activerecord/lib/active_record/result.rb#90 + # source://activerecord/lib/active_record/result.rb#148 def [](idx); end - # source://activerecord/lib/active_record/result.rb#103 + # source://activerecord/lib/active_record/result.rb#161 def cancel; end - # source://activerecord/lib/active_record/result.rb#107 + # source://activerecord/lib/active_record/result.rb#165 def cast_values(type_overrides = T.unsafe(nil)); end + # source://activerecord/lib/active_record/result.rb#202 + def column_indexes; end + # Returns the value of attribute column_types. # - # source://activerecord/lib/active_record/result.rb#39 + # source://activerecord/lib/active_record/result.rb#92 def column_types; end # Returns the value of attribute columns. # - # source://activerecord/lib/active_record/result.rb#39 + # source://activerecord/lib/active_record/result.rb#92 def columns; end # Calls the given block once for each element in row collection, passing - # row as parameter. + # row as parameter. Each row is a Hash-like, read only object. + # + # To get real hashes, use +.to_a.each+. # # Returns an +Enumerator+ if no block is given. # - # source://activerecord/lib/active_record/result.rb#70 + # source://activerecord/lib/active_record/result.rb#128 def each(&block); end # Returns true if there are no records, otherwise false. # # @return [Boolean] # - # source://activerecord/lib/active_record/result.rb#79 + # source://activerecord/lib/active_record/result.rb#137 def empty?; end - # source://activerecord/lib/active_record/result.rb#140 + # source://activerecord/lib/active_record/result.rb#196 def freeze; end # Returns true if this result set includes the column named +name+ # # @return [Boolean] # - # source://activerecord/lib/active_record/result.rb#57 + # source://activerecord/lib/active_record/result.rb#113 def includes_column?(name); end # Returns the last record from the rows collection. # - # source://activerecord/lib/active_record/result.rb#95 + # source://activerecord/lib/active_record/result.rb#153 def last(n = T.unsafe(nil)); end # Returns the number of elements in the rows array. # - # source://activerecord/lib/active_record/result.rb#62 + # source://activerecord/lib/active_record/result.rb#118 def length; end - # source://activerecord/lib/active_record/result.rb#99 + # source://activerecord/lib/active_record/result.rb#157 def result; end # Returns the value of attribute rows. # - # source://activerecord/lib/active_record/result.rb#39 + # source://activerecord/lib/active_record/result.rb#92 def rows; end # Returns an array of hashes representing each row record. # - # source://activerecord/lib/active_record/result.rb#84 + # source://activerecord/lib/active_record/result.rb#142 def to_a; end # Returns an array of hashes representing each row record. # - # source://activerecord/lib/active_record/result.rb#84 + # source://activerecord/lib/active_record/result.rb#142 def to_ary; end private - # source://activerecord/lib/active_record/result.rb#146 + # source://activerecord/lib/active_record/result.rb#216 def column_type(name, index, type_overrides); end - # source://activerecord/lib/active_record/result.rb#154 + # source://activerecord/lib/active_record/result.rb#231 def hash_rows; end - # source://activerecord/lib/active_record/result.rb#133 + # source://activerecord/lib/active_record/result.rb#224 + def indexed_rows; end + + # source://activerecord/lib/active_record/result.rb#191 def initialize_copy(other); end class << self - # source://activerecord/lib/active_record/result.rb#41 + # source://activerecord/lib/active_record/result.rb#94 def empty(async: T.unsafe(nil)); end end end -# source://activerecord/lib/active_record/result.rb#195 +# source://activerecord/lib/active_record/result.rb#243 ActiveRecord::Result::EMPTY = T.let(T.unsafe(nil), ActiveRecord::Result) -# source://activerecord/lib/active_record/result.rb#198 +# source://activerecord/lib/active_record/result.rb#246 ActiveRecord::Result::EMPTY_ASYNC = T.let(T.unsafe(nil), ActiveRecord::FutureResult::Complete) +# source://activerecord/lib/active_record/result.rb#240 +ActiveRecord::Result::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# source://activerecord/lib/active_record/result.rb#39 +class ActiveRecord::Result::IndexedRow + # @return [IndexedRow] a new instance of IndexedRow + # + # source://activerecord/lib/active_record/result.rb#40 + def initialize(column_indexes, row); end + + # source://activerecord/lib/active_record/result.rb#58 + def ==(other); end + + # source://activerecord/lib/active_record/result.rb#80 + def [](column); end + + # source://activerecord/lib/active_record/result.rb#50 + def each_key(&block); end + + # source://activerecord/lib/active_record/result.rb#70 + def fetch(column); end + + # @return [Boolean] + # + # source://activerecord/lib/active_record/result.rb#66 + def key?(column); end + + # source://activerecord/lib/active_record/result.rb#54 + def keys; end + + # source://activerecord/lib/active_record/result.rb#45 + def length; end + + # source://activerecord/lib/active_record/result.rb#45 + def size; end + + # source://activerecord/lib/active_record/result.rb#86 + def to_h; end + + # source://activerecord/lib/active_record/result.rb#86 + def to_hash; end +end + # {ActiveRecord::Base.transaction}[rdoc-ref:Transactions::ClassMethods#transaction] # uses this exception to distinguish a deliberate rollback from other exceptional situations. # Normally, raising an exception will cause the @@ -32301,7 +33309,7 @@ ActiveRecord::Result::EMPTY_ASYNC = T.let(T.unsafe(nil), ActiveRecord::FutureRes # end # end # -# source://activerecord/lib/active_record/errors.rb#408 +# source://activerecord/lib/active_record/errors.rb#435 class ActiveRecord::Rollback < ::ActiveRecord::ActiveRecordError; end # This is a thread locals registry for Active Record. For example: @@ -32320,9 +33328,30 @@ module ActiveRecord::RuntimeRegistry # source://activerecord/lib/active_record/runtime_registry.rb#24 def async_sql_runtime=(runtime); end + # source://activerecord/lib/active_record/runtime_registry.rb#36 + def cached_queries_count; end + + # source://activerecord/lib/active_record/runtime_registry.rb#40 + def cached_queries_count=(count); end + # source://activerecord/lib/active_record/runtime_registry.rb#28 + def queries_count; end + + # source://activerecord/lib/active_record/runtime_registry.rb#32 + def queries_count=(count); end + + # source://activerecord/lib/active_record/runtime_registry.rb#44 def reset; end + # source://activerecord/lib/active_record/runtime_registry.rb#62 + def reset_cached_queries_count; end + + # source://activerecord/lib/active_record/runtime_registry.rb#56 + def reset_queries_count; end + + # source://activerecord/lib/active_record/runtime_registry.rb#50 + def reset_runtimes; end + # source://activerecord/lib/active_record/runtime_registry.rb#12 def sql_runtime; end @@ -32332,33 +33361,33 @@ end # Raised when a statement produces an SQL warning. # -# source://activerecord/lib/active_record/errors.rb#284 +# source://activerecord/lib/active_record/errors.rb#305 class ActiveRecord::SQLWarning < ::ActiveRecord::AdapterError # @return [SQLWarning] a new instance of SQLWarning # - # source://activerecord/lib/active_record/errors.rb#288 + # source://activerecord/lib/active_record/errors.rb#309 def initialize(message = T.unsafe(nil), code = T.unsafe(nil), level = T.unsafe(nil), sql = T.unsafe(nil), connection_pool = T.unsafe(nil)); end # Returns the value of attribute code. # - # source://activerecord/lib/active_record/errors.rb#285 + # source://activerecord/lib/active_record/errors.rb#306 def code; end # Returns the value of attribute level. # - # source://activerecord/lib/active_record/errors.rb#285 + # source://activerecord/lib/active_record/errors.rb#306 def level; end # Returns the value of attribute sql. # - # source://activerecord/lib/active_record/errors.rb#286 + # source://activerecord/lib/active_record/errors.rb#307 def sql; end # Sets the attribute sql # # @param value the value to set the attribute sql to. # - # source://activerecord/lib/active_record/errors.rb#286 + # source://activerecord/lib/active_record/errors.rb#307 def sql=(_arg0); end end @@ -32371,7 +33400,7 @@ end # source://activerecord/lib/active_record/sanitization.rb#7 module ActiveRecord::Sanitization::ClassMethods - # source://activerecord/lib/active_record/sanitization.rb#176 + # source://activerecord/lib/active_record/sanitization.rb#183 def disallow_raw_sql!(args, permit: T.unsafe(nil)); end # Accepts an array of SQL conditions and sanitizes them into a valid @@ -32386,7 +33415,7 @@ module ActiveRecord::Sanitization::ClassMethods # sanitize_sql_for_conditions(["name='%s' and group_id='%s'", "foo'bar", 4]) # # => "name='foo''bar' and group_id='4'" # - # This method will NOT sanitize a SQL string since it won't contain + # This method will NOT sanitize an SQL string since it won't contain # any conditions in it and will return the string as is. # # sanitize_sql_for_conditions("name='foo''bar' and group_id='4'") @@ -32428,7 +33457,7 @@ module ActiveRecord::Sanitization::ClassMethods # sanitize_sql_array(["role = ?", 0]) # # => "role = '0'" # - # source://activerecord/lib/active_record/sanitization.rb#163 + # source://activerecord/lib/active_record/sanitization.rb#164 def sanitize_sql_array(ary); end # Accepts an array or hash of SQL conditions and sanitizes them into @@ -32443,7 +33472,7 @@ module ActiveRecord::Sanitization::ClassMethods # Post.sanitize_sql_for_assignment({ name: nil, group_id: 4 }) # # => "`posts`.`name` = NULL, `posts`.`group_id` = 4" # - # This method will NOT sanitize a SQL string since it won't contain + # This method will NOT sanitize an SQL string since it won't contain # any conditions in it and will return the string as is. # # sanitize_sql_for_assignment("name=NULL and group_id='4'") @@ -32472,7 +33501,7 @@ module ActiveRecord::Sanitization::ClassMethods # sanitize_sql_for_conditions(["name='%s' and group_id='%s'", "foo'bar", 4]) # # => "name='foo''bar' and group_id='4'" # - # This method will NOT sanitize a SQL string since it won't contain + # This method will NOT sanitize an SQL string since it won't contain # any conditions in it and will return the string as is. # # sanitize_sql_for_conditions("name='foo''bar' and group_id='4'") @@ -32525,25 +33554,25 @@ module ActiveRecord::Sanitization::ClassMethods # sanitize_sql_like("snake_cased_string", "!") # # => "snake!_cased!_string" # - # source://activerecord/lib/active_record/sanitization.rb#131 + # source://activerecord/lib/active_record/sanitization.rb#132 def sanitize_sql_like(string, escape_character = T.unsafe(nil)); end private - # source://activerecord/lib/active_record/sanitization.rb#227 - def quote_bound_value(value, c = T.unsafe(nil)); end + # source://activerecord/lib/active_record/sanitization.rb#233 + def quote_bound_value(connection, value); end - # source://activerecord/lib/active_record/sanitization.rb#241 + # source://activerecord/lib/active_record/sanitization.rb#247 def raise_if_bind_arity_mismatch(statement, expected, provided); end - # source://activerecord/lib/active_record/sanitization.rb#205 - def replace_bind_variable(value, c = T.unsafe(nil)); end + # source://activerecord/lib/active_record/sanitization.rb#211 + def replace_bind_variable(connection, value); end - # source://activerecord/lib/active_record/sanitization.rb#196 - def replace_bind_variables(statement, values); end + # source://activerecord/lib/active_record/sanitization.rb#203 + def replace_bind_variables(connection, statement, values); end - # source://activerecord/lib/active_record/sanitization.rb#213 - def replace_named_bind_variables(statement, bind_vars); end + # source://activerecord/lib/active_record/sanitization.rb#219 + def replace_named_bind_variables(connection, statement, bind_vars); end end # = Active Record \Schema @@ -32581,7 +33610,7 @@ class ActiveRecord::Schema < ::ActiveRecord::Migration::Current extend ::ActiveRecord::Schema::Definition::ClassMethods class << self - # source://activerecord/lib/active_record/schema.rb#68 + # source://activerecord/lib/active_record/schema.rb#70 def [](version); end end end @@ -32624,7 +33653,7 @@ end class ActiveRecord::SchemaDumper # @return [SchemaDumper] a new instance of SchemaDumper # - # source://activerecord/lib/active_record/schema_dumper.rb#71 + # source://activerecord/lib/active_record/schema_dumper.rb#74 def initialize(connection, options = T.unsafe(nil)); end # :singleton-method: @@ -32637,7 +33666,7 @@ class ActiveRecord::SchemaDumper # source://activerecord/lib/active_record/schema_dumper.rb#29 def chk_ignore_pattern=(val); end - # source://activerecord/lib/active_record/schema_dumper.rb#58 + # source://activerecord/lib/active_record/schema_dumper.rb#60 def dump(stream); end # :singleton-method: @@ -32682,87 +33711,92 @@ class ActiveRecord::SchemaDumper private - # source://activerecord/lib/active_record/schema_dumper.rb#263 + # source://activerecord/lib/active_record/schema_dumper.rb#278 def check_constraints_in_create(table, stream); end - # source://activerecord/lib/active_record/schema_dumper.rb#89 + # source://activerecord/lib/active_record/schema_dumper.rb#92 def define_params; end # extensions are only supported by PostgreSQL # - # source://activerecord/lib/active_record/schema_dumper.rb#116 + # source://activerecord/lib/active_record/schema_dumper.rb#119 def extensions(stream); end - # source://activerecord/lib/active_record/schema_dumper.rb#283 + # source://activerecord/lib/active_record/schema_dumper.rb#298 def foreign_keys(table, stream); end - # source://activerecord/lib/active_record/schema_dumper.rb#315 + # source://activerecord/lib/active_record/schema_dumper.rb#330 def format_colspec(colspec); end - # source://activerecord/lib/active_record/schema_dumper.rb#325 + # source://activerecord/lib/active_record/schema_dumper.rb#340 def format_index_parts(options); end - # source://activerecord/lib/active_record/schema_dumper.rb#321 + # source://activerecord/lib/active_record/schema_dumper.rb#336 def format_options(options); end # turns 20170404131909 into "2017_04_04_131909" # - # source://activerecord/lib/active_record/schema_dumper.rb#83 + # source://activerecord/lib/active_record/schema_dumper.rb#86 def formatted_version; end - # source://activerecord/lib/active_record/schema_dumper.rb#93 + # source://activerecord/lib/active_record/schema_dumper.rb#96 def header(stream); end # @return [Boolean] # - # source://activerecord/lib/active_record/schema_dumper.rb#343 + # source://activerecord/lib/active_record/schema_dumper.rb#358 def ignored?(table_name); end - # source://activerecord/lib/active_record/schema_dumper.rb#245 + # source://activerecord/lib/active_record/schema_dumper.rb#260 def index_parts(index); end # Keep it for indexing materialized views # - # source://activerecord/lib/active_record/schema_dumper.rb#212 + # source://activerecord/lib/active_record/schema_dumper.rb#227 def indexes(table, stream); end - # source://activerecord/lib/active_record/schema_dumper.rb#224 + # source://activerecord/lib/active_record/schema_dumper.rb#239 def indexes_in_create(table, stream); end - # source://activerecord/lib/active_record/schema_dumper.rb#333 + # source://activerecord/lib/active_record/schema_dumper.rb#348 def remove_prefix_and_suffix(table); end # schemas are only supported by PostgreSQL # - # source://activerecord/lib/active_record/schema_dumper.rb#124 + # source://activerecord/lib/active_record/schema_dumper.rb#127 def schemas(stream); end - # source://activerecord/lib/active_record/schema_dumper.rb#142 + # source://activerecord/lib/active_record/schema_dumper.rb#158 def table(table, stream); end # Returns the value of attribute table_name. # - # source://activerecord/lib/active_record/schema_dumper.rb#69 + # source://activerecord/lib/active_record/schema_dumper.rb#72 def table_name; end # Sets the attribute table_name # # @param value the value to set the attribute table_name to. # - # source://activerecord/lib/active_record/schema_dumper.rb#69 + # source://activerecord/lib/active_record/schema_dumper.rb#72 def table_name=(_arg0); end - # source://activerecord/lib/active_record/schema_dumper.rb#127 + # source://activerecord/lib/active_record/schema_dumper.rb#134 def tables(stream); end - # source://activerecord/lib/active_record/schema_dumper.rb#111 + # source://activerecord/lib/active_record/schema_dumper.rb#114 def trailer(stream); end # (enum) types are only supported by PostgreSQL # - # source://activerecord/lib/active_record/schema_dumper.rb#120 + # source://activerecord/lib/active_record/schema_dumper.rb#123 def types(stream); end + # virtual tables are only supported by SQLite + # + # source://activerecord/lib/active_record/schema_dumper.rb#131 + def virtual_tables(stream); end + class << self # source://activerecord/lib/active_record/schema_dumper.rb#29 def chk_ignore_pattern; end @@ -32771,7 +33805,7 @@ class ActiveRecord::SchemaDumper def chk_ignore_pattern=(val); end # source://activerecord/lib/active_record/schema_dumper.rb#44 - def dump(connection = T.unsafe(nil), stream = T.unsafe(nil), config = T.unsafe(nil)); end + def dump(pool = T.unsafe(nil), stream = T.unsafe(nil), config = T.unsafe(nil)); end # source://activerecord/lib/active_record/schema_dumper.rb#35 def excl_ignore_pattern; end @@ -32799,7 +33833,7 @@ class ActiveRecord::SchemaDumper private - # source://activerecord/lib/active_record/schema_dumper.rb#50 + # source://activerecord/lib/active_record/schema_dumper.rb#52 def generate_options(config); end def new(*_arg0); end @@ -32816,57 +33850,52 @@ class ActiveRecord::SchemaMigration # @return [SchemaMigration] a new instance of SchemaMigration # # source://activerecord/lib/active_record/schema_migration.rb#14 - def initialize(connection); end + def initialize(pool); end # Returns the value of attribute arel_table. # # source://activerecord/lib/active_record/schema_migration.rb#12 def arel_table; end - # Returns the value of attribute connection. - # - # source://activerecord/lib/active_record/schema_migration.rb#12 - def connection; end - - # source://activerecord/lib/active_record/schema_migration.rb#78 + # source://activerecord/lib/active_record/schema_migration.rb#91 def count; end - # source://activerecord/lib/active_record/schema_migration.rb#46 + # source://activerecord/lib/active_record/schema_migration.rb#53 def create_table; end # source://activerecord/lib/active_record/schema_migration.rb#19 def create_version(version); end - # source://activerecord/lib/active_record/schema_migration.rb#32 + # source://activerecord/lib/active_record/schema_migration.rb#36 def delete_all_versions; end - # source://activerecord/lib/active_record/schema_migration.rb#25 + # source://activerecord/lib/active_record/schema_migration.rb#27 def delete_version(version); end - # source://activerecord/lib/active_record/schema_migration.rb#54 + # source://activerecord/lib/active_record/schema_migration.rb#63 def drop_table; end - # source://activerecord/lib/active_record/schema_migration.rb#74 + # source://activerecord/lib/active_record/schema_migration.rb#87 def integer_versions; end - # source://activerecord/lib/active_record/schema_migration.rb#58 + # source://activerecord/lib/active_record/schema_migration.rb#69 def normalize_migration_number(number); end - # source://activerecord/lib/active_record/schema_migration.rb#62 + # source://activerecord/lib/active_record/schema_migration.rb#73 def normalized_versions; end - # source://activerecord/lib/active_record/schema_migration.rb#38 + # source://activerecord/lib/active_record/schema_migration.rb#45 def primary_key; end # @return [Boolean] # - # source://activerecord/lib/active_record/schema_migration.rb#85 + # source://activerecord/lib/active_record/schema_migration.rb#100 def table_exists?; end - # source://activerecord/lib/active_record/schema_migration.rb#42 + # source://activerecord/lib/active_record/schema_migration.rb#49 def table_name; end - # source://activerecord/lib/active_record/schema_migration.rb#66 + # source://activerecord/lib/active_record/schema_migration.rb#77 def versions; end end @@ -33484,12 +34513,12 @@ end # This is a subclass of TransactionRollbackError, please make sure to check # its documentation to be aware of its caveats. # -# source://activerecord/lib/active_record/errors.rb#517 +# source://activerecord/lib/active_record/errors.rb#544 class ActiveRecord::SerializationFailure < ::ActiveRecord::TransactionRollbackError; end # Raised when unserialized object's type mismatches one specified for serializable field. # -# source://activerecord/lib/active_record/errors.rb#41 +# source://activerecord/lib/active_record/errors.rb#37 class ActiveRecord::SerializationTypeMismatch < ::ActiveRecord::ActiveRecordError; end # = Active Record Signed Id @@ -33503,7 +34532,16 @@ module ActiveRecord::SignedId mixes_in_class_methods ::ActiveRecord::SignedId::ClassMethods # Returns a signed id that's generated using a preconfigured +ActiveSupport::MessageVerifier+ instance. + # # This signed id is tamper proof, so it's safe to send in an email or otherwise share with the outside world. + # However, as with any message signed with a +ActiveSupport::MessageVerifier+, + # {the signed id is not encrypted}[link:classes/ActiveSupport/MessageVerifier.html#class-ActiveSupport::MessageVerifier-label-Signing+is+not+encryption]. + # It's just encoded and protected against tampering. + # + # This means that the ID can be decoded by anyone; however, if tampered with (so to point to a different ID), + # the cryptographic signature will no longer match, and the signed id will be considered invalid and return nil + # when passed to +find_signed+ (or raise with +find_signed!+). + # # It can furthermore be set to expire (the default is not to expire), and scoped down with a specific purpose. # If the expiration date has been exceeded before +find_signed+ is called, the id won't find the designated # record. If a purpose is set, this too must match. @@ -33519,7 +34557,7 @@ module ActiveRecord::SignedId # # @raise [ArgumentError] # - # source://activerecord/lib/active_record/signed_id.rb#112 + # source://activerecord/lib/active_record/signed_id.rb#131 def signed_id(expires_in: T.unsafe(nil), expires_at: T.unsafe(nil), purpose: T.unsafe(nil)); end module GeneratedClassMethods @@ -33534,9 +34572,9 @@ module ActiveRecord::SignedId end end -# source://activerecord/lib/active_record/signed_id.rb#16 +# source://activerecord/lib/active_record/signed_id.rb#26 module ActiveRecord::SignedId::ClassMethods - # source://activerecord/lib/active_record/signed_id.rb#92 + # source://activerecord/lib/active_record/signed_id.rb#102 def combine_signed_id_purposes(purpose); end # Lets you find a record based on a signed id that's safe to put into the world without risk of tampering. @@ -33567,7 +34605,7 @@ module ActiveRecord::SignedId::ClassMethods # # @raise [UnknownPrimaryKey] # - # source://activerecord/lib/active_record/signed_id.rb#42 + # source://activerecord/lib/active_record/signed_id.rb#52 def find_signed(signed_id, purpose: T.unsafe(nil)); end # Works like find_signed, but will raise an +ActiveSupport::MessageVerifier::InvalidSignature+ @@ -33583,36 +34621,45 @@ module ActiveRecord::SignedId::ClassMethods # User.first.destroy # User.find_signed! signed_id # => ActiveRecord::RecordNotFound # - # source://activerecord/lib/active_record/signed_id.rb#62 + # source://activerecord/lib/active_record/signed_id.rb#72 def find_signed!(signed_id, purpose: T.unsafe(nil)); end # The verifier instance that all signed ids are generated and verified from. By default, it'll be initialized # with the class-level +signed_id_verifier_secret+, which within \Rails comes from the # Rails.application.key_generator. By default, it's SHA256 for the digest and JSON for the serialization. # - # source://activerecord/lib/active_record/signed_id.rb#71 + # source://activerecord/lib/active_record/signed_id.rb#81 def signed_id_verifier; end # Allows you to pass in a custom verifier used for the signed ids. This also allows you to use different # verifiers for different classes. This is also helpful if you need to rotate keys, as you can prepare # your custom verifier for that in advance. See +ActiveSupport::MessageVerifier+ for details. # - # source://activerecord/lib/active_record/signed_id.rb#87 + # source://activerecord/lib/active_record/signed_id.rb#97 def signed_id_verifier=(verifier); end end +# source://activerecord/lib/active_record/signed_id.rb#16 +module ActiveRecord::SignedId::RelationMethods + # source://activerecord/lib/active_record/signed_id.rb#17 + def find_signed(*_arg0, **_arg1, &_arg2); end + + # source://activerecord/lib/active_record/signed_id.rb#21 + def find_signed!(*_arg0, **_arg1, &_arg2); end +end + # Raised when Active Record finds multiple records but only expected one. # -# source://activerecord/lib/active_record/errors.rb#171 +# source://activerecord/lib/active_record/errors.rb#192 class ActiveRecord::SoleRecordExceeded < ::ActiveRecord::ActiveRecordError # @return [SoleRecordExceeded] a new instance of SoleRecordExceeded # - # source://activerecord/lib/active_record/errors.rb#174 + # source://activerecord/lib/active_record/errors.rb#195 def initialize(record = T.unsafe(nil)); end # Returns the value of attribute record. # - # source://activerecord/lib/active_record/errors.rb#172 + # source://activerecord/lib/active_record/errors.rb#193 def record; end end @@ -33623,7 +34670,7 @@ module ActiveRecord::SpawnMethods # Post.order('id asc').except(:order) # discards the order condition # Post.where('id > 10').order('id asc').except(:where) # discards the where condition but keeps the order # - # source://activerecord/lib/active_record/relation/spawn_methods.rb#75 + # source://activerecord/lib/active_record/relation/spawn_methods.rb#59 def except(*skips); end # Merges in the conditions from other, if other is an ActiveRecord::Relation. @@ -33658,7 +34705,7 @@ module ActiveRecord::SpawnMethods # Post.order('id asc').only(:where) # discards the order condition # Post.order('id asc').only(:where, :order) # uses the specified order # - # source://activerecord/lib/active_record/relation/spawn_methods.rb#83 + # source://activerecord/lib/active_record/relation/spawn_methods.rb#67 def only(*onlies); end # source://activerecord/lib/active_record/relation/spawn_methods.rb#9 @@ -33666,7 +34713,7 @@ module ActiveRecord::SpawnMethods private - # source://activerecord/lib/active_record/relation/spawn_methods.rb#88 + # source://activerecord/lib/active_record/relation/spawn_methods.rb#72 def relation_with(values); end end @@ -33677,35 +34724,35 @@ end # Read more about optimistic locking in ActiveRecord::Locking module # documentation. # -# source://activerecord/lib/active_record/errors.rb#350 +# source://activerecord/lib/active_record/errors.rb#371 class ActiveRecord::StaleObjectError < ::ActiveRecord::ActiveRecordError # @return [StaleObjectError] a new instance of StaleObjectError # - # source://activerecord/lib/active_record/errors.rb#353 + # source://activerecord/lib/active_record/errors.rb#374 def initialize(record = T.unsafe(nil), attempted_action = T.unsafe(nil)); end # Returns the value of attribute attempted_action. # - # source://activerecord/lib/active_record/errors.rb#351 + # source://activerecord/lib/active_record/errors.rb#372 def attempted_action; end # Returns the value of attribute record. # - # source://activerecord/lib/active_record/errors.rb#351 + # source://activerecord/lib/active_record/errors.rb#372 def record; end end # Statement cache is used to cache a single statement in order to avoid creating the AST again. # Initializing the cache is done by passing the statement in the create block: # -# cache = StatementCache.create(Book.connection) do |params| +# cache = StatementCache.create(ClothingItem.lease_connection) do |params| # Book.where(name: "my book").where("author_id > 3") # end # # The cached statement is executed by using the # {connection.execute}[rdoc-ref:ConnectionAdapters::DatabaseStatements#execute] method: # -# cache.execute([], Book.connection) +# cache.execute([], ClothingItem.lease_connection) # # The relation returned by the block is cached, and for each # {execute}[rdoc-ref:ConnectionAdapters::DatabaseStatements#execute] @@ -33714,40 +34761,23 @@ end # If you want to cache the statement without the values you can use the +bind+ method of the # block parameter. # -# cache = StatementCache.create(Book.connection) do |params| +# cache = StatementCache.create(ClothingItem.lease_connection) do |params| # Book.where(name: params.bind) # end # # And pass the bind values as the first argument of +execute+ call. # -# cache.execute(["my book"], Book.connection) +# cache.execute(["my book"], ClothingItem.lease_connection) # # source://activerecord/lib/active_record/statement_cache.rb#30 class ActiveRecord::StatementCache # @return [StatementCache] a new instance of StatementCache # # source://activerecord/lib/active_record/statement_cache.rb#139 - def initialize(query_builder, bind_map, klass); end + def initialize(query_builder, bind_map, model); end # source://activerecord/lib/active_record/statement_cache.rb#145 - def execute(params, connection, &block); end - - private - - # Returns the value of attribute bind_map. - # - # source://activerecord/lib/active_record/statement_cache.rb#162 - def bind_map; end - - # Returns the value of attribute klass. - # - # source://activerecord/lib/active_record/statement_cache.rb#162 - def klass; end - - # Returns the value of attribute query_builder. - # - # source://activerecord/lib/active_record/statement_cache.rb#162 - def query_builder; end + def execute(params, connection, allow_retry: T.unsafe(nil), async: T.unsafe(nil), &block); end class << self # source://activerecord/lib/active_record/statement_cache.rb#132 @@ -33764,7 +34794,7 @@ class ActiveRecord::StatementCache # @return [Boolean] # - # source://activerecord/lib/active_record/statement_cache.rb#155 + # source://activerecord/lib/active_record/statement_cache.rb#158 def unsupported_value?(value); end end end @@ -33825,6 +34855,18 @@ class ActiveRecord::StatementCache::PartialQueryCollector # source://activerecord/lib/active_record/statement_cache.rb#65 def preparable=(_arg0); end + # Returns the value of attribute retryable. + # + # source://activerecord/lib/active_record/statement_cache.rb#65 + def retryable; end + + # Sets the attribute retryable + # + # @param value the value to set the attribute retryable to. + # + # source://activerecord/lib/active_record/statement_cache.rb#65 + def retryable=(_arg0); end + # source://activerecord/lib/active_record/statement_cache.rb#92 def value; end end @@ -33847,30 +34889,30 @@ class ActiveRecord::StatementCache::Substitute; end # # Wraps the underlying database error as +cause+. # -# source://activerecord/lib/active_record/errors.rb#183 +# source://activerecord/lib/active_record/errors.rb#204 class ActiveRecord::StatementInvalid < ::ActiveRecord::AdapterError # @return [StatementInvalid] a new instance of StatementInvalid # - # source://activerecord/lib/active_record/errors.rb#184 + # source://activerecord/lib/active_record/errors.rb#205 def initialize(message = T.unsafe(nil), sql: T.unsafe(nil), binds: T.unsafe(nil), connection_pool: T.unsafe(nil)); end # Returns the value of attribute binds. # - # source://activerecord/lib/active_record/errors.rb#190 + # source://activerecord/lib/active_record/errors.rb#211 def binds; end - # source://activerecord/lib/active_record/errors.rb#192 + # source://activerecord/lib/active_record/errors.rb#213 def set_query(sql, binds); end # Returns the value of attribute sql. # - # source://activerecord/lib/active_record/errors.rb#190 + # source://activerecord/lib/active_record/errors.rb#211 def sql; end end # StatementTimeout will be raised when statement timeout exceeded. # -# source://activerecord/lib/active_record/errors.rb#542 +# source://activerecord/lib/active_record/errors.rb#569 class ActiveRecord::StatementTimeout < ::ActiveRecord::QueryAborted; end # = Active Record \Store @@ -33895,8 +34937,8 @@ class ActiveRecord::StatementTimeout < ::ActiveRecord::QueryAborted; end # You can set custom coder to encode/decode your serialized attributes to/from different formats. # JSON, YAML, Marshal are supported out of the box. Generally it can be any wrapper that provides +load+ and +dump+. # -# NOTE: If you are using structured database data types (e.g. PostgreSQL +hstore+/+json+, or MySQL 5.7+ -# +json+) there is no need for the serialization provided by {.store}[rdoc-ref:rdoc-ref:ClassMethods#store]. +# NOTE: If you are using structured database data types (e.g. PostgreSQL +hstore+/+json+, MySQL 5.7+ +# +json+, or SQLite 3.38+ +json+) there is no need for the serialization provided by {.store}[rdoc-ref:rdoc-ref:ClassMethods#store]. # Simply use {.store_accessor}[rdoc-ref:ClassMethods#store_accessor] instead to generate # the accessor methods. Be aware that these columns use a string keyed hash and do not allow access # using a symbol. @@ -33997,66 +35039,72 @@ module ActiveRecord::Store::ClassMethods def stored_attributes; end end -# source://activerecord/lib/active_record/store.rb#223 +# source://activerecord/lib/active_record/store.rb#227 class ActiveRecord::Store::HashAccessor class << self - # source://activerecord/lib/active_record/store.rb#234 + # source://activerecord/lib/active_record/store.rb#238 def prepare(object, attribute); end - # source://activerecord/lib/active_record/store.rb#224 + # source://activerecord/lib/active_record/store.rb#228 def read(object, attribute, key); end - # source://activerecord/lib/active_record/store.rb#229 + # source://activerecord/lib/active_record/store.rb#233 def write(object, attribute, key, value); end end end -# source://activerecord/lib/active_record/store.rb#260 +# source://activerecord/lib/active_record/store.rb#264 class ActiveRecord::Store::IndifferentCoder # @return [IndifferentCoder] a new instance of IndifferentCoder # - # source://activerecord/lib/active_record/store.rb#261 + # source://activerecord/lib/active_record/store.rb#265 def initialize(attr_name, coder_or_class_name); end - # source://activerecord/lib/active_record/store.rb#270 + # source://activerecord/lib/active_record/store.rb#274 def dump(obj); end - # source://activerecord/lib/active_record/store.rb#274 + # source://activerecord/lib/active_record/store.rb#278 def load(yaml); end private - # source://activerecord/lib/active_record/store.rb#290 + # source://activerecord/lib/active_record/store.rb#294 def as_regular_hash(obj); end class << self - # source://activerecord/lib/active_record/store.rb#278 + # source://activerecord/lib/active_record/store.rb#282 def as_indifferent_hash(obj); end end end -# source://activerecord/lib/active_record/store.rb#249 +# source://activerecord/lib/active_record/store.rb#253 class ActiveRecord::Store::IndifferentHashAccessor < ::ActiveRecord::Store::HashAccessor class << self - # source://activerecord/lib/active_record/store.rb#250 + # source://activerecord/lib/active_record/store.rb#254 def prepare(object, store_attribute); end end end -# source://activerecord/lib/active_record/store.rb#239 +# source://activerecord/lib/active_record/store.rb#243 class ActiveRecord::Store::StringKeyedHashAccessor < ::ActiveRecord::Store::HashAccessor class << self - # source://activerecord/lib/active_record/store.rb#240 + # source://activerecord/lib/active_record/store.rb#244 def read(object, attribute, key); end - # source://activerecord/lib/active_record/store.rb#244 + # source://activerecord/lib/active_record/store.rb#248 def write(object, attribute, key, value); end end end # Raised on attempt to lazily load records that are marked as strict loading. # -# source://activerecord/lib/active_record/errors.rb#377 +# You can resolve this error by eager loading marked records before accessing +# them. The +# {Eager Loading Associations}[https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations] +# guide covers solutions, such as using +# {ActiveRecord::Base.includes}[rdoc-ref:QueryMethods#includes]. +# +# source://activerecord/lib/active_record/errors.rb#404 class ActiveRecord::StrictLoadingViolationError < ::ActiveRecord::ActiveRecordError; end # Raised when the single-table inheritance mechanism fails to locate the subclass @@ -34064,7 +35112,7 @@ class ActiveRecord::StrictLoadingViolationError < ::ActiveRecord::ActiveRecordEr # {ActiveRecord::Base.inheritance_column}[rdoc-ref:ModelSchema::ClassMethods#inheritance_column] # points to). # -# source://activerecord/lib/active_record/errors.rb#22 +# source://activerecord/lib/active_record/errors.rb#18 class ActiveRecord::SubclassNotFound < ::ActiveRecord::ActiveRecordError; end # = Active Record \Suppressor @@ -34127,15 +35175,15 @@ class ActiveRecord::TableMetadata # source://activerecord/lib/active_record/table_metadata.rb#7 def initialize(klass, arel_table, reflection = T.unsafe(nil)); end - # source://activerecord/lib/active_record/table_metadata.rb#74 + # source://activerecord/lib/active_record/table_metadata.rb#65 def aggregated_with?(aggregation_name); end # Returns the value of attribute arel_table. # - # source://activerecord/lib/active_record/table_metadata.rb#89 + # source://activerecord/lib/active_record/table_metadata.rb#80 def arel_table; end - # source://activerecord/lib/active_record/table_metadata.rb#38 + # source://activerecord/lib/active_record/table_metadata.rb#29 def associated_table(table_name); end # @return [Boolean] @@ -34162,24 +35210,24 @@ class ActiveRecord::TableMetadata # @return [Boolean] # - # source://activerecord/lib/active_record/table_metadata.rb#62 + # source://activerecord/lib/active_record/table_metadata.rb#53 def polymorphic_association?; end - # source://activerecord/lib/active_record/table_metadata.rb#66 + # source://activerecord/lib/active_record/table_metadata.rb#57 def polymorphic_name_association; end - # source://activerecord/lib/active_record/table_metadata.rb#79 + # source://activerecord/lib/active_record/table_metadata.rb#70 def predicate_builder; end # source://activerecord/lib/active_record/table_metadata.rb#13 def primary_key; end - # source://activerecord/lib/active_record/table_metadata.rb#74 + # source://activerecord/lib/active_record/table_metadata.rb#65 def reflect_on_aggregation(aggregation_name); end # @return [Boolean] # - # source://activerecord/lib/active_record/table_metadata.rb#70 + # source://activerecord/lib/active_record/table_metadata.rb#61 def through_association?; end # source://activerecord/lib/active_record/table_metadata.rb#17 @@ -34189,21 +35237,21 @@ class ActiveRecord::TableMetadata # Returns the value of attribute klass. # - # source://activerecord/lib/active_record/table_metadata.rb#92 + # source://activerecord/lib/active_record/table_metadata.rb#83 def klass; end # Returns the value of attribute reflection. # - # source://activerecord/lib/active_record/table_metadata.rb#92 + # source://activerecord/lib/active_record/table_metadata.rb#83 def reflection; end end # Raised when a model makes a query but it has not specified an associated table. # -# source://activerecord/lib/active_record/errors.rb#50 +# source://activerecord/lib/active_record/errors.rb#46 class ActiveRecord::TableNotSpecified < ::ActiveRecord::ActiveRecordError; end -# source://activerecord/lib/active_record.rb#168 +# source://activerecord/lib/active_record.rb#173 module ActiveRecord::Tasks extend ::ActiveSupport::Autoload end @@ -34247,31 +35295,31 @@ class ActiveRecord::Tasks::DatabaseNotSupported < ::StandardError; end module ActiveRecord::Tasks::DatabaseTasks extend ::ActiveRecord::Tasks::DatabaseTasks - # source://activerecord/lib/active_record/tasks/database_tasks.rb#440 - def cache_dump_filename(db_config_name, schema_cache_path: T.unsafe(nil)); end + # source://activerecord/lib/active_record/tasks/database_tasks.rb#449 + def cache_dump_filename(db_config_or_name, schema_cache_path: T.unsafe(nil)); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#305 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#313 def charset(configuration, *arguments); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#300 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#308 def charset_current(env_name = T.unsafe(nil), db_name = T.unsafe(nil)); end # source://activerecord/lib/active_record/tasks/database_tasks.rb#65 def check_protected_environments!(environment = T.unsafe(nil)); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#458 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#479 def check_schema_file(filename); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#290 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#298 def check_target_version; end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#484 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#505 def clear_schema_cache(filename); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#315 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#323 def collation(configuration, *arguments); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#310 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#318 def collation_current(env_name = T.unsafe(nil), db_name = T.unsafe(nil)); end # source://activerecord/lib/active_record/tasks/database_tasks.rb#115 @@ -34295,8 +35343,8 @@ module ActiveRecord::Tasks::DatabaseTasks # source://activerecord/lib/active_record/tasks/database_tasks.rb#61 def database_configuration=(_arg0); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#258 - def db_configs_with_versions(db_configs); end + # source://activerecord/lib/active_record/tasks/database_tasks.rb#266 + def db_configs_with_versions(environment = T.unsafe(nil)); end # source://activerecord/lib/active_record/tasks/database_tasks.rb#83 def db_dir; end @@ -34308,25 +35356,25 @@ module ActiveRecord::Tasks::DatabaseTasks # source://activerecord/lib/active_record/tasks/database_tasks.rb#60 def db_dir=(_arg0); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#204 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#210 def drop(configuration, *arguments); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#216 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#222 def drop_all; end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#220 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#226 def drop_current(environment = T.unsafe(nil)); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#403 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#412 def dump_schema(db_config, format = T.unsafe(nil)); end # Dumps the schema cache in YAML format for the connection into the file # # ==== Examples - # ActiveRecord::Tasks::DatabaseTasks.dump_schema_cache(ActiveRecord::Base.connection, "tmp/schema_dump.yaml") + # ActiveRecord::Tasks::DatabaseTasks.dump_schema_cache(ActiveRecord::Base.lease_connection, "tmp/schema_dump.yaml") # - # source://activerecord/lib/active_record/tasks/database_tasks.rb#480 - def dump_schema_cache(conn, filename); end + # source://activerecord/lib/active_record/tasks/database_tasks.rb#501 + def dump_schema_cache(conn_or_pool, filename); end # source://activerecord/lib/active_record/tasks/database_tasks.rb#103 def env; end @@ -34351,27 +35399,30 @@ module ActiveRecord::Tasks::DatabaseTasks # source://activerecord/lib/active_record/tasks/database_tasks.rb#141 def for_each(databases); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#349 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#357 def load_schema(db_config, format = T.unsafe(nil), file = T.unsafe(nil)); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#450 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#471 def load_schema_current(format = T.unsafe(nil), file = T.unsafe(nil), environment = T.unsafe(nil)); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#466 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#487 def load_seed; end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#237 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#243 def migrate(version = T.unsafe(nil)); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#275 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#283 def migrate_status; end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#505 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#526 def migration_class; end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#509 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#530 def migration_connection; end + # source://activerecord/lib/active_record/tasks/database_tasks.rb#534 + def migration_connection_pool; end + # source://activerecord/lib/active_record/tasks/database_tasks.rb#87 def migrations_paths; end @@ -34388,19 +35439,19 @@ module ActiveRecord::Tasks::DatabaseTasks # source://activerecord/lib/active_record/tasks/database_tasks.rb#176 def prepare_all; end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#320 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#328 def purge(configuration); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#325 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#333 def purge_all; end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#329 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#337 def purge_current(environment = T.unsafe(nil)); end # source://activerecord/lib/active_record/tasks/database_tasks.rb#156 def raise_for_multi_db(environment = T.unsafe(nil), command:); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#385 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#394 def reconstruct_from_schema(db_config, format = T.unsafe(nil), file = T.unsafe(nil)); end # source://activerecord/lib/active_record/tasks/database_tasks.rb#73 @@ -34416,12 +35467,12 @@ module ActiveRecord::Tasks::DatabaseTasks # source://activerecord/lib/active_record/tasks/database_tasks.rb#60 def root=(_arg0); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#427 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#436 def schema_dump_path(db_config, format = T.unsafe(nil)); end # @return [Boolean] # - # source://activerecord/lib/active_record/tasks/database_tasks.rb#370 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#378 def schema_up_to_date?(configuration, format = T.unsafe(nil), file = T.unsafe(nil)); end # source://activerecord/lib/active_record/tasks/database_tasks.rb#111 @@ -34437,74 +35488,83 @@ module ActiveRecord::Tasks::DatabaseTasks # source://activerecord/lib/active_record/tasks/database_tasks.rb#135 def setup_initial_database_yaml; end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#335 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#343 def structure_dump(configuration, *arguments); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#342 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#350 def structure_load(configuration, *arguments); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#296 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#304 def target_version; end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#231 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#237 def truncate_all(environment = T.unsafe(nil)); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#499 - def with_temporary_connection(db_config, clobber: T.unsafe(nil)); end + # source://activerecord/lib/active_record/tasks/database_tasks.rb#520 + def with_temporary_connection(db_config, clobber: T.unsafe(nil), &block); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#488 - def with_temporary_connection_for_each(env: T.unsafe(nil), name: T.unsafe(nil), clobber: T.unsafe(nil), &block); end + # source://activerecord/lib/active_record/tasks/database_tasks.rb#509 + def with_temporary_pool_for_each(env: T.unsafe(nil), name: T.unsafe(nil), clobber: T.unsafe(nil), &block); end private - # source://activerecord/lib/active_record/tasks/database_tasks.rb#604 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#643 def check_current_protected_environment!(db_config); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#546 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#582 def class_for_adapter(adapter); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#523 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#559 def configs_for(**options); end # Create a new instance for the specified db configuration object # For classes that have been converted to use db_config objects, pass a # `DatabaseConfig`, otherwise pass a `Hash` # - # source://activerecord/lib/active_record/tasks/database_tasks.rb#538 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#574 def database_adapter_for(db_config, *arguments); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#554 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#590 def each_current_configuration(environment, name = T.unsafe(nil)); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#567 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#600 + def each_current_environment(environment, &block); end + + # source://activerecord/lib/active_record/tasks/database_tasks.rb#606 def each_local_configuration; end + # source://activerecord/lib/active_record/tasks/database_tasks.rb#660 + def initialize_database(db_config); end + # @return [Boolean] # - # source://activerecord/lib/active_record/tasks/database_tasks.rb#579 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#618 def local_database?(db_config); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#527 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#563 def resolve_configuration(configuration); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#584 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#539 + def schema_cache_env; end + + # source://activerecord/lib/active_record/tasks/database_tasks.rb#623 def schema_sha1(file); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#588 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#627 def structure_dump_flags_for(adapter); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#596 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#635 def structure_load_flags_for(adapter); end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#224 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#230 def truncate_tables(db_config); end # @return [Boolean] # - # source://activerecord/lib/active_record/tasks/database_tasks.rb#531 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#567 def verbose?; end - # source://activerecord/lib/active_record/tasks/database_tasks.rb#514 + # source://activerecord/lib/active_record/tasks/database_tasks.rb#550 def with_temporary_pool(db_config, clobber: T.unsafe(nil)); end class << self @@ -34529,74 +35589,71 @@ ActiveRecord::Tasks::DatabaseTasks::LOCAL_HOSTS = T.let(T.unsafe(nil), Array) class ActiveRecord::Tasks::MySQLDatabaseTasks # @return [MySQLDatabaseTasks] a new instance of MySQLDatabaseTasks # - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#12 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#10 def initialize(db_config); end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#34 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#32 def charset; end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#38 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#36 def collation; end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#17 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#15 def create; end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#23 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#21 def drop; end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#28 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#26 def purge; end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#42 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#40 def structure_dump(filename, extra_flags); end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#61 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#59 def structure_load(filename, extra_flags); end private # Returns the value of attribute configuration_hash. # - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#71 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#69 def configuration_hash; end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#81 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#79 def configuration_hash_without_database; end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#73 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#71 def connection; end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#85 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#83 def creation_options; end # Returns the value of attribute db_config. # - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#71 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#69 def db_config; end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#77 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#75 def establish_connection(config = T.unsafe(nil)); end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#92 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#90 def prepare_command_options; end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#111 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#109 def run_cmd(cmd, args, action); end - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#115 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#113 def run_cmd_error(cmd, args, action); end class << self # @return [Boolean] # - # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#8 + # source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#6 def using_database_configurations?; end end end -# source://activerecord/lib/active_record/tasks/mysql_database_tasks.rb#6 -ActiveRecord::Tasks::MySQLDatabaseTasks::ER_DB_CREATE_EXISTS = T.let(T.unsafe(nil), Integer) - # source://activerecord/lib/active_record/tasks/postgresql_database_tasks.rb#7 class ActiveRecord::Tasks::PostgreSQLDatabaseTasks # @return [PostgreSQLDatabaseTasks] a new instance of PostgreSQLDatabaseTasks @@ -34723,10 +35780,10 @@ class ActiveRecord::Tasks::SQLiteDatabaseTasks # source://activerecord/lib/active_record/tasks/sqlite_database_tasks.rb#66 def root; end - # source://activerecord/lib/active_record/tasks/sqlite_database_tasks.rb#76 + # source://activerecord/lib/active_record/tasks/sqlite_database_tasks.rb#77 def run_cmd(cmd, args, out); end - # source://activerecord/lib/active_record/tasks/sqlite_database_tasks.rb#80 + # source://activerecord/lib/active_record/tasks/sqlite_database_tasks.rb#81 def run_cmd_error(cmd, args); end class << self @@ -34745,19 +35802,19 @@ module ActiveRecord::TestDatabases end end -# source://activerecord/lib/active_record/associations.rb#177 +# source://activerecord/lib/active_record/associations/errors.rb#177 class ActiveRecord::ThroughCantAssociateThroughHasOneOrManyReflection < ::ActiveRecord::ActiveRecordError # @return [ThroughCantAssociateThroughHasOneOrManyReflection] a new instance of ThroughCantAssociateThroughHasOneOrManyReflection # - # source://activerecord/lib/active_record/associations.rb#178 + # source://activerecord/lib/active_record/associations/errors.rb#178 def initialize(owner = T.unsafe(nil), reflection = T.unsafe(nil)); end end -# source://activerecord/lib/active_record/associations.rb#224 +# source://activerecord/lib/active_record/associations/errors.rb#224 class ActiveRecord::ThroughNestedAssociationsAreReadonly < ::ActiveRecord::ActiveRecordError # @return [ThroughNestedAssociationsAreReadonly] a new instance of ThroughNestedAssociationsAreReadonly # - # source://activerecord/lib/active_record/associations.rb#225 + # source://activerecord/lib/active_record/associations/errors.rb#225 def initialize(owner = T.unsafe(nil), reflection = T.unsafe(nil)); end end @@ -34811,47 +35868,47 @@ module ActiveRecord::Timestamp private - # source://activerecord/lib/active_record/timestamp.rb#105 + # source://activerecord/lib/active_record/timestamp.rb#107 def _create_record; end - # source://activerecord/lib/active_record/timestamp.rb#117 + # source://activerecord/lib/active_record/timestamp.rb#119 def _update_record; end - # source://activerecord/lib/active_record/timestamp.rb#153 + # source://activerecord/lib/active_record/timestamp.rb#155 def all_timestamp_attributes_in_model; end # Clear attributes and changed_attributes # - # source://activerecord/lib/active_record/timestamp.rb#168 + # source://activerecord/lib/active_record/timestamp.rb#170 def clear_timestamp_attributes; end - # source://activerecord/lib/active_record/timestamp.rb#123 + # source://activerecord/lib/active_record/timestamp.rb#125 def create_or_update(touch: T.unsafe(nil), **_arg1); end - # source://activerecord/lib/active_record/timestamp.rb#157 + # source://activerecord/lib/active_record/timestamp.rb#159 def current_time_from_proper_timezone; end - # source://activerecord/lib/active_record/timestamp.rb#100 + # source://activerecord/lib/active_record/timestamp.rb#102 def init_internals; end # source://activerecord/lib/active_record/timestamp.rb#50 def initialize_dup(other); end - # source://activerecord/lib/active_record/timestamp.rb#161 + # source://activerecord/lib/active_record/timestamp.rb#163 def max_updated_column_timestamp; end - # source://activerecord/lib/active_record/timestamp.rb#128 + # source://activerecord/lib/active_record/timestamp.rb#130 def record_update_timestamps; end # @return [Boolean] # - # source://activerecord/lib/active_record/timestamp.rb#141 + # source://activerecord/lib/active_record/timestamp.rb#143 def should_record_timestamps?; end - # source://activerecord/lib/active_record/timestamp.rb#145 + # source://activerecord/lib/active_record/timestamp.rb#147 def timestamp_attributes_for_create_in_model; end - # source://activerecord/lib/active_record/timestamp.rb#149 + # source://activerecord/lib/active_record/timestamp.rb#151 def timestamp_attributes_for_update_in_model; end module GeneratedClassMethods @@ -34869,16 +35926,16 @@ end # source://activerecord/lib/active_record/timestamp.rb#55 module ActiveRecord::Timestamp::ClassMethods - # source://activerecord/lib/active_record/timestamp.rb#72 + # source://activerecord/lib/active_record/timestamp.rb#74 def all_timestamp_attributes_in_model; end - # source://activerecord/lib/active_record/timestamp.rb#77 + # source://activerecord/lib/active_record/timestamp.rb#79 def current_time_from_proper_timezone; end - # source://activerecord/lib/active_record/timestamp.rb#62 + # source://activerecord/lib/active_record/timestamp.rb#64 def timestamp_attributes_for_create_in_model; end - # source://activerecord/lib/active_record/timestamp.rb#67 + # source://activerecord/lib/active_record/timestamp.rb#69 def timestamp_attributes_for_update_in_model; end # source://activerecord/lib/active_record/timestamp.rb#56 @@ -34886,15 +35943,15 @@ module ActiveRecord::Timestamp::ClassMethods protected - # source://activerecord/lib/active_record/timestamp.rb#82 + # source://activerecord/lib/active_record/timestamp.rb#84 def reload_schema_from_cache(recursive = T.unsafe(nil)); end private - # source://activerecord/lib/active_record/timestamp.rb#90 + # source://activerecord/lib/active_record/timestamp.rb#92 def timestamp_attributes_for_create; end - # source://activerecord/lib/active_record/timestamp.rb#94 + # source://activerecord/lib/active_record/timestamp.rb#96 def timestamp_attributes_for_update; end end @@ -34911,7 +35968,7 @@ module ActiveRecord::TokenFor # Use ClassMethods#generates_token_for to define a token purpose and # behavior. # - # source://activerecord/lib/active_record/token_for.rb#109 + # source://activerecord/lib/active_record/token_for.rb#119 def generate_token_for(purpose); end module GeneratedClassMethods @@ -34924,22 +35981,12 @@ module ActiveRecord::TokenFor module GeneratedInstanceMethods; end end -# source://activerecord/lib/active_record/token_for.rb#38 +# source://activerecord/lib/active_record/token_for.rb#56 module ActiveRecord::TokenFor::ClassMethods - # Finds a record using a given +token+ for a predefined +purpose+. Returns - # +nil+ if the token is invalid or the record was not found. - # - # @raise [UnknownPrimaryKey] - # - # source://activerecord/lib/active_record/token_for.rb#90 + # source://activerecord/lib/active_record/token_for.rb#106 def find_by_token_for(purpose, token); end - # Finds a record using a given +token+ for a predefined +purpose+. Raises - # ActiveSupport::MessageVerifier::InvalidSignature if the token is invalid - # (e.g. expired, bad format, etc). Raises ActiveRecord::RecordNotFound if - # the token is valid but the record was not found. - # - # source://activerecord/lib/active_record/token_for.rb#99 + # source://activerecord/lib/active_record/token_for.rb#110 def find_by_token_for!(purpose, token); end # Defines the behavior of tokens generated for a specific +purpose+. @@ -34988,10 +36035,29 @@ module ActiveRecord::TokenFor::ClassMethods # user.update!(password: "new password") # User.find_by_token_for(:password_reset, token) # => nil # - # source://activerecord/lib/active_record/token_for.rb#84 + # source://activerecord/lib/active_record/token_for.rb#102 def generates_token_for(purpose, expires_in: T.unsafe(nil), &block); end end +# source://activerecord/lib/active_record/token_for.rb#38 +module ActiveRecord::TokenFor::RelationMethods + # Finds a record using a given +token+ for a predefined +purpose+. Returns + # +nil+ if the token is invalid or the record was not found. + # + # @raise [UnknownPrimaryKey] + # + # source://activerecord/lib/active_record/token_for.rb#41 + def find_by_token_for(purpose, token); end + + # Finds a record using a given +token+ for a predefined +purpose+. Raises + # ActiveSupport::MessageVerifier::InvalidSignature if the token is invalid + # (e.g. expired, bad format, etc). Raises ActiveRecord::RecordNotFound if + # the token is valid but the record was not found. + # + # source://activerecord/lib/active_record/token_for.rb#50 + def find_by_token_for!(purpose, token); end +end + # source://activerecord/lib/active_record/token_for.rb#14 class ActiveRecord::TokenFor::TokenDefinition < ::Struct # Returns the value of attribute block @@ -35092,6 +36158,139 @@ module ActiveRecord::TouchLater def touch_deferred_attributes; end end +# Class specifies the interface to interact with the current transaction state. +# +# It can either map to an actual transaction/savepoint, or represent the +# absence of a transaction. +# +# == State +# +# We say that a transaction is _finalized_ when it wraps a real transaction +# that has been either committed or rolled back. +# +# A transaction is _open_ if it wraps a real transaction that is not finalized. +# +# On the other hand, a transaction is _closed_ when it is not open. That is, +# when it represents absence of transaction, or it wraps a real but finalized +# one. +# +# You can check whether a transaction is open or closed with the +open?+ and +# +closed?+ predicates: +# +# if Article.current_transaction.open? +# # We are inside a real and not finalized transaction. +# end +# +# Closed transactions are `blank?` too. +# +# == Callbacks +# +# After updating the database state, you may sometimes need to perform some extra work, or reflect these +# changes in a remote system like clearing or updating a cache: +# +# def publish_article(article) +# article.update!(published: true) +# NotificationService.article_published(article) +# end +# +# The above code works but has one important flaw, which is that it no longer works properly if called inside +# a transaction, as it will interact with the remote system before the changes are persisted: +# +# Article.transaction do +# article = create_article(article) +# publish_article(article) +# end +# +# The callbacks offered by ActiveRecord::Transaction allow to rewriting this method in a way that is compatible +# with transactions: +# +# def publish_article(article) +# article.update!(published: true) +# Article.current_transaction.after_commit do +# NotificationService.article_published(article) +# end +# end +# +# In the above example, if +publish_article+ is called inside a transaction, the callback will be invoked +# after the transaction is successfully committed, and if called outside a transaction, the callback will be invoked +# immediately. +# +# == Caveats +# +# When using after_commit callbacks, it is important to note that if the callback raises an error, the transaction +# won't be rolled back as it was already committed. Relying solely on these to synchronize state between multiple +# systems may lead to consistency issues. +# +# source://activerecord/lib/active_record/transaction.rb#68 +class ActiveRecord::Transaction + # @return [Transaction] a new instance of Transaction + # + # source://activerecord/lib/active_record/transaction.rb#69 + def initialize(internal_transaction); end + + # Registers a block to be called after the transaction is fully committed. + # + # If there is no currently open transactions, the block is called + # immediately, unless the transaction is finalized, in which case attempting + # to register the callback raises ActiveRecord::ActiveRecordError. + # + # If the transaction has a parent transaction, the callback is transferred to + # the parent when the current transaction commits, or dropped when the current transaction + # is rolled back. This operation is repeated until the outermost transaction is reached. + # + # If the callback raises an error, the transaction remains committed. + # + # source://activerecord/lib/active_record/transaction.rb#85 + def after_commit(&block); end + + # Registers a block to be called after the transaction is rolled back. + # + # If there is no currently open transactions, the block is not called. But + # if the transaction is finalized, attempting to register the callback + # raises ActiveRecord::ActiveRecordError. + # + # If the transaction is successfully committed but has a parent + # transaction, the callback is automatically added to the parent transaction. + # + # If the entire chain of nested transactions are all successfully committed, + # the block is never called. + # + # If the transaction is already finalized, attempting to register a callback + # will raise ActiveRecord::ActiveRecordError. + # + # source://activerecord/lib/active_record/transaction.rb#107 + def after_rollback(&block); end + + # Returns true if the transaction doesn't exist or is finalized. + # + # @return [Boolean] + # + # source://activerecord/lib/active_record/transaction.rb#117 + def blank?; end + + # Returns true if the transaction doesn't exist or is finalized. + # + # @return [Boolean] + # + # source://activerecord/lib/active_record/transaction.rb#117 + def closed?; end + + # Returns true if the transaction exists and isn't finalized yet. + # + # @return [Boolean] + # + # source://activerecord/lib/active_record/transaction.rb#112 + def open?; end + + # Returns a UUID for this transaction or +nil+ if no transaction is open. + # + # source://activerecord/lib/active_record/transaction.rb#124 + def uuid; end +end + +# source://activerecord/lib/active_record/transaction.rb#130 +ActiveRecord::Transaction::NULL_TRANSACTION = T.let(T.unsafe(nil), ActiveRecord::Transaction) + # TransactionIsolationError will be raised under the following conditions: # # * The adapter does not support setting the isolation level @@ -35100,7 +36299,7 @@ end # # The mysql2, trilogy, and postgresql adapters support setting the transaction isolation level. # -# source://activerecord/lib/active_record/errors.rb#481 +# source://activerecord/lib/active_record/errors.rb#508 class ActiveRecord::TransactionIsolationError < ::ActiveRecord::ActiveRecordError; end # TransactionRollbackError will be raised when a transaction is rolled @@ -35124,7 +36323,7 @@ class ActiveRecord::TransactionIsolationError < ::ActiveRecord::ActiveRecordErro # * https://www.postgresql.org/docs/current/static/transaction-iso.html # * https://dev.mysql.com/doc/mysql-errors/en/server-error-reference.html#error_er_lock_deadlock # -# source://activerecord/lib/active_record/errors.rb#504 +# source://activerecord/lib/active_record/errors.rb#531 class ActiveRecord::TransactionRollbackError < ::ActiveRecord::StatementInvalid; end # See ActiveRecord::Transactions::ClassMethods for documentation. @@ -35141,7 +36340,7 @@ module ActiveRecord::Transactions # source://activerecord/lib/active_record/transactions.rb#16 def _new_record_before_last_commit=(_arg0); end - # source://activerecord/lib/active_record/transactions.rb#320 + # source://activerecord/lib/active_record/transactions.rb#373 def before_committed!; end # Call the #after_commit callbacks. @@ -35149,35 +36348,35 @@ module ActiveRecord::Transactions # Ensure that it is not called if the object was never persisted (failed create), # but call it after the commit of a destroyed object. # - # source://activerecord/lib/active_record/transactions.rb#328 + # source://activerecord/lib/active_record/transactions.rb#381 def committed!(should_run_callbacks: T.unsafe(nil)); end - # source://activerecord/lib/active_record/transactions.rb#304 + # source://activerecord/lib/active_record/transactions.rb#357 def destroy; end # Call the #after_rollback callbacks. The +force_restore_state+ argument indicates if the record # state should be rolled back to the beginning or just to the last savepoint. # - # source://activerecord/lib/active_record/transactions.rb#340 + # source://activerecord/lib/active_record/transactions.rb#393 def rolledback!(force_restore_state: T.unsafe(nil), should_run_callbacks: T.unsafe(nil)); end - # source://activerecord/lib/active_record/transactions.rb#308 + # source://activerecord/lib/active_record/transactions.rb#361 def save(**_arg0); end - # source://activerecord/lib/active_record/transactions.rb#312 + # source://activerecord/lib/active_record/transactions.rb#365 def save!(**_arg0); end - # source://activerecord/lib/active_record/transactions.rb#316 + # source://activerecord/lib/active_record/transactions.rb#369 def touch(*_arg0, **_arg1); end # See ActiveRecord::Transactions::ClassMethods for detailed documentation. # - # source://activerecord/lib/active_record/transactions.rb#300 + # source://activerecord/lib/active_record/transactions.rb#353 def transaction(**options, &block); end # @return [Boolean] # - # source://activerecord/lib/active_record/transactions.rb#371 + # source://activerecord/lib/active_record/transactions.rb#425 def trigger_transactional_callbacks?; end # Executes a block within a transaction and captures its return value as a @@ -35187,60 +36386,60 @@ module ActiveRecord::Transactions # This method is available within the context of an ActiveRecord::Base # instance. # - # source://activerecord/lib/active_record/transactions.rb#356 + # source://activerecord/lib/active_record/transactions.rb#409 def with_transaction_returning_status; end private # Returns the value of attribute _committed_already_called. # - # source://activerecord/lib/active_record/transactions.rb#377 + # source://activerecord/lib/active_record/transactions.rb#431 def _committed_already_called; end # Returns the value of attribute _trigger_destroy_callback. # - # source://activerecord/lib/active_record/transactions.rb#377 + # source://activerecord/lib/active_record/transactions.rb#431 def _trigger_destroy_callback; end # Returns the value of attribute _trigger_update_callback. # - # source://activerecord/lib/active_record/transactions.rb#377 + # source://activerecord/lib/active_record/transactions.rb#431 def _trigger_update_callback; end # Add the record to the current transaction so that the #after_rollback and #after_commit # callbacks can be called. # - # source://activerecord/lib/active_record/transactions.rb#459 + # source://activerecord/lib/active_record/transactions.rb#513 def add_to_transaction(ensure_finalize = T.unsafe(nil)); end # Clear the new record state and id of a record. # - # source://activerecord/lib/active_record/transactions.rb#407 + # source://activerecord/lib/active_record/transactions.rb#461 def clear_transaction_record_state; end # @return [Boolean] # - # source://activerecord/lib/active_record/transactions.rb#463 + # source://activerecord/lib/active_record/transactions.rb#519 def has_transactional_callbacks?; end - # source://activerecord/lib/active_record/transactions.rb#379 + # source://activerecord/lib/active_record/transactions.rb#433 def init_internals; end # Save the new record state and id of a record so it can be restored later if a transaction fails. # - # source://activerecord/lib/active_record/transactions.rb#387 + # source://activerecord/lib/active_record/transactions.rb#441 def remember_transaction_record_state; end # Restore the new record state and id of a record that was previously saved by a call to save_record_state. # - # source://activerecord/lib/active_record/transactions.rb#414 + # source://activerecord/lib/active_record/transactions.rb#468 def restore_transaction_record_state(force_restore_state = T.unsafe(nil)); end # Determine if a transaction included an action for :create, :update, or :destroy. Used in filtering callbacks. # # @return [Boolean] # - # source://activerecord/lib/active_record/transactions.rb#444 + # source://activerecord/lib/active_record/transactions.rb#498 def transaction_include_any_action?(actions); end end @@ -35420,6 +36619,27 @@ ActiveRecord::Transactions::ACTIONS = T.let(T.unsafe(nil), Array) # #after_commit is a good spot to put in a hook to clearing a cache since clearing it from # within a transaction could trigger the cache to be regenerated before the database is updated. # +# ==== NOTE: Callbacks are deduplicated per callback by filter. +# +# Trying to define multiple callbacks with the same filter will result in a single callback being run. +# +# For example: +# +# after_commit :do_something +# after_commit :do_something # only the last one will be called +# +# This applies to all variations of after_*_commit callbacks as well. +# +# after_commit :do_something +# after_create_commit :do_something +# after_save_commit :do_something +# +# It is recommended to use the +on:+ option to specify when the callback should be run. +# +# after_commit :do_something, on: [:create, :update] +# +# This is equivalent to using +after_create_commit+ and +after_update_commit+, but will not be deduplicated. +# # === Caveats # # If you're on MySQL, then do not use Data Definition Language (DDL) operations in nested @@ -35430,16 +36650,16 @@ ActiveRecord::Transactions::ACTIONS = T.let(T.unsafe(nil), Array) # database error will occur because the savepoint has already been # automatically released. The following example demonstrates the problem: # -# Model.connection.transaction do # BEGIN -# Model.connection.transaction(requires_new: true) do # CREATE SAVEPOINT active_record_1 -# Model.connection.create_table(...) # active_record_1 now automatically released +# Model.lease_connection.transaction do # BEGIN +# Model.lease_connection.transaction(requires_new: true) do # CREATE SAVEPOINT active_record_1 +# Model.lease_connection.create_table(...) # active_record_1 now automatically released # end # RELEASE SAVEPOINT active_record_1 # # ^^^^ BOOM! database error! # end # # Note that "TRUNCATE" is also a MySQL DDL statement! # -# source://activerecord/lib/active_record/transactions.rb#209 +# source://activerecord/lib/active_record/transactions.rb#230 module ActiveRecord::Transactions::ClassMethods # This callback is called after a record has been created, updated, or destroyed. # @@ -35453,69 +36673,83 @@ module ActiveRecord::Transactions::ClassMethods # after_commit :do_foo_bar, on: [:create, :update] # after_commit :do_bar_baz, on: [:update, :destroy] # - # source://activerecord/lib/active_record/transactions.rb#232 + # source://activerecord/lib/active_record/transactions.rb#266 def after_commit(*args, &block); end # Shortcut for after_commit :hook, on: :create. # - # source://activerecord/lib/active_record/transactions.rb#244 + # source://activerecord/lib/active_record/transactions.rb#278 def after_create_commit(*args, &block); end # Shortcut for after_commit :hook, on: :destroy. # - # source://activerecord/lib/active_record/transactions.rb#256 + # source://activerecord/lib/active_record/transactions.rb#290 def after_destroy_commit(*args, &block); end # This callback is called after a create, update, or destroy are rolled back. # # Please check the documentation of #after_commit for options. # - # source://activerecord/lib/active_record/transactions.rb#264 + # source://activerecord/lib/active_record/transactions.rb#298 def after_rollback(*args, &block); end # Shortcut for after_commit :hook, on: [ :create, :update ]. # - # source://activerecord/lib/active_record/transactions.rb#238 + # source://activerecord/lib/active_record/transactions.rb#272 def after_save_commit(*args, &block); end # Shortcut for after_commit :hook, on: :update. # - # source://activerecord/lib/active_record/transactions.rb#250 + # source://activerecord/lib/active_record/transactions.rb#284 def after_update_commit(*args, &block); end - # source://activerecord/lib/active_record/transactions.rb#215 + # source://activerecord/lib/active_record/transactions.rb#249 def before_commit(*args, &block); end + # Returns a representation of the current transaction state, + # which can be a top level transaction, a savepoint, or the absence of a transaction. + # + # An object is always returned, whether or not a transaction is currently active. + # To check if a transaction was opened, use current_transaction.open?. + # + # See the ActiveRecord::Transaction documentation for detailed behavior. + # + # source://activerecord/lib/active_record/transactions.rb#245 + def current_transaction; end + + # Similar to ActiveSupport::Callbacks::ClassMethods#set_callback, but with + # support for options available on #after_commit and #after_rollback callbacks. + # + # source://activerecord/lib/active_record/transactions.rb#305 + def set_callback(name, *filter_list, &block); end + # See the ConnectionAdapters::DatabaseStatements#transaction API docs. # - # source://activerecord/lib/active_record/transactions.rb#211 + # source://activerecord/lib/active_record/transactions.rb#232 def transaction(**options, &block); end private - # source://activerecord/lib/active_record/transactions.rb#292 + # source://activerecord/lib/active_record/transactions.rb#345 def assert_valid_transaction_action(actions); end - # source://activerecord/lib/active_record/transactions.rb#270 + # source://activerecord/lib/active_record/transactions.rb#323 def prepend_option; end - # source://activerecord/lib/active_record/transactions.rb#278 + # source://activerecord/lib/active_record/transactions.rb#331 def set_options_for_callbacks!(args, enforced_options = T.unsafe(nil)); end end # source://activerecord/lib/active_record/translation.rb#4 module ActiveRecord::Translation - include ::ActiveModel::Naming - include ::ActiveModel::Translation - # Set the i18n scope to override ActiveModel. # - # source://activerecord/lib/active_record/translation.rb#20 + # source://activerecord/lib/active_record/translation.rb#18 def i18n_scope; end # Set the lookup ancestors for ActiveModel. # - # source://activerecord/lib/active_record/translation.rb#8 + # source://activerecord/lib/active_record/translation.rb#6 def lookup_ancestors; end end @@ -35822,15 +37056,15 @@ class ActiveRecord::Type::Serialized # source://activerecord/lib/active_record/type/serialized.rb#12 def initialize(subtype, coder); end - # source://activerecord/lib/active_record/type/serialized.rb#44 + # source://activerecord/lib/active_record/type/serialized.rb#42 def accessor; end - # source://activerecord/lib/active_record/type/serialized.rb#48 + # source://activerecord/lib/active_record/type/serialized.rb#46 def assert_valid_value(value); end # @return [Boolean] # - # source://activerecord/lib/active_record/type/serialized.rb#37 + # source://activerecord/lib/active_record/type/serialized.rb#35 def changed_in_place?(raw_old_value, value); end # Returns the value of attribute coder. @@ -35843,10 +37077,9 @@ class ActiveRecord::Type::Serialized # @return [Boolean] # - # source://activerecord/lib/active_record/type/serialized.rb#54 + # source://activerecord/lib/active_record/type/serialized.rb#52 def force_equality?(value); end - # source://activerecord/lib/active_record/type/serialized.rb#33 def inspect; end # source://activerecord/lib/active_record/type/serialized.rb#26 @@ -35854,7 +37087,7 @@ class ActiveRecord::Type::Serialized # @return [Boolean] # - # source://activerecord/lib/active_record/type/serialized.rb#58 + # source://activerecord/lib/active_record/type/serialized.rb#56 def serialized?; end # Returns the value of attribute subtype. @@ -35866,10 +37099,10 @@ class ActiveRecord::Type::Serialized # @return [Boolean] # - # source://activerecord/lib/active_record/type/serialized.rb#63 + # source://activerecord/lib/active_record/type/serialized.rb#61 def default_value?(value); end - # source://activerecord/lib/active_record/type/serialized.rb#67 + # source://activerecord/lib/active_record/type/serialized.rb#65 def encoded(value); end end @@ -35960,9 +37193,6 @@ class ActiveRecord::TypeCaster::Connection private - # source://activerecord/lib/active_record/type_caster/connection.rb#27 - def connection(*_arg0, **_arg1, &_arg2); end - # Returns the value of attribute table_name. # # source://activerecord/lib/active_record/type_caster/connection.rb#30 @@ -35995,7 +37225,7 @@ class ActiveRecord::TypeConflictError < ::StandardError; end # Raised when unknown attributes are supplied via mass assignment. # -# source://activerecord/lib/active_record/errors.rb#417 +# source://activerecord/lib/active_record/errors.rb#444 ActiveRecord::UnknownAttributeError = ActiveModel::UnknownAttributeError # UnknownAttributeReference is raised when an unknown and potentially unsafe @@ -36019,32 +37249,47 @@ ActiveRecord::UnknownAttributeError = ActiveModel::UnknownAttributeError # Again, such a workaround should *not* be used when passing user-provided # values, such as request parameters or model attributes to query methods. # -# source://activerecord/lib/active_record/errors.rb#578 +# source://activerecord/lib/active_record/errors.rb#605 class ActiveRecord::UnknownAttributeReference < ::ActiveRecord::ActiveRecordError; end -# source://activerecord/lib/active_record/migration.rb#114 +# source://activerecord/lib/active_record/migration.rb#112 class ActiveRecord::UnknownMigrationVersionError < ::ActiveRecord::MigrationError # @return [UnknownMigrationVersionError] a new instance of UnknownMigrationVersionError # - # source://activerecord/lib/active_record/migration.rb#115 + # source://activerecord/lib/active_record/migration.rb#113 def initialize(version = T.unsafe(nil)); end end # Raised when a primary key is needed, but not specified in the schema or model. # -# source://activerecord/lib/active_record/errors.rb#445 +# source://activerecord/lib/active_record/errors.rb#472 class ActiveRecord::UnknownPrimaryKey < ::ActiveRecord::ActiveRecordError # @return [UnknownPrimaryKey] a new instance of UnknownPrimaryKey # - # source://activerecord/lib/active_record/errors.rb#448 + # source://activerecord/lib/active_record/errors.rb#475 def initialize(model = T.unsafe(nil), description = T.unsafe(nil)); end # Returns the value of attribute model. # - # source://activerecord/lib/active_record/errors.rb#446 + # source://activerecord/lib/active_record/errors.rb#473 def model; end end +# Raised when a relation cannot be mutated because it's already loaded. +# +# class Task < ActiveRecord::Base +# end +# +# relation = Task.all +# relation.loaded? # => true +# +# # Methods which try to mutate a loaded relation fail. +# relation.where!(title: 'TODO') # => ActiveRecord::UnmodifiableRelation +# relation.limit!(5) # => ActiveRecord::UnmodifiableRelation +# +# source://activerecord/lib/active_record/errors.rb#498 +class ActiveRecord::UnmodifiableRelation < ::ActiveRecord::ActiveRecordError; end + # source://activerecord/lib/active_record/gem_version.rb#9 module ActiveRecord::VERSION; end @@ -36076,32 +37321,26 @@ ActiveRecord::VERSION::TINY = T.let(T.unsafe(nil), Integer) # source://activerecord/lib/active_record/validations.rb#40 module ActiveRecord::Validations extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - include ::ActiveSupport::Callbacks - include ::ActiveModel::Validations::HelperMethods - include ::ActiveModel::Validations - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveModel::Validations::ClassMethods - mixes_in_class_methods ::ActiveModel::Callbacks - mixes_in_class_methods ::ActiveSupport::Callbacks::ClassMethods - mixes_in_class_methods ::ActiveSupport::DescendantsTracker - mixes_in_class_methods ::ActiveModel::Translation - mixes_in_class_methods ::ActiveModel::Validations::HelperMethods mixes_in_class_methods ::ActiveRecord::Validations::ClassMethods + # @return [Boolean] + # + # source://activerecord/lib/active_record/validations.rb#77 + def custom_validation_context?; end + # The validation process on save can be skipped by passing validate: false. # The validation context can be changed by passing context: context. # The regular {ActiveRecord::Base#save}[rdoc-ref:Persistence#save] method is replaced # with this when the validations module is mixed in, which it is by default. # - # source://activerecord/lib/active_record/validations.rb#48 + # source://activerecord/lib/active_record/validations.rb#47 def save(**options); end # Attempts to save the record just like {ActiveRecord::Base#save}[rdoc-ref:Base#save] but # will raise an ActiveRecord::RecordInvalid exception instead of returning +false+ if the record is not valid. # - # source://activerecord/lib/active_record/validations.rb#54 + # source://activerecord/lib/active_record/validations.rb#53 def save!(**options); end # Runs all the validations within the specified context. Returns +true+ if @@ -36119,7 +37358,7 @@ module ActiveRecord::Validations # # @return [Boolean] # - # source://activerecord/lib/active_record/validations.rb#70 + # source://activerecord/lib/active_record/validations.rb#69 def valid?(context = T.unsafe(nil)); end # Runs all the validations within the specified context. Returns +true+ if @@ -36137,37 +37376,21 @@ module ActiveRecord::Validations # # @return [Boolean] # - # source://activerecord/lib/active_record/validations.rb#70 + # source://activerecord/lib/active_record/validations.rb#69 def validate(context = T.unsafe(nil)); end private - # source://activerecord/lib/active_record/validations.rb#79 + # source://activerecord/lib/active_record/validations.rb#82 def default_validation_context; end - # source://activerecord/lib/active_record/validations.rb#87 + # source://activerecord/lib/active_record/validations.rb#90 def perform_validations(options = T.unsafe(nil)); end # @raise [RecordInvalid] # - # source://activerecord/lib/active_record/validations.rb#83 + # source://activerecord/lib/active_record/validations.rb#86 def raise_validation_error; end - - module GeneratedClassMethods - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - def _validators; end - def _validators=(value); end - def _validators?; end - end - - module GeneratedInstanceMethods - def __callbacks; end - def __callbacks?; end - def _validators; end - def _validators?; end - end end # source://activerecord/lib/active_record/validations/absence.rb#5 @@ -36183,13 +37406,16 @@ class ActiveRecord::Validations::AssociatedValidator < ::ActiveModel::EachValida private + # source://activerecord/lib/active_record/validations/associated.rb#19 + def record_validation_context_for_association(record); end + # @return [Boolean] # - # source://activerecord/lib/active_record/validations/associated.rb#13 - def valid_object?(record); end + # source://activerecord/lib/active_record/validations/associated.rb#15 + def valid_object?(record, context); end end -# source://activerecord/lib/active_record/validations/associated.rb#18 +# source://activerecord/lib/active_record/validations/associated.rb#24 module ActiveRecord::Validations::ClassMethods # Validates that the specified attributes are not present (as defined by # Object#present?). If the attribute is an association, the associated object @@ -36236,7 +37462,7 @@ module ActiveRecord::Validations::ClassMethods # method, proc, or string should return or evaluate to a +true+ or +false+ # value. # - # source://activerecord/lib/active_record/validations/associated.rb#54 + # source://activerecord/lib/active_record/validations/associated.rb#60 def validates_associated(*attr_names); end # Validates that the specified attributes match the length restrictions supplied. @@ -36433,7 +37659,7 @@ module ActiveRecord::Validations::ClassMethods # * ActiveRecord::ConnectionAdapters::SQLite3Adapter. # * ActiveRecord::ConnectionAdapters::PostgreSQLAdapter. # - # source://activerecord/lib/active_record/validations/uniqueness.rb#286 + # source://activerecord/lib/active_record/validations/uniqueness.rb#291 def validates_uniqueness_of(*attr_names); end end @@ -36470,52 +37696,50 @@ class ActiveRecord::Validations::UniquenessValidator < ::ActiveModel::EachValida # source://activerecord/lib/active_record/validations/uniqueness.rb#6 def initialize(options); end - # source://activerecord/lib/active_record/validations/uniqueness.rb#19 + # source://activerecord/lib/active_record/validations/uniqueness.rb#20 def validate_each(record, attribute, value); end private - # source://activerecord/lib/active_record/validations/uniqueness.rb#111 + # source://activerecord/lib/active_record/validations/uniqueness.rb#112 def build_relation(klass, attribute, value); end # @return [Boolean] # - # source://activerecord/lib/active_record/validations/uniqueness.rb#82 + # source://activerecord/lib/active_record/validations/uniqueness.rb#83 def covered_by_unique_index?(klass, record, attribute, scope); end # The check for an existing value should be run from a class that # isn't abstract. This means working down from the current class - # (self), to the first non-abstract class. Since classes don't know - # their subclasses, we have to build the hierarchy between self and - # the record's class. + # (self), to the first non-abstract class. # - # source://activerecord/lib/active_record/validations/uniqueness.rb#59 + # source://activerecord/lib/active_record/validations/uniqueness.rb#58 def find_finder_class_for(record); end - # source://activerecord/lib/active_record/validations/uniqueness.rb#142 + # source://activerecord/lib/active_record/validations/uniqueness.rb#147 def map_enum_attribute(klass, attribute, value); end - # source://activerecord/lib/active_record/validations/uniqueness.rb#97 + # source://activerecord/lib/active_record/validations/uniqueness.rb#98 def resolve_attributes(record, attributes); end - # source://activerecord/lib/active_record/validations/uniqueness.rb#129 + # source://activerecord/lib/active_record/validations/uniqueness.rb#134 def scope_relation(record, relation); end # @return [Boolean] # - # source://activerecord/lib/active_record/validations/uniqueness.rb#69 + # source://activerecord/lib/active_record/validations/uniqueness.rb#70 def validation_needed?(klass, record, attribute); end end # Raised when a record cannot be inserted or updated because a value too long for a column type. # -# source://activerecord/lib/active_record/errors.rb#276 +# source://activerecord/lib/active_record/errors.rb#297 class ActiveRecord::ValueTooLong < ::ActiveRecord::StatementInvalid; end # Defunct wrapper class kept for compatibility. # StatementInvalid wraps the original exception now. # -# source://activerecord/lib/active_record/errors.rb#204 +# source://activerecord/lib/active_record/errors.rb#225 class ActiveRecord::WrappedDatabaseException < ::ActiveRecord::StatementInvalid; end # source://activerecord/lib/arel/errors.rb#3 @@ -36523,10 +37747,10 @@ module Arel class << self # @return [Boolean] # - # source://activerecord/lib/arel.rb#60 + # source://activerecord/lib/arel.rb#64 def arel_node?(value); end - # source://activerecord/lib/arel.rb#64 + # source://activerecord/lib/arel.rb#68 def fetch_attribute(value, &block); end # Wrap a known-safe SQL string for passing to query methods, e.g. @@ -36547,10 +37771,14 @@ module Arel # supplied in the call; without them, the placeholder tokens have no # special meaning, and will be passed through to the query as-is. # - # source://activerecord/lib/arel.rb#48 - def sql(sql_string, *positional_binds, **named_binds); end + # The +:retryable+ option can be used to mark the SQL as safe to retry. + # Use this option only if the SQL is idempotent, as it could be executed + # more than once. + # + # source://activerecord/lib/arel.rb#52 + def sql(sql_string, *positional_binds, retryable: T.unsafe(nil), **named_binds); end - # source://activerecord/lib/arel.rb#56 + # source://activerecord/lib/arel.rb#60 def star; end end end @@ -36610,19 +37838,31 @@ module Arel::Collectors; end class Arel::Collectors::Bind # @return [Bind] a new instance of Bind # - # source://activerecord/lib/arel/collectors/bind.rb#6 + # source://activerecord/lib/arel/collectors/bind.rb#8 def initialize; end - # source://activerecord/lib/arel/collectors/bind.rb#10 + # source://activerecord/lib/arel/collectors/bind.rb#12 def <<(str); end - # source://activerecord/lib/arel/collectors/bind.rb#14 - def add_bind(bind); end + # source://activerecord/lib/arel/collectors/bind.rb#16 + def add_bind(bind, &_arg1); end - # source://activerecord/lib/arel/collectors/bind.rb#19 + # source://activerecord/lib/arel/collectors/bind.rb#21 def add_binds(binds, proc_for_binds = T.unsafe(nil)); end - # source://activerecord/lib/arel/collectors/bind.rb#24 + # Returns the value of attribute retryable. + # + # source://activerecord/lib/arel/collectors/bind.rb#6 + def retryable; end + + # Sets the attribute retryable + # + # @param value the value to set the attribute retryable to. + # + # source://activerecord/lib/arel/collectors/bind.rb#6 + def retryable=(_arg0); end + + # source://activerecord/lib/arel/collectors/bind.rb#26 def value; end end @@ -36630,16 +37870,16 @@ end class Arel::Collectors::Composite # @return [Composite] a new instance of Composite # - # source://activerecord/lib/arel/collectors/composite.rb#8 + # source://activerecord/lib/arel/collectors/composite.rb#9 def initialize(left, right); end - # source://activerecord/lib/arel/collectors/composite.rb#13 + # source://activerecord/lib/arel/collectors/composite.rb#20 def <<(str); end - # source://activerecord/lib/arel/collectors/composite.rb#19 + # source://activerecord/lib/arel/collectors/composite.rb#26 def add_bind(bind, &block); end - # source://activerecord/lib/arel/collectors/composite.rb#25 + # source://activerecord/lib/arel/collectors/composite.rb#32 def add_binds(binds, proc_for_binds = T.unsafe(nil), &block); end # Returns the value of attribute preparable. @@ -36654,19 +37894,27 @@ class Arel::Collectors::Composite # source://activerecord/lib/arel/collectors/composite.rb#6 def preparable=(_arg0); end - # source://activerecord/lib/arel/collectors/composite.rb#31 + # Returns the value of attribute retryable. + # + # source://activerecord/lib/arel/collectors/composite.rb#7 + def retryable; end + + # source://activerecord/lib/arel/collectors/composite.rb#14 + def retryable=(retryable); end + + # source://activerecord/lib/arel/collectors/composite.rb#38 def value; end private # Returns the value of attribute left. # - # source://activerecord/lib/arel/collectors/composite.rb#36 + # source://activerecord/lib/arel/collectors/composite.rb#43 def left; end # Returns the value of attribute right. # - # source://activerecord/lib/arel/collectors/composite.rb#36 + # source://activerecord/lib/arel/collectors/composite.rb#43 def right; end end @@ -36708,6 +37956,18 @@ class Arel::Collectors::SQLString < ::Arel::Collectors::PlainString # # source://activerecord/lib/arel/collectors/sql_string.rb#8 def preparable=(_arg0); end + + # Returns the value of attribute retryable. + # + # source://activerecord/lib/arel/collectors/sql_string.rb#8 + def retryable; end + + # Sets the attribute retryable + # + # @param value the value to set the attribute retryable to. + # + # source://activerecord/lib/arel/collectors/sql_string.rb#8 + def retryable=(_arg0); end end # source://activerecord/lib/arel/collectors/substitute_binds.rb#5 @@ -36738,6 +37998,18 @@ class Arel::Collectors::SubstituteBinds # source://activerecord/lib/arel/collectors/substitute_binds.rb#6 def preparable=(_arg0); end + # Returns the value of attribute retryable. + # + # source://activerecord/lib/arel/collectors/substitute_binds.rb#6 + def retryable; end + + # Sets the attribute retryable + # + # @param value the value to set the attribute retryable to. + # + # source://activerecord/lib/arel/collectors/substitute_binds.rb#6 + def retryable=(_arg0); end + # source://activerecord/lib/arel/collectors/substitute_binds.rb#27 def value; end @@ -36938,40 +38210,8 @@ class Arel::Nodes::Addition < ::Arel::Nodes::InfixOperation def initialize(left, right); end end -# source://activerecord/lib/arel/nodes/and.rb#5 -class Arel::Nodes::And < ::Arel::Nodes::NodeExpression - # @return [And] a new instance of And - # - # source://activerecord/lib/arel/nodes/and.rb#8 - def initialize(children); end - - # @return [Boolean] - # - # source://activerecord/lib/arel/nodes/and.rb#29 - def ==(other); end - - # Returns the value of attribute children. - # - # source://activerecord/lib/arel/nodes/and.rb#6 - def children; end - - # @return [Boolean] - # - # source://activerecord/lib/arel/nodes/and.rb#29 - def eql?(other); end - - # source://activerecord/lib/arel/nodes/and.rb#21 - def fetch_attribute(&block); end - - # source://activerecord/lib/arel/nodes/and.rb#25 - def hash; end - - # source://activerecord/lib/arel/nodes/and.rb#13 - def left; end - - # source://activerecord/lib/arel/nodes/and.rb#17 - def right; end -end +# source://activerecord/lib/arel/nodes/nary.rb#36 +class Arel::Nodes::And < ::Arel::Nodes::Nary; end # source://activerecord/lib/arel/nodes/binary.rb#42 class Arel::Nodes::As < ::Arel::Nodes::Binary @@ -36998,7 +38238,7 @@ class Arel::Nodes::Ascending < ::Arel::Nodes::Ordering def reverse; end end -# source://activerecord/lib/arel/nodes/binary.rb#128 +# source://activerecord/lib/arel/nodes/binary.rb#122 class Arel::Nodes::Assignment < ::Arel::Nodes::Binary; end # source://activerecord/lib/arel/nodes/function.rb#42 @@ -37163,23 +38403,23 @@ class Arel::Nodes::BoundSqlLiteral < ::Arel::Nodes::NodeExpression # @raise [ArgumentError] # - # source://activerecord/lib/arel/nodes/bound_sql_literal.rb#50 + # source://activerecord/lib/arel/nodes/bound_sql_literal.rb#54 def +(other); end # @return [Boolean] # - # source://activerecord/lib/arel/nodes/bound_sql_literal.rb#42 + # source://activerecord/lib/arel/nodes/bound_sql_literal.rb#46 def ==(other); end # @return [Boolean] # - # source://activerecord/lib/arel/nodes/bound_sql_literal.rb#42 + # source://activerecord/lib/arel/nodes/bound_sql_literal.rb#46 def eql?(other); end - # source://activerecord/lib/arel/nodes/bound_sql_literal.rb#38 + # source://activerecord/lib/arel/nodes/bound_sql_literal.rb#42 def hash; end - # source://activerecord/lib/arel/nodes/bound_sql_literal.rb#56 + # source://activerecord/lib/arel/nodes/bound_sql_literal.rb#60 def inspect; end # Returns the value of attribute named_binds. @@ -37612,7 +38852,7 @@ class Arel::Nodes::Equality < ::Arel::Nodes::Binary def invert; end end -# source://activerecord/lib/arel/nodes/binary.rb#128 +# source://activerecord/lib/arel/nodes/binary.rb#122 class Arel::Nodes::Except < ::Arel::Nodes::Binary; end # source://activerecord/lib/arel/nodes/function.rb#42 @@ -37986,7 +39226,7 @@ class Arel::Nodes::InsertStatement < ::Arel::Nodes::Node def initialize_copy(other); end end -# source://activerecord/lib/arel/nodes/binary.rb#128 +# source://activerecord/lib/arel/nodes/binary.rb#122 class Arel::Nodes::Intersect < ::Arel::Nodes::Binary; end # source://activerecord/lib/arel/nodes/binary.rb#82 @@ -38005,7 +39245,7 @@ class Arel::Nodes::IsNotDistinctFrom < ::Arel::Nodes::Binary def invert; end end -# source://activerecord/lib/arel/nodes/binary.rb#128 +# source://activerecord/lib/arel/nodes/binary.rb#122 class Arel::Nodes::Join < ::Arel::Nodes::Binary; end # Class that represents a join source @@ -38163,6 +39403,41 @@ class Arel::Nodes::NamedWindow < ::Arel::Nodes::Window def initialize_copy(other); end end +# source://activerecord/lib/arel/nodes/nary.rb#5 +class Arel::Nodes::Nary < ::Arel::Nodes::NodeExpression + # @return [Nary] a new instance of Nary + # + # source://activerecord/lib/arel/nodes/nary.rb#8 + def initialize(children); end + + # @return [Boolean] + # + # source://activerecord/lib/arel/nodes/nary.rb#29 + def ==(other); end + + # Returns the value of attribute children. + # + # source://activerecord/lib/arel/nodes/nary.rb#6 + def children; end + + # @return [Boolean] + # + # source://activerecord/lib/arel/nodes/nary.rb#29 + def eql?(other); end + + # source://activerecord/lib/arel/nodes/nary.rb#21 + def fetch_attribute(&block); end + + # source://activerecord/lib/arel/nodes/nary.rb#25 + def hash; end + + # source://activerecord/lib/arel/nodes/nary.rb#13 + def left; end + + # source://activerecord/lib/arel/nodes/nary.rb#17 + def right; end +end + # = Using +Arel::Nodes::Node+ # # Active Record uses Arel to compose SQL statements. Instead of building SQL strings directly, it's building an @@ -38286,10 +39561,10 @@ class Arel::Nodes::Node # @return [Boolean] # - # source://activerecord/lib/arel/nodes/node.rb#157 + # source://activerecord/lib/arel/nodes/node.rb#158 def equality?; end - # source://activerecord/lib/arel/nodes/node.rb#154 + # source://activerecord/lib/arel/nodes/node.rb#155 def fetch_attribute; end # source://activerecord/lib/arel/nodes/node.rb#139 @@ -38369,11 +39644,8 @@ class Arel::Nodes::On < ::Arel::Nodes::Unary; end # source://activerecord/lib/arel/nodes/unary.rb#41 class Arel::Nodes::OptimizerHints < ::Arel::Nodes::Unary; end -# source://activerecord/lib/arel/nodes/binary.rb#114 -class Arel::Nodes::Or < ::Arel::Nodes::Binary - # source://activerecord/lib/arel/nodes/binary.rb#115 - def fetch_attribute(&block); end -end +# source://activerecord/lib/arel/nodes/nary.rb#37 +class Arel::Nodes::Or < ::Arel::Nodes::Nary; end # source://activerecord/lib/arel/nodes/ordering.rb#5 class Arel::Nodes::Ordering < ::Arel::Nodes::Unary @@ -38719,16 +39991,26 @@ class Arel::Nodes::SqlLiteral < ::String include ::Arel::AliasPredication include ::Arel::OrderPredications + # @return [SqlLiteral] a new instance of SqlLiteral + # + # source://activerecord/lib/arel/nodes/sql_literal.rb#13 + def initialize(string, retryable: T.unsafe(nil)); end + # @raise [ArgumentError] # - # source://activerecord/lib/arel/nodes/sql_literal.rb#18 + # source://activerecord/lib/arel/nodes/sql_literal.rb#25 def +(other); end - # source://activerecord/lib/arel/nodes/sql_literal.rb#11 + # source://activerecord/lib/arel/nodes/sql_literal.rb#18 def encode_with(coder); end - # source://activerecord/lib/arel/nodes/sql_literal.rb#15 + # source://activerecord/lib/arel/nodes/sql_literal.rb#22 def fetch_attribute; end + + # Returns the value of attribute retryable. + # + # source://activerecord/lib/arel/nodes/sql_literal.rb#11 + def retryable; end end # source://activerecord/lib/arel/nodes/string_join.rb#5 @@ -38849,10 +40131,10 @@ class Arel::Nodes::UnaryOperation < ::Arel::Nodes::Unary def operator; end end -# source://activerecord/lib/arel/nodes/binary.rb#128 +# source://activerecord/lib/arel/nodes/binary.rb#122 class Arel::Nodes::Union < ::Arel::Nodes::Binary; end -# source://activerecord/lib/arel/nodes/binary.rb#128 +# source://activerecord/lib/arel/nodes/binary.rb#122 class Arel::Nodes::UnionAll < ::Arel::Nodes::Binary; end # source://activerecord/lib/arel/nodes/unqualified_column.rb#5 @@ -39518,24 +40800,24 @@ class Arel::TreeManager # Returns the value of attribute ast. # - # source://activerecord/lib/arel/tree_manager.rb#41 + # source://activerecord/lib/arel/tree_manager.rb#45 def ast; end - # source://activerecord/lib/arel/tree_manager.rb#43 + # source://activerecord/lib/arel/tree_manager.rb#47 def to_dot; end - # source://activerecord/lib/arel/tree_manager.rb#49 + # source://activerecord/lib/arel/tree_manager.rb#53 def to_sql(engine = T.unsafe(nil)); end private - # source://activerecord/lib/arel/tree_manager.rb#55 + # source://activerecord/lib/arel/tree_manager.rb#60 def initialize_copy(other); end end # source://activerecord/lib/arel/tree_manager.rb#7 module Arel::TreeManager::StatementMethods - # source://activerecord/lib/arel/tree_manager.rb#27 + # source://activerecord/lib/arel/tree_manager.rb#31 def key; end # source://activerecord/lib/arel/tree_manager.rb#23 @@ -39550,10 +40832,10 @@ module Arel::TreeManager::StatementMethods # source://activerecord/lib/arel/tree_manager.rb#8 def take(limit); end - # source://activerecord/lib/arel/tree_manager.rb#35 + # source://activerecord/lib/arel/tree_manager.rb#39 def where(expr); end - # source://activerecord/lib/arel/tree_manager.rb#31 + # source://activerecord/lib/arel/tree_manager.rb#35 def wheres=(exprs); end end @@ -39566,10 +40848,10 @@ class Arel::UpdateManager < ::Arel::TreeManager # source://activerecord/lib/arel/update_manager.rb#7 def initialize(table = T.unsafe(nil)); end - # source://activerecord/lib/arel/update_manager.rb#32 + # source://activerecord/lib/arel/update_manager.rb#33 def group(columns); end - # source://activerecord/lib/arel/update_manager.rb#43 + # source://activerecord/lib/arel/update_manager.rb#44 def having(expr); end # source://activerecord/lib/arel/update_manager.rb#18 @@ -39599,19 +40881,19 @@ class Arel::Visitors::Dot < ::Arel::Visitors::Visitor private - # source://activerecord/lib/arel/visitors/dot.rb#260 + # source://activerecord/lib/arel/visitors/dot.rb#261 def edge(name); end - # source://activerecord/lib/arel/visitors/dot.rb#278 + # source://activerecord/lib/arel/visitors/dot.rb#279 def quote(string); end - # source://activerecord/lib/arel/visitors/dot.rb#282 + # source://activerecord/lib/arel/visitors/dot.rb#283 def to_dot; end - # source://activerecord/lib/arel/visitors/dot.rb#246 + # source://activerecord/lib/arel/visitors/dot.rb#247 def visit(o); end - # source://activerecord/lib/arel/visitors/dot.rb#215 + # source://activerecord/lib/arel/visitors/dot.rb#216 def visit_ActiveModel_Attribute(o); end # source://activerecord/lib/arel/visitors/dot.rb#183 @@ -39623,16 +40905,16 @@ class Arel::Visitors::Dot < ::Arel::Visitors::Visitor # source://activerecord/lib/arel/visitors/dot.rb#44 def visit_Arel_Nodes_Binary(o); end - # source://activerecord/lib/arel/visitors/dot.rb#211 + # source://activerecord/lib/arel/visitors/dot.rb#212 def visit_Arel_Nodes_BindParam(o); end - # source://activerecord/lib/arel/visitors/dot.rb#236 + # source://activerecord/lib/arel/visitors/dot.rb#237 def visit_Arel_Nodes_Case(o); end # source://activerecord/lib/arel/visitors/dot.rb#172 def visit_Arel_Nodes_Casted(o); end - # source://activerecord/lib/arel/visitors/dot.rb#232 + # source://activerecord/lib/arel/visitors/dot.rb#233 def visit_Arel_Nodes_Comment(o); end # source://activerecord/lib/arel/visitors/dot.rb#77 @@ -39673,6 +40955,9 @@ class Arel::Visitors::Dot < ::Arel::Visitors::Visitor # source://activerecord/lib/arel/visitors/dot.rb#60 def visit_Arel_Nodes_NotRegexp(o); end + # source://activerecord/lib/arel/visitors/dot.rb#188 + def visit_Arel_Nodes_Or(o); end + # source://activerecord/lib/arel/visitors/dot.rb#68 def visit_Arel_Nodes_Ordering(o); end @@ -39685,7 +40970,7 @@ class Arel::Visitors::Dot < ::Arel::Visitors::Visitor # source://activerecord/lib/arel/visitors/dot.rb#140 def visit_Arel_Nodes_SelectStatement(o); end - # source://activerecord/lib/arel/visitors/dot.rb#196 + # source://activerecord/lib/arel/visitors/dot.rb#197 def visit_Arel_Nodes_SqlLiteral(o); end # source://activerecord/lib/arel/visitors/dot.rb#86 @@ -39715,46 +41000,46 @@ class Arel::Visitors::Dot < ::Arel::Visitors::Visitor # source://activerecord/lib/arel/visitors/dot.rb#168 def visit_Arel_Table(o); end - # source://activerecord/lib/arel/visitors/dot.rb#225 + # source://activerecord/lib/arel/visitors/dot.rb#226 def visit_Array(o); end - # source://activerecord/lib/arel/visitors/dot.rb#196 + # source://activerecord/lib/arel/visitors/dot.rb#197 def visit_BigDecimal(o); end - # source://activerecord/lib/arel/visitors/dot.rb#196 + # source://activerecord/lib/arel/visitors/dot.rb#197 def visit_Date(o); end - # source://activerecord/lib/arel/visitors/dot.rb#196 + # source://activerecord/lib/arel/visitors/dot.rb#197 def visit_DateTime(o); end - # source://activerecord/lib/arel/visitors/dot.rb#196 + # source://activerecord/lib/arel/visitors/dot.rb#197 def visit_FalseClass(o); end - # source://activerecord/lib/arel/visitors/dot.rb#196 + # source://activerecord/lib/arel/visitors/dot.rb#197 def visit_Float(o); end - # source://activerecord/lib/arel/visitors/dot.rb#219 + # source://activerecord/lib/arel/visitors/dot.rb#220 def visit_Hash(o); end - # source://activerecord/lib/arel/visitors/dot.rb#196 + # source://activerecord/lib/arel/visitors/dot.rb#197 def visit_Integer(o); end - # source://activerecord/lib/arel/visitors/dot.rb#196 + # source://activerecord/lib/arel/visitors/dot.rb#197 def visit_NilClass(o); end - # source://activerecord/lib/arel/visitors/dot.rb#225 + # source://activerecord/lib/arel/visitors/dot.rb#226 def visit_Set(o); end - # source://activerecord/lib/arel/visitors/dot.rb#196 + # source://activerecord/lib/arel/visitors/dot.rb#197 def visit_String(o); end - # source://activerecord/lib/arel/visitors/dot.rb#196 + # source://activerecord/lib/arel/visitors/dot.rb#197 def visit_Symbol(o); end - # source://activerecord/lib/arel/visitors/dot.rb#196 + # source://activerecord/lib/arel/visitors/dot.rb#197 def visit_Time(o); end - # source://activerecord/lib/arel/visitors/dot.rb#196 + # source://activerecord/lib/arel/visitors/dot.rb#197 def visit_TrueClass(o); end # source://activerecord/lib/arel/visitors/dot.rb#188 @@ -39766,10 +41051,10 @@ class Arel::Visitors::Dot < ::Arel::Visitors::Visitor # source://activerecord/lib/arel/visitors/dot.rb#60 def visit__regexp(o); end - # source://activerecord/lib/arel/visitors/dot.rb#242 + # source://activerecord/lib/arel/visitors/dot.rb#243 def visit_edge(o, method); end - # source://activerecord/lib/arel/visitors/dot.rb#268 + # source://activerecord/lib/arel/visitors/dot.rb#269 def with_node(node); end end @@ -39827,21 +41112,21 @@ class Arel::Visitors::MySQL < ::Arel::Visitors::ToSql # MySQL doesn't automatically create a temporary table for use subquery, so we have # to give it some prompting in the form of a subsubquery. # - # source://activerecord/lib/arel/visitors/mysql.rb#88 + # source://activerecord/lib/arel/visitors/mysql.rb#93 def build_subselect(key, o); end # In the simple case, MySQL allows us to place JOINs directly into the UPDATE # query. However, this does not allow for LIMIT, OFFSET and ORDER. To support # these, we must use a subquery. # - # source://activerecord/lib/arel/visitors/mysql.rb#76 + # source://activerecord/lib/arel/visitors/mysql.rb#81 def prepare_delete_statement(o); end # In the simple case, MySQL allows us to place JOINs directly into the UPDATE # query. However, this does not allow for LIMIT, OFFSET and ORDER. To support # these, we must use a subquery. # - # source://activerecord/lib/arel/visitors/mysql.rb#76 + # source://activerecord/lib/arel/visitors/mysql.rb#81 def prepare_update_statement(o); end # source://activerecord/lib/arel/visitors/mysql.rb#7 @@ -39850,7 +41135,7 @@ class Arel::Visitors::MySQL < ::Arel::Visitors::ToSql # source://activerecord/lib/arel/visitors/mysql.rb#34 def visit_Arel_Nodes_Concat(o, collector); end - # source://activerecord/lib/arel/visitors/mysql.rb#67 + # source://activerecord/lib/arel/visitors/mysql.rb#72 def visit_Arel_Nodes_Cte(o, collector); end # source://activerecord/lib/arel/visitors/mysql.rb#49 @@ -39862,11 +41147,12 @@ class Arel::Visitors::MySQL < ::Arel::Visitors::ToSql # source://activerecord/lib/arel/visitors/mysql.rb#58 def visit_Arel_Nodes_NotRegexp(o, collector); end - # no-op - # - # source://activerecord/lib/arel/visitors/mysql.rb#63 + # source://activerecord/lib/arel/visitors/mysql.rb#62 def visit_Arel_Nodes_NullsFirst(o, collector); end + # source://activerecord/lib/arel/visitors/mysql.rb#67 + def visit_Arel_Nodes_NullsLast(o, collector); end + # source://activerecord/lib/arel/visitors/mysql.rb#54 def visit_Arel_Nodes_Regexp(o, collector); end @@ -39895,14 +41181,9 @@ class Arel::Visitors::PostgreSQL < ::Arel::Visitors::ToSql # Utilized by GroupingSet, Cube & RollUp visitors to # handle grouping aggregation semantics # - # source://activerecord/lib/arel/visitors/postgresql.rb#99 + # source://activerecord/lib/arel/visitors/postgresql.rb#88 def grouping_array_or_grouping_element(o, collector); end - # Used by Lateral visitor to enclose select queries in parentheses - # - # source://activerecord/lib/arel/visitors/postgresql.rb#87 - def grouping_parentheses(o, collector); end - # source://activerecord/lib/arel/visitors/postgresql.rb#49 def visit_Arel_Nodes_Cube(o, collector); end @@ -39980,460 +41261,470 @@ class Arel::Visitors::ToSql < ::Arel::Visitors::Visitor private - # source://activerecord/lib/arel/visitors/to_sql.rb#982 + # source://activerecord/lib/arel/visitors/to_sql.rb#996 def aggregate(name, o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#759 + # source://activerecord/lib/arel/visitors/to_sql.rb#754 def bind_block; end # FIXME: we should probably have a 2-pass visitor for this # - # source://activerecord/lib/arel/visitors/to_sql.rb#945 + # source://activerecord/lib/arel/visitors/to_sql.rb#943 def build_subselect(key, o); end - # source://activerecord/lib/arel/visitors/to_sql.rb#1009 + # source://activerecord/lib/arel/visitors/to_sql.rb#1023 def collect_ctes(children, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#176 + # source://activerecord/lib/arel/visitors/to_sql.rb#179 def collect_nodes_for(nodes, collector, spacer, connector = T.unsafe(nil)); end - # source://activerecord/lib/arel/visitors/to_sql.rb#890 + # source://activerecord/lib/arel/visitors/to_sql.rb#887 def collect_optimizer_hints(o, collector); end + # Used by some visitors to enclose select queries in parentheses + # + # source://activerecord/lib/arel/visitors/to_sql.rb#981 + def grouping_parentheses(o, collector, always_wrap_selects = T.unsafe(nil)); end + # @return [Boolean] # - # source://activerecord/lib/arel/visitors/to_sql.rb#920 + # source://activerecord/lib/arel/visitors/to_sql.rb#917 def has_group_by_and_having?(o); end # @return [Boolean] # - # source://activerecord/lib/arel/visitors/to_sql.rb#912 + # source://activerecord/lib/arel/visitors/to_sql.rb#909 def has_join_sources?(o); end # @return [Boolean] # - # source://activerecord/lib/arel/visitors/to_sql.rb#916 + # source://activerecord/lib/arel/visitors/to_sql.rb#913 def has_limit_or_offset_or_orders?(o); end - # source://activerecord/lib/arel/visitors/to_sql.rb#959 + # source://activerecord/lib/arel/visitors/to_sql.rb#957 def infix_value(o, collector, value); end - # source://activerecord/lib/arel/visitors/to_sql.rb#965 + # source://activerecord/lib/arel/visitors/to_sql.rb#963 def infix_value_with_paren(o, collector, value, suppress_parens = T.unsafe(nil)); end - # source://activerecord/lib/arel/visitors/to_sql.rb#900 + # source://activerecord/lib/arel/visitors/to_sql.rb#897 def inject_join(list, collector, join_str); end - # source://activerecord/lib/arel/visitors/to_sql.rb#996 + # source://activerecord/lib/arel/visitors/to_sql.rb#1010 def is_distinct_from(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#894 + # source://activerecord/lib/arel/visitors/to_sql.rb#891 def maybe_visit(thing, collector); end # The default strategy for an UPDATE with joins is to use a subquery. This doesn't work # on MySQL (even when aliasing the tables), but MySQL allows using JOIN directly in # an UPDATE statement, so in the MySQL visitor we redefine this to do that. # - # source://activerecord/lib/arel/visitors/to_sql.rb#927 + # source://activerecord/lib/arel/visitors/to_sql.rb#924 def prepare_delete_statement(o); end # The default strategy for an UPDATE with joins is to use a subquery. This doesn't work # on MySQL (even when aliasing the tables), but MySQL allows using JOIN directly in # an UPDATE statement, so in the MySQL visitor we redefine this to do that. # - # source://activerecord/lib/arel/visitors/to_sql.rb#927 + # source://activerecord/lib/arel/visitors/to_sql.rb#924 def prepare_update_statement(o); end - # source://activerecord/lib/arel/visitors/to_sql.rb#870 + # source://activerecord/lib/arel/visitors/to_sql.rb#867 def quote(value); end - # source://activerecord/lib/arel/visitors/to_sql.rb#880 + # source://activerecord/lib/arel/visitors/to_sql.rb#877 def quote_column_name(name); end - # source://activerecord/lib/arel/visitors/to_sql.rb#875 + # source://activerecord/lib/arel/visitors/to_sql.rb#872 def quote_table_name(name); end - # source://activerecord/lib/arel/visitors/to_sql.rb#885 + # @return [Boolean] + # + # source://activerecord/lib/arel/visitors/to_sql.rb#992 + def require_parentheses?(o); end + + # source://activerecord/lib/arel/visitors/to_sql.rb#882 def sanitize_as_sql_comment(value); end # @return [Boolean] # - # source://activerecord/lib/arel/visitors/to_sql.rb#908 + # source://activerecord/lib/arel/visitors/to_sql.rb#905 def unboundable?(value); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def unsupported(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#761 + # source://activerecord/lib/arel/visitors/to_sql.rb#756 def visit_ActiveModel_Attribute(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_ActiveSupport_Multibyte_Chars(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_ActiveSupport_StringInquirer(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#751 + # source://activerecord/lib/arel/visitors/to_sql.rb#746 def visit_Arel_Attributes_Attribute(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#616 + # source://activerecord/lib/arel/visitors/to_sql.rb#622 def visit_Arel_Nodes_And(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#698 + # source://activerecord/lib/arel/visitors/to_sql.rb#693 def visit_Arel_Nodes_As(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#360 + # source://activerecord/lib/arel/visitors/to_sql.rb#363 def visit_Arel_Nodes_Ascending(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#635 + # source://activerecord/lib/arel/visitors/to_sql.rb#630 def visit_Arel_Nodes_Assignment(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#417 + # source://activerecord/lib/arel/visitors/to_sql.rb#421 def visit_Arel_Nodes_Avg(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#427 + # source://activerecord/lib/arel/visitors/to_sql.rb#431 def visit_Arel_Nodes_Between(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#183 + # source://activerecord/lib/arel/visitors/to_sql.rb#186 def visit_Arel_Nodes_Bin(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#765 + # source://activerecord/lib/arel/visitors/to_sql.rb#760 def visit_Arel_Nodes_BindParam(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#774 + # source://activerecord/lib/arel/visitors/to_sql.rb#770 def visit_Arel_Nodes_BoundSqlLiteral(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#704 + # source://activerecord/lib/arel/visitors/to_sql.rb#699 def visit_Arel_Nodes_Case(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#84 + # source://activerecord/lib/arel/visitors/to_sql.rb#87 def visit_Arel_Nodes_Casted(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#172 + # source://activerecord/lib/arel/visitors/to_sql.rb#175 def visit_Arel_Nodes_Comment(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#401 + # source://activerecord/lib/arel/visitors/to_sql.rb#405 def visit_Arel_Nodes_Count(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#737 + # source://activerecord/lib/arel/visitors/to_sql.rb#732 def visit_Arel_Nodes_Cte(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#293 + # source://activerecord/lib/arel/visitors/to_sql.rb#296 def visit_Arel_Nodes_CurrentRow(o, collector); end # source://activerecord/lib/arel/visitors/to_sql.rb#22 def visit_Arel_Nodes_DeleteStatement(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#364 + # source://activerecord/lib/arel/visitors/to_sql.rb#367 def visit_Arel_Nodes_Descending(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#187 + # source://activerecord/lib/arel/visitors/to_sql.rb#190 def visit_Arel_Nodes_Distinct(o, collector); end # @raise [NotImplementedError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#191 + # source://activerecord/lib/arel/visitors/to_sql.rb#194 def visit_Arel_Nodes_DistinctOn(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#493 + # source://activerecord/lib/arel/visitors/to_sql.rb#497 def visit_Arel_Nodes_DoesNotMatch(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#728 + # source://activerecord/lib/arel/visitors/to_sql.rb#723 def visit_Arel_Nodes_Else(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#648 + # source://activerecord/lib/arel/visitors/to_sql.rb#643 def visit_Arel_Nodes_Equality(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#218 + # source://activerecord/lib/arel/visitors/to_sql.rb#221 def visit_Arel_Nodes_Except(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#73 + # source://activerecord/lib/arel/visitors/to_sql.rb#76 def visit_Arel_Nodes_Exists(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#396 + # source://activerecord/lib/arel/visitors/to_sql.rb#400 def visit_Arel_Nodes_Extract(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#93 + # source://activerecord/lib/arel/visitors/to_sql.rb#96 def visit_Arel_Nodes_False(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#248 + # source://activerecord/lib/arel/visitors/to_sql.rb#251 def visit_Arel_Nodes_Filter(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#283 + # source://activerecord/lib/arel/visitors/to_sql.rb#286 def visit_Arel_Nodes_Following(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#866 + # source://activerecord/lib/arel/visitors/to_sql.rb#863 def visit_Arel_Nodes_Fragments(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#528 + # source://activerecord/lib/arel/visitors/to_sql.rb#532 def visit_Arel_Nodes_FullOuterJoin(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#445 + # source://activerecord/lib/arel/visitors/to_sql.rb#449 def visit_Arel_Nodes_GreaterThan(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#433 + # source://activerecord/lib/arel/visitors/to_sql.rb#437 def visit_Arel_Nodes_GreaterThanOrEqual(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#379 + # source://activerecord/lib/arel/visitors/to_sql.rb#382 def visit_Arel_Nodes_Group(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#324 + # source://activerecord/lib/arel/visitors/to_sql.rb#327 def visit_Arel_Nodes_Grouping(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#333 + # source://activerecord/lib/arel/visitors/to_sql.rb#336 def visit_Arel_Nodes_HomogeneousIn(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#584 + # source://activerecord/lib/arel/visitors/to_sql.rb#588 def visit_Arel_Nodes_In(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#850 + # source://activerecord/lib/arel/visitors/to_sql.rb#847 def visit_Arel_Nodes_InfixOperation(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#549 + # source://activerecord/lib/arel/visitors/to_sql.rb#553 def visit_Arel_Nodes_InnerJoin(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#51 + # source://activerecord/lib/arel/visitors/to_sql.rb#53 def visit_Arel_Nodes_InsertStatement(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#213 + # source://activerecord/lib/arel/visitors/to_sql.rb#216 def visit_Arel_Nodes_Intersect(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#673 + # source://activerecord/lib/arel/visitors/to_sql.rb#668 def visit_Arel_Nodes_IsDistinctFrom(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#663 + # source://activerecord/lib/arel/visitors/to_sql.rb#658 def visit_Arel_Nodes_IsNotDistinctFrom(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#505 + # source://activerecord/lib/arel/visitors/to_sql.rb#509 def visit_Arel_Nodes_JoinSource(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#469 + # source://activerecord/lib/arel/visitors/to_sql.rb#473 def visit_Arel_Nodes_LessThan(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#457 + # source://activerecord/lib/arel/visitors/to_sql.rb#461 def visit_Arel_Nodes_LessThanOrEqual(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#315 + # source://activerecord/lib/arel/visitors/to_sql.rb#318 def visit_Arel_Nodes_Limit(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#320 + # source://activerecord/lib/arel/visitors/to_sql.rb#323 def visit_Arel_Nodes_Lock(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#481 + # source://activerecord/lib/arel/visitors/to_sql.rb#485 def visit_Arel_Nodes_Matches(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#409 + # source://activerecord/lib/arel/visitors/to_sql.rb#413 def visit_Arel_Nodes_Max(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#413 + # source://activerecord/lib/arel/visitors/to_sql.rb#417 def visit_Arel_Nodes_Min(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#383 + # source://activerecord/lib/arel/visitors/to_sql.rb#386 def visit_Arel_Nodes_NamedFunction(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#223 + # source://activerecord/lib/arel/visitors/to_sql.rb#226 def visit_Arel_Nodes_NamedWindow(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#565 + # source://activerecord/lib/arel/visitors/to_sql.rb#569 def visit_Arel_Nodes_Not(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#683 + # source://activerecord/lib/arel/visitors/to_sql.rb#678 def visit_Arel_Nodes_NotEqual(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#600 + # source://activerecord/lib/arel/visitors/to_sql.rb#605 def visit_Arel_Nodes_NotIn(o, collector); end # @raise [NotImplementedError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#520 + # source://activerecord/lib/arel/visitors/to_sql.rb#524 def visit_Arel_Nodes_NotRegexp(o, collector); end # NullsFirst is available on all but MySQL, where it is redefined. # - # source://activerecord/lib/arel/visitors/to_sql.rb#369 + # source://activerecord/lib/arel/visitors/to_sql.rb#372 def visit_Arel_Nodes_NullsFirst(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#374 + # source://activerecord/lib/arel/visitors/to_sql.rb#377 def visit_Arel_Nodes_NullsLast(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#310 + # source://activerecord/lib/arel/visitors/to_sql.rb#313 def visit_Arel_Nodes_Offset(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#560 + # source://activerecord/lib/arel/visitors/to_sql.rb#564 def visit_Arel_Nodes_On(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#167 + # source://activerecord/lib/arel/visitors/to_sql.rb#170 def visit_Arel_Nodes_OptimizerHints(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#620 + # source://activerecord/lib/arel/visitors/to_sql.rb#626 def visit_Arel_Nodes_Or(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#535 + # source://activerecord/lib/arel/visitors/to_sql.rb#539 def visit_Arel_Nodes_OuterJoin(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#297 + # source://activerecord/lib/arel/visitors/to_sql.rb#300 def visit_Arel_Nodes_Over(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#273 + # source://activerecord/lib/arel/visitors/to_sql.rb#276 def visit_Arel_Nodes_Preceding(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#84 + # source://activerecord/lib/arel/visitors/to_sql.rb#87 def visit_Arel_Nodes_Quoted(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#264 + # source://activerecord/lib/arel/visitors/to_sql.rb#267 def visit_Arel_Nodes_Range(o, collector); end # @raise [NotImplementedError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#516 + # source://activerecord/lib/arel/visitors/to_sql.rb#520 def visit_Arel_Nodes_Regexp(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#542 + # source://activerecord/lib/arel/visitors/to_sql.rb#546 def visit_Arel_Nodes_RightOuterJoin(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#255 + # source://activerecord/lib/arel/visitors/to_sql.rb#258 def visit_Arel_Nodes_Rows(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#146 + # source://activerecord/lib/arel/visitors/to_sql.rb#149 def visit_Arel_Nodes_SelectCore(o, collector); end # The Oracle enhanced adapter uses this private method, # see https://github.com/rsim/oracle-enhanced/issues/2186 # - # source://activerecord/lib/arel/visitors/to_sql.rb#140 + # source://activerecord/lib/arel/visitors/to_sql.rb#143 def visit_Arel_Nodes_SelectOptions(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#117 + # source://activerecord/lib/arel/visitors/to_sql.rb#120 def visit_Arel_Nodes_SelectStatement(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#769 + # source://activerecord/lib/arel/visitors/to_sql.rb#764 def visit_Arel_Nodes_SqlLiteral(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#524 + # source://activerecord/lib/arel/visitors/to_sql.rb#528 def visit_Arel_Nodes_StringJoin(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#405 + # source://activerecord/lib/arel/visitors/to_sql.rb#409 def visit_Arel_Nodes_Sum(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#421 + # source://activerecord/lib/arel/visitors/to_sql.rb#425 def visit_Arel_Nodes_TableAlias(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#89 + # source://activerecord/lib/arel/visitors/to_sql.rb#92 def visit_Arel_Nodes_True(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#856 + # source://activerecord/lib/arel/visitors/to_sql.rb#853 def visit_Arel_Nodes_UnaryOperation(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#205 + # source://activerecord/lib/arel/visitors/to_sql.rb#208 def visit_Arel_Nodes_Union(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#209 + # source://activerecord/lib/arel/visitors/to_sql.rb#212 def visit_Arel_Nodes_UnionAll(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#733 + # source://activerecord/lib/arel/visitors/to_sql.rb#728 def visit_Arel_Nodes_UnqualifiedColumn(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#39 + # source://activerecord/lib/arel/visitors/to_sql.rb#40 def visit_Arel_Nodes_UpdateStatement(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#97 + # source://activerecord/lib/arel/visitors/to_sql.rb#100 def visit_Arel_Nodes_ValuesList(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#721 + # source://activerecord/lib/arel/visitors/to_sql.rb#716 def visit_Arel_Nodes_When(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#229 + # source://activerecord/lib/arel/visitors/to_sql.rb#232 def visit_Arel_Nodes_Window(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#195 + # source://activerecord/lib/arel/visitors/to_sql.rb#198 def visit_Arel_Nodes_With(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#200 + # source://activerecord/lib/arel/visitors/to_sql.rb#203 def visit_Arel_Nodes_WithRecursive(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#355 + # source://activerecord/lib/arel/visitors/to_sql.rb#358 def visit_Arel_SelectManager(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#570 + # source://activerecord/lib/arel/visitors/to_sql.rb#574 def visit_Arel_Table(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#861 + # source://activerecord/lib/arel/visitors/to_sql.rb#858 def visit_Array(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_BigDecimal(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_Class(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_Date(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_DateTime(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_FalseClass(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_Float(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_Hash(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#827 + # source://activerecord/lib/arel/visitors/to_sql.rb#824 def visit_Integer(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_NilClass(o, collector); end - # source://activerecord/lib/arel/visitors/to_sql.rb#861 + # source://activerecord/lib/arel/visitors/to_sql.rb#858 def visit_Set(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_String(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_Symbol(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_Time(o, collector); end # @raise [UnsupportedVisitError] # - # source://activerecord/lib/arel/visitors/to_sql.rb#831 + # source://activerecord/lib/arel/visitors/to_sql.rb#828 def visit_TrueClass(o, collector); end end -# source://activerecord/lib/arel/visitors/to_sql.rb#756 +# source://activerecord/lib/arel/visitors/to_sql.rb#751 Arel::Visitors::ToSql::BIND_BLOCK = T.let(T.unsafe(nil), Proc) # source://activerecord/lib/arel/visitors/to_sql.rb#5 diff --git a/sorbet/rbi/gems/activestorage@7.1.3.3.rbi b/sorbet/rbi/gems/activestorage@8.0.0.beta1.rbi similarity index 61% rename from sorbet/rbi/gems/activestorage@7.1.3.3.rbi rename to sorbet/rbi/gems/activestorage@8.0.0.beta1.rbi index 85d63a86..284673f2 100644 --- a/sorbet/rbi/gems/activestorage@7.1.3.3.rbi +++ b/sorbet/rbi/gems/activestorage@8.0.0.beta1.rbi @@ -6,105 +6,102 @@ class ActiveRecord::Base - include ::ActiveModel::Access include ::ActiveModel::ForbiddenAttributesProtection include ::ActiveModel::AttributeAssignment + include ::ActiveModel::Access include ::ActiveModel::Serialization - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _before_commit_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _commit_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _create_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _destroy_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _find_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _initialize_callbacks; end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#11 + # source://activerecord/8.0.0.beta1lib/active_record/reflection.rb#11 def _reflections; end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#11 + # source://activerecord/8.0.0.beta1lib/active_record/reflection.rb#11 def _reflections?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _rollback_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_before_commit_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_commit_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_create_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_destroy_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_find_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_initialize_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_rollback_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_save_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_touch_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_update_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_validate_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_validation_callbacks(&block); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _save_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _touch_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _update_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _validate_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _validation_callbacks; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activemodel/8.0.0.beta1lib/active_model/validations.rb#50 def _validators; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activemodel/8.0.0.beta1lib/active_model/validations.rb#50 def _validators?; end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#12 + # source://activerecord/8.0.0.beta1lib/active_record/reflection.rb#12 def aggregate_reflections; end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#12 + # source://activerecord/8.0.0.beta1lib/active_record/reflection.rb#12 def aggregate_reflections?; end # source://activestorage/lib/active_storage/reflection.rb#53 @@ -113,897 +110,925 @@ class ActiveRecord::Base # source://activestorage/lib/active_storage/reflection.rb#53 def attachment_reflections?; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#72 + # source://activemodel/8.0.0.beta1lib/active_model/attribute_methods.rb#71 def attribute_aliases; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#72 + # source://activemodel/8.0.0.beta1lib/active_model/attribute_methods.rb#71 def attribute_aliases?; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#73 + # source://activemodel/8.0.0.beta1lib/active_model/attribute_methods.rb#72 def attribute_method_patterns; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#73 + # source://activemodel/8.0.0.beta1lib/active_model/attribute_methods.rb#72 def attribute_method_patterns?; end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#13 + # source://activerecord/8.0.0.beta1lib/active_record/reflection.rb#13 def automatic_scope_inversing; end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#13 + # source://activerecord/8.0.0.beta1lib/active_record/reflection.rb#13 def automatic_scope_inversing?; end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#16 + # source://activerecord/8.0.0.beta1lib/active_record/reflection.rb#14 + def automatically_invert_plural_associations; end + + # source://activerecord/8.0.0.beta1lib/active_record/reflection.rb#14 + def automatically_invert_plural_associations?; end + + # source://activerecord/8.0.0.beta1lib/active_record/integration.rb#16 def cache_timestamp_format; end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#16 + # source://activerecord/8.0.0.beta1lib/active_record/integration.rb#16 def cache_timestamp_format?; end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#24 + # source://activerecord/8.0.0.beta1lib/active_record/integration.rb#24 def cache_versioning; end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#24 + # source://activerecord/8.0.0.beta1lib/active_record/integration.rb#24 def cache_versioning?; end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#32 + # source://activerecord/8.0.0.beta1lib/active_record/integration.rb#32 def collection_cache_versioning; end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#32 + # source://activerecord/8.0.0.beta1lib/active_record/integration.rb#32 def collection_cache_versioning?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#178 - def column_for_attribute(name, &block); end + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#183 + def column_for_attribute(name, &_arg1); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#97 + # source://activerecord/8.0.0.beta1lib/active_record/counter_cache.rb#10 + def counter_cached_association_names; end + + # source://activerecord/8.0.0.beta1lib/active_record/counter_cache.rb#10 + def counter_cached_association_names?; end + + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#98 def default_connection_handler; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#97 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#98 def default_connection_handler?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#99 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#100 def default_role; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#99 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#100 def default_role?; end - # source://activerecord/7.1.3.3lib/active_record/scoping/default.rb#20 + # source://activerecord/8.0.0.beta1lib/active_record/scoping/default.rb#20 def default_scope_override; end - # source://activerecord/7.1.3.3lib/active_record/scoping/default.rb#19 + # source://activerecord/8.0.0.beta1lib/active_record/scoping/default.rb#19 def default_scopes; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#101 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#102 def default_shard; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#101 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#102 def default_shard?; end - # source://activerecord/7.1.3.3lib/active_record/enum.rb#167 + # source://activerecord/8.0.0.beta1lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.1.3.3lib/active_record/enum.rb#167 + # source://activerecord/8.0.0.beta1lib/active_record/enum.rb#167 def defined_enums?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#47 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#47 def destroy_association_async_batch_size; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#37 - def destroy_association_async_job(&block); end + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#37 + def destroy_association_async_job(&_arg0); end - # source://activerecord/7.1.3.3lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/8.0.0.beta1lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes; end - # source://activerecord/7.1.3.3lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/8.0.0.beta1lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes=(_arg0); end - # source://activerecord/7.1.3.3lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/8.0.0.beta1lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes?; end - # source://activemodel/7.1.3.3lib/active_model/serializers/json.rb#15 + # source://activemodel/8.0.0.beta1lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.1.3.3lib/active_model/serializers/json.rb#15 + # source://activemodel/8.0.0.beta1lib/active_model/serializers/json.rb#15 def include_root_in_json?; end - # source://activerecord/7.1.3.3lib/active_record/locking/optimistic.rb#56 + # source://activerecord/8.0.0.beta1lib/active_record/locking/optimistic.rb#56 def lock_optimistically; end - # source://activerecord/7.1.3.3lib/active_record/locking/optimistic.rb#56 + # source://activerecord/8.0.0.beta1lib/active_record/locking/optimistic.rb#56 def lock_optimistically?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#22 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#22 def logger; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#22 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#22 def logger?; end - # source://activemodel/7.1.3.3lib/active_model/naming.rb#255 - def model_name(&block); end + # source://activemodel/8.0.0.beta1lib/active_model/naming.rb#255 + def model_name(&_arg0); end - # source://activerecord/7.1.3.3lib/active_record/nested_attributes.rb#15 + # source://activerecord/8.0.0.beta1lib/active_record/nested_attributes.rb#15 def nested_attributes_options; end - # source://activerecord/7.1.3.3lib/active_record/nested_attributes.rb#15 + # source://activerecord/8.0.0.beta1lib/active_record/nested_attributes.rb#15 def nested_attributes_options?; end - # source://activerecord/7.1.3.3lib/active_record/normalization.rb#8 + # source://activerecord/8.0.0.beta1lib/active_record/normalization.rb#8 def normalized_attributes; end - # source://activerecord/7.1.3.3lib/active_record/normalization.rb#8 + # source://activerecord/8.0.0.beta1lib/active_record/normalization.rb#8 def normalized_attributes=(_arg0); end - # source://activerecord/7.1.3.3lib/active_record/normalization.rb#8 + # source://activerecord/8.0.0.beta1lib/active_record/normalization.rb#8 def normalized_attributes?; end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 + # source://activemodel/8.0.0.beta1lib/active_model/conversion.rb#32 def param_delimiter=(_arg0); end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/dirty.rb#50 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/dirty.rb#50 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts?; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/dirty.rb#49 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/dirty.rb#49 def partial_updates; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/dirty.rb#49 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/dirty.rb#49 def partial_updates?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#163 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#168 def pluralize_table_names; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#163 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#168 def pluralize_table_names?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#158 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#163 def primary_key_prefix_type; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#158 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#163 def primary_key_prefix_type?; end - # source://activerecord/7.1.3.3lib/active_record/timestamp.rb#47 + # source://activerecord/8.0.0.beta1lib/active_record/timestamp.rb#47 def record_timestamps; end - # source://activerecord/7.1.3.3lib/active_record/timestamp.rb#47 + # source://activerecord/8.0.0.beta1lib/active_record/timestamp.rb#47 def record_timestamps=(_arg0); end - # source://activerecord/7.1.3.3lib/active_record/timestamp.rb#47 + # source://activerecord/8.0.0.beta1lib/active_record/timestamp.rb#47 def record_timestamps?; end - # source://activerecord/7.1.3.3lib/active_record/signed_id.rb#13 + # source://activerecord/8.0.0.beta1lib/active_record/signed_id.rb#13 def signed_id_verifier_secret; end - # source://activerecord/7.1.3.3lib/active_record/signed_id.rb#13 + # source://activerecord/8.0.0.beta1lib/active_record/signed_id.rb#13 def signed_id_verifier_secret?; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/time_zone_conversion.rb#71 def skip_time_zone_conversion_for_attributes; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/time_zone_conversion.rb#71 def skip_time_zone_conversion_for_attributes?; end - # source://activerecord/7.1.3.3lib/active_record/inheritance.rb#43 + # source://activerecord/8.0.0.beta1lib/active_record/inheritance.rb#43 def store_full_class_name; end - # source://activerecord/7.1.3.3lib/active_record/inheritance.rb#43 + # source://activerecord/8.0.0.beta1lib/active_record/inheritance.rb#43 def store_full_class_name?; end - # source://activerecord/7.1.3.3lib/active_record/inheritance.rb#47 + # source://activerecord/8.0.0.beta1lib/active_record/inheritance.rb#47 def store_full_sti_class; end - # source://activerecord/7.1.3.3lib/active_record/inheritance.rb#47 + # source://activerecord/8.0.0.beta1lib/active_record/inheritance.rb#47 def store_full_sti_class?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#159 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#164 def table_name_prefix; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#159 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#164 def table_name_prefix?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#160 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#165 def table_name_suffix; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#160 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#165 def table_name_suffix?; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/time_zone_conversion.rb#70 def time_zone_aware_attributes; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/time_zone_conversion.rb#70 def time_zone_aware_attributes?; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/time_zone_conversion.rb#72 def time_zone_aware_types; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/time_zone_conversion.rb#72 def time_zone_aware_types?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#178 - def type_for_attribute(attr_name, &block); end - - # source://activemodel/7.1.3.3lib/active_model/validations.rb#67 - def validation_context; end - - private - - # source://activemodel/7.1.3.3lib/active_model/validations.rb#67 - def validation_context=(_arg0); end + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#183 + def type_for_attribute(*_arg0, **_arg1, &_arg2); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/readonly_attributes.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _attr_readonly; end - # source://activerecord/7.1.3.3lib/active_record/readonly_attributes.rb#11 - def _attr_readonly=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _attr_readonly=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/readonly_attributes.rb#11 + # source://activerecord/8.0.0.beta1lib/active_record/readonly_attributes.rb#11 def _attr_readonly?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _before_commit_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _before_commit_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _commit_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _commit_callbacks=(value); end - # source://activerecord/7.1.3.3lib/active_record/counter_cache.rb#9 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _counter_cache_columns; end - # source://activerecord/7.1.3.3lib/active_record/counter_cache.rb#9 - def _counter_cache_columns=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _counter_cache_columns=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/counter_cache.rb#9 + # source://activerecord/8.0.0.beta1lib/active_record/counter_cache.rb#9 def _counter_cache_columns?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _create_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _create_callbacks=(value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#24 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _destroy_association_async_job; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#24 - def _destroy_association_async_job=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _destroy_association_async_job=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#24 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#24 def _destroy_association_async_job?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _destroy_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _destroy_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _find_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _find_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _initialize_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _initialize_callbacks=(value); end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _reflections; end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#11 - def _reflections=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#11 + # source://activerecord/8.0.0.beta1lib/active_record/reflection.rb#11 def _reflections?; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _rollback_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _rollback_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _save_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _save_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _touch_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _touch_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _update_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _update_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _validate_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _validate_callbacks=(value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _validation_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _validation_callbacks=(value); end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _validators; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 - def _validators=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activemodel/8.0.0.beta1lib/active_model/validations.rb#50 def _validators?; end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_create(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_destroy(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_find(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_initialize(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_save(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_touch(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#144 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#144 def after_update(*args, **options, &block); end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#12 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def aggregate_reflections; end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#12 - def aggregate_reflections=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def aggregate_reflections=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#12 + # source://activerecord/8.0.0.beta1lib/active_record/reflection.rb#12 def aggregate_reflections?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#105 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#109 def application_record_class?; end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#137 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#137 def around_create(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#137 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#137 def around_destroy(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#137 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#137 def around_save(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#137 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#137 def around_update(*args, **options, &block); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#125 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#129 def asynchronous_queries_session; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#129 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#133 def asynchronous_queries_tracker; end - # source://activestorage/lib/active_storage/reflection.rb#53 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def attachment_reflections; end - # source://activestorage/lib/active_storage/reflection.rb#53 - def attachment_reflections=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def attachment_reflections=(new_value); end # source://activestorage/lib/active_storage/reflection.rb#53 def attachment_reflections?; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#72 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def attribute_aliases; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#72 - def attribute_aliases=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def attribute_aliases=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#72 + # source://activemodel/8.0.0.beta1lib/active_model/attribute_methods.rb#71 def attribute_aliases?; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#73 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def attribute_method_patterns; end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#73 - def attribute_method_patterns=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def attribute_method_patterns=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/attribute_methods.rb#73 + # source://activemodel/8.0.0.beta1lib/active_model/attribute_methods.rb#72 def attribute_method_patterns?; end - # source://activerecord/7.1.3.3lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def attributes_for_inspect; end - # source://activerecord/7.1.3.3lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def attributes_for_inspect=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/attributes.rb#11 - def attributes_to_define_after_schema_loads?; end + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#107 + def attributes_for_inspect?; end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#13 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def automatic_scope_inversing; end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#13 - def automatic_scope_inversing=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def automatic_scope_inversing=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#13 + # source://activerecord/8.0.0.beta1lib/active_record/reflection.rb#13 def automatic_scope_inversing?; end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#130 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def automatically_invert_plural_associations; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def automatically_invert_plural_associations=(new_value); end + + # source://activerecord/8.0.0.beta1lib/active_record/reflection.rb#14 + def automatically_invert_plural_associations?; end + + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#130 def before_create(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#130 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#130 def before_destroy(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#130 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#130 def before_save(*args, **options, &block); end - # source://activemodel/7.1.3.3lib/active_model/callbacks.rb#130 + # source://activemodel/8.0.0.beta1lib/active_model/callbacks.rb#130 def before_update(*args, **options, &block); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#89 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def belongs_to_required_by_default; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#89 - def belongs_to_required_by_default=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def belongs_to_required_by_default=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#89 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#89 def belongs_to_required_by_default?; end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#16 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def cache_timestamp_format; end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#16 - def cache_timestamp_format=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def cache_timestamp_format=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#16 + # source://activerecord/8.0.0.beta1lib/active_record/integration.rb#16 def cache_timestamp_format?; end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#24 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def cache_versioning; end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#24 - def cache_versioning=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def cache_versioning=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#24 + # source://activerecord/8.0.0.beta1lib/active_record/integration.rb#24 def cache_versioning?; end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#32 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def collection_cache_versioning; end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#32 - def collection_cache_versioning=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def collection_cache_versioning=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/integration.rb#32 + # source://activerecord/8.0.0.beta1lib/active_record/integration.rb#32 def collection_cache_versioning?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#77 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#77 def configurations; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#71 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#71 def configurations=(config); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#189 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#193 def connected_to_stack; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#203 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#207 def connection_class; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#199 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#203 def connection_class=(b); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#207 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#211 def connection_class?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#211 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#215 def connection_class_for_self; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#117 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#121 def connection_handler; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#121 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#125 def connection_handler=(handler); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#180 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def counter_cached_association_names; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def counter_cached_association_names=(new_value); end + + # source://activerecord/8.0.0.beta1lib/active_record/counter_cache.rb#10 + def counter_cached_association_names?; end + + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#184 def current_preventing_writes; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#143 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#147 def current_role; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#161 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#165 def current_shard; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/serialization.rb#20 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_column_serializer; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/serialization.rb#20 - def default_column_serializer=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_column_serializer=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/serialization.rb#20 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/serialization.rb#20 def default_column_serializer?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#97 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_connection_handler; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#97 - def default_connection_handler=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_connection_handler=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#97 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#98 def default_connection_handler?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#99 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_role; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#99 - def default_role=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_role=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#99 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#100 def default_role?; end - # source://activerecord/7.1.3.3lib/active_record/scoping/default.rb#20 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_scope_override; end - # source://activerecord/7.1.3.3lib/active_record/scoping/default.rb#20 - def default_scope_override=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_scope_override=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/scoping/default.rb#19 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_scopes; end - # source://activerecord/7.1.3.3lib/active_record/scoping/default.rb#19 - def default_scopes=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_scopes=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#101 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def default_shard; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#101 - def default_shard=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def default_shard=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#101 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#102 def default_shard?; end - # source://activerecord/7.1.3.3lib/active_record/enum.rb#167 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def defined_enums; end - # source://activerecord/7.1.3.3lib/active_record/enum.rb#167 - def defined_enums=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/enum.rb#167 + # source://activerecord/8.0.0.beta1lib/active_record/enum.rb#167 def defined_enums?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#47 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def destroy_association_async_batch_size; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#47 - def destroy_association_async_batch_size=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def destroy_association_async_batch_size=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#27 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#27 def destroy_association_async_job; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#24 - def destroy_association_async_job=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def destroy_association_async_job=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/encryption/encryptable_record.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def encrypted_attributes; end - # source://activerecord/7.1.3.3lib/active_record/encryption/encryptable_record.rb#11 - def encrypted_attributes=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def encrypted_attributes=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/8.0.0.beta1lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#87 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def enumerate_columns_in_select_statements; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#87 - def enumerate_columns_in_select_statements=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def enumerate_columns_in_select_statements=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#87 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#87 def enumerate_columns_in_select_statements?; end - # source://activerecord/7.1.3.3lib/active_record/token_for.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def generated_token_verifier; end - # source://activerecord/7.1.3.3lib/active_record/token_for.rb#11 - def generated_token_verifier=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def generated_token_verifier=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#93 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def has_many_inversing; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#93 - def has_many_inversing=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def has_many_inversing=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#93 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#94 def has_many_inversing?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#165 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def immutable_strings_by_default; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#165 - def immutable_strings_by_default=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def immutable_strings_by_default=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#165 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#170 def immutable_strings_by_default?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#164 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def implicit_order_column; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#164 - def implicit_order_column=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def implicit_order_column=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#164 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#169 def implicit_order_column?; end - # source://activemodel/7.1.3.3lib/active_model/serializers/json.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def include_root_in_json; end - # source://activemodel/7.1.3.3lib/active_model/serializers/json.rb#15 - def include_root_in_json=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def include_root_in_json=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/serializers/json.rb#15 + # source://activemodel/8.0.0.beta1lib/active_model/serializers/json.rb#15 def include_root_in_json?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#167 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def inheritance_column; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#321 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#326 def inheritance_column=(value); end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#167 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#172 def inheritance_column?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#162 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def internal_metadata_table_name; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#162 - def internal_metadata_table_name=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def internal_metadata_table_name=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#162 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#167 def internal_metadata_table_name?; end - # source://activerecord/7.1.3.3lib/active_record/store.rb#101 + # source://activerecord/8.0.0.beta1lib/active_record/store.rb#101 def local_stored_attributes; end - # source://activerecord/7.1.3.3lib/active_record/store.rb#101 + # source://activerecord/8.0.0.beta1lib/active_record/store.rb#101 def local_stored_attributes=(_arg0); end - # source://activerecord/7.1.3.3lib/active_record/locking/optimistic.rb#56 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def lock_optimistically; end - # source://activerecord/7.1.3.3lib/active_record/locking/optimistic.rb#56 - def lock_optimistically=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def lock_optimistically=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/locking/optimistic.rb#56 + # source://activerecord/8.0.0.beta1lib/active_record/locking/optimistic.rb#56 def lock_optimistically?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#22 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def logger; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#22 - def logger=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def logger=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#22 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#22 def logger?; end - # source://activerecord/7.1.3.3lib/active_record/nested_attributes.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def nested_attributes_options; end - # source://activerecord/7.1.3.3lib/active_record/nested_attributes.rb#15 - def nested_attributes_options=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def nested_attributes_options=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/nested_attributes.rb#15 + # source://activerecord/8.0.0.beta1lib/active_record/nested_attributes.rb#15 def nested_attributes_options?; end - # source://activerecord/7.1.3.3lib/active_record/normalization.rb#8 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def normalized_attributes; end - # source://activerecord/7.1.3.3lib/active_record/normalization.rb#8 - def normalized_attributes=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def normalized_attributes=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/normalization.rb#8 + # source://activerecord/8.0.0.beta1lib/active_record/normalization.rb#8 def normalized_attributes?; end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def param_delimiter; end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 - def param_delimiter=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def param_delimiter=(new_value); end - # source://activemodel/7.1.3.3lib/active_model/conversion.rb#32 + # source://activemodel/8.0.0.beta1lib/active_model/conversion.rb#32 def param_delimiter?; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/dirty.rb#50 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def partial_inserts; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/dirty.rb#50 - def partial_inserts=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def partial_inserts=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/dirty.rb#50 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts?; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/dirty.rb#49 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def partial_updates; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/dirty.rb#49 - def partial_updates=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def partial_updates=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/dirty.rb#49 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/dirty.rb#49 def partial_updates?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#163 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def pluralize_table_names; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#163 - def pluralize_table_names=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def pluralize_table_names=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#163 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#168 def pluralize_table_names?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#158 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def primary_key_prefix_type; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#158 - def primary_key_prefix_type=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def primary_key_prefix_type=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#158 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#163 def primary_key_prefix_type?; end - # source://activerecord/7.1.3.3lib/active_record/timestamp.rb#47 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def record_timestamps; end - # source://activerecord/7.1.3.3lib/active_record/timestamp.rb#47 - def record_timestamps=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def record_timestamps=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/timestamp.rb#47 + # source://activerecord/8.0.0.beta1lib/active_record/timestamp.rb#47 def record_timestamps?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#95 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def run_commit_callbacks_on_first_saved_instances_in_transaction; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#95 - def run_commit_callbacks_on_first_saved_instances_in_transaction=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def run_commit_callbacks_on_first_saved_instances_in_transaction=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#95 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#96 def run_commit_callbacks_on_first_saved_instances_in_transaction?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#161 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def schema_migrations_table_name; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#161 - def schema_migrations_table_name=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def schema_migrations_table_name=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#161 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#166 def schema_migrations_table_name?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#103 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def shard_selector; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#103 - def shard_selector=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def shard_selector=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#103 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#104 def shard_selector?; end - # source://activerecord/7.1.3.3lib/active_record/signed_id.rb#13 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def signed_id_verifier_secret; end - # source://activerecord/7.1.3.3lib/active_record/signed_id.rb#13 - def signed_id_verifier_secret=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def signed_id_verifier_secret=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/signed_id.rb#13 + # source://activerecord/8.0.0.beta1lib/active_record/signed_id.rb#13 def signed_id_verifier_secret?; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def skip_time_zone_conversion_for_attributes; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#67 - def skip_time_zone_conversion_for_attributes=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def skip_time_zone_conversion_for_attributes=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/time_zone_conversion.rb#71 def skip_time_zone_conversion_for_attributes?; end - # source://activerecord/7.1.3.3lib/active_record/inheritance.rb#43 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def store_full_class_name; end - # source://activerecord/7.1.3.3lib/active_record/inheritance.rb#43 - def store_full_class_name=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def store_full_class_name=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/inheritance.rb#43 + # source://activerecord/8.0.0.beta1lib/active_record/inheritance.rb#43 def store_full_class_name?; end - # source://activerecord/7.1.3.3lib/active_record/inheritance.rb#47 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def store_full_sti_class; end - # source://activerecord/7.1.3.3lib/active_record/inheritance.rb#47 - def store_full_sti_class=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def store_full_sti_class=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/inheritance.rb#47 + # source://activerecord/8.0.0.beta1lib/active_record/inheritance.rb#47 def store_full_sti_class?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#91 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def strict_loading_by_default; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#91 - def strict_loading_by_default=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def strict_loading_by_default=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/core.rb#91 + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#91 def strict_loading_by_default?; end - # source://activerecord/7.1.3.3lib/active_record/core.rb#226 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def strict_loading_mode; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def strict_loading_mode=(new_value); end + + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#92 + def strict_loading_mode?; end + + # source://activerecord/8.0.0.beta1lib/active_record/core.rb#230 def strict_loading_violation!(owner:, reflection:); end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#159 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def table_name_prefix; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#159 - def table_name_prefix=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def table_name_prefix=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#159 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#164 def table_name_prefix?; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#160 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def table_name_suffix; end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#160 - def table_name_suffix=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def table_name_suffix=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#160 + # source://activerecord/8.0.0.beta1lib/active_record/model_schema.rb#165 def table_name_suffix?; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def time_zone_aware_attributes; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#66 - def time_zone_aware_attributes=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def time_zone_aware_attributes=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/time_zone_conversion.rb#70 def time_zone_aware_attributes?; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def time_zone_aware_types; end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#68 - def time_zone_aware_types=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def time_zone_aware_types=(new_value); end - # source://activerecord/7.1.3.3lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/8.0.0.beta1lib/active_record/attribute_methods/time_zone_conversion.rb#72 def time_zone_aware_types?; end - # source://activerecord/7.1.3.3lib/active_record/token_for.rb#10 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def token_definitions; end - # source://activerecord/7.1.3.3lib/active_record/token_for.rb#10 - def token_definitions=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def token_definitions=(new_value); end private - # source://activerecord/7.1.3.3lib/active_record/model_schema.rb#167 - def _inheritance_column=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _inheritance_column=(new_value); end end end # :markup: markdown -# :include: activestorage/README.md +# :include: ../README.md # # source://activestorage/lib/active_storage/gem_version.rb#3 module ActiveStorage @@ -1033,10 +1058,10 @@ module ActiveStorage # source://activestorage/lib/active_storage.rb#62 def content_types_to_serve_as_binary=(val); end - # source://activestorage/lib/active_storage.rb#360 + # source://activestorage/lib/active_storage.rb#361 def draw_routes; end - # source://activestorage/lib/active_storage.rb#360 + # source://activestorage/lib/active_storage.rb#361 def draw_routes=(val); end # source://activestorage/lib/active_storage.rb#48 @@ -1063,16 +1088,16 @@ module ActiveStorage # source://activestorage/lib/active_storage.rb#52 def queues=(val); end - # source://activestorage/lib/active_storage.rb#361 + # source://activestorage/lib/active_storage.rb#362 def resolve_model_to_route; end - # source://activestorage/lib/active_storage.rb#361 + # source://activestorage/lib/active_storage.rb#362 def resolve_model_to_route=(val); end - # source://activestorage/lib/active_storage.rb#359 + # source://activestorage/lib/active_storage.rb#360 def routes_prefix; end - # source://activestorage/lib/active_storage.rb#359 + # source://activestorage/lib/active_storage.rb#360 def routes_prefix=(val); end # source://activestorage/lib/active_storage.rb#356 @@ -1087,10 +1112,16 @@ module ActiveStorage # source://activestorage/lib/active_storage.rb#65 def supported_image_processing_methods=(val); end - # source://activestorage/lib/active_storage.rb#363 + # source://activestorage/lib/active_storage.rb#357 + def touch_attachment_records; end + + # source://activestorage/lib/active_storage.rb#357 + def touch_attachment_records=(val); end + + # source://activestorage/lib/active_storage.rb#364 def track_variants; end - # source://activestorage/lib/active_storage.rb#363 + # source://activestorage/lib/active_storage.rb#364 def track_variants=(val); end # source://activestorage/lib/active_storage.rb#354 @@ -1099,10 +1130,10 @@ module ActiveStorage # source://activestorage/lib/active_storage.rb#354 def unsupported_image_processing_arguments=(val); end - # source://activestorage/lib/active_storage.rb#357 + # source://activestorage/lib/active_storage.rb#358 def urls_expire_in; end - # source://activestorage/lib/active_storage.rb#357 + # source://activestorage/lib/active_storage.rb#358 def urls_expire_in=(val); end # source://activestorage/lib/active_storage.rb#59 @@ -1123,10 +1154,10 @@ module ActiveStorage # source://activestorage/lib/active_storage.rb#49 def verifier=(val); end - # source://activestorage/lib/active_storage.rb#365 + # source://activestorage/lib/active_storage.rb#366 def video_preview_arguments; end - # source://activestorage/lib/active_storage.rb#365 + # source://activestorage/lib/active_storage.rb#366 def video_preview_arguments=(val); end # source://activestorage/lib/active_storage.rb#60 @@ -1163,10 +1194,10 @@ module ActiveStorage # source://activestorage/lib/active_storage/deprecator.rb#4 def deprecator; end - # source://activestorage/lib/active_storage.rb#360 + # source://activestorage/lib/active_storage.rb#361 def draw_routes; end - # source://activestorage/lib/active_storage.rb#360 + # source://activestorage/lib/active_storage.rb#361 def draw_routes=(val); end # Returns the currently loaded version of Active Storage as a +Gem::Version+. @@ -1198,31 +1229,25 @@ module ActiveStorage # source://activestorage/lib/active_storage.rb#52 def queues=(val); end - # source://railties/7.1.3.3lib/rails/engine.rb#412 + # source://railties/8.0.0.beta1lib/rails/engine.rb#413 def railtie_helpers_paths; end - # source://railties/7.1.3.3lib/rails/engine.rb#395 + # source://railties/8.0.0.beta1lib/rails/engine.rb#396 def railtie_namespace; end - # source://railties/7.1.3.3lib/rails/engine.rb#416 + # source://railties/8.0.0.beta1lib/rails/engine.rb#417 def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end - # source://activestorage/lib/active_storage.rb#367 - def replace_on_assign_to_many; end - - # source://activestorage/lib/active_storage.rb#371 - def replace_on_assign_to_many=(value); end - - # source://activestorage/lib/active_storage.rb#361 + # source://activestorage/lib/active_storage.rb#362 def resolve_model_to_route; end - # source://activestorage/lib/active_storage.rb#361 + # source://activestorage/lib/active_storage.rb#362 def resolve_model_to_route=(val); end - # source://activestorage/lib/active_storage.rb#359 + # source://activestorage/lib/active_storage.rb#360 def routes_prefix; end - # source://activestorage/lib/active_storage.rb#359 + # source://activestorage/lib/active_storage.rb#360 def routes_prefix=(val); end # source://activestorage/lib/active_storage.rb#356 @@ -1231,25 +1256,25 @@ module ActiveStorage # source://activestorage/lib/active_storage.rb#356 def service_urls_expire_in=(val); end - # source://activestorage/lib/active_storage.rb#375 - def silence_invalid_content_types_warning; end - - # source://activestorage/lib/active_storage.rb#379 - def silence_invalid_content_types_warning=(value); end - # source://activestorage/lib/active_storage.rb#65 def supported_image_processing_methods; end # source://activestorage/lib/active_storage.rb#65 def supported_image_processing_methods=(val); end - # source://railties/7.1.3.3lib/rails/engine.rb#401 + # source://railties/8.0.0.beta1lib/rails/engine.rb#402 def table_name_prefix; end - # source://activestorage/lib/active_storage.rb#363 + # source://activestorage/lib/active_storage.rb#357 + def touch_attachment_records; end + + # source://activestorage/lib/active_storage.rb#357 + def touch_attachment_records=(val); end + + # source://activestorage/lib/active_storage.rb#364 def track_variants; end - # source://activestorage/lib/active_storage.rb#363 + # source://activestorage/lib/active_storage.rb#364 def track_variants=(val); end # source://activestorage/lib/active_storage.rb#354 @@ -1258,13 +1283,13 @@ module ActiveStorage # source://activestorage/lib/active_storage.rb#354 def unsupported_image_processing_arguments=(val); end - # source://activestorage/lib/active_storage.rb#357 + # source://activestorage/lib/active_storage.rb#358 def urls_expire_in; end - # source://activestorage/lib/active_storage.rb#357 + # source://activestorage/lib/active_storage.rb#358 def urls_expire_in=(val); end - # source://railties/7.1.3.3lib/rails/engine.rb#408 + # source://railties/8.0.0.beta1lib/rails/engine.rb#409 def use_relative_model_naming?; end # source://activestorage/lib/active_storage.rb#59 @@ -1290,10 +1315,10 @@ module ActiveStorage # source://activestorage/lib/active_storage/version.rb#7 def version; end - # source://activestorage/lib/active_storage.rb#365 + # source://activestorage/lib/active_storage.rb#366 def video_preview_arguments; end - # source://activestorage/lib/active_storage.rb#365 + # source://activestorage/lib/active_storage.rb#366 def video_preview_arguments=(val); end # source://activestorage/lib/active_storage.rb#60 @@ -1308,11 +1333,17 @@ class ActiveStorage::AnalyzeJob < ::ActiveStorage::BaseJob def perform(blob); end class << self - # source://activejob/7.1.3.3lib/active_job/queue_name.rb#55 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def queue_name; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end end end @@ -1449,19 +1480,16 @@ class ActiveStorage::Analyzer::ImageAnalyzer::Vips < ::ActiveStorage::Analyzer:: # source://activestorage/lib/active_storage/analyzer/image_analyzer/vips.rb#12 def read_image; end - # source://activestorage/lib/active_storage/analyzer/image_analyzer/vips.rb#38 + # source://activestorage/lib/active_storage/analyzer/image_analyzer/vips.rb#41 def rotated_image?(image); end - # source://activestorage/lib/active_storage/analyzer/image_analyzer/vips.rb#44 - def valid_image?(image); end - class << self # source://activestorage/lib/active_storage/analyzer/image_analyzer/vips.rb#7 def accept?(blob); end end end -# source://activestorage/lib/active_storage/analyzer/image_analyzer/vips.rb#37 +# source://activestorage/lib/active_storage/analyzer/image_analyzer/vips.rb#40 ActiveStorage::Analyzer::ImageAnalyzer::Vips::ROTATIONS = T.let(T.unsafe(nil), Regexp) # source://activestorage/lib/active_storage/analyzer/null_analyzer.rb#4 @@ -1488,61 +1516,64 @@ class ActiveStorage::Analyzer::VideoAnalyzer < ::ActiveStorage::Analyzer # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#55 def angle; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#78 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#82 def audio?; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#116 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#120 def audio_stream; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#86 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#90 def computed_height; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#124 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#128 def container; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#63 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#67 def display_aspect_ratio; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#100 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#104 def display_height_scale; end + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#63 + def display_matrix; end + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#50 def duration; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#96 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#100 def encoded_height; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#92 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#96 def encoded_width; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#149 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#153 def ffprobe_path; end # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#42 def height; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#128 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#132 def probe; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#132 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#136 def probe_from(file); end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#74 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#78 def rotated?; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#108 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#112 def side_data; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#120 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#124 def streams; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#104 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#108 def tags; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#82 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#86 def video?; end - # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#112 + # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#116 def video_stream; end # source://activestorage/lib/active_storage/analyzer/video_analyzer.rb#34 @@ -1841,8 +1872,8 @@ class ActiveStorage::Attached::Many < ::ActiveStorage::Attached # source://activestorage/lib/active_storage/attached/many.rb#25 def detach(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/delegation.rb#331 - def method_missing(method, *args, **_arg2, &block); end + # source://activesupport/8.0.0.beta1lib/active_support/delegation.rb#187 + def method_missing(method, *_arg1, **_arg2, &_arg3); end # source://activestorage/lib/active_storage/attached/many.rb#13 def purge(*_arg0, **_arg1, &_arg2); end @@ -1858,7 +1889,7 @@ class ActiveStorage::Attached::Many < ::ActiveStorage::Attached # source://activestorage/lib/active_storage/attached/many.rb#71 def purge_many; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/delegation.rb#323 + # source://activesupport/8.0.0.beta1lib/active_support/delegation.rb#179 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end @@ -1868,36 +1899,28 @@ module ActiveStorage::Attached::Model mixes_in_class_methods ::ActiveStorage::Attached::Model::ClassMethods - # source://activestorage/lib/active_storage/attached/model.rb#251 + # source://activestorage/lib/active_storage/attached/model.rb#262 def attachment_changes; end - # source://activestorage/lib/active_storage/attached/model.rb#255 + # source://activestorage/lib/active_storage/attached/model.rb#266 def changed_for_autosave?; end - # source://activestorage/lib/active_storage/attached/model.rb#265 + # source://activestorage/lib/active_storage/attached/model.rb#276 def reload(*_arg0); end private - # source://activestorage/lib/active_storage/attached/model.rb#259 + # source://activestorage/lib/active_storage/attached/model.rb#270 def initialize_dup(*_arg0); end end # source://activestorage/lib/active_storage/attached/model.rb#0 module ActiveStorage::Attached::Model::ClassMethods - # source://activestorage/lib/active_storage/attached/model.rb#182 + # source://activestorage/lib/active_storage/attached/model.rb#210 def has_many_attached(name, dependent: T.unsafe(nil), service: T.unsafe(nil), strict_loading: T.unsafe(nil)); end - # source://activestorage/lib/active_storage/attached/model.rb#94 + # source://activestorage/lib/active_storage/attached/model.rb#108 def has_one_attached(name, dependent: T.unsafe(nil), service: T.unsafe(nil), strict_loading: T.unsafe(nil)); end - - private - - # source://activestorage/lib/active_storage/attached/model.rb#244 - def validate_global_service_configuration; end - - # source://activestorage/lib/active_storage/attached/model.rb#234 - def validate_service_configuration(association_name, service); end end # source://activestorage/lib/active_storage/attached/one.rb#7 @@ -1917,8 +1940,8 @@ class ActiveStorage::Attached::One < ::ActiveStorage::Attached # source://activestorage/lib/active_storage/attached/one.rb#25 def detach(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/delegation.rb#331 - def method_missing(method, *args, **_arg2, &block); end + # source://activesupport/8.0.0.beta1lib/active_support/delegation.rb#166 + def method_missing(method, *_arg1, **_arg2, &_arg3); end # source://activestorage/lib/active_storage/attached/one.rb#13 def purge(*_arg0, **_arg1, &_arg2); end @@ -1934,7 +1957,7 @@ class ActiveStorage::Attached::One < ::ActiveStorage::Attached # source://activestorage/lib/active_storage/attached/one.rb#78 def purge_one; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/delegation.rb#323 + # source://activesupport/8.0.0.beta1lib/active_support/delegation.rb#158 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end @@ -1942,14 +1965,14 @@ class ActiveStorage::Attachment < ::ActiveStorage::Record include ::ActiveStorage::Attachment::GeneratedAttributeMethods include ::ActiveStorage::Attachment::GeneratedAssociationMethods - # source://activerecord/7.1.3.3lib/active_record/autosave_association.rb#160 + # source://activerecord/8.0.0.beta1lib/active_record/autosave_association.rb#162 def autosave_associated_records_for_blob(*args); end - # source://activerecord/7.1.3.3lib/active_record/autosave_association.rb#160 + # source://activerecord/8.0.0.beta1lib/active_record/autosave_association.rb#162 def autosave_associated_records_for_record(*args); end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/delegation.rb#331 - def method_missing(method, *args, **_arg2, &block); end + # source://activesupport/8.0.0.beta1lib/active_support/delegation.rb#187 + def method_missing(method, *_arg1, **_arg2, &_arg3); end def preview(transformations); end def purge; end @@ -1957,7 +1980,7 @@ class ActiveStorage::Attachment < ::ActiveStorage::Record def representation(transformations); end def signed_id(*_arg0, **_arg1, &_arg2); end - # source://activerecord/7.1.3.3lib/active_record/autosave_association.rb#160 + # source://activerecord/8.0.0.beta1lib/active_record/autosave_association.rb#162 def validate_associated_records_for_blob(*args); end def variant(transformations); end @@ -1970,74 +1993,86 @@ class ActiveStorage::Attachment < ::ActiveStorage::Record def named_variants; end def purge_dependent_blob_later; end - # source://activesupport/7.1.3.3lib/active_support/core_ext/module/delegation.rb#323 + # source://activesupport/8.0.0.beta1lib/active_support/delegation.rb#179 def respond_to_missing?(name, include_private = T.unsafe(nil)); end def transform_variants_later; end def transformations_by_name(transformations); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _reflections; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _validators; end - # source://activerecord/7.1.3.3lib/active_record/enum.rb#167 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def defined_enums; end - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activerecord/8.0.0.beta1lib/active_record/scoping/named.rb#174 def with_all_variant_records(*args, **_arg1); end end end module ActiveStorage::Attachment::GeneratedAssociationMethods - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#103 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#104 def blob; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#111 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#112 def blob=(value); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/belongs_to.rb#145 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/belongs_to.rb#146 def blob_changed?; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/belongs_to.rb#149 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/belongs_to.rb#150 def blob_previously_changed?; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#32 def build_blob(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#36 def create_blob(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#40 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#40 def create_blob!(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#103 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#104 def record; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#111 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#112 def record=(value); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/belongs_to.rb#145 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/belongs_to.rb#146 def record_changed?; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/belongs_to.rb#149 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/belongs_to.rb#150 def record_previously_changed?; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#19 def reload_blob; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#19 def reload_record; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#23 def reset_blob; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#23 def reset_record; end end @@ -2048,18 +2083,27 @@ class ActiveStorage::BaseController < ::ActionController::Base private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def etag_with_template_digest; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def etag_with_template_digest=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -2077,15 +2121,21 @@ class ActiveStorage::Blobs::ProxyController < ::ActiveStorage::BaseController private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -2096,24 +2146,36 @@ class ActiveStorage::Blobs::RedirectController < ::ActiveStorage::BaseController private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end class ActiveStorage::Current < ::ActiveSupport::CurrentAttributes class << self - # source://activesupport/7.1.3.3lib/active_support/current_attributes.rb#127 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def defaults; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def defaults=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/current_attributes.rb#137 def url_options; end - # source://activesupport/7.1.3.3lib/active_support/current_attributes.rb#127 + # source://activesupport/8.0.0.beta1lib/active_support/current_attributes.rb#138 def url_options=(value); end end end @@ -2123,15 +2185,18 @@ class ActiveStorage::DirectUploadsController < ::ActiveStorage::BaseController private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end def blob_args; end def direct_upload_json(blob); end class << self - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -2147,7 +2212,7 @@ class ActiveStorage::DiskController < ::ActiveStorage::BaseController private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end def acceptable_content?(token); end @@ -2156,11 +2221,17 @@ class ActiveStorage::DiskController < ::ActiveStorage::BaseController def named_disk_service(name); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -2194,8 +2265,11 @@ end # source://activestorage/lib/active_storage/engine.rb#25 class ActiveStorage::Engine < ::Rails::Engine class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end end end @@ -2228,7 +2302,6 @@ class ActiveStorage::Filename def extension_with_delimiter; end def extension_without_delimiter; end def sanitized; end - def to_json; end def to_s; end class << self @@ -2280,10 +2353,10 @@ class ActiveStorage::FixtureSet include ::ActiveRecord::SecureToken extend ::ActiveRecord::SecureToken::ClassMethods - # source://activesupport/7.1.3.3lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/8.0.0.beta1lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path; end - # source://activesupport/7.1.3.3lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/8.0.0.beta1lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path?; end # source://activestorage/lib/active_storage/fixture_set.rb#70 @@ -2311,13 +2384,13 @@ class ActiveStorage::FixtureSet # source://activestorage/lib/active_storage/fixture_set.rb#66 def blob(filename:, **attributes); end - # source://activesupport/7.1.3.3lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def file_fixture_path; end - # source://activesupport/7.1.3.3lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path=(value); end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def file_fixture_path=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/8.0.0.beta1lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path?; end end end @@ -2381,8 +2454,11 @@ class ActiveStorage::LogSubscriber < ::ActiveSupport::LogSubscriber def log_prefix_for_service(event); end class << self - # source://activesupport/7.1.3.3lib/active_support/log_subscriber.rb#87 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def log_levels; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end end end @@ -2390,11 +2466,17 @@ class ActiveStorage::MirrorJob < ::ActiveStorage::BaseJob def perform(key, checksum:); end class << self - # source://activejob/7.1.3.3lib/active_job/queue_name.rb#55 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def queue_name; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end end end @@ -2411,6 +2493,24 @@ end # source://activestorage/lib/active_storage/errors.rb#28 class ActiveStorage::PreviewError < ::ActiveStorage::Error; end +class ActiveStorage::PreviewImageJob < ::ActiveStorage::BaseJob + def perform(blob, variations); end + + class << self + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def queue_name; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def rescue_handlers; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end + end +end + # = Active Storage \Previewer # # This is an abstract base class for previewers, which generate images from blobs. See @@ -2494,44 +2594,50 @@ end # source://activestorage/lib/active_storage/previewer/mupdf_previewer.rb#4 class ActiveStorage::Previewer::MuPDFPreviewer < ::ActiveStorage::Previewer - # source://activestorage/lib/active_storage/previewer/mupdf_previewer.rb#23 + # source://activestorage/lib/active_storage/previewer/mupdf_previewer.rb#27 def preview(**options); end private - # source://activestorage/lib/active_storage/previewer/mupdf_previewer.rb#32 + # source://activestorage/lib/active_storage/previewer/mupdf_previewer.rb#36 def draw_first_page_from(file, &block); end class << self # source://activestorage/lib/active_storage/previewer/mupdf_previewer.rb#6 def accept?(blob); end - # source://activestorage/lib/active_storage/previewer/mupdf_previewer.rb#14 + # source://activestorage/lib/active_storage/previewer/mupdf_previewer.rb#18 def mutool_exists?; end - # source://activestorage/lib/active_storage/previewer/mupdf_previewer.rb#10 + # source://activestorage/lib/active_storage/previewer/mupdf_previewer.rb#14 def mutool_path; end + + # source://activestorage/lib/active_storage/previewer/mupdf_previewer.rb#10 + def pdf?(content_type); end end end # source://activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb#4 class ActiveStorage::Previewer::PopplerPDFPreviewer < ::ActiveStorage::Previewer - # source://activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb#21 + # source://activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb#25 def preview(**options); end private - # source://activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb#30 + # source://activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb#34 def draw_first_page_from(file, &block); end class << self # source://activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb#6 def accept?(blob); end - # source://activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb#14 + # source://activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb#10 + def pdf?(content_type); end + + # source://activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb#18 def pdftoppm_exists?; end - # source://activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb#10 + # source://activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb#14 def pdftoppm_path; end end end @@ -2562,11 +2668,17 @@ class ActiveStorage::PurgeJob < ::ActiveStorage::BaseJob def perform(blob); end class << self - # source://activejob/7.1.3.3lib/active_job/queue_name.rb#55 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def queue_name; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end end end @@ -2575,11 +2687,17 @@ class ActiveStorage::Record < ::ActiveRecord::Base include ::ActiveStorage::Record::GeneratedAssociationMethods class << self - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _validators; end - # source://activerecord/7.1.3.3lib/active_record/enum.rb#167 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def defined_enums; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end end end @@ -2671,18 +2789,24 @@ class ActiveStorage::Representations::BaseController < ::ActiveStorage::BaseCont private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end def blob_scope; end def set_representation; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -2696,15 +2820,21 @@ class ActiveStorage::Representations::ProxyController < ::ActiveStorage::Represe private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -2713,12 +2843,15 @@ class ActiveStorage::Representations::RedirectController < ::ActiveStorage::Repr private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end class << self - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -2987,15 +3120,21 @@ class ActiveStorage::TransformJob < ::ActiveStorage::BaseJob def perform(blob, transformations); end class << self - # source://activejob/7.1.3.3lib/active_job/queue_name.rb#55 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def queue_name; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def queue_name=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end end end -# source://activestorage/lib/active_storage.rb#383 +# source://activestorage/lib/active_storage.rb#368 module ActiveStorage::Transformers extend ::ActiveSupport::Autoload end @@ -3073,110 +3212,125 @@ class ActiveStorage::VariantRecord < ::ActiveStorage::Record include ::ActiveStorage::VariantRecord::GeneratedAttributeMethods include ::ActiveStorage::VariantRecord::GeneratedAssociationMethods - # source://activerecord/7.1.3.3lib/active_record/autosave_association.rb#160 + # source://activerecord/8.0.0.beta1lib/active_record/autosave_association.rb#162 def autosave_associated_records_for_blob(*args); end - # source://activerecord/7.1.3.3lib/active_record/autosave_association.rb#160 + # source://activerecord/8.0.0.beta1lib/active_record/autosave_association.rb#162 def autosave_associated_records_for_image_attachment(*args); end - # source://activerecord/7.1.3.3lib/active_record/autosave_association.rb#160 + # source://activerecord/8.0.0.beta1lib/active_record/autosave_association.rb#162 def autosave_associated_records_for_image_blob(*args); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activerecord/7.1.3.3lib/active_record/reflection.rb#11 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _reflections; end - # source://activemodel/7.1.3.3lib/active_model/validations.rb#71 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _reflections=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _validators; end - # source://activestorage/lib/active_storage/reflection.rb#53 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _validators=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def attachment_reflections; end - # source://activerecord/7.1.3.3lib/active_record/enum.rb#167 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def attachment_reflections=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def defined_enums; end - # source://activerecord/7.1.3.3lib/active_record/scoping/named.rb#174 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def defined_enums=(new_value); end + + # source://activerecord/8.0.0.beta1lib/active_record/scoping/named.rb#174 def with_attached_image(*args, **_arg1); end end end module ActiveStorage::VariantRecord::GeneratedAssociationMethods - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#103 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#104 def blob; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#111 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#112 def blob=(value); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/belongs_to.rb#145 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/belongs_to.rb#146 def blob_changed?; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/belongs_to.rb#149 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/belongs_to.rb#150 def blob_previously_changed?; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#32 def build_blob(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#32 def build_image_attachment(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#32 def build_image_blob(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#36 def create_blob(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#40 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#40 def create_blob!(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#36 def create_image_attachment(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#40 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#40 def create_image_attachment!(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#36 def create_image_blob(*args, &block); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#40 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#40 def create_image_blob!(*args, &block); end - # source://activestorage/lib/active_storage/attached/model.rb#99 + # source://activestorage/lib/active_storage/attached/model.rb#113 def image; end - # source://activestorage/lib/active_storage/attached/model.rb#104 + # source://activestorage/lib/active_storage/attached/model.rb#118 def image=(attachable); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#103 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#104 def image_attachment; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#111 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#112 def image_attachment=(value); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#103 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#104 def image_blob; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/association.rb#111 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/association.rb#112 def image_blob=(value); end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#19 def reload_blob; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#19 def reload_image_attachment; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#19 def reload_image_blob; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#23 def reset_blob; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#23 def reset_image_attachment; end - # source://activerecord/7.1.3.3lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/8.0.0.beta1lib/active_record/associations/builder/singular_association.rb#23 def reset_image_blob; end end diff --git a/sorbet/rbi/gems/activesupport@7.1.3.3.rbi b/sorbet/rbi/gems/activesupport@8.0.0.beta1.rbi similarity index 93% rename from sorbet/rbi/gems/activesupport@7.1.3.3.rbi rename to sorbet/rbi/gems/activesupport@8.0.0.beta1.rbi index e6b0ee0e..cf680f0d 100644 --- a/sorbet/rbi/gems/activesupport@7.1.3.3.rbi +++ b/sorbet/rbi/gems/activesupport@8.0.0.beta1.rbi @@ -5,7 +5,7 @@ # Please instead update this file by running `bin/tapioca gem activesupport`. -# :include: activesupport/README.rdoc +# :include: ../README.rdoc # # source://activesupport/lib/active_support/deep_mergeable.rb#3 module ActiveSupport @@ -18,35 +18,35 @@ module ActiveSupport # source://activesupport/lib/active_support/json/decoding.rb#9 def parse_json_times=(val); end - # source://activesupport/lib/active_support.rb#98 + # source://activesupport/lib/active_support.rb#101 def test_order; end - # source://activesupport/lib/active_support.rb#98 + # source://activesupport/lib/active_support.rb#101 def test_order=(val); end - # source://activesupport/lib/active_support.rb#99 + # source://activesupport/lib/active_support.rb#102 def test_parallelization_threshold; end - # source://activesupport/lib/active_support.rb#99 + # source://activesupport/lib/active_support.rb#102 def test_parallelization_threshold=(val); end class << self - # source://activesupport/lib/active_support.rb#104 + # source://activesupport/lib/active_support.rb#107 def cache_format_version; end - # source://activesupport/lib/active_support.rb#108 + # source://activesupport/lib/active_support.rb#111 def cache_format_version=(value); end # source://activesupport/lib/active_support/deprecator.rb#4 def deprecator; end - # source://activesupport/lib/active_support.rb#92 + # source://activesupport/lib/active_support.rb#95 def eager_load!; end - # source://activesupport/lib/active_support.rb#102 + # source://activesupport/lib/active_support.rb#105 def error_reporter; end - # source://activesupport/lib/active_support.rb#102 + # source://activesupport/lib/active_support.rb#105 def error_reporter=(_arg0); end # source://activesupport/lib/active_support/json/encoding.rb#8 @@ -72,16 +72,16 @@ module ActiveSupport # source://activesupport/lib/active_support/json/decoding.rb#9 def parse_json_times=(val); end - # source://activesupport/lib/active_support.rb#98 + # source://activesupport/lib/active_support.rb#101 def test_order; end - # source://activesupport/lib/active_support.rb#98 + # source://activesupport/lib/active_support.rb#101 def test_order=(val); end - # source://activesupport/lib/active_support.rb#99 + # source://activesupport/lib/active_support.rb#102 def test_parallelization_threshold; end - # source://activesupport/lib/active_support.rb#99 + # source://activesupport/lib/active_support.rb#102 def test_parallelization_threshold=(val); end # source://activesupport/lib/active_support/json/encoding.rb#8 @@ -90,10 +90,10 @@ module ActiveSupport # source://activesupport/lib/active_support/json/encoding.rb#8 def time_precision=(arg); end - # source://activesupport/lib/active_support.rb#112 + # source://activesupport/lib/active_support.rb#115 def to_time_preserves_timezone; end - # source://activesupport/lib/active_support.rb#116 + # source://activesupport/lib/active_support.rb#119 def to_time_preserves_timezone=(value); end # source://activesupport/lib/active_support/json/encoding.rb#8 @@ -102,10 +102,10 @@ module ActiveSupport # source://activesupport/lib/active_support/json/encoding.rb#8 def use_standard_json_time_format=(arg); end - # source://activesupport/lib/active_support.rb#126 + # source://activesupport/lib/active_support.rb#135 def utc_to_local_returns_utc_offset_times; end - # source://activesupport/lib/active_support.rb#130 + # source://activesupport/lib/active_support.rb#139 def utc_to_local_returns_utc_offset_times=(value); end # Returns the currently loaded version of Active Support as a +Gem::Version+. @@ -205,7 +205,7 @@ class ActiveSupport::ArrayInquirer < ::Array private # source://activesupport/lib/active_support/array_inquirer.rb#42 - def method_missing(name, *args); end + def method_missing(name, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # @@ -239,25 +239,20 @@ end # # source://activesupport/lib/active_support/dependencies/autoload.rb#29 module ActiveSupport::Autoload - # source://activesupport/lib/active_support/dependencies/autoload.rb#42 + # source://activesupport/lib/active_support/dependencies/autoload.rb#30 def autoload(const_name, path = T.unsafe(nil)); end - # source://activesupport/lib/active_support/dependencies/autoload.rb#63 + # source://activesupport/lib/active_support/dependencies/autoload.rb#51 def autoload_at(path); end - # source://activesupport/lib/active_support/dependencies/autoload.rb#56 + # source://activesupport/lib/active_support/dependencies/autoload.rb#44 def autoload_under(path); end - # source://activesupport/lib/active_support/dependencies/autoload.rb#70 + # source://activesupport/lib/active_support/dependencies/autoload.rb#58 def eager_autoload; end - # source://activesupport/lib/active_support/dependencies/autoload.rb#77 + # source://activesupport/lib/active_support/dependencies/autoload.rb#65 def eager_load!; end - - class << self - # source://activesupport/lib/active_support/dependencies/autoload.rb#30 - def extended(base); end - end end # = Backtrace Cleaner @@ -276,7 +271,8 @@ end # can focus on the rest. # # bc = ActiveSupport::BacktraceCleaner.new -# bc.add_filter { |line| line.gsub(Rails.root.to_s, '') } # strip the Rails.root prefix +# root = "#{Rails.root}/" +# bc.add_filter { |line| line.delete_prefix(root) } # strip the Rails.root prefix # bc.add_silencer { |line| /puma|rubygems/.match?(line) } # skip any lines from puma or rubygems # bc.clean(exception.backtrace) # perform the cleanup # @@ -290,20 +286,21 @@ end # # Inspired by the Quiet Backtrace gem by thoughtbot. # -# source://activesupport/lib/active_support/backtrace_cleaner.rb#33 +# source://activesupport/lib/active_support/backtrace_cleaner.rb#34 class ActiveSupport::BacktraceCleaner # @return [BacktraceCleaner] a new instance of BacktraceCleaner # - # source://activesupport/lib/active_support/backtrace_cleaner.rb#34 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#35 def initialize; end # Adds a filter from the block provided. Each line in the backtrace will be # mapped against this filter. # - # # Will turn "/my/rails/root/app/models/person.rb" into "/app/models/person.rb" - # backtrace_cleaner.add_filter { |line| line.gsub(Rails.root.to_s, '') } + # # Will turn "/my/rails/root/app/models/person.rb" into "app/models/person.rb" + # root = "#{Rails.root}/" + # backtrace_cleaner.add_filter { |line| line.start_with?(root) ? line.from(root.size) : line } # - # source://activesupport/lib/active_support/backtrace_cleaner.rb#80 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#83 def add_filter(&block); end # Adds a silencer from the block provided. If the silencer returns +true+ @@ -312,68 +309,93 @@ class ActiveSupport::BacktraceCleaner # # Will reject all lines that include the word "puma", like "/gems/puma/server.rb" or "/app/my_puma_server/rb" # backtrace_cleaner.add_silencer { |line| /puma/.match?(line) } # - # source://activesupport/lib/active_support/backtrace_cleaner.rb#89 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#92 def add_silencer(&block); end # Returns the backtrace after all filters and silencers have been run # against it. Filters run first, then silencers. # - # source://activesupport/lib/active_support/backtrace_cleaner.rb#43 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#45 def clean(backtrace, kind = T.unsafe(nil)); end # Returns the frame with all filters applied. # returns +nil+ if the frame was silenced. # - # source://activesupport/lib/active_support/backtrace_cleaner.rb#59 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#61 def clean_frame(frame, kind = T.unsafe(nil)); end # Returns the backtrace after all filters and silencers have been run # against it. Filters run first, then silencers. # - # source://activesupport/lib/active_support/backtrace_cleaner.rb#43 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#45 def filter(backtrace, kind = T.unsafe(nil)); end # Removes all filters, but leaves in the silencers. Useful if you suddenly # need to see entire filepaths in the backtrace that you had already # filtered out. # - # source://activesupport/lib/active_support/backtrace_cleaner.rb#103 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#106 def remove_filters!; end # Removes all silencers, but leaves in the filters. Useful if your # context of debugging suddenly expands as you suspect a bug in one of # the libraries you use. # - # source://activesupport/lib/active_support/backtrace_cleaner.rb#96 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#99 def remove_silencers!; end private - # source://activesupport/lib/active_support/backtrace_cleaner.rb#110 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#127 + def add_core_silencer; end + + # source://activesupport/lib/active_support/backtrace_cleaner.rb#118 def add_gem_filter; end - # source://activesupport/lib/active_support/backtrace_cleaner.rb#119 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#131 def add_gem_silencer; end - # source://activesupport/lib/active_support/backtrace_cleaner.rb#123 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#135 def add_stdlib_silencer; end - # source://activesupport/lib/active_support/backtrace_cleaner.rb#127 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#139 def filter_backtrace(backtrace); end - # source://activesupport/lib/active_support/backtrace_cleaner.rb#143 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#113 + def initialize_copy(_other); end + + # source://activesupport/lib/active_support/backtrace_cleaner.rb#155 def noise(backtrace); end - # source://activesupport/lib/active_support/backtrace_cleaner.rb#135 + # source://activesupport/lib/active_support/backtrace_cleaner.rb#147 def silence(backtrace); end end -# source://activesupport/lib/active_support/backtrace_cleaner.rb#108 +# source://activesupport/lib/active_support/backtrace_cleaner.rb#111 ActiveSupport::BacktraceCleaner::FORMATTED_GEMS_PATTERN = T.let(T.unsafe(nil), Regexp) +# source://activesupport/lib/active_support/benchmark.rb#4 +module ActiveSupport::Benchmark + class << self + # Benchmark realtime in the specified time unit. By default, + # the returned unit is in seconds. + # + # ActiveSupport::Benchmark.realtime { sleep 0.1 } + # # => 0.10007 + # + # ActiveSupport::Benchmark.realtime(:float_millisecond) { sleep 0.1 } + # # => 100.07 + # + # `unit` can be any of the values accepted by Ruby's `Process.clock_gettime`. + # + # source://activesupport/lib/active_support/benchmark.rb#15 + def realtime(unit = T.unsafe(nil), &block); end + end +end + # = \Benchmarkable # -# source://activesupport/lib/active_support/benchmarkable.rb#8 +# source://activesupport/lib/active_support/benchmarkable.rb#7 module ActiveSupport::Benchmarkable # Allows you to measure the execution time of a block in a template and # records the result to the log. Wrap this block around expensive operations @@ -405,7 +427,7 @@ module ActiveSupport::Benchmarkable # <%= expensive_and_chatty_files_operation %> # <% end %> # - # source://activesupport/lib/active_support/benchmarkable.rb#38 + # source://activesupport/lib/active_support/benchmarkable.rb#37 def benchmark(message = T.unsafe(nil), options = T.unsafe(nil), &block); end end @@ -500,7 +522,7 @@ class ActiveSupport::BroadcastLogger def <<(message); end # source://activesupport/lib/active_support/broadcast_logger.rb#116 - def add(*args, &block); end + def add(*_arg0, **_arg1, &_arg2); end # Add logger(s) to the broadcast. # @@ -519,7 +541,7 @@ class ActiveSupport::BroadcastLogger def close; end # source://activesupport/lib/active_support/broadcast_logger.rb#121 - def debug(*args, &block); end + def debug(*_arg0, **_arg1, &_arg2); end # Sets the log level to Logger::DEBUG for the whole broadcast. # @@ -535,7 +557,7 @@ class ActiveSupport::BroadcastLogger def debug?; end # source://activesupport/lib/active_support/broadcast_logger.rb#133 - def error(*args, &block); end + def error(*_arg0, **_arg1, &_arg2); end # Sets the log level to Logger::ERROR for the whole broadcast. # @@ -551,7 +573,7 @@ class ActiveSupport::BroadcastLogger def error?; end # source://activesupport/lib/active_support/broadcast_logger.rb#137 - def fatal(*args, &block); end + def fatal(*_arg0, **_arg1, &_arg2); end # Sets the log level to Logger::FATAL for the whole broadcast. # @@ -575,7 +597,7 @@ class ActiveSupport::BroadcastLogger def formatter=(formatter); end # source://activesupport/lib/active_support/broadcast_logger.rb#125 - def info(*args, &block); end + def info(*_arg0, **_arg1, &_arg2); end # Sets the log level to Logger::INFO for the whole broadcast. # @@ -600,7 +622,7 @@ class ActiveSupport::BroadcastLogger def local_level=(level); end # source://activesupport/lib/active_support/broadcast_logger.rb#116 - def log(*args, &block); end + def log(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute progname. # @@ -635,10 +657,10 @@ class ActiveSupport::BroadcastLogger def stop_broadcasting_to(logger); end # source://activesupport/lib/active_support/broadcast_logger.rb#141 - def unknown(*args, &block); end + def unknown(*_arg0, **_arg1, &_arg2); end # source://activesupport/lib/active_support/broadcast_logger.rb#129 - def warn(*args, &block); end + def warn(*_arg0, **_arg1, &_arg2); end # Sets the log level to Logger::WARN for the whole broadcast. # @@ -661,12 +683,12 @@ class ActiveSupport::BroadcastLogger # source://activesupport/lib/active_support/broadcast_logger.rb#221 def initialize_copy(other); end - # source://activesupport/lib/active_support/broadcast_logger.rb#234 - def method_missing(name, *args, **kwargs, &block); end + # source://activesupport/lib/active_support/broadcast_logger.rb#235 + def method_missing(name, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # - # source://activesupport/lib/active_support/broadcast_logger.rb#246 + # source://activesupport/lib/active_support/broadcast_logger.rb#247 def respond_to_missing?(method, include_all); end class << self @@ -696,7 +718,7 @@ module ActiveSupport::Cache # # The +key+ argument can also respond to +cache_key+ or +to_param+. # - # source://activesupport/lib/active_support/cache.rb#117 + # source://activesupport/lib/active_support/cache.rb#111 def expand_cache_key(key, namespace = T.unsafe(nil)); end # Returns the value of attribute format_version. @@ -742,13 +764,13 @@ module ActiveSupport::Cache private - # source://activesupport/lib/active_support/cache.rb#129 + # source://activesupport/lib/active_support/cache.rb#123 def retrieve_cache_key(key); end # Obtains the specified cache store class, given the name of the +store+. # Raises an error when the store class cannot be found. # - # source://activesupport/lib/active_support/cache.rb#141 + # source://activesupport/lib/active_support/cache.rb#135 def retrieve_store_class(store); end end end @@ -984,10 +1006,10 @@ class ActiveSupport::Cache::FileStore < ::ActiveSupport::Cache::Store # cache.write("baz", 5) # cache.decrement("baz") # => 4 # - # source://activesupport/lib/active_support/cache/file_store.rb#75 + # source://activesupport/lib/active_support/cache/file_store.rb#80 def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - # source://activesupport/lib/active_support/cache/file_store.rb#79 + # source://activesupport/lib/active_support/cache/file_store.rb#89 def delete_matched(matcher, options = T.unsafe(nil)); end # Increment a cached integer value. Returns the updated value. @@ -1005,58 +1027,58 @@ class ActiveSupport::Cache::FileStore < ::ActiveSupport::Cache::Store # source://activesupport/lib/active_support/cache/file_store.rb#60 def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - # source://activesupport/lib/active_support/cache/file_store.rb#90 + # source://activesupport/lib/active_support/cache/file_store.rb#101 def inspect; end private # Delete empty directories in the cache. # - # source://activesupport/lib/active_support/cache/file_store.rb#184 + # source://activesupport/lib/active_support/cache/file_store.rb#195 def delete_empty_directories(dir); end - # source://activesupport/lib/active_support/cache/file_store.rb#120 + # source://activesupport/lib/active_support/cache/file_store.rb#131 def delete_entry(key, **options); end # Make sure a file path's directories exist. # - # source://activesupport/lib/active_support/cache/file_store.rb#193 + # source://activesupport/lib/active_support/cache/file_store.rb#204 def ensure_cache_path(path); end # Translate a file path into a key. # - # source://activesupport/lib/active_support/cache/file_store.rb#178 + # source://activesupport/lib/active_support/cache/file_store.rb#189 def file_path_key(path); end # Lock a file for a block so only one process can modify it at a time. # - # source://activesupport/lib/active_support/cache/file_store.rb#137 + # source://activesupport/lib/active_support/cache/file_store.rb#148 def lock_file(file_name, &block); end # Modifies the amount of an integer value that is stored in the cache. # If the key is not found it is created and set to +amount+. # - # source://activesupport/lib/active_support/cache/file_store.rb#211 + # source://activesupport/lib/active_support/cache/file_store.rb#222 def modify_value(name, amount, options); end # Translate a key into a file path. # - # source://activesupport/lib/active_support/cache/file_store.rb#151 + # source://activesupport/lib/active_support/cache/file_store.rb#162 def normalize_key(key, options); end - # source://activesupport/lib/active_support/cache/file_store.rb#95 + # source://activesupport/lib/active_support/cache/file_store.rb#106 def read_entry(key, **options); end - # source://activesupport/lib/active_support/cache/file_store.rb#102 + # source://activesupport/lib/active_support/cache/file_store.rb#113 def read_serialized_entry(key, **_arg1); end - # source://activesupport/lib/active_support/cache/file_store.rb#197 + # source://activesupport/lib/active_support/cache/file_store.rb#208 def search_dir(dir, &callback); end - # source://activesupport/lib/active_support/cache/file_store.rb#109 + # source://activesupport/lib/active_support/cache/file_store.rb#120 def write_entry(key, entry, **options); end - # source://activesupport/lib/active_support/cache/file_store.rb#113 + # source://activesupport/lib/active_support/cache/file_store.rb#124 def write_serialized_entry(key, payload, **options); end class << self @@ -1135,12 +1157,12 @@ class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store # cache.write("baz", 5) # cache.decrement("baz") # => 4 # - # source://activesupport/lib/active_support/cache/memory_store.rb#164 + # source://activesupport/lib/active_support/cache/memory_store.rb#166 def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end # Deletes cache entries if the cache key matches a given pattern. # - # source://activesupport/lib/active_support/cache/memory_store.rb#169 + # source://activesupport/lib/active_support/cache/memory_store.rb#173 def delete_matched(matcher, options = T.unsafe(nil)); end # Increment a cached integer value. Returns the updated value. @@ -1158,7 +1180,7 @@ class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store # source://activesupport/lib/active_support/cache/memory_store.rb#149 def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - # source://activesupport/lib/active_support/cache/memory_store.rb#180 + # source://activesupport/lib/active_support/cache/memory_store.rb#185 def inspect; end # To ensure entries fit within the specified memory prune the cache by removing the least @@ -1177,27 +1199,27 @@ class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store # Synchronize calls to the cache. This should be called wherever the underlying cache implementation # is not thread safe. # - # source://activesupport/lib/active_support/cache/memory_store.rb#186 + # source://activesupport/lib/active_support/cache/memory_store.rb#191 def synchronize(&block); end private - # source://activesupport/lib/active_support/cache/memory_store.rb#193 + # source://activesupport/lib/active_support/cache/memory_store.rb#198 def cached_size(key, payload); end - # source://activesupport/lib/active_support/cache/memory_store.rb#226 + # source://activesupport/lib/active_support/cache/memory_store.rb#231 def delete_entry(key, **options); end # Modifies the amount of an integer value that is stored in the cache. # If the key is not found it is created and set to +amount+. # - # source://activesupport/lib/active_support/cache/memory_store.rb#236 + # source://activesupport/lib/active_support/cache/memory_store.rb#241 def modify_value(name, amount, options); end - # source://activesupport/lib/active_support/cache/memory_store.rb#197 + # source://activesupport/lib/active_support/cache/memory_store.rb#202 def read_entry(key, **options); end - # source://activesupport/lib/active_support/cache/memory_store.rb#209 + # source://activesupport/lib/active_support/cache/memory_store.rb#214 def write_entry(key, entry, **options); end class << self @@ -1235,7 +1257,7 @@ end # source://activesupport/lib/active_support/cache/memory_store.rb#54 ActiveSupport::Cache::MemoryStore::DupCoder::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) -# source://activesupport/lib/active_support/cache/memory_store.rb#191 +# source://activesupport/lib/active_support/cache/memory_store.rb#196 ActiveSupport::Cache::MemoryStore::PER_ENTRY_OVERHEAD = T.let(T.unsafe(nil), Integer) # = Null \Cache \Store @@ -1319,99 +1341,75 @@ module ActiveSupport::Cache::SerializerWithFallback end # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#66 -module ActiveSupport::Cache::SerializerWithFallback::Marshal61WithFallback - include ::ActiveSupport::Cache::SerializerWithFallback - extend ::ActiveSupport::Cache::SerializerWithFallback - extend ::ActiveSupport::Cache::SerializerWithFallback::Marshal61WithFallback - - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#39 - def _load(payload); end - - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#72 - def dump(entry); end - - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#76 - def dump_compressed(entry, threshold); end - - # @return [Boolean] - # - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#83 - def dumped?(dumped); end -end - -# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#70 -ActiveSupport::Cache::SerializerWithFallback::Marshal61WithFallback::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) - -# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#88 module ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback include ::ActiveSupport::Cache::SerializerWithFallback extend ::ActiveSupport::Cache::SerializerWithFallback extend ::ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#110 + # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#88 def _load(marked); end - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#95 + # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#73 def dump(entry); end - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#99 + # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#77 def dump_compressed(entry, threshold); end # @return [Boolean] # - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#116 + # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#94 def dumped?(dumped); end end -# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#93 +# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#71 ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback::MARK_COMPRESSED = T.let(T.unsafe(nil), String) -# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#92 +# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#70 ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback::MARK_UNCOMPRESSED = T.let(T.unsafe(nil), String) -# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#121 +# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#99 module ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback include ::ActiveSupport::Cache::SerializerWithFallback extend ::ActiveSupport::Cache::SerializerWithFallback extend ::ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#131 + # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#109 def _load(dumped); end - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#127 + # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#105 def dump(value); end # @return [Boolean] # - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#135 + # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#113 def dumped?(dumped); end end -# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#125 +# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#103 ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) -# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#140 +# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#118 module ActiveSupport::Cache::SerializerWithFallback::MessagePackWithFallback include ::ActiveSupport::Cache::SerializerWithFallback extend ::ActiveSupport::Cache::SerializerWithFallback extend ::ActiveSupport::Cache::SerializerWithFallback::MessagePackWithFallback - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#148 + # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#126 def _load(dumped); end - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#144 + # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#122 def dump(value); end # @return [Boolean] # - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#152 + # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#130 def dumped?(dumped); end private # @return [Boolean] # - # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#157 + # source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#135 def available?; end end @@ -1436,7 +1434,7 @@ module ActiveSupport::Cache::SerializerWithFallback::PassthroughWithFallback def dumped?(dumped); end end -# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#166 +# source://activesupport/lib/active_support/cache/serializer_with_fallback.rb#144 ActiveSupport::Cache::SerializerWithFallback::SERIALIZERS = T.let(T.unsafe(nil), Hash) # = Active Support \Cache \Store @@ -1456,7 +1454,7 @@ ActiveSupport::Cache::SerializerWithFallback::SERIALIZERS = T.let(T.unsafe(nil), # cache = ActiveSupport::Cache::MemoryStore.new # # cache.read('city') # => nil -# cache.write('city', "Duckburgh") +# cache.write('city', "Duckburgh") # => true # cache.read('city') # => "Duckburgh" # # cache.write('not serializable', Proc.new {}) # => TypeError @@ -1481,7 +1479,7 @@ ActiveSupport::Cache::SerializerWithFallback::SERIALIZERS = T.let(T.unsafe(nil), # cache.namespace = -> { @last_mod_time } # Set the namespace to a variable # @last_mod_time = Time.now # Invalidate the entire cache by changing namespace # -# source://activesupport/lib/active_support/cache.rb#194 +# source://activesupport/lib/active_support/cache.rb#188 class ActiveSupport::Cache::Store # Creates a new cache. # @@ -1557,7 +1555,7 @@ class ActiveSupport::Cache::Store # # @return [Store] a new instance of Store # - # source://activesupport/lib/active_support/cache.rb#319 + # source://activesupport/lib/active_support/cache.rb#295 def initialize(options = T.unsafe(nil)); end # Cleans up the cache by removing expired entries. @@ -1568,7 +1566,7 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport/lib/active_support/cache.rb#747 + # source://activesupport/lib/active_support/cache.rb#749 def cleanup(options = T.unsafe(nil)); end # Clears the entire cache. Be careful with this method since it could @@ -1580,7 +1578,7 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport/lib/active_support/cache.rb#757 + # source://activesupport/lib/active_support/cache.rb#759 def clear(options = T.unsafe(nil)); end # Decrements an integer value in the cache. @@ -1591,7 +1589,7 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport/lib/active_support/cache.rb#738 + # source://activesupport/lib/active_support/cache.rb#740 def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end # Deletes an entry in the cache. Returns +true+ if an entry is deleted @@ -1610,7 +1608,7 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport/lib/active_support/cache.rb#720 + # source://activesupport/lib/active_support/cache.rb#722 def delete_matched(matcher, options = T.unsafe(nil)); end # Deletes multiple entries in the cache. Returns the number of deleted @@ -1618,7 +1616,7 @@ class ActiveSupport::Cache::Store # # Options are passed to the underlying cache implementation. # - # source://activesupport/lib/active_support/cache.rb#688 + # source://activesupport/lib/active_support/cache.rb#689 def delete_multi(names, options = T.unsafe(nil)); end # Returns +true+ if the cache contains an entry for the given key. @@ -1627,7 +1625,7 @@ class ActiveSupport::Cache::Store # # @return [Boolean] # - # source://activesupport/lib/active_support/cache.rb#702 + # source://activesupport/lib/active_support/cache.rb#703 def exist?(name, options = T.unsafe(nil)); end # Fetches data from the cache, using the given key. If there is data in @@ -1691,31 +1689,47 @@ class ActiveSupport::Cache::Store # has elapsed. # # # Set all values to expire after one minute. - # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 1.minute) + # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 1) # - # cache.write('foo', 'original value') + # cache.write("foo", "original value") # val_1 = nil # val_2 = nil - # sleep 60 + # p cache.read("foo") # => "original value" + # + # sleep 1 # wait until the cache expires # - # Thread.new do - # val_1 = cache.fetch('foo', race_condition_ttl: 10.seconds) do + # t1 = Thread.new do + # # fetch does the following: + # # 1. gets an recent expired entry + # # 2. extends the expiry by 2 seconds (race_condition_ttl) + # # 3. regenerates the new value + # val_1 = cache.fetch("foo", race_condition_ttl: 2) do # sleep 1 - # 'new value 1' + # "new value 1" # end # end # - # Thread.new do - # val_2 = cache.fetch('foo', race_condition_ttl: 10.seconds) do - # 'new value 2' - # end + # # Wait until t1 extends the expiry of the entry + # # but before generating the new value + # sleep 0.1 + # + # val_2 = cache.fetch("foo", race_condition_ttl: 2) do + # # This block won't be executed because t1 extended the expiry + # "new value 2" # end # - # cache.fetch('foo') # => "original value" - # sleep 10 # First thread extended the life of cache by another 10 seconds - # cache.fetch('foo') # => "new value 1" - # val_1 # => "new value 1" - # val_2 # => "original value" + # t1.join + # + # p val_1 # => "new value 1" + # p val_2 # => "oritinal value" + # p cache.fetch("foo") # => "new value 1" + # + # # The entry requires 3 seconds to expire (expires_in + race_condition_ttl) + # # We have waited 2 seconds already (sleep(1) + t1.join) thus we need to wait 1 + # # more second to see the entry expire. + # sleep 1 + # + # p cache.fetch("foo") # => nil # # ==== Dynamic Options # @@ -1729,7 +1743,7 @@ class ActiveSupport::Cache::Store # token # end # - # source://activesupport/lib/active_support/cache.rb#452 + # source://activesupport/lib/active_support/cache.rb#444 def fetch(name, options = T.unsafe(nil), &block); end # Fetches data from the cache, using the given keys. If there is data in @@ -1764,7 +1778,7 @@ class ActiveSupport::Cache::Store # # @raise [ArgumentError] # - # source://activesupport/lib/active_support/cache.rb#601 + # source://activesupport/lib/active_support/cache.rb#595 def fetch_multi(*names); end # Increments an integer value in the cache. @@ -1775,32 +1789,32 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport/lib/active_support/cache.rb#729 + # source://activesupport/lib/active_support/cache.rb#731 def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - # source://activesupport/lib/active_support/cache.rb#195 + # source://activesupport/lib/active_support/cache.rb#189 def logger; end - # source://activesupport/lib/active_support/cache.rb#195 + # source://activesupport/lib/active_support/cache.rb#189 def logger=(val); end # Silences the logger within a block. # - # source://activesupport/lib/active_support/cache.rb#346 + # source://activesupport/lib/active_support/cache.rb#322 def mute; end - # source://activesupport/lib/active_support/cache.rb#711 + # source://activesupport/lib/active_support/cache.rb#713 def new_entry(value, options = T.unsafe(nil)); end # Returns the value of attribute options. # - # source://activesupport/lib/active_support/cache.rb#198 + # source://activesupport/lib/active_support/cache.rb#192 def options; end - # source://activesupport/lib/active_support/cache.rb#196 + # source://activesupport/lib/active_support/cache.rb#190 def raise_on_invalid_cache_expiration_time; end - # source://activesupport/lib/active_support/cache.rb#196 + # source://activesupport/lib/active_support/cache.rb#190 def raise_on_invalid_cache_expiration_time=(val); end # Reads data from the cache, using the given key. If there is data in @@ -1820,7 +1834,7 @@ class ActiveSupport::Cache::Store # # Other options will be handled by the specific cache store implementation. # - # source://activesupport/lib/active_support/cache.rb#506 + # source://activesupport/lib/active_support/cache.rb#498 def read(name, options = T.unsafe(nil)); end # Reads multiple values at once from the cache. Options can be passed @@ -1830,27 +1844,30 @@ class ActiveSupport::Cache::Store # # Returns a hash mapping the names provided to the values found. # - # source://activesupport/lib/active_support/cache.rb#544 + # source://activesupport/lib/active_support/cache.rb#536 def read_multi(*names); end # Returns the value of attribute silence. # - # source://activesupport/lib/active_support/cache.rb#198 + # source://activesupport/lib/active_support/cache.rb#192 def silence; end # Silences the logger. # - # source://activesupport/lib/active_support/cache.rb#340 + # source://activesupport/lib/active_support/cache.rb#316 def silence!; end # Returns the value of attribute silence. # - # source://activesupport/lib/active_support/cache.rb#198 + # source://activesupport/lib/active_support/cache.rb#192 def silence?; end # Writes the value to the cache with the key. The value must be supported # by the +coder+'s +dump+ and +load+ methods. # + # Returns +true+ if the write succeeded, +nil+ if there was an error talking + # to the cache backend, or +false+ if the write failed for another reason. + # # By default, cache entries larger than 1kB are compressed. Compression # allows more data to be stored in the same memory footprint, leading to # fewer cache evictions and higher hit rates. @@ -1882,20 +1899,20 @@ class ActiveSupport::Cache::Store # # Other options will be handled by the specific cache store implementation. # - # source://activesupport/lib/active_support/cache.rb#663 + # source://activesupport/lib/active_support/cache.rb#662 def write(name, value, options = T.unsafe(nil)); end # Cache Storage API to write multiple values at once. # - # source://activesupport/lib/active_support/cache.rb#558 + # source://activesupport/lib/active_support/cache.rb#551 def write_multi(hash, options = T.unsafe(nil)); end private - # source://activesupport/lib/active_support/cache.rb#1013 + # source://activesupport/lib/active_support/cache.rb#1010 def _instrument(operation, multi: T.unsafe(nil), options: T.unsafe(nil), **payload, &block); end - # source://activesupport/lib/active_support/cache.rb#762 + # source://activesupport/lib/active_support/cache.rb#764 def default_serializer; end # Deletes an entry from the cache implementation. Subclasses must @@ -1903,41 +1920,41 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport/lib/active_support/cache.rb#856 + # source://activesupport/lib/active_support/cache.rb#850 def delete_entry(key, **options); end # Deletes multiples entries in the cache implementation. Subclasses MAY # implement this method. # - # source://activesupport/lib/active_support/cache.rb#862 + # source://activesupport/lib/active_support/cache.rb#856 def delete_multi_entries(entries, **options); end - # source://activesupport/lib/active_support/cache.rb#821 + # source://activesupport/lib/active_support/cache.rb#815 def deserialize_entry(payload, **_arg1); end # Expands key to be a consistent string value. Invokes +cache_key+ if # object responds to +cache_key+. Otherwise, +to_param+ method will be # called. If the key is a Hash, then keys will be sorted alphabetically. # - # source://activesupport/lib/active_support/cache.rb#976 + # source://activesupport/lib/active_support/cache.rb#973 def expanded_key(key); end - # source://activesupport/lib/active_support/cache.rb#997 + # source://activesupport/lib/active_support/cache.rb#994 def expanded_version(key); end - # source://activesupport/lib/active_support/cache.rb#1050 + # source://activesupport/lib/active_support/cache.rb#1048 def get_entry_value(entry, name, options); end - # source://activesupport/lib/active_support/cache.rb#1034 + # source://activesupport/lib/active_support/cache.rb#1031 def handle_expired_entry(entry, key, options); end - # source://activesupport/lib/active_support/cache.rb#896 + # source://activesupport/lib/active_support/cache.rb#890 def handle_invalid_expires_in(message); end - # source://activesupport/lib/active_support/cache.rb#1005 + # source://activesupport/lib/active_support/cache.rb#1002 def instrument(operation, key, options = T.unsafe(nil), &block); end - # source://activesupport/lib/active_support/cache.rb#1009 + # source://activesupport/lib/active_support/cache.rb#1006 def instrument_multi(operation, keys, options = T.unsafe(nil), &block); end # Adds the namespace defined in the options to a pattern designed to @@ -1945,12 +1962,12 @@ class ActiveSupport::Cache::Store # this method to translate a pattern that matches names into one that # matches namespaced keys. # - # source://activesupport/lib/active_support/cache.rb#785 + # source://activesupport/lib/active_support/cache.rb#779 def key_matcher(pattern, options); end # Merges the default options with ones specific to a method call. # - # source://activesupport/lib/active_support/cache.rb#867 + # source://activesupport/lib/active_support/cache.rb#861 def merged_options(call_options); end # Prefix the key with a namespace string: @@ -1963,8 +1980,8 @@ class ActiveSupport::Cache::Store # namespace_key 'foo', namespace: -> { 'cache' } # # => 'cache:foo' # - # source://activesupport/lib/active_support/cache.rb#954 - def namespace_key(key, options = T.unsafe(nil)); end + # source://activesupport/lib/active_support/cache.rb#948 + def namespace_key(key, call_options = T.unsafe(nil)); end # Expands and namespaces the cache key. # Raises an exception when the key is +nil+ or an empty string. @@ -1972,15 +1989,15 @@ class ActiveSupport::Cache::Store # # @raise [ArgumentError] # - # source://activesupport/lib/active_support/cache.rb#938 + # source://activesupport/lib/active_support/cache.rb#932 def normalize_key(key, options = T.unsafe(nil)); end # Normalize aliased options to their canonical form # - # source://activesupport/lib/active_support/cache.rb#907 + # source://activesupport/lib/active_support/cache.rb#901 def normalize_options(options); end - # source://activesupport/lib/active_support/cache.rb#993 + # source://activesupport/lib/active_support/cache.rb#990 def normalize_version(key, options = T.unsafe(nil)); end # Reads an entry from the cache implementation. Subclasses must implement @@ -1988,22 +2005,22 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport/lib/active_support/cache.rb#802 + # source://activesupport/lib/active_support/cache.rb#796 def read_entry(key, **options); end # Reads multiple entries from the cache implementation. Subclasses MAY # implement this method. # - # source://activesupport/lib/active_support/cache.rb#829 + # source://activesupport/lib/active_support/cache.rb#823 def read_multi_entries(names, **options); end - # source://activesupport/lib/active_support/cache.rb#1055 - def save_block_result_to_cache(name, options); end + # source://activesupport/lib/active_support/cache.rb#1053 + def save_block_result_to_cache(name, key, options); end - # source://activesupport/lib/active_support/cache.rb#812 + # source://activesupport/lib/active_support/cache.rb#806 def serialize_entry(entry, **options); end - # source://activesupport/lib/active_support/cache.rb#918 + # source://activesupport/lib/active_support/cache.rb#912 def validate_options(options); end # Writes an entry to the cache implementation. Subclasses must implement @@ -2011,31 +2028,31 @@ class ActiveSupport::Cache::Store # # @raise [NotImplementedError] # - # source://activesupport/lib/active_support/cache.rb#808 + # source://activesupport/lib/active_support/cache.rb#802 def write_entry(key, entry, **options); end # Writes multiple entries to the cache implementation. Subclasses MAY # implement this method. # - # source://activesupport/lib/active_support/cache.rb#848 + # source://activesupport/lib/active_support/cache.rb#842 def write_multi_entries(hash, **options); end class << self - # source://activesupport/lib/active_support/cache.rb#195 + # source://activesupport/lib/active_support/cache.rb#189 def logger; end - # source://activesupport/lib/active_support/cache.rb#195 + # source://activesupport/lib/active_support/cache.rb#189 def logger=(val); end - # source://activesupport/lib/active_support/cache.rb#196 + # source://activesupport/lib/active_support/cache.rb#190 def raise_on_invalid_cache_expiration_time; end - # source://activesupport/lib/active_support/cache.rb#196 + # source://activesupport/lib/active_support/cache.rb#190 def raise_on_invalid_cache_expiration_time=(val); end private - # source://activesupport/lib/active_support/cache.rb#206 + # source://activesupport/lib/active_support/cache.rb#200 def retrieve_pool_options(options); end end end @@ -2186,37 +2203,37 @@ ActiveSupport::Cache::UNIVERSAL_OPTIONS = T.let(T.unsafe(nil), Array) # ActiveSupport::Cache::Store#fetch, the second argument will be an # instance of +WriteOptions+. # -# source://activesupport/lib/active_support/cache.rb#1071 +# source://activesupport/lib/active_support/cache.rb#1069 class ActiveSupport::Cache::WriteOptions # @return [WriteOptions] a new instance of WriteOptions # - # source://activesupport/lib/active_support/cache.rb#1072 + # source://activesupport/lib/active_support/cache.rb#1070 def initialize(options); end - # source://activesupport/lib/active_support/cache.rb#1096 + # source://activesupport/lib/active_support/cache.rb#1094 def expires_at; end # Sets the Cache entry's +expires_at+ value. If an +expires_in+ option was # previously set, this will unset it since +expires_at+ and +expires_in+ # cannot both be set. # - # source://activesupport/lib/active_support/cache.rb#1103 + # source://activesupport/lib/active_support/cache.rb#1101 def expires_at=(expires_at); end - # source://activesupport/lib/active_support/cache.rb#1084 + # source://activesupport/lib/active_support/cache.rb#1082 def expires_in; end # Sets the Cache entry's +expires_in+ value. If an +expires_at+ option was # previously set, this will unset it since +expires_in+ and +expires_at+ # cannot both be set. # - # source://activesupport/lib/active_support/cache.rb#1091 + # source://activesupport/lib/active_support/cache.rb#1089 def expires_in=(expires_in); end - # source://activesupport/lib/active_support/cache.rb#1076 + # source://activesupport/lib/active_support/cache.rb#1074 def version; end - # source://activesupport/lib/active_support/cache.rb#1080 + # source://activesupport/lib/active_support/cache.rb#1078 def version=(version); end end @@ -2293,7 +2310,7 @@ end # - save # saved # -# source://activesupport/lib/active_support/callbacks.rb#65 +# source://activesupport/lib/active_support/callbacks.rb#64 module ActiveSupport::Callbacks extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -2325,7 +2342,7 @@ module ActiveSupport::Callbacks # smoothly through and into the supplied block, we want as little evidence # as possible that we were here. # - # source://activesupport/lib/active_support/callbacks.rb#97 + # source://activesupport/lib/active_support/callbacks.rb#96 def run_callbacks(kind, type = T.unsafe(nil)); end private @@ -2334,28 +2351,26 @@ module ActiveSupport::Callbacks # This can be overridden in ActiveSupport::Callbacks implementors in order # to provide better debugging/logging. # - # source://activesupport/lib/active_support/callbacks.rb#150 + # source://activesupport/lib/active_support/callbacks.rb#149 def halted_callback_hook(filter, name); end module GeneratedClassMethods def __callbacks; end def __callbacks=(value); end - def __callbacks?; end end module GeneratedInstanceMethods def __callbacks; end - def __callbacks?; end end end -# source://activesupport/lib/active_support/callbacks.rb#73 +# source://activesupport/lib/active_support/callbacks.rb#72 ActiveSupport::Callbacks::CALLBACK_FILTER_TYPES = T.let(T.unsafe(nil), Array) # A future invocation of user-supplied code (either as a callback, # or a condition filter). # -# source://activesupport/lib/active_support/callbacks.rb#378 +# source://activesupport/lib/active_support/callbacks.rb#336 module ActiveSupport::Callbacks::CallTemplate class << self # Filters support: @@ -2367,69 +2382,69 @@ module ActiveSupport::Callbacks::CallTemplate # All of these objects are converted into a CallTemplate and handled # the same after this point. # - # source://activesupport/lib/active_support/callbacks.rb#536 + # source://activesupport/lib/active_support/callbacks.rb#494 def build(filter, callback); end end end -# source://activesupport/lib/active_support/callbacks.rb#437 +# source://activesupport/lib/active_support/callbacks.rb#395 class ActiveSupport::Callbacks::CallTemplate::InstanceExec0 # @return [InstanceExec0] a new instance of InstanceExec0 # - # source://activesupport/lib/active_support/callbacks.rb#438 + # source://activesupport/lib/active_support/callbacks.rb#396 def initialize(block); end - # source://activesupport/lib/active_support/callbacks.rb#442 + # source://activesupport/lib/active_support/callbacks.rb#400 def expand(target, value, block); end - # source://activesupport/lib/active_support/callbacks.rb#452 + # source://activesupport/lib/active_support/callbacks.rb#410 def inverted_lambda; end - # source://activesupport/lib/active_support/callbacks.rb#446 + # source://activesupport/lib/active_support/callbacks.rb#404 def make_lambda; end end -# source://activesupport/lib/active_support/callbacks.rb#459 +# source://activesupport/lib/active_support/callbacks.rb#417 class ActiveSupport::Callbacks::CallTemplate::InstanceExec1 # @return [InstanceExec1] a new instance of InstanceExec1 # - # source://activesupport/lib/active_support/callbacks.rb#460 + # source://activesupport/lib/active_support/callbacks.rb#418 def initialize(block); end - # source://activesupport/lib/active_support/callbacks.rb#464 + # source://activesupport/lib/active_support/callbacks.rb#422 def expand(target, value, block); end - # source://activesupport/lib/active_support/callbacks.rb#474 + # source://activesupport/lib/active_support/callbacks.rb#432 def inverted_lambda; end - # source://activesupport/lib/active_support/callbacks.rb#468 + # source://activesupport/lib/active_support/callbacks.rb#426 def make_lambda; end end -# source://activesupport/lib/active_support/callbacks.rb#481 +# source://activesupport/lib/active_support/callbacks.rb#439 class ActiveSupport::Callbacks::CallTemplate::InstanceExec2 # @return [InstanceExec2] a new instance of InstanceExec2 # - # source://activesupport/lib/active_support/callbacks.rb#482 + # source://activesupport/lib/active_support/callbacks.rb#440 def initialize(block); end # @raise [ArgumentError] # - # source://activesupport/lib/active_support/callbacks.rb#486 + # source://activesupport/lib/active_support/callbacks.rb#444 def expand(target, value, block); end - # source://activesupport/lib/active_support/callbacks.rb#498 + # source://activesupport/lib/active_support/callbacks.rb#456 def inverted_lambda; end - # source://activesupport/lib/active_support/callbacks.rb#491 + # source://activesupport/lib/active_support/callbacks.rb#449 def make_lambda; end end -# source://activesupport/lib/active_support/callbacks.rb#379 +# source://activesupport/lib/active_support/callbacks.rb#337 class ActiveSupport::Callbacks::CallTemplate::MethodCall # @return [MethodCall] a new instance of MethodCall # - # source://activesupport/lib/active_support/callbacks.rb#380 + # source://activesupport/lib/active_support/callbacks.rb#338 def initialize(method); end # Return the parts needed to make this call, with the given @@ -2446,199 +2461,202 @@ class ActiveSupport::Callbacks::CallTemplate::MethodCall # The actual invocation is left up to the caller to minimize # call stack pollution. # - # source://activesupport/lib/active_support/callbacks.rb#397 + # source://activesupport/lib/active_support/callbacks.rb#355 def expand(target, value, block); end - # source://activesupport/lib/active_support/callbacks.rb#407 + # source://activesupport/lib/active_support/callbacks.rb#365 def inverted_lambda; end - # source://activesupport/lib/active_support/callbacks.rb#401 + # source://activesupport/lib/active_support/callbacks.rb#359 def make_lambda; end end -# source://activesupport/lib/active_support/callbacks.rb#414 +# source://activesupport/lib/active_support/callbacks.rb#372 class ActiveSupport::Callbacks::CallTemplate::ObjectCall # @return [ObjectCall] a new instance of ObjectCall # - # source://activesupport/lib/active_support/callbacks.rb#415 + # source://activesupport/lib/active_support/callbacks.rb#373 def initialize(target, method); end - # source://activesupport/lib/active_support/callbacks.rb#420 + # source://activesupport/lib/active_support/callbacks.rb#378 def expand(target, value, block); end - # source://activesupport/lib/active_support/callbacks.rb#430 + # source://activesupport/lib/active_support/callbacks.rb#388 def inverted_lambda; end - # source://activesupport/lib/active_support/callbacks.rb#424 + # source://activesupport/lib/active_support/callbacks.rb#382 def make_lambda; end end -# source://activesupport/lib/active_support/callbacks.rb#506 +# source://activesupport/lib/active_support/callbacks.rb#464 class ActiveSupport::Callbacks::CallTemplate::ProcCall # @return [ProcCall] a new instance of ProcCall # - # source://activesupport/lib/active_support/callbacks.rb#507 + # source://activesupport/lib/active_support/callbacks.rb#465 def initialize(target); end - # source://activesupport/lib/active_support/callbacks.rb#511 + # source://activesupport/lib/active_support/callbacks.rb#469 def expand(target, value, block); end - # source://activesupport/lib/active_support/callbacks.rb#521 + # source://activesupport/lib/active_support/callbacks.rb#479 def inverted_lambda; end - # source://activesupport/lib/active_support/callbacks.rb#515 + # source://activesupport/lib/active_support/callbacks.rb#473 def make_lambda; end end -# source://activesupport/lib/active_support/callbacks.rb#283 +# source://activesupport/lib/active_support/callbacks.rb#230 class ActiveSupport::Callbacks::Callback # @return [Callback] a new instance of Callback # - # source://activesupport/lib/active_support/callbacks.rb#298 + # source://activesupport/lib/active_support/callbacks.rb#245 def initialize(name, filter, kind, options, chain_config); end # Wraps code with filter # - # source://activesupport/lib/active_support/callbacks.rb#333 + # source://activesupport/lib/active_support/callbacks.rb#299 def apply(callback_sequence); end # Returns the value of attribute chain_config. # - # source://activesupport/lib/active_support/callbacks.rb#296 + # source://activesupport/lib/active_support/callbacks.rb#243 def chain_config; end - # source://activesupport/lib/active_support/callbacks.rb#347 + # source://activesupport/lib/active_support/callbacks.rb#281 + def compiled; end + + # source://activesupport/lib/active_support/callbacks.rb#303 def current_scopes; end # @return [Boolean] # - # source://activesupport/lib/active_support/callbacks.rb#323 + # source://activesupport/lib/active_support/callbacks.rb#272 def duplicates?(other); end # Returns the value of attribute filter. # - # source://activesupport/lib/active_support/callbacks.rb#296 + # source://activesupport/lib/active_support/callbacks.rb#243 def filter; end # Returns the value of attribute kind. # - # source://activesupport/lib/active_support/callbacks.rb#295 + # source://activesupport/lib/active_support/callbacks.rb#242 def kind; end # Sets the attribute kind # # @param value the value to set the attribute kind to. # - # source://activesupport/lib/active_support/callbacks.rb#295 + # source://activesupport/lib/active_support/callbacks.rb#242 def kind=(_arg0); end # @return [Boolean] # - # source://activesupport/lib/active_support/callbacks.rb#319 + # source://activesupport/lib/active_support/callbacks.rb#268 def matches?(_kind, _filter); end - # source://activesupport/lib/active_support/callbacks.rb#307 + # source://activesupport/lib/active_support/callbacks.rb#256 def merge_conditional_options(chain, if_option:, unless_option:); end # Returns the value of attribute name. # - # source://activesupport/lib/active_support/callbacks.rb#295 + # source://activesupport/lib/active_support/callbacks.rb#242 def name; end # Sets the attribute name # # @param value the value to set the attribute name to. # - # source://activesupport/lib/active_support/callbacks.rb#295 + # source://activesupport/lib/active_support/callbacks.rb#242 def name=(_arg0); end private - # source://activesupport/lib/active_support/callbacks.rb#355 + # source://activesupport/lib/active_support/callbacks.rb#311 def check_conditionals(conditionals); end - # source://activesupport/lib/active_support/callbacks.rb#370 + # source://activesupport/lib/active_support/callbacks.rb#326 def conditions_lambdas; end class << self - # source://activesupport/lib/active_support/callbacks.rb#284 + # source://activesupport/lib/active_support/callbacks.rb#231 def build(chain, filter, kind, options); end end end -# source://activesupport/lib/active_support/callbacks.rb#352 +# source://activesupport/lib/active_support/callbacks.rb#308 ActiveSupport::Callbacks::Callback::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) -# source://activesupport/lib/active_support/callbacks.rb#606 +# source://activesupport/lib/active_support/callbacks.rb#566 class ActiveSupport::Callbacks::CallbackChain include ::Enumerable # @return [CallbackChain] a new instance of CallbackChain # - # source://activesupport/lib/active_support/callbacks.rb#611 + # source://activesupport/lib/active_support/callbacks.rb#571 def initialize(name, config); end - # source://activesupport/lib/active_support/callbacks.rb#671 + # source://activesupport/lib/active_support/callbacks.rb#631 def append(*callbacks); end - # source://activesupport/lib/active_support/callbacks.rb#639 + # source://activesupport/lib/active_support/callbacks.rb#599 def clear; end - # source://activesupport/lib/active_support/callbacks.rb#653 + # source://activesupport/lib/active_support/callbacks.rb#613 def compile(type); end # Returns the value of attribute config. # - # source://activesupport/lib/active_support/callbacks.rb#609 + # source://activesupport/lib/active_support/callbacks.rb#569 def config; end - # source://activesupport/lib/active_support/callbacks.rb#633 + # source://activesupport/lib/active_support/callbacks.rb#593 def delete(o); end - # source://activesupport/lib/active_support/callbacks.rb#623 + # source://activesupport/lib/active_support/callbacks.rb#583 def each(&block); end # @return [Boolean] # - # source://activesupport/lib/active_support/callbacks.rb#625 + # source://activesupport/lib/active_support/callbacks.rb#585 def empty?; end - # source://activesupport/lib/active_support/callbacks.rb#624 + # source://activesupport/lib/active_support/callbacks.rb#584 def index(o); end - # source://activesupport/lib/active_support/callbacks.rb#627 + # source://activesupport/lib/active_support/callbacks.rb#587 def insert(index, o); end # Returns the value of attribute name. # - # source://activesupport/lib/active_support/callbacks.rb#609 + # source://activesupport/lib/active_support/callbacks.rb#569 def name; end - # source://activesupport/lib/active_support/callbacks.rb#675 + # source://activesupport/lib/active_support/callbacks.rb#635 def prepend(*callbacks); end protected # Returns the value of attribute chain. # - # source://activesupport/lib/active_support/callbacks.rb#680 + # source://activesupport/lib/active_support/callbacks.rb#640 def chain; end private - # source://activesupport/lib/active_support/callbacks.rb#683 + # source://activesupport/lib/active_support/callbacks.rb#643 def append_one(callback); end - # source://activesupport/lib/active_support/callbacks.rb#703 + # source://activesupport/lib/active_support/callbacks.rb#663 def default_terminator; end - # source://activesupport/lib/active_support/callbacks.rb#646 + # source://activesupport/lib/active_support/callbacks.rb#606 def initialize_copy(other); end - # source://activesupport/lib/active_support/callbacks.rb#690 + # source://activesupport/lib/active_support/callbacks.rb#650 def prepend_one(callback); end - # source://activesupport/lib/active_support/callbacks.rb#697 + # source://activesupport/lib/active_support/callbacks.rb#657 def remove_duplicates(callback); end end @@ -2646,53 +2664,53 @@ end # chaining them with nested lambda calls, see: # https://github.com/rails/rails/issues/18011 # -# source://activesupport/lib/active_support/callbacks.rb#559 +# source://activesupport/lib/active_support/callbacks.rb#517 class ActiveSupport::Callbacks::CallbackSequence # @return [CallbackSequence] a new instance of CallbackSequence # - # source://activesupport/lib/active_support/callbacks.rb#560 + # source://activesupport/lib/active_support/callbacks.rb#518 def initialize(nested = T.unsafe(nil), call_template = T.unsafe(nil), user_conditions = T.unsafe(nil)); end - # source://activesupport/lib/active_support/callbacks.rb#574 - def after(&after); end + # source://activesupport/lib/active_support/callbacks.rb#533 + def after(after); end - # source://activesupport/lib/active_support/callbacks.rb#579 + # source://activesupport/lib/active_support/callbacks.rb#539 def around(call_template, user_conditions); end - # source://activesupport/lib/active_support/callbacks.rb#569 - def before(&before); end + # source://activesupport/lib/active_support/callbacks.rb#527 + def before(before); end - # source://activesupport/lib/active_support/callbacks.rb#593 + # source://activesupport/lib/active_support/callbacks.rb#553 def expand_call_template(arg, block); end # @return [Boolean] # - # source://activesupport/lib/active_support/callbacks.rb#589 + # source://activesupport/lib/active_support/callbacks.rb#549 def final?; end - # source://activesupport/lib/active_support/callbacks.rb#601 + # source://activesupport/lib/active_support/callbacks.rb#561 def invoke_after(arg); end - # source://activesupport/lib/active_support/callbacks.rb#597 + # source://activesupport/lib/active_support/callbacks.rb#557 def invoke_before(arg); end # Returns the value of attribute nested. # - # source://activesupport/lib/active_support/callbacks.rb#587 + # source://activesupport/lib/active_support/callbacks.rb#547 def nested; end # @return [Boolean] # - # source://activesupport/lib/active_support/callbacks.rb#583 + # source://activesupport/lib/active_support/callbacks.rb#543 def skip?(arg); end end -# source://activesupport/lib/active_support/callbacks.rb#715 +# source://activesupport/lib/active_support/callbacks.rb#675 module ActiveSupport::Callbacks::ClassMethods # This is used internally to append, prepend and skip callbacks to the # CallbackChain. # - # source://activesupport/lib/active_support/callbacks.rb#725 + # source://activesupport/lib/active_support/callbacks.rb#685 def __update_callbacks(name); end # Define sets of events in the object life cycle that support callbacks. @@ -2774,15 +2792,15 @@ module ActiveSupport::Callbacks::ClassMethods # Calling +define_callbacks+ multiple times with the same +names+ will # overwrite previous callbacks registered with #set_callback. # - # source://activesupport/lib/active_support/callbacks.rb#940 + # source://activesupport/lib/active_support/callbacks.rb#900 def define_callbacks(*names); end - # source://activesupport/lib/active_support/callbacks.rb#716 + # source://activesupport/lib/active_support/callbacks.rb#676 def normalize_callback_params(filters, block); end # Remove all set callbacks for the given event. # - # source://activesupport/lib/active_support/callbacks.rb#850 + # source://activesupport/lib/active_support/callbacks.rb#810 def reset_callbacks(name); end # Install a callback for the given event. @@ -2830,7 +2848,7 @@ module ActiveSupport::Callbacks::ClassMethods # * :prepend - If +true+, the callback will be prepended to the # existing chain rather than appended. # - # source://activesupport/lib/active_support/callbacks.rb#776 + # source://activesupport/lib/active_support/callbacks.rb#736 def set_callback(name, *filter_list, &block); end # Skip a previously set callback. Like #set_callback, :if or @@ -2869,74 +2887,115 @@ module ActiveSupport::Callbacks::ClassMethods # An ArgumentError will be raised if the callback has not # already been set (unless the :raise option is set to false). # - # source://activesupport/lib/active_support/callbacks.rb#825 + # source://activesupport/lib/active_support/callbacks.rb#785 def skip_callback(name, *filter_list, &block); end protected - # source://activesupport/lib/active_support/callbacks.rb#971 + # source://activesupport/lib/active_support/callbacks.rb#931 def get_callbacks(name); end - # source://activesupport/lib/active_support/callbacks.rb#975 + # source://activesupport/lib/active_support/callbacks.rb#935 def set_callbacks(name, callbacks); end end -# source://activesupport/lib/active_support/callbacks.rb#153 +# source://activesupport/lib/active_support/callbacks.rb#152 module ActiveSupport::Callbacks::Conditionals; end -# source://activesupport/lib/active_support/callbacks.rb#154 +# source://activesupport/lib/active_support/callbacks.rb#153 class ActiveSupport::Callbacks::Conditionals::Value # @return [Value] a new instance of Value # - # source://activesupport/lib/active_support/callbacks.rb#155 + # source://activesupport/lib/active_support/callbacks.rb#154 def initialize(&block); end - # source://activesupport/lib/active_support/callbacks.rb#158 + # source://activesupport/lib/active_support/callbacks.rb#157 def call(target, value); end end -# source://activesupport/lib/active_support/callbacks.rb#162 +# source://activesupport/lib/active_support/callbacks.rb#161 module ActiveSupport::Callbacks::Filters; end -# source://activesupport/lib/active_support/callbacks.rb#215 +# source://activesupport/lib/active_support/callbacks.rb#193 class ActiveSupport::Callbacks::Filters::After - class << self - # source://activesupport/lib/active_support/callbacks.rb#216 - def build(callback_sequence, user_callback, user_conditions, chain_config); end + # @return [After] a new instance of After + # + # source://activesupport/lib/active_support/callbacks.rb#195 + def initialize(user_callback, user_conditions, chain_config); end - private + # source://activesupport/lib/active_support/callbacks.rb#213 + def apply(callback_sequence); end + + # source://activesupport/lib/active_support/callbacks.rb#201 + def call(env); end + + # Returns the value of attribute halting. + # + # source://activesupport/lib/active_support/callbacks.rb#194 + def halting; end - # source://activesupport/lib/active_support/callbacks.rb#258 - def conditional(callback_sequence, user_callback, user_conditions); end + # Returns the value of attribute user_callback. + # + # source://activesupport/lib/active_support/callbacks.rb#194 + def user_callback; end - # source://activesupport/lib/active_support/callbacks.rb#247 - def halting(callback_sequence, user_callback); end + # Returns the value of attribute user_conditions. + # + # source://activesupport/lib/active_support/callbacks.rb#194 + def user_conditions; end +end - # source://activesupport/lib/active_support/callbacks.rb#232 - def halting_and_conditional(callback_sequence, user_callback, user_conditions); end +# source://activesupport/lib/active_support/callbacks.rb#218 +class ActiveSupport::Callbacks::Filters::Around + # @return [Around] a new instance of Around + # + # source://activesupport/lib/active_support/callbacks.rb#219 + def initialize(user_callback, user_conditions); end - # source://activesupport/lib/active_support/callbacks.rb#272 - def simple(callback_sequence, user_callback); end - end + # source://activesupport/lib/active_support/callbacks.rb#224 + def apply(callback_sequence); end end -# source://activesupport/lib/active_support/callbacks.rb#165 +# source://activesupport/lib/active_support/callbacks.rb#164 class ActiveSupport::Callbacks::Filters::Before - class << self - # source://activesupport/lib/active_support/callbacks.rb#166 - def build(callback_sequence, user_callback, user_conditions, chain_config, filter, name); end + # @return [Before] a new instance of Before + # + # source://activesupport/lib/active_support/callbacks.rb#165 + def initialize(user_callback, user_conditions, chain_config, filter, name); end - private + # source://activesupport/lib/active_support/callbacks.rb#188 + def apply(callback_sequence); end + + # source://activesupport/lib/active_support/callbacks.rb#172 + def call(env); end - # source://activesupport/lib/active_support/callbacks.rb#195 - def halting(callback_sequence, user_callback, halted_lambda, filter, name); end + # Returns the value of attribute filter. + # + # source://activesupport/lib/active_support/callbacks.rb#170 + def filter; end - # source://activesupport/lib/active_support/callbacks.rb#176 - def halting_and_conditional(callback_sequence, user_callback, user_conditions, halted_lambda, filter, name); end - end + # Returns the value of attribute halted_lambda. + # + # source://activesupport/lib/active_support/callbacks.rb#170 + def halted_lambda; end + + # Returns the value of attribute name. + # + # source://activesupport/lib/active_support/callbacks.rb#170 + def name; end + + # Returns the value of attribute user_callback. + # + # source://activesupport/lib/active_support/callbacks.rb#170 + def user_callback; end + + # Returns the value of attribute user_conditions. + # + # source://activesupport/lib/active_support/callbacks.rb#170 + def user_conditions; end end -# source://activesupport/lib/active_support/callbacks.rb#163 +# source://activesupport/lib/active_support/callbacks.rb#162 class ActiveSupport::Callbacks::Filters::Environment < ::Struct # Returns the value of attribute halted # @@ -2980,21 +3039,34 @@ class ActiveSupport::Callbacks::Filters::Environment < ::Struct end end +# source://activesupport/lib/active_support/class_attribute.rb#4 +module ActiveSupport::ClassAttribute + class << self + # source://activesupport/lib/active_support/class_attribute.rb#6 + def redefine(owner, name, value); end + end +end + # source://activesupport/lib/active_support/code_generator.rb#4 class ActiveSupport::CodeGenerator # @return [CodeGenerator] a new instance of CodeGenerator # - # source://activesupport/lib/active_support/code_generator.rb#48 + # source://activesupport/lib/active_support/code_generator.rb#53 def initialize(owner, path, line); end - # source://activesupport/lib/active_support/code_generator.rb#55 - def define_cached_method(name, namespace:, as: T.unsafe(nil), &block); end + # @yield [@sources] + # + # source://activesupport/lib/active_support/code_generator.rb#61 + def class_eval; end + + # source://activesupport/lib/active_support/code_generator.rb#65 + def define_cached_method(canonical_name, namespace:, as: T.unsafe(nil), &block); end - # source://activesupport/lib/active_support/code_generator.rb#59 + # source://activesupport/lib/active_support/code_generator.rb#69 def execute; end class << self - # source://activesupport/lib/active_support/code_generator.rb#36 + # source://activesupport/lib/active_support/code_generator.rb#41 def batch(owner, path, line); end end end @@ -3006,11 +3078,11 @@ class ActiveSupport::CodeGenerator::MethodSet # source://activesupport/lib/active_support/code_generator.rb#8 def initialize(namespace); end - # source://activesupport/lib/active_support/code_generator.rb#25 + # source://activesupport/lib/active_support/code_generator.rb#28 def apply(owner, path, line); end - # source://activesupport/lib/active_support/code_generator.rb#14 - def define_cached_method(name, as: T.unsafe(nil)); end + # source://activesupport/lib/active_support/code_generator.rb#15 + def define_cached_method(canonical_name, as: T.unsafe(nil)); end end # source://activesupport/lib/active_support/code_generator.rb#6 @@ -3228,7 +3300,7 @@ class ActiveSupport::Concern::MultiplePrependBlocks < ::StandardError def initialize; end end -# source://activesupport/lib/active_support/concurrency/share_lock.rb#7 +# source://activesupport/lib/active_support/concurrency/share_lock.rb#6 module ActiveSupport::Concurrency; end # A monitor that will permit dependency loading while blocked waiting for @@ -3268,13 +3340,13 @@ end # # https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock # -# source://activesupport/lib/active_support/concurrency/share_lock.rb#11 +# source://activesupport/lib/active_support/concurrency/share_lock.rb#10 class ActiveSupport::Concurrency::ShareLock include ::MonitorMixin # @return [ShareLock] a new instance of ShareLock # - # source://activesupport/lib/active_support/concurrency/share_lock.rb#50 + # source://activesupport/lib/active_support/concurrency/share_lock.rb#49 def initialize; end # Execute the supplied block while holding the Exclusive lock. If @@ -3284,19 +3356,19 @@ class ActiveSupport::Concurrency::ShareLock # # See +start_exclusive+ for other options. # - # source://activesupport/lib/active_support/concurrency/share_lock.rb#148 + # source://activesupport/lib/active_support/concurrency/share_lock.rb#147 def exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), after_compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end # We track Thread objects, instead of just using counters, because # we need exclusive locks to be reentrant, and we need to be able # to upgrade share locks to exclusive. # - # source://activesupport/lib/active_support/concurrency/share_lock.rb#18 + # source://activesupport/lib/active_support/concurrency/share_lock.rb#17 def raw_state; end # Execute the supplied block while holding the Share lock. # - # source://activesupport/lib/active_support/concurrency/share_lock.rb#159 + # source://activesupport/lib/active_support/concurrency/share_lock.rb#158 def sharing; end # Returns false if +no_wait+ is set and the lock is not @@ -3314,26 +3386,26 @@ class ActiveSupport::Concurrency::ShareLock # +purpose+ matching, it is possible to yield only to other # threads whose activity will not interfere. # - # source://activesupport/lib/active_support/concurrency/share_lock.rb#76 + # source://activesupport/lib/active_support/concurrency/share_lock.rb#75 def start_exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end - # source://activesupport/lib/active_support/concurrency/share_lock.rb#114 + # source://activesupport/lib/active_support/concurrency/share_lock.rb#113 def start_sharing; end # Relinquish the exclusive lock. Must only be called by the thread # that called start_exclusive (and currently holds the lock). # - # source://activesupport/lib/active_support/concurrency/share_lock.rb#96 + # source://activesupport/lib/active_support/concurrency/share_lock.rb#95 def stop_exclusive(compatible: T.unsafe(nil)); end - # source://activesupport/lib/active_support/concurrency/share_lock.rb#131 + # source://activesupport/lib/active_support/concurrency/share_lock.rb#130 def stop_sharing; end # Temporarily give up all held Share locks while executing the # supplied block, allowing any +compatible+ exclusive lock request # to proceed. # - # source://activesupport/lib/active_support/concurrency/share_lock.rb#171 + # source://activesupport/lib/active_support/concurrency/share_lock.rb#170 def yield_shares(purpose: T.unsafe(nil), compatible: T.unsafe(nil), block_share: T.unsafe(nil)); end private @@ -3342,20 +3414,20 @@ class ActiveSupport::Concurrency::ShareLock # # @return [Boolean] # - # source://activesupport/lib/active_support/concurrency/share_lock.rb#204 + # source://activesupport/lib/active_support/concurrency/share_lock.rb#203 def busy_for_exclusive?(purpose); end # @return [Boolean] # - # source://activesupport/lib/active_support/concurrency/share_lock.rb#209 + # source://activesupport/lib/active_support/concurrency/share_lock.rb#208 def busy_for_sharing?(purpose); end # @return [Boolean] # - # source://activesupport/lib/active_support/concurrency/share_lock.rb#214 + # source://activesupport/lib/active_support/concurrency/share_lock.rb#213 def eligible_waiters?(compatible); end - # source://activesupport/lib/active_support/concurrency/share_lock.rb#218 + # source://activesupport/lib/active_support/concurrency/share_lock.rb#217 def wait_for(method, &block); end end @@ -3530,10 +3602,10 @@ class ActiveSupport::ConfigurationFile private - # source://activesupport/lib/active_support/configuration_file.rb#35 + # source://activesupport/lib/active_support/configuration_file.rb#44 def read(content_path); end - # source://activesupport/lib/active_support/configuration_file.rb#46 + # source://activesupport/lib/active_support/configuration_file.rb#54 def render(context); end class << self @@ -3675,7 +3747,7 @@ end # The attributes stuck in Current should be used by more or less all actions on all requests. If you start # sticking controller-specific attributes in there, you're going to create a mess. # -# source://activesupport/lib/active_support/current_attributes.rb#91 +# source://activesupport/lib/active_support/current_attributes.rb#92 class ActiveSupport::CurrentAttributes include ::ActiveSupport::Callbacks extend ::ActiveSupport::Callbacks::ClassMethods @@ -3683,36 +3755,39 @@ class ActiveSupport::CurrentAttributes # @return [CurrentAttributes] a new instance of CurrentAttributes # - # source://activesupport/lib/active_support/current_attributes.rb#197 + # source://activesupport/lib/active_support/current_attributes.rb#199 def initialize; end - # source://activesupport/lib/active_support/callbacks.rb#70 + # source://activesupport/lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/lib/active_support/callbacks.rb#963 + # source://activesupport/lib/active_support/callbacks.rb#923 def _reset_callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#951 + # source://activesupport/lib/active_support/callbacks.rb#911 def _run_reset_callbacks(&block); end # Returns the value of attribute attributes. # - # source://activesupport/lib/active_support/current_attributes.rb#195 + # source://activesupport/lib/active_support/current_attributes.rb#197 def attributes; end # Sets the attribute attributes # # @param value the value to set the attribute attributes to. # - # source://activesupport/lib/active_support/current_attributes.rb#195 + # source://activesupport/lib/active_support/current_attributes.rb#197 def attributes=(_arg0); end + # source://activesupport/lib/active_support/current_attributes.rb#195 + def defaults; end + + # source://activesupport/lib/active_support/current_attributes.rb#195 + def defaults?; end + # Reset all attributes. Should be called before and after actions, when used as a per-request singleton. # - # source://activesupport/lib/active_support/current_attributes.rb#220 + # source://activesupport/lib/active_support/current_attributes.rb#218 def reset; end # Expose one or more attributes within a block. Old values are returned after the block concludes. @@ -3726,94 +3801,112 @@ class ActiveSupport::CurrentAttributes # end # end # - # source://activesupport/lib/active_support/current_attributes.rb#211 - def set(set_attributes); end + # source://activesupport/lib/active_support/current_attributes.rb#213 + def set(attributes, &block); end private - # source://activesupport/lib/active_support/current_attributes.rb#227 - def assign_attributes(new_attributes); end - - # source://activesupport/lib/active_support/current_attributes.rb#231 - def compute_attributes(keys); end + # source://activesupport/lib/active_support/current_attributes.rb#225 + def resolve_defaults; end class << self - # source://activesupport/lib/active_support/callbacks.rb#70 + # source://activesupport/lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/lib/active_support/callbacks.rb#955 + # source://activesupport/lib/active_support/callbacks.rb#915 def _reset_callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#959 + # source://activesupport/lib/active_support/callbacks.rb#919 def _reset_callbacks=(value); end # Calls this callback after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. # - # source://activesupport/lib/active_support/current_attributes.rb#151 + # source://activesupport/lib/active_support/current_attributes.rb#149 def after_reset(*methods, &block); end # Declares one or more attributes that will be given both class and instance accessor methods. # - # source://activesupport/lib/active_support/current_attributes.rb#104 - def attribute(*names); end + # ==== Options + # + # * :default - The default value for the attributes. If the value + # is a proc or lambda, it will be called whenever an instance is + # constructed. Otherwise, the value will be duplicated with +#dup+. + # Default values are re-assigned when the attributes are reset. + # + # source://activesupport/lib/active_support/current_attributes.rb#114 + def attribute(*names, default: T.unsafe(nil)); end # Calls this callback before #reset is called on the instance. Used for resetting external collaborators that depend on current values. # - # source://activesupport/lib/active_support/current_attributes.rb#146 + # source://activesupport/lib/active_support/current_attributes.rb#144 def before_reset(*methods, &block); end - # source://activesupport/lib/active_support/current_attributes.rb#162 + # source://activesupport/lib/active_support/current_attributes.rb#160 def clear_all; end + # source://activesupport/lib/active_support/class_attribute.rb#12 + def defaults; end + + # source://activesupport/lib/active_support/class_attribute.rb#15 + def defaults=(new_value); end + + # source://activesupport/lib/active_support/current_attributes.rb#195 + def defaults?; end + # Returns singleton instance for this class in this thread. If none exists, one is created. # - # source://activesupport/lib/active_support/current_attributes.rb#99 + # source://activesupport/lib/active_support/current_attributes.rb#102 def instance; end - # source://activesupport/lib/active_support/current_attributes.rb#156 + # source://activesupport/lib/active_support/current_attributes.rb#154 def reset(*_arg0, **_arg1, &_arg2); end - # source://activesupport/lib/active_support/current_attributes.rb#158 + # source://activesupport/lib/active_support/current_attributes.rb#156 def reset_all; end # Calls this callback after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. # - # source://activesupport/lib/active_support/current_attributes.rb#151 + # source://activesupport/lib/active_support/current_attributes.rb#149 def resets(*methods, &block); end - # source://activesupport/lib/active_support/current_attributes.rb#156 + # source://activesupport/lib/active_support/current_attributes.rb#154 def set(*_arg0, **_arg1, &_arg2); end private - # source://activesupport/lib/active_support/current_attributes.rb#172 + # source://activesupport/lib/active_support/current_attributes.rb#170 def current_instances; end - # source://activesupport/lib/active_support/current_attributes.rb#176 + # source://activesupport/lib/active_support/current_attributes.rb#174 def current_instances_key; end - # source://activesupport/lib/active_support/current_attributes.rb#168 + # source://activesupport/lib/active_support/current_attributes.rb#166 def generated_attribute_methods; end - # source://activesupport/lib/active_support/current_attributes.rb#180 - def method_missing(name, *args, **_arg2, &block); end + # @private + # + # source://activesupport/lib/active_support/current_attributes.rb#186 + def method_added(name); end + + # source://activesupport/lib/active_support/current_attributes.rb#178 + def method_missing(name, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # - # source://activesupport/lib/active_support/current_attributes.rb#190 + # source://activesupport/lib/active_support/current_attributes.rb#182 def respond_to_missing?(name, _); end end end -# source://activesupport/lib/active_support/current_attributes.rb#95 +# source://activesupport/lib/active_support/current_attributes.rb#96 ActiveSupport::CurrentAttributes::INVALID_ATTRIBUTE_NAMES = T.let(T.unsafe(nil), Array) +# source://activesupport/lib/active_support/current_attributes.rb#98 +ActiveSupport::CurrentAttributes::NOT_SET = T.let(T.unsafe(nil), Object) + # Provides +deep_merge+ and +deep_merge!+ methods. Expects the including class # to provide a merge!(other, &block) method. # @@ -3859,6 +3952,34 @@ module ActiveSupport::DeepMergeable def deep_merge?(other); end end +# source://activesupport/lib/active_support/delegation.rb#16 +module ActiveSupport::Delegation + class << self + # source://activesupport/lib/active_support/delegation.rb#23 + def generate(owner, methods, location: T.unsafe(nil), to: T.unsafe(nil), prefix: T.unsafe(nil), allow_nil: T.unsafe(nil), nilable: T.unsafe(nil), private: T.unsafe(nil), as: T.unsafe(nil), signature: T.unsafe(nil)); end + + # source://activesupport/lib/active_support/delegation.rb#152 + def generate_method_missing(owner, target, allow_nil: T.unsafe(nil)); end + end +end + +# source://activesupport/lib/active_support/delegation.rb#20 +ActiveSupport::Delegation::RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set) + +# source://activesupport/lib/active_support/delegation.rb#17 +ActiveSupport::Delegation::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) + +# Error generated by +delegate+ when a method is called on +nil+ and +allow_nil+ +# option is not used. +# +# source://activesupport/lib/active_support/delegation.rb#8 +class ActiveSupport::DelegationError < ::NoMethodError + class << self + # source://activesupport/lib/active_support/delegation.rb#10 + def nil_target(method_name, target); end + end +end + # source://activesupport/lib/active_support/dependencies/interlock.rb#6 module ActiveSupport::Dependencies class << self @@ -4020,15 +4141,12 @@ end # # in config/environments/test.rb # config.active_support.deprecation = :raise # -# source://activesupport/lib/active_support/deprecation.rb#35 +# source://activesupport/lib/active_support/deprecation.rb#33 class ActiveSupport::Deprecation - include ::ActiveSupport::Deprecation::InstanceDelegator include ::ActiveSupport::Deprecation::Behavior include ::ActiveSupport::Deprecation::Reporting include ::ActiveSupport::Deprecation::Disallowed include ::ActiveSupport::Deprecation::MethodWrapper - extend ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods - extend ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators # It accepts two parameters on initialization. The first is a version of library # and the second is a library name. @@ -4037,82 +4155,22 @@ class ActiveSupport::Deprecation # # @return [Deprecation] a new instance of Deprecation # - # source://activesupport/lib/active_support/deprecation.rb#68 + # source://activesupport/lib/active_support/deprecation.rb#71 def initialize(deprecation_horizon = T.unsafe(nil), gem_name = T.unsafe(nil)); end # The version number in which the deprecated behavior will be removed, by default. # - # source://activesupport/lib/active_support/deprecation.rb#62 + # source://activesupport/lib/active_support/deprecation.rb#65 def deprecation_horizon; end # The version number in which the deprecated behavior will be removed, by default. # - # source://activesupport/lib/active_support/deprecation.rb#62 + # source://activesupport/lib/active_support/deprecation.rb#65 def deprecation_horizon=(_arg0); end class << self - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def allow(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def begin_silence(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def behavior(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def behavior=(arg); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def debug(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def debug=(arg); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def deprecate_methods(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def deprecation_horizon(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def deprecation_horizon=(arg); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#58 - def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def disallowed_behavior(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def disallowed_behavior=(arg); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def disallowed_warnings(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def disallowed_warnings=(arg); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def end_silence(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def gem_name(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def gem_name=(arg); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def silence(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def silenced(*_arg0, **_arg1, &_arg2); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#34 - def silenced=(arg); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#53 - def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end + # source://activesupport/lib/active_support/deprecation.rb#60 + def _instance; end end end @@ -4206,35 +4264,12 @@ end # source://activesupport/lib/active_support/deprecation/behaviors.rb#13 ActiveSupport::Deprecation::DEFAULT_BEHAVIORS = T.let(T.unsafe(nil), Hash) -# DeprecatedConstantAccessor transforms a constant into a deprecated one by -# hooking +const_missing+. -# -# It takes the names of an old (deprecated) constant and of a new constant -# (both in string form) and a deprecator. -# -# The deprecated constant now returns the same object as the new one rather -# than a proxy object, so it can be used transparently in +rescue+ blocks -# etc. -# -# PLANETS = %w(mercury venus earth mars jupiter saturn uranus neptune pluto) -# -# # (In a later update, the original implementation of `PLANETS` has been removed.) -# -# PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) -# include ActiveSupport::Deprecation::DeprecatedConstantAccessor -# deprecate_constant 'PLANETS', 'PLANETS_POST_2006', deprecator: ActiveSupport::Deprecation.new -# -# PLANETS.map { |planet| planet.capitalize } -# # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead. -# (Backtrace information…) -# ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] -# -# source://activesupport/lib/active_support/deprecation/constant_accessor.rb#27 +# source://activesupport/lib/active_support/deprecation/constant_accessor.rb#5 module ActiveSupport::Deprecation::DeprecatedConstantAccessor class << self # @private # - # source://activesupport/lib/active_support/deprecation/constant_accessor.rb#28 + # source://activesupport/lib/active_support/deprecation/constant_accessor.rb#6 def included(base); end end end @@ -4255,14 +4290,14 @@ end # (Backtrace information…) # ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] # -# source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#122 +# source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#120 class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module # @return [DeprecatedConstantProxy] a new instance of DeprecatedConstantProxy # - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#130 - def initialize(old_const, new_const, deprecator = T.unsafe(nil), message: T.unsafe(nil)); end + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#128 + def initialize(old_const, new_const, deprecator, message: T.unsafe(nil)); end - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#161 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#158 def append_features(base); end # Returns the class of the new constant. @@ -4271,46 +4306,46 @@ class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module # PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006') # PLANETS.class # => Array # - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#157 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#154 def class; end - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#171 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#168 def extended(base); end - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#150 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#147 def hash(*_arg0, **_arg1, &_arg2); end # Don't give a deprecation warning on inspect since test/unit and error # logs rely on it for diagnostics. # - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#144 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#141 def inspect; end - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#150 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#147 def instance_methods(*_arg0, **_arg1, &_arg2); end - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#150 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#147 def name(*_arg0, **_arg1, &_arg2); end - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#166 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#163 def prepend_features(base); end - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#150 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#147 def respond_to?(*_arg0, **_arg1, &_arg2); end private - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#181 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#178 def const_missing(name); end - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#186 - def method_missing(called, *args, &block); end + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#183 + def method_missing(*_arg0, **_arg1, &_arg2); end - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#177 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#174 def target; end class << self - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#123 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#121 def new(*args, **options, &block); end end end @@ -4348,19 +4383,19 @@ end # example.request.to_s # # => "special_request" # -# source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#88 +# source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#87 class ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy < ::ActiveSupport::Deprecation::DeprecationProxy # @return [DeprecatedInstanceVariableProxy] a new instance of DeprecatedInstanceVariableProxy # - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#89 - def initialize(instance, method, var = T.unsafe(nil), deprecator = T.unsafe(nil)); end + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#88 + def initialize(instance, method, var = T.unsafe(nil), deprecator:); end private - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#98 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#96 def target; end - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#102 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#100 def warn(callstack, called, args); end end @@ -4380,14 +4415,14 @@ class ActiveSupport::Deprecation::DeprecatedObjectProxy < ::ActiveSupport::Depre # @return [DeprecatedObjectProxy] a new instance of DeprecatedObjectProxy # # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#39 - def initialize(object, message, deprecator = T.unsafe(nil)); end + def initialize(object, message, deprecator); end private - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#47 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#46 def target; end - # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#51 + # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#50 def warn(callstack, called, args); end end @@ -4406,7 +4441,7 @@ class ActiveSupport::Deprecation::DeprecationProxy class << self # source://activesupport/lib/active_support/deprecation/proxy_wrappers.rb#6 - def new(*args, &block); end + def new(*args, **kwargs, &block); end end end @@ -4537,45 +4572,8 @@ module ActiveSupport::Deprecation::Disallowed def explicitly_allowed?(message); end end -# source://activesupport/lib/active_support/deprecation/instance_delegator.rb#5 -module ActiveSupport::Deprecation::InstanceDelegator - mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods - mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators - - class << self - # @private - # - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#6 - def included(base); end - end -end - -# source://activesupport/lib/active_support/deprecation/instance_delegator.rb#11 -module ActiveSupport::Deprecation::InstanceDelegator::ClassMethods - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#47 - def _instance; end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#15 - def include(included_module); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#42 - def instance; end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#20 - def method_added(method_name); end -end - -# source://activesupport/lib/active_support/deprecation/instance_delegator.rb#12 -ActiveSupport::Deprecation::InstanceDelegator::ClassMethods::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) - -# source://activesupport/lib/active_support/deprecation/instance_delegator.rb#52 -module ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#58 - def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end - - # source://activesupport/lib/active_support/deprecation/instance_delegator.rb#53 - def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end -end +# source://activesupport/lib/active_support/deprecation.rb#57 +ActiveSupport::Deprecation::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) # source://activesupport/lib/active_support/deprecation/method_wrappers.rb#8 module ActiveSupport::Deprecation::MethodWrapper @@ -4723,14 +4721,14 @@ module ActiveSupport::Deprecation::Reporting # @return [Boolean] # - # source://activesupport/lib/active_support/deprecation/reporting.rb#169 + # source://activesupport/lib/active_support/deprecation/reporting.rb#174 def ignored_callstack?(path); end end -# source://activesupport/lib/active_support/deprecation/reporting.rb#167 +# source://activesupport/lib/active_support/deprecation/reporting.rb#172 ActiveSupport::Deprecation::Reporting::LIB_DIR = T.let(T.unsafe(nil), String) -# source://activesupport/lib/active_support/deprecation/reporting.rb#166 +# source://activesupport/lib/active_support/deprecation/reporting.rb#171 ActiveSupport::Deprecation::Reporting::RAILS_GEM_ROOT = T.let(T.unsafe(nil), String) # Raised when ActiveSupport::Deprecation::Behavior#behavior is set with :raise. @@ -4748,35 +4746,35 @@ class ActiveSupport::DeprecationException < ::StandardError; end # so if you know your code won't be executed on older rubies, including # +ActiveSupport::DescendantsTracker+ does not provide any benefit. # -# source://activesupport/lib/active_support/descendants_tracker.rb#15 +# source://activesupport/lib/active_support/descendants_tracker.rb#14 module ActiveSupport::DescendantsTracker - # source://activesupport/lib/active_support/descendants_tracker.rb#109 + # source://activesupport/lib/active_support/descendants_tracker.rb#107 def descendants; end class << self - # source://activesupport/lib/active_support/descendants_tracker.rb#79 + # source://activesupport/lib/active_support/descendants_tracker.rb#78 def clear(classes); end - # source://activesupport/lib/active_support/descendants_tracker.rb#104 + # source://activesupport/lib/active_support/descendants_tracker.rb#102 def descendants(klass); end - # source://activesupport/lib/active_support/descendants_tracker.rb#70 + # source://activesupport/lib/active_support/descendants_tracker.rb#69 def disable_clear!; end - # source://activesupport/lib/active_support/descendants_tracker.rb#90 + # source://activesupport/lib/active_support/descendants_tracker.rb#89 def reject!(classes); end - # source://activesupport/lib/active_support/descendants_tracker.rb#100 + # source://activesupport/lib/active_support/descendants_tracker.rb#98 def subclasses(klass); end end end -# source://activesupport/lib/active_support/descendants_tracker.rb#59 +# source://activesupport/lib/active_support/descendants_tracker.rb#58 module ActiveSupport::DescendantsTracker::ReloadedClassesFiltering - # source://activesupport/lib/active_support/descendants_tracker.rb#64 + # source://activesupport/lib/active_support/descendants_tracker.rb#63 def descendants; end - # source://activesupport/lib/active_support/descendants_tracker.rb#60 + # source://activesupport/lib/active_support/descendants_tracker.rb#59 def subclasses; end end @@ -4786,9 +4784,9 @@ end # JRuby for now doesn't have Class#descendant, but when it will, it will likely # have the same WeakMap semantic than Truffle so we future proof this as much as possible. # -# source://activesupport/lib/active_support/descendants_tracker.rb#21 +# source://activesupport/lib/active_support/descendants_tracker.rb#20 class ActiveSupport::DescendantsTracker::WeakSet < ::ObjectSpace::WeakMap - # source://activesupport/lib/active_support/descendants_tracker.rb#24 + # source://activesupport/lib/active_support/descendants_tracker.rb#23 def <<(object); end def to_a; end @@ -4821,83 +4819,86 @@ end class ActiveSupport::Duration # @return [Duration] a new instance of Duration # - # source://activesupport/lib/active_support/duration.rb#224 + # source://activesupport/lib/active_support/duration.rb#226 def initialize(value, parts, variable = T.unsafe(nil)); end # Returns the modulo of this Duration by another Duration or Numeric. # Numeric values are treated as seconds. # - # source://activesupport/lib/active_support/duration.rb#307 + # source://activesupport/lib/active_support/duration.rb#312 def %(other); end # Multiplies this Duration by a Numeric and returns a new Duration. # - # source://activesupport/lib/active_support/duration.rb#282 + # source://activesupport/lib/active_support/duration.rb#287 def *(other); end # Adds another Duration or a Numeric to this Duration. Numeric values # are treated as seconds. # - # source://activesupport/lib/active_support/duration.rb#263 + # source://activesupport/lib/active_support/duration.rb#268 def +(other); end - # source://activesupport/lib/active_support/duration.rb#321 + # source://activesupport/lib/active_support/duration.rb#326 def +@; end # Subtracts another Duration or a Numeric from this Duration. Numeric # values are treated as seconds. # - # source://activesupport/lib/active_support/duration.rb#277 + # source://activesupport/lib/active_support/duration.rb#282 def -(other); end - # source://activesupport/lib/active_support/duration.rb#317 + # source://activesupport/lib/active_support/duration.rb#322 def -@; end # Divides this Duration by a Numeric and returns a new Duration. # - # source://activesupport/lib/active_support/duration.rb#293 + # source://activesupport/lib/active_support/duration.rb#298 def /(other); end # Compares one Duration with another or a Numeric to this Duration. # Numeric values are treated as seconds. # - # source://activesupport/lib/active_support/duration.rb#253 + # source://activesupport/lib/active_support/duration.rb#258 def <=>(other); end # Returns +true+ if +other+ is also a Duration instance with the # same +value+, or if other == value. # - # source://activesupport/lib/active_support/duration.rb#336 + # source://activesupport/lib/active_support/duration.rb#341 def ==(other); end - # source://activesupport/lib/active_support/duration.rb#476 + # source://activesupport/lib/active_support/duration.rb#481 def _parts; end + # source://activesupport/lib/active_support/duration.rb#224 + def abs(&_arg0); end + # Calculates a new Time or Date that is as far in the future # as this Duration represents. # - # source://activesupport/lib/active_support/duration.rb#431 + # source://activesupport/lib/active_support/duration.rb#436 def after(time = T.unsafe(nil)); end # Calculates a new Time or Date that is as far in the past # as this Duration represents. # - # source://activesupport/lib/active_support/duration.rb#439 + # source://activesupport/lib/active_support/duration.rb#444 def ago(time = T.unsafe(nil)); end - # source://activesupport/lib/active_support/duration.rb#454 + # source://activesupport/lib/active_support/duration.rb#459 def as_json(options = T.unsafe(nil)); end # Calculates a new Time or Date that is as far in the past # as this Duration represents. # - # source://activesupport/lib/active_support/duration.rb#439 + # source://activesupport/lib/active_support/duration.rb#444 def before(time = T.unsafe(nil)); end - # source://activesupport/lib/active_support/duration.rb#240 + # source://activesupport/lib/active_support/duration.rb#245 def coerce(other); end - # source://activesupport/lib/active_support/duration.rb#462 + # source://activesupport/lib/active_support/duration.rb#467 def encode_with(coder); end # Returns +true+ if +other+ is also a Duration instance, which has the @@ -4905,44 +4906,44 @@ class ActiveSupport::Duration # # @return [Boolean] # - # source://activesupport/lib/active_support/duration.rb#421 + # source://activesupport/lib/active_support/duration.rb#426 def eql?(other); end # Calculates a new Time or Date that is as far in the future # as this Duration represents. # - # source://activesupport/lib/active_support/duration.rb#431 + # source://activesupport/lib/active_support/duration.rb#436 def from_now(time = T.unsafe(nil)); end - # source://activesupport/lib/active_support/duration.rb#425 + # source://activesupport/lib/active_support/duration.rb#430 def hash; end # Returns the amount of days a duration covers as a float # # 12.hours.in_days # => 0.5 # - # source://activesupport/lib/active_support/duration.rb#394 + # source://activesupport/lib/active_support/duration.rb#399 def in_days; end # Returns the amount of hours a duration covers as a float # # 1.day.in_hours # => 24.0 # - # source://activesupport/lib/active_support/duration.rb#387 + # source://activesupport/lib/active_support/duration.rb#392 def in_hours; end # Returns the amount of minutes a duration covers as a float # # 1.day.in_minutes # => 1440.0 # - # source://activesupport/lib/active_support/duration.rb#380 + # source://activesupport/lib/active_support/duration.rb#385 def in_minutes; end # Returns the amount of months a duration covers as a float # # 9.weeks.in_months # => 2.07 # - # source://activesupport/lib/active_support/duration.rb#408 + # source://activesupport/lib/active_support/duration.rb#413 def in_months; end # Returns the number of seconds that this Duration represents. @@ -4962,65 +4963,77 @@ class ActiveSupport::Duration # 1.year.to_i # => 31556952 # # In such cases, Ruby's core - # Date[https://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and - # Time[https://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used for precision + # Date[https://docs.ruby-lang.org/en/master/Date.html] and + # Time[https://docs.ruby-lang.org/en/master/Time.html] should be used for precision # date and time arithmetic. # - # source://activesupport/lib/active_support/duration.rb#372 + # source://activesupport/lib/active_support/duration.rb#377 def in_seconds; end # Returns the amount of weeks a duration covers as a float # # 2.months.in_weeks # => 8.696 # - # source://activesupport/lib/active_support/duration.rb#401 + # source://activesupport/lib/active_support/duration.rb#406 def in_weeks; end # Returns the amount of years a duration covers as a float # # 30.days.in_years # => 0.082 # - # source://activesupport/lib/active_support/duration.rb#415 + # source://activesupport/lib/active_support/duration.rb#420 def in_years; end - # source://activesupport/lib/active_support/duration.rb#458 + # source://activesupport/lib/active_support/duration.rb#463 def init_with(coder); end - # source://activesupport/lib/active_support/duration.rb#445 + # source://activesupport/lib/active_support/duration.rb#450 def inspect; end # @return [Boolean] # - # source://activesupport/lib/active_support/duration.rb#330 + # source://activesupport/lib/active_support/duration.rb#335 def instance_of?(klass); end # @return [Boolean] # - # source://activesupport/lib/active_support/duration.rb#325 + # source://activesupport/lib/active_support/duration.rb#330 def is_a?(klass); end # Build ISO 8601 Duration string for this duration. # The +precision+ parameter can be used to limit seconds' precision of duration. # - # source://activesupport/lib/active_support/duration.rb#468 + # source://activesupport/lib/active_support/duration.rb#473 def iso8601(precision: T.unsafe(nil)); end # @return [Boolean] # - # source://activesupport/lib/active_support/duration.rb#325 + # source://activesupport/lib/active_support/duration.rb#330 def kind_of?(klass); end - # Returns a copy of the parts hash that defines the duration + # source://activesupport/lib/active_support/duration.rb#224 + def negative?(&_arg0); end + + # Returns a copy of the parts hash that defines the duration. # - # source://activesupport/lib/active_support/duration.rb#236 + # 5.minutes.parts # => {:minutes=>5} + # 3.years.parts # => {:years=>3} + # + # source://activesupport/lib/active_support/duration.rb#241 def parts; end + # source://activesupport/lib/active_support/duration.rb#224 + def positive?(&_arg0); end + # Calculates a new Time or Date that is as far in the future # as this Duration represents. # - # source://activesupport/lib/active_support/duration.rb#431 + # source://activesupport/lib/active_support/duration.rb#436 def since(time = T.unsafe(nil)); end + # source://activesupport/lib/active_support/duration.rb#224 + def to_f(&_arg0); end + # Returns the number of seconds that this Duration represents. # # 1.minute.to_i # => 60 @@ -5038,11 +5051,11 @@ class ActiveSupport::Duration # 1.year.to_i # => 31556952 # # In such cases, Ruby's core - # Date[https://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html] and - # Time[https://ruby-doc.org/stdlib/libdoc/time/rdoc/Time.html] should be used for precision + # Date[https://docs.ruby-lang.org/en/master/Date.html] and + # Time[https://docs.ruby-lang.org/en/master/Time.html] should be used for precision # date and time arithmetic. # - # source://activesupport/lib/active_support/duration.rb#372 + # source://activesupport/lib/active_support/duration.rb#377 def to_i; end # Returns the amount of seconds a duration covers as a string. @@ -5050,13 +5063,13 @@ class ActiveSupport::Duration # # 1.day.to_s # => "86400" # - # source://activesupport/lib/active_support/duration.rb#348 + # source://activesupport/lib/active_support/duration.rb#353 def to_s; end # Calculates a new Time or Date that is as far in the past # as this Duration represents. # - # source://activesupport/lib/active_support/duration.rb#439 + # source://activesupport/lib/active_support/duration.rb#444 def until(time = T.unsafe(nil)); end # Returns the value of attribute value. @@ -5066,25 +5079,28 @@ class ActiveSupport::Duration # @return [Boolean] # - # source://activesupport/lib/active_support/duration.rb#472 + # source://activesupport/lib/active_support/duration.rb#477 def variable?; end + # source://activesupport/lib/active_support/duration.rb#224 + def zero?(&_arg0); end + private - # source://activesupport/lib/active_support/duration.rb#507 - def method_missing(method, *args, &block); end + # source://activesupport/lib/active_support/duration.rb#512 + def method_missing(*_arg0, **_arg1, &_arg2); end # @raise [TypeError] # - # source://activesupport/lib/active_support/duration.rb#511 + # source://activesupport/lib/active_support/duration.rb#516 def raise_type_error(other); end # @return [Boolean] # - # source://activesupport/lib/active_support/duration.rb#503 + # source://activesupport/lib/active_support/duration.rb#508 def respond_to_missing?(method, _); end - # source://activesupport/lib/active_support/duration.rb#481 + # source://activesupport/lib/active_support/duration.rb#486 def sum(sign, time = T.unsafe(nil)); end class << self @@ -5268,20 +5284,19 @@ class ActiveSupport::Duration::ISO8601Serializer private - # source://activesupport/lib/active_support/duration/iso8601_serializer.rb#56 + # source://activesupport/lib/active_support/duration/iso8601_serializer.rb#55 def format_seconds(seconds); end # Return pair of duration's parts and whole duration sign. # Parts are summarized (as they can become repetitive due to addition, etc). # Zero parts are removed as not significant. - # If all parts are negative it will negate all of them and return minus as a sign. # - # source://activesupport/lib/active_support/duration/iso8601_serializer.rb#39 + # source://activesupport/lib/active_support/duration/iso8601_serializer.rb#38 def normalize; end # @return [Boolean] # - # source://activesupport/lib/active_support/duration/iso8601_serializer.rb#52 + # source://activesupport/lib/active_support/duration/iso8601_serializer.rb#51 def week_mixed_with_date?(parts); end end @@ -5424,7 +5439,7 @@ end class ActiveSupport::EncryptedConfiguration < ::ActiveSupport::EncryptedFile # @return [EncryptedConfiguration] a new instance of EncryptedConfiguration # - # source://activesupport/lib/active_support/encrypted_configuration.rb#48 + # source://activesupport/lib/active_support/encrypted_configuration.rb#54 def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:); end # Returns the decrypted content as a Hash with symbolized keys. @@ -5435,35 +5450,38 @@ class ActiveSupport::EncryptedConfiguration < ::ActiveSupport::EncryptedFile # my_config.config # # => { some_secret: 123, some_namespace: { another_secret: 789 } } # - # source://activesupport/lib/active_support/encrypted_configuration.rb#75 + # source://activesupport/lib/active_support/encrypted_configuration.rb#85 def config; end - # source://activesupport/lib/active_support/encrypted_configuration.rb#79 + # source://activesupport/lib/active_support/encrypted_configuration.rb#89 def inspect; end - # source://activesupport/lib/active_support/core_ext/module/delegation.rb#331 - def method_missing(method, *args, **_arg2, &block); end + # source://activesupport/lib/active_support/delegation.rb#187 + def method_missing(method, *_arg1, **_arg2, &_arg3); end # Reads the file and returns the decrypted content. See EncryptedFile#read. # - # source://activesupport/lib/active_support/encrypted_configuration.rb#56 + # source://activesupport/lib/active_support/encrypted_configuration.rb#62 def read; end - # source://activesupport/lib/active_support/encrypted_configuration.rb#63 + # source://activesupport/lib/active_support/encrypted_configuration.rb#69 def validate!; end private - # source://activesupport/lib/active_support/encrypted_configuration.rb#84 + # source://activesupport/lib/active_support/encrypted_configuration.rb#94 + def deep_symbolize_keys(hash); end + + # source://activesupport/lib/active_support/encrypted_configuration.rb#102 def deep_transform(hash); end - # source://activesupport/lib/active_support/encrypted_configuration.rb#98 + # source://activesupport/lib/active_support/encrypted_configuration.rb#116 def deserialize(content); end - # source://activesupport/lib/active_support/encrypted_configuration.rb#94 + # source://activesupport/lib/active_support/encrypted_configuration.rb#112 def options; end - # source://activesupport/lib/active_support/core_ext/module/delegation.rb#323 + # source://activesupport/lib/active_support/delegation.rb#179 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end @@ -5478,6 +5496,14 @@ class ActiveSupport::EncryptedConfiguration::InvalidContentError < ::RuntimeErro def message; end end +# source://activesupport/lib/active_support/encrypted_configuration.rb#46 +class ActiveSupport::EncryptedConfiguration::InvalidKeyError < ::RuntimeError + # @return [InvalidKeyError] a new instance of InvalidKeyError + # + # source://activesupport/lib/active_support/encrypted_configuration.rb#47 + def initialize(content_path, key); end +end + # source://activesupport/lib/active_support/encrypted_file.rb#8 class ActiveSupport::EncryptedFile # @return [EncryptedFile] a new instance of EncryptedFile @@ -5684,16 +5710,28 @@ ActiveSupport::EnvironmentInquirer::LOCAL_ENVIRONMENTS = T.let(T.unsafe(nil), Ar class ActiveSupport::ErrorReporter # @return [ErrorReporter] a new instance of ErrorReporter # - # source://activesupport/lib/active_support/error_reporter.rb#32 + # source://activesupport/lib/active_support/error_reporter.rb#35 def initialize(*subscribers, logger: T.unsafe(nil)); end + # Returns the value of attribute debug_mode. + # + # source://activesupport/lib/active_support/error_reporter.rb#31 + def debug_mode; end + + # Sets the attribute debug_mode + # + # @param value the value to set the attribute debug_mode to. + # + # source://activesupport/lib/active_support/error_reporter.rb#31 + def debug_mode=(_arg0); end + # Prevent a subscriber from being notified of errors for the # duration of the block. You may pass in the subscriber itself, or its class. # # This can be helpful for error reporting service integrations, when they wish # to handle any errors higher in the stack. # - # source://activesupport/lib/active_support/error_reporter.rb#147 + # source://activesupport/lib/active_support/error_reporter.rb#185 def disable(subscriber); end # Evaluates the given block, reporting and swallowing any unhandled error. @@ -5734,19 +5772,19 @@ class ActiveSupport::ErrorReporter # source of the error. Subscribers can use this value to ignore certain # errors. Defaults to "application". # - # source://activesupport/lib/active_support/error_reporter.rb#74 + # source://activesupport/lib/active_support/error_reporter.rb#78 def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil)); end # Returns the value of attribute logger. # - # source://activesupport/lib/active_support/error_reporter.rb#30 + # source://activesupport/lib/active_support/error_reporter.rb#31 def logger; end # Sets the attribute logger # # @param value the value to set the attribute logger to. # - # source://activesupport/lib/active_support/error_reporter.rb#30 + # source://activesupport/lib/active_support/error_reporter.rb#31 def logger=(_arg0); end # Evaluates the given block, reporting and re-raising any unhandled error. @@ -5778,7 +5816,7 @@ class ActiveSupport::ErrorReporter # source of the error. Subscribers can use this value to ignore certain # errors. Defaults to "application". # - # source://activesupport/lib/active_support/error_reporter.rb#110 + # source://activesupport/lib/active_support/error_reporter.rb#114 def record(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end # Report an error directly to subscribers. You can use this method when the @@ -5786,7 +5824,7 @@ class ActiveSupport::ErrorReporter # # Rails.error.report(error) # - # source://activesupport/lib/active_support/error_reporter.rb#172 + # source://activesupport/lib/active_support/error_reporter.rb#210 def report(error, handled: T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end # Update the execution context that is accessible to error subscribers. Any @@ -5795,7 +5833,7 @@ class ActiveSupport::ErrorReporter # # Rails.error.set_context(section: "checkout", user_id: @user.id) # - # source://activesupport/lib/active_support/error_reporter.rb#163 + # source://activesupport/lib/active_support/error_reporter.rb#201 def set_context(*_arg0, **_arg1, &_arg2); end # Register a new error subscriber. The subscriber must respond to @@ -5804,9 +5842,35 @@ class ActiveSupport::ErrorReporter # # The +report+ method should never raise an error. # - # source://activesupport/lib/active_support/error_reporter.rb#123 + # source://activesupport/lib/active_support/error_reporter.rb#161 def subscribe(subscriber); end + # Either report the given error when in production, or raise it when in development or test. + # + # When called in production, after the error is reported, this method will return + # nil and execution will continue. + # + # When called in development, the original error is wrapped in a different error class to ensure + # it's not being rescued higher in the stack and will be surfaced to the developer. + # + # This method is intended for reporting violated assertions about preconditions, or similar + # cases that can and should be gracefully handled in production, but that aren't supposed to happen. + # + # The error can be either an exception instance or a String. + # + # example: + # + # def edit + # if published? + # Rails.error.unexpected("[BUG] Attempting to edit a published article, that shouldn't be possible") + # return false + # end + # # ... + # end + # + # source://activesupport/lib/active_support/error_reporter.rb#145 + def unexpected(error, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end + # Unregister an error subscriber. Accepts either a subscriber or a class. # # subscriber = MyErrorSubscriber.new @@ -5816,16 +5880,27 @@ class ActiveSupport::ErrorReporter # # or # Rails.error.unsubscribe(MyErrorSubscriber) # - # source://activesupport/lib/active_support/error_reporter.rb#138 + # source://activesupport/lib/active_support/error_reporter.rb#176 def unsubscribe(subscriber); end + + private + + # source://activesupport/lib/active_support/error_reporter.rb#243 + def ensure_backtrace(error); end end +# source://activesupport/lib/active_support/error_reporter.rb#29 +ActiveSupport::ErrorReporter::DEFAULT_RESCUE = T.let(T.unsafe(nil), Array) + # source://activesupport/lib/active_support/error_reporter.rb#28 ActiveSupport::ErrorReporter::DEFAULT_SOURCE = T.let(T.unsafe(nil), String) # source://activesupport/lib/active_support/error_reporter.rb#27 ActiveSupport::ErrorReporter::SEVERITIES = T.let(T.unsafe(nil), Array) +# source://activesupport/lib/active_support/error_reporter.rb#33 +class ActiveSupport::ErrorReporter::UnexpectedError < ::Exception; end + # source://activesupport/lib/active_support/execution_context.rb#4 module ActiveSupport::ExecutionContext class << self @@ -5854,31 +5929,28 @@ module ActiveSupport::ExecutionContext end end -# source://activesupport/lib/active_support/execution_wrapper.rb#8 +# source://activesupport/lib/active_support/execution_wrapper.rb#7 class ActiveSupport::ExecutionWrapper include ::ActiveSupport::Callbacks extend ::ActiveSupport::Callbacks::ClassMethods extend ::ActiveSupport::DescendantsTracker - # source://activesupport/lib/active_support/callbacks.rb#70 + # source://activesupport/lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/lib/active_support/callbacks.rb#963 + # source://activesupport/lib/active_support/callbacks.rb#923 def _complete_callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#963 + # source://activesupport/lib/active_support/callbacks.rb#923 def _run_callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#951 + # source://activesupport/lib/active_support/callbacks.rb#911 def _run_complete_callbacks(&block); end - # source://activesupport/lib/active_support/callbacks.rb#951 + # source://activesupport/lib/active_support/callbacks.rb#911 def _run_run_callbacks(&block); end - # source://activesupport/lib/active_support/execution_wrapper.rb#142 + # source://activesupport/lib/active_support/execution_wrapper.rb#141 def complete; end # Complete this in-flight execution. This method *must* be called @@ -5886,54 +5958,51 @@ class ActiveSupport::ExecutionWrapper # # Where possible, prefer +wrap+. # - # source://activesupport/lib/active_support/execution_wrapper.rb#136 + # source://activesupport/lib/active_support/execution_wrapper.rb#135 def complete!; end - # source://activesupport/lib/active_support/execution_wrapper.rb#128 + # source://activesupport/lib/active_support/execution_wrapper.rb#127 def run; end - # source://activesupport/lib/active_support/execution_wrapper.rb#123 + # source://activesupport/lib/active_support/execution_wrapper.rb#122 def run!; end private - # source://activesupport/lib/active_support/execution_wrapper.rb#147 + # source://activesupport/lib/active_support/execution_wrapper.rb#146 def hook_state; end class << self - # source://activesupport/lib/active_support/callbacks.rb#70 + # source://activesupport/lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/lib/active_support/callbacks.rb#955 + # source://activesupport/lib/active_support/callbacks.rb#915 def _complete_callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#959 + # source://activesupport/lib/active_support/callbacks.rb#919 def _complete_callbacks=(value); end - # source://activesupport/lib/active_support/callbacks.rb#955 + # source://activesupport/lib/active_support/callbacks.rb#915 def _run_callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#959 + # source://activesupport/lib/active_support/callbacks.rb#919 def _run_callbacks=(value); end # @return [Boolean] # - # source://activesupport/lib/active_support/execution_wrapper.rb#119 + # source://activesupport/lib/active_support/execution_wrapper.rb#118 def active?; end - # source://activesupport/lib/active_support/execution_wrapper.rb#115 + # source://activesupport/lib/active_support/execution_wrapper.rb#114 def active_key; end - # source://activesupport/lib/active_support/execution_wrapper.rb#111 + # source://activesupport/lib/active_support/execution_wrapper.rb#110 def error_reporter; end - # source://activesupport/lib/active_support/execution_wrapper.rb#101 + # source://activesupport/lib/active_support/execution_wrapper.rb#100 def perform; end # Register an object to be invoked during both the +run+ and @@ -5945,7 +6014,7 @@ class ActiveSupport::ExecutionWrapper # a preceding +to_run+ block; all ordinary +to_complete+ blocks are # invoked in that situation.) # - # source://activesupport/lib/active_support/execution_wrapper.rb#51 + # source://activesupport/lib/active_support/execution_wrapper.rb#50 def register_hook(hook, outer: T.unsafe(nil)); end # Run this execution. @@ -5955,28 +6024,28 @@ class ActiveSupport::ExecutionWrapper # # Where possible, prefer +wrap+. # - # source://activesupport/lib/active_support/execution_wrapper.rb#67 + # source://activesupport/lib/active_support/execution_wrapper.rb#66 def run!(reset: T.unsafe(nil)); end - # source://activesupport/lib/active_support/execution_wrapper.rb#22 + # source://activesupport/lib/active_support/execution_wrapper.rb#21 def to_complete(*args, &block); end - # source://activesupport/lib/active_support/execution_wrapper.rb#18 + # source://activesupport/lib/active_support/execution_wrapper.rb#17 def to_run(*args, &block); end # Perform the work in the supplied block as an execution. # - # source://activesupport/lib/active_support/execution_wrapper.rb#87 + # source://activesupport/lib/active_support/execution_wrapper.rb#86 def wrap(source: T.unsafe(nil)); end end end -# source://activesupport/lib/active_support/execution_wrapper.rb#33 +# source://activesupport/lib/active_support/execution_wrapper.rb#32 class ActiveSupport::ExecutionWrapper::CompleteHook < ::Struct - # source://activesupport/lib/active_support/execution_wrapper.rb#34 + # source://activesupport/lib/active_support/execution_wrapper.rb#33 def after(target); end - # source://activesupport/lib/active_support/execution_wrapper.rb#34 + # source://activesupport/lib/active_support/execution_wrapper.rb#33 def before(target); end # Returns the value of attribute hook @@ -5999,12 +6068,12 @@ class ActiveSupport::ExecutionWrapper::CompleteHook < ::Struct end end -# source://activesupport/lib/active_support/execution_wrapper.rb#11 +# source://activesupport/lib/active_support/execution_wrapper.rb#10 ActiveSupport::ExecutionWrapper::Null = T.let(T.unsafe(nil), Object) -# source://activesupport/lib/active_support/execution_wrapper.rb#26 +# source://activesupport/lib/active_support/execution_wrapper.rb#25 class ActiveSupport::ExecutionWrapper::RunHook < ::Struct - # source://activesupport/lib/active_support/execution_wrapper.rb#27 + # source://activesupport/lib/active_support/execution_wrapper.rb#26 def before(target); end # Returns the value of attribute hook @@ -6128,41 +6197,22 @@ end # source://activesupport/lib/active_support/fork_tracker.rb#4 module ActiveSupport::ForkTracker class << self - # source://activesupport/lib/active_support/fork_tracker.rb#67 + # source://activesupport/lib/active_support/fork_tracker.rb#31 def after_fork(&block); end - # source://activesupport/lib/active_support/fork_tracker.rb#40 + # source://activesupport/lib/active_support/fork_tracker.rb#19 def after_fork_callback; end - # source://activesupport/lib/active_support/fork_tracker.rb#49 - def check!; end - - # source://activesupport/lib/active_support/fork_tracker.rb#56 + # source://activesupport/lib/active_support/fork_tracker.rb#27 def hook!; end - # source://activesupport/lib/active_support/fork_tracker.rb#72 + # source://activesupport/lib/active_support/fork_tracker.rb#36 def unregister(callback); end end end -# source://activesupport/lib/active_support/fork_tracker.rb#15 -module ActiveSupport::ForkTracker::CoreExt - # source://activesupport/lib/active_support/fork_tracker.rb#16 - def fork(*_arg0, **_arg1, &_arg2); end -end - -# source://activesupport/lib/active_support/fork_tracker.rb#31 -module ActiveSupport::ForkTracker::CoreExtPrivate - include ::ActiveSupport::ForkTracker::CoreExt - - private - - # source://activesupport/lib/active_support/fork_tracker.rb#16 - def fork(*_arg0, **_arg1, &_arg2); end -end - # source://activesupport/lib/active_support/fork_tracker.rb#5 -module ActiveSupport::ForkTracker::ModernCoreExt +module ActiveSupport::ForkTracker::CoreExt # source://activesupport/lib/active_support/fork_tracker.rb#6 def _fork; end end @@ -6551,6 +6601,9 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # source://activesupport/lib/active_support/hash_with_indifferent_access.rb#325 def to_options!; end + # source://activesupport/lib/active_support/hash_with_indifferent_access.rb#387 + def to_proc; end + # source://activesupport/lib/active_support/hash_with_indifferent_access.rb#344 def transform_keys(hash = T.unsafe(nil), &block); end @@ -6633,13 +6686,16 @@ class ActiveSupport::HashWithIndifferentAccess < ::Hash # source://activesupport/lib/active_support/hash_with_indifferent_access.rb#392 def convert_key(key); end - # source://activesupport/lib/active_support/hash_with_indifferent_access.rb#401 + # source://activesupport/lib/active_support/hash_with_indifferent_access.rb#396 def convert_value(value, conversion: T.unsafe(nil)); end - # source://activesupport/lib/active_support/hash_with_indifferent_access.rb#418 + # source://activesupport/lib/active_support/hash_with_indifferent_access.rb#409 + def convert_value_to_hash(value); end + + # source://activesupport/lib/active_support/hash_with_indifferent_access.rb#420 def set_defaults(target); end - # source://activesupport/lib/active_support/hash_with_indifferent_access.rb#426 + # source://activesupport/lib/active_support/hash_with_indifferent_access.rb#428 def update_with_single_argument(other_hash, block); end class << self @@ -6655,25 +6711,25 @@ ActiveSupport::HashWithIndifferentAccess::NOT_GIVEN = T.let(T.unsafe(nil), Objec module ActiveSupport::HtmlSafeTranslation extend ::ActiveSupport::HtmlSafeTranslation + # @return [Boolean] + # + # source://activesupport/lib/active_support/html_safe_translation.rb#30 + def html_safe_translation_key?(key); end + # source://activesupport/lib/active_support/html_safe_translation.rb#7 def translate(key, **options); end private - # source://activesupport/lib/active_support/html_safe_translation.rb#32 + # source://activesupport/lib/active_support/html_safe_translation.rb#35 def html_escape_translation_options(options); end - # source://activesupport/lib/active_support/html_safe_translation.rb#45 + # source://activesupport/lib/active_support/html_safe_translation.rb#48 def html_safe_translation(translation); end # @return [Boolean] # - # source://activesupport/lib/active_support/html_safe_translation.rb#28 - def html_safe_translation_key?(key); end - - # @return [Boolean] - # - # source://activesupport/lib/active_support/html_safe_translation.rb#40 + # source://activesupport/lib/active_support/html_safe_translation.rb#43 def i18n_option?(name); end end @@ -7329,62 +7385,97 @@ end # h.girl # => 'Mary' # h.boy # => 'John' # -# source://activesupport/lib/active_support/ordered_options.rb#93 +# source://activesupport/lib/active_support/ordered_options.rb#89 class ActiveSupport::InheritableOptions < ::ActiveSupport::OrderedOptions # @return [InheritableOptions] a new instance of InheritableOptions # - # source://activesupport/lib/active_support/ordered_options.rb#94 + # source://activesupport/lib/active_support/ordered_options.rb#90 def initialize(parent = T.unsafe(nil)); end - # source://activesupport/lib/active_support/ordered_options.rb#105 + # source://activesupport/lib/active_support/ordered_options.rb#107 + def ==(other); end + + # source://activesupport/lib/active_support/ordered_options.rb#142 + def each(&block); end + + # source://activesupport/lib/active_support/ordered_options.rb#134 def inheritable_copy; end + + # source://activesupport/lib/active_support/ordered_options.rb#111 + def inspect; end + + # @return [Boolean] + # + # source://activesupport/lib/active_support/ordered_options.rb#126 + def key?(key); end + + # @return [Boolean] + # + # source://activesupport/lib/active_support/ordered_options.rb#130 + def overridden?(key); end + + # source://activesupport/lib/active_support/ordered_options.rb#119 + def pretty_print(pp); end + + # source://activesupport/lib/active_support/ordered_options.rb#138 + def to_a; end + + # source://activesupport/lib/active_support/ordered_options.rb#103 + def to_h; end + + # source://activesupport/lib/active_support/ordered_options.rb#115 + def to_s; end + + private + + def own_key?(_arg0); end end -# source://activesupport/lib/active_support/isolated_execution_state.rb#6 +# source://activesupport/lib/active_support/isolated_execution_state.rb#5 module ActiveSupport::IsolatedExecutionState class << self - # source://activesupport/lib/active_support/isolated_execution_state.rb#37 + # source://activesupport/lib/active_support/isolated_execution_state.rb#36 def [](key); end - # source://activesupport/lib/active_support/isolated_execution_state.rb#41 + # source://activesupport/lib/active_support/isolated_execution_state.rb#40 def []=(key, value); end - # source://activesupport/lib/active_support/isolated_execution_state.rb#53 + # source://activesupport/lib/active_support/isolated_execution_state.rb#52 def clear; end - # source://activesupport/lib/active_support/isolated_execution_state.rb#57 + # source://activesupport/lib/active_support/isolated_execution_state.rb#56 def context; end - # source://activesupport/lib/active_support/isolated_execution_state.rb#49 + # source://activesupport/lib/active_support/isolated_execution_state.rb#48 def delete(key); end # Returns the value of attribute isolation_level. # - # source://activesupport/lib/active_support/isolated_execution_state.rb#13 + # source://activesupport/lib/active_support/isolated_execution_state.rb#12 def isolation_level; end - # source://activesupport/lib/active_support/isolated_execution_state.rb#15 + # source://activesupport/lib/active_support/isolated_execution_state.rb#14 def isolation_level=(level); end # @return [Boolean] # - # source://activesupport/lib/active_support/isolated_execution_state.rb#45 + # source://activesupport/lib/active_support/isolated_execution_state.rb#44 def key?(key); end # Returns the value of attribute scope. # - # source://activesupport/lib/active_support/isolated_execution_state.rb#13 + # source://activesupport/lib/active_support/isolated_execution_state.rb#12 def scope; end - # source://activesupport/lib/active_support/isolated_execution_state.rb#61 + # source://activesupport/lib/active_support/isolated_execution_state.rb#60 def share_with(other); end - # source://activesupport/lib/active_support/isolated_execution_state.rb#33 + # source://activesupport/lib/active_support/isolated_execution_state.rb#32 def unique_id; end private - # source://activesupport/lib/active_support/isolated_execution_state.rb#69 + # source://activesupport/lib/active_support/isolated_execution_state.rb#68 def state; end end end @@ -7707,52 +7798,52 @@ end # that all logs are flushed, and it is called in Rails::Rack::Logger after a # request finishes. # -# source://activesupport/lib/active_support/log_subscriber.rb#63 +# source://activesupport/lib/active_support/log_subscriber.rb#64 class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber # @return [LogSubscriber] a new instance of LogSubscriber # - # source://activesupport/lib/active_support/log_subscriber.rb#136 + # source://activesupport/lib/active_support/log_subscriber.rb#133 def initialize; end - # source://activesupport/lib/active_support/log_subscriber.rb#149 + # source://activesupport/lib/active_support/log_subscriber.rb#146 def call(event); end - # source://activesupport/lib/active_support/log_subscriber.rb#86 + # source://activesupport/lib/active_support/log_subscriber.rb#83 def colorize_logging; end - # source://activesupport/lib/active_support/log_subscriber.rb#86 + # source://activesupport/lib/active_support/log_subscriber.rb#83 def colorize_logging=(val); end - # source://activesupport/lib/active_support/log_subscriber.rb#166 + # source://activesupport/lib/active_support/log_subscriber.rb#163 def debug(progname = T.unsafe(nil), &block); end - # source://activesupport/lib/active_support/log_subscriber.rb#166 + # source://activesupport/lib/active_support/log_subscriber.rb#163 def error(progname = T.unsafe(nil), &block); end - # source://activesupport/lib/active_support/log_subscriber.rb#161 + # source://activesupport/lib/active_support/log_subscriber.rb#158 def event_levels=(_arg0); end - # source://activesupport/lib/active_support/log_subscriber.rb#166 + # source://activesupport/lib/active_support/log_subscriber.rb#163 def fatal(progname = T.unsafe(nil), &block); end - # source://activesupport/lib/active_support/log_subscriber.rb#166 + # source://activesupport/lib/active_support/log_subscriber.rb#163 def info(progname = T.unsafe(nil), &block); end - # source://activesupport/lib/active_support/log_subscriber.rb#141 + # source://activesupport/lib/active_support/log_subscriber.rb#138 def logger; end - # source://activesupport/lib/active_support/log_subscriber.rb#155 + # source://activesupport/lib/active_support/log_subscriber.rb#152 def publish_event(event); end # @return [Boolean] # - # source://activesupport/lib/active_support/log_subscriber.rb#145 + # source://activesupport/lib/active_support/log_subscriber.rb#142 def silenced?(event); end - # source://activesupport/lib/active_support/log_subscriber.rb#166 + # source://activesupport/lib/active_support/log_subscriber.rb#163 def unknown(progname = T.unsafe(nil), &block); end - # source://activesupport/lib/active_support/log_subscriber.rb#166 + # source://activesupport/lib/active_support/log_subscriber.rb#163 def warn(progname = T.unsafe(nil), &block); end private @@ -7761,105 +7852,97 @@ class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber # by specifying bold, italic, or underline options. Inspired by Highline, # this method will automatically clear formatting at the end of the returned String. # - # source://activesupport/lib/active_support/log_subscriber.rb#175 + # source://activesupport/lib/active_support/log_subscriber.rb#172 def color(text, color, mode_options = T.unsafe(nil)); end - # source://activesupport/lib/active_support/log_subscriber.rb#197 + # source://activesupport/lib/active_support/log_subscriber.rb#186 def log_exception(name, e); end - # source://activesupport/lib/active_support/log_subscriber.rb#183 + # source://activesupport/lib/active_support/log_subscriber.rb#180 def mode_from(options); end class << self - # source://activesupport/lib/active_support/log_subscriber.rb#102 + # source://activesupport/lib/active_support/log_subscriber.rb#99 def attach_to(*_arg0, **_arg1, &_arg2); end - # source://activesupport/lib/active_support/log_subscriber.rb#86 + # source://activesupport/lib/active_support/log_subscriber.rb#83 def colorize_logging; end - # source://activesupport/lib/active_support/log_subscriber.rb#86 + # source://activesupport/lib/active_support/log_subscriber.rb#83 def colorize_logging=(val); end # Flush all log_subscribers' logger. # - # source://activesupport/lib/active_support/log_subscriber.rb#115 + # source://activesupport/lib/active_support/log_subscriber.rb#112 def flush_all!; end - # source://activesupport/lib/active_support/log_subscriber.rb#87 + # source://activesupport/lib/active_support/class_attribute.rb#12 def log_levels; end - # source://activesupport/lib/active_support/log_subscriber.rb#87 - def log_levels=(value); end + # source://activesupport/lib/active_support/class_attribute.rb#15 + def log_levels=(new_value); end - # source://activesupport/lib/active_support/log_subscriber.rb#87 + # source://activesupport/lib/active_support/log_subscriber.rb#84 def log_levels?; end - # source://activesupport/lib/active_support/log_subscriber.rb#110 + # source://activesupport/lib/active_support/log_subscriber.rb#107 def log_subscribers; end - # source://activesupport/lib/active_support/log_subscriber.rb#96 + # source://activesupport/lib/active_support/log_subscriber.rb#93 def logger; end # Sets the attribute logger # # @param value the value to set the attribute logger to. # - # source://activesupport/lib/active_support/log_subscriber.rb#108 + # source://activesupport/lib/active_support/log_subscriber.rb#105 def logger=(_arg0); end private - # source://activesupport/lib/active_support/log_subscriber.rb#120 + # source://activesupport/lib/active_support/log_subscriber.rb#117 def fetch_public_methods(subscriber, inherit_all); end - # source://activesupport/lib/active_support/log_subscriber.rb#124 + # source://activesupport/lib/active_support/log_subscriber.rb#121 def set_event_levels; end - # source://activesupport/lib/active_support/log_subscriber.rb#130 + # source://activesupport/lib/active_support/log_subscriber.rb#127 def subscribe_log_level(method, level); end end end # ANSI sequence colors # -# source://activesupport/lib/active_support/log_subscriber.rb#77 +# source://activesupport/lib/active_support/log_subscriber.rb#74 ActiveSupport::LogSubscriber::BLACK = T.let(T.unsafe(nil), String) -# source://activesupport/lib/active_support/log_subscriber.rb#81 +# source://activesupport/lib/active_support/log_subscriber.rb#78 ActiveSupport::LogSubscriber::BLUE = T.let(T.unsafe(nil), String) -# source://activesupport/lib/active_support/log_subscriber.rb#66 -ActiveSupport::LogSubscriber::BOLD = T.let(T.unsafe(nil), ActiveSupport::Deprecation::DeprecatedObjectProxy) - -# Embed in a String to clear all previous ANSI sequences. -# -# source://activesupport/lib/active_support/log_subscriber.rb#65 -ActiveSupport::LogSubscriber::CLEAR = T.let(T.unsafe(nil), ActiveSupport::Deprecation::DeprecatedObjectProxy) - -# source://activesupport/lib/active_support/log_subscriber.rb#83 +# source://activesupport/lib/active_support/log_subscriber.rb#80 ActiveSupport::LogSubscriber::CYAN = T.let(T.unsafe(nil), String) -# source://activesupport/lib/active_support/log_subscriber.rb#79 +# source://activesupport/lib/active_support/log_subscriber.rb#76 ActiveSupport::LogSubscriber::GREEN = T.let(T.unsafe(nil), String) -# source://activesupport/lib/active_support/log_subscriber.rb#89 +# source://activesupport/lib/active_support/log_subscriber.rb#86 ActiveSupport::LogSubscriber::LEVEL_CHECKS = T.let(T.unsafe(nil), Hash) -# source://activesupport/lib/active_support/log_subscriber.rb#82 +# source://activesupport/lib/active_support/log_subscriber.rb#79 ActiveSupport::LogSubscriber::MAGENTA = T.let(T.unsafe(nil), String) # ANSI sequence modes # -# source://activesupport/lib/active_support/log_subscriber.rb#69 +# source://activesupport/lib/active_support/log_subscriber.rb#66 ActiveSupport::LogSubscriber::MODES = T.let(T.unsafe(nil), Hash) -# source://activesupport/lib/active_support/log_subscriber.rb#78 +# source://activesupport/lib/active_support/log_subscriber.rb#75 ActiveSupport::LogSubscriber::RED = T.let(T.unsafe(nil), String) -# source://activesupport/lib/active_support/log_subscriber.rb#84 +# source://activesupport/lib/active_support/log_subscriber.rb#81 ActiveSupport::LogSubscriber::WHITE = T.let(T.unsafe(nil), String) -# source://activesupport/lib/active_support/log_subscriber.rb#80 +# source://activesupport/lib/active_support/log_subscriber.rb#77 ActiveSupport::LogSubscriber::YELLOW = T.let(T.unsafe(nil), String) # source://activesupport/lib/active_support/logger.rb#8 @@ -7869,7 +7952,7 @@ class ActiveSupport::Logger < ::Logger # @return [Logger] a new instance of Logger # - # source://activesupport/lib/active_support/logger.rb#29 + # source://activesupport/lib/active_support/logger.rb#33 def initialize(*args, **kwargs); end # source://activesupport/lib/active_support/logger_silence.rb#12 @@ -7885,11 +7968,18 @@ class ActiveSupport::Logger < ::Logger # ActiveSupport::Logger.logger_outputs_to?(logger, STDOUT) # # => true # + # logger = Logger.new('/var/log/rails.log') + # ActiveSupport::Logger.logger_outputs_to?(logger, '/var/log/rails.log') + # # => true + # # @return [Boolean] # - # source://activesupport/lib/active_support/logger.rb#16 + # source://activesupport/lib/active_support/logger.rb#20 def logger_outputs_to?(logger, *sources); end + # source://activesupport/lib/active_support/logger.rb#47 + def normalize_sources(sources); end + # source://activesupport/lib/active_support/logger_silence.rb#12 def silencer; end @@ -7900,11 +7990,11 @@ end # Simple formatter which only displays the message. # -# source://activesupport/lib/active_support/logger.rb#35 +# source://activesupport/lib/active_support/logger.rb#39 class ActiveSupport::Logger::SimpleFormatter < ::Logger::Formatter # This method is invoked when a log event occurs # - # source://activesupport/lib/active_support/logger.rb#37 + # source://activesupport/lib/active_support/logger.rb#41 def call(severity, timestamp, progname, msg); end end @@ -7923,41 +8013,23 @@ end module ActiveSupport::LoggerThreadSafeLevel extend ::ActiveSupport::Concern - # source://activesupport/lib/active_support/logger_thread_safe_level.rb#12 - def debug?; end - - # source://activesupport/lib/active_support/logger_thread_safe_level.rb#12 - def error?; end - - # source://activesupport/lib/active_support/logger_thread_safe_level.rb#12 - def fatal?; end - - # source://activesupport/lib/active_support/logger_thread_safe_level.rb#12 - def info?; end - - # source://activesupport/lib/active_support/logger_thread_safe_level.rb#38 + # source://activesupport/lib/active_support/logger_thread_safe_level.rb#30 def level; end - # source://activesupport/lib/active_support/logger_thread_safe_level.rb#18 + # source://activesupport/lib/active_support/logger_thread_safe_level.rb#10 def local_level; end - # source://activesupport/lib/active_support/logger_thread_safe_level.rb#22 + # source://activesupport/lib/active_support/logger_thread_safe_level.rb#14 def local_level=(level); end # Change the thread-local level for the duration of the given block. # - # source://activesupport/lib/active_support/logger_thread_safe_level.rb#43 + # source://activesupport/lib/active_support/logger_thread_safe_level.rb#35 def log_at(level); end - # source://activesupport/lib/active_support/logger_thread_safe_level.rb#12 - def unknown?; end - - # source://activesupport/lib/active_support/logger_thread_safe_level.rb#12 - def warn?; end - private - # source://activesupport/lib/active_support/logger_thread_safe_level.rb#51 + # source://activesupport/lib/active_support/logger_thread_safe_level.rb#43 def local_level_key; end end @@ -8288,6 +8360,18 @@ end # self.current_user = User.find(id) # end # +# === Signing is not encryption +# +# The signed messages are not encrypted. The payload is merely encoded (Base64 by default) and can be decoded by +# anyone. The signature is just assuring that the message wasn't tampered with. For example: +# +# message = Rails.application.message_verifier('my_purpose').generate('never put secrets here') +# # => "BAhJIhtuZXZlciBwdXQgc2VjcmV0cyBoZXJlBjoGRVQ=--a0c1c0827919da5e949e989c971249355735e140" +# Base64.decode64(message.split("--").first) # no key needed +# # => 'never put secrets here' +# +# If you also need to encrypt the contents, you must use ActiveSupport::MessageEncryptor instead. +# # === Confine messages to a specific purpose # # It's not recommended to use the same verifier for different purposes in your application. @@ -8354,7 +8438,7 @@ end # # verifier.rotate(old_secret, digest: "SHA256", serializer: Marshal) # -# source://activesupport/lib/active_support/message_verifier.rb#98 +# source://activesupport/lib/active_support/message_verifier.rb#110 class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec include ::ActiveSupport::Messages::Rotator @@ -8412,7 +8496,7 @@ class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec # source://activesupport/lib/active_support/messages/rotator.rb#6 def initialize(*args, on_rotation: T.unsafe(nil), **options); end - # source://activesupport/lib/active_support/message_verifier.rb#296 + # source://activesupport/lib/active_support/message_verifier.rb#308 def create_message(value, **options); end # Generates a signed message for the provided value. @@ -8450,10 +8534,10 @@ class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec # specified when verifying the message; otherwise, verification will fail. # (See #verified and #verify.) # - # source://activesupport/lib/active_support/message_verifier.rb#292 + # source://activesupport/lib/active_support/message_verifier.rb#304 def generate(value, **options); end - # source://activesupport/lib/active_support/message_verifier.rb#304 + # source://activesupport/lib/active_support/message_verifier.rb#316 def inspect; end # source://activesupport/lib/active_support/messages/rotator.rb#23 @@ -8471,7 +8555,7 @@ class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec # # @return [Boolean] # - # source://activesupport/lib/active_support/message_verifier.rb#169 + # source://activesupport/lib/active_support/message_verifier.rb#181 def valid_message?(message); end # Decodes the signed message using the +MessageVerifier+'s secret. @@ -8511,7 +8595,7 @@ class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec # verifier.verified(message) # => "bye" # verifier.verified(message, purpose: "greeting") # => nil # - # source://activesupport/lib/active_support/message_verifier.rb#210 + # source://activesupport/lib/active_support/message_verifier.rb#222 def verified(message, **options); end # Decodes the signed message using the +MessageVerifier+'s secret. @@ -8542,44 +8626,44 @@ class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec # verifier.verify(message) # => "bye" # verifier.verify(message, purpose: "greeting") # => raises InvalidSignature # - # source://activesupport/lib/active_support/message_verifier.rb#248 + # source://activesupport/lib/active_support/message_verifier.rb#260 def verify(message, **options); end private - # source://activesupport/lib/active_support/message_verifier.rb#335 + # source://activesupport/lib/active_support/message_verifier.rb#347 def digest_length_in_hex; end # @return [Boolean] # - # source://activesupport/lib/active_support/message_verifier.rb#352 + # source://activesupport/lib/active_support/message_verifier.rb#364 def digest_matches_data?(digest, data); end - # source://activesupport/lib/active_support/message_verifier.rb#314 + # source://activesupport/lib/active_support/message_verifier.rb#326 def extract_encoded(signed); end - # source://activesupport/lib/active_support/message_verifier.rb#331 + # source://activesupport/lib/active_support/message_verifier.rb#343 def generate_digest(data); end # @return [Boolean] # - # source://activesupport/lib/active_support/message_verifier.rb#343 + # source://activesupport/lib/active_support/message_verifier.rb#355 def separator_at?(signed_message, index); end - # source://activesupport/lib/active_support/message_verifier.rb#347 + # source://activesupport/lib/active_support/message_verifier.rb#359 def separator_index_for(signed_message); end - # source://activesupport/lib/active_support/message_verifier.rb#309 + # source://activesupport/lib/active_support/message_verifier.rb#321 def sign_encoded(encoded); end end -# source://activesupport/lib/active_support/message_verifier.rb#101 +# source://activesupport/lib/active_support/message_verifier.rb#113 class ActiveSupport::MessageVerifier::InvalidSignature < ::StandardError; end -# source://activesupport/lib/active_support/message_verifier.rb#103 +# source://activesupport/lib/active_support/message_verifier.rb#115 ActiveSupport::MessageVerifier::SEPARATOR = T.let(T.unsafe(nil), String) -# source://activesupport/lib/active_support/message_verifier.rb#104 +# source://activesupport/lib/active_support/message_verifier.rb#116 ActiveSupport::MessageVerifier::SEPARATOR_LENGTH = T.let(T.unsafe(nil), Integer) # source://activesupport/lib/active_support/message_verifiers.rb#6 @@ -8633,11 +8717,11 @@ class ActiveSupport::Messages::Codec def use_message_serializer_for_metadata?; end class << self - # source://activesupport/lib/active_support/messages/codec.rb#12 + # source://activesupport/lib/active_support/class_attribute.rb#12 def default_serializer; end - # source://activesupport/lib/active_support/messages/codec.rb#12 - def default_serializer=(value); end + # source://activesupport/lib/active_support/class_attribute.rb#15 + def default_serializer=(new_value); end end end @@ -9066,7 +9150,7 @@ class ActiveSupport::Multibyte::Chars # Forward all undefined methods to the wrapped string. # # source://activesupport/lib/active_support/multibyte/chars.rb#62 - def method_missing(method, *args, &block); end + def method_missing(method, *_arg1, **_arg2, &_arg3); end # Reverses all characters in the string. # @@ -9217,6 +9301,16 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # You can consume those events and the information they provide by registering # a subscriber. # +# ActiveSupport::Notifications.subscribe('render') do |event| +# event.name # => "render" +# event.duration # => 10 (in milliseconds) +# event.payload # => { extra: :information } +# event.allocations # => 1826 (objects) +# end +# +# +Event+ objects record CPU time and allocations. If you don't need this +# it's also possible to pass a block that accepts five arguments: +# # ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| # name # => String, name of the event (such as 'render' from above) # start # => Time, when the instrumented block started execution @@ -9230,20 +9324,18 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # # ActiveSupport::Notifications.monotonic_subscribe('render') do |name, start, finish, id, payload| # name # => String, name of the event (such as 'render' from above) -# start # => Monotonic time, when the instrumented block started execution -# finish # => Monotonic time, when the instrumented block ended execution +# start # => Float, monotonic time when the instrumented block started execution +# finish # => Float, monotonic time when the instrumented block ended execution # id # => String, unique ID for the instrumenter that fired the event # payload # => Hash, the payload # end # -# The +start+ and +finish+ values above represent monotonic time. -# # For instance, let's store all "render" events in an array: # # events = [] # -# ActiveSupport::Notifications.subscribe('render') do |*args| -# events << ActiveSupport::Notifications::Event.new(*args) +# ActiveSupport::Notifications.subscribe('render') do |event| +# events << event # end # # That code returns right away, you are just subscribing to "render" events. @@ -9254,14 +9346,10 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # end # # event = events.first -# event.name # => "render" -# event.duration # => 10 (in milliseconds) -# event.payload # => { extra: :information } -# -# The block in the subscribe call gets the name of the event, start -# timestamp, end timestamp, a string with a unique identifier for that event's instrumenter -# (something like "535801666f04d0298cd6"), and a hash with the payload, in -# that order. +# event.name # => "render" +# event.duration # => 10 (in milliseconds) +# event.payload # => { extra: :information } +# event.allocations # => 1826 (objects) # # If an exception happens during that particular instrumentation the payload will # have a key :exception with an array of two elements as value: a string with @@ -9326,7 +9414,7 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # You can subscribe to some event temporarily while some block runs. For # example, in # -# callback = lambda {|*args| ... } +# callback = lambda {|event| ... } # ActiveSupport::Notifications.subscribed(callback, "sql.active_record") do # ... # end @@ -9349,7 +9437,7 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # # The +subscribe+ method returns a subscriber object: # -# subscriber = ActiveSupport::Notifications.subscribe("render") do |*args| +# subscriber = ActiveSupport::Notifications.subscribe("render") do |event| # ... # end # @@ -9380,10 +9468,10 @@ ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String # source://activesupport/lib/active_support/notifications/instrumenter.rb#7 module ActiveSupport::Notifications class << self - # source://activesupport/lib/active_support/notifications.rb#204 + # source://activesupport/lib/active_support/notifications.rb#208 def instrument(name, payload = T.unsafe(nil)); end - # source://activesupport/lib/active_support/notifications.rb#268 + # source://activesupport/lib/active_support/notifications.rb#269 def instrumenter; end # Performs the same functionality as #subscribe, but the +start+ and @@ -9393,25 +9481,25 @@ module ActiveSupport::Notifications # duration is important. For example, computing elapsed time between # two events. # - # source://activesupport/lib/active_support/notifications.rb#253 + # source://activesupport/lib/active_support/notifications.rb#254 def monotonic_subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end # Returns the value of attribute notifier. # - # source://activesupport/lib/active_support/notifications.rb#194 + # source://activesupport/lib/active_support/notifications.rb#198 def notifier; end # Sets the attribute notifier # # @param value the value to set the attribute notifier to. # - # source://activesupport/lib/active_support/notifications.rb#194 + # source://activesupport/lib/active_support/notifications.rb#198 def notifier=(_arg0); end - # source://activesupport/lib/active_support/notifications.rb#196 + # source://activesupport/lib/active_support/notifications.rb#200 def publish(name, *args); end - # source://activesupport/lib/active_support/notifications.rb#200 + # source://activesupport/lib/active_support/notifications.rb#204 def publish_event(event); end # Subscribe to a given event name with the passed +block+. @@ -9419,11 +9507,15 @@ module ActiveSupport::Notifications # You can subscribe to events by passing a String to match exact event # names, or by passing a Regexp to match all events that match a pattern. # - # ActiveSupport::Notifications.subscribe(/render/) do |*args| - # @event = ActiveSupport::Notifications::Event.new(*args) + # If the block passed to the method only takes one argument, + # it will yield an +Event+ object to the block: + # + # ActiveSupport::Notifications.subscribe(/render/) do |event| + # @event = event # end # - # The +block+ will receive five parameters with information about the event: + # Otherwise the +block+ will receive five arguments with information + # about the event: # # ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| # name # => String, name of the event (such as 'render' from above) @@ -9433,30 +9525,23 @@ module ActiveSupport::Notifications # payload # => Hash, the payload # end # - # If the block passed to the method only takes one parameter, - # it will yield an event object to the block: - # - # ActiveSupport::Notifications.subscribe(/render/) do |event| - # @event = event - # end - # # Raises an error if invalid event name type is passed: # - # ActiveSupport::Notifications.subscribe(:render) {|*args| ...} + # ActiveSupport::Notifications.subscribe(:render) {|event| ...} # #=> ArgumentError (pattern must be specified as a String, Regexp or empty) # - # source://activesupport/lib/active_support/notifications.rb#243 + # source://activesupport/lib/active_support/notifications.rb#244 def subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end - # source://activesupport/lib/active_support/notifications.rb#257 + # source://activesupport/lib/active_support/notifications.rb#258 def subscribed(callback, pattern = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end - # source://activesupport/lib/active_support/notifications.rb#264 + # source://activesupport/lib/active_support/notifications.rb#265 def unsubscribe(subscriber_or_name); end private - # source://activesupport/lib/active_support/notifications.rb#273 + # source://activesupport/lib/active_support/notifications.rb#274 def registry; end end end @@ -9471,23 +9556,20 @@ class ActiveSupport::Notifications::Event # Returns the number of allocations made between the call to #start! and # the call to #finish!. # - # source://activesupport/lib/active_support/notifications/instrumenter.rb#164 + # source://activesupport/lib/active_support/notifications/instrumenter.rb#176 def allocations; end - # source://activesupport/lib/active_support/notifications/instrumenter.rb#168 - def children; end - # Returns the CPU time (in milliseconds) passed between the call to # #start! and the call to #finish!. # - # source://activesupport/lib/active_support/notifications/instrumenter.rb#151 + # source://activesupport/lib/active_support/notifications/instrumenter.rb#163 def cpu_time; end # Returns the difference in milliseconds between when the execution of the # event started and when it ended. # - # ActiveSupport::Notifications.subscribe('wait') do |*args| - # @event = ActiveSupport::Notifications::Event.new(*args) + # ActiveSupport::Notifications.subscribe('wait') do |event| + # @event = event # end # # ActiveSupport::Notifications.instrument('wait') do @@ -9496,23 +9578,27 @@ class ActiveSupport::Notifications::Event # # @event.duration # => 1000.138 # - # source://activesupport/lib/active_support/notifications/instrumenter.rb#197 + # source://activesupport/lib/active_support/notifications/instrumenter.rb#198 def duration; end - # Returns the value of attribute end. - # - # source://activesupport/lib/active_support/notifications/instrumenter.rb#107 + # source://activesupport/lib/active_support/notifications/instrumenter.rb#128 def end; end # Record information at the time this event finishes # - # source://activesupport/lib/active_support/notifications/instrumenter.rb#143 + # source://activesupport/lib/active_support/notifications/instrumenter.rb#154 def finish!; end + # Returns the time spent in GC (in milliseconds) between the call to #start! + # and the call to #finish! + # + # source://activesupport/lib/active_support/notifications/instrumenter.rb#182 + def gc_time; end + # Returns the idle time time (in milliseconds) passed between the call to # #start! and the call to #finish!. # - # source://activesupport/lib/active_support/notifications/instrumenter.rb#157 + # source://activesupport/lib/active_support/notifications/instrumenter.rb#169 def idle_time; end # Returns the value of attribute name. @@ -9520,11 +9606,6 @@ class ActiveSupport::Notifications::Event # source://activesupport/lib/active_support/notifications/instrumenter.rb#107 def name; end - # @return [Boolean] - # - # source://activesupport/lib/active_support/notifications/instrumenter.rb#176 - def parent_of?(event); end - # Returns the value of attribute payload. # # source://activesupport/lib/active_support/notifications/instrumenter.rb#108 @@ -9537,17 +9618,15 @@ class ActiveSupport::Notifications::Event # source://activesupport/lib/active_support/notifications/instrumenter.rb#108 def payload=(_arg0); end - # source://activesupport/lib/active_support/notifications/instrumenter.rb#122 + # source://activesupport/lib/active_support/notifications/instrumenter.rb#132 def record; end # Record information at the time this event starts # - # source://activesupport/lib/active_support/notifications/instrumenter.rb#136 + # source://activesupport/lib/active_support/notifications/instrumenter.rb#146 def start!; end - # Returns the value of attribute time. - # - # source://activesupport/lib/active_support/notifications/instrumenter.rb#107 + # source://activesupport/lib/active_support/notifications/instrumenter.rb#124 def time; end # Returns the value of attribute transaction_id. @@ -9557,16 +9636,19 @@ class ActiveSupport::Notifications::Event private - # source://activesupport/lib/active_support/notifications/instrumenter.rb#202 + # source://activesupport/lib/active_support/notifications/instrumenter.rb#203 def now; end # Likely on JRuby, TruffleRuby # - # source://activesupport/lib/active_support/notifications/instrumenter.rb#219 + # source://activesupport/lib/active_support/notifications/instrumenter.rb#230 def now_allocations; end - # source://activesupport/lib/active_support/notifications/instrumenter.rb#209 + # source://activesupport/lib/active_support/notifications/instrumenter.rb#210 def now_cpu; end + + # source://activesupport/lib/active_support/notifications/instrumenter.rb#220 + def now_gc; end end # This is a default queue implementation that ships with Notifications. @@ -9574,120 +9656,104 @@ end # # This class is thread safe. All methods are reentrant. # -# source://activesupport/lib/active_support/notifications/fanout.rb#51 +# source://activesupport/lib/active_support/notifications/fanout.rb#50 class ActiveSupport::Notifications::Fanout - include ::Mutex_m include ::ActiveSupport::Notifications::FanoutIteration # @return [Fanout] a new instance of Fanout # - # source://activesupport/lib/active_support/notifications/fanout.rb#54 + # source://activesupport/lib/active_support/notifications/fanout.rb#51 def initialize; end - # source://activesupport/lib/active_support/notifications/fanout.rb#301 + # source://activesupport/lib/active_support/notifications/fanout.rb#298 def all_listeners_for(name); end - # source://activesupport/lib/active_support/notifications/fanout.rb#276 + # source://activesupport/lib/active_support/notifications/fanout.rb#273 def build_handle(name, id, payload); end - # source://activesupport/lib/active_support/notifications/fanout.rb#105 + # source://activesupport/lib/active_support/notifications/fanout.rb#102 def clear_cache(key = T.unsafe(nil)); end - # source://activesupport/lib/active_support/notifications/fanout.rb#287 + # source://activesupport/lib/active_support/notifications/fanout.rb#284 def finish(name, id, payload, listeners = T.unsafe(nil)); end - # source://activesupport/lib/active_support/notifications/fanout.rb#191 + # source://activesupport/lib/active_support/notifications/fanout.rb#188 def groups_for(name); end - # source://activesupport/lib/active_support/notifications/fanout.rb#63 + # source://activesupport/lib/active_support/notifications/fanout.rb#60 def inspect; end - # source://activesupport/lib/active_support/notifications/fanout.rb#310 + # source://activesupport/lib/active_support/notifications/fanout.rb#307 def listeners_for(name); end # @return [Boolean] # - # source://activesupport/lib/active_support/notifications/fanout.rb#314 + # source://activesupport/lib/active_support/notifications/fanout.rb#311 def listening?(name); end - # source://mutex_m/0.2.0lib/mutex_m.rb#91 - def lock; end - - # source://mutex_m/0.2.0lib/mutex_m.rb#81 - def locked?; end - - # source://activesupport/lib/active_support/notifications/fanout.rb#293 + # source://activesupport/lib/active_support/notifications/fanout.rb#290 def publish(name, *args); end - # source://activesupport/lib/active_support/notifications/fanout.rb#297 + # source://activesupport/lib/active_support/notifications/fanout.rb#294 def publish_event(event); end - # source://activesupport/lib/active_support/notifications/fanout.rb#280 + # source://activesupport/lib/active_support/notifications/fanout.rb#277 def start(name, id, payload); end - # source://activesupport/lib/active_support/notifications/fanout.rb#68 + # source://activesupport/lib/active_support/notifications/fanout.rb#65 def subscribe(pattern = T.unsafe(nil), callable = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end - # source://mutex_m/0.2.0lib/mutex_m.rb#76 - def synchronize(&block); end - - # source://mutex_m/0.2.0lib/mutex_m.rb#86 - def try_lock; end - - # source://mutex_m/0.2.0lib/mutex_m.rb#96 - def unlock; end - - # source://activesupport/lib/active_support/notifications/fanout.rb#85 + # source://activesupport/lib/active_support/notifications/fanout.rb#82 def unsubscribe(subscriber_or_name); end # This is a sync queue, so there is no waiting. # - # source://activesupport/lib/active_support/notifications/fanout.rb#319 + # source://activesupport/lib/active_support/notifications/fanout.rb#316 def wait; end end -# source://activesupport/lib/active_support/notifications/fanout.rb#117 +# source://activesupport/lib/active_support/notifications/fanout.rb#114 class ActiveSupport::Notifications::Fanout::BaseGroup include ::ActiveSupport::Notifications::FanoutIteration # @return [BaseGroup] a new instance of BaseGroup # - # source://activesupport/lib/active_support/notifications/fanout.rb#120 + # source://activesupport/lib/active_support/notifications/fanout.rb#117 def initialize(listeners, name, id, payload); end - # source://activesupport/lib/active_support/notifications/fanout.rb#124 + # source://activesupport/lib/active_support/notifications/fanout.rb#121 def each(&block); end end -# source://activesupport/lib/active_support/notifications/fanout.rb#129 +# source://activesupport/lib/active_support/notifications/fanout.rb#126 class ActiveSupport::Notifications::Fanout::BaseTimeGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup - # source://activesupport/lib/active_support/notifications/fanout.rb#134 + # source://activesupport/lib/active_support/notifications/fanout.rb#131 def finish(name, id, payload); end - # source://activesupport/lib/active_support/notifications/fanout.rb#130 + # source://activesupport/lib/active_support/notifications/fanout.rb#127 def start(name, id, payload); end end -# source://activesupport/lib/active_support/notifications/fanout.rb#170 +# source://activesupport/lib/active_support/notifications/fanout.rb#167 class ActiveSupport::Notifications::Fanout::EventObjectGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup - # source://activesupport/lib/active_support/notifications/fanout.rb#176 + # source://activesupport/lib/active_support/notifications/fanout.rb#173 def finish(name, id, payload); end - # source://activesupport/lib/active_support/notifications/fanout.rb#171 + # source://activesupport/lib/active_support/notifications/fanout.rb#168 def start(name, id, payload); end private - # source://activesupport/lib/active_support/notifications/fanout.rb#186 + # source://activesupport/lib/active_support/notifications/fanout.rb#183 def build_event(name, id, payload); end end -# source://activesupport/lib/active_support/notifications/fanout.rb#156 +# source://activesupport/lib/active_support/notifications/fanout.rb#153 class ActiveSupport::Notifications::Fanout::EventedGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup - # source://activesupport/lib/active_support/notifications/fanout.rb#163 + # source://activesupport/lib/active_support/notifications/fanout.rb#160 def finish(name, id, payload); end - # source://activesupport/lib/active_support/notifications/fanout.rb#157 + # source://activesupport/lib/active_support/notifications/fanout.rb#154 def start(name, id, payload); end end @@ -9706,179 +9772,179 @@ end # handle.finish # end # -# source://activesupport/lib/active_support/notifications/fanout.rb#231 +# source://activesupport/lib/active_support/notifications/fanout.rb#228 class ActiveSupport::Notifications::Fanout::Handle include ::ActiveSupport::Notifications::FanoutIteration # @return [Handle] a new instance of Handle # - # source://activesupport/lib/active_support/notifications/fanout.rb#234 + # source://activesupport/lib/active_support/notifications/fanout.rb#231 def initialize(notifier, name, id, payload); end - # source://activesupport/lib/active_support/notifications/fanout.rb#253 + # source://activesupport/lib/active_support/notifications/fanout.rb#250 def finish; end - # source://activesupport/lib/active_support/notifications/fanout.rb#257 + # source://activesupport/lib/active_support/notifications/fanout.rb#254 def finish_with_values(name, id, payload); end - # source://activesupport/lib/active_support/notifications/fanout.rb#244 + # source://activesupport/lib/active_support/notifications/fanout.rb#241 def start; end private - # source://activesupport/lib/active_support/notifications/fanout.rb#267 + # source://activesupport/lib/active_support/notifications/fanout.rb#264 def ensure_state!(expected); end end -# source://activesupport/lib/active_support/notifications/fanout.rb#142 +# source://activesupport/lib/active_support/notifications/fanout.rb#139 class ActiveSupport::Notifications::Fanout::MonotonicTimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup private - # source://activesupport/lib/active_support/notifications/fanout.rb#144 + # source://activesupport/lib/active_support/notifications/fanout.rb#141 def now; end end -# source://activesupport/lib/active_support/notifications/fanout.rb#322 +# source://activesupport/lib/active_support/notifications/fanout.rb#319 module ActiveSupport::Notifications::Fanout::Subscribers class << self - # source://activesupport/lib/active_support/notifications/fanout.rb#323 + # source://activesupport/lib/active_support/notifications/fanout.rb#320 def new(pattern, listener, monotonic); end end end -# source://activesupport/lib/active_support/notifications/fanout.rb#437 +# source://activesupport/lib/active_support/notifications/fanout.rb#434 class ActiveSupport::Notifications::Fanout::Subscribers::EventObject < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - # source://activesupport/lib/active_support/notifications/fanout.rb#438 + # source://activesupport/lib/active_support/notifications/fanout.rb#435 def group_class; end - # source://activesupport/lib/active_support/notifications/fanout.rb#442 + # source://activesupport/lib/active_support/notifications/fanout.rb#439 def publish_event(event); end end -# source://activesupport/lib/active_support/notifications/fanout.rb#379 +# source://activesupport/lib/active_support/notifications/fanout.rb#376 class ActiveSupport::Notifications::Fanout::Subscribers::Evented # @return [Evented] a new instance of Evented # - # source://activesupport/lib/active_support/notifications/fanout.rb#382 + # source://activesupport/lib/active_support/notifications/fanout.rb#379 def initialize(pattern, delegate); end # Returns the value of attribute delegate. # - # source://activesupport/lib/active_support/notifications/fanout.rb#380 + # source://activesupport/lib/active_support/notifications/fanout.rb#377 def delegate; end - # source://activesupport/lib/active_support/notifications/fanout.rb#390 + # source://activesupport/lib/active_support/notifications/fanout.rb#387 def group_class; end # Returns the value of attribute pattern. # - # source://activesupport/lib/active_support/notifications/fanout.rb#380 + # source://activesupport/lib/active_support/notifications/fanout.rb#377 def pattern; end - # source://activesupport/lib/active_support/notifications/fanout.rb#394 + # source://activesupport/lib/active_support/notifications/fanout.rb#391 def publish(name, *args); end - # source://activesupport/lib/active_support/notifications/fanout.rb#400 + # source://activesupport/lib/active_support/notifications/fanout.rb#397 def publish_event(event); end # Returns the value of attribute silenceable. # - # source://activesupport/lib/active_support/notifications/fanout.rb#380 + # source://activesupport/lib/active_support/notifications/fanout.rb#377 def silenceable; end # @return [Boolean] # - # source://activesupport/lib/active_support/notifications/fanout.rb#408 + # source://activesupport/lib/active_support/notifications/fanout.rb#405 def silenced?(name); end # @return [Boolean] # - # source://activesupport/lib/active_support/notifications/fanout.rb#412 + # source://activesupport/lib/active_support/notifications/fanout.rb#409 def subscribed_to?(name); end - # source://activesupport/lib/active_support/notifications/fanout.rb#416 + # source://activesupport/lib/active_support/notifications/fanout.rb#413 def unsubscribe!(name); end end -# source://activesupport/lib/active_support/notifications/fanout.rb#342 +# source://activesupport/lib/active_support/notifications/fanout.rb#339 class ActiveSupport::Notifications::Fanout::Subscribers::Matcher # @return [Matcher] a new instance of Matcher # - # source://activesupport/lib/active_support/notifications/fanout.rb#355 + # source://activesupport/lib/active_support/notifications/fanout.rb#352 def initialize(pattern); end - # source://activesupport/lib/active_support/notifications/fanout.rb#364 + # source://activesupport/lib/active_support/notifications/fanout.rb#361 def ===(name); end # Returns the value of attribute exclusions. # - # source://activesupport/lib/active_support/notifications/fanout.rb#343 + # source://activesupport/lib/active_support/notifications/fanout.rb#340 def exclusions; end # Returns the value of attribute pattern. # - # source://activesupport/lib/active_support/notifications/fanout.rb#343 + # source://activesupport/lib/active_support/notifications/fanout.rb#340 def pattern; end - # source://activesupport/lib/active_support/notifications/fanout.rb#360 + # source://activesupport/lib/active_support/notifications/fanout.rb#357 def unsubscribe!(name); end class << self - # source://activesupport/lib/active_support/notifications/fanout.rb#345 + # source://activesupport/lib/active_support/notifications/fanout.rb#342 def wrap(pattern); end end end -# source://activesupport/lib/active_support/notifications/fanout.rb#368 +# source://activesupport/lib/active_support/notifications/fanout.rb#365 class ActiveSupport::Notifications::Fanout::Subscribers::Matcher::AllMessages - # source://activesupport/lib/active_support/notifications/fanout.rb#369 + # source://activesupport/lib/active_support/notifications/fanout.rb#366 def ===(name); end - # source://activesupport/lib/active_support/notifications/fanout.rb#373 + # source://activesupport/lib/active_support/notifications/fanout.rb#370 def unsubscribe!(*_arg0); end end -# source://activesupport/lib/active_support/notifications/fanout.rb#431 +# source://activesupport/lib/active_support/notifications/fanout.rb#428 class ActiveSupport::Notifications::Fanout::Subscribers::MonotonicTimed < ::ActiveSupport::Notifications::Fanout::Subscribers::Timed - # source://activesupport/lib/active_support/notifications/fanout.rb#432 + # source://activesupport/lib/active_support/notifications/fanout.rb#429 def group_class; end end -# source://activesupport/lib/active_support/notifications/fanout.rb#421 +# source://activesupport/lib/active_support/notifications/fanout.rb#418 class ActiveSupport::Notifications::Fanout::Subscribers::Timed < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - # source://activesupport/lib/active_support/notifications/fanout.rb#422 + # source://activesupport/lib/active_support/notifications/fanout.rb#419 def group_class; end - # source://activesupport/lib/active_support/notifications/fanout.rb#426 + # source://activesupport/lib/active_support/notifications/fanout.rb#423 def publish(name, *args); end end -# source://activesupport/lib/active_support/notifications/fanout.rb#149 +# source://activesupport/lib/active_support/notifications/fanout.rb#146 class ActiveSupport::Notifications::Fanout::TimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup private - # source://activesupport/lib/active_support/notifications/fanout.rb#151 + # source://activesupport/lib/active_support/notifications/fanout.rb#148 def now; end end -# source://activesupport/lib/active_support/notifications/fanout.rb#20 +# source://activesupport/lib/active_support/notifications/fanout.rb#19 module ActiveSupport::Notifications::FanoutIteration private - # source://activesupport/lib/active_support/notifications/fanout.rb#22 + # source://activesupport/lib/active_support/notifications/fanout.rb#21 def iterate_guarding_exceptions(collection); end end -# source://activesupport/lib/active_support/notifications/fanout.rb#10 +# source://activesupport/lib/active_support/notifications/fanout.rb#9 class ActiveSupport::Notifications::InstrumentationSubscriberError < ::RuntimeError # @return [InstrumentationSubscriberError] a new instance of InstrumentationSubscriberError # - # source://activesupport/lib/active_support/notifications/fanout.rb#13 + # source://activesupport/lib/active_support/notifications/fanout.rb#12 def initialize(exceptions); end # Returns the value of attribute exceptions. # - # source://activesupport/lib/active_support/notifications/fanout.rb#11 + # source://activesupport/lib/active_support/notifications/fanout.rb#10 def exceptions; end end @@ -9971,7 +10037,30 @@ class ActiveSupport::Notifications::Instrumenter::LegacyHandle::Wrapper def start(*_arg0, **_arg1, &_arg2); end end -# source://activesupport/lib/active_support/number_helper.rb#4 +# = Number Helper +# +# Provides methods for formatting numbers into currencies, percentages, +# phone numbers, and more. +# +# Example usage in a class: +# class Topic +# include ActiveSupport::NumberHelper +# +# def price +# number_to_currency(@price) +# end +# end +# +# Example usage in a module: +# require "active_support/number_helper" +# +# module NumberFormatting +# def format_price(price) +# ActiveSupport::NumberHelper.number_to_currency(price) +# end +# end +# +# source://activesupport/lib/active_support/number_helper.rb#26 module ActiveSupport::NumberHelper extend ::ActiveSupport::Autoload extend ::ActiveSupport::NumberHelper @@ -10045,7 +10134,7 @@ module ActiveSupport::NumberHelper # number_to_currency(1234567890.50, strip_insignificant_zeros: true) # # => "$1,234,567,890.5" # - # source://activesupport/lib/active_support/number_helper.rb#139 + # source://activesupport/lib/active_support/number_helper.rb#161 def number_to_currency(number, options = T.unsafe(nil)); end # Formats +number+ by grouping thousands with a delimiter. @@ -10085,7 +10174,7 @@ module ActiveSupport::NumberHelper # number_to_delimited("123456.78", delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) # # => "1,23,456.78" # - # source://activesupport/lib/active_support/number_helper.rb#242 + # source://activesupport/lib/active_support/number_helper.rb#264 def number_to_delimited(number, options = T.unsafe(nil)); end # Formats +number+ into a more human-friendly representation. Useful for @@ -10186,7 +10275,7 @@ module ActiveSupport::NumberHelper # number_to_human(0.1, units: :distance) # => "10 centimeters" # number_to_human(0.01, units: :distance) # => "1 centimeter" # - # source://activesupport/lib/active_support/number_helper.rb#453 + # source://activesupport/lib/active_support/number_helper.rb#475 def number_to_human(number, options = T.unsafe(nil)); end # Formats +number+ as bytes into a more human-friendly representation. @@ -10238,7 +10327,7 @@ module ActiveSupport::NumberHelper # Whether to remove insignificant zeros after the decimal separator. # Defaults to true. # - # source://activesupport/lib/active_support/number_helper.rb#351 + # source://activesupport/lib/active_support/number_helper.rb#373 def number_to_human_size(number, options = T.unsafe(nil)); end # Formats +number+ as a percentage string. @@ -10299,7 +10388,7 @@ module ActiveSupport::NumberHelper # number_to_percentage(100, format: "%n %") # # => "100.000 %" # - # source://activesupport/lib/active_support/number_helper.rb#201 + # source://activesupport/lib/active_support/number_helper.rb#223 def number_to_percentage(number, options = T.unsafe(nil)); end # Formats +number+ into a phone number. @@ -10347,7 +10436,7 @@ module ActiveSupport::NumberHelper # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) # # => "(755) 6123-4567" # - # source://activesupport/lib/active_support/number_helper.rb#66 + # source://activesupport/lib/active_support/number_helper.rb#88 def number_to_phone(number, options = T.unsafe(nil)); end # Formats +number+ to a specific level of precision. @@ -10402,7 +10491,7 @@ module ActiveSupport::NumberHelper # number_to_rounded(12.34, strip_insignificant_zeros: true) # => "12.34" # number_to_rounded(12.3456, strip_insignificant_zeros: true) # => "12.346" # - # source://activesupport/lib/active_support/number_helper.rb#298 + # source://activesupport/lib/active_support/number_helper.rb#320 def number_to_rounded(number, options = T.unsafe(nil)); end end @@ -10474,20 +10563,20 @@ class ActiveSupport::NumberHelper::NumberConverter # source://activesupport/lib/active_support/number_helper/number_converter.rb#120 def convert(number, options); end - # source://activesupport/lib/active_support/number_helper/number_converter.rb#14 + # source://activesupport/lib/active_support/class_attribute.rb#12 def namespace; end - # source://activesupport/lib/active_support/number_helper/number_converter.rb#14 - def namespace=(value); end + # source://activesupport/lib/active_support/class_attribute.rb#15 + def namespace=(new_value); end # source://activesupport/lib/active_support/number_helper/number_converter.rb#14 def namespace?; end - # source://activesupport/lib/active_support/number_helper/number_converter.rb#17 + # source://activesupport/lib/active_support/class_attribute.rb#12 def validate_float; end - # source://activesupport/lib/active_support/number_helper/number_converter.rb#17 - def validate_float=(value); end + # source://activesupport/lib/active_support/class_attribute.rb#15 + def validate_float=(new_value); end # source://activesupport/lib/active_support/number_helper/number_converter.rb#17 def validate_float?; end @@ -10511,8 +10600,11 @@ class ActiveSupport::NumberHelper::NumberToCurrencyConverter < ::ActiveSupport:: def options; end class << self - # source://activesupport/lib/active_support/number_helper/number_converter.rb#14 + # source://activesupport/lib/active_support/class_attribute.rb#12 def namespace; end + + # source://activesupport/lib/active_support/class_attribute.rb#15 + def namespace=(new_value); end end end @@ -10530,8 +10622,11 @@ class ActiveSupport::NumberHelper::NumberToDelimitedConverter < ::ActiveSupport: def parts; end class << self - # source://activesupport/lib/active_support/number_helper/number_converter.rb#17 + # source://activesupport/lib/active_support/class_attribute.rb#12 def validate_float; end + + # source://activesupport/lib/active_support/class_attribute.rb#15 + def validate_float=(new_value); end end end @@ -10558,11 +10653,17 @@ class ActiveSupport::NumberHelper::NumberToHumanConverter < ::ActiveSupport::Num def unit_exponents(units); end class << self - # source://activesupport/lib/active_support/number_helper/number_converter.rb#14 + # source://activesupport/lib/active_support/class_attribute.rb#12 def namespace; end - # source://activesupport/lib/active_support/number_helper/number_converter.rb#17 + # source://activesupport/lib/active_support/class_attribute.rb#15 + def namespace=(new_value); end + + # source://activesupport/lib/active_support/class_attribute.rb#12 def validate_float; end + + # source://activesupport/lib/active_support/class_attribute.rb#15 + def validate_float=(new_value); end end end @@ -10600,11 +10701,17 @@ class ActiveSupport::NumberHelper::NumberToHumanSizeConverter < ::ActiveSupport: def unit; end class << self - # source://activesupport/lib/active_support/number_helper/number_converter.rb#14 + # source://activesupport/lib/active_support/class_attribute.rb#12 def namespace; end - # source://activesupport/lib/active_support/number_helper/number_converter.rb#17 + # source://activesupport/lib/active_support/class_attribute.rb#15 + def namespace=(new_value); end + + # source://activesupport/lib/active_support/class_attribute.rb#12 def validate_float; end + + # source://activesupport/lib/active_support/class_attribute.rb#15 + def validate_float=(new_value); end end end @@ -10617,8 +10724,11 @@ class ActiveSupport::NumberHelper::NumberToPercentageConverter < ::ActiveSupport def convert; end class << self - # source://activesupport/lib/active_support/number_helper/number_converter.rb#14 + # source://activesupport/lib/active_support/class_attribute.rb#12 def namespace; end + + # source://activesupport/lib/active_support/class_attribute.rb#15 + def namespace=(new_value); end end end @@ -10670,11 +10780,17 @@ class ActiveSupport::NumberHelper::NumberToRoundedConverter < ::ActiveSupport::N def strip_insignificant_zeros; end class << self - # source://activesupport/lib/active_support/number_helper/number_converter.rb#14 + # source://activesupport/lib/active_support/class_attribute.rb#12 def namespace; end - # source://activesupport/lib/active_support/number_helper/number_converter.rb#17 + # source://activesupport/lib/active_support/class_attribute.rb#15 + def namespace=(new_value); end + + # source://activesupport/lib/active_support/class_attribute.rb#12 def validate_float; end + + # source://activesupport/lib/active_support/class_attribute.rb#15 + def validate_float=(new_value); end end end @@ -10941,7 +11057,7 @@ class ActiveSupport::OptionMerger # @return [Boolean] # # source://activesupport/lib/active_support/option_merger.rb#34 - def respond_to_missing?(*arguments); end + def respond_to_missing?(*_arg0, **_arg1, &_arg2); end end # DEPRECATED: +ActiveSupport::OrderedHash+ implements a hash that preserves @@ -11024,14 +11140,14 @@ class ActiveSupport::OrderedOptions < ::Hash # @return [Boolean] # - # source://activesupport/lib/active_support/ordered_options.rb#68 + # source://activesupport/lib/active_support/ordered_options.rb#64 def extractable_options?; end - # source://activesupport/lib/active_support/ordered_options.rb#72 + # source://activesupport/lib/active_support/ordered_options.rb#68 def inspect; end # source://activesupport/lib/active_support/ordered_options.rb#49 - def method_missing(name, *args); end + def method_missing(method, *args); end protected @@ -11042,7 +11158,7 @@ class ActiveSupport::OrderedOptions < ::Hash # @return [Boolean] # - # source://activesupport/lib/active_support/ordered_options.rb#64 + # source://activesupport/lib/active_support/ordered_options.rb#60 def respond_to_missing?(name, include_private); end end @@ -11136,17 +11252,19 @@ end # source://activesupport/lib/active_support/parameter_filter.rb#40 ActiveSupport::ParameterFilter::FILTERED = T.let(T.unsafe(nil), String) -# = Active Support Proxy \Object -# -# A class with no predefined methods that behaves similarly to Builder's -# BlankSlate. Used for proxy classes. -# -# source://activesupport/lib/active_support/proxy_object.rb#8 +# source://activesupport/lib/active_support/proxy_object.rb#4 class ActiveSupport::ProxyObject < ::BasicObject # Let ActiveSupport::ProxyObject at least raise exceptions. # - # source://activesupport/lib/active_support/proxy_object.rb#13 + # source://activesupport/lib/active_support/proxy_object.rb#9 def raise(*args); end + + class << self + # @private + # + # source://activesupport/lib/active_support/proxy_object.rb#13 + def inherited(_subclass); end + end end # source://activesupport/lib/active_support/railtie.rb#7 @@ -11238,16 +11356,16 @@ class ActiveSupport::Reloader < ::ActiveSupport::ExecutionWrapper # source://activesupport/lib/active_support/reloader.rb#99 def initialize; end - # source://activesupport/lib/active_support/callbacks.rb#963 + # source://activesupport/lib/active_support/callbacks.rb#923 def _class_unload_callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#963 + # source://activesupport/lib/active_support/callbacks.rb#923 def _prepare_callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#951 + # source://activesupport/lib/active_support/callbacks.rb#911 def _run_class_unload_callbacks(&block); end - # source://activesupport/lib/active_support/callbacks.rb#951 + # source://activesupport/lib/active_support/callbacks.rb#911 def _run_prepare_callbacks(&block); end # source://activesupport/lib/active_support/reloader.rb#85 @@ -11289,19 +11407,22 @@ class ActiveSupport::Reloader < ::ActiveSupport::ExecutionWrapper def run!; end class << self - # source://activesupport/lib/active_support/callbacks.rb#70 + # source://activesupport/lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#955 + # source://activesupport/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/lib/active_support/callbacks.rb#915 def _class_unload_callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#959 + # source://activesupport/lib/active_support/callbacks.rb#919 def _class_unload_callbacks=(value); end - # source://activesupport/lib/active_support/callbacks.rb#955 + # source://activesupport/lib/active_support/callbacks.rb#915 def _prepare_callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#959 + # source://activesupport/lib/active_support/callbacks.rb#919 def _prepare_callbacks=(value); end # Registers a callback that will run immediately after the classes are unloaded. @@ -11314,23 +11435,23 @@ class ActiveSupport::Reloader < ::ActiveSupport::ExecutionWrapper # source://activesupport/lib/active_support/reloader.rb#39 def before_class_unload(*args, &block); end - # source://activesupport/lib/active_support/reloader.rb#85 + # source://activesupport/lib/active_support/class_attribute.rb#12 def check; end # source://activesupport/lib/active_support/reloader.rb#87 def check!; end - # source://activesupport/lib/active_support/reloader.rb#85 - def check=(value); end + # source://activesupport/lib/active_support/class_attribute.rb#15 + def check=(new_value); end # source://activesupport/lib/active_support/reloader.rb#85 def check?; end - # source://activesupport/lib/active_support/reloader.rb#84 + # source://activesupport/lib/active_support/class_attribute.rb#12 def executor; end - # source://activesupport/lib/active_support/reloader.rb#84 - def executor=(value); end + # source://activesupport/lib/active_support/class_attribute.rb#15 + def executor=(new_value); end # source://activesupport/lib/active_support/reloader.rb#84 def executor?; end @@ -11468,14 +11589,6 @@ module ActiveSupport::Rescuable::ClassMethods def find_rescue_handler(exception); end end -# source://activesupport/lib/active_support/ruby_features.rb#4 -module ActiveSupport::RubyFeatures; end - -# RUBY_VERSION >= "3.1" -# -# source://activesupport/lib/active_support/ruby_features.rb#5 -ActiveSupport::RubyFeatures::CLASS_SUBCLASSES = T.let(T.unsafe(nil), TrueClass) - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#19 class ActiveSupport::SafeBuffer < ::String # @return [SafeBuffer] a new instance of SafeBuffer @@ -11483,123 +11596,120 @@ class ActiveSupport::SafeBuffer < ::String # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#70 def initialize(str = T.unsafe(nil)); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#130 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#123 def %(args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#123 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#116 def *(_); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#119 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#112 def +(other); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#87 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#80 def <<(value); end # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#38 def [](*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#111 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#104 def []=(arg1, arg2, arg3 = T.unsafe(nil)); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#95 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#88 def bytesplice(*args, value); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def capitalize(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def capitalize!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def chomp(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def chomp!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def chop(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def chop!(*args); end # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#59 def chr; end # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#80 - def clone_empty; end - - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#87 def concat(value); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def delete(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def delete!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def delete_prefix(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def delete_prefix!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def delete_suffix(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def delete_suffix!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def downcase(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def downcase!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#146 def encode_with(coder); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#174 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#167 def gsub(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#185 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#178 def gsub!(*args, &block); end # Returns the value of attribute html_safe. # - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#141 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#134 def html_safe?; end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#99 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#92 def insert(index, value); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def lstrip(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def lstrip!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def next(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def next!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#103 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#96 def prepend(value); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#107 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#100 def replace(value); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def reverse(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def reverse!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def rstrip(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def rstrip!(*args); end # @raise [SafeConcatError] @@ -11607,10 +11717,10 @@ class ActiveSupport::SafeBuffer < ::String # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#65 def safe_concat(value); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def scrub(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def scrub!(*args); end # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#38 @@ -11619,72 +11729,72 @@ class ActiveSupport::SafeBuffer < ::String # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#51 def slice!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def squeeze(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def squeeze!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def strip(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def strip!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#174 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#167 def sub(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#185 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#178 def sub!(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def succ(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def succ!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def swapcase(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def swapcase!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#149 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#142 def to_param; end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#145 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#138 def to_s; end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def tr(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def tr!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def tr_s(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def tr_s!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def unicode_normalize(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def unicode_normalize!(*args); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#160 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#153 def upcase(*args, &block); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#164 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#157 def upcase!(*args); end private - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#200 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#193 def explicit_html_escape_interpolated_argument(arg); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#204 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#197 def implicit_html_escape_interpolated_argument(arg); end # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#75 @@ -11692,10 +11802,10 @@ class ActiveSupport::SafeBuffer < ::String def original_concat(*_arg0); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#212 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#205 def set_block_back_references(block, match_data); end - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#218 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#211 def string_into_safe_buffer(new_string, is_html_safe); end end @@ -11820,7 +11930,7 @@ class ActiveSupport::StringInquirer < ::String private # source://activesupport/lib/active_support/string_inquirer.rb#27 - def method_missing(method_name, *arguments); end + def method_missing(method_name, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # @@ -11859,16 +11969,16 @@ end class ActiveSupport::Subscriber # @return [Subscriber] a new instance of Subscriber # - # source://activesupport/lib/active_support/subscriber.rb#130 + # source://activesupport/lib/active_support/subscriber.rb#131 def initialize; end - # source://activesupport/lib/active_support/subscriber.rb#135 + # source://activesupport/lib/active_support/subscriber.rb#136 def call(event); end - # source://activesupport/lib/active_support/subscriber.rb#128 + # source://activesupport/lib/active_support/subscriber.rb#129 def patterns; end - # source://activesupport/lib/active_support/subscriber.rb#140 + # source://activesupport/lib/active_support/subscriber.rb#141 def publish_event(event); end class << self @@ -11887,49 +11997,49 @@ class ActiveSupport::Subscriber # source://activesupport/lib/active_support/subscriber.rb#69 def method_added(event); end - # source://activesupport/lib/active_support/subscriber.rb#78 + # source://activesupport/lib/active_support/subscriber.rb#79 def subscribers; end private - # source://activesupport/lib/active_support/subscriber.rb#85 + # source://activesupport/lib/active_support/subscriber.rb#86 def add_event_subscriber(event); end - # source://activesupport/lib/active_support/subscriber.rb#123 + # source://activesupport/lib/active_support/subscriber.rb#124 def fetch_public_methods(subscriber, inherit_all); end - # source://activesupport/lib/active_support/subscriber.rb#107 + # source://activesupport/lib/active_support/subscriber.rb#108 def find_attached_subscriber; end # @return [Boolean] # - # source://activesupport/lib/active_support/subscriber.rb#111 + # source://activesupport/lib/active_support/subscriber.rb#112 def invalid_event?(event); end # Returns the value of attribute namespace. # - # source://activesupport/lib/active_support/subscriber.rb#83 + # source://activesupport/lib/active_support/subscriber.rb#84 def namespace; end # Returns the value of attribute notifier. # - # source://activesupport/lib/active_support/subscriber.rb#83 + # source://activesupport/lib/active_support/subscriber.rb#84 def notifier; end # @return [Boolean] # - # source://activesupport/lib/active_support/subscriber.rb#119 + # source://activesupport/lib/active_support/subscriber.rb#120 def pattern_subscribed?(pattern); end - # source://activesupport/lib/active_support/subscriber.rb#115 + # source://activesupport/lib/active_support/subscriber.rb#116 def prepare_pattern(event); end - # source://activesupport/lib/active_support/subscriber.rb#96 + # source://activesupport/lib/active_support/subscriber.rb#97 def remove_event_subscriber(event); end # Returns the value of attribute subscriber. # - # source://activesupport/lib/active_support/subscriber.rb#83 + # source://activesupport/lib/active_support/subscriber.rb#84 def subscriber; end end end @@ -11951,13 +12061,6 @@ class ActiveSupport::SyntaxErrorProxy # source://activesupport/lib/active_support/syntax_error_proxy.rb#47 def parse_message_for_trace; end - - # 3.2 and older versions of Ruby - # - # @return [Boolean] - # - # source://activesupport/lib/active_support/syntax_error_proxy.rb#61 - def source_location_eval?; end end # source://activesupport/lib/active_support/syntax_error_proxy.rb#15 @@ -12002,108 +12105,114 @@ end # it easy to stamp log lines with subdomains, request ids, and anything else # to aid debugging of multi-user production applications. # -# source://activesupport/lib/active_support/tagged_logging.rb#30 +# source://activesupport/lib/active_support/tagged_logging.rb#29 module ActiveSupport::TaggedLogging - # source://activesupport/lib/active_support/tagged_logging.rb#131 + # source://activesupport/lib/active_support/tagged_logging.rb#139 def clear_tags!(*_arg0, **_arg1, &_arg2); end - # source://activesupport/lib/active_support/tagged_logging.rb#144 + # source://activesupport/lib/active_support/tagged_logging.rb#152 def flush; end - # source://activesupport/lib/active_support/tagged_logging.rb#131 + # source://activesupport/lib/active_support/tagged_logging.rb#139 def pop_tags(*_arg0, **_arg1, &_arg2); end - # source://activesupport/lib/active_support/tagged_logging.rb#131 + # source://activesupport/lib/active_support/tagged_logging.rb#139 def push_tags(*_arg0, **_arg1, &_arg2); end - # source://activesupport/lib/active_support/tagged_logging.rb#133 + # source://activesupport/lib/active_support/tagged_logging.rb#141 def tagged(*tags); end class << self + # Returns an `ActiveSupport::Logger` that has already been wrapped with tagged logging concern. + # # source://activesupport/lib/active_support/tagged_logging.rb#117 + def logger(*args, **kwargs); end + + # source://activesupport/lib/active_support/tagged_logging.rb#121 def new(logger); end end end -# source://activesupport/lib/active_support/tagged_logging.rb#31 +# source://activesupport/lib/active_support/tagged_logging.rb#30 module ActiveSupport::TaggedLogging::Formatter # This method is invoked when a log event occurs. # - # source://activesupport/lib/active_support/tagged_logging.rb#33 + # source://activesupport/lib/active_support/tagged_logging.rb#32 def call(severity, timestamp, progname, msg); end - # source://activesupport/lib/active_support/tagged_logging.rb#52 + # source://activesupport/lib/active_support/tagged_logging.rb#51 def clear_tags!; end - # source://activesupport/lib/active_support/tagged_logging.rb#62 + # source://activesupport/lib/active_support/tagged_logging.rb#61 def current_tags; end - # source://activesupport/lib/active_support/tagged_logging.rb#48 + # source://activesupport/lib/active_support/tagged_logging.rb#47 def pop_tags(count = T.unsafe(nil)); end - # source://activesupport/lib/active_support/tagged_logging.rb#44 + # source://activesupport/lib/active_support/tagged_logging.rb#43 def push_tags(*tags); end - # source://activesupport/lib/active_support/tagged_logging.rb#56 + # source://activesupport/lib/active_support/tagged_logging.rb#55 def tag_stack; end - # source://activesupport/lib/active_support/tagged_logging.rb#37 + # source://activesupport/lib/active_support/tagged_logging.rb#36 def tagged(*tags); end - # source://activesupport/lib/active_support/tagged_logging.rb#66 + # source://activesupport/lib/active_support/tagged_logging.rb#65 def tags_text; end end -# source://activesupport/lib/active_support/tagged_logging.rb#109 +# source://activesupport/lib/active_support/tagged_logging.rb#108 module ActiveSupport::TaggedLogging::LocalTagStorage # Returns the value of attribute tag_stack. # - # source://activesupport/lib/active_support/tagged_logging.rb#110 + # source://activesupport/lib/active_support/tagged_logging.rb#109 def tag_stack; end # Sets the attribute tag_stack # # @param value the value to set the attribute tag_stack to. # - # source://activesupport/lib/active_support/tagged_logging.rb#110 + # source://activesupport/lib/active_support/tagged_logging.rb#109 def tag_stack=(_arg0); end class << self # @private # - # source://activesupport/lib/active_support/tagged_logging.rb#112 + # source://activesupport/lib/active_support/tagged_logging.rb#111 def extended(base); end end end -# source://activesupport/lib/active_support/tagged_logging.rb#71 +# source://activesupport/lib/active_support/tagged_logging.rb#70 class ActiveSupport::TaggedLogging::TagStack # @return [TagStack] a new instance of TagStack # - # source://activesupport/lib/active_support/tagged_logging.rb#74 + # source://activesupport/lib/active_support/tagged_logging.rb#73 def initialize; end - # source://activesupport/lib/active_support/tagged_logging.rb#92 + # source://activesupport/lib/active_support/tagged_logging.rb#91 def clear; end - # source://activesupport/lib/active_support/tagged_logging.rb#97 + # source://activesupport/lib/active_support/tagged_logging.rb#96 def format_message(message); end - # source://activesupport/lib/active_support/tagged_logging.rb#87 + # source://activesupport/lib/active_support/tagged_logging.rb#86 def pop_tags(count); end - # source://activesupport/lib/active_support/tagged_logging.rb#79 + # source://activesupport/lib/active_support/tagged_logging.rb#78 def push_tags(tags); end # Returns the value of attribute tags. # - # source://activesupport/lib/active_support/tagged_logging.rb#72 + # source://activesupport/lib/active_support/tagged_logging.rb#71 def tags; end end -# source://activesupport/lib/active_support/test_case.rb#20 +# source://activesupport/lib/active_support/test_case.rb#21 class ActiveSupport::TestCase < ::Minitest::Test include ::ActiveSupport::Testing::SetupAndTeardown + include ::ActiveSupport::Testing::TestsWithoutAssertions include ::ActiveSupport::Testing::TaggedLogging include ::ActiveSupport::Callbacks include ::ActiveSupport::Testing::Assertions @@ -12117,61 +12226,58 @@ class ActiveSupport::TestCase < ::Minitest::Test extend ::ActiveSupport::Testing::SetupAndTeardown::ClassMethods extend ::ActiveSupport::Testing::Declarative - # source://activesupport/lib/active_support/callbacks.rb#70 + # source://activesupport/lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/lib/active_support/callbacks.rb#951 + # source://activesupport/lib/active_support/callbacks.rb#911 def _run_setup_callbacks(&block); end - # source://activesupport/lib/active_support/callbacks.rb#951 + # source://activesupport/lib/active_support/callbacks.rb#911 def _run_teardown_callbacks(&block); end - # source://activesupport/lib/active_support/callbacks.rb#963 + # source://activesupport/lib/active_support/callbacks.rb#923 def _setup_callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#963 + # source://activesupport/lib/active_support/callbacks.rb#923 def _teardown_callbacks; end - # source://minitest/5.23.0lib/minitest/assertions.rb#736 + # source://minitest/5.25.1lib/minitest/assertions.rb#731 def assert_no_match(matcher, obj, msg = T.unsafe(nil)); end - # source://minitest/5.23.0lib/minitest/assertions.rb#665 + # source://minitest/5.25.1lib/minitest/assertions.rb#660 def assert_not_empty(obj, msg = T.unsafe(nil)); end - # source://minitest/5.23.0lib/minitest/assertions.rb#676 + # source://minitest/5.25.1lib/minitest/assertions.rb#671 def assert_not_equal(exp, act, msg = T.unsafe(nil)); end - # source://minitest/5.23.0lib/minitest/assertions.rb#688 + # source://minitest/5.25.1lib/minitest/assertions.rb#683 def assert_not_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end - # source://minitest/5.23.0lib/minitest/assertions.rb#700 + # source://minitest/5.25.1lib/minitest/assertions.rb#695 def assert_not_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end - # source://minitest/5.23.0lib/minitest/assertions.rb#707 + # source://minitest/5.25.1lib/minitest/assertions.rb#702 def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end - # source://minitest/5.23.0lib/minitest/assertions.rb#718 + # source://minitest/5.25.1lib/minitest/assertions.rb#713 def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end - # source://minitest/5.23.0lib/minitest/assertions.rb#728 + # source://minitest/5.25.1lib/minitest/assertions.rb#723 def assert_not_kind_of(cls, obj, msg = T.unsafe(nil)); end - # source://minitest/5.23.0lib/minitest/assertions.rb#746 + # source://minitest/5.25.1lib/minitest/assertions.rb#741 def assert_not_nil(obj, msg = T.unsafe(nil)); end - # source://minitest/5.23.0lib/minitest/assertions.rb#781 + # source://minitest/5.25.1lib/minitest/assertions.rb#776 def assert_not_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end - # source://minitest/5.23.0lib/minitest/assertions.rb#804 + # source://minitest/5.25.1lib/minitest/assertions.rb#799 def assert_not_predicate(o1, op, msg = T.unsafe(nil)); end - # source://minitest/5.23.0lib/minitest/assertions.rb#813 + # source://minitest/5.25.1lib/minitest/assertions.rb#808 def assert_not_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end - # source://minitest/5.23.0lib/minitest/assertions.rb#822 + # source://minitest/5.25.1lib/minitest/assertions.rb#817 def assert_not_same(exp, act, msg = T.unsafe(nil)); end # source://activesupport/lib/active_support/testing/file_fixtures.rb#20 @@ -12180,39 +12286,36 @@ class ActiveSupport::TestCase < ::Minitest::Test # source://activesupport/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path?; end - # source://activesupport/lib/active_support/test_case.rb#298 + # source://activesupport/lib/active_support/test_case.rb#300 def inspect; end - # source://minitest/5.23.0lib/minitest.rb#346 + # source://minitest/5.25.1lib/minitest.rb#375 def method_name; end class << self - # source://activesupport/lib/active_support/callbacks.rb#70 + # source://activesupport/lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/lib/active_support/callbacks.rb#955 + # source://activesupport/lib/active_support/callbacks.rb#915 def _setup_callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#959 + # source://activesupport/lib/active_support/callbacks.rb#919 def _setup_callbacks=(value); end - # source://activesupport/lib/active_support/callbacks.rb#955 + # source://activesupport/lib/active_support/callbacks.rb#915 def _teardown_callbacks; end - # source://activesupport/lib/active_support/callbacks.rb#959 + # source://activesupport/lib/active_support/callbacks.rb#919 def _teardown_callbacks=(value); end - # source://activesupport/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/lib/active_support/class_attribute.rb#12 def file_fixture_path; end - # source://activesupport/lib/active_support/testing/file_fixtures.rb#20 - def file_fixture_path=(value); end + # source://activesupport/lib/active_support/class_attribute.rb#15 + def file_fixture_path=(new_value); end # source://activesupport/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path?; end @@ -12251,7 +12354,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # number of tests to run is above the +threshold+ param. The default value is # 50, and it's configurable via +config.active_support.test_parallelization_threshold+. # - # source://activesupport/lib/active_support/test_case.rb#80 + # source://activesupport/lib/active_support/test_case.rb#81 def parallelize(workers: T.unsafe(nil), with: T.unsafe(nil), threshold: T.unsafe(nil)); end # Set up hook for parallel testing. This can be used if you have multiple @@ -12268,7 +12371,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # end # end # - # source://activesupport/lib/active_support/test_case.rb#100 + # source://activesupport/lib/active_support/test_case.rb#101 def parallelize_setup(&block); end # Clean up hook for parallel testing. This can be used to drop databases @@ -12285,7 +12388,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # end # end # - # source://activesupport/lib/active_support/test_case.rb#117 + # source://activesupport/lib/active_support/test_case.rb#118 def parallelize_teardown(&block); end # Returns the order in which test cases are run. @@ -12295,7 +12398,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # Possible values are +:random+, +:parallel+, +:alpha+, +:sorted+. # Defaults to +:random+. # - # source://activesupport/lib/active_support/test_case.rb#43 + # source://activesupport/lib/active_support/test_case.rb#44 def test_order; end # Sets the order in which test cases are run. @@ -12308,12 +12411,12 @@ class ActiveSupport::TestCase < ::Minitest::Test # * +:sorted+ (to run tests alphabetically by method name) # * +:alpha+ (equivalent to +:sorted+) # - # source://activesupport/lib/active_support/test_case.rb#33 + # source://activesupport/lib/active_support/test_case.rb#34 def test_order=(new_order); end end end -# source://activesupport/lib/active_support/test_case.rb#21 +# source://activesupport/lib/active_support/test_case.rb#22 ActiveSupport::TestCase::Assertion = Minitest::Assertion # source://activesupport/lib/active_support/testing/tagged_logging.rb#4 @@ -12356,7 +12459,7 @@ module ActiveSupport::Testing::Assertions # post :create, params: { status: { incident: true } } # end # - # source://activesupport/lib/active_support/testing/assertions.rb#191 + # source://activesupport/lib/active_support/testing/assertions.rb#195 def assert_changes(expression, message = T.unsafe(nil), from: T.unsafe(nil), to: T.unsafe(nil), &block); end # Test numeric difference between the return value of an expression as a @@ -12430,7 +12533,7 @@ module ActiveSupport::Testing::Assertions # post :create, params: { status: { ok: false } } # end # - # source://activesupport/lib/active_support/testing/assertions.rb#238 + # source://activesupport/lib/active_support/testing/assertions.rb#252 def assert_no_changes(expression, message = T.unsafe(nil), from: T.unsafe(nil), &block); end # Assertion that the numeric result of evaluating an expression is not @@ -12458,7 +12561,7 @@ module ActiveSupport::Testing::Assertions # post :create, params: { article: invalid_attributes } # end # - # source://activesupport/lib/active_support/testing/assertions.rb#153 + # source://activesupport/lib/active_support/testing/assertions.rb#157 def assert_no_difference(expression, message = T.unsafe(nil), &block); end # Asserts that an expression is not truthy. Passes if +object+ is +nil+ or @@ -12511,8 +12614,11 @@ module ActiveSupport::Testing::Assertions private - # source://activesupport/lib/active_support/testing/assertions.rb#265 + # source://activesupport/lib/active_support/testing/assertions.rb#286 def _assert_nothing_raised_or_warn(assertion, &block); end + + # source://activesupport/lib/active_support/testing/assertions.rb#301 + def _callable_to_source_string(callable); end end # source://activesupport/lib/active_support/testing/assertions.rb#8 @@ -12570,12 +12676,19 @@ module ActiveSupport::Testing::ConstantStubbing # Using this method rather than forcing World::List::Import::LARGE_IMPORT_THRESHOLD = 5000 prevents # warnings from being thrown, and ensures that the old value is returned after the test has completed. # + # If the constant doesn't already exists, but you need it set for the duration of the block + # you can do so by passing `exists: false`. + # + # stub_const(object, :SOME_CONST, 1, exists: false) do + # assert_equal 1, SOME_CONST + # end + # # Note: Stubbing a const will stub it across all threads. So if you have concurrent threads # (like separate test suites running in parallel) that all depend on the same constant, it's possible # divergent stubbing will trample on each other. # - # source://activesupport/lib/active_support/testing/constant_stubbing.rb#21 - def stub_const(mod, constant, new_value); end + # source://activesupport/lib/active_support/testing/constant_stubbing.rb#28 + def stub_const(mod, constant, new_value, exists: T.unsafe(nil)); end end # source://activesupport/lib/active_support/testing/declarative.rb#5 @@ -12628,8 +12741,8 @@ module ActiveSupport::Testing::Deprecation # CustomDeprecator.warn "message" # passes assertion, different deprecator # end # - # source://activesupport/lib/active_support/testing/deprecation.rb#54 - def assert_not_deprecated(deprecator = T.unsafe(nil), &block); end + # source://activesupport/lib/active_support/testing/deprecation.rb#55 + def assert_not_deprecated(deprecator, &block); end # Returns the return value of the block and an array of all the deprecation warnings emitted by the given # +deprecator+ during the execution of the yielded block. @@ -12640,8 +12753,8 @@ module ActiveSupport::Testing::Deprecation # :result # end # => [:result, ["message"]] # - # source://activesupport/lib/active_support/testing/deprecation.rb#72 - def collect_deprecations(deprecator = T.unsafe(nil)); end + # source://activesupport/lib/active_support/testing/deprecation.rb#69 + def collect_deprecations(deprecator); end end # source://activesupport/lib/active_support/testing/error_reporter_assertions.rb#5 @@ -12805,42 +12918,45 @@ module ActiveSupport::Testing::FileFixtures end end -# source://activesupport/lib/active_support/testing/isolation.rb#5 +# source://activesupport/lib/active_support/testing/isolation.rb#7 module ActiveSupport::Testing::Isolation include ::ActiveSupport::Testing::Isolation::Forking - # source://activesupport/lib/active_support/testing/isolation.rb#18 + # source://activesupport/lib/active_support/testing/isolation.rb#20 def run; end class << self # @return [Boolean] # - # source://activesupport/lib/active_support/testing/isolation.rb#14 + # source://activesupport/lib/active_support/testing/isolation.rb#16 def forking_env?; end - # source://activesupport/lib/active_support/testing/isolation.rb#8 + # source://activesupport/lib/active_support/testing/isolation.rb#10 def included(klass); end end end -# source://activesupport/lib/active_support/testing/isolation.rb#26 +# source://activesupport/lib/active_support/testing/isolation.rb#35 module ActiveSupport::Testing::Isolation::Forking - # source://activesupport/lib/active_support/testing/isolation.rb#27 + # source://activesupport/lib/active_support/testing/isolation.rb#36 def run_in_isolation(&blk); end end -# source://activesupport/lib/active_support/testing/isolation.rb#64 +# source://activesupport/lib/active_support/testing/isolation.rb#73 module ActiveSupport::Testing::Isolation::Subprocess # Complicated H4X to get this working in Windows / JRuby with # no forking. # - # source://activesupport/lib/active_support/testing/isolation.rb#69 + # source://activesupport/lib/active_support/testing/isolation.rb#78 def run_in_isolation(&blk); end end -# source://activesupport/lib/active_support/testing/isolation.rb#65 +# source://activesupport/lib/active_support/testing/isolation.rb#74 ActiveSupport::Testing::Isolation::Subprocess::ORIG_ARGV = T.let(T.unsafe(nil), Array) +# source://activesupport/lib/active_support/testing/isolation.rb#8 +class ActiveSupport::Testing::Isolation::SubprocessCrashed < ::StandardError; end + # source://activesupport/lib/active_support/testing/parallelization/server.rb#8 class ActiveSupport::Testing::Parallelization # @return [Parallelization] a new instance of Parallelization @@ -12882,40 +12998,62 @@ class ActiveSupport::Testing::Parallelization end # source://activesupport/lib/active_support/testing/parallelization/server.rb#9 +class ActiveSupport::Testing::Parallelization::PrerecordResultClass < ::Struct + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://activesupport/lib/active_support/testing/parallelization/server.rb#11 class ActiveSupport::Testing::Parallelization::Server include ::DRb::DRbUndumped # @return [Server] a new instance of Server # - # source://activesupport/lib/active_support/testing/parallelization/server.rb#12 + # source://activesupport/lib/active_support/testing/parallelization/server.rb#14 def initialize; end - # source://activesupport/lib/active_support/testing/parallelization/server.rb#28 + # source://activesupport/lib/active_support/testing/parallelization/server.rb#31 def <<(o); end # @return [Boolean] # - # source://activesupport/lib/active_support/testing/parallelization/server.rb#48 + # source://activesupport/lib/active_support/testing/parallelization/server.rb#51 def active_workers?; end - # source://activesupport/lib/active_support/testing/parallelization/server.rb#52 + # source://activesupport/lib/active_support/testing/parallelization/server.rb#55 def interrupt; end - # source://activesupport/lib/active_support/testing/parallelization/server.rb#33 + # source://activesupport/lib/active_support/testing/parallelization/server.rb#36 def pop; end # @raise [DRb::DRbConnError] # - # source://activesupport/lib/active_support/testing/parallelization/server.rb#18 + # source://activesupport/lib/active_support/testing/parallelization/server.rb#20 def record(reporter, result); end - # source://activesupport/lib/active_support/testing/parallelization/server.rb#56 + # source://activesupport/lib/active_support/testing/parallelization/server.rb#59 def shutdown; end - # source://activesupport/lib/active_support/testing/parallelization/server.rb#40 + # source://activesupport/lib/active_support/testing/parallelization/server.rb#43 def start_worker(worker_id); end - # source://activesupport/lib/active_support/testing/parallelization/server.rb#44 + # source://activesupport/lib/active_support/testing/parallelization/server.rb#47 def stop_worker(worker_id); end end @@ -13168,6 +13306,16 @@ module ActiveSupport::Testing::TaggedLogging def tagged_logger; end end +# Warns when a test case does not perform any assertions. +# +# This is helpful in detecting broken tests that do not perform intended assertions. +# +# source://activesupport/lib/active_support/testing/tests_without_assertions.rb#8 +module ActiveSupport::Testing::TestsWithoutAssertions + # source://activesupport/lib/active_support/testing/tests_without_assertions.rb#9 + def after_teardown; end +end + # Contains helpers that help you test passage of time. # # source://activesupport/lib/active_support/testing/time_helpers.rb#68 @@ -13192,7 +13340,7 @@ module ActiveSupport::Testing::TimeHelpers # end # Time.current # => Sun, 09 Jul 2017 15:34:50 EST -05:00 # - # source://activesupport/lib/active_support/testing/time_helpers.rb#256 + # source://activesupport/lib/active_support/testing/time_helpers.rb#257 def freeze_time(with_usec: T.unsafe(nil), &block); end # Changes current time to the time in the future or in the past by a given time difference by @@ -13246,7 +13394,7 @@ module ActiveSupport::Testing::TimeHelpers # # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 # - # source://activesupport/lib/active_support/testing/time_helpers.rb#230 + # source://activesupport/lib/active_support/testing/time_helpers.rb#231 def travel_back; end # Changes current time to the given time by stubbing +Time.now+, +Time.new+, @@ -13309,24 +13457,24 @@ module ActiveSupport::Testing::TimeHelpers # # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 # - # source://activesupport/lib/active_support/testing/time_helpers.rb#230 + # source://activesupport/lib/active_support/testing/time_helpers.rb#231 def unfreeze_time; end private # Returns the value of attribute in_block. # - # source://activesupport/lib/active_support/testing/time_helpers.rb#265 + # source://activesupport/lib/active_support/testing/time_helpers.rb#266 def in_block; end # Sets the attribute in_block # # @param value the value to set the attribute in_block to. # - # source://activesupport/lib/active_support/testing/time_helpers.rb#265 + # source://activesupport/lib/active_support/testing/time_helpers.rb#266 def in_block=(_arg0); end - # source://activesupport/lib/active_support/testing/time_helpers.rb#261 + # source://activesupport/lib/active_support/testing/time_helpers.rb#262 def simple_stubs; end end @@ -13391,7 +13539,7 @@ class ActiveSupport::TimeWithZone # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 # - # source://activesupport/lib/active_support/time_with_zone.rb#299 + # source://activesupport/lib/active_support/time_with_zone.rb#298 def +(other); end # Subtracts an interval of time and returns a new TimeWithZone object unless @@ -13417,19 +13565,19 @@ class ActiveSupport::TimeWithZone # # Time.zone.now - 1.day.ago # => 86399.999967 # - # source://activesupport/lib/active_support/time_with_zone.rb#333 + # source://activesupport/lib/active_support/time_with_zone.rb#341 def -(other); end # Use the time in UTC for comparisons. # - # source://activesupport/lib/active_support/time_with_zone.rb#232 + # source://activesupport/lib/active_support/time_with_zone.rb#231 def <=>(other); end # So that +self+ acts_like?(:time). # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#494 + # source://activesupport/lib/active_support/time_with_zone.rb#504 def acts_like_time?; end # Uses Date to provide precise Time calculations for years, months, and days @@ -13454,7 +13602,7 @@ class ActiveSupport::TimeWithZone # now.advance(months: 1) # => Tue, 02 Dec 2014 01:26:28.558049687 EST -05:00 # now.advance(years: 1) # => Mon, 02 Nov 2015 01:26:28.558049687 EST -05:00 # - # source://activesupport/lib/active_support/time_with_zone.rb#422 + # source://activesupport/lib/active_support/time_with_zone.rb#430 def advance(options); end def after?(_arg0); end @@ -13477,7 +13625,7 @@ class ActiveSupport::TimeWithZone # now.ago(24.hours) # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 # now.ago(1.day) # => Sun, 02 Nov 2014 00:26:28.725182881 EDT -04:00 # - # source://activesupport/lib/active_support/time_with_zone.rb#361 + # source://activesupport/lib/active_support/time_with_zone.rb#369 def ago(other); end # Coerces time to a string for JSON encoding. The default format is ISO 8601. @@ -13486,11 +13634,11 @@ class ActiveSupport::TimeWithZone # to +false+. # # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = true - # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").to_json + # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").as_json # # => "2005-02-01T05:15:10.000-10:00" # # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = false - # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").to_json + # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").as_json # # => "2005/02/01 05:15:10 -1000" # # source://activesupport/lib/active_support/time_with_zone.rb#166 @@ -13503,14 +13651,14 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#240 + # source://activesupport/lib/active_support/time_with_zone.rb#239 def between?(min, max); end # An instance of ActiveSupport::TimeWithZone is never blank # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#505 + # source://activesupport/lib/active_support/time_with_zone.rb#515 def blank?; end # Returns a new +ActiveSupport::TimeWithZone+ where one or more of the elements have @@ -13526,12 +13674,12 @@ class ActiveSupport::TimeWithZone # # t = Time.zone.now # => Fri, 14 Apr 2017 11:45:15.116992711 EST -05:00 # t.change(year: 2020) # => Tue, 14 Apr 2020 11:45:15.116992711 EST -05:00 - # t.change(hour: 12) # => Fri, 14 Apr 2017 12:00:00.116992711 EST -05:00 - # t.change(min: 30) # => Fri, 14 Apr 2017 11:30:00.116992711 EST -05:00 + # t.change(hour: 12) # => Fri, 14 Apr 2017 12:00:00.000000000 EST -05:00 + # t.change(min: 30) # => Fri, 14 Apr 2017 11:30:00.000000000 EST -05:00 # t.change(offset: "-10:00") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 # t.change(zone: "Hawaii") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 # - # source://activesupport/lib/active_support/time_with_zone.rb#382 + # source://activesupport/lib/active_support/time_with_zone.rb#390 def change(options); end # Returns a Time instance of the simultaneous time in the UTC timezone. @@ -13539,7 +13687,7 @@ class ActiveSupport::TimeWithZone # source://activesupport/lib/active_support/time_with_zone.rb#63 def comparable_time; end - # source://activesupport/lib/active_support/time_with_zone.rb#434 + # source://activesupport/lib/active_support/time_with_zone.rb#442 def day; end # Returns true if the current time is within Daylight Savings Time for the @@ -13561,7 +13709,7 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#275 + # source://activesupport/lib/active_support/time_with_zone.rb#274 def eql?(other); end # Returns a formatted string of the offset from UTC, or an alternative @@ -13576,14 +13724,14 @@ class ActiveSupport::TimeWithZone # source://activesupport/lib/active_support/time_with_zone.rb#125 def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - # source://activesupport/lib/active_support/time_with_zone.rb#509 + # source://activesupport/lib/active_support/time_with_zone.rb#523 def freeze; end # Returns true if the current object's time is in the future. # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#270 + # source://activesupport/lib/active_support/time_with_zone.rb#269 def future?; end # Returns a Time instance of the simultaneous time in the UTC timezone. @@ -13628,10 +13776,10 @@ class ActiveSupport::TimeWithZone # source://activesupport/lib/active_support/time_with_zone.rb#111 def gmtoff; end - # source://activesupport/lib/active_support/time_with_zone.rb#279 + # source://activesupport/lib/active_support/time_with_zone.rb#278 def hash; end - # source://activesupport/lib/active_support/time_with_zone.rb#434 + # source://activesupport/lib/active_support/time_with_zone.rb#442 def hour; end # Returns a string of the object's date and time in the format used by @@ -13659,7 +13807,7 @@ class ActiveSupport::TimeWithZone # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 # - # source://activesupport/lib/active_support/time_with_zone.rb#299 + # source://activesupport/lib/active_support/time_with_zone.rb#298 def in(other); end # Returns the simultaneous time in Time.zone, or the specified zone. @@ -13681,7 +13829,7 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#499 + # source://activesupport/lib/active_support/time_with_zone.rb#509 def is_a?(klass); end # Returns true if the current time is within Daylight Savings Time for the @@ -13708,7 +13856,7 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#499 + # source://activesupport/lib/active_support/time_with_zone.rb#509 def kind_of?(klass); end # Returns a Time instance of the simultaneous time in the system timezone. @@ -13716,28 +13864,28 @@ class ActiveSupport::TimeWithZone # source://activesupport/lib/active_support/time_with_zone.rb#83 def localtime(utc_offset = T.unsafe(nil)); end - # source://activesupport/lib/active_support/time_with_zone.rb#515 + # source://activesupport/lib/active_support/time_with_zone.rb#529 def marshal_dump; end - # source://activesupport/lib/active_support/time_with_zone.rb#519 + # source://activesupport/lib/active_support/time_with_zone.rb#533 def marshal_load(variables); end - # source://activesupport/lib/active_support/time_with_zone.rb#434 + # source://activesupport/lib/active_support/time_with_zone.rb#442 def mday; end # Send the missing method to +time+ instance, and wrap result in a new # TimeWithZone with the existing +time_zone+. # - # source://activesupport/lib/active_support/time_with_zone.rb#540 + # source://activesupport/lib/active_support/time_with_zone.rb#553 def method_missing(*_arg0, **_arg1, &_arg2); end - # source://activesupport/lib/active_support/time_with_zone.rb#434 + # source://activesupport/lib/active_support/time_with_zone.rb#442 def min; end - # source://activesupport/lib/active_support/time_with_zone.rb#434 + # source://activesupport/lib/active_support/time_with_zone.rb#442 def mon; end - # source://activesupport/lib/active_support/time_with_zone.rb#434 + # source://activesupport/lib/active_support/time_with_zone.rb#442 def month; end # Returns true if the current object's time falls within @@ -13745,17 +13893,17 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#257 + # source://activesupport/lib/active_support/time_with_zone.rb#256 def next_day?; end - # source://activesupport/lib/active_support/time_with_zone.rb#434 + # source://activesupport/lib/active_support/time_with_zone.rb#442 def nsec; end # Returns true if the current object's time is in the past. # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#245 + # source://activesupport/lib/active_support/time_with_zone.rb#244 def past?; end # Returns the underlying +TZInfo::TimezonePeriod+. @@ -13763,12 +13911,17 @@ class ActiveSupport::TimeWithZone # source://activesupport/lib/active_support/time_with_zone.rb#72 def period; end + # @return [Boolean] + # + # source://activesupport/lib/active_support/time_with_zone.rb#519 + def present?; end + # Returns true if the current object's time falls within # the previous day (yesterday). # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#264 + # source://activesupport/lib/active_support/time_with_zone.rb#263 def prev_day?; end # respond_to_missing? is not called in some cases, such as when type conversion is @@ -13776,7 +13929,7 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#525 + # source://activesupport/lib/active_support/time_with_zone.rb#539 def respond_to?(sym, include_priv = T.unsafe(nil)); end # Returns a string of the object's date and time in the RFC 2822 standard @@ -13803,7 +13956,7 @@ class ActiveSupport::TimeWithZone # source://activesupport/lib/active_support/time_with_zone.rb#194 def rfc822; end - # source://activesupport/lib/active_support/time_with_zone.rb#434 + # source://activesupport/lib/active_support/time_with_zone.rb#442 def sec; end # Adds an interval of time to the current object's time and returns that @@ -13823,13 +13976,13 @@ class ActiveSupport::TimeWithZone # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 # - # source://activesupport/lib/active_support/time_with_zone.rb#299 + # source://activesupport/lib/active_support/time_with_zone.rb#298 def since(other); end # Replaces %Z directive with +zone before passing to Time#strftime, # so that zone information is correct. # - # source://activesupport/lib/active_support/time_with_zone.rb#226 + # source://activesupport/lib/active_support/time_with_zone.rb#225 def strftime(format); end # Returns a Time instance that represents the time in +time_zone+. @@ -13848,10 +14001,10 @@ class ActiveSupport::TimeWithZone # now = Time.zone.now # => Tue, 18 Aug 2015 02:29:27.485278555 UTC +00:00 # now.to_a # => [27, 29, 2, 18, 8, 2015, 2, 230, false, "UTC"] # - # source://activesupport/lib/active_support/time_with_zone.rb#445 + # source://activesupport/lib/active_support/time_with_zone.rb#453 def to_a; end - # source://activesupport/lib/active_support/time_with_zone.rb#434 + # source://activesupport/lib/active_support/time_with_zone.rb#442 def to_date; end # Returns an instance of DateTime with the timezone's UTC offset @@ -13859,7 +14012,7 @@ class ActiveSupport::TimeWithZone # Time.zone.now.to_datetime # => Tue, 18 Aug 2015 02:32:20 +0000 # Time.current.in_time_zone('Hawaii').to_datetime # => Mon, 17 Aug 2015 16:32:20 -1000 # - # source://activesupport/lib/active_support/time_with_zone.rb#478 + # source://activesupport/lib/active_support/time_with_zone.rb#486 def to_datetime; end # Returns the object's date and time as a floating-point number of seconds @@ -13867,7 +14020,7 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.to_f # => 1417709320.285418 # - # source://activesupport/lib/active_support/time_with_zone.rb#453 + # source://activesupport/lib/active_support/time_with_zone.rb#461 def to_f; end # Returns a string of the object's date and time. @@ -13899,7 +14052,7 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.to_i # => 1417709320 # - # source://activesupport/lib/active_support/time_with_zone.rb#461 + # source://activesupport/lib/active_support/time_with_zone.rb#469 def to_i; end # Returns the object's date and time as a rational number of seconds @@ -13907,7 +14060,7 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.to_r # => (708854548642709/500000) # - # source://activesupport/lib/active_support/time_with_zone.rb#470 + # source://activesupport/lib/active_support/time_with_zone.rb#478 def to_r; end # Returns a string of the object's date and time. @@ -13915,11 +14068,11 @@ class ActiveSupport::TimeWithZone # source://activesupport/lib/active_support/time_with_zone.rb#200 def to_s; end - # Returns an instance of +Time+, either with the same UTC offset - # as +self+ or in the local system timezone depending on the setting - # of +ActiveSupport.to_time_preserves_timezone+. + # Returns an instance of +Time+, either with the same timezone as +self+, + # with the same UTC offset as +self+ or in the local system timezone + # depending on the setting of +ActiveSupport.to_time_preserves_timezone+. # - # source://activesupport/lib/active_support/time_with_zone.rb#485 + # source://activesupport/lib/active_support/time_with_zone.rb#493 def to_time; end # Returns true if the current object's time falls within @@ -13927,7 +14080,7 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#251 + # source://activesupport/lib/active_support/time_with_zone.rb#250 def today?; end # Returns true if the current object's time falls within @@ -13935,7 +14088,7 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#257 + # source://activesupport/lib/active_support/time_with_zone.rb#256 def tomorrow?; end # Returns the object's date and time as an integer number of seconds @@ -13943,10 +14096,10 @@ class ActiveSupport::TimeWithZone # # Time.zone.now.to_i # => 1417709320 # - # source://activesupport/lib/active_support/time_with_zone.rb#461 + # source://activesupport/lib/active_support/time_with_zone.rb#469 def tv_sec; end - # source://activesupport/lib/active_support/time_with_zone.rb#434 + # source://activesupport/lib/active_support/time_with_zone.rb#442 def usec; end # Returns a Time instance of the simultaneous time in the UTC timezone. @@ -13971,7 +14124,7 @@ class ActiveSupport::TimeWithZone # source://activesupport/lib/active_support/time_with_zone.rb#111 def utc_offset; end - # source://activesupport/lib/active_support/time_with_zone.rb#434 + # source://activesupport/lib/active_support/time_with_zone.rb#442 def wday; end # Returns a string of the object's date and time in the ISO 8601 standard @@ -13982,10 +14135,10 @@ class ActiveSupport::TimeWithZone # source://activesupport/lib/active_support/time_with_zone.rb#148 def xmlschema(fraction_digits = T.unsafe(nil)); end - # source://activesupport/lib/active_support/time_with_zone.rb#434 + # source://activesupport/lib/active_support/time_with_zone.rb#442 def yday; end - # source://activesupport/lib/active_support/time_with_zone.rb#434 + # source://activesupport/lib/active_support/time_with_zone.rb#442 def year; end # Returns true if the current object's time falls within @@ -13993,7 +14146,7 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#264 + # source://activesupport/lib/active_support/time_with_zone.rb#263 def yesterday?; end # Returns the time zone abbreviation. @@ -14008,13 +14161,13 @@ class ActiveSupport::TimeWithZone # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#576 + # source://activesupport/lib/active_support/time_with_zone.rb#589 def duration_of_variable_length?(obj); end - # source://activesupport/lib/active_support/time_with_zone.rb#557 + # source://activesupport/lib/active_support/time_with_zone.rb#570 def get_period_and_ensure_valid_local_time(period); end - # source://activesupport/lib/active_support/time_with_zone.rb#549 + # source://activesupport/lib/active_support/time_with_zone.rb#562 def incorporate_utc_offset(time, offset); end # Ensure proxy class responds to all methods that underlying time instance @@ -14022,20 +14175,20 @@ class ActiveSupport::TimeWithZone # # @return [Boolean] # - # source://activesupport/lib/active_support/time_with_zone.rb#533 + # source://activesupport/lib/active_support/time_with_zone.rb#547 def respond_to_missing?(sym, include_priv); end - # source://activesupport/lib/active_support/time_with_zone.rb#570 + # source://activesupport/lib/active_support/time_with_zone.rb#583 def transfer_time_values_to_utc_constructor(time); end - # source://activesupport/lib/active_support/time_with_zone.rb#580 + # source://activesupport/lib/active_support/time_with_zone.rb#593 def wrap_with_time_zone(time); end end # source://activesupport/lib/active_support/time_with_zone.rb#45 ActiveSupport::TimeWithZone::PRECISIONS = T.let(T.unsafe(nil), Hash) -# source://activesupport/lib/active_support/time_with_zone.rb#547 +# source://activesupport/lib/active_support/time_with_zone.rb#560 ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) # = Active Support \Time Zone @@ -14067,28 +14220,28 @@ ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) class ActiveSupport::TimeZone include ::Comparable - # Create a new TimeZone object with the given name and offset. The - # offset is the number of seconds that this time zone is offset from UTC - # (GMT). Seconds were chosen as the offset unit because that is the unit - # that Ruby uses to represent time zone offsets (see Time#utc_offset). + # :stopdoc: # # @return [TimeZone] a new instance of TimeZone # - # source://activesupport/lib/active_support/values/time_zone.rb#303 + # source://activesupport/lib/active_support/values/time_zone.rb#309 def initialize(name, utc_offset = T.unsafe(nil), tzinfo = T.unsafe(nil)); end # Compare this time zone to the parameter. The two are compared first on # their offsets, and then by name. # - # source://activesupport/lib/active_support/values/time_zone.rb#326 + # source://activesupport/lib/active_support/values/time_zone.rb#333 def <=>(zone); end # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ # if a match is found. # - # source://activesupport/lib/active_support/values/time_zone.rb#335 + # source://activesupport/lib/active_support/values/time_zone.rb#342 def =~(re); end + # source://activesupport/lib/active_support/values/time_zone.rb#567 + def abbr(time); end + # Method for creating new ActiveSupport::TimeWithZone instance in time zone # of +self+ from number of seconds since the Unix epoch. # @@ -14101,10 +14254,15 @@ class ActiveSupport::TimeZone # Time.zone = 'Hawaii' # => "Hawaii" # Time.at(946684800, 123456.789).nsec # => 123456789 # - # source://activesupport/lib/active_support/values/time_zone.rb#372 + # source://activesupport/lib/active_support/values/time_zone.rb#379 def at(*args); end - # source://activesupport/lib/active_support/values/time_zone.rb#568 + # @return [Boolean] + # + # source://activesupport/lib/active_support/values/time_zone.rb#571 + def dst?(time); end + + # source://activesupport/lib/active_support/values/time_zone.rb#579 def encode_with(coder); end # Returns a formatted string of the offset from UTC, or an alternative @@ -14114,10 +14272,10 @@ class ActiveSupport::TimeZone # zone.formatted_offset # => "-06:00" # zone.formatted_offset(false) # => "-0600" # - # source://activesupport/lib/active_support/values/time_zone.rb#320 + # source://activesupport/lib/active_support/values/time_zone.rb#327 def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - # source://activesupport/lib/active_support/values/time_zone.rb#564 + # source://activesupport/lib/active_support/values/time_zone.rb#575 def init_with(coder); end # Method for creating new ActiveSupport::TimeWithZone instance in time zone @@ -14134,7 +14292,7 @@ class ActiveSupport::TimeZone # If the string is invalid then an +ArgumentError+ will be raised unlike +parse+ # which usually returns +nil+ when given an invalid date string. # - # source://activesupport/lib/active_support/values/time_zone.rb#389 + # source://activesupport/lib/active_support/values/time_zone.rb#396 def iso8601(str); end # Method for creating new ActiveSupport::TimeWithZone instance in time zone @@ -14143,13 +14301,13 @@ class ActiveSupport::TimeZone # Time.zone = 'Hawaii' # => "Hawaii" # Time.zone.local(2007, 2, 1, 15, 30, 45) # => Thu, 01 Feb 2007 15:30:45 HST -10:00 # - # source://activesupport/lib/active_support/values/time_zone.rb#356 + # source://activesupport/lib/active_support/values/time_zone.rb#363 def local(*args); end # Adjust the given time to the simultaneous time in UTC. Returns a # Time.utc() instance. # - # source://activesupport/lib/active_support/values/time_zone.rb#544 + # source://activesupport/lib/active_support/values/time_zone.rb#551 def local_to_utc(time, dst = T.unsafe(nil)); end # Compare #name and TZInfo identifier to a supplied regexp, returning +true+ @@ -14157,7 +14315,7 @@ class ActiveSupport::TimeZone # # @return [Boolean] # - # source://activesupport/lib/active_support/values/time_zone.rb#341 + # source://activesupport/lib/active_support/values/time_zone.rb#348 def match?(re); end # Returns the value of attribute name. @@ -14171,7 +14329,7 @@ class ActiveSupport::TimeZone # Time.zone = 'Hawaii' # => "Hawaii" # Time.zone.now # => Wed, 23 Jan 2008 20:24:27 HST -10:00 # - # source://activesupport/lib/active_support/values/time_zone.rb#509 + # source://activesupport/lib/active_support/values/time_zone.rb#516 def now; end # Method for creating new ActiveSupport::TimeWithZone instance in time zone @@ -14193,22 +14351,16 @@ class ActiveSupport::TimeZone # # If the string is invalid then an +ArgumentError+ could be raised. # - # source://activesupport/lib/active_support/values/time_zone.rb#446 + # source://activesupport/lib/active_support/values/time_zone.rb#453 def parse(str, now = T.unsafe(nil)); end - # Available so that TimeZone instances respond like +TZInfo::Timezone+ - # instances. - # - # source://activesupport/lib/active_support/values/time_zone.rb#556 + # source://activesupport/lib/active_support/values/time_zone.rb#559 def period_for_local(time, dst = T.unsafe(nil)); end - # Available so that TimeZone instances respond like +TZInfo::Timezone+ - # instances. - # - # source://activesupport/lib/active_support/values/time_zone.rb#550 + # source://activesupport/lib/active_support/values/time_zone.rb#555 def period_for_utc(time); end - # source://activesupport/lib/active_support/values/time_zone.rb#560 + # source://activesupport/lib/active_support/values/time_zone.rb#563 def periods_for_local(time); end # Method for creating new ActiveSupport::TimeWithZone instance in time zone @@ -14226,7 +14378,7 @@ class ActiveSupport::TimeZone # # @raise [ArgumentError] # - # source://activesupport/lib/active_support/values/time_zone.rb#462 + # source://activesupport/lib/active_support/values/time_zone.rb#469 def rfc3339(str); end # Parses +str+ according to +format+ and returns an ActiveSupport::TimeWithZone. @@ -14250,22 +14402,22 @@ class ActiveSupport::TimeZone # # Time.zone.strptime('Mar 2000', '%b %Y') # => Wed, 01 Mar 2000 00:00:00 HST -10:00 # - # source://activesupport/lib/active_support/values/time_zone.rb#500 + # source://activesupport/lib/active_support/values/time_zone.rb#507 def strptime(str, format, now = T.unsafe(nil)); end # Returns a textual representation of this time zone. # - # source://activesupport/lib/active_support/values/time_zone.rb#347 + # source://activesupport/lib/active_support/values/time_zone.rb#354 def to_s; end # Returns the current date in this time zone. # - # source://activesupport/lib/active_support/values/time_zone.rb#514 + # source://activesupport/lib/active_support/values/time_zone.rb#521 def today; end # Returns the next date in this time zone. # - # source://activesupport/lib/active_support/values/time_zone.rb#519 + # source://activesupport/lib/active_support/values/time_zone.rb#526 def tomorrow; end # Returns the value of attribute tzinfo. @@ -14275,7 +14427,7 @@ class ActiveSupport::TimeZone # Returns the offset of this time zone from UTC in seconds. # - # source://activesupport/lib/active_support/values/time_zone.rb#310 + # source://activesupport/lib/active_support/values/time_zone.rb#317 def utc_offset; end # Adjust the given time to the simultaneous time in the time zone @@ -14286,22 +14438,22 @@ class ActiveSupport::TimeZone # As of tzinfo 2, utc_to_local returns a Time with a non-zero utc_offset. # See the +utc_to_local_returns_utc_offset_times+ config for more info. # - # source://activesupport/lib/active_support/values/time_zone.rb#535 + # source://activesupport/lib/active_support/values/time_zone.rb#542 def utc_to_local(time); end # Returns the previous date in this time zone. # - # source://activesupport/lib/active_support/values/time_zone.rb#524 + # source://activesupport/lib/active_support/values/time_zone.rb#531 def yesterday; end private # @raise [ArgumentError] # - # source://activesupport/lib/active_support/values/time_zone.rb#574 + # source://activesupport/lib/active_support/values/time_zone.rb#585 def parts_to_time(parts, now); end - # source://activesupport/lib/active_support/values/time_zone.rb#599 + # source://activesupport/lib/active_support/values/time_zone.rb#610 def time_now; end class << self @@ -14485,70 +14637,71 @@ end # = \XmlMini # # To use the much faster libxml parser: -# gem 'libxml-ruby' +# gem "libxml-ruby" # XmlMini.backend = 'LibXML' # # source://activesupport/lib/active_support/xml_mini.rb#17 module ActiveSupport::XmlMini extend ::ActiveSupport::XmlMini - # source://activesupport/lib/active_support/xml_mini.rb#97 + # source://activesupport/lib/active_support/xml_mini.rb#101 def backend; end - # source://activesupport/lib/active_support/xml_mini.rb#101 + # source://activesupport/lib/active_support/xml_mini.rb#105 def backend=(name); end # Returns the value of attribute depth. # - # source://activesupport/lib/active_support/xml_mini.rb#92 + # source://activesupport/lib/active_support/xml_mini.rb#96 def depth; end # Sets the attribute depth # # @param value the value to set the attribute depth to. # - # source://activesupport/lib/active_support/xml_mini.rb#92 + # source://activesupport/lib/active_support/xml_mini.rb#96 def depth=(_arg0); end - # source://activesupport/lib/active_support/xml_mini.rb#95 + # source://activesupport/lib/active_support/xml_mini.rb#99 def parse(*_arg0, **_arg1, &_arg2); end - # source://activesupport/lib/active_support/xml_mini.rb#148 + # source://activesupport/lib/active_support/xml_mini.rb#152 def rename_key(key, options = T.unsafe(nil)); end - # source://activesupport/lib/active_support/xml_mini.rb#115 + # source://activesupport/lib/active_support/xml_mini.rb#119 def to_tag(key, value, options); end - # source://activesupport/lib/active_support/xml_mini.rb#107 + # source://activesupport/lib/active_support/xml_mini.rb#111 def with_backend(name); end private - # source://activesupport/lib/active_support/xml_mini.rb#159 + # source://activesupport/lib/active_support/xml_mini.rb#163 def _dasherize(key); end - # TODO: Add support for other encodings - # - # source://activesupport/lib/active_support/xml_mini.rb#166 + # source://activesupport/lib/active_support/xml_mini.rb#169 def _parse_binary(bin, entity); end - # source://activesupport/lib/active_support/xml_mini.rb#175 + # source://activesupport/lib/active_support/xml_mini.rb#180 def _parse_file(file, entity); end - # source://activesupport/lib/active_support/xml_mini.rb#191 + # source://activesupport/lib/active_support/xml_mini.rb#188 + def _parse_hex_binary(bin); end + + # source://activesupport/lib/active_support/xml_mini.rb#200 def cast_backend_name_to_module(name); end - # source://activesupport/lib/active_support/xml_mini.rb#183 + # source://activesupport/lib/active_support/xml_mini.rb#192 def current_thread_backend; end - # source://activesupport/lib/active_support/xml_mini.rb#187 + # source://activesupport/lib/active_support/xml_mini.rb#196 def current_thread_backend=(name); end end # source://activesupport/lib/active_support/xml_mini.rb#34 ActiveSupport::XmlMini::DEFAULT_ENCODINGS = T.let(T.unsafe(nil), Hash) -# source://activesupport/lib/active_support/xml_mini.rb#55 +# source://activesupport/lib/active_support/xml_mini.rb#56 ActiveSupport::XmlMini::FORMATTING = T.let(T.unsafe(nil), Hash) # This module decorates files deserialized using Hash.from_xml with @@ -14569,7 +14722,7 @@ module ActiveSupport::XmlMini::FileLike def original_filename=(_arg0); end end -# source://activesupport/lib/active_support/xml_mini.rb#65 +# source://activesupport/lib/active_support/xml_mini.rb#67 ActiveSupport::XmlMini::PARSING = T.let(T.unsafe(nil), Hash) # source://activesupport/lib/active_support/xml_mini.rb#39 @@ -14667,7 +14820,7 @@ ActiveSupport::XmlMini_REXML::CONTENT_KEY = T.let(T.unsafe(nil), String) class Array include ::Enumerable - # source://activesupport/lib/active_support/core_ext/object/json.rb#166 + # source://activesupport/lib/active_support/core_ext/object/json.rb#164 def as_json(options = T.unsafe(nil)); end # Removes all blank elements from the +Array+ in place and returns self. @@ -14677,7 +14830,7 @@ class Array # a.compact_blank! # # => [1, 2, true] # - # source://activesupport/lib/active_support/core_ext/enumerable.rb#258 + # source://activesupport/lib/active_support/core_ext/enumerable.rb#263 def compact_blank!; end # Returns a deep copy of array. @@ -14824,6 +14977,11 @@ class Array # source://activesupport/lib/active_support/core_ext/array/inquiry.rb#16 def inquiry; end + # @return [Boolean] + # + # source://activesupport/lib/active_support/core_ext/object/blank.rb#104 + def present?; end + # Equal to self[1]. # # %w( a b c d e ).second # => "b" @@ -14873,9 +15031,6 @@ class Array # source://activesupport/lib/active_support/core_ext/array/access.rb#24 def to(position); end - # source://activesupport/lib/active_support/deprecation/method_wrappers.rb#46 - def to_default_s(*args, **_arg1, &block); end - # Extends Array#to_s to convert a collection of elements into a # comma separated id list if :db argument is given as the format. # @@ -15044,7 +15199,7 @@ class Array # # # - # source://activesupport/lib/active_support/core_ext/array/conversions.rb#185 + # source://activesupport/lib/active_support/core_ext/array/conversions.rb#183 def to_xml(options = T.unsafe(nil)); end # Returns a copy of the Array excluding the specified elements. @@ -15100,7 +15255,7 @@ class Array end end -# source://activesupport/lib/active_support/core_ext/object/json.rb#126 +# source://activesupport/lib/active_support/core_ext/object/json.rb#124 class BigDecimal < ::Numeric include ::ActiveSupport::BigDecimalWithDefaultFormat include ::ActiveSupport::NumericWithFormat @@ -15115,14 +15270,14 @@ class BigDecimal < ::Numeric # BigDecimal, it still has the chance to post-process the string and get the # real value. # - # source://activesupport/lib/active_support/core_ext/object/json.rb#136 + # source://activesupport/lib/active_support/core_ext/object/json.rb#134 def as_json(options = T.unsafe(nil)); end # source://activesupport/lib/active_support/core_ext/big_decimal/conversions.rb#8 def to_s(format = T.unsafe(nil)); end end -# source://activesupport/lib/active_support/core_ext/class/attribute.rb#5 +# source://activesupport/lib/active_support/core_ext/class/attribute.rb#6 class Class < ::Module include ::ActiveSupport::DescendantsTracker::ReloadedClassesFiltering @@ -15206,7 +15361,7 @@ class Class < ::Module # # class_attribute :settings, default: {} # - # source://activesupport/lib/active_support/core_ext/class/attribute.rb#85 + # source://activesupport/lib/active_support/core_ext/class/attribute.rb#86 def class_attribute(*attrs, instance_accessor: T.unsafe(nil), instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_predicate: T.unsafe(nil), default: T.unsafe(nil)); end # Returns an array with all classes that are < than its receiver. @@ -15223,24 +15378,16 @@ class Class < ::Module # class D < C; end # C.descendants # => [B, A, D] # - # source://activesupport/lib/active_support/descendants_tracker.rb#64 + # source://activesupport/lib/active_support/descendants_tracker.rb#63 def descendants; end - # Returns an array with the direct children of +self+. - # - # class Foo; end - # class Bar < Foo; end - # class Baz < Bar; end - # - # Foo.subclasses # => [Bar] - # - # source://activesupport/lib/active_support/descendants_tracker.rb#60 + # source://activesupport/lib/active_support/descendants_tracker.rb#59 def subclasses; end end -# source://activesupport/lib/active_support/core_ext/object/json.rb#69 +# source://activesupport/lib/active_support/core_ext/object/json.rb#68 class Data - # source://activesupport/lib/active_support/core_ext/object/json.rb#70 + # source://activesupport/lib/active_support/core_ext/object/json.rb#69 def as_json(options = T.unsafe(nil)); end end @@ -15294,7 +15441,7 @@ class Date # source://activesupport/lib/active_support/core_ext/date/calculations.rb#55 def ago(seconds); end - # source://activesupport/lib/active_support/core_ext/object/json.rb#205 + # source://activesupport/lib/active_support/core_ext/object/json.rb#211 def as_json(options = T.unsafe(nil)); end # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) @@ -15397,6 +15544,11 @@ class Date # source://activesupport/lib/active_support/core_ext/date/calculations.rb#90 def plus_with_duration(other); end + # @return [Boolean] + # + # source://activesupport/lib/active_support/core_ext/date/blank.rb#15 + def present?; end + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" # # source://activesupport/lib/active_support/core_ext/date/conversions.rb#63 @@ -15408,9 +15560,6 @@ class Date # source://activesupport/lib/active_support/core_ext/date/calculations.rb#61 def since(seconds); end - # source://activesupport/lib/active_support/deprecation/method_wrappers.rb#46 - def to_default_s(*args, **_arg1, &block); end - # Convert to a formatted string. See DATE_FORMATS for predefined formats. # # This method is aliased to to_formatted_s. @@ -15425,6 +15574,7 @@ class Date # date.to_fs(:long) # => "November 10, 2007" # date.to_fs(:long_ordinal) # => "November 10th, 2007" # date.to_fs(:rfc822) # => "10 Nov 2007" + # date.to_fs(:rfc2822) # => "10 Nov 2007" # date.to_fs(:iso8601) # => "2007-11-10" # # == Adding your own date formats to to_fs @@ -15436,7 +15586,7 @@ class Date # Date::DATE_FORMATS[:month_and_year] = '%B %Y' # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } # - # source://activesupport/lib/active_support/core_ext/date/conversions.rb#47 + # source://activesupport/lib/active_support/core_ext/date/conversions.rb#49 def to_formatted_s(format = T.unsafe(nil)); end # Convert to a formatted string. See DATE_FORMATS for predefined formats. @@ -15453,6 +15603,7 @@ class Date # date.to_fs(:long) # => "November 10, 2007" # date.to_fs(:long_ordinal) # => "November 10th, 2007" # date.to_fs(:rfc822) # => "10 Nov 2007" + # date.to_fs(:rfc2822) # => "10 Nov 2007" # date.to_fs(:iso8601) # => "2007-11-10" # # == Adding your own date formats to to_fs @@ -15464,7 +15615,7 @@ class Date # Date::DATE_FORMATS[:month_and_year] = '%B %Y' # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } # - # source://activesupport/lib/active_support/core_ext/date/conversions.rb#47 + # source://activesupport/lib/active_support/core_ext/date/conversions.rb#49 def to_fs(format = T.unsafe(nil)); end # Converts a Date instance to a Time, where the time is set to the beginning of the day. @@ -15549,7 +15700,7 @@ end # source://activesupport/lib/active_support/core_ext/date/conversions.rb#9 Date::DATE_FORMATS = T.let(T.unsafe(nil), Hash) -# source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#5 +# source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#6 module DateAndTime; end # source://activesupport/lib/active_support/core_ext/date_and_time/calculations.rb#7 @@ -16011,25 +16162,31 @@ DateAndTime::Calculations::DAYS_INTO_WEEK = T.let(T.unsafe(nil), Hash) # source://activesupport/lib/active_support/core_ext/date_and_time/calculations.rb#17 DateAndTime::Calculations::WEEKEND_DAYS = T.let(T.unsafe(nil), Array) -# source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#6 +# source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#7 module DateAndTime::Compatibility - # source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#14 + # source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#39 def preserve_timezone; end - # source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#29 + # source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#56 def utc_to_local_returns_utc_offset_times; end class << self - # source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#14 + # -- + # This re-implements the behaviour of the mattr_reader, instead + # of prepending on to it, to avoid overcomplicating a module that + # is in turn included in several places. This will all go away in + # Rails 8.0 anyway. + # + # source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#24 def preserve_timezone; end - # source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#14 + # source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#15 def preserve_timezone=(val); end - # source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#29 + # source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#56 def utc_to_local_returns_utc_offset_times; end - # source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#29 + # source://activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb#56 def utc_to_local_returns_utc_offset_times=(val); end end end @@ -16103,7 +16260,7 @@ class DateTime < ::Date # source://activesupport/lib/active_support/core_ext/date_time/calculations.rb#109 def ago(seconds); end - # source://activesupport/lib/active_support/core_ext/object/json.rb#215 + # source://activesupport/lib/active_support/core_ext/object/json.rb#221 def as_json(options = T.unsafe(nil)); end # Returns a new DateTime representing the start of the day (0:00). @@ -16219,7 +16376,7 @@ class DateTime < ::Date # datetime.formatted_offset # => "-06:00" # datetime.formatted_offset(false) # => "-0600" # - # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#55 + # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#51 def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end # Returns a Time instance of the simultaneous time in the UTC timezone. @@ -16260,7 +16417,7 @@ class DateTime < ::Date # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". # - # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#60 + # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#56 def inspect; end # Returns a Time instance of the simultaneous time in the system timezone. @@ -16290,12 +16447,17 @@ class DateTime < ::Date # Returns the fraction of a second as nanoseconds # - # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#98 + # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#94 def nsec; end + # @return [Boolean] + # + # source://activesupport/lib/active_support/core_ext/date_time/blank.rb#15 + def present?; end + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". # - # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#60 + # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#56 def readable_inspect; end # Returns the number of seconds since 00:00:00. @@ -16330,12 +16492,9 @@ class DateTime < ::Date # source://activesupport/lib/active_support/core_ext/date_time/calculations.rb#36 def subsec; end - # source://activesupport/lib/active_support/deprecation/method_wrappers.rb#46 - def to_default_s(*args, **_arg1, &block); end - # Converts +self+ to a floating-point number of seconds, including fractional microseconds, since the Unix epoch. # - # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#83 + # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#79 def to_f; end # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. @@ -16398,7 +16557,7 @@ class DateTime < ::Date # Converts +self+ to an integer number of seconds since the Unix epoch. # - # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#88 + # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#84 def to_i; end # Either return an instance of +Time+ with the same UTC offset @@ -16411,7 +16570,7 @@ class DateTime < ::Date # Returns the fraction of a second as microseconds # - # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#93 + # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#89 def usec; end # Returns a Time instance of the simultaneous time in the UTC timezone. @@ -16436,10 +16595,10 @@ class DateTime < ::Date private - # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#103 + # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#99 def offset_in_seconds; end - # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#107 + # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#103 def seconds_since_unix_epoch; end class << self @@ -16451,7 +16610,7 @@ class DateTime < ::Date # DateTime.civil_from_format :local, 2012, 12, 17 # # => Mon, 17 Dec 2012 00:00:00 +0000 # - # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#73 + # source://activesupport/lib/active_support/core_ext/date_time/conversions.rb#69 def civil_from_format(utc_or_local, year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), min = T.unsafe(nil), sec = T.unsafe(nil)); end # Returns Time.zone.now.to_datetime when Time.zone or @@ -16471,6 +16630,12 @@ end # source://activesupport/lib/active_support/core_ext/digest/uuid.rb#7 module Digest::UUID class << self + # Returns the nil UUID. This is a special form of UUID that is specified to + # have all 128 bits set to zero. + # + # source://activesupport/lib/active_support/core_ext/digest/uuid.rb#58 + def nil_uuid; end + # Generates a v5 non-random UUID (Universally Unique IDentifier). # # Using OpenSSL::Digest::MD5 generates version 3 UUIDs; OpenSSL::Digest::SHA1 generates version 5 UUIDs. @@ -16498,7 +16663,7 @@ module Digest::UUID private - # source://activesupport/lib/active_support/core_ext/digest/uuid.rb#56 + # source://activesupport/lib/active_support/core_ext/digest/uuid.rb#62 def pack_uuid_namespace(namespace); end end end @@ -16727,12 +16892,12 @@ ERB::Util::TAG_NAME_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) # source://activesupport/lib/active_support/core_ext/erb/util.rb#44 ERB::Util::TAG_NAME_START_CODEPOINTS = T.let(T.unsafe(nil), String) -# source://activesupport/lib/active_support/core_ext/object/json.rb#147 +# source://activesupport/lib/active_support/core_ext/object/json.rb#145 module Enumerable include ::ActiveSupport::ToJsonWithActiveSupportEncoder extend ::ActiveSupport::EnumerableCoreExt::Constants - # source://activesupport/lib/active_support/core_ext/object/json.rb#148 + # source://activesupport/lib/active_support/core_ext/object/json.rb#146 def as_json(options = T.unsafe(nil)); end # Returns a new +Array+ without the blank items. @@ -16781,10 +16946,11 @@ module Enumerable # # => [ Person.find(1), Person.find(5), Person.find(3) ] # # If the +series+ include keys that have no corresponding element in the Enumerable, these are ignored. - # If the Enumerable has additional elements that aren't named in the +series+, these are not included in the result. + # If the Enumerable has additional elements that aren't named in the +series+, these are not included in the result, unless + # the +filter+ option is set to +false+. # - # source://activesupport/lib/active_support/core_ext/enumerable.rb#196 - def in_order_of(key, series); end + # source://activesupport/lib/active_support/core_ext/enumerable.rb#197 + def in_order_of(key, series, filter: T.unsafe(nil)); end # Returns a new array that includes the passed elements. # @@ -16881,7 +17047,7 @@ module Enumerable # Set.new.sole # => Enumerable::SoleItemExpectedError: no item found # { a: 1, b: 2 }.sole # => Enumerable::SoleItemExpectedError: multiple items found # - # source://activesupport/lib/active_support/core_ext/enumerable.rb#206 + # source://activesupport/lib/active_support/core_ext/enumerable.rb#211 def sole; end # Returns a copy of the enumerable excluding the specified elements. @@ -16905,15 +17071,15 @@ end # source://activesupport/lib/active_support/core_ext/enumerable.rb#21 class Enumerable::SoleItemExpectedError < ::StandardError; end -# source://activesupport/lib/active_support/core_ext/object/json.rb#248 +# source://activesupport/lib/active_support/core_ext/object/json.rb#254 class Exception - # source://activesupport/lib/active_support/core_ext/object/json.rb#249 + # source://activesupport/lib/active_support/core_ext/object/json.rb#255 def as_json(options = T.unsafe(nil)); end end -# source://activesupport/lib/active_support/core_ext/object/blank.rb#61 +# source://activesupport/lib/active_support/core_ext/object/blank.rb#65 class FalseClass - # source://activesupport/lib/active_support/core_ext/object/json.rb#89 + # source://activesupport/lib/active_support/core_ext/object/json.rb#87 def as_json(options = T.unsafe(nil)); end # +false+ is blank: @@ -16922,9 +17088,14 @@ class FalseClass # # @return [true] # - # source://activesupport/lib/active_support/core_ext/object/blank.rb#67 + # source://activesupport/lib/active_support/core_ext/object/blank.rb#71 def blank?; end + # @return [Boolean] + # + # source://activesupport/lib/active_support/core_ext/object/blank.rb#75 + def present?; end + # Returns +self+. # # source://activesupport/lib/active_support/core_ext/object/to_query.rb#34 @@ -16960,14 +17131,14 @@ class File < ::IO end end -# source://activesupport/lib/active_support/core_ext/object/json.rb#118 +# source://activesupport/lib/active_support/core_ext/object/json.rb#116 class Float < ::Numeric include ::ActiveSupport::NumericWithFormat # Encoding Infinity or NaN to JSON should return "null". The default returns # "Infinity" or "NaN" which are not valid JSON. # - # source://activesupport/lib/active_support/core_ext/object/json.rb#121 + # source://activesupport/lib/active_support/core_ext/object/json.rb#119 def as_json(options = T.unsafe(nil)); end end @@ -16976,7 +17147,7 @@ class Hash include ::Enumerable include ::ActiveSupport::DeepMergeable - # source://activesupport/lib/active_support/core_ext/object/json.rb#172 + # source://activesupport/lib/active_support/core_ext/object/json.rb#175 def as_json(options = T.unsafe(nil)); end # Validates all keys in a hash match *valid_keys, raising @@ -16994,7 +17165,7 @@ class Hash # Hash#reject has its own definition, so this needs one too. # - # source://activesupport/lib/active_support/core_ext/enumerable.rb#217 + # source://activesupport/lib/active_support/core_ext/enumerable.rb#222 def compact_blank; end # Removes all blank values from the +Hash+ in place and returns self. @@ -17004,7 +17175,7 @@ class Hash # h.compact_blank! # # => { b: 1, f: true } # - # source://activesupport/lib/active_support/core_ext/enumerable.rb#227 + # source://activesupport/lib/active_support/core_ext/enumerable.rb#232 def compact_blank!; end # Returns a deep copy of hash. @@ -17113,7 +17284,7 @@ class Hash # hash.except!(:c) # => { a: true, b: false } # hash # => { a: true, b: false } # - # source://activesupport/lib/active_support/core_ext/hash/except.rb#20 + # source://activesupport/lib/active_support/core_ext/hash/except.rb#8 def except!(*keys); end # Removes and returns the key/value pairs matching the given keys. @@ -17153,6 +17324,11 @@ class Hash # source://activesupport/lib/active_support/core_ext/hash/indifferent_access.rb#9 def nested_under_indifferent_access; end + # @return [Boolean] + # + # source://activesupport/lib/active_support/core_ext/object/blank.rb#118 + def present?; end + # Merges the caller into +other_hash+. For example, # # options = options.reverse_merge(size: 25, velocity: 10) @@ -17429,7 +17605,7 @@ end # :stopdoc: # -# source://activesupport/lib/active_support/hash_with_indifferent_access.rb#443 +# source://activesupport/lib/active_support/hash_with_indifferent_access.rb#445 HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess # :enddoc: @@ -17437,46 +17613,46 @@ HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess # source://activesupport/lib/active_support/i18n_railtie.rb#8 module I18n class << self - # source://i18n/1.14.5lib/i18n/backend/cache.rb#64 + # source://i18n/1.14.6lib/i18n/backend/cache.rb#64 def cache_key_digest; end - # source://i18n/1.14.5lib/i18n/backend/cache.rb#68 + # source://i18n/1.14.6lib/i18n/backend/cache.rb#68 def cache_key_digest=(key_digest); end - # source://i18n/1.14.5lib/i18n/backend/cache.rb#56 + # source://i18n/1.14.6lib/i18n/backend/cache.rb#56 def cache_namespace; end - # source://i18n/1.14.5lib/i18n/backend/cache.rb#60 + # source://i18n/1.14.6lib/i18n/backend/cache.rb#60 def cache_namespace=(namespace); end - # source://i18n/1.14.5lib/i18n/backend/cache.rb#48 + # source://i18n/1.14.6lib/i18n/backend/cache.rb#48 def cache_store; end - # source://i18n/1.14.5lib/i18n/backend/cache.rb#52 + # source://i18n/1.14.6lib/i18n/backend/cache.rb#52 def cache_store=(store); end - # source://i18n/1.14.5lib/i18n/backend/fallbacks.rb#17 + # source://i18n/1.14.6lib/i18n/backend/fallbacks.rb#17 def fallbacks; end - # source://i18n/1.14.5lib/i18n/backend/fallbacks.rb#23 + # source://i18n/1.14.6lib/i18n/backend/fallbacks.rb#23 def fallbacks=(fallbacks); end - # source://i18n/1.14.5lib/i18n/interpolate/ruby.rb#23 + # source://i18n/1.14.6lib/i18n/interpolate/ruby.rb#23 def interpolate(string, values); end - # source://i18n/1.14.5lib/i18n/interpolate/ruby.rb#29 + # source://i18n/1.14.6lib/i18n/interpolate/ruby.rb#29 def interpolate_hash(string, values); end - # source://i18n/1.14.5lib/i18n.rb#37 + # source://i18n/1.14.6lib/i18n.rb#38 def new_double_nested_cache; end - # source://i18n/1.14.5lib/i18n/backend/cache.rb#72 + # source://i18n/1.14.6lib/i18n/backend/cache.rb#72 def perform_caching?; end - # source://i18n/1.14.5lib/i18n.rb#45 + # source://i18n/1.14.6lib/i18n.rb#46 def reserve_key(key); end - # source://i18n/1.14.5lib/i18n.rb#50 + # source://i18n/1.14.6lib/i18n.rb#51 def reserved_keys_pattern; end end end @@ -17484,34 +17660,34 @@ end # source://activesupport/lib/active_support/i18n_railtie.rb#9 class I18n::Railtie < ::Rails::Railtie class << self - # source://activesupport/lib/active_support/i18n_railtie.rb#95 + # source://activesupport/lib/active_support/i18n_railtie.rb#104 def include_fallbacks_module; end - # source://activesupport/lib/active_support/i18n_railtie.rb#99 + # source://activesupport/lib/active_support/i18n_railtie.rb#108 def init_fallbacks(fallbacks); end # Setup i18n configuration. # - # source://activesupport/lib/active_support/i18n_railtie.rb#32 + # source://activesupport/lib/active_support/i18n_railtie.rb#35 def initialize_i18n(app); end - # source://activesupport/lib/active_support/i18n_railtie.rb#80 - def setup_raise_on_missing_translations_config(app); end + # source://activesupport/lib/active_support/i18n_railtie.rb#85 + def setup_raise_on_missing_translations_config(app, strict); end - # source://activesupport/lib/active_support/i18n_railtie.rb#115 + # source://activesupport/lib/active_support/i18n_railtie.rb#124 def validate_fallbacks(fallbacks); end - # source://activesupport/lib/active_support/i18n_railtie.rb#126 + # source://activesupport/lib/active_support/i18n_railtie.rb#135 def watched_dirs_with_extensions(paths); end end end -# source://activesupport/lib/active_support/core_ext/object/json.rb#153 +# source://activesupport/lib/active_support/core_ext/object/json.rb#151 class IO include ::Enumerable include ::File::Constants - # source://activesupport/lib/active_support/core_ext/object/json.rb#154 + # source://activesupport/lib/active_support/core_ext/object/json.rb#152 def as_json(options = T.unsafe(nil)); end end @@ -17628,9 +17804,9 @@ IO::READABLE = T.let(T.unsafe(nil), Integer) class IO::TimeoutError < ::IOError; end IO::WRITABLE = T.let(T.unsafe(nil), Integer) -# source://activesupport/lib/active_support/core_ext/object/json.rb#236 +# source://activesupport/lib/active_support/core_ext/object/json.rb#242 class IPAddr - # source://activesupport/lib/active_support/core_ext/object/json.rb#237 + # source://activesupport/lib/active_support/core_ext/object/json.rb#243 def as_json(options = T.unsafe(nil)); end end @@ -17748,19 +17924,6 @@ module Kernel end end -# source://activesupport/lib/active_support/core_ext/object/duplicable.rb#31 -class Method - # Methods are not duplicable: - # - # method(:puts).duplicable? # => false - # method(:puts).dup # => TypeError: allocator undefined for Method - # - # @return [Boolean] - # - # source://activesupport/lib/active_support/core_ext/object/duplicable.rb#36 - def duplicable?; end -end - # == Attribute Accessors per Thread # # Extends the module object with class/module and instance accessors for @@ -18040,7 +18203,7 @@ class Module # ==== Options # * :to - Specifies the target object name as a symbol or string # * :prefix - Prefixes the new method with the target name or a custom prefix - # * :allow_nil - If set to true, prevents a +Module::DelegationError+ + # * :allow_nil - If set to true, prevents a +ActiveSupport::DelegationError+ # from being raised # * :private - If set to true, changes method visibility to private # @@ -18151,7 +18314,7 @@ class Module # User.new.age # => 2 # # If the target is +nil+ and does not respond to the delegated method a - # +Module::DelegationError+ is raised. If you wish to instead return +nil+, + # +ActiveSupport::DelegationError+ is raised. If you wish to instead return +nil+, # use the :allow_nil option. # # class User < ActiveRecord::Base @@ -18160,7 +18323,7 @@ class Module # end # # User.new.age - # # => Module::DelegationError: User#age delegated to profile.age, but profile is nil + # # => ActiveSupport::DelegationError: User#age delegated to profile.age, but profile is nil # # But if not having a profile yet is fine and should not be an error # condition: @@ -18188,7 +18351,7 @@ class Module # # The target method must be public, otherwise it will raise +NoMethodError+. # - # source://activesupport/lib/active_support/core_ext/module/delegation.rb#171 + # source://activesupport/lib/active_support/core_ext/module/delegation.rb#160 def delegate(*methods, to: T.unsafe(nil), prefix: T.unsafe(nil), allow_nil: T.unsafe(nil), private: T.unsafe(nil)); end # When building decorators, a common pattern may emerge: @@ -18230,7 +18393,7 @@ class Module # variables, methods, constants, etc. # # The delegated method must be public on the target, otherwise it will - # raise +DelegationError+. If you wish to instead return +nil+, + # raise +ActiveSupport::DelegationError+. If you wish to instead return +nil+, # use the :allow_nil option. # # The marshal_dump and _dump methods are exempt from @@ -18238,7 +18401,7 @@ class Module # Marshal.dump(object), should the delegation target method # of object add or remove instance variables. # - # source://activesupport/lib/active_support/core_ext/module/delegation.rb#318 + # source://activesupport/lib/active_support/core_ext/module/delegation.rb#218 def delegate_missing_to(target, allow_nil: T.unsafe(nil)); end # deprecate :foo, deprecator: MyLib.deprecator @@ -18256,7 +18419,7 @@ class Module # end # # source://activesupport/lib/active_support/core_ext/module/deprecation.rb#17 - def deprecate(*method_names, deprecator: T.unsafe(nil), **options); end + def deprecate(*method_names, deprecator:, **options); end # Defines both class and instance accessors for class attributes. # All class and instance methods created will be public, even if @@ -18708,24 +18871,17 @@ class Module private - # source://activesupport/lib/active_support/core_ext/module/attr_internal.rb#30 + # source://activesupport/lib/active_support/core_ext/module/attr_internal.rb#41 def attr_internal_define(attr_name, type); end - # source://activesupport/lib/active_support/core_ext/module/attr_internal.rb#26 - def attr_internal_ivar_name(attr); end - class << self # Returns the value of attribute attr_internal_naming_format. # - # source://activesupport/lib/active_support/core_ext/module/attr_internal.rb#22 + # source://activesupport/lib/active_support/core_ext/module/attr_internal.rb#23 def attr_internal_naming_format; end - # Sets the attribute attr_internal_naming_format - # - # @param value the value to set the attribute attr_internal_naming_format to. - # - # source://activesupport/lib/active_support/core_ext/module/attr_internal.rb#22 - def attr_internal_naming_format=(_arg0); end + # source://activesupport/lib/active_support/core_ext/module/attr_internal.rb#25 + def attr_internal_naming_format=(format); end end end @@ -18861,20 +19017,8 @@ module Module::Concerning def concerning(topic, prepend: T.unsafe(nil), &block); end end -# source://activesupport/lib/active_support/core_ext/module/delegation.rb#13 -Module::DELEGATION_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://activesupport/lib/active_support/core_ext/module/delegation.rb#14 -Module::DELEGATION_RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set) - -# Error generated by +delegate+ when a method is called on +nil+ and +allow_nil+ -# option is not used. -# -# source://activesupport/lib/active_support/core_ext/module/delegation.rb#8 -class Module::DelegationError < ::NoMethodError; end - -# source://activesupport/lib/active_support/core_ext/module/delegation.rb#10 -Module::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) +# source://activesupport/lib/active_support/core_ext/module/delegation.rb#5 +Module::DelegationError = ActiveSupport::DelegationError # source://activesupport/lib/active_support/core_ext/name_error.rb#3 class NameError < ::StandardError @@ -18918,7 +19062,7 @@ NameError::UNBOUND_METHOD_MODULE_NAME = T.let(T.unsafe(nil), UnboundMethod) # source://activesupport/lib/active_support/core_ext/object/blank.rb#50 class NilClass - # source://activesupport/lib/active_support/core_ext/object/json.rb#95 + # source://activesupport/lib/active_support/core_ext/object/json.rb#93 def as_json(options = T.unsafe(nil)); end # +nil+ is blank: @@ -18930,6 +19074,11 @@ class NilClass # source://activesupport/lib/active_support/core_ext/object/blank.rb#56 def blank?; end + # @return [Boolean] + # + # source://activesupport/lib/active_support/core_ext/object/blank.rb#60 + def present?; end + # Returns +self+. # # source://activesupport/lib/active_support/core_ext/object/to_query.rb#20 @@ -18957,11 +19106,11 @@ class NilClass def try!(*_arg0); end end -# source://activesupport/lib/active_support/core_ext/object/blank.rb#134 +# source://activesupport/lib/active_support/core_ext/object/blank.rb#170 class Numeric include ::Comparable - # source://activesupport/lib/active_support/core_ext/object/json.rb#113 + # source://activesupport/lib/active_support/core_ext/object/json.rb#111 def as_json(options = T.unsafe(nil)); end # No number is blank: @@ -18971,7 +19120,7 @@ class Numeric # # @return [false] # - # source://activesupport/lib/active_support/core_ext/object/blank.rb#141 + # source://activesupport/lib/active_support/core_ext/object/blank.rb#177 def blank?; end # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes @@ -19128,6 +19277,11 @@ class Numeric # source://activesupport/lib/active_support/core_ext/numeric/bytes.rb#55 def petabytes; end + # @return [Boolean] + # + # source://activesupport/lib/active_support/core_ext/object/blank.rb#181 + def present?; end + # Returns a Duration instance matching the number of seconds provided. # # 2.seconds # => 2 seconds @@ -19227,11 +19381,11 @@ Numeric::ZETTABYTE = T.let(T.unsafe(nil), Integer) # # source://activesupport/lib/active_support/core_ext/object/blank.rb#5 class Object < ::BasicObject - include ::ActiveSupport::ToJsonWithActiveSupportEncoder include ::ActiveSupport::Dependencies::RequireDependency include ::Kernel include ::PP::ObjectMixin include ::ActiveSupport::Tryable + include ::ActiveSupport::ToJsonWithActiveSupportEncoder # Provides a way to check whether some class acts like some other class based on the existence of # an appropriately-named marker method. @@ -19355,7 +19509,7 @@ class Object < ::BasicObject # # C.new(0, 1).instance_variable_names # => ["@y", "@x"] # - # source://activesupport/lib/active_support/core_ext/object/instance_variables.rb#30 + # source://activesupport/lib/active_support/core_ext/object/instance_variables.rb#29 def instance_variable_names; end # Returns the receiver if it's present otherwise returns +nil+. @@ -19411,11 +19565,13 @@ class Object < ::BasicObject # Set and restore public attributes around a block. # # client.timeout # => 5 - # client.with(timeout: 1) do - # client.timeout # => 1 + # client.with(timeout: 1) do |c| + # c.timeout # => 1 # end # client.timeout # => 5 # + # The receiver is yielded to the provided block. + # # This method is a shorthand for the common begin/ensure pattern: # # old_value = object.attribute @@ -19429,7 +19585,7 @@ class Object < ::BasicObject # It can be used on any object as long as both the reader and writer methods # are public. # - # source://activesupport/lib/active_support/core_ext/object/with.rb#24 + # source://activesupport/lib/active_support/core_ext/object/with.rb#26 def with(**attributes); end # An elegant way to factor duplication out of options passed to a series of @@ -19522,14 +19678,15 @@ class Object < ::BasicObject def with_options(options, &block); end end -# source://activesupport/lib/active_support/core_ext/object/json.rb#230 +# source://activesupport/lib/active_support/core_ext/object/json.rb#236 class Pathname - # source://activesupport/lib/active_support/core_ext/object/json.rb#231 + # source://activesupport/lib/active_support/core_ext/object/json.rb#237 def as_json(options = T.unsafe(nil)); end end module Process - extend ::ActiveSupport::ForkTracker::ModernCoreExt + extend ::SQLite3::ForkSafety::CoreExt + extend ::ActiveSupport::ForkTracker::CoreExt class << self # source://activesupport/lib/active_support/fork_tracker.rb#6 @@ -19537,13 +19694,13 @@ module Process end end -# source://activesupport/lib/active_support/core_ext/object/json.rb#242 +# source://activesupport/lib/active_support/core_ext/object/json.rb#248 class Process::Status - # source://activesupport/lib/active_support/core_ext/object/json.rb#243 + # source://activesupport/lib/active_support/core_ext/object/json.rb#249 def as_json(options = T.unsafe(nil)); end end -# source://activesupport/lib/active_support/core_ext/object/json.rb#159 +# source://activesupport/lib/active_support/core_ext/object/json.rb#157 class Range include ::ActiveSupport::RangeWithFormat include ::ActiveSupport::CompareWithRange @@ -19553,7 +19710,7 @@ class Range # source://activesupport/lib/active_support/core_ext/range/compare_range.rb#16 def ===(value); end - # source://activesupport/lib/active_support/core_ext/object/json.rb#160 + # source://activesupport/lib/active_support/core_ext/object/json.rb#158 def as_json(options = T.unsafe(nil)); end # source://activesupport/lib/active_support/core_ext/range/each.rb#7 @@ -19568,13 +19725,13 @@ class Range # Optimize range sum to use arithmetic progression if a block is not given and # we have a range of numeric values. # - # source://activesupport/lib/active_support/core_ext/enumerable.rb#236 + # source://activesupport/lib/active_support/core_ext/enumerable.rb#241 def sum(initial_value = T.unsafe(nil)); end end -# source://activesupport/lib/active_support/core_ext/object/json.rb#141 +# source://activesupport/lib/active_support/core_ext/object/json.rb#139 class Regexp - # source://activesupport/lib/active_support/core_ext/object/json.rb#142 + # source://activesupport/lib/active_support/core_ext/object/json.rb#140 def as_json(options = T.unsafe(nil)); end # Returns +true+ if the regexp has the multiline flag set. @@ -19594,10 +19751,33 @@ end # source://activesupport/lib/active_support/core_ext/securerandom.rb#5 module SecureRandom class << self - # source://activesupport/lib/active_support/core_ext/securerandom.rb#45 + # SecureRandom.base36 generates a random base36 string in lowercase. + # + # The argument _n_ specifies the length of the random string to be generated. + # + # If _n_ is not specified or is +nil+, 16 is assumed. It may be larger in the future. + # This method can be used over +base58+ if a deterministic case key is necessary. + # + # The result will contain alphanumeric characters in lowercase. + # + # p SecureRandom.base36 # => "4kugl2pdqmscqtje" + # p SecureRandom.base36(24) # => "77tmhrhjfvfdwodq8w7ev2m7" + # + # source://activesupport/lib/active_support/core_ext/securerandom.rb#34 def base36(n = T.unsafe(nil)); end - # source://activesupport/lib/active_support/core_ext/securerandom.rb#20 + # SecureRandom.base58 generates a random base58 string. + # + # The argument _n_ specifies the length of the random string to be generated. + # + # If _n_ is not specified or is +nil+, 16 is assumed. It may be larger in the future. + # + # The result may contain alphanumeric characters except 0, O, I, and l. + # + # p SecureRandom.base58 # => "4kUgL2pdQMSCQtjE" + # p SecureRandom.base58(24) # => "77TMHrHJFvFDwodq8w7Ev2m7" + # + # source://activesupport/lib/active_support/core_ext/securerandom.rb#19 def base58(n = T.unsafe(nil)); end end end @@ -19608,7 +19788,7 @@ SecureRandom::BASE36_ALPHABET = T.let(T.unsafe(nil), Array) # source://activesupport/lib/active_support/core_ext/securerandom.rb#6 SecureRandom::BASE58_ALPHABET = T.let(T.unsafe(nil), Array) -# source://activesupport/lib/active_support/core_ext/object/duplicable.rb#53 +# source://activesupport/lib/active_support/core_ext/object/duplicable.rb#62 module Singleton mixes_in_class_methods ::Singleton::SingletonClassMethods @@ -19618,7 +19798,7 @@ module Singleton # # @return [Boolean] # - # source://activesupport/lib/active_support/core_ext/object/duplicable.rb#57 + # source://activesupport/lib/active_support/core_ext/object/duplicable.rb#66 def duplicable?; end end @@ -19627,7 +19807,7 @@ end # # 'ScaleScore'.tableize # => "scale_scores" # -# source://activesupport/lib/active_support/core_ext/object/blank.rb#103 +# source://activesupport/lib/active_support/core_ext/object/blank.rb#135 class String include ::Comparable @@ -19638,7 +19818,7 @@ class String # source://activesupport/lib/active_support/core_ext/string/behavior.rb#5 def acts_like_string?; end - # source://activesupport/lib/active_support/core_ext/object/json.rb#101 + # source://activesupport/lib/active_support/core_ext/object/json.rb#99 def as_json(options = T.unsafe(nil)); end # If you pass a single integer, returns a substring of one character at that @@ -19683,7 +19863,7 @@ class String # # @return [true, false] # - # source://activesupport/lib/active_support/core_ext/object/blank.rb#121 + # source://activesupport/lib/active_support/core_ext/object/blank.rb#153 def blank?; end # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize @@ -19840,7 +20020,7 @@ class String # +raw+ helper in views. It is recommended that you use +sanitize+ instead of # this method. It should never be called on user input. # - # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#232 + # source://activesupport/lib/active_support/core_ext/string/output_safety.rb#225 def html_safe; end # Capitalizes the first word, turns underscores into spaces, and (by default) strips a @@ -20009,6 +20189,11 @@ class String # source://activesupport/lib/active_support/core_ext/string/inflections.rb#35 def pluralize(count = T.unsafe(nil), locale = T.unsafe(nil)); end + # @return [Boolean] + # + # source://activesupport/lib/active_support/core_ext/object/blank.rb#165 + def present?; end + # Returns a new string with all occurrences of the patterns removed. # str = "foo bar test" # str.remove(" test") # => "foo bar" @@ -20270,33 +20455,38 @@ class String def upcase_first; end end -# source://activesupport/lib/active_support/core_ext/object/blank.rb#104 +# source://activesupport/lib/active_support/core_ext/object/blank.rb#136 String::BLANK_RE = T.let(T.unsafe(nil), Regexp) -# source://activesupport/lib/active_support/core_ext/object/blank.rb#105 +# source://activesupport/lib/active_support/core_ext/object/blank.rb#137 String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map) -# source://activesupport/lib/active_support/core_ext/object/json.rb#76 +# source://activesupport/lib/active_support/core_ext/object/json.rb#74 class Struct include ::Enumerable - # source://activesupport/lib/active_support/core_ext/object/json.rb#77 + # source://activesupport/lib/active_support/core_ext/object/json.rb#75 def as_json(options = T.unsafe(nil)); end end -# source://activesupport/lib/active_support/core_ext/object/json.rb#106 +# source://activesupport/lib/active_support/core_ext/object/blank.rb#123 class Symbol include ::Comparable - # source://activesupport/lib/active_support/core_ext/object/json.rb#107 + # source://activesupport/lib/active_support/core_ext/object/json.rb#105 def as_json(options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activesupport/lib/active_support/core_ext/object/blank.rb#130 + def present?; end end class Thread - # source://activesupport/lib/active_support/isolated_execution_state.rb#9 + # source://activesupport/lib/active_support/isolated_execution_state.rb#8 def active_support_execution_state; end - # source://activesupport/lib/active_support/isolated_execution_state.rb#9 + # source://activesupport/lib/active_support/isolated_execution_state.rb#8 def active_support_execution_state=(_arg0); end end @@ -20306,27 +20496,27 @@ class Thread::Backtrace::Location def spot(ex); end end -# source://activesupport/lib/active_support/core_ext/object/blank.rb#146 +# source://activesupport/lib/active_support/core_ext/object/blank.rb#186 class Time include ::Comparable include ::DateAndTime::Zones include ::DateAndTime::Calculations include ::DateAndTime::Compatibility - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#300 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#297 def +(other); end # Time#- can also be used to determine the number of seconds between two Time instances. # We're layering on additional behavior so that ActiveSupport::TimeWithZone instances # are coerced into values that Time#- will recognize # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#323 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#320 def -(other); end # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances # can be chronologically compared with a Time # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#332 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#329 def <=>(other); end # Duck-types as a Time-like class. See Object#acts_like?. @@ -20352,80 +20542,80 @@ class Time # largest to smallest. This order can affect the result around the end of a # month. # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#202 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#194 def advance(options); end # Returns a new Time representing the time a number of seconds ago, this is basically a wrapper around the Numeric extension # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#228 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#220 def ago(seconds); end - # source://activesupport/lib/active_support/core_ext/object/json.rb#195 + # source://activesupport/lib/active_support/core_ext/object/json.rb#201 def as_json(options = T.unsafe(nil)); end # Returns a new Time representing the start of the day (0:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#241 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#238 def at_beginning_of_day; end # Returns a new Time representing the start of the hour (x:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#270 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#267 def at_beginning_of_hour; end # Returns a new Time representing the start of the minute (x:xx:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#286 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#283 def at_beginning_of_minute; end # Returns a new Time representing the end of the day, 23:59:59.999999 # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#259 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#256 def at_end_of_day; end # Returns a new Time representing the end of the hour, x:59:59.999999 # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#276 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#273 def at_end_of_hour; end # Returns a new Time representing the end of the minute, x:xx:59.999999 # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#292 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#289 def at_end_of_minute; end # Returns a new Time representing the middle of the day (12:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#249 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#246 def at_midday; end # Returns a new Time representing the middle of the day (12:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#249 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#246 def at_middle_of_day; end # Returns a new Time representing the start of the day (0:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#241 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#238 def at_midnight; end # Returns a new Time representing the middle of the day (12:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#249 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#246 def at_noon; end # Returns a new Time representing the start of the day (0:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#241 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#238 def beginning_of_day; end # Returns a new Time representing the start of the hour (x:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#270 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#267 def beginning_of_hour; end # Returns a new Time representing the start of the minute (x:xx:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#286 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#283 def beginning_of_minute; end # No Time is blank: @@ -20434,7 +20624,7 @@ class Time # # @return [false] # - # source://activesupport/lib/active_support/core_ext/object/blank.rb#152 + # source://activesupport/lib/active_support/core_ext/object/blank.rb#192 def blank?; end # Returns a new Time where one or more of the elements have been changed according @@ -20452,40 +20642,40 @@ class Time # # @raise [ArgumentError] # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#138 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#123 def change(options); end # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances # can be chronologically compared with a Time # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#332 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#329 def compare_with_coercion(other); end # Returns a new Time representing the end of the day, 23:59:59.999999 # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#259 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#256 def end_of_day; end # Returns a new Time representing the end of the hour, x:59:59.999999 # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#276 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#273 def end_of_hour; end # Returns a new Time representing the end of the minute, x:xx:59.999999 # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#292 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#289 def end_of_minute; end # Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances # can be eql? to an equivalent Time # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#347 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#349 def eql?(other); end # Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances # can be eql? to an equivalent Time # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#347 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#349 def eql_with_coercion(other); end # Returns a formatted string of the offset from UTC, or an alternative @@ -20499,73 +20689,81 @@ class Time # Returns a new Time representing the time a number of seconds since the instance time # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#233 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#225 def in(seconds); end # Returns a new Time representing the middle of the day (12:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#249 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#246 def midday; end # Returns a new Time representing the middle of the day (12:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#249 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#246 def middle_of_day; end # Returns a new Time representing the start of the day (0:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#241 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#238 def midnight; end # Time#- can also be used to determine the number of seconds between two Time instances. # We're layering on additional behavior so that ActiveSupport::TimeWithZone instances # are coerced into values that Time#- will recognize # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#323 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#320 def minus_with_coercion(other); end - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#310 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#307 def minus_with_duration(other); end - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#310 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#307 def minus_without_coercion(other); end # Returns a new time the specified number of days in the future. # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#361 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#363 def next_day(days = T.unsafe(nil)); end # Returns a new time the specified number of months in the future. # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#371 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#373 def next_month(months = T.unsafe(nil)); end # Returns a new time the specified number of years in the future. # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#381 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#383 def next_year(years = T.unsafe(nil)); end # Returns a new Time representing the middle of the day (12:00) # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#249 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#246 def noon; end - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#300 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#297 def plus_with_duration(other); end + # @return [Boolean] + # + # source://activesupport/lib/active_support/core_ext/object/blank.rb#196 + def present?; end + + # source://activesupport/lib/active_support/core_ext/time/compatibility.rb#17 + def preserve_timezone; end + # Returns a new time the specified number of days ago. # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#356 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#358 def prev_day(days = T.unsafe(nil)); end # Returns a new time the specified number of months ago. # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#366 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#368 def prev_month(months = T.unsafe(nil)); end # Returns a new time the specified number of years ago. # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#376 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#378 def prev_year(years = T.unsafe(nil)); end # Returns the fraction of a second as a +Rational+ @@ -20595,12 +20793,9 @@ class Time # Returns a new Time representing the time a number of seconds since the instance time # - # source://activesupport/lib/active_support/core_ext/time/calculations.rb#233 + # source://activesupport/lib/active_support/core_ext/time/calculations.rb#225 def since(seconds); end - # source://activesupport/lib/active_support/deprecation/method_wrappers.rb#46 - def to_default_s(*args, **_arg1, &block); end - # Converts to a formatted string. See DATE_FORMATS for built-in formats. # # This method is aliased to to_formatted_s. @@ -20616,6 +20811,7 @@ class Time # time.to_fs(:long) # => "January 18, 2007 06:10" # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" + # time.to_fs(:rfc2822) # => "Thu, 18 Jan 2007 06:10:17 -0600" # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" # # == Adding your own time formats to +to_fs+ @@ -20627,7 +20823,7 @@ class Time # Time::DATE_FORMATS[:month_and_year] = '%B %Y' # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } # - # source://activesupport/lib/active_support/core_ext/time/conversions.rb#53 + # source://activesupport/lib/active_support/core_ext/time/conversions.rb#55 def to_formatted_s(format = T.unsafe(nil)); end # Converts to a formatted string. See DATE_FORMATS for built-in formats. @@ -20645,6 +20841,7 @@ class Time # time.to_fs(:long) # => "January 18, 2007 06:10" # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" + # time.to_fs(:rfc2822) # => "Thu, 18 Jan 2007 06:10:17 -0600" # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" # # == Adding your own time formats to +to_fs+ @@ -20656,7 +20853,7 @@ class Time # Time::DATE_FORMATS[:month_and_year] = '%B %Y' # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } # - # source://activesupport/lib/active_support/core_ext/time/conversions.rb#53 + # source://activesupport/lib/active_support/core_ext/time/conversions.rb#55 def to_fs(format = T.unsafe(nil)); end # Either return +self+ or the time in the local system timezone depending @@ -20665,6 +20862,11 @@ class Time # source://activesupport/lib/active_support/core_ext/time/compatibility.rb#13 def to_time; end + private + + # source://activesupport/lib/active_support/core_ext/time/compatibility.rb#24 + def active_support_local_zone; end + class << self # Overriding case equality method so that it returns true for ActiveSupport::TimeWithZone instances # @@ -20675,13 +20877,13 @@ class Time # instances can be used when called with a single argument # # source://activesupport/lib/active_support/core_ext/time/calculations.rb#45 - def at(*args, **kwargs); end + def at(time_or_number, *args, **_arg2); end # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime # instances can be used when called with a single argument # # source://activesupport/lib/active_support/core_ext/time/calculations.rb#45 - def at_with_coercion(*args, **kwargs); end + def at_with_coercion(time_or_number, *args, **_arg2); end # Returns Time.zone.now when Time.zone or config.time_zone are set, otherwise just returns Time.now. # @@ -20810,9 +21012,9 @@ Time::COMMON_YEAR_DAYS_IN_MONTH = T.let(T.unsafe(nil), Array) # source://activesupport/lib/active_support/core_ext/time/conversions.rb#8 Time::DATE_FORMATS = T.let(T.unsafe(nil), Hash) -# source://activesupport/lib/active_support/core_ext/object/blank.rb#72 +# source://activesupport/lib/active_support/core_ext/object/blank.rb#80 class TrueClass - # source://activesupport/lib/active_support/core_ext/object/json.rb#83 + # source://activesupport/lib/active_support/core_ext/object/json.rb#81 def as_json(options = T.unsafe(nil)); end # +true+ is not blank: @@ -20821,32 +21023,24 @@ class TrueClass # # @return [false] # - # source://activesupport/lib/active_support/core_ext/object/blank.rb#78 + # source://activesupport/lib/active_support/core_ext/object/blank.rb#86 def blank?; end + # @return [Boolean] + # + # source://activesupport/lib/active_support/core_ext/object/blank.rb#90 + def present?; end + # Returns +self+. # # source://activesupport/lib/active_support/core_ext/object/to_query.rb#27 def to_param; end end -# source://activesupport/lib/active_support/core_ext/object/json.rb#224 +# source://activesupport/lib/active_support/core_ext/object/json.rb#230 class URI::Generic include ::URI::RFC2396_REGEXP - # source://activesupport/lib/active_support/core_ext/object/json.rb#225 + # source://activesupport/lib/active_support/core_ext/object/json.rb#231 def as_json(options = T.unsafe(nil)); end end - -# source://activesupport/lib/active_support/core_ext/object/duplicable.rb#41 -class UnboundMethod - # Unbound methods are not duplicable: - # - # method(:puts).unbind.duplicable? # => false - # method(:puts).unbind.dup # => TypeError: allocator undefined for UnboundMethod - # - # @return [Boolean] - # - # source://activesupport/lib/active_support/core_ext/object/duplicable.rb#46 - def duplicable?; end -end diff --git a/sorbet/rbi/gems/benchmark@0.3.0.rbi b/sorbet/rbi/gems/benchmark@0.3.0.rbi new file mode 100644 index 00000000..97a6bbf6 --- /dev/null +++ b/sorbet/rbi/gems/benchmark@0.3.0.rbi @@ -0,0 +1,600 @@ +# 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 +# "a"*1_000_000_000: +# +# 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#209 + 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#251 + 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#296 + def measure(label = T.unsafe(nil)); end + + # Returns the elapsed real time used to execute the given block. + # + # source://benchmark/lib/benchmark.rb#311 + 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#209 + 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#251 + 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#296 + def measure(label = T.unsafe(nil)); end + + # Returns the elapsed real time used to execute the given block. + # + # source://benchmark/lib/benchmark.rb#311 + 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#323 +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#331 + def initialize(width); end + + # Registers the given label and block pair in the job list. + # + # @raise [ArgumentError] + # + # source://benchmark/lib/benchmark.rb#339 + 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#351 + def list; end + + # Registers the given label and block pair in the job list. + # + # @raise [ArgumentError] + # + # source://benchmark/lib/benchmark.rb#339 + def report(label = T.unsafe(nil), &blk); end + + # Length of the widest label in the #list. + # + # source://benchmark/lib/benchmark.rb#354 + 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#361 +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#369 + def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); 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#378 + def item(label = T.unsafe(nil), *format, &blk); end + + # An array of Benchmark::Tms objects representing each item. + # + # source://benchmark/lib/benchmark.rb#388 + 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#378 + def report(label = T.unsafe(nil), *format, &blk); end +end + +# A data object, representing the times associated with a benchmark +# measurement. +# +# source://benchmark/lib/benchmark.rb#397 +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#432 + 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#480 + 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#467 + 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#474 + 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#487 + 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#441 + 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#451 + def add!(&blk); end + + # System CPU time of children + # + # source://benchmark/lib/benchmark.rb#415 + def cstime; end + + # User CPU time of children + # + # source://benchmark/lib/benchmark.rb#412 + 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: + # + # %u:: Replaced by the user CPU time, as reported by Tms#utime. + # %y:: Replaced by the system CPU time, as reported by #stime (Mnemonic: y of "s*y*stem") + # %U:: Replaced by the children's user CPU time, as reported by Tms#cutime + # %Y:: Replaced by the children's system CPU time, as reported by Tms#cstime + # %t:: Replaced by the total CPU time, as reported by Tms#total + # %r:: Replaced by the elapsed real time, as reported by Tms#real + # %n:: 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#506 + def format(format = T.unsafe(nil), *args); end + + # Label + # + # source://benchmark/lib/benchmark.rb#424 + def label; end + + # Elapsed real time + # + # source://benchmark/lib/benchmark.rb#418 + def real; end + + # System CPU time + # + # source://benchmark/lib/benchmark.rb#409 + 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#531 + def to_a; end + + # Returns a hash containing the same data as `to_a`. + # + # source://benchmark/lib/benchmark.rb#538 + def to_h; end + + # Same as #format. + # + # source://benchmark/lib/benchmark.rb#521 + def to_s; end + + # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+ + # + # source://benchmark/lib/benchmark.rb#421 + def total; end + + # User CPU time + # + # source://benchmark/lib/benchmark.rb#406 + 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 +, -, + # *, / + # + # source://benchmark/lib/benchmark.rb#559 + def memberwise(op, x); end +end + +# source://benchmark/lib/benchmark.rb#124 +Benchmark::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/builder@3.2.4.rbi b/sorbet/rbi/gems/builder@3.3.0.rbi similarity index 100% rename from sorbet/rbi/gems/builder@3.2.4.rbi rename to sorbet/rbi/gems/builder@3.3.0.rbi diff --git a/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi b/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi similarity index 99% rename from sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi rename to sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi index 87898e0a..7821ce2f 100644 --- a/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +++ b/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi @@ -148,11 +148,47 @@ module Concurrent # source://concurrent-ruby/lib/concurrent-ruby/concurrent/tvar.rb#82 def atomically; end + # Number of processors cores available for process scheduling. + # This method takes in account the CPU quota if the process is inside a cgroup with a + # dedicated CPU quota (typically Docker). + # Otherwise it returns the same value as #processor_count but as a Float. + # + # For performance reasons the calculated value will be memoized on the first + # call. + # + # @return [Float] number of available processors + # + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#194 + def available_processor_count; end + # @raise [ArgumentError] # # source://concurrent-ruby/lib/concurrent-ruby/concurrent/dataflow.rb#56 def call_dataflow(method, executor, *inputs, &block); end + # The maximum number of processors cores available for process scheduling. + # Returns `nil` if there is no enforced limit, or a `Float` if the + # process is inside a cgroup with a dedicated CPU quota (typically Docker). + # + # Note that nothing prevents setting a CPU quota higher than the actual number of + # cores on the system. + # + # For performance reasons the calculated value will be memoized on the first + # call. + # + # @return [nil, Float] Maximum number of available processors as set by a cgroup CPU quota, or nil if none set + # + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#209 + def cpu_quota; end + + # The CPU shares requested by the process. For performance reasons the calculated + # value will be memoized on the first call. + # + # @return [Float, nil] CPU shares requested by the process, or nil if not set + # + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#217 + def cpu_shares; end + # @return [Logger] Logger with provided level and output. # # source://concurrent-ruby/lib/concurrent-ruby/concurrent/concern/logging.rb#37 @@ -291,7 +327,7 @@ module Concurrent # @see http://www.unix.com/man-page/osx/1/HWPREFS/ # @see http://linux.die.net/man/8/sysctl # - # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#107 + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#181 def physical_processor_count; end # Number of processors seen by the OS and used for process scheduling. For @@ -302,18 +338,18 @@ module Concurrent # `java.lang.Runtime.getRuntime.availableProcessors` will be used. According # to the Java documentation this "value may change during a particular # invocation of the virtual machine... [applications] should therefore - # occasionally poll this property." Subsequently the result will NOT be - # memoized under JRuby. + # occasionally poll this property." We still memoize this value once under + # JRuby. # # Otherwise Ruby's Etc.nprocessors will be used. # # @return [Integer] number of processors seen by the OS or Java runtime # @see http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#availableProcessors() # - # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#86 + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#160 def processor_count; end - # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#68 + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#142 def processor_counter; end # Use logger created by #create_simple_logger to log concurrent-ruby messages. @@ -11572,19 +11608,37 @@ class Concurrent::Utility::ProcessorCounter # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#11 def initialize; end - # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#20 + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#26 + def available_processor_count; end + + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#41 + def cpu_quota; end + + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#45 + def cpu_shares; end + + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#22 def physical_processor_count; end - # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#16 + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#18 def processor_count; end private - # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#34 + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#104 + def compute_cpu_quota; end + + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#124 + def compute_cpu_shares; end + + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#59 def compute_physical_processor_count; end - # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#26 + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#51 def compute_processor_count; end + + # source://concurrent-ruby/lib/concurrent-ruby/concurrent/utility/processor_counter.rb#99 + def run(command); end end # source://concurrent-ruby/lib/concurrent-ruby/concurrent/version.rb#2 diff --git a/sorbet/rbi/gems/erubi@1.12.0.rbi b/sorbet/rbi/gems/erubi@1.13.0.rbi similarity index 91% rename from sorbet/rbi/gems/erubi@1.12.0.rbi rename to sorbet/rbi/gems/erubi@1.13.0.rbi index 7fe02484..c5f4e9a1 100644 --- a/sorbet/rbi/gems/erubi@1.12.0.rbi +++ b/sorbet/rbi/gems/erubi@1.13.0.rbi @@ -7,12 +7,16 @@ # 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#54 +# 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 '::String.new'). @@ -43,64 +47,64 @@ class Erubi::Engine # # @return [Engine] a new instance of Engine # - # source://erubi/lib/erubi.rb#94 + # 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#65 + # source://erubi/lib/erubi.rb#62 def bufvar; end # The filename of the template, if one was given. # - # source://erubi/lib/erubi.rb#62 + # 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#59 + # source://erubi/lib/erubi.rb#56 def src; end private # Add ruby code to the template # - # source://erubi/lib/erubi.rb#226 + # source://erubi/lib/erubi.rb#223 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#235 + # source://erubi/lib/erubi.rb#232 def add_expression(indicator, code); end # Add the result of Ruby expression to the template # - # source://erubi/lib/erubi.rb#244 + # source://erubi/lib/erubi.rb#241 def add_expression_result(code); end # Add the escaped result of Ruby expression to the template # - # source://erubi/lib/erubi.rb#249 + # source://erubi/lib/erubi.rb#246 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#255 + # source://erubi/lib/erubi.rb#252 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#213 + # source://erubi/lib/erubi.rb#210 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#261 + # source://erubi/lib/erubi.rb#258 def handle(indicator, code, tailch, rspace, lspace); end # Make sure that any current expression has been terminated. @@ -108,7 +112,7 @@ class Erubi::Engine # the chain_appends option is used, expressions may not be # terminated. # - # source://erubi/lib/erubi.rb#289 + # source://erubi/lib/erubi.rb#286 def terminate_expression; end # Make sure the buffer variable is the target of the next append @@ -118,13 +122,13 @@ class Erubi::Engine # This method should only be called if the block will result in # code where << will append to the bufvar. # - # source://erubi/lib/erubi.rb#271 + # source://erubi/lib/erubi.rb#268 def with_buffer; end end # The default regular expression used for scanning. # -# source://erubi/lib/erubi.rb#56 +# source://erubi/lib/erubi.rb#53 Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp) # source://erubi/lib/erubi.rb#17 diff --git a/sorbet/rbi/gems/globalid@1.2.1.rbi b/sorbet/rbi/gems/globalid@1.2.1.rbi index b8244d39..41857895 100644 --- a/sorbet/rbi/gems/globalid@1.2.1.rbi +++ b/sorbet/rbi/gems/globalid@1.2.1.rbi @@ -597,7 +597,7 @@ class URI::GID < ::URI::Generic # # Read the documentation for +parse+, +create+ and +build+ for more. # - # source://uri/0.13.0uri/generic.rb#243 + # source://uri/0.13.1lib/uri/generic.rb#243 def app; end # source://globalid/lib/global_id/uri/gid.rb#107 diff --git a/sorbet/rbi/gems/i18n@1.14.5.rbi b/sorbet/rbi/gems/i18n@1.14.6.rbi similarity index 96% rename from sorbet/rbi/gems/i18n@1.14.5.rbi rename to sorbet/rbi/gems/i18n@1.14.6.rbi index 3111dcea..a81bc8d0 100644 --- a/sorbet/rbi/gems/i18n@1.14.5.rbi +++ b/sorbet/rbi/gems/i18n@1.14.6.rbi @@ -88,7 +88,7 @@ module I18n # source://i18n/lib/i18n/interpolate/ruby.rb#29 def interpolate_hash(string, values); end - # source://i18n/lib/i18n.rb#37 + # source://i18n/lib/i18n.rb#38 def new_double_nested_cache; end # @return [Boolean] @@ -101,10 +101,10 @@ module I18n # extra keys as I18n options, you should call I18n.reserve_key # before any I18n.translate (etc) calls are made. # - # source://i18n/lib/i18n.rb#45 + # source://i18n/lib/i18n.rb#46 def reserve_key(key); end - # source://i18n/lib/i18n.rb#50 + # source://i18n/lib/i18n.rb#51 def reserved_keys_pattern; end end end @@ -124,15 +124,15 @@ module I18n::Backend::Base # # @raise [NotImplementedError] # - # source://i18n/lib/i18n/backend/base.rb#96 + # source://i18n/lib/i18n/backend/base.rb#97 def available_locales; end - # source://i18n/lib/i18n/backend/base.rb#104 + # source://i18n/lib/i18n/backend/base.rb#105 def eager_load!; end # @return [Boolean] # - # source://i18n/lib/i18n/backend/base.rb#70 + # source://i18n/lib/i18n/backend/base.rb#71 def exists?(locale, key, options = T.unsafe(nil)); end # Accepts a list of paths to translation files. Loads translations from @@ -148,10 +148,10 @@ module I18n::Backend::Base # # @raise [ArgumentError] # - # source://i18n/lib/i18n/backend/base.rb#77 + # source://i18n/lib/i18n/backend/base.rb#78 def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end - # source://i18n/lib/i18n/backend/base.rb#100 + # source://i18n/lib/i18n/backend/base.rb#101 def reload!; end # This method receives a locale, a data hash and options for storing translations. @@ -175,7 +175,7 @@ module I18n::Backend::Base # ann: 'good', john: 'big' # #=> { people: { ann: "Ann is good", john: "John is big" } } # - # source://i18n/lib/i18n/backend/base.rb#209 + # source://i18n/lib/i18n/backend/base.rb#217 def deep_interpolate(locale, data, values = T.unsafe(nil)); end # Evaluates defaults. @@ -183,12 +183,12 @@ module I18n::Backend::Base # first translation that can be resolved. Otherwise it tries to resolve # the translation directly. # - # source://i18n/lib/i18n/backend/base.rb#127 + # source://i18n/lib/i18n/backend/base.rb#128 def default(locale, object, subject, options = T.unsafe(nil)); end # @return [Boolean] # - # source://i18n/lib/i18n/backend/base.rb#110 + # source://i18n/lib/i18n/backend/base.rb#111 def eager_loaded?; end # Interpolates values into a given subject. @@ -202,7 +202,7 @@ module I18n::Backend::Base # method interpolates ["yes, %{user}", ["maybe no, %{user}", "no, %{user}"]], :user => "bartuz" # # => ["yes, bartuz", ["maybe no, bartuz", "no, bartuz"]] # - # source://i18n/lib/i18n/backend/base.rb#193 + # source://i18n/lib/i18n/backend/base.rb#201 def interpolate(locale, subject, values = T.unsafe(nil)); end # Loads a single translations file by delegating to #load_rb or @@ -212,41 +212,41 @@ module I18n::Backend::Base # # @raise [UnknownFileType] # - # source://i18n/lib/i18n/backend/base.rb#232 + # source://i18n/lib/i18n/backend/base.rb#240 def load_file(filename); end # Loads a JSON translations file. The data must have locales as # toplevel keys. # - # source://i18n/lib/i18n/backend/base.rb#268 + # source://i18n/lib/i18n/backend/base.rb#276 def load_json(filename); end # Loads a plain Ruby translations file. eval'ing the file must yield # a Hash containing translation data with locales as toplevel keys. # - # source://i18n/lib/i18n/backend/base.rb#246 + # source://i18n/lib/i18n/backend/base.rb#254 def load_rb(filename); end # Loads a YAML translations file. The data must have locales as # toplevel keys. # - # source://i18n/lib/i18n/backend/base.rb#253 + # source://i18n/lib/i18n/backend/base.rb#261 def load_yaml(filename); end # Loads a YAML translations file. The data must have locales as # toplevel keys. # - # source://i18n/lib/i18n/backend/base.rb#253 + # source://i18n/lib/i18n/backend/base.rb#261 def load_yml(filename); end # The method which actually looks up for the translation in the store. # # @raise [NotImplementedError] # - # source://i18n/lib/i18n/backend/base.rb#115 + # source://i18n/lib/i18n/backend/base.rb#116 def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end - # source://i18n/lib/i18n/backend/base.rb#300 + # source://i18n/lib/i18n/backend/base.rb#308 def pluralization_key(entry, count); end # Picks a translation from a pluralized mnemonic subkey according to English @@ -260,7 +260,7 @@ module I18n::Backend::Base # # @raise [InvalidPluralizationData] # - # source://i18n/lib/i18n/backend/base.rb#174 + # source://i18n/lib/i18n/backend/base.rb#182 def pluralize(locale, entry, count); end # Resolves a translation. @@ -268,7 +268,7 @@ module I18n::Backend::Base # given options. If it is a Proc then it will be evaluated. All other # subjects will be returned directly. # - # source://i18n/lib/i18n/backend/base.rb#149 + # source://i18n/lib/i18n/backend/base.rb#150 def resolve(locale, object, subject, options = T.unsafe(nil)); end # Resolves a translation. @@ -276,15 +276,15 @@ module I18n::Backend::Base # given options. If it is a Proc then it will be evaluated. All other # subjects will be returned directly. # - # source://i18n/lib/i18n/backend/base.rb#149 + # source://i18n/lib/i18n/backend/base.rb#150 def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end # @return [Boolean] # - # source://i18n/lib/i18n/backend/base.rb#119 + # source://i18n/lib/i18n/backend/base.rb#120 def subtrees?; end - # source://i18n/lib/i18n/backend/base.rb#281 + # source://i18n/lib/i18n/backend/base.rb#289 def translate_localization_format(locale, object, format, options); end end @@ -448,10 +448,10 @@ end module I18n::Backend::Fallbacks # @return [Boolean] # - # source://i18n/lib/i18n/backend/fallbacks.rb#94 + # source://i18n/lib/i18n/backend/fallbacks.rb#98 def exists?(locale, key, options = T.unsafe(nil)); end - # source://i18n/lib/i18n/backend/fallbacks.rb#85 + # source://i18n/lib/i18n/backend/fallbacks.rb#89 def extract_non_symbol_default!(options); end # source://i18n/lib/i18n/backend/fallbacks.rb#67 @@ -475,7 +475,7 @@ module I18n::Backend::Fallbacks # Overwrite on_fallback to add specified logic when the fallback succeeds. # - # source://i18n/lib/i18n/backend/fallbacks.rb#110 + # source://i18n/lib/i18n/backend/fallbacks.rb#114 def on_fallback(_original_locale, _fallback_locale, _key, _options); end end @@ -1061,14 +1061,14 @@ end # The implementation is provided by a Implementation module allowing to easily # extend Simple backend's behavior by including modules. E.g.: # -# module I18n::Backend::Pluralization -# def pluralize(*args) -# # extended pluralization logic -# super -# end -# end +# module I18n::Backend::Pluralization +# def pluralize(*args) +# # extended pluralization logic +# super +# end +# end # -# I18n::Backend::Simple.include(I18n::Backend::Pluralization) +# I18n::Backend::Simple.include(I18n::Backend::Pluralization) # # source://i18n/lib/i18n/backend/simple.rb#21 class I18n::Backend::Simple @@ -1193,69 +1193,69 @@ class I18n::Backend::Transliterator::ProcTransliterator def transliterate(string, replacement = T.unsafe(nil)); end end -# source://i18n/lib/i18n.rb#54 +# source://i18n/lib/i18n.rb#55 module I18n::Base - # source://i18n/lib/i18n.rb#69 + # source://i18n/lib/i18n.rb#70 def available_locales; end - # source://i18n/lib/i18n.rb#73 + # source://i18n/lib/i18n.rb#74 def available_locales=(value); end # @return [Boolean] # - # source://i18n/lib/i18n.rb#384 + # source://i18n/lib/i18n.rb#386 def available_locales_initialized?; end - # source://i18n/lib/i18n.rb#69 + # source://i18n/lib/i18n.rb#70 def backend; end - # source://i18n/lib/i18n.rb#73 + # source://i18n/lib/i18n.rb#74 def backend=(value); end # Gets I18n configuration object. # - # source://i18n/lib/i18n.rb#56 + # source://i18n/lib/i18n.rb#57 def config; end # Sets I18n configuration object. # - # source://i18n/lib/i18n.rb#61 + # source://i18n/lib/i18n.rb#62 def config=(value); end - # source://i18n/lib/i18n.rb#69 + # source://i18n/lib/i18n.rb#70 def default_locale; end - # source://i18n/lib/i18n.rb#73 + # source://i18n/lib/i18n.rb#74 def default_locale=(value); end - # source://i18n/lib/i18n.rb#69 + # source://i18n/lib/i18n.rb#70 def default_separator; end - # source://i18n/lib/i18n.rb#73 + # source://i18n/lib/i18n.rb#74 def default_separator=(value); end # Tells the backend to load translations now. Used in situations like the # Rails production environment. Backends can implement whatever strategy # is useful. # - # source://i18n/lib/i18n.rb#90 + # source://i18n/lib/i18n.rb#91 def eager_load!; end - # source://i18n/lib/i18n.rb#69 + # source://i18n/lib/i18n.rb#70 def enforce_available_locales; end # Raises an InvalidLocale exception when the passed locale is not available. # - # source://i18n/lib/i18n.rb#378 + # source://i18n/lib/i18n.rb#380 def enforce_available_locales!(locale); end - # source://i18n/lib/i18n.rb#73 + # source://i18n/lib/i18n.rb#74 def enforce_available_locales=(value); end - # source://i18n/lib/i18n.rb#69 + # source://i18n/lib/i18n.rb#70 def exception_handler; end - # source://i18n/lib/i18n.rb#73 + # source://i18n/lib/i18n.rb#74 def exception_handler=(value); end # Returns true if a translation exists for a given key, otherwise returns false. @@ -1263,7 +1263,7 @@ module I18n::Base # @raise [Disabled] # @return [Boolean] # - # source://i18n/lib/i18n.rb#264 + # source://i18n/lib/i18n.rb#265 def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end # Returns an array of interpolation keys for the given translation key @@ -1288,26 +1288,26 @@ module I18n::Base # # @raise [I18n::ArgumentError] # - # source://i18n/lib/i18n.rb#253 + # source://i18n/lib/i18n.rb#254 def interpolation_keys(key, **options); end # Localizes certain objects, such as dates and numbers to local formatting. # # @raise [Disabled] # - # source://i18n/lib/i18n.rb#333 + # source://i18n/lib/i18n.rb#335 def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end - # source://i18n/lib/i18n.rb#69 + # source://i18n/lib/i18n.rb#70 def load_path; end - # source://i18n/lib/i18n.rb#73 + # source://i18n/lib/i18n.rb#74 def load_path=(value); end - # source://i18n/lib/i18n.rb#69 + # source://i18n/lib/i18n.rb#70 def locale; end - # source://i18n/lib/i18n.rb#73 + # source://i18n/lib/i18n.rb#74 def locale=(value); end # Returns true when the passed locale, which can be either a String or a @@ -1315,28 +1315,28 @@ module I18n::Base # # @return [Boolean] # - # source://i18n/lib/i18n.rb#373 + # source://i18n/lib/i18n.rb#375 def locale_available?(locale); end # Localizes certain objects, such as dates and numbers to local formatting. # # @raise [Disabled] # - # source://i18n/lib/i18n.rb#333 + # source://i18n/lib/i18n.rb#335 def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end # Merges the given locale, key and scope into a single array of keys. # Splits keys that contain dots into multiple keys. Makes sure all # keys are Symbols. # - # source://i18n/lib/i18n.rb#361 + # source://i18n/lib/i18n.rb#363 def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end # Tells the backend to reload translations. Used in situations like the # Rails development environment. Backends can implement whatever strategy # is useful. # - # source://i18n/lib/i18n.rb#82 + # source://i18n/lib/i18n.rb#83 def reload!; end # Translates, pluralizes and interpolates a given key using a given locale, @@ -1409,7 +1409,7 @@ module I18n::Base # or default if no translations for :foo and :bar were found. # I18n.t :foo, :default => [:bar, 'default'] # - # *BULK LOOKUP* + # BULK LOOKUP # # This returns an array with the translations for :foo and :bar. # I18n.t [:foo, :bar] @@ -1428,7 +1428,7 @@ module I18n::Base # E.g. assuming the key :salutation resolves to: # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } # - # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". # # Note that the string returned by lambda will go through string interpolation too, # so the following lambda would give the same result: @@ -1440,7 +1440,7 @@ module I18n::Base # always return the same translations/values per unique combination of argument # values. # - # *Ruby 2.7+ keyword arguments warning* + # Ruby 2.7+ keyword arguments warning # # This method uses keyword arguments. # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 @@ -1457,13 +1457,13 @@ module I18n::Base # # @raise [Disabled] # - # source://i18n/lib/i18n.rb#210 + # source://i18n/lib/i18n.rb#211 def t(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end # Wrapper for translate that adds :raise => true. With # this option, if no translation is found, it will raise I18n::MissingTranslationData # - # source://i18n/lib/i18n.rb#229 + # source://i18n/lib/i18n.rb#230 def t!(key, **options); end # Translates, pluralizes and interpolates a given key using a given locale, @@ -1536,7 +1536,7 @@ module I18n::Base # or default if no translations for :foo and :bar were found. # I18n.t :foo, :default => [:bar, 'default'] # - # *BULK LOOKUP* + # BULK LOOKUP # # This returns an array with the translations for :foo and :bar. # I18n.t [:foo, :bar] @@ -1555,7 +1555,7 @@ module I18n::Base # E.g. assuming the key :salutation resolves to: # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } # - # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". # # Note that the string returned by lambda will go through string interpolation too, # so the following lambda would give the same result: @@ -1567,7 +1567,7 @@ module I18n::Base # always return the same translations/values per unique combination of argument # values. # - # *Ruby 2.7+ keyword arguments warning* + # Ruby 2.7+ keyword arguments warning # # This method uses keyword arguments. # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 @@ -1584,13 +1584,13 @@ module I18n::Base # # @raise [Disabled] # - # source://i18n/lib/i18n.rb#210 + # source://i18n/lib/i18n.rb#211 def translate(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end # Wrapper for translate that adds :raise => true. With # this option, if no translation is found, it will raise I18n::MissingTranslationData # - # source://i18n/lib/i18n.rb#229 + # source://i18n/lib/i18n.rb#230 def translate!(key, **options); end # Transliterates UTF-8 characters to ASCII. By default this method will @@ -1645,12 +1645,12 @@ module I18n::Base # I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen" # I18n.transliterate("Jürgen", :locale => :de) # => "Juergen" # - # source://i18n/lib/i18n.rb#322 + # source://i18n/lib/i18n.rb#324 def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end # Executes block with given I18n.locale set. # - # source://i18n/lib/i18n.rb#344 + # source://i18n/lib/i18n.rb#346 def with_locale(tmp_locale = T.unsafe(nil)); end private @@ -1674,16 +1674,16 @@ module I18n::Base # I18n.exception_handler = I18nExceptionHandler.new # an object # I18n.exception_handler.call(exception, locale, key, options) # will be called like this # - # source://i18n/lib/i18n.rb#420 + # source://i18n/lib/i18n.rb#422 def handle_exception(handling, exception, locale, key, options); end - # source://i18n/lib/i18n.rb#462 + # source://i18n/lib/i18n.rb#464 def interpolation_keys_from_translation(translation); end - # source://i18n/lib/i18n.rb#438 + # source://i18n/lib/i18n.rb#440 def normalize_key(key, separator); end - # source://i18n/lib/i18n.rb#390 + # source://i18n/lib/i18n.rb#392 def translate_key(key, throw, raise, locale, backend, options); end end @@ -1845,7 +1845,7 @@ class I18n::Disabled < ::I18n::ArgumentError def initialize(method); end end -# source://i18n/lib/i18n.rb#35 +# source://i18n/lib/i18n.rb#36 I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash) # source://i18n/lib/i18n/exceptions.rb#6 diff --git a/sorbet/rbi/gems/mail@2.8.1.rbi b/sorbet/rbi/gems/mail@2.8.1.rbi index 1ba496ce..2bf651c6 100644 --- a/sorbet/rbi/gems/mail@2.8.1.rbi +++ b/sorbet/rbi/gems/mail@2.8.1.rbi @@ -128,7 +128,7 @@ module Mail # source://mail/lib/mail/mail.rb#151 def first(*args, &block); end - # source://actionmailbox/7.1.3.3lib/action_mailbox/mail_ext/from_source.rb#4 + # source://actionmailbox/8.0.0.beta1lib/action_mailbox/mail_ext/from_source.rb#4 def from_source(source); end # source://mail/lib/mail/mail.rb#233 @@ -277,7 +277,7 @@ class Mail::Address # source://mail/lib/mail/elements/address.rb#25 def initialize(value = T.unsafe(nil)); end - # source://actionmailbox/7.1.3.3lib/action_mailbox/mail_ext/address_equality.rb#5 + # source://actionmailbox/8.0.0.beta1lib/action_mailbox/mail_ext/address_equality.rb#5 def ==(other_address); end # Returns the address that is in the address itself. That is, the @@ -426,7 +426,7 @@ class Mail::Address def strip_domain_comments(value); end class << self - # source://actionmailbox/7.1.3.3lib/action_mailbox/mail_ext/address_wrapping.rb#5 + # source://actionmailbox/8.0.0.beta1lib/action_mailbox/mail_ext/address_wrapping.rb#5 def wrap(address); end end end @@ -3551,7 +3551,7 @@ class Mail::Message # source://mail/lib/mail/message.rb#512 def bcc=(val); end - # source://actionmailbox/7.1.3.3lib/action_mailbox/mail_ext/addresses.rb#21 + # source://actionmailbox/8.0.0.beta1lib/action_mailbox/mail_ext/addresses.rb#21 def bcc_addresses; end # Returns an array of addresses (the encoded value) in the Bcc field, @@ -3660,7 +3660,7 @@ class Mail::Message # source://mail/lib/mail/message.rb#553 def cc=(val); end - # source://actionmailbox/7.1.3.3lib/action_mailbox/mail_ext/addresses.rb#17 + # source://actionmailbox/8.0.0.beta1lib/action_mailbox/mail_ext/addresses.rb#17 def cc_addresses; end # Returns an array of addresses (the encoded value) in the Cc field, @@ -3979,7 +3979,7 @@ class Mail::Message # source://mail/lib/mail/message.rb#670 def from=(val); end - # source://actionmailbox/7.1.3.3lib/action_mailbox/mail_ext/addresses.rb#5 + # source://actionmailbox/8.0.0.beta1lib/action_mailbox/mail_ext/addresses.rb#5 def from_address; end # Returns an array of addresses (the encoded value) in the From field, @@ -4372,10 +4372,10 @@ class Mail::Message # source://mail/lib/mail/message.rb#751 def received=(val); end - # source://actionmailbox/7.1.3.3lib/action_mailbox/mail_ext/recipients.rb#5 + # source://actionmailbox/8.0.0.beta1lib/action_mailbox/mail_ext/recipients.rb#5 def recipients; end - # source://actionmailbox/7.1.3.3lib/action_mailbox/mail_ext/addresses.rb#9 + # source://actionmailbox/8.0.0.beta1lib/action_mailbox/mail_ext/addresses.rb#9 def recipients_addresses; end # source://mail/lib/mail/message.rb#755 @@ -4846,7 +4846,7 @@ class Mail::Message # source://mail/lib/mail/message.rb#1193 def to=(val); end - # source://actionmailbox/7.1.3.3lib/action_mailbox/mail_ext/addresses.rb#13 + # source://actionmailbox/8.0.0.beta1lib/action_mailbox/mail_ext/addresses.rb#13 def to_addresses; end # Returns an array of addresses (the encoded value) in the To field, @@ -4870,10 +4870,10 @@ class Mail::Message # source://mail/lib/mail/message.rb#1811 def without_attachments!; end - # source://actionmailbox/7.1.3.3lib/action_mailbox/mail_ext/addresses.rb#29 + # source://actionmailbox/8.0.0.beta1lib/action_mailbox/mail_ext/addresses.rb#29 def x_forwarded_to_addresses; end - # source://actionmailbox/7.1.3.3lib/action_mailbox/mail_ext/addresses.rb#25 + # source://actionmailbox/8.0.0.beta1lib/action_mailbox/mail_ext/addresses.rb#25 def x_original_to_addresses; end private @@ -4896,7 +4896,7 @@ class Mail::Message # source://mail/lib/mail/message.rb#2056 def add_required_message_fields; end - # source://actionmailbox/7.1.3.3lib/action_mailbox/mail_ext/addresses.rb#34 + # source://actionmailbox/8.0.0.beta1lib/action_mailbox/mail_ext/addresses.rb#34 def address_list(obj); end # source://mail/lib/mail/message.rb#2025 diff --git a/sorbet/rbi/gems/minitest@5.23.0.rbi b/sorbet/rbi/gems/minitest@5.25.1.rbi similarity index 78% rename from sorbet/rbi/gems/minitest@5.23.0.rbi rename to sorbet/rbi/gems/minitest@5.25.1.rbi index d22e60a8..b58620ac 100644 --- a/sorbet/rbi/gems/minitest@5.23.0.rbi +++ b/sorbet/rbi/gems/minitest@5.25.1.rbi @@ -13,7 +13,7 @@ module Minitest # Internal run method. Responsible for telling all Runnable # sub-classes to run. # - # source://minitest/lib/minitest.rb#197 + # source://minitest/lib/minitest.rb#322 def __run(reporter, options); end # A simple hook allowing you to run a block of code after everything @@ -21,7 +21,7 @@ module Minitest # # Minitest.after_run { p $debugging_info } # - # source://minitest/lib/minitest.rb#97 + # source://minitest/lib/minitest.rb#96 def after_run(&block); end # source://minitest/lib/minitest.rb#19 @@ -44,10 +44,10 @@ module Minitest # source://minitest/lib/minitest.rb#18 def cattr_accessor(name); end - # source://minitest/lib/minitest.rb#1178 + # source://minitest/lib/minitest.rb#1215 def clock_time; end - # source://minitest/lib/minitest.rb#177 + # source://minitest/lib/minitest.rb#302 def empty_run!(options); end # source://minitest/lib/minitest.rb#19 @@ -56,7 +56,7 @@ module Minitest # source://minitest/lib/minitest.rb#19 def extensions=(_arg0); end - # source://minitest/lib/minitest.rb#306 + # source://minitest/lib/minitest.rb#335 def filter_backtrace(bt); end # source://minitest/lib/minitest.rb#19 @@ -65,7 +65,7 @@ module Minitest # source://minitest/lib/minitest.rb#19 def info_signal=(_arg0); end - # source://minitest/lib/minitest.rb#101 + # source://minitest/lib/minitest.rb#124 def init_plugins(options); end # source://minitest/lib/minitest.rb#108 @@ -77,9 +77,14 @@ module Minitest # source://minitest/lib/minitest.rb#19 def parallel_executor=(_arg0); end - # source://minitest/lib/minitest.rb#210 + # source://minitest/lib/minitest.rb#142 def process_args(args = T.unsafe(nil)); end + # Register a plugin to be used. Does NOT require / load it. + # + # source://minitest/lib/minitest.rb#103 + def register_plugin(name_or_mod); end + # source://minitest/lib/minitest.rb#19 def reporter; end @@ -94,6 +99,9 @@ module Minitest # # Minitest.autorun # Minitest.run(args) + # Minitest.load_plugins + # Minitest.process_args + # Minitest.init_plugins # Minitest.__run(reporter, options) # Runnable.runnables.each # runnable_klass.run(reporter, options) @@ -102,10 +110,10 @@ module Minitest # Minitest.run_one_method(klass, runnable_method) # klass.new(runnable_method).run # - # source://minitest/lib/minitest.rb#143 + # source://minitest/lib/minitest.rb#268 def run(args = T.unsafe(nil)); end - # source://minitest/lib/minitest.rb#1169 + # source://minitest/lib/minitest.rb#1206 def run_one_method(klass, method_name); end # source://minitest/lib/minitest.rb#19 @@ -119,24 +127,24 @@ end # Defines the API for Reporters. Subclass this and override whatever # you want. Go nuts. # -# source://minitest/lib/minitest.rb#652 +# source://minitest/lib/minitest.rb#686 class Minitest::AbstractReporter # @return [AbstractReporter] a new instance of AbstractReporter # - # source://minitest/lib/minitest.rb#654 + # source://minitest/lib/minitest.rb#688 def initialize; end # Did this run pass? # # @return [Boolean] # - # source://minitest/lib/minitest.rb#689 + # source://minitest/lib/minitest.rb#723 def passed?; end # About to start running a test. This allows a reporter to show # that it is starting or that we are in the middle of a test run. # - # source://minitest/lib/minitest.rb#668 + # source://minitest/lib/minitest.rb#702 def prerecord(klass, name); end # Output and record the result of the test. Call @@ -144,43 +152,43 @@ class Minitest::AbstractReporter # result character string. Stores the result of the run if the run # did not pass. # - # source://minitest/lib/minitest.rb#677 + # source://minitest/lib/minitest.rb#711 def record(result); end # Outputs the summary of the run. # - # source://minitest/lib/minitest.rb#683 + # source://minitest/lib/minitest.rb#717 def report; end # Starts reporting on the run. # - # source://minitest/lib/minitest.rb#661 + # source://minitest/lib/minitest.rb#695 def start; end - # source://minitest/lib/minitest.rb#693 + # source://minitest/lib/minitest.rb#727 def synchronize(&block); end end # Represents run failures. # -# source://minitest/lib/minitest.rb#985 +# source://minitest/lib/minitest.rb#1019 class Minitest::Assertion < ::Exception - # source://minitest/lib/minitest.rb#988 + # source://minitest/lib/minitest.rb#1022 def error; end # Where was this run before an assertion was raised? # - # source://minitest/lib/minitest.rb#995 + # source://minitest/lib/minitest.rb#1029 def location; end - # source://minitest/lib/minitest.rb#1003 + # source://minitest/lib/minitest.rb#1037 def result_code; end - # source://minitest/lib/minitest.rb#1007 + # source://minitest/lib/minitest.rb#1041 def result_label; end end -# source://minitest/lib/minitest.rb#986 +# source://minitest/lib/minitest.rb#1020 Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) # Minitest Assertions. All assertion methods accept a +msg+ which is @@ -192,22 +200,22 @@ Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) # provided by the thing including Assertions. See Minitest::Runnable # for an example. # -# source://minitest/lib/minitest/assertions.rb#18 +# source://minitest/lib/minitest/assertions.rb#16 module Minitest::Assertions - # source://minitest/lib/minitest/assertions.rb#188 + # source://minitest/lib/minitest/assertions.rb#181 def _synchronize; end - # source://minitest/lib/minitest/assertions.rb#201 + # source://minitest/lib/minitest/assertions.rb#194 def _where; end # Fails unless +test+ is truthy. # - # source://minitest/lib/minitest/assertions.rb#178 + # source://minitest/lib/minitest/assertions.rb#171 def assert(test, msg = T.unsafe(nil)); end # Fails unless +obj+ is empty. # - # source://minitest/lib/minitest/assertions.rb#195 + # source://minitest/lib/minitest/assertions.rb#188 def assert_empty(obj, msg = T.unsafe(nil)); end # Fails unless exp == act printing the difference between @@ -222,7 +230,7 @@ module Minitest::Assertions # # See also: Minitest::Assertions.diff # - # source://minitest/lib/minitest/assertions.rb#221 + # source://minitest/lib/minitest/assertions.rb#214 def assert_equal(exp, act, msg = T.unsafe(nil)); end # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ @@ -230,45 +238,45 @@ module Minitest::Assertions # # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 # - # source://minitest/lib/minitest/assertions.rb#242 + # source://minitest/lib/minitest/assertions.rb#235 def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end # For comparing Floats. Fails unless +exp+ and +act+ have a relative # error less than +epsilon+. # - # source://minitest/lib/minitest/assertions.rb#254 + # source://minitest/lib/minitest/assertions.rb#247 def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails unless +collection+ includes +obj+. # - # source://minitest/lib/minitest/assertions.rb#261 + # source://minitest/lib/minitest/assertions.rb#254 def assert_includes(collection, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is an instance of +cls+. # - # source://minitest/lib/minitest/assertions.rb#272 + # source://minitest/lib/minitest/assertions.rb#265 def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is a kind of +cls+. # - # source://minitest/lib/minitest/assertions.rb#283 + # source://minitest/lib/minitest/assertions.rb#276 def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end # Fails unless +matcher+ =~ +obj+. # - # source://minitest/lib/minitest/assertions.rb#293 + # source://minitest/lib/minitest/assertions.rb#287 def assert_match(matcher, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is nil # - # source://minitest/lib/minitest/assertions.rb#305 + # source://minitest/lib/minitest/assertions.rb#299 def assert_nil(obj, msg = T.unsafe(nil)); end # For testing with binary operators. Eg: # # assert_operator 5, :<=, 4 # - # source://minitest/lib/minitest/assertions.rb#315 + # source://minitest/lib/minitest/assertions.rb#309 def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if stdout or stderr do not output the expected results. @@ -282,12 +290,12 @@ module Minitest::Assertions # # See also: #assert_silent # - # source://minitest/lib/minitest/assertions.rb#333 + # source://minitest/lib/minitest/assertions.rb#327 def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end # Fails unless +path+ exists. # - # source://minitest/lib/minitest/assertions.rb#357 + # source://minitest/lib/minitest/assertions.rb#351 def assert_path_exists(path, msg = T.unsafe(nil)); end # For testing with pattern matching (only supported with Ruby 3.0 and later) @@ -305,7 +313,7 @@ module Minitest::Assertions # # @raise [NotImplementedError] # - # source://minitest/lib/minitest/assertions.rb#376 + # source://minitest/lib/minitest/assertions.rb#370 def assert_pattern; end # For testing with predicates. Eg: @@ -316,7 +324,7 @@ module Minitest::Assertions # # str.must_be :empty? # - # source://minitest/lib/minitest/assertions.rb#397 + # source://minitest/lib/minitest/assertions.rb#391 def assert_predicate(o1, op, msg = T.unsafe(nil)); end # Fails unless the block raises one of +exp+. Returns the @@ -340,37 +348,37 @@ module Minitest::Assertions # # assert_equal 'This is really bad', error.message # - # source://minitest/lib/minitest/assertions.rb#424 + # source://minitest/lib/minitest/assertions.rb#418 def assert_raises(*exp); end # Fails unless +obj+ responds to +meth+. # include_all defaults to false to match Object#respond_to? # - # source://minitest/lib/minitest/assertions.rb#456 + # source://minitest/lib/minitest/assertions.rb#450 def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end # Fails unless +exp+ and +act+ are #equal? # - # source://minitest/lib/minitest/assertions.rb#466 + # source://minitest/lib/minitest/assertions.rb#460 def assert_same(exp, act, msg = T.unsafe(nil)); end # +send_ary+ is a receiver, message and arguments. # # Fails unless the call returns a true value # - # source://minitest/lib/minitest/assertions.rb#479 + # source://minitest/lib/minitest/assertions.rb#473 def assert_send(send_ary, m = T.unsafe(nil)); end # Fails if the block outputs anything to stderr or stdout. # # See also: #assert_output # - # source://minitest/lib/minitest/assertions.rb#493 + # source://minitest/lib/minitest/assertions.rb#488 def assert_silent; end # Fails unless the block throws +sym+ # - # source://minitest/lib/minitest/assertions.rb#502 + # source://minitest/lib/minitest/assertions.rb#497 def assert_throws(sym, msg = T.unsafe(nil)); end # Captures $stdout and $stderr into strings: @@ -387,7 +395,7 @@ module Minitest::Assertions # capture IO for subprocesses. Use #capture_subprocess_io for # that. # - # source://minitest/lib/minitest/assertions.rb#543 + # source://minitest/lib/minitest/assertions.rb#538 def capture_io; end # Captures $stdout and $stderr into strings, using Tempfile to @@ -404,7 +412,7 @@ module Minitest::Assertions # NOTE: This method is approximately 10x slower than #capture_io so # only use it when you need to test the output of a subprocess. # - # source://minitest/lib/minitest/assertions.rb#576 + # source://minitest/lib/minitest/assertions.rb#571 def capture_subprocess_io; end # Returns a diff between +exp+ and +act+. If there is no known @@ -414,29 +422,29 @@ module Minitest::Assertions # # See +things_to_diff+ for more info. # - # source://minitest/lib/minitest/assertions.rb#59 + # source://minitest/lib/minitest/assertions.rb#57 def diff(exp, act); end # Returns details for exception +e+ # - # source://minitest/lib/minitest/assertions.rb#608 + # source://minitest/lib/minitest/assertions.rb#603 def exception_details(e, msg); end # Fails after a given date (in the local time zone). This allows # you to put time-bombs in your tests if you need to keep # something around until a later date lest you forget about it. # - # source://minitest/lib/minitest/assertions.rb#624 + # source://minitest/lib/minitest/assertions.rb#619 def fail_after(y, m, d, msg); end # Fails with +msg+. # - # source://minitest/lib/minitest/assertions.rb#631 + # source://minitest/lib/minitest/assertions.rb#626 def flunk(msg = T.unsafe(nil)); end # Returns a proc that will output +msg+ along with the default message. # - # source://minitest/lib/minitest/assertions.rb#639 + # source://minitest/lib/minitest/assertions.rb#634 def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end # This returns a human-readable version of +obj+. By default @@ -445,7 +453,7 @@ module Minitest::Assertions # # See Minitest::Test.make_my_diffs_pretty! # - # source://minitest/lib/minitest/assertions.rb#129 + # source://minitest/lib/minitest/assertions.rb#127 def mu_pp(obj); end # This returns a diff-able more human-readable version of +obj+. @@ -453,67 +461,67 @@ module Minitest::Assertions # newlines and makes hex-values (like object_ids) generic. This # uses mu_pp to do the first pass and then cleans it up. # - # source://minitest/lib/minitest/assertions.rb#152 + # source://minitest/lib/minitest/assertions.rb#145 def mu_pp_for_diff(obj); end # used for counting assertions # - # source://minitest/lib/minitest/assertions.rb#650 + # source://minitest/lib/minitest/assertions.rb#645 def pass(_msg = T.unsafe(nil)); end # Fails if +test+ is truthy. # - # source://minitest/lib/minitest/assertions.rb#657 + # source://minitest/lib/minitest/assertions.rb#652 def refute(test, msg = T.unsafe(nil)); end # Fails if +obj+ is empty. # - # source://minitest/lib/minitest/assertions.rb#665 + # source://minitest/lib/minitest/assertions.rb#660 def refute_empty(obj, msg = T.unsafe(nil)); end # Fails if exp == act. # # For floats use refute_in_delta. # - # source://minitest/lib/minitest/assertions.rb#676 + # source://minitest/lib/minitest/assertions.rb#671 def refute_equal(exp, act, msg = T.unsafe(nil)); end # For comparing Floats. Fails if +exp+ is within +delta+ of +act+. # # refute_in_delta Math::PI, (22.0 / 7.0) # - # source://minitest/lib/minitest/assertions.rb#688 + # source://minitest/lib/minitest/assertions.rb#683 def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end # For comparing Floats. Fails if +exp+ and +act+ have a relative error # less than +epsilon+. # - # source://minitest/lib/minitest/assertions.rb#700 + # source://minitest/lib/minitest/assertions.rb#695 def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if +collection+ includes +obj+. # - # source://minitest/lib/minitest/assertions.rb#707 + # source://minitest/lib/minitest/assertions.rb#702 def refute_includes(collection, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is an instance of +cls+. # - # source://minitest/lib/minitest/assertions.rb#718 + # source://minitest/lib/minitest/assertions.rb#713 def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is a kind of +cls+. # - # source://minitest/lib/minitest/assertions.rb#728 + # source://minitest/lib/minitest/assertions.rb#723 def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end # Fails if +matcher+ =~ +obj+. # - # source://minitest/lib/minitest/assertions.rb#736 + # source://minitest/lib/minitest/assertions.rb#731 def refute_match(matcher, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is nil. # - # source://minitest/lib/minitest/assertions.rb#746 + # source://minitest/lib/minitest/assertions.rb#741 def refute_nil(obj, msg = T.unsafe(nil)); end # Fails if +o1+ is not +op+ +o2+. Eg: @@ -521,12 +529,12 @@ module Minitest::Assertions # refute_operator 1, :>, 2 #=> pass # refute_operator 1, :<, 2 #=> fail # - # source://minitest/lib/minitest/assertions.rb#781 + # source://minitest/lib/minitest/assertions.rb#776 def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if +path+ exists. # - # source://minitest/lib/minitest/assertions.rb#790 + # source://minitest/lib/minitest/assertions.rb#785 def refute_path_exists(path, msg = T.unsafe(nil)); end # For testing with pattern matching (only supported with Ruby 3.0 and later) @@ -542,7 +550,7 @@ module Minitest::Assertions # # @raise [NotImplementedError] # - # source://minitest/lib/minitest/assertions.rb#763 + # source://minitest/lib/minitest/assertions.rb#758 def refute_pattern; end # For testing with predicates. @@ -553,18 +561,18 @@ module Minitest::Assertions # # str.wont_be :empty? # - # source://minitest/lib/minitest/assertions.rb#804 + # source://minitest/lib/minitest/assertions.rb#799 def refute_predicate(o1, op, msg = T.unsafe(nil)); end # Fails if +obj+ responds to the message +meth+. # include_all defaults to false to match Object#respond_to? # - # source://minitest/lib/minitest/assertions.rb#813 + # source://minitest/lib/minitest/assertions.rb#808 def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end # Fails if +exp+ is the same (by object identity) as +act+. # - # source://minitest/lib/minitest/assertions.rb#822 + # source://minitest/lib/minitest/assertions.rb#817 def refute_same(exp, act, msg = T.unsafe(nil)); end # Skips the current run. If run in verbose-mode, the skipped run @@ -573,7 +581,7 @@ module Minitest::Assertions # # @raise [Minitest::Skip] # - # source://minitest/lib/minitest/assertions.rb#835 + # source://minitest/lib/minitest/assertions.rb#830 def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end # Skips the current run until a given date (in the local time @@ -581,14 +589,14 @@ module Minitest::Assertions # date, but still holds you accountable and prevents you from # forgetting it. # - # source://minitest/lib/minitest/assertions.rb#847 + # source://minitest/lib/minitest/assertions.rb#842 def skip_until(y, m, d, msg); end # Was this testcase skipped? Meant for #teardown. # # @return [Boolean] # - # source://minitest/lib/minitest/assertions.rb#856 + # source://minitest/lib/minitest/assertions.rb#851 def skipped?; end # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. @@ -600,104 +608,102 @@ module Minitest::Assertions # 3. or: Strings are equal to each other (but maybe different encodings?). # 4. and: we found a diff executable. # - # source://minitest/lib/minitest/assertions.rb#104 + # source://minitest/lib/minitest/assertions.rb#102 def things_to_diff(exp, act); end class << self # Returns the diff command to use in #diff. Tries to intelligently # figure out what diff to use. # - # source://minitest/lib/minitest/assertions.rb#29 + # source://minitest/lib/minitest/assertions.rb#27 def diff; end # Set the diff command to use in #diff. # - # source://minitest/lib/minitest/assertions.rb#47 + # source://minitest/lib/minitest/assertions.rb#45 def diff=(o); end end end -# source://minitest/lib/minitest/assertions.rb#206 +# source://minitest/lib/minitest/assertions.rb#199 Minitest::Assertions::E = T.let(T.unsafe(nil), String) -# source://minitest/lib/minitest/assertions.rb#19 +# source://minitest/lib/minitest/assertions.rb#17 Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) # The standard backtrace filter for minitest. # # See Minitest.backtrace_filter=. # -# source://minitest/lib/minitest.rb#1140 +# source://minitest/lib/minitest.rb#1174 class Minitest::BacktraceFilter # @return [BacktraceFilter] a new instance of BacktraceFilter # - # source://minitest/lib/minitest.rb#1146 + # source://minitest/lib/minitest.rb#1183 def initialize(regexp = T.unsafe(nil)); end # Filter +bt+ to something useful. Returns the whole thing if # $DEBUG (ruby) or $MT_DEBUG (env). # - # source://minitest/lib/minitest.rb#1154 + # source://minitest/lib/minitest.rb#1191 def filter(bt); end - # Returns the value of attribute regexp. + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. # - # source://minitest/lib/minitest.rb#1144 + # source://minitest/lib/minitest.rb#1181 def regexp; end - # Sets the attribute regexp - # - # @param value the value to set the attribute regexp to. + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. # - # source://minitest/lib/minitest.rb#1144 + # source://minitest/lib/minitest.rb#1181 def regexp=(_arg0); end end -# source://minitest/lib/minitest.rb#1142 +# source://minitest/lib/minitest.rb#1176 Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) # Dispatch to multiple reporters as one. # -# source://minitest/lib/minitest.rb#934 +# source://minitest/lib/minitest.rb#968 class Minitest::CompositeReporter < ::Minitest::AbstractReporter # @return [CompositeReporter] a new instance of CompositeReporter # - # source://minitest/lib/minitest.rb#940 + # source://minitest/lib/minitest.rb#974 def initialize(*reporters); end # Add another reporter to the mix. # - # source://minitest/lib/minitest.rb#952 + # source://minitest/lib/minitest.rb#986 def <<(reporter); end - # source://minitest/lib/minitest.rb#945 + # source://minitest/lib/minitest.rb#979 def io; end # @return [Boolean] # - # source://minitest/lib/minitest.rb#956 + # source://minitest/lib/minitest.rb#990 def passed?; end - # source://minitest/lib/minitest.rb#964 + # source://minitest/lib/minitest.rb#998 def prerecord(klass, name); end - # source://minitest/lib/minitest.rb#971 + # source://minitest/lib/minitest.rb#1005 def record(result); end - # source://minitest/lib/minitest.rb#977 + # source://minitest/lib/minitest.rb#1011 def report; end # The list of reporters to dispatch to. # - # source://minitest/lib/minitest.rb#938 + # source://minitest/lib/minitest.rb#972 def reporters; end # The list of reporters to dispatch to. # - # source://minitest/lib/minitest.rb#938 + # source://minitest/lib/minitest.rb#972 def reporters=(_arg0); end - # source://minitest/lib/minitest.rb#960 + # source://minitest/lib/minitest.rb#994 def start; end end @@ -726,48 +732,48 @@ end # # ... lots of test methods ... # end # -# source://minitest/lib/minitest.rb#1084 +# source://minitest/lib/minitest.rb#1118 module Minitest::Guard # Is this running on jruby? # # @return [Boolean] # - # source://minitest/lib/minitest.rb#1089 + # source://minitest/lib/minitest.rb#1123 def jruby?(platform = T.unsafe(nil)); end # Is this running on maglev? # # @return [Boolean] # - # source://minitest/lib/minitest.rb#1096 + # source://minitest/lib/minitest.rb#1130 def maglev?(platform = T.unsafe(nil)); end # Is this running on mri? # # @return [Boolean] # - # source://minitest/lib/minitest.rb#1106 + # source://minitest/lib/minitest.rb#1140 def mri?(platform = T.unsafe(nil)); end # Is this running on macOS? # # @return [Boolean] # - # source://minitest/lib/minitest.rb#1113 + # source://minitest/lib/minitest.rb#1147 def osx?(platform = T.unsafe(nil)); end # Is this running on rubinius? # # @return [Boolean] # - # source://minitest/lib/minitest.rb#1120 + # source://minitest/lib/minitest.rb#1154 def rubinius?(platform = T.unsafe(nil)); end # Is this running on windows? # # @return [Boolean] # - # source://minitest/lib/minitest.rb#1130 + # source://minitest/lib/minitest.rb#1164 def windows?(platform = T.unsafe(nil)); end end @@ -830,36 +836,36 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest/lib/minitest.rb#724 +# source://minitest/lib/minitest.rb#758 class Minitest::ProgressReporter < ::Minitest::Reporter - # source://minitest/lib/minitest.rb#725 + # source://minitest/lib/minitest.rb#759 def prerecord(klass, name); end - # source://minitest/lib/minitest.rb#732 + # source://minitest/lib/minitest.rb#766 def record(result); end end # Shared code for anything that can get passed to a Reporter. See # Minitest::Test & Minitest::Result. # -# source://minitest/lib/minitest.rb#546 +# source://minitest/lib/minitest.rb#580 module Minitest::Reportable # @raise [NotImplementedError] # - # source://minitest/lib/minitest.rb#568 + # source://minitest/lib/minitest.rb#602 def class_name; end # Did this run error? # # @return [Boolean] # - # source://minitest/lib/minitest.rb#589 + # source://minitest/lib/minitest.rb#623 def error?; end # The location identifier of this test. Depends on a method # existing called class_name. # - # source://minitest/lib/minitest.rb#563 + # source://minitest/lib/minitest.rb#597 def location; end # Did this run pass? @@ -869,50 +875,50 @@ module Minitest::Reportable # # @return [Boolean] # - # source://minitest/lib/minitest.rb#553 + # source://minitest/lib/minitest.rb#587 def passed?; end # Returns ".", "F", or "E" based on the result of the run. # - # source://minitest/lib/minitest.rb#575 + # source://minitest/lib/minitest.rb#609 def result_code; end # Was this run skipped? # # @return [Boolean] # - # source://minitest/lib/minitest.rb#582 + # source://minitest/lib/minitest.rb#616 def skipped?; end end -# source://minitest/lib/minitest.rb#557 +# source://minitest/lib/minitest.rb#591 Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String) -# source://minitest/lib/minitest.rb#700 +# source://minitest/lib/minitest.rb#734 class Minitest::Reporter < ::Minitest::AbstractReporter # @return [Reporter] a new instance of Reporter # - # source://minitest/lib/minitest.rb#709 + # source://minitest/lib/minitest.rb#743 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # The IO used to report. # - # source://minitest/lib/minitest.rb#702 + # source://minitest/lib/minitest.rb#736 def io; end # The IO used to report. # - # source://minitest/lib/minitest.rb#702 + # source://minitest/lib/minitest.rb#736 def io=(_arg0); end # Command-line options for this run. # - # source://minitest/lib/minitest.rb#707 + # source://minitest/lib/minitest.rb#741 def options; end # Command-line options for this run. # - # source://minitest/lib/minitest.rb#707 + # source://minitest/lib/minitest.rb#741 def options=(_arg0); end end @@ -922,80 +928,80 @@ end # blow up. By using Result.from(a_test) you can be reasonably sure # that the test result can be marshalled. # -# source://minitest/lib/minitest.rb#601 +# source://minitest/lib/minitest.rb#635 class Minitest::Result < ::Minitest::Runnable include ::Minitest::Reportable - # source://minitest/lib/minitest.rb#635 + # source://minitest/lib/minitest.rb#669 def class_name; end # The class name of the test result. # - # source://minitest/lib/minitest.rb#610 + # source://minitest/lib/minitest.rb#644 def klass; end # The class name of the test result. # - # source://minitest/lib/minitest.rb#610 + # source://minitest/lib/minitest.rb#644 def klass=(_arg0); end # The location of the test method. # - # source://minitest/lib/minitest.rb#615 + # source://minitest/lib/minitest.rb#649 def source_location; end # The location of the test method. # - # source://minitest/lib/minitest.rb#615 + # source://minitest/lib/minitest.rb#649 def source_location=(_arg0); end - # source://minitest/lib/minitest.rb#639 + # source://minitest/lib/minitest.rb#673 def to_s; end class << self # Create a new test result from a Runnable instance. # - # source://minitest/lib/minitest.rb#620 + # source://minitest/lib/minitest.rb#654 def from(runnable); end end end # re-open # -# source://minitest/lib/minitest.rb#319 +# source://minitest/lib/minitest.rb#348 class Minitest::Runnable # @return [Runnable] a new instance of Runnable # - # source://minitest/lib/minitest.rb#477 + # source://minitest/lib/minitest.rb#511 def initialize(name); end # Number of assertions executed in this run. # - # source://minitest/lib/minitest.rb#323 + # source://minitest/lib/minitest.rb#352 def assertions; end # Number of assertions executed in this run. # - # source://minitest/lib/minitest.rb#323 + # source://minitest/lib/minitest.rb#352 def assertions=(_arg0); end - # source://minitest/lib/minitest.rb#473 + # source://minitest/lib/minitest.rb#507 def failure; end # An assertion raised during the run, if any. # - # source://minitest/lib/minitest.rb#328 + # source://minitest/lib/minitest.rb#357 def failures; end # An assertion raised during the run, if any. # - # source://minitest/lib/minitest.rb#328 + # source://minitest/lib/minitest.rb#357 def failures=(_arg0); end - # source://minitest/lib/minitest.rb#459 + # source://minitest/lib/minitest.rb#493 def marshal_dump; end - # source://minitest/lib/minitest.rb#469 + # source://minitest/lib/minitest.rb#503 def marshal_load(ary); end # Metadata you attach to the test results that get sent to the reporter. @@ -1005,29 +1011,29 @@ class Minitest::Runnable # NOTE: this data *must* be plain (read: marshal-able) data! # Hashes! Arrays! Strings! # - # source://minitest/lib/minitest.rb#492 + # source://minitest/lib/minitest.rb#526 def metadata; end # Sets metadata, mainly used for +Result.from+. # - # source://minitest/lib/minitest.rb#499 + # source://minitest/lib/minitest.rb#533 def metadata=(_arg0); end # Returns true if metadata exists. # # @return [Boolean] # - # source://minitest/lib/minitest.rb#504 + # source://minitest/lib/minitest.rb#538 def metadata?; end # Name of the run. # - # source://minitest/lib/minitest.rb#346 + # source://minitest/lib/minitest.rb#375 def name; end # Set the name of the run. # - # source://minitest/lib/minitest.rb#353 + # source://minitest/lib/minitest.rb#382 def name=(o); end # Did this run pass? @@ -1038,7 +1044,7 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest/lib/minitest.rb#521 + # source://minitest/lib/minitest.rb#555 def passed?; end # Returns a single character string to print based on the result @@ -1047,14 +1053,14 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest/lib/minitest.rb#530 + # source://minitest/lib/minitest.rb#564 def result_code; end # Runs a single method. Needs to return self. # # @raise [NotImplementedError] # - # source://minitest/lib/minitest.rb#511 + # source://minitest/lib/minitest.rb#545 def run; end # Was this run skipped? See #passed? for more information. @@ -1062,42 +1068,42 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest/lib/minitest.rb#537 + # source://minitest/lib/minitest.rb#571 def skipped?; end # The time it took to run. # - # source://minitest/lib/minitest.rb#333 + # source://minitest/lib/minitest.rb#362 def time; end # The time it took to run. # - # source://minitest/lib/minitest.rb#333 + # source://minitest/lib/minitest.rb#362 def time=(_arg0); end - # source://minitest/lib/minitest.rb#335 + # source://minitest/lib/minitest.rb#364 def time_it; end class << self - # source://minitest/lib/minitest.rb#1188 + # source://minitest/lib/minitest.rb#1225 def inherited(klass); end # Returns all instance methods matching the pattern +re+. # - # source://minitest/lib/minitest.rb#360 + # source://minitest/lib/minitest.rb#389 def methods_matching(re); end - # source://minitest/lib/minitest.rb#429 + # source://minitest/lib/minitest.rb#463 def on_signal(name, action); end - # source://minitest/lib/minitest.rb#364 + # source://minitest/lib/minitest.rb#393 def reset; end # Responsible for running all runnable methods in a given class, # each in its own instance. Each instance is passed to the # reporter to record. # - # source://minitest/lib/minitest.rb#375 + # source://minitest/lib/minitest.rb#404 def run(reporter, options = T.unsafe(nil)); end # Runs a single method and has the reporter record the result. @@ -1105,7 +1111,7 @@ class Minitest::Runnable # that subclasses can specialize the running of an individual # test. See Minitest::ParallelTest::ClassMethods for an example. # - # source://minitest/lib/minitest.rb#401 + # source://minitest/lib/minitest.rb#444 def run_one_method(klass, method_name, reporter); end # Each subclass of Runnable is responsible for overriding this @@ -1113,33 +1119,33 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest/lib/minitest.rb#446 + # source://minitest/lib/minitest.rb#480 def runnable_methods; end # Returns all subclasses of Runnable. # - # source://minitest/lib/minitest.rb#453 + # source://minitest/lib/minitest.rb#487 def runnables; end # Defines the order to run tests (:random by default). Override # this or use a convenience method to change it for your tests. # - # source://minitest/lib/minitest.rb#410 + # source://minitest/lib/minitest.rb#453 def test_order; end - # source://minitest/lib/minitest.rb#414 + # source://minitest/lib/minitest.rb#457 def with_info_handler(reporter, &block); end end end -# source://minitest/lib/minitest.rb#427 +# source://minitest/lib/minitest.rb#461 Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) # Assertion raised when skipping a run. # -# source://minitest/lib/minitest.rb#1015 +# source://minitest/lib/minitest.rb#1049 class Minitest::Skip < ::Minitest::Assertion - # source://minitest/lib/minitest.rb#1016 + # source://minitest/lib/minitest.rb#1050 def result_label; end end @@ -1163,123 +1169,123 @@ end # end # end # -# source://minitest/lib/minitest.rb#760 +# source://minitest/lib/minitest.rb#794 class Minitest::StatisticsReporter < ::Minitest::Reporter # @return [StatisticsReporter] a new instance of StatisticsReporter # - # source://minitest/lib/minitest.rb#809 + # source://minitest/lib/minitest.rb#843 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # Total number of assertions. # - # source://minitest/lib/minitest.rb#764 + # source://minitest/lib/minitest.rb#798 def assertions; end # Total number of assertions. # - # source://minitest/lib/minitest.rb#764 + # source://minitest/lib/minitest.rb#798 def assertions=(_arg0); end # Total number of test cases. # - # source://minitest/lib/minitest.rb#769 + # source://minitest/lib/minitest.rb#803 def count; end # Total number of test cases. # - # source://minitest/lib/minitest.rb#769 + # source://minitest/lib/minitest.rb#803 def count=(_arg0); end # Total number of tests that erred. # - # source://minitest/lib/minitest.rb#797 + # source://minitest/lib/minitest.rb#831 def errors; end # Total number of tests that erred. # - # source://minitest/lib/minitest.rb#797 + # source://minitest/lib/minitest.rb#831 def errors=(_arg0); end # Total number of tests that failed. # - # source://minitest/lib/minitest.rb#792 + # source://minitest/lib/minitest.rb#826 def failures; end # Total number of tests that failed. # - # source://minitest/lib/minitest.rb#792 + # source://minitest/lib/minitest.rb#826 def failures=(_arg0); end # @return [Boolean] # - # source://minitest/lib/minitest.rb#823 + # source://minitest/lib/minitest.rb#857 def passed?; end - # source://minitest/lib/minitest.rb#831 + # source://minitest/lib/minitest.rb#865 def record(result); end # Report on the tracked statistics. # - # source://minitest/lib/minitest.rb#841 + # source://minitest/lib/minitest.rb#875 def report; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest/lib/minitest.rb#774 + # source://minitest/lib/minitest.rb#808 def results; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest/lib/minitest.rb#774 + # source://minitest/lib/minitest.rb#808 def results=(_arg0); end # Total number of tests that where skipped. # - # source://minitest/lib/minitest.rb#807 + # source://minitest/lib/minitest.rb#841 def skips; end # Total number of tests that where skipped. # - # source://minitest/lib/minitest.rb#807 + # source://minitest/lib/minitest.rb#841 def skips=(_arg0); end - # source://minitest/lib/minitest.rb#827 + # source://minitest/lib/minitest.rb#861 def start; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest/lib/minitest.rb#781 + # source://minitest/lib/minitest.rb#815 def start_time; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest/lib/minitest.rb#781 + # source://minitest/lib/minitest.rb#815 def start_time=(_arg0); end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest/lib/minitest.rb#787 + # source://minitest/lib/minitest.rb#821 def total_time; end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest/lib/minitest.rb#787 + # source://minitest/lib/minitest.rb#821 def total_time=(_arg0); end # Total number of tests that warned. # - # source://minitest/lib/minitest.rb#802 + # source://minitest/lib/minitest.rb#836 def warnings; end # Total number of tests that warned. # - # source://minitest/lib/minitest.rb#802 + # source://minitest/lib/minitest.rb#836 def warnings=(_arg0); end end @@ -1291,48 +1297,36 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest/lib/minitest.rb#862 +# source://minitest/lib/minitest.rb#896 class Minitest::SummaryReporter < ::Minitest::StatisticsReporter - # source://minitest/lib/minitest.rb#897 + # source://minitest/lib/minitest.rb#929 def aggregated_results(io); end - # Returns the value of attribute old_sync. - # - # source://minitest/lib/minitest.rb#865 + # source://minitest/lib/minitest.rb#898 def old_sync; end - # Sets the attribute old_sync - # - # @param value the value to set the attribute old_sync to. - # - # source://minitest/lib/minitest.rb#865 + # source://minitest/lib/minitest.rb#898 def old_sync=(_arg0); end - # source://minitest/lib/minitest.rb#880 + # source://minitest/lib/minitest.rb#912 def report; end - # :startdoc: - # - # source://minitest/lib/minitest.rb#868 + # source://minitest/lib/minitest.rb#900 def start; end - # source://minitest/lib/minitest.rb#892 + # source://minitest/lib/minitest.rb#924 def statistics; end - # source://minitest/lib/minitest.rb#917 + # source://minitest/lib/minitest.rb#949 def summary; end - # :stopdoc: - # - # source://minitest/lib/minitest.rb#864 + # source://minitest/lib/minitest.rb#897 def sync; end - # :stopdoc: - # - # source://minitest/lib/minitest.rb#864 + # source://minitest/lib/minitest.rb#897 def sync=(_arg0); end - # source://minitest/lib/minitest.rb#913 + # source://minitest/lib/minitest.rb#945 def to_s; end end @@ -1366,16 +1360,16 @@ class Minitest::Test < ::Minitest::Runnable # LifecycleHooks # - # source://minitest/lib/minitest/test.rb#191 + # source://minitest/lib/minitest/test.rb#189 def capture_exceptions; end # source://minitest/lib/minitest/test.rb#15 def class_name; end - # source://minitest/lib/minitest/test.rb#208 + # source://minitest/lib/minitest/test.rb#206 def neuter_exception(e); end - # source://minitest/lib/minitest/test.rb#219 + # source://minitest/lib/minitest/test.rb#217 def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end # Runs a single test with setup/teardown hooks. @@ -1383,7 +1377,7 @@ class Minitest::Test < ::Minitest::Runnable # source://minitest/lib/minitest/test.rb#87 def run; end - # source://minitest/lib/minitest/test.rb#201 + # source://minitest/lib/minitest/test.rb#199 def sanitize_exception(e); end # source://webmock/3.23.1lib/webmock/minitest.rb#21 @@ -1392,12 +1386,9 @@ class Minitest::Test < ::Minitest::Runnable # source://webmock/3.23.1lib/webmock/minitest.rb#21 def teardown_with_webmock; end - # source://minitest/lib/minitest/test.rb#179 + # source://minitest/lib/minitest/test.rb#177 def teardown_without_webmock; end - # source://minitest/lib/minitest/test.rb#233 - def with_info_handler(&block); end - private # source://webmock/3.23.1lib/webmock/api.rb#95 @@ -1455,7 +1446,7 @@ end # meant for library writers, NOT for regular test authors. See # #before_setup for an example. # -# source://minitest/lib/minitest/test.rb#114 +# source://minitest/lib/minitest/test.rb#112 module Minitest::Test::LifecycleHooks # Runs before every test, after setup. This hook is meant for # libraries to extend minitest. It is not meant to be used by @@ -1463,7 +1454,7 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest/lib/minitest/test.rb#164 + # source://minitest/lib/minitest/test.rb#162 def after_setup; end # Runs after every test, after teardown. This hook is meant for @@ -1472,7 +1463,7 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest/lib/minitest/test.rb#188 + # source://minitest/lib/minitest/test.rb#186 def after_teardown; end # Runs before every test, before setup. This hook is meant for @@ -1507,7 +1498,7 @@ module Minitest::Test::LifecycleHooks # include MyMinitestPlugin # end # - # source://minitest/lib/minitest/test.rb#149 + # source://minitest/lib/minitest/test.rb#147 def before_setup; end # Runs after every test, before teardown. This hook is meant for @@ -1516,19 +1507,19 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest/lib/minitest/test.rb#173 + # source://minitest/lib/minitest/test.rb#171 def before_teardown; end # Runs before every test. Use this to set up before each test # run. # - # source://minitest/lib/minitest/test.rb#155 + # source://minitest/lib/minitest/test.rb#153 def setup; end # Runs after every test. Use this to clean up after each test # run. # - # source://minitest/lib/minitest/test.rb#179 + # source://minitest/lib/minitest/test.rb#177 def teardown; end end @@ -1543,43 +1534,43 @@ Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) # Assertion wrapping an unexpected error that was raised during a run. # -# source://minitest/lib/minitest.rb#1024 +# source://minitest/lib/minitest.rb#1058 class Minitest::UnexpectedError < ::Minitest::Assertion include ::Minitest::Compress # @return [UnexpectedError] a new instance of UnexpectedError # - # source://minitest/lib/minitest.rb#1030 + # source://minitest/lib/minitest.rb#1064 def initialize(error); end - # source://minitest/lib/minitest.rb#1043 + # source://minitest/lib/minitest.rb#1077 def backtrace; end # TODO: figure out how to use `cause` instead # - # source://minitest/lib/minitest.rb#1028 + # source://minitest/lib/minitest.rb#1062 def error; end # TODO: figure out how to use `cause` instead # - # source://minitest/lib/minitest.rb#1028 + # source://minitest/lib/minitest.rb#1062 def error=(_arg0); end - # source://minitest/lib/minitest.rb#1049 + # source://minitest/lib/minitest.rb#1083 def message; end - # source://minitest/lib/minitest.rb#1055 + # source://minitest/lib/minitest.rb#1089 def result_label; end end -# source://minitest/lib/minitest.rb#1047 +# source://minitest/lib/minitest.rb#1081 Minitest::UnexpectedError::BASE_RE = T.let(T.unsafe(nil), Regexp) # Assertion raised on warning when running in -Werror mode. # -# source://minitest/lib/minitest.rb#1063 +# source://minitest/lib/minitest.rb#1097 class Minitest::UnexpectedWarning < ::Minitest::Assertion - # source://minitest/lib/minitest.rb#1064 + # source://minitest/lib/minitest.rb#1098 def result_label; end end diff --git a/sorbet/rbi/gems/net-imap@0.4.11.rbi b/sorbet/rbi/gems/net-imap@0.4.16.rbi similarity index 91% rename from sorbet/rbi/gems/net-imap@0.4.11.rbi rename to sorbet/rbi/gems/net-imap@0.4.16.rbi index 5c5e580d..5fe5293e 100644 --- a/sorbet/rbi/gems/net-imap@0.4.11.rbi +++ b/sorbet/rbi/gems/net-imap@0.4.16.rbi @@ -722,18 +722,44 @@ class Net::IMAP < ::Net::Protocol # If +ssl+ is a hash, it's passed to # {OpenSSL::SSL::SSLContext#set_params}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-set_params]; # the keys are names of attribute assignment methods on - # SSLContext[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html]. + # SSLContext[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html]. For example: # - # [open_timeout] - # Seconds to wait until a connection is opened - # [idle_response_timeout] - # Seconds to wait until an IDLE response is received + # [{ca_file}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-ca_file]] + # The path to a file containing a PEM-format CA certificate. + # [{ca_path}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-ca_path]] + # The path to a directory containing CA certificates in PEM format. + # [{min_version}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-min_version-3D]] + # Sets the lower bound on the supported SSL/TLS protocol version. Set to + # an +OpenSSL+ constant such as +OpenSSL::SSL::TLS1_2_VERSION+, + # [{verify_mode}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-verify_mode]] + # SSL session verification mode. Valid modes include + # +OpenSSL::SSL::VERIFY_PEER+ and +OpenSSL::SSL::VERIFY_NONE+. # - # See DeprecatedClientOptions.new for deprecated arguments. + # See {OpenSSL::SSL::SSLContext}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html] for other valid SSL context params. + # + # See DeprecatedClientOptions.new for deprecated SSL arguments. + # + # [config] + # A Net::IMAP::Config object to use as the basis for #config. By default, + # the global Net::IMAP.config is used. + # + # >>> + # *NOTE:* +config+ does not set #config directly---it sets the _parent_ + # config for inheritance. Every client creates its own unique #config. + # + # All other keyword arguments are forwarded to Net::IMAP::Config.new, to + # initialize the client's #config. For example: + # + # [{open_timeout}[rdoc-ref:Config#open_timeout]] + # Seconds to wait until a connection is opened + # [{idle_response_timeout}[rdoc-ref:Config#idle_response_timeout]] + # Seconds to wait until an IDLE response is received + # + # See Net::IMAP::Config for other valid options. # # ==== Examples # - # Connect to cleartext port 143 at mail.example.com and recieve the server greeting: + # Connect to cleartext port 143 at mail.example.com and receive the server greeting: # imap = Net::IMAP.new('mail.example.com', ssl: false) # => # # imap.port => 143 # imap.tls_verified? => false @@ -805,7 +831,7 @@ class Net::IMAP < ::Net::Protocol # # @raise [ArgumentError] # - # source://net-imap/lib/net/imap.rb#2563 + # source://net-imap/lib/net/imap.rb#2614 def add_response_handler(handler = T.unsafe(nil), &block); end # Sends an {APPEND command [IMAP4rev1 §6.3.11]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.11] @@ -840,7 +866,7 @@ class Net::IMAP < ::Net::Protocol # TODO: add MULTIAPPEND support # ++ # - # source://net-imap/lib/net/imap.rb#1831 + # source://net-imap/lib/net/imap.rb#1866 def append(mailbox, message, flags = T.unsafe(nil), date_time = T.unsafe(nil)); end # Returns whether the server supports a given SASL +mechanism+ for use with @@ -857,7 +883,7 @@ class Net::IMAP < ::Net::Protocol # # @return [Boolean] # - # source://net-imap/lib/net/imap.rb#1027 + # source://net-imap/lib/net/imap.rb#1059 def auth_capable?(mechanism); end # Returns the #authenticate mechanisms that the server claims to support. @@ -881,11 +907,11 @@ class Net::IMAP < ::Net::Protocol # # Related: #authenticate, #auth_capable?, #capabilities # - # source://net-imap/lib/net/imap.rb#1010 + # source://net-imap/lib/net/imap.rb#1042 def auth_mechanisms; end # :call-seq: - # authenticate(mechanism, *, sasl_ir: true, registry: Net::IMAP::SASL.authenticators, **, &) -> ok_resp + # authenticate(mechanism, *, sasl_ir: config.sasl_ir, registry: Net::IMAP::SASL.authenticators, **, &) -> ok_resp # # Sends an {AUTHENTICATE command [IMAP4rev1 §6.2.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.2] # to authenticate the client. If successful, the connection enters the @@ -894,7 +920,8 @@ class Net::IMAP < ::Net::Protocol # +mechanism+ is the name of the \SASL authentication mechanism to be used. # # +sasl_ir+ allows or disallows sending an "initial response" (see the - # +SASL-IR+ capability, below). + # +SASL-IR+ capability, below). Defaults to the #config value for + # {sasl_ir}[rdoc-ref:Config#sasl_ir], which defaults to +true+. # # All other arguments are forwarded to the registered SASL authenticator for # the requested mechanism. The documentation for each individual @@ -991,7 +1018,7 @@ class Net::IMAP < ::Net::Protocol # completes. If the TaggedResponse to #authenticate includes updated # capabilities, they will be cached. # - # source://net-imap/lib/net/imap.rb#1306 + # source://net-imap/lib/net/imap.rb#1339 def authenticate(mechanism, *creds, sasl_ir: T.unsafe(nil), **props, &callback); end # Returns the server capabilities. When available, cached capabilities are @@ -1006,7 +1033,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #capable?, #auth_capable?, #auth_mechanisms, #capability, #enable # - # source://net-imap/lib/net/imap.rb#986 + # source://net-imap/lib/net/imap.rb#1018 def capabilities; end # Returns whether capabilities have been cached. When true, #capable? and @@ -1018,7 +1045,7 @@ class Net::IMAP < ::Net::Protocol # # @return [Boolean] # - # source://net-imap/lib/net/imap.rb#1037 + # source://net-imap/lib/net/imap.rb#1069 def capabilities_cached?; end # Sends a {CAPABILITY command [IMAP4rev1 §6.1.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.1] @@ -1040,7 +1067,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #capable?, #auth_capable?, #capability, #enable # - # source://net-imap/lib/net/imap.rb#1075 + # source://net-imap/lib/net/imap.rb#1107 def capability; end # Returns whether the server supports a given +capability+. When available, @@ -1056,7 +1083,7 @@ class Net::IMAP < ::Net::Protocol # # @return [Boolean] # - # source://net-imap/lib/net/imap.rb#972 + # source://net-imap/lib/net/imap.rb#1004 def capability?(capability); end # Returns whether the server supports a given +capability+. When available, @@ -1072,7 +1099,7 @@ class Net::IMAP < ::Net::Protocol # # @return [Boolean] # - # source://net-imap/lib/net/imap.rb#972 + # source://net-imap/lib/net/imap.rb#1004 def capable?(capability); end # Sends a {CHECK command [IMAP4rev1 §6.4.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.1] @@ -1082,7 +1109,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #idle, #noop # - # source://net-imap/lib/net/imap.rb#1847 + # source://net-imap/lib/net/imap.rb#1882 def check; end # Clears capabilities that have been remembered by the Net::IMAP client. @@ -1095,7 +1122,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #capable?, #capability, #capabilities_cached? # - # source://net-imap/lib/net/imap.rb#1050 + # source://net-imap/lib/net/imap.rb#1082 def clear_cached_capabilities; end # :call-seq: @@ -1110,10 +1137,10 @@ class Net::IMAP < ::Net::Protocol # # Related: #responses, #response_handlers # - # source://net-imap/lib/net/imap.rb#2520 + # source://net-imap/lib/net/imap.rb#2571 def clear_responses(type = T.unsafe(nil)); end - # source://net-imap/lib/net/imap.rb#925 + # source://net-imap/lib/net/imap.rb#957 def client_thread; end # Sends a {CLOSE command [IMAP4rev1 §6.4.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.2] @@ -1123,9 +1150,17 @@ class Net::IMAP < ::Net::Protocol # # Related: #unselect # - # source://net-imap/lib/net/imap.rb#1857 + # source://net-imap/lib/net/imap.rb#1892 def close; end + # The client configuration. See Net::IMAP::Config. + # + # By default, the client's local configuration inherits from the global + # Net::IMAP.config. + # + # source://net-imap/lib/net/imap.rb#772 + def config; end + # Sends a {COPY command [IMAP4rev1 §6.4.7]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.7] # to copy the specified message(s) to the end of the specified destination # +mailbox+. The +set+ parameter is a number, an array of numbers, or a @@ -1141,7 +1176,7 @@ class Net::IMAP < ::Net::Protocol # mailbox, the UID set of the source messages, and the assigned UID set of # the moved messages. # - # source://net-imap/lib/net/imap.rb#2162 + # source://net-imap/lib/net/imap.rb#2197 def copy(set, mailbox); end # Sends a {CREATE command [IMAP4rev1 §6.3.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.3] @@ -1152,7 +1187,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #rename, #delete # - # source://net-imap/lib/net/imap.rb#1431 + # source://net-imap/lib/net/imap.rb#1466 def create(mailbox); end # Sends a {DELETE command [IMAP4rev1 §6.3.4]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.4] @@ -1164,14 +1199,14 @@ class Net::IMAP < ::Net::Protocol # # Related: #create, #rename # - # source://net-imap/lib/net/imap.rb#1443 + # source://net-imap/lib/net/imap.rb#1478 def delete(mailbox); end # Disconnects from the server. # # Related: #logout, #logout! # - # source://net-imap/lib/net/imap.rb#933 + # source://net-imap/lib/net/imap.rb#965 def disconnect; end # Returns true if disconnected from the server. @@ -1180,7 +1215,7 @@ class Net::IMAP < ::Net::Protocol # # @return [Boolean] # - # source://net-imap/lib/net/imap.rb#958 + # source://net-imap/lib/net/imap.rb#990 def disconnected?; end # Sends an {ENABLE command [RFC5161 §3.2]}[https://www.rfc-editor.org/rfc/rfc5161#section-3.1] @@ -1256,7 +1291,7 @@ class Net::IMAP < ::Net::Protocol # # Caution is advised. # - # source://net-imap/lib/net/imap.rb#2373 + # source://net-imap/lib/net/imap.rb#2408 def enable(*capabilities); end # Sends a {EXAMINE command [IMAP4rev1 §6.3.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.2] @@ -1269,7 +1304,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #select # - # source://net-imap/lib/net/imap.rb#1415 + # source://net-imap/lib/net/imap.rb#1450 def examine(mailbox, condstore: T.unsafe(nil)); end # Sends an {EXPUNGE command [IMAP4rev1 §6.4.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.3] @@ -1278,7 +1313,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #uid_expunge # - # source://net-imap/lib/net/imap.rb#1882 + # source://net-imap/lib/net/imap.rb#1917 def expunge; end # :call-seq: @@ -1334,7 +1369,7 @@ class Net::IMAP < ::Net::Protocol # +changedsince+ argument. Using +changedsince+ implicitly enables the # +CONDSTORE+ extension. # - # source://net-imap/lib/net/imap.rb#2057 + # source://net-imap/lib/net/imap.rb#2092 def fetch(set, attr, mod = T.unsafe(nil), changedsince: T.unsafe(nil)); end # Sends a {GETACL command [RFC4314 §3.3]}[https://www.rfc-editor.org/rfc/rfc4314#section-3.3] @@ -1348,7 +1383,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +ACL+ # [RFC4314[https://tools.ietf.org/html/rfc4314]]. # - # source://net-imap/lib/net/imap.rb#1711 + # source://net-imap/lib/net/imap.rb#1746 def getacl(mailbox); end # Sends a {GETQUOTA command [RFC2087 §4.2]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.2] @@ -1363,7 +1398,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +QUOTA+ # [RFC2087[https://tools.ietf.org/html/rfc2087]]. # - # source://net-imap/lib/net/imap.rb#1655 + # source://net-imap/lib/net/imap.rb#1690 def getquota(mailbox); end # Sends a {GETQUOTAROOT command [RFC2087 §4.3]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.3] @@ -1378,17 +1413,17 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +QUOTA+ # [RFC2087[https://tools.ietf.org/html/rfc2087]]. # - # source://net-imap/lib/net/imap.rb#1634 + # source://net-imap/lib/net/imap.rb#1669 def getquotaroot(mailbox); end # Returns the initial greeting the server, an UntaggedResponse. # - # source://net-imap/lib/net/imap.rb#765 + # source://net-imap/lib/net/imap.rb#766 def greeting; end # The hostname this client connected to # - # source://net-imap/lib/net/imap.rb#776 + # source://net-imap/lib/net/imap.rb#783 def host; end # Sends an {ID command [RFC2971 §3.1]}[https://www.rfc-editor.org/rfc/rfc2971#section-3.1] @@ -1414,7 +1449,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +ID+ # [RFC2971[https://tools.ietf.org/html/rfc2971]]. # - # source://net-imap/lib/net/imap.rb#1104 + # source://net-imap/lib/net/imap.rb#1136 def id(client_id = T.unsafe(nil)); end # Sends an {IDLE command [RFC2177 §3]}[https://www.rfc-editor.org/rfc/rfc6851#section-3] @@ -1429,11 +1464,17 @@ class Net::IMAP < ::Net::Protocol # checks the connection for each 60 seconds. # # loop do - # imap.idle(60) do |res| - # ... + # imap.idle(60) do |response| + # do_something_with(response) + # imap.idle_done if some_condition?(response) # end # end # + # Returns the server's response to indicate the IDLE state has ended. + # Returns +nil+ if the server does not respond to #idle_done within + # {config.idle_response_timeout}[rdoc-ref:Config#idle_response_timeout] + # seconds. + # # Related: #idle_done, #noop, #check # # ===== Capabilities @@ -1443,19 +1484,23 @@ class Net::IMAP < ::Net::Protocol # # @raise [LocalJumpError] # - # source://net-imap/lib/net/imap.rb#2411 + # source://net-imap/lib/net/imap.rb#2452 def idle(timeout = T.unsafe(nil), &response_handler); end - # Leaves IDLE. + # Leaves IDLE, allowing #idle to return. + # + # If the server does not respond within + # {config.idle_response_timeout}[rdoc-ref:Config#idle_response_timeout] + # seconds, #idle will return +nil+. # # Related: #idle # - # source://net-imap/lib/net/imap.rb#2443 + # source://net-imap/lib/net/imap.rb#2488 def idle_done; end # Seconds to wait until an IDLE response is received. # - # source://net-imap/lib/net/imap.rb#773 + # source://net-imap/lib/net/imap.rb#780 def idle_response_timeout; end # Sends a {LIST command [IMAP4rev1 §6.3.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.8] @@ -1489,7 +1534,7 @@ class Net::IMAP < ::Net::Protocol # TODO: support LIST-EXTENDED extension [RFC5258]. Needed for IMAP4rev2. # ++ # - # source://net-imap/lib/net/imap.rb#1515 + # source://net-imap/lib/net/imap.rb#1550 def list(refname, mailbox); end # Sends a {LOGIN command [IMAP4rev1 §6.2.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.3] @@ -1522,7 +1567,7 @@ class Net::IMAP < ::Net::Protocol # The TaggedResponse to #login may include updated capabilities in its # ResponseCode. # - # source://net-imap/lib/net/imap.rb#1359 + # source://net-imap/lib/net/imap.rb#1394 def login(user, password); end # Sends a {LOGOUT command [IMAP4rev1 §6.1.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.3] @@ -1531,7 +1576,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #disconnect, #logout! # - # source://net-imap/lib/net/imap.rb#1132 + # source://net-imap/lib/net/imap.rb#1164 def logout; end # Calls #logout then, after receiving the TaggedResponse for the +LOGOUT+, @@ -1548,7 +1593,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #logout, #disconnect # - # source://net-imap/lib/net/imap.rb#1149 + # source://net-imap/lib/net/imap.rb#1181 def logout!; end # Sends a {LSUB command [IMAP4rev1 §6.3.9]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.9] @@ -1560,7 +1605,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #subscribe, #unsubscribe, #list, MailboxList # - # source://net-imap/lib/net/imap.rb#1726 + # source://net-imap/lib/net/imap.rb#1761 def lsub(refname, mailbox); end # Sends a {MOVE command [RFC6851 §3.1]}[https://www.rfc-editor.org/rfc/rfc6851#section-3.1] @@ -1582,7 +1627,7 @@ class Net::IMAP < ::Net::Protocol # mailbox, the UID set of the source messages, and the assigned UID set of # the moved messages. # - # source://net-imap/lib/net/imap.rb#2198 + # source://net-imap/lib/net/imap.rb#2233 def move(set, mailbox); end # Sends a {NAMESPACE command [RFC2342 §5]}[https://www.rfc-editor.org/rfc/rfc2342#section-5] @@ -1636,7 +1681,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +NAMESPACE+ # [RFC2342[https://tools.ietf.org/html/rfc2342]]. # - # source://net-imap/lib/net/imap.rb#1572 + # source://net-imap/lib/net/imap.rb#1607 def namespace; end # Sends a {NOOP command [IMAP4rev1 §6.1.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.2] @@ -1652,26 +1697,26 @@ class Net::IMAP < ::Net::Protocol # # Related: #idle, #check # - # source://net-imap/lib/net/imap.rb#1123 + # source://net-imap/lib/net/imap.rb#1155 def noop; end # Seconds to wait until a connection is opened. # If the IMAP object cannot open a connection within this time, # it raises a Net::OpenTimeout exception. The default value is 30 seconds. # - # source://net-imap/lib/net/imap.rb#770 + # source://net-imap/lib/net/imap.rb#777 def open_timeout; end # The port this client connected to # - # source://net-imap/lib/net/imap.rb#779 + # source://net-imap/lib/net/imap.rb#786 def port; end # Removes the response handler. # # Related: #add_response_handler, #response_handlers # - # source://net-imap/lib/net/imap.rb#2573 + # source://net-imap/lib/net/imap.rb#2624 def remove_response_handler(handler); end # Sends a {RENAME command [IMAP4rev1 §6.3.5]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.5] @@ -1684,7 +1729,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #create, #delete # - # source://net-imap/lib/net/imap.rb#1456 + # source://net-imap/lib/net/imap.rb#1491 def rename(mailbox, newname); end # Returns all response handlers, including those that are added internally @@ -1701,7 +1746,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #add_response_handler, #remove_response_handler # - # source://net-imap/lib/net/imap.rb#2546 + # source://net-imap/lib/net/imap.rb#2597 def response_handlers; end # :call-seq: @@ -1732,6 +1777,7 @@ class Net::IMAP < ::Net::Protocol # # Calling without a block is unsafe and deprecated. Future releases will # raise ArgumentError unless a block is given. + # See Config#responses_without_block. # # Previously unhandled responses are automatically cleared before entering a # mailbox with #select or #examine. Long-lived connections can receive many @@ -1751,7 +1797,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #clear_responses, #response_handlers, #greeting # - # source://net-imap/lib/net/imap.rb#2498 + # source://net-imap/lib/net/imap.rb#2544 def responses(type = T.unsafe(nil)); end # Sends a {SEARCH command [IMAP4rev1 §6.4.4]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.4] @@ -1822,7 +1868,7 @@ class Net::IMAP < ::Net::Protocol # #=> Net::IMAP::SearchResult[1, 6, 7, 8, modseq: 5594] # result.modseq # => 5594 # - # source://net-imap/lib/net/imap.rb#1988 + # source://net-imap/lib/net/imap.rb#2023 def search(keys, charset = T.unsafe(nil)); end # Sends a {SELECT command [IMAP4rev1 §6.3.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.1] @@ -1859,7 +1905,7 @@ class Net::IMAP < ::Net::Protocol # imap.select("mbox", condstore: true) # modseq = imap.responses("HIGHESTMODSEQ", &:last) # - # source://net-imap/lib/net/imap.rb#1397 + # source://net-imap/lib/net/imap.rb#1432 def select(mailbox, condstore: T.unsafe(nil)); end # Sends a {SETACL command [RFC4314 §3.1]}[https://www.rfc-editor.org/rfc/rfc4314#section-3.1] @@ -1874,7 +1920,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +ACL+ # [RFC4314[https://tools.ietf.org/html/rfc4314]]. # - # source://net-imap/lib/net/imap.rb#1693 + # source://net-imap/lib/net/imap.rb#1728 def setacl(mailbox, user, rights); end # Sends a {SETQUOTA command [RFC2087 §4.1]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.1] @@ -1889,7 +1935,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +QUOTA+ # [RFC2087[https://tools.ietf.org/html/rfc2087]]. # - # source://net-imap/lib/net/imap.rb#1673 + # source://net-imap/lib/net/imap.rb#1708 def setquota(mailbox, quota); end # Sends a {SORT command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] @@ -1915,7 +1961,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +SORT+ # [RFC5256[https://tools.ietf.org/html/rfc5256]]. # - # source://net-imap/lib/net/imap.rb#2242 + # source://net-imap/lib/net/imap.rb#2277 def sort(sort_keys, search_keys, charset); end # Returns the @@ -1925,7 +1971,7 @@ class Net::IMAP < ::Net::Protocol # # Returns +nil+ for a plaintext connection. # - # source://net-imap/lib/net/imap.rb#787 + # source://net-imap/lib/net/imap.rb#794 def ssl_ctx; end # Returns the parameters that were sent to #ssl_ctx @@ -1934,7 +1980,7 @@ class Net::IMAP < ::Net::Protocol # # Returns +false+ for a plaintext connection. # - # source://net-imap/lib/net/imap.rb#794 + # source://net-imap/lib/net/imap.rb#801 def ssl_ctx_params; end # Sends a {STARTTLS command [IMAP4rev1 §6.2.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.1] @@ -2031,7 +2077,7 @@ class Net::IMAP < ::Net::Protocol # +MAILBOXID+ requires the server's capabilities to include +OBJECTID+ # {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html]. # - # source://net-imap/lib/net/imap.rb#1793 + # source://net-imap/lib/net/imap.rb#1828 def status(mailbox, attr); end # :call-seq: @@ -2078,7 +2124,7 @@ class Net::IMAP < ::Net::Protocol # +unchangedsince+ argument. Using +unchangedsince+ implicitly enables the # +CONDSTORE+ extension. # - # source://net-imap/lib/net/imap.rb#2126 + # source://net-imap/lib/net/imap.rb#2161 def store(set, attr, flags, unchangedsince: T.unsafe(nil)); end # Sends a {SUBSCRIBE command [IMAP4rev1 §6.3.6]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.6] @@ -2090,7 +2136,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #unsubscribe, #lsub, #list # - # source://net-imap/lib/net/imap.rb#1468 + # source://net-imap/lib/net/imap.rb#1503 def subscribe(mailbox); end # Sends a {THREAD command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] @@ -2115,7 +2161,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +THREAD+ # [RFC5256[https://tools.ietf.org/html/rfc5256]]. # - # source://net-imap/lib/net/imap.rb#2282 + # source://net-imap/lib/net/imap.rb#2317 def thread(algorithm, search_keys, charset); end # Returns true after the TLS negotiation has completed and the remote @@ -2124,7 +2170,7 @@ class Net::IMAP < ::Net::Protocol # # @return [Boolean] # - # source://net-imap/lib/net/imap.rb#923 + # source://net-imap/lib/net/imap.rb#955 def tls_verified?; end # Sends a {UID COPY command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] @@ -2137,7 +2183,7 @@ class Net::IMAP < ::Net::Protocol # # +UIDPLUS+ affects #uid_copy the same way it affects #copy. # - # source://net-imap/lib/net/imap.rb#2175 + # source://net-imap/lib/net/imap.rb#2210 def uid_copy(set, mailbox); end # Sends a {UID EXPUNGE command [RFC4315 §2.1]}[https://www.rfc-editor.org/rfc/rfc4315#section-2.1] @@ -2166,7 +2212,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +UIDPLUS+ # [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]]. # - # source://net-imap/lib/net/imap.rb#1914 + # source://net-imap/lib/net/imap.rb#1949 def uid_expunge(uid_set); end # :call-seq: @@ -2188,7 +2234,7 @@ class Net::IMAP < ::Net::Protocol # ===== Capabilities # Same as #fetch. # - # source://net-imap/lib/net/imap.rb#2079 + # source://net-imap/lib/net/imap.rb#2114 def uid_fetch(set, attr, mod = T.unsafe(nil), changedsince: T.unsafe(nil)); end # Sends a {UID MOVE command [RFC6851 §3.2]}[https://www.rfc-editor.org/rfc/rfc6851#section-3.2] @@ -2206,7 +2252,7 @@ class Net::IMAP < ::Net::Protocol # [RFC6851[https://tools.ietf.org/html/rfc6851]]. +UIDPLUS+ also affects # #uid_move the same way it affects #move. # - # source://net-imap/lib/net/imap.rb#2216 + # source://net-imap/lib/net/imap.rb#2251 def uid_move(set, mailbox); end # Sends a {UID SEARCH command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] @@ -2219,7 +2265,7 @@ class Net::IMAP < ::Net::Protocol # # See #search for documentation of search criteria. # - # source://net-imap/lib/net/imap.rb#2001 + # source://net-imap/lib/net/imap.rb#2036 def uid_search(keys, charset = T.unsafe(nil)); end # Sends a {UID SORT command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] @@ -2234,7 +2280,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +SORT+ # [RFC5256[https://tools.ietf.org/html/rfc5256]]. # - # source://net-imap/lib/net/imap.rb#2257 + # source://net-imap/lib/net/imap.rb#2292 def uid_sort(sort_keys, search_keys, charset); end # :call-seq: @@ -2252,7 +2298,7 @@ class Net::IMAP < ::Net::Protocol # ===== Capabilities # Same as #store. # - # source://net-imap/lib/net/imap.rb#2144 + # source://net-imap/lib/net/imap.rb#2179 def uid_store(set, attr, flags, unchangedsince: T.unsafe(nil)); end # Sends a {UID THREAD command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] @@ -2266,7 +2312,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +THREAD+ # [RFC5256[https://tools.ietf.org/html/rfc5256]]. # - # source://net-imap/lib/net/imap.rb#2296 + # source://net-imap/lib/net/imap.rb#2331 def uid_thread(algorithm, search_keys, charset); end # Sends an {UNSELECT command [RFC3691 §2]}[https://www.rfc-editor.org/rfc/rfc3691#section-3] @@ -2282,7 +2328,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +UNSELECT+ # [RFC3691[https://tools.ietf.org/html/rfc3691]]. # - # source://net-imap/lib/net/imap.rb#1873 + # source://net-imap/lib/net/imap.rb#1908 def unselect; end # Sends an {UNSUBSCRIBE command [IMAP4rev1 §6.3.7]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.7] @@ -2295,7 +2341,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #subscribe, #lsub, #list # - # source://net-imap/lib/net/imap.rb#1481 + # source://net-imap/lib/net/imap.rb#1516 def unsubscribe(mailbox); end # Sends a XLIST command, and returns a subset of names from @@ -2336,72 +2382,72 @@ class Net::IMAP < ::Net::Protocol # unless the SPECIAL-USE return option is supplied. # ++ # - # source://net-imap/lib/net/imap.rb#1616 + # source://net-imap/lib/net/imap.rb#1651 def xlist(refname, mailbox); end private - # source://net-imap/lib/net/imap.rb#2915 + # source://net-imap/lib/net/imap.rb#2964 def build_ssl_ctx(ssl); end # NOTE: only call this for greeting, login, and authenticate # - # source://net-imap/lib/net/imap.rb#2754 + # source://net-imap/lib/net/imap.rb#2803 def capabilities_from_resp_code(resp); end - # source://net-imap/lib/net/imap.rb#2876 + # source://net-imap/lib/net/imap.rb#2925 def copy_internal(cmd, set, mailbox); end - # source://net-imap/lib/net/imap.rb#2839 + # source://net-imap/lib/net/imap.rb#2888 def fetch_internal(cmd, set, attr, mod = T.unsafe(nil), changedsince: T.unsafe(nil)); end - # source://net-imap/lib/net/imap.rb#2803 + # source://net-imap/lib/net/imap.rb#2852 def generate_tag; end - # source://net-imap/lib/net/imap.rb#2717 + # source://net-imap/lib/net/imap.rb#2766 def get_response; end # @raise [Error] # - # source://net-imap/lib/net/imap.rb#2596 + # source://net-imap/lib/net/imap.rb#2645 def get_server_greeting; end - # source://net-imap/lib/net/imap.rb#2689 + # source://net-imap/lib/net/imap.rb#2738 def get_tagged_response(tag, cmd, timeout = T.unsafe(nil)); end - # source://net-imap/lib/net/imap.rb#2904 + # source://net-imap/lib/net/imap.rb#2953 def normalize_searching_criteria(keys); end - # source://net-imap/lib/net/imap.rb#2808 + # source://net-imap/lib/net/imap.rb#2857 def put_string(str); end - # source://net-imap/lib/net/imap.rb#2622 + # source://net-imap/lib/net/imap.rb#2671 def receive_responses; end # store name => [..., data] # - # source://net-imap/lib/net/imap.rb#2741 + # source://net-imap/lib/net/imap.rb#2790 def record_untagged_response(resp); end # store code.name => [..., code.data] # - # source://net-imap/lib/net/imap.rb#2747 + # source://net-imap/lib/net/imap.rb#2796 def record_untagged_response_code(resp); end - # source://net-imap/lib/net/imap.rb#2944 + # source://net-imap/lib/net/imap.rb#2993 def sasl_adapter; end - # source://net-imap/lib/net/imap.rb#2823 + # source://net-imap/lib/net/imap.rb#2872 def search_internal(cmd, keys, charset); end - # source://net-imap/lib/net/imap.rb#2775 + # source://net-imap/lib/net/imap.rb#2824 def send_command(cmd, *args, &block); end # Calls send_command, yielding the text of each ContinuationRequest and # responding with each block result. Returns TaggedResponse. Raises # NoResponseError or BadResponseError. # - # source://net-imap/lib/net/imap.rb#2766 + # source://net-imap/lib/net/imap.rb#2815 def send_command_with_continuations(cmd, *args); end # source://net-imap/lib/net/imap/command_data.rb#33 @@ -2431,39 +2477,44 @@ class Net::IMAP < ::Net::Protocol # source://net-imap/lib/net/imap/command_data.rb#116 def send_time_data(time); end - # source://net-imap/lib/net/imap.rb#2880 + # source://net-imap/lib/net/imap.rb#2929 def sort_internal(cmd, sort_keys, search_keys, charset); end - # source://net-imap/lib/net/imap.rb#2587 + # source://net-imap/lib/net/imap.rb#2636 def start_imap_connection; end - # source://net-imap/lib/net/imap.rb#2604 + # source://net-imap/lib/net/imap.rb#2653 def start_receiver_thread; end - # source://net-imap/lib/net/imap.rb#2930 + # source://net-imap/lib/net/imap.rb#2979 def start_tls_session; end - # source://net-imap/lib/net/imap.rb#2864 + # source://net-imap/lib/net/imap.rb#2913 def store_internal(cmd, set, attr, flags, unchangedsince: T.unsafe(nil)); end - # source://net-imap/lib/net/imap.rb#2613 + # source://net-imap/lib/net/imap.rb#2662 def tcp_socket(host, port); end - # source://net-imap/lib/net/imap.rb#2892 + # source://net-imap/lib/net/imap.rb#2941 def thread_internal(cmd, algorithm, search_keys, charset); end # source://net-imap/lib/net/imap/command_data.rb#12 def validate_data(data); end class << self - # Returns the debug mode. + # Returns the global Config object # # source://net-imap/lib/net/imap.rb#739 + def config; end + + # Returns the global debug mode. + # + # source://net-imap/lib/net/imap.rb#742 def debug; end - # Sets the debug mode. + # Sets the global debug mode. # - # source://net-imap/lib/net/imap.rb#744 + # source://net-imap/lib/net/imap.rb#745 def debug=(val); end # :call-seq: decode_date(string) -> Date @@ -2513,27 +2564,27 @@ class Net::IMAP < ::Net::Protocol # The default port for IMAP connections, port 143 # - # source://net-imap/lib/net/imap.rb#749 + # source://net-imap/lib/net/imap.rb#750 def default_imap_port; end # The default port for IMAPS connections, port 993 # - # source://net-imap/lib/net/imap.rb#754 + # source://net-imap/lib/net/imap.rb#755 def default_imaps_port; end # The default port for IMAP connections, port 143 # - # source://net-imap/lib/net/imap.rb#749 + # source://net-imap/lib/net/imap.rb#750 def default_port; end # The default port for IMAPS connections, port 993 # - # source://net-imap/lib/net/imap.rb#754 + # source://net-imap/lib/net/imap.rb#755 def default_ssl_port; end # The default port for IMAPS connections, port 993 # - # source://net-imap/lib/net/imap.rb#754 + # source://net-imap/lib/net/imap.rb#755 def default_tls_port; end # Formats +time+ as an IMAP4 date. @@ -2623,7 +2674,7 @@ class Net::IMAP < ::Net::Protocol # ++ # Delegates to Net::IMAP::StringPrep::SASLprep#saslprep. # - # source://net-imap/lib/net/imap.rb#2954 + # source://net-imap/lib/net/imap.rb#3003 def saslprep(string, **opts); end end end @@ -2702,7 +2753,7 @@ module Net::IMAP::BodyStructure; end # === Bug Analysis # # \IMAP body structures are parenthesized lists and assign their fields -# positionally, so missing fields change the intepretation of all +# positionally, so missing fields change the interpretation of all # following fields. Additionally, different body types have a different # number of required fields, followed by optional "extension" fields. # @@ -2717,7 +2768,7 @@ module Net::IMAP::BodyStructure; end # Normally, +envelope+ and +md5+ are incompatible, but Net::IMAP leniently # allowed buggy servers to send +NIL+ for +envelope+. As a result, when a # server sent a message/rfc822 part with +NIL+ for +md5+ and a -# non-NIL +dsp+, Net::IMAP mis-interpreted the +# non-NIL +dsp+, Net::IMAP misinterpreted the # Content-Disposition as if it were a strange body type. In all # reported cases, the Content-Disposition was "attachment", so # BodyTypeAttachment was created as the workaround. @@ -2725,7 +2776,7 @@ module Net::IMAP::BodyStructure; end # === Current behavior # # When interpreted strictly, +envelope+ and +md5+ are incompatible. So the -# current parsing algorithm peeks ahead after it has recieved the seventh +# current parsing algorithm peeks ahead after it has received the seventh # body field. If the next token is not the start of an +envelope+, we assume # the server has incorrectly sent us a body-type-basic and return # BodyTypeBasic. As a result, what was previously BodyTypeMessage#body => @@ -2919,6 +2970,511 @@ class Net::IMAP::ClientID def validate_internal(client_id); end end +# Net::IMAP::Config stores configuration options for Net::IMAP clients. +# The global configuration can be seen at either Net::IMAP.config or +# Net::IMAP::Config.global, and the client-specific configuration can be +# seen at Net::IMAP#config. +# +# When creating a new client, all unhandled keyword arguments to +# Net::IMAP.new are delegated to Config.new. Every client has its own +# config. +# +# debug_client = Net::IMAP.new(hostname, debug: true) +# quiet_client = Net::IMAP.new(hostname, debug: false) +# debug_client.config.debug? # => true +# quiet_client.config.debug? # => false +# +# == Inheritance +# +# Configs have a parent[rdoc-ref:Config::AttrInheritance#parent] config, and +# any attributes which have not been set locally will inherit the parent's +# value. Every client creates its own specific config. By default, client +# configs inherit from Config.global. +# +# plain_client = Net::IMAP.new(hostname) +# debug_client = Net::IMAP.new(hostname, debug: true) +# quiet_client = Net::IMAP.new(hostname, debug: false) +# +# plain_client.config.inherited?(:debug) # => true +# debug_client.config.inherited?(:debug) # => false +# quiet_client.config.inherited?(:debug) # => false +# +# plain_client.config.debug? # => false +# debug_client.config.debug? # => true +# quiet_client.config.debug? # => false +# +# # Net::IMAP.debug is delegated to Net::IMAP::Config.global.debug +# Net::IMAP.debug = true +# plain_client.config.debug? # => true +# debug_client.config.debug? # => true +# quiet_client.config.debug? # => false +# +# Net::IMAP.debug = false +# plain_client.config.debug = true +# plain_client.config.inherited?(:debug) # => false +# plain_client.config.debug? # => true +# plain_client.config.reset(:debug) +# plain_client.config.inherited?(:debug) # => true +# plain_client.config.debug? # => false +# +# == Versioned defaults +# +# The effective default configuration for a specific +x.y+ version of +# +net-imap+ can be loaded with the +config+ keyword argument to +# Net::IMAP.new. Requesting default configurations for previous versions +# enables extra backward compatibility with those versions: +# +# client = Net::IMAP.new(hostname, config: 0.3) +# client.config.sasl_ir # => false +# client.config.responses_without_block # => :silence_deprecation_warning +# +# client = Net::IMAP.new(hostname, config: 0.4) +# client.config.sasl_ir # => true +# client.config.responses_without_block # => :silence_deprecation_warning +# +# client = Net::IMAP.new(hostname, config: 0.5) +# client.config.sasl_ir # => true +# client.config.responses_without_block # => :warn +# +# client = Net::IMAP.new(hostname, config: :future) +# client.config.sasl_ir # => true +# client.config.responses_without_block # => :raise +# +# The versioned default configs inherit certain specific config options from +# Config.global, for example #debug: +# +# client = Net::IMAP.new(hostname, config: 0.4) +# Net::IMAP.debug = false +# client.config.debug? # => false +# +# Net::IMAP.debug = true +# client.config.debug? # => true +# +# Use #load_defaults to globally behave like a specific version: +# client = Net::IMAP.new(hostname) +# client.config.sasl_ir # => true +# Net::IMAP.config.load_defaults 0.3 +# client.config.sasl_ir # => false +# +# === Named defaults +# In addition to +x.y+ version numbers, the following aliases are supported: +# +# [+:default+] +# An alias for +:current+. +# +# >>> +# *NOTE*: This is _not_ the same as Config.default. It inherits some +# attributes from Config.global, for example: #debug. +# [+:current+] +# An alias for the current +x.y+ version's defaults. +# [+:next+] +# The _planned_ config for the next +x.y+ version. +# [+:future+] +# The _planned_ eventual config for some future +x.y+ version. +# +# For example, to raise exceptions for all current deprecations: +# client = Net::IMAP.new(hostname, config: :future) +# client.responses # raises an ArgumentError +# +# == Thread Safety +# +# *NOTE:* Updates to config objects are not synchronized for thread-safety. +# +# source://net-imap/lib/net/imap/config/attr_accessors.rb#7 +class Net::IMAP::Config + include ::Net::IMAP::Config::AttrAccessors + include ::Net::IMAP::Config::AttrInheritance + include ::Net::IMAP::Config::AttrTypeCoercion + extend ::Net::IMAP::Config::AttrAccessors::Macros + extend ::Net::IMAP::Config::AttrInheritance::Macros + extend ::Net::IMAP::Config::AttrTypeCoercion::Macros + + # Creates a new config object and initialize its attribute with +attrs+. + # + # If +parent+ is not given, the global config is used by default. + # + # If a block is given, the new config object is yielded to it. + # + # @return [Config] a new instance of Config + # @yield [_self] + # @yieldparam _self [Net::IMAP::Config] the object that the method was called on + # + # source://net-imap/lib/net/imap/config.rb#236 + def initialize(parent = T.unsafe(nil), **attrs); end + + # :call-seq: load_defaults(version) -> self + # + # Resets the current config to behave like the versioned default + # configuration for +version+. #parent will not be changed. + # + # Some config attributes default to inheriting from their #parent (which + # is usually Config.global) and are left unchanged, for example: #debug. + # + # See Config@Versioned+defaults and Config@Named+defaults. + # + # source://net-imap/lib/net/imap/config.rb#287 + def load_defaults(version); end + + # :call-seq: to_h -> hash + # + # Returns all config attributes in a hash. + # + # source://net-imap/lib/net/imap/config.rb#296 + def to_h; end + + # :call-seq: update(**attrs) -> self + # + # Assigns all of the provided +attrs+ to this config, and returns +self+. + # + # An ArgumentError is raised unless every key in +attrs+ matches an + # assignment method on Config. + # + # >>> + # *NOTE:* #update is not atomic. If an exception is raised due to an + # invalid attribute value, +attrs+ may be partially applied. + # + # source://net-imap/lib/net/imap/config.rb#252 + def update(**attrs); end + + # :call-seq: + # with(**attrs) -> config + # with(**attrs) {|config| } -> result + # + # Without a block, returns a new config which inherits from self. With a + # block, yields the new config and returns the block's result. + # + # If no keyword arguments are given, an ArgumentError will be raised. + # + # If +self+ is frozen, the copy will also be frozen. + # + # source://net-imap/lib/net/imap/config.rb#270 + def with(**attrs); end + + protected + + # source://net-imap/lib/net/imap/config.rb#300 + def defaults_hash; end + + class << self + # :call-seq: + # Net::IMAP::Config[number] -> versioned config + # Net::IMAP::Config[symbol] -> named config + # Net::IMAP::Config[hash] -> new frozen config + # Net::IMAP::Config[config] -> same config + # + # Given a version number, returns the default configuration for the target + # version. See Config@Versioned+defaults. + # + # Given a version name, returns the default configuration for the target + # version. See Config@Named+defaults. + # + # Given a Hash, creates a new _frozen_ config which inherits from + # Config.global. Use Config.new for an unfrozen config. + # + # Given a config, returns that same config. + # + # source://net-imap/lib/net/imap/config.rb#151 + def [](config); end + + # The default config, which is hardcoded and frozen. + # + # source://net-imap/lib/net/imap/config.rb#126 + def default; end + + # The global config object. Also available from Net::IMAP.config. + # + # source://net-imap/lib/net/imap/config.rb#129 + def global; end + + # A hash of hard-coded configurations, indexed by version number. + # + # source://net-imap/lib/net/imap/config.rb#132 + def version_defaults; end + end +end + +# >>> +# *NOTE:* This module is an internal implementation detail, with no +# guarantee of backward compatibility. +# +# +attr_accessor+ values are stored in a struct rather than ivars, making +# it simpler to ensure that all config objects share a single object +# shape. This also simplifies iteration over all defined attributes. +# +# source://net-imap/lib/net/imap/config/attr_accessors.rb#15 +module Net::IMAP::Config::AttrAccessors + extend ::Forwardable + + mixes_in_class_methods ::Net::IMAP::Config::AttrAccessors::Macros + + # :notnew: + # + # source://net-imap/lib/net/imap/config/attr_accessors.rb#45 + def initialize; end + + # source://forwardable/1.3.3forwardable.rb#231 + def debug(*args, **_arg1, &block); end + + # source://forwardable/1.3.3forwardable.rb#231 + def debug=(*args, **_arg1, &block); end + + # Freezes the internal attributes struct, in addition to +self+. + # + # source://net-imap/lib/net/imap/config/attr_accessors.rb#51 + def freeze; end + + # source://forwardable/1.3.3forwardable.rb#231 + def idle_response_timeout(*args, **_arg1, &block); end + + # source://forwardable/1.3.3forwardable.rb#231 + def idle_response_timeout=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3forwardable.rb#231 + def open_timeout(*args, **_arg1, &block); end + + # source://forwardable/1.3.3forwardable.rb#231 + def open_timeout=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3forwardable.rb#231 + def responses_without_block(*args, **_arg1, &block); end + + # source://forwardable/1.3.3forwardable.rb#231 + def responses_without_block=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3forwardable.rb#231 + def sasl_ir(*args, **_arg1, &block); end + + # source://forwardable/1.3.3forwardable.rb#231 + def sasl_ir=(*args, **_arg1, &block); end + + protected + + # source://net-imap/lib/net/imap/config/attr_accessors.rb#58 + def data; end + + private + + # source://net-imap/lib/net/imap/config/attr_accessors.rb#62 + def initialize_clone(other); end + + # source://net-imap/lib/net/imap/config/attr_accessors.rb#67 + def initialize_dup(other); end + + class << self + # source://net-imap/lib/net/imap/config/attr_accessors.rb#28 + def attr_accessor(name); end + + # source://net-imap/lib/net/imap/config/attr_accessors.rb#38 + def struct; end + + private + + # source://net-imap/lib/net/imap/config/attr_accessors.rb#33 + def attributes; end + + # @private + # + # source://net-imap/lib/net/imap/config/attr_accessors.rb#21 + def included(mod); end + end +end + +# source://net-imap/lib/net/imap/config/attr_accessors.rb#16 +module Net::IMAP::Config::AttrAccessors::Macros + # source://net-imap/lib/net/imap/config/attr_accessors.rb#17 + def attr_accessor(name); end +end + +# source://net-imap/lib/net/imap/config.rb#0 +class Net::IMAP::Config::AttrAccessors::Struct < ::Struct + def debug; end + def debug=(_); end + def idle_response_timeout; end + def idle_response_timeout=(_); end + def open_timeout; end + def open_timeout=(_); end + def responses_without_block; end + def responses_without_block=(_); end + def sasl_ir; end + def sasl_ir=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# >>> +# *NOTE:* The public methods on this module are part of the stable +# public API of Net::IMAP::Config. But the module itself is an internal +# implementation detail, with no guarantee of backward compatibility. +# +# +attr_accessor+ methods will delegate to their #parent when the local +# value does not contain an override. Inheritance forms a singly linked +# list, so lookup will be O(n) on the number of ancestors. In +# practice, the ancestor chain is not expected to be long. Without +# customization, it is only three deep: +# >>> +# IMAP#config → Config.global → Config.default +# +# When creating a client with the +config+ keyword, for example to use +# the appropriate defaults for an application or a library while still +# relying on global for configuration of +debug+ or +logger+, most likely +# the ancestor chain is still only four deep: +# >>> +# IMAP#config → alternate defaults → Config.global → Config.default +# +# source://net-imap/lib/net/imap/config/attr_inheritance.rb#25 +module Net::IMAP::Config::AttrInheritance + mixes_in_class_methods ::Net::IMAP::Config::AttrInheritance::Macros + + # :notnew: + # + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#48 + def initialize(parent = T.unsafe(nil)); end + + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#41 + def debug; end + + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#41 + def idle_response_timeout; end + + # Returns +true+ if +attr+ is inherited from #parent and not overridden + # by this config. + # + # @return [Boolean] + # + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#59 + def inherited?(attr); end + + # Creates a new config, which inherits from +self+. + # + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#55 + def new(**attrs); end + + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#41 + def open_timeout; end + + # The parent Config object + # + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#46 + def parent; end + + # :call-seq: + # reset -> self + # reset(attr) -> attribute value + # + # Resets an +attr+ to inherit from the #parent config. + # + # When +attr+ is nil or not given, all attributes are reset. + # + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#68 + def reset(attr = T.unsafe(nil)); end + + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#41 + def responses_without_block; end + + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#41 + def sasl_ir; end + + private + + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#82 + def initialize_copy(other); end + + class << self + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#39 + def attr_accessor(name); end + + private + + # @private + # + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#34 + def included(mod); end + end +end + +# source://net-imap/lib/net/imap/config/attr_inheritance.rb#26 +module Net::IMAP::Config::AttrInheritance::INHERITED; end + +# source://net-imap/lib/net/imap/config/attr_inheritance.rb#29 +module Net::IMAP::Config::AttrInheritance::Macros + # source://net-imap/lib/net/imap/config/attr_inheritance.rb#30 + def attr_accessor(name); end +end + +# >>> +# *NOTE:* This module is an internal implementation detail, with no +# guarantee of backward compatibility. +# +# Adds a +type+ keyword parameter to +attr_accessor+, to enforce that +# config attributes have valid types, for example: boolean, numeric, +# enumeration, non-nullable, etc. +# +# source://net-imap/lib/net/imap/config/attr_type_coercion.rb#13 +module Net::IMAP::Config::AttrTypeCoercion + mixes_in_class_methods ::Net::IMAP::Config::AttrTypeCoercion::Macros + + # source://net-imap/lib/net/imap/config/attr_type_coercion.rb#39 + def debug=(val); end + + # source://net-imap/lib/net/imap/config/attr_type_coercion.rb#40 + def debug?; end + + # source://net-imap/lib/net/imap/config/attr_type_coercion.rb#44 + def idle_response_timeout=(val); end + + # source://net-imap/lib/net/imap/config/attr_type_coercion.rb#44 + def open_timeout=(val); end + + # source://net-imap/lib/net/imap/config/attr_type_coercion.rb#50 + def responses_without_block=(val); end + + # source://net-imap/lib/net/imap/config/attr_type_coercion.rb#39 + def sasl_ir=(val); end + + # source://net-imap/lib/net/imap/config/attr_type_coercion.rb#40 + def sasl_ir?; end + + class << self + # source://net-imap/lib/net/imap/config/attr_type_coercion.rb#29 + def attr_accessor(attr, type: T.unsafe(nil)); end + + # source://net-imap/lib/net/imap/config/attr_type_coercion.rb#38 + def boolean(attr); end + + # source://net-imap/lib/net/imap/config/attr_type_coercion.rb#47 + def enum(attr, enum); end + + # source://net-imap/lib/net/imap/config/attr_type_coercion.rb#43 + def integer(attr); end + + private + + # @private + # + # source://net-imap/lib/net/imap/config/attr_type_coercion.rb#24 + def included(mod); end + end +end + +# :stopdoc: internal APIs only +# +# source://net-imap/lib/net/imap/config/attr_type_coercion.rb#16 +module Net::IMAP::Config::AttrTypeCoercion::Macros + # source://net-imap/lib/net/imap/config/attr_type_coercion.rb#17 + def attr_accessor(attr, type: T.unsafe(nil)); end +end + +# Array of attribute names that are _not_ loaded by #load_defaults. +# +# source://net-imap/lib/net/imap/config.rb#122 +Net::IMAP::Config::DEFAULT_TO_INHERIT = T.let(T.unsafe(nil), Array) + # Mailbox attribute indicating that this mailbox is used to hold draft # messages -- typically, messages that are being composed but have not yet # been sent. In some server implementations, this might be a virtual @@ -2943,11 +3499,11 @@ module Net::IMAP::DeprecatedClientOptions # # ==== Obsolete arguments # - # Using obsolete arguments does not a warning. Obsolete arguments will be - # deprecated by a future release. + # Use of obsolete arguments does not print a warning. Obsolete arguments + # will be deprecated by a future release. # # If a second positional argument is given and it is a hash (or is - # convertable via +#to_hash+), it is converted to keyword arguments. + # convertible via +#to_hash+), it is converted to keyword arguments. # # # Obsolete: # Net::IMAP.new("imap.example.com", options_hash) @@ -3633,7 +4189,7 @@ Net::IMAP::HAS_NO_CHILDREN = T.let(T.unsafe(nil), Symbol) # Net::IMAP::IgnoredResponse represents intentionally ignored responses. # -# This includes untagged response "NOOP" sent by eg. Zimbra to avoid +# This includes untagged response "NOOP" sent by e.g. Zimbra to avoid # some clients to close the connection. # # It matches no IMAP standard. @@ -3905,8 +4461,8 @@ class Net::IMAP::ResponseParser # # @return [ResponseParser] a new instance of ResponseParser # - # source://net-imap/lib/net/imap/response_parser.rb#15 - def initialize; end + # source://net-imap/lib/net/imap/response_parser.rb#17 + def initialize(config: T.unsafe(nil)); end # source://net-imap/lib/net/imap/response_parser/parser_utils.rb#104 def CRLF!; end @@ -3969,6 +4525,11 @@ class Net::IMAP::ResponseParser # source://net-imap/lib/net/imap/response_parser/parser_utils.rb#96 def case_insensitive__string?; end + # Returns the value of attribute config. + # + # source://net-imap/lib/net/imap/response_parser.rb#14 + def config; end + # date-time = DQUOTE date-day-fixed "-" date-month "-" date-year # SP time SP zone DQUOTE # @@ -4123,7 +4684,7 @@ class Net::IMAP::ResponseParser # # Raises ResponseParseError for unparsable strings. # - # source://net-imap/lib/net/imap/response_parser.rb#28 + # source://net-imap/lib/net/imap/response_parser.rb#31 def parse(str); end # source://net-imap/lib/net/imap/response_parser/parser_utils.rb#30 @@ -4237,32 +4798,32 @@ class Net::IMAP::ResponseParser # # This advances @pos directly so it's safe before changing @lex_state. # - # source://net-imap/lib/net/imap/response_parser.rb#2024 + # source://net-imap/lib/net/imap/response_parser.rb#2028 def accept_spaces; end # acl-data = "ACL" SP mailbox *(SP identifier SP rights) # - # source://net-imap/lib/net/imap/response_parser.rb#1425 + # source://net-imap/lib/net/imap/response_parser.rb#1429 def acl_data; end # nstring = string / nil # - # source://net-imap/lib/net/imap/response_parser.rb#543 + # source://net-imap/lib/net/imap/response_parser.rb#546 def addr_adl; end # nstring = string / nil # - # source://net-imap/lib/net/imap/response_parser.rb#543 + # source://net-imap/lib/net/imap/response_parser.rb#546 def addr_host; end # nstring = string / nil # - # source://net-imap/lib/net/imap/response_parser.rb#543 + # source://net-imap/lib/net/imap/response_parser.rb#546 def addr_mailbox; end # nstring = string / nil # - # source://net-imap/lib/net/imap/response_parser.rb#543 + # source://net-imap/lib/net/imap/response_parser.rb#546 def addr_name; end # address = "(" addr-name SP addr-adl SP addr-mailbox SP @@ -4272,38 +4833,38 @@ class Net::IMAP::ResponseParser # addr-mailbox = nstring # addr-name = nstring # - # source://net-imap/lib/net/imap/response_parser.rb#1893 + # source://net-imap/lib/net/imap/response_parser.rb#1897 def address; end # astring = 1*ASTRING-CHAR / string # - # source://net-imap/lib/net/imap/response_parser.rb#503 + # source://net-imap/lib/net/imap/response_parser.rb#506 def astring; end # @return [Boolean] # - # source://net-imap/lib/net/imap/response_parser.rb#507 + # source://net-imap/lib/net/imap/response_parser.rb#510 def astring?; end - # source://net-imap/lib/net/imap/response_parser.rb#488 + # source://net-imap/lib/net/imap/response_parser.rb#491 def astring_chars; end # TODO: handle atom, astring_chars, and tag entirely inside the lexer # - # source://net-imap/lib/net/imap/response_parser.rb#487 + # source://net-imap/lib/net/imap/response_parser.rb#490 def atom; end # the #accept version of #atom # # @return [Boolean] # - # source://net-imap/lib/net/imap/response_parser.rb#492 + # source://net-imap/lib/net/imap/response_parser.rb#495 def atom?; end # RFC-3501 & RFC-9051: # body = "(" (body-type-1part / body-type-mpart) ")" # - # source://net-imap/lib/net/imap/response_parser.rb#1009 + # source://net-imap/lib/net/imap/response_parser.rb#1012 def body; end # RFC2060 @@ -4318,7 +4879,7 @@ class Net::IMAP::ResponseParser # ; MUST NOT be returned on non-extensible # ; "BODY" fetch # - # source://net-imap/lib/net/imap/response_parser.rb#1181 + # source://net-imap/lib/net/imap/response_parser.rb#1184 def body_ext_1part; end # RFC-2060: @@ -4332,7 +4893,7 @@ class Net::IMAP::ResponseParser # ; MUST NOT be returned on non-extensible # ; "BODY" fetch # - # source://net-imap/lib/net/imap/response_parser.rb#1200 + # source://net-imap/lib/net/imap/response_parser.rb#1203 def body_ext_mpart; end # body-extension = nstring / number / number64 / @@ -4344,93 +4905,93 @@ class Net::IMAP::ResponseParser # ; future Standard or Standards Track # ; revisions of this specification. # - # source://net-imap/lib/net/imap/response_parser.rb#1257 + # source://net-imap/lib/net/imap/response_parser.rb#1260 def body_extension; end # body-extension *(SP body-extension) # - # source://net-imap/lib/net/imap/response_parser.rb#1243 + # source://net-imap/lib/net/imap/response_parser.rb#1246 def body_extensions; end # RFC-3501 & RFC-9051: # body-fields = body-fld-param SP body-fld-id SP body-fld-desc SP # body-fld-enc SP body-fld-octets # - # source://net-imap/lib/net/imap/response_parser.rb#1145 + # source://net-imap/lib/net/imap/response_parser.rb#1148 def body_fields; end # nstring = string / nil # - # source://net-imap/lib/net/imap/response_parser.rb#543 + # source://net-imap/lib/net/imap/response_parser.rb#546 def body_fld_desc; end # body-fld-dsp = "(" string SP body-fld-param ")" / nil # - # source://net-imap/lib/net/imap/response_parser.rb#1222 + # source://net-imap/lib/net/imap/response_parser.rb#1225 def body_fld_dsp; end # nstring = string / nil # - # source://net-imap/lib/net/imap/response_parser.rb#543 + # source://net-imap/lib/net/imap/response_parser.rb#546 def body_fld_id; end # body-fld-lang = nstring / "(" string *(SP string) ")" # - # source://net-imap/lib/net/imap/response_parser.rb#1231 + # source://net-imap/lib/net/imap/response_parser.rb#1234 def body_fld_lang; end # nstring = string / nil # - # source://net-imap/lib/net/imap/response_parser.rb#543 + # source://net-imap/lib/net/imap/response_parser.rb#546 def body_fld_loc; end # nstring = string / nil # - # source://net-imap/lib/net/imap/response_parser.rb#543 + # source://net-imap/lib/net/imap/response_parser.rb#546 def body_fld_md5; end # RFC3501, RFC9051: # body-fld-param = "(" string SP string *(SP string SP string) ")" / nil # - # source://net-imap/lib/net/imap/response_parser.rb#1157 + # source://net-imap/lib/net/imap/response_parser.rb#1160 def body_fld_param; end # RFC-3501 & RFC9051: # body-type-1part = (body-type-basic / body-type-msg / body-type-text) # [SP body-ext-1part] # - # source://net-imap/lib/net/imap/response_parser.rb#1021 + # source://net-imap/lib/net/imap/response_parser.rb#1024 def body_type_1part; end # RFC-3501 & RFC9051: # body-type-basic = media-basic SP body-fields # - # source://net-imap/lib/net/imap/response_parser.rb#1045 + # source://net-imap/lib/net/imap/response_parser.rb#1048 def body_type_basic; end # This is a malformed body-type-mpart with no subparts. # - # source://net-imap/lib/net/imap/response_parser.rb#1094 + # source://net-imap/lib/net/imap/response_parser.rb#1097 def body_type_mixed; end # RFC-3501 & RFC-9051: # body-type-mpart = 1*body SP media-subtype # [SP body-ext-mpart] # - # source://net-imap/lib/net/imap/response_parser.rb#1104 + # source://net-imap/lib/net/imap/response_parser.rb#1107 def body_type_mpart; end # RFC-3501 & RFC-9051: # body-type-msg = media-message SP body-fields SP envelope # SP body SP body-fld-lines # - # source://net-imap/lib/net/imap/response_parser.rb#1066 + # source://net-imap/lib/net/imap/response_parser.rb#1069 def body_type_msg; end # RFC-3501 & RFC-9051: # body-type-text = media-text SP body-fields SP body-fld-lines # - # source://net-imap/lib/net/imap/response_parser.rb#1055 + # source://net-imap/lib/net/imap/response_parser.rb#1058 def body_type_text; end # Returns atom.upcase @@ -4439,20 +5000,20 @@ class Net::IMAP::ResponseParser # ; registered with IANA as standard or # ; standards-track # - # source://net-imap/lib/net/imap/response_parser.rb#495 + # source://net-imap/lib/net/imap/response_parser.rb#498 def capability; end # Returns atom?&.upcase # # @return [Boolean] # - # source://net-imap/lib/net/imap/response_parser.rb#498 + # source://net-imap/lib/net/imap/response_parser.rb#501 def capability?; end # As a workaround for buggy servers, allow a trailing SP: # *(SP capability) [SP] # - # source://net-imap/lib/net/imap/response_parser.rb#1628 + # source://net-imap/lib/net/imap/response_parser.rb#1632 def capability__list; end # The presence of "IMAP4rev1" or "IMAP4rev2" is unenforced here. @@ -4466,39 +5027,39 @@ class Net::IMAP::ResponseParser # capability-data = "CAPABILITY" *(SP capability) SP "IMAP4rev2" # *(SP capability) # - # source://net-imap/lib/net/imap/response_parser.rb#1617 + # source://net-imap/lib/net/imap/response_parser.rb#1621 def capability_data__untagged; end # Returns atom.upcase # - # source://net-imap/lib/net/imap/response_parser.rb#495 + # source://net-imap/lib/net/imap/response_parser.rb#498 def case_insensitive__atom; end # Returns atom?&.upcase # # @return [Boolean] # - # source://net-imap/lib/net/imap/response_parser.rb#498 + # source://net-imap/lib/net/imap/response_parser.rb#501 def case_insensitive__atom?; end # use where nstring represents "LABEL" values # - # source://net-imap/lib/net/imap/response_parser.rb#556 + # source://net-imap/lib/net/imap/response_parser.rb#559 def case_insensitive__nstring; end # See https://www.rfc-editor.org/errata/rfc3501 # # charset = atom / quoted # - # source://net-imap/lib/net/imap/response_parser.rb#1964 + # source://net-imap/lib/net/imap/response_parser.rb#1968 def charset; end # "(" charset *(SP charset) ")" # - # source://net-imap/lib/net/imap/response_parser.rb#1847 + # source://net-imap/lib/net/imap/response_parser.rb#1851 def charset__list; end - # source://net-imap/lib/net/imap/response_parser.rb#748 + # source://net-imap/lib/net/imap/response_parser.rb#751 def comparator_data(klass = T.unsafe(nil)); end # RFC3501 & RFC9051: @@ -4509,12 +5070,12 @@ class Net::IMAP::ResponseParser # # continue-req = "+" (SP (resp-text)) CRLF # - # source://net-imap/lib/net/imap/response_parser.rb#673 + # source://net-imap/lib/net/imap/response_parser.rb#676 def continue_req; end # enable-data = "ENABLED" *(SP capability) # - # source://net-imap/lib/net/imap/response_parser.rb#1622 + # source://net-imap/lib/net/imap/response_parser.rb#1626 def enable_data; end # env-from = "(" 1*address ")" / nil @@ -4524,7 +5085,7 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap/lib/net/imap/response_parser.rb#983 + # source://net-imap/lib/net/imap/response_parser.rb#986 def env_bcc; end # env-from = "(" 1*address ")" / nil @@ -4534,7 +5095,7 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap/lib/net/imap/response_parser.rb#983 + # source://net-imap/lib/net/imap/response_parser.rb#986 def env_cc; end # nstring = string / nil @@ -4543,7 +5104,7 @@ class Net::IMAP::ResponseParser # env-in-reply-to = nstring # env-message-id = nstring # - # source://net-imap/lib/net/imap/response_parser.rb#543 + # source://net-imap/lib/net/imap/response_parser.rb#546 def env_date; end # env-from = "(" 1*address ")" / nil @@ -4553,17 +5114,17 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap/lib/net/imap/response_parser.rb#983 + # source://net-imap/lib/net/imap/response_parser.rb#986 def env_from; end # nstring = string / nil # - # source://net-imap/lib/net/imap/response_parser.rb#543 + # source://net-imap/lib/net/imap/response_parser.rb#546 def env_in_reply_to; end # nstring = string / nil # - # source://net-imap/lib/net/imap/response_parser.rb#543 + # source://net-imap/lib/net/imap/response_parser.rb#546 def env_message_id; end # env-from = "(" 1*address ")" / nil @@ -4573,7 +5134,7 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap/lib/net/imap/response_parser.rb#983 + # source://net-imap/lib/net/imap/response_parser.rb#986 def env_reply_to; end # env-from = "(" 1*address ")" / nil @@ -4583,12 +5144,12 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap/lib/net/imap/response_parser.rb#983 + # source://net-imap/lib/net/imap/response_parser.rb#986 def env_sender; end # nstring = string / nil # - # source://net-imap/lib/net/imap/response_parser.rb#543 + # source://net-imap/lib/net/imap/response_parser.rb#546 def env_subject; end # env-from = "(" 1*address ")" / nil @@ -4598,7 +5159,7 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap/lib/net/imap/response_parser.rb#983 + # source://net-imap/lib/net/imap/response_parser.rb#986 def env_to; end # RFC3501 & RFC9051: @@ -4606,29 +5167,29 @@ class Net::IMAP::ResponseParser # env-sender SP env-reply-to SP env-to SP env-cc SP # env-bcc SP env-in-reply-to SP env-message-id ")" # - # source://net-imap/lib/net/imap/response_parser.rb#949 + # source://net-imap/lib/net/imap/response_parser.rb#952 def envelope; end - # source://net-imap/lib/net/imap/response_parser.rb#748 + # source://net-imap/lib/net/imap/response_parser.rb#751 def esearch_response(klass = T.unsafe(nil)); end - # source://net-imap/lib/net/imap/response_parser.rb#748 + # source://net-imap/lib/net/imap/response_parser.rb#751 def expunged_resp(klass = T.unsafe(nil)); end # flag-list = "(" [flag *(SP flag)] ")" # - # source://net-imap/lib/net/imap/response_parser.rb#1914 + # source://net-imap/lib/net/imap/response_parser.rb#1918 def flag_list; end # "(" [flag-perm *(SP flag-perm)] ")" # - # source://net-imap/lib/net/imap/response_parser.rb#1924 + # source://net-imap/lib/net/imap/response_parser.rb#1928 def flag_perm__list; end # TODO: handle atom, astring_chars, and tag entirely inside the lexer # this represents the partial size for BODY or BINARY # - # source://net-imap/lib/net/imap/response_parser.rb#487 + # source://net-imap/lib/net/imap/response_parser.rb#490 def gt__number__lt; end # RFC3501 & RFC9051: @@ -4654,33 +5215,33 @@ class Net::IMAP::ResponseParser # %d59-126 ; characters not including # ; ":". # - # source://net-imap/lib/net/imap/response_parser.rb#1335 + # source://net-imap/lib/net/imap/response_parser.rb#1338 def header_fld_name; end # header-list = "(" header-fld-name *(SP header-fld-name) ")" # - # source://net-imap/lib/net/imap/response_parser.rb#1301 + # source://net-imap/lib/net/imap/response_parser.rb#1304 def header_list; end - # source://net-imap/lib/net/imap/response_parser.rb#1641 + # source://net-imap/lib/net/imap/response_parser.rb#1645 def id_response; end # Use #label or #label_in to assert specific known labels # (+tagged-ext-label+ only, not +atom+). # - # source://net-imap/lib/net/imap/response_parser.rb#513 + # source://net-imap/lib/net/imap/response_parser.rb#516 def label(word); end # Use #label or #label_in to assert specific known labels # (+tagged-ext-label+ only, not +atom+). # - # source://net-imap/lib/net/imap/response_parser.rb#520 + # source://net-imap/lib/net/imap/response_parser.rb#523 def label_in(*labels); end - # source://net-imap/lib/net/imap/response_parser.rb#748 + # source://net-imap/lib/net/imap/response_parser.rb#751 def language_data(klass = T.unsafe(nil)); end - # source://net-imap/lib/net/imap/response_parser.rb#748 + # source://net-imap/lib/net/imap/response_parser.rb#751 def listrights_data(klass = T.unsafe(nil)); end # astring = 1*ASTRING-CHAR / string @@ -4693,10 +5254,10 @@ class Net::IMAP::ResponseParser # ; Refer to section 5.1 for further # ; semantic details of mailbox names. # - # source://net-imap/lib/net/imap/response_parser.rb#503 + # source://net-imap/lib/net/imap/response_parser.rb#506 def mailbox; end - # source://net-imap/lib/net/imap/response_parser.rb#832 + # source://net-imap/lib/net/imap/response_parser.rb#835 def mailbox_data__exists; end # mailbox-data = "FLAGS" SP flag-list / "LIST" SP mailbox-list / @@ -4704,16 +5265,16 @@ class Net::IMAP::ResponseParser # "STATUS" SP mailbox SP "(" [status-att-list] ")" / # number SP "EXISTS" / number SP "RECENT" # - # source://net-imap/lib/net/imap/response_parser.rb#1347 + # source://net-imap/lib/net/imap/response_parser.rb#1351 def mailbox_data__flags; end - # source://net-imap/lib/net/imap/response_parser.rb#1353 + # source://net-imap/lib/net/imap/response_parser.rb#1357 def mailbox_data__list; end - # source://net-imap/lib/net/imap/response_parser.rb#1353 + # source://net-imap/lib/net/imap/response_parser.rb#1357 def mailbox_data__lsub; end - # source://net-imap/lib/net/imap/response_parser.rb#832 + # source://net-imap/lib/net/imap/response_parser.rb#835 def mailbox_data__recent; end # RFC3501: @@ -4731,15 +5292,15 @@ class Net::IMAP::ResponseParser # mailbox-data = obsolete-search-response / ... # obsolete-search-response = "SEARCH" *(SP nz-number) # - # source://net-imap/lib/net/imap/response_parser.rb#1465 + # source://net-imap/lib/net/imap/response_parser.rb#1469 def mailbox_data__search; end # mailbox-data =/ "STATUS" SP mailbox SP "(" [status-att-list] ")" # - # source://net-imap/lib/net/imap/response_parser.rb#1531 + # source://net-imap/lib/net/imap/response_parser.rb#1535 def mailbox_data__status; end - # source://net-imap/lib/net/imap/response_parser.rb#1353 + # source://net-imap/lib/net/imap/response_parser.rb#1357 def mailbox_data__xlist; end # mailbox-list = "(" [mbx-list-flags] ")" SP @@ -4748,12 +5309,12 @@ class Net::IMAP::ResponseParser # ; This is the list information pointed to by the ABNF # ; item "mailbox-data", which is defined above # - # source://net-imap/lib/net/imap/response_parser.rb#1366 + # source://net-imap/lib/net/imap/response_parser.rb#1370 def mailbox_list; end # See Patterns::MBX_LIST_FLAGS # - # source://net-imap/lib/net/imap/response_parser.rb#1942 + # source://net-imap/lib/net/imap/response_parser.rb#1946 def mbx_list_flags; end # n.b. this handles both type and subtype @@ -4776,7 +5337,7 @@ class Net::IMAP::ResponseParser # media-subtype = string # TODO: check types # - # source://net-imap/lib/net/imap/response_parser.rb#1128 + # source://net-imap/lib/net/imap/response_parser.rb#1131 def media_basic; end # n.b. this handles both type and subtype @@ -4799,7 +5360,7 @@ class Net::IMAP::ResponseParser # media-subtype = string # */* --- catchall # - # source://net-imap/lib/net/imap/response_parser.rb#1128 + # source://net-imap/lib/net/imap/response_parser.rb#1131 def media_message; end # n.b. this handles both type and subtype @@ -4822,7 +5383,7 @@ class Net::IMAP::ResponseParser # media-subtype = string # message/rfc822, message/global # - # source://net-imap/lib/net/imap/response_parser.rb#1128 + # source://net-imap/lib/net/imap/response_parser.rb#1131 def media_text; end # n.b. this handles both type and subtype @@ -4844,21 +5405,21 @@ class Net::IMAP::ResponseParser # media-text = DQUOTE "TEXT" DQUOTE SP media-subtype # media-subtype = string # - # source://net-imap/lib/net/imap/response_parser.rb#1128 + # source://net-imap/lib/net/imap/response_parser.rb#1131 def media_type; end - # source://net-imap/lib/net/imap/response_parser.rb#748 + # source://net-imap/lib/net/imap/response_parser.rb#751 def message_data__converted(klass = T.unsafe(nil)); end - # source://net-imap/lib/net/imap/response_parser.rb#832 + # source://net-imap/lib/net/imap/response_parser.rb#835 def message_data__expunge; end # message-data = nz-number SP ("EXPUNGE" / ("FETCH" SP msg-att)) # - # source://net-imap/lib/net/imap/response_parser.rb#825 + # source://net-imap/lib/net/imap/response_parser.rb#828 def message_data__fetch; end - # source://net-imap/lib/net/imap/response_parser.rb#748 + # source://net-imap/lib/net/imap/response_parser.rb#751 def metadata_resp(klass = T.unsafe(nil)); end # RFC3501 & RFC9051: @@ -4909,27 +5470,27 @@ class Net::IMAP::ResponseParser # msg-att-static =/ "BINARY" section-binary ["<" number ">"] SP # (nstring / literal8) # - # source://net-imap/lib/net/imap/response_parser.rb#889 + # source://net-imap/lib/net/imap/response_parser.rb#892 def msg_att(n); end # appends "[section]" and "" to the base label # - # source://net-imap/lib/net/imap/response_parser.rb#926 + # source://net-imap/lib/net/imap/response_parser.rb#929 def msg_att__label; end - # source://net-imap/lib/net/imap/response_parser.rb#748 + # source://net-imap/lib/net/imap/response_parser.rb#751 def myrights_data(klass = T.unsafe(nil)); end # namespace = nil / "(" 1*namespace-descr ")" # - # source://net-imap/lib/net/imap/response_parser.rb#1688 + # source://net-imap/lib/net/imap/response_parser.rb#1692 def namespace; end # namespace-descr = "(" string SP # (DQUOTE QUOTED-CHAR DQUOTE / nil) # [namespace-response-extensions] ")" # - # source://net-imap/lib/net/imap/response_parser.rb#1699 + # source://net-imap/lib/net/imap/response_parser.rb#1703 def namespace_descr; end # namespace-response = "NAMESPACE" SP namespace @@ -4939,23 +5500,23 @@ class Net::IMAP::ResponseParser # ; Namespace(s). # ; The third Namespace is the Shared Namespace(s). # - # source://net-imap/lib/net/imap/response_parser.rb#1676 + # source://net-imap/lib/net/imap/response_parser.rb#1680 def namespace_response; end # namespace-response-extensions = *namespace-response-extension # namespace-response-extension = SP string SP # "(" string *(SP string) ")" # - # source://net-imap/lib/net/imap/response_parser.rb#1711 + # source://net-imap/lib/net/imap/response_parser.rb#1715 def namespace_response_extensions; end - # source://net-imap/lib/net/imap/response_parser.rb#551 + # source://net-imap/lib/net/imap/response_parser.rb#554 def ndatetime; end - # source://net-imap/lib/net/imap/response_parser.rb#2031 + # source://net-imap/lib/net/imap/response_parser.rb#2035 def next_token; end - # source://net-imap/lib/net/imap/response_parser.rb#2013 + # source://net-imap/lib/net/imap/response_parser.rb#2017 def nil_atom; end # env-from = "(" 1*address ")" / nil @@ -4965,21 +5526,21 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap/lib/net/imap/response_parser.rb#983 + # source://net-imap/lib/net/imap/response_parser.rb#986 def nlist__address; end - # source://net-imap/lib/net/imap/response_parser.rb#1991 + # source://net-imap/lib/net/imap/response_parser.rb#1995 def nparens__objectid; end - # source://net-imap/lib/net/imap/response_parser.rb#551 + # source://net-imap/lib/net/imap/response_parser.rb#554 def nquoted; end # nstring = string / nil # - # source://net-imap/lib/net/imap/response_parser.rb#543 + # source://net-imap/lib/net/imap/response_parser.rb#546 def nstring; end - # source://net-imap/lib/net/imap/response_parser.rb#547 + # source://net-imap/lib/net/imap/response_parser.rb#550 def nstring8; end # TODO: handle atom, astring_chars, and tag entirely inside the lexer @@ -4988,36 +5549,36 @@ class Net::IMAP::ResponseParser # ; characters in object identifiers are case # ; significant # - # source://net-imap/lib/net/imap/response_parser.rb#487 + # source://net-imap/lib/net/imap/response_parser.rb#490 def objectid; end - # source://net-imap/lib/net/imap/response_parser.rb#1982 + # source://net-imap/lib/net/imap/response_parser.rb#1986 def parens__modseq; end - # source://net-imap/lib/net/imap/response_parser.rb#1990 + # source://net-imap/lib/net/imap/response_parser.rb#1994 def parens__objectid; end # This allows illegal "]" in flag names (Gmail), # or "\*" in a FLAGS response (greenmail). # - # source://net-imap/lib/net/imap/response_parser.rb#1935 + # source://net-imap/lib/net/imap/response_parser.rb#1939 def quirky__flag_list(name); end - # source://net-imap/lib/net/imap/response_parser.rb#1374 + # source://net-imap/lib/net/imap/response_parser.rb#1378 def quota_response; end - # source://net-imap/lib/net/imap/response_parser.rb#1407 + # source://net-imap/lib/net/imap/response_parser.rb#1411 def quotaroot_response; end # reads all the way up until CRLF # - # source://net-imap/lib/net/imap/response_parser.rb#761 + # source://net-imap/lib/net/imap/response_parser.rb#764 def remaining_unparsed; end # As a workaround for buggy servers, allow a trailing SP: # *(SP capability) [SP] # - # source://net-imap/lib/net/imap/response_parser.rb#1628 + # source://net-imap/lib/net/imap/response_parser.rb#1632 def resp_code__capability; end # already matched: "APPENDUID" @@ -5032,14 +5593,14 @@ class Net::IMAP::ResponseParser # n.b, uniqueid ⊂ uid-set. To avoid inconsistent return types, we always # match uid_set even if that returns a single-member array. # - # source://net-imap/lib/net/imap/response_parser.rb#1863 + # source://net-imap/lib/net/imap/response_parser.rb#1867 def resp_code_apnd__data; end # already matched: "COPYUID" # # resp-code-copy = "COPYUID" SP nz-number SP uid-set SP uid-set # - # source://net-imap/lib/net/imap/response_parser.rb#1872 + # source://net-imap/lib/net/imap/response_parser.rb#1876 def resp_code_copy__data; end # resp-cond-auth = ("OK" / "PREAUTH") SP resp-text @@ -5049,14 +5610,14 @@ class Net::IMAP::ResponseParser # # resp-cond-auth = ("OK" / "PREAUTH") [SP resp-text] # - # source://net-imap/lib/net/imap/response_parser.rb#806 + # source://net-imap/lib/net/imap/response_parser.rb#809 def resp_cond_auth; end # expects "OK" or "PREAUTH" and raises InvalidResponseError on failure # # @raise [InvalidResponseError] # - # source://net-imap/lib/net/imap/response_parser.rb#527 + # source://net-imap/lib/net/imap/response_parser.rb#530 def resp_cond_auth__name; end # resp-cond-bye = "BYE" SP resp-text @@ -5066,7 +5627,7 @@ class Net::IMAP::ResponseParser # # resp-cond-bye = "BYE" [SP resp-text] # - # source://net-imap/lib/net/imap/response_parser.rb#818 + # source://net-imap/lib/net/imap/response_parser.rb#821 def resp_cond_bye; end # RFC3501 & RFC9051: @@ -5077,17 +5638,17 @@ class Net::IMAP::ResponseParser # # resp-cond-state = ("OK" / "NO" / "BAD") [SP resp-text] # - # source://net-imap/lib/net/imap/response_parser.rb#792 + # source://net-imap/lib/net/imap/response_parser.rb#795 def resp_cond_state; end # expects "OK" or "NO" or "BAD" and raises InvalidResponseError on failure # # @raise [InvalidResponseError] # - # source://net-imap/lib/net/imap/response_parser.rb#535 + # source://net-imap/lib/net/imap/response_parser.rb#538 def resp_cond_state__name; end - # source://net-imap/lib/net/imap/response_parser.rb#796 + # source://net-imap/lib/net/imap/response_parser.rb#799 def resp_cond_state__untagged; end # RFC3501: @@ -5098,7 +5659,7 @@ class Net::IMAP::ResponseParser # We leniently re-interpret this as # resp-text = ["[" resp-text-code "]" [SP [text]] / [text] # - # source://net-imap/lib/net/imap/response_parser.rb#1747 + # source://net-imap/lib/net/imap/response_parser.rb#1751 def resp_text; end # RFC3501 (See https://www.rfc-editor.org/errata/rfc3501): @@ -5157,12 +5718,12 @@ class Net::IMAP::ResponseParser # RFC8474: OBJECTID # resp-text-code =/ "MAILBOXID" SP "(" objectid ")" # - # source://net-imap/lib/net/imap/response_parser.rb#1811 + # source://net-imap/lib/net/imap/response_parser.rb#1815 def resp_text_code; end # Returns atom.upcase # - # source://net-imap/lib/net/imap/response_parser.rb#495 + # source://net-imap/lib/net/imap/response_parser.rb#498 def resp_text_code__name; end # [RFC3501 & RFC9051:] @@ -5175,7 +5736,7 @@ class Net::IMAP::ResponseParser # # n.b: our "response-tagged" definition parses "greeting" too. # - # source://net-imap/lib/net/imap/response_parser.rb#654 + # source://net-imap/lib/net/imap/response_parser.rb#657 def response; end # [RFC3501:] @@ -5205,35 +5766,35 @@ class Net::IMAP::ResponseParser # # TODO: remove resp-cond-auth and handle greeting separately # - # source://net-imap/lib/net/imap/response_parser.rb#706 + # source://net-imap/lib/net/imap/response_parser.rb#709 def response_data; end - # source://net-imap/lib/net/imap/response_parser.rb#766 + # source://net-imap/lib/net/imap/response_parser.rb#769 def response_data__ignored; end - # source://net-imap/lib/net/imap/response_parser.rb#766 + # source://net-imap/lib/net/imap/response_parser.rb#769 def response_data__noop; end - # source://net-imap/lib/net/imap/response_parser.rb#832 + # source://net-imap/lib/net/imap/response_parser.rb#835 def response_data__simple_numeric; end - # source://net-imap/lib/net/imap/response_parser.rb#748 + # source://net-imap/lib/net/imap/response_parser.rb#751 def response_data__unhandled(klass = T.unsafe(nil)); end # RFC3501 & RFC9051: # response-tagged = tag SP resp-cond-state CRLF # - # source://net-imap/lib/net/imap/response_parser.rb#781 + # source://net-imap/lib/net/imap/response_parser.rb#784 def response_tagged; end # section = "[" [section-spec] "]" # - # source://net-imap/lib/net/imap/response_parser.rb#1265 + # source://net-imap/lib/net/imap/response_parser.rb#1268 def section; end # section-binary = "[" [section-part] "]" # - # source://net-imap/lib/net/imap/response_parser.rb#1272 + # source://net-imap/lib/net/imap/response_parser.rb#1275 def section_binary; end # TODO: handle atom, astring_chars, and tag entirely inside the lexer @@ -5241,7 +5802,7 @@ class Net::IMAP::ResponseParser # ; body part reference. # ; Allows for accessing nested body parts. # - # source://net-imap/lib/net/imap/response_parser.rb#487 + # source://net-imap/lib/net/imap/response_parser.rb#490 def section_part; end # section-spec = section-msgtext / (section-part ["." section-text]) @@ -5260,7 +5821,7 @@ class Net::IMAP::ResponseParser # n.b: we could "cheat" here and just grab all text inside the brackets, # but literals would need special treatment. # - # source://net-imap/lib/net/imap/response_parser.rb#1293 + # source://net-imap/lib/net/imap/response_parser.rb#1296 def section_spec; end # sequence-set = (seq-number / seq-range) ["," sequence-set] @@ -5271,7 +5832,7 @@ class Net::IMAP::ResponseParser # # *note*: doesn't match seq-last-command # - # source://net-imap/lib/net/imap/response_parser.rb#468 + # source://net-imap/lib/net/imap/response_parser.rb#471 def sequence_set; end # RFC3501: @@ -5289,7 +5850,7 @@ class Net::IMAP::ResponseParser # mailbox-data = obsolete-search-response / ... # obsolete-search-response = "SEARCH" *(SP nz-number) # - # source://net-imap/lib/net/imap/response_parser.rb#1465 + # source://net-imap/lib/net/imap/response_parser.rb#1469 def sort_data; end # RFC3501 @@ -5297,7 +5858,7 @@ class Net::IMAP::ResponseParser # RFC4466, RFC9051, and RFC3501 Errata # status-att-list = status-att-val *(SP status-att-val) # - # source://net-imap/lib/net/imap/response_parser.rb#1542 + # source://net-imap/lib/net/imap/response_parser.rb#1546 def status_att_list; end # RFC3501 Errata: @@ -5340,10 +5901,10 @@ class Net::IMAP::ResponseParser # status-att-val =/ "MAILBOXID" SP "(" objectid ")" # ; follows tagged-ext production from [RFC4466] # - # source://net-imap/lib/net/imap/response_parser.rb#1587 + # source://net-imap/lib/net/imap/response_parser.rb#1591 def status_att_val; end - # source://net-imap/lib/net/imap/response_parser.rb#489 + # source://net-imap/lib/net/imap/response_parser.rb#492 def tag; end # tagged-ext-comp = astring / @@ -5358,7 +5919,7 @@ class Net::IMAP::ResponseParser # ; A URL should be represented as # ; a "quoted" string. # - # source://net-imap/lib/net/imap/response_parser.rb#571 + # source://net-imap/lib/net/imap/response_parser.rb#574 def tagged_ext_comp; end # tagged-ext-simple is a subset of atom @@ -5366,13 +5927,13 @@ class Net::IMAP::ResponseParser # # tagged-ext-simple = sequence-set / number / number64 # - # source://net-imap/lib/net/imap/response_parser.rb#588 + # source://net-imap/lib/net/imap/response_parser.rb#591 def tagged_ext_simple; end # tagged-ext-val = tagged-ext-simple / # "(" [tagged-ext-comp] ")" # - # source://net-imap/lib/net/imap/response_parser.rb#594 + # source://net-imap/lib/net/imap/response_parser.rb#597 def tagged_ext_val; end # TEXT-CHAR = @@ -5383,43 +5944,43 @@ class Net::IMAP::ResponseParser # ; Non-ASCII text can only be returned # ; after ENABLE IMAP4rev2 command # - # source://net-imap/lib/net/imap/response_parser.rb#1731 + # source://net-imap/lib/net/imap/response_parser.rb#1735 def text; end # an "accept" versiun of #text # # @return [Boolean] # - # source://net-imap/lib/net/imap/response_parser.rb#1736 + # source://net-imap/lib/net/imap/response_parser.rb#1740 def text?; end # 1* # - # source://net-imap/lib/net/imap/response_parser.rb#1842 + # source://net-imap/lib/net/imap/response_parser.rb#1846 def text_chars_except_rbra; end # RFC5256: THREAD # thread-data = "THREAD" [SP 1*thread-list] # - # source://net-imap/lib/net/imap/response_parser.rb#1481 + # source://net-imap/lib/net/imap/response_parser.rb#1485 def thread_data; end # RFC5256: THREAD # thread-list = "(" (thread-members / thread-nested) ")" # - # source://net-imap/lib/net/imap/response_parser.rb#1495 + # source://net-imap/lib/net/imap/response_parser.rb#1499 def thread_list; end # RFC5256: THREAD # thread-members = nz-number *(SP nz-number) [SP thread-nested] # - # source://net-imap/lib/net/imap/response_parser.rb#1508 + # source://net-imap/lib/net/imap/response_parser.rb#1512 def thread_members; end # RFC5256: THREAD # thread-nested = 2*thread-list # - # source://net-imap/lib/net/imap/response_parser.rb#1524 + # source://net-imap/lib/net/imap/response_parser.rb#1528 def thread_nested; end # RFC-4315 (UIDPLUS) or RFC9051 (IMAP4rev2): @@ -5431,30 +5992,30 @@ class Net::IMAP::ResponseParser # uniqueid = nz-number # ; Strictly ascending # - # source://net-imap/lib/net/imap/response_parser.rb#2001 + # source://net-imap/lib/net/imap/response_parser.rb#2005 def uid_set; end - # source://net-imap/lib/net/imap/response_parser.rb#748 + # source://net-imap/lib/net/imap/response_parser.rb#751 def uidfetch_resp(klass = T.unsafe(nil)); end # See https://developers.google.com/gmail/imap/imap-extensions # - # source://net-imap/lib/net/imap/response_parser.rb#1949 + # source://net-imap/lib/net/imap/response_parser.rb#1953 def x_gm_label; end # See https://developers.google.com/gmail/imap/imap-extensions # - # source://net-imap/lib/net/imap/response_parser.rb#1952 + # source://net-imap/lib/net/imap/response_parser.rb#1956 def x_gm_labels; end end # ASTRING-CHAR = ATOM-CHAR / resp-specials # resp-specials = "]" # -# source://net-imap/lib/net/imap/response_parser.rb#479 +# source://net-imap/lib/net/imap/response_parser.rb#482 Net::IMAP::ResponseParser::ASTRING_CHARS_TOKENS = T.let(T.unsafe(nil), Array) -# source://net-imap/lib/net/imap/response_parser.rb#481 +# source://net-imap/lib/net/imap/response_parser.rb#484 Net::IMAP::ResponseParser::ASTRING_TOKENS = T.let(T.unsafe(nil), Array) # basic utility methods for parsing. @@ -5477,7 +6038,7 @@ module Net::IMAP::ResponseParser::ParserUtils def accept_re(re); end # To be used conditionally: - # assert_no_lookahead if Net::IMAP.debug + # assert_no_lookahead if config.debug? # # source://net-imap/lib/net/imap/response_parser/parser_utils.rb#158 def assert_no_lookahead; end @@ -5545,44 +6106,44 @@ Net::IMAP::ResponseParser::ParserUtils::Generator::LOOKAHEAD = T.let(T.unsafe(ni # source://net-imap/lib/net/imap/response_parser/parser_utils.rb#14 Net::IMAP::ResponseParser::ParserUtils::Generator::SHIFT_TOKEN = T.let(T.unsafe(nil), String) -# source://net-imap/lib/net/imap/response_parser.rb#77 +# source://net-imap/lib/net/imap/response_parser.rb#80 module Net::IMAP::ResponseParser::Patterns include ::Net::IMAP::ResponseParser::Patterns::RFC5234 include ::Net::IMAP::ResponseParser::Patterns::RFC3629 private - # source://net-imap/lib/net/imap/response_parser.rb#352 + # source://net-imap/lib/net/imap/response_parser.rb#355 def unescape_quoted(quoted); end - # source://net-imap/lib/net/imap/response_parser.rb#346 + # source://net-imap/lib/net/imap/response_parser.rb#349 def unescape_quoted!(quoted); end class << self - # source://net-imap/lib/net/imap/response_parser.rb#352 + # source://net-imap/lib/net/imap/response_parser.rb#355 def unescape_quoted(quoted); end - # source://net-imap/lib/net/imap/response_parser.rb#346 + # source://net-imap/lib/net/imap/response_parser.rb#349 def unescape_quoted!(quoted); end end end -# source://net-imap/lib/net/imap/response_parser.rb#174 +# source://net-imap/lib/net/imap/response_parser.rb#177 Net::IMAP::ResponseParser::Patterns::ASTRING_CHAR = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#178 +# source://net-imap/lib/net/imap/response_parser.rb#181 Net::IMAP::ResponseParser::Patterns::ASTRING_CHARS = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#172 +# source://net-imap/lib/net/imap/response_parser.rb#175 Net::IMAP::ResponseParser::Patterns::ASTRING_SPECIALS = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#177 +# source://net-imap/lib/net/imap/response_parser.rb#180 Net::IMAP::ResponseParser::Patterns::ATOM = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#179 +# source://net-imap/lib/net/imap/response_parser.rb#182 Net::IMAP::ResponseParser::Patterns::ATOMISH = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#175 +# source://net-imap/lib/net/imap/response_parser.rb#178 Net::IMAP::ResponseParser::Patterns::ATOM_CHAR = T.let(T.unsafe(nil), Regexp) # atomish = 1* @@ -5596,24 +6157,24 @@ Net::IMAP::ResponseParser::Patterns::ATOM_CHAR = T.let(T.unsafe(nil), Regexp) # ASTRING-CHAR = ATOM-CHAR / resp-specials # tag = 1* # -# source://net-imap/lib/net/imap/response_parser.rb#171 +# source://net-imap/lib/net/imap/response_parser.rb#174 Net::IMAP::ResponseParser::Patterns::ATOM_SPECIALS = T.let(T.unsafe(nil), Regexp) # CHAR8 = %x01-ff # ; any OCTET except NUL, %x00 # -# source://net-imap/lib/net/imap/response_parser.rb#151 +# source://net-imap/lib/net/imap/response_parser.rb#154 Net::IMAP::ResponseParser::Patterns::CHAR8 = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#187 +# source://net-imap/lib/net/imap/response_parser.rb#190 Net::IMAP::ResponseParser::Patterns::CODE_TEXT = T.let(T.unsafe(nil), Regexp) # resp-text-code = ... / atom [SP 1*] # -# source://net-imap/lib/net/imap/response_parser.rb#186 +# source://net-imap/lib/net/imap/response_parser.rb#189 Net::IMAP::ResponseParser::Patterns::CODE_TEXT_CHAR = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#79 +# source://net-imap/lib/net/imap/response_parser.rb#82 module Net::IMAP::ResponseParser::Patterns::CharClassSubtraction; end # flag = "\Answered" / "\Flagged" / "\Deleted" / @@ -5645,13 +6206,13 @@ module Net::IMAP::ResponseParser::Patterns::CharClassSubtraction; end # ; attributes for the CHILDREN return option, at most # ; one possible per LIST response # -# source://net-imap/lib/net/imap/response_parser.rb#217 +# source://net-imap/lib/net/imap/response_parser.rb#220 Net::IMAP::ResponseParser::Patterns::FLAG = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#218 +# source://net-imap/lib/net/imap/response_parser.rb#221 Net::IMAP::ResponseParser::Patterns::FLAG_EXTENSION = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#219 +# source://net-imap/lib/net/imap/response_parser.rb#222 Net::IMAP::ResponseParser::Patterns::FLAG_KEYWORD = T.let(T.unsafe(nil), Regexp) # flag-list = "(" [flag *(SP flag)] ")" @@ -5662,18 +6223,18 @@ Net::IMAP::ResponseParser::Patterns::FLAG_KEYWORD = T.let(T.unsafe(nil), Regexp) # mbx-list-oflag *(SP mbx-list-oflag) # (Not checking for max one mbx-list-sflag in the parser.) # -# source://net-imap/lib/net/imap/response_parser.rb#230 +# source://net-imap/lib/net/imap/response_parser.rb#233 Net::IMAP::ResponseParser::Patterns::FLAG_LIST = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#220 +# source://net-imap/lib/net/imap/response_parser.rb#223 Net::IMAP::ResponseParser::Patterns::FLAG_PERM = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#231 +# source://net-imap/lib/net/imap/response_parser.rb#234 Net::IMAP::ResponseParser::Patterns::FLAG_PERM_LIST = T.let(T.unsafe(nil), Regexp) # list-wildcards = "%" / "*" # -# source://net-imap/lib/net/imap/response_parser.rb#154 +# source://net-imap/lib/net/imap/response_parser.rb#157 Net::IMAP::ResponseParser::Patterns::LIST_WILDCARDS = T.let(T.unsafe(nil), Regexp) # RFC3501: @@ -5688,7 +6249,7 @@ Net::IMAP::ResponseParser::Patterns::LIST_WILDCARDS = T.let(T.unsafe(nil), Regex # ; Non-synchronizing literals are not allowed when # ; sent from server to the client. # -# source://net-imap/lib/net/imap/response_parser.rb#332 +# source://net-imap/lib/net/imap/response_parser.rb#335 Net::IMAP::ResponseParser::Patterns::LITERAL = T.let(T.unsafe(nil), Regexp) # RFC3516 (BINARY): @@ -5700,37 +6261,37 @@ Net::IMAP::ResponseParser::Patterns::LITERAL = T.let(T.unsafe(nil), Regexp) # ; represents the number of OCTETs # ; in the response string. # -# source://net-imap/lib/net/imap/response_parser.rb#342 +# source://net-imap/lib/net/imap/response_parser.rb#345 Net::IMAP::ResponseParser::Patterns::LITERAL8 = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#221 +# source://net-imap/lib/net/imap/response_parser.rb#224 Net::IMAP::ResponseParser::Patterns::MBX_FLAG = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#232 +# source://net-imap/lib/net/imap/response_parser.rb#235 Net::IMAP::ResponseParser::Patterns::MBX_LIST_FLAGS = T.let(T.unsafe(nil), Regexp) # nz-number = digit-nz *DIGIT # ; Non-zero unsigned 32-bit integer # ; (0 < n < 4,294,967,296) # -# source://net-imap/lib/net/imap/response_parser.rb#274 +# source://net-imap/lib/net/imap/response_parser.rb#277 Net::IMAP::ResponseParser::Patterns::NZ_NUMBER = T.let(T.unsafe(nil), Regexp) # Gmail allows SP and "]" in flags....... # -# source://net-imap/lib/net/imap/response_parser.rb#235 +# source://net-imap/lib/net/imap/response_parser.rb#238 Net::IMAP::ResponseParser::Patterns::QUIRKY_FLAG = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#236 +# source://net-imap/lib/net/imap/response_parser.rb#239 Net::IMAP::ResponseParser::Patterns::QUIRKY_FLAGS_LIST = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#247 +# source://net-imap/lib/net/imap/response_parser.rb#250 Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_esc = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#248 +# source://net-imap/lib/net/imap/response_parser.rb#251 Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_rev1 = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#249 +# source://net-imap/lib/net/imap/response_parser.rb#252 Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_rev2 = T.let(T.unsafe(nil), Regexp) # RFC3501: @@ -5742,23 +6303,23 @@ Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_rev2 = T.let(T.unsafe(nil), Reg # RFC3501 & RFC9051: # quoted = DQUOTE *QUOTED-CHAR DQUOTE # -# source://net-imap/lib/net/imap/response_parser.rb#246 +# source://net-imap/lib/net/imap/response_parser.rb#249 Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_safe = T.let(T.unsafe(nil), Regexp) # quoted-specials = DQUOTE / "\" # -# source://net-imap/lib/net/imap/response_parser.rb#156 +# source://net-imap/lib/net/imap/response_parser.rb#159 Net::IMAP::ResponseParser::Patterns::QUOTED_SPECIALS = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#251 +# source://net-imap/lib/net/imap/response_parser.rb#254 Net::IMAP::ResponseParser::Patterns::QUOTED_rev1 = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#252 +# source://net-imap/lib/net/imap/response_parser.rb#255 Net::IMAP::ResponseParser::Patterns::QUOTED_rev2 = T.let(T.unsafe(nil), Regexp) # resp-specials = "]" # -# source://net-imap/lib/net/imap/response_parser.rb#158 +# source://net-imap/lib/net/imap/response_parser.rb#161 Net::IMAP::ResponseParser::Patterns::RESP_SPECIALS = T.let(T.unsafe(nil), Regexp) # UTF-8, a transformation format of ISO 10646 @@ -5780,30 +6341,30 @@ Net::IMAP::ResponseParser::Patterns::RESP_SPECIALS = T.let(T.unsafe(nil), Regexp # believe it is hard to support this case correctly." # See https://bugs.ruby-lang.org/issues/19104 # -# source://net-imap/lib/net/imap/response_parser.rb#131 +# source://net-imap/lib/net/imap/response_parser.rb#134 module Net::IMAP::ResponseParser::Patterns::RFC3629; end # aka ASCII 7bit # -# source://net-imap/lib/net/imap/response_parser.rb#132 +# source://net-imap/lib/net/imap/response_parser.rb#135 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_1 = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#134 +# source://net-imap/lib/net/imap/response_parser.rb#137 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_2 = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#135 +# source://net-imap/lib/net/imap/response_parser.rb#138 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_3 = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#139 +# source://net-imap/lib/net/imap/response_parser.rb#142 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_4 = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#142 +# source://net-imap/lib/net/imap/response_parser.rb#145 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_CHAR = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#143 +# source://net-imap/lib/net/imap/response_parser.rb#146 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_OCTETS = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#133 +# source://net-imap/lib/net/imap/response_parser.rb#136 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_TAIL = T.let(T.unsafe(nil), Regexp) # From RFC5234, "Augmented BNF for Syntax Specifications: ABNF" @@ -5822,39 +6383,39 @@ Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_TAIL = T.let(T.unsafe(nil), R # OCTET = %x00-FF # SP = %x20 # -# source://net-imap/lib/net/imap/response_parser.rb#101 +# source://net-imap/lib/net/imap/response_parser.rb#104 module Net::IMAP::ResponseParser::Patterns::RFC5234; end -# source://net-imap/lib/net/imap/response_parser.rb#102 +# source://net-imap/lib/net/imap/response_parser.rb#105 Net::IMAP::ResponseParser::Patterns::RFC5234::ALPHA = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#103 +# source://net-imap/lib/net/imap/response_parser.rb#106 Net::IMAP::ResponseParser::Patterns::RFC5234::CHAR = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#104 +# source://net-imap/lib/net/imap/response_parser.rb#107 Net::IMAP::ResponseParser::Patterns::RFC5234::CRLF = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#105 +# source://net-imap/lib/net/imap/response_parser.rb#108 Net::IMAP::ResponseParser::Patterns::RFC5234::CTL = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#106 +# source://net-imap/lib/net/imap/response_parser.rb#109 Net::IMAP::ResponseParser::Patterns::RFC5234::DIGIT = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#107 +# source://net-imap/lib/net/imap/response_parser.rb#110 Net::IMAP::ResponseParser::Patterns::RFC5234::DQUOTE = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#108 +# source://net-imap/lib/net/imap/response_parser.rb#111 Net::IMAP::ResponseParser::Patterns::RFC5234::HEXDIG = T.let(T.unsafe(nil), Regexp) # not using /./m for embedding purposes # -# source://net-imap/lib/net/imap/response_parser.rb#109 +# source://net-imap/lib/net/imap/response_parser.rb#112 Net::IMAP::ResponseParser::Patterns::RFC5234::OCTET = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#110 +# source://net-imap/lib/net/imap/response_parser.rb#113 Net::IMAP::ResponseParser::Patterns::RFC5234::SP = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#318 +# source://net-imap/lib/net/imap/response_parser.rb#321 Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET = T.let(T.unsafe(nil), Regexp) # sequence-set = (seq-number / seq-range) ["," sequence-set] @@ -5870,10 +6431,10 @@ Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET = T.let(T.unsafe(nil), Regexp) # ; be reordered and overlap coalesced to be # ; 4,5,6,7,8,9,10. # -# source://net-imap/lib/net/imap/response_parser.rb#317 +# source://net-imap/lib/net/imap/response_parser.rb#320 Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET_ITEM = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#319 +# source://net-imap/lib/net/imap/response_parser.rb#322 Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET_STR = T.let(T.unsafe(nil), Regexp) # seq-number = nz-number / "*" @@ -5893,7 +6454,7 @@ Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET_STR = T.let(T.unsafe(nil), Reg # ; messages in the selected mailbox. This # ; includes "*" if the selected mailbox is empty. # -# source://net-imap/lib/net/imap/response_parser.rb#292 +# source://net-imap/lib/net/imap/response_parser.rb#295 Net::IMAP::ResponseParser::Patterns::SEQ_NUMBER = T.let(T.unsafe(nil), Regexp) # seq-range = seq-number ":" seq-number @@ -5906,31 +6467,31 @@ Net::IMAP::ResponseParser::Patterns::SEQ_NUMBER = T.let(T.unsafe(nil), Regexp) # ; the mailbox, even if that value is less than # ; 3291. # -# source://net-imap/lib/net/imap/response_parser.rb#303 +# source://net-imap/lib/net/imap/response_parser.rb#306 Net::IMAP::ResponseParser::Patterns::SEQ_RANGE = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#180 +# source://net-imap/lib/net/imap/response_parser.rb#183 Net::IMAP::ResponseParser::Patterns::TAG = T.let(T.unsafe(nil), Regexp) # tagged-ext-label = tagged-label-fchar *tagged-label-char # ; Is a valid RFC 3501 "atom". # -# source://net-imap/lib/net/imap/response_parser.rb#269 +# source://net-imap/lib/net/imap/response_parser.rb#272 Net::IMAP::ResponseParser::Patterns::TAGGED_EXT_LABEL = T.let(T.unsafe(nil), Regexp) # tagged-label-char = tagged-label-fchar / DIGIT / ":" # -# source://net-imap/lib/net/imap/response_parser.rb#266 +# source://net-imap/lib/net/imap/response_parser.rb#269 Net::IMAP::ResponseParser::Patterns::TAGGED_LABEL_CHAR = T.let(T.unsafe(nil), Regexp) # tagged-label-fchar = ALPHA / "-" / "_" / "." # -# source://net-imap/lib/net/imap/response_parser.rb#264 +# source://net-imap/lib/net/imap/response_parser.rb#267 Net::IMAP::ResponseParser::Patterns::TAGGED_LABEL_FCHAR = T.let(T.unsafe(nil), Regexp) # TEXT-CHAR = # -# source://net-imap/lib/net/imap/response_parser.rb#183 +# source://net-imap/lib/net/imap/response_parser.rb#186 Net::IMAP::ResponseParser::Patterns::TEXT_CHAR = T.let(T.unsafe(nil), Regexp) # RFC3501: @@ -5940,64 +6501,64 @@ Net::IMAP::ResponseParser::Patterns::TEXT_CHAR = T.let(T.unsafe(nil), Regexp) # ; Non-ASCII text can only be returned # ; after ENABLE IMAP4rev2 command # -# source://net-imap/lib/net/imap/response_parser.rb#260 +# source://net-imap/lib/net/imap/response_parser.rb#263 Net::IMAP::ResponseParser::Patterns::TEXT_rev1 = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#261 +# source://net-imap/lib/net/imap/response_parser.rb#264 Net::IMAP::ResponseParser::Patterns::TEXT_rev2 = T.let(T.unsafe(nil), Regexp) -# source://net-imap/lib/net/imap/response_parser.rb#678 +# source://net-imap/lib/net/imap/response_parser.rb#681 Net::IMAP::ResponseParser::RE_RESPONSE_TYPE = T.let(T.unsafe(nil), Regexp) # end of response string # -# source://net-imap/lib/net/imap/response_parser.rb#62 +# source://net-imap/lib/net/imap/response_parser.rb#65 module Net::IMAP::ResponseParser::ResponseConditions; end -# source://net-imap/lib/net/imap/response_parser.rb#71 +# source://net-imap/lib/net/imap/response_parser.rb#74 Net::IMAP::ResponseParser::ResponseConditions::AUTH_CONDS = T.let(T.unsafe(nil), Array) -# source://net-imap/lib/net/imap/response_parser.rb#65 +# source://net-imap/lib/net/imap/response_parser.rb#68 Net::IMAP::ResponseParser::ResponseConditions::BAD = T.let(T.unsafe(nil), String) -# source://net-imap/lib/net/imap/response_parser.rb#66 +# source://net-imap/lib/net/imap/response_parser.rb#69 Net::IMAP::ResponseParser::ResponseConditions::BYE = T.let(T.unsafe(nil), String) -# source://net-imap/lib/net/imap/response_parser.rb#72 +# source://net-imap/lib/net/imap/response_parser.rb#75 Net::IMAP::ResponseParser::ResponseConditions::GREETING_CONDS = T.let(T.unsafe(nil), Array) -# source://net-imap/lib/net/imap/response_parser.rb#64 +# source://net-imap/lib/net/imap/response_parser.rb#67 Net::IMAP::ResponseParser::ResponseConditions::NO = T.let(T.unsafe(nil), String) -# source://net-imap/lib/net/imap/response_parser.rb#63 +# source://net-imap/lib/net/imap/response_parser.rb#66 Net::IMAP::ResponseParser::ResponseConditions::OK = T.let(T.unsafe(nil), String) -# source://net-imap/lib/net/imap/response_parser.rb#67 +# source://net-imap/lib/net/imap/response_parser.rb#70 Net::IMAP::ResponseParser::ResponseConditions::PREAUTH = T.let(T.unsafe(nil), String) -# source://net-imap/lib/net/imap/response_parser.rb#73 +# source://net-imap/lib/net/imap/response_parser.rb#76 Net::IMAP::ResponseParser::ResponseConditions::RESP_CONDS = T.let(T.unsafe(nil), Array) -# source://net-imap/lib/net/imap/response_parser.rb#69 +# source://net-imap/lib/net/imap/response_parser.rb#72 Net::IMAP::ResponseParser::ResponseConditions::RESP_COND_STATES = T.let(T.unsafe(nil), Array) -# source://net-imap/lib/net/imap/response_parser.rb#70 +# source://net-imap/lib/net/imap/response_parser.rb#73 Net::IMAP::ResponseParser::ResponseConditions::RESP_DATA_CONDS = T.let(T.unsafe(nil), Array) -# source://net-imap/lib/net/imap/response_parser.rb#459 +# source://net-imap/lib/net/imap/response_parser.rb#462 Net::IMAP::ResponseParser::SEQUENCE_SET_TOKENS = T.let(T.unsafe(nil), Array) -# source://net-imap/lib/net/imap/response_parser.rb#2018 +# source://net-imap/lib/net/imap/response_parser.rb#2022 Net::IMAP::ResponseParser::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) # tag = 1* # -# source://net-imap/lib/net/imap/response_parser.rb#484 +# source://net-imap/lib/net/imap/response_parser.rb#487 Net::IMAP::ResponseParser::TAG_TOKENS = T.let(T.unsafe(nil), Array) # starts with atom special # -# source://net-imap/lib/net/imap/response_parser.rb#57 +# source://net-imap/lib/net/imap/response_parser.rb#60 Net::IMAP::ResponseParser::T_LITERAL8 = T.let(T.unsafe(nil), Symbol) # Used to avoid an allocation when ResponseText is empty @@ -6039,7 +6600,7 @@ Net::IMAP::ResponseText::EMPTY = T.let(T.unsafe(nil), Net::IMAP::ResponseText) # See ExternalAuthenticator. # # Authenticates using already established credentials, such as a TLS -# certificate or IPsec. +# certificate or IPSec. # # +OAUTHBEARER+:: # See OAuthBearerAuthenticator. @@ -6698,7 +7259,7 @@ class Net::IMAP::SASL::Error < ::StandardError; end # Net::IMAP#authenticate. # # The EXTERNAL mechanism requests that the server use client credentials -# established external to SASL, for example by TLS certificate or IPsec. +# established external to SASL, for example by TLS certificate or IPSec. # # source://net-imap/lib/net/imap/sasl/external_authenticator.rb#13 class Net::IMAP::SASL::ExternalAuthenticator @@ -8629,8 +9190,8 @@ class Net::IMAP::SequenceSet # Yields each number or range in #string to the block and returns +self+. # Returns an enumerator when called without a block. # - # The entries are yielded in the same order they appear in #tring, with no - # sorting, deduplication, or coalescing. When #string is in its + # The entries are yielded in the same order they appear in #string, with + # no sorting, deduplication, or coalescing. When #string is in its # normalized form, this will yield the same values as #each_element. # # Related: #entries, #each_element diff --git a/sorbet/rbi/gems/nokogiri@1.16.5.rbi b/sorbet/rbi/gems/nokogiri@1.16.7.rbi similarity index 100% rename from sorbet/rbi/gems/nokogiri@1.16.5.rbi rename to sorbet/rbi/gems/nokogiri@1.16.7.rbi diff --git a/sorbet/rbi/gems/racc@1.7.3.rbi b/sorbet/rbi/gems/racc@1.8.1.rbi similarity index 67% rename from sorbet/rbi/gems/racc@1.7.3.rbi rename to sorbet/rbi/gems/racc@1.8.1.rbi index 6c05413c..bbe3a83c 100644 --- a/sorbet/rbi/gems/racc@1.7.3.rbi +++ b/sorbet/rbi/gems/racc@1.8.1.rbi @@ -5,35 +5,35 @@ # Please instead update this file by running `bin/tapioca gem racc`. -# source://racc/lib/racc/parser.rb#23 +# source://racc/lib/racc/parser.rb#19 ParseError = Racc::ParseError # source://racc/lib/racc/info.rb#17 Racc::Copyright = T.let(T.unsafe(nil), String) -# source://racc/lib/racc/parser.rb#188 +# source://racc/lib/racc/parser.rb#184 class Racc::Parser - # source://racc/lib/racc/parser.rb#283 + # source://racc/lib/racc/parser.rb#279 def _racc_do_parse_rb(arg, in_debug); end - # source://racc/lib/racc/parser.rb#483 + # source://racc/lib/racc/parser.rb#479 def _racc_do_reduce(arg, act); end # common # - # source://racc/lib/racc/parser.rb#386 + # source://racc/lib/racc/parser.rb#382 def _racc_evalact(act, arg); end - # source://racc/lib/racc/parser.rb#236 + # source://racc/lib/racc/parser.rb#232 def _racc_init_sysvars; end - # source://racc/lib/racc/parser.rb#224 + # source://racc/lib/racc/parser.rb#220 def _racc_setup; end - # source://racc/lib/racc/parser.rb#333 + # source://racc/lib/racc/parser.rb#329 def _racc_yyparse_rb(recv, mid, arg, c_debug); end - # source://racc/lib/racc/parser.rb#266 + # source://racc/lib/racc/parser.rb#262 def do_parse; end # The method to fetch next token. @@ -47,7 +47,7 @@ class Racc::Parser # # @raise [NotImplementedError] # - # source://racc/lib/racc/parser.rb#279 + # source://racc/lib/racc/parser.rb#275 def next_token; end # This method is called when a parse error is found. @@ -67,88 +67,92 @@ class Racc::Parser # # @raise [ParseError] # - # source://racc/lib/racc/parser.rb#539 + # source://racc/lib/racc/parser.rb#535 def on_error(t, val, vstack); end - # source://racc/lib/racc/parser.rb#588 + # source://racc/lib/racc/parser.rb#584 def racc_accept; end - # source://racc/lib/racc/parser.rb#593 + # source://racc/lib/racc/parser.rb#589 def racc_e_pop(state, tstack, vstack); end - # source://racc/lib/racc/parser.rb#600 + # source://racc/lib/racc/parser.rb#596 def racc_next_state(curstate, state); end - # source://racc/lib/racc/parser.rb#606 + # source://racc/lib/racc/parser.rb#602 def racc_print_stacks(t, v); end - # source://racc/lib/racc/parser.rb#615 + # source://racc/lib/racc/parser.rb#611 def racc_print_states(s); end # For debugging output # - # source://racc/lib/racc/parser.rb#562 + # source://racc/lib/racc/parser.rb#558 def racc_read_token(t, tok, val); end - # source://racc/lib/racc/parser.rb#575 + # source://racc/lib/racc/parser.rb#571 def racc_reduce(toks, sim, tstack, vstack); end - # source://racc/lib/racc/parser.rb#569 + # source://racc/lib/racc/parser.rb#565 def racc_shift(tok, tstack, vstack); end - # source://racc/lib/racc/parser.rb#622 + # source://racc/lib/racc/parser.rb#618 def racc_token2str(tok); end # Convert internal ID of token symbol to the string. # - # source://racc/lib/racc/parser.rb#628 + # source://racc/lib/racc/parser.rb#624 def token_to_str(t); end # Exit parser. # Return value is +Symbol_Value_Stack[0]+. # - # source://racc/lib/racc/parser.rb#552 + # source://racc/lib/racc/parser.rb#548 def yyaccept; end # Leave error recovering mode. # - # source://racc/lib/racc/parser.rb#557 + # source://racc/lib/racc/parser.rb#553 def yyerrok; end # Enter error recovering mode. # This method does not call #on_error. # - # source://racc/lib/racc/parser.rb#546 + # source://racc/lib/racc/parser.rb#542 def yyerror; end - # source://racc/lib/racc/parser.rb#328 + # source://racc/lib/racc/parser.rb#324 def yyparse(recv, mid); end class << self - # source://racc/lib/racc/parser.rb#220 + # source://racc/lib/racc/parser.rb#216 def racc_runtime_type; end end end -# source://racc/lib/racc/parser.rb#209 +# source://racc/lib/racc/parser.rb#205 Racc::Parser::Racc_Main_Parsing_Routine = T.let(T.unsafe(nil), Symbol) -# source://racc/lib/racc/parser.rb#211 +Racc::Parser::Racc_Runtime_Core_Id_C = T.let(T.unsafe(nil), String) + +# source://racc/lib/racc/parser.rb#207 Racc::Parser::Racc_Runtime_Core_Version = T.let(T.unsafe(nil), String) -# source://racc/lib/racc/parser.rb#191 +Racc::Parser::Racc_Runtime_Core_Version_C = T.let(T.unsafe(nil), String) + +# source://racc/lib/racc/parser.rb#187 Racc::Parser::Racc_Runtime_Core_Version_R = T.let(T.unsafe(nil), String) -# source://racc/lib/racc/parser.rb#212 +# source://racc/lib/racc/parser.rb#208 Racc::Parser::Racc_Runtime_Type = T.let(T.unsafe(nil), String) -# source://racc/lib/racc/parser.rb#190 +# source://racc/lib/racc/parser.rb#186 Racc::Parser::Racc_Runtime_Version = T.let(T.unsafe(nil), String) -# source://racc/lib/racc/parser.rb#210 +# source://racc/lib/racc/parser.rb#206 Racc::Parser::Racc_YY_Parse_Method = T.let(T.unsafe(nil), Symbol) -# source://racc/lib/racc/parser.rb#185 +# source://racc/lib/racc/parser.rb#181 Racc::Racc_No_Extensions = T.let(T.unsafe(nil), FalseClass) # source://racc/lib/racc/info.rb#15 diff --git a/sorbet/rbi/gems/rack-session@2.0.0.rbi b/sorbet/rbi/gems/rack-session@2.0.0.rbi index 5223ebf6..b5d1b0ff 100644 --- a/sorbet/rbi/gems/rack-session@2.0.0.rbi +++ b/sorbet/rbi/gems/rack-session@2.0.0.rbi @@ -8,11 +8,8 @@ # source://rack-session/lib/rack/session/constants.rb#7 module Rack class << self - # source://rack/3.0.11lib/rack/version.rb#31 + # source://rack/3.1.7lib/rack/version.rb#18 def release; end - - # source://rack/3.0.11lib/rack/version.rb#23 - def version; end end end diff --git a/sorbet/rbi/gems/rack-test@2.1.0.rbi b/sorbet/rbi/gems/rack-test@2.1.0.rbi index 70739912..d21e1028 100644 --- a/sorbet/rbi/gems/rack-test@2.1.0.rbi +++ b/sorbet/rbi/gems/rack-test@2.1.0.rbi @@ -8,11 +8,8 @@ # source://rack-test/lib/rack/test/cookie_jar.rb#6 module Rack class << self - # source://rack/3.0.11lib/rack/version.rb#31 + # source://rack/3.1.7lib/rack/version.rb#18 def release; end - - # source://rack/3.0.11lib/rack/version.rb#23 - def version; end end end diff --git a/sorbet/rbi/gems/rack@3.0.11.rbi b/sorbet/rbi/gems/rack@3.1.7.rbi similarity index 80% rename from sorbet/rbi/gems/rack@3.0.11.rbi rename to sorbet/rbi/gems/rack@3.1.7.rbi index 2d8bfa28..291783de 100644 --- a/sorbet/rbi/gems/rack@3.0.11.rbi +++ b/sorbet/rbi/gems/rack@3.1.7.rbi @@ -16,17 +16,12 @@ module Rack class << self # Return the Rack release as a dotted string. # - # source://rack/lib/rack/version.rb#31 + # source://rack/lib/rack/version.rb#18 def release; end - - # The Rack protocol version number implemented. - # - # source://rack/lib/rack/version.rb#23 - def version; end end end -# source://rack/lib/rack.rb#65 +# source://rack/lib/rack.rb#60 module Rack::Auth; end # Rack::Auth::AbstractHandler implements common authentication functionality. @@ -104,273 +99,44 @@ Rack::Auth::AbstractRequest::AUTHORIZATION_KEYS = T.let(T.unsafe(nil), Array) # Initialize with the Rack application that you want protecting, # and a block that checks if a username and password pair are valid. # -# source://rack/lib/rack/auth/basic.rb#14 +# source://rack/lib/rack/auth/basic.rb#13 class Rack::Auth::Basic < ::Rack::Auth::AbstractHandler - # source://rack/lib/rack/auth/basic.rb#16 + # source://rack/lib/rack/auth/basic.rb#15 def call(env); end private - # source://rack/lib/rack/auth/basic.rb#35 + # source://rack/lib/rack/auth/basic.rb#34 def challenge; end # @return [Boolean] # - # source://rack/lib/rack/auth/basic.rb#39 + # source://rack/lib/rack/auth/basic.rb#38 def valid?(auth); end end -# source://rack/lib/rack/auth/basic.rb#43 +# source://rack/lib/rack/auth/basic.rb#42 class Rack::Auth::Basic::Request < ::Rack::Auth::AbstractRequest # @return [Boolean] # - # source://rack/lib/rack/auth/basic.rb#44 + # source://rack/lib/rack/auth/basic.rb#43 def basic?; end - # source://rack/lib/rack/auth/basic.rb#48 + # source://rack/lib/rack/auth/basic.rb#47 def credentials; end - # source://rack/lib/rack/auth/basic.rb#52 + # source://rack/lib/rack/auth/basic.rb#51 def username; end end -# source://rack/lib/rack/auth/digest.rb#12 -module Rack::Auth::Digest; end +# source://rack/lib/rack/builder.rb#6 +Rack::BUILDER_TOPLEVEL_BINDING = T.let(T.unsafe(nil), Proc) -# Rack::Auth::Digest::MD5 implements the MD5 algorithm version of -# HTTP Digest Authentication, as per RFC 2617. -# -# Initialize with the [Rack] application that you want protecting, -# and a block that looks up a plaintext password for a given username. +# Represents a 400 Bad Request error when input data fails to meet the +# requirements. # -# +opaque+ needs to be set to a constant base64/hexadecimal string. -# -# source://rack/lib/rack/auth/digest.rb#144 -class Rack::Auth::Digest::MD5 < ::Rack::Auth::AbstractHandler - # @return [MD5] a new instance of MD5 - # - # source://rack/lib/rack/auth/digest.rb#150 - def initialize(app, realm = T.unsafe(nil), opaque = T.unsafe(nil), &authenticator); end - - # source://rack/lib/rack/auth/digest.rb#163 - def call(env); end - - # Returns the value of attribute opaque. - # - # source://rack/lib/rack/auth/digest.rb#146 - def opaque; end - - # Sets the attribute opaque - # - # @param value the value to set the attribute opaque to. - # - # source://rack/lib/rack/auth/digest.rb#146 - def opaque=(_arg0); end - - # Sets the attribute passwords_hashed - # - # @param value the value to set the attribute passwords_hashed to. - # - # source://rack/lib/rack/auth/digest.rb#148 - def passwords_hashed=(_arg0); end - - # @return [Boolean] - # - # source://rack/lib/rack/auth/digest.rb#159 - def passwords_hashed?; end - - private - - # source://rack/lib/rack/auth/digest.rb#238 - def A1(auth, password); end - - # source://rack/lib/rack/auth/digest.rb#242 - def A2(auth); end - - # source://rack/lib/rack/auth/digest.rb#228 - def H(data); end - - # source://rack/lib/rack/auth/digest.rb#234 - def KD(secret, data); end - - # source://rack/lib/rack/auth/digest.rb#203 - def challenge(hash = T.unsafe(nil)); end - - # source://rack/lib/rack/auth/digest.rb#246 - def digest(auth, password); end - - # source://rack/lib/rack/auth/digest.rb#228 - def md5(data); end - - # source://rack/lib/rack/auth/digest.rb#192 - def params(hash = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rack/lib/rack/auth/digest.rb#207 - def valid?(auth); end - - # @return [Boolean] - # - # source://rack/lib/rack/auth/digest.rb#223 - def valid_digest?(auth); end - - # @return [Boolean] - # - # source://rack/lib/rack/auth/digest.rb#219 - def valid_nonce?(auth); end - - # @return [Boolean] - # - # source://rack/lib/rack/auth/digest.rb#215 - def valid_opaque?(auth); end - - # @return [Boolean] - # - # source://rack/lib/rack/auth/digest.rb#211 - def valid_qop?(auth); end -end - -# source://rack/lib/rack/auth/digest.rb#190 -Rack::Auth::Digest::MD5::QOP = T.let(T.unsafe(nil), String) - -# Rack::Auth::Digest::Nonce is the default nonce generator for the -# Rack::Auth::Digest::MD5 authentication handler. -# -# +private_key+ needs to set to a constant string. -# -# +time_limit+ can be optionally set to an integer (number of seconds), -# to limit the validity of the generated nonces. -# -# source://rack/lib/rack/auth/digest.rb#21 -class Rack::Auth::Digest::Nonce - # @return [Nonce] a new instance of Nonce - # - # source://rack/lib/rack/auth/digest.rb#31 - def initialize(timestamp = T.unsafe(nil), given_digest = T.unsafe(nil)); end - - # source://rack/lib/rack/auth/digest.rb#39 - def digest; end - - # @return [Boolean] - # - # source://rack/lib/rack/auth/digest.rb#51 - def fresh?; end - - # @return [Boolean] - # - # source://rack/lib/rack/auth/digest.rb#47 - def stale?; end - - # source://rack/lib/rack/auth/digest.rb#35 - def to_s; end - - # @return [Boolean] - # - # source://rack/lib/rack/auth/digest.rb#43 - def valid?; end - - class << self - # source://rack/lib/rack/auth/digest.rb#27 - def parse(string); end - - # Returns the value of attribute private_key. - # - # source://rack/lib/rack/auth/digest.rb#24 - def private_key; end - - # Sets the attribute private_key - # - # @param value the value to set the attribute private_key to. - # - # source://rack/lib/rack/auth/digest.rb#24 - def private_key=(_arg0); end - - # Returns the value of attribute time_limit. - # - # source://rack/lib/rack/auth/digest.rb#24 - def time_limit; end - - # Sets the attribute time_limit - # - # @param value the value to set the attribute time_limit to. - # - # source://rack/lib/rack/auth/digest.rb#24 - def time_limit=(_arg0); end - end -end - -# source://rack/lib/rack/auth/digest.rb#57 -class Rack::Auth::Digest::Params < ::Hash - # @return [Params] a new instance of Params - # @yield [_self] - # @yieldparam _self [Rack::Auth::Digest::Params] the object that the method was called on - # - # source://rack/lib/rack/auth/digest.rb#76 - def initialize; end - - # source://rack/lib/rack/auth/digest.rb#82 - def [](k); end - - # source://rack/lib/rack/auth/digest.rb#86 - def []=(k, v); end - - # From WEBrick::HTTPUtils - # - # source://rack/lib/rack/auth/digest.rb#98 - def quote(str); end - - # source://rack/lib/rack/auth/digest.rb#92 - def to_s; end - - class << self - # From WEBrick::HTTPUtils - # - # source://rack/lib/rack/auth/digest.rb#66 - def dequote(str); end - - # source://rack/lib/rack/auth/digest.rb#59 - def parse(str); end - - # source://rack/lib/rack/auth/digest.rb#72 - def split_header_value(str); end - end -end - -# source://rack/lib/rack/auth/digest.rb#90 -Rack::Auth::Digest::Params::UNQUOTED = T.let(T.unsafe(nil), Array) - -# source://rack/lib/rack/auth/digest.rb#104 -class Rack::Auth::Digest::Request < ::Rack::Auth::AbstractRequest - # @return [Boolean] - # - # source://rack/lib/rack/auth/digest.rb#113 - def correct_uri?; end - - # @return [Boolean] - # - # source://rack/lib/rack/auth/digest.rb#109 - def digest?; end - - # source://rack/lib/rack/auth/digest.rb#105 - def method; end - - # @raise [ArgumentError] - # - # source://rack/lib/rack/auth/digest.rb#129 - def method_missing(sym, *args); end - - # source://rack/lib/rack/auth/digest.rb#117 - def nonce; end - - # source://rack/lib/rack/auth/digest.rb#121 - def params; end - - # @return [Boolean] - # - # source://rack/lib/rack/auth/digest.rb#125 - def respond_to?(sym, *_arg1); end -end +# source://rack/lib/rack/bad_request.rb#6 +module Rack::BadRequest; end # Proxy for response bodies allowing calling a block when # the response body is closed (after the response has been fully @@ -443,7 +209,7 @@ end # +use+ adds middleware to the stack, +run+ dispatches to an application. # You can use +map+ to construct a Rack::URLMap in a convenient way. # -# source://rack/lib/rack/builder.rb#33 +# source://rack/lib/rack/builder.rb#36 class Rack::Builder # Initialize a new Rack::Builder instance. +default_app+ specifies the # default application if +run+ is not called later. If a block @@ -451,20 +217,20 @@ class Rack::Builder # # @return [Builder] a new instance of Builder # - # source://rack/lib/rack/builder.rb#111 - def initialize(default_app = T.unsafe(nil), &block); end + # source://rack/lib/rack/builder.rb#116 + def initialize(default_app = T.unsafe(nil), **options, &block); end # Call the Rack application generated by this builder instance. Note that # this rebuilds the Rack application and runs the warmup code (if any) # every time it is called, so it should not be used if performance is important. # - # source://rack/lib/rack/builder.rb#263 + # source://rack/lib/rack/builder.rb#276 def call(env); end # Freeze the app (set using run) and all middleware instances when building the application # in to_app. # - # source://rack/lib/rack/builder.rb#246 + # source://rack/lib/rack/builder.rb#259 def freeze_app; end # Creates a route within the application. Routes under the mapped path will be sent to @@ -507,9 +273,18 @@ class Rack::Builder # Note that providing a +path+ of +/+ will ignore any default application given in a +run+ statement # outside the block. # - # source://rack/lib/rack/builder.rb#239 + # source://rack/lib/rack/builder.rb#252 def map(path, &block); end + # Any options provided to the Rack::Builder instance at initialization. + # These options can be server-specific. Some general options are: + # + # * +:isolation+: One of +process+, +thread+ or +fiber+. The execution + # isolation model to use. + # + # source://rack/lib/rack/builder.rb#132 + def options; end + # Takes a block or argument that is an object that responds to #call and # returns a Rack response. # @@ -535,12 +310,12 @@ class Rack::Builder # # @raise [ArgumentError] # - # source://rack/lib/rack/builder.rb#180 + # source://rack/lib/rack/builder.rb#193 def run(app = T.unsafe(nil), &block); end # Return the Rack application generated by this instance. # - # source://rack/lib/rack/builder.rb#251 + # source://rack/lib/rack/builder.rb#264 def to_app; end # Specifies middleware to use in a stack. @@ -563,7 +338,7 @@ class Rack::Builder # The +call+ method in this example sets an additional environment key which then can be # referenced in the application if required. # - # source://rack/lib/rack/builder.rb#146 + # source://rack/lib/rack/builder.rb#159 def use(middleware, *args, **_arg2, &block); end # Takes a lambda or block that is used to warm-up the application. This block is called @@ -577,7 +352,7 @@ class Rack::Builder # use SomeMiddleware # run MyApp # - # source://rack/lib/rack/builder.rb#196 + # source://rack/lib/rack/builder.rb#209 def warmup(prc = T.unsafe(nil), &block); end private @@ -585,14 +360,14 @@ class Rack::Builder # Generate a URLMap instance by generating new Rack applications for each # map block in this instance. # - # source://rack/lib/rack/builder.rb#271 + # source://rack/lib/rack/builder.rb#284 def generate_map(default_app, mapping); end class << self # Create a new Rack::Builder instance and return the Rack application # generated from it. # - # source://rack/lib/rack/builder.rb#123 + # source://rack/lib/rack/builder.rb#136 def app(default_app = T.unsafe(nil), &block); end # Load the given file as a rackup file, treating the @@ -609,14 +384,14 @@ class Rack::Builder # require './app.rb' # run App # - # source://rack/lib/rack/builder.rb#84 - def load_file(path); end + # source://rack/lib/rack/builder.rb#87 + def load_file(path, **options); end # Evaluate the given +builder_script+ string in the context of # a Rack::Builder block, returning a Rack application. # - # source://rack/lib/rack/builder.rb#99 - def new_from_string(builder_script, file = T.unsafe(nil)); end + # source://rack/lib/rack/builder.rb#102 + def new_from_string(builder_script, path = T.unsafe(nil), **options); end # Parse the given config file to get a Rack application. # @@ -636,21 +411,21 @@ class Rack::Builder # Rack::Builder.parse_file('app.rb') # # requires app.rb, which can be anywhere in Ruby's # # load path. After requiring, assumes App constant - # # contains Rack application + # # is a Rack application # # Rack::Builder.parse_file('./my_app.rb') # # requires ./my_app.rb, which should be in the # # process's current directory. After requiring, - # # assumes MyApp constant contains Rack application + # # assumes MyApp constant is a Rack application # - # source://rack/lib/rack/builder.rb#62 - def parse_file(path); end + # source://rack/lib/rack/builder.rb#65 + def parse_file(path, **options); end end end # https://stackoverflow.com/questions/2223882/whats-the-difference-between-utf-8-and-utf-8-without-bom # -# source://rack/lib/rack/builder.rb#36 +# source://rack/lib/rack/builder.rb#39 Rack::Builder::UTF_8_BOM = T.let(T.unsafe(nil), String) # Response Header Keys @@ -658,6 +433,9 @@ Rack::Builder::UTF_8_BOM = T.let(T.unsafe(nil), String) # source://rack/lib/rack/constants.rb#19 Rack::CACHE_CONTROL = T.let(T.unsafe(nil), String) +# source://rack/lib/rack/constants.rb#35 +Rack::CONNECT = T.let(T.unsafe(nil), String) + # source://rack/lib/rack/constants.rb#20 Rack::CONTENT_LENGTH = T.let(T.unsafe(nil), String) @@ -680,142 +458,41 @@ class Rack::Cascade # # @return [Cascade] a new instance of Cascade # - # source://rack/lib/rack/cascade.rb#24 + # source://rack/lib/rack/cascade.rb#21 def initialize(apps, cascade_for = T.unsafe(nil)); end # Append an app to the list of apps to cascade. This app will # be tried last. # - # source://rack/lib/rack/cascade.rb#59 + # source://rack/lib/rack/cascade.rb#56 def <<(app); end # Append an app to the list of apps to cascade. This app will # be tried last. # - # source://rack/lib/rack/cascade.rb#59 + # source://rack/lib/rack/cascade.rb#56 def add(app); end # An array of applications to try in order. # - # source://rack/lib/rack/cascade.rb#16 + # source://rack/lib/rack/cascade.rb#13 def apps; end # Call each app in order. If the responses uses a status that requires # cascading, try the next app. If all responses require cascading, # return the response from the last app. # - # source://rack/lib/rack/cascade.rb#35 + # source://rack/lib/rack/cascade.rb#32 def call(env); end # Whether the given app is one of the apps to cascade to. # # @return [Boolean] # - # source://rack/lib/rack/cascade.rb#64 + # source://rack/lib/rack/cascade.rb#61 def include?(app); end end -# deprecated, no longer used -# -# source://rack/lib/rack/cascade.rb#13 -Rack::Cascade::NotFound = T.let(T.unsafe(nil), Array) - -# Middleware that applies chunked transfer encoding to response bodies -# when the response does not include a content-length header. -# -# This supports the trailer response header to allow the use of trailing -# headers in the chunked encoding. However, using this requires you manually -# specify a response body that supports a +trailers+ method. Example: -# -# [200, { 'trailer' => 'expires'}, ["Hello", "World"]] -# # error raised -# -# body = ["Hello", "World"] -# def body.trailers -# { 'expires' => Time.now.to_s } -# end -# [200, { 'trailer' => 'expires'}, body] -# # No exception raised -# -# source://rack/lib/rack/chunked.rb#25 -class Rack::Chunked - include ::Rack::Utils - - # @return [Chunked] a new instance of Chunked - # - # source://rack/lib/rack/chunked.rb#82 - def initialize(app); end - - # If the rack app returns a response that should have a body, - # but does not have content-length or transfer-encoding headers, - # modify the response to use chunked transfer-encoding. - # - # source://rack/lib/rack/chunked.rb#101 - def call(env); end - - # Whether the HTTP version supports chunked encoding (HTTP 1.1 does). - # - # @return [Boolean] - # - # source://rack/lib/rack/chunked.rb#87 - def chunkable_version?(ver); end -end - -# A body wrapper that emits chunked responses. -# -# source://rack/lib/rack/chunked.rb#29 -class Rack::Chunked::Body - # Store the response body to be chunked. - # - # @return [Body] a new instance of Body - # - # source://rack/lib/rack/chunked.rb#34 - def initialize(body); end - - # Close the response body if the response body supports it. - # - # source://rack/lib/rack/chunked.rb#54 - def close; end - - # For each element yielded by the response body, yield - # the element in chunked encoding. - # - # @yield [TAIL] - # - # source://rack/lib/rack/chunked.rb#40 - def each(&block); end - - private - - # Do nothing as this class does not support trailer headers. - # - # source://rack/lib/rack/chunked.rb#61 - def yield_trailers; end -end - -# source://rack/lib/rack/chunked.rb#31 -Rack::Chunked::Body::TAIL = T.let(T.unsafe(nil), String) - -# source://rack/lib/rack/chunked.rb#30 -Rack::Chunked::Body::TERM = T.let(T.unsafe(nil), String) - -# A body wrapper that emits chunked responses and also supports -# sending Trailer headers. Note that the response body provided to -# initialize must have a +trailers+ method that returns a hash -# of trailer headers, and the rack response itself should have a -# Trailer header listing the headers that the +trailers+ method -# will return. -# -# source://rack/lib/rack/chunked.rb#71 -class Rack::Chunked::TrailerBody < ::Rack::Chunked::Body - private - - # Yield strings for each trailer header. - # - # source://rack/lib/rack/chunked.rb#75 - def yield_trailers; end -end - # Rack::CommonLogger forwards every request to the given +app+, and # logs a line in the # {Apache common log format}[http://httpd.apache.org/docs/1.3/logs.html#common] @@ -1362,9 +1039,6 @@ class Rack::Events::EventedBodyProxy < ::Rack::BodyProxy def response; end end -# source://rack/lib/rack/file.rb#8 -Rack::File = Rack::Files - # Rack::Files serves files below the +root+ directory given, according to the # path info of the Rack request. # e.g. when Rack::Files.new("/etc") is used, you can access 'passwd' file @@ -1532,125 +1206,128 @@ end # (by using non-lowercase response header keys), automatically handling # the downcasing of keys. # -# source://rack/lib/rack/headers.rb#6 +# source://rack/lib/rack/headers.rb#8 class Rack::Headers < ::Hash - # source://rack/lib/rack/headers.rb#26 + # source://rack/lib/rack/headers.rb#110 def [](key); end - # source://rack/lib/rack/headers.rb#30 + # source://rack/lib/rack/headers.rb#114 def []=(key, value); end - # source://rack/lib/rack/headers.rb#35 + # source://rack/lib/rack/headers.rb#119 def assoc(key); end # @raise [TypeError] # - # source://rack/lib/rack/headers.rb#39 + # source://rack/lib/rack/headers.rb#123 def compare_by_identity; end - # source://rack/lib/rack/headers.rb#43 + # source://rack/lib/rack/headers.rb#127 def delete(key); end - # source://rack/lib/rack/headers.rb#47 + # source://rack/lib/rack/headers.rb#131 def dig(key, *a); end # :nocov: # - # source://rack/lib/rack/headers.rb#143 + # source://rack/lib/rack/headers.rb#227 def except(*a); end - # source://rack/lib/rack/headers.rb#51 + # source://rack/lib/rack/headers.rb#135 def fetch(key, *default, &block); end - # source://rack/lib/rack/headers.rb#56 + # source://rack/lib/rack/headers.rb#140 def fetch_values(*a); end # @return [Boolean] # - # source://rack/lib/rack/headers.rb#60 + # source://rack/lib/rack/headers.rb#144 def has_key?(key); end # @return [Boolean] # - # source://rack/lib/rack/headers.rb#60 + # source://rack/lib/rack/headers.rb#144 def include?(key); end - # source://rack/lib/rack/headers.rb#67 + # source://rack/lib/rack/headers.rb#151 def invert; end # @return [Boolean] # - # source://rack/lib/rack/headers.rb#60 + # source://rack/lib/rack/headers.rb#144 def key?(key); end # @return [Boolean] # - # source://rack/lib/rack/headers.rb#60 + # source://rack/lib/rack/headers.rb#144 def member?(key); end - # source://rack/lib/rack/headers.rb#73 + # source://rack/lib/rack/headers.rb#157 def merge(hash, &block); end - # source://rack/lib/rack/headers.rb#102 + # source://rack/lib/rack/headers.rb#186 def merge!(hash, &block); end - # source://rack/lib/rack/headers.rb#77 + # source://rack/lib/rack/headers.rb#161 def reject(&block); end - # source://rack/lib/rack/headers.rb#83 + # source://rack/lib/rack/headers.rb#167 def replace(hash); end - # source://rack/lib/rack/headers.rb#88 + # source://rack/lib/rack/headers.rb#172 def select(&block); end # :nocov: # - # source://rack/lib/rack/headers.rb#121 + # source://rack/lib/rack/headers.rb#205 def slice(*a); end - # source://rack/lib/rack/headers.rb#30 + # source://rack/lib/rack/headers.rb#114 def store(key, value); end - # source://rack/lib/rack/headers.rb#94 + # source://rack/lib/rack/headers.rb#178 def to_proc; end - # source://rack/lib/rack/headers.rb#127 + # source://rack/lib/rack/headers.rb#211 def transform_keys(&block); end - # source://rack/lib/rack/headers.rb#131 + # source://rack/lib/rack/headers.rb#215 def transform_keys!; end - # source://rack/lib/rack/headers.rb#98 + # source://rack/lib/rack/headers.rb#182 def transform_values(&block); end - # source://rack/lib/rack/headers.rb#102 + # source://rack/lib/rack/headers.rb#186 def update(hash, &block); end - # source://rack/lib/rack/headers.rb#114 + # source://rack/lib/rack/headers.rb#198 def values_at(*keys); end private - # source://rack/lib/rack/headers.rb#150 + # source://rack/lib/rack/headers.rb#234 def downcase_key(key); end class << self - # source://rack/lib/rack/headers.rb#7 + # source://rack/lib/rack/headers.rb#91 def [](*items); end end end -# source://rack/lib/rack/constants.rb#35 +# source://rack/lib/rack/headers.rb#9 +Rack::Headers::KNOWN_HEADERS = T.let(T.unsafe(nil), Hash) + +# source://rack/lib/rack/constants.rb#36 Rack::LINK = T.let(T.unsafe(nil), String) # Rack::Lint validates your application and the requests and # responses according to the Rack spec. # -# source://rack/lib/rack/lint.rb#12 +# source://rack/lib/rack/lint.rb#13 class Rack::Lint # @return [Lint] a new instance of Lint # - # source://rack/lib/rack/lint.rb#13 + # source://rack/lib/rack/lint.rb#19 def initialize(app); end # AUTHORS: n.b. The trailing whitespace between paragraphs is important and @@ -1668,57 +1345,77 @@ class Rack::Lint # A Rack application is a Ruby object (not a class) that # responds to +call+. # - # source://rack/lib/rack/lint.rb#34 + # source://rack/lib/rack/lint.rb#40 def call(env = T.unsafe(nil)); end end # :stopdoc: # -# source://rack/lib/rack/lint.rb#19 +# source://rack/lib/rack/lint.rb#25 class Rack::Lint::LintError < ::RuntimeError; end -# source://rack/lib/rack/lint.rb#38 +# source://rack/lib/rack/lint.rb#15 +Rack::Lint::REQUEST_PATH_ABSOLUTE_FORM = T.let(T.unsafe(nil), Regexp) + +# source://rack/lib/rack/lint.rb#17 +Rack::Lint::REQUEST_PATH_ASTERISK_FORM = T.let(T.unsafe(nil), String) + +# source://rack/lib/rack/lint.rb#16 +Rack::Lint::REQUEST_PATH_AUTHORITY_FORM = T.let(T.unsafe(nil), Regexp) + +# source://rack/lib/rack/lint.rb#14 +Rack::Lint::REQUEST_PATH_ORIGIN_FORM = T.let(T.unsafe(nil), Regexp) + +# source://rack/lib/rack/lint.rb#44 class Rack::Lint::Wrapper # @return [Wrapper] a new instance of Wrapper # - # source://rack/lib/rack/lint.rb#39 + # source://rack/lib/rack/lint.rb#45 def initialize(app, env); end # ==== Streaming Body # # @raise [LintError] # - # source://rack/lib/rack/lint.rb#855 + # source://rack/lib/rack/lint.rb#939 def call(stream); end - # === The content-length + # ==== The +content-length+ Header # - # source://rack/lib/rack/lint.rb#693 - def check_content_length(status, headers); end + # source://rack/lib/rack/lint.rb#757 + def check_content_length_header(status, headers); end - # === The content-type + # ==== The +content-type+ Header # - # source://rack/lib/rack/lint.rb#677 - def check_content_type(status, headers); end + # source://rack/lib/rack/lint.rb#741 + def check_content_type_header(status, headers); end + + # === Early Hints + # + # The application or any middleware may call the rack.early_hints + # with an object which would be valid as the headers of a Rack response. + # + # source://rack/lib/rack/lint.rb#657 + def check_early_hints(env); end # == The Environment # # @raise [LintError] # - # source://rack/lib/rack/lint.rb#97 + # source://rack/lib/rack/lint.rb#101 def check_environment(env); end # === The Error Stream # - # source://rack/lib/rack/lint.rb#491 - def check_error(error); end + # source://rack/lib/rack/lint.rb#531 + def check_error_stream(error); end - # source://rack/lib/rack/lint.rb#667 + # source://rack/lib/rack/lint.rb#731 def check_header_value(key, value); end # === The Headers # - # source://rack/lib/rack/lint.rb#627 + # source://rack/lib/rack/lint.rb#691 def check_headers(headers); end # === Hijacking @@ -1743,7 +1440,7 @@ class Rack::Lint::Wrapper # It is intended to be used when applications need access to raw HTTP/1 # connection. # - # source://rack/lib/rack/lint.rb#551 + # source://rack/lib/rack/lint.rb#591 def check_hijack(env); end # ==== Partial Hijack @@ -1755,7 +1452,7 @@ class Rack::Lint::Wrapper # It is intended to be used when applications need bi-directional # streaming. # - # source://rack/lib/rack/lint.rb#579 + # source://rack/lib/rack/lint.rb#619 def check_hijack_response(headers, env); end # === The Input Stream @@ -1763,16 +1460,25 @@ class Rack::Lint::Wrapper # The input stream is an IO-like object which contains the raw HTTP # POST data. # - # source://rack/lib/rack/lint.rb#387 - def check_input(input); end + # source://rack/lib/rack/lint.rb#427 + def check_input_stream(input); end + + # ==== The +rack.protocol+ Header + # + # source://rack/lib/rack/lint.rb#785 + def check_rack_protocol_header(status, headers); end # == The Response # # === The Status # - # source://rack/lib/rack/lint.rb#616 + # source://rack/lib/rack/lint.rb#680 def check_status(status); end + # Setting this value informs the server that it should perform a + # connection upgrade. In HTTP/1, this is done using the +upgrade+ + # header. In HTTP/2, this is done by accepting the request. + # # === The Body # # The Body is typically an +Array+ of +String+ instances, an enumerable @@ -1798,24 +1504,24 @@ class Rack::Lint::Wrapper # cases where the Rack application makes internal/virtual requests and # discards the response. # - # source://rack/lib/rack/lint.rb#744 + # source://rack/lib/rack/lint.rb#831 def close; end # ==== Enumerable Body # # @raise [LintError] # - # source://rack/lib/rack/lint.rb#778 + # source://rack/lib/rack/lint.rb#865 def each; end # @return [Boolean] # - # source://rack/lib/rack/lint.rb#826 + # source://rack/lib/rack/lint.rb#910 def respond_to?(name, *_arg1); end # @raise [LintError] # - # source://rack/lib/rack/lint.rb#54 + # source://rack/lib/rack/lint.rb#60 def response; end # If the Body responds to +to_ary+, it must return an +Array+ whose @@ -1826,73 +1532,73 @@ class Rack::Lint::Wrapper # +to_ary+ and +close+, its implementation of +to_ary+ must call # +close+. # - # source://rack/lib/rack/lint.rb#842 + # source://rack/lib/rack/lint.rb#926 def to_ary; end - # source://rack/lib/rack/lint.rb#822 + # source://rack/lib/rack/lint.rb#906 def to_path; end - # source://rack/lib/rack/lint.rb#706 + # source://rack/lib/rack/lint.rb#770 def verify_content_length(size); end - # source://rack/lib/rack/lint.rb#760 + # source://rack/lib/rack/lint.rb#847 def verify_to_path; end end -# source://rack/lib/rack/lint.rb#820 +# source://rack/lib/rack/lint.rb#904 Rack::Lint::Wrapper::BODY_METHODS = T.let(T.unsafe(nil), Hash) -# source://rack/lib/rack/lint.rb#500 +# source://rack/lib/rack/lint.rb#540 class Rack::Lint::Wrapper::ErrorWrapper # @return [ErrorWrapper] a new instance of ErrorWrapper # - # source://rack/lib/rack/lint.rb#501 + # source://rack/lib/rack/lint.rb#541 def initialize(error); end # * +close+ must never be called on the error stream. # # @raise [LintError] # - # source://rack/lib/rack/lint.rb#523 + # source://rack/lib/rack/lint.rb#563 def close(*args); end # * +flush+ must be called without arguments and must be called # in order to make the error appear for sure. # - # source://rack/lib/rack/lint.rb#518 + # source://rack/lib/rack/lint.rb#558 def flush; end # * +puts+ must be called with a single argument that responds to +to_s+. # - # source://rack/lib/rack/lint.rb#506 + # source://rack/lib/rack/lint.rb#546 def puts(str); end # * +write+ must be called with a single argument that is a String. # # @raise [LintError] # - # source://rack/lib/rack/lint.rb#511 + # source://rack/lib/rack/lint.rb#551 def write(str); end end -# source://rack/lib/rack/lint.rb#405 +# source://rack/lib/rack/lint.rb#445 class Rack::Lint::Wrapper::InputWrapper # @return [InputWrapper] a new instance of InputWrapper # - # source://rack/lib/rack/lint.rb#406 + # source://rack/lib/rack/lint.rb#446 def initialize(input); end - # * +close+ can be called on the input stream to indicate that the - # any remaining input is not needed. + # * +close+ can be called on the input stream to indicate that + # any remaining input is not needed. # - # source://rack/lib/rack/lint.rb#483 + # source://rack/lib/rack/lint.rb#523 def close(*args); end # * +each+ must be called without arguments and only yield Strings. # # @raise [LintError] # - # source://rack/lib/rack/lint.rb#471 + # source://rack/lib/rack/lint.rb#511 def each(*args); end # * +gets+ must be called without arguments and return a string, @@ -1900,10 +1606,10 @@ class Rack::Lint::Wrapper::InputWrapper # # @raise [LintError] # - # source://rack/lib/rack/lint.rb#412 + # source://rack/lib/rack/lint.rb#452 def gets(*args); end - # * +read+ behaves like IO#read. + # * +read+ behaves like IO#read. # Its signature is read([length, [buffer]]). # # If given, +length+ must be a non-negative Integer (>= 0) or +nil+, @@ -1921,17 +1627,17 @@ class Rack::Lint::Wrapper::InputWrapper # If +buffer+ is given, then the read data will be placed # into +buffer+ instead of a newly created String object. # - # source://rack/lib/rack/lint.rb#438 + # source://rack/lib/rack/lint.rb#478 def read(*args); end end -# source://rack/lib/rack/lint.rb#875 +# source://rack/lib/rack/lint.rb#959 class Rack::Lint::Wrapper::StreamWrapper extend ::Forwardable # @return [StreamWrapper] a new instance of StreamWrapper # - # source://rack/lib/rack/lint.rb#890 + # source://rack/lib/rack/lint.rb#974 def initialize(stream); end # source://forwardable/1.3.3forwardable.rb#231 @@ -1965,7 +1671,7 @@ end # pass on real IO objects, although it is recognized that this approach # is not directly compatible with HTTP/2. # -# source://rack/lib/rack/lint.rb#883 +# source://rack/lib/rack/lint.rb#967 Rack::Lint::Wrapper::StreamWrapper::REQUIRED_METHODS = T.let(T.unsafe(nil), Array) # Rack::Lock locks every request inside a mutex, so that every request @@ -1989,14 +1695,14 @@ end # Sets up rack.logger to write to rack.errors stream # -# source://rack/lib/rack/logger.rb#9 +# source://rack/lib/rack/logger.rb#10 class Rack::Logger # @return [Logger] a new instance of Logger # - # source://rack/lib/rack/logger.rb#10 + # source://rack/lib/rack/logger.rb#11 def initialize(app, level = T.unsafe(nil)); end - # source://rack/lib/rack/logger.rb#14 + # source://rack/lib/rack/logger.rb#15 def call(env); end end @@ -2164,49 +1870,49 @@ Rack::Mime::MIME_TYPES = T.let(T.unsafe(nil), Hash) class Rack::MockRequest # @return [MockRequest] a new instance of MockRequest # - # source://rack/lib/rack/mock_request.rb#49 + # source://rack/lib/rack/mock_request.rb#44 def initialize(app); end # Make a DELETE request and return a MockResponse. See #request. # - # source://rack/lib/rack/mock_request.rb#62 + # source://rack/lib/rack/mock_request.rb#57 def delete(uri, opts = T.unsafe(nil)); end # Make a GET request and return a MockResponse. See #request. # - # source://rack/lib/rack/mock_request.rb#54 + # source://rack/lib/rack/mock_request.rb#49 def get(uri, opts = T.unsafe(nil)); end # Make a HEAD request and return a MockResponse. See #request. # - # source://rack/lib/rack/mock_request.rb#64 + # source://rack/lib/rack/mock_request.rb#59 def head(uri, opts = T.unsafe(nil)); end # Make an OPTIONS request and return a MockResponse. See #request. # - # source://rack/lib/rack/mock_request.rb#66 + # source://rack/lib/rack/mock_request.rb#61 def options(uri, opts = T.unsafe(nil)); end # Make a PATCH request and return a MockResponse. See #request. # - # source://rack/lib/rack/mock_request.rb#60 + # source://rack/lib/rack/mock_request.rb#55 def patch(uri, opts = T.unsafe(nil)); end # Make a POST request and return a MockResponse. See #request. # - # source://rack/lib/rack/mock_request.rb#56 + # source://rack/lib/rack/mock_request.rb#51 def post(uri, opts = T.unsafe(nil)); end # Make a PUT request and return a MockResponse. See #request. # - # source://rack/lib/rack/mock_request.rb#58 + # source://rack/lib/rack/mock_request.rb#53 def put(uri, opts = T.unsafe(nil)); end # Make a request using the given request method for the given # uri to the rack application and return a MockResponse. # Options given are passed to MockRequest.env_for. # - # source://rack/lib/rack/mock_request.rb#71 + # source://rack/lib/rack/mock_request.rb#66 def request(method = T.unsafe(nil), uri = T.unsafe(nil), opts = T.unsafe(nil)); end class << self @@ -2220,20 +1926,17 @@ class Rack::MockRequest # :params :: The params to use # :script_name :: The SCRIPT_NAME to set # - # source://rack/lib/rack/mock_request.rb#103 + # source://rack/lib/rack/mock_request.rb#98 def env_for(uri = T.unsafe(nil), opts = T.unsafe(nil)); end # For historical reasons, we're pinning to RFC 2396. # URI::Parser = URI::RFC2396_Parser # - # source://rack/lib/rack/mock_request.rb#89 + # source://rack/lib/rack/mock_request.rb#84 def parse_uri_rfc2396(uri); end end end -# source://rack/lib/rack/mock_request.rb#44 -Rack::MockRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) - # source://rack/lib/rack/mock_request.rb#27 class Rack::MockRequest::FatalWarner # source://rack/lib/rack/mock_request.rb#36 @@ -2306,7 +2009,7 @@ class Rack::MockResponse < ::Rack::Response private - # source://rack/lib/rack/mock_response.rb#102 + # source://rack/lib/rack/mock_response.rb#100 def identify_cookie_attributes(cookie_filling); end # source://rack/lib/rack/mock_response.rb#79 @@ -2321,72 +2024,43 @@ end # # Usually, Rack::Request#POST takes care of calling this. # -# source://rack/lib/rack/multipart/parser.rb#8 +# source://rack/lib/rack/multipart/parser.rb#9 module Rack::Multipart class << self - # source://rack/lib/rack/multipart.rb#39 + # source://rack/lib/rack/multipart.rb#72 def build_multipart(params, first = T.unsafe(nil)); end - # source://rack/lib/rack/multipart.rb#35 + # source://rack/lib/rack/multipart.rb#68 def extract_multipart(request, params = T.unsafe(nil)); end - # source://rack/lib/rack/multipart.rb#17 + # source://rack/lib/rack/multipart.rb#48 def parse_multipart(env, params = T.unsafe(nil)); end end end -# source://rack/lib/rack/multipart/parser.rb#32 -Rack::Multipart::ATTRIBUTE = T.let(T.unsafe(nil), Regexp) - -# Updated definitions from RFC 2231 +# Base class for multipart exceptions that do not subclass from +# other exception classes for backwards compatibility. # -# source://rack/lib/rack/multipart/parser.rb#31 -Rack::Multipart::ATTRIBUTE_CHAR = T.let(T.unsafe(nil), Regexp) - # source://rack/lib/rack/multipart/parser.rb#26 -Rack::Multipart::BROKEN = T.let(T.unsafe(nil), Regexp) - -# source://rack/lib/rack/multipart/parser.rb#24 -Rack::Multipart::CONDISP = T.let(T.unsafe(nil), Regexp) - -# source://rack/lib/rack/multipart/parser.rb#43 -Rack::Multipart::DISPPARM = T.let(T.unsafe(nil), Regexp) +class Rack::Multipart::BoundaryTooLongError < ::StandardError + include ::Rack::BadRequest +end -# source://rack/lib/rack/multipart/parser.rb#21 +# source://rack/lib/rack/multipart/parser.rb#33 Rack::Multipart::EOL = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/multipart/parser.rb#39 -Rack::Multipart::EXTENDED_INITIAL_NAME = T.let(T.unsafe(nil), Regexp) - -# source://rack/lib/rack/multipart/parser.rb#41 -Rack::Multipart::EXTENDED_INITIAL_PARAMETER = T.let(T.unsafe(nil), Regexp) - -# source://rack/lib/rack/multipart/parser.rb#40 -Rack::Multipart::EXTENDED_INITIAL_VALUE = T.let(T.unsafe(nil), Regexp) - -# source://rack/lib/rack/multipart/parser.rb#36 -Rack::Multipart::EXTENDED_OTHER_NAME = T.let(T.unsafe(nil), Regexp) - -# source://rack/lib/rack/multipart/parser.rb#38 -Rack::Multipart::EXTENDED_OTHER_PARAMETER = T.let(T.unsafe(nil), Regexp) - -# source://rack/lib/rack/multipart/parser.rb#37 -Rack::Multipart::EXTENDED_OTHER_VALUE = T.let(T.unsafe(nil), Regexp) - -# source://rack/lib/rack/multipart/parser.rb#42 -Rack::Multipart::EXTENDED_PARAMETER = T.let(T.unsafe(nil), Regexp) - # Use specific error class when parsing multipart request # that ends early. # -# source://rack/lib/rack/multipart/parser.rb#15 -class Rack::Multipart::EmptyContentError < ::EOFError; end +# source://rack/lib/rack/multipart/parser.rb#20 +class Rack::Multipart::EmptyContentError < ::EOFError + include ::Rack::BadRequest +end -# Base class for multipart exceptions that do not subclass from -# other exception classes for backwards compatibility. +# Prefer to use the BoundaryTooLongError class or Rack::BadRequest. # -# source://rack/lib/rack/multipart/parser.rb#19 -class Rack::Multipart::Error < ::StandardError; end +# source://rack/lib/rack/multipart/parser.rb#31 +Rack::Multipart::Error = Rack::Multipart::BoundaryTooLongError # source://rack/lib/rack/multipart/generator.rb#7 class Rack::Multipart::Generator @@ -2415,43 +2089,78 @@ class Rack::Multipart::Generator def multipart?; end end -# source://rack/lib/rack/multipart/parser.rb#22 +# source://rack/lib/rack/multipart/parser.rb#34 Rack::Multipart::MULTIPART = T.let(T.unsafe(nil), Regexp) -# source://rack/lib/rack/multipart.rb#14 +# source://rack/lib/rack/multipart.rb#16 Rack::Multipart::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/multipart/parser.rb#28 +# source://rack/lib/rack/multipart/parser.rb#36 Rack::Multipart::MULTIPART_CONTENT_DISPOSITION = T.let(T.unsafe(nil), Regexp) -# source://rack/lib/rack/multipart/parser.rb#29 +# source://rack/lib/rack/multipart/parser.rb#37 Rack::Multipart::MULTIPART_CONTENT_ID = T.let(T.unsafe(nil), Regexp) -# source://rack/lib/rack/multipart/parser.rb#27 +# source://rack/lib/rack/multipart/parser.rb#35 Rack::Multipart::MULTIPART_CONTENT_TYPE = T.let(T.unsafe(nil), Regexp) -# source://rack/lib/rack/multipart/parser.rb#9 -class Rack::Multipart::MultipartPartLimitError < ::Errno::EMFILE; end +# source://rack/lib/rack/multipart.rb#18 +class Rack::Multipart::MissingInputError < ::StandardError + include ::Rack::BadRequest +end + +# source://rack/lib/rack/multipart/parser.rb#10 +class Rack::Multipart::MultipartPartLimitError < ::Errno::EMFILE + include ::Rack::BadRequest +end + +# source://rack/lib/rack/multipart/parser.rb#14 +class Rack::Multipart::MultipartTotalPartLimitError < ::StandardError + include ::Rack::BadRequest +end + +# Accumulator for multipart form data, conforming to the QueryParser API. +# In future, the Parser could return the pair list directly, but that would +# change its API. +# +# source://rack/lib/rack/multipart.rb#25 +class Rack::Multipart::ParamList + # @return [ParamList] a new instance of ParamList + # + # source://rack/lib/rack/multipart.rb#34 + def initialize; end + + # source://rack/lib/rack/multipart.rb#38 + def <<(pair); end + + # source://rack/lib/rack/multipart.rb#42 + def to_params_hash; end + + class << self + # source://rack/lib/rack/multipart.rb#26 + def make_params; end -# source://rack/lib/rack/multipart/parser.rb#11 -class Rack::Multipart::MultipartTotalPartLimitError < ::StandardError; end + # source://rack/lib/rack/multipart.rb#30 + def normalize_params(params, key, value); end + end +end -# source://rack/lib/rack/multipart/parser.rb#46 +# source://rack/lib/rack/multipart/parser.rb#39 class Rack::Multipart::Parser # @return [Parser] a new instance of Parser # - # source://rack/lib/rack/multipart/parser.rb#205 + # source://rack/lib/rack/multipart/parser.rb#200 def initialize(boundary, tempfile, bufsize, query_parser); end - # source://rack/lib/rack/multipart/parser.rb#221 + # source://rack/lib/rack/multipart/parser.rb#217 def parse(io); end - # source://rack/lib/rack/multipart/parser.rb#244 + # source://rack/lib/rack/multipart/parser.rb#240 def result; end # Returns the value of attribute state. # - # source://rack/lib/rack/multipart/parser.rb#203 + # source://rack/lib/rack/multipart/parser.rb#198 def state; end private @@ -2461,21 +2170,25 @@ class Rack::Multipart::Parser # end of the boundary. If we don't find the start or end of the # boundary, clear the buffer and return nil. # - # source://rack/lib/rack/multipart/parser.rb#354 + # source://rack/lib/rack/multipart/parser.rb#434 def consume_boundary; end # From WEBrick::HTTPUtils # - # source://rack/lib/rack/multipart/parser.rb#256 + # source://rack/lib/rack/multipart/parser.rb#252 def dequote(str); end - # source://rack/lib/rack/multipart/parser.rb#363 - def get_filename(head); end + # Return the related Encoding object. However, because + # enc is submitted by the user, it may be invalid, so + # use a binary encoding in that case. + # + # source://rack/lib/rack/multipart/parser.rb#489 + def find_encoding(enc); end - # source://rack/lib/rack/multipart/parser.rb#298 + # source://rack/lib/rack/multipart/parser.rb#294 def handle_consume_token; end - # source://rack/lib/rack/multipart/parser.rb#435 + # source://rack/lib/rack/multipart/parser.rb#495 def handle_empty_content!(content); end # This handles the initial parser state. We read until we find the starting @@ -2486,108 +2199,117 @@ class Rack::Multipart::Parser # boundary. The client would have to deliberately craft a response # with the opening boundary beyond the buffer size for that to happen. # - # source://rack/lib/rack/multipart/parser.rb#275 + # source://rack/lib/rack/multipart/parser.rb#271 def handle_fast_forward; end - # source://rack/lib/rack/multipart/parser.rb#331 + # source://rack/lib/rack/multipart/parser.rb#411 def handle_mime_body; end - # source://rack/lib/rack/multipart/parser.rb#308 + # source://rack/lib/rack/multipart/parser.rb#306 def handle_mime_head; end - # source://rack/lib/rack/multipart/parser.rb#262 + # source://rack/lib/rack/multipart/parser.rb#443 + def normalize_filename(filename); end + + # source://rack/lib/rack/multipart/parser.rb#258 def read_data(io, outbuf); end - # source://rack/lib/rack/multipart/parser.rb#401 + # source://rack/lib/rack/multipart/parser.rb#456 def tag_multipart_encoding(filename, content_type, name, body); end class << self - # source://rack/lib/rack/multipart/parser.rb#92 + # source://rack/lib/rack/multipart/parser.rb#87 def parse(io, content_length, content_type, tmpfile, bufsize, qp); end - # source://rack/lib/rack/multipart/parser.rb#85 + # source://rack/lib/rack/multipart/parser.rb#80 def parse_boundary(content_type); end end end -# source://rack/lib/rack/multipart/parser.rb#47 +# source://rack/lib/rack/multipart/parser.rb#40 Rack::Multipart::Parser::BUFSIZE = T.let(T.unsafe(nil), Integer) -# source://rack/lib/rack/multipart/parser.rb#53 +# source://rack/lib/rack/multipart/parser.rb#48 class Rack::Multipart::Parser::BoundedIO # @return [BoundedIO] a new instance of BoundedIO # - # source://rack/lib/rack/multipart/parser.rb#54 + # source://rack/lib/rack/multipart/parser.rb#49 def initialize(io, content_length); end - # source://rack/lib/rack/multipart/parser.rb#60 + # source://rack/lib/rack/multipart/parser.rb#55 def read(size, outbuf = T.unsafe(nil)); end end -# source://rack/lib/rack/multipart/parser.rb#398 +# source://rack/lib/rack/multipart/parser.rb#453 Rack::Multipart::Parser::CHARSET = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/multipart/parser.rb#112 +# source://rack/lib/rack/multipart/parser.rb#305 +Rack::Multipart::Parser::CONTENT_DISPOSITION_MAX_BYTES = T.let(T.unsafe(nil), Integer) + +# source://rack/lib/rack/multipart/parser.rb#304 +Rack::Multipart::Parser::CONTENT_DISPOSITION_MAX_PARAMS = T.let(T.unsafe(nil), Integer) + +# source://rack/lib/rack/multipart/parser.rb#107 class Rack::Multipart::Parser::Collector include ::Enumerable # @return [Collector] a new instance of Collector # - # source://rack/lib/rack/multipart/parser.rb#148 + # source://rack/lib/rack/multipart/parser.rb#143 def initialize(tempfile); end - # source://rack/lib/rack/multipart/parser.rb#154 + # source://rack/lib/rack/multipart/parser.rb#149 def each; end - # source://rack/lib/rack/multipart/parser.rb#174 + # source://rack/lib/rack/multipart/parser.rb#169 def on_mime_body(mime_index, content); end - # source://rack/lib/rack/multipart/parser.rb#178 + # source://rack/lib/rack/multipart/parser.rb#173 def on_mime_finish(mime_index); end - # source://rack/lib/rack/multipart/parser.rb#158 + # source://rack/lib/rack/multipart/parser.rb#153 def on_mime_head(mime_index, head, filename, content_type, name); end private - # source://rack/lib/rack/multipart/parser.rb#183 + # source://rack/lib/rack/multipart/parser.rb#178 def check_part_limits; end end -# source://rack/lib/rack/multipart/parser.rb#136 +# source://rack/lib/rack/multipart/parser.rb#131 class Rack::Multipart::Parser::Collector::BufferPart < ::Rack::Multipart::Parser::Collector::MimePart - # source://rack/lib/rack/multipart/parser.rb#138 + # source://rack/lib/rack/multipart/parser.rb#133 def close; end # @return [Boolean] # - # source://rack/lib/rack/multipart/parser.rb#137 + # source://rack/lib/rack/multipart/parser.rb#132 def file?; end end -# source://rack/lib/rack/multipart/parser.rb#113 +# source://rack/lib/rack/multipart/parser.rb#108 class Rack::Multipart::Parser::Collector::MimePart < ::Struct # @yield [data] # - # source://rack/lib/rack/multipart/parser.rb#114 + # source://rack/lib/rack/multipart/parser.rb#109 def get_data; end end -# source://rack/lib/rack/multipart/parser.rb#141 +# source://rack/lib/rack/multipart/parser.rb#136 class Rack::Multipart::Parser::Collector::TempfilePart < ::Rack::Multipart::Parser::Collector::MimePart - # source://rack/lib/rack/multipart/parser.rb#143 + # source://rack/lib/rack/multipart/parser.rb#138 def close; end # @return [Boolean] # - # source://rack/lib/rack/multipart/parser.rb#142 + # source://rack/lib/rack/multipart/parser.rb#137 def file?; end end -# source://rack/lib/rack/multipart/parser.rb#83 +# source://rack/lib/rack/multipart/parser.rb#78 Rack::Multipart::Parser::EMPTY = T.let(T.unsafe(nil), Rack::Multipart::Parser::MultipartInfo) -# source://rack/lib/rack/multipart/parser.rb#82 +# source://rack/lib/rack/multipart/parser.rb#77 class Rack::Multipart::Parser::MultipartInfo < ::Struct # Returns the value of attribute params # @@ -2620,27 +2342,12 @@ class Rack::Multipart::Parser::MultipartInfo < ::Struct end end -# source://rack/lib/rack/multipart/parser.rb#49 +# source://rack/lib/rack/multipart/parser.rb#42 Rack::Multipart::Parser::TEMPFILE_FACTORY = T.let(T.unsafe(nil), Proc) -# source://rack/lib/rack/multipart/parser.rb#48 +# source://rack/lib/rack/multipart/parser.rb#41 Rack::Multipart::Parser::TEXT_PLAIN = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/multipart/parser.rb#35 -Rack::Multipart::REGULAR_PARAMETER = T.let(T.unsafe(nil), Regexp) - -# source://rack/lib/rack/multipart/parser.rb#34 -Rack::Multipart::REGULAR_PARAMETER_NAME = T.let(T.unsafe(nil), Regexp) - -# source://rack/lib/rack/multipart/parser.rb#44 -Rack::Multipart::RFC2183 = T.let(T.unsafe(nil), Regexp) - -# source://rack/lib/rack/multipart/parser.rb#33 -Rack::Multipart::SECTION = T.let(T.unsafe(nil), Regexp) - -# source://rack/lib/rack/multipart/parser.rb#23 -Rack::Multipart::TOKEN = T.let(T.unsafe(nil), Regexp) - # source://rack/lib/rack/multipart/uploaded_file.rb#8 class Rack::Multipart::UploadedFile # @return [UploadedFile] a new instance of UploadedFile @@ -2678,9 +2385,6 @@ class Rack::Multipart::UploadedFile def respond_to?(*args); end end -# source://rack/lib/rack/multipart/parser.rb#25 -Rack::Multipart::VALUE = T.let(T.unsafe(nil), Regexp) - # source://rack/lib/rack/null_logger.rb#6 class Rack::NullLogger # @return [NullLogger] a new instance of NullLogger @@ -2813,17 +2517,17 @@ Rack::PUT = T.let(T.unsafe(nil), String) # source://rack/lib/rack/constants.rb#12 Rack::QUERY_STRING = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/query_parser.rb#6 +# source://rack/lib/rack/query_parser.rb#7 class Rack::QueryParser # @return [QueryParser] a new instance of QueryParser # - # source://rack/lib/rack/query_parser.rb#33 - def initialize(params_class, _key_space_limit = T.unsafe(nil), param_depth_limit); end + # source://rack/lib/rack/query_parser.rb#36 + def initialize(params_class, param_depth_limit); end - # source://rack/lib/rack/query_parser.rb#167 + # source://rack/lib/rack/query_parser.rb#166 def make_params; end - # source://rack/lib/rack/query_parser.rb#171 + # source://rack/lib/rack/query_parser.rb#170 def new_depth_limit(param_depth_limit); end # normalize_params recursively expands parameters into structural types. If @@ -2832,12 +2536,12 @@ class Rack::QueryParser # and should no longer be used, it is kept for backwards compatibility with # earlier versions of rack. # - # source://rack/lib/rack/query_parser.rb#95 + # source://rack/lib/rack/query_parser.rb#94 def normalize_params(params, name, v, _depth = T.unsafe(nil)); end # Returns the value of attribute param_depth_limit. # - # source://rack/lib/rack/query_parser.rb#31 + # source://rack/lib/rack/query_parser.rb#34 def param_depth_limit; end # parse_nested_query expands a query string into structural types. Supported @@ -2846,7 +2550,7 @@ class Rack::QueryParser # ParameterTypeError is raised. Users are encouraged to return a 400 in this # case. # - # source://rack/lib/rack/query_parser.rb#74 + # source://rack/lib/rack/query_parser.rb#73 def parse_nested_query(qs, separator = T.unsafe(nil)); end # Stolen from Mongrel, with some small modifications: @@ -2854,196 +2558,152 @@ class Rack::QueryParser # to parse cookies by changing the characters used in the second parameter # (which defaults to '&'). # - # source://rack/lib/rack/query_parser.rb#46 + # source://rack/lib/rack/query_parser.rb#45 def parse_query(qs, separator = T.unsafe(nil), &unescaper); end private # @raise [ParamsTooDeepError] # - # source://rack/lib/rack/query_parser.rb#99 + # source://rack/lib/rack/query_parser.rb#98 def _normalize_params(params, name, v, depth); end # @return [Boolean] # - # source://rack/lib/rack/query_parser.rb#181 + # source://rack/lib/rack/query_parser.rb#180 def params_hash_has_key?(hash, key); end # @return [Boolean] # - # source://rack/lib/rack/query_parser.rb#177 + # source://rack/lib/rack/query_parser.rb#176 def params_hash_type?(obj); end - # source://rack/lib/rack/query_parser.rb#193 + # source://rack/lib/rack/query_parser.rb#192 def unescape(string, encoding = T.unsafe(nil)); end class << self - # source://rack/lib/rack/query_parser.rb#23 - def make_default(_key_space_limit = T.unsafe(nil), param_depth_limit); end + # source://rack/lib/rack/query_parser.rb#30 + def make_default(param_depth_limit); end end end -# source://rack/lib/rack/query_parser.rb#8 +# source://rack/lib/rack/query_parser.rb#9 Rack::QueryParser::COMMON_SEP = T.let(T.unsafe(nil), Hash) -# source://rack/lib/rack/query_parser.rb#7 +# source://rack/lib/rack/query_parser.rb#8 Rack::QueryParser::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) # InvalidParameterError is the error that is raised when incoming structural # parameters (parsed by parse_nested_query) contain invalid format or byte # sequence. # -# source://rack/lib/rack/query_parser.rb#17 -class Rack::QueryParser::InvalidParameterError < ::ArgumentError; end +# source://rack/lib/rack/query_parser.rb#20 +class Rack::QueryParser::InvalidParameterError < ::ArgumentError + include ::Rack::BadRequest +end # ParameterTypeError is the error that is raised when incoming structural # parameters (parsed by parse_nested_query) contain conflicting types. # -# source://rack/lib/rack/query_parser.rb#12 -class Rack::QueryParser::ParameterTypeError < ::TypeError; end - -# source://rack/lib/rack/query_parser.rb#197 -class Rack::QueryParser::Params - # @return [Params] a new instance of Params - # - # source://rack/lib/rack/query_parser.rb#198 - def initialize; end - - # source://rack/lib/rack/query_parser.rb#203 - def [](key); end - - # source://rack/lib/rack/query_parser.rb#207 - def []=(key, value); end - - # @return [Boolean] - # - # source://rack/lib/rack/query_parser.rb#211 - def key?(key); end - - # Recursively unwraps nested `Params` objects and constructs an object - # of the same shape, but using the objects' internal representations - # (Ruby hashes) in place of the objects. The result is a hash consisting - # purely of Ruby primitives. - # - # Mutation warning! - # - # 1. This method mutates the internal representation of the `Params` - # objects in order to save object allocations. - # - # 2. The value you get back is a reference to the internal hash - # representation, not a copy. - # - # 3. Because the `Params` object's internal representation is mutable - # through the `#[]=` method, it is not thread safe. The result of - # getting the hash representation while another thread is adding a - # key to it is non-deterministic. - # - # source://rack/lib/rack/query_parser.rb#233 - def to_h; end +# source://rack/lib/rack/query_parser.rb#13 +class Rack::QueryParser::ParameterTypeError < ::TypeError + include ::Rack::BadRequest +end - # Recursively unwraps nested `Params` objects and constructs an object - # of the same shape, but using the objects' internal representations - # (Ruby hashes) in place of the objects. The result is a hash consisting - # purely of Ruby primitives. - # - # Mutation warning! - # - # 1. This method mutates the internal representation of the `Params` - # objects in order to save object allocations. - # - # 2. The value you get back is a reference to the internal hash - # representation, not a copy. - # - # 3. Because the `Params` object's internal representation is mutable - # through the `#[]=` method, it is not thread safe. The result of - # getting the hash representation while another thread is adding a - # key to it is non-deterministic. - # - # source://rack/lib/rack/query_parser.rb#233 +# source://rack/lib/rack/query_parser.rb#196 +class Rack::QueryParser::Params < ::Hash def to_params_hash; end end # ParamsTooDeepError is the error that is raised when params are recursively # nested over the specified limit. # -# source://rack/lib/rack/query_parser.rb#21 -class Rack::QueryParser::ParamsTooDeepError < ::RangeError; end +# source://rack/lib/rack/query_parser.rb#26 +class Rack::QueryParser::ParamsTooDeepError < ::RangeError + include ::Rack::BadRequest +end -# source://rack/lib/rack/constants.rb#42 +# source://rack/lib/rack/constants.rb#43 +Rack::RACK_EARLY_HINTS = T.let(T.unsafe(nil), String) + +# source://rack/lib/rack/constants.rb#44 Rack::RACK_ERRORS = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#49 +# source://rack/lib/rack/constants.rb#51 Rack::RACK_HIJACK = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#44 +# source://rack/lib/rack/constants.rb#46 Rack::RACK_INPUT = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#50 +# source://rack/lib/rack/constants.rb#52 Rack::RACK_IS_HIJACK = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#43 +# source://rack/lib/rack/constants.rb#45 Rack::RACK_LOGGER = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#63 +# source://rack/lib/rack/constants.rb#66 Rack::RACK_METHODOVERRIDE_ORIGINAL_METHOD = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#52 +# source://rack/lib/rack/constants.rb#54 Rack::RACK_MULTIPART_BUFFER_SIZE = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#53 +# source://rack/lib/rack/constants.rb#55 Rack::RACK_MULTIPART_TEMPFILE_FACTORY = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#51 +# source://rack/lib/rack/constants.rb#53 Rack::RACK_RECURSIVE_INCLUDE = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#59 +# source://rack/lib/rack/constants.rb#62 Rack::RACK_REQUEST_COOKIE_HASH = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#60 +# source://rack/lib/rack/constants.rb#63 Rack::RACK_REQUEST_COOKIE_STRING = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#58 +# source://rack/lib/rack/constants.rb#61 Rack::RACK_REQUEST_FORM_ERROR = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#56 +# source://rack/lib/rack/constants.rb#58 Rack::RACK_REQUEST_FORM_HASH = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#55 +# source://rack/lib/rack/constants.rb#57 Rack::RACK_REQUEST_FORM_INPUT = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#57 +# source://rack/lib/rack/constants.rb#59 +Rack::RACK_REQUEST_FORM_PAIRS = T.let(T.unsafe(nil), String) + +# source://rack/lib/rack/constants.rb#60 Rack::RACK_REQUEST_FORM_VARS = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#61 +# source://rack/lib/rack/constants.rb#64 Rack::RACK_REQUEST_QUERY_HASH = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#62 +# source://rack/lib/rack/constants.rb#65 Rack::RACK_REQUEST_QUERY_STRING = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#54 +# source://rack/lib/rack/constants.rb#56 Rack::RACK_RESPONSE_FINISHED = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#45 +# source://rack/lib/rack/constants.rb#47 Rack::RACK_SESSION = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#46 +# source://rack/lib/rack/constants.rb#48 Rack::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#47 +# source://rack/lib/rack/constants.rb#49 Rack::RACK_SHOWSTATUS_DETAIL = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#41 +# source://rack/lib/rack/constants.rb#42 Rack::RACK_TEMPFILES = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/constants.rb#48 +# source://rack/lib/rack/constants.rb#50 Rack::RACK_URL_SCHEME = T.let(T.unsafe(nil), String) # Rack environment variables # -# source://rack/lib/rack/constants.rb#40 +# source://rack/lib/rack/constants.rb#41 Rack::RACK_VERSION = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/version.rb#28 +# source://rack/lib/rack/version.rb#15 Rack::RELEASE = T.let(T.unsafe(nil), String) # source://rack/lib/rack/constants.rb#9 @@ -3307,25 +2967,13 @@ module Rack::Request::Helpers # This method support both application/x-www-form-urlencoded and # multipart/form-data. # - # source://rack/lib/rack/request.rb#498 + # source://rack/lib/rack/request.rb#503 def POST; end - # shortcut for request.params[key] - # - # source://rack/lib/rack/request.rb#609 - def [](key); end - - # shortcut for request.params[key] = value - # - # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params. - # - # source://rack/lib/rack/request.rb#618 - def []=(key, value); end - - # source://rack/lib/rack/request.rb#596 + # source://rack/lib/rack/request.rb#607 def accept_encoding; end - # source://rack/lib/rack/request.rb#600 + # source://rack/lib/rack/request.rb#611 def accept_language; end # The authority of the incoming request as defined by RFC3976. @@ -3337,7 +2985,7 @@ module Rack::Request::Helpers # source://rack/lib/rack/request.rb#266 def authority; end - # source://rack/lib/rack/request.rb#579 + # source://rack/lib/rack/request.rb#590 def base_url; end # source://rack/lib/rack/request.rb#190 @@ -3373,7 +3021,7 @@ module Rack::Request::Helpers # # env['rack.input'] is not touched. # - # source://rack/lib/rack/request.rb#574 + # source://rack/lib/rack/request.rb#585 def delete_param(k); end # Determine whether the request body contains form-data by checking @@ -3399,7 +3047,7 @@ module Rack::Request::Helpers # source://rack/lib/rack/request.rb#374 def forwarded_port; end - # source://rack/lib/rack/request.rb#592 + # source://rack/lib/rack/request.rb#603 def fullpath; end # Checks the HTTP request method (or verb) to see if it was of type GET @@ -3480,7 +3128,7 @@ module Rack::Request::Helpers # # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params. # - # source://rack/lib/rack/request.rb#545 + # source://rack/lib/rack/request.rb#556 def params; end # Determine whether the request body contains data by checking @@ -3498,7 +3146,7 @@ module Rack::Request::Helpers # source://rack/lib/rack/request.rb#235 def patch?; end - # source://rack/lib/rack/request.rb#588 + # source://rack/lib/rack/request.rb#599 def path; end # source://rack/lib/rack/request.rb#194 @@ -3581,7 +3229,7 @@ module Rack::Request::Helpers # @return [Boolean] # - # source://rack/lib/rack/request.rb#604 + # source://rack/lib/rack/request.rb#615 def trusted_proxy?(ip); end # Checks the HTTP request method (or verb) to see if it was of type UNLINK @@ -3597,12 +3245,12 @@ module Rack::Request::Helpers # # env['rack.input'] is not touched. # - # source://rack/lib/rack/request.rb#554 + # source://rack/lib/rack/request.rb#565 def update_param(k, v); end # Tries to return a remake of the original request URL as a string. # - # source://rack/lib/rack/request.rb#584 + # source://rack/lib/rack/request.rb#595 def url; end # source://rack/lib/rack/request.rb#201 @@ -3610,7 +3258,7 @@ module Rack::Request::Helpers # like Hash#values_at # - # source://rack/lib/rack/request.rb#625 + # source://rack/lib/rack/request.rb#620 def values_at(*keys); end # @return [Boolean] @@ -3620,54 +3268,57 @@ module Rack::Request::Helpers private - # source://rack/lib/rack/request.rb#757 + # source://rack/lib/rack/request.rb#776 def allowed_scheme(header); end - # source://rack/lib/rack/request.rb#631 + # source://rack/lib/rack/request.rb#628 def default_session; end - # source://rack/lib/rack/request.rb#761 + # source://rack/lib/rack/request.rb#684 + def expand_param_pairs(pairs, query_parser = T.unsafe(nil)); end + + # source://rack/lib/rack/request.rb#780 def forwarded_priority; end - # source://rack/lib/rack/request.rb#733 + # source://rack/lib/rack/request.rb#752 def forwarded_scheme; end # Get an array of values set in the RFC 7239 `Forwarded` request header. # - # source://rack/lib/rack/request.rb#659 + # source://rack/lib/rack/request.rb#668 def get_http_forwarded(token); end - # source://rack/lib/rack/request.rb#647 + # source://rack/lib/rack/request.rb#644 def parse_http_accept_header(header); end - # source://rack/lib/rack/request.rb#671 + # source://rack/lib/rack/request.rb#680 def parse_multipart; end - # source://rack/lib/rack/request.rb#667 + # source://rack/lib/rack/request.rb#676 def parse_query(qs, d = T.unsafe(nil)); end - # source://rack/lib/rack/request.rb#663 + # source://rack/lib/rack/request.rb#672 def query_parser; end - # source://rack/lib/rack/request.rb#724 + # source://rack/lib/rack/request.rb#743 def reject_trusted_ip_addresses(ip_addresses); end - # source://rack/lib/rack/request.rb#718 + # source://rack/lib/rack/request.rb#737 def split_authority(authority); end - # source://rack/lib/rack/request.rb#675 + # source://rack/lib/rack/request.rb#694 def split_header(value); end # Assist with compatibility when processing `X-Forwarded-For`. # - # source://rack/lib/rack/request.rb#634 + # source://rack/lib/rack/request.rb#631 def wrap_ipv6(host); end - # source://rack/lib/rack/request.rb#765 + # source://rack/lib/rack/request.rb#784 def x_forwarded_proto_priority; end end -# source://rack/lib/rack/request.rb#703 +# source://rack/lib/rack/request.rb#722 Rack::Request::Helpers::AUTHORITY = T.let(T.unsafe(nil), Regexp) # Default ports depending on scheme. Used to decide whether or not @@ -3683,7 +3334,7 @@ Rack::Request::Helpers::DEFAULT_PORTS = T.let(T.unsafe(nil), Hash) # source://rack/lib/rack/request.rb#153 Rack::Request::Helpers::FORM_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array) -# source://rack/lib/rack/request.rb#728 +# source://rack/lib/rack/request.rb#747 Rack::Request::Helpers::FORWARDED_SCHEME_HEADERS = T.let(T.unsafe(nil), Hash) # source://rack/lib/rack/request.rb#176 @@ -3768,17 +3419,17 @@ class Rack::Response # @yield [_self] # @yieldparam _self [Rack::Response] the object that the method was called on # - # source://rack/lib/rack/response.rb#61 + # source://rack/lib/rack/response.rb#54 def initialize(body = T.unsafe(nil), status = T.unsafe(nil), headers = T.unsafe(nil)); end # @raise [ArgumentError] # - # source://rack/lib/rack/response.rb#163 + # source://rack/lib/rack/response.rb#164 def [](key); end # @raise [ArgumentError] # - # source://rack/lib/rack/response.rb#167 + # source://rack/lib/rack/response.rb#168 def []=(key, value); end # Returns the value of attribute body. @@ -3795,23 +3446,23 @@ class Rack::Response # @return [Boolean] # - # source://rack/lib/rack/response.rb#101 + # source://rack/lib/rack/response.rb#95 def chunked?; end - # source://rack/lib/rack/response.rb#151 + # source://rack/lib/rack/response.rb#152 def close; end # @raise [ArgumentError] # - # source://rack/lib/rack/response.rb#171 + # source://rack/lib/rack/response.rb#172 def delete_header(key); end - # source://rack/lib/rack/response.rb#131 + # source://rack/lib/rack/response.rb#130 def each(&callback); end # @return [Boolean] # - # source://rack/lib/rack/response.rb#155 + # source://rack/lib/rack/response.rb#156 def empty?; end # Generate a response array consistent with the requirements of the SPEC. @@ -3819,25 +3470,20 @@ class Rack::Response # # @return [Array] a 3-tuple suitable of `[status, headers, body]` # - # source://rack/lib/rack/response.rb#113 + # source://rack/lib/rack/response.rb#107 def finish(&block); end # @raise [ArgumentError] # - # source://rack/lib/rack/response.rb#163 + # source://rack/lib/rack/response.rb#164 def get_header(key); end # @raise [ArgumentError] # @return [Boolean] # - # source://rack/lib/rack/response.rb#159 + # source://rack/lib/rack/response.rb#160 def has_header?(key); end - # Deprecated, use headers instead. - # - # source://rack/lib/rack/response.rb#35 - def header; end - # Returns the value of attribute headers. # # source://rack/lib/rack/response.rb#32 @@ -3857,15 +3503,15 @@ class Rack::Response # @return [Boolean] # - # source://rack/lib/rack/response.rb#105 + # source://rack/lib/rack/response.rb#99 def no_entity_body?; end - # source://rack/lib/rack/response.rb#96 + # source://rack/lib/rack/response.rb#90 def redirect(target, status = T.unsafe(nil)); end # @raise [ArgumentError] # - # source://rack/lib/rack/response.rb#167 + # source://rack/lib/rack/response.rb#168 def set_header(key, value); end # Returns the value of attribute status. @@ -3886,14 +3532,16 @@ class Rack::Response # # @return [Array] a 3-tuple suitable of `[status, headers, body]` # - # source://rack/lib/rack/response.rb#113 + # source://rack/lib/rack/response.rb#107 def to_a(&block); end - # Append to body and update content-length. + # Append a chunk to the response body. + # + # Converts the response into a buffered response if it wasn't already. # # NOTE: Do not mix #write and direct #body access! # - # source://rack/lib/rack/response.rb#145 + # source://rack/lib/rack/response.rb#146 def write(chunk); end class << self @@ -3905,11 +3553,11 @@ end # source://rack/lib/rack/response.rb#28 Rack::Response::CHUNKED = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/response.rb#179 +# source://rack/lib/rack/response.rb#180 module Rack::Response::Helpers # @return [Boolean] # - # source://rack/lib/rack/response.rb#190 + # source://rack/lib/rack/response.rb#191 def accepted?; end # Add a header that may have multiple values. @@ -3924,12 +3572,12 @@ module Rack::Response::Helpers # # @raise [ArgumentError] # - # source://rack/lib/rack/response.rb#218 + # source://rack/lib/rack/response.rb#219 def add_header(key, value); end # @return [Boolean] # - # source://rack/lib/rack/response.rb#193 + # source://rack/lib/rack/response.rb#194 def bad_request?; end # Specify that the content should be cached. @@ -3938,210 +3586,219 @@ module Rack::Response::Helpers # @param duration [Integer] The number of seconds until the cache expires. # @param directive [Hash] a customizable set of options # - # source://rack/lib/rack/response.rb#306 + # source://rack/lib/rack/response.rb#307 def cache!(duration = T.unsafe(nil), directive: T.unsafe(nil)); end - # source://rack/lib/rack/response.rb#289 + # source://rack/lib/rack/response.rb#290 def cache_control; end - # source://rack/lib/rack/response.rb#293 + # source://rack/lib/rack/response.rb#294 def cache_control=(value); end # @return [Boolean] # - # source://rack/lib/rack/response.rb#185 + # source://rack/lib/rack/response.rb#186 def client_error?; end - # source://rack/lib/rack/response.rb#256 + # source://rack/lib/rack/response.rb#257 def content_length; end # Get the content type of the response. # - # source://rack/lib/rack/response.rb#239 + # source://rack/lib/rack/response.rb#240 def content_type; end # Set the content type of the response. # - # source://rack/lib/rack/response.rb#244 + # source://rack/lib/rack/response.rb#245 def content_type=(content_type); end # @return [Boolean] # - # source://rack/lib/rack/response.rb#189 + # source://rack/lib/rack/response.rb#190 def created?; end - # source://rack/lib/rack/response.rb#273 + # source://rack/lib/rack/response.rb#274 def delete_cookie(key, value = T.unsafe(nil)); end # Specifies that the content shouldn't be cached. Overrides `cache!` if already called. # - # source://rack/lib/rack/response.rb#298 + # source://rack/lib/rack/response.rb#299 def do_not_cache!; end - # source://rack/lib/rack/response.rb#313 + # source://rack/lib/rack/response.rb#314 def etag; end - # source://rack/lib/rack/response.rb#317 + # source://rack/lib/rack/response.rb#318 def etag=(value); end # @return [Boolean] # - # source://rack/lib/rack/response.rb#195 + # source://rack/lib/rack/response.rb#196 def forbidden?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#205 + # source://rack/lib/rack/response.rb#206 def include?(header); end # @return [Boolean] # - # source://rack/lib/rack/response.rb#182 + # source://rack/lib/rack/response.rb#183 def informational?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#180 + # source://rack/lib/rack/response.rb#181 def invalid?; end - # source://rack/lib/rack/response.rb#261 + # source://rack/lib/rack/response.rb#262 def location; end - # source://rack/lib/rack/response.rb#265 + # source://rack/lib/rack/response.rb#266 def location=(location); end - # source://rack/lib/rack/response.rb#248 + # source://rack/lib/rack/response.rb#249 def media_type; end - # source://rack/lib/rack/response.rb#252 + # source://rack/lib/rack/response.rb#253 def media_type_params; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#197 + # source://rack/lib/rack/response.rb#198 def method_not_allowed?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#192 + # source://rack/lib/rack/response.rb#193 def moved_permanently?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#191 + # source://rack/lib/rack/response.rb#192 def no_content?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#198 + # source://rack/lib/rack/response.rb#199 def not_acceptable?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#196 + # source://rack/lib/rack/response.rb#197 def not_found?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#188 + # source://rack/lib/rack/response.rb#189 def ok?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#200 + # source://rack/lib/rack/response.rb#201 def precondition_failed?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#203 + # source://rack/lib/rack/response.rb#204 def redirect?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#184 + # source://rack/lib/rack/response.rb#185 def redirection?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#199 + # source://rack/lib/rack/response.rb#200 def request_timeout?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#186 + # source://rack/lib/rack/response.rb#187 def server_error?; end - # source://rack/lib/rack/response.rb#269 + # source://rack/lib/rack/response.rb#270 def set_cookie(key, value); end - # source://rack/lib/rack/response.rb#281 + # source://rack/lib/rack/response.rb#282 def set_cookie_header; end - # source://rack/lib/rack/response.rb#285 + # source://rack/lib/rack/response.rb#286 def set_cookie_header=(value); end # @return [Boolean] # - # source://rack/lib/rack/response.rb#183 + # source://rack/lib/rack/response.rb#184 def successful?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#194 + # source://rack/lib/rack/response.rb#195 def unauthorized?; end # @return [Boolean] # - # source://rack/lib/rack/response.rb#201 + # source://rack/lib/rack/response.rb#202 def unprocessable?; end protected - # source://rack/lib/rack/response.rb#353 + # source://rack/lib/rack/response.rb#359 def append(chunk); end - # source://rack/lib/rack/response.rb#323 + # Convert the body of this response into an internally buffered Array if possible. + # + # `@buffered` is a ternary value which indicates whether the body is buffered. It can be: + # * `nil` - The body has not been buffered yet. + # * `true` - The body is buffered as an Array instance. + # * `false` - The body is not buffered and cannot be buffered. + # + # @return [Boolean] whether the body is buffered as an Array instance. + # + # source://rack/lib/rack/response.rb#332 def buffered_body!; end end -# source://rack/lib/rack/response.rb#367 +# source://rack/lib/rack/response.rb#375 class Rack::Response::Raw include ::Rack::Response::Helpers # @return [Raw] a new instance of Raw # - # source://rack/lib/rack/response.rb#373 + # source://rack/lib/rack/response.rb#381 def initialize(status, headers); end - # source://rack/lib/rack/response.rb#390 + # source://rack/lib/rack/response.rb#398 def delete_header(key); end - # source://rack/lib/rack/response.rb#382 + # source://rack/lib/rack/response.rb#390 def get_header(key); end # @return [Boolean] # - # source://rack/lib/rack/response.rb#378 + # source://rack/lib/rack/response.rb#386 def has_header?(key); end # Returns the value of attribute headers. # - # source://rack/lib/rack/response.rb#370 + # source://rack/lib/rack/response.rb#378 def headers; end - # source://rack/lib/rack/response.rb#386 + # source://rack/lib/rack/response.rb#394 def set_header(key, value); end # Returns the value of attribute status. # - # source://rack/lib/rack/response.rb#371 + # source://rack/lib/rack/response.rb#379 def status; end # Sets the attribute status # # @param value the value to set the attribute status to. # - # source://rack/lib/rack/response.rb#371 + # source://rack/lib/rack/response.rb#379 def status=(_arg0); end end @@ -4372,45 +4029,144 @@ end # Be careful when you use this on public-facing sites as it could # reveal information helpful to attackers. # -# source://rack/lib/rack/show_exceptions.rb#19 +# source://rack/lib/rack/show_exceptions.rb#18 class Rack::ShowExceptions # @return [ShowExceptions] a new instance of ShowExceptions # - # source://rack/lib/rack/show_exceptions.rb#22 + # source://rack/lib/rack/show_exceptions.rb#26 def initialize(app); end - # source://rack/lib/rack/show_exceptions.rb#26 + # source://rack/lib/rack/show_exceptions.rb#30 def call(env); end - # source://rack/lib/rack/show_exceptions.rb#61 + # source://rack/lib/rack/show_exceptions.rb#65 def dump_exception(exception); end - # source://rack/lib/rack/show_exceptions.rb#112 + # source://rack/lib/rack/show_exceptions.rb#116 def h(obj); end # @return [Boolean] # - # source://rack/lib/rack/show_exceptions.rb#52 + # source://rack/lib/rack/show_exceptions.rb#56 def prefers_plaintext?(env); end - # source://rack/lib/rack/show_exceptions.rb#72 + # source://rack/lib/rack/show_exceptions.rb#76 def pretty(env, exception); end - # source://rack/lib/rack/show_exceptions.rb#108 + # source://rack/lib/rack/show_exceptions.rb#112 def template; end private # @return [Boolean] # - # source://rack/lib/rack/show_exceptions.rb#56 + # source://rack/lib/rack/show_exceptions.rb#60 def accepts_html?(env); end end -# source://rack/lib/rack/show_exceptions.rb#20 +# source://rack/lib/rack/show_exceptions.rb#19 Rack::ShowExceptions::CONTEXT = T.let(T.unsafe(nil), Integer) -# source://rack/lib/rack/show_exceptions.rb#127 +# source://rack/lib/rack/show_exceptions.rb#21 +class Rack::ShowExceptions::Frame < ::Struct + # Returns the value of attribute context_line + # + # @return [Object] the current value of context_line + def context_line; end + + # Sets the attribute context_line + # + # @param value [Object] the value to set the attribute context_line to. + # @return [Object] the newly set value + def context_line=(_); end + + # Returns the value of attribute filename + # + # @return [Object] the current value of filename + def filename; end + + # Sets the attribute filename + # + # @param value [Object] the value to set the attribute filename to. + # @return [Object] the newly set value + def filename=(_); end + + # Returns the value of attribute function + # + # @return [Object] the current value of function + def function; end + + # Sets the attribute function + # + # @param value [Object] the value to set the attribute function to. + # @return [Object] the newly set value + def function=(_); end + + # Returns the value of attribute lineno + # + # @return [Object] the current value of lineno + def lineno; end + + # Sets the attribute lineno + # + # @param value [Object] the value to set the attribute lineno to. + # @return [Object] the newly set value + def lineno=(_); end + + # Returns the value of attribute post_context + # + # @return [Object] the current value of post_context + def post_context; end + + # Sets the attribute post_context + # + # @param value [Object] the value to set the attribute post_context to. + # @return [Object] the newly set value + def post_context=(_); end + + # Returns the value of attribute post_context_lineno + # + # @return [Object] the current value of post_context_lineno + def post_context_lineno; end + + # Sets the attribute post_context_lineno + # + # @param value [Object] the value to set the attribute post_context_lineno to. + # @return [Object] the newly set value + def post_context_lineno=(_); end + + # Returns the value of attribute pre_context + # + # @return [Object] the current value of pre_context + def pre_context; end + + # Sets the attribute pre_context + # + # @param value [Object] the value to set the attribute pre_context to. + # @return [Object] the newly set value + def pre_context=(_); end + + # Returns the value of attribute pre_context_lineno + # + # @return [Object] the current value of pre_context_lineno + def pre_context_lineno; end + + # Sets the attribute pre_context_lineno + # + # @param value [Object] the value to set the attribute pre_context_lineno to. + # @return [Object] the newly set value + def pre_context_lineno=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rack/lib/rack/show_exceptions.rb#131 Rack::ShowExceptions::TEMPLATE = T.let(T.unsafe(nil), ERB) # Rack::ShowStatus catches all empty responses and replaces them @@ -4550,7 +4306,7 @@ class Rack::Static def route_file(path); end end -# source://rack/lib/rack/constants.rb#37 +# source://rack/lib/rack/constants.rb#38 Rack::TRACE = T.let(T.unsafe(nil), String) # source://rack/lib/rack/constants.rb#25 @@ -4571,7 +4327,7 @@ class Rack::TempfileReaper def call(env); end end -# source://rack/lib/rack/constants.rb#36 +# source://rack/lib/rack/constants.rb#37 Rack::UNLINK = T.let(T.unsafe(nil), String) # Rack::URLMap takes a hash mapping urls or paths to apps, and @@ -4610,46 +4366,40 @@ end # Rack::Utils contains a grab-bag of useful methods for writing web # applications adopted from all kinds of Ruby libraries. # -# source://rack/lib/rack/utils.rb#19 +# source://rack/lib/rack/utils.rb#20 module Rack::Utils private - # source://rack/lib/rack/utils.rb#255 - def add_cookie_to_header(header, key, value); end - - # source://rack/lib/rack/utils.rb#390 - def add_remove_cookie_to_header(header, key, value = T.unsafe(nil)); end - # Return best accept value to use, based on the algorithm # in RFC 2616 Section 14. If there are multiple best # matches (same specificity and quality), the value returned # is arbitrary. # - # source://rack/lib/rack/utils.rb#174 + # source://rack/lib/rack/utils.rb#166 def best_q_match(q_value_header, available_mimes); end - # source://rack/lib/rack/utils.rb#127 + # source://rack/lib/rack/utils.rb#119 def build_nested_query(value, prefix = T.unsafe(nil)); end - # source://rack/lib/rack/utils.rb#117 + # source://rack/lib/rack/utils.rb#109 def build_query(params); end # Parses the "Range:" header, if present, into an array of Range objects. # Returns nil if the header is missing or syntactically invalid. # Returns an empty array if none of the ranges are satisfiable. # - # source://rack/lib/rack/utils.rb#432 + # source://rack/lib/rack/utils.rb#408 def byte_ranges(env, size); end - # source://rack/lib/rack/utils.rb#636 + # source://rack/lib/rack/utils.rb#608 def clean_path_info(path_info); end # :nocov: # - # source://rack/lib/rack/utils.rb#98 + # source://rack/lib/rack/utils.rb#90 def clock_time; end - # source://rack/lib/rack/utils.rb#384 + # source://rack/lib/rack/utils.rb#366 def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end # :call-seq: @@ -4666,7 +4416,7 @@ module Rack::Utils # delete_set_cookie_header("myname") # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" # - # source://rack/lib/rack/utils.rb#374 + # source://rack/lib/rack/utils.rb#362 def delete_set_cookie_header(key, value = T.unsafe(nil)); end # :call-seq: @@ -4687,34 +4437,32 @@ module Rack::Utils # header # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] # - # source://rack/lib/rack/utils.rb#414 + # source://rack/lib/rack/utils.rb#390 def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end # URI escapes. (CGI style space to +) # - # source://rack/lib/rack/utils.rb#38 + # source://rack/lib/rack/utils.rb#39 def escape(s); end + # source://rack/lib/rack/utils.rb#261 + def escape_cookie_key(key); end + # Escape ampersands, brackets and quotes to their HTML/XML entities. - # - # source://rack/lib/rack/utils.rb#199 - def escape_html(string); end + def escape_html(_arg0); end # Like URI escaping, but with %20 instead of +. Strictly speaking this is # true URI escaping. # - # source://rack/lib/rack/utils.rb#44 + # source://rack/lib/rack/utils.rb#45 def escape_path(s); end - # source://rack/lib/rack/utils.rb#156 + # source://rack/lib/rack/utils.rb#148 def forwarded_values(forwarded_header); end - # source://rack/lib/rack/utils.rb#436 + # source://rack/lib/rack/utils.rb#412 def get_byte_ranges(http_range, size); end - # source://rack/lib/rack/utils.rb#378 - def make_delete_cookie_header(header, key, value); end - # :call-seq: # parse_cookies(env) -> hash # @@ -4724,7 +4472,7 @@ module Rack::Utils # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) # # => {'myname' => 'myvalue'} # - # source://rack/lib/rack/utils.rb#279 + # source://rack/lib/rack/utils.rb#252 def parse_cookies(env); end # :call-seq: @@ -4737,27 +4485,27 @@ module Rack::Utils # parse_cookies_header('myname=myvalue; max-age=0') # # => {"myname"=>"myvalue", "max-age"=>"0"} # - # source://rack/lib/rack/utils.rb#245 + # source://rack/lib/rack/utils.rb#233 def parse_cookies_header(value); end - # source://rack/lib/rack/utils.rb#113 + # source://rack/lib/rack/utils.rb#105 def parse_nested_query(qs, d = T.unsafe(nil)); end - # source://rack/lib/rack/utils.rb#109 + # source://rack/lib/rack/utils.rb#101 def parse_query(qs, d = T.unsafe(nil), &unescaper); end - # source://rack/lib/rack/utils.rb#145 + # source://rack/lib/rack/utils.rb#137 def q_values(q_value_header); end - # source://rack/lib/rack/utils.rb#425 + # source://rack/lib/rack/utils.rb#401 def rfc2822(time); end # :nocov: # - # source://rack/lib/rack/utils.rb#476 + # source://rack/lib/rack/utils.rb#454 def secure_compare(a, b); end - # source://rack/lib/rack/utils.rb#203 + # source://rack/lib/rack/utils.rb#191 def select_best_encoding(available_encodings, accept_encoding); end # :call-seq: @@ -4783,7 +4531,7 @@ module Rack::Utils # set_cookie_header("myname", {value: "myvalue", max_age: 10}) # # => "myname=myvalue; max-age=10" # - # source://rack/lib/rack/utils.rb#306 + # source://rack/lib/rack/utils.rb#293 def set_cookie_header(key, value); end # :call-seq: @@ -4795,74 +4543,68 @@ module Rack::Utils # If the headers already contains a +set-cookie+ key, it will be converted # to an +Array+ if not already, and appended to. # - # source://rack/lib/rack/utils.rb#348 + # source://rack/lib/rack/utils.rb#336 def set_cookie_header!(headers, key, value); end - # source://rack/lib/rack/utils.rb#626 + # source://rack/lib/rack/utils.rb#588 def status_code(status); end # Unescapes a URI escaped string with +encoding+. +encoding+ will be the # target encoding of the string returned, and it defaults to UTF-8 # - # source://rack/lib/rack/utils.rb#56 + # source://rack/lib/rack/utils.rb#57 def unescape(s, encoding = T.unsafe(nil)); end # Unescapes the **path** component of a URI. See Rack::Utils.unescape for # unescaping query parameters or form components. # - # source://rack/lib/rack/utils.rb#50 + # source://rack/lib/rack/utils.rb#51 def unescape_path(s); end - # source://rack/lib/rack/utils.rb#653 + # source://rack/lib/rack/utils.rb#625 def valid_path?(path); end class << self - # source://rack/lib/rack/utils.rb#255 - def add_cookie_to_header(header, key, value); end - - # source://rack/lib/rack/utils.rb#390 - def add_remove_cookie_to_header(header, key, value = T.unsafe(nil)); end - # Return best accept value to use, based on the algorithm # in RFC 2616 Section 14. If there are multiple best # matches (same specificity and quality), the value returned # is arbitrary. # - # source://rack/lib/rack/utils.rb#174 + # source://rack/lib/rack/utils.rb#166 def best_q_match(q_value_header, available_mimes); end - # source://rack/lib/rack/utils.rb#127 + # source://rack/lib/rack/utils.rb#119 def build_nested_query(value, prefix = T.unsafe(nil)); end - # source://rack/lib/rack/utils.rb#117 + # source://rack/lib/rack/utils.rb#109 def build_query(params); end # Parses the "Range:" header, if present, into an array of Range objects. # Returns nil if the header is missing or syntactically invalid. # Returns an empty array if none of the ranges are satisfiable. # - # source://rack/lib/rack/utils.rb#432 + # source://rack/lib/rack/utils.rb#408 def byte_ranges(env, size); end - # source://rack/lib/rack/utils.rb#636 + # source://rack/lib/rack/utils.rb#608 def clean_path_info(path_info); end - # source://rack/lib/rack/utils.rb#98 + # source://rack/lib/rack/utils.rb#90 def clock_time; end # Returns the value of attribute default_query_parser. # - # source://rack/lib/rack/utils.rb#28 + # source://rack/lib/rack/utils.rb#29 def default_query_parser; end # Sets the attribute default_query_parser # # @param value the value to set the attribute default_query_parser to. # - # source://rack/lib/rack/utils.rb#28 + # source://rack/lib/rack/utils.rb#29 def default_query_parser=(_arg0); end - # source://rack/lib/rack/utils.rb#384 + # source://rack/lib/rack/utils.rb#366 def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end # :call-seq: @@ -4879,7 +4621,7 @@ module Rack::Utils # delete_set_cookie_header("myname") # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" # - # source://rack/lib/rack/utils.rb#374 + # source://rack/lib/rack/utils.rb#362 def delete_set_cookie_header(key, value = T.unsafe(nil)); end # :call-seq: @@ -4900,82 +4642,73 @@ module Rack::Utils # header # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] # - # source://rack/lib/rack/utils.rb#414 + # source://rack/lib/rack/utils.rb#390 def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end # URI escapes. (CGI style space to +) # - # source://rack/lib/rack/utils.rb#38 + # source://rack/lib/rack/utils.rb#39 def escape(s); end - # Escape ampersands, brackets and quotes to their HTML/XML entities. - # - # source://rack/lib/rack/utils.rb#199 - def escape_html(string); end + # source://rack/lib/rack/utils.rb#261 + def escape_cookie_key(key); end + + def escape_html(_arg0); end # Like URI escaping, but with %20 instead of +. Strictly speaking this is # true URI escaping. # - # source://rack/lib/rack/utils.rb#44 + # source://rack/lib/rack/utils.rb#45 def escape_path(s); end - # source://rack/lib/rack/utils.rb#156 + # source://rack/lib/rack/utils.rb#148 def forwarded_values(forwarded_header); end - # source://rack/lib/rack/utils.rb#436 + # source://rack/lib/rack/utils.rb#412 def get_byte_ranges(http_range, size); end - # source://rack/lib/rack/utils.rb#88 - def key_space_limit; end - - # source://rack/lib/rack/utils.rb#93 - def key_space_limit=(v); end - - # source://rack/lib/rack/utils.rb#378 - def make_delete_cookie_header(header, key, value); end - # Returns the value of attribute multipart_file_limit. # - # source://rack/lib/rack/utils.rb#63 + # source://rack/lib/rack/utils.rb#64 def multipart_file_limit; end # Sets the attribute multipart_file_limit # # @param value the value to set the attribute multipart_file_limit to. # - # source://rack/lib/rack/utils.rb#63 + # source://rack/lib/rack/utils.rb#64 def multipart_file_limit=(_arg0); end # Returns the value of attribute multipart_file_limit. # multipart_part_limit is the original name of multipart_file_limit, but # the limit only counts parts with filenames. # - # source://rack/lib/rack/utils.rb#63 + # source://rack/lib/rack/utils.rb#64 def multipart_part_limit; end # Sets the attribute multipart_file_limit # # @param value the value to set the attribute multipart_file_limit to. # - # source://rack/lib/rack/utils.rb#63 + # source://rack/lib/rack/utils.rb#64 def multipart_part_limit=(_arg0); end # Returns the value of attribute multipart_total_part_limit. # - # source://rack/lib/rack/utils.rb#61 + # source://rack/lib/rack/utils.rb#62 def multipart_total_part_limit; end # Sets the attribute multipart_total_part_limit # # @param value the value to set the attribute multipart_total_part_limit to. # - # source://rack/lib/rack/utils.rb#61 + # source://rack/lib/rack/utils.rb#62 def multipart_total_part_limit=(_arg0); end - # source://rack/lib/rack/utils.rb#80 + # source://rack/lib/rack/utils.rb#81 def param_depth_limit; end - # source://rack/lib/rack/utils.rb#84 + # source://rack/lib/rack/utils.rb#85 def param_depth_limit=(v); end # :call-seq: @@ -4987,7 +4720,7 @@ module Rack::Utils # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) # # => {'myname' => 'myvalue'} # - # source://rack/lib/rack/utils.rb#279 + # source://rack/lib/rack/utils.rb#252 def parse_cookies(env); end # :call-seq: @@ -5000,25 +4733,25 @@ module Rack::Utils # parse_cookies_header('myname=myvalue; max-age=0') # # => {"myname"=>"myvalue", "max-age"=>"0"} # - # source://rack/lib/rack/utils.rb#245 + # source://rack/lib/rack/utils.rb#233 def parse_cookies_header(value); end - # source://rack/lib/rack/utils.rb#113 + # source://rack/lib/rack/utils.rb#105 def parse_nested_query(qs, d = T.unsafe(nil)); end - # source://rack/lib/rack/utils.rb#109 + # source://rack/lib/rack/utils.rb#101 def parse_query(qs, d = T.unsafe(nil), &unescaper); end - # source://rack/lib/rack/utils.rb#145 + # source://rack/lib/rack/utils.rb#137 def q_values(q_value_header); end - # source://rack/lib/rack/utils.rb#425 + # source://rack/lib/rack/utils.rb#401 def rfc2822(time); end - # source://rack/lib/rack/utils.rb#476 + # source://rack/lib/rack/utils.rb#454 def secure_compare(a, b); end - # source://rack/lib/rack/utils.rb#203 + # source://rack/lib/rack/utils.rb#191 def select_best_encoding(available_encodings, accept_encoding); end # :call-seq: @@ -5044,7 +4777,7 @@ module Rack::Utils # set_cookie_header("myname", {value: "myvalue", max_age: 10}) # # => "myname=myvalue; max-age=10" # - # source://rack/lib/rack/utils.rb#306 + # source://rack/lib/rack/utils.rb#293 def set_cookie_header(key, value); end # :call-seq: @@ -5056,32 +4789,32 @@ module Rack::Utils # If the headers already contains a +set-cookie+ key, it will be converted # to an +Array+ if not already, and appended to. # - # source://rack/lib/rack/utils.rb#348 + # source://rack/lib/rack/utils.rb#336 def set_cookie_header!(headers, key, value); end - # source://rack/lib/rack/utils.rb#626 + # source://rack/lib/rack/utils.rb#588 def status_code(status); end # Unescapes a URI escaped string with +encoding+. +encoding+ will be the # target encoding of the string returned, and it defaults to UTF-8 # - # source://rack/lib/rack/utils.rb#56 + # source://rack/lib/rack/utils.rb#57 def unescape(s, encoding = T.unsafe(nil)); end # Unescapes the **path** component of a URI. See Rack::Utils.unescape for # unescaping query parameters or form components. # - # source://rack/lib/rack/utils.rb#50 + # source://rack/lib/rack/utils.rb#51 def unescape_path(s); end # @return [Boolean] # - # source://rack/lib/rack/utils.rb#653 + # source://rack/lib/rack/utils.rb#625 def valid_path?(path); end end end -# source://rack/lib/rack/utils.rb#24 +# source://rack/lib/rack/utils.rb#25 Rack::Utils::COMMON_SEP = T.let(T.unsafe(nil), Hash) # Context allows the use of a compatible middleware at different points @@ -5090,107 +4823,80 @@ Rack::Utils::COMMON_SEP = T.let(T.unsafe(nil), Hash) # would be the request environment. The second of which would be the rack # application that the request would be forwarded to. # -# source://rack/lib/rack/utils.rb#499 +# source://rack/lib/rack/utils.rb#477 class Rack::Utils::Context # @return [Context] a new instance of Context # - # source://rack/lib/rack/utils.rb#502 + # source://rack/lib/rack/utils.rb#480 def initialize(app_f, app_r); end # Returns the value of attribute app. # - # source://rack/lib/rack/utils.rb#500 + # source://rack/lib/rack/utils.rb#478 def app; end - # source://rack/lib/rack/utils.rb#507 + # source://rack/lib/rack/utils.rb#485 def call(env); end - # source://rack/lib/rack/utils.rb#515 + # source://rack/lib/rack/utils.rb#493 def context(env, app = T.unsafe(nil)); end # Returns the value of attribute for. # - # source://rack/lib/rack/utils.rb#500 + # source://rack/lib/rack/utils.rb#478 def for; end - # source://rack/lib/rack/utils.rb#511 + # source://rack/lib/rack/utils.rb#489 def recontext(app); end end -# source://rack/lib/rack/utils.rb#23 +# source://rack/lib/rack/utils.rb#24 Rack::Utils::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) -# source://rack/lib/rack/utils.rb#187 -Rack::Utils::ESCAPE_HTML = T.let(T.unsafe(nil), Hash) - -# source://rack/lib/rack/utils.rb#196 -Rack::Utils::ESCAPE_HTML_PATTERN = T.let(T.unsafe(nil), Regexp) - # Every standard HTTP code mapped to the appropriate message. # Generated with: -# curl -s https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | \ -# ruby -ne 'm = /^(\d{3}),(?!Unassigned|\(Unused\))([^,]+)/.match($_) and \ -# puts "#{m[1]} => \x27#{m[2].strip}\x27,"' +# curl -s https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv \ +# | ruby -rcsv -e "puts CSV.parse(STDIN, headers: true) \ +# .reject {|v| v['Description'] == 'Unassigned' or v['Description'].include? '(' } \ +# .map {|v| %Q/#{v['Value']} => '#{v['Description']}'/ }.join(','+?\n)" # -# source://rack/lib/rack/utils.rb#553 +# source://rack/lib/rack/utils.rb#504 Rack::Utils::HTTP_STATUS_CODES = T.let(T.unsafe(nil), Hash) -# A wrapper around Headers -# header when set. -# -# @api private -# -# source://rack/lib/rack/utils.rb#524 -class Rack::Utils::HeaderHash < ::Hash - class << self - # @api private - # - # source://rack/lib/rack/utils.rb#525 - def [](headers); end - - # @api private - # @raise [TypeError] - # - # source://rack/lib/rack/utils.rb#543 - def allocate; end - - # @api private - # - # source://rack/lib/rack/utils.rb#536 - def new(hash = T.unsafe(nil)); end - end -end - -# source://rack/lib/rack/utils.rb#21 +# source://rack/lib/rack/utils.rb#22 Rack::Utils::InvalidParameterError = Rack::QueryParser::InvalidParameterError -# source://rack/lib/rack/utils.rb#25 +# source://rack/lib/rack/utils.rb#26 Rack::Utils::KeySpaceConstrainedParams = Rack::QueryParser::Params -# source://rack/lib/rack/utils.rb#651 +# source://rack/lib/rack/utils.rb#623 Rack::Utils::NULL_BYTE = T.let(T.unsafe(nil), String) -# source://rack/lib/rack/utils.rb#634 +# source://rack/lib/rack/utils.rb#574 +Rack::Utils::OBSOLETE_SYMBOLS_TO_STATUS_CODES = T.let(T.unsafe(nil), Hash) + +# source://rack/lib/rack/utils.rb#582 +Rack::Utils::OBSOLETE_SYMBOL_MAPPINGS = T.let(T.unsafe(nil), Hash) + +# source://rack/lib/rack/utils.rb#606 Rack::Utils::PATH_SEPS = T.let(T.unsafe(nil), Regexp) -# source://rack/lib/rack/utils.rb#20 +# source://rack/lib/rack/utils.rb#21 Rack::Utils::ParameterTypeError = Rack::QueryParser::ParameterTypeError -# source://rack/lib/rack/utils.rb#22 +# source://rack/lib/rack/utils.rb#23 Rack::Utils::ParamsTooDeepError = Rack::QueryParser::ParamsTooDeepError # Responses with HTTP status codes that should not have an entity body # -# source://rack/lib/rack/utils.rb#620 +# source://rack/lib/rack/utils.rb#568 Rack::Utils::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) -# source://rack/lib/rack/utils.rb#622 +# source://rack/lib/rack/utils.rb#570 Rack::Utils::SYMBOL_TO_STATUS_CODE = T.let(T.unsafe(nil), Hash) -# The Rack protocol version number implemented. +# A valid cookie key according to RFC2616. +# A can be any US-ASCII characters, except control characters, spaces, or tabs. It also must not contain a separator character like the following: ( ) < > @ , ; : \ " / [ ] ? = { }. # -# source://rack/lib/rack/version.rb#16 -Rack::VERSION = T.let(T.unsafe(nil), Array) - -# source://rack/lib/rack/version.rb#19 -Rack::VERSION_STRING = T.let(T.unsafe(nil), String) +# source://rack/lib/rack/utils.rb#258 +Rack::Utils::VALID_COOKIE_KEY = T.let(T.unsafe(nil), Regexp) diff --git a/sorbet/rbi/gems/rackup@2.1.0.rbi b/sorbet/rbi/gems/rackup@2.1.0.rbi index 4eedf33e..b57b75f5 100644 --- a/sorbet/rbi/gems/rackup@2.1.0.rbi +++ b/sorbet/rbi/gems/rackup@2.1.0.rbi @@ -5,23 +5,6 @@ # Please instead update this file by running `bin/tapioca gem rackup`. -# source://rackup/lib/rack/handler.rb#8 -module Rack - class << self - # source://rack/3.0.11lib/rack/version.rb#31 - def release; end - - # source://rack/3.0.11lib/rack/version.rb#23 - def version; end - end -end - -# source://rackup/lib/rack/handler.rb#9 -Rack::Handler = Rackup::Handler - -# source://rackup/lib/rack/server.rb#9 -Rack::Server = Rackup::Server - # source://rackup/lib/rackup/handler.rb#6 module Rackup; end diff --git a/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi b/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi index cae73f5c..a47c42ca 100644 --- a/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +++ b/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi @@ -8,70 +8,70 @@ # source://rails-dom-testing/lib/rails/dom/testing/assertions/dom_assertions.rb#3 module Rails class << self - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def app_class; end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def app_class=(_arg0); end - # source://railties/7.1.3.3lib/rails.rb#43 + # source://railties/8.0.0.beta1lib/rails.rb#45 def application; end - # source://railties/7.1.3.3lib/rails.rb#41 + # source://railties/8.0.0.beta1lib/rails.rb#43 def application=(_arg0); end - # source://railties/7.1.3.3lib/rails.rb#123 + # source://railties/8.0.0.beta1lib/rails.rb#126 def autoloaders; end - # source://railties/7.1.3.3lib/rails.rb#54 + # source://railties/8.0.0.beta1lib/rails.rb#56 def backtrace_cleaner; end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def cache; end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def cache=(_arg0); end - # source://railties/7.1.3.3lib/rails.rb#50 + # source://railties/8.0.0.beta1lib/rails.rb#52 def configuration; end - # source://railties/7.1.3.3lib/rails/deprecator.rb#4 + # source://railties/8.0.0.beta1lib/rails/deprecator.rb#4 def deprecator; end - # source://railties/7.1.3.3lib/rails.rb#72 + # source://railties/8.0.0.beta1lib/rails.rb#75 def env; end - # source://railties/7.1.3.3lib/rails.rb#79 + # source://railties/8.0.0.beta1lib/rails.rb#82 def env=(environment); end - # source://railties/7.1.3.3lib/rails.rb#90 + # source://railties/8.0.0.beta1lib/rails.rb#93 def error; end - # source://railties/7.1.3.3lib/rails/gem_version.rb#5 + # source://railties/8.0.0.beta1lib/rails/gem_version.rb#5 def gem_version; end - # source://railties/7.1.3.3lib/rails.rb#103 + # source://railties/8.0.0.beta1lib/rails.rb#106 def groups(*groups); end - # source://railties/7.1.3.3lib/rails.rb#47 + # source://railties/8.0.0.beta1lib/rails.rb#49 def initialize!(*_arg0, **_arg1, &_arg2); end - # source://railties/7.1.3.3lib/rails.rb#47 + # source://railties/8.0.0.beta1lib/rails.rb#49 def initialized?(*_arg0, **_arg1, &_arg2); end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def logger; end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def logger=(_arg0); end - # source://railties/7.1.3.3lib/rails.rb#119 + # source://railties/8.0.0.beta1lib/rails.rb#122 def public_path; end - # source://railties/7.1.3.3lib/rails.rb#63 + # source://railties/8.0.0.beta1lib/rails.rb#65 def root; end - # source://railties/7.1.3.3lib/rails/version.rb#7 + # source://railties/8.0.0.beta1lib/rails/version.rb#7 def version; end end end diff --git a/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi b/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi index c7bd4d39..01bc5db8 100644 --- a/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +++ b/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi @@ -8,16 +8,16 @@ # source://rails-html-sanitizer/lib/rails-html-sanitizer.rb#14 module ActionView class << self - # source://actionview/7.1.3.3lib/action_view/deprecator.rb#4 + # source://actionview/8.0.0.beta1lib/action_view/deprecator.rb#4 def deprecator; end - # source://actionview/7.1.3.3lib/action_view.rb#93 + # source://actionview/8.0.0.beta1lib/action_view.rb#93 def eager_load!; end - # source://actionview/7.1.3.3lib/action_view/gem_version.rb#5 + # source://actionview/8.0.0.beta1lib/action_view/gem_version.rb#5 def gem_version; end - # source://actionview/7.1.3.3lib/action_view/version.rb#7 + # source://actionview/8.0.0.beta1lib/action_view/version.rb#7 def version; end end end @@ -37,7 +37,7 @@ module ActionView::Helpers mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods class << self - # source://actionview/7.1.3.3lib/action_view/helpers.rb#35 + # source://actionview/8.0.0.beta1lib/action_view/helpers.rb#35 def eager_load!; end end end @@ -46,54 +46,54 @@ end module ActionView::Helpers::SanitizeHelper mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#111 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#111 def sanitize(html, options = T.unsafe(nil)); end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#116 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#116 def sanitize_css(style); end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#12 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#12 def sanitizer_vendor; end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#12 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#12 def sanitizer_vendor=(val); end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#150 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#150 def strip_links(html); end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#133 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#133 def strip_tags(html); end class << self - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#12 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#12 def sanitizer_vendor; end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#12 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#12 def sanitizer_vendor=(val); end end end # source://rails-html-sanitizer/lib/rails-html-sanitizer.rb#17 module ActionView::Helpers::SanitizeHelper::ClassMethods - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#175 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#175 def full_sanitizer; end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#155 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#155 def full_sanitizer=(_arg0); end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#185 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#185 def link_sanitizer; end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#155 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#155 def link_sanitizer=(_arg0); end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#195 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#195 def safe_list_sanitizer; end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#155 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#155 def safe_list_sanitizer=(_arg0); end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#165 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#165 def sanitized_allowed_attributes; end # Replaces the allowed HTML attributes for the +sanitize+ helper. @@ -123,7 +123,7 @@ module ActionView::Helpers::SanitizeHelper::ClassMethods # source://rails-html-sanitizer/lib/rails-html-sanitizer.rb#48 def sanitized_allowed_protocols=(_); end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#161 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#161 def sanitized_allowed_tags; end # Replaces the allowed tags for the +sanitize+ helper. @@ -159,7 +159,7 @@ module ActionView::Helpers::SanitizeHelper::ClassMethods # source://rails-html-sanitizer/lib/rails-html-sanitizer.rb#48 def sanitized_uri_attributes=(_); end - # source://actionview/7.1.3.3lib/action_view/helpers/sanitize_helper.rb#157 + # source://actionview/8.0.0.beta1lib/action_view/helpers/sanitize_helper.rb#157 def sanitizer_vendor; end private @@ -171,70 +171,70 @@ end # source://rails-html-sanitizer/lib/rails/html/sanitizer/version.rb#3 module Rails class << self - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def app_class; end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def app_class=(_arg0); end - # source://railties/7.1.3.3lib/rails.rb#43 + # source://railties/8.0.0.beta1lib/rails.rb#45 def application; end - # source://railties/7.1.3.3lib/rails.rb#41 + # source://railties/8.0.0.beta1lib/rails.rb#43 def application=(_arg0); end - # source://railties/7.1.3.3lib/rails.rb#123 + # source://railties/8.0.0.beta1lib/rails.rb#126 def autoloaders; end - # source://railties/7.1.3.3lib/rails.rb#54 + # source://railties/8.0.0.beta1lib/rails.rb#56 def backtrace_cleaner; end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def cache; end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def cache=(_arg0); end - # source://railties/7.1.3.3lib/rails.rb#50 + # source://railties/8.0.0.beta1lib/rails.rb#52 def configuration; end - # source://railties/7.1.3.3lib/rails/deprecator.rb#4 + # source://railties/8.0.0.beta1lib/rails/deprecator.rb#4 def deprecator; end - # source://railties/7.1.3.3lib/rails.rb#72 + # source://railties/8.0.0.beta1lib/rails.rb#75 def env; end - # source://railties/7.1.3.3lib/rails.rb#79 + # source://railties/8.0.0.beta1lib/rails.rb#82 def env=(environment); end - # source://railties/7.1.3.3lib/rails.rb#90 + # source://railties/8.0.0.beta1lib/rails.rb#93 def error; end - # source://railties/7.1.3.3lib/rails/gem_version.rb#5 + # source://railties/8.0.0.beta1lib/rails/gem_version.rb#5 def gem_version; end - # source://railties/7.1.3.3lib/rails.rb#103 + # source://railties/8.0.0.beta1lib/rails.rb#106 def groups(*groups); end - # source://railties/7.1.3.3lib/rails.rb#47 + # source://railties/8.0.0.beta1lib/rails.rb#49 def initialize!(*_arg0, **_arg1, &_arg2); end - # source://railties/7.1.3.3lib/rails.rb#47 + # source://railties/8.0.0.beta1lib/rails.rb#49 def initialized?(*_arg0, **_arg1, &_arg2); end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def logger; end - # source://railties/7.1.3.3lib/rails.rb#42 + # source://railties/8.0.0.beta1lib/rails.rb#44 def logger=(_arg0); end - # source://railties/7.1.3.3lib/rails.rb#119 + # source://railties/8.0.0.beta1lib/rails.rb#122 def public_path; end - # source://railties/7.1.3.3lib/rails.rb#63 + # source://railties/8.0.0.beta1lib/rails.rb#65 def root; end - # source://railties/7.1.3.3lib/rails/version.rb#7 + # source://railties/8.0.0.beta1lib/rails/version.rb#7 def version; end end end diff --git a/sorbet/rbi/gems/rails@7.1.3.3.rbi b/sorbet/rbi/gems/rails@8.0.0.beta1.rbi similarity index 100% rename from sorbet/rbi/gems/rails@7.1.3.3.rbi rename to sorbet/rbi/gems/rails@8.0.0.beta1.rbi diff --git a/sorbet/rbi/gems/railties@7.1.3.3.rbi b/sorbet/rbi/gems/railties@8.0.0.beta1.rbi similarity index 81% rename from sorbet/rbi/gems/railties@7.1.3.3.rbi rename to sorbet/rbi/gems/railties@8.0.0.beta1.rbi index da142176..6d6ec06b 100644 --- a/sorbet/rbi/gems/railties@7.1.3.3.rbi +++ b/sorbet/rbi/gems/railties@8.0.0.beta1.rbi @@ -5,7 +5,7 @@ # Please instead update this file by running `bin/tapioca gem railties`. -# :include: railties/README.rdoc +# :include: ../README.rdoc # # source://railties/lib/rails/gem_version.rb#3 module Rails @@ -15,47 +15,47 @@ module Rails class << self # Returns the value of attribute app_class. # - # source://railties/lib/rails.rb#42 + # source://railties/lib/rails.rb#44 def app_class; end # Sets the attribute app_class # # @param value the value to set the attribute app_class to. # - # source://railties/lib/rails.rb#42 + # source://railties/lib/rails.rb#44 def app_class=(_arg0); end - # source://railties/lib/rails.rb#43 + # source://railties/lib/rails.rb#45 def application; end # Sets the attribute application # # @param value the value to set the attribute application to. # - # source://railties/lib/rails.rb#41 + # source://railties/lib/rails.rb#43 def application=(_arg0); end - # source://railties/lib/rails.rb#123 + # source://railties/lib/rails.rb#126 def autoloaders; end - # source://railties/lib/rails.rb#54 + # source://railties/lib/rails.rb#56 def backtrace_cleaner; end # Returns the value of attribute cache. # - # source://railties/lib/rails.rb#42 + # source://railties/lib/rails.rb#44 def cache; end # Sets the attribute cache # # @param value the value to set the attribute cache to. # - # source://railties/lib/rails.rb#42 + # source://railties/lib/rails.rb#44 def cache=(_arg0); end # The Configuration instance used to configure the \Rails environment # - # source://railties/lib/rails.rb#50 + # source://railties/lib/rails.rb#52 def configuration; end # source://railties/lib/rails/deprecator.rb#4 @@ -66,15 +66,16 @@ module Rails # Rails.env # => "development" # Rails.env.development? # => true # Rails.env.production? # => false + # Rails.env.local? # => true true for "development" and "test", false for anything else # - # source://railties/lib/rails.rb#72 + # source://railties/lib/rails.rb#75 def env; end # Sets the \Rails environment. # # Rails.env = "staging" # => "staging" # - # source://railties/lib/rails.rb#79 + # source://railties/lib/rails.rb#82 def env=(environment); end # Returns the ActiveSupport::ErrorReporter of the current \Rails project, @@ -85,7 +86,7 @@ module Rails # end # Rails.error.report(error) # - # source://railties/lib/rails.rb#90 + # source://railties/lib/rails.rb#93 def error; end # Returns the currently loaded version of \Rails as a +Gem::Version+. @@ -103,25 +104,25 @@ module Rails # # => [:default, "development", :assets] for Rails.env == "development" # # => [:default, "production"] for Rails.env == "production" # - # source://railties/lib/rails.rb#103 + # source://railties/lib/rails.rb#106 def groups(*groups); end - # source://railties/lib/rails.rb#47 + # source://railties/lib/rails.rb#49 def initialize!(*_arg0, **_arg1, &_arg2); end - # source://railties/lib/rails.rb#47 + # source://railties/lib/rails.rb#49 def initialized?(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute logger. # - # source://railties/lib/rails.rb#42 + # source://railties/lib/rails.rb#44 def logger; end # Sets the attribute logger # # @param value the value to set the attribute logger to. # - # source://railties/lib/rails.rb#42 + # source://railties/lib/rails.rb#44 def logger=(_arg0); end # Returns a Pathname object of the public folder of the current @@ -130,7 +131,7 @@ module Rails # Rails.public_path # # => # # - # source://railties/lib/rails.rb#119 + # source://railties/lib/rails.rb#122 def public_path; end # Returns a Pathname object of the current \Rails project, @@ -139,7 +140,7 @@ module Rails # Rails.root # # => # # - # source://railties/lib/rails.rb#63 + # source://railties/lib/rails.rb#65 def root; end # Returns the currently loaded version of \Rails as a string. @@ -222,14 +223,14 @@ class Rails::Application < ::Rails::Engine # source://railties/lib/rails/engine.rb#517 def build_middleware_stack; end - # source://railties/lib/rails/application.rb#437 + # source://railties/lib/rails/application.rb#451 def config; end # Sets the attribute config # # @param value the value to set the attribute config to. # - # source://railties/lib/rails/application.rb#441 + # source://railties/lib/rails/application.rb#455 def config=(_arg0); end # Convenience for loading config/foo.yml for the current \Rails env. @@ -271,13 +272,13 @@ class Rails::Application < ::Rails::Engine # Rails.application.config_for(:example)[:foo][:bar] # # => { baz: 1, qux: 2 } # - # source://railties/lib/rails/application.rb#274 + # source://railties/lib/rails/application.rb#288 def config_for(name, env: T.unsafe(nil)); end # Sends any console called in the instance of a new application up # to the +console+ method defined in Rails::Railtie. # - # source://railties/lib/rails/application.rb#357 + # source://railties/lib/rails/application.rb#371 def console(&blk); end # Returns an ActiveSupport::EncryptedConfiguration instance for the @@ -295,14 +296,14 @@ class Rails::Application < ::Rails::Engine # config/credentials/#{environment}.key for the current # environment, or +config/master.key+ if that file does not exist. # - # source://railties/lib/rails/application.rb#516 + # source://railties/lib/rails/application.rb#492 def credentials; end # Sets the attribute credentials # # @param value the value to set the attribute credentials to. # - # source://railties/lib/rails/application.rb#460 + # source://railties/lib/rails/application.rb#456 def credentials=(_arg0); end # source://railties/lib/rails/application.rb#104 @@ -316,12 +317,12 @@ class Rails::Application < ::Rails::Engine # collection. Additionally, the collection's +silence+ method silences all # deprecators in the collection for the duration of a given block. # - # source://railties/lib/rails/application.rb#230 + # source://railties/lib/rails/application.rb#244 def deprecators; end # Eager loads the application code. # - # source://railties/lib/rails/application.rb#574 + # source://railties/lib/rails/application.rb#550 def eager_load!; end # Returns an ActiveSupport::EncryptedConfiguration instance for an encrypted @@ -340,13 +341,13 @@ class Rails::Application < ::Rails::Engine # command. (See the output of bin/rails encrypted:edit --help for # more information.) # - # source://railties/lib/rails/application.rb#535 + # source://railties/lib/rails/application.rb#511 def encrypted(path, key_path: T.unsafe(nil), env_key: T.unsafe(nil)); end # Stores some of the \Rails initial environment parameters which # will be used by middlewares and engines to configure themselves. # - # source://railties/lib/rails/application.rb#303 + # source://railties/lib/rails/application.rb#317 def env_config; end # Returns the value of attribute executor. @@ -357,16 +358,16 @@ class Rails::Application < ::Rails::Engine # Sends any generators called in the instance of a new application up # to the +generators+ method defined in Rails::Railtie. # - # source://railties/lib/rails/application.rb#363 + # source://railties/lib/rails/application.rb#377 def generators(&blk); end - # source://railties/lib/rails/application.rb#548 + # source://railties/lib/rails/application.rb#524 def helpers_paths; end # Initialize the application passing the given group. By default, the # group is :default # - # source://railties/lib/rails/application.rb#424 + # source://railties/lib/rails/application.rb#438 def initialize!(group = T.unsafe(nil)); end # Returns true if the application is initialized. @@ -380,15 +381,15 @@ class Rails::Application < ::Rails::Engine # Rails::Initializable module. Each Rails::Application class has its own # set of initializers, as defined by the Initializable module. # - # source://railties/lib/rails/application.rb#345 + # source://railties/lib/rails/application.rb#359 def initializer(name, opts = T.unsafe(nil), &block); end - # source://railties/lib/rails/application.rb#431 + # source://railties/lib/rails/application.rb#445 def initializers; end # Sends the +isolate_namespace+ method up to the class method. # - # source://railties/lib/rails/application.rb#374 + # source://railties/lib/rails/application.rb#388 def isolate_namespace(mod); end # Returns a key generator (ActiveSupport::CachingKeyGenerator) for a @@ -396,10 +397,10 @@ class Rails::Application < ::Rails::Engine # calls with the same +secret_key_base+ will return the same key generator # instance. # - # source://railties/lib/rails/application.rb#161 + # source://railties/lib/rails/application.rb#172 def key_generator(secret_key_base = T.unsafe(nil)); end - # source://railties/lib/rails/application.rb#568 + # source://railties/lib/rails/application.rb#544 def load_generators(app = T.unsafe(nil)); end # Returns a message verifier object. @@ -409,19 +410,22 @@ class Rails::Application < ::Rails::Engine # It is recommended not to use the same verifier for different things, so you can get different # verifiers passing the +verifier_name+ argument. # + # For instance, +ActiveStorage::Blob.signed_id_verifier+ is implemented using this feature, which assures that + # the IDs strings haven't been tampered with and are safe to use in a finder. + # + # See the ActiveSupport::MessageVerifier documentation for more information. + # # ==== Parameters # # * +verifier_name+ - the name of the message verifier. # # ==== Examples # - # message = Rails.application.message_verifier('sensitive_data').generate('my sensible data') - # Rails.application.message_verifier('sensitive_data').verify(message) - # # => 'my sensible data' + # message = Rails.application.message_verifier('my_purpose').generate('data to sign against tampering') + # Rails.application.message_verifier('my_purpose').verify(message) + # # => 'data to sign against tampering' # - # See the ActiveSupport::MessageVerifier documentation for more information. - # - # source://railties/lib/rails/application.rb#222 + # source://railties/lib/rails/application.rb#236 def message_verifier(verifier_name); end # Returns a message verifier factory (ActiveSupport::MessageVerifiers). This @@ -452,7 +456,7 @@ class Rails::Application < ::Rails::Engine # app.message_verifiers.rotate(secret_key_base: "old secret_key_base") # end # - # source://railties/lib/rails/application.rb#197 + # source://railties/lib/rails/application.rb#208 def message_verifiers; end # Return an array of railties respecting the order they're loaded @@ -462,20 +466,30 @@ class Rails::Application < ::Rails::Engine # copying migrations from railties ; we need them in the order given by # +railties_order+. # - # source://railties/lib/rails/application.rb#564 + # source://railties/lib/rails/application.rb#540 def migration_railties; end + # Returns the dasherized application name. + # + # MyApp::Application.new.name => "my-app" + # + # source://railties/lib/rails/application.rb#141 + def name; end + # If you try to define a set of Rake tasks on the instance, these will get # passed up to the Rake tasks defined on the application's class. # - # source://railties/lib/rails/application.rb#338 + # source://railties/lib/rails/application.rb#352 def rake_tasks(&block); end # Reload application routes regardless if they changed or not. # - # source://railties/lib/rails/application.rb#153 + # source://railties/lib/rails/application.rb#160 def reload_routes!; end + # source://railties/lib/rails/application.rb#164 + def reload_routes_unless_loaded; end + # Returns the value of attribute reloader. # # source://railties/lib/rails/application.rb#102 @@ -486,19 +500,19 @@ class Rails::Application < ::Rails::Engine # source://railties/lib/rails/application.rb#102 def reloaders; end - # source://railties/lib/rails/application.rb#400 + # source://railties/lib/rails/application.rb#414 def require_environment!; end - # source://railties/lib/rails/application.rb#405 + # source://railties/lib/rails/application.rb#419 def routes_reloader; end - # source://railties/lib/rails/application.rb#138 + # source://railties/lib/rails/application.rb#145 def run_load_hooks!; end # Sends any runner called in the instance of a new application up # to the +runner+ method defined in Rails::Railtie. # - # source://railties/lib/rails/application.rb#351 + # source://railties/lib/rails/application.rb#365 def runner(&blk); end # Returns the value of attribute sandbox. @@ -532,92 +546,73 @@ class Rails::Application < ::Rails::Engine # Dockerfile example: RUN SECRET_KEY_BASE_DUMMY=1 bundle exec rails assets:precompile. # # In all other environments, we look for it first in ENV["SECRET_KEY_BASE"], - # then +credentials.secret_key_base+, and finally +secrets.secret_key_base+. For most applications, - # the correct place to store it is in the encrypted credentials file. + # then +credentials.secret_key_base+. For most applications, the correct place to store it is in the + # encrypted credentials file. # - # source://railties/lib/rails/application.rb#478 + # source://railties/lib/rails/application.rb#474 def secret_key_base; end - # source://railties/lib/rails/application.rb#443 - def secrets; end - - # Sets the attribute secrets - # - # @param value the value to set the attribute secrets to. - # - # source://railties/lib/rails/application.rb#460 - def secrets=(_arg0); end - # Sends any server called in the instance of a new application up # to the +server+ method defined in Rails::Railtie. # - # source://railties/lib/rails/application.rb#369 + # source://railties/lib/rails/application.rb#383 def server(&blk); end - # source://railties/lib/rails/application.rb#544 + # source://railties/lib/rails/application.rb#520 def to_app; end # Returns an array of file paths appended with a hash of # directories-extensions suitable for ActiveSupport::FileUpdateChecker # API. # - # source://railties/lib/rails/application.rb#412 + # source://railties/lib/rails/application.rb#426 def watchable_args; end protected - # source://railties/lib/rails/application.rb#647 + # source://railties/lib/rails/application.rb#623 def default_middleware_stack; end - # source://railties/lib/rails/application.rb#662 + # source://railties/lib/rails/application.rb#628 def ensure_generator_templates_added; end # Returns the ordered railties for this application considering railties_order. # - # source://railties/lib/rails/application.rb#613 + # source://railties/lib/rails/application.rb#589 def ordered_railties; end - # source://railties/lib/rails/application.rb#635 + # source://railties/lib/rails/application.rb#611 def railties_initializers(current); end - # source://railties/lib/rails/application.rb#602 + # source://railties/lib/rails/application.rb#578 def run_console_blocks(app); end - # source://railties/lib/rails/application.rb#592 + # source://railties/lib/rails/application.rb#568 def run_generators_blocks(app); end - # source://railties/lib/rails/application.rb#597 + # source://railties/lib/rails/application.rb#573 def run_runner_blocks(app); end - # source://railties/lib/rails/application.rb#607 + # source://railties/lib/rails/application.rb#583 def run_server_blocks(app); end - # source://railties/lib/rails/application.rb#581 + # source://railties/lib/rails/application.rb#557 def run_tasks_blocks(app); end - # source://railties/lib/rails/application.rb#652 - def validate_secret_key_base(secret_key_base); end - private - # source://railties/lib/rails/application.rb#700 + # source://railties/lib/rails/application.rb#641 def build_middleware; end - # source://railties/lib/rails/application.rb#693 + # source://railties/lib/rails/application.rb#634 def build_request(env); end - # source://railties/lib/rails/application.rb#704 + # source://railties/lib/rails/application.rb#645 def coerce_same_site_protection(protection); end - # source://railties/lib/rails/application.rb#708 + # source://railties/lib/rails/application.rb#649 def filter_parameters; end - # source://railties/lib/rails/application.rb#668 - def generate_local_secret; end - - # source://railties/lib/rails/application.rb#687 - def secrets_secret_key_base; end - class << self # This method is called just after an application inherits from Rails::Application, # allowing the developer to load classes in lib and use them during application @@ -633,7 +628,7 @@ class Rails::Application < ::Rails::Engine # Rails application, you will need to add lib to $LOAD_PATH on your own in case # you need to load files in lib/ during the application configuration as well. # - # source://railties/lib/rails/application.rb#393 + # source://railties/lib/rails/application.rb#407 def add_lib_to_load_path!(root); end # source://railties/lib/rails/application.rb#84 @@ -654,7 +649,7 @@ class Rails::Application < ::Rails::Engine end end -# source://railties/lib/rails/application/bootstrap.rb#12 +# source://railties/lib/rails/application/bootstrap.rb#11 module Rails::Application::Bootstrap include ::Rails::Initializable extend ::Rails::Initializable::ClassMethods @@ -691,7 +686,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # source://railties/lib/rails/application/configuration.rb#14 def allow_concurrency=(_arg0); end - # source://railties/lib/rails/application/configuration.rb#541 + # source://railties/lib/rails/application/configuration.rb#571 def annotations; end # Returns the value of attribute api_only. @@ -699,7 +694,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # source://railties/lib/rails/application/configuration.rb#28 def api_only; end - # source://railties/lib/rails/application/configuration.rb#375 + # source://railties/lib/rails/application/configuration.rb#386 def api_only=(value); end # Returns the value of attribute asset_host. @@ -738,10 +733,10 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # source://railties/lib/rails/application/configuration.rb#14 def autoflush_log=(_arg0); end - # source://railties/lib/rails/application/configuration.rb#473 + # source://railties/lib/rails/application/configuration.rb#481 def autoload_lib(ignore:); end - # source://railties/lib/rails/application/configuration.rb#485 + # source://railties/lib/rails/application/configuration.rb#493 def autoload_lib_once(ignore:); end # Returns the value of attribute beginning_of_week. @@ -756,7 +751,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # source://railties/lib/rails/application/configuration.rb#14 def beginning_of_week=(_arg0); end - # source://railties/lib/rails/application/configuration.rb#387 + # source://railties/lib/rails/application/configuration.rb#398 def broadcast_log_level; end # Returns the value of attribute cache_classes. @@ -783,10 +778,10 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # source://railties/lib/rails/application/configuration.rb#14 def cache_store=(_arg0); end - # source://railties/lib/rails/application/configuration.rb#497 + # source://railties/lib/rails/application/configuration.rb#505 def colorize_logging; end - # source://railties/lib/rails/application/configuration.rb#501 + # source://railties/lib/rails/application/configuration.rb#509 def colorize_logging=(val); end # Returns the value of attribute consider_all_requests_local. @@ -815,7 +810,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # Configures the ActionDispatch::ContentSecurityPolicy. # - # source://railties/lib/rails/application/configuration.rb#546 + # source://railties/lib/rails/application/configuration.rb#576 def content_security_policy(&block); end # Returns the value of attribute content_security_policy_nonce_directives. @@ -869,20 +864,20 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # Loads and returns the entire raw configuration of database from # values stored in config/database.yml. # - # source://railties/lib/rails/application/configuration.rb#436 + # source://railties/lib/rails/application/configuration.rb#444 def database_configuration; end - # source://railties/lib/rails/application/configuration.rb#391 + # source://railties/lib/rails/application/configuration.rb#400 def debug_exception_response_format; end # Sets the attribute debug_exception_response_format # # @param value the value to set the attribute debug_exception_response_format to. # - # source://railties/lib/rails/application/configuration.rb#395 + # source://railties/lib/rails/application/configuration.rb#404 def debug_exception_response_format=(_arg0); end - # source://railties/lib/rails/application/configuration.rb#563 + # source://railties/lib/rails/application/configuration.rb#593 def default_log_file; end # Returns the value of attribute disable_sandbox. @@ -921,16 +916,10 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # source://railties/lib/rails/application/configuration.rb#14 def eager_load=(_arg0); end - # source://railties/lib/rails/application/configuration.rb#357 - def enable_dependency_loading; end - # source://railties/lib/rails/application/configuration.rb#362 - def enable_dependency_loading=(value); end - - # source://railties/lib/rails/application/configuration.rb#343 def enable_reloading; end - # source://railties/lib/rails/application/configuration.rb#347 + # source://railties/lib/rails/application/configuration.rb#366 def enable_reloading=(value); end # Returns the value of attribute encoding. @@ -938,7 +927,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # source://railties/lib/rails/application/configuration.rb#28 def encoding; end - # source://railties/lib/rails/application/configuration.rb#367 + # source://railties/lib/rails/application/configuration.rb#378 def encoding=(value); end # Returns the value of attribute exceptions_app. @@ -1037,7 +1026,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # source://railties/lib/rails/application/configuration.rb#14 def hosts=(_arg0); end - # source://railties/lib/rails/application/configuration.rb#575 + # source://railties/lib/rails/application/configuration.rb#605 def inspect; end # Load the config/database.yml to create the Rake tasks for @@ -1046,7 +1035,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # # Do not use this method, use #database_configuration instead. # - # source://railties/lib/rails/application/configuration.rb#418 + # source://railties/lib/rails/application/configuration.rb#426 def load_database_yaml; end # Loads default configuration values for a target version. This includes @@ -1091,7 +1080,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # source://railties/lib/rails/application/configuration.rb#28 def log_level; end - # source://railties/lib/rails/application/configuration.rb#382 + # source://railties/lib/rails/application/configuration.rb#393 def log_level=(level); end # Returns the value of attribute log_tags. @@ -1118,12 +1107,12 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # source://railties/lib/rails/application/configuration.rb#14 def logger=(_arg0); end - # source://railties/lib/rails/application/configuration.rb#397 + # source://railties/lib/rails/application/configuration.rb#406 def paths; end # Configures the ActionDispatch::PermissionsPolicy. # - # source://railties/lib/rails/application/configuration.rb#555 + # source://railties/lib/rails/application/configuration.rb#585 def permissions_policy(&block); end # Returns the value of attribute precompile_filter_parameters. @@ -1174,17 +1163,11 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # source://railties/lib/rails/application/configuration.rb#14 def rake_eager_load=(_arg0); end - # Returns the value of attribute read_encrypted_secrets. - # - # source://railties/lib/rails/application/configuration.rb#14 + # source://railties/lib/rails/application/configuration.rb#370 def read_encrypted_secrets; end - # Sets the attribute read_encrypted_secrets - # - # @param value the value to set the attribute read_encrypted_secrets to. - # - # source://railties/lib/rails/application/configuration.rb#14 - def read_encrypted_secrets=(_arg0); end + # source://railties/lib/rails/application/configuration.rb#374 + def read_encrypted_secrets=(value); end # Returns the value of attribute relative_url_root. # @@ -1212,7 +1195,7 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # @return [Boolean] # - # source://railties/lib/rails/application/configuration.rb#339 + # source://railties/lib/rails/application/configuration.rb#358 def reloading_enabled?; end # Returns the value of attribute require_master_key. @@ -1239,17 +1222,11 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # source://railties/lib/rails/application/configuration.rb#14 def sandbox_by_default=(_arg0); end - # Returns the value of attribute secret_key_base. - # - # source://railties/lib/rails/application/configuration.rb#14 + # source://railties/lib/rails/application/configuration.rb#514 def secret_key_base; end - # Sets the attribute secret_key_base - # - # @param value the value to set the attribute secret_key_base to. - # - # source://railties/lib/rails/application/configuration.rb#14 - def secret_key_base=(_arg0); end + # source://railties/lib/rails/application/configuration.rb#524 + def secret_key_base=(new_secret_key_base); end # Returns the value of attribute server_timing. # @@ -1291,14 +1268,26 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # # use ActionDispatch::Session::MyCustomStore as the session store # config.session_store :my_custom_store # - # source://railties/lib/rails/application/configuration.rb#521 + # source://railties/lib/rails/application/configuration.rb#551 def session_store(new_session_store = T.unsafe(nil), **options); end # @return [Boolean] # - # source://railties/lib/rails/application/configuration.rb#537 + # source://railties/lib/rails/application/configuration.rb#567 def session_store?; end + # Returns the value of attribute silence_healthcheck_path. + # + # source://railties/lib/rails/application/configuration.rb#14 + def silence_healthcheck_path; end + + # Sets the attribute silence_healthcheck_path + # + # @param value the value to set the attribute silence_healthcheck_path to. + # + # source://railties/lib/rails/application/configuration.rb#14 + def silence_healthcheck_path=(_arg0); end + # Returns the value of attribute ssl_options. # # source://railties/lib/rails/application/configuration.rb#14 @@ -1335,33 +1324,50 @@ class Rails::Application::Configuration < ::Rails::Engine::Configuration # source://railties/lib/rails/application/configuration.rb#14 def x=(_arg0); end + # Returns the value of attribute yjit. + # + # source://railties/lib/rails/application/configuration.rb#14 + def yjit; end + + # Sets the attribute yjit + # + # @param value the value to set the attribute yjit to. + # + # source://railties/lib/rails/application/configuration.rb#14 + def yjit=(_arg0); end + private - # source://railties/lib/rails/application/configuration.rb#600 + # source://railties/lib/rails/application/configuration.rb#632 def credentials_defaults; end + + # source://railties/lib/rails/application/configuration.rb#642 + def generate_local_secret; end + + # @return [Boolean] + # + # source://railties/lib/rails/application/configuration.rb#654 + def generate_local_secret?; end end -# source://railties/lib/rails/application/configuration.rb#579 +# source://railties/lib/rails/application/configuration.rb#609 class Rails::Application::Configuration::Custom # @return [Custom] a new instance of Custom # - # source://railties/lib/rails/application/configuration.rb#580 + # source://railties/lib/rails/application/configuration.rb#610 def initialize; end - # source://railties/lib/rails/application/configuration.rb#584 + # source://railties/lib/rails/application/configuration.rb#614 def method_missing(method, *args); end private # @return [Boolean] # - # source://railties/lib/rails/application/configuration.rb#594 - def respond_to_missing?(symbol, *_arg1); end + # source://railties/lib/rails/application/configuration.rb#626 + def respond_to_missing?(symbol, _); end end -# source://railties/lib/rails/application/configuration.rb#351 -Rails::Application::Configuration::ENABLE_DEPENDENCY_LOADING_WARNING = T.let(T.unsafe(nil), String) - # source://railties/lib/rails/application/default_middleware_stack.rb#5 class Rails::Application::DefaultMiddlewareStack # @return [DefaultMiddlewareStack] a new instance of DefaultMiddlewareStack @@ -1389,10 +1395,10 @@ class Rails::Application::DefaultMiddlewareStack private - # source://railties/lib/rails/application/default_middleware_stack.rb#109 + # source://railties/lib/rails/application/default_middleware_stack.rb#113 def load_rack_cache; end - # source://railties/lib/rails/application/default_middleware_stack.rb#131 + # source://railties/lib/rails/application/default_middleware_stack.rb#135 def show_exceptions_app; end end @@ -1402,28 +1408,28 @@ module Rails::Application::Finisher extend ::Rails::Initializable::ClassMethods end -# source://railties/lib/rails/application/finisher.rb#110 +# source://railties/lib/rails/application/finisher.rb#111 module Rails::Application::Finisher::InterlockHook class << self - # source://railties/lib/rails/application/finisher.rb#115 + # source://railties/lib/rails/application/finisher.rb#116 def complete(_state); end - # source://railties/lib/rails/application/finisher.rb#111 + # source://railties/lib/rails/application/finisher.rb#112 def run; end end end -# source://railties/lib/rails/application/finisher.rb#96 +# source://railties/lib/rails/application/finisher.rb#97 class Rails::Application::Finisher::MonitorHook # @return [MonitorHook] a new instance of MonitorHook # - # source://railties/lib/rails/application/finisher.rb#97 + # source://railties/lib/rails/application/finisher.rb#98 def initialize(monitor = T.unsafe(nil)); end - # source://railties/lib/rails/application/finisher.rb#105 + # source://railties/lib/rails/application/finisher.rb#106 def complete(_state); end - # source://railties/lib/rails/application/finisher.rb#101 + # source://railties/lib/rails/application/finisher.rb#102 def run; end end @@ -1441,12 +1447,9 @@ class Rails::Application::RoutesReloader # source://railties/lib/rails/application/routes_reloader.rb#15 def initialize; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - # Returns the value of attribute eager_load. # # source://railties/lib/rails/application/routes_reloader.rb#11 @@ -1465,17 +1468,25 @@ class Rails::Application::RoutesReloader # source://railties/lib/rails/application/routes_reloader.rb#13 def execute_if_updated(*_arg0, **_arg1, &_arg2); end + # source://railties/lib/rails/application/routes_reloader.rb#33 + def execute_unless_loaded; end + # Returns the value of attribute external_routes. # # source://railties/lib/rails/application/routes_reloader.rb#10 def external_routes; end + # Returns the value of attribute loaded. + # + # source://railties/lib/rails/application/routes_reloader.rb#10 + def loaded; end + # Returns the value of attribute paths. # # source://railties/lib/rails/application/routes_reloader.rb#10 def paths; end - # source://railties/lib/rails/application/routes_reloader.rb#22 + # source://railties/lib/rails/application/routes_reloader.rb#23 def reload!; end # Returns the value of attribute route_sets. @@ -1491,33 +1502,30 @@ class Rails::Application::RoutesReloader private - # source://railties/lib/rails/application/routes_reloader.rb#42 + # source://railties/lib/rails/application/routes_reloader.rb#52 def clear!; end - # source://railties/lib/rails/application/routes_reloader.rb#58 + # source://railties/lib/rails/application/routes_reloader.rb#68 def finalize!; end - # source://railties/lib/rails/application/routes_reloader.rb#49 + # source://railties/lib/rails/application/routes_reloader.rb#59 def load_paths; end - # source://railties/lib/rails/application/routes_reloader.rb#62 + # source://railties/lib/rails/application/routes_reloader.rb#72 def revert; end - # source://railties/lib/rails/application/routes_reloader.rb#54 + # source://railties/lib/rails/application/routes_reloader.rb#64 def run_after_load_paths; end - # source://railties/lib/rails/application/routes_reloader.rb#32 + # source://railties/lib/rails/application/routes_reloader.rb#42 def updater; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end end end @@ -1525,7 +1533,7 @@ end class Rails::ApplicationController < ::ActionController::Base private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end # source://railties/lib/rails/application_controller.rb#25 @@ -1540,17 +1548,29 @@ class Rails::ApplicationController < ::ActionController::Base def require_local!; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#211 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#212 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout_conditions; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -1607,6 +1627,15 @@ class Rails::BacktraceCleaner < ::ActiveSupport::BacktraceCleaner # # source://railties/lib/rails/backtrace_cleaner.rb#11 def initialize; end + + # source://railties/lib/rails/backtrace_cleaner.rb#29 + def clean(backtrace, kind = T.unsafe(nil)); end + + # source://railties/lib/rails/backtrace_cleaner.rb#36 + def clean_frame(frame, kind = T.unsafe(nil)); end + + # source://railties/lib/rails/backtrace_cleaner.rb#29 + def filter(backtrace, kind = T.unsafe(nil)); end end # source://railties/lib/rails/backtrace_cleaner.rb#8 @@ -1657,6 +1686,9 @@ class Rails::Configuration::Generators # source://railties/lib/rails/configuration.rb#105 def api_only=(_arg0); end + # source://railties/lib/rails/configuration.rb#134 + def apply_rubocop_autocorrect_after_generate!; end + # Returns the value of attribute colorize_logging. # # source://railties/lib/rails/configuration.rb#105 @@ -1689,7 +1721,7 @@ class Rails::Configuration::Generators # source://railties/lib/rails/configuration.rb#126 def hide_namespace(namespace); end - # source://railties/lib/rails/configuration.rb#134 + # source://railties/lib/rails/configuration.rb#143 def method_missing(method, *args); end # Returns the value of attribute options. @@ -2160,19 +2192,16 @@ class Rails::Engine < ::Rails::Railtie # @return [Engine] a new instance of Engine # - # source://railties/lib/rails/engine.rb#439 + # source://railties/lib/rails/engine.rb#440 def initialize; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#69 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#963 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#923 def _load_seed_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#951 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#911 def _run_load_seed_callbacks(&block); end # Returns the underlying Rack application for this engine. @@ -2199,7 +2228,7 @@ class Rails::Engine < ::Rails::Railtie # source://railties/lib/rails/engine.rb#529 def endpoint; end - # source://railties/lib/rails/engine.rb#437 + # source://railties/lib/rails/engine.rb#438 def engine_name(*_arg0, **_arg1, &_arg2); end # Defines additional Rack env configuration that is added on each call. @@ -2217,13 +2246,13 @@ class Rails::Engine < ::Rails::Railtie # source://railties/lib/rails/engine.rb#512 def helpers_paths; end - # source://railties/lib/rails/engine.rb#437 - def isolated?(&block); end + # source://railties/lib/rails/engine.rb#438 + def isolated?(&_arg0); end # Load console and invoke the registered hooks. # Check Rails::Railtie.console for more info. # - # source://railties/lib/rails/engine.rb#453 + # source://railties/lib/rails/engine.rb#454 def load_console(app = T.unsafe(nil)); end # Load \Rails generators and invoke the registered hooks. @@ -2258,16 +2287,16 @@ class Rails::Engine < ::Rails::Railtie # source://railties/lib/rails/engine.rb#469 def load_tasks(app = T.unsafe(nil)); end - # source://railties/lib/rails/engine.rb#436 + # source://railties/lib/rails/engine.rb#437 def middleware(*_arg0, **_arg1, &_arg2); end - # source://railties/lib/rails/engine.rb#436 + # source://railties/lib/rails/engine.rb#437 def paths(*_arg0, **_arg1, &_arg2); end # source://railties/lib/rails/engine.rb#496 def railties; end - # source://railties/lib/rails/engine.rb#436 + # source://railties/lib/rails/engine.rb#437 def root(*_arg0, **_arg1, &_arg2); end # Defines the routes for this engine. If a block is given to @@ -2278,61 +2307,58 @@ class Rails::Engine < ::Rails::Railtie # @return [Boolean] # - # source://railties/lib/rails/engine.rb#677 + # source://railties/lib/rails/engine.rb#681 def routes?; end protected - # source://railties/lib/rails/engine.rb#682 + # source://railties/lib/rails/engine.rb#686 def run_tasks_blocks(*_arg0); end private - # source://railties/lib/rails/engine.rb#714 + # source://railties/lib/rails/engine.rb#718 def _all_autoload_once_paths; end - # source://railties/lib/rails/engine.rb#718 + # source://railties/lib/rails/engine.rb#722 def _all_autoload_paths; end - # source://railties/lib/rails/engine.rb#727 + # source://railties/lib/rails/engine.rb#731 def _all_load_paths(add_autoload_paths_to_load_path); end - # source://railties/lib/rails/engine.rb#751 + # source://railties/lib/rails/engine.rb#756 def build_middleware; end - # source://railties/lib/rails/engine.rb#743 + # source://railties/lib/rails/engine.rb#748 def build_request(env); end - # source://railties/lib/rails/engine.rb#710 + # source://railties/lib/rails/engine.rb#714 def default_middleware_stack; end # @return [Boolean] # - # source://railties/lib/rails/engine.rb#738 - def fixtures_in_root_and_not_in_vendor?(fixtures); end + # source://railties/lib/rails/engine.rb#742 + def fixtures_in_root_and_not_in_vendor_or_dot_dir?(fixtures); end # @return [Boolean] # - # source://railties/lib/rails/engine.rb#694 + # source://railties/lib/rails/engine.rb#698 def has_migrations?; end - # source://railties/lib/rails/engine.rb#688 + # source://railties/lib/rails/engine.rb#692 def load_config_initializer(initializer); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks=(value); end - - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 - def __callbacks?; end + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#955 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#915 def _load_seed_callbacks; end - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#959 + # source://activesupport/8.0.0.beta1lib/active_support/callbacks.rb#919 def _load_seed_callbacks=(value); end # Returns the value of attribute called_from. @@ -2358,13 +2384,13 @@ class Rails::Engine < ::Rails::Railtie # Finds engine with given path. # - # source://railties/lib/rails/engine.rb#423 + # source://railties/lib/rails/engine.rb#424 def find(path); end # source://railties/lib/rails/engine.rb#375 def find_root(from); end - # source://railties/lib/rails/engine.rb#698 + # source://railties/lib/rails/engine.rb#702 def find_root_with_flag(flag, root_path, default = T.unsafe(nil)); end # @private @@ -2404,19 +2430,19 @@ class Rails::Engine::Configuration < ::Rails::Railtie::Configuration # Private method that adds custom autoload once paths to the ones defined # by +paths+. # - # source://railties/lib/rails/engine/configuration.rb#125 + # source://railties/lib/rails/engine/configuration.rb#127 def all_autoload_once_paths; end # Private method that adds custom autoload paths to the ones defined by # +paths+. # - # source://railties/lib/rails/engine/configuration.rb#119 + # source://railties/lib/rails/engine/configuration.rb#121 def all_autoload_paths; end # Private method that adds custom eager load paths to the ones defined by # +paths+. # - # source://railties/lib/rails/engine/configuration.rb#131 + # source://railties/lib/rails/engine/configuration.rb#133 def all_eager_load_paths; end # An array of custom autoload once paths. These won't be eager loaded @@ -2456,6 +2482,18 @@ class Rails::Engine::Configuration < ::Rails::Railtie::Configuration # source://railties/lib/rails/engine/configuration.rb#10 def autoload_paths=(_arg0); end + # Returns the value of attribute default_scope. + # + # source://railties/lib/rails/engine/configuration.rb#9 + def default_scope; end + + # Sets the attribute default_scope + # + # @param value the value to set the attribute default_scope to. + # + # source://railties/lib/rails/engine/configuration.rb#9 + def default_scope=(_arg0); end + # An array of custom eager load paths to be added to the ones defined # automatically by Rails. Anything in this collection is considered to be # an autoload path regardless of whether it was added to +autoload_paths+. @@ -2489,7 +2527,7 @@ class Rails::Engine::Configuration < ::Rails::Railtie::Configuration # # @yield [@generators] # - # source://railties/lib/rails/engine/configuration.rb#65 + # source://railties/lib/rails/engine/configuration.rb#67 def generators; end # Returns the value of attribute javascript_path. @@ -2516,7 +2554,7 @@ class Rails::Engine::Configuration < ::Rails::Railtie::Configuration # source://railties/lib/rails/engine/configuration.rb#9 def middleware=(_arg0); end - # source://railties/lib/rails/engine/configuration.rb#71 + # source://railties/lib/rails/engine/configuration.rb#73 def paths; end # Returns the value of attribute root. @@ -2524,8 +2562,82 @@ class Rails::Engine::Configuration < ::Rails::Railtie::Configuration # source://railties/lib/rails/engine/configuration.rb#8 def root; end - # source://railties/lib/rails/engine/configuration.rb#113 + # source://railties/lib/rails/engine/configuration.rb#115 def root=(value); end + + # Returns the value of attribute route_set_class. + # + # source://railties/lib/rails/engine/configuration.rb#9 + def route_set_class; end + + # Sets the attribute route_set_class + # + # @param value the value to set the attribute route_set_class to. + # + # source://railties/lib/rails/engine/configuration.rb#9 + def route_set_class=(_arg0); end +end + +# source://railties/lib/rails/engine/lazy_route_set.rb#9 +class Rails::Engine::LazyRouteSet < ::ActionDispatch::Routing::RouteSet + # @return [LazyRouteSet] a new instance of LazyRouteSet + # + # source://railties/lib/rails/engine/lazy_route_set.rb#49 + def initialize(config = T.unsafe(nil)); end + + # source://railties/lib/rails/engine/lazy_route_set.rb#66 + def call(req); end + + # source://railties/lib/rails/engine/lazy_route_set.rb#71 + def draw(&block); end + + # source://railties/lib/rails/engine/lazy_route_set.rb#56 + def generate_extras(options, recall = T.unsafe(nil)); end + + # source://railties/lib/rails/engine/lazy_route_set.rb#62 + def generate_url_helpers(supports_path); end + + # source://railties/lib/rails/engine/lazy_route_set.rb#76 + def recognize_path(path, environment = T.unsafe(nil)); end + + # source://railties/lib/rails/engine/lazy_route_set.rb#81 + def routes; end + + private + + # source://railties/lib/rails/engine/lazy_route_set.rb#87 + def method_missing_module; end +end + +# source://railties/lib/rails/engine/lazy_route_set.rb#10 +class Rails::Engine::LazyRouteSet::NamedRouteCollection < ::ActionDispatch::Routing::RouteSet::NamedRouteCollection + # @return [Boolean] + # + # source://railties/lib/rails/engine/lazy_route_set.rb#11 + def route_defined?(name); end +end + +# source://railties/lib/rails/engine/lazy_route_set.rb#17 +module Rails::Engine::LazyRouteSet::ProxyUrlHelpers + # source://railties/lib/rails/engine/lazy_route_set.rb#23 + def full_url_for(options); end + + # @return [Boolean] + # + # source://railties/lib/rails/engine/lazy_route_set.rb#33 + def optimize_routes_generation?; end + + # source://railties/lib/rails/engine/lazy_route_set.rb#43 + def polymorphic_path(record_or_hash_or_array, options = T.unsafe(nil)); end + + # source://railties/lib/rails/engine/lazy_route_set.rb#38 + def polymorphic_url(record_or_hash_or_array, options = T.unsafe(nil)); end + + # source://railties/lib/rails/engine/lazy_route_set.rb#28 + def route_for(name, *args); end + + # source://railties/lib/rails/engine/lazy_route_set.rb#18 + def url_for(options); end end # source://railties/lib/rails/engine/railties.rb#5 @@ -2572,7 +2684,7 @@ end # The health check will now be accessible via the +/healthz+ path. # # NOTE: This endpoint does not reflect the status of all of your application's -# dependencies, such as the database or redis cluster. Replace +# dependencies, such as the database or Redis cluster. Replace # "rails/health#show" with your own controller action if you have # application specific needs. # @@ -2588,7 +2700,7 @@ class Rails::HealthController < ::ActionController::Base private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end # source://railties/lib/rails/health_controller.rb#51 @@ -2601,11 +2713,17 @@ class Rails::HealthController < ::ActionController::Base def render_up; end class << self - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end - # source://activesupport/7.1.3.3lib/active_support/rescuable.rb#15 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def rescue_handlers; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def rescue_handlers=(new_value); end end end @@ -2647,6 +2765,9 @@ class Rails::InfoController < ::Rails::ApplicationController # source://railties/lib/rails/info_controller.rb#12 def index; end + # source://railties/lib/rails/info_controller.rb#35 + def notes; end + # source://railties/lib/rails/info_controller.rb#16 def properties; end @@ -2655,27 +2776,39 @@ class Rails::InfoController < ::Rails::ApplicationController private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end # source://railties/lib/rails/info_controller.rb#8 def _layout_from_proc; end - # source://railties/lib/rails/info_controller.rb#36 + # source://railties/lib/rails/info_controller.rb#44 def matching_routes(query:, exact_match:); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#211 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#212 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout_conditions; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -2769,54 +2902,69 @@ module Rails::LineFiltering def run(reporter, options = T.unsafe(nil)); end end -# source://railties/lib/rails/mailers_controller.rb#5 +# source://railties/lib/rails/mailers_controller.rb#6 class Rails::MailersController < ::Rails::ApplicationController - # source://railties/lib/rails/mailers_controller.rb#21 + # source://railties/lib/rails/mailers_controller.rb#22 def download; end - # source://railties/lib/rails/mailers_controller.rb#16 + # source://railties/lib/rails/mailers_controller.rb#17 def index; end - # source://railties/lib/rails/mailers_controller.rb#31 + # source://railties/lib/rails/mailers_controller.rb#32 def preview; end private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end - # source://railties/lib/rails/mailers_controller.rb#90 + # source://railties/lib/rails/mailers_controller.rb#107 + def attachment_url(attachment); end + + # source://railties/lib/rails/mailers_controller.rb#101 + def attachments_for(email); end + + # source://railties/lib/rails/mailers_controller.rb#93 def find_part(format); end - # source://railties/lib/rails/mailers_controller.rb#78 + # source://railties/lib/rails/mailers_controller.rb#81 def find_preferred_part(*formats); end - # source://railties/lib/rails/mailers_controller.rb#66 + # source://railties/lib/rails/mailers_controller.rb#69 def find_preview; end - # source://railties/lib/rails/mailers_controller.rb#102 + # source://railties/lib/rails/mailers_controller.rb#115 def locale_query(locale); end - # source://railties/lib/rails/mailers_controller.rb#98 + # source://railties/lib/rails/mailers_controller.rb#111 def part_query(mime_type); end - # source://railties/lib/rails/mailers_controller.rb#106 + # source://railties/lib/rails/mailers_controller.rb#119 def set_locale(&block); end # @return [Boolean] # - # source://railties/lib/rails/mailers_controller.rb#62 + # source://railties/lib/rails/mailers_controller.rb#65 def show_previews?; end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionpack/7.1.3.3lib/abstract_controller/helpers.rb#12 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _helper_methods; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _helper_methods=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end @@ -2826,11 +2974,14 @@ module Rails::MailersController::HelperMethods include ::ActionText::TagHelper include ::ActionController::Base::HelperMethods - # source://railties/lib/rails/mailers_controller.rb#12 - def locale_query(*args, **_arg1, &block); end + # source://railties/lib/rails/mailers_controller.rb#13 + def attachment_url(*_arg0, **_arg1, &_arg2); end + + # source://railties/lib/rails/mailers_controller.rb#13 + def locale_query(*_arg0, **_arg1, &_arg2); end - # source://railties/lib/rails/mailers_controller.rb#12 - def part_query(*args, **_arg1, &block); end + # source://railties/lib/rails/mailers_controller.rb#13 + def part_query(*_arg0, **_arg1, &_arg2); end end # source://railties/lib/rails/paths.rb#6 @@ -3056,6 +3207,34 @@ class Rails::Paths::Root def filter_by(&block); end end +# source://railties/lib/rails/pwa_controller.rb#5 +class Rails::PwaController < ::Rails::ApplicationController + # source://railties/lib/rails/pwa_controller.rb#12 + def manifest; end + + # source://railties/lib/rails/pwa_controller.rb#8 + def service_worker; end + + private + + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 + def _layout(lookup_context, formats); end + + class << self + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def __callbacks; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 + def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end + end +end + # source://railties/lib/rails/rack.rb#4 module Rails::Rack; end @@ -3077,21 +3256,46 @@ class Rails::Rack::Logger < ::ActiveSupport::LogSubscriber private - # source://railties/lib/rails/rack/logger.rb#31 + # source://railties/lib/rails/rack/logger.rb#33 def call_app(request, env); end - # source://railties/lib/rails/rack/logger.rb#62 + # source://railties/lib/rails/rack/logger.rb#64 def compute_tags(request); end - # source://railties/lib/rails/rack/logger.rb#75 + # source://railties/lib/rails/rack/logger.rb#81 + def finish_request_instrumentation(handle, logger_tag_pop_count); end + + # source://railties/lib/rails/rack/logger.rb#77 def logger; end # Started GET "/session/new" for 127.0.0.1 at 2012-09-26 14:51:42 -0700 # - # source://railties/lib/rails/rack/logger.rb#54 + # source://railties/lib/rails/rack/logger.rb#56 def started_request_message(request); end end +# Allows you to silence requests made to a specific path. +# This is useful for preventing recurring requests like health checks from clogging the logging. +# This middleware is used to do just that against the path /up in production by default. +# +# Example: +# +# config.middleware.insert_before \ +# Rails::Rack::Logger, Rails::Rack::SilenceRequest, path: "/up" +# +# This middleware can also be configured using `config.silence_healthcheck_path = "/up"` in Rails. +# +# source://railties/lib/rails/rack/silence_request.rb#19 +class Rails::Rack::SilenceRequest + # @return [SilenceRequest] a new instance of SilenceRequest + # + # source://railties/lib/rails/rack/silence_request.rb#20 + def initialize(app, path:); end + + # source://railties/lib/rails/rack/silence_request.rb#24 + def call(env); end +end + # +Rails::Railtie+ is the core of the \Rails framework and provides # several hooks to extend \Rails and/or modify the initialization process. # @@ -3135,8 +3339,8 @@ end # To add an initialization step to the \Rails boot process from your railtie, just # define the initialization code with the +initializer+ macro: # -# class MyRailtie < Rails::Railtie -# initializer "my_railtie.configure_rails_initialization" do +# class MyGem::Railtie < Rails::Railtie +# initializer "my_gem.configure_rails_initialization" do # # some initialization behavior # end # end @@ -3144,9 +3348,9 @@ end # If specified, the block can also receive the application object, in case you # need to access some application-specific configuration, like middleware: # -# class MyRailtie < Rails::Railtie -# initializer "my_railtie.configure_rails_initialization" do |app| -# app.middleware.use MyRailtie::Middleware +# class MyGem::Railtie < Rails::Railtie +# initializer "my_gem.configure_rails_initialization" do |app| +# app.middleware.use MyGem::Middleware # end # end # @@ -3159,14 +3363,14 @@ end # Railties can access a config object which contains configuration shared by all # railties and the application: # -# class MyRailtie < Rails::Railtie +# class MyGem::Railtie < Rails::Railtie # # Customize the ORM -# config.app_generators.orm :my_railtie_orm +# config.app_generators.orm :my_gem_orm # # # Add a to_prepare block which is executed once in production # # and before each request in development. # config.to_prepare do -# MyRailtie.setup! +# MyGem.setup! # end # end # @@ -3175,9 +3379,9 @@ end # If your railtie has Rake tasks, you can tell \Rails to load them through the method # +rake_tasks+: # -# class MyRailtie < Rails::Railtie +# class MyGem::Railtie < Rails::Railtie # rake_tasks do -# load "path/to/my_railtie.tasks" +# load "path/to/my_gem.tasks" # end # end # @@ -3185,9 +3389,9 @@ end # your generators at a different location, you can specify in your railtie a block which # will load them during normal generators lookup: # -# class MyRailtie < Rails::Railtie +# class MyGem::Railtie < Rails::Railtie # generators do -# require "path/to/my_railtie_generator" +# require "path/to/my_gem_generator" # end # end # @@ -3205,7 +3409,7 @@ end # this less confusing for everyone. # It can be used like this: # -# class MyRailtie < Rails::Railtie +# class MyGem::Railtie < Rails::Railtie # server do # WebpackServer.start # end @@ -3227,50 +3431,50 @@ class Rails::Railtie # @return [Railtie] a new instance of Railtie # - # source://railties/lib/rails/railtie.rb#246 + # source://railties/lib/rails/railtie.rb#245 def initialize; end # This is used to create the config object on Railties, an instance of # Railtie::Configuration, that is used by Railties and Application to store # related configuration. # - # source://railties/lib/rails/railtie.rb#263 + # source://railties/lib/rails/railtie.rb#262 def config; end - # source://railties/lib/rails/railtie.rb#256 + # source://railties/lib/rails/railtie.rb#255 def configure(&block); end - # source://railties/lib/rails/railtie.rb#252 + # source://railties/lib/rails/railtie.rb#251 def inspect; end - # source://railties/lib/rails/railtie.rb#244 + # source://railties/lib/rails/railtie.rb#243 def railtie_name(*_arg0, **_arg1, &_arg2); end - # source://railties/lib/rails/railtie.rb#267 + # source://railties/lib/rails/railtie.rb#266 def railtie_namespace; end protected - # source://railties/lib/rails/railtie.rb#272 + # source://railties/lib/rails/railtie.rb#271 def run_console_blocks(app); end - # source://railties/lib/rails/railtie.rb#276 + # source://railties/lib/rails/railtie.rb#275 def run_generators_blocks(app); end - # source://railties/lib/rails/railtie.rb#280 + # source://railties/lib/rails/railtie.rb#279 def run_runner_blocks(app); end - # source://railties/lib/rails/railtie.rb#289 + # source://railties/lib/rails/railtie.rb#288 def run_server_blocks(app); end - # source://railties/lib/rails/railtie.rb#284 + # source://railties/lib/rails/railtie.rb#283 def run_tasks_blocks(app); end private # run `&block` in every registered block in `#register_block_for` # - # source://railties/lib/rails/railtie.rb#295 + # source://railties/lib/rails/railtie.rb#294 def each_registered_block(type, &block); end class << self @@ -3343,7 +3547,7 @@ class Rails::Railtie # to the Railtie instance. # # source://railties/lib/rails/railtie.rb#224 - def method_missing(name, *args, **_arg2, &block); end + def method_missing(name, *_arg1, **_arg2, &_arg3); end def new(*_arg0); end @@ -3351,7 +3555,7 @@ class Rails::Railtie # blank and append given block to value, which will be used later in # `#each_registered_block(type, &block)` # - # source://railties/lib/rails/railtie.rb#236 + # source://railties/lib/rails/railtie.rb#235 def register_block_for(type, &blk); end # @return [Boolean] @@ -3467,74 +3671,6 @@ class Rails::Railtie::Configuration end end -# Greatly inspired by Ara T. Howard's magnificent sekrets gem. 😘 -# -# source://railties/lib/rails/secrets.rb#9 -class Rails::Secrets - class << self - # source://railties/lib/rails/secrets.rb#46 - def decrypt(data); end - - # source://railties/lib/rails/secrets.rb#42 - def encrypt(data); end - - # source://railties/lib/rails/secrets.rb#38 - def key; end - - # source://railties/lib/rails/secrets.rb#25 - def parse(paths, env:); end - - # source://railties/lib/rails/secrets.rb#50 - def read; end - - # source://railties/lib/rails/secrets.rb#59 - def read_for_editing(&block); end - - # Sets the attribute root - # - # @param value the value to set the attribute root to. - # - # source://railties/lib/rails/secrets.rb#23 - def root=(_arg0); end - - # source://railties/lib/rails/secrets.rb#54 - def write(contents); end - - private - - # source://railties/lib/rails/secrets.rb#105 - def encryptor; end - - # @raise [MissingKeyError] - # - # source://railties/lib/rails/secrets.rb#64 - def handle_missing_key; end - - # source://railties/lib/rails/secrets.rb#74 - def key_path; end - - # source://railties/lib/rails/secrets.rb#78 - def path; end - - # source://railties/lib/rails/secrets.rb#82 - def preprocess(path); end - - # source://railties/lib/rails/secrets.rb#68 - def read_key_file; end - - # source://railties/lib/rails/secrets.rb#90 - def writing(contents); end - end -end - -# source://railties/lib/rails/secrets.rb#10 -class Rails::Secrets::MissingKeyError < ::RuntimeError - # @return [MissingKeyError] a new instance of MissingKeyError - # - # source://railties/lib/rails/secrets.rb#11 - def initialize; end -end - # Implements the logic behind +Rails::Command::NotesCommand+. See rails notes --help for usage information. # # Annotation objects are triplets :line, :tag, :text that @@ -3545,23 +3681,23 @@ end # start with the tag optionally followed by a colon. Everything up to the end # of the line (or closing ERB comment tag) is considered to be their text. # -# source://railties/lib/rails/source_annotation_extractor.rb#15 +# source://railties/lib/rails/source_annotation_extractor.rb#21 class Rails::SourceAnnotationExtractor # @return [SourceAnnotationExtractor] a new instance of SourceAnnotationExtractor # - # source://railties/lib/rails/source_annotation_extractor.rb#137 + # source://railties/lib/rails/source_annotation_extractor.rb#154 def initialize(tag); end # Prints the mapping from filenames to annotations in +results+ ordered by filename. # The +options+ hash is passed to each annotation's +to_s+. # - # source://railties/lib/rails/source_annotation_extractor.rb#186 + # source://railties/lib/rails/source_annotation_extractor.rb#203 def display(results, options = T.unsafe(nil)); end # Returns a hash that maps filenames under +dirs+ (recursively) to arrays # with their annotations. # - # source://railties/lib/rails/source_annotation_extractor.rb#143 + # source://railties/lib/rails/source_annotation_extractor.rb#160 def find(dirs); end # Returns a hash that maps filenames under +dir+ (recursively) to arrays @@ -3569,12 +3705,12 @@ class Rails::SourceAnnotationExtractor # Rails::SourceAnnotationExtractor::Annotation.extensions are # taken into account. Only files with annotations are included. # - # source://railties/lib/rails/source_annotation_extractor.rb#151 + # source://railties/lib/rails/source_annotation_extractor.rb#168 def find_in(dir); end # Returns the value of attribute tag. # - # source://railties/lib/rails/source_annotation_extractor.rb#135 + # source://railties/lib/rails/source_annotation_extractor.rb#152 def tag; end class << self @@ -3593,12 +3729,12 @@ class Rails::SourceAnnotationExtractor # # This class method is the single entry point for the rails notes command. # - # source://railties/lib/rails/source_annotation_extractor.rb#128 + # source://railties/lib/rails/source_annotation_extractor.rb#145 def enumerate(tag = T.unsafe(nil), options = T.unsafe(nil)); end end end -# source://railties/lib/rails/source_annotation_extractor.rb#54 +# source://railties/lib/rails/source_annotation_extractor.rb#71 class Rails::SourceAnnotationExtractor::Annotation < ::Struct # Returns a representation of the annotation that looks like this: # @@ -3607,35 +3743,35 @@ class Rails::SourceAnnotationExtractor::Annotation < ::Struct # If +options+ has a flag :tag the tag is shown as in the example above. # Otherwise the string contains just line and text. # - # source://railties/lib/rails/source_annotation_extractor.rb#107 + # source://railties/lib/rails/source_annotation_extractor.rb#124 def to_s(options = T.unsafe(nil)); end class << self - # source://railties/lib/rails/source_annotation_extractor.rb#55 + # source://railties/lib/rails/source_annotation_extractor.rb#72 def directories; end - # source://railties/lib/rails/source_annotation_extractor.rb#75 + # source://railties/lib/rails/source_annotation_extractor.rb#92 def extensions; end # Registers additional directories to be included # Rails::SourceAnnotationExtractor::Annotation.register_directories("spec", "another") # - # source://railties/lib/rails/source_annotation_extractor.rb#61 + # source://railties/lib/rails/source_annotation_extractor.rb#78 def register_directories(*dirs); end # Registers new Annotations File Extensions # Rails::SourceAnnotationExtractor::Annotation.register_extensions("css", "scss", "sass", "less", "js") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ } # - # source://railties/lib/rails/source_annotation_extractor.rb#81 + # source://railties/lib/rails/source_annotation_extractor.rb#98 def register_extensions(*exts, &block); end # Registers additional tags # Rails::SourceAnnotationExtractor::Annotation.register_tags("TESTME", "DEPRECATEME") # - # source://railties/lib/rails/source_annotation_extractor.rb#71 + # source://railties/lib/rails/source_annotation_extractor.rb#88 def register_tags(*additional_tags); end - # source://railties/lib/rails/source_annotation_extractor.rb#65 + # source://railties/lib/rails/source_annotation_extractor.rb#82 def tags; end end end @@ -3643,232 +3779,147 @@ end # Wraps a regular expression that will be tested against each of the source # file's comments. # -# source://railties/lib/rails/source_annotation_extractor.rb#18 +# source://railties/lib/rails/source_annotation_extractor.rb#24 class Rails::SourceAnnotationExtractor::ParserExtractor < ::Struct - # source://railties/lib/rails/source_annotation_extractor.rb#33 + # source://railties/lib/rails/source_annotation_extractor.rb#26 def annotations(file); end end -# source://railties/lib/rails/source_annotation_extractor.rb#19 -class Rails::SourceAnnotationExtractor::ParserExtractor::Parser < ::Ripper - # @return [Parser] a new instance of Parser - # - # source://railties/lib/rails/source_annotation_extractor.rb#22 - def initialize(source, pattern:); end - - # Returns the value of attribute comments. - # - # source://railties/lib/rails/source_annotation_extractor.rb#20 - def comments; end - - # source://railties/lib/rails/source_annotation_extractor.rb#28 - def on_comment(value); end - - # Returns the value of attribute pattern. - # - # source://railties/lib/rails/source_annotation_extractor.rb#20 - def pattern; end -end - # Wraps a regular expression that will iterate through a file's lines and # test each one for the given pattern. # -# source://railties/lib/rails/source_annotation_extractor.rb#42 +# source://railties/lib/rails/source_annotation_extractor.rb#59 class Rails::SourceAnnotationExtractor::PatternExtractor < ::Struct - # source://railties/lib/rails/source_annotation_extractor.rb#43 + # source://railties/lib/rails/source_annotation_extractor.rb#60 def annotations(file); end end -# source://railties/lib/rails/test_unit/test_parser.rb#6 +# source://railties/lib/rails/test_unit/test_parser.rb#12 module Rails::TestUnit; end -# source://railties/lib/rails/test_unit/runner.rb#122 +# source://railties/lib/rails/test_unit/runner.rb#146 class Rails::TestUnit::CompositeFilter # @return [CompositeFilter] a new instance of CompositeFilter # - # source://railties/lib/rails/test_unit/runner.rb#125 + # source://railties/lib/rails/test_unit/runner.rb#149 def initialize(runnable, filter, patterns); end # minitest uses === to find matching filters. # - # source://railties/lib/rails/test_unit/runner.rb#132 + # source://railties/lib/rails/test_unit/runner.rb#156 def ===(method); end # Returns the value of attribute named_filter. # - # source://railties/lib/rails/test_unit/runner.rb#123 + # source://railties/lib/rails/test_unit/runner.rb#147 def named_filter; end private - # source://railties/lib/rails/test_unit/runner.rb#147 + # source://railties/lib/rails/test_unit/runner.rb#171 def derive_line_filters(patterns); end - # source://railties/lib/rails/test_unit/runner.rb#137 + # source://railties/lib/rails/test_unit/runner.rb#161 def derive_named_filter(filter); end end -# source://railties/lib/rails/test_unit/runner.rb#158 +# source://railties/lib/rails/test_unit/runner.rb#182 class Rails::TestUnit::Filter # @return [Filter] a new instance of Filter # - # source://railties/lib/rails/test_unit/runner.rb#159 + # source://railties/lib/rails/test_unit/runner.rb#183 def initialize(runnable, file, line_or_range); end - # source://railties/lib/rails/test_unit/runner.rb#168 + # source://railties/lib/rails/test_unit/runner.rb#192 def ===(method); end private - # source://railties/lib/rails/test_unit/runner.rb#180 + # source://railties/lib/rails/test_unit/runner.rb#204 def definition_for(method); end end # source://railties/lib/rails/test_unit/runner.rb#12 +class Rails::TestUnit::InvalidTestError < ::StandardError + # @return [InvalidTestError] a new instance of InvalidTestError + # + # source://railties/lib/rails/test_unit/runner.rb#13 + def initialize(path, suggestion); end +end + +# source://railties/lib/rails/test_unit/runner.rb#21 class Rails::TestUnit::Runner - # source://railties/lib/rails/test_unit/runner.rb#15 + # source://railties/lib/rails/test_unit/runner.rb#24 def filters; end class << self - # source://railties/lib/rails/test_unit/runner.rb#18 + # source://railties/lib/rails/test_unit/runner.rb#27 def attach_before_load_options(opts); end - # source://railties/lib/rails/test_unit/runner.rb#54 + # source://railties/lib/rails/test_unit/runner.rb#78 def compose_filter(runnable, filter); end - # source://railties/lib/rails/test_unit/runner.rb#15 + # source://railties/lib/rails/test_unit/runner.rb#24 def filters; end - # source://railties/lib/rails/test_unit/runner.rb#48 + # source://railties/lib/rails/test_unit/runner.rb#57 def load_tests(argv); end - # source://railties/lib/rails/test_unit/runner.rb#23 + # source://railties/lib/rails/test_unit/runner.rb#32 def parse_options(argv); end - # source://railties/lib/rails/test_unit/runner.rb#42 + # source://railties/lib/rails/test_unit/runner.rb#51 def run(argv = T.unsafe(nil)); end - # source://railties/lib/rails/test_unit/runner.rb#36 + # source://railties/lib/rails/test_unit/runner.rb#45 def run_from_rake(test_command, argv = T.unsafe(nil)); end private - # source://railties/lib/rails/test_unit/runner.rb#89 + # source://railties/lib/rails/test_unit/runner.rb#113 def default_test_exclude_glob; end - # source://railties/lib/rails/test_unit/runner.rb#85 + # source://railties/lib/rails/test_unit/runner.rb#109 def default_test_glob; end - # source://railties/lib/rails/test_unit/runner.rb#65 + # source://railties/lib/rails/test_unit/runner.rb#89 def extract_filters(argv); end - # source://railties/lib/rails/test_unit/runner.rb#101 + # source://railties/lib/rails/test_unit/runner.rb#125 def list_tests(patterns); end - # source://railties/lib/rails/test_unit/runner.rb#107 + # source://railties/lib/rails/test_unit/runner.rb#131 def normalize_declarative_test_filter(filter); end # @return [Boolean] # - # source://railties/lib/rails/test_unit/runner.rb#97 + # source://railties/lib/rails/test_unit/runner.rb#121 def path_argument?(arg); end # @return [Boolean] # - # source://railties/lib/rails/test_unit/runner.rb#93 + # source://railties/lib/rails/test_unit/runner.rb#117 def regexp_filter?(arg); end end end -# source://railties/lib/rails/test_unit/runner.rb#14 +# source://railties/lib/rails/test_unit/runner.rb#23 Rails::TestUnit::Runner::PATH_ARGUMENT_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://railties/lib/rails/test_unit/runner.rb#13 +# source://railties/lib/rails/test_unit/runner.rb#22 Rails::TestUnit::Runner::TEST_FOLDERS = T.let(T.unsafe(nil), Array) # Parse a test file to extract the line ranges of all tests in both # method-style (def test_foo) and declarative-style (test "foo" do) # -# source://railties/lib/rails/test_unit/test_parser.rb#11 -class Rails::TestUnit::TestParser < ::Ripper - # @return [TestParser] a new instance of TestParser - # - # source://railties/lib/rails/test_unit/test_parser.rb#19 - def initialize(*_arg0); end - - # source://railties/lib/rails/test_unit/test_parser.rb#56 - def first_arg(arg, *_arg1); end - - # source://railties/lib/rails/test_unit/test_parser.rb#60 - def just_lineno(*_arg0); end - - # source://railties/lib/rails/test_unit/test_parser.rb#56 - def on_arg_paren(arg, *_arg1); end - - # source://railties/lib/rails/test_unit/test_parser.rb#79 - def on_args_add(parts, part); end - - # source://railties/lib/rails/test_unit/test_parser.rb#83 - def on_args_add_block(args, *rest); end - - # source://railties/lib/rails/test_unit/test_parser.rb#75 - def on_args_new; end - - # source://railties/lib/rails/test_unit/test_parser.rb#56 - def on_bodystmt(arg, *_arg1); end - - # source://railties/lib/rails/test_unit/test_parser.rb#60 - def on_brace_block(*_arg0); end - - # source://railties/lib/rails/test_unit/test_parser.rb#56 - def on_command(arg, *_arg1); end - - # source://railties/lib/rails/test_unit/test_parser.rb#52 - def on_command_call(*_arg0, begin_lineno, _args); end - - # method test e.g. `def test_some_description` - # This event's first argument gets the `ident` node containing the method - # name, which we have overridden to return the line number of the ident - # instead. - # - # source://railties/lib/rails/test_unit/test_parser.rb#34 - def on_def(begin_line, *_arg1); end - - # source://railties/lib/rails/test_unit/test_parser.rb#60 - def on_do_block(*_arg0); end - - # source://railties/lib/rails/test_unit/test_parser.rb#60 - def on_ident(*_arg0); end - - # source://railties/lib/rails/test_unit/test_parser.rb#56 - def on_method_add_arg(arg, *_arg1); end - - # Everything past this point is to support declarative tests, which - # require more work to get right because of the many different ways - # methods can be invoked in ruby, all of which are parsed differently. - # - # The approach is just to store the current line number when the - # "test" method is called and pass it up the tree so it's available at - # the point when we also know the line where the associated block ends. - # - # source://railties/lib/rails/test_unit/test_parser.rb#46 - def on_method_add_block(begin_line, end_line); end - - # source://railties/lib/rails/test_unit/test_parser.rb#56 - def on_stmts_add(arg, *_arg1); end - - # source://railties/lib/rails/test_unit/test_parser.rb#60 - def on_stmts_new(*_arg0); end - - # source://railties/lib/rails/test_unit/test_parser.rb#25 - def parse; end - +# source://railties/lib/rails/test_unit/test_parser.rb#15 +module Rails::TestUnit::TestParser class << self # Helper to translate a method object into the path and line range where # the method was defined. # - # source://railties/lib/rails/test_unit/test_parser.rb#12 - def definition_for(method_obj); end + # source://railties/lib/rails/test_unit/test_parser.rb#18 + def definition_for(method); end end end @@ -3900,20 +3951,32 @@ class Rails::WelcomeController < ::Rails::ApplicationController private - # source://actionview/7.1.3.3lib/action_view/layouts.rb#330 + # source://actionview/8.0.0.beta1lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.1.3.3lib/active_support/callbacks.rb#70 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def __callbacks; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#211 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def __callbacks=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout; end - # source://actionview/7.1.3.3lib/action_view/layouts.rb#212 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def _layout_conditions; end - # source://actionpack/7.1.3.3lib/action_controller/metal.rb#262 + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def _layout_conditions=(new_value); end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#12 def middleware_stack; end + + # source://activesupport/8.0.0.beta1lib/active_support/class_attribute.rb#15 + def middleware_stack=(new_value); end end end diff --git a/sorbet/rbi/gems/rake@13.2.1.rbi b/sorbet/rbi/gems/rake@13.2.1.rbi index b1f0339f..3ab26299 100644 --- a/sorbet/rbi/gems/rake@13.2.1.rbi +++ b/sorbet/rbi/gems/rake@13.2.1.rbi @@ -1158,6 +1158,9 @@ class Rake::FileList # source://rake/lib/rake/file_list.rb#284 def ext(newext = T.unsafe(nil)); end + # source://rake/lib/rake/file_list.rb#77 + def extract!(*args, &block); end + # source://rake/lib/rake/file_list.rb#77 def extract_options!(*args, &block); end @@ -1539,9 +1542,6 @@ class Rake::FileList # source://rake/lib/rake/file_list.rb#182 def to_ary; end - # source://rake/lib/rake/file_list.rb#77 - def to_default_s(*args, &block); end - # source://rake/lib/rake/file_list.rb#77 def to_formatted_s(*args, &block); end diff --git a/sorbet/rbi/gems/rbi@0.2.0.rbi b/sorbet/rbi/gems/rbi@0.2.0.rbi index cfc9a32e..e11d3f2f 100644 --- a/sorbet/rbi/gems/rbi@0.2.0.rbi +++ b/sorbet/rbi/gems/rbi@0.2.0.rbi @@ -2164,7 +2164,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -2409,7 +2409,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/rdoc@6.6.3.1.rbi b/sorbet/rbi/gems/rdoc@6.7.0.rbi similarity index 95% rename from sorbet/rbi/gems/rdoc@6.6.3.1.rbi rename to sorbet/rbi/gems/rdoc@6.7.0.rbi index 3fc81d5b..59a30626 100644 --- a/sorbet/rbi/gems/rdoc@6.6.3.1.rbi +++ b/sorbet/rbi/gems/rdoc@6.7.0.rbi @@ -69,7 +69,7 @@ end # source://rdoc/lib/rdoc.rb#58 module RDoc class << self - # Seaches and returns the directory for settings. + # Searches and returns the directory for settings. # # 1. $HOME/.rdoc directory, if it exists. # 2. The +rdoc+ directory under the path specified by the @@ -1554,7 +1554,7 @@ class RDoc::Context < ::RDoc::CodeObject # aren't part of RDoc. # # source://rdoc/lib/rdoc/context.rb#713 - def each_ancestor; end + def each_ancestor(&_); end # Iterator for attributes # @@ -2943,7 +2943,7 @@ class RDoc::Markdown # source://rdoc/lib/rdoc/markdown.rb#16383 def _DefinitionListItem; end - # DefinitionListLabel = StrChunk:label @Sp @Newline { label } + # DefinitionListLabel = Inline:label @Sp @Newline { label } # # source://rdoc/lib/rdoc/markdown.rb#16449 def _DefinitionListLabel; end @@ -6087,19 +6087,24 @@ class RDoc::Markup::ToBs < ::RDoc::Markup::ToRdoc # source://rdoc/lib/rdoc/markup/to_bs.rb#33 def accept_heading(heading); end - # Turns on or off regexp handling for +convert_string+ + # Prepares the visitor for consuming +list_item+ # # source://rdoc/lib/rdoc/markup/to_bs.rb#46 + def accept_list_item_start(list_item); end + + # Turns on or off regexp handling for +convert_string+ + # + # source://rdoc/lib/rdoc/markup/to_bs.rb#71 def annotate(tag); end # Calls convert_string on the result of convert_regexp_handling # - # source://rdoc/lib/rdoc/markup/to_bs.rb#59 + # source://rdoc/lib/rdoc/markup/to_bs.rb#84 def convert_regexp_handling(target); end # Adds bold or underline mixed with backspaces # - # source://rdoc/lib/rdoc/markup/to_bs.rb#66 + # source://rdoc/lib/rdoc/markup/to_bs.rb#91 def convert_string(string); end # Sets a flag that is picked up by #annotate to do the right thing in @@ -6697,7 +6702,7 @@ class RDoc::Markup::ToMarkdown < ::RDoc::Markup::ToRdoc # Finishes consumption of `list_item` # - # source://rdoc/lib/rdoc/markup/to_markdown.rb#56 + # source://rdoc/lib/rdoc/markup/to_markdown.rb#54 def accept_list_item_end(list_item); end # Prepares the visitor for consuming `list_item` @@ -6779,7 +6784,7 @@ class RDoc::Markup::ToRdoc < ::RDoc::Markup::Formatter # Adds +paragraph+ to the output # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#203 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#211 def accept_indented_paragraph(paragraph); end # Finishes consumption of +list+ @@ -6799,52 +6804,52 @@ class RDoc::Markup::ToRdoc < ::RDoc::Markup::Formatter # Prepares the visitor for consuming +list+ # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#168 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#176 def accept_list_start(list); end # Adds +paragraph+ to the output # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#195 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#203 def accept_paragraph(paragraph); end # Adds +raw+ to the output # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#213 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#221 def accept_raw(raw); end # Adds +rule+ to the output # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#220 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#228 def accept_rule(rule); end # Adds +table+ to the output # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#243 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#251 def accept_table(header, body, aligns); end # Outputs +verbatim+ indented 2 columns # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#229 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#237 def accept_verbatim(verbatim); end # Applies attribute-specific markup to +text+ using RDoc::AttributeManager # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#271 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#279 def attributes(text); end # Returns the generated output # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#279 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#287 def end_accepting; end # Adds a newline to the output # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#295 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#303 def handle_regexp_HARD_BREAK(target); end # Removes preceding \\ from the suppressed crossref +target+ # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#286 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#294 def handle_regexp_SUPPRESSED_CROSSREF(target); end # Current indent amount for output in characters @@ -6889,13 +6894,13 @@ class RDoc::Markup::ToRdoc < ::RDoc::Markup::Formatter # Prepares the visitor for text generation # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#302 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#310 def start_accepting; end # Adds the stored #prefix to the output and clears it. Lists generate a # prefix for later consumption. # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#316 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#324 def use_prefix; end # Output width in characters @@ -6910,7 +6915,7 @@ class RDoc::Markup::ToRdoc < ::RDoc::Markup::Formatter # Wraps +text+ to #width # - # source://rdoc/lib/rdoc/markup/to_rdoc.rb#326 + # source://rdoc/lib/rdoc/markup/to_rdoc.rb#334 def wrap(text); end end @@ -7683,339 +7688,339 @@ end class RDoc::Options # @return [Options] a new instance of Options # - # source://rdoc/lib/rdoc/options.rb#346 + # source://rdoc/lib/rdoc/options.rb#347 def initialize(loaded_options = T.unsafe(nil)); end - # source://rdoc/lib/rdoc/options.rb#459 + # source://rdoc/lib/rdoc/options.rb#460 def ==(other); end # Character-set for HTML output. #encoding is preferred over #charset # - # source://rdoc/lib/rdoc/options.rb#151 + # source://rdoc/lib/rdoc/options.rb#152 def charset; end # Character-set for HTML output. #encoding is preferred over #charset # - # source://rdoc/lib/rdoc/options.rb#151 + # source://rdoc/lib/rdoc/options.rb#152 def charset=(_arg0); end # Check that the files on the command line exist # - # source://rdoc/lib/rdoc/options.rb#483 + # source://rdoc/lib/rdoc/options.rb#484 def check_files; end # Ensure only one generator is loaded # - # source://rdoc/lib/rdoc/options.rb#504 + # source://rdoc/lib/rdoc/options.rb#505 def check_generator; end # If true, only report on undocumented files # - # source://rdoc/lib/rdoc/options.rb#243 + # source://rdoc/lib/rdoc/options.rb#244 def coverage_report; end # If true, only report on undocumented files # - # source://rdoc/lib/rdoc/options.rb#243 + # source://rdoc/lib/rdoc/options.rb#244 def coverage_report=(_arg0); end # Set the title, but only if not already set. Used to set the title # from a source file, so that a title set from the command line # will have the priority. # - # source://rdoc/lib/rdoc/options.rb#516 + # source://rdoc/lib/rdoc/options.rb#517 def default_title=(string); end # If true, RDoc will not write any files. # - # source://rdoc/lib/rdoc/options.rb#156 + # source://rdoc/lib/rdoc/options.rb#157 def dry_run; end # If true, RDoc will not write any files. # - # source://rdoc/lib/rdoc/options.rb#156 + # source://rdoc/lib/rdoc/options.rb#157 def dry_run=(_arg0); end # The output encoding. All input files will be transcoded to this encoding. # # The default encoding is UTF-8. This is set via --encoding. # - # source://rdoc/lib/rdoc/options.rb#163 + # source://rdoc/lib/rdoc/options.rb#164 def encoding; end # The output encoding. All input files will be transcoded to this encoding. # # The default encoding is UTF-8. This is set via --encoding. # - # source://rdoc/lib/rdoc/options.rb#163 + # source://rdoc/lib/rdoc/options.rb#164 def encoding=(_arg0); end # Create a regexp for #exclude # - # source://rdoc/lib/rdoc/options.rb#544 + # source://rdoc/lib/rdoc/options.rb#545 def exclude; end # Files matching this pattern will be excluded # - # source://rdoc/lib/rdoc/options.rb#168 + # source://rdoc/lib/rdoc/options.rb#169 def exclude=(_arg0); end # The list of files to be processed # - # source://rdoc/lib/rdoc/options.rb#173 + # source://rdoc/lib/rdoc/options.rb#174 def files; end # The list of files to be processed # - # source://rdoc/lib/rdoc/options.rb#173 + # source://rdoc/lib/rdoc/options.rb#174 def files=(_arg0); end # Completes any unfinished option setup business such as filtering for # existent files, creating a regexp for #exclude and setting a default # #template. # - # source://rdoc/lib/rdoc/options.rb#560 + # source://rdoc/lib/rdoc/options.rb#561 def finish; end # Fixes the page_dir to be relative to the root_dir and adds the page_dir to # the files list. # - # source://rdoc/lib/rdoc/options.rb#601 + # source://rdoc/lib/rdoc/options.rb#602 def finish_page_dir; end # Create the output even if the output directory does not look # like an rdoc output directory # - # source://rdoc/lib/rdoc/options.rb#179 + # source://rdoc/lib/rdoc/options.rb#180 def force_output; end # Create the output even if the output directory does not look # like an rdoc output directory # - # source://rdoc/lib/rdoc/options.rb#179 + # source://rdoc/lib/rdoc/options.rb#180 def force_output=(_arg0); end # Scan newer sources than the flag file if true. # - # source://rdoc/lib/rdoc/options.rb#184 + # source://rdoc/lib/rdoc/options.rb#185 def force_update; end # Scan newer sources than the flag file if true. # - # source://rdoc/lib/rdoc/options.rb#184 + # source://rdoc/lib/rdoc/options.rb#185 def force_update=(_arg0); end # Formatter to mark up text with # - # source://rdoc/lib/rdoc/options.rb#189 + # source://rdoc/lib/rdoc/options.rb#190 def formatter; end # Formatter to mark up text with # - # source://rdoc/lib/rdoc/options.rb#189 + # source://rdoc/lib/rdoc/options.rb#190 def formatter=(_arg0); end # Description of the output generator (set with the --format option) # - # source://rdoc/lib/rdoc/options.rb#194 + # source://rdoc/lib/rdoc/options.rb#195 def generator; end # Description of the output generator (set with the --format option) # - # source://rdoc/lib/rdoc/options.rb#194 + # source://rdoc/lib/rdoc/options.rb#195 def generator=(_arg0); end # Returns a properly-space list of generators and their descriptions. # - # source://rdoc/lib/rdoc/options.rb#620 + # source://rdoc/lib/rdoc/options.rb#621 def generator_descriptions; end # For #== # - # source://rdoc/lib/rdoc/options.rb#199 + # source://rdoc/lib/rdoc/options.rb#200 def generator_name; end # Loaded generator options. Used to prevent --help from loading the same # options multiple times. # - # source://rdoc/lib/rdoc/options.rb#205 + # source://rdoc/lib/rdoc/options.rb#206 def generator_options; end # Loaded generator options. Used to prevent --help from loading the same # options multiple times. # - # source://rdoc/lib/rdoc/options.rb#205 + # source://rdoc/lib/rdoc/options.rb#206 def generator_options=(_arg0); end # Old rdoc behavior: hyperlink all words that match a method name, # even if not preceded by '#' or '::' # - # source://rdoc/lib/rdoc/options.rb#211 + # source://rdoc/lib/rdoc/options.rb#212 def hyperlink_all; end # Old rdoc behavior: hyperlink all words that match a method name, # even if not preceded by '#' or '::' # - # source://rdoc/lib/rdoc/options.rb#211 + # source://rdoc/lib/rdoc/options.rb#212 def hyperlink_all=(_arg0); end - # source://rdoc/lib/rdoc/options.rb#351 + # source://rdoc/lib/rdoc/options.rb#352 def init_ivars; end - # source://rdoc/lib/rdoc/options.rb#396 + # source://rdoc/lib/rdoc/options.rb#397 def init_with(map); end # Include line numbers in the source code # - # source://rdoc/lib/rdoc/options.rb#216 + # source://rdoc/lib/rdoc/options.rb#217 def line_numbers; end # Include line numbers in the source code # - # source://rdoc/lib/rdoc/options.rb#216 + # source://rdoc/lib/rdoc/options.rb#217 def line_numbers=(_arg0); end # The output locale. # - # source://rdoc/lib/rdoc/options.rb#221 + # source://rdoc/lib/rdoc/options.rb#222 def locale; end # The output locale. # - # source://rdoc/lib/rdoc/options.rb#221 + # source://rdoc/lib/rdoc/options.rb#222 def locale=(_arg0); end # The directory where locale data live. # - # source://rdoc/lib/rdoc/options.rb#226 + # source://rdoc/lib/rdoc/options.rb#227 def locale_dir; end # The directory where locale data live. # - # source://rdoc/lib/rdoc/options.rb#226 + # source://rdoc/lib/rdoc/options.rb#227 def locale_dir=(_arg0); end # Name of the file, class or module to display in the initial index page (if # not specified the first file we encounter is used) # - # source://rdoc/lib/rdoc/options.rb#232 + # source://rdoc/lib/rdoc/options.rb#233 def main_page; end # Name of the file, class or module to display in the initial index page (if # not specified the first file we encounter is used) # - # source://rdoc/lib/rdoc/options.rb#232 + # source://rdoc/lib/rdoc/options.rb#233 def main_page=(_arg0); end # The default markup format. The default is 'rdoc'. 'markdown', 'tomdoc' # and 'rd' are also built-in. # - # source://rdoc/lib/rdoc/options.rb#238 + # source://rdoc/lib/rdoc/options.rb#239 def markup; end # The default markup format. The default is 'rdoc'. 'markdown', 'tomdoc' # and 'rd' are also built-in. # - # source://rdoc/lib/rdoc/options.rb#238 + # source://rdoc/lib/rdoc/options.rb#239 def markup=(_arg0); end # The name of the output directory # - # source://rdoc/lib/rdoc/options.rb#248 + # source://rdoc/lib/rdoc/options.rb#249 def op_dir; end # The name of the output directory # - # source://rdoc/lib/rdoc/options.rb#248 + # source://rdoc/lib/rdoc/options.rb#249 def op_dir=(_arg0); end # The OptionParser for this instance # - # source://rdoc/lib/rdoc/options.rb#253 + # source://rdoc/lib/rdoc/options.rb#254 def option_parser; end # The OptionParser for this instance # - # source://rdoc/lib/rdoc/options.rb#253 + # source://rdoc/lib/rdoc/options.rb#254 def option_parser=(_arg0); end # Output heading decorations? # - # source://rdoc/lib/rdoc/options.rb#257 + # source://rdoc/lib/rdoc/options.rb#258 def output_decoration; end # Output heading decorations? # - # source://rdoc/lib/rdoc/options.rb#257 + # source://rdoc/lib/rdoc/options.rb#258 def output_decoration=(_arg0); end - # source://rdoc/lib/rdoc/options.rb#427 + # source://rdoc/lib/rdoc/options.rb#428 def override(map); end # Directory where guides, FAQ, and other pages not associated with a class # live. You may leave this unset if these are at the root of your project. # - # source://rdoc/lib/rdoc/options.rb#263 + # source://rdoc/lib/rdoc/options.rb#264 def page_dir; end # Directory where guides, FAQ, and other pages not associated with a class # live. You may leave this unset if these are at the root of your project. # - # source://rdoc/lib/rdoc/options.rb#263 + # source://rdoc/lib/rdoc/options.rb#264 def page_dir=(_arg0); end # Parses command line options. # - # source://rdoc/lib/rdoc/options.rb#646 + # source://rdoc/lib/rdoc/options.rb#647 def parse(argv); end # Is RDoc in pipe mode? # - # source://rdoc/lib/rdoc/options.rb#268 + # source://rdoc/lib/rdoc/options.rb#269 def pipe; end # Is RDoc in pipe mode? # - # source://rdoc/lib/rdoc/options.rb#268 + # source://rdoc/lib/rdoc/options.rb#269 def pipe=(_arg0); end # Don't display progress as we process the files # - # source://rdoc/lib/rdoc/options.rb#1191 + # source://rdoc/lib/rdoc/options.rb#1192 def quiet; end # Set quietness to +bool+ # - # source://rdoc/lib/rdoc/options.rb#1198 + # source://rdoc/lib/rdoc/options.rb#1199 def quiet=(bool); end # Array of directories to search for files to satisfy an :include: # - # source://rdoc/lib/rdoc/options.rb#273 + # source://rdoc/lib/rdoc/options.rb#274 def rdoc_include; end # Array of directories to search for files to satisfy an :include: # - # source://rdoc/lib/rdoc/options.rb#273 + # source://rdoc/lib/rdoc/options.rb#274 def rdoc_include=(_arg0); end # Root of the source documentation will be generated for. Set this when # building documentation outside the source directory. Defaults to the # current directory. # - # source://rdoc/lib/rdoc/options.rb#280 + # source://rdoc/lib/rdoc/options.rb#281 def root; end # Root of the source documentation will be generated for. Set this when # building documentation outside the source directory. Defaults to the # current directory. # - # source://rdoc/lib/rdoc/options.rb#280 + # source://rdoc/lib/rdoc/options.rb#281 def root=(_arg0); end # Removes directories from +path+ that are outside the current directory # - # source://rdoc/lib/rdoc/options.rb#1205 + # source://rdoc/lib/rdoc/options.rb#1206 def sanitize_path(path); end # Set up an output generator for the named +generator_name+. @@ -8024,117 +8029,117 @@ class RDoc::Options # the options instance. This allows generators to add custom options or set # default options. # - # source://rdoc/lib/rdoc/options.rb#1232 + # source://rdoc/lib/rdoc/options.rb#1233 def setup_generator(generator_name = T.unsafe(nil)); end # Include the '#' at the front of hyperlinked instance method names # - # source://rdoc/lib/rdoc/options.rb#285 + # source://rdoc/lib/rdoc/options.rb#286 def show_hash; end # Include the '#' at the front of hyperlinked instance method names # - # source://rdoc/lib/rdoc/options.rb#285 + # source://rdoc/lib/rdoc/options.rb#286 def show_hash=(_arg0); end # Indicates if files of test suites should be skipped # - # source://rdoc/lib/rdoc/options.rb#344 + # source://rdoc/lib/rdoc/options.rb#345 def skip_tests; end # Indicates if files of test suites should be skipped # - # source://rdoc/lib/rdoc/options.rb#344 + # source://rdoc/lib/rdoc/options.rb#345 def skip_tests=(_arg0); end # Directory to copy static files from # - # source://rdoc/lib/rdoc/options.rb#290 + # source://rdoc/lib/rdoc/options.rb#291 def static_path; end # Directory to copy static files from # - # source://rdoc/lib/rdoc/options.rb#290 + # source://rdoc/lib/rdoc/options.rb#291 def static_path=(_arg0); end # The number of columns in a tab # - # source://rdoc/lib/rdoc/options.rb#295 + # source://rdoc/lib/rdoc/options.rb#296 def tab_width; end # The number of columns in a tab # - # source://rdoc/lib/rdoc/options.rb#295 + # source://rdoc/lib/rdoc/options.rb#296 def tab_width=(_arg0); end # Template to be used when generating output # - # source://rdoc/lib/rdoc/options.rb#300 + # source://rdoc/lib/rdoc/options.rb#301 def template; end # Template to be used when generating output # - # source://rdoc/lib/rdoc/options.rb#300 + # source://rdoc/lib/rdoc/options.rb#301 def template=(_arg0); end # Directory the template lives in # - # source://rdoc/lib/rdoc/options.rb#305 + # source://rdoc/lib/rdoc/options.rb#306 def template_dir; end # Directory the template lives in # - # source://rdoc/lib/rdoc/options.rb#305 + # source://rdoc/lib/rdoc/options.rb#306 def template_dir=(_arg0); end # Finds the template dir for +template+ # - # source://rdoc/lib/rdoc/options.rb#1254 + # source://rdoc/lib/rdoc/options.rb#1255 def template_dir_for(template); end # Additional template stylesheets # - # source://rdoc/lib/rdoc/options.rb#310 + # source://rdoc/lib/rdoc/options.rb#311 def template_stylesheets; end # Additional template stylesheets # - # source://rdoc/lib/rdoc/options.rb#310 + # source://rdoc/lib/rdoc/options.rb#311 def template_stylesheets=(_arg0); end # Documentation title # - # source://rdoc/lib/rdoc/options.rb#315 + # source://rdoc/lib/rdoc/options.rb#316 def title; end # Documentation title # - # source://rdoc/lib/rdoc/options.rb#315 + # source://rdoc/lib/rdoc/options.rb#316 def title=(_arg0); end # For dumping YAML # - # source://rdoc/lib/rdoc/options.rb#523 + # source://rdoc/lib/rdoc/options.rb#524 def to_yaml(*options); end # Should RDoc update the timestamps in the output dir? # - # source://rdoc/lib/rdoc/options.rb#320 + # source://rdoc/lib/rdoc/options.rb#321 def update_output_dir; end # Should RDoc update the timestamps in the output dir? # - # source://rdoc/lib/rdoc/options.rb#320 + # source://rdoc/lib/rdoc/options.rb#321 def update_output_dir=(_arg0); end # Verbosity, zero means quiet # - # source://rdoc/lib/rdoc/options.rb#325 + # source://rdoc/lib/rdoc/options.rb#326 def verbosity; end # Verbosity, zero means quiet # - # source://rdoc/lib/rdoc/options.rb#325 + # source://rdoc/lib/rdoc/options.rb#326 def verbosity=(_arg0); end # Minimum visibility of a documented method. One of +:public+, +:protected+, @@ -8143,7 +8148,7 @@ class RDoc::Options # The +:nodoc+ visibility ignores all directives related to visibility. The # directive. # - # source://rdoc/lib/rdoc/options.rb#340 + # source://rdoc/lib/rdoc/options.rb#341 def visibility; end # Sets the minimum visibility of a documented method. @@ -8153,31 +8158,31 @@ class RDoc::Options # When +:all+ is passed, visibility is set to +:private+, similarly to # RDOCOPT="--all", see #visibility for more information. # - # source://rdoc/lib/rdoc/options.rb#1271 + # source://rdoc/lib/rdoc/options.rb#1272 def visibility=(visibility); end # Displays a warning using Kernel#warn if we're being verbose # - # source://rdoc/lib/rdoc/options.rb#1283 + # source://rdoc/lib/rdoc/options.rb#1284 def warn(message); end # URL of web cvs frontend # - # source://rdoc/lib/rdoc/options.rb#330 + # source://rdoc/lib/rdoc/options.rb#331 def webcvs; end # URL of web cvs frontend # - # source://rdoc/lib/rdoc/options.rb#330 + # source://rdoc/lib/rdoc/options.rb#331 def webcvs=(_arg0); end # Writes the YAML file .rdoc_options to the current directory containing the # parsed options. # - # source://rdoc/lib/rdoc/options.rb#1291 + # source://rdoc/lib/rdoc/options.rb#1292 def write_options; end - # source://rdoc/lib/rdoc/options.rb#423 + # source://rdoc/lib/rdoc/options.rb#424 def yaml_initialize(tag, map); end class << self @@ -8186,7 +8191,7 @@ class RDoc::Options # # @raise [RDoc::Error] # - # source://rdoc/lib/rdoc/options.rb#1305 + # source://rdoc/lib/rdoc/options.rb#1306 def load_options; end end end @@ -8228,7 +8233,7 @@ class RDoc::Parser # # @return [Parser] a new instance of Parser # - # source://rdoc/lib/rdoc/parser.rb#252 + # source://rdoc/lib/rdoc/parser.rb#254 def initialize(top_level, file_name, content, options, stats); end # The name of the file being parsed @@ -8238,7 +8243,7 @@ class RDoc::Parser # Normalizes tabs in +body+ # - # source://rdoc/lib/rdoc/parser.rb#272 + # source://rdoc/lib/rdoc/parser.rb#274 def handle_tab_width(body); end class << self @@ -8269,20 +8274,20 @@ class RDoc::Parser # Returns the file type from the modeline in +file_name+ # - # source://rdoc/lib/rdoc/parser.rb#141 + # source://rdoc/lib/rdoc/parser.rb#143 def check_modeline(file_name); end # Finds and instantiates the correct parser for the given +file_name+ and # +content+. # - # source://rdoc/lib/rdoc/parser.rb#167 + # source://rdoc/lib/rdoc/parser.rb#169 def for(top_level, file_name, content, options, stats); end # Record which file types this parser can understand. # # It is ok to call this multiple times. # - # source://rdoc/lib/rdoc/parser.rb#201 + # source://rdoc/lib/rdoc/parser.rb#203 def parse_files_matching(regexp); end # An Array of arrays that maps file extension (or name) regular @@ -8295,7 +8300,7 @@ class RDoc::Parser # Removes an emacs-style modeline from the first line of the document # - # source://rdoc/lib/rdoc/parser.rb#208 + # source://rdoc/lib/rdoc/parser.rb#210 def remove_modeline(content); end # If there is a markup: parser_name comment at the front of the @@ -8314,7 +8319,7 @@ class RDoc::Parser # # Any comment style may be used to hide the markup comment. # - # source://rdoc/lib/rdoc/parser.rb#229 + # source://rdoc/lib/rdoc/parser.rb#231 def use_markup(content); end # Checks if +file+ is a zip file in disguise. Signatures from @@ -8583,17 +8588,17 @@ class RDoc::Parser::C < ::RDoc::Parser # Finds a comment matching +type+ and +const_name+ either above the # comment or in the matching Document- section. # - # source://rdoc/lib/rdoc/parser/c.rb#779 + # source://rdoc/lib/rdoc/parser/c.rb#789 def find_const_comment(type, const_name, class_name = T.unsafe(nil)); end # Handles modifiers in +comment+ and updates +meth_obj+ as appropriate. # - # source://rdoc/lib/rdoc/parser/c.rb#796 + # source://rdoc/lib/rdoc/parser/c.rb#806 def find_modifiers(comment, meth_obj); end # Finds a Document-method override for +meth_obj+ on +class_name+ # - # source://rdoc/lib/rdoc/parser/c.rb#806 + # source://rdoc/lib/rdoc/parser/c.rb#816 def find_override_comment(class_name, meth_obj); end # Generate a Ruby-method table @@ -8609,13 +8614,13 @@ class RDoc::Parser::C < ::RDoc::Parser # Creates a new RDoc::Attr +attr_name+ on class +var_name+ that is either # +read+, +write+ or both # - # source://rdoc/lib/rdoc/parser/c.rb#828 + # source://rdoc/lib/rdoc/parser/c.rb#838 def handle_attr(var_name, attr_name, read, write); end # Creates a new RDoc::NormalClass or RDoc::NormalModule based on +type+ # named +class_name+ in +parent+ which was assigned to the C +var_name+. # - # source://rdoc/lib/rdoc/parser/c.rb#857 + # source://rdoc/lib/rdoc/parser/c.rb#867 def handle_class_module(var_name, type, class_name, parent, in_module); end # Adds constants. By providing some_value: at the start of the comment you @@ -8627,24 +8632,24 @@ class RDoc::Parser::C < ::RDoc::Parser # Will override INT2FIX(300) with the value +300+ in the output # RDoc. Values may include quotes and escaped colons (\:). # - # source://rdoc/lib/rdoc/parser/c.rb#922 + # source://rdoc/lib/rdoc/parser/c.rb#932 def handle_constants(type, var_name, const_name, definition); end # Removes #ifdefs that would otherwise confuse us # - # source://rdoc/lib/rdoc/parser/c.rb#972 + # source://rdoc/lib/rdoc/parser/c.rb#982 def handle_ifdefs_in(body); end # Adds an RDoc::AnyMethod +meth_name+ defined on a class or module assigned # to +var_name+. +type+ is the type of method definition function used. # +singleton_method+ and +module_function+ create a singleton method. # - # source://rdoc/lib/rdoc/parser/c.rb#981 + # source://rdoc/lib/rdoc/parser/c.rb#991 def handle_method(type, var_name, meth_name, function, param_count, source_file = T.unsafe(nil)); end # Registers a singleton class +sclass_var+ as a singleton of +class_var+ # - # source://rdoc/lib/rdoc/parser/c.rb#1051 + # source://rdoc/lib/rdoc/parser/c.rb#1061 def handle_singleton(sclass_var, class_var); end # Maps C variable names to names of Ruby classes (and singleton classes) @@ -8655,7 +8660,7 @@ class RDoc::Parser::C < ::RDoc::Parser # Loads the variable map with the given +name+ from the RDoc::Store, if # present. # - # source://rdoc/lib/rdoc/parser/c.rb#1062 + # source://rdoc/lib/rdoc/parser/c.rb#1072 def load_variable_map(map_name); end # Look for directives in a normal comment block: @@ -8666,7 +8671,7 @@ class RDoc::Parser::C < ::RDoc::Parser # # This method modifies the +comment+ # - # source://rdoc/lib/rdoc/parser/c.rb#1091 + # source://rdoc/lib/rdoc/parser/c.rb#1101 def look_for_directives_in(context, comment); end # Classes found while parsing the C file that were not yet registered due to @@ -8677,25 +8682,25 @@ class RDoc::Parser::C < ::RDoc::Parser # Creates a RDoc::Comment instance. # - # source://rdoc/lib/rdoc/parser/c.rb#1221 + # source://rdoc/lib/rdoc/parser/c.rb#1231 def new_comment(text = T.unsafe(nil), location = T.unsafe(nil), language = T.unsafe(nil)); end # Extracts parameters from the +method_body+ and returns a method # parameter string. Follows 1.9.3dev's scan-arg-spec, see README.EXT # - # source://rdoc/lib/rdoc/parser/c.rb#1110 + # source://rdoc/lib/rdoc/parser/c.rb#1120 def rb_scan_args(method_body); end # Removes lines that are commented out that might otherwise get picked up # when scanning for classes and methods # - # source://rdoc/lib/rdoc/parser/c.rb#1193 + # source://rdoc/lib/rdoc/parser/c.rb#1203 def remove_commented_out_lines; end # Extracts the classes, modules, methods, attributes, constants and aliases # from a C file and returns an RDoc::TopLevel for this file # - # source://rdoc/lib/rdoc/parser/c.rb#1201 + # source://rdoc/lib/rdoc/parser/c.rb#1211 def scan; end # Maps C variable names to names of Ruby singleton classes @@ -9407,76 +9412,76 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # Extracts call parameters from the token stream. # - # source://rdoc/lib/rdoc/parser/ruby.rb#801 + # source://rdoc/lib/rdoc/parser/ruby.rb#803 def parse_call_parameters(tk); end # Parses a class in +context+ with +comment+ # - # source://rdoc/lib/rdoc/parser/ruby.rb#844 + # source://rdoc/lib/rdoc/parser/ruby.rb#846 def parse_class(container, single, tk, comment); end # Parses and creates a regular class # - # source://rdoc/lib/rdoc/parser/ruby.rb#878 + # source://rdoc/lib/rdoc/parser/ruby.rb#880 def parse_class_regular(container, declaration_context, single, name_t, given_name, comment); end # Parses a singleton class in +container+ with the given +name+ and # +comment+. # - # source://rdoc/lib/rdoc/parser/ruby.rb#918 + # source://rdoc/lib/rdoc/parser/ruby.rb#920 def parse_class_singleton(container, name, comment); end # Generates an RDoc::Method or RDoc::Attr from +comment+ by looking for # :method: or :attr: directives in +comment+. # - # source://rdoc/lib/rdoc/parser/ruby.rb#1083 + # source://rdoc/lib/rdoc/parser/ruby.rb#1085 def parse_comment(container, tk, comment); end # Parse a comment that is describing an attribute in +container+ with the # given +name+ and +comment+. # - # source://rdoc/lib/rdoc/parser/ruby.rb#1111 + # source://rdoc/lib/rdoc/parser/ruby.rb#1113 def parse_comment_attr(container, type, name, comment); end - # source://rdoc/lib/rdoc/parser/ruby.rb#1123 + # source://rdoc/lib/rdoc/parser/ruby.rb#1125 def parse_comment_ghost(container, text, name, column, line_no, comment); end # Creates an RDoc::Method on +container+ from +comment+ if there is a # Signature section in the comment # - # source://rdoc/lib/rdoc/parser/ruby.rb#1162 + # source://rdoc/lib/rdoc/parser/ruby.rb#1164 def parse_comment_tomdoc(container, tk, comment); end # Parses a constant in +context+ with +comment+. If +ignore_constants+ is # true, no found constants will be added to RDoc. # - # source://rdoc/lib/rdoc/parser/ruby.rb#957 + # source://rdoc/lib/rdoc/parser/ruby.rb#959 def parse_constant(container, tk, comment, ignore_constants = T.unsafe(nil)); end - # source://rdoc/lib/rdoc/parser/ruby.rb#1024 + # source://rdoc/lib/rdoc/parser/ruby.rb#1026 def parse_constant_body(container, constant, is_array_or_hash); end # Parses a Module#private_constant or Module#public_constant call from +tk+. # - # source://rdoc/lib/rdoc/parser/ruby.rb#2094 + # source://rdoc/lib/rdoc/parser/ruby.rb#2103 def parse_constant_visibility(container, single, tk); end # Parses an +include+ or +extend+, indicated by the +klass+ and adds it to # +container+ # with +comment+ # - # source://rdoc/lib/rdoc/parser/ruby.rb#1197 + # source://rdoc/lib/rdoc/parser/ruby.rb#1199 def parse_extend_or_include(klass, container, comment); end # Parses identifiers that can create new methods or change visibility. # # Returns true if the comment was not consumed. # - # source://rdoc/lib/rdoc/parser/ruby.rb#1235 + # source://rdoc/lib/rdoc/parser/ruby.rb#1237 def parse_identifier(container, single, tk, comment); end # Parses an +included+ with a block feature of ActiveSupport::Concern. # - # source://rdoc/lib/rdoc/parser/ruby.rb#1217 + # source://rdoc/lib/rdoc/parser/ruby.rb#1219 def parse_included_with_activesupport_concern(container, comment); end # Parses a meta-programmed attribute and creates an RDoc::Attr. @@ -9507,34 +9512,34 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # # end # - # source://rdoc/lib/rdoc/parser/ruby.rb#1299 + # source://rdoc/lib/rdoc/parser/ruby.rb#1301 def parse_meta_attr(context, single, tk, comment); end # Parses a meta-programmed method # - # source://rdoc/lib/rdoc/parser/ruby.rb#1333 + # source://rdoc/lib/rdoc/parser/ruby.rb#1335 def parse_meta_method(container, single, tk, comment); end # Parses the name of a metaprogrammed method. +comment+ is used to # determine the name while +tk+ is used in an error message if the name # cannot be determined. # - # source://rdoc/lib/rdoc/parser/ruby.rb#1379 + # source://rdoc/lib/rdoc/parser/ruby.rb#1381 def parse_meta_method_name(comment, tk); end # Parses the parameters and block for a meta-programmed method. # - # source://rdoc/lib/rdoc/parser/ruby.rb#1403 + # source://rdoc/lib/rdoc/parser/ruby.rb#1405 def parse_meta_method_params(container, single, meth, tk, comment); end # Parses a normal method defined by +def+ # - # source://rdoc/lib/rdoc/parser/ruby.rb#1435 + # source://rdoc/lib/rdoc/parser/ruby.rb#1437 def parse_method(container, single, tk, comment); end # Parses a method that needs to be ignored. # - # source://rdoc/lib/rdoc/parser/ruby.rb#1514 + # source://rdoc/lib/rdoc/parser/ruby.rb#1522 def parse_method_dummy(container); end # Parses the name of a method in +container+. @@ -9542,25 +9547,25 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # Returns the method name, the container it is in (for def Foo.name) and if # it is a singleton or regular method. # - # source://rdoc/lib/rdoc/parser/ruby.rb#1527 + # source://rdoc/lib/rdoc/parser/ruby.rb#1535 def parse_method_name(container); end # For the given +container+ and initial name token +name_t+ the method name # is parsed from the token stream for a regular method. # - # source://rdoc/lib/rdoc/parser/ruby.rb#1554 + # source://rdoc/lib/rdoc/parser/ruby.rb#1562 def parse_method_name_regular(container, name_t); end # For the given +container+ and initial name token +name_t+ the method name # and the new +container+ (if necessary) are parsed from the token stream # for a singleton method. # - # source://rdoc/lib/rdoc/parser/ruby.rb#1572 + # source://rdoc/lib/rdoc/parser/ruby.rb#1580 def parse_method_name_singleton(container, name_t); end # Extracts +yield+ parameters from +method+ # - # source://rdoc/lib/rdoc/parser/ruby.rb#1616 + # source://rdoc/lib/rdoc/parser/ruby.rb#1624 def parse_method_or_yield_parameters(method = T.unsafe(nil), modifiers = T.unsafe(nil)); end # Capture the method's parameters. Along the way, look for a comment @@ -9570,69 +9575,69 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # # and add this as the block_params for the method # - # source://rdoc/lib/rdoc/parser/ruby.rb#1683 + # source://rdoc/lib/rdoc/parser/ruby.rb#1691 def parse_method_parameters(method); end # Parses the parameters and body of +meth+ # - # source://rdoc/lib/rdoc/parser/ruby.rb#1484 + # source://rdoc/lib/rdoc/parser/ruby.rb#1492 def parse_method_params_and_body(container, single, meth, added_container); end # Parses an RDoc::NormalModule in +container+ with +comment+ # - # source://rdoc/lib/rdoc/parser/ruby.rb#1698 + # source://rdoc/lib/rdoc/parser/ruby.rb#1706 def parse_module(container, single, tk, comment); end # Parses an RDoc::Require in +context+ containing +comment+ # - # source://rdoc/lib/rdoc/parser/ruby.rb#1720 + # source://rdoc/lib/rdoc/parser/ruby.rb#1728 def parse_require(context, comment); end # Parses a rescue # - # source://rdoc/lib/rdoc/parser/ruby.rb#1741 + # source://rdoc/lib/rdoc/parser/ruby.rb#1749 def parse_rescue; end # The core of the Ruby parser. # - # source://rdoc/lib/rdoc/parser/ruby.rb#1772 + # source://rdoc/lib/rdoc/parser/ruby.rb#1780 def parse_statements(container, single = T.unsafe(nil), current_method = T.unsafe(nil), comment = T.unsafe(nil)); end # Parse up to +no+ symbol arguments # - # source://rdoc/lib/rdoc/parser/ruby.rb#1962 + # source://rdoc/lib/rdoc/parser/ruby.rb#1971 def parse_symbol_arg(no = T.unsafe(nil)); end # Parses up to +no+ symbol arguments surrounded by () and places them in # +args+. # - # source://rdoc/lib/rdoc/parser/ruby.rb#1977 + # source://rdoc/lib/rdoc/parser/ruby.rb#1986 def parse_symbol_arg_paren(no); end # Parses up to +no+ symbol arguments separated by spaces and places them in # +args+. # - # source://rdoc/lib/rdoc/parser/ruby.rb#2005 + # source://rdoc/lib/rdoc/parser/ruby.rb#2014 def parse_symbol_arg_space(no, tk); end # Returns symbol text from the next token # - # source://rdoc/lib/rdoc/parser/ruby.rb#2036 + # source://rdoc/lib/rdoc/parser/ruby.rb#2045 def parse_symbol_in_arg; end # Parses statements in the top-level +container+ # - # source://rdoc/lib/rdoc/parser/ruby.rb#2053 + # source://rdoc/lib/rdoc/parser/ruby.rb#2062 def parse_top_level_statements(container); end # Determines the visibility in +container+ from +tk+ # - # source://rdoc/lib/rdoc/parser/ruby.rb#2071 + # source://rdoc/lib/rdoc/parser/ruby.rb#2080 def parse_visibility(container, single, tk); end # Determines the block parameter for +context+ # - # source://rdoc/lib/rdoc/parser/ruby.rb#2110 + # source://rdoc/lib/rdoc/parser/ruby.rb#2119 def parse_yield(context, single, tk, method); end # Directives are modifier comments that can appear after class, module, or @@ -9647,7 +9652,7 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # the name is in +allowed+. A directive can be found anywhere up to the end # of the current line. # - # source://rdoc/lib/rdoc/parser/ruby.rb#2131 + # source://rdoc/lib/rdoc/parser/ruby.rb#2140 def read_directive(allowed); end # Handles directives following the definition for +context+ (any @@ -9655,38 +9660,38 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # # See also RDoc::Markup::PreProcess#handle_directive # - # source://rdoc/lib/rdoc/parser/ruby.rb#2163 + # source://rdoc/lib/rdoc/parser/ruby.rb#2172 def read_documentation_modifiers(context, allowed); end # Records the location of this +container+ in the file for this parser and # adds it to the list of classes and modules in the file. # - # source://rdoc/lib/rdoc/parser/ruby.rb#2182 + # source://rdoc/lib/rdoc/parser/ruby.rb#2191 def record_location(container); end # Retrieve comment body without =begin/=end # - # source://rdoc/lib/rdoc/parser/ruby.rb#1761 + # source://rdoc/lib/rdoc/parser/ruby.rb#1769 def retrieve_comment_body(tk); end # Scans this Ruby file for Ruby constructs # - # source://rdoc/lib/rdoc/parser/ruby.rb#2194 + # source://rdoc/lib/rdoc/parser/ruby.rb#2203 def scan; end # skip the var [in] part of a 'for' statement # - # source://rdoc/lib/rdoc/parser/ruby.rb#2282 + # source://rdoc/lib/rdoc/parser/ruby.rb#2291 def skip_for_variable; end # Skips the next method in +container+ # - # source://rdoc/lib/rdoc/parser/ruby.rb#2293 + # source://rdoc/lib/rdoc/parser/ruby.rb#2302 def skip_method(container); end # while, until, and for have an optional do # - # source://rdoc/lib/rdoc/parser/ruby.rb#2241 + # source://rdoc/lib/rdoc/parser/ruby.rb#2250 def skip_optional_do_after_expression; end # Skip opening parentheses and yield the block. @@ -9697,7 +9702,7 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # Skip spaces until a comment is found # - # source://rdoc/lib/rdoc/parser/ruby.rb#2302 + # source://rdoc/lib/rdoc/parser/ruby.rb#2311 def skip_tkspace_comment(skip_nl = T.unsafe(nil)); end # Marks containers between +container+ and +ancestor+ as ignored @@ -9714,12 +9719,12 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # Updates visibility in +container+ from +vis_type+ and +vis+. # - # source://rdoc/lib/rdoc/parser/ruby.rb#2314 + # source://rdoc/lib/rdoc/parser/ruby.rb#2323 def update_visibility(container, vis_type, vis, singleton); end # Prints +message+ to +$stderr+ unless we're being quiet # - # source://rdoc/lib/rdoc/parser/ruby.rb#2359 + # source://rdoc/lib/rdoc/parser/ruby.rb#2368 def warn(message); end end @@ -9840,310 +9845,310 @@ end # RD format parser for headings, paragraphs, lists, verbatim sections that # exist as blocks. # -# source://rdoc/lib/rdoc/rd/block_parser.rb#664 +# source://rdoc/lib/rdoc/rd/block_parser.rb#660 class RDoc::RD::BlockParser < ::Racc::Parser # Creates a new RDoc::RD::BlockParser. Use #parse to parse an rd-format # document. # # @return [BlockParser] a new instance of BlockParser # - # source://rdoc/lib/rdoc/rd/block_parser.rb#699 + # source://rdoc/lib/rdoc/rd/block_parser.rb#695 def initialize; end # reduce 0 omitted # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1334 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1330 def _reduce_1(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1376 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1372 def _reduce_10(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1381 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1377 def _reduce_11(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1386 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1382 def _reduce_12(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1394 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1390 def _reduce_13(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1400 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1396 def _reduce_14(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1407 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1403 def _reduce_15(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1412 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1408 def _reduce_16(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1417 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1413 def _reduce_17(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1428 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1424 def _reduce_18(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1439 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1435 def _reduce_19(val, _values, result); end # @raise [ParseError] # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1339 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1335 def _reduce_2(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1445 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1441 def _reduce_20(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1451 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1447 def _reduce_21(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1457 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1453 def _reduce_22(val, _values, result); end # reduce 26 omitted # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1473 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1469 def _reduce_27(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1479 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1475 def _reduce_28(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1485 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1481 def _reduce_29(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1344 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1340 def _reduce_3(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1491 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1487 def _reduce_30(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1496 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1492 def _reduce_31(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1501 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1497 def _reduce_32(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1507 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1503 def _reduce_33(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1512 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1508 def _reduce_34(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1517 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1513 def _reduce_35(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1523 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1519 def _reduce_36(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1529 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1525 def _reduce_37(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1534 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1530 def _reduce_38(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1539 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1535 def _reduce_39(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1349 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1345 def _reduce_4(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1545 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1541 def _reduce_40(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1551 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1547 def _reduce_41(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1556 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1552 def _reduce_42(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1561 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1557 def _reduce_43(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1569 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1565 def _reduce_44(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1575 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1571 def _reduce_45(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1580 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1576 def _reduce_46(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1585 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1581 def _reduce_47(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1591 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1587 def _reduce_48(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1597 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1593 def _reduce_49(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1354 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1350 def _reduce_5(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1603 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1599 def _reduce_50(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1609 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1605 def _reduce_51(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1615 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1611 def _reduce_52(val, _values, result); end # reduce 53 omitted # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1622 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1618 def _reduce_54(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1627 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1623 def _reduce_55(val, _values, result); end # reduce 56 omitted # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1634 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1630 def _reduce_57(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1359 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1355 def _reduce_6(val, _values, result); end # reduce 61 omitted # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1647 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1643 def _reduce_62(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1653 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1649 def _reduce_63(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1659 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1655 def _reduce_64(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1665 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1661 def _reduce_65(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1671 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1667 def _reduce_66(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1677 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1673 def _reduce_67(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1682 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1678 def _reduce_68(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1687 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1683 def _reduce_69(val, _values, result); end # reduce 70 omitted # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1694 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1690 def _reduce_71(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1699 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1695 def _reduce_72(val, _values, result); end # reduce 7 omitted # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1366 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1362 def _reduce_8(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1371 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1367 def _reduce_9(val, _values, result); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#1704 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1700 def _reduce_none(val, _values, result); end # Adds footnote +content+ to the document # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1049 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1045 def add_footnote(content); end # Adds label +label+ to the document # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1063 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1059 def add_label(label); end # Retrieves the content of +values+ as a single String # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1032 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1028 def content(values); end # Footnotes for this document # - # source://rdoc/lib/rdoc/rd/block_parser.rb#683 + # source://rdoc/lib/rdoc/rd/block_parser.rb#679 def footnotes; end # Path to find included files in # - # source://rdoc/lib/rdoc/rd/block_parser.rb#693 + # source://rdoc/lib/rdoc/rd/block_parser.rb#689 def include_path; end # Path to find included files in # - # source://rdoc/lib/rdoc/rd/block_parser.rb#693 + # source://rdoc/lib/rdoc/rd/block_parser.rb#689 def include_path=(_arg0); end # Labels for items in this document # - # source://rdoc/lib/rdoc/rd/block_parser.rb#688 + # source://rdoc/lib/rdoc/rd/block_parser.rb#684 def labels; end # Current line number # - # source://rdoc/lib/rdoc/rd/block_parser.rb#987 + # source://rdoc/lib/rdoc/rd/block_parser.rb#983 def line_index; end # Returns the next token from the document # - # source://rdoc/lib/rdoc/rd/block_parser.rb#755 + # source://rdoc/lib/rdoc/rd/block_parser.rb#751 def next_token; end # Raises a ParseError when invalid formatting is found # # @raise [ParseError] # - # source://rdoc/lib/rdoc/rd/block_parser.rb#971 + # source://rdoc/lib/rdoc/rd/block_parser.rb#967 def on_error(et, ev, _values); end # Creates a paragraph for +value+ # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1039 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1035 def paragraph(value); end # Parses +src+ and returns an RDoc::Markup::Document. # - # source://rdoc/lib/rdoc/rd/block_parser.rb#711 + # source://rdoc/lib/rdoc/rd/block_parser.rb#707 def parse(src); end private # Cuts off excess whitespace in +src+ # - # source://rdoc/lib/rdoc/rd/block_parser.rb#935 + # source://rdoc/lib/rdoc/rd/block_parser.rb#931 def cut_off(src); end # Formats line numbers +line_numbers+ prettily # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1023 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1019 def format_line_num(*line_numbers); end # Retrieves the content for +file+ from the include_path # - # source://rdoc/lib/rdoc/rd/block_parser.rb#1004 + # source://rdoc/lib/rdoc/rd/block_parser.rb#1000 def get_included(file); end # Yields to the given block if +indent+ matches the current indent, otherwise # an indentation token is processed. # - # source://rdoc/lib/rdoc/rd/block_parser.rb#917 + # source://rdoc/lib/rdoc/rd/block_parser.rb#913 def if_current_indent_equal(indent); end # Parses subtree +src+ # - # source://rdoc/lib/rdoc/rd/block_parser.rb#994 + # source://rdoc/lib/rdoc/rd/block_parser.rb#990 def parse_subtree(src); end - # source://rdoc/lib/rdoc/rd/block_parser.rb#962 + # source://rdoc/lib/rdoc/rd/block_parser.rb#958 def set_term_to_element(parent, term); end end -# source://rdoc/lib/rdoc/rd/block_parser.rb#1328 +# source://rdoc/lib/rdoc/rd/block_parser.rb#1324 RDoc::RD::BlockParser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) # Inline keeps track of markup and labels to create proper links. @@ -10196,234 +10201,234 @@ end # RD format parser for inline markup such as emphasis, links, footnotes, etc. # -# source://rdoc/lib/rdoc/rd/inline_parser.rb#665 +# source://rdoc/lib/rdoc/rd/inline_parser.rb#661 class RDoc::RD::InlineParser < ::Racc::Parser # Creates a new parser for inline markup in the rd format. The +block_parser+ # is used to for footnotes and labels in the inline text. # # @return [InlineParser] a new instance of InlineParser # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#738 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#734 def initialize(block_parser); end # reduce 100 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1750 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1746 def _reduce_101(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1757 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1753 def _reduce_102(val, _values, result); end # reduce 108 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1775 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1771 def _reduce_109(val, _values, result); end # reduce 110 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1782 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1778 def _reduce_111(val, _values, result); end # reduce 112 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1790 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1786 def _reduce_113(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1795 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1791 def _reduce_114(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1800 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1796 def _reduce_115(val, _values, result); end # reduce 12 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1413 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1409 def _reduce_13(val, _values, result); end # reduce 135 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1845 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1841 def _reduce_136(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1420 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1416 def _reduce_14(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1427 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1423 def _reduce_15(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1434 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1430 def _reduce_16(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1441 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1437 def _reduce_17(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1449 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1445 def _reduce_18(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1455 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1451 def _reduce_19(val, _values, result); end # reduce 1 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1385 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1381 def _reduce_2(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1463 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1459 def _reduce_20(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1469 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1465 def _reduce_21(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1478 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1474 def _reduce_22(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1484 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1480 def _reduce_23(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1490 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1486 def _reduce_24(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1496 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1492 def _reduce_25(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1505 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1501 def _reduce_26(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1511 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1507 def _reduce_27(val, _values, result); end # reduce 28 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1520 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1516 def _reduce_29(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1390 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1386 def _reduce_3(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1525 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1521 def _reduce_30(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1530 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1526 def _reduce_31(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1536 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1532 def _reduce_32(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1542 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1538 def _reduce_33(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1548 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1544 def _reduce_34(val, _values, result); end # reduce 35 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1556 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1552 def _reduce_36(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1561 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1557 def _reduce_37(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1566 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1562 def _reduce_38(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1572 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1568 def _reduce_39(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1578 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1574 def _reduce_40(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1584 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1580 def _reduce_41(val, _values, result); end # reduce 42 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1592 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1588 def _reduce_43(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1598 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1594 def _reduce_44(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1604 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1600 def _reduce_45(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1610 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1606 def _reduce_46(val, _values, result); end # reduce 56 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1636 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1632 def _reduce_57(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1642 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1638 def _reduce_58(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1648 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1644 def _reduce_59(val, _values, result); end - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1654 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1650 def _reduce_60(val, _values, result); end # reduce 61 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1661 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1657 def _reduce_62(val, _values, result); end # reduce 63 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1669 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1665 def _reduce_64(val, _values, result); end # reduce 77 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1701 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1697 def _reduce_78(val, _values, result); end # reduce 137 omitted # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#1852 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#1848 def _reduce_none(val, _values, result); end # Creates a new RDoc::RD::Inline for the +rdoc+ markup and the raw +reference+ # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#887 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#883 def inline(rdoc, reference = T.unsafe(nil)); end # Returns the next token from the inline text # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#756 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#752 def next_token; end # Returns words following an error # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#876 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#872 def next_words_on_error; end # Raises a ParseError when invalid formatting is found # # @raise [ParseError] # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#836 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#832 def on_error(et, ev, values); end # Parses the +inline+ text from RD format into RDoc format. # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#745 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#741 def parse(inline); end # Returns words before the error # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#853 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#849 def prev_words_on_error(ev); end private # Returns the last line of +src+ # - # source://rdoc/lib/rdoc/rd/inline_parser.rb#864 + # source://rdoc/lib/rdoc/rd/inline_parser.rb#860 def last_line(src); end end -# source://rdoc/lib/rdoc/rd/inline_parser.rb#1377 +# source://rdoc/lib/rdoc/rd/inline_parser.rb#1373 RDoc::RD::InlineParser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) # This is the driver for generating RDoc output. It handles file parsing and diff --git a/sorbet/rbi/gems/reline@0.5.7.rbi b/sorbet/rbi/gems/reline@0.5.10.rbi similarity index 100% rename from sorbet/rbi/gems/reline@0.5.7.rbi rename to sorbet/rbi/gems/reline@0.5.10.rbi diff --git a/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi b/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi index 6ec8e143..b5956722 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi @@ -698,6 +698,12 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3forwardable.rb#231 def compact!(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 + def compact_blank(*args, **_arg1, &block); end + + # source://forwardable/1.3.3forwardable.rb#231 + def compact_blank!(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 def concat(*args, **_arg1, &block); end @@ -761,6 +767,15 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3forwardable.rb#231 def entries(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 + def exclude?(*args, **_arg1, &block); end + + # source://forwardable/1.3.3forwardable.rb#231 + def excluding(*args, **_arg1, &block); end + + # source://forwardable/1.3.3forwardable.rb#231 + def extract!(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 def extract_options!(*args, **_arg1, &block); end @@ -809,12 +824,24 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3forwardable.rb#231 def group_by(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 + def in_order_of(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 def include?(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 + def including(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 def index(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 + def index_by(*args, **_arg1, &block); end + + # source://forwardable/1.3.3forwardable.rb#231 + def index_with(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 def inject(*args, **_arg1, &block); end @@ -842,6 +869,9 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3forwardable.rb#231 def length(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 + def many?(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 def map(*args, **_arg1, &block); end @@ -854,6 +884,9 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3forwardable.rb#231 def max_by(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 + def maximum(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 def member?(*args, **_arg1, &block); end @@ -863,6 +896,9 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3forwardable.rb#231 def min_by(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 + def minimum(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 def minmax(*args, **_arg1, &block); end @@ -884,9 +920,15 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3forwardable.rb#231 def permutation(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 + def pick(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 def place(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 + def pluck(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 def pop(*args, **_arg1, &block); end @@ -977,6 +1019,9 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3forwardable.rb#231 def slice_when(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 + def sole(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 def sort(*args, **_arg1, &block); end @@ -1004,9 +1049,6 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3forwardable.rb#231 def to_ary(*args, **_arg1, &block); end - # source://forwardable/1.3.3forwardable.rb#231 - def to_default_s(*args, **_arg1, &block); end - # source://forwardable/1.3.3forwardable.rb#231 def to_formatted_s(*args, **_arg1, &block); end @@ -1043,6 +1085,9 @@ module RuboCop::AST::CollectionNode # source://forwardable/1.3.3forwardable.rb#231 def values_at(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 + def without(*args, **_arg1, &block); end + # source://forwardable/1.3.3forwardable.rb#231 def zip(*args, **_arg1, &block); end diff --git a/sorbet/rbi/gems/ruby-lsp@0.21.0.rbi b/sorbet/rbi/gems/ruby-lsp@0.21.2.rbi similarity index 97% rename from sorbet/rbi/gems/ruby-lsp@0.21.0.rbi rename to sorbet/rbi/gems/ruby-lsp@0.21.2.rbi index ebd622fb..79f8bf17 100644 --- a/sorbet/rbi/gems/ruby-lsp@0.21.0.rbi +++ b/sorbet/rbi/gems/ruby-lsp@0.21.2.rbi @@ -2031,15 +2031,20 @@ end # # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#7 class RubyLsp::ClientCapabilities - # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#16 + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#17 sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#34 + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#38 sig { params(capabilities: T::Hash[::Symbol, T.untyped]).void } def apply_client_capabilities(capabilities); end - # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#56 + # @return [Boolean] + # + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#11 + def supports_progress; end + + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#63 sig { returns(T::Boolean) } def supports_rename?; end @@ -2299,17 +2304,17 @@ class RubyLsp::ERBDocument::ERBScanner def scan_char; end end -# source://ruby-lsp/lib/ruby_lsp/utils.rb#115 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#170 class RubyLsp::Error - # source://ruby-lsp/lib/ruby_lsp/utils.rb#122 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#177 sig { params(id: ::Integer, code: ::Integer, message: ::String, data: T.nilable(T::Hash[::Symbol, T.untyped])).void } def initialize(id:, code:, message:, data: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#119 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#174 sig { returns(::String) } def message; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#130 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#185 sig { returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end end @@ -2381,6 +2386,10 @@ class RubyLsp::GlobalState sig { params(addon_name: ::String).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } def settings_for_addon(addon_name); end + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#163 + sig { returns(T::Boolean) } + def supports_watching_files; end + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#9 sig { returns(::String) } def test_library; end @@ -2400,42 +2409,42 @@ class RubyLsp::GlobalState private - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#221 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#226 sig { returns(T::Boolean) } def bin_rails_present; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#165 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#170 sig { params(direct_dependencies: T::Array[::String], all_dependencies: T::Array[::String]).returns(::String) } def detect_formatter(direct_dependencies, all_dependencies); end # Try to detect if there are linters in the project's dependencies. For auto-detection, we always only consider a # single linter. To have multiple linters running, the user must configure them manually # - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#181 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#186 sig { params(dependencies: T::Array[::String], all_dependencies: T::Array[::String]).returns(T::Array[::String]) } def detect_linters(dependencies, all_dependencies); end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#192 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#197 sig { params(dependencies: T::Array[::String]).returns(::String) } def detect_test_library(dependencies); end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#212 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#217 sig { params(dependencies: T::Array[::String]).returns(T::Boolean) } def detect_typechecker(dependencies); end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#226 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#231 sig { returns(T::Boolean) } def dot_rubocop_yml_present; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#248 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#253 sig { returns(T::Array[::String]) } def gather_direct_and_indirect_dependencies; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#231 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#236 sig { returns(T::Array[::String]) } def gather_direct_dependencies; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#241 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#246 sig { returns(T::Array[::String]) } def gemspec_dependencies; end end @@ -3846,11 +3855,36 @@ end # source://ruby-lsp/lib/ruby_lsp/utils.rb#63 class RubyLsp::Notification < ::RubyLsp::Message - # source://ruby-lsp/lib/ruby_lsp/utils.rb#95 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#150 sig { override.returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end class << self + # source://ruby-lsp/lib/ruby_lsp/utils.rb#99 + sig do + params( + id: ::String, + title: ::String, + percentage: T.nilable(::Integer), + message: T.nilable(::String) + ).returns(::RubyLsp::Notification) + end + def progress_begin(id, title, percentage: T.unsafe(nil), message: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#136 + sig { params(id: ::String).returns(::RubyLsp::Notification) } + def progress_end(id); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#121 + sig do + params( + id: ::String, + percentage: T.nilable(::Integer), + message: T.nilable(::String) + ).returns(::RubyLsp::Notification) + end + def progress_report(id, percentage: T.unsafe(nil), message: T.unsafe(nil)); end + # source://ruby-lsp/lib/ruby_lsp/utils.rb#84 sig { params(data: T::Hash[::Symbol, T.untyped]).returns(::RubyLsp::Notification) } def telemetry(data); end @@ -3888,35 +3922,35 @@ class RubyLsp::RBSDocument < ::RubyLsp::Document def syntax_error?; end end -# source://ruby-lsp/lib/ruby_lsp/utils.rb#100 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#155 class RubyLsp::Request < ::RubyLsp::Message - # source://ruby-lsp/lib/ruby_lsp/utils.rb#104 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#159 sig { params(id: T.any(::Integer, ::String), method: ::String, params: ::Object).void } def initialize(id:, method:, params:); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#110 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#165 sig { override.returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end end # A request configuration, to turn on/off features # -# source://ruby-lsp/lib/ruby_lsp/utils.rb#165 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#220 class RubyLsp::RequestConfig - # source://ruby-lsp/lib/ruby_lsp/utils.rb#172 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#227 sig { params(configuration: T::Hash[::Symbol, T::Boolean]).void } def initialize(configuration); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#169 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#224 sig { returns(T::Hash[::Symbol, T::Boolean]) } def configuration; end # @return [Hash{Symbol => Boolean}] # - # source://ruby-lsp/lib/ruby_lsp/utils.rb#169 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#224 def configuration=(_arg0); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#177 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#232 sig { params(feature: ::Symbol).returns(T.nilable(T::Boolean)) } def enabled?(feature); end end @@ -5421,21 +5455,21 @@ end # The final result of running a request before its IO is finalized # -# source://ruby-lsp/lib/ruby_lsp/utils.rb#143 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#198 class RubyLsp::Result - # source://ruby-lsp/lib/ruby_lsp/utils.rb#153 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#208 sig { params(id: ::Integer, response: T.untyped).void } def initialize(id:, response:); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#150 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#205 sig { returns(::Integer) } def id; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#147 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#202 sig { returns(T.untyped) } def response; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#159 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#214 sig { returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end end @@ -5558,7 +5592,7 @@ class RubyLsp::Server < ::RubyLsp::BaseServer sig { returns(::RubyLsp::GlobalState) } def global_state; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#144 + # source://ruby-lsp/lib/ruby_lsp/server.rb#153 sig { params(include_project_addons: T::Boolean).void } def load_addons(include_project_addons: T.unsafe(nil)); end @@ -5566,57 +5600,63 @@ class RubyLsp::Server < ::RubyLsp::BaseServer sig { override.params(message: T::Hash[::Symbol, T.untyped]).void } def process_message(message); end + # Process responses to requests that were sent to the client + # + # source://ruby-lsp/lib/ruby_lsp/server.rb#145 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def process_response(message); end + private - # source://ruby-lsp/lib/ruby_lsp/server.rb#1107 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1114 sig { params(id: ::String, title: ::String, percentage: ::Integer).void } def begin_progress(id, title, percentage: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1168 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1144 sig { void } def check_formatter_is_available; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#793 + # source://ruby-lsp/lib/ruby_lsp/server.rb#800 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def code_action_resolve(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1150 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1134 sig { params(id: ::String).void } def end_progress(id); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1075 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1082 sig { void } def perform_initial_indexing; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1187 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1163 sig { params(indexing_options: T.nilable(T::Hash[::Symbol, T.untyped])).void } def process_indexing_configuration(indexing_options); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1131 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1127 sig { params(id: ::String, percentage: ::Integer).void } def progress(id, percentage); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#441 + # source://ruby-lsp/lib/ruby_lsp/server.rb#448 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def run_combined_requests(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#184 + # source://ruby-lsp/lib/ruby_lsp/server.rb#193 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def run_initialize(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#322 + # source://ruby-lsp/lib/ruby_lsp/server.rb#329 sig { void } def run_initialized; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1070 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1077 sig { override.void } def shutdown; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#729 + # source://ruby-lsp/lib/ruby_lsp/server.rb#736 sig { params(document: RubyLsp::Document[T.untyped]).returns(::RubyLsp::RubyDocument::SorbetLevel) } def sorbet_level(document); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#771 + # source://ruby-lsp/lib/ruby_lsp/server.rb#778 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_code_action(message); end @@ -5626,35 +5666,35 @@ class RubyLsp::Server < ::RubyLsp::BaseServer # source://sorbet-runtime/0.5.11577lib/types/private/methods/_methods.rb#257 def text_document_code_lens(*args, **_arg1, &blk); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#858 + # source://ruby-lsp/lib/ruby_lsp/server.rb#865 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_completion(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#883 + # source://ruby-lsp/lib/ruby_lsp/server.rb#890 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_completion_item_resolve(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#928 + # source://ruby-lsp/lib/ruby_lsp/server.rb#935 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_definition(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#818 + # source://ruby-lsp/lib/ruby_lsp/server.rb#825 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_diagnostic(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#405 + # source://ruby-lsp/lib/ruby_lsp/server.rb#412 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_change(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#389 + # source://ruby-lsp/lib/ruby_lsp/server.rb#396 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_close(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#349 + # source://ruby-lsp/lib/ruby_lsp/server.rb#356 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_open(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#627 + # source://ruby-lsp/lib/ruby_lsp/server.rb#634 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_document_highlight(message); end @@ -5676,94 +5716,94 @@ class RubyLsp::Server < ::RubyLsp::BaseServer # source://sorbet-runtime/0.5.11577lib/types/private/methods/_methods.rb#257 def text_document_folding_range(*args, **_arg1, &blk); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#588 + # source://ruby-lsp/lib/ruby_lsp/server.rb#595 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_formatting(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#666 + # source://ruby-lsp/lib/ruby_lsp/server.rb#673 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_hover(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#737 + # source://ruby-lsp/lib/ruby_lsp/server.rb#744 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_inlay_hint(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#643 + # source://ruby-lsp/lib/ruby_lsp/server.rb#650 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_on_type_formatting(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1012 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1019 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_prepare_type_hierarchy(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#560 + # source://ruby-lsp/lib/ruby_lsp/server.rb#567 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_range_formatting(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#711 + # source://ruby-lsp/lib/ruby_lsp/server.rb#718 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_references(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#691 + # source://ruby-lsp/lib/ruby_lsp/server.rb#698 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_rename(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#415 + # source://ruby-lsp/lib/ruby_lsp/server.rb#422 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_selection_range(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#506 + # source://ruby-lsp/lib/ruby_lsp/server.rb#513 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_delta(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#485 + # source://ruby-lsp/lib/ruby_lsp/server.rb#492 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_full(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#531 + # source://ruby-lsp/lib/ruby_lsp/server.rb#538 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_range(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#993 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1000 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_show_syntax_tree(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#902 + # source://ruby-lsp/lib/ruby_lsp/server.rb#909 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_signature_help(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1040 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1047 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def type_hierarchy_subtypes(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1031 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1038 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def type_hierarchy_supertypes(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1228 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1204 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def window_show_message_request(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1047 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1054 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_dependencies(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#953 + # source://ruby-lsp/lib/ruby_lsp/server.rb#960 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_did_change_watched_files(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#980 + # source://ruby-lsp/lib/ruby_lsp/server.rb#987 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_symbol(message); end end # source://ruby-lsp/lib/ruby_lsp/store.rb#5 class RubyLsp::Store - # source://ruby-lsp/lib/ruby_lsp/store.rb#20 + # source://ruby-lsp/lib/ruby_lsp/store.rb#17 sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_lsp/store.rb#122 + # source://ruby-lsp/lib/ruby_lsp/store.rb#118 sig do type_parameters(:T) .params( @@ -5774,53 +5814,53 @@ class RubyLsp::Store end def cache_fetch(uri, request_name, &block); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#88 + # source://ruby-lsp/lib/ruby_lsp/store.rb#84 sig { void } def clear; end - # source://ruby-lsp/lib/ruby_lsp/store.rb#17 + # source://ruby-lsp/lib/ruby_lsp/store.rb#14 sig { returns(::String) } def client_name; end # @return [String] # - # source://ruby-lsp/lib/ruby_lsp/store.rb#17 + # source://ruby-lsp/lib/ruby_lsp/store.rb#14 def client_name=(_arg0); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#98 + # source://ruby-lsp/lib/ruby_lsp/store.rb#94 sig { params(uri: ::URI::Generic).void } def delete(uri); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#108 + # source://ruby-lsp/lib/ruby_lsp/store.rb#104 sig { params(block: T.proc.params(uri: ::String, document: RubyLsp::Document[T.untyped]).void).void } def each(&block); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#93 + # source://ruby-lsp/lib/ruby_lsp/store.rb#89 sig { returns(T::Boolean) } def empty?; end - # source://ruby-lsp/lib/ruby_lsp/store.rb#14 + # source://ruby-lsp/lib/ruby_lsp/store.rb#11 sig { returns(T::Hash[::Symbol, ::RubyLsp::RequestConfig]) } def features_configuration; end # @return [Hash{Symbol => RequestConfig}] # - # source://ruby-lsp/lib/ruby_lsp/store.rb#14 + # source://ruby-lsp/lib/ruby_lsp/store.rb#11 def features_configuration=(_arg0); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#37 + # source://ruby-lsp/lib/ruby_lsp/store.rb#33 sig { params(uri: ::URI::Generic).returns(RubyLsp::Document[T.untyped]) } def get(uri); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#103 + # source://ruby-lsp/lib/ruby_lsp/store.rb#99 sig { params(uri: ::URI::Generic).returns(T::Boolean) } def key?(uri); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#83 + # source://ruby-lsp/lib/ruby_lsp/store.rb#79 sig { params(uri: ::URI::Generic, edits: T::Array[T::Hash[::Symbol, T.untyped]], version: ::Integer).void } def push_edits(uri:, edits:, version:); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#71 + # source://ruby-lsp/lib/ruby_lsp/store.rb#67 sig do params( uri: ::URI::Generic, @@ -5831,15 +5871,6 @@ class RubyLsp::Store ).returns(RubyLsp::Document[T.untyped]) end def set(uri:, source:, version:, language_id:, encoding: T.unsafe(nil)); end - - # source://ruby-lsp/lib/ruby_lsp/store.rb#11 - sig { returns(T::Boolean) } - def supports_progress; end - - # @return [Boolean] - # - # source://ruby-lsp/lib/ruby_lsp/store.rb#11 - def supports_progress=(_arg0); end end # source://ruby-lsp/lib/ruby_lsp/store.rb#8 @@ -5918,15 +5949,9 @@ end # source://ruby-lsp/lib/ruby-lsp.rb#5 RubyLsp::VERSION = T.let(T.unsafe(nil), String) -# source://ruby-lsp/lib/core_ext/uri.rb#4 -module URI - include ::URI::RFC2396_REGEXP -end - # source://ruby-lsp/lib/core_ext/uri.rb#5 class URI::Generic include ::URI::RFC2396_REGEXP - include ::URI end # Avoid a deprecation warning with Ruby 3.4 where the default parser was changed to RFC3986. @@ -5987,5 +6012,3 @@ URI::Source::COMPONENT = T.let(T.unsafe(nil), Array) # # source://ruby-lsp/lib/ruby_lsp/requests/support/source_uri.rb#27 URI::Source::PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) - -class URI::WSS < ::URI::WS; end diff --git a/sorbet/rbi/gems/securerandom@0.3.1.rbi b/sorbet/rbi/gems/securerandom@0.3.1.rbi new file mode 100644 index 00000000..ccc1f92e --- /dev/null +++ b/sorbet/rbi/gems/securerandom@0.3.1.rbi @@ -0,0 +1,396 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `securerandom` gem. +# Please instead update this file by running `bin/tapioca gem securerandom`. + + +class Random::Base + include ::Random::Formatter + extend ::Random::Formatter + + def initialize(*_arg0); end + + def bytes(_arg0); end + def rand(*_arg0); end + def seed; end +end + +# == \Random number formatter. +# +# Formats generated random numbers in many manners. When 'random/formatter' +# is required, several methods are added to empty core module Random::Formatter, +# making them available as Random's instance and module methods. +# +# Standard library SecureRandom is also extended with the module, and the methods +# described below are available as a module methods in it. +# +# === Examples +# +# Generate random hexadecimal strings: +# +# require 'random/formatter' +# +# prng = Random.new +# prng.hex(10) #=> "52750b30ffbc7de3b362" +# prng.hex(10) #=> "92b15d6c8dc4beb5f559" +# prng.hex(13) #=> "39b290146bea6ce975c37cfc23" +# # or just +# Random.hex #=> "1aed0c631e41be7f77365415541052ee" +# +# Generate random base64 strings: +# +# prng.base64(10) #=> "EcmTPZwWRAozdA==" +# prng.base64(10) #=> "KO1nIU+p9DKxGg==" +# prng.base64(12) #=> "7kJSM/MzBJI+75j8" +# Random.base64(4) #=> "bsQ3fQ==" +# +# Generate random binary strings: +# +# prng.random_bytes(10) #=> "\016\t{\370g\310pbr\301" +# prng.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337" +# Random.random_bytes(6) #=> "\xA1\xE6Lr\xC43" +# +# Generate alphanumeric strings: +# +# prng.alphanumeric(10) #=> "S8baxMJnPl" +# prng.alphanumeric(10) #=> "aOxAg8BAJe" +# Random.alphanumeric #=> "TmP9OsJHJLtaZYhP" +# +# Generate UUIDs: +# +# prng.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594" +# prng.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab" +# Random.uuid #=> "f14e0271-de96-45cc-8911-8910292a42cd" +# +# All methods are available in the standard library SecureRandom, too: +# +# SecureRandom.hex #=> "05b45376a30c67238eb93b16499e50cf" +# +# source://securerandom/lib/random/formatter.rb#55 +module Random::Formatter + # Generate a random alphanumeric string. + # + # The argument _n_ specifies the length, in characters, of the alphanumeric + # string to be generated. + # The argument _chars_ specifies the character list which the result is + # consist of. + # + # If _n_ is not specified or is nil, 16 is assumed. + # It may be larger in the future. + # + # The result may contain A-Z, a-z and 0-9, unless _chars_ is specified. + # + # require 'random/formatter' + # + # Random.alphanumeric #=> "2BuBuLf3WfSKyQbR" + # # or + # prng = Random.new + # prng.alphanumeric(10) #=> "i6K93NdqiH" + # + # Random.alphanumeric(4, chars: [*"0".."9"]) #=> "2952" + # # or + # prng = Random.new + # prng.alphanumeric(10, chars: [*"!".."/"]) #=> ",.,++%/''." + # + # source://securerandom/lib/random/formatter.rb#369 + def alphanumeric(n = T.unsafe(nil), chars: T.unsafe(nil)); end + + # Generate a random base64 string. + # + # The argument _n_ specifies the length, in bytes, of the random number + # to be generated. The length of the result string is about 4/3 of _n_. + # + # If _n_ is not specified or is nil, 16 is assumed. + # It may be larger in the future. + # + # The result may contain A-Z, a-z, 0-9, "+", "/" and "=". + # + # require 'random/formatter' + # + # Random.base64 #=> "/2BuBuLf3+WfSKyQbRcc/A==" + # # or + # prng = Random.new + # prng.base64 #=> "6BbW0pxO0YENxn38HMUbcQ==" + # + # See RFC 3548 for the definition of base64. + # + # source://securerandom/lib/random/formatter.rb#115 + def base64(n = T.unsafe(nil)); end + + # Generate a random hexadecimal string. + # + # The argument _n_ specifies the length, in bytes, of the random number to be generated. + # The length of the resulting hexadecimal string is twice of _n_. + # + # If _n_ is not specified or is nil, 16 is assumed. + # It may be larger in the future. + # + # The result may contain 0-9 and a-f. + # + # require 'random/formatter' + # + # Random.hex #=> "eb693ec8252cd630102fd0d0fb7c3485" + # # or + # prng = Random.new + # prng.hex #=> "91dc3bfb4de5b11d029d376634589b61" + # + # source://securerandom/lib/random/formatter.rb#93 + def hex(n = T.unsafe(nil)); end + + # Generate a random binary string. + # + # The argument _n_ specifies the length of the result string. + # + # If _n_ is not specified or is nil, 16 is assumed. + # It may be larger in future. + # + # The result may contain any byte: "\x00" - "\xff". + # + # require 'random/formatter' + # + # Random.random_bytes #=> "\xD8\\\xE0\xF4\r\xB2\xFC*WM\xFF\x83\x18\xF45\xB6" + # # or + # prng = Random.new + # prng.random_bytes #=> "m\xDC\xFC/\a\x00Uf\xB2\xB2P\xBD\xFF6S\x97" + # + # source://securerandom/lib/random/formatter.rb#72 + def random_bytes(n = T.unsafe(nil)); end + + # Generate a random URL-safe base64 string. + # + # The argument _n_ specifies the length, in bytes, of the random number + # to be generated. The length of the result string is about 4/3 of _n_. + # + # If _n_ is not specified or is nil, 16 is assumed. + # It may be larger in the future. + # + # The boolean argument _padding_ specifies the padding. + # If it is false or nil, padding is not generated. + # Otherwise padding is generated. + # By default, padding is not generated because "=" may be used as a URL delimiter. + # + # The result may contain A-Z, a-z, 0-9, "-" and "_". + # "=" is also used if _padding_ is true. + # + # require 'random/formatter' + # + # Random.urlsafe_base64 #=> "b4GOKm4pOYU_-BOXcrUGDg" + # # or + # prng = Random.new + # prng.urlsafe_base64 #=> "UZLdOkzop70Ddx-IJR0ABg" + # + # prng.urlsafe_base64(nil, true) #=> "i0XQ-7gglIsHGV2_BNPrdQ==" + # prng.urlsafe_base64(nil, true) #=> "-M8rLhr7JEpJlqFGUMmOxg==" + # + # See RFC 3548 for the definition of URL-safe base64. + # + # source://securerandom/lib/random/formatter.rb#146 + def urlsafe_base64(n = T.unsafe(nil), padding = T.unsafe(nil)); end + + # Generate a random v4 UUID (Universally Unique IDentifier). + # + # require 'random/formatter' + # + # Random.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594" + # Random.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab" + # # or + # prng = Random.new + # prng.uuid #=> "62936e70-1815-439b-bf89-8492855a7e6b" + # + # The version 4 UUID is purely random (except the version). + # It doesn't contain meaningful information such as MAC addresses, timestamps, etc. + # + # The result contains 122 random bits (15.25 random bytes). + # + # See RFC4122[https://datatracker.ietf.org/doc/html/rfc4122] for details of UUID. + # + # source://securerandom/lib/random/formatter.rb#170 + def uuid; end + + # Generate a random v4 UUID (Universally Unique IDentifier). + # + # require 'random/formatter' + # + # Random.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594" + # Random.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab" + # # or + # prng = Random.new + # prng.uuid #=> "62936e70-1815-439b-bf89-8492855a7e6b" + # + # The version 4 UUID is purely random (except the version). + # It doesn't contain meaningful information such as MAC addresses, timestamps, etc. + # + # The result contains 122 random bits (15.25 random bytes). + # + # See RFC4122[https://datatracker.ietf.org/doc/html/rfc4122] for details of UUID. + # + # source://securerandom/lib/random/formatter.rb#170 + def uuid_v4; end + + # Generate a random v7 UUID (Universally Unique IDentifier). + # + # require 'random/formatter' + # + # Random.uuid_v7 # => "0188d4c3-1311-7f96-85c7-242a7aa58f1e" + # Random.uuid_v7 # => "0188d4c3-16fe-744f-86af-38fa04c62bb5" + # Random.uuid_v7 # => "0188d4c3-1af8-764f-b049-c204ce0afa23" + # Random.uuid_v7 # => "0188d4c3-1e74-7085-b14f-ef6415dc6f31" + # # |<--sorted-->| |<----- random ---->| + # + # # or + # prng = Random.new + # prng.uuid_v7 # => "0188ca51-5e72-7950-a11d-def7ff977c98" + # + # The version 7 UUID starts with the least significant 48 bits of a 64 bit + # Unix timestamp (milliseconds since the epoch) and fills the remaining bits + # with random data, excluding the version and variant bits. + # + # This allows version 7 UUIDs to be sorted by creation time. Time ordered + # UUIDs can be used for better database index locality of newly inserted + # records, which may have a significant performance benefit compared to random + # data inserts. + # + # The result contains 74 random bits (9.25 random bytes). + # + # Note that this method cannot be made reproducable because its output + # includes not only random bits but also timestamp. + # + # See draft-ietf-uuidrev-rfc4122bis[https://datatracker.ietf.org/doc/draft-ietf-uuidrev-rfc4122bis/] + # for details of UUIDv7. + # + # ==== Monotonicity + # + # UUIDv7 has millisecond precision by default, so multiple UUIDs created + # within the same millisecond are not issued in monotonically increasing + # order. To create UUIDs that are time-ordered with sub-millisecond + # precision, up to 12 bits of additional timestamp may added with + # +extra_timestamp_bits+. The extra timestamp precision comes at the expense + # of random bits. Setting extra_timestamp_bits: 12 provides ~244ns + # of precision, but only 62 random bits (7.75 random bytes). + # + # prng = Random.new + # Array.new(4) { prng.uuid_v7(extra_timestamp_bits: 12) } + # # => + # ["0188d4c7-13da-74f9-8b53-22a786ffdd5a", + # "0188d4c7-13da-753b-83a5-7fb9b2afaeea", + # "0188d4c7-13da-754a-88ea-ac0baeedd8db", + # "0188d4c7-13da-7557-83e1-7cad9cda0d8d"] + # # |<--- sorted --->| |<-- random --->| + # + # Array.new(4) { prng.uuid_v7(extra_timestamp_bits: 8) } + # # => + # ["0188d4c7-3333-7a95-850a-de6edb858f7e", + # "0188d4c7-3333-7ae8-842e-bc3a8b7d0cf9", # <- out of order + # "0188d4c7-3333-7ae2-995a-9f135dc44ead", # <- out of order + # "0188d4c7-3333-7af9-87c3-8f612edac82e"] + # # |<--- sorted -->||<---- random --->| + # + # Any rollbacks of the system clock will break monotonicity. UUIDv7 is based + # on UTC, which excludes leap seconds and can rollback the clock. To avoid + # this, the system clock can synchronize with an NTP server configured to use + # a "leap smear" approach. NTP or PTP will also be needed to synchronize + # across distributed nodes. + # + # Counters and other mechanisms for stronger guarantees of monotonicity are + # not implemented. Applications with stricter requirements should follow + # {Section 6.2}[https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-07.html#monotonicity_counters] + # of the specification. + # + # source://securerandom/lib/random/formatter.rb#248 + def uuid_v7(extra_timestamp_bits: T.unsafe(nil)); end + + private + + # Generate a string that randomly draws from a + # source array of characters. + # + # The argument _source_ specifies the array of characters from which + # to generate the string. + # The argument _n_ specifies the length, in characters, of the string to be + # generated. + # + # The result may contain whatever characters are in the source array. + # + # require 'random/formatter' + # + # prng.choose([*'l'..'r'], 16) #=> "lmrqpoonmmlqlron" + # prng.choose([*'0'..'9'], 5) #=> "27309" + # + # source://securerandom/lib/random/formatter.rb#314 + def choose(source, n); end + + # Internal interface to Random; Generate random data _n_ bytes. + # + # source://securerandom/lib/random/formatter.rb#296 + def gen_random(n); end +end + +# == Secure random number generator interface. +# +# This library is an interface to secure random number generators which are +# suitable for generating session keys in HTTP cookies, etc. +# +# You can use this library in your application by requiring it: +# +# require 'securerandom' +# +# It supports the following secure random number generators: +# +# * openssl +# * /dev/urandom +# * Win32 +# +# SecureRandom is extended by the Random::Formatter module which +# defines the following methods: +# +# * alphanumeric +# * base64 +# * choose +# * gen_random +# * hex +# * rand +# * random_bytes +# * random_number +# * urlsafe_base64 +# * uuid +# +# These methods are usable as class methods of SecureRandom such as +# +SecureRandom.hex+. +# +# If a secure random number generator is not available, +# +NotImplementedError+ is raised. +# +# source://securerandom/lib/securerandom.rb#41 +module SecureRandom + extend ::Random::Formatter + + class << self + # Returns a random binary string containing +size+ bytes. + # + # See Random.bytes + # + # source://securerandom/lib/securerandom.rb#50 + def bytes(n); end + + # source://securerandom/lib/securerandom.rb#64 + def gen_random(n); end + + private + + # Implementation using OpenSSL + # + # source://securerandom/lib/securerandom.rb#59 + def gen_random_openssl(n); end + + # Implementation using system random device + # + # source://securerandom/lib/securerandom.rb#64 + def gen_random_urandom(n); end + end +end + +# The version +# +# source://securerandom/lib/securerandom.rb#44 +SecureRandom::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/spoom@1.3.0.rbi b/sorbet/rbi/gems/spoom@1.3.0.rbi index 6dc207da..f7c1d862 100644 --- a/sorbet/rbi/gems/spoom@1.3.0.rbi +++ b/sorbet/rbi/gems/spoom@1.3.0.rbi @@ -141,13 +141,13 @@ class Spoom::Cli::Main < ::Thor # source://spoom/lib/spoom/cli.rb#65 def coverage(*args); end - # source://thor/1.3.1lib/thor.rb#334 + # source://thor/1.3.2lib/thor.rb#334 def deadcode(*args); end # source://spoom/lib/spoom/cli.rb#75 def lsp(*args); end - # source://thor/1.3.1lib/thor.rb#334 + # source://thor/1.3.2lib/thor.rb#334 def srb(*args); end # source://spoom/lib/spoom/cli.rb#94 @@ -285,18 +285,18 @@ end # source://spoom/lib/spoom/cli/srb.rb#12 class Spoom::Cli::Srb::Main < ::Thor - # source://thor/1.3.1lib/thor.rb#334 + # source://thor/1.3.2lib/thor.rb#334 def bump(*args); end - # source://thor/1.3.1lib/thor.rb#334 + # source://thor/1.3.2lib/thor.rb#334 def coverage(*args); end def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://thor/1.3.1lib/thor.rb#334 + # source://thor/1.3.2lib/thor.rb#334 def lsp(*args); end - # source://thor/1.3.1lib/thor.rb#334 + # source://thor/1.3.2lib/thor.rb#334 def tc(*args); end end @@ -1011,7 +1011,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -1351,7 +1351,7 @@ class Spoom::Coverage::Snapshot < ::T::Struct sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } def from_obj(obj); end - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -1525,7 +1525,7 @@ class Spoom::Deadcode::Definition < ::T::Struct def to_json(*args); end class << self - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -2419,7 +2419,7 @@ class Spoom::Deadcode::Reference < ::T::Struct def method?; end class << self - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -2661,7 +2661,7 @@ class Spoom::Deadcode::Send < ::T::Struct def each_arg_assoc(&block); end class << self - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -3280,7 +3280,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -3478,7 +3478,7 @@ class Spoom::FileTree::Node < ::T::Struct def path; end class << self - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -3544,7 +3544,7 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end # Parse a line formatted as `%h %at` into a `Commit` @@ -3656,7 +3656,7 @@ class Spoom::LSP::Diagnostic < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } def from_json(json); end - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -3689,7 +3689,7 @@ class Spoom::LSP::DocumentSymbol < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } def from_json(json); end - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -3747,7 +3747,7 @@ class Spoom::LSP::Hover < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } def from_json(json); end - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -3772,7 +3772,7 @@ class Spoom::LSP::Location < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } def from_json(json); end - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -3835,7 +3835,7 @@ class Spoom::LSP::Position < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } def from_json(json); end - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -3873,7 +3873,7 @@ class Spoom::LSP::Range < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } def from_json(json); end - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -3939,7 +3939,7 @@ class Spoom::LSP::SignatureHelp < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } def from_json(json); end - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/sqlite3@1.7.3.rbi b/sorbet/rbi/gems/sqlite3@2.1.0.rbi similarity index 65% rename from sorbet/rbi/gems/sqlite3@1.7.3.rbi rename to sorbet/rbi/gems/sqlite3@2.1.0.rbi index 1c18f0ad..18a2e67b 100644 --- a/sorbet/rbi/gems/sqlite3@1.7.3.rbi +++ b/sorbet/rbi/gems/sqlite3@2.1.0.rbi @@ -5,14 +5,19 @@ # Please instead update this file by running `bin/tapioca gem sqlite3`. +module Process + extend ::SQLite3::ForkSafety::CoreExt + extend ::ActiveSupport::ForkTracker::CoreExt +end + +# based on Rails's active_support/fork_tracker.rb +# # source://sqlite3/lib/sqlite3/constants.rb#1 module SQLite3 class << self - # source://sqlite3/lib/sqlite3/version.rb#16 - def const_missing(name); end - def libversion; end def sqlcipher?; end + def status(*_arg0); end def threadsafe; end # Was sqlite3 compiled with thread safety on? @@ -24,10 +29,10 @@ module SQLite3 end end -# source://sqlite3/lib/sqlite3/errors.rb#12 +# source://sqlite3/lib/sqlite3/errors.rb#15 class SQLite3::AbortException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#31 +# source://sqlite3/lib/sqlite3/errors.rb#53 class SQLite3::AuthorizationException < ::SQLite3::Exception; end class SQLite3::Backup @@ -41,166 +46,212 @@ end class SQLite3::Blob < ::String; end -# source://sqlite3/lib/sqlite3/errors.rb#13 +# source://sqlite3/lib/sqlite3/errors.rb#17 class SQLite3::BusyException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#22 +# source://sqlite3/lib/sqlite3/errors.rb#35 class SQLite3::CantOpenException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/constants.rb#1 +# source://sqlite3/lib/sqlite3/constants.rb#2 module SQLite3::Constants; end -# source://sqlite3/lib/sqlite3/constants.rb#12 +# CAPI3REF: Fundamental Datatypes +# +# ^(Every value in SQLite has one of five fundamental datatypes: +# +#
    +#
  • 64-bit signed integer +#
  • 64-bit IEEE floating point number +#
  • string +#
  • BLOB +#
  • NULL +#
)^ +# +# These constants are codes for each of those types. +# +# source://sqlite3/lib/sqlite3/constants.rb#39 module SQLite3::Constants::ColumnType; end -# source://sqlite3/lib/sqlite3/constants.rb#16 +# source://sqlite3/lib/sqlite3/constants.rb#43 SQLite3::Constants::ColumnType::BLOB = T.let(T.unsafe(nil), Integer) -# source://sqlite3/lib/sqlite3/constants.rb#14 +# source://sqlite3/lib/sqlite3/constants.rb#41 SQLite3::Constants::ColumnType::FLOAT = T.let(T.unsafe(nil), Integer) -# source://sqlite3/lib/sqlite3/constants.rb#13 +# source://sqlite3/lib/sqlite3/constants.rb#40 SQLite3::Constants::ColumnType::INTEGER = T.let(T.unsafe(nil), Integer) -# source://sqlite3/lib/sqlite3/constants.rb#17 +# source://sqlite3/lib/sqlite3/constants.rb#44 SQLite3::Constants::ColumnType::NULL = T.let(T.unsafe(nil), Integer) -# source://sqlite3/lib/sqlite3/constants.rb#15 +# source://sqlite3/lib/sqlite3/constants.rb#42 SQLite3::Constants::ColumnType::TEXT = T.let(T.unsafe(nil), Integer) -# source://sqlite3/lib/sqlite3/constants.rb#20 +# CAPI3REF: Result Codes +# +# Many SQLite functions return an integer result code from the set shown +# here in order to indicate success or failure. +# +# New error codes may be added in future versions of SQLite. +# +# source://sqlite3/lib/sqlite3/constants.rb#55 module SQLite3::Constants::ErrorCode; end # Callback routine requested an abort # -# source://sqlite3/lib/sqlite3/constants.rb#25 +# source://sqlite3/lib/sqlite3/constants.rb#65 SQLite3::Constants::ErrorCode::ABORT = T.let(T.unsafe(nil), Integer) # Authorization denied # -# source://sqlite3/lib/sqlite3/constants.rb#44 +# source://sqlite3/lib/sqlite3/constants.rb#103 SQLite3::Constants::ErrorCode::AUTH = T.let(T.unsafe(nil), Integer) # The database file is locked # -# source://sqlite3/lib/sqlite3/constants.rb#26 +# source://sqlite3/lib/sqlite3/constants.rb#67 SQLite3::Constants::ErrorCode::BUSY = T.let(T.unsafe(nil), Integer) # Unable to open the database file # -# source://sqlite3/lib/sqlite3/constants.rb#35 +# source://sqlite3/lib/sqlite3/constants.rb#85 SQLite3::Constants::ErrorCode::CANTOPEN = T.let(T.unsafe(nil), Integer) # Abort due to constraint violation # -# source://sqlite3/lib/sqlite3/constants.rb#40 +# source://sqlite3/lib/sqlite3/constants.rb#95 SQLite3::Constants::ErrorCode::CONSTRAINT = T.let(T.unsafe(nil), Integer) # The database disk image is malformed # -# source://sqlite3/lib/sqlite3/constants.rb#32 +# source://sqlite3/lib/sqlite3/constants.rb#79 SQLite3::Constants::ErrorCode::CORRUPT = T.let(T.unsafe(nil), Integer) # sqlite_step() has finished executing # -# source://sqlite3/lib/sqlite3/constants.rb#47 +# source://sqlite3/lib/sqlite3/constants.rb#117 SQLite3::Constants::ErrorCode::DONE = T.let(T.unsafe(nil), Integer) # (Internal Only) Database table is empty # -# source://sqlite3/lib/sqlite3/constants.rb#37 +# source://sqlite3/lib/sqlite3/constants.rb#89 SQLite3::Constants::ErrorCode::EMPTY = T.let(T.unsafe(nil), Integer) # SQL error or missing database # -# source://sqlite3/lib/sqlite3/constants.rb#22 +# source://sqlite3/lib/sqlite3/constants.rb#59 SQLite3::Constants::ErrorCode::ERROR = T.let(T.unsafe(nil), Integer) +# Not used +# +# source://sqlite3/lib/sqlite3/constants.rb#105 +SQLite3::Constants::ErrorCode::FORMAT = T.let(T.unsafe(nil), Integer) + # Insertion failed because database is full # -# source://sqlite3/lib/sqlite3/constants.rb#34 +# source://sqlite3/lib/sqlite3/constants.rb#83 SQLite3::Constants::ErrorCode::FULL = T.let(T.unsafe(nil), Integer) # An internal logic error in SQLite # -# source://sqlite3/lib/sqlite3/constants.rb#23 +# source://sqlite3/lib/sqlite3/constants.rb#61 SQLite3::Constants::ErrorCode::INTERNAL = T.let(T.unsafe(nil), Integer) # Operation terminated by sqlite_interrupt() # -# source://sqlite3/lib/sqlite3/constants.rb#30 +# source://sqlite3/lib/sqlite3/constants.rb#75 SQLite3::Constants::ErrorCode::INTERRUPT = T.let(T.unsafe(nil), Integer) # Some kind of disk I/O error occurred # -# source://sqlite3/lib/sqlite3/constants.rb#31 +# source://sqlite3/lib/sqlite3/constants.rb#77 SQLite3::Constants::ErrorCode::IOERR = T.let(T.unsafe(nil), Integer) # A table in the database is locked # -# source://sqlite3/lib/sqlite3/constants.rb#27 +# source://sqlite3/lib/sqlite3/constants.rb#69 SQLite3::Constants::ErrorCode::LOCKED = T.let(T.unsafe(nil), Integer) # Data type mismatch # -# source://sqlite3/lib/sqlite3/constants.rb#41 +# source://sqlite3/lib/sqlite3/constants.rb#97 SQLite3::Constants::ErrorCode::MISMATCH = T.let(T.unsafe(nil), Integer) # Library used incorrectly # -# source://sqlite3/lib/sqlite3/constants.rb#42 +# source://sqlite3/lib/sqlite3/constants.rb#99 SQLite3::Constants::ErrorCode::MISUSE = T.let(T.unsafe(nil), Integer) # Uses OS features not supported on host # -# source://sqlite3/lib/sqlite3/constants.rb#43 +# source://sqlite3/lib/sqlite3/constants.rb#101 SQLite3::Constants::ErrorCode::NOLFS = T.let(T.unsafe(nil), Integer) # A malloc() failed # -# source://sqlite3/lib/sqlite3/constants.rb#28 +# source://sqlite3/lib/sqlite3/constants.rb#71 SQLite3::Constants::ErrorCode::NOMEM = T.let(T.unsafe(nil), Integer) +# File opened that is not a database file +# +# source://sqlite3/lib/sqlite3/constants.rb#109 +SQLite3::Constants::ErrorCode::NOTADB = T.let(T.unsafe(nil), Integer) + # (Internal Only) Table or record not found # -# source://sqlite3/lib/sqlite3/constants.rb#33 +# source://sqlite3/lib/sqlite3/constants.rb#81 SQLite3::Constants::ErrorCode::NOTFOUND = T.let(T.unsafe(nil), Integer) +# Notifications from sqlite3_log() +# +# source://sqlite3/lib/sqlite3/constants.rb#111 +SQLite3::Constants::ErrorCode::NOTICE = T.let(T.unsafe(nil), Integer) + # Successful result # -# source://sqlite3/lib/sqlite3/constants.rb#21 +# source://sqlite3/lib/sqlite3/constants.rb#57 SQLite3::Constants::ErrorCode::OK = T.let(T.unsafe(nil), Integer) # Access permission denied # -# source://sqlite3/lib/sqlite3/constants.rb#24 +# source://sqlite3/lib/sqlite3/constants.rb#63 SQLite3::Constants::ErrorCode::PERM = T.let(T.unsafe(nil), Integer) # Database lock protocol error # -# source://sqlite3/lib/sqlite3/constants.rb#36 +# source://sqlite3/lib/sqlite3/constants.rb#87 SQLite3::Constants::ErrorCode::PROTOCOL = T.let(T.unsafe(nil), Integer) +# 2nd parameter to sqlite3_bind out of range +# +# source://sqlite3/lib/sqlite3/constants.rb#107 +SQLite3::Constants::ErrorCode::RANGE = T.let(T.unsafe(nil), Integer) + # Attempt to write a readonly database # -# source://sqlite3/lib/sqlite3/constants.rb#29 +# source://sqlite3/lib/sqlite3/constants.rb#73 SQLite3::Constants::ErrorCode::READONLY = T.let(T.unsafe(nil), Integer) # sqlite_step() has another row ready # -# source://sqlite3/lib/sqlite3/constants.rb#46 +# source://sqlite3/lib/sqlite3/constants.rb#115 SQLite3::Constants::ErrorCode::ROW = T.let(T.unsafe(nil), Integer) # The database schema changed # -# source://sqlite3/lib/sqlite3/constants.rb#38 +# source://sqlite3/lib/sqlite3/constants.rb#91 SQLite3::Constants::ErrorCode::SCHEMA = T.let(T.unsafe(nil), Integer) # Too much data for one row of a table # -# source://sqlite3/lib/sqlite3/constants.rb#39 +# source://sqlite3/lib/sqlite3/constants.rb#93 SQLite3::Constants::ErrorCode::TOOBIG = T.let(T.unsafe(nil), Integer) +# Warnings from sqlite3_log() +# +# source://sqlite3/lib/sqlite3/constants.rb#113 +SQLite3::Constants::ErrorCode::WARNING = T.let(T.unsafe(nil), Integer) + module SQLite3::Constants::Open; end SQLite3::Constants::Open::AUTOPROXY = T.let(T.unsafe(nil), Integer) SQLite3::Constants::Open::CREATE = T.let(T.unsafe(nil), Integer) @@ -217,37 +268,129 @@ SQLite3::Constants::Open::READONLY = T.let(T.unsafe(nil), Integer) SQLite3::Constants::Open::READWRITE = T.let(T.unsafe(nil), Integer) SQLite3::Constants::Open::SHAREDCACHE = T.let(T.unsafe(nil), Integer) SQLite3::Constants::Open::SUBJOURNAL = T.let(T.unsafe(nil), Integer) +SQLite3::Constants::Open::SUPER_JOURNAL = T.let(T.unsafe(nil), Integer) SQLite3::Constants::Open::TEMP_DB = T.let(T.unsafe(nil), Integer) SQLite3::Constants::Open::TEMP_JOURNAL = T.let(T.unsafe(nil), Integer) SQLite3::Constants::Open::TRANSIENT_DB = T.let(T.unsafe(nil), Integer) SQLite3::Constants::Open::URI = T.let(T.unsafe(nil), Integer) SQLite3::Constants::Open::WAL = T.let(T.unsafe(nil), Integer) -# source://sqlite3/lib/sqlite3/constants.rb#3 +# CAPI3REF: Status Parameters +# +# These integer constants designate various run-time status parameters +# that can be returned by SQLite3.status +# +# source://sqlite3/lib/sqlite3/constants.rb#126 +module SQLite3::Constants::Status; end + +# This parameter records the number of separate memory allocations currently checked out. +# +# source://sqlite3/lib/sqlite3/constants.rb#171 +SQLite3::Constants::Status::MALLOC_COUNT = T.let(T.unsafe(nil), Integer) + +# This parameter records the largest memory allocation request handed to sqlite3_malloc() or +# sqlite3_realloc() (or their internal equivalents). Only the value returned in the +# *pHighwater parameter to sqlite3_status() is of interest. The value written into the +# *pCurrent parameter is undefined. +# +# source://sqlite3/lib/sqlite3/constants.rb#155 +SQLite3::Constants::Status::MALLOC_SIZE = T.let(T.unsafe(nil), Integer) + +# This parameter is the current amount of memory checked out using sqlite3_malloc(), either +# directly or indirectly. The figure includes calls made to sqlite3_malloc() by the +# application and internal memory usage by the SQLite library. Auxiliary page-cache memory +# controlled by SQLITE_CONFIG_PAGECACHE is not included in this parameter. The amount returned +# is the sum of the allocation sizes as reported by the xSize method in sqlite3_mem_methods. +# +# source://sqlite3/lib/sqlite3/constants.rb#132 +SQLite3::Constants::Status::MEMORY_USED = T.let(T.unsafe(nil), Integer) + +# This parameter returns the number of bytes of page cache allocation which could not be +# satisfied by the SQLITE_CONFIG_PAGECACHE buffer and where forced to overflow to +# sqlite3_malloc(). The returned value includes allocations that overflowed because they where +# too large (they were larger than the "sz" parameter to SQLITE_CONFIG_PAGECACHE) and +# allocations that overflowed because no space was left in the page cache. +# +# source://sqlite3/lib/sqlite3/constants.rb#143 +SQLite3::Constants::Status::PAGECACHE_OVERFLOW = T.let(T.unsafe(nil), Integer) + +# This parameter records the largest memory allocation request handed to the pagecache memory +# allocator. Only the value returned in the *pHighwater parameter to sqlite3_status() is of +# interest. The value written into the *pCurrent parameter is undefined. +# +# source://sqlite3/lib/sqlite3/constants.rb#165 +SQLite3::Constants::Status::PAGECACHE_SIZE = T.let(T.unsafe(nil), Integer) + +# This parameter returns the number of pages used out of the pagecache memory allocator that +# was configured using SQLITE_CONFIG_PAGECACHE. The value returned is in pages, not in bytes. +# +# source://sqlite3/lib/sqlite3/constants.rb#136 +SQLite3::Constants::Status::PAGECACHE_USED = T.let(T.unsafe(nil), Integer) + +# The *pHighwater parameter records the deepest parser stack. The *pCurrent value is +# undefined. The *pHighwater value is only meaningful if SQLite is compiled with +# YYTRACKMAXSTACKDEPTH. +# +# source://sqlite3/lib/sqlite3/constants.rb#160 +SQLite3::Constants::Status::PARSER_STACK = T.let(T.unsafe(nil), Integer) + +# NOT USED +# +# source://sqlite3/lib/sqlite3/constants.rb#149 +SQLite3::Constants::Status::SCRATCH_OVERFLOW = T.let(T.unsafe(nil), Integer) + +# NOT USED +# +# source://sqlite3/lib/sqlite3/constants.rb#168 +SQLite3::Constants::Status::SCRATCH_SIZE = T.let(T.unsafe(nil), Integer) + +# NOT USED +# +# source://sqlite3/lib/sqlite3/constants.rb#146 +SQLite3::Constants::Status::SCRATCH_USED = T.let(T.unsafe(nil), Integer) + +# CAPI3REF: Text Encodings +# +# These constant define integer codes that represent the various +# text encodings supported by SQLite. +# +# source://sqlite3/lib/sqlite3/constants.rb#9 module SQLite3::Constants::TextRep; end -# source://sqlite3/lib/sqlite3/constants.rb#8 +# Deprecated +# +# source://sqlite3/lib/sqlite3/constants.rb#19 SQLite3::Constants::TextRep::ANY = T.let(T.unsafe(nil), Integer) -# source://sqlite3/lib/sqlite3/constants.rb#9 +# sqlite3_create_collation only +# +# source://sqlite3/lib/sqlite3/constants.rb#21 SQLite3::Constants::TextRep::DETERMINISTIC = T.let(T.unsafe(nil), Integer) -# source://sqlite3/lib/sqlite3/constants.rb#7 +# Use native byte order +# +# source://sqlite3/lib/sqlite3/constants.rb#17 SQLite3::Constants::TextRep::UTF16 = T.let(T.unsafe(nil), Integer) -# source://sqlite3/lib/sqlite3/constants.rb#6 +# IMP: R-51971-34154 +# +# source://sqlite3/lib/sqlite3/constants.rb#15 SQLite3::Constants::TextRep::UTF16BE = T.let(T.unsafe(nil), Integer) -# source://sqlite3/lib/sqlite3/constants.rb#5 +# IMP: R-03371-37637 +# +# source://sqlite3/lib/sqlite3/constants.rb#13 SQLite3::Constants::TextRep::UTF16LE = T.let(T.unsafe(nil), Integer) -# source://sqlite3/lib/sqlite3/constants.rb#4 +# IMP: R-37514-35566 +# +# source://sqlite3/lib/sqlite3/constants.rb#11 SQLite3::Constants::TextRep::UTF8 = T.let(T.unsafe(nil), Integer) -# source://sqlite3/lib/sqlite3/errors.rb#27 +# source://sqlite3/lib/sqlite3/errors.rb#45 class SQLite3::ConstraintException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#19 +# source://sqlite3/lib/sqlite3/errors.rb#29 class SQLite3::CorruptException < ::SQLite3::Exception; end # The Database class encapsulates a single connection to a SQLite3 database. @@ -276,7 +419,15 @@ class SQLite3::CorruptException < ::SQLite3::Exception; end # module before performing a query, and if you have not enabled results as # hashes, then the results will all be indexible by field name. # -# source://sqlite3/lib/sqlite3/database.rb#35 +# Thread safety: +# +# When `SQLite3.threadsafe?` returns true, it is safe to share instances of +# the database class among threads without adding specific locking. Other +# object instances may require applications to provide their own locks if +# they are to be shared among threads. Please see the README.md for more +# information. +# +# source://sqlite3/lib/sqlite3/database.rb#44 class SQLite3::Database include ::SQLite3::Pragmas @@ -296,12 +447,11 @@ class SQLite3::Database # Other supported +options+: # - +:strict+: boolean (default false), disallow the use of double-quoted string literals (see https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted) # - +:results_as_hash+: boolean (default false), return rows as hashes instead of arrays - # - +:type_translation+: boolean (default false), enable type translation # - +:default_transaction_mode+: one of +:deferred+ (default), +:immediate+, or +:exclusive+. If a mode is not specified in a call to #transaction, this will be the default transaction mode. # # @return [Database] a new instance of Database # - # source://sqlite3/lib/sqlite3/database.rb#91 + # source://sqlite3/lib/sqlite3/database.rb#97 def initialize(file, options = T.unsafe(nil), zvfs = T.unsafe(nil)); end # Installs (or removes) a block that will be invoked for every access @@ -309,11 +459,27 @@ class SQLite3::Database # is allowed to proceed. Returning 1 causes an authorization error to # occur, and returning 2 causes the access to be silently denied. # - # source://sqlite3/lib/sqlite3/database.rb#167 + # source://sqlite3/lib/sqlite3/database.rb#160 def authorizer(&block); end def authorizer=(_arg0); end + + # Given a statement, return a result set. + # This is not intended for general consumption + # + # source://sqlite3/lib/sqlite3/database.rb#697 + def build_result_set(stmt); end + def busy_handler(*_arg0); end + + # Sets a #busy_handler that releases the GVL between retries, + # but only retries up to the indicated number of +milliseconds+. + # This is an alternative to #busy_timeout, which holds the GVL + # while SQLite sleeps and retries. + # + # source://sqlite3/lib/sqlite3/database.rb#646 + def busy_handler_timeout=(milliseconds); end + def busy_timeout(_arg0); end def busy_timeout=(_arg0); end def changes; end @@ -323,7 +489,7 @@ class SQLite3::Database # Returns the value of attribute collations. # - # source://sqlite3/lib/sqlite3/database.rb#36 + # source://sqlite3/lib/sqlite3/database.rb#45 def collations; end # Commits the current transaction. If there is no current transaction, @@ -331,7 +497,7 @@ class SQLite3::Database # to allow it to be used in idioms like # abort? and rollback or commit. # - # source://sqlite3/lib/sqlite3/database.rb#674 + # source://sqlite3/lib/sqlite3/database.rb#622 def commit; end def complete?(_arg0); end @@ -373,7 +539,7 @@ class SQLite3::Database # See also #create_aggregate_handler for a more object-oriented approach to # aggregate functions. # - # source://sqlite3/lib/sqlite3/database.rb#462 + # source://sqlite3/lib/sqlite3/database.rb#410 def create_aggregate(name, arity, step = T.unsafe(nil), finalize = T.unsafe(nil), text_rep = T.unsafe(nil), &block); end # This is another approach to creating an aggregate function (see @@ -424,7 +590,7 @@ class SQLite3::Database # db.create_aggregate_handler( LengthsAggregateHandler ) # puts db.get_first_value( "select lengths(name) from A" ) # - # source://sqlite3/lib/sqlite3/database.rb#560 + # source://sqlite3/lib/sqlite3/database.rb#508 def create_aggregate_handler(handler); end # Creates a new function for use in SQL statements. It will be added as @@ -451,7 +617,7 @@ class SQLite3::Database # # puts db.get_first_value( "select maim(name) from table" ) # - # source://sqlite3/lib/sqlite3/database.rb#417 + # source://sqlite3/lib/sqlite3/database.rb#365 def create_function(name, arity, text_rep = T.unsafe(nil), &block); end # Define an aggregate function named +name+ using a object template @@ -465,13 +631,20 @@ class SQLite3::Database # already provide a suitable +clone+. # The functions arity is the arity of the +step+ method. # - # source://sqlite3/lib/sqlite3/database.rb#597 + # source://sqlite3/lib/sqlite3/database.rb#545 def define_aggregator(name, aggregator); end def define_function(_arg0); end def define_function_with_flags(_arg0, _arg1); end def enable_load_extension(_arg0); end + + # call-seq: db.encoding + # + # Fetch the encoding set on this database + # + # source://sqlite3/lib/sqlite3/database.rb#152 def encoding; end + def errcode; end def errmsg; end @@ -490,8 +663,8 @@ class SQLite3::Database # See also #execute2, #query, and #execute_batch for additional ways of # executing statements. # - # source://sqlite3/lib/sqlite3/database.rb#208 - def execute(sql, bind_vars = T.unsafe(nil), *args, &block); end + # source://sqlite3/lib/sqlite3/database.rb#201 + def execute(sql, bind_vars = T.unsafe(nil), &block); end # Executes the given SQL statement, exactly as with #execute. However, the # first row returned (either via the block, or in the returned array) is @@ -504,7 +677,7 @@ class SQLite3::Database # See also #execute, #query, and #execute_batch for additional ways of # executing statements. # - # source://sqlite3/lib/sqlite3/database.rb#245 + # source://sqlite3/lib/sqlite3/database.rb#226 def execute2(sql, *bind_vars); end # Executes all SQL statements in the given string. By contrast, the other @@ -513,14 +686,13 @@ class SQLite3::Database # in turn. The same bind parameters, if given, will be applied to each # statement. # - # This always returns +nil+, making it unsuitable for queries that return - # rows. + # This always returns the result of the last statement. # # See also #execute_batch2 for additional ways of # executing statements. # - # source://sqlite3/lib/sqlite3/database.rb#269 - def execute_batch(sql, bind_vars = T.unsafe(nil), *args); end + # source://sqlite3/lib/sqlite3/database.rb#250 + def execute_batch(sql, bind_vars = T.unsafe(nil)); end # Executes all SQL statements in the given string. By contrast, the other # means of executing queries will only execute the first statement in the @@ -536,7 +708,7 @@ class SQLite3::Database # See also #execute_batch for additional ways of # executing statements. # - # source://sqlite3/lib/sqlite3/database.rb#322 + # source://sqlite3/lib/sqlite3/database.rb#283 def execute_batch2(sql, &block); end def extended_result_codes=(_arg0); end @@ -545,7 +717,7 @@ class SQLite3::Database # to "main". Main return `nil` or an empty string if the database is # temporary or in-memory. # - # source://sqlite3/lib/sqlite3/database.rb#190 + # source://sqlite3/lib/sqlite3/database.rb#183 def filename(db_name = T.unsafe(nil)); end # A convenience method for obtaining the first row of a result set, and @@ -553,7 +725,7 @@ class SQLite3::Database # # See also #get_first_value. # - # source://sqlite3/lib/sqlite3/database.rb#374 + # source://sqlite3/lib/sqlite3/database.rb#322 def get_first_row(sql, *bind_vars); end # A convenience method for obtaining the first value of the first row of a @@ -562,7 +734,7 @@ class SQLite3::Database # # See also #get_first_row. # - # source://sqlite3/lib/sqlite3/database.rb#383 + # source://sqlite3/lib/sqlite3/database.rb#331 def get_first_value(sql, *bind_vars); end def interrupt; end @@ -574,7 +746,7 @@ class SQLite3::Database # # The Statement can then be executed using Statement#execute. # - # source://sqlite3/lib/sqlite3/database.rb#176 + # source://sqlite3/lib/sqlite3/database.rb#169 def prepare(sql); end # This is a convenience method for creating a statement, binding @@ -589,27 +761,27 @@ class SQLite3::Database # with a block, +close+ will be invoked implicitly when the block # terminates. # - # source://sqlite3/lib/sqlite3/database.rb#344 - def query(sql, bind_vars = T.unsafe(nil), *args); end + # source://sqlite3/lib/sqlite3/database.rb#305 + def query(sql, bind_vars = T.unsafe(nil)); end # Returns +true+ if the database has been open in readonly mode # A helper to check before performing any operation # # @return [Boolean] # - # source://sqlite3/lib/sqlite3/database.rb#690 + # source://sqlite3/lib/sqlite3/database.rb#638 def readonly?; end # A boolean that indicates whether rows in result sets should be returned # as hashes or not. By default, rows are returned as arrays. # - # source://sqlite3/lib/sqlite3/database.rb#70 + # source://sqlite3/lib/sqlite3/database.rb#77 def results_as_hash; end # A boolean that indicates whether rows in result sets should be returned # as hashes or not. By default, rows are returned as arrays. # - # source://sqlite3/lib/sqlite3/database.rb#70 + # source://sqlite3/lib/sqlite3/database.rb#77 def results_as_hash=(_arg0); end # Rolls the current transaction back. If there is no current transaction, @@ -617,9 +789,10 @@ class SQLite3::Database # to allow it to be used in idioms like # abort? and rollback or commit. # - # source://sqlite3/lib/sqlite3/database.rb#683 + # source://sqlite3/lib/sqlite3/database.rb#631 def rollback; end + def statement_timeout=(_arg0); end def total_changes; end def trace(*_arg0); end @@ -642,42 +815,18 @@ class SQLite3::Database # transaction explicitly, either by calling #commit, or by calling # #rollback. # - # source://sqlite3/lib/sqlite3/database.rb#651 + # source://sqlite3/lib/sqlite3/database.rb#599 def transaction(mode = T.unsafe(nil)); end def transaction_active?; end - # Translates a +row+ of data from the database with the given +types+ - # - # source://sqlite3/lib/sqlite3/database.rb#741 - def translate_from_db(types, row); end - - # Return the type translator employed by this database instance. Each - # database instance has its own type translator; this allows for different - # type handlers to be installed in each instance without affecting other - # instances. Furthermore, the translators are instantiated lazily, so that - # if a database does not use type translation, it will not be burdened by - # the overhead of a useless type translator. (See the Translator class.) - # - # source://sqlite3/lib/sqlite3/database.rb#159 - def translator; end - - # source://sqlite3/lib/sqlite3/database.rb#151 - def type_translation; end - - # source://sqlite3/lib/sqlite3/database.rb#144 - def type_translation=(value); end - private def db_filename(_arg0); end def define_aggregator2(_arg0, _arg1); end def disable_quirk_mode; end + def discard; end def exec_batch(_arg0, _arg1); end - - # source://sqlite3/lib/sqlite3/database.rb#749 - def make_type_translator(should_translate); end - def open16(_arg0); end def open_v2(_arg0, _arg1, _arg2); end @@ -686,14 +835,14 @@ class SQLite3::Database # With block, like new closes the database at the end, but unlike new # returns the result of the block instead of the database instance. # - # source://sqlite3/lib/sqlite3/database.rb#45 + # source://sqlite3/lib/sqlite3/database.rb#53 def open(*args); end # Quotes the given string, making it safe to use in an SQL statement. # It replaces all instances of the single-quote character with two # single-quote characters. The modified string is returned. # - # source://sqlite3/lib/sqlite3/database.rb#62 + # source://sqlite3/lib/sqlite3/database.rb#70 def quote(string); end end end @@ -707,7 +856,7 @@ end # This class will almost _always_ be instantiated indirectly, by working # with the create methods mentioned above. # -# source://sqlite3/lib/sqlite3/database.rb#702 +# source://sqlite3/lib/sqlite3/database.rb#669 class SQLite3::Database::FunctionProxy # Create a new FunctionProxy that encapsulates the given +func+ object. # If context is non-nil, the functions context will be set to that. If @@ -716,51 +865,35 @@ class SQLite3::Database::FunctionProxy # # @return [FunctionProxy] a new instance of FunctionProxy # - # source://sqlite3/lib/sqlite3/database.rb#709 + # source://sqlite3/lib/sqlite3/database.rb#676 def initialize; end # Returns the value with the given key from the context. This is only # available to aggregate functions. # - # source://sqlite3/lib/sqlite3/database.rb#729 + # source://sqlite3/lib/sqlite3/database.rb#683 def [](key); end # Sets the value with the given key in the context. This is only # available to aggregate functions. # - # source://sqlite3/lib/sqlite3/database.rb#735 + # source://sqlite3/lib/sqlite3/database.rb#689 def []=(key, value); end - # (Only available to aggregate functions.) Returns the number of rows - # that the aggregate has processed so far. This will include the current - # row, and so will always return at least 1. - # - # source://sqlite3/lib/sqlite3/database.rb#723 - def count; end - # Returns the value of attribute result. # - # source://sqlite3/lib/sqlite3/database.rb#703 + # source://sqlite3/lib/sqlite3/database.rb#670 def result; end # Sets the attribute result # # @param value the value to set the attribute result to. # - # source://sqlite3/lib/sqlite3/database.rb#703 + # source://sqlite3/lib/sqlite3/database.rb#670 def result=(_arg0); end - - # Set the result of the function to the given error message. - # The function will then return that error. - # - # source://sqlite3/lib/sqlite3/database.rb#716 - def set_error(error); end end -# source://sqlite3/lib/sqlite3/database.rb#747 -SQLite3::Database::NULL_TRANSLATOR = T.let(T.unsafe(nil), Proc) - -# source://sqlite3/lib/sqlite3/errors.rb#24 +# source://sqlite3/lib/sqlite3/errors.rb#39 class SQLite3::EmptyException < ::SQLite3::Exception; end # source://sqlite3/lib/sqlite3/errors.rb#4 @@ -771,40 +904,71 @@ class SQLite3::Exception < ::StandardError def code; end end -# source://sqlite3/lib/sqlite3/errors.rb#32 +# source://sqlite3/lib/sqlite3/fork_safety.rb#7 +module SQLite3::ForkSafety + class << self + # source://sqlite3/lib/sqlite3/fork_safety.rb#33 + def discard; end + + # source://sqlite3/lib/sqlite3/fork_safety.rb#23 + def hook!; end + + # Call to suppress the fork-related warnings. + # + # source://sqlite3/lib/sqlite3/fork_safety.rb#55 + def suppress_warnings!; end + + # source://sqlite3/lib/sqlite3/fork_safety.rb#27 + def track(database); end + end +end + +# source://sqlite3/lib/sqlite3/fork_safety.rb#8 +module SQLite3::ForkSafety::CoreExt + # source://sqlite3/lib/sqlite3/fork_safety.rb#9 + def _fork; end +end + +# source://sqlite3/lib/sqlite3/errors.rb#55 class SQLite3::FormatException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#21 +# source://sqlite3/lib/sqlite3/errors.rb#33 class SQLite3::FullException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#18 +# source://sqlite3/lib/sqlite3/resultset.rb#93 +class SQLite3::HashResultSet < ::SQLite3::ResultSet + # source://sqlite3/lib/sqlite3/resultset.rb#85 + def next; end +end + +# source://sqlite3/lib/sqlite3/errors.rb#27 class SQLite3::IOException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#10 +# source://sqlite3/lib/sqlite3/errors.rb#11 class SQLite3::InternalException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#17 +# source://sqlite3/lib/sqlite3/errors.rb#25 class SQLite3::InterruptException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#14 +# source://sqlite3/lib/sqlite3/errors.rb#19 class SQLite3::LockedException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#15 +# source://sqlite3/lib/sqlite3/errors.rb#21 class SQLite3::MemoryException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#28 +# source://sqlite3/lib/sqlite3/errors.rb#47 class SQLite3::MismatchException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#29 +# source://sqlite3/lib/sqlite3/errors.rb#49 class SQLite3::MisuseException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#34 +# source://sqlite3/lib/sqlite3/errors.rb#59 class SQLite3::NotADatabaseException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#20 +# source://sqlite3/lib/sqlite3/errors.rb#31 class SQLite3::NotFoundException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#11 +# source://sqlite3/lib/sqlite3/errors.rb#13 class SQLite3::PermissionException < ::SQLite3::Exception; end # This module is intended for inclusion solely by the Database class. It @@ -813,294 +977,294 @@ class SQLite3::PermissionException < ::SQLite3::Exception; end # For a detailed description of these pragmas, see the SQLite3 documentation # at http://sqlite.org/pragma.html. # -# source://sqlite3/lib/sqlite3/pragmas.rb#10 +# source://sqlite3/lib/sqlite3/pragmas.rb#9 module SQLite3::Pragmas - # source://sqlite3/lib/sqlite3/pragmas.rb#104 + # source://sqlite3/lib/sqlite3/pragmas.rb#101 def application_id; end - # source://sqlite3/lib/sqlite3/pragmas.rb#108 + # source://sqlite3/lib/sqlite3/pragmas.rb#105 def application_id=(integer); end - # source://sqlite3/lib/sqlite3/pragmas.rb#112 + # source://sqlite3/lib/sqlite3/pragmas.rb#109 def auto_vacuum; end - # source://sqlite3/lib/sqlite3/pragmas.rb#116 + # source://sqlite3/lib/sqlite3/pragmas.rb#113 def auto_vacuum=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#120 + # source://sqlite3/lib/sqlite3/pragmas.rb#117 def automatic_index; end - # source://sqlite3/lib/sqlite3/pragmas.rb#124 + # source://sqlite3/lib/sqlite3/pragmas.rb#121 def automatic_index=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#128 + # source://sqlite3/lib/sqlite3/pragmas.rb#125 def busy_timeout; end - # source://sqlite3/lib/sqlite3/pragmas.rb#132 + # source://sqlite3/lib/sqlite3/pragmas.rb#129 def busy_timeout=(milliseconds); end - # source://sqlite3/lib/sqlite3/pragmas.rb#136 + # source://sqlite3/lib/sqlite3/pragmas.rb#133 def cache_size; end - # source://sqlite3/lib/sqlite3/pragmas.rb#140 + # source://sqlite3/lib/sqlite3/pragmas.rb#137 def cache_size=(size); end - # source://sqlite3/lib/sqlite3/pragmas.rb#144 + # source://sqlite3/lib/sqlite3/pragmas.rb#141 def cache_spill; end - # source://sqlite3/lib/sqlite3/pragmas.rb#148 + # source://sqlite3/lib/sqlite3/pragmas.rb#145 def cache_spill=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#152 + # source://sqlite3/lib/sqlite3/pragmas.rb#149 def case_sensitive_like=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#156 + # source://sqlite3/lib/sqlite3/pragmas.rb#153 def cell_size_check; end - # source://sqlite3/lib/sqlite3/pragmas.rb#160 + # source://sqlite3/lib/sqlite3/pragmas.rb#157 def cell_size_check=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#164 + # source://sqlite3/lib/sqlite3/pragmas.rb#161 def checkpoint_fullfsync; end - # source://sqlite3/lib/sqlite3/pragmas.rb#168 + # source://sqlite3/lib/sqlite3/pragmas.rb#165 def checkpoint_fullfsync=(mode); end # :yields: row # - # source://sqlite3/lib/sqlite3/pragmas.rb#172 + # source://sqlite3/lib/sqlite3/pragmas.rb#169 def collation_list(&block); end # :yields: row # - # source://sqlite3/lib/sqlite3/pragmas.rb#176 + # source://sqlite3/lib/sqlite3/pragmas.rb#173 def compile_options(&block); end - # source://sqlite3/lib/sqlite3/pragmas.rb#180 + # source://sqlite3/lib/sqlite3/pragmas.rb#177 def count_changes; end - # source://sqlite3/lib/sqlite3/pragmas.rb#184 + # source://sqlite3/lib/sqlite3/pragmas.rb#181 def count_changes=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#188 + # source://sqlite3/lib/sqlite3/pragmas.rb#185 def data_version; end # :yields: row # - # source://sqlite3/lib/sqlite3/pragmas.rb#192 + # source://sqlite3/lib/sqlite3/pragmas.rb#189 def database_list(&block); end - # source://sqlite3/lib/sqlite3/pragmas.rb#196 + # source://sqlite3/lib/sqlite3/pragmas.rb#193 def default_cache_size; end - # source://sqlite3/lib/sqlite3/pragmas.rb#200 + # source://sqlite3/lib/sqlite3/pragmas.rb#197 def default_cache_size=(size); end - # source://sqlite3/lib/sqlite3/pragmas.rb#204 + # source://sqlite3/lib/sqlite3/pragmas.rb#201 def default_synchronous; end - # source://sqlite3/lib/sqlite3/pragmas.rb#208 + # source://sqlite3/lib/sqlite3/pragmas.rb#205 def default_synchronous=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#212 + # source://sqlite3/lib/sqlite3/pragmas.rb#209 def default_temp_store; end - # source://sqlite3/lib/sqlite3/pragmas.rb#216 + # source://sqlite3/lib/sqlite3/pragmas.rb#213 def default_temp_store=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#220 + # source://sqlite3/lib/sqlite3/pragmas.rb#217 def defer_foreign_keys; end - # source://sqlite3/lib/sqlite3/pragmas.rb#224 + # source://sqlite3/lib/sqlite3/pragmas.rb#221 def defer_foreign_keys=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#228 + # source://sqlite3/lib/sqlite3/pragmas.rb#225 def encoding; end - # source://sqlite3/lib/sqlite3/pragmas.rb#232 + # source://sqlite3/lib/sqlite3/pragmas.rb#229 def encoding=(mode); end # :yields: row # - # source://sqlite3/lib/sqlite3/pragmas.rb#236 + # source://sqlite3/lib/sqlite3/pragmas.rb#233 def foreign_key_check(*table, &block); end # :yields: row # - # source://sqlite3/lib/sqlite3/pragmas.rb#240 + # source://sqlite3/lib/sqlite3/pragmas.rb#237 def foreign_key_list(table, &block); end - # source://sqlite3/lib/sqlite3/pragmas.rb#244 + # source://sqlite3/lib/sqlite3/pragmas.rb#241 def foreign_keys; end - # source://sqlite3/lib/sqlite3/pragmas.rb#248 + # source://sqlite3/lib/sqlite3/pragmas.rb#245 def foreign_keys=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#252 + # source://sqlite3/lib/sqlite3/pragmas.rb#249 def freelist_count; end - # source://sqlite3/lib/sqlite3/pragmas.rb#256 + # source://sqlite3/lib/sqlite3/pragmas.rb#253 def full_column_names; end - # source://sqlite3/lib/sqlite3/pragmas.rb#260 + # source://sqlite3/lib/sqlite3/pragmas.rb#257 def full_column_names=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#264 + # source://sqlite3/lib/sqlite3/pragmas.rb#261 def fullfsync; end - # source://sqlite3/lib/sqlite3/pragmas.rb#268 + # source://sqlite3/lib/sqlite3/pragmas.rb#265 def fullfsync=(mode); end # Returns +true+ or +false+ depending on the value of the named pragma. # - # source://sqlite3/lib/sqlite3/pragmas.rb#13 + # source://sqlite3/lib/sqlite3/pragmas.rb#11 def get_boolean_pragma(name); end # Return the value of the given pragma. # - # source://sqlite3/lib/sqlite3/pragmas.rb#55 + # source://sqlite3/lib/sqlite3/pragmas.rb#51 def get_enum_pragma(name); end # Returns the value of the given pragma as an integer. # - # source://sqlite3/lib/sqlite3/pragmas.rb#72 + # source://sqlite3/lib/sqlite3/pragmas.rb#69 def get_int_pragma(name); end # Requests the given pragma (and parameters), and if the block is given, # each row of the result set will be yielded to it. Otherwise, the results # are returned as an array. # - # source://sqlite3/lib/sqlite3/pragmas.rb#45 + # source://sqlite3/lib/sqlite3/pragmas.rb#41 def get_query_pragma(name, *params, &block); end - # source://sqlite3/lib/sqlite3/pragmas.rb#272 + # source://sqlite3/lib/sqlite3/pragmas.rb#269 def ignore_check_constraints=(mode); end # :yields: row # - # source://sqlite3/lib/sqlite3/pragmas.rb#276 + # source://sqlite3/lib/sqlite3/pragmas.rb#273 def incremental_vacuum(pages, &block); end # :yields: row # - # source://sqlite3/lib/sqlite3/pragmas.rb#280 + # source://sqlite3/lib/sqlite3/pragmas.rb#277 def index_info(index, &block); end # :yields: row # - # source://sqlite3/lib/sqlite3/pragmas.rb#284 + # source://sqlite3/lib/sqlite3/pragmas.rb#281 def index_list(table, &block); end # :yields: row # - # source://sqlite3/lib/sqlite3/pragmas.rb#288 + # source://sqlite3/lib/sqlite3/pragmas.rb#285 def index_xinfo(index, &block); end # :yields: row # - # source://sqlite3/lib/sqlite3/pragmas.rb#292 + # source://sqlite3/lib/sqlite3/pragmas.rb#289 def integrity_check(*num_errors, &block); end - # source://sqlite3/lib/sqlite3/pragmas.rb#296 + # source://sqlite3/lib/sqlite3/pragmas.rb#293 def journal_mode; end - # source://sqlite3/lib/sqlite3/pragmas.rb#300 + # source://sqlite3/lib/sqlite3/pragmas.rb#297 def journal_mode=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#304 + # source://sqlite3/lib/sqlite3/pragmas.rb#301 def journal_size_limit; end - # source://sqlite3/lib/sqlite3/pragmas.rb#308 + # source://sqlite3/lib/sqlite3/pragmas.rb#305 def journal_size_limit=(size); end - # source://sqlite3/lib/sqlite3/pragmas.rb#312 + # source://sqlite3/lib/sqlite3/pragmas.rb#309 def legacy_file_format; end - # source://sqlite3/lib/sqlite3/pragmas.rb#316 + # source://sqlite3/lib/sqlite3/pragmas.rb#313 def legacy_file_format=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#320 + # source://sqlite3/lib/sqlite3/pragmas.rb#317 def locking_mode; end - # source://sqlite3/lib/sqlite3/pragmas.rb#324 + # source://sqlite3/lib/sqlite3/pragmas.rb#321 def locking_mode=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#328 + # source://sqlite3/lib/sqlite3/pragmas.rb#325 def max_page_count; end - # source://sqlite3/lib/sqlite3/pragmas.rb#332 + # source://sqlite3/lib/sqlite3/pragmas.rb#329 def max_page_count=(size); end - # source://sqlite3/lib/sqlite3/pragmas.rb#336 + # source://sqlite3/lib/sqlite3/pragmas.rb#333 def mmap_size; end - # source://sqlite3/lib/sqlite3/pragmas.rb#340 + # source://sqlite3/lib/sqlite3/pragmas.rb#337 def mmap_size=(size); end - # source://sqlite3/lib/sqlite3/pragmas.rb#344 + # source://sqlite3/lib/sqlite3/pragmas.rb#341 def page_count; end - # source://sqlite3/lib/sqlite3/pragmas.rb#348 + # source://sqlite3/lib/sqlite3/pragmas.rb#345 def page_size; end - # source://sqlite3/lib/sqlite3/pragmas.rb#352 + # source://sqlite3/lib/sqlite3/pragmas.rb#349 def page_size=(size); end - # source://sqlite3/lib/sqlite3/pragmas.rb#356 + # source://sqlite3/lib/sqlite3/pragmas.rb#353 def parser_trace=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#360 + # source://sqlite3/lib/sqlite3/pragmas.rb#357 def query_only; end - # source://sqlite3/lib/sqlite3/pragmas.rb#364 + # source://sqlite3/lib/sqlite3/pragmas.rb#361 def query_only=(mode); end # :yields: row # - # source://sqlite3/lib/sqlite3/pragmas.rb#368 + # source://sqlite3/lib/sqlite3/pragmas.rb#365 def quick_check(*num_errors, &block); end - # source://sqlite3/lib/sqlite3/pragmas.rb#372 + # source://sqlite3/lib/sqlite3/pragmas.rb#369 def read_uncommitted; end - # source://sqlite3/lib/sqlite3/pragmas.rb#376 + # source://sqlite3/lib/sqlite3/pragmas.rb#373 def read_uncommitted=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#380 + # source://sqlite3/lib/sqlite3/pragmas.rb#377 def recursive_triggers; end - # source://sqlite3/lib/sqlite3/pragmas.rb#384 + # source://sqlite3/lib/sqlite3/pragmas.rb#381 def recursive_triggers=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#388 + # source://sqlite3/lib/sqlite3/pragmas.rb#385 def reverse_unordered_selects; end - # source://sqlite3/lib/sqlite3/pragmas.rb#392 + # source://sqlite3/lib/sqlite3/pragmas.rb#389 def reverse_unordered_selects=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#396 + # source://sqlite3/lib/sqlite3/pragmas.rb#393 def schema_cookie; end - # source://sqlite3/lib/sqlite3/pragmas.rb#400 + # source://sqlite3/lib/sqlite3/pragmas.rb#397 def schema_cookie=(cookie); end - # source://sqlite3/lib/sqlite3/pragmas.rb#404 + # source://sqlite3/lib/sqlite3/pragmas.rb#401 def schema_version; end - # source://sqlite3/lib/sqlite3/pragmas.rb#408 + # source://sqlite3/lib/sqlite3/pragmas.rb#405 def schema_version=(version); end - # source://sqlite3/lib/sqlite3/pragmas.rb#412 + # source://sqlite3/lib/sqlite3/pragmas.rb#409 def secure_delete; end - # source://sqlite3/lib/sqlite3/pragmas.rb#416 + # source://sqlite3/lib/sqlite3/pragmas.rb#413 def secure_delete=(mode); end # Sets the given pragma to the given boolean value. The value itself # may be +true+ or +false+, or any other commonly used string or # integer that represents truth. # - # source://sqlite3/lib/sqlite3/pragmas.rb#20 + # source://sqlite3/lib/sqlite3/pragmas.rb#18 def set_boolean_pragma(name, mode); end # Set the value of the given pragma to +mode+. The +mode+ parameter must @@ -1109,101 +1273,99 @@ module SQLite3::Pragmas # have duplicate values. See #synchronous, #default_synchronous, # #temp_store, and #default_temp_store for usage examples. # - # @raise [Exception] - # - # source://sqlite3/lib/sqlite3/pragmas.rb#64 + # source://sqlite3/lib/sqlite3/pragmas.rb#60 def set_enum_pragma(name, mode, enums); end # Set the value of the given pragma to the integer value of the +value+ # parameter. # - # source://sqlite3/lib/sqlite3/pragmas.rb#78 + # source://sqlite3/lib/sqlite3/pragmas.rb#75 def set_int_pragma(name, value); end - # source://sqlite3/lib/sqlite3/pragmas.rb#420 + # source://sqlite3/lib/sqlite3/pragmas.rb#417 def short_column_names; end - # source://sqlite3/lib/sqlite3/pragmas.rb#424 + # source://sqlite3/lib/sqlite3/pragmas.rb#421 def short_column_names=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#428 + # source://sqlite3/lib/sqlite3/pragmas.rb#425 def shrink_memory; end - # source://sqlite3/lib/sqlite3/pragmas.rb#432 + # source://sqlite3/lib/sqlite3/pragmas.rb#429 def soft_heap_limit; end - # source://sqlite3/lib/sqlite3/pragmas.rb#436 + # source://sqlite3/lib/sqlite3/pragmas.rb#433 def soft_heap_limit=(mode); end # :yields: row # - # source://sqlite3/lib/sqlite3/pragmas.rb#440 + # source://sqlite3/lib/sqlite3/pragmas.rb#437 def stats(&block); end - # source://sqlite3/lib/sqlite3/pragmas.rb#444 + # source://sqlite3/lib/sqlite3/pragmas.rb#441 def synchronous; end - # source://sqlite3/lib/sqlite3/pragmas.rb#448 + # source://sqlite3/lib/sqlite3/pragmas.rb#445 def synchronous=(mode); end # Returns information about +table+. Yields each row of table information # if a block is provided. # - # source://sqlite3/lib/sqlite3/pragmas.rb#527 + # source://sqlite3/lib/sqlite3/pragmas.rb#524 def table_info(table); end - # source://sqlite3/lib/sqlite3/pragmas.rb#452 + # source://sqlite3/lib/sqlite3/pragmas.rb#449 def temp_store; end - # source://sqlite3/lib/sqlite3/pragmas.rb#456 + # source://sqlite3/lib/sqlite3/pragmas.rb#453 def temp_store=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#460 + # source://sqlite3/lib/sqlite3/pragmas.rb#457 def threads; end - # source://sqlite3/lib/sqlite3/pragmas.rb#464 + # source://sqlite3/lib/sqlite3/pragmas.rb#461 def threads=(count); end - # source://sqlite3/lib/sqlite3/pragmas.rb#468 + # source://sqlite3/lib/sqlite3/pragmas.rb#465 def user_cookie; end - # source://sqlite3/lib/sqlite3/pragmas.rb#472 + # source://sqlite3/lib/sqlite3/pragmas.rb#469 def user_cookie=(cookie); end - # source://sqlite3/lib/sqlite3/pragmas.rb#476 + # source://sqlite3/lib/sqlite3/pragmas.rb#473 def user_version; end - # source://sqlite3/lib/sqlite3/pragmas.rb#480 + # source://sqlite3/lib/sqlite3/pragmas.rb#477 def user_version=(version); end - # source://sqlite3/lib/sqlite3/pragmas.rb#484 + # source://sqlite3/lib/sqlite3/pragmas.rb#481 def vdbe_addoptrace=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#488 + # source://sqlite3/lib/sqlite3/pragmas.rb#485 def vdbe_debug=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#492 + # source://sqlite3/lib/sqlite3/pragmas.rb#489 def vdbe_listing=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#496 + # source://sqlite3/lib/sqlite3/pragmas.rb#493 def vdbe_trace; end - # source://sqlite3/lib/sqlite3/pragmas.rb#500 + # source://sqlite3/lib/sqlite3/pragmas.rb#497 def vdbe_trace=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#504 + # source://sqlite3/lib/sqlite3/pragmas.rb#501 def wal_autocheckpoint; end - # source://sqlite3/lib/sqlite3/pragmas.rb#508 + # source://sqlite3/lib/sqlite3/pragmas.rb#505 def wal_autocheckpoint=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#512 + # source://sqlite3/lib/sqlite3/pragmas.rb#509 def wal_checkpoint; end - # source://sqlite3/lib/sqlite3/pragmas.rb#516 + # source://sqlite3/lib/sqlite3/pragmas.rb#513 def wal_checkpoint=(mode); end - # source://sqlite3/lib/sqlite3/pragmas.rb#520 + # source://sqlite3/lib/sqlite3/pragmas.rb#517 def writable_schema=(mode); end private @@ -1212,57 +1374,57 @@ module SQLite3::Pragmas # value of the row as a quoted SQL value. This method essentially # unquotes those values. # - # source://sqlite3/lib/sqlite3/pragmas.rb#583 + # source://sqlite3/lib/sqlite3/pragmas.rb#574 def tweak_default(hash); end # Compares two version strings # - # source://sqlite3/lib/sqlite3/pragmas.rb#567 + # source://sqlite3/lib/sqlite3/pragmas.rb#558 def version_compare(v1, v2); end end # The enumeration of valid auto vacuum modes. # -# source://sqlite3/lib/sqlite3/pragmas.rb#89 +# source://sqlite3/lib/sqlite3/pragmas.rb#86 SQLite3::Pragmas::AUTO_VACUUM_MODES = T.let(T.unsafe(nil), Array) # The list of valid encodings. # -# source://sqlite3/lib/sqlite3/pragmas.rb#99 +# source://sqlite3/lib/sqlite3/pragmas.rb#96 SQLite3::Pragmas::ENCODINGS = T.let(T.unsafe(nil), Array) # The list of valid journaling modes. # -# source://sqlite3/lib/sqlite3/pragmas.rb#92 +# source://sqlite3/lib/sqlite3/pragmas.rb#89 SQLite3::Pragmas::JOURNAL_MODES = T.let(T.unsafe(nil), Array) # The list of valid locking modes. # -# source://sqlite3/lib/sqlite3/pragmas.rb#96 +# source://sqlite3/lib/sqlite3/pragmas.rb#93 SQLite3::Pragmas::LOCKING_MODES = T.let(T.unsafe(nil), Array) # The enumeration of valid synchronous modes. # -# source://sqlite3/lib/sqlite3/pragmas.rb#83 +# source://sqlite3/lib/sqlite3/pragmas.rb#80 SQLite3::Pragmas::SYNCHRONOUS_MODES = T.let(T.unsafe(nil), Array) # The enumeration of valid temp store modes. # -# source://sqlite3/lib/sqlite3/pragmas.rb#86 +# source://sqlite3/lib/sqlite3/pragmas.rb#83 SQLite3::Pragmas::TEMP_STORE_MODES = T.let(T.unsafe(nil), Array) # The list of valid WAL checkpoints. # -# source://sqlite3/lib/sqlite3/pragmas.rb#102 +# source://sqlite3/lib/sqlite3/pragmas.rb#99 SQLite3::Pragmas::WAL_CHECKPOINTS = T.let(T.unsafe(nil), Array) -# source://sqlite3/lib/sqlite3/errors.rb#23 +# source://sqlite3/lib/sqlite3/errors.rb#37 class SQLite3::ProtocolException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#33 +# source://sqlite3/lib/sqlite3/errors.rb#57 class SQLite3::RangeException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/errors.rb#16 +# source://sqlite3/lib/sqlite3/errors.rb#23 class SQLite3::ReadOnlyException < ::SQLite3::Exception; end # The ResultSet object encapsulates the enumerability of a query's output. @@ -1270,7 +1432,7 @@ class SQLite3::ReadOnlyException < ::SQLite3::Exception; end # very rarely (if ever) be instantiated directly. Instead, clients should # obtain a ResultSet instance via Statement#execute. # -# source://sqlite3/lib/sqlite3/resultset.rb#10 +# source://sqlite3/lib/sqlite3/resultset.rb#9 class SQLite3::ResultSet include ::Enumerable @@ -1279,51 +1441,49 @@ class SQLite3::ResultSet # # @return [ResultSet] a new instance of ResultSet # - # source://sqlite3/lib/sqlite3/resultset.rb#64 + # source://sqlite3/lib/sqlite3/resultset.rb#14 def initialize(db, stmt); end # Closes the statement that spawned this result set. # Use with caution! Closing a result set will automatically # close any other result sets that were spawned from the same statement. # - # source://sqlite3/lib/sqlite3/resultset.rb#141 + # source://sqlite3/lib/sqlite3/resultset.rb#65 def close; end # Queries whether the underlying statement has been closed or not. # # @return [Boolean] # - # source://sqlite3/lib/sqlite3/resultset.rb#146 + # source://sqlite3/lib/sqlite3/resultset.rb#70 def closed?; end # Returns the names of the columns returned by this result set. # - # source://sqlite3/lib/sqlite3/resultset.rb#156 + # source://sqlite3/lib/sqlite3/resultset.rb#80 def columns; end # Required by the Enumerable mixin. Provides an internal iterator over the # rows of the result set. # - # source://sqlite3/lib/sqlite3/resultset.rb#124 + # source://sqlite3/lib/sqlite3/resultset.rb#48 def each; end # Provides an internal iterator over the rows of the result set where # each row is yielded as a hash. # - # source://sqlite3/lib/sqlite3/resultset.rb#132 + # source://sqlite3/lib/sqlite3/resultset.rb#56 def each_hash; end # Query whether the cursor has reached the end of the result set or not. # # @return [Boolean] # - # source://sqlite3/lib/sqlite3/resultset.rb#78 + # source://sqlite3/lib/sqlite3/resultset.rb#27 def eof?; end # Obtain the next row from the cursor. If there are no more rows to be - # had, this will return +nil+. If type translation is active on the - # corresponding database, the values in the row will be translated - # according to their types. + # had, this will return +nil+. # # The returned value will be an array, unless Database#results_as_hash has # been set to +true+, in which case the returned value will be a hash. @@ -1334,89 +1494,26 @@ class SQLite3::ResultSet # For hashes, the column names are the keys of the hash, and the column # types are accessible via the +types+ property. # - # source://sqlite3/lib/sqlite3/resultset.rb#95 + # source://sqlite3/lib/sqlite3/resultset.rb#42 def next; end # Return the next row as a hash # - # source://sqlite3/lib/sqlite3/resultset.rb#161 + # source://sqlite3/lib/sqlite3/resultset.rb#85 def next_hash; end # Reset the cursor, so that a result set which has reached end-of-file # can be rewound and reiterated. # - # source://sqlite3/lib/sqlite3/resultset.rb#71 + # source://sqlite3/lib/sqlite3/resultset.rb#21 def reset(*bind_params); end # Returns the types of the columns returned by this result set. # - # source://sqlite3/lib/sqlite3/resultset.rb#151 + # source://sqlite3/lib/sqlite3/resultset.rb#75 def types; end end -# source://sqlite3/lib/sqlite3/resultset.rb#13 -class SQLite3::ResultSet::ArrayWithTypes < ::Array - # Returns the value of attribute types. - # - # source://sqlite3/lib/sqlite3/resultset.rb#14 - def types; end - - # Sets the attribute types - # - # @param value the value to set the attribute types to. - # - # source://sqlite3/lib/sqlite3/resultset.rb#14 - def types=(_arg0); end -end - -# source://sqlite3/lib/sqlite3/resultset.rb#17 -class SQLite3::ResultSet::ArrayWithTypesAndFields < ::Array - # source://sqlite3/lib/sqlite3/resultset.rb#28 - def fields; end - - # Sets the attribute fields - # - # @param value the value to set the attribute fields to. - # - # source://sqlite3/lib/sqlite3/resultset.rb#19 - def fields=(_arg0); end - - # source://sqlite3/lib/sqlite3/resultset.rb#21 - def types; end - - # Sets the attribute types - # - # @param value the value to set the attribute types to. - # - # source://sqlite3/lib/sqlite3/resultset.rb#18 - def types=(_arg0); end -end - -# The class of which we return an object in case we want a Hash as -# result. -# -# source://sqlite3/lib/sqlite3/resultset.rb#38 -class SQLite3::ResultSet::HashWithTypesAndFields < ::Hash - # source://sqlite3/lib/sqlite3/resultset.rb#56 - def [](key); end - - # source://sqlite3/lib/sqlite3/resultset.rb#49 - def fields; end - - # Sets the attribute fields - # - # @param value the value to set the attribute fields to. - # - # source://sqlite3/lib/sqlite3/resultset.rb#40 - def fields=(_arg0); end - - # source://sqlite3/lib/sqlite3/resultset.rb#42 - def types; end - - # source://sqlite3/lib/sqlite3/resultset.rb#39 - def types=(_arg0); end -end - # source://sqlite3/lib/sqlite3/errors.rb#9 class SQLite3::SQLException < ::SQLite3::Exception; end @@ -1424,7 +1521,7 @@ SQLite3::SQLITE_LOADED_VERSION = T.let(T.unsafe(nil), String) SQLite3::SQLITE_VERSION = T.let(T.unsafe(nil), String) SQLite3::SQLITE_VERSION_NUMBER = T.let(T.unsafe(nil), Integer) -# source://sqlite3/lib/sqlite3/errors.rb#25 +# source://sqlite3/lib/sqlite3/errors.rb#41 class SQLite3::SchemaChangedException < ::SQLite3::Exception; end # A statement represents a prepared-but-unexecuted SQL query. It will rarely @@ -1435,14 +1532,25 @@ class SQLite3::SchemaChangedException < ::SQLite3::Exception; end class SQLite3::Statement include ::Enumerable - def initialize(_arg0, _arg1); end + # call-seq: SQLite3::Statement.new(db, sql) + # + # Create a new statement attached to the given Database instance, and which + # encapsulates the given SQL text. If the text contains more than one + # statement (i.e., separated by semicolons), then the #remainder property + # will be set to the trailing text. + # + # @raise [ArgumentError] + # @return [Statement] a new instance of Statement + # + # source://sqlite3/lib/sqlite3/statement.rb#28 + def initialize(db, sql); end # Returns true if the statement is currently active, meaning it has an # open result set. # # @return [Boolean] # - # source://sqlite3/lib/sqlite3/statement.rb#94 + # source://sqlite3/lib/sqlite3/statement.rb#111 def active?; end def bind_param(_arg0, _arg1); end @@ -1462,7 +1570,7 @@ class SQLite3::Statement # See also #execute, #bind_param, Statement#bind_param, and # Statement#bind_params. # - # source://sqlite3/lib/sqlite3/statement.rb#35 + # source://sqlite3/lib/sqlite3/statement.rb#52 def bind_params(*bind_vars); end def clear_bindings!; end @@ -1476,12 +1584,12 @@ class SQLite3::Statement # may execute the statement in order to obtain the metadata; this makes it # a (potentially) expensive operation. # - # source://sqlite3/lib/sqlite3/statement.rb#101 + # source://sqlite3/lib/sqlite3/statement.rb#118 def columns; end def done?; end - # source://sqlite3/lib/sqlite3/statement.rb#106 + # source://sqlite3/lib/sqlite3/statement.rb#123 def each; end # Execute the statement. This creates a new ResultSet object for the @@ -1499,9 +1607,9 @@ class SQLite3::Statement # # See also #bind_params, #execute!. # - # @yield [@results] + # @yield [results] # - # source://sqlite3/lib/sqlite3/statement.rb#61 + # source://sqlite3/lib/sqlite3/statement.rb#78 def execute(*bind_vars); end # Execute the statement. If no block was given, this returns an array of @@ -1519,13 +1627,16 @@ class SQLite3::Statement # # See also #bind_params, #execute. # - # source://sqlite3/lib/sqlite3/statement.rb#87 + # source://sqlite3/lib/sqlite3/statement.rb#104 def execute!(*bind_vars, &block); end + def expanded_sql; end + def memused; end + # Performs a sanity check to ensure that the statement is not # closed. If it is, an exception is raised. # - # source://sqlite3/lib/sqlite3/statement.rb#125 + # source://sqlite3/lib/sqlite3/statement.rb#142 def must_be_open!; end # This is any text that followed the first valid SQL statement in the text @@ -1536,13 +1647,38 @@ class SQLite3::Statement def remainder; end def reset!; end + def sql; end + + # Returns a Hash containing information about the statement. + # The contents of the hash are implementation specific and may change in + # the future without notice. The hash includes information about internal + # statistics about the statement such as: + # - +fullscan_steps+: the number of times that SQLite has stepped forward + # in a table as part of a full table scan + # - +sorts+: the number of sort operations that have occurred + # - +autoindexes+: the number of rows inserted into transient indices + # that were created automatically in order to help joins run faster + # - +vm_steps+: the number of virtual machine operations executed by the + # prepared statement + # - +reprepares+: the number of times that the prepare statement has been + # automatically regenerated due to schema changes or changes to bound + # parameters that might affect the query plan + # - +runs+: the number of times that the prepared statement has been run + # - +filter_misses+: the number of times that the Bloom filter returned + # a find, and thus the join step had to be processed as normal + # - +filter_hits+: the number of times that a join step was bypassed + # because a Bloom filter returned not-found + # + # source://sqlite3/lib/sqlite3/statement.rb#167 + def stat(key = T.unsafe(nil)); end + def step; end # Return an array of the data types for each column in this statement. Note # that this may execute the statement in order to obtain the metadata; this # makes it a (potentially) expensive operation. # - # source://sqlite3/lib/sqlite3/statement.rb#117 + # source://sqlite3/lib/sqlite3/statement.rb#134 def types; end private @@ -1551,138 +1687,62 @@ class SQLite3::Statement # that this will actually execute the SQL, which means it can be a # (potentially) expensive operation. # - # source://sqlite3/lib/sqlite3/statement.rb#135 + # source://sqlite3/lib/sqlite3/statement.rb#180 def get_metadata; end + + def prepare(_arg0, _arg1); end + def stat_for(_arg0); end + def stats_as_hash; end end -# source://sqlite3/lib/sqlite3/errors.rb#26 +# source://sqlite3/lib/sqlite3/errors.rb#43 class SQLite3::TooBigException < ::SQLite3::Exception; end -# The Translator class encapsulates the logic and callbacks necessary for -# converting string data to a value of some specified type. Every Database -# instance may have a Translator instance, in order to assist in type -# translation (Database#type_translation). -# -# Further, applications may define their own custom type translation logic -# by registering translator blocks with the corresponding database's -# translator instance (Database#translator). -# -# source://sqlite3/lib/sqlite3/translator.rb#14 -class SQLite3::Translator - # Create a new Translator instance. It will be preinitialized with default - # translators for most SQL data types. - # - # @return [Translator] a new instance of Translator - # - # source://sqlite3/lib/sqlite3/translator.rb#18 - def initialize; end - - # Add a new translator block, which will be invoked to process type - # translations to the given type. The type should be an SQL datatype, and - # may include parentheses (i.e., "VARCHAR(30)"). However, any parenthetical - # information is stripped off and discarded, so type translation decisions - # are made solely on the "base" type name. - # - # The translator block itself should accept two parameters, "type" and - # "value". In this case, the "type" is the full type name (including - # parentheses), so the block itself may include logic for changing how a - # type is translated based on the additional data. The "value" parameter - # is the (string) data to convert. - # - # The block should return the translated value. - # - # source://sqlite3/lib/sqlite3/translator.rb#37 - def add_translator(type, &block); end - - # Translate the given string value to a value of the given type. In the - # absence of an installed translator block for the given type, the value - # itself is always returned. Further, +nil+ values are never translated, - # and are always passed straight through regardless of the type parameter. - # - # source://sqlite3/lib/sqlite3/translator.rb#48 - def translate(type, value); end - - private - - # Register the default translators for the current Translator instance. - # This includes translators for most major SQL data types. - # - # source://sqlite3/lib/sqlite3/translator.rb#72 - def register_default_translators; end - - # A convenience method for working with type names. This returns the "base" - # type name, without any parenthetical data. - # - # source://sqlite3/lib/sqlite3/translator.rb#61 - def type_name(type); end -end - -# source://sqlite3/lib/sqlite3/errors.rb#30 +# source://sqlite3/lib/sqlite3/errors.rb#51 class SQLite3::UnsupportedException < ::SQLite3::Exception; end -# source://sqlite3/lib/sqlite3/version.rb#3 +# source://sqlite3/lib/sqlite3/version.rb#2 SQLite3::VERSION = T.let(T.unsafe(nil), String) -# source://sqlite3/lib/sqlite3/value.rb#5 +# source://sqlite3/lib/sqlite3/value.rb#4 class SQLite3::Value # @return [Value] a new instance of Value # - # source://sqlite3/lib/sqlite3/value.rb#8 + # source://sqlite3/lib/sqlite3/value.rb#7 def initialize(db, handle); end # Returns the value of attribute handle. # - # source://sqlite3/lib/sqlite3/value.rb#6 + # source://sqlite3/lib/sqlite3/value.rb#5 def handle; end - # source://sqlite3/lib/sqlite3/value.rb#21 + # source://sqlite3/lib/sqlite3/value.rb#20 def length(utf16 = T.unsafe(nil)); end # @return [Boolean] # - # source://sqlite3/lib/sqlite3/value.rb#13 + # source://sqlite3/lib/sqlite3/value.rb#12 def null?; end - # source://sqlite3/lib/sqlite3/value.rb#17 + # source://sqlite3/lib/sqlite3/value.rb#16 def to_blob; end - # source://sqlite3/lib/sqlite3/value.rb#29 + # source://sqlite3/lib/sqlite3/value.rb#28 def to_f; end - # source://sqlite3/lib/sqlite3/value.rb#33 + # source://sqlite3/lib/sqlite3/value.rb#32 def to_i; end - # source://sqlite3/lib/sqlite3/value.rb#37 + # source://sqlite3/lib/sqlite3/value.rb#36 def to_int64; end - # source://sqlite3/lib/sqlite3/value.rb#41 + # source://sqlite3/lib/sqlite3/value.rb#40 def to_s(utf16 = T.unsafe(nil)); end - # source://sqlite3/lib/sqlite3/value.rb#45 + # source://sqlite3/lib/sqlite3/value.rb#44 def type; end end -# source://sqlite3/lib/sqlite3/version.rb#5 -module SQLite3::VersionProxy; end - -# source://sqlite3/lib/sqlite3/version.rb#9 -SQLite3::VersionProxy::BUILD = T.let(T.unsafe(nil), T.untyped) - -# source://sqlite3/lib/sqlite3/version.rb#6 -SQLite3::VersionProxy::MAJOR = T.let(T.unsafe(nil), Integer) - -# source://sqlite3/lib/sqlite3/version.rb#7 -SQLite3::VersionProxy::MINOR = T.let(T.unsafe(nil), Integer) - -# source://sqlite3/lib/sqlite3/version.rb#11 -SQLite3::VersionProxy::STRING = T.let(T.unsafe(nil), String) - -# source://sqlite3/lib/sqlite3/version.rb#8 -SQLite3::VersionProxy::TINY = T.let(T.unsafe(nil), Integer) - -# source://sqlite3/lib/sqlite3/version.rb#13 -SQLite3::VersionProxy::VERSION = T.let(T.unsafe(nil), String) - # source://sqlite3/lib/sqlite3/statement.rb#4 class String include ::Comparable diff --git a/sorbet/rbi/gems/stringio@3.1.0.rbi b/sorbet/rbi/gems/stringio@3.1.1.rbi similarity index 100% rename from sorbet/rbi/gems/stringio@3.1.0.rbi rename to sorbet/rbi/gems/stringio@3.1.1.rbi diff --git a/sorbet/rbi/gems/tapioca@0.16.2.rbi b/sorbet/rbi/gems/tapioca@0.16.2.rbi index 9be1bf97..e05d41a8 100644 --- a/sorbet/rbi/gems/tapioca@0.16.2.rbi +++ b/sorbet/rbi/gems/tapioca@0.16.2.rbi @@ -218,7 +218,7 @@ class RBI::TypedParam < ::T::Struct const :type, ::String class << self - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -879,7 +879,7 @@ class Tapioca::Commands::Command sig { void } def initialize; end - # source://thor/1.3.1lib/thor/base.rb#155 + # source://thor/1.3.2lib/thor/base.rb#155 sig { returns(::Thor::Actions) } def file_writer; end @@ -1141,7 +1141,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -1152,7 +1152,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -2208,7 +2208,7 @@ class Tapioca::GemInfo < ::T::Struct sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) } def from_spec(spec); end - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end @@ -3534,30 +3534,30 @@ Tapioca::VERSION = T.let(T.unsafe(nil), String) # source://tapioca/lib/tapioca/helpers/source_uri.rb#7 class URI::Source < ::URI::File - # source://ruby-lsp/0.18.0lib/ruby_lsp/requests/support/source_uri.rb#62 + # source://ruby-lsp/0.21.2lib/ruby_lsp/requests/support/source_uri.rb#69 sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://uri/0.13.0uri/generic.rb#243 + # source://uri/0.13.1lib/uri/generic.rb#243 def gem_name; end - # source://ruby-lsp/0.18.0lib/ruby_lsp/requests/support/source_uri.rb#26 + # source://ruby-lsp/0.21.2lib/ruby_lsp/requests/support/source_uri.rb#33 sig { returns(T.nilable(::String)) } def gem_version; end - # source://uri/0.13.0uri/generic.rb#283 + # source://uri/0.13.1lib/uri/generic.rb#283 def line_number; end - # source://ruby-lsp/0.18.0lib/ruby_lsp/requests/support/source_uri.rb#52 + # source://ruby-lsp/0.21.2lib/ruby_lsp/requests/support/source_uri.rb#59 sig { params(v: T.nilable(::String)).void } def set_path(v); end - # source://ruby-lsp/0.18.0lib/ruby_lsp/requests/support/source_uri.rb#74 + # source://ruby-lsp/0.21.2lib/ruby_lsp/requests/support/source_uri.rb#81 sig { returns(::String) } def to_s; end class << self - # source://ruby-lsp/0.18.0lib/ruby_lsp/requests/support/source_uri.rb#39 + # source://ruby-lsp/0.21.2lib/ruby_lsp/requests/support/source_uri.rb#46 sig do params( gem_name: ::String, diff --git a/sorbet/rbi/gems/thor@1.3.1.rbi b/sorbet/rbi/gems/thor@1.3.2.rbi similarity index 98% rename from sorbet/rbi/gems/thor@1.3.1.rbi rename to sorbet/rbi/gems/thor@1.3.2.rbi index 1a6ac3d5..e4ea3ef0 100644 --- a/sorbet/rbi/gems/thor@1.3.1.rbi +++ b/sorbet/rbi/gems/thor@1.3.2.rbi @@ -37,7 +37,7 @@ class Thor extend ::Thor::Base::ClassMethods extend ::Thor::Invocation::ClassMethods - # source://thor/lib/thor.rb#652 + # source://thor/lib/thor.rb#663 def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end class << self @@ -96,6 +96,19 @@ class Thor # source://thor/lib/thor.rb#363 def check_unknown_options?(config); end + # Checks if a specified command exists. + # + # ==== Parameters + # command_name:: The name of the command to check for existence. + # + # ==== Returns + # Boolean:: +true+ if the command exists, +false+ otherwise. + # + # @return [Boolean] + # + # source://thor/lib/thor.rb#449 + def command_exists?(command_name); end + # Prints help information for the given command. # # ==== Parameters @@ -471,48 +484,48 @@ class Thor # the command that is going to be invoked and a boolean which indicates if # the namespace should be displayed as arguments. # - # source://thor/lib/thor.rb#535 + # source://thor/lib/thor.rb#546 def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://thor/lib/thor.rb#541 + # source://thor/lib/thor.rb#552 def baseclass; end - # source://thor/lib/thor.rb#549 + # source://thor/lib/thor.rb#560 def create_command(meth); end - # source://thor/lib/thor.rb#549 + # source://thor/lib/thor.rb#560 def create_task(meth); end # help command has the required check disabled by default. # - # source://thor/lib/thor.rb#467 + # source://thor/lib/thor.rb#478 def disable_required_check; end # The method responsible for dispatching given the args. # # @yield [instance] # - # source://thor/lib/thor.rb#494 + # source://thor/lib/thor.rb#505 def dispatch(meth, given_args, given_opts, config); end - # source://thor/lib/thor.rb#545 + # source://thor/lib/thor.rb#556 def dynamic_command_class; end # this is the logic that takes the command name passed in by the user # and determines whether it is an unambiguous substrings of a command or # alias name. # - # source://thor/lib/thor.rb#615 + # source://thor/lib/thor.rb#626 def find_command_possibilities(meth); end # this is the logic that takes the command name passed in by the user # and determines whether it is an unambiguous substrings of a command or # alias name. # - # source://thor/lib/thor.rb#615 + # source://thor/lib/thor.rb#626 def find_task_possibilities(meth); end - # source://thor/lib/thor.rb#575 + # source://thor/lib/thor.rb#586 def initialize_added; end # Returns this class at least one of required options array set. @@ -520,7 +533,7 @@ class Thor # ==== Returns # Array[Array[Thor::Option.name]] # - # source://thor/lib/thor.rb#458 + # source://thor/lib/thor.rb#469 def method_at_least_one_option_names; end # Returns this class exclusive options array set. @@ -528,7 +541,7 @@ class Thor # ==== Returns # Array[Array[Thor::Option.name]] # - # source://thor/lib/thor.rb#449 + # source://thor/lib/thor.rb#460 def method_exclusive_option_names; end # receives a (possibly nil) command name and returns a name that is in @@ -541,7 +554,7 @@ class Thor # # @raise [AmbiguousTaskError] # - # source://thor/lib/thor.rb#594 + # source://thor/lib/thor.rb#605 def normalize_command_name(meth); end # receives a (possibly nil) command name and returns a name that is in @@ -554,23 +567,23 @@ class Thor # # @raise [AmbiguousTaskError] # - # source://thor/lib/thor.rb#594 + # source://thor/lib/thor.rb#605 def normalize_task_name(meth); end - # source://thor/lib/thor.rb#482 + # source://thor/lib/thor.rb#493 def print_at_least_one_required_options(shell, command = T.unsafe(nil)); end - # source://thor/lib/thor.rb#471 + # source://thor/lib/thor.rb#482 def print_exclusive_options(shell, command = T.unsafe(nil)); end # Retrieve the command name from given args. # - # source://thor/lib/thor.rb#581 + # source://thor/lib/thor.rb#592 def retrieve_command_name(args); end # Retrieve the command name from given args. # - # source://thor/lib/thor.rb#581 + # source://thor/lib/thor.rb#592 def retrieve_task_name(args); end # Sort the commands, lexicographically by default. @@ -578,16 +591,16 @@ class Thor # Can be overridden in the subclass to change the display order of the # commands. # - # source://thor/lib/thor.rb#642 + # source://thor/lib/thor.rb#653 def sort_commands!(list); end - # source://thor/lib/thor.rb#462 + # source://thor/lib/thor.rb#473 def stop_on_unknown_option; end - # source://thor/lib/thor.rb#630 + # source://thor/lib/thor.rb#641 def subcommand_help(cmd); end - # source://thor/lib/thor.rb#630 + # source://thor/lib/thor.rb#641 def subtask_help(cmd); end end end @@ -2630,7 +2643,7 @@ class Thor::Group # Shortcut to invoke with padding and block handling. Use internally by # invoke and invoke_from_option class methods. # - # source://thor/lib/thor/group.rb#265 + # source://thor/lib/thor/group.rb#276 def _invoke_for_class_method(klass, command = T.unsafe(nil), *args, &block); end class << self @@ -2640,6 +2653,19 @@ class Thor::Group # source://thor/lib/thor/group.rb#161 def class_options_help(shell, groups = T.unsafe(nil)); end + # Checks if a specified command exists. + # + # ==== Parameters + # command_name:: The name of the command to check for existence. + # + # ==== Returns + # Boolean:: +true+ if the command exists, +false+ otherwise. + # + # @return [Boolean] + # + # source://thor/lib/thor/group.rb#221 + def command_exists?(command_name); end + # The description for this Thor::Group. If none is provided, but a source root # exists, tries to find the USAGE one folder above it, otherwise searches # in the superclass. @@ -2747,33 +2773,33 @@ class Thor::Group # The banner for this class. You can customize it if you are invoking the # thor class by another ways which is not the Thor::Runner. # - # source://thor/lib/thor/group.rb#238 + # source://thor/lib/thor/group.rb#249 def banner; end - # source://thor/lib/thor/group.rb#248 + # source://thor/lib/thor/group.rb#259 def baseclass; end - # source://thor/lib/thor/group.rb#252 + # source://thor/lib/thor/group.rb#263 def create_command(meth); end - # source://thor/lib/thor/group.rb#252 + # source://thor/lib/thor/group.rb#263 def create_task(meth); end # The method responsible for dispatching given the args. # # @yield [instance] # - # source://thor/lib/thor/group.rb#217 + # source://thor/lib/thor/group.rb#228 def dispatch(command, given_args, given_opts, config); end # Represents the whole class as a command. # - # source://thor/lib/thor/group.rb#243 + # source://thor/lib/thor/group.rb#254 def self_command; end # Represents the whole class as a command. # - # source://thor/lib/thor/group.rb#243 + # source://thor/lib/thor/group.rb#254 def self_task; end end end diff --git a/sorbet/rbi/gems/uri@0.13.1.rbi b/sorbet/rbi/gems/uri@0.13.1.rbi new file mode 100644 index 00000000..229c9f9d --- /dev/null +++ b/sorbet/rbi/gems/uri@0.13.1.rbi @@ -0,0 +1,2429 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `uri` gem. +# Please instead update this file by running `bin/tapioca gem uri`. + + +# module URI +# +# source://uri/lib/uri/common.rb#831 +module Kernel + private + + # Returns a \URI object derived from the given +uri+, + # which may be a \URI string or an existing \URI object: + # + # # Returns a new URI. + # uri = URI('http://github.com/ruby/ruby') + # # => # + # # Returns the given URI. + # URI(uri) + # # => # + # + # source://uri/lib/uri/common.rb#844 + def URI(uri); end + + class << self + # Returns a \URI object derived from the given +uri+, + # which may be a \URI string or an existing \URI object: + # + # # Returns a new URI. + # uri = URI('http://github.com/ruby/ruby') + # # => # + # # Returns the given URI. + # URI(uri) + # # => # + # + # source://uri/lib/uri/common.rb#844 + def URI(uri); end + end +end + +# source://uri/lib/uri.rb#90 +module URI + include ::URI::RFC2396_REGEXP + + class << self + # Like URI.decode_www_form_component, except that '+' is preserved. + # + # source://uri/lib/uri/common.rb#381 + def decode_uri_component(str, enc = T.unsafe(nil)); end + + # Returns name/value pairs derived from the given string +str+, + # which must be an ASCII string. + # + # The method may be used to decode the body of Net::HTTPResponse object +res+ + # for which res['Content-Type'] is 'application/x-www-form-urlencoded'. + # + # The returned data is an array of 2-element subarrays; + # each subarray is a name/value pair (both are strings). + # Each returned string has encoding +enc+, + # and has had invalid characters removed via + # {String#scrub}[https://docs.ruby-lang.org/en/master/String.html#method-i-scrub]. + # + # A simple example: + # + # URI.decode_www_form('foo=0&bar=1&baz') + # # => [["foo", "0"], ["bar", "1"], ["baz", ""]] + # + # The returned strings have certain conversions, + # similar to those performed in URI.decode_www_form_component: + # + # URI.decode_www_form('f%23o=%2F&b-r=%24&b+z=%40') + # # => [["f#o", "/"], ["b-r", "$"], ["b z", "@"]] + # + # The given string may contain consecutive separators: + # + # URI.decode_www_form('foo=0&&bar=1&&baz=2') + # # => [["foo", "0"], ["", ""], ["bar", "1"], ["", ""], ["baz", "2"]] + # + # A different separator may be specified: + # + # URI.decode_www_form('foo=0--bar=1--baz', separator: '--') + # # => [["foo", "0"], ["bar", "1"], ["baz", ""]] + # + # @raise [ArgumentError] + # + # source://uri/lib/uri/common.rb#556 + def decode_www_form(str, enc = T.unsafe(nil), separator: T.unsafe(nil), use__charset_: T.unsafe(nil), isindex: T.unsafe(nil)); end + + # Returns a string decoded from the given \URL-encoded string +str+. + # + # The given string is first encoded as Encoding::ASCII-8BIT (using String#b), + # then decoded (as below), and finally force-encoded to the given encoding +enc+. + # + # The returned string: + # + # - Preserves: + # + # - Characters '*', '.', '-', and '_'. + # - Character in ranges 'a'..'z', 'A'..'Z', + # and '0'..'9'. + # + # Example: + # + # URI.decode_www_form_component('*.-_azAZ09') + # # => "*.-_azAZ09" + # + # - Converts: + # + # - Character '+' to character ' '. + # - Each "percent notation" to an ASCII character. + # + # Example: + # + # URI.decode_www_form_component('Here+are+some+punctuation+characters%3A+%2C%3B%3F%3A') + # # => "Here are some punctuation characters: ,;?:" + # + # Related: URI.decode_uri_component (preserves '+'). + # + # source://uri/lib/uri/common.rb#370 + def decode_www_form_component(str, enc = T.unsafe(nil)); end + + # Like URI.encode_www_form_component, except that ' ' (space) + # is encoded as '%20' (instead of '+'). + # + # source://uri/lib/uri/common.rb#376 + def encode_uri_component(str, enc = T.unsafe(nil)); end + + # Returns a URL-encoded string derived from the given + # {Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html#module-Enumerable-label-Enumerable+in+Ruby+Classes] + # +enum+. + # + # The result is suitable for use as form data + # for an \HTTP request whose Content-Type is + # 'application/x-www-form-urlencoded'. + # + # The returned string consists of the elements of +enum+, + # each converted to one or more URL-encoded strings, + # and all joined with character '&'. + # + # Simple examples: + # + # URI.encode_www_form([['foo', 0], ['bar', 1], ['baz', 2]]) + # # => "foo=0&bar=1&baz=2" + # URI.encode_www_form({foo: 0, bar: 1, baz: 2}) + # # => "foo=0&bar=1&baz=2" + # + # The returned string is formed using method URI.encode_www_form_component, + # which converts certain characters: + # + # URI.encode_www_form('f#o': '/', 'b-r': '$', 'b z': '@') + # # => "f%23o=%2F&b-r=%24&b+z=%40" + # + # When +enum+ is Array-like, each element +ele+ is converted to a field: + # + # - If +ele+ is an array of two or more elements, + # the field is formed from its first two elements + # (and any additional elements are ignored): + # + # name = URI.encode_www_form_component(ele[0], enc) + # value = URI.encode_www_form_component(ele[1], enc) + # "#{name}=#{value}" + # + # Examples: + # + # URI.encode_www_form([%w[foo bar], %w[baz bat bah]]) + # # => "foo=bar&baz=bat" + # URI.encode_www_form([['foo', 0], ['bar', :baz, 'bat']]) + # # => "foo=0&bar=baz" + # + # - If +ele+ is an array of one element, + # the field is formed from ele[0]: + # + # URI.encode_www_form_component(ele[0]) + # + # Example: + # + # URI.encode_www_form([['foo'], [:bar], [0]]) + # # => "foo&bar&0" + # + # - Otherwise the field is formed from +ele+: + # + # URI.encode_www_form_component(ele) + # + # Example: + # + # URI.encode_www_form(['foo', :bar, 0]) + # # => "foo&bar&0" + # + # The elements of an Array-like +enum+ may be mixture: + # + # URI.encode_www_form([['foo', 0], ['bar', 1, 2], ['baz'], :bat]) + # # => "foo=0&bar=1&baz&bat" + # + # When +enum+ is Hash-like, + # each +key+/+value+ pair is converted to one or more fields: + # + # - If +value+ is + # {Array-convertible}[https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html#label-Array-Convertible+Objects], + # each element +ele+ in +value+ is paired with +key+ to form a field: + # + # name = URI.encode_www_form_component(key, enc) + # value = URI.encode_www_form_component(ele, enc) + # "#{name}=#{value}" + # + # Example: + # + # URI.encode_www_form({foo: [:bar, 1], baz: [:bat, :bam, 2]}) + # # => "foo=bar&foo=1&baz=bat&baz=bam&baz=2" + # + # - Otherwise, +key+ and +value+ are paired to form a field: + # + # name = URI.encode_www_form_component(key, enc) + # value = URI.encode_www_form_component(value, enc) + # "#{name}=#{value}" + # + # Example: + # + # URI.encode_www_form({foo: 0, bar: 1, baz: 2}) + # # => "foo=0&bar=1&baz=2" + # + # The elements of a Hash-like +enum+ may be mixture: + # + # URI.encode_www_form({foo: [0, 1], bar: 2}) + # # => "foo=0&foo=1&bar=2" + # + # source://uri/lib/uri/common.rb#503 + def encode_www_form(enum, enc = T.unsafe(nil)); end + + # Returns a URL-encoded string derived from the given string +str+. + # + # The returned string: + # + # - Preserves: + # + # - Characters '*', '.', '-', and '_'. + # - Character in ranges 'a'..'z', 'A'..'Z', + # and '0'..'9'. + # + # Example: + # + # URI.encode_www_form_component('*.-_azAZ09') + # # => "*.-_azAZ09" + # + # - Converts: + # + # - Character ' ' to character '+'. + # - Any other character to "percent notation"; + # the percent notation for character c is '%%%X' % c.ord. + # + # Example: + # + # URI.encode_www_form_component('Here are some punctuation characters: ,;?:') + # # => "Here+are+some+punctuation+characters%3A+%2C%3B%3F%3A" + # + # Encoding: + # + # - If +str+ has encoding Encoding::ASCII_8BIT, argument +enc+ is ignored. + # - Otherwise +str+ is converted first to Encoding::UTF_8 + # (with suitable character replacements), + # and then to encoding +enc+. + # + # In either case, the returned string has forced encoding Encoding::US_ASCII. + # + # Related: URI.encode_uri_component (encodes ' ' as '%20'). + # + # source://uri/lib/uri/common.rb#337 + def encode_www_form_component(str, enc = T.unsafe(nil)); end + + # == Synopsis + # + # URI::extract(str[, schemes][,&blk]) + # + # == Args + # + # +str+:: + # String to extract URIs from. + # +schemes+:: + # Limit URI matching to specific schemes. + # + # == Description + # + # Extracts URIs from a string. If block given, iterates through all matched URIs. + # Returns nil if block given or array with matches. + # + # == Usage + # + # require "uri" + # + # URI.extract("text here http://foo.example.org/bla and here mailto:test@example.com and here also.") + # # => ["http://foo.example.com/bla", "mailto:test@example.com"] + # + # source://uri/lib/uri/common.rb#241 + def extract(str, schemes = T.unsafe(nil), &block); end + + # Returns a new object constructed from the given +scheme+, +arguments+, + # and +default+: + # + # - The new object is an instance of URI.scheme_list[scheme.upcase]. + # - The object is initialized by calling the class initializer + # using +scheme+ and +arguments+. + # See URI::Generic.new. + # + # Examples: + # + # values = ['john.doe', 'www.example.com', '123', nil, '/forum/questions/', nil, 'tag=networking&order=newest', 'top'] + # URI.for('https', *values) + # # => # + # URI.for('foo', *values, default: URI::HTTP) + # # => # + # + # source://uri/lib/uri/common.rb#125 + def for(scheme, *arguments, default: T.unsafe(nil)); end + + # return encoding or nil + # http://encoding.spec.whatwg.org/#concept-encoding-get + # + # source://uri/lib/uri/common.rb#826 + def get_encoding(label); end + + # Merges the given URI strings +str+ + # per {RFC 2396}[https://www.rfc-editor.org/rfc/rfc2396.html]. + # + # Each string in +str+ is converted to an + # {RFC3986 URI}[https://www.rfc-editor.org/rfc/rfc3986.html] before being merged. + # + # Examples: + # + # URI.join("http://example.com/","main.rbx") + # # => # + # + # URI.join('http://example.com', 'foo') + # # => # + # + # URI.join('http://example.com', '/foo', '/bar') + # # => # + # + # URI.join('http://example.com', '/foo', 'bar') + # # => # + # + # URI.join('http://example.com', '/foo/', 'bar') + # # => # + # + # source://uri/lib/uri/common.rb#213 + def join(*str); end + + # Returns a new \URI object constructed from the given string +uri+: + # + # URI.parse('https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top') + # # => # + # URI.parse('http://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top') + # # => # + # + # It's recommended to first ::escape string +uri+ + # if it may contain invalid URI characters. + # + # source://uri/lib/uri/common.rb#186 + def parse(uri); end + + # == Synopsis + # + # URI::regexp([match_schemes]) + # + # == Args + # + # +match_schemes+:: + # Array of schemes. If given, resulting regexp matches to URIs + # whose scheme is one of the match_schemes. + # + # == Description + # + # Returns a Regexp object which matches to URI-like strings. + # The Regexp object returned by this method includes arbitrary + # number of capture group (parentheses). Never rely on its number. + # + # == Usage + # + # require 'uri' + # + # # extract first URI from html_string + # html_string.slice(URI.regexp) + # + # # remove ftp URIs + # html_string.sub(URI.regexp(['ftp']), '') + # + # # You should not rely on the number of parentheses + # html_string.scan(URI.regexp) do |*matches| + # p $& + # end + # + # source://uri/lib/uri/common.rb#278 + def regexp(schemes = T.unsafe(nil)); end + + # Registers the given +klass+ as the class to be instantiated + # when parsing a \URI with the given +scheme+: + # + # URI.register_scheme('MS_SEARCH', URI::Generic) # => URI::Generic + # URI.scheme_list['MS_SEARCH'] # => URI::Generic + # + # Note that after calling String#upcase on +scheme+, it must be a valid + # constant name. + # + # source://uri/lib/uri/common.rb#81 + def register_scheme(scheme, klass); end + + # Returns a hash of the defined schemes: + # + # URI.scheme_list + # # => + # {"MAILTO"=>URI::MailTo, + # "LDAPS"=>URI::LDAPS, + # "WS"=>URI::WS, + # "HTTP"=>URI::HTTP, + # "HTTPS"=>URI::HTTPS, + # "LDAP"=>URI::LDAP, + # "FILE"=>URI::File, + # "FTP"=>URI::FTP} + # + # Related: URI.register_scheme. + # + # source://uri/lib/uri/common.rb#99 + def scheme_list; end + + # Returns a 9-element array representing the parts of the \URI + # formed from the string +uri+; + # each array element is a string or +nil+: + # + # names = %w[scheme userinfo host port registry path opaque query fragment] + # values = URI.split('https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top') + # names.zip(values) + # # => + # [["scheme", "https"], + # ["userinfo", "john.doe"], + # ["host", "www.example.com"], + # ["port", "123"], + # ["registry", nil], + # ["path", "/forum/questions/"], + # ["opaque", nil], + # ["query", "tag=networking&order=newest"], + # ["fragment", "top"]] + # + # source://uri/lib/uri/common.rb#172 + def split(uri); end + + private + + # @raise [ArgumentError] + # + # source://uri/lib/uri/common.rb#399 + def _decode_uri_component(regexp, str, enc); end + + # source://uri/lib/uri/common.rb#385 + def _encode_uri_component(regexp, table, str, enc); end + end +end + +# FTP URI syntax is defined by RFC1738 section 3.2. +# +# This class will be redesigned because of difference of implementations; +# the structure of its path. draft-hoffman-ftp-uri-04 is a draft but it +# is a good summary about the de facto spec. +# http://tools.ietf.org/html/draft-hoffman-ftp-uri-04 +# +# source://uri/lib/uri/ftp.rb#22 +class URI::FTP < ::URI::Generic + # == Description + # + # Creates a new URI::FTP object from generic URL components with no + # syntax checking. + # + # Unlike build(), this method does not escape the path component as + # required by RFC1738; instead it is treated as per RFC2396. + # + # Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+, + # +opaque+, +query+, and +fragment+, in that order. + # + # @raise [InvalidURIError] + # @return [FTP] a new instance of FTP + # + # source://uri/lib/uri/ftp.rb#133 + def initialize(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = T.unsafe(nil), arg_check = T.unsafe(nil)); end + + # source://uri/lib/uri/ftp.rb#214 + def merge(oth); end + + # Returns the path from an FTP URI. + # + # RFC 1738 specifically states that the path for an FTP URI does not + # include the / which separates the URI path from the URI host. Example: + # + # ftp://ftp.example.com/pub/ruby + # + # The above URI indicates that the client should connect to + # ftp.example.com then cd to pub/ruby from the initial login directory. + # + # If you want to cd to an absolute directory, you must include an + # escaped / (%2F) in the path. Example: + # + # ftp://ftp.example.com/%2Fpub/ruby + # + # This method will then return "/pub/ruby". + # + # source://uri/lib/uri/ftp.rb#240 + def path; end + + # Returns a String representation of the URI::FTP. + # + # source://uri/lib/uri/ftp.rb#251 + def to_s; end + + # typecode accessor. + # + # See URI::FTP::COMPONENT. + # + # source://uri/lib/uri/ftp.rb#161 + def typecode; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the typecode +v+ + # (with validation). + # + # See also URI::FTP.check_typecode. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("ftp://john@ftp.example.com/my_file.img") + # #=> # + # uri.typecode = "i" + # uri + # #=> # + # + # source://uri/lib/uri/ftp.rb#208 + def typecode=(typecode); end + + protected + + # Private setter for the path of the URI::FTP. + # + # source://uri/lib/uri/ftp.rb#245 + def set_path(v); end + + # Private setter for the typecode +v+. + # + # See also URI::FTP.typecode=. + # + # source://uri/lib/uri/ftp.rb#180 + def set_typecode(v); end + + private + + # Validates typecode +v+, + # returns +true+ or +false+. + # + # source://uri/lib/uri/ftp.rb#166 + def check_typecode(v); end + + class << self + # == Description + # + # Creates a new URI::FTP object from components, with syntax checking. + # + # The components accepted are +userinfo+, +host+, +port+, +path+, and + # +typecode+. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [userinfo, host, port, path, typecode]. + # + # If the path supplied is absolute, it will be escaped in order to + # make it absolute in the URI. + # + # Examples: + # + # require 'uri' + # + # uri1 = URI::FTP.build(['user:password', 'ftp.example.com', nil, + # '/path/file.zip', 'i']) + # uri1.to_s # => "ftp://user:password@ftp.example.com/%2Fpath/file.zip;type=i" + # + # uri2 = URI::FTP.build({:host => 'ftp.example.com', + # :path => 'ruby/src'}) + # uri2.to_s # => "ftp://ftp.example.com/ruby/src" + # + # source://uri/lib/uri/ftp.rb#96 + def build(args); end + + # source://uri/lib/uri/ftp.rb#47 + def new2(user, password, host, port, path, typecode = T.unsafe(nil), arg_check = T.unsafe(nil)); end + end +end + +# The "file" URI is defined by RFC8089. +# +# source://uri/lib/uri/file.rb#10 +class URI::File < ::URI::Generic + # raise InvalidURIError + # + # @raise [URI::InvalidURIError] + # + # source://uri/lib/uri/file.rb#82 + def check_password(user); end + + # raise InvalidURIError + # + # @raise [URI::InvalidURIError] + # + # source://uri/lib/uri/file.rb#77 + def check_user(user); end + + # raise InvalidURIError + # + # @raise [URI::InvalidURIError] + # + # source://uri/lib/uri/file.rb#72 + def check_userinfo(user); end + + # Protected setter for the host component +v+. + # + # See also URI::Generic.host=. + # + # source://uri/lib/uri/file.rb#62 + def set_host(v); end + + # do nothing + # + # source://uri/lib/uri/file.rb#95 + def set_password(v); end + + # do nothing + # + # source://uri/lib/uri/file.rb#68 + def set_port(v); end + + # do nothing + # + # source://uri/lib/uri/file.rb#91 + def set_user(v); end + + # do nothing + # + # source://uri/lib/uri/file.rb#87 + def set_userinfo(v); end + + class << self + # == Description + # + # Creates a new URI::File object from components, with syntax checking. + # + # The components accepted are +host+ and +path+. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [host, path]. + # + # A path from e.g. the File class should be escaped before + # being passed. + # + # Examples: + # + # require 'uri' + # + # uri1 = URI::File.build(['host.example.com', '/path/file.zip']) + # uri1.to_s # => "file://host.example.com/path/file.zip" + # + # uri2 = URI::File.build({:host => 'host.example.com', + # :path => '/ruby/src'}) + # uri2.to_s # => "file://host.example.com/ruby/src" + # + # uri3 = URI::File.build({:path => URI::escape('/path/my file.txt')}) + # uri3.to_s # => "file:///path/my%20file.txt" + # + # source://uri/lib/uri/file.rb#53 + def build(args); end + end +end + +# An Array of the available components for URI::File. +# +# source://uri/lib/uri/file.rb#17 +URI::File::COMPONENT = T.let(T.unsafe(nil), Array) + +# A Default port of nil for URI::File. +# +# source://uri/lib/uri/file.rb#12 +URI::File::DEFAULT_PORT = T.let(T.unsafe(nil), T.untyped) + +class URI::GID < ::URI::Generic + # source://uri/lib/uri/generic.rb#243 + def app; end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#107 + def deconstruct_keys(_keys); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#29 + def model_id; end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#29 + def model_name; end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#29 + def params; end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#102 + def to_s; end + + protected + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#118 + def query=(query); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#129 + def set_params(params); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#112 + def set_path(path); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#124 + def set_query(query); end + + private + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#136 + def check_host(host); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#141 + def check_path(path); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#146 + def check_scheme(scheme); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#195 + def parse_query_params(query); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#154 + def set_model_components(path, validate = T.unsafe(nil)); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#174 + def validate_component(component); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#188 + def validate_model_id(model_id_part); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#181 + def validate_model_id_section(model_id, model_name); end + + class << self + # source://globalid/1.2.1lib/global_id/uri/gid.rb#88 + def build(args); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#72 + def create(app, model, params = T.unsafe(nil)); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#64 + def parse(uri); end + + # source://globalid/1.2.1lib/global_id/uri/gid.rb#48 + def validate_app(app); end + end +end + +# Base class for all URI classes. +# Implements generic URI syntax as per RFC 2396. +# +# source://uri/lib/uri/generic.rb#21 +class URI::Generic + include ::URI::RFC2396_REGEXP + include ::URI + + # == Args + # + # +scheme+:: + # Protocol scheme, i.e. 'http','ftp','mailto' and so on. + # +userinfo+:: + # User name and password, i.e. 'sdmitry:bla'. + # +host+:: + # Server host name. + # +port+:: + # Server port. + # +registry+:: + # Registry of naming authorities. + # +path+:: + # Path on server. + # +opaque+:: + # Opaque part. + # +query+:: + # Query data. + # +fragment+:: + # Part of the URI after '#' character. + # +parser+:: + # Parser for internal use [URI::DEFAULT_PARSER by default]. + # +arg_check+:: + # Check arguments [false by default]. + # + # == Description + # + # Creates a new URI::Generic instance from ``generic'' components without check. + # + # @return [Generic] a new instance of Generic + # + # source://uri/lib/uri/generic.rb#169 + def initialize(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = T.unsafe(nil), arg_check = T.unsafe(nil)); end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Merges two URIs. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.merge("/main.rbx?page=1") + # # => "http://my.example.com/main.rbx?page=1" + # merge + # + # source://uri/lib/uri/generic.rb#1109 + def +(oth); end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Calculates relative path from oth to self. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://my.example.com/main.rbx?page=1') + # uri.route_from('http://my.example.com') + # #=> # + # + # source://uri/lib/uri/generic.rb#1262 + def -(oth); end + + # Compares two URIs. + # + # source://uri/lib/uri/generic.rb#1384 + def ==(oth); end + + # Returns true if URI has a scheme (e.g. http:// or https://) specified. + # + # @return [Boolean] + # + # source://uri/lib/uri/generic.rb#972 + def absolute; end + + # Returns true if URI has a scheme (e.g. http:// or https://) specified. + # + # @return [Boolean] + # + # source://uri/lib/uri/generic.rb#972 + def absolute?; end + + # == Args + # + # +v+:: + # URI or String + # + # == Description + # + # Attempts to parse other URI +oth+, + # returns [parsed_oth, self]. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.coerce("http://foo.com") + # #=> [#, #] + # + # source://uri/lib/uri/generic.rb#1474 + def coerce(oth); end + + # Components of the URI in the order. + # + # source://uri/lib/uri/generic.rb#313 + def component; end + + # Returns the password component after URI decoding. + # + # source://uri/lib/uri/generic.rb#583 + def decoded_password; end + + # Returns the user component after URI decoding. + # + # source://uri/lib/uri/generic.rb#578 + def decoded_user; end + + # Returns default port. + # + # source://uri/lib/uri/generic.rb#39 + def default_port; end + + # @return [Boolean] + # + # source://uri/lib/uri/generic.rb#1396 + def eql?(oth); end + + # Returns a proxy URI. + # The proxy URI is obtained from environment variables such as http_proxy, + # ftp_proxy, no_proxy, etc. + # If there is no proper proxy, nil is returned. + # + # If the optional parameter +env+ is specified, it is used instead of ENV. + # + # Note that capitalized variables (HTTP_PROXY, FTP_PROXY, NO_PROXY, etc.) + # are examined, too. + # + # But http_proxy and HTTP_PROXY is treated specially under CGI environment. + # It's because HTTP_PROXY may be set by Proxy: header. + # So HTTP_PROXY is not used. + # http_proxy is not used too if the variable is case insensitive. + # CGI_HTTP_PROXY can be used instead. + # + # @raise [BadURIError] + # + # source://uri/lib/uri/generic.rb#1500 + def find_proxy(env = T.unsafe(nil)); end + + # Returns the fragment component of the URI. + # + # URI("http://foo/bar/baz?search=FooBar#ponies").fragment #=> "ponies" + # + # source://uri/lib/uri/generic.rb#283 + def fragment; end + + # Checks the fragment +v+ component against the URI::Parser Regexp for :FRAGMENT. + # + # + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the fragment component +v+ + # (with validation). + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com/?id=25#time=1305212049") + # uri.fragment = "time=1305212086" + # uri.to_s #=> "http://my.example.com/?id=25#time=1305212086" + # + # source://uri/lib/uri/generic.rb#929 + def fragment=(v); end + + # source://uri/lib/uri/generic.rb#1392 + def hash; end + + # Returns true if URI is hierarchical. + # + # == Description + # + # URI has components listed in order of decreasing significance from left to right, + # see RFC3986 https://tools.ietf.org/html/rfc3986 1.2.3. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com/") + # uri.hierarchical? + # #=> true + # uri = URI.parse("mailto:joe@example.com") + # uri.hierarchical? + # #=> false + # + # @return [Boolean] + # + # source://uri/lib/uri/generic.rb#961 + def hierarchical?; end + + # Returns the host component of the URI. + # + # URI("http://foo/bar/baz").host #=> "foo" + # + # It returns nil if no host component exists. + # + # URI("mailto:foo@example.org").host #=> nil + # + # The component does not contain the port number. + # + # URI("http://foo:8080/bar/baz").host #=> "foo" + # + # Since IPv6 addresses are wrapped with brackets in URIs, + # this method returns IPv6 addresses wrapped with brackets. + # This form is not appropriate to pass to socket methods such as TCPSocket.open. + # If unwrapped host names are required, use the #hostname method. + # + # URI("http://[::1]/bar/baz").host #=> "[::1]" + # URI("http://[::1]/bar/baz").hostname #=> "::1" + # + # source://uri/lib/uri/generic.rb#243 + def host; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the host component +v+ + # (with validation). + # + # See also URI::Generic.check_host. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.host = "foo.com" + # uri.to_s #=> "http://foo.com" + # + # source://uri/lib/uri/generic.rb#639 + def host=(v); end + + # Extract the host part of the URI and unwrap brackets for IPv6 addresses. + # + # This method is the same as URI::Generic#host except + # brackets for IPv6 (and future IP) addresses are removed. + # + # uri = URI("http://[::1]/bar") + # uri.hostname #=> "::1" + # uri.host #=> "[::1]" + # + # source://uri/lib/uri/generic.rb#654 + def hostname; end + + # Sets the host part of the URI as the argument with brackets for IPv6 addresses. + # + # This method is the same as URI::Generic#host= except + # the argument can be a bare IPv6 address. + # + # uri = URI("http://foo/bar") + # uri.hostname = "::1" + # uri.to_s #=> "http://[::1]/bar" + # + # If the argument seems to be an IPv6 address, + # it is wrapped with brackets. + # + # source://uri/lib/uri/generic.rb#671 + def hostname=(v); end + + # source://uri/lib/uri/generic.rb#1451 + def inspect; end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Merges two URIs. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.merge("/main.rbx?page=1") + # # => "http://my.example.com/main.rbx?page=1" + # + # source://uri/lib/uri/generic.rb#1109 + def merge(oth); end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Destructive form of #merge. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.merge!("/main.rbx?page=1") + # uri.to_s # => "http://my.example.com/main.rbx?page=1" + # + # source://uri/lib/uri/generic.rb#1081 + def merge!(oth); end + + # Returns normalized URI. + # + # require 'uri' + # + # URI("HTTP://my.EXAMPLE.com").normalize + # #=> # + # + # Normalization here means: + # + # * scheme and host are converted to lowercase, + # * an empty path component is set to "/". + # + # source://uri/lib/uri/generic.rb#1319 + def normalize; end + + # Destructive version of #normalize. + # + # source://uri/lib/uri/generic.rb#1328 + def normalize!; end + + # Returns the opaque part of the URI. + # + # URI("mailto:foo@example.org").opaque #=> "foo@example.org" + # URI("http://foo/bar/baz").opaque #=> nil + # + # The portion of the path that does not make use of the slash '/'. + # The path typically refers to an absolute path or an opaque part. + # (See RFC2396 Section 3 and 5.2.) + # + # source://uri/lib/uri/generic.rb#277 + def opaque; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the opaque component +v+ + # (with validation). + # + # See also URI::Generic.check_opaque. + # + # source://uri/lib/uri/generic.rb#901 + def opaque=(v); end + + # Returns the parser to be used. + # + # Unless a URI::Parser is defined, DEFAULT_PARSER is used. + # + # source://uri/lib/uri/generic.rb#289 + def parser; end + + # Returns the password component (without URI decoding). + # + # source://uri/lib/uri/generic.rb#573 + def password; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the +password+ component + # (with validation). + # + # See also URI::Generic.check_password. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://john:S3nsit1ve@my.example.com") + # uri.password = "V3ry_S3nsit1ve" + # uri.to_s #=> "http://john:V3ry_S3nsit1ve@my.example.com" + # + # source://uri/lib/uri/generic.rb#498 + def password=(password); end + + # Returns the path component of the URI. + # + # URI("http://foo/bar/baz").path #=> "/bar/baz" + # + # source://uri/lib/uri/generic.rb#260 + def path; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the path component +v+ + # (with validation). + # + # See also URI::Generic.check_path. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com/pub/files") + # uri.path = "/faq/" + # uri.to_s #=> "http://my.example.com/faq/" + # + # source://uri/lib/uri/generic.rb#815 + def path=(v); end + + # Returns the port component of the URI. + # + # URI("http://foo/bar/baz").port #=> 80 + # URI("http://foo:8080/bar/baz").port #=> 8080 + # + # source://uri/lib/uri/generic.rb#250 + def port; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the port component +v+ + # (with validation). + # + # See also URI::Generic.check_port. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.port = 8080 + # uri.to_s #=> "http://my.example.com:8080" + # + # source://uri/lib/uri/generic.rb#729 + def port=(v); end + + # Returns the query component of the URI. + # + # URI("http://foo/bar/baz?search=FooBar").query #=> "search=FooBar" + # + # source://uri/lib/uri/generic.rb#266 + def query; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the query component +v+. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com/?id=25") + # uri.query = "id=1" + # uri.to_s #=> "http://my.example.com/?id=1" + # + # @raise [InvalidURIError] + # + # source://uri/lib/uri/generic.rb#839 + def query=(v); end + + # source://uri/lib/uri/generic.rb#252 + def registry; end + + # @raise [InvalidURIError] + # + # source://uri/lib/uri/generic.rb#745 + def registry=(v); end + + # Returns true if URI does not have a scheme (e.g. http:// or https://) specified. + # + # @return [Boolean] + # + # source://uri/lib/uri/generic.rb#984 + def relative?; end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Calculates relative path from oth to self. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://my.example.com/main.rbx?page=1') + # uri.route_from('http://my.example.com') + # #=> # + # + # source://uri/lib/uri/generic.rb#1262 + def route_from(oth); end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Calculates relative path to oth from self. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://my.example.com') + # uri.route_to('http://my.example.com/main.rbx?page=1') + # #=> # + # + # source://uri/lib/uri/generic.rb#1302 + def route_to(oth); end + + # Returns the scheme component of the URI. + # + # URI("http://foo/bar/baz").scheme #=> "http" + # + # source://uri/lib/uri/generic.rb#221 + def scheme; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the scheme component +v+ + # (with validation). + # + # See also URI::Generic.check_scheme. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.scheme = "https" + # uri.to_s #=> "https://my.example.com" + # + # source://uri/lib/uri/generic.rb#360 + def scheme=(v); end + + # == Args + # + # +components+:: + # Multiple Symbol arguments defined in URI::HTTP. + # + # == Description + # + # Selects specified components from URI. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx') + # uri.select(:userinfo, :host, :path) + # # => ["myuser:mypass", "my.example.com", "/test.rbx"] + # + # source://uri/lib/uri/generic.rb#1440 + def select(*components); end + + # Constructs String from URI. + # + # source://uri/lib/uri/generic.rb#1343 + def to_s; end + + # Constructs String from URI. + # + # source://uri/lib/uri/generic.rb#1343 + def to_str; end + + # Returns the user component (without URI decoding). + # + # source://uri/lib/uri/generic.rb#568 + def user; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the +user+ component + # (with validation). + # + # See also URI::Generic.check_user. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://john:S3nsit1ve@my.example.com") + # uri.user = "sam" + # uri.to_s #=> "http://sam:V3ry_S3nsit1ve@my.example.com" + # + # source://uri/lib/uri/generic.rb#471 + def user=(user); end + + # Returns the userinfo, either as 'user' or 'user:password'. + # + # source://uri/lib/uri/generic.rb#557 + def userinfo; end + + # Sets userinfo, argument is string like 'name:pass'. + # + # source://uri/lib/uri/generic.rb#441 + def userinfo=(userinfo); end + + protected + + # Returns an Array of the components defined from the COMPONENT Array. + # + # source://uri/lib/uri/generic.rb#1416 + def component_ary; end + + # Protected setter for the host component +v+. + # + # See also URI::Generic.host=. + # + # source://uri/lib/uri/generic.rb#613 + def set_host(v); end + + # Protected setter for the opaque component +v+. + # + # See also URI::Generic.opaque=. + # + # source://uri/lib/uri/generic.rb#883 + def set_opaque(v); end + + # Protected setter for the password component +v+. + # + # See also URI::Generic.password=. + # + # source://uri/lib/uri/generic.rb#534 + def set_password(v); end + + # Protected setter for the path component +v+. + # + # See also URI::Generic.path=. + # + # source://uri/lib/uri/generic.rb#789 + def set_path(v); end + + # Protected setter for the port component +v+. + # + # See also URI::Generic.port=. + # + # source://uri/lib/uri/generic.rb#702 + def set_port(v); end + + # @raise [InvalidURIError] + # + # source://uri/lib/uri/generic.rb#740 + def set_registry(v); end + + # Protected setter for the scheme component +v+. + # + # See also URI::Generic.scheme=. + # + # source://uri/lib/uri/generic.rb#334 + def set_scheme(v); end + + # Protected setter for the user component +v+. + # + # See also URI::Generic.user=. + # + # source://uri/lib/uri/generic.rb#524 + def set_user(v); end + + # Protected setter for the +user+ component, and +password+ if available + # (with validation). + # + # See also URI::Generic.userinfo=. + # + # source://uri/lib/uri/generic.rb#509 + def set_userinfo(user, password = T.unsafe(nil)); end + + private + + # Checks the host +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp for :HOST. + # + # Can not have a registry or opaque component defined, + # with a host component defined. + # + # source://uri/lib/uri/generic.rb#594 + def check_host(v); end + + # Checks the opaque +v+ component for RFC2396 compliance and + # against the URI::Parser Regexp for :OPAQUE. + # + # Can not have a host, port, user, or path component defined, + # with an opaque component defined. + # + # source://uri/lib/uri/generic.rb#861 + def check_opaque(v); end + + # Checks the password +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp for :USERINFO. + # + # Can not have a registry or opaque component defined, + # with a user component defined. + # + # source://uri/lib/uri/generic.rb#417 + def check_password(v, user = T.unsafe(nil)); end + + # Checks the path +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp + # for :ABS_PATH and :REL_PATH. + # + # Can not have a opaque component defined, + # with a path component defined. + # + # source://uri/lib/uri/generic.rb#757 + def check_path(v); end + + # Checks the port +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp for :PORT. + # + # Can not have a registry or opaque component defined, + # with a port component defined. + # + # source://uri/lib/uri/generic.rb#683 + def check_port(v); end + + # @raise [InvalidURIError] + # + # source://uri/lib/uri/generic.rb#735 + def check_registry(v); end + + # Checks the scheme +v+ component against the URI::Parser Regexp for :SCHEME. + # + # source://uri/lib/uri/generic.rb#320 + def check_scheme(v); end + + # Checks the user +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp for :USERINFO. + # + # Can not have a registry or opaque component defined, + # with a user component defined. + # + # source://uri/lib/uri/generic.rb#393 + def check_user(v); end + + # Checks the +user+ and +password+. + # + # If +password+ is not provided, then +user+ is + # split, using URI::Generic.split_userinfo, to + # pull +user+ and +password. + # + # See also URI::Generic.check_user, URI::Generic.check_password. + # + # source://uri/lib/uri/generic.rb#375 + def check_userinfo(user, password = T.unsafe(nil)); end + + # Escapes 'user:password' +v+ based on RFC 1738 section 3.1. + # + # source://uri/lib/uri/generic.rb#551 + def escape_userpass(v); end + + # Merges a base path +base+, with relative path +rel+, + # returns a modified base path. + # + # source://uri/lib/uri/generic.rb#1000 + def merge_path(base, rel); end + + # Replaces self by other URI object. + # + # source://uri/lib/uri/generic.rb#299 + def replace!(oth); end + + # :stopdoc: + # + # source://uri/lib/uri/generic.rb#1194 + def route_from0(oth); end + + # :stopdoc: + # + # source://uri/lib/uri/generic.rb#1155 + def route_from_path(src, dst); end + + # Returns an Array of the path split on '/'. + # + # source://uri/lib/uri/generic.rb#991 + def split_path(path); end + + # Returns the userinfo +ui+ as [user, password] + # if properly formatted as 'user:password'. + # + # source://uri/lib/uri/generic.rb#542 + def split_userinfo(ui); end + + class << self + # == Synopsis + # + # See ::new. + # + # == Description + # + # Creates a new URI::Generic instance from components of URI::Generic + # with check. Components are: scheme, userinfo, host, port, registry, path, + # opaque, query, and fragment. You can provide arguments either by an Array or a Hash. + # See ::new for hash keys to use or for order of array items. + # + # source://uri/lib/uri/generic.rb#116 + def build(args); end + + # == Synopsis + # + # See ::new. + # + # == Description + # + # At first, tries to create a new URI::Generic instance using + # URI::Generic::build. But, if exception URI::InvalidComponentError is raised, + # then it does URI::Escape.escape all URI components and tries again. + # + # source://uri/lib/uri/generic.rb#78 + def build2(args); end + + # Components of the URI in the order. + # + # source://uri/lib/uri/generic.rb#57 + def component; end + + # Returns default port. + # + # source://uri/lib/uri/generic.rb#32 + def default_port; end + + # @return [Boolean] + # + # source://uri/lib/uri/generic.rb#1566 + def use_proxy?(hostname, addr, port, no_proxy); end + + # source://uri/lib/uri/generic.rb#63 + def use_registry; end + end +end + +# The syntax of HTTP URIs is defined in RFC1738 section 3.3. +# +# Note that the Ruby URI library allows HTTP URLs containing usernames and +# passwords. This is not legal as per the RFC, but used to be +# supported in Internet Explorer 5 and 6, before the MS04-004 security +# update. See . +# +# source://uri/lib/uri/http.rb#22 +class URI::HTTP < ::URI::Generic + # == Description + # + # Returns the authority for an HTTP uri, as defined in + # https://datatracker.ietf.org/doc/html/rfc3986/#section-3.2. + # + # + # Example: + # + # URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').authority #=> "www.example.com" + # URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').authority #=> "www.example.com:8000" + # URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').authority #=> "www.example.com" + # + # source://uri/lib/uri/http.rb#97 + def authority; end + + # == Description + # + # Returns the origin for an HTTP uri, as defined in + # https://datatracker.ietf.org/doc/html/rfc6454. + # + # + # Example: + # + # URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').origin #=> "http://www.example.com" + # URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').origin #=> "http://www.example.com:8000" + # URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').origin #=> "http://www.example.com" + # URI::HTTPS.build(host: 'www.example.com', path: '/foo/bar').origin #=> "https://www.example.com" + # + # source://uri/lib/uri/http.rb#119 + def origin; end + + # == Description + # + # Returns the full path for an HTTP request, as required by Net::HTTP::Get. + # + # If the URI contains a query, the full path is URI#path + '?' + URI#query. + # Otherwise, the path is simply URI#path. + # + # Example: + # + # uri = URI::HTTP.build(path: '/foo/bar', query: 'test=true') + # uri.request_uri # => "/foo/bar?test=true" + # + # source://uri/lib/uri/http.rb#77 + def request_uri; end + + class << self + # == Description + # + # Creates a new URI::HTTP object from components, with syntax checking. + # + # The components accepted are userinfo, host, port, path, query, and + # fragment. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [userinfo, host, port, path, query, fragment]. + # + # Example: + # + # uri = URI::HTTP.build(host: 'www.example.com', path: '/foo/bar') + # + # uri = URI::HTTP.build([nil, "www.example.com", nil, "/path", + # "query", 'fragment']) + # + # Currently, if passed userinfo components this method generates + # invalid HTTP URIs as per RFC 1738. + # + # source://uri/lib/uri/http.rb#59 + def build(args); end + end +end + +# source://uri/lib/uri/common.rb#105 +URI::INITIAL_SCHEMES = T.let(T.unsafe(nil), Hash) + +# LDAP URI SCHEMA (described in RFC2255). +# -- +# ldap:///[?[?[?[?]]]] +# ++ +# +# source://uri/lib/uri/ldap.rb#23 +class URI::LDAP < ::URI::Generic + # == Description + # + # Creates a new URI::LDAP object from generic URI components as per + # RFC 2396. No LDAP-specific syntax checking is performed. + # + # Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+, + # +opaque+, +query+, and +fragment+, in that order. + # + # Example: + # + # uri = URI::LDAP.new("ldap", nil, "ldap.example.com", nil, nil, + # "/dc=example;dc=com", nil, "query", nil) + # + # See also URI::Generic.new. + # + # @return [LDAP] a new instance of LDAP + # + # source://uri/lib/uri/ldap.rb#108 + def initialize(*arg); end + + # Returns attributes. + # + # source://uri/lib/uri/ldap.rb#178 + def attributes; end + + # Setter for attributes +val+. + # + # source://uri/lib/uri/ldap.rb#191 + def attributes=(val); end + + # Returns dn. + # + # source://uri/lib/uri/ldap.rb#159 + def dn; end + + # Setter for dn +val+. + # + # source://uri/lib/uri/ldap.rb#172 + def dn=(val); end + + # Returns extensions. + # + # source://uri/lib/uri/ldap.rb#235 + def extensions; end + + # Setter for extensions +val+. + # + # source://uri/lib/uri/ldap.rb#248 + def extensions=(val); end + + # Returns filter. + # + # source://uri/lib/uri/ldap.rb#216 + def filter; end + + # Setter for filter +val+. + # + # source://uri/lib/uri/ldap.rb#229 + def filter=(val); end + + # Checks if URI has a path. + # For URI::LDAP this will return +false+. + # + # @return [Boolean] + # + # source://uri/lib/uri/ldap.rb#255 + def hierarchical?; end + + # Returns scope. + # + # source://uri/lib/uri/ldap.rb#197 + def scope; end + + # Setter for scope +val+. + # + # source://uri/lib/uri/ldap.rb#210 + def scope=(val); end + + protected + + # Private setter for attributes +val+. + # + # source://uri/lib/uri/ldap.rb#183 + def set_attributes(val); end + + # Private setter for dn +val+. + # + # source://uri/lib/uri/ldap.rb#164 + def set_dn(val); end + + # Private setter for extensions +val+. + # + # source://uri/lib/uri/ldap.rb#240 + def set_extensions(val); end + + # Private setter for filter +val+. + # + # source://uri/lib/uri/ldap.rb#221 + def set_filter(val); end + + # Private setter for scope +val+. + # + # source://uri/lib/uri/ldap.rb#202 + def set_scope(val); end + + private + + # Private method to assemble +query+ from +attributes+, +scope+, +filter+, and +extensions+. + # + # source://uri/lib/uri/ldap.rb#146 + def build_path_query; end + + # Private method to cleanup +dn+ from using the +path+ component attribute. + # + # @raise [InvalidURIError] + # + # source://uri/lib/uri/ldap.rb#120 + def parse_dn; end + + # Private method to cleanup +attributes+, +scope+, +filter+, and +extensions+ + # from using the +query+ component attribute. + # + # source://uri/lib/uri/ldap.rb#128 + def parse_query; end + + class << self + # == Description + # + # Creates a new URI::LDAP object from components, with syntax checking. + # + # The components accepted are host, port, dn, attributes, + # scope, filter, and extensions. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [host, port, dn, attributes, scope, filter, extensions]. + # + # Example: + # + # uri = URI::LDAP.build({:host => 'ldap.example.com', + # :dn => '/dc=example'}) + # + # uri = URI::LDAP.build(["ldap.example.com", nil, + # "/dc=example;dc=com", "query", nil, nil, nil]) + # + # source://uri/lib/uri/ldap.rb#74 + def build(args); end + end +end + +# RFC6068, the mailto URL scheme. +# +# source://uri/lib/uri/mailto.rb#17 +class URI::MailTo < ::URI::Generic + # == Description + # + # Creates a new URI::MailTo object from generic URL components with + # no syntax checking. + # + # This method is usually called from URI::parse, which checks + # the validity of each component. + # + # @return [MailTo] a new instance of MailTo + # + # source://uri/lib/uri/mailto.rb#132 + def initialize(*arg); end + + # E-mail headers set by the URL, as an Array of Arrays. + # + # source://uri/lib/uri/mailto.rb#166 + def headers; end + + # Setter for headers +v+. + # + # source://uri/lib/uri/mailto.rb#232 + def headers=(v); end + + # The primary e-mail address of the URL, as a String. + # + # source://uri/lib/uri/mailto.rb#163 + def to; end + + # Setter for to +v+. + # + # source://uri/lib/uri/mailto.rb#200 + def to=(v); end + + # Returns the RFC822 e-mail text equivalent of the URL, as a String. + # + # Example: + # + # require 'uri' + # + # uri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr") + # uri.to_mailtext + # # => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n" + # + # source://uri/lib/uri/mailto.rb#268 + def to_mailtext; end + + # Returns the RFC822 e-mail text equivalent of the URL, as a String. + # + # Example: + # + # require 'uri' + # + # uri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr") + # uri.to_mailtext + # # => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n" + # + # source://uri/lib/uri/mailto.rb#268 + def to_rfc822text; end + + # Constructs String from URI. + # + # source://uri/lib/uri/mailto.rb#239 + def to_s; end + + protected + + # Private setter for headers +v+. + # + # source://uri/lib/uri/mailto.rb#221 + def set_headers(v); end + + # Private setter for to +v+. + # + # source://uri/lib/uri/mailto.rb#194 + def set_to(v); end + + private + + # Checks the headers +v+ component against either + # * HEADER_REGEXP + # + # source://uri/lib/uri/mailto.rb#208 + def check_headers(v); end + + # Checks the to +v+ component. + # + # source://uri/lib/uri/mailto.rb#169 + def check_to(v); end + + class << self + # == Description + # + # Creates a new URI::MailTo object from components, with syntax checking. + # + # Components can be provided as an Array or Hash. If an Array is used, + # the components must be supplied as [to, headers]. + # + # If a Hash is used, the keys are the component names preceded by colons. + # + # The headers can be supplied as a pre-encoded string, such as + # "subject=subscribe&cc=address", or as an Array of Arrays + # like [['subject', 'subscribe'], ['cc', 'address']]. + # + # Examples: + # + # require 'uri' + # + # m1 = URI::MailTo.build(['joe@example.com', 'subject=Ruby']) + # m1.to_s # => "mailto:joe@example.com?subject=Ruby" + # + # m2 = URI::MailTo.build(['john@example.com', [['Subject', 'Ruby'], ['Cc', 'jack@example.com']]]) + # m2.to_s # => "mailto:john@example.com?Subject=Ruby&Cc=jack@example.com" + # + # m3 = URI::MailTo.build({:to => 'listman@example.com', :headers => [['subject', 'subscribe']]}) + # m3.to_s # => "mailto:listman@example.com?subject=subscribe" + # + # source://uri/lib/uri/mailto.rb#85 + def build(args); end + end +end + +# Class that parses String's into URI's. +# +# It contains a Hash set of patterns and Regexp's that match and validate. +# +# source://uri/lib/uri/rfc2396_parser.rb#64 +class URI::RFC2396_Parser + include ::URI::RFC2396_REGEXP + + # == Synopsis + # + # URI::Parser.new([opts]) + # + # == Args + # + # The constructor accepts a hash as options for parser. + # Keys of options are pattern names of URI components + # and values of options are pattern strings. + # The constructor generates set of regexps for parsing URIs. + # + # You can use the following keys: + # + # * :ESCAPED (URI::PATTERN::ESCAPED in default) + # * :UNRESERVED (URI::PATTERN::UNRESERVED in default) + # * :DOMLABEL (URI::PATTERN::DOMLABEL in default) + # * :TOPLABEL (URI::PATTERN::TOPLABEL in default) + # * :HOSTNAME (URI::PATTERN::HOSTNAME in default) + # + # == Examples + # + # p = URI::Parser.new(:ESCAPED => "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})") + # u = p.parse("http://example.jp/%uABCD") #=> # + # URI.parse(u.to_s) #=> raises URI::InvalidURIError + # + # s = "http://example.com/ABCD" + # u1 = p.parse(s) #=> # + # u2 = URI.parse(s) #=> # + # u1 == u2 #=> true + # u1.eql?(u2) #=> false + # + # @return [RFC2396_Parser] a new instance of RFC2396_Parser + # + # source://uri/lib/uri/rfc2396_parser.rb#99 + def initialize(opts = T.unsafe(nil)); end + + # :call-seq: + # escape( str ) + # escape( str, unsafe ) + # + # == Args + # + # +str+:: + # String to make safe + # +unsafe+:: + # Regexp to apply. Defaults to +self.regexp[:UNSAFE]+ + # + # == Description + # + # Constructs a safe String from +str+, removing unsafe characters, + # replacing them with codes. + # + # source://uri/lib/uri/rfc2396_parser.rb#287 + def escape(str, unsafe = T.unsafe(nil)); end + + # :call-seq: + # extract( str ) + # extract( str, schemes ) + # extract( str, schemes ) {|item| block } + # + # == Args + # + # +str+:: + # String to search + # +schemes+:: + # Patterns to apply to +str+ + # + # == Description + # + # Attempts to parse and merge a set of URIs. + # If no +block+ given, then returns the result, + # else it calls +block+ for each element in result. + # + # See also URI::Parser.make_regexp. + # + # source://uri/lib/uri/rfc2396_parser.rb#249 + def extract(str, schemes = T.unsafe(nil)); end + + # source://uri/lib/uri/rfc2396_parser.rb#326 + def inspect; end + + # == Args + # + # +uris+:: + # an Array of Strings + # + # == Description + # + # Attempts to parse and merge a set of URIs. + # + # source://uri/lib/uri/rfc2396_parser.rb#223 + def join(*uris); end + + # Returns Regexp that is default +self.regexp[:ABS_URI_REF]+, + # unless +schemes+ is provided. Then it is a Regexp.union with +self.pattern[:X_ABS_URI]+. + # + # source://uri/lib/uri/rfc2396_parser.rb#262 + def make_regexp(schemes = T.unsafe(nil)); end + + # == Args + # + # +uri+:: + # String + # + # == Description + # + # Parses +uri+ and constructs either matching URI scheme object + # (File, FTP, HTTP, HTTPS, LDAP, LDAPS, or MailTo) or URI::Generic. + # + # == Usage + # + # p = URI::Parser.new + # p.parse("ldap://ldap.example.com/dc=example?user=john") + # #=> # + # + # source://uri/lib/uri/rfc2396_parser.rb#209 + def parse(uri); end + + # The Hash of patterns. + # + # See also URI::Parser.initialize_pattern. + # + # source://uri/lib/uri/rfc2396_parser.rb#112 + def pattern; end + + # The Hash of Regexp. + # + # See also URI::Parser.initialize_regexp. + # + # source://uri/lib/uri/rfc2396_parser.rb#117 + def regexp; end + + # Returns a split URI against +regexp[:ABS_URI]+. + # + # source://uri/lib/uri/rfc2396_parser.rb#120 + def split(uri); end + + # :call-seq: + # unescape( str ) + # unescape( str, escaped ) + # + # == Args + # + # +str+:: + # String to remove escapes from + # +escaped+:: + # Regexp to apply. Defaults to +self.regexp[:ESCAPED]+ + # + # == Description + # + # Removes escapes from +str+. + # + # source://uri/lib/uri/rfc2396_parser.rb#318 + def unescape(str, escaped = T.unsafe(nil)); end + + private + + # source://uri/lib/uri/rfc2396_parser.rb#527 + def convert_to_uri(uri); end + + # Constructs the default Hash of patterns. + # + # source://uri/lib/uri/rfc2396_parser.rb#338 + def initialize_pattern(opts = T.unsafe(nil)); end + + # Constructs the default Hash of Regexp's. + # + # source://uri/lib/uri/rfc2396_parser.rb#496 + def initialize_regexp(pattern); end +end + +# source://uri/lib/uri/rfc3986_parser.rb#3 +class URI::RFC3986_Parser + # @return [RFC3986_Parser] a new instance of RFC3986_Parser + # + # source://uri/lib/uri/rfc3986_parser.rb#73 + def initialize; end + + # source://uri/lib/uri/rfc3986_parser.rb#146 + def inspect; end + + # source://uri/lib/uri/rfc3986_parser.rb#139 + def join(*uris); end + + # source://uri/lib/uri/rfc3986_parser.rb#134 + def parse(uri); end + + # Returns the value of attribute regexp. + # + # source://uri/lib/uri/rfc3986_parser.rb#71 + def regexp; end + + # source://uri/lib/uri/rfc3986_parser.rb#77 + def split(uri); end + + private + + # source://uri/lib/uri/rfc3986_parser.rb#171 + def convert_to_uri(uri); end + + # source://uri/lib/uri/rfc3986_parser.rb#157 + def default_regexp; end +end + +# source://uri/lib/uri/rfc3986_parser.rb#33 +URI::RFC3986_Parser::FRAGMENT = T.let(T.unsafe(nil), String) + +# URI defined in RFC3986 +# +# source://uri/lib/uri/rfc3986_parser.rb#5 +URI::RFC3986_Parser::HOST = T.let(T.unsafe(nil), Regexp) + +# source://uri/lib/uri/rfc3986_parser.rb#54 +URI::RFC3986_Parser::RFC3986_relative_ref = T.let(T.unsafe(nil), Regexp) + +# source://uri/lib/uri/rfc3986_parser.rb#30 +URI::RFC3986_Parser::SCHEME = T.let(T.unsafe(nil), String) + +# source://uri/lib/uri/rfc3986_parser.rb#31 +URI::RFC3986_Parser::SEG = T.let(T.unsafe(nil), String) + +# source://uri/lib/uri/rfc3986_parser.rb#32 +URI::RFC3986_Parser::SEG_NC = T.let(T.unsafe(nil), String) + +# source://uri/lib/uri/rfc3986_parser.rb#28 +URI::RFC3986_Parser::USERINFO = T.let(T.unsafe(nil), Regexp) + +# source://uri/lib/uri/common.rb#69 +module URI::Schemes; end + +# source://uri/lib/uri/common.rb#82 +URI::Schemes::FILE = URI::File + +# source://uri/lib/uri/common.rb#82 +URI::Schemes::FTP = URI::FTP + +# source://uri/lib/uri/common.rb#82 +URI::Schemes::GID = URI::GID + +# source://uri/lib/uri/common.rb#82 +URI::Schemes::HTTP = URI::HTTP + +# source://uri/lib/uri/common.rb#82 +URI::Schemes::HTTPS = URI::HTTPS + +# source://uri/lib/uri/common.rb#82 +URI::Schemes::LDAP = URI::LDAP + +# source://uri/lib/uri/common.rb#82 +URI::Schemes::LDAPS = URI::LDAPS + +# source://uri/lib/uri/common.rb#82 +URI::Schemes::MAILTO = URI::MailTo + +# source://uri/lib/uri/common.rb#82 +URI::Schemes::SOURCE = URI::Source + +# source://uri/lib/uri/common.rb#82 +URI::Schemes::WS = URI::WS + +# source://uri/lib/uri/common.rb#82 +URI::Schemes::WSS = URI::WSS + +class URI::Source < ::URI::File + # source://ruby-lsp/0.21.2lib/ruby_lsp/requests/support/source_uri.rb#69 + sig { params(v: T.nilable(::String)).returns(T::Boolean) } + def check_host(v); end + + # source://uri/lib/uri/generic.rb#243 + def gem_name; end + + # source://ruby-lsp/0.21.2lib/ruby_lsp/requests/support/source_uri.rb#33 + sig { returns(T.nilable(::String)) } + def gem_version; end + + # source://uri/lib/uri/generic.rb#283 + def line_number; end + + # source://ruby-lsp/0.21.2lib/ruby_lsp/requests/support/source_uri.rb#59 + sig { params(v: T.nilable(::String)).void } + def set_path(v); end + + # source://ruby-lsp/0.21.2lib/ruby_lsp/requests/support/source_uri.rb#81 + sig { returns(::String) } + def to_s; end + + class << self + # source://ruby-lsp/0.21.2lib/ruby_lsp/requests/support/source_uri.rb#46 + sig do + params( + gem_name: ::String, + gem_version: T.nilable(::String), + path: ::String, + line_number: T.nilable(::String) + ).returns(::URI::Source) + end + def build(gem_name:, gem_version:, path:, line_number:); end + end +end + +# source://uri/lib/uri/common.rb#287 +URI::TBLENCURICOMP_ = T.let(T.unsafe(nil), Hash) + +# source://uri/lib/uri/common.rb#37 +module URI::Util + private + + # source://uri/lib/uri/common.rb#38 + def make_components_hash(klass, array_hash); end + + class << self + # source://uri/lib/uri/common.rb#38 + def make_components_hash(klass, array_hash); end + end +end + +# The syntax of WS URIs is defined in RFC6455 section 3. +# +# Note that the Ruby URI library allows WS URLs containing usernames and +# passwords. This is not legal as per the RFC, but used to be +# supported in Internet Explorer 5 and 6, before the MS04-004 security +# update. See . +# +# source://uri/lib/uri/ws.rb#22 +class URI::WS < ::URI::Generic + # == Description + # + # Returns the full path for a WS URI, as required by Net::HTTP::Get. + # + # If the URI contains a query, the full path is URI#path + '?' + URI#query. + # Otherwise, the path is simply URI#path. + # + # Example: + # + # uri = URI::WS.build(path: '/foo/bar', query: 'test=true') + # uri.request_uri # => "/foo/bar?test=true" + # + # source://uri/lib/uri/ws.rb#74 + def request_uri; end + + class << self + # == Description + # + # Creates a new URI::WS object from components, with syntax checking. + # + # The components accepted are userinfo, host, port, path, and query. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [userinfo, host, port, path, query]. + # + # Example: + # + # uri = URI::WS.build(host: 'www.example.com', path: '/foo/bar') + # + # uri = URI::WS.build([nil, "www.example.com", nil, "/path", "query"]) + # + # Currently, if passed userinfo components this method generates + # invalid WS URIs as per RFC 1738. + # + # source://uri/lib/uri/ws.rb#56 + def build(args); end + end +end + +# The default port for WSS URIs is 443, and the scheme is 'wss:' rather +# than 'ws:'. Other than that, WSS URIs are identical to WS URIs; +# see URI::WS. +# +# source://uri/lib/uri/wss.rb#17 +class URI::WSS < ::URI::WS; end + +# A Default port of 443 for URI::WSS +# +# source://uri/lib/uri/wss.rb#19 +URI::WSS::DEFAULT_PORT = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/useragent@0.16.10.rbi b/sorbet/rbi/gems/useragent@0.16.10.rbi new file mode 100644 index 00000000..bf7b53fb --- /dev/null +++ b/sorbet/rbi/gems/useragent@0.16.10.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `useragent` gem. +# Please instead update this file by running `bin/tapioca gem useragent`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi index afa3754a..8cd114c5 100644 --- a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +++ b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi @@ -382,7 +382,7 @@ class YARDSorbet::TStructProp < ::T::Struct const :types, T::Array[::String] class << self - # source://sorbet-runtime/0.5.11554lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11577lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/yard@0.9.36.rbi b/sorbet/rbi/gems/yard@0.9.36.rbi index 35edf909..3ea28f6b 100644 --- a/sorbet/rbi/gems/yard@0.9.36.rbi +++ b/sorbet/rbi/gems/yard@0.9.36.rbi @@ -491,19 +491,19 @@ RUBY19 = T.let(T.unsafe(nil), TrueClass) # # source://yard/lib/yard/server/rack_adapter.rb#93 class Rack::Request - # source://rack/3.0.11lib/rack/request.rb#62 + # source://rack/3.1.7lib/rack/request.rb#62 def initialize(env); end - # source://rack/3.0.11lib/rack/request.rb#76 + # source://rack/3.1.7lib/rack/request.rb#76 def delete_param(k); end - # source://rack/3.0.11lib/rack/request.rb#67 + # source://rack/3.1.7lib/rack/request.rb#67 def params; end - # source://rack/3.0.11lib/rack/request.rb#67 + # source://rack/3.1.7lib/rack/request.rb#67 def query; end - # source://rack/3.0.11lib/rack/request.rb#71 + # source://rack/3.1.7lib/rack/request.rb#71 def update_param(k, v); end # Returns the value of attribute version_supplied. @@ -524,22 +524,22 @@ class Rack::Request def xhr?; end class << self - # source://rack/3.0.11lib/rack/request.rb#31 + # source://rack/3.1.7lib/rack/request.rb#31 def forwarded_priority; end - # source://rack/3.0.11lib/rack/request.rb#31 + # source://rack/3.1.7lib/rack/request.rb#31 def forwarded_priority=(_arg0); end - # source://rack/3.0.11lib/rack/request.rb#18 + # source://rack/3.1.7lib/rack/request.rb#18 def ip_filter; end - # source://rack/3.0.11lib/rack/request.rb#18 + # source://rack/3.1.7lib/rack/request.rb#18 def ip_filter=(_arg0); end - # source://rack/3.0.11lib/rack/request.rb#40 + # source://rack/3.1.7lib/rack/request.rb#40 def x_forwarded_proto_priority; end - # source://rack/3.0.11lib/rack/request.rb#40 + # source://rack/3.1.7lib/rack/request.rb#40 def x_forwarded_proto_priority=(_arg0); end end end diff --git a/sorbet/rbi/gems/zeitwerk@2.6.14.rbi b/sorbet/rbi/gems/zeitwerk@2.6.18.rbi similarity index 85% rename from sorbet/rbi/gems/zeitwerk@2.6.14.rbi rename to sorbet/rbi/gems/zeitwerk@2.6.18.rbi index 6fc07679..f014e713 100644 --- a/sorbet/rbi/gems/zeitwerk@2.6.14.rbi +++ b/sorbet/rbi/gems/zeitwerk@2.6.18.rbi @@ -23,11 +23,69 @@ module Zeitwerk class << self # This is a dangerous method. # - # source://zeitwerk/lib/zeitwerk.rb#21 + # source://zeitwerk/lib/zeitwerk.rb#22 def with_loader; end end end +# This private class encapsulates pairs (mod, cname). +# +# Objects represent the constant cname in the class or module object mod, and +# have API to manage them that encapsulates the constants API. Examples: +# +# cref.path +# cref.set(value) +# cref.get +# +# The constant may or may not exist in mod. +# +# source://zeitwerk/lib/zeitwerk/cref.rb#13 +class Zeitwerk::Cref + include ::Zeitwerk::RealModName + + # The type of the first argument is Module because Class < Module, class + # objects are also valid. + # + # @return [Cref] a new instance of Cref + # + # source://zeitwerk/lib/zeitwerk/cref.rb#23 + def initialize(mod, cname); end + + # source://zeitwerk/lib/zeitwerk/cref.rb#74 + def autoload(abspath); end + + # @return [Boolean] + # + # source://zeitwerk/lib/zeitwerk/cref.rb#68 + def autoload?; end + + # Returns the value of attribute cname. + # + # source://zeitwerk/lib/zeitwerk/cref.rb#17 + def cname; end + + # @return [Boolean] + # + # source://zeitwerk/lib/zeitwerk/cref.rb#79 + def defined?; end + + # @raise [NameError] + # + # source://zeitwerk/lib/zeitwerk/cref.rb#90 + def get; end + + # source://zeitwerk/lib/zeitwerk/cref.rb#34 + def path; end + + # @raise [NameError] + # + # source://zeitwerk/lib/zeitwerk/cref.rb#96 + def remove; end + + # source://zeitwerk/lib/zeitwerk/cref.rb#84 + def set(value); end +end + # source://zeitwerk/lib/zeitwerk/error.rb#4 class Zeitwerk::Error < ::StandardError; end @@ -186,31 +244,31 @@ class Zeitwerk::Loader # @return [Loader] a new instance of Loader # - # source://zeitwerk/lib/zeitwerk/loader.rb#99 + # source://zeitwerk/lib/zeitwerk/loader.rb#100 def initialize; end - # source://zeitwerk/lib/zeitwerk/loader.rb#43 + # source://zeitwerk/lib/zeitwerk/loader.rb#42 def __autoloaded_dirs; end - # source://zeitwerk/lib/zeitwerk/loader.rb#33 + # source://zeitwerk/lib/zeitwerk/loader.rb#32 def __autoloads; end - # source://zeitwerk/lib/zeitwerk/loader.rb#77 + # source://zeitwerk/lib/zeitwerk/loader.rb#78 def __namespace_dirs; end # source://zeitwerk/lib/zeitwerk/loader.rb#344 def __shadowed_file?(file); end - # source://zeitwerk/lib/zeitwerk/loader.rb#88 + # source://zeitwerk/lib/zeitwerk/loader.rb#89 def __shadowed_files; end - # source://zeitwerk/lib/zeitwerk/loader.rb#59 + # source://zeitwerk/lib/zeitwerk/loader.rb#60 def __to_unload; end # Returns a hash that maps the absolute paths of the managed files and # directories to their respective expected constant paths. # - # source://zeitwerk/lib/zeitwerk/loader.rb#237 + # source://zeitwerk/lib/zeitwerk/loader.rb#238 def all_expected_cpaths; end # @raise [Zeitwerk::Error] @@ -226,12 +284,12 @@ class Zeitwerk::Loader # # @raise [Zeitwerk::Error] # - # source://zeitwerk/lib/zeitwerk/loader.rb#223 + # source://zeitwerk/lib/zeitwerk/loader.rb#224 def reload; end # Sets autoloads in the root namespaces. # - # source://zeitwerk/lib/zeitwerk/loader.rb#119 + # source://zeitwerk/lib/zeitwerk/loader.rb#120 def setup; end # Removes loaded constants and configured autoloads. @@ -245,7 +303,7 @@ class Zeitwerk::Loader # means `unload` + `setup`. This one is available to be used together with # `unregister`, which is undocumented too. # - # source://zeitwerk/lib/zeitwerk/loader.rb#145 + # source://zeitwerk/lib/zeitwerk/loader.rb#146 def unload; end # Says if the given constant path would be unloaded on reload. This @@ -269,16 +327,16 @@ class Zeitwerk::Loader private - # source://zeitwerk/lib/zeitwerk/loader.rb#490 - def autoload_file(parent, cname, file); end + # source://zeitwerk/lib/zeitwerk/loader.rb#491 + def autoload_file(cref, file); end # @return [Boolean] # - # source://zeitwerk/lib/zeitwerk/loader.rb#548 - def autoload_path_set_by_me_for?(parent, cname); end + # source://zeitwerk/lib/zeitwerk/loader.rb#544 + def autoload_path_set_by_me_for?(cref); end - # source://zeitwerk/lib/zeitwerk/loader.rb#460 - def autoload_subdir(parent, cname, subdir); end + # source://zeitwerk/lib/zeitwerk/loader.rb#462 + def autoload_subdir(cref, subdir); end # We keep track of autoloaded directories to remove them from the registry # at the end of eager loading. @@ -286,34 +344,33 @@ class Zeitwerk::Loader # Files are removed as they are autoloaded, but directories need to wait due # to concurrency (see why in Zeitwerk::Loader::Callbacks#on_dir_autoloaded). # - # source://zeitwerk/lib/zeitwerk/loader.rb#43 + # source://zeitwerk/lib/zeitwerk/loader.rb#42 def autoloaded_dirs; end # Maps absolute paths for which an autoload has been set ---and not - # executed--- to their corresponding parent class or module and constant - # name. + # executed--- to their corresponding Zeitwerk::Cref object. # - # "/Users/fxn/blog/app/models/user.rb" => [Object, :User], - # "/Users/fxn/blog/app/models/hotel/pricing.rb" => [Hotel, :Pricing] + # "/Users/fxn/blog/app/models/user.rb" => #, + # "/Users/fxn/blog/app/models/hotel/pricing.rb" => #, # ... # - # source://zeitwerk/lib/zeitwerk/loader.rb#33 + # source://zeitwerk/lib/zeitwerk/loader.rb#32 def autoloads; end - # source://zeitwerk/lib/zeitwerk/loader.rb#527 - def define_autoload(parent, cname, abspath); end + # source://zeitwerk/lib/zeitwerk/loader.rb#523 + def define_autoload(cref, abspath); end # source://zeitwerk/lib/zeitwerk/loader.rb#444 def define_autoloads_for_dir(dir, parent); end # Returns the value of attribute dirs_autoload_monitor. # - # source://zeitwerk/lib/zeitwerk/loader.rb#96 + # source://zeitwerk/lib/zeitwerk/loader.rb#97 def dirs_autoload_monitor; end # Returns the value of attribute mutex. # - # source://zeitwerk/lib/zeitwerk/loader.rb#92 + # source://zeitwerk/lib/zeitwerk/loader.rb#93 def mutex; end # Maps namespace constant paths to their respective directories. @@ -330,22 +387,22 @@ class Zeitwerk::Loader # and that its children are spread over those directories. We'll visit them # to set up the corresponding autoloads. # - # source://zeitwerk/lib/zeitwerk/loader.rb#77 + # source://zeitwerk/lib/zeitwerk/loader.rb#78 def namespace_dirs; end # `dir` is the directory that would have autovivified a namespace. `file` is # the file where we've found the namespace is explicitly defined. # - # source://zeitwerk/lib/zeitwerk/loader.rb#516 - def promote_namespace_from_implicit_to_explicit(dir:, file:, parent:, cname:); end + # source://zeitwerk/lib/zeitwerk/loader.rb#512 + def promote_namespace_from_implicit_to_explicit(dir:, file:, cref:); end - # source://zeitwerk/lib/zeitwerk/loader.rb#562 + # source://zeitwerk/lib/zeitwerk/loader.rb#558 def raise_if_conflicting_directory(dir); end - # source://zeitwerk/lib/zeitwerk/loader.rb#557 + # source://zeitwerk/lib/zeitwerk/loader.rb#553 def register_explicit_namespace(cpath); end - # source://zeitwerk/lib/zeitwerk/loader.rb#586 + # source://zeitwerk/lib/zeitwerk/loader.rb#582 def run_on_unload_callbacks(cpath, value, abspath); end # source://zeitwerk/lib/zeitwerk/loader.rb#344 @@ -358,29 +415,31 @@ class Zeitwerk::Loader # has only scanned the top-level, `shadowed_files` does not have shadowed # files that may exist deep in the project tree yet. # - # source://zeitwerk/lib/zeitwerk/loader.rb#88 + # source://zeitwerk/lib/zeitwerk/loader.rb#89 def shadowed_files; end # Stores metadata needed for unloading. Its entries look like this: # - # "Admin::Role" => [".../admin/role.rb", [Admin, :Role]] + # "Admin::Role" => [ + # ".../admin/role.rb", + # # + # ] # # The cpath as key helps implementing unloadable_cpath? The file name is # stored in order to be able to delete it from $LOADED_FEATURES, and the - # pair [Module, Symbol] is used to remove_const the constant from the class - # or module object. + # cref is used to remove the constant from the parent class or module. # # If reloading is enabled, this hash is filled as constants are autoloaded # or eager loaded. Otherwise, the collection remains empty. # - # source://zeitwerk/lib/zeitwerk/loader.rb#59 + # source://zeitwerk/lib/zeitwerk/loader.rb#60 def to_unload; end - # source://zeitwerk/lib/zeitwerk/loader.rb#593 - def unload_autoload(parent, cname); end + # source://zeitwerk/lib/zeitwerk/loader.rb#589 + def unload_autoload(cref); end - # source://zeitwerk/lib/zeitwerk/loader.rb#599 - def unload_cref(parent, cname); end + # source://zeitwerk/lib/zeitwerk/loader.rb#595 + def unload_cref(cref); end class << self # Returns an array with the absolute paths of the root directories of all @@ -456,7 +515,7 @@ module Zeitwerk::Loader::Callbacks include ::Zeitwerk::RealModName extend ::Zeitwerk::Internal - # source://zeitwerk/lib/zeitwerk/loader/callbacks.rb#41 + # source://zeitwerk/lib/zeitwerk/loader/callbacks.rb#40 def __on_dir_autoloaded(dir); end # source://zeitwerk/lib/zeitwerk/loader/callbacks.rb#10 @@ -468,18 +527,18 @@ module Zeitwerk::Loader::Callbacks # # @private # - # source://zeitwerk/lib/zeitwerk/loader/callbacks.rb#81 + # source://zeitwerk/lib/zeitwerk/loader/callbacks.rb#80 def on_namespace_loaded(namespace); end private - # source://zeitwerk/lib/zeitwerk/loader/callbacks.rb#41 + # source://zeitwerk/lib/zeitwerk/loader/callbacks.rb#40 def on_dir_autoloaded(dir); end # source://zeitwerk/lib/zeitwerk/loader/callbacks.rb#10 def on_file_autoloaded(file); end - # source://zeitwerk/lib/zeitwerk/loader/callbacks.rb#92 + # source://zeitwerk/lib/zeitwerk/loader/callbacks.rb#91 def run_on_load_callbacks(cpath, value, abspath); end end @@ -778,7 +837,7 @@ module Zeitwerk::Loader::EagerLoad # In order to invoke this method, the caller has to ensure `child` is a # strict namespace descendant of `root_namespace`. # - # source://zeitwerk/lib/zeitwerk/loader/eager_load.rb#195 + # source://zeitwerk/lib/zeitwerk/loader/eager_load.rb#193 def eager_load_child_namespace(child, child_name, root_dir, root_namespace); end end @@ -786,45 +845,28 @@ end module Zeitwerk::Loader::Helpers private - # @return [Boolean] - # - # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#132 - def cdef?(parent, cname); end - - # @raise [NameError] - # - # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#138 - def cget(parent, cname); end - # @raise [Zeitwerk::NameError] # - # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#153 + # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#110 def cname_for(basename, abspath); end - # Symbol#name was introduced in Ruby 3.0. It returns always the same - # frozen object, so we may save a few string allocations. - # - # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#122 - def cpath(parent, cname); end - - # @raise [NameError] - # - # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#144 - def crem(parent, cname); end - # @return [Boolean] # - # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#71 + # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#85 def dir?(path); end + # Looks for a Ruby file using breadth-first search. This type of search is + # important to list as less directories as possible and return fast in the + # common case in which there are Ruby files. + # # @return [Boolean] # - # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#47 + # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#56 def has_at_least_one_ruby_file?(dir); end # @return [Boolean] # - # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#76 + # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#90 def hidden?(basename); end # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#7 @@ -835,17 +877,16 @@ module Zeitwerk::Loader::Helpers # @return [Boolean] # - # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#66 + # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#80 def ruby?(path); end - # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#113 - def strict_autoload_path(parent, cname); end - - # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#81 + # source://zeitwerk/lib/zeitwerk/loader/helpers.rb#95 def walk_up(abspath); end end -# source://zeitwerk/lib/zeitwerk/loader/helpers.rb#148 +# --- Inflection -------------------------------------------------------------------------------- +# +# source://zeitwerk/lib/zeitwerk/loader/helpers.rb#105 module Zeitwerk::Loader::Helpers::CNAME_VALIDATOR; end # source://zeitwerk/lib/zeitwerk/loader.rb#21 @@ -893,7 +934,7 @@ module Zeitwerk::Registry # @return [Boolean] # # source://zeitwerk/lib/zeitwerk/registry.rb#113 - def inception?(cpath); end + def inception?(cpath, registered_by_loader = T.unsafe(nil)); end # This hash table addresses an edge case in which an autoload is ignored. # @@ -937,7 +978,7 @@ module Zeitwerk::Registry # @private # - # source://zeitwerk/lib/zeitwerk/registry.rb#121 + # source://zeitwerk/lib/zeitwerk/registry.rb#124 def loader_for(path); end # This method returns always a loader, the same instance for the same root @@ -958,7 +999,7 @@ module Zeitwerk::Registry # @private # - # source://zeitwerk/lib/zeitwerk/registry.rb#127 + # source://zeitwerk/lib/zeitwerk/registry.rb#130 def on_unload(loader); end # @private