language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | Homebrew | brew | d6bba1c4938ea9c9a9d58ba2f209775dd71a8537.json | java: fix java_home on macOS | Library/Homebrew/language/java.rb | @@ -45,3 +45,5 @@ def self.overridable_java_home_env(version = nil)
end
end
end
+
+require "extend/os/language/java" | true |
Other | Homebrew | brew | c6785c7281f36c9b2e7f3a9ec69826dd7723f096.json | Update RBI files for mechanize. | Library/Homebrew/sorbet/rbi/gems/mechanize@2.7.7.rbi | @@ -1,6 +1,6 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `mechanize` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
+# Please instead update this file by running `tapioca sync`.
# typed: true
@@ -57,7 +57,7 @@ class Mechanize
def cookies; end
def current_page; end
def default_encoding; end
- def default_encoding=(_); end
+ def default_encoding=(_arg0); end
def delete(uri, query_params = T.unsafe(nil), headers = T.unsafe(nil)); end
def download(uri, io_or_filename, parameters = T.unsafe(nil), referer = T.unsafe(nil), headers = T.unsafe(nil)); end
def follow_meta_refresh; end
@@ -67,25 +67,25 @@ class Mechanize
def follow_redirect=(follow); end
def follow_redirect?; end
def force_default_encoding; end
- def force_default_encoding=(_); end
+ def force_default_encoding=(_arg0); end
def get(uri, parameters = T.unsafe(nil), referer = T.unsafe(nil), headers = T.unsafe(nil)); end
def get_file(url); end
def gzip_enabled; end
def gzip_enabled=(enabled); end
def head(uri, query_params = T.unsafe(nil), headers = T.unsafe(nil)); end
def history; end
def history_added; end
- def history_added=(_); end
+ def history_added=(_arg0); end
def html_parser; end
- def html_parser=(_); end
+ def html_parser=(_arg0); end
def idle_timeout; end
def idle_timeout=(idle_timeout); end
def ignore_bad_chunking; end
def ignore_bad_chunking=(ignore_bad_chunking); end
def keep_alive; end
def keep_alive=(enable); end
def keep_alive_time; end
- def keep_alive_time=(_); end
+ def keep_alive_time=(_arg0); end
def key; end
def key=(key); end
def log; end
@@ -143,7 +143,7 @@ class Mechanize
def visited?(url); end
def visited_page(url); end
def watch_for_set; end
- def watch_for_set=(_); end
+ def watch_for_set=(_arg0); end
private
@@ -152,10 +152,10 @@ class Mechanize
class << self
def html_parser; end
- def html_parser=(_); end
+ def html_parser=(_arg0); end
def inherited(child); end
def log; end
- def log=(_); end
+ def log=(_arg0); end
def start; end
end
end
@@ -229,7 +229,7 @@ class Mechanize::Download
def body_io; end
def content; end
def filename; end
- def filename=(_); end
+ def filename=(_arg0); end
def save(filename = T.unsafe(nil)); end
def save!(filename = T.unsafe(nil)); end
def save_as(filename = T.unsafe(nil)); end
@@ -256,10 +256,10 @@ class Mechanize::File
def initialize(uri = T.unsafe(nil), response = T.unsafe(nil), body = T.unsafe(nil), code = T.unsafe(nil)); end
def body; end
- def body=(_); end
+ def body=(_arg0); end
def content; end
def filename; end
- def filename=(_); end
+ def filename=(_arg0); end
def save(filename = T.unsafe(nil)); end
def save!(filename = T.unsafe(nil)); end
def save_as(filename = T.unsafe(nil)); end
@@ -282,7 +282,7 @@ class Mechanize::FileRequest
def path; end
def response_body_permitted?; end
def uri; end
- def uri=(_); end
+ def uri=(_arg0); end
end
class Mechanize::FileResponse
@@ -321,7 +321,7 @@ class Mechanize::Form
def [](field_name); end
def []=(field_name, value); end
def action; end
- def action=(_); end
+ def action=(_arg0); end
def add_button_to_query(button); end
def add_field!(field_name, value = T.unsafe(nil)); end
def at(*args, &block); end
@@ -345,9 +345,9 @@ class Mechanize::Form
def dom_id; end
def elements; end
def encoding; end
- def encoding=(_); end
+ def encoding=(_arg0); end
def enctype; end
- def enctype=(_); end
+ def enctype=(_arg0); end
def field(criteria = T.unsafe(nil)); end
def field_with(criteria = T.unsafe(nil)); end
def field_with!(criteria = T.unsafe(nil)); end
@@ -365,15 +365,15 @@ class Mechanize::Form
def hidden_field?(field_name); end
def hiddens; end
def ignore_encoding_error; end
- def ignore_encoding_error=(_); end
+ def ignore_encoding_error=(_arg0); end
def inspect; end
def keygens; end
def keys; end
def method; end
- def method=(_); end
+ def method=(_arg0); end
def method_missing(meth, *args); end
def name; end
- def name=(_); end
+ def name=(_arg0); end
def node; end
def page; end
def pretty_print(q); end
@@ -438,31 +438,31 @@ class Mechanize::Form::Field
def dom_class; end
def dom_id; end
def index; end
- def index=(_); end
+ def index=(_arg0); end
def inspect; end
def name; end
- def name=(_); end
+ def name=(_arg0); end
def node; end
- def node=(_); end
+ def node=(_arg0); end
def query_value; end
def raw_value; end
def search(*args, &block); end
def type; end
- def type=(_); end
+ def type=(_arg0); end
def value; end
- def value=(_); end
+ def value=(_arg0); end
def xpath(*args, &block); end
end
class Mechanize::Form::FileUpload < ::Mechanize::Form::Field
def initialize(node, file_name); end
def file_data; end
- def file_data=(_); end
+ def file_data=(_arg0); end
def file_name; end
- def file_name=(_); end
+ def file_name=(_arg0); end
def mime_type; end
- def mime_type=(_); end
+ def mime_type=(_arg0); end
end
class Mechanize::Form::Hidden < ::Mechanize::Form::Field
@@ -473,9 +473,9 @@ class Mechanize::Form::ImageButton < ::Mechanize::Form::Button
def query_value; end
def x; end
- def x=(_); end
+ def x=(_arg0); end
def y; end
- def y=(_); end
+ def y=(_arg0); end
end
class Mechanize::Form::Keygen < ::Mechanize::Form::Field
@@ -495,7 +495,7 @@ class Mechanize::Form::MultiSelectList < ::Mechanize::Form::Field
def option_with(criteria = T.unsafe(nil)); end
def option_with!(criteria = T.unsafe(nil)); end
def options; end
- def options=(_); end
+ def options=(_arg0); end
def options_with(criteria = T.unsafe(nil)); end
def query_value; end
def select_all; end
@@ -534,7 +534,7 @@ class Mechanize::Form::RadioButton < ::Mechanize::Form::Field
def [](key); end
def check; end
def checked; end
- def checked=(_); end
+ def checked=(_arg0); end
def checked?; end
def click; end
def eql?(other); end
@@ -579,7 +579,7 @@ class Mechanize::HTTP::Agent
def add_auth(uri, user, password, realm = T.unsafe(nil), domain = T.unsafe(nil)); end
def add_default_auth(user, password, domain = T.unsafe(nil)); end
def allowed_error_codes; end
- def allowed_error_codes=(_); end
+ def allowed_error_codes=(_arg0); end
def auth_store; end
def authenticate_methods; end
def auto_io(name, read_size, input_io); end
@@ -591,50 +591,50 @@ class Mechanize::HTTP::Agent
def certificate; end
def certificate=(certificate); end
def conditional_requests; end
- def conditional_requests=(_); end
+ def conditional_requests=(_arg0); end
def connection_for(uri); end
def content_encoding_gunzip(body_io); end
def content_encoding_hooks; end
def content_encoding_inflate(body_io); end
def context; end
- def context=(_); end
+ def context=(_arg0); end
def cookie_jar; end
- def cookie_jar=(_); end
+ def cookie_jar=(_arg0); end
def current_page; end
def digest_challenges; end
def disable_keep_alive(request); end
def enable_gzip(request); end
def fetch(uri, method = T.unsafe(nil), headers = T.unsafe(nil), params = T.unsafe(nil), referer = T.unsafe(nil), redirects = T.unsafe(nil)); end
def follow_meta_refresh; end
- def follow_meta_refresh=(_); end
+ def follow_meta_refresh=(_arg0); end
def follow_meta_refresh_self; end
- def follow_meta_refresh_self=(_); end
+ def follow_meta_refresh_self=(_arg0); end
def get_meta_refresh(response, uri, page); end
def get_robots(uri); end
def gzip_enabled; end
- def gzip_enabled=(_); end
+ def gzip_enabled=(_arg0); end
def history; end
- def history=(_); end
+ def history=(_arg0); end
def hook_content_encoding(response, uri, response_body_io); end
def http; end
def http_request(uri, method, params = T.unsafe(nil)); end
def idle_timeout; end
def idle_timeout=(timeout); end
def ignore_bad_chunking; end
- def ignore_bad_chunking=(_); end
+ def ignore_bad_chunking=(_arg0); end
def inflate(compressed, window_bits = T.unsafe(nil)); end
def keep_alive; end
- def keep_alive=(_); end
+ def keep_alive=(_arg0); end
def log; end
def make_tempfile(name); end
def max_file_buffer; end
- def max_file_buffer=(_); end
+ def max_file_buffer=(_arg0); end
def max_history; end
def max_history=(length); end
def open_timeout; end
- def open_timeout=(_); end
+ def open_timeout=(_arg0); end
def pass; end
- def pass=(_); end
+ def pass=(_arg0); end
def post_connect(uri, response, body_io); end
def post_connect_hooks; end
def pre_connect(request); end
@@ -643,17 +643,17 @@ class Mechanize::HTTP::Agent
def private_key=(private_key); end
def proxy_uri; end
def read_timeout; end
- def read_timeout=(_); end
+ def read_timeout=(_arg0); end
def redirect_ok; end
- def redirect_ok=(_); end
+ def redirect_ok=(_arg0); end
def redirection_limit; end
- def redirection_limit=(_); end
+ def redirection_limit=(_arg0); end
def request_add_headers(request, headers = T.unsafe(nil)); end
def request_auth(request, uri); end
def request_auth_digest(request, uri, realm, base_uri, iis); end
def request_cookies(request, uri); end
def request_headers; end
- def request_headers=(_); end
+ def request_headers=(_arg0); end
def request_host(request, uri); end
def request_language_charset(request); end
def request_log(request); end
@@ -682,7 +682,7 @@ class Mechanize::HTTP::Agent
def robots_reset(url); end
def save_cookies(uri, set_cookie); end
def scheme_handlers; end
- def scheme_handlers=(_); end
+ def scheme_handlers=(_arg0); end
def secure_resolve!(uri, referer = T.unsafe(nil)); end
def set_proxy(addr, port = T.unsafe(nil), user = T.unsafe(nil), pass = T.unsafe(nil)); end
def shutdown; end
@@ -714,10 +714,10 @@ class Mechanize::HTTP::AuthChallenge < ::Struct
def to_s; end
class << self
- def [](*_); end
+ def [](*_arg0); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
end
end
@@ -762,10 +762,10 @@ class Mechanize::HTTP::ContentDisposition < ::Struct
def type=(_); end
class << self
- def [](*_); end
+ def [](*_arg0); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
end
end
@@ -778,7 +778,7 @@ class Mechanize::HTTP::ContentDispositionParser
def rfc_2045_token; end
def rfc_2045_value; end
def scanner; end
- def scanner=(_); end
+ def scanner=(_arg0); end
def spaces; end
class << self
@@ -795,7 +795,7 @@ class Mechanize::HTTP::WWWAuthenticateParser
def quoted_string; end
def scan_comma_spaces; end
def scanner; end
- def scanner=(_); end
+ def scanner=(_arg0); end
def spaces; end
def token; end
end
@@ -814,7 +814,7 @@ class Mechanize::History < ::Array
def clear; end
def inspect; end
def max_size; end
- def max_size=(_); end
+ def max_size=(_arg0); end
def pop; end
def push(page, uri = T.unsafe(nil)); end
def shift; end
@@ -884,7 +884,7 @@ class Mechanize::Page < ::Mechanize::File
def links; end
def links_with(criteria = T.unsafe(nil)); end
def mech; end
- def mech=(_); end
+ def mech=(_arg0); end
def meta_charset; end
def meta_refresh; end
def parser; end
@@ -943,11 +943,11 @@ class Mechanize::Page::Image
def image_referer; end
def inspect; end
def mech; end
- def mech=(_); end
+ def mech=(_arg0); end
def mime_type; end
def node; end
def page; end
- def page=(_); end
+ def page=(_arg0); end
def pretty_print(q); end
def relative?; end
def src; end
@@ -1015,17 +1015,17 @@ module Mechanize::Parser
def []=(*args, &block); end
def canonical_each(*args, &block); end
def code; end
- def code=(_); end
+ def code=(_arg0); end
def each(*args, &block); end
def extract_filename(full_path = T.unsafe(nil)); end
def fill_header(response); end
def find_free_name(filename); end
def header; end
def key?(*args, &block); end
def response; end
- def response=(_); end
+ def response=(_arg0); end
def uri; end
- def uri=(_); end
+ def uri=(_arg0); end
end
Mechanize::Parser::SPECIAL_FILENAMES = T.let(T.unsafe(nil), Regexp)
@@ -1037,7 +1037,7 @@ class Mechanize::PluggableParser
def []=(content_type, klass); end
def csv=(klass); end
def default; end
- def default=(_); end
+ def default=(_arg0); end
def html=(klass); end
def parser(content_type); end
def pdf=(klass); end
@@ -1110,9 +1110,9 @@ class Mechanize::UnsupportedSchemeError < ::Mechanize::Error
def initialize(scheme, uri); end
def scheme; end
- def scheme=(_); end
+ def scheme=(_arg0); end
def uri; end
- def uri=(_); end
+ def uri=(_arg0); end
end
class Mechanize::Util | true |
Other | Homebrew | brew | c6785c7281f36c9b2e7f3a9ec69826dd7723f096.json | Update RBI files for mechanize. | Library/Homebrew/sorbet/rbi/gems/net-http-persistent@4.0.0.rbi | @@ -1,7 +0,0 @@
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `net-http-persistent` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
-
-# typed: true
-
- | true |
Other | Homebrew | brew | c6785c7281f36c9b2e7f3a9ec69826dd7723f096.json | Update RBI files for mechanize. | Library/Homebrew/sorbet/rbi/gems/net-http-persistent@4.0.1.rbi | @@ -0,0 +1,147 @@
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `net-http-persistent` gem.
+# Please instead update this file by running `tapioca sync`.
+
+# typed: true
+
+class Net::HTTP::Persistent
+ def initialize(name: T.unsafe(nil), proxy: T.unsafe(nil), pool_size: T.unsafe(nil)); end
+
+ def ca_file; end
+ def ca_file=(file); end
+ def ca_path; end
+ def ca_path=(path); end
+ def cert; end
+ def cert=(certificate); end
+ def cert_store; end
+ def cert_store=(store); end
+ def certificate; end
+ def certificate=(certificate); end
+ def ciphers; end
+ def ciphers=(ciphers); end
+ def connection_for(uri); end
+ def debug_output; end
+ def debug_output=(_arg0); end
+ def escape(str); end
+ def expired?(connection); end
+ def finish(connection); end
+ def generation; end
+ def headers; end
+ def http_version(uri); end
+ def http_versions; end
+ def idle_timeout; end
+ def idle_timeout=(_arg0); end
+ def keep_alive; end
+ def keep_alive=(_arg0); end
+ def key; end
+ def key=(key); end
+ def max_requests; end
+ def max_requests=(_arg0); end
+ def max_retries; end
+ def max_retries=(retries); end
+ def max_version; end
+ def max_version=(max_version); end
+ def min_version; end
+ def min_version=(min_version); end
+ def name; end
+ def no_proxy; end
+ def normalize_uri(uri); end
+ def open_timeout; end
+ def open_timeout=(_arg0); end
+ def override_headers; end
+ def pipeline(uri, requests, &block); end
+ def pool; end
+ def private_key; end
+ def private_key=(key); end
+ def proxy=(proxy); end
+ def proxy_bypass?(host, port); end
+ def proxy_from_env; end
+ def proxy_uri; end
+ def read_timeout; end
+ def read_timeout=(_arg0); end
+ def reconnect; end
+ def reconnect_ssl; end
+ def request(uri, req = T.unsafe(nil), &block); end
+ def request_setup(req_or_uri); end
+ def reset(connection); end
+ def reuse_ssl_sessions; end
+ def reuse_ssl_sessions=(_arg0); end
+ def shutdown; end
+ def socket_options; end
+ def ssl(connection); end
+ def ssl_generation; end
+ def ssl_timeout; end
+ def ssl_timeout=(ssl_timeout); end
+ def ssl_version; end
+ def ssl_version=(ssl_version); end
+ def start(http); end
+ def timeout_key; end
+ def unescape(str); end
+ def verify_callback; end
+ def verify_callback=(callback); end
+ def verify_depth; end
+ def verify_depth=(verify_depth); end
+ def verify_mode; end
+ def verify_mode=(verify_mode); end
+ def write_timeout; end
+ def write_timeout=(_arg0); end
+
+ class << self
+ def detect_idle_timeout(uri, max = T.unsafe(nil)); end
+ end
+end
+
+class Net::HTTP::Persistent::Connection
+ def initialize(http_class, http_args, ssl_generation); end
+
+ def finish; end
+ def http; end
+ def http=(_arg0); end
+ def last_use; end
+ def last_use=(_arg0); end
+ def requests; end
+ def requests=(_arg0); end
+ def reset; end
+ def ressl(ssl_generation); end
+ def ssl_generation; end
+ def ssl_generation=(_arg0); end
+end
+
+Net::HTTP::Persistent::DEFAULT_POOL_SIZE = T.let(T.unsafe(nil), Integer)
+
+Net::HTTP::Persistent::EPOCH = T.let(T.unsafe(nil), Time)
+
+class Net::HTTP::Persistent::Error < ::StandardError
+end
+
+class Net::HTTP::Persistent::Pool < ::ConnectionPool
+ def initialize(options = T.unsafe(nil), &block); end
+
+ def available; end
+ def checkin(net_http_args); end
+ def checkout(net_http_args); end
+ def key; end
+ def shutdown; end
+end
+
+class Net::HTTP::Persistent::TimedStackMulti < ::ConnectionPool::TimedStack
+ def initialize(size = T.unsafe(nil), &block); end
+
+ def empty?; end
+ def length; end
+
+ private
+
+ def connection_stored?(options = T.unsafe(nil)); end
+ def fetch_connection(options = T.unsafe(nil)); end
+ def lru_update(connection_args); end
+ def shutdown_connections; end
+ def store_connection(obj, options = T.unsafe(nil)); end
+ def try_create(options = T.unsafe(nil)); end
+
+ class << self
+ def hash_of_arrays; end
+ end
+end
+
+Net::HTTP::Persistent::VERSION = T.let(T.unsafe(nil), String) | true |
Other | Homebrew | brew | c6785c7281f36c9b2e7f3a9ec69826dd7723f096.json | Update RBI files for mechanize. | Library/Homebrew/sorbet/rbi/gems/webrick@1.7.0.rbi | @@ -0,0 +1,77 @@
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `webrick` gem.
+# Please instead update this file by running `tapioca sync`.
+
+# typed: true
+
+module WEBrick::HTTPUtils
+
+ private
+
+ def _escape(str, regex); end
+ def _make_regex(str); end
+ def _make_regex!(str); end
+ def _unescape(str, regex); end
+ def dequote(str); end
+ def escape(str); end
+ def escape8bit(str); end
+ def escape_form(str); end
+ def escape_path(str); end
+ def load_mime_types(file); end
+ def mime_type(filename, mime_tab); end
+ def normalize_path(path); end
+ def parse_form_data(io, boundary); end
+ def parse_header(raw); end
+ def parse_query(str); end
+ def parse_qvalues(value); end
+ def parse_range_header(ranges_specifier); end
+ def quote(str); end
+ def split_header_value(str); end
+ def unescape(str); end
+ def unescape_form(str); end
+
+ class << self
+ def _escape(str, regex); end
+ def _make_regex(str); end
+ def _make_regex!(str); end
+ def _unescape(str, regex); end
+ def dequote(str); end
+ def escape(str); end
+ def escape8bit(str); end
+ def escape_form(str); end
+ def escape_path(str); end
+ def load_mime_types(file); end
+ def mime_type(filename, mime_tab); end
+ def normalize_path(path); end
+ def parse_form_data(io, boundary); end
+ def parse_header(raw); end
+ def parse_query(str); end
+ def parse_qvalues(value); end
+ def parse_range_header(ranges_specifier); end
+ def quote(str); end
+ def split_header_value(str); end
+ def unescape(str); end
+ def unescape_form(str); end
+ end
+end
+
+class WEBrick::HTTPUtils::FormData < ::String
+ def initialize(*args); end
+
+ def <<(str); end
+ def [](*key); end
+ def append_data(data); end
+ def each_data; end
+ def filename; end
+ def filename=(_arg0); end
+ def list; end
+ def name; end
+ def name=(_arg0); end
+ def next_data=(_arg0); end
+ def to_ary; end
+ def to_s; end
+
+ protected
+
+ def next_data; end
+end | true |
Other | Homebrew | brew | c6785c7281f36c9b2e7f3a9ec69826dd7723f096.json | Update RBI files for mechanize. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -9251,14 +9251,6 @@ JSON::State = JSON::Ext::Generator::State
JSON::UnparserError = JSON::GeneratorError
-class JavaRequirement::CaskSuggestion
- extend ::T::Private::Methods::MethodHooks
- extend ::T::Private::Methods::SingletonMethodHooks
- def self.[](*_); end
-
- def self.members(); end
-end
-
module Kconv
AUTO = ::T.let(nil, ::T.untyped)
NOCONV = ::T.let(nil, ::T.untyped)
@@ -11909,226 +11901,7 @@ class Net::HTTP
end
class Net::HTTP::Persistent
- def ca_file(); end
-
- def ca_file=(file); end
-
- def ca_path(); end
-
- def ca_path=(path); end
-
- def cert(); end
-
- def cert=(certificate); end
-
- def cert_store(); end
-
- def cert_store=(store); end
-
- def certificate(); end
-
- def certificate=(certificate); end
-
- def ciphers(); end
-
- def ciphers=(ciphers); end
-
- def connection_for(uri); end
-
- def debug_output(); end
-
- def debug_output=(debug_output); end
-
- def escape(str); end
-
- def expired?(connection); end
-
- def finish(connection); end
-
- def generation(); end
-
- def headers(); end
-
- def http_version(uri); end
-
- def http_versions(); end
-
- def idle_timeout(); end
-
- def idle_timeout=(idle_timeout); end
-
- def initialize(name: T.unsafe(nil), proxy: T.unsafe(nil), pool_size: T.unsafe(nil)); end
-
- def keep_alive(); end
-
- def keep_alive=(keep_alive); end
-
- def key(); end
-
- def key=(key); end
-
- def max_requests(); end
-
- def max_requests=(max_requests); end
-
- def max_retries(); end
-
- def max_retries=(retries); end
-
- def max_version(); end
-
- def max_version=(max_version); end
-
- def min_version(); end
-
- def min_version=(min_version); end
-
- def name(); end
-
- def no_proxy(); end
-
- def normalize_uri(uri); end
-
- def open_timeout(); end
-
- def open_timeout=(open_timeout); end
-
- def override_headers(); end
-
- def pipeline(uri, requests, &block); end
-
- def pool(); end
-
- def private_key(); end
-
- def private_key=(key); end
-
- def proxy=(proxy); end
-
- def proxy_bypass?(host, port); end
-
- def proxy_from_env(); end
-
- def proxy_uri(); end
-
- def read_timeout(); end
-
- def read_timeout=(read_timeout); end
-
- def reconnect(); end
-
- def reconnect_ssl(); end
-
- def request(uri, req=T.unsafe(nil), &block); end
-
- def request_setup(req_or_uri); end
-
- def reset(connection); end
-
- def reuse_ssl_sessions(); end
-
- def reuse_ssl_sessions=(reuse_ssl_sessions); end
-
- def shutdown(); end
-
- def socket_options(); end
-
- def ssl(connection); end
-
- def ssl_generation(); end
-
- def ssl_timeout(); end
-
- def ssl_timeout=(ssl_timeout); end
-
- def ssl_version(); end
-
- def ssl_version=(ssl_version); end
-
- def start(http); end
-
- def timeout_key(); end
-
- def unescape(str); end
-
- def verify_callback(); end
-
- def verify_callback=(callback); end
-
- def verify_depth(); end
-
- def verify_depth=(verify_depth); end
-
- def verify_mode(); end
-
- def verify_mode=(verify_mode); end
-
- def write_timeout(); end
-
- def write_timeout=(write_timeout); end
- DEFAULT_POOL_SIZE = ::T.let(nil, ::T.untyped)
- EPOCH = ::T.let(nil, ::T.untyped)
HAVE_OPENSSL = ::T.let(nil, ::T.untyped)
- VERSION = ::T.let(nil, ::T.untyped)
-end
-
-class Net::HTTP::Persistent::Connection
- def finish(); end
-
- def http(); end
-
- def http=(http); end
-
- def initialize(http_class, http_args, ssl_generation); end
-
- def last_use(); end
-
- def last_use=(last_use); end
-
- def requests(); end
-
- def requests=(requests); end
-
- def reset(); end
-
- def ressl(ssl_generation); end
-
- def ssl_generation(); end
-
- def ssl_generation=(ssl_generation); end
-end
-
-class Net::HTTP::Persistent::Connection
-end
-
-class Net::HTTP::Persistent::Error
-end
-
-class Net::HTTP::Persistent::Error
-end
-
-class Net::HTTP::Persistent::Pool
- def checkin(net_http_args); end
-
- def checkout(net_http_args); end
-
- def key(); end
-
- def shutdown(); end
-end
-
-class Net::HTTP::Persistent::Pool
-end
-
-class Net::HTTP::Persistent::TimedStackMulti
-end
-
-class Net::HTTP::Persistent::TimedStackMulti
- def self.hash_of_arrays(); end
-end
-
-class Net::HTTP::Persistent
- def self.detect_idle_timeout(uri, max=T.unsafe(nil)); end
end
class Net::HTTPAlreadyReported
@@ -29231,6 +29004,11 @@ class Tab
extend ::T::Private::Methods::SingletonMethodHooks
end
+class Tap
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class Tapioca::Compilers::Dsl::Base
extend ::T::Sig
extend ::T::Helpers
@@ -29829,9 +29607,13 @@ end
class WEBrick::HTTPResponse
def _rack_setup_header(); end
+ def make_body_tempfile(); end
+
def rack(); end
def rack=(rack); end
+
+ def remove_body_tempfile(); end
end
class WEBrick::HTTPResponse::ChunkedWrapper
@@ -29851,10 +29633,18 @@ class WEBrick::HTTPServer
def create_response(with_webrick_config); end
end
+class WEBrick::HTTPServlet::CGIHandler
+ CGIRunnerArray = ::T.let(nil, ::T.untyped)
+end
+
class WEBrick::HTTPServlet::DefaultFileHandler
def multipart_body(body, parts, boundary, mtype, filesize); end
end
+class WEBrick::HTTPServlet::FileHandler
+ def set_filesystem_encoding(str); end
+end
+
module Warning
extend ::Warning
end | true |
Other | Homebrew | brew | 8f69e63712c57ac764af8ec28a494944162467e9.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.9.1.rbi | @@ -726,6 +726,7 @@ class RuboCop::Cop::Base
include(::RuboCop::Cop::AutocorrectLogic)
extend(::RuboCop::AST::Sexp)
extend(::RuboCop::AST::NodePattern::Macros)
+ extend(::RuboCop::ExcludeLimit)
def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end
@@ -929,8 +930,9 @@ module RuboCop::Cop::CheckLineBreakable
end
module RuboCop::Cop::CodeLength
- include(::RuboCop::Cop::ConfigurableMax)
+ extend(::RuboCop::ExcludeLimit)
+ def max=(value); end
private
@@ -2223,28 +2225,31 @@ class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base
include(::RuboCop::Cop::RangeHelp)
extend(::RuboCop::Cop::AutoCorrector)
- def autocorrect(corrector, prev_def, node); end
+ def autocorrect(corrector, prev_def, node, count); end
def check_defs(nodes); end
def on_begin(node); end
private
+ def allowance_range?; end
def autocorrect_insert_lines(corrector, newline_pos, count); end
def autocorrect_remove_lines(corrector, newline_pos, count); end
- def blank_lines_between?(first_def_node, second_def_node); end
def blank_lines_count_between(first_def_node, second_def_node); end
def candidate?(node); end
def class_candidate?(node); end
def def_end(node); end
def def_start(node); end
def end_loc(node); end
+ def expected_lines; end
+ def line_count_allowed?(count); end
def lines_between_defs(first_def_node, second_def_node); end
def maximum_empty_lines; end
- def message(node); end
+ def message(node, count: T.unsafe(nil)); end
def method_candidate?(node); end
def minimum_empty_lines; end
def module_candidate?(node); end
def multiple_blank_lines_groups?(first_def_node, second_def_node); end
+ def node_type(node); end
class << self
def autocorrect_incompatible_with; end
@@ -2556,10 +2561,12 @@ class RuboCop::Cop::Layout::FirstArgumentIndentation < ::RuboCop::Cop::Cop
private
+ def argument_alignment_config; end
def base_indentation(node); end
def base_range(send_node, arg_node); end
def column_of(range); end
def comment_lines; end
+ def enforce_first_argument_with_fixed_indentation?; end
def message(arg_node); end
def on_new_investigation; end
def previous_code_line(line_number); end
@@ -2924,12 +2931,12 @@ RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base
include(::RuboCop::Cop::CheckLineBreakable)
- include(::RuboCop::Cop::ConfigurableMax)
include(::RuboCop::Cop::IgnoredPattern)
include(::RuboCop::Cop::RangeHelp)
include(::RuboCop::Cop::LineLengthHelp)
extend(::RuboCop::Cop::AutoCorrector)
+ def max=(value); end
def on_array(node); end
def on_block(node); end
def on_hash(node); end
@@ -3487,6 +3494,7 @@ class RuboCop::Cop::Layout::SpaceBeforeBrackets < ::RuboCop::Cop::Base
private
def offense_range(node, begin_pos); end
+ def offense_range_for_assignment(node, begin_pos); end
def reference_variable_with_brackets?(node); end
def register_offense(range); end
end
@@ -5828,15 +5836,16 @@ class RuboCop::Cop::MessageAnnotator
end
module RuboCop::Cop::MethodComplexity
- include(::RuboCop::Cop::ConfigurableMax)
include(::RuboCop::Cop::IgnoredMethods)
include(::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount)
extend(::RuboCop::Cop::IgnoredMethods::Config)
extend(::RuboCop::AST::NodePattern::Macros)
+ extend(::RuboCop::ExcludeLimit)
mixes_in_class_methods(::RuboCop::Cop::IgnoredMethods::Config)
def define_method?(param0 = T.unsafe(nil)); end
+ def max=(value); end
def on_block(node); end
def on_def(node); end
def on_defs(node); end
@@ -5864,7 +5873,6 @@ module RuboCop::Cop::Metrics
end
class RuboCop::Cop::Metrics::AbcSize < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableMax)
include(::RuboCop::Cop::IgnoredMethods)
include(::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount)
include(::RuboCop::Cop::MethodComplexity)
@@ -5879,7 +5887,6 @@ end
RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableMax)
include(::RuboCop::Cop::CodeLength)
include(::RuboCop::Cop::IgnoredMethods)
extend(::RuboCop::Cop::IgnoredMethods::Config)
@@ -5895,8 +5902,7 @@ end
RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableMax)
-
+ def max=(value); end
def on_new_investigation; end
private
@@ -5910,7 +5916,6 @@ end
RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableMax)
include(::RuboCop::Cop::CodeLength)
def on_casgn(node); end
@@ -5922,7 +5927,6 @@ class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base
end
class RuboCop::Cop::Metrics::CyclomaticComplexity < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableMax)
include(::RuboCop::Cop::IgnoredMethods)
include(::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount)
include(::RuboCop::Cop::MethodComplexity)
@@ -5942,7 +5946,6 @@ RuboCop::Cop::Metrics::CyclomaticComplexity::COUNTED_NODES = T.let(T.unsafe(nil)
RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableMax)
include(::RuboCop::Cop::CodeLength)
include(::RuboCop::Cop::IgnoredMethods)
extend(::RuboCop::Cop::IgnoredMethods::Config)
@@ -5959,7 +5962,6 @@ end
RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableMax)
include(::RuboCop::Cop::CodeLength)
def module_definition?(param0 = T.unsafe(nil)); end
@@ -5972,9 +5974,9 @@ class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base
end
class RuboCop::Cop::Metrics::ParameterLists < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableMax)
-
def argument_to_lambda_or_proc?(param0 = T.unsafe(nil)); end
+ def max=(value); end
+ def max_optional_parameters=(value); end
def on_args(node); end
def on_def(node); end
def on_defs(node); end
@@ -8654,6 +8656,7 @@ end
RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base
+ include(::RuboCop::Cop::AllowedMethods)
extend(::RuboCop::Cop::AutoCorrector)
def double_negative?(param0 = T.unsafe(nil)); end
@@ -8663,6 +8666,8 @@ class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base
private
def assume_boolean_value?(condition); end
+ def message(node, keyword); end
+ def offense_range_with_keyword(node, condition); end
def opposite_condition?(node); end
def replacement_condition(node, condition); end
def require_parentheses?(condition); end
@@ -8671,6 +8676,8 @@ end
RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG_FOR_ELSIF = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base
include(::RuboCop::Cop::OnNormalIfUnless)
extend(::RuboCop::Cop::AutoCorrector)
@@ -9555,10 +9562,10 @@ RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_MSG = T.let(T.unsafe(
RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_REGEX = T.let(T.unsafe(nil), Regexp)
class RuboCop::Cop::Style::NumericLiterals < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableMax)
include(::RuboCop::Cop::IntegerNode)
extend(::RuboCop::Cop::AutoCorrector)
+ def min_digits=(value); end
def on_float(node); end
def on_int(node); end
@@ -9567,7 +9574,6 @@ class RuboCop::Cop::Style::NumericLiterals < ::RuboCop::Cop::Base
def check(node); end
def format_int_part(int_part); end
def format_number(node); end
- def max_parameter_name; end
def min_digits; end
def register_offense(node); end
def short_group_regex; end
@@ -11983,6 +11989,14 @@ class RuboCop::ErrorWithAnalyzedFileLocation < ::RuboCop::Error
def message; end
end
+module RuboCop::ExcludeLimit
+ def exclude_limit(parameter_name, method_name: T.unsafe(nil)); end
+
+ private
+
+ def transform(parameter_name); end
+end
+
module RuboCop::Ext
end
| true |
Other | Homebrew | brew | 8f69e63712c57ac764af8ec28a494944162467e9.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -9251,14 +9251,6 @@ JSON::State = JSON::Ext::Generator::State
JSON::UnparserError = JSON::GeneratorError
-class JavaRequirement::CaskSuggestion
- extend ::T::Private::Methods::MethodHooks
- extend ::T::Private::Methods::SingletonMethodHooks
- def self.[](*_); end
-
- def self.members(); end
-end
-
module Kconv
AUTO = ::T.let(nil, ::T.untyped)
NOCONV = ::T.let(nil, ::T.untyped)
@@ -29231,6 +29223,11 @@ class Tab
extend ::T::Private::Methods::SingletonMethodHooks
end
+class Tap
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class Tapioca::Compilers::Dsl::Base
extend ::T::Sig
extend ::T::Helpers | true |
Other | Homebrew | brew | 74241750241237819abd1df1bb3790090355a15f.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -9251,14 +9251,6 @@ JSON::State = JSON::Ext::Generator::State
JSON::UnparserError = JSON::GeneratorError
-class JavaRequirement::CaskSuggestion
- extend ::T::Private::Methods::MethodHooks
- extend ::T::Private::Methods::SingletonMethodHooks
- def self.[](*_); end
-
- def self.members(); end
-end
-
module Kconv
AUTO = ::T.let(nil, ::T.untyped)
NOCONV = ::T.let(nil, ::T.untyped)
@@ -29231,6 +29223,11 @@ class Tab
extend ::T::Private::Methods::SingletonMethodHooks
end
+class Tap
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class Tapioca::Compilers::Dsl::Base
extend ::T::Sig
extend ::T::Helpers | false |
Other | Homebrew | brew | 23b64f82c9a94b94baf64abe3c8533e1b52665f5.json | dev-cmd/prof: allow non-zero exit code.
Want to ensure that we still write profiling data even if the Homebrew
command fails. | Library/Homebrew/dev-cmd/prof.rb | @@ -32,7 +32,7 @@ def prof
if args.stackprof?
Homebrew.install_gem_setup_path! "stackprof"
with_env HOMEBREW_STACKPROF: "1" do
- safe_system ENV["HOMEBREW_RUBY_PATH"], brew_rb, *args.named
+ system ENV["HOMEBREW_RUBY_PATH"], brew_rb, *args.named
end
output_filename = "prof/d3-flamegraph.html"
safe_system "stackprof --d3-flamegraph prof/stackprof.dump > #{output_filename}" | false |
Other | Homebrew | brew | 3e23db2a34041a9df17583dfa1ad776ecea0dff5.json | Use new issue templates.
These are in beta and we've been given access to them so: let's try
them out. | .github/ISSUE_TEMPLATE/bug.md | @@ -1,46 +0,0 @@
----
-name: New issue for Reproducible Bug
-about: "If you're sure it's reproducible and not just your machine: submit an issue so we can investigate."
-
----
-
-# Bug report
-
-**Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.**
-
-- [ ] ran `brew update` and can still reproduce the problem?
-- [ ] ran `brew doctor`, fixed all issues and can still reproduce the problem?
-- [ ] ran `brew config` and `brew doctor` and included their output with your issue?
-
-<!-- To help us debug your issue, please complete these sections: -->
-
-## What you were trying to do (and why)
-
-<!-- replace me -->
-
-## What happened (include command output)
-
-<!-- replace me -->
-
-<details>
- <summary>Command output</summary>
- <pre>
-
- <!-- replace this with the command output -->
-
- </pre>
-</details>
-
-## What you expected to happen
-
-<!-- replace me -->
-
-## Step-by-step reproduction instructions (by running `brew` commands)
-
-<!-- replace me -->
-
-## Output of `brew config` and `brew doctor` commands
-
-<pre>
-<!-- replace me -->
-</pre> | true |
Other | Homebrew | brew | 3e23db2a34041a9df17583dfa1ad776ecea0dff5.json | Use new issue templates.
These are in beta and we've been given access to them so: let's try
them out. | .github/ISSUE_TEMPLATE/bug.yml | @@ -0,0 +1,41 @@
+name: New issue for Reproducible Bug
+about: "If you're sure it's reproducible and not just your machine: submit an issue so we can investigate."
+labels: bug
+issue_body: false
+inputs:
+ - type: description
+ attributes:
+ value: Please note we will close your issue without comment if you do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
+ - type: checkboxes
+ attributes:
+ label: Contributor Checklist
+ description: Please verify that you've followed these steps
+ choices:
+ - label: I ran `brew update` and can still reproduce the problem?
+ required: true
+ - label: I ran `brew doctor`, fixed all issues and can still reproduce the problem?
+ required: true
+ - type: textarea
+ attributes:
+ label: "`brew config` output"
+ required: true
+ - type: textarea
+ attributes:
+ label: "`brew doctor` output"
+ required: true
+ - type: textarea
+ attributes:
+ label: What were you trying to do (and why)?
+ required: true
+ - type: textarea
+ attributes:
+ label: What happened (include all command output)?
+ required: true
+ - type: textarea
+ attributes:
+ label: What did you expect to happen?
+ required: true
+ - type: textarea
+ attributes:
+ label: Step-by-step reproduction instructions (by running `brew` commands)
+ required: true | true |
Other | Homebrew | brew | 3e23db2a34041a9df17583dfa1ad776ecea0dff5.json | Use new issue templates.
These are in beta and we've been given access to them so: let's try
them out. | .github/ISSUE_TEMPLATE/feature.md | @@ -1,29 +0,0 @@
----
-name: New issue for Feature Suggestion
-about: Request our thoughts on your suggestion for a new feature for Homebrew.
-
----
-
-# Feature suggestion
-
-**Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.**
-
-<!-- Please fill these sections with the relevant information: -->
-
-# A detailed description of the proposed feature
-
-<!-- replace me -->
-
-# The motivation for the feature
-
-<!-- replace me -->
-
-# How the feature would be relevant to at least 90% of Homebrew users
-
-<!-- (if it's not: do not open a feature request) -->
-
-# What alternatives to the feature have been considered
-
-<!-- replace me -->
-
-<!-- We will close this issue or ask you to create a pull-request if it's something the maintainers are not actively planning to work on. --> | true |
Other | Homebrew | brew | 3e23db2a34041a9df17583dfa1ad776ecea0dff5.json | Use new issue templates.
These are in beta and we've been given access to them so: let's try
them out. | .github/ISSUE_TEMPLATE/feature.yml | @@ -0,0 +1,27 @@
+name: New issue for Feature Suggestion
+about: Request our thoughts on your suggestion for a new feature for Homebrew.
+labels: features
+issue_body: false
+inputs:
+ - type: description
+ attributes:
+ value: Please note we will close your issue without comment if do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
+ - type: textarea
+ attributes:
+ label: Provide a detailed description of the proposed feature
+ required: true
+ - type: textarea
+ attributes:
+ label: What is the motivation for the feature?
+ required: true
+ - type: textarea
+ attributes:
+ label: How will the feature be relevant to at least 90% of Homebrew users?
+ required: true
+ - type: textarea
+ attributes:
+ label: What alternatives to the feature have been considered?
+ required: true
+ - type: description
+ attributes:
+ value: We will close this issue or ask you to create a pull-request if it's something the maintainers are not actively planning to work on. | true |
Other | Homebrew | brew | 28a8409b6e6ecc35f739f88d7e8e309c9265818d.json | cmd/--prefix: add --installed flag
This changes the output for uninstalled formulae from Cellar prefix to empty string, so:
```sh
$ brew --prefix abcde python@3.9 tcl-tk
/usr/local/Cellar/abcde/2.9.3_1
/usr/local/opt/python@3.9
/usr/local/Cellar/tcl-tk/8.6.10
$ brew --prefix --installed abcde python@3.9 tcl-tk
/usr/local/opt/python@3.9
$
``` | Library/Homebrew/cmd/--prefix.rb | @@ -23,6 +23,9 @@ def __prefix_args
EOS
switch "--unbrewed",
description: "List files in Homebrew's prefix not installed by Homebrew."
+ switch "--installed",
+ description: "Outputs nothing and returns a failing status code if <formula> is not installed."
+ conflicts "--unbrewed", "--installed"
named_args :formula
end
@@ -31,16 +34,36 @@ def __prefix_args
def __prefix
args = __prefix_args.parse
+ raise UsageError, "`--installed` requires a formula argument." if args.installed? && args.no_named?
+
if args.unbrewed?
raise UsageError, "`--unbrewed` does not take a formula argument." unless args.no_named?
list_unbrewed
elsif args.no_named?
puts HOMEBREW_PREFIX
else
- puts args.named.to_resolved_formulae.map { |f|
- f.opt_prefix.exist? ? f.opt_prefix : f.latest_installed_prefix
- }
+ formulae = args.named.to_resolved_formulae
+ prefixes = formulae.map do |f|
+ if f.opt_prefix.exist?
+ f.opt_prefix
+ elsif args.installed?
+ nil
+ else
+ f.latest_installed_prefix
+ end
+ end.compact
+ puts prefixes
+ if args.installed?
+ missing_formulae = formulae.reject(&:optlinked?)
+ .map(&:name)
+ return if missing_formulae.blank?
+
+ raise NotAKegError, <<~EOS
+ The following formulae are not installed:
+ #{missing_formulae.join(" ")}
+ EOS
+ end
end
end
| true |
Other | Homebrew | brew | 28a8409b6e6ecc35f739f88d7e8e309c9265818d.json | cmd/--prefix: add --installed flag
This changes the output for uninstalled formulae from Cellar prefix to empty string, so:
```sh
$ brew --prefix abcde python@3.9 tcl-tk
/usr/local/Cellar/abcde/2.9.3_1
/usr/local/opt/python@3.9
/usr/local/Cellar/tcl-tk/8.6.10
$ brew --prefix --installed abcde python@3.9 tcl-tk
/usr/local/opt/python@3.9
$
``` | Library/Homebrew/test/cmd/--prefix_spec.rb | @@ -14,4 +14,18 @@
.and not_to_output.to_stderr
.and be_a_success
end
+
+ it "errors if the given Formula doesn't exist" do
+ expect { brew "--prefix", "--installed", "nonexistent" }
+ .to output(/No available formula/).to_stderr
+ .and not_to_output.to_stdout
+ .and be_a_failure
+ end
+
+ it "prints a warning with `--installed` if the given Formula is not installed" do
+ expect { brew "--prefix", "--installed", testball }
+ .to not_to_output.to_stdout
+ .and output(/testball/).to_stderr
+ .and be_a_failure
+ end
end | true |
Other | Homebrew | brew | 28a8409b6e6ecc35f739f88d7e8e309c9265818d.json | cmd/--prefix: add --installed flag
This changes the output for uninstalled formulae from Cellar prefix to empty string, so:
```sh
$ brew --prefix abcde python@3.9 tcl-tk
/usr/local/Cellar/abcde/2.9.3_1
/usr/local/opt/python@3.9
/usr/local/Cellar/tcl-tk/8.6.10
$ brew --prefix --installed abcde python@3.9 tcl-tk
/usr/local/opt/python@3.9
$
``` | completions/bash/brew | @@ -202,6 +202,7 @@ _brew___prefix() {
__brewcomp "
--debug
--help
+ --installed
--quiet
--unbrewed
--verbose | true |
Other | Homebrew | brew | 28a8409b6e6ecc35f739f88d7e8e309c9265818d.json | cmd/--prefix: add --installed flag
This changes the output for uninstalled formulae from Cellar prefix to empty string, so:
```sh
$ brew --prefix abcde python@3.9 tcl-tk
/usr/local/Cellar/abcde/2.9.3_1
/usr/local/opt/python@3.9
/usr/local/Cellar/tcl-tk/8.6.10
$ brew --prefix --installed abcde python@3.9 tcl-tk
/usr/local/opt/python@3.9
$
``` | completions/fish/brew.fish | @@ -248,6 +248,7 @@ __fish_brew_complete_arg '--env' -a '(__fish_brew_suggest_formulae_all)'
__fish_brew_complete_cmd '--prefix' 'Display Homebrew\'s install path'
__fish_brew_complete_arg '--prefix' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg '--prefix' -l help -d 'Show this message'
+__fish_brew_complete_arg '--prefix' -l installed -d 'Outputs nothing and returns a failing status code if formula is not installed'
__fish_brew_complete_arg '--prefix' -l quiet -d 'Make some output more quiet'
__fish_brew_complete_arg '--prefix' -l unbrewed -d 'List files in Homebrew\'s prefix not installed by Homebrew'
__fish_brew_complete_arg '--prefix' -l verbose -d 'Make some output more verbose' | true |
Other | Homebrew | brew | 28a8409b6e6ecc35f739f88d7e8e309c9265818d.json | cmd/--prefix: add --installed flag
This changes the output for uninstalled formulae from Cellar prefix to empty string, so:
```sh
$ brew --prefix abcde python@3.9 tcl-tk
/usr/local/Cellar/abcde/2.9.3_1
/usr/local/opt/python@3.9
/usr/local/Cellar/tcl-tk/8.6.10
$ brew --prefix --installed abcde python@3.9 tcl-tk
/usr/local/opt/python@3.9
$
``` | completions/zsh/_brew | @@ -312,8 +312,9 @@ _brew___prefix() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
+ '(--unbrewed)--installed[Outputs nothing and returns a failing status code if formula is not installed]' \
'--quiet[Make some output more quiet]' \
- '--unbrewed[List files in Homebrew'\''s prefix not installed by Homebrew]' \
+ '(--installed)--unbrewed[List files in Homebrew'\''s prefix not installed by Homebrew]' \
'--verbose[Make some output more verbose]' \
'::formula:__brew_formulae'
} | true |
Other | Homebrew | brew | 28a8409b6e6ecc35f739f88d7e8e309c9265818d.json | cmd/--prefix: add --installed flag
This changes the output for uninstalled formulae from Cellar prefix to empty string, so:
```sh
$ brew --prefix abcde python@3.9 tcl-tk
/usr/local/Cellar/abcde/2.9.3_1
/usr/local/opt/python@3.9
/usr/local/Cellar/tcl-tk/8.6.10
$ brew --prefix --installed abcde python@3.9 tcl-tk
/usr/local/opt/python@3.9
$
``` | docs/Manpage.md | @@ -723,7 +723,7 @@ the list is formatted for export to `bash`(1) unless `--plain` is passed.
* `--plain`:
Generate plain output even when piped.
-### `--prefix` [*`--unbrewed`*] [*`formula`* ...]
+### `--prefix` [*`--unbrewed`*] [*`--installed`*] [*`formula`* ...]
Display Homebrew's install path. *Default:*
@@ -736,6 +736,8 @@ is or would be installed.
* `--unbrewed`:
List files in Homebrew's prefix not installed by Homebrew.
+* `--installed`:
+ Outputs nothing and returns a failing status code if *`formula`* is not installed.
### `--repository`, `--repo` [*`tap`* ...]
| true |
Other | Homebrew | brew | 28a8409b6e6ecc35f739f88d7e8e309c9265818d.json | cmd/--prefix: add --installed flag
This changes the output for uninstalled formulae from Cellar prefix to empty string, so:
```sh
$ brew --prefix abcde python@3.9 tcl-tk
/usr/local/Cellar/abcde/2.9.3_1
/usr/local/opt/python@3.9
/usr/local/Cellar/tcl-tk/8.6.10
$ brew --prefix --installed abcde python@3.9 tcl-tk
/usr/local/opt/python@3.9
$
``` | manpages/brew.1 | @@ -978,7 +978,7 @@ Generate a list of environment variables for the specified shell, or \fB\-\-shel
\fB\-\-plain\fR
Generate plain output even when piped\.
.
-.SS "\fB\-\-prefix\fR [\fI\-\-unbrewed\fR] [\fIformula\fR \.\.\.]"
+.SS "\fB\-\-prefix\fR [\fI\-\-unbrewed\fR] [\fI\-\-installed\fR] [\fIformula\fR \.\.\.]"
Display Homebrew\'s install path\. \fIDefault:\fR
.
.IP "\(bu" 4
@@ -999,6 +999,10 @@ If \fIformula\fR is provided, display the location in the Cellar where \fIformul
\fB\-\-unbrewed\fR
List files in Homebrew\'s prefix not installed by Homebrew\.
.
+.TP
+\fB\-\-installed\fR
+Outputs nothing and returns a failing status code if \fIformula\fR is not installed\.
+.
.SS "\fB\-\-repository\fR, \fB\-\-repo\fR [\fItap\fR \.\.\.]"
Display where Homebrew\'s git repository is located\.
. | true |
Other | Homebrew | brew | 3c29c088314bc4355508f528fd8853a86ebf9356.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -12420,7 +12420,6 @@ class Object
HOMEBREW_MACOS_ARM_DEFAULT_PREFIX = ::T.let(nil, ::T.untyped)
HOMEBREW_MACOS_ARM_DEFAULT_REPOSITORY = ::T.let(nil, ::T.untyped)
HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX = ::T.let(nil, ::T.untyped)
- HOMEBREW_PATCHELF_RB_WRITE = ::T.let(nil, ::T.untyped)
HOMEBREW_PINNED_KEGS = ::T.let(nil, ::T.untyped)
HOMEBREW_PREFIX = ::T.let(nil, ::T.untyped)
HOMEBREW_PRODUCT = ::T.let(nil, ::T.untyped) | false |
Other | Homebrew | brew | a4761ab570f2ac63e277bef0e62c5271523fc9da.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.9.0.rbi | @@ -67,6 +67,8 @@ RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(n
RuboCop::CLI::Command::AutoGenerateConfig::PHASE_2 = T.let(T.unsafe(nil), String)
+RuboCop::CLI::Command::AutoGenerateConfig::YAML_OPTIONAL_DOC_START = T.let(T.unsafe(nil), Regexp)
+
class RuboCop::CLI::Command::Base
def initialize(env); end
@@ -285,7 +287,7 @@ class RuboCop::Config
def target_rails_version_from_bundler_lock_file; end
class << self
- def create(hash, path); end
+ def create(hash, path, check: T.unsafe(nil)); end
end
end
@@ -314,7 +316,7 @@ class RuboCop::ConfigLoader
def add_missing_namespaces(path, hash); end
def clear_options; end
def configuration_file_for(target_dir); end
- def configuration_from_file(config_file); end
+ def configuration_from_file(config_file, check: T.unsafe(nil)); end
def debug; end
def debug=(_arg0); end
def debug?; end
@@ -327,7 +329,7 @@ class RuboCop::ConfigLoader
def ignore_parent_exclusion; end
def ignore_parent_exclusion=(_arg0); end
def ignore_parent_exclusion?; end
- def load_file(file); end
+ def load_file(file, check: T.unsafe(nil)); end
def load_yaml_configuration(absolute_path); end
def loaded_features; end
def merge(base_hash, derived_hash); end
@@ -551,6 +553,9 @@ class RuboCop::ConfigStore
def for_pwd; end
def force_default_config!; end
def options_config=(options_config); end
+ def unvalidated; end
+ def validated; end
+ def validated?; end
end
class RuboCop::ConfigValidator
@@ -4769,10 +4774,14 @@ class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base
def on_send(node); end
def to_method(param0 = T.unsafe(nil)); end
+ def to_method_symbol(param0 = T.unsafe(nil)); end
private
def correct_method(node, receiver); end
+ def correct_sym_method(to_method); end
+ def handle_as_symbol(node); end
+ def handle_conversion_method(node); end
def ignore_receiver?(receiver); end
def ignored_class?(name); end
def ignored_classes; end
@@ -4781,9 +4790,27 @@ end
RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash)
+RuboCop::Cop::Lint::NumberConversion::METHODS = T.let(T.unsafe(nil), String)
+
RuboCop::Cop::Lint::NumberConversion::MSG = T.let(T.unsafe(nil), String)
-RuboCop::Cop::Lint::NumberConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+class RuboCop::Cop::Lint::NumberedParameterAssignment < ::RuboCop::Cop::Base
+ def on_lvasgn(node); end
+end
+
+RuboCop::Cop::Lint::NumberedParameterAssignment::LVAR_MSG = T.let(T.unsafe(nil), String)
+
+RuboCop::Cop::Lint::NumberedParameterAssignment::NUMBERED_PARAMETER_RANGE = T.let(T.unsafe(nil), Range)
+
+RuboCop::Cop::Lint::NumberedParameterAssignment::NUM_PARAM_MSG = T.let(T.unsafe(nil), String)
+
+class RuboCop::Cop::Lint::OrAssignmentToConstant < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
+ def on_or_asgn(node); end
+end
+
+RuboCop::Cop::Lint::OrAssignmentToConstant::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::OrderedMagicComments < ::RuboCop::Cop::Base
include(::RuboCop::Cop::FrozenStringLiteral)
@@ -5329,6 +5356,26 @@ end
RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Lint::SymbolConversion < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
+ def on_send(node); end
+ def on_sym(node); end
+
+ private
+
+ def correct_hash_key(node); end
+ def hash_key?(node); end
+ def in_alias?(node); end
+ def in_percent_literal_array?(node); end
+ def properly_quoted?(source, value); end
+ def register_offense(node, correction:, message: T.unsafe(nil)); end
+end
+
+RuboCop::Cop::Lint::SymbolConversion::MSG = T.let(T.unsafe(nil), String)
+
+RuboCop::Cop::Lint::SymbolConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base
def on_other_file; end
@@ -5386,6 +5433,18 @@ end
RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Lint::TripleQuotes < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
+ def on_dstr(node); end
+
+ private
+
+ def empty_str_nodes(node); end
+end
+
+RuboCop::Cop::Lint::TripleQuotes::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Lint::UnderscorePrefixedVariableName < ::RuboCop::Cop::Base
def after_leaving_scope(scope, _variable_table); end
def check_variable(variable); end
@@ -6402,10 +6461,13 @@ class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base
private
+ def correct_node(corrector, node, offending_name, preferred_name); end
+ def correct_reassignment(corrector, node, offending_name, preferred_name); end
def message(node); end
def offense_range(resbody); end
def preferred_name(variable_name); end
def variable_name(node); end
+ def variable_name_matches?(node, name); end
end
RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil), String)
@@ -7779,11 +7841,16 @@ class RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective < ::RuboCop::Cop
private
- def rubocop_directive_comment?(comment); end
+ def allowed_cops; end
+ def any_cops_allowed?; end
+ def directive_cops(comment); end
+ def register_offense(comment, directive_cops, disallowed_cops); end
end
RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG_FOR_COPS = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Style::DocumentDynamicEvalDefinition < ::RuboCop::Cop::Base
def on_send(node); end
@@ -8079,16 +8146,19 @@ RuboCop::Cop::Style::EndlessMethod::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::EndlessMethod::MSG_MULTI_LINE = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base
- def eval_without_location?(param0 = T.unsafe(nil)); end
def line_with_offset?(param0 = T.unsafe(nil), param1, param2); end
def on_send(node); end
+ def valid_eval_receiver?(param0 = T.unsafe(nil)); end
private
- def add_offense_for_different_line(_node, line_node, line_diff); end
- def add_offense_for_same_line(_node, line_node); end
- def message_incorrect_line(actual, sign, line_diff); end
- def on_with_lineno(node, code); end
+ def add_offense_for_different_line(node, line_node, line_diff); end
+ def add_offense_for_same_line(node, line_node); end
+ def check_file(node, file_node); end
+ def check_line(node, code); end
+ def file_and_line(node); end
+ def message_incorrect_line(method_name, actual, sign, line_diff); end
+ def register_offense(node); end
def special_file_keyword?(node); end
def special_line_keyword?(node); end
def string_first_line(str_node); end
@@ -8097,6 +8167,10 @@ end
RuboCop::Cop::Style::EvalWithLocation::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::EvalWithLocation::MSG_EVAL = T.let(T.unsafe(nil), String)
+
+RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_FILE = T.let(T.unsafe(nil), String)
+
RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_LINE = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::EvalWithLocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
@@ -8247,6 +8321,8 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array
class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
+ include(::RuboCop::Cop::IgnoredMethods)
+ extend(::RuboCop::Cop::IgnoredMethods::Config)
def format_string_in_typical_context?(param0 = T.unsafe(nil)); end
def on_str(node); end
@@ -8255,13 +8331,15 @@ class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base
def allowed_unannotated?(detections); end
def collect_detections(node); end
+ def format_string_token?(node); end
def max_unannotated_placeholders_allowed; end
def message(detected_style); end
def message_text(style); end
def str_contents(source_map); end
def token_ranges(contents); end
def tokens(str_node, &block); end
def unannotated_format?(node, detected_style); end
+ def use_ignored_method?(node); end
end
class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base
@@ -8527,6 +8605,7 @@ class RuboCop::Cop::Style::IfInsideElse < ::RuboCop::Cop::Base
def correct_to_elsif_from_if_inside_else_form(corrector, node, condition); end
def correct_to_elsif_from_modifier_form(corrector, node); end
def find_end_range(node); end
+ def if_condition_range(node, condition); end
end
RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String)
@@ -8574,6 +8653,24 @@ end
RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
+ def double_negative?(param0 = T.unsafe(nil)); end
+ def if_with_boolean_literal_branches?(param0 = T.unsafe(nil)); end
+ def on_if(node); end
+
+ private
+
+ def assume_boolean_value?(condition); end
+ def opposite_condition?(node); end
+ def replacement_condition(node, condition); end
+ def require_parentheses?(condition); end
+ def return_boolean_value?(condition); end
+end
+
+RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base
include(::RuboCop::Cop::OnNormalIfUnless)
extend(::RuboCop::Cop::AutoCorrector)
@@ -9383,12 +9480,17 @@ class RuboCop::Cop::Style::NonNilCheck < ::RuboCop::Cop::Base
def autocorrect_comparison(corrector, node); end
def autocorrect_non_nil(corrector, node, inner_node); end
def autocorrect_unless_nil(corrector, node, receiver); end
- def find_offense_node(node); end
def include_semantic_changes?; end
def message(node); end
+ def nil_comparison_style; end
+ def register_offense?(node); end
def unless_and_nil_check?(send_node); end
end
+RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REDUNDANCY = T.let(T.unsafe(nil), String)
+
+RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REPLACEMENT = T.let(T.unsafe(nil), String)
+
RuboCop::Cop::Style::NonNilCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Style::Not < ::RuboCop::Cop::Base
@@ -10579,12 +10681,15 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
private
def allow_modifier?; end
+ def arguments_range(node); end
def autocorrect(corrector, node, if_branch); end
def correct_for_basic_condition_style(corrector, node, if_branch, and_operator); end
def correct_for_comment(corrector, node, if_branch); end
def correct_for_guard_condition_style(corrector, node, if_branch, and_operator); end
+ def correct_outer_condition(corrector, condition); end
def offending_branch?(branch); end
def replacement_condition(and_operator, condition); end
+ def requrie_parentheses?(condition); end
def wrap_condition?(node); end
end
@@ -12312,7 +12417,10 @@ class RuboCop::MagicComment
def frozen_string_literal; end
def frozen_string_literal?; end
def frozen_string_literal_specified?; end
+ def shareable_constant_value; end
+ def shareable_constant_value_specified?; end
def valid_literal_value?; end
+ def valid_shareable_constant_value?; end
private
@@ -12338,6 +12446,7 @@ class RuboCop::MagicComment::EmacsComment < ::RuboCop::MagicComment::EditorComme
private
def extract_frozen_string_literal; end
+ def extract_shareable_constant_value; end
end
RuboCop::MagicComment::EmacsComment::FORMAT = T.let(T.unsafe(nil), Regexp)
@@ -12352,13 +12461,15 @@ class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment
private
def extract_frozen_string_literal; end
+ def extract_shareable_constant_value; end
end
RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), Regexp)
class RuboCop::MagicComment::VimComment < ::RuboCop::MagicComment::EditorComment
def encoding; end
def frozen_string_literal; end
+ def shareable_constant_value; end
end
RuboCop::MagicComment::VimComment::FORMAT = T.let(T.unsafe(nil), Regexp) | true |
Other | Homebrew | brew | a4761ab570f2ac63e277bef0e62c5271523fc9da.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -26819,7 +26819,7 @@ module RuboCop::RSpec::ExpectOffense
def expect_no_offenses(source, file=T.unsafe(nil)); end
- def expect_offense(source, file=T.unsafe(nil), severity: T.unsafe(nil), **replacements); end
+ def expect_offense(source, file=T.unsafe(nil), severity: T.unsafe(nil), chomp: T.unsafe(nil), **replacements); end
def format_offense(source, **replacements); end
| true |
Other | Homebrew | brew | fc7c2434710449088361c52046d13408c0c74729.json | version: add constants for regexes | Library/Homebrew/version.rb | @@ -379,6 +379,21 @@ def self._parse(spec, detected_from_url:)
end
private_class_method :_parse
+ DOT_OPTIONAL = /(?:\d+(?:\.\d+)*)/.source.freeze
+ private_constant :DOT_OPTIONAL
+
+ DOT_REQUIRED = /(?:\d+(?:\.\d+)+)/.source.freeze
+ private_constant :DOT_REQUIRED
+
+ MINOR_OR_PATCH = /(?:\d+(?:\.\d+){1,2})/.source.freeze
+ private_constant :MINOR_OR_PATCH
+
+ BIN_SUFFIX = /(?:[._-](?i:bin|dist|stable|src|sources?|final|full))/.source.freeze
+ private_constant :BIN_SUFFIX
+
+ ALPHA_SUFFIX = /(?:[._-]?(?i:alpha|beta|pre|rc)\.?\d{,2})/.source.freeze
+ private_constant :ALPHA_SUFFIX
+
VERSION_PARSERS = [
# date-based versioning
# e.g. ltopers-v2017-04-14.tar.gz
@@ -400,67 +415,67 @@ def self._parse(spec, detected_from_url:)
# e.g. foobar-4.5.1-1
# e.g. unrtf_0.20.4-1
# e.g. ruby-1.9.1-p243
- StemParser.new(/[_-]((?:\d+\.)*\d+\.\d+-(?:p|rc|RC)?\d+)(?:[._-](?i:bin|dist|stable|src|sources?|final|full))?$/),
+ StemParser.new(/[_-](#{DOT_REQUIRED}-(?:p|rc|RC)?\d+)#{BIN_SUFFIX}?$/),
# URL with no extension
# e.g. https://waf.io/waf-1.8.12
# e.g. https://codeload.github.com/gsamokovarov/jump/tar.gz/v0.7.1
- UrlParser.new(/[-v]((?:\d+\.)*\d+)$/),
+ UrlParser.new(/[-v](#{DOT_OPTIONAL})$/),
# e.g. lame-398-1
StemParser.new(/-(\d+-\d+)/),
# e.g. foobar-4.5.1
- StemParser.new(/-((?:\d+\.)*\d+)$/),
+ StemParser.new(/-(#{DOT_OPTIONAL})$/),
# e.g. foobar-4.5.1.post1
- StemParser.new(/-((?:\d+\.)*\d+(.post\d+)?)$/),
+ StemParser.new(/-(#{DOT_OPTIONAL}(.post\d+)?)$/),
# e.g. foobar-4.5.1b
- StemParser.new(/-((?:\d+\.)*\d+(?:[abc]|rc|RC)\d*)$/),
+ StemParser.new(/-(#{DOT_OPTIONAL}(?:[abc]|rc|RC)\d*)$/),
# e.g. foobar-4.5.0-alpha5, foobar-4.5.0-beta1, or foobar-4.50-beta
- StemParser.new(/-((?:\d+\.)*\d+-(?:alpha|beta|rc)\d*)$/),
+ StemParser.new(/-(#{DOT_OPTIONAL}-(?:alpha|beta|rc)\d*)$/),
# e.g. https://ftpmirror.gnu.org/libidn/libidn-1.29-win64.zip
# e.g. https://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-0.9.17-w32.zip
- StemParser.new(/-(\d+\.\d+(?:\.\d+)?)-w(?:in)?(?:32|64)$/),
+ StemParser.new(/-(#{MINOR_OR_PATCH})-w(?:in)?(?:32|64)$/),
# Opam packages
# e.g. https://opam.ocaml.org/archives/sha.1.9+opam.tar.gz
# e.g. https://opam.ocaml.org/archives/lablgtk.2.18.3+opam.tar.gz
# e.g. https://opam.ocaml.org/archives/easy-format.1.0.2+opam.tar.gz
- StemParser.new(/\.(\d+\.\d+(?:\.\d+)?)\+opam$/),
+ StemParser.new(/\.(#{MINOR_OR_PATCH})\+opam$/),
# e.g. https://ftpmirror.gnu.org/mtools/mtools-4.0.18-1.i686.rpm
# e.g. https://ftpmirror.gnu.org/autogen/autogen-5.5.7-5.i386.rpm
# e.g. https://ftpmirror.gnu.org/libtasn1/libtasn1-2.8-x86.zip
# e.g. https://ftpmirror.gnu.org/libtasn1/libtasn1-2.8-x64.zip
# e.g. https://ftpmirror.gnu.org/mtools/mtools_4.0.18_i386.deb
- StemParser.new(/[_-](\d+\.\d+(?:\.\d+)?(?:-\d+)?)[._-](?:i[36]86|x86|x64(?:[_-](?:32|64))?)$/),
+ StemParser.new(/[_-](#{MINOR_OR_PATCH}(?:-\d+)?)[._-](?:i[36]86|x86|x64(?:[_-](?:32|64))?)$/),
# e.g. https://registry.npmjs.org/@angular/cli/-/cli-1.3.0-beta.1.tgz
# e.g. https://github.com/dlang/dmd/archive/v2.074.0-beta1.tar.gz
# e.g. https://github.com/dlang/dmd/archive/v2.074.0-rc1.tar.gz
# e.g. https://github.com/premake/premake-core/releases/download/v5.0.0-alpha10/premake-5.0.0-alpha10-src.zip
- StemParser.new(/[-.vV]?((?:\d+\.)+\d+[._-]?(?i:alpha|beta|pre|rc)\.?\d{,2})/),
+ StemParser.new(/[-.vV]?(#{DOT_REQUIRED}#{ALPHA_SUFFIX})/),
# e.g. foobar4.5.1
- StemParser.new(/((?:\d+\.)*\d+)$/),
+ StemParser.new(/(#{DOT_OPTIONAL})$/),
# e.g. foobar-4.5.0-bin
- StemParser.new(/[-vV]((?:\d+\.)+\d+[abc]?)[._-](?i:bin|dist|stable|src|sources?|final|full)$/),
+ StemParser.new(/[-vV](#{DOT_REQUIRED}[abc]?)#{BIN_SUFFIX}$/),
# dash version style
# e.g. http://www.antlr.org/download/antlr-3.4-complete.jar
# e.g. https://cdn.nuxeo.com/nuxeo-9.2/nuxeo-server-9.2-tomcat.zip
# e.g. https://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-cli/0.181/presto-cli-0.181-executable.jar
# e.g. https://search.maven.org/remotecontent?filepath=org/fusesource/fuse-extra/fusemq-apollo-mqtt/1.3/fusemq-apollo-mqtt-1.3-uber.jar
# e.g. https://search.maven.org/remotecontent?filepath=org/apache/orc/orc-tools/1.2.3/orc-tools-1.2.3-uber.jar
- StemParser.new(/-((?:\d+\.)+\d+)-/),
+ StemParser.new(/-(#{DOT_REQUIRED})-/),
# e.g. dash_0.5.5.1.orig.tar.gz (Debian style)
- StemParser.new(/_((?:\d+\.)+\d+[abc]?)\.orig$/),
+ StemParser.new(/_(#{DOT_REQUIRED}[abc]?)\.orig$/),
# e.g. https://www.openssl.org/source/openssl-0.9.8s.tar.gz
StemParser.new(/-v?(\d[^-]+)/),
@@ -481,7 +496,7 @@ def self._parse(spec, detected_from_url:)
StemParser.new(/\.v(\d+[a-z]?)/),
# e.g. https://secure.php.net/get/php-7.1.10.tar.bz2/from/this/mirror
- UrlParser.new(/[-.vV]?((?:\d+\.)+\d+(?:[._-]?(?i:alpha|beta|pre|rc)\.?\d{,2})?)/),
+ UrlParser.new(/[-.vV]?(#{DOT_REQUIRED}#{ALPHA_SUFFIX}?)/),
].freeze
private_constant :VERSION_PARSERS
| false |
Other | Homebrew | brew | d9e8a34d3b3eb9e42bd941588273718be5ae0355.json | version: replace [.] with \. in regex | Library/Homebrew/version.rb | @@ -460,7 +460,7 @@ def self._parse(spec, detected_from_url:)
StemParser.new(/-((?:\d+\.)+\d+)-/),
# e.g. dash_0.5.5.1.orig.tar.gz (Debian style)
- StemParser.new(/_((?:\d+\.)+\d+[abc]?)[.]orig$/),
+ StemParser.new(/_((?:\d+\.)+\d+[abc]?)\.orig$/),
# e.g. https://www.openssl.org/source/openssl-0.9.8s.tar.gz
StemParser.new(/-v?(\d[^-]+)/), | false |
Other | Homebrew | brew | 46c5965037b96da8bfc8b514c2f37961ffc9286e.json | style: handle line too long for new bottle blocks
The " was for a previous syntax we had, but we dropped that and changed our minds.
This PR fixes the style check for the current implementation of the new bottle blocks. | Library/.rubocop.yml | @@ -353,7 +353,7 @@ Layout/LineLength:
' name "',
' pkg "',
' pkgutil: "',
- ' sha256 "',
+ ' sha256 cellar: ',
"#{language}",
"#{version.",
' "/Library/Application Support/', | false |
Other | Homebrew | brew | 84fc16c1c1846bcc768a724311c30c7bf98e2cbd.json | Apply suggestions from code review
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/update-report.rb | @@ -152,7 +152,7 @@ def update_report
puts <<~EOS
The following taps can not read their remote branches:
#{failed_fetch_taps.join("\n ")}
- This may be happening because the remote branch was renamed.
+ This is happening because the remote branch was renamed or deleted.
Reset taps to point to the correct remote branches by running `brew tap --repair`
EOS
end | true |
Other | Homebrew | brew | 84fc16c1c1846bcc768a724311c30c7bf98e2cbd.json | Apply suggestions from code review
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/update.sh | @@ -483,9 +483,9 @@ EOS
trap '{ /usr/bin/pkill -P $$; wait; exit 130; }' SIGINT
local update_failed_file="$HOMEBREW_REPOSITORY/.git/UPDATE_FAILED"
- local failed_fetch_dirs_file="$HOMEBREW_REPOSITORY/.git/FAILED_FETCH_DIRS"
+ local missing_remote_ref_dirs_file="$HOMEBREW_REPOSITORY/.git/FAILED_FETCH_DIRS"
rm -f "$update_failed_file"
- rm -f "$failed_fetch_dirs_file"
+ rm -f "$missing_remote_ref_dirs_file"
for DIR in "$HOMEBREW_REPOSITORY" "$HOMEBREW_LIBRARY"/Taps/*/*
do
@@ -593,7 +593,7 @@ EOS
if [[ -f "$tmp_failure_file" ]] &&
[[ "$(<"$tmp_failure_file")" = "fatal: couldn't find remote ref refs/heads/$UPSTREAM_BRANCH_DIR" ]]
then
- echo "$DIR" >>"$failed_fetch_dirs_file"
+ echo "$DIR" >>"$missing_remote_ref_dirs_file"
fi
fi
fi
@@ -613,11 +613,11 @@ EOS
export HOMEBREW_UPDATE_FAILED="1"
fi
- if [[ -f "$failed_fetch_dirs_file" ]]
+ if [[ -f "$missing_remote_ref_dirs_file" ]]
then
- HOMEBREW_FAILED_FETCH_DIRS="$(<"$failed_fetch_dirs_file")"
- rm -f "$failed_fetch_dirs_file"
- export HOMEBREW_FAILED_FETCH_DIRS
+ HOMEBREW_MISSING_REMOTE_REF_DIRS="$(<"$missing_remote_ref_dirs_file")"
+ rm -f "$missing_remote_ref_dirs_file"
+ export HOMEBREW_MISSING_REMOTE_REF_DIRS
fi
for DIR in "$HOMEBREW_REPOSITORY" "$HOMEBREW_LIBRARY"/Taps/*/* | true |
Other | Homebrew | brew | 84fc16c1c1846bcc768a724311c30c7bf98e2cbd.json | Apply suggestions from code review
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/tap.rb | @@ -375,7 +375,7 @@ def fix_remote_configuration
path.git_rename_branch old: current_upstream_head, new: new_upstream_head
path.git_branch_set_upstream local: new_upstream_head, origin: new_upstream_head
- ohai "#{name}: changed default branch name from #{current_upstream_head} to #{new_upstream_head}"
+ ohai "#{name}: changed default branch name from #{current_upstream_head} to #{new_upstream_head}!"
end
# Uninstall this {Tap}. | true |
Other | Homebrew | brew | f508f8dc0c246669e2d746bf0ab12e8b2ca36d46.json | update: show message prompting `brew tap --repair`
This message is shown when a fetch fails due to a branch rename | Library/Homebrew/cmd/update-report.rb | @@ -144,6 +144,19 @@ def update_report
link_completions_manpages_and_docs
Tap.each(&:link_completions_and_manpages)
+ failed_fetch_dirs = ENV["HOMEBREW_FAILED_FETCH_DIRS"]&.split("\n")
+ if failed_fetch_dirs.present?
+ failed_fetch_taps = failed_fetch_dirs.map { |dir| Tap.from_path(dir) }
+
+ puts Formatter.headline "Some taps failed to update!", color: :red
+ puts <<~EOS
+ The following taps can not read their remote branches:
+ #{failed_fetch_taps.join("\n ")}
+ This may be happening because the remote branch was renamed.
+ Reset taps to point to the correct remote branches by running `brew tap --repair`
+ EOS
+ end
+
return if new_repository_version.blank?
ohai "Homebrew was updated to version #{new_repository_version}" | true |
Other | Homebrew | brew | f508f8dc0c246669e2d746bf0ab12e8b2ca36d46.json | update: show message prompting `brew tap --repair`
This message is shown when a fetch fails due to a branch rename | Library/Homebrew/cmd/update-reset.sh | @@ -1,6 +1,6 @@
#: * `update-reset` [<repository> ...]
#:
-#: Fetch and reset Homebrew and all tap repositories (or any specified <repository>) using `git`(1) to their latest `origin/master`.
+#: Fetch and reset Homebrew and all tap repositories (or any specified <repository>) using `git`(1) to their latest `origin/HEAD`.
#:
#: *Note:* this will destroy all your uncommitted or committed changes.
| true |
Other | Homebrew | brew | f508f8dc0c246669e2d746bf0ab12e8b2ca36d46.json | update: show message prompting `brew tap --repair`
This message is shown when a fetch fails due to a branch rename | Library/Homebrew/cmd/update.sh | @@ -483,7 +483,9 @@ EOS
trap '{ /usr/bin/pkill -P $$; wait; exit 130; }' SIGINT
local update_failed_file="$HOMEBREW_REPOSITORY/.git/UPDATE_FAILED"
+ local failed_fetch_dirs_file="$HOMEBREW_REPOSITORY/.git/FAILED_FETCH_DIRS"
rm -f "$update_failed_file"
+ rm -f "$failed_fetch_dirs_file"
for DIR in "$HOMEBREW_REPOSITORY" "$HOMEBREW_LIBRARY"/Taps/*/*
do
@@ -566,23 +568,38 @@ EOS
echo "Fetching $DIR..."
fi
+ local tmp_failure_file="$HOMEBREW_REPOSITORY/.git/TMP_FETCH_FAILURES"
+ rm -f "$tmp_failure_file"
+
if [[ -n "$HOMEBREW_UPDATE_PREINSTALL" ]]
then
git fetch --tags --force "${QUIET_ARGS[@]}" origin \
"refs/heads/$UPSTREAM_BRANCH_DIR:refs/remotes/origin/$UPSTREAM_BRANCH_DIR" 2>/dev/null
else
+ # Capture stderr to tmp_failure_file
if ! git fetch --tags --force "${QUIET_ARGS[@]}" origin \
- "refs/heads/$UPSTREAM_BRANCH_DIR:refs/remotes/origin/$UPSTREAM_BRANCH_DIR"
+ "refs/heads/$UPSTREAM_BRANCH_DIR:refs/remotes/origin/$UPSTREAM_BRANCH_DIR" 2>>"$tmp_failure_file"
then
+ # Reprint fetch errors to stderr
+ [[ -f "$tmp_failure_file" ]] && cat "$tmp_failure_file" 1>&2
+
if [[ "$UPSTREAM_SHA_HTTP_CODE" = "404" ]]
then
TAP="${DIR#$HOMEBREW_LIBRARY/Taps/}"
echo "$TAP does not exist! Run \`brew untap $TAP\` to remove it." >>"$update_failed_file"
else
echo "Fetching $DIR failed!" >>"$update_failed_file"
+
+ if [[ -f "$tmp_failure_file" ]] &&
+ [[ "$(<"$tmp_failure_file")" = "fatal: couldn't find remote ref refs/heads/$UPSTREAM_BRANCH_DIR" ]]
+ then
+ echo "$DIR" >>"$failed_fetch_dirs_file"
+ fi
fi
fi
fi
+
+ rm -f "$tmp_failure_file"
) &
done
@@ -596,6 +613,13 @@ EOS
export HOMEBREW_UPDATE_FAILED="1"
fi
+ if [[ -f "$failed_fetch_dirs_file" ]]
+ then
+ HOMEBREW_FAILED_FETCH_DIRS="$(<"$failed_fetch_dirs_file")"
+ rm -f "$failed_fetch_dirs_file"
+ export HOMEBREW_FAILED_FETCH_DIRS
+ fi
+
for DIR in "$HOMEBREW_REPOSITORY" "$HOMEBREW_LIBRARY"/Taps/*/*
do
[[ -d "$DIR/.git" ]] || continue
@@ -629,6 +653,7 @@ EOS
if [[ -n "$HOMEBREW_UPDATED" ||
-n "$HOMEBREW_UPDATE_FAILED" ||
+ -n "$HOMEBREW_FAILED_FETCH_DIRS" ||
-n "$HOMEBREW_UPDATE_FORCE" ||
-d "$HOMEBREW_LIBRARY/LinkedKegs" ||
! -f "$HOMEBREW_CACHE/all_commands_list.txt" || | true |
Other | Homebrew | brew | f508f8dc0c246669e2d746bf0ab12e8b2ca36d46.json | update: show message prompting `brew tap --repair`
This message is shown when a fetch fails due to a branch rename | completions/zsh/_brew | @@ -217,7 +217,7 @@ __brew_internal_commands() {
'update-license-data:Update SPDX license data in the Homebrew repository'
'update-python-resources:Update versions for PyPI resource blocks in formula'
'update-report:The Ruby implementation of `brew update`'
- 'update-reset:Fetch and reset Homebrew and all tap repositories (or any specified repository) using `git`(1) to their latest `origin/master`'
+ 'update-reset:Fetch and reset Homebrew and all tap repositories (or any specified repository) using `git`(1) to their latest `origin/HEAD`'
'update-test:Run a test of `brew update` with a new repository clone'
'upgrade:Upgrade outdated casks and outdated, unpinned formulae using the same options they were originally installed with, plus any appended brew formula options'
'uses:Show formulae and casks that specify formula as a dependency; that is, show dependents of formula' | true |
Other | Homebrew | brew | f508f8dc0c246669e2d746bf0ab12e8b2ca36d46.json | update: show message prompting `brew tap --repair`
This message is shown when a fetch fails due to a branch rename | docs/Manpage.md | @@ -607,7 +607,7 @@ Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1)
### `update-reset` [*`repository`* ...]
-Fetch and reset Homebrew and all tap repositories (or any specified *`repository`*) using `git`(1) to their latest `origin/master`.
+Fetch and reset Homebrew and all tap repositories (or any specified *`repository`*) using `git`(1) to their latest `origin/HEAD`.
*Note:* this will destroy all your uncommitted or committed changes.
| true |
Other | Homebrew | brew | f508f8dc0c246669e2d746bf0ab12e8b2ca36d46.json | update: show message prompting `brew tap --repair`
This message is shown when a fetch fails due to a branch rename | manpages/brew.1 | @@ -812,7 +812,7 @@ Run on auto\-updates (e\.g\. before \fBbrew install\fR)\. Skips some slower step
Always do a slower, full update check (even if unnecessary)\.
.
.SS "\fBupdate\-reset\fR [\fIrepository\fR \.\.\.]"
-Fetch and reset Homebrew and all tap repositories (or any specified \fIrepository\fR) using \fBgit\fR(1) to their latest \fBorigin/master\fR\.
+Fetch and reset Homebrew and all tap repositories (or any specified \fIrepository\fR) using \fBgit\fR(1) to their latest \fBorigin/HEAD\fR\.
.
.P
\fINote:\fR this will destroy all your uncommitted or committed changes\. | true |
Other | Homebrew | brew | 4bdc11ddc97ccf2c7b822e7485bab65f940a69e9.json | tap: fix renamed branches with `brew tap --repair` | Library/Homebrew/cmd/tap.rb | @@ -50,6 +50,7 @@ def tap
if args.repair?
Tap.each(&:link_completions_and_manpages)
+ Tap.each(&:fix_remote_configuration)
elsif args.list_pinned?
puts Tap.select(&:pinned?).map(&:name)
elsif args.no_named? | true |
Other | Homebrew | brew | 4bdc11ddc97ccf2c7b822e7485bab65f940a69e9.json | tap: fix renamed branches with `brew tap --repair` | Library/Homebrew/extend/git_repository.rb | @@ -54,6 +54,18 @@ def git_branch(safe: false)
popen_git("rev-parse", "--abbrev-ref", "HEAD", safe: safe)
end
+ # Change the name of a local branch
+ sig { params(old: String, new: String).void }
+ def git_rename_branch(old:, new:)
+ popen_git("branch", "-m", old, new)
+ end
+
+ # Set an upstream branch for a local branch to track
+ sig { params(local: String, origin: String).void }
+ def git_branch_set_upstream(local:, origin:)
+ popen_git("branch", "-u", "origin/#{origin}", local)
+ end
+
# Gets the name of the default origin HEAD branch.
sig { returns(T.nilable(String)) }
def git_origin_branch
@@ -72,6 +84,17 @@ def git_last_commit_date
popen_git("show", "-s", "--format=%cd", "--date=short", "HEAD")
end
+ # Returns true if the given branch exists on origin
+ sig { params(branch: String).returns(T::Boolean) }
+ def git_origin_has_branch?(branch)
+ popen_git("ls-remote", "--heads", "origin", branch).present?
+ end
+
+ sig { void }
+ def git_origin_set_head_auto
+ popen_git("remote", "set-head", "origin", "--auto")
+ end
+
# Gets the full commit message of the specified commit, or of the HEAD commit if unspecified.
sig { params(commit: String, safe: T::Boolean).returns(T.nilable(String)) }
def git_commit_message(commit = "HEAD", safe: false) | true |
Other | Homebrew | brew | 4bdc11ddc97ccf2c7b822e7485bab65f940a69e9.json | tap: fix renamed branches with `brew tap --repair` | Library/Homebrew/tap.rb | @@ -362,6 +362,22 @@ def link_completions_and_manpages
end
end
+ def fix_remote_configuration
+ return unless remote.include? "github.com"
+
+ current_upstream_head = path.git_origin_branch
+ return if path.git_origin_has_branch? current_upstream_head
+
+ safe_system "git", "-C", path, "fetch", "origin"
+ path.git_origin_set_head_auto
+
+ new_upstream_head = path.git_origin_branch
+ path.git_rename_branch old: current_upstream_head, new: new_upstream_head
+ path.git_branch_set_upstream local: new_upstream_head, origin: new_upstream_head
+
+ ohai "#{name}: changed default branch name from #{current_upstream_head} to #{new_upstream_head}"
+ end
+
# Uninstall this {Tap}.
def uninstall(manual: false)
require "descriptions" | true |
Other | Homebrew | brew | 902993afe40aff3a29f94546223a3bbc4de19264.json | dev-cmd/bottle_spec: add another integration test on macOS. | Library/Homebrew/test/dev-cmd/bottle_spec.rb | @@ -263,7 +263,7 @@ def stub_hash(parameters)
end
end
-describe "brew bottle --merge", :integration_test, :needs_linux do
+describe "brew bottle --merge", :integration_test do
let(:core_tap) { CoreTap.new }
let(:tarball) do
if OS.linux? | false |
Other | Homebrew | brew | fc1c142ebd0e7d0c1ab308c11c52ab33ce204054.json | software_spec: reverse tag/digest for new bottles.
This new format was agreed in #10377 | Library/Homebrew/software_spec.rb | @@ -403,17 +403,28 @@ def tag?(tag)
# a Hash, which indicates the platform the checksum applies on.
# Example bottle block syntax:
# bottle do
- # sha256 "69489ae397e4645..." => :big_sur, :cellar => :any_skip_relocation
- # sha256 "449de5ea35d0e94..." => :catalina, :cellar => :any
+ # sha256 cellar: :any_skip_relocation, big_sur: "69489ae397e4645..."
+ # sha256 cellar: :any, catalina: "449de5ea35d0e94..."
# end
- # Example args:
- # {"69489ae397e4645..."=> :big_sur, :cellar=>:any_skip_relocation}
def sha256(hash)
sha256_regex = /^[a-f0-9]{64}$/i
- digest, tag = hash.find do |key, value|
- key.is_a?(String) && value.is_a?(Symbol) && key.match?(sha256_regex)
+
+ # find new `sha256 big_sur: "69489ae397e4645..."` format
+ tag, digest = hash.find do |key, value|
+ key.is_a?(Symbol) && value.is_a?(String) && value.match?(sha256_regex)
+ end
+
+ if digest && tag
+ # the cellar hash key only exists on the new format
+ cellar = hash[:cellar]
+ else
+ # otherwise, find old `sha256 "69489ae397e4645..." => :big_sur` format
+ digest, tag = hash.find do |key, value|
+ key.is_a?(String) && value.is_a?(Symbol) && key.match?(sha256_regex)
+ end
end
- cellar = hash[:cellar] || all_tags_cellar
+
+ cellar ||= all_tags_cellar
collector[tag] = { checksum: Checksum.new(digest), cellar: cellar }
end
| true |
Other | Homebrew | brew | fc1c142ebd0e7d0c1ab308c11c52ab33ce204054.json | software_spec: reverse tag/digest for new bottles.
This new format was agreed in #10377 | Library/Homebrew/test/software_spec_spec.rb | @@ -201,14 +201,14 @@
it "works with cellar" do
checksums = [
- { digest: "deadbeef" * 8, tag: :snow_leopard_32, cellar: :any_skip_relocation },
- { digest: "faceb00c" * 8, tag: :snow_leopard, cellar: :any },
- { digest: "baadf00d" * 8, tag: :lion, cellar: "/usr/local/Cellar" },
- { digest: "8badf00d" * 8, tag: :mountain_lion, cellar: Homebrew::DEFAULT_CELLAR },
+ { cellar: :any_skip_relocation, tag: :snow_leopard_32, digest: "deadbeef" * 8 },
+ { cellar: :any, tag: :snow_leopard, digest: "faceb00c" * 8 },
+ { cellar: "/usr/local/Cellar", tag: :lion, digest: "baadf00d" * 8 },
+ { cellar: Homebrew::DEFAULT_CELLAR, tag: :mountain_lion, digest: "8badf00d" * 8 },
]
checksums.each do |checksum|
- subject.sha256(checksum[:digest] => checksum[:tag], cellar: checksum[:cellar])
+ subject.sha256(checksum[:tag] => checksum[:digest], cellar: checksum[:cellar])
digest, tag, cellar = subject.checksum_for(checksum[:tag])
expect(Checksum.new(checksum[:digest])).to eq(digest)
expect(checksum[:tag]).to eq(tag) | true |
Other | Homebrew | brew | fc1c142ebd0e7d0c1ab308c11c52ab33ce204054.json | software_spec: reverse tag/digest for new bottles.
This new format was agreed in #10377 | Library/Homebrew/test/support/fixtures/testball_bottle_cellar.rb | @@ -10,7 +10,7 @@ def initialize(name = "testball_bottle", path = Pathname.new(__FILE__).expand_pa
hexdigest = "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149"
stable.bottle do
root_url "file://#{TEST_FIXTURE_DIR}/bottles"
- sha256 hexdigest => Utils::Bottles.tag, :cellar => :any_skip_relocation
+ sha256 cellar: :any_skip_relocation, Utils::Bottles.tag => hexdigest
end
cxxstdlib_check :skip
end | true |
Other | Homebrew | brew | 623e2d95af6c04dca5b3de94443095fb1d25ce3b.json | Revert "cleanup_spec: inline path creation."
This reverts commit 3724c739f880945ec76a16ef8b9209c6440f0035. | Library/Homebrew/test/cleanup_spec.rb | @@ -199,24 +199,25 @@
describe "::cleanup_logs" do
let(:path) { (HOMEBREW_LOGS/"delete_me") }
- it "cleans all logs if prune is 0" do
+ before do
path.mkpath
+ end
+
+ it "cleans all logs if prune is 0" do
described_class.new(days: 0).cleanup_logs
expect(path).not_to exist
end
it "cleans up logs if older than 30 days" do
allow_any_instance_of(Pathname).to receive(:ctime).and_return(31.days.ago)
allow_any_instance_of(Pathname).to receive(:mtime).and_return(31.days.ago)
- path.mkpath
subject.cleanup_logs
expect(path).not_to exist
end
it "does not clean up logs less than 30 days old" do
allow_any_instance_of(Pathname).to receive(:ctime).and_return(15.days.ago)
allow_any_instance_of(Pathname).to receive(:mtime).and_return(15.days.ago)
- path.mkpath
subject.cleanup_logs
expect(path).to exist
end | false |
Other | Homebrew | brew | 04565165007d954cf0080bcf42f4c87ce3df0179.json | Update fish completions to satisfy brew man | completions/fish/brew.fish | @@ -1039,7 +1039,7 @@ __fish_brew_complete_arg 'outdated' -l fetch-HEAD -d 'Fetch the upstream reposit
__fish_brew_complete_arg 'outdated' -l formula -d 'List only outdated formulae'
__fish_brew_complete_arg 'outdated' -l greedy -d 'Print outdated casks with `auto_updates` or `version :latest`'
__fish_brew_complete_arg 'outdated' -l help -d 'Show this message'
-__fish_brew_complete_arg 'outdated' -l json -d 'Print output in JSON format. There are two versions: v1 and v2. v1 is deprecated and is currently the default if no version is specified. v2 prints outdated formulae and casks. '
+__fish_brew_complete_arg 'outdated' -l json -d 'Print output in JSON format. There are two versions: `v1` and `v2`. `v1` is deprecated and is currently the default if no version is specified. `v2` prints outdated formulae and casks. '
__fish_brew_complete_arg 'outdated' -l quiet -d 'List only the names of outdated kegs (takes precedence over `--verbose`)'
__fish_brew_complete_arg 'outdated' -l verbose -d 'Include detailed version information'
__fish_brew_complete_arg 'outdated' -a '(__fish_brew_suggest_formulae_all)'
@@ -1382,13 +1382,13 @@ __fish_brew_complete_arg 'typecheck' -l update -d 'Update RBI files'
__fish_brew_complete_arg 'typecheck' -l verbose -d 'Make some output more verbose'
-__fish_brew_complete_cmd 'unbottled' 'Outputs the unbottled dependents of formulae'
+__fish_brew_complete_cmd 'unbottled' 'Show the unbottled dependents of formulae'
__fish_brew_complete_arg 'unbottled' -l debug -d 'Display any debugging information'
-__fish_brew_complete_arg 'unbottled' -l dependents -d 'Don\'t get analytics data and sort by number of dependents instead'
+__fish_brew_complete_arg 'unbottled' -l dependents -d 'Skip getting analytics data and sort by number of dependents instead'
__fish_brew_complete_arg 'unbottled' -l help -d 'Show this message'
__fish_brew_complete_arg 'unbottled' -l quiet -d 'Make some output more quiet'
-__fish_brew_complete_arg 'unbottled' -l tag -d 'Use the specified bottle tag (e.g. big_sur) instead of the current OS'
-__fish_brew_complete_arg 'unbottled' -l total -d 'Output the number of unbottled and total formulae'
+__fish_brew_complete_arg 'unbottled' -l tag -d 'Use the specified bottle tag (e.g. `big_sur`) instead of the current OS'
+__fish_brew_complete_arg 'unbottled' -l total -d 'Print the number of unbottled and total formulae'
__fish_brew_complete_arg 'unbottled' -l verbose -d 'Make some output more verbose'
__fish_brew_complete_arg 'unbottled' -a '(__fish_brew_suggest_formulae_all)'
| false |
Other | Homebrew | brew | 3724c739f880945ec76a16ef8b9209c6440f0035.json | cleanup_spec: inline path creation.
Let's see if this makes the test more reliable. | Library/Homebrew/test/cleanup_spec.rb | @@ -199,25 +199,24 @@
describe "::cleanup_logs" do
let(:path) { (HOMEBREW_LOGS/"delete_me") }
- before do
- path.mkpath
- end
-
it "cleans all logs if prune is 0" do
+ path.mkpath
described_class.new(days: 0).cleanup_logs
expect(path).not_to exist
end
it "cleans up logs if older than 30 days" do
allow_any_instance_of(Pathname).to receive(:ctime).and_return(31.days.ago)
allow_any_instance_of(Pathname).to receive(:mtime).and_return(31.days.ago)
+ path.mkpath
subject.cleanup_logs
expect(path).not_to exist
end
it "does not clean up logs less than 30 days old" do
allow_any_instance_of(Pathname).to receive(:ctime).and_return(15.days.ago)
allow_any_instance_of(Pathname).to receive(:mtime).and_return(15.days.ago)
+ path.mkpath
subject.cleanup_logs
expect(path).to exist
end | false |
Other | Homebrew | brew | f5cc26ffc66ef6b987cc853d7e1d4840218b001a.json | zsh: add guards to speed up completions
If we type `brew install -<TAB>` we shouldn't try to shell out to Ruby
to get a list of formulae for completions. | Library/Homebrew/completions/zsh.erb | @@ -49,6 +49,8 @@ __brew_completion_caching_policy() {
}
__brew_formulae() {
+ [[ -prefix '-' ]] && return 0
+
local -a list
local comp_cachename=brew_formulae
if ! _retrieve_cache $comp_cachename; then
@@ -59,18 +61,24 @@ __brew_formulae() {
}
__brew_installed_formulae() {
+ [[ -prefix '-' ]] && return 0
+
local -a formulae
formulae=($(brew list --formula))
_describe -t formulae 'installed formulae' formulae
}
__brew_outdated_formulae() {
+ [[ -prefix '-' ]] && return 0
+
local -a formulae
formulae=($(brew outdated --formula))
_describe -t formulae 'outdated formulae' formulae
}
__brew_casks() {
+ [[ -prefix '-' ]] && return 0
+
local -a list
local expl
local comp_cachename=brew_casks
@@ -84,25 +92,33 @@ __brew_casks() {
}
__brew_installed_casks() {
+ [[ -prefix '-' ]] && return 0
+
local -a list
local expl
list=( $(brew list --cask) )
_wanted list expl 'installed casks' compadd -a list
}
__brew_outdated_casks() {
+ [[ -prefix '-' ]] && return 0
+
local -a casks
casks=($(brew outdated --cask))
_describe -t casks 'outdated casks' casks
}
__brew_installed_taps() {
+ [[ -prefix '-' ]] && return 0
+
local -a taps
taps=($(brew tap))
_describe -t installed-taps 'installed taps' taps
}
__brew_any_tap() {
+ [[ -prefix '-' ]] && return 0
+
_alternative \
'installed-taps:installed taps:__brew_installed_taps'
} | true |
Other | Homebrew | brew | f5cc26ffc66ef6b987cc853d7e1d4840218b001a.json | zsh: add guards to speed up completions
If we type `brew install -<TAB>` we shouldn't try to shell out to Ruby
to get a list of formulae for completions. | completions/zsh/_brew | @@ -52,6 +52,8 @@ __brew_completion_caching_policy() {
}
__brew_formulae() {
+ [[ -prefix '-' ]] && return 0
+
local -a list
local comp_cachename=brew_formulae
if ! _retrieve_cache $comp_cachename; then
@@ -62,18 +64,24 @@ __brew_formulae() {
}
__brew_installed_formulae() {
+ [[ -prefix '-' ]] && return 0
+
local -a formulae
formulae=($(brew list --formula))
_describe -t formulae 'installed formulae' formulae
}
__brew_outdated_formulae() {
+ [[ -prefix '-' ]] && return 0
+
local -a formulae
formulae=($(brew outdated --formula))
_describe -t formulae 'outdated formulae' formulae
}
__brew_casks() {
+ [[ -prefix '-' ]] && return 0
+
local -a list
local expl
local comp_cachename=brew_casks
@@ -87,25 +95,33 @@ __brew_casks() {
}
__brew_installed_casks() {
+ [[ -prefix '-' ]] && return 0
+
local -a list
local expl
list=( $(brew list --cask) )
_wanted list expl 'installed casks' compadd -a list
}
__brew_outdated_casks() {
+ [[ -prefix '-' ]] && return 0
+
local -a casks
casks=($(brew outdated --cask))
_describe -t casks 'outdated casks' casks
}
__brew_installed_taps() {
+ [[ -prefix '-' ]] && return 0
+
local -a taps
taps=($(brew tap))
_describe -t installed-taps 'installed taps' taps
}
__brew_any_tap() {
+ [[ -prefix '-' ]] && return 0
+
_alternative \
'installed-taps:installed taps:__brew_installed_taps'
} | true |
Other | Homebrew | brew | d0ad829e43ab529b3bfd32a974f824633e6bc67c.json | use arrow character for UI prompts | Library/Homebrew/cask/artifact/abstract_uninstall.rb | @@ -133,8 +133,11 @@ def running_processes(bundle_id)
sig { returns(String) }
def automation_access_instructions
- "Enable Automation Access for “Terminal > System Events” in " \
- "“System Preferences > Security > Privacy > Automation” if you haven't already."
+ <<~EOS
+ Enable Automation access for "Terminal → System Events" in:
+ System Preferences → Security & Privacy → Privacy → Automation
+ if you haven't already.
+ EOS
end
# :quit/:signal must come before :kext so the kext will not be in use by a running process | true |
Other | Homebrew | brew | d0ad829e43ab529b3bfd32a974f824633e6bc67c.json | use arrow character for UI prompts | Library/Homebrew/cask/cmd/fetch.rb | @@ -43,7 +43,7 @@ def run
download = Download.new(cask, **options)
download.clear_cache if args.force?
downloaded_path = download.fetch
- ohai "Success! Downloaded to -> #{downloaded_path}"
+ ohai "Success! Downloaded to: #{downloaded_path}"
end
end
end | true |
Other | Homebrew | brew | d0ad829e43ab529b3bfd32a974f824633e6bc67c.json | use arrow character for UI prompts | Library/Homebrew/cask/dsl/caveats.rb | @@ -69,15 +69,15 @@ def eval_caveats(&block)
end
caveat :unsigned_accessibility do |access = "Accessibility"|
- # access: the category in System Preferences -> Security & Privacy -> Privacy the app requires.
+ # access: the category in System Preferences > Security & Privacy > Privacy the app requires.
<<~EOS
#{@cask} is not signed and requires Accessibility access,
so you will need to re-grant Accessibility access every time the app is updated.
Enable or re-enable it in:
- System Preferences → Security & Privacy → Privacy -> #{access}
- To re-enable untick and retick #{@cask}.app.
+ System Preferences → Security & Privacy → Privacy → #{access}
+ To re-enable, untick and retick #{@cask}.app.
EOS
end
| true |
Other | Homebrew | brew | 2e982cd2a28ffbbde40305e98e8d142c2874c8cf.json | use odie when commands encounter errors | Library/Homebrew/cmd/gist-logs.rb | @@ -103,7 +103,7 @@ def load_logs(dir)
logs[file.basename.to_s] = { content: contents }
end
end
- raise "No logs." if logs.empty?
+ odie "No logs." if logs.empty?
logs
end | true |
Other | Homebrew | brew | 2e982cd2a28ffbbde40305e98e8d142c2874c8cf.json | use odie when commands encounter errors | Library/Homebrew/cmd/install.rb | @@ -183,14 +183,14 @@ def install
formulae.each do |f|
# head-only without --HEAD is an error
if !args.HEAD? && f.stable.nil?
- raise <<~EOS
+ odie <<~EOS
#{f.full_name} is a head-only formula
Install with `brew install --HEAD #{f.full_name}`
EOS
end
# --HEAD, fail with no head defined
- raise "No head is defined for #{f.full_name}" if args.HEAD? && f.head.nil?
+ odie "No head is defined for #{f.full_name}" if args.HEAD? && f.head.nil?
installed_head_version = f.latest_head_version
if installed_head_version && | true |
Other | Homebrew | brew | 2e982cd2a28ffbbde40305e98e8d142c2874c8cf.json | use odie when commands encounter errors | Library/Homebrew/cmd/migrate.rb | @@ -31,7 +31,8 @@ def migrate
if f.oldname
rack = HOMEBREW_CELLAR/f.oldname
raise NoSuchKegError, f.oldname if !rack.exist? || rack.subdirs.empty?
- raise "#{rack} is a symlink" if rack.symlink?
+
+ odie "#{rack} is a symlink" if rack.symlink?
end
migrator = Migrator.new(f, force: args.force?) | true |
Other | Homebrew | brew | 2e982cd2a28ffbbde40305e98e8d142c2874c8cf.json | use odie when commands encounter errors | Library/Homebrew/cmd/search.rb | @@ -136,7 +136,7 @@ def search
puts reason
end
- raise "No formulae or casks found for #{query.inspect}." if count.zero?
+ odie "No formulae or casks found for #{query.inspect}." if count.zero?
end
return unless $stdout.tty? | true |
Other | Homebrew | brew | 2e982cd2a28ffbbde40305e98e8d142c2874c8cf.json | use odie when commands encounter errors | Library/Homebrew/dev-cmd/create.rb | @@ -180,7 +180,7 @@ def create_formula(args:)
# unless --force is specified.
unless args.force?
if reason = MissingFormula.disallowed_reason(fc.name)
- raise <<~EOS
+ odie <<~EOS
The formula '#{fc.name}' is not allowed to be created.
#{reason}
If you really want to create this formula use `--force`.
@@ -189,7 +189,7 @@ def create_formula(args:)
if Formula.aliases.include? fc.name
realname = Formulary.canonical_name(fc.name)
- raise <<~EOS
+ odie <<~EOS
The formula '#{realname}' is already aliased to '#{fc.name}'.
Please check that you are not creating a duplicate.
To force creation use `--force`. | true |
Other | Homebrew | brew | 2e982cd2a28ffbbde40305e98e8d142c2874c8cf.json | use odie when commands encounter errors | Library/Homebrew/dev-cmd/edit.rb | @@ -32,7 +32,7 @@ def edit
args = edit_args.parse
unless (HOMEBREW_REPOSITORY/".git").directory?
- raise <<~EOS
+ odie <<~EOS
Changes will be lost!
The first time you `brew update`, all local changes will be lost; you should
thus `brew update` before you `brew edit`! | true |
Other | Homebrew | brew | 2e982cd2a28ffbbde40305e98e8d142c2874c8cf.json | use odie when commands encounter errors | Library/Homebrew/dev-cmd/pr-pull.rb | @@ -340,7 +340,7 @@ def changed_formulae(tap, original_commit)
end
def download_artifact(url, dir, pr)
- raise "Credentials must be set to access the Artifacts API" if GitHub.api_credentials_type == :none
+ odie "Credentials must be set to access the Artifacts API" if GitHub.api_credentials_type == :none
token = GitHub.api_credentials
curl_args = ["--header", "Authorization: token #{token}"] | true |
Other | Homebrew | brew | 2e982cd2a28ffbbde40305e98e8d142c2874c8cf.json | use odie when commands encounter errors | Library/Homebrew/dev-cmd/tap-new.rb | @@ -37,7 +37,7 @@ def tap_new
branch = args.branch || "main"
tap = args.named.to_taps.first
- raise "Invalid tap name '#{tap_name}'" unless tap.path.to_s.match?(HOMEBREW_TAP_PATH_REGEX)
+ odie "Invalid tap name '#{tap_name}'" unless tap.path.to_s.match?(HOMEBREW_TAP_PATH_REGEX)
titleized_user = tap.user.dup
titleized_repo = tap.repo.dup
@@ -169,7 +169,7 @@ def tap_new
def write_path(tap, filename, content)
path = tap.path/filename
tap.path.mkpath
- raise "#{path} already exists" if path.exist?
+ odie "#{path} already exists" if path.exist?
path.write content
end | true |
Other | Homebrew | brew | 2e982cd2a28ffbbde40305e98e8d142c2874c8cf.json | use odie when commands encounter errors | Library/Homebrew/dev-cmd/unpack.rb | @@ -45,13 +45,13 @@ def unpack
unpack_dir = Pathname.pwd
end
- raise "Cannot write to #{unpack_dir}" unless unpack_dir.writable_real?
+ odie "Cannot write to #{unpack_dir}" unless unpack_dir.writable_real?
formulae.each do |f|
stage_dir = unpack_dir/"#{f.name}-#{f.version}"
if stage_dir.exist?
- raise "Destination #{stage_dir} already exists!" unless args.force?
+ odie "Destination #{stage_dir} already exists!" unless args.force?
rm_rf stage_dir
end | true |
Other | Homebrew | brew | 2e982cd2a28ffbbde40305e98e8d142c2874c8cf.json | use odie when commands encounter errors | Library/Homebrew/dev-cmd/update-test.rb | @@ -134,7 +134,7 @@ def update_test
start_log = Utils.popen_read("git", "log", "-1", "--decorate", "--oneline", start_commit).chomp
end_log = Utils.popen_read("git", "log", "-1", "--decorate", "--oneline", end_commit).chomp
actual_log = Utils.popen_read("git", "log", "-1", "--decorate", "--oneline", actual_end_commit).chomp
- raise <<~EOS
+ odie <<~EOS
brew update didn't update #{branch}!
Start commit: #{start_log}
Expected end commit: #{end_log} | true |
Other | Homebrew | brew | a72ddfdc675b4675207506c4626fca1b019b54f7.json | remove duplicate "Error" in onoe/odie arguments | Library/Homebrew/brew.sh | @@ -92,7 +92,7 @@ odie() {
}
safe_cd() {
- cd "$@" >/dev/null || odie "Error: failed to cd to $*!"
+ cd "$@" >/dev/null || odie "Failed to cd to $*!"
}
brew() { | true |
Other | Homebrew | brew | a72ddfdc675b4675207506c4626fca1b019b54f7.json | remove duplicate "Error" in onoe/odie arguments | Library/Homebrew/migrator.rb | @@ -220,7 +220,7 @@ def migrate
rescue Interrupt
ignore_interrupts { backup_oldname }
rescue Exception => e # rubocop:disable Lint/RescueException
- onoe "Error occurred while migrating."
+ onoe "The migration did not complete successfully."
puts e
puts e.backtrace if debug?
puts "Backing up..."
@@ -314,14 +314,14 @@ def link_newname
begin
new_keg.link(overwrite: true, verbose: verbose?)
rescue Keg::ConflictError => e
- onoe "Error while executing `brew link` step on #{newname}"
+ onoe "The `brew link` step did not complete successfully."
puts e
puts
puts "Possible conflicting files are:"
new_keg.link(dry_run: true, overwrite: true, verbose: verbose?)
raise
rescue Keg::LinkError => e
- onoe "Error while linking"
+ onoe "The `brew link` step did not complete successfully."
puts e
puts
puts "You can try again using:" | true |
Other | Homebrew | brew | f5e1557154dab1720c8ddf1c48598ebe70205359.json | use ofail to set Homebrew.failed | Library/Homebrew/cmd/doctor.rb | @@ -57,8 +57,7 @@ def doctor
methods.each do |method|
$stderr.puts Formatter.headline("Checking #{method}", color: :magenta) if args.debug?
unless checks.respond_to?(method)
- Homebrew.failed = true
- puts "No check available by the name: #{method}"
+ ofail "No check available by the name: #{method}"
next
end
| true |
Other | Homebrew | brew | f5e1557154dab1720c8ddf1c48598ebe70205359.json | use ofail to set Homebrew.failed | Library/Homebrew/cmd/fetch.rb | @@ -150,8 +150,8 @@ def fetch_cask(cask_download, args:)
def fetch_patch(p, args:)
fetch_fetchable p, args: args
rescue ChecksumMismatchError => e
- Homebrew.failed = true
opoo "Patch reports different sha256: #{e.expected}"
+ Homebrew.failed = true
end
def retry_fetch?(f, args:) | true |
Other | Homebrew | brew | f5e1557154dab1720c8ddf1c48598ebe70205359.json | use ofail to set Homebrew.failed | Library/Homebrew/formula_installer.rb | @@ -951,10 +951,9 @@ def link(keg)
begin
keg.optlink(verbose: verbose?)
rescue Keg::LinkError => e
- onoe "Failed to create #{formula.opt_prefix}"
+ ofail "Failed to create #{formula.opt_prefix}"
puts "Things that depend on #{formula.full_name} will probably not build."
puts e
- Homebrew.failed = true
end
return
end
@@ -991,25 +990,23 @@ def link(keg)
link_overwrite_backup[conflict_file] = backup_file
retry
end
- onoe "The `brew link` step did not complete successfully"
+ ofail "The `brew link` step did not complete successfully"
puts "The formula built, but is not symlinked into #{HOMEBREW_PREFIX}"
puts e
puts
puts "Possible conflicting files are:"
keg.link(dry_run: true, overwrite: true, verbose: verbose?)
@show_summary_heading = true
- Homebrew.failed = true
rescue Keg::LinkError => e
- onoe "The `brew link` step did not complete successfully"
+ ofail "The `brew link` step did not complete successfully"
puts "The formula built, but is not symlinked into #{HOMEBREW_PREFIX}"
puts e
puts
puts "You can try again using:"
puts " brew link #{formula.name}"
@show_summary_heading = true
- Homebrew.failed = true
rescue Exception => e # rubocop:disable Lint/RescueException
- onoe "An unexpected error occurred during the `brew link` step"
+ ofail "An unexpected error occurred during the `brew link` step"
puts "The formula built, but is not symlinked into #{HOMEBREW_PREFIX}"
puts e
puts e.backtrace if debug?
@@ -1021,7 +1018,6 @@ def link(keg)
FileUtils.mv backup, origin
end
end
- Homebrew.failed = true
raise
end
@@ -1043,20 +1039,18 @@ def install_plist
log = formula.var/"log"
log.mkpath if formula.plist.include? log.to_s
rescue Exception => e # rubocop:disable Lint/RescueException
- onoe "Failed to install plist file"
+ ofail "Failed to install plist file"
odebug e, e.backtrace
- Homebrew.failed = true
end
sig { params(keg: Keg).void }
def fix_dynamic_linkage(keg)
keg.fix_dynamic_linkage
rescue Exception => e # rubocop:disable Lint/RescueException
- onoe "Failed to fix install linkage"
+ ofail "Failed to fix install linkage"
puts "The formula built, but you may encounter issues using it or linking other"
puts "formulae against it."
odebug e, e.backtrace
- Homebrew.failed = true
@show_summary_heading = true
end
| true |
Other | Homebrew | brew | f5e1557154dab1720c8ddf1c48598ebe70205359.json | use ofail to set Homebrew.failed | Library/Homebrew/upgrade.rb | @@ -36,8 +36,7 @@ def upgrade_formulae(formulae_to_install, args:)
upgrade_formula(f, args: args)
Cleanup.install_formula_clean!(f)
rescue UnsatisfiedRequirements => e
- Homebrew.failed = true
- onoe "#{f}: #{e}"
+ ofail "#{f}: #{e}"
end
end
end | true |
Other | Homebrew | brew | 571179ff0ecab9bc03b1b7109ed24ccab187dc03.json | pass second argument to ohai when applicable | Library/Homebrew/cask/artifact/abstract_uninstall.rb | @@ -367,8 +367,7 @@ def uninstall_trash(*paths, **options)
resolved_paths = each_resolved_path(:trash, paths).to_a
- ohai "Trashing files:"
- puts resolved_paths.map(&:first)
+ ohai "Trashing files:", resolved_paths.map(&:first)
trash_paths(*resolved_paths.flat_map(&:last), **options)
end
| true |
Other | Homebrew | brew | 571179ff0ecab9bc03b1b7109ed24ccab187dc03.json | pass second argument to ohai when applicable | Library/Homebrew/cask/artifact/pkg.rb | @@ -39,8 +39,8 @@ def install_phase(**options)
private
def run_installer(command: nil, verbose: false, **_options)
- ohai "Running installer for #{cask}; your password may be necessary."
- ohai "Package installers may write to any location; options such as --appdir are ignored."
+ ohai "Running installer for #{cask}; your password may be necessary.",
+ "Package installers may write to any location; options such as --appdir are ignored."
unless path.exist?
pkg = path.relative_path_from(cask.staged_path)
pkgs = Pathname.glob(cask.staged_path/"**"/"*.pkg").map { |path| path.relative_path_from(cask.staged_path) } | true |
Other | Homebrew | brew | 571179ff0ecab9bc03b1b7109ed24ccab187dc03.json | pass second argument to ohai when applicable | Library/Homebrew/cask/caskroom.rb | @@ -22,8 +22,8 @@ def self.ensure_caskroom_exists
sudo = !path.parent.writable?
if sudo && !ENV.key?("SUDO_ASKPASS") && $stdout.tty?
- ohai "Creating Caskroom at #{path}"
- ohai "We'll set permissions properly so we won't need sudo in the future."
+ ohai "Creating Caskroom directory: #{path}",
+ "We'll set permissions properly so we won't need sudo in the future."
end
SystemCommand.run("/bin/mkdir", args: ["-p", path], sudo: sudo) | true |
Other | Homebrew | brew | 571179ff0ecab9bc03b1b7109ed24ccab187dc03.json | pass second argument to ohai when applicable | Library/Homebrew/cmd/search.rb | @@ -119,15 +119,11 @@ def search
print_casks = args.cask?
print_formulae = print_casks = true if !print_formulae && !print_casks
- if print_formulae && all_formulae.any?
- ohai "Formulae"
- puts Formatter.columns(all_formulae)
- end
+ ohai "Formulae", Formatter.columns(all_formulae) if print_formulae && all_formulae.any?
if print_casks && all_casks.any?
puts if args.formula? && all_formulae.any?
- ohai "Casks"
- puts Formatter.columns(all_casks)
+ ohai "Casks", Formatter.columns(all_casks)
end
count = all_formulae.count + all_casks.count | true |
Other | Homebrew | brew | 571179ff0ecab9bc03b1b7109ed24ccab187dc03.json | pass second argument to ohai when applicable | Library/Homebrew/cmd/update-report.rb | @@ -470,10 +470,7 @@ def dump(updated_formula_report: true)
dump_formula_report :M, "Updated Formulae"
else
updated = select_formula(:M).count
- if updated.positive?
- ohai "Updated Formulae"
- puts "Updated #{updated} #{"formula".pluralize(updated)}."
- end
+ ohai "Updated Formulae", "Updated #{updated} #{"formula".pluralize(updated)}." if updated.positive?
end
dump_formula_report :R, "Renamed Formulae"
dump_formula_report :D, "Deleted Formulae"
@@ -482,10 +479,7 @@ def dump(updated_formula_report: true)
dump_formula_report :MC, "Updated Casks"
else
updated = select_formula(:MC).count
- if updated.positive?
- ohai "Updated Casks"
- puts "Updated #{updated} #{"cask".pluralize(updated)}."
- end
+ ohai "Updated Casks", "Updated #{updated} #{"cask".pluralize(updated)}." if updated.positive?
end
dump_formula_report :DC, "Deleted Casks"
end
@@ -525,8 +519,7 @@ def dump_formula_report(key, title)
return if formulae.empty?
# Dump formula list.
- ohai title
- puts Formatter.columns(formulae.sort)
+ ohai title, Formatter.columns(formulae.sort)
end
def installed?(formula) | true |
Other | Homebrew | brew | 571179ff0ecab9bc03b1b7109ed24ccab187dc03.json | pass second argument to ohai when applicable | Library/Homebrew/dev-cmd/extract.rb | @@ -214,8 +214,7 @@ def extract
odebug "Overwriting existing formula at #{path}"
path.delete
end
- ohai "Writing formula for #{name} from revision #{rev} to:"
- puts path
+ ohai "Writing formula for #{name} from revision #{rev} to:", path
path.write result
end
| true |
Other | Homebrew | brew | 571179ff0ecab9bc03b1b7109ed24ccab187dc03.json | pass second argument to ohai when applicable | Library/Homebrew/dev-cmd/irb.rb | @@ -59,8 +59,7 @@ def irb
require "keg"
require "cask"
- ohai "Interactive Homebrew Shell"
- puts "Example commands available with: brew irb --examples"
+ ohai "Interactive Homebrew Shell", "Example commands available with: brew irb --examples"
if args.pry?
Pry.start
else | true |
Other | Homebrew | brew | 571179ff0ecab9bc03b1b7109ed24ccab187dc03.json | pass second argument to ohai when applicable | Library/Homebrew/extend/ENV/shared.rb | @@ -276,8 +276,7 @@ def fortran
flags = []
if fc
- ohai "Building with an alternative Fortran compiler"
- puts "This is unsupported."
+ ohai "Building with an alternative Fortran compiler", "This is unsupported."
self["F77"] ||= fc
else
if (gfortran = which("gfortran", (HOMEBREW_PREFIX/"bin").to_s)) | true |
Other | Homebrew | brew | 571179ff0ecab9bc03b1b7109ed24ccab187dc03.json | pass second argument to ohai when applicable | Library/Homebrew/mktemp.rb | @@ -65,9 +65,6 @@ def run
ignore_interrupts { rm_rf(tmpdir) } unless retain?
end
ensure
- if retain? && !@tmpdir.nil? && !@quiet
- ohai "Kept temporary files"
- puts "Temporary files retained at #{@tmpdir}"
- end
+ ohai "Temporary files retained at:", @tmpdir.to_s if retain? && !@tmpdir.nil? && !@quiet
end
end | true |
Other | Homebrew | brew | 571179ff0ecab9bc03b1b7109ed24ccab187dc03.json | pass second argument to ohai when applicable | Library/Homebrew/sandbox.rb | @@ -127,8 +127,7 @@ def exec(*args)
end
if @failed && Homebrew::EnvConfig.verbose?
- ohai "Sandbox log"
- puts logs
+ ohai "Sandbox log", logs
$stdout.flush # without it, brew test-bot would fail to catch the log
end
end | true |
Other | Homebrew | brew | 571179ff0ecab9bc03b1b7109ed24ccab187dc03.json | pass second argument to ohai when applicable | Library/Homebrew/unpack_strategy/dmg.rb | @@ -194,8 +194,7 @@ def mount(verbose: false)
)
if verbose && !(eula_text = without_eula.stdout).empty?
- ohai "Software License Agreement for '#{path}':"
- puts eula_text
+ ohai "Software License Agreement for '#{path}':", eula_text
end
with_eula.plist | true |
Other | Homebrew | brew | a6643b4adf13f7bb5b7ba7f771241a471189d946.json | fix odebug calls | Library/Homebrew/cask/audit.rb | @@ -82,7 +82,7 @@ def run!
check_bitbucket_repository
self
rescue => e
- odebug "#{e.message}\n#{e.backtrace.join("\n")}"
+ odebug e, e.backtrace
add_error "exception while auditing #{cask}: #{e.message}"
self
end | true |
Other | Homebrew | brew | a6643b4adf13f7bb5b7ba7f771241a471189d946.json | fix odebug calls | Library/Homebrew/formula_versions.rb | @@ -50,7 +50,7 @@ def formula_at_revision(rev)
rescue *IGNORED_EXCEPTIONS => e
# We rescue these so that we can skip bad versions and
# continue walking the history
- odebug "#{e} in #{name} at revision #{rev}", e.backtrace if debug?
+ odebug "#{e} in #{name} at revision #{rev}", e.backtrace
rescue FormulaUnavailableError
nil
ensure
@@ -69,7 +69,7 @@ def bottle_version_map(branch)
end
return map if versions_seen > MAX_VERSIONS_DEPTH
rescue MacOSVersionError => e
- odebug "#{e} in #{name} at revision #{rev}" if debug?
+ odebug "#{e} in #{name} at revision #{rev}"
break
end
map | true |
Other | Homebrew | brew | a6f55a5e82b5cf708be2557cf3611d210addd199.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/gems/ast@2.4.2.rbi | @@ -1,6 +1,6 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `ast` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
+# Please instead update this file by running `tapioca sync`.
# typed: true
@@ -17,6 +17,7 @@ class AST::Node
def children; end
def clone; end
def concat(array); end
+ def deconstruct; end
def dup; end
def eql?(other); end
def hash; end | true |
Other | Homebrew | brew | a6f55a5e82b5cf708be2557cf3611d210addd199.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.4.1.rbi | @@ -309,6 +309,10 @@ module RuboCop::AST::Descendence
def visit_descendants(types, &block); end
end
+class RuboCop::AST::DstrNode < ::RuboCop::AST::StrNode
+ def value; end
+end
+
class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node
def body; end
end | true |
Other | Homebrew | brew | a6f55a5e82b5cf708be2557cf3611d210addd199.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -7839,6 +7839,11 @@ class Homebrew::FormulaCreator
extend ::T::Private::Methods::SingletonMethodHooks
end
+class Homebrew::Livecheck::LivecheckVersion
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
module Homebrew::Livecheck::SkipConditions
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
@@ -26135,6 +26140,11 @@ module Readline
def self.completion_quote_character(); end
end
+module ReleaseNotes
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class Requirement
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
@@ -29731,6 +29741,17 @@ module Utils
extend ::T::Private::Methods::SingletonMethodHooks
end
+class Version::Parser
+ def initialize(*args, &blk); end
+end
+
+class Version::Parser
+ extend ::T::Private::Abstract::Hooks
+ extend ::T::InterfaceWrapper::Helpers
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class Version::Token
extend ::T::Private::Abstract::Hooks
extend ::T::InterfaceWrapper::Helpers | true |
Other | Homebrew | brew | 6e0bf05fb5ce233b97ba6023676073d33cc277e4.json | named_args_spec: add tests for unreadable formulae/casks | Library/Homebrew/test/cli/named_args_spec.rb | @@ -3,6 +3,20 @@
require "cli/named_args"
+def setup_unredable_formula(name)
+ error = FormulaUnreadableError.new(name, "testing")
+ allow(Formulary).to receive(:factory).with(name, force_bottle: false, flags: []).and_raise(error)
+end
+
+def setup_unredable_cask(name)
+ error = Cask::CaskUnreadableError.new(name, "testing")
+ allow(Cask::CaskLoader).to receive(:load).with(name).and_raise(error)
+
+ config = instance_double(Cask::Config)
+ allow(Cask::Config).to receive(:from_args).and_return(config)
+ allow(Cask::CaskLoader).to receive(:load).with(name, config: config).and_raise(error)
+end
+
describe Homebrew::CLI::NamedArgs do
let(:foo) do
formula "foo" do
@@ -26,6 +40,14 @@
RUBY
end
+ let(:foo_cask) do
+ Cask::CaskLoader.load(+<<~RUBY)
+ cask "foo" do
+ version "1.0"
+ end
+ RUBY
+ end
+
describe "#to_formulae" do
it "returns formulae" do
stub_formula_loader foo, call_original: true
@@ -50,6 +72,76 @@
expect(described_class.new("foo", "baz").to_formulae_and_casks).to eq [foo, baz]
end
+
+ context "when both formula and cask are present" do
+ before do
+ stub_formula_loader foo
+ stub_cask_loader foo_cask
+ end
+
+ it "returns formula by default" do
+ expect(described_class.new("foo").to_formulae_and_casks).to eq [foo]
+ end
+
+ it "returns formula if loading formula only" do
+ expect(described_class.new("foo").to_formulae_and_casks(only: :formula)).to eq [foo]
+ end
+
+ it "returns cask if loading cask only" do
+ expect(described_class.new("foo").to_formulae_and_casks(only: :cask)).to eq [foo_cask]
+ end
+ end
+
+ context "when both formula and cask are unreadable" do
+ before do
+ setup_unredable_formula "foo"
+ setup_unredable_cask "foo"
+ end
+
+ it "raises an error" do
+ expect { described_class.new("foo").to_formulae_and_casks }.to raise_error(FormulaOrCaskUnavailableError)
+ end
+
+ it "raises an error if loading formula only" do
+ expect { described_class.new("foo").to_formulae_and_casks(only: :formula) }
+ .to raise_error(FormulaUnreadableError)
+ end
+
+ it "raises an error if loading cask only" do
+ expect { described_class.new("foo").to_formulae_and_casks(only: :cask) }
+ .to raise_error(Cask::CaskUnreadableError)
+ end
+ end
+
+ it "raises an error when neither formula nor cask is present" do
+ expect { described_class.new("foo").to_formulae_and_casks }.to raise_error(FormulaOrCaskUnavailableError)
+ end
+
+ it "returns formula when formula is present and cask is unreadable" do
+ stub_formula_loader foo
+ setup_unredable_cask "foo"
+
+ expect(described_class.new("foo").to_formulae_and_casks).to eq [foo]
+ end
+
+ it "returns cask when formula is unreadable and cask is present" do
+ setup_unredable_formula "foo"
+ stub_cask_loader foo_cask
+
+ expect(described_class.new("foo").to_formulae_and_casks).to eq [foo_cask]
+ end
+
+ it "raises an error when formula is absent and cask is unreadable" do
+ setup_unredable_cask "foo"
+
+ expect { described_class.new("foo").to_formulae_and_casks }.to raise_error(Cask::CaskUnreadableError)
+ end
+
+ it "raises an error when formula is unreadable and cask is absent" do
+ setup_unredable_formula "foo"
+
+ expect { described_class.new("foo").to_formulae_and_casks }.to raise_error(FormulaUnreadableError)
+ end
end
describe "#to_resolved_formulae" do | false |
Other | Homebrew | brew | b4b78884926828d7b3e06f9828f786ae43b90c0e.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/ast@2.4.1.rbi | @@ -1,6 +1,6 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `ast` gem.
-# Please instead update this file by running `tapioca sync`.
+# Please instead update this file by running `tapioca generate --exclude json`.
# typed: true
@@ -17,7 +17,6 @@ class AST::Node
def children; end
def clone; end
def concat(array); end
- def deconstruct; end
def dup; end
def eql?(other); end
def hash; end | true |
Other | Homebrew | brew | b4b78884926828d7b3e06f9828f786ae43b90c0e.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.4.0.rbi | @@ -309,10 +309,6 @@ module RuboCop::AST::Descendence
def visit_descendants(types, &block); end
end
-class RuboCop::AST::DstrNode < ::RuboCop::AST::StrNode
- def value; end
-end
-
class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node
def body; end
end | true |
Other | Homebrew | brew | b4b78884926828d7b3e06f9828f786ae43b90c0e.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -26135,11 +26135,6 @@ module Readline
def self.completion_quote_character(); end
end
-module ReleaseNotes
- extend ::T::Private::Methods::MethodHooks
- extend ::T::Private::Methods::SingletonMethodHooks
-end
-
class Requirement
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks | true |
Other | Homebrew | brew | 67e03a0675e53816a4910d118109e1fd0a78dd6a.json | Improve command descriptions
Co-Authored-By: Jonathan Chang <me@jonathanchang.org>
Co-Authored-By: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com> | Library/Homebrew/cmd/uses.rb | @@ -21,7 +21,7 @@ module Homebrew
def uses_args
Homebrew::CLI::Parser.new do
description <<~EOS
- Show formulae and casks that specify <formula> as a dependency. That is, show dependents
+ Show formulae and casks that specify <formula> as a dependency; that is, show dependents
of <formula>. When given multiple formula arguments, show the intersection
of formulae that use <formula>. By default, `uses` shows all formulae and casks that
specify <formula> as a required or recommended dependency for their stable builds. | true |
Other | Homebrew | brew | 67e03a0675e53816a4910d118109e1fd0a78dd6a.json | Improve command descriptions
Co-Authored-By: Jonathan Chang <me@jonathanchang.org>
Co-Authored-By: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com> | Library/Homebrew/dev-cmd/sh.rb | @@ -14,7 +14,7 @@ module Homebrew
def sh_args
Homebrew::CLI::Parser.new do
description <<~EOS
- Homebrew's build environment. This environment uses years-battle-hardened
+ Enter an interactive shell for Homebrew's build environment. Use years-battle-hardened
build logic to help your `./configure && make && make install`
and even your `gem install` succeed. Especially handy if you run Homebrew
in an Xcode-only configuration since it adds tools like `make` to your `PATH` | true |
Other | Homebrew | brew | 67e03a0675e53816a4910d118109e1fd0a78dd6a.json | Improve command descriptions
Co-Authored-By: Jonathan Chang <me@jonathanchang.org>
Co-Authored-By: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com> | completions/zsh/_brew | @@ -180,7 +180,7 @@ __brew_internal_commands() {
'rubocop:Installs, configures and runs Homebrew'\''s `rubocop`'
'ruby:Run a Ruby instance with Homebrew'\''s libraries loaded'
'search:Perform a substring search of cask tokens and formula names for text'
- 'sh:Homebrew'\''s build environment'
+ 'sh:Enter an interactive shell for Homebrew'\''s build environment'
'shellenv:Print export statements'
'sponsors:Print a Markdown summary of Homebrew'\''s GitHub Sponsors, suitable for pasting into a README'
'style:Check formulae or files for conformance to Homebrew style guidelines'
@@ -204,7 +204,7 @@ __brew_internal_commands() {
'update-reset:Fetch and reset Homebrew and all tap repositories (or any specified repository) using `git`(1) to their latest `origin/master`'
'update-test:Run a test of `brew update` with a new repository clone'
'upgrade:Upgrade outdated casks and outdated, unpinned formulae using the same options they were originally installed with, plus any appended brew formula options'
- 'uses:Show formulae and casks that specify formula as a dependency'
+ 'uses:Show formulae and casks that specify formula as a dependency; that is, show dependents of formula'
'vendor-gems:Install and commit Homebrew'\''s vendored gems'
'vendor-install:Install Homebrew'\''s portable Ruby'
) | true |
Other | Homebrew | brew | 67e03a0675e53816a4910d118109e1fd0a78dd6a.json | Improve command descriptions
Co-Authored-By: Jonathan Chang <me@jonathanchang.org>
Co-Authored-By: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com> | docs/Manpage.md | @@ -659,7 +659,7 @@ upgraded formulae or, every 30 days, for all formulae.
### `uses` [*`options`*] *`formula`* [...]
-Show formulae and casks that specify *`formula`* as a dependency. That is, show dependents
+Show formulae and casks that specify *`formula`* as a dependency; that is, show dependents
of *`formula`*. When given multiple formula arguments, show the intersection
of formulae that use *`formula`*. By default, `uses` shows all formulae and casks that
specify *`formula`* as a required or recommended dependency for their stable builds.
@@ -1254,7 +1254,7 @@ Run a Ruby instance with Homebrew's libraries loaded. For example,
### `sh` [*`--env`*`=`] [*`--cmd`*`=`] [*`file`*]
-Homebrew's build environment. This environment uses years-battle-hardened
+Enter an interactive shell for Homebrew's build environment. Use years-battle-hardened
build logic to help your `./configure && make && make install`
and even your `gem install` succeed. Especially handy if you run Homebrew
in an Xcode-only configuration since it adds tools like `make` to your `PATH` | true |
Other | Homebrew | brew | 67e03a0675e53816a4910d118109e1fd0a78dd6a.json | Improve command descriptions
Co-Authored-By: Jonathan Chang <me@jonathanchang.org>
Co-Authored-By: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com> | manpages/brew.1 | @@ -896,7 +896,7 @@ Skip installing cask dependencies\.
Also include casks with \fBauto_updates true\fR or \fBversion :latest\fR\.
.
.SS "\fBuses\fR [\fIoptions\fR] \fIformula\fR [\.\.\.]"
-Show formulae and casks that specify \fIformula\fR as a dependency\. That is, show dependents of \fIformula\fR\. When given multiple formula arguments, show the intersection of formulae that use \fIformula\fR\. By default, \fBuses\fR shows all formulae and casks that specify \fIformula\fR as a required or recommended dependency for their stable builds\.
+Show formulae and casks that specify \fIformula\fR as a dependency; that is, show dependents of \fIformula\fR\. When given multiple formula arguments, show the intersection of formulae that use \fIformula\fR\. By default, \fBuses\fR shows all formulae and casks that specify \fIformula\fR as a required or recommended dependency for their stable builds\.
.
.TP
\fB\-\-recursive\fR
@@ -1728,7 +1728,7 @@ Load a library using \fBrequire\fR\.
Execute the given text string as a script\.
.
.SS "\fBsh\fR [\fI\-\-env\fR\fB=\fR] [\fI\-\-cmd\fR\fB=\fR] [\fIfile\fR]"
-Homebrew\'s build environment\. This environment uses years\-battle\-hardened build logic to help your \fB\./configure && make && make install\fR and even your \fBgem install\fR succeed\. Especially handy if you run Homebrew in an Xcode\-only configuration since it adds tools like \fBmake\fR to your \fBPATH\fR which build systems would not find otherwise\.
+Enter an interactive shell for Homebrew\'s build environment\. Use years\-battle\-hardened build logic to help your \fB\./configure && make && make install\fR and even your \fBgem install\fR succeed\. Especially handy if you run Homebrew in an Xcode\-only configuration since it adds tools like \fBmake\fR to your \fBPATH\fR which build systems would not find otherwise\.
.
.TP
\fB\-\-env\fR | true |
Other | Homebrew | brew | 9c914106ed9adc47a649a77332cdda57ab89fbbb.json | dev-cmd/bump: increase test coverage | Library/Homebrew/dev-cmd/bump.rb | @@ -41,18 +41,8 @@ def bump
next
end
- current_version = formula.stable.version.to_s
-
package_data = Repology.single_package_query(formula.name)
- repology_latest = if package_data.present?
- Repology.latest_version(package_data.values.first)
- else
- "not found"
- end
-
- livecheck_latest = livecheck_result(formula)
- pull_requests = retrieve_pull_requests(formula)
- display(formula, current_version, repology_latest, livecheck_latest, pull_requests)
+ retrieve_and_display_info(formula, package_data&.values&.first)
end
else
outdated_packages = Repology.parse_api_response(requested_limit)
@@ -71,11 +61,7 @@ def bump
next
end
- current_version = formula.stable.version.to_s
- repology_latest = Repology.latest_version(repositories)
- livecheck_latest = livecheck_result(formula)
- pull_requests = retrieve_pull_requests(formula)
- display(formula, current_version, repology_latest, livecheck_latest, pull_requests)
+ retrieve_and_display_info(formula, repositories)
break if requested_limit && i >= requested_limit
end
@@ -110,12 +96,18 @@ def retrieve_pull_requests(formula)
pull_requests
end
- def up_to_date?(current_version, repology_latest, livecheck_latest)
- current_version == repology_latest &&
- current_version == livecheck_latest
- end
+ def retrieve_and_display_info(formula, repositories)
+ current_version = formula.stable.version.to_s
+
+ repology_latest = if repositories.present?
+ Repology.latest_version(repositories)
+ else
+ "not found"
+ end
+
+ livecheck_latest = livecheck_result(formula)
+ pull_requests = retrieve_pull_requests(formula)
- def display(formula, current_version, repology_latest, livecheck_latest, pull_requests)
title = if current_version == repology_latest &&
current_version == livecheck_latest
"#{formula} is up to date!" | true |
Other | Homebrew | brew | 9c914106ed9adc47a649a77332cdda57ab89fbbb.json | dev-cmd/bump: increase test coverage | Library/Homebrew/test/dev-cmd/bump_spec.rb | @@ -27,5 +27,19 @@
.and not_to_output.to_stderr
.and be_a_success
end
+
+ it "returns no data and prints a message for HEAD-only formulae" do
+ content = <<~RUBY
+ desc "HEAD-only test formula"
+ homepage "https://brew.sh"
+ head "https://github.com/Homebrew/brew.git"
+ RUBY
+ setup_test_formula("headonly", content)
+
+ expect { brew "bump", "headonly" }
+ .to output(/Formula is HEAD-only./).to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
end
end | true |
Other | Homebrew | brew | 874fbd12b4e7d170557bb3a81595585b7be4862f.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -26135,6 +26135,11 @@ module Readline
def self.completion_quote_character(); end
end
+module ReleaseNotes
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class Requirement
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks | false |
Other | Homebrew | brew | eaf46b2ff983e1aacd06b46752c77b6e4e9f6c05.json | Update RBI files for rubocop-ast. | Library/Homebrew/sorbet/rbi/gems/ast@2.4.2.rbi | @@ -1,6 +1,6 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `ast` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
+# Please instead update this file by running `tapioca sync`.
# typed: true
@@ -17,6 +17,7 @@ class AST::Node
def children; end
def clone; end
def concat(array); end
+ def deconstruct; end
def dup; end
def eql?(other); end
def hash; end | true |
Other | Homebrew | brew | eaf46b2ff983e1aacd06b46752c77b6e4e9f6c05.json | Update RBI files for rubocop-ast. | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.4.1.rbi | @@ -309,6 +309,10 @@ module RuboCop::AST::Descendence
def visit_descendants(types, &block); end
end
+class RuboCop::AST::DstrNode < ::RuboCop::AST::StrNode
+ def value; end
+end
+
class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node
def body; end
end | true |
Other | Homebrew | brew | eaf46b2ff983e1aacd06b46752c77b6e4e9f6c05.json | Update RBI files for rubocop-ast. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -26135,6 +26135,11 @@ module Readline
def self.completion_quote_character(); end
end
+module ReleaseNotes
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class Requirement
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks | true |
Other | Homebrew | brew | 6a08e273d0ea1a6c5dcb3aa9bd474487bc8f328c.json | Fix zsh completions for upgrade and reinstall | completions/zsh/_brew | @@ -88,10 +88,16 @@ __brew_installed_casks() {
__brew_outdated_formulae() {
local -a formulae
- formulae=($(brew outdated))
+ formulae=($(brew outdated --formula))
_describe -t formulae 'outdated formulae' formulae
}
+__brew_outdated_casks() {
+ local -a casks
+ casks=($(brew outdated --cask))
+ _describe -t casks 'outdated casks' casks
+}
+
__brew_installed_taps() {
local -a taps
taps=($(brew tap))
@@ -676,7 +682,7 @@ _brew_reinstall() {
'::formula:__brew_installed_formulae' \
- cask-install \
'--cask[reinstall casks]' \
- ': :__brew_all_casks' \
+ ': :__brew_installed_casks' \
}
# brew search, -S:
@@ -879,7 +885,7 @@ _brew_upgrade() {
': : __brew_outdated_formulae' \
- cask-install \
'--cask[reinstall casks]' \
- ': :__brew_all_casks' \
+ ': : __brew_outdated_casks' \
}
| false |
Other | Homebrew | brew | 138f7de18ffaefc5586e04c501fa2fc3ea907558.json | Refactor `brew bump`: apply suggestions from code review
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com> | Library/Homebrew/dev-cmd/bump.rb | @@ -3,7 +3,6 @@
require "cli/parser"
require "livecheck/livecheck"
-require "livecheck/skip_conditions"
module Homebrew
extend T::Sig
@@ -28,7 +27,6 @@ def bump
args = bump_args.parse
requested_formulae = args.named.to_formulae.presence
-
requested_limit = args.limit.to_i if args.limit.present?
if requested_formulae
@@ -96,7 +94,7 @@ def livecheck_result(formula)
)
latest = version_info[:latest] if version_info.present?
- return "not found" if latest.blank?
+ return "unable to get versions" if latest.blank?
latest.to_s
end
@@ -118,7 +116,8 @@ def up_to_date?(current_version, repology_latest, livecheck_latest)
end
def display(formula, current_version, repology_latest, livecheck_latest, pull_requests)
- title = if up_to_date?(current_version, repology_latest, livecheck_latest)
+ title = if current_version == repology_latest &&
+ current_version == livecheck_latest
"#{formula} is up to date!"
else
formula.name | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.