diff --git a/Library/Homebrew/sorbet/rbi/gems/activesupport@6.1.7.2.rbi b/Library/Homebrew/sorbet/rbi/gems/activesupport@6.1.7.2.rbi index 7f4fa3a61f..3515dbbea3 100644 --- a/Library/Homebrew/sorbet/rbi/gems/activesupport@6.1.7.2.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/activesupport@6.1.7.2.rbi @@ -1059,6 +1059,151 @@ class ActiveSupport::Digest end end +class ActiveSupport::Duration + def initialize(value, parts); end + + def %(other); end + def *(other); end + def +(other); end + def +@; end + def -(other); end + def -@; end + def /(other); end + def <=>(other); end + def ==(other); end + def after(time = T.unsafe(nil)); end + def ago(time = T.unsafe(nil)); end + def as_json(options = T.unsafe(nil)); end + def before(time = T.unsafe(nil)); end + def coerce(other); end + def encode_with(coder); end + def eql?(other); end + def from_now(time = T.unsafe(nil)); end + def hash; end + def in_days; end + def in_hours; end + def in_minutes; end + def in_months; end + def in_seconds; end + def in_weeks; end + def in_years; end + def init_with(coder); end + def inspect; end + def instance_of?(klass); end + def is_a?(klass); end + def iso8601(precision: T.unsafe(nil)); end + def kind_of?(klass); end + def parts; end + def parts=(_arg0); end + def since(time = T.unsafe(nil)); end + def to_i; end + def to_s; end + def until(time = T.unsafe(nil)); end + def value; end + def value=(_arg0); end + + private + + def method_missing(method, *args, &block); end + def raise_type_error(other); end + def respond_to_missing?(method, _); end + def sum(sign, time = T.unsafe(nil)); end + + class << self + def ===(other); end + def build(value); end + def days(value); end + def hours(value); end + def minutes(value); end + def months(value); end + def parse(iso8601duration); end + def seconds(value); end + def weeks(value); end + def years(value); end + + private + + def calculate_total_seconds(parts); end + end +end + +class ActiveSupport::Duration::ISO8601Parser + def initialize(string); end + + def mode; end + def mode=(_arg0); end + def parse!; end + def parts; end + def scanner; end + def sign; end + def sign=(_arg0); end + + private + + def finished?; end + def number; end + def raise_parsing_error(reason = T.unsafe(nil)); end + def scan(pattern); end + def validate!; end +end + +ActiveSupport::Duration::ISO8601Parser::COMMA = T.let(T.unsafe(nil), String) +ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENT = T.let(T.unsafe(nil), Regexp) +ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) +ActiveSupport::Duration::ISO8601Parser::DATE_MARKER = T.let(T.unsafe(nil), Regexp) +ActiveSupport::Duration::ISO8601Parser::DATE_TO_PART = T.let(T.unsafe(nil), Hash) +ActiveSupport::Duration::ISO8601Parser::PERIOD = T.let(T.unsafe(nil), String) +ActiveSupport::Duration::ISO8601Parser::PERIOD_OR_COMMA = T.let(T.unsafe(nil), Regexp) +class ActiveSupport::Duration::ISO8601Parser::ParsingError < ::ArgumentError; end +ActiveSupport::Duration::ISO8601Parser::SIGN_MARKER = T.let(T.unsafe(nil), Regexp) +ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENT = T.let(T.unsafe(nil), Regexp) +ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENTS = T.let(T.unsafe(nil), Array) +ActiveSupport::Duration::ISO8601Parser::TIME_MARKER = T.let(T.unsafe(nil), Regexp) +ActiveSupport::Duration::ISO8601Parser::TIME_TO_PART = T.let(T.unsafe(nil), Hash) + +class ActiveSupport::Duration::ISO8601Serializer + def initialize(duration, precision: T.unsafe(nil)); end + + def serialize; end + + private + + def normalize; end + def week_mixed_with_date?(parts); end +end + +ActiveSupport::Duration::ISO8601Serializer::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) +ActiveSupport::Duration::PARTS = T.let(T.unsafe(nil), Array) +ActiveSupport::Duration::PARTS_IN_SECONDS = T.let(T.unsafe(nil), Hash) +ActiveSupport::Duration::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) +ActiveSupport::Duration::SECONDS_PER_HOUR = T.let(T.unsafe(nil), Integer) +ActiveSupport::Duration::SECONDS_PER_MINUTE = T.let(T.unsafe(nil), Integer) +ActiveSupport::Duration::SECONDS_PER_MONTH = T.let(T.unsafe(nil), Integer) +ActiveSupport::Duration::SECONDS_PER_WEEK = T.let(T.unsafe(nil), Integer) +ActiveSupport::Duration::SECONDS_PER_YEAR = T.let(T.unsafe(nil), Integer) + +class ActiveSupport::Duration::Scalar < ::Numeric + def initialize(value); end + + def %(other); end + def *(other); end + def +(other); end + def -(other); end + def -@; end + def /(other); end + def <=>(other); end + def coerce(other); end + def to_f(*args, &block); end + def to_i(*args, &block); end + def to_s(*args, &block); end + def value; end + + private + + def calculate(op, other); end + def raise_type_error(other); end +end + class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer def initialize(env); end @@ -2229,6 +2374,7 @@ class ActiveSupport::TestCase < ::Minitest::Test include ::ActiveSupport::Callbacks include ::ActiveSupport::Testing::Assertions include ::ActiveSupport::Testing::Deprecation + include ::ActiveSupport::Testing::TimeHelpers include ::ActiveSupport::Testing::FileFixtures extend ::ActiveSupport::Callbacks::ClassMethods extend ::ActiveSupport::DescendantsTracker @@ -2452,6 +2598,183 @@ module ActiveSupport::Testing::TaggedLogging def tagged_logger; end end +module ActiveSupport::Testing::TimeHelpers + def after_teardown; end + def freeze_time(&block); end + def travel(duration, &block); end + def travel_back; end + def travel_to(date_or_time); end + def unfreeze_time; end + + private + + def simple_stubs; end +end + +class ActiveSupport::TimeWithZone + include ::DateAndTime::Compatibility + include ::Comparable + + def initialize(utc_time, time_zone, local_time = T.unsafe(nil), period = T.unsafe(nil)); end + + def +(other); end + def -(other); end + def <=>(other); end + def acts_like_time?; end + def advance(options); end + def after?(_arg0); end + def ago(other); end + def as_json(options = T.unsafe(nil)); end + def before?(_arg0); end + def between?(min, max); end + def blank?; end + def change(options); end + def comparable_time; end + def day; end + def dst?; end + def encode_with(coder); end + def eql?(other); end + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + def freeze; end + def future?; end + def getgm; end + def getlocal(utc_offset = T.unsafe(nil)); end + def getutc; end + def gmt?; end + def gmt_offset; end + def gmtime; end + def gmtoff; end + def hash; end + def hour; end + def httpdate; end + def in(other); end + def in_time_zone(new_zone = T.unsafe(nil)); end + def init_with(coder); end + def inspect; end + def is_a?(klass); end + def isdst; end + def iso8601(fraction_digits = T.unsafe(nil)); end + def kind_of?(klass); end + def localtime(utc_offset = T.unsafe(nil)); end + def marshal_dump; end + def marshal_load(variables); end + def mday; end + def method_missing(sym, *args, &block); end + def min; end + def mon; end + def month; end + def next_day?; end + def nsec; end + def past?; end + def period; end + def prev_day?; end + def respond_to?(sym, include_priv = T.unsafe(nil)); end + def rfc2822; end + def rfc3339(fraction_digits = T.unsafe(nil)); end + def rfc822; end + def sec; end + def since(other); end + def strftime(format); end + def time; end + def time_zone; end + def to_a; end + def to_date; end + def to_datetime; end + def to_f; end + def to_formatted_s(format = T.unsafe(nil)); end + def to_i; end + def to_r; end + def to_s(format = T.unsafe(nil)); end + def to_time; end + def today?; end + def tomorrow?; end + def tv_sec; end + def usec; end + def utc; end + def utc?; end + def utc_offset; end + def wday; end + def xmlschema(fraction_digits = T.unsafe(nil)); end + def yday; end + def year; end + def yesterday?; end + def zone; end + + private + + def duration_of_variable_length?(obj); end + def get_period_and_ensure_valid_local_time(period); end + def incorporate_utc_offset(time, offset); end + def respond_to_missing?(sym, include_priv); end + def transfer_time_values_to_utc_constructor(time); end + def wrap_with_time_zone(time); end + + class << self + def name; end + end +end + +ActiveSupport::TimeWithZone::PRECISIONS = T.let(T.unsafe(nil), Hash) +ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) + +class ActiveSupport::TimeZone + include ::Comparable + + def initialize(name, utc_offset = T.unsafe(nil), tzinfo = T.unsafe(nil)); end + + def <=>(zone); end + def =~(re); end + def at(*args); end + def encode_with(coder); end + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + def init_with(coder); end + def iso8601(str); end + def local(*args); end + def local_to_utc(time, dst = T.unsafe(nil)); end + def match?(re); end + def name; end + def now; end + def parse(str, now = T.unsafe(nil)); end + def period_for_local(time, dst = T.unsafe(nil)); end + def period_for_utc(time); end + def periods_for_local(time); end + def rfc3339(str); end + def strptime(str, format, now = T.unsafe(nil)); end + def to_s; end + def today; end + def tomorrow; end + def tzinfo; end + def utc_offset; end + def utc_to_local(time); end + def yesterday; end + + private + + def parts_to_time(parts, now); end + def time_now; end + + class << self + def [](arg); end + def all; end + def clear; end + def country_zones(country_code); end + def create(*_arg0); end + def find_tzinfo(name); end + def new(name); end + def seconds_to_utc_offset(seconds, colon = T.unsafe(nil)); end + def us_zones; end + + private + + def load_country_zones(code); end + def zones_map; end + end +end + +ActiveSupport::TimeZone::MAPPING = T.let(T.unsafe(nil), Hash) +ActiveSupport::TimeZone::UTC_OFFSET_WITHOUT_COLON = T.let(T.unsafe(nil), String) +ActiveSupport::TimeZone::UTC_OFFSET_WITH_COLON = T.let(T.unsafe(nil), String) + module ActiveSupport::ToJsonWithActiveSupportEncoder def to_json(options = T.unsafe(nil)); end end @@ -2557,6 +2880,210 @@ class Class < ::Module 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 end +class Date + include ::Comparable + include ::DateAndTime::Zones + include ::DateAndTime::Calculations + + def +(other); end + def -(other); end + def <=>(other); end + def acts_like_date?; end + def advance(options); end + def ago(seconds); end + def as_json(options = T.unsafe(nil)); end + def at_beginning_of_day; end + def at_end_of_day; end + def at_midday; end + def at_middle_of_day; end + def at_midnight; end + def at_noon; end + def beginning_of_day; end + def change(options); end + def compare_with_coercion(other); end + def end_of_day; end + def in(seconds); end + def inspect; end + def midday; end + def middle_of_day; end + def midnight; end + def minus_with_duration(other); end + def noon; end + def plus_with_duration(other); end + def readable_inspect; end + def since(seconds); end + def to_formatted_s(format = T.unsafe(nil)); end + def to_s(format = T.unsafe(nil)); end + def to_time(form = T.unsafe(nil)); end + def xmlschema; end + + class << self + def beginning_of_week; end + def beginning_of_week=(week_start); end + def beginning_of_week_default; end + def beginning_of_week_default=(_arg0); end + def current; end + def find_beginning_of_week!(week_start); end + def tomorrow; end + def yesterday; end + end +end + +Date::DATE_FORMATS = T.let(T.unsafe(nil), Hash) +Date::VERSION = T.let(T.unsafe(nil), String) +module DateAndTime; end + +module DateAndTime::Calculations + def after?(date_or_time); end + def all_day; end + def all_month; end + def all_quarter; end + def all_week(start_day = T.unsafe(nil)); end + def all_year; end + def at_beginning_of_month; end + def at_beginning_of_quarter; end + def at_beginning_of_week(start_day = T.unsafe(nil)); end + def at_beginning_of_year; end + def at_end_of_month; end + def at_end_of_quarter; end + def at_end_of_week(start_day = T.unsafe(nil)); end + def at_end_of_year; end + def before?(date_or_time); end + def beginning_of_month; end + def beginning_of_quarter; end + def beginning_of_week(start_day = T.unsafe(nil)); end + def beginning_of_year; end + def days_ago(days); end + def days_since(days); end + def days_to_week_start(start_day = T.unsafe(nil)); end + def end_of_month; end + def end_of_quarter; end + def end_of_week(start_day = T.unsafe(nil)); end + def end_of_year; end + def future?; end + def last_month; end + def last_quarter; end + def last_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end + def last_weekday; end + def last_year; end + def monday; end + def months_ago(months); end + def months_since(months); end + def next_day?; end + def next_occurring(day_of_week); end + def next_quarter; end + def next_week(given_day_in_next_week = T.unsafe(nil), same_time: T.unsafe(nil)); end + def next_weekday; end + def on_weekday?; end + def on_weekend?; end + def past?; end + def prev_day?; end + def prev_occurring(day_of_week); end + def prev_quarter; end + def prev_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end + def prev_weekday; end + def sunday; end + def today?; end + def tomorrow; end + def tomorrow?; end + def weeks_ago(weeks); end + def weeks_since(weeks); end + def years_ago(years); end + def years_since(years); end + def yesterday; end + def yesterday?; end + + private + + def copy_time_to(other); end + def days_span(day); end + def first_hour(date_or_time); end + def last_hour(date_or_time); end +end + +DateAndTime::Calculations::DAYS_INTO_WEEK = T.let(T.unsafe(nil), Hash) +DateAndTime::Calculations::WEEKEND_DAYS = T.let(T.unsafe(nil), Array) + +module DateAndTime::Compatibility + def preserve_timezone; end + def utc_to_local_returns_utc_offset_times; end + + class << self + def preserve_timezone; end + def preserve_timezone=(val); end + def utc_to_local_returns_utc_offset_times; end + def utc_to_local_returns_utc_offset_times=(val); end + end +end + +module DateAndTime::Zones + def in_time_zone(zone = T.unsafe(nil)); end + + private + + def time_with_zone(time, zone); end +end + +class DateTime < ::Date + def <=>(other); end + def advance(options); end + def ago(seconds); end + def as_json(options = T.unsafe(nil)); end + def at_beginning_of_day; end + def at_beginning_of_hour; end + def at_beginning_of_minute; end + def at_end_of_day; end + def at_end_of_hour; end + def at_end_of_minute; end + def at_midday; end + def at_middle_of_day; end + def at_midnight; end + def at_noon; end + def beginning_of_day; end + def beginning_of_hour; end + def beginning_of_minute; end + def change(options); end + def end_of_day; end + def end_of_hour; end + def end_of_minute; end + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + def getgm; end + def getlocal(utc_offset = T.unsafe(nil)); end + def getutc; end + def gmtime; end + def in(seconds); end + def inspect; end + def localtime(utc_offset = T.unsafe(nil)); end + def midday; end + def middle_of_day; end + def midnight; end + def noon; end + def nsec; end + def readable_inspect; end + def seconds_since_midnight; end + def seconds_until_end_of_day; end + def since(seconds); end + def subsec; end + def to_f; end + def to_formatted_s(format = T.unsafe(nil)); end + def to_i; end + def to_s(format = T.unsafe(nil)); end + def usec; end + def utc; end + def utc?; end + def utc_offset; end + + private + + def offset_in_seconds; end + def seconds_since_unix_epoch; end + + class << self + 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 + def current; end + end +end + module ERB::Util private @@ -2771,6 +3298,41 @@ class NilClass def try!(_method_name = T.unsafe(nil), *_arg1); end end +class Numeric + include ::Comparable + + def as_json(options = T.unsafe(nil)); end + def blank?; end + def byte; end + def bytes; end + def day; end + def days; end + def exabyte; end + def exabytes; end + def fortnight; end + def fortnights; end + def gigabyte; end + def gigabytes; end + def hour; end + def hours; end + def html_safe?; end + def in_milliseconds; end + def kilobyte; end + def kilobytes; end + def megabyte; end + def megabytes; end + def minute; end + def minutes; end + def petabyte; end + def petabytes; end + def second; end + def seconds; end + def terabyte; end + def terabytes; end + def week; end + def weeks; end +end + Numeric::EXABYTE = T.let(T.unsafe(nil), Integer) Numeric::GIGABYTE = T.let(T.unsafe(nil), Integer) Numeric::KILOBYTE = T.let(T.unsafe(nil), Integer) @@ -2890,6 +3452,9 @@ class String def titlecase(keep_id_suffix: T.unsafe(nil)); end def titleize(keep_id_suffix: T.unsafe(nil)); end def to(position); end + def to_date; end + def to_datetime; end + def to_time(form = T.unsafe(nil)); end def truncate(truncate_at, options = T.unsafe(nil)); end def truncate_bytes(truncate_at, omission: T.unsafe(nil)); end def truncate_words(words_count, options = T.unsafe(nil)); end @@ -2922,6 +3487,85 @@ class Symbol def starts_with?(*prefixes); end end +class Time + include ::Comparable + include ::DateAndTime::Zones + include ::DateAndTime::Calculations + + def +(other); end + def -(other); end + def <=>(other); end + def acts_like_time?; end + def advance(options); end + def ago(seconds); end + def as_json(options = T.unsafe(nil)); end + def at_beginning_of_day; end + def at_beginning_of_hour; end + def at_beginning_of_minute; end + def at_end_of_day; end + def at_end_of_hour; end + def at_end_of_minute; end + def at_midday; end + def at_middle_of_day; end + def at_midnight; end + def at_noon; end + def beginning_of_day; end + def beginning_of_hour; end + def beginning_of_minute; end + def blank?; end + def ceil(precision = T.unsafe(nil)); end + def change(options); end + def compare_with_coercion(other); end + def end_of_day; end + def end_of_hour; end + def end_of_minute; end + def eql?(other); end + def eql_with_coercion(other); end + def floor(precision = T.unsafe(nil)); end + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + def in(seconds); end + def midday; end + def middle_of_day; end + def midnight; end + def minus_with_coercion(other); end + def minus_with_duration(other); end + def minus_without_coercion(other); end + def next_day(days = T.unsafe(nil)); end + def next_month(months = T.unsafe(nil)); end + def next_year(years = T.unsafe(nil)); end + def noon; end + def plus_with_duration(other); end + def prev_day(days = T.unsafe(nil)); end + def prev_month(months = T.unsafe(nil)); end + def prev_year(years = T.unsafe(nil)); end + def sec_fraction; end + def seconds_since_midnight; end + def seconds_until_end_of_day; end + def since(seconds); end + def to_formatted_s(format = T.unsafe(nil)); end + def to_s(format = T.unsafe(nil)); end + + class << self + def ===(other); end + def at(*args); end + def at_with_coercion(*args); end + def current; end + def days_in_month(month, year = T.unsafe(nil)); end + def days_in_year(year = T.unsafe(nil)); end + def find_zone(time_zone); end + def find_zone!(time_zone); end + def rfc3339(str); end + def use_zone(time_zone); end + def zone; end + def zone=(time_zone); end + def zone_default; end + def zone_default=(_arg0); end + end +end + +Time::COMMON_YEAR_DAYS_IN_MONTH = T.let(T.unsafe(nil), Array) +Time::DATE_FORMATS = T.let(T.unsafe(nil), Hash) + class TrueClass include ::JSON::Ext::Generator::GeneratorMethods::TrueClass include ::MessagePack::CoreExt