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 | 06d91520981df7950fcc44dc1f3af31cd8a68bbc.json | bump-formula-pr: check duplicate PRs as early as possible | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -127,6 +127,10 @@ def bump_formula_pr
raise FormulaUnspecifiedError unless formula
tap_full_name, origin_branch, previous_branch = use_correct_linux_tap(formula)
+ check_open_pull_requests(formula, tap_full_name)
+
+ new_version = args.version
+ check_all_pull_requests(formula, tap_full_name, ve... | false |
Other | Homebrew | brew | a2bd24efa78bf794c060af6c962683da67994841.json | sorbet: set multiple files to true
Set the following files to true in sorbet/files.yaml:
- ./cleaner.rb
- ./compilers.rb
- ./dependency_collector.rb
- ./description_cache_store.rb
- ./descriptions.rb
- ./env_config.rb | Library/Homebrew/sorbet/files.yaml | @@ -81,7 +81,6 @@ false:
- ./cask/utils.rb
- ./cask/verify.rb
- ./caveats.rb
- - ./cleaner.rb
- ./cleanup.rb
- ./cli/args.rb
- ./cli/parser.rb
@@ -129,15 +128,11 @@ false:
- ./cmd/uses.rb
- ./commands.rb
- ./compat/language/python.rb
- - ./compilers.rb
- ./cxxstdlib.rb
- ./debrew.rb
... | false |
Other | Homebrew | brew | 03857319c97d596630c8b27a3b6868a9b1029d83.json | outdated: Update documentation about json versions | Library/Homebrew/cmd/outdated.rb | @@ -22,11 +22,9 @@ def outdated_args
switch :verbose,
description: "Include detailed version information."
flag "--json",
- description: "Print output in JSON format. Currently the default and only accepted "\
- "value for <version> is `v1`. See the doc... | true |
Other | Homebrew | brew | 03857319c97d596630c8b27a3b6868a9b1029d83.json | outdated: Update documentation about json versions | docs/Manpage.md | @@ -356,7 +356,7 @@ otherwise.
* `-v`, `--verbose`:
Include detailed version information.
* `--json`:
- Print output in JSON format. Currently the default and only accepted value for *`version`* is `v1`. See the docs for examples of using the JSON output: <https://docs.brew.sh/Querying-Brew>. By default, this opt... | true |
Other | Homebrew | brew | 03857319c97d596630c8b27a3b6868a9b1029d83.json | outdated: Update documentation about json versions | manpages/brew.1 | @@ -477,7 +477,7 @@ Include detailed version information\.
.
.TP
\fB\-\-json\fR
-Print output in JSON format\. Currently the default and only accepted value for \fIversion\fR is \fBv1\fR\. See the docs for examples of using the JSON output: \fIhttps://docs\.brew\.sh/Querying\-Brew\fR\. By default, this option treats... | true |
Other | Homebrew | brew | 8c5140f6e6dddcd979ad7c388252199796e4917a.json | outdated: Implement json v2 | Library/Homebrew/cmd/outdated.rb | @@ -46,47 +46,55 @@ def outdated_args
def outdated
outdated_args.parse
- formula_only = args.formula?
- if args.json
- raise UsageError, "invalid JSON version: #{args.json}" unless ["v1", true].include? args.json
+ case json_version
+ when :v1
+ outdated = if args.formula? || !args.cask?... | false |
Other | Homebrew | brew | e7b3b8e55985b8e4ab41973dfbd76904d7fd3b91.json | Allow missing libraries | Library/Homebrew/formula.rb | @@ -1131,6 +1131,13 @@ def link_overwrite?(path)
end
end
+ # Whether this {Formula} is allowed to have broken linkage.
+ # Defaults to false.
+ # @return [Boolean]
+ def allow_missing_libs?
+ false
+ end
+
# Whether this {Formula} is deprecated (i.e. warns on installation).
# Defaults to false.
... | true |
Other | Homebrew | brew | e7b3b8e55985b8e4ab41973dfbd76904d7fd3b91.json | Allow missing libraries | Library/Homebrew/linkage_checker.rb | @@ -59,14 +59,20 @@ def display_test_output(puts_output: true)
display_items "Broken dependencies", @broken_deps, puts_output: puts_output
display_items "Unwanted system libraries", @unwanted_system_dylibs, puts_output: puts_output
display_items "Conflicting libraries", @version_conflict_deps, puts_outpu... | true |
Other | Homebrew | brew | 210d22e8199f2482b28f550838a33cca47380ce4.json | Integrate upgrade with cask | Library/Homebrew/cmd/upgrade.rb | @@ -4,6 +4,9 @@
require "formula_installer"
require "install"
require "upgrade"
+require "cask/cmd"
+require "cask/utils"
+require "cask/macos"
module Homebrew
module_function
@@ -50,6 +53,8 @@ def upgrade_args
description: "Print install times for each formula at the end of the run."
swit... | false |
Other | Homebrew | brew | a39c0dc49f632353cf19f688532ca58a5686c1cf.json | Taps.md: Update cloning details
Since shallow cloning is now neither recommended nor the default, I've removed all mentions of cloning type. | docs/Taps.md | @@ -18,23 +18,19 @@ dunn/emacs
<!-- vale Homebrew.Terms = OFF -->
<!-- The `terms` lint suggests changing "repo" to "repository". But we need the abbreviation in the tap syntax and URL example. -->
-* `brew tap <user/repo>` makes a shallow clone of the repository at
+* `brew tap <user/repo>` makes a clone of the re... | false |
Other | Homebrew | brew | 8eb176f50bb0eee4671c1a24f1f5701a77742eba.json | exceptions: correct safe_system doc link | Library/Homebrew/exceptions.rb | @@ -506,7 +506,7 @@ def initialize(url)
end
end
-# Raised by {#safe_system} in `utils.rb`.
+# Raised by {Kernel#safe_system} in `utils.rb`.
class ErrorDuringExecution < RuntimeError
attr_reader :cmd, :status, :output
| false |
Other | Homebrew | brew | 79d4b27c8645692cc8b0c9014c71ed440c2f20d9.json | bump-formula-pr: restore formula if duplicate PR exists | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -316,7 +316,7 @@ def bump_formula_pr
new_formula_version = formula_version(formula, requested_spec, new_contents)
- check_for_duplicate_pull_requests(formula, tap_full_name, new_formula_version.to_s)
+ check_for_duplicate_pull_requests(formula, backup_file, tap_full_name, new_formula_version.to_s)
... | false |
Other | Homebrew | brew | 3ae261136524d58fb7f153dbfacc03528151a03e.json | bump-formula-pr: determine url/tag from version | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -18,7 +18,11 @@ def bump_formula_pr_args
be made if either or both values are not supplied by the user.
If a <tag> is specified, the Git commit <revision> corresponding to that tag
- must also be specified.
+ should also be specified. A best effort to determine the <revision> will b... | true |
Other | Homebrew | brew | 3ae261136524d58fb7f153dbfacc03528151a03e.json | bump-formula-pr: determine url/tag from version | docs/Manpage.md | @@ -707,7 +707,12 @@ be specified. A best effort to determine the *`SHA-256`* and *`formula`* name wi
be made if either or both values are not supplied by the user.
If a *`tag`* is specified, the Git commit *`revision`* corresponding to that tag
-must also be specified.
+should also be specified. A best effort to d... | true |
Other | Homebrew | brew | 3ae261136524d58fb7f153dbfacc03528151a03e.json | bump-formula-pr: determine url/tag from version | manpages/brew.1 | @@ -917,7 +917,10 @@ Create a pull request to update \fIformula\fR with a new URL or a new tag\.
If a \fIURL\fR is specified, the \fISHA\-256\fR checksum of the new download should also be specified\. A best effort to determine the \fISHA\-256\fR and \fIformula\fR name will be made if either or both values are not sup... | true |
Other | Homebrew | brew | 681dafd02838ddd50b7fe8dde02b040aeee3afcc.json | Adjust container checks for GitHub Actions changes | Library/Homebrew/brew.rb | @@ -127,7 +127,7 @@ def output_unsupported_error
ENV.delete("HOMEBREW_HELP") if help_flag
tap_commands = []
cgroup = Utils.popen_read("cat", "/proc/1/cgroup")
- if !cgroup.include?("azpl_job") && !cgroup.include?("docker")
+ if %w[azpl_job actions_job docker garden kubepods].none? { |container| cgr... | true |
Other | Homebrew | brew | 681dafd02838ddd50b7fe8dde02b040aeee3afcc.json | Adjust container checks for GitHub Actions changes | Library/Homebrew/brew.sh | @@ -433,8 +433,8 @@ fi
check-run-command-as-root() {
[[ "$(id -u)" = 0 ]] || return
- # Allow Azure Pipelines/Docker/Concourse/Kubernetes to do everything as root (as it's normal there)
- [[ -f /proc/1/cgroup ]] && grep -E "azpl_job|docker|garden|kubepods" -q /proc/1/cgroup && return
+ # Allow Azure Pipelines/... | true |
Other | Homebrew | brew | 567b5a96d6f7f95f36f1010986fb0e390ada6ffc.json | check_user_path_1: Fix message presentation | Library/Homebrew/diagnostic.rb | @@ -392,11 +392,11 @@ def check_user_path_1
message = inject_file_list conflicts, <<~EOS
/usr/bin occurs before #{HOMEBREW_PREFIX}/bin
This means that system-provided programs will be used instead of those
- provided by Homebrew. The following tool... | false |
Other | Homebrew | brew | 678dbc19731ca4deb295d64d9288beca5480427c.json | std_meson_args: add release buildtype
By default meson compiles using the debug buildtype, which corresponds
to -O0 -g. The release buildtype changes this to -O3. | Library/Homebrew/formula.rb | @@ -1420,7 +1420,7 @@ def std_cabal_v2_args
# Standard parameters for meson builds.
def std_meson_args
- ["--prefix=#{prefix}", "--libdir=#{lib}"]
+ ["--prefix=#{prefix}", "--libdir=#{lib}", "--buildtype=release"]
end
def shared_library(name, version = nil) | false |
Other | Homebrew | brew | 981726c088b4ceb8af2251ae8f3bf131ceb65103.json | utils/git_spec: Add a test for `last_revision_commit_of_files`
- This method, called from `brew extract` in the case of extraction from
third-party taps, was untested. This led to it breaking when we refactored
some of it to appease Sorbet (see PR 7933). If I make the same
(flawed) change here and run these test... | Library/Homebrew/test/utils/git_spec.rb | @@ -9,35 +9,67 @@
HOMEBREW_CACHE.cd do
system git, "init"
- File.open(file, "w") { |f| f.write("blah") }
- system git, "add", HOMEBREW_CACHE/file
+ File.open("blah.rb", "w") { |f| f.write("blah") }
+ system git, "add", HOMEBREW_CACHE/"blah.rb"
system git, "commit", "-m", "'File ... | false |
Other | Homebrew | brew | 55246d720e9e8408c76741bb5c104f3df0aff789.json | improve style in pattern matcher | Library/Homebrew/rubocops/lines.rb | @@ -173,7 +173,8 @@ def unless_modifier?(node)
# Finds `depends_on "foo" if build.with?("bar")` or `depends_on "foo" if build.without?("bar")`
def_node_search :depends_on_build_with, <<~EOS
- (if $(send (send nil? :build) {:with? :without?} str) (send nil? :depends_on str) nil?)
+ ... | false |
Other | Homebrew | brew | c1666676667d474986aa4fcb8b4a72b5cdc828da.json | shellenv: Fix shell detection
It currently switches on `$SHELL`, which points to the user's login shell. However, `shellenv` may be used in contexts where the running shell isn't `$SHELL` (e.g. csh-based `cron` scripts), and Linux desktop environments may set up user sessions in ways that trip up the current algorithm... | Library/Homebrew/cmd/shellenv.sh | @@ -6,16 +6,16 @@
#: Consider adding evaluation of this command's output to your dotfiles (e.g. `~/.profile`, `~/.bash_profile`, or `~/.zprofile`) with: `eval $(brew shellenv)`
homebrew-shellenv() {
- case "$SHELL" in
- */fish|fish)
+ case "$(/bin/ps -p $PPID -o comm=)" in
+ fish|-fish)
echo "set -g... | false |
Other | Homebrew | brew | 69e89d7a0159c81cad5b40af3856bd465fa28355.json | add TODOs for future refactoring | Library/Homebrew/rubocops/lines.rb | @@ -118,6 +118,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
depends_on_build_regex = /depends_on .+ (if build\.with(out)?\?\(["']\w+["']\))/
find_instance_method_call(body_node, :build, :with?) do |n|
+ # TODO: this should be refactored to a direct method ... | true |
Other | Homebrew | brew | 69e89d7a0159c81cad5b40af3856bd465fa28355.json | add TODOs for future refactoring | Library/Homebrew/rubocops/text.rb | @@ -112,6 +112,7 @@ def audit_formula(node, _class_node, _parent_class_node, body_node)
parent = n.parent
# Only look at keywords that have `prefix` before them
+ # TODO: this should be refactored to a direct method match
prefix_keyword_regex = %r{(prefix\s*\+\s*["'](... | true |
Other | Homebrew | brew | 832073a3c7de32346d09409569b48ed672418527.json | cask: add list --json | Library/Homebrew/cask/cmd/list.rb | @@ -3,58 +3,69 @@
module Cask
class Cmd
class List < AbstractCommand
- option "-1", :one, false
- option "--versions", :versions, false
- option "--full-name", :full_name, false
+ option "-1", :one, false
+ option "--versions", :versions, false
+ option "--full-nam... | true |
Other | Homebrew | brew | 832073a3c7de32346d09409569b48ed672418527.json | cask: add list --json | Library/Homebrew/test/cask/cmd/list_spec.rb | @@ -20,6 +20,26 @@
EOS
end
+ it "lists oneline" do
+ casks = %w[
+ local-caffeine
+ third-party/tap/third-party-cask
+ local-transmission
+ ].map { |c| Cask::CaskLoader.load(c) }
+
+ casks.each do |c|
+ InstallHelper.install_with_caskfile(c)
+ end
+
+ expect {
+ descri... | true |
Other | Homebrew | brew | 10feb681282be3cdbe3414739b2d10ef44c25e2c.json | Add support for -march=sandybridge
HHVM's been building with this (or equivalent predecessor patches); it
gets us a 20x speedup on real-world workloads, at the cost of slightly
worse compatibility.
This doesn't change the default, just makes it available as an explicit
choice. | Library/Homebrew/hardware.rb | @@ -14,6 +14,7 @@ def optimization_flags
@optimization_flags ||= {
native: arch_flag("native"),
nehalem: "-march=nehalem",
+ sandybridge: "-march=sandybridge",
core2: "-march=core2",
core: "-march=pres... | false |
Other | Homebrew | brew | 1a703a1234b5ce8bd934899a17fa778e3a38c301.json | regex_match_group: handle non UTF-8 encoded strings | Library/Homebrew/rubocops/extend/formula.rb | @@ -35,7 +35,7 @@ def on_class(node)
# Checks for regex match of pattern in the node and
# sets the appropriate instance variables to report the match
def regex_match_group(node, pattern)
- string_repr = string_content(node)
+ string_repr = string_content(node).encode("UTF-8", invalid... | false |
Other | Homebrew | brew | b4a9565b8bf370d90dc6b7900f6542998e5665d8.json | style: require java dependency for JAVA_HOME | Library/Homebrew/dev-cmd/audit.rb | @@ -852,13 +852,6 @@ def line_problems(line, _lineno)
)
end
- if line =~ /JAVA_HOME/i &&
- [formula.name, *formula.deps.map(&:name)].none? { |name| name.match?(/^openjdk(@|$)/) } &&
- formula.requirements.none? { |req| req.is_a?(JavaRequirement) }
- # TODO: check could be i... | true |
Other | Homebrew | brew | b4a9565b8bf370d90dc6b7900f6542998e5665d8.json | style: require java dependency for JAVA_HOME | Library/Homebrew/rubocops/text.rb | @@ -78,6 +78,21 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
problem "Do not concatenate paths in string interpolation"
end
end
+
+ find_strings(body_node).each do |n|
+ next unless regex_match_group(n, /JAVA_HOME/i)
+
+ ne... | true |
Other | Homebrew | brew | b4a9565b8bf370d90dc6b7900f6542998e5665d8.json | style: require java dependency for JAVA_HOME | Library/Homebrew/test/rubocops/text_spec.rb | @@ -237,6 +237,61 @@ def install
end
RUBY
end
+
+ it "When using JAVA_HOME without a java dependency" do
+ expect_offense(<<~RUBY)
+ class Foo < Formula
+ def install
+ ohai "JAVA_HOME"
+ ^^^^^^^^^^^ Use `depends_on :java` to set JAVA_HOME
+ ... | true |
Other | Homebrew | brew | 2afa8497c096ba85489b4f242c64a0cdf1b06214.json | formula: consider aliases in installed_prefixes | Library/Homebrew/formula.rb | @@ -598,7 +598,16 @@ def rack
# All currently installed prefix directories.
# @private
def installed_prefixes
- rack.directory? ? rack.subdirs.sort : []
+ prefixes = rack.directory? ? rack.subdirs : []
+
+ prefixes += (aliases + Array(oldname)).flat_map do |alias_name|
+ rack_alias = HOMEBREW_CEL... | false |
Other | Homebrew | brew | bdb64aa178c1531661d74f58cd2435c30e029272.json | Apply suggestions from code review
Code review changes
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/formula_installer.rb | @@ -1107,7 +1107,7 @@ def puts_requirement_messages
end
def forbidden_license_check
- forbidden_licenses = (Homebrew::EnvConfig.forbidden_licenses || "").split(" ")
+ forbidden_licenses = Homebrew::EnvConfig.forbidden_licenses.to_s.split(" ")
return if forbidden_licenses.blank?
if forbidden_li... | false |
Other | Homebrew | brew | 02d6b671e6bc2ad2bb26306966b68d78d5d07696.json | Revert "python_virtualenv_constants: upgrade virtualenv to 20.0.26"
This reverts commit 6dbcf83a21d36a0c03990a923cc07ef4a06e4e7f. | Library/Homebrew/language/python_virtualenv_constants.rb | @@ -1,11 +1,11 @@
# frozen_string_literal: true
PYTHON_VIRTUALENV_URL =
- "https://files.pythonhosted.org/packages/c4/1b" \
- "/09bb751c6e805bf4711bbaead5499c8d8caf92398ba8da92daa8bf19f60e" \
- "/virtualenv-20.0.26.tar.gz"
+ "https://files.pythonhosted.org/packages/11/74" \
+ "/2c151a13ef41ab9fb43b3c4ff9e788e0... | false |
Other | Homebrew | brew | 8f3d230995ed76dcd7c8dc8abd9bf0a27c761bae.json | list: Remove extraneous flag conflicts | Library/Homebrew/cmd/list.rb | @@ -47,7 +47,7 @@ def list_args
description: "Sort by time modified, listing most recently modified first."
switch :verbose
switch :debug
- conflicts "--casks", "--unbrewed", "--multiple", "--pinned", "-l", "-r", "-t"
+ ["--unbrewed", "--multiple", "--pinned", "-l", "-r", "-t"].eac... | false |
Other | Homebrew | brew | 28c0962430bb33806bb4870ba394192e606d26f5.json | list: Integrate brew list with brew cask list | Library/Homebrew/cmd/list.rb | @@ -3,6 +3,7 @@
require "metafiles"
require "formula"
require "cli/parser"
+require "cask/cmd"
module Homebrew
module_function
@@ -31,6 +32,8 @@ def list_args
switch "--pinned",
description: "Show the versions of pinned formulae, or only the specified (pinned) "\
... | false |
Other | Homebrew | brew | 5e99ecfbdb0a33fd4cb831232abfd824b5b5ecb7.json | Apply suggestions from code review
Code review changes
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/env_config.rb | @@ -112,7 +112,7 @@ module EnvConfig
default: 15,
},
HOMEBREW_FORBIDDEN_LICENSES: {
- description: "Use this environment variable to define a blacklist of space separated licenses and Homebrew " \
+ description: "Use this environment variable to define a denylist of space... | true |
Other | Homebrew | brew | 5e99ecfbdb0a33fd4cb831232abfd824b5b5ecb7.json | Apply suggestions from code review
Code review changes
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/formula_installer.rb | @@ -1106,23 +1106,17 @@ def puts_requirement_messages
$stderr.puts @requirement_messages
end
- def env_forbidden_licenses
- Homebrew::EnvConfig.forbidden_licenses.split(" ")
- end
-
- def forbidden_license_check(f)
- return if ENV["HOMEBREW_FORBIDDEN_LICENSES"].blank?
-
- forbidden_licenses = env_... | true |
Other | Homebrew | brew | 6dbcf83a21d36a0c03990a923cc07ef4a06e4e7f.json | python_virtualenv_constants: upgrade virtualenv to 20.0.26 | Library/Homebrew/language/python_virtualenv_constants.rb | @@ -1,11 +1,11 @@
# frozen_string_literal: true
PYTHON_VIRTUALENV_URL =
- "https://files.pythonhosted.org/packages/11/74" \
- "/2c151a13ef41ab9fb43b3c4ff9e788e0496ed7923b2078d42cab30622bdf" \
- "/virtualenv-16.7.4.tar.gz"
+ "https://files.pythonhosted.org/packages/c4/1b" \
+ "/09bb751c6e805bf4711bbaead5499c8d8... | false |
Other | Homebrew | brew | c8c8839ba27007cf166d9108c5986a02a3dbbfc9.json | sorbet: update hidden definitions
srb/tapioca: update rbi of recently bumped gems | Library/Homebrew/sorbet/files.yaml | @@ -163,6 +163,7 @@ false:
- ./dev-cmd/release-notes.rb
- ./dev-cmd/ruby.rb
- ./dev-cmd/sh.rb
+ - ./dev-cmd/sponsors.rb
- ./dev-cmd/style.rb
- ./dev-cmd/tap-new.rb
- ./dev-cmd/test.rb
@@ -603,6 +604,7 @@ false:
- ./test/dev-cmd/release-notes_spec.rb
- ./test/dev-cmd/ruby_spec.rb
- ./test/dev... | true |
Other | Homebrew | brew | c8c8839ba27007cf166d9108c5986a02a3dbbfc9.json | sorbet: update hidden definitions
srb/tapioca: update rbi of recently bumped gems | Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.7.0.rbi | @@ -1,5 +1,5 @@
# This file is autogenerated. Do not edit it by hand. Regenerate it with:
-# tapioca sync
+# tapioca sync --exclude json
# typed: true
@@ -12,6 +12,24 @@ end
module RuboCop::Cop::Performance
end
+class RuboCop::Cop::Performance::AncestorsInclude < ::RuboCop::Cop::Cop
+ include(::RuboCop::... | true |
Other | Homebrew | brew | c8c8839ba27007cf166d9108c5986a02a3dbbfc9.json | sorbet: update hidden definitions
srb/tapioca: update rbi of recently bumped gems | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -5819,6 +5819,10 @@ class Cask::DSL::Container
def nested=(nested); end
+ def pairs(); end
+
+ def pairs=(pairs); end
+
def type(); end
def type=(type); end
@@ -19436,7 +19440,7 @@ module RuboCop::RSpec::ExpectOffense
def expect_no_offenses(source, file=T.unsafe(nil)); end
- def expect_offen... | true |
Other | Homebrew | brew | 0d58d2a46cd76b7cf3d43239b4db551ced92ec87.json | srb/files: add new files. 13 errors => 14 errors. | Library/Homebrew/sorbet/files.yaml | @@ -861,6 +861,7 @@ true:
- ./cask/url.rb
- ./checksum.rb
- ./config.rb
+ - ./dev-cmd/sponsers.rb
- ./extend/cachable.rb
- ./extend/os/linux/development_tools.rb
- ./extend/os/linux/formula.rb
@@ -887,6 +888,7 @@ true:
- ./rubocops/cask/extend/string.rb
- ./rubocops/deprecate.rb
- ./tap_cons... | false |
Other | Homebrew | brew | 76339916214396e9967b1c6bb8d906b2327b7a98.json | Remove exception handling in formula version vheck | Library/Homebrew/dev-cmd/bump.rb | @@ -71,8 +71,6 @@ def get_formula_details(formula_name)
def current_formula_version(formula)
formula.version.to_s
- rescue
- nil
end
def livecheck_formula(formula) | true |
Other | Homebrew | brew | 76339916214396e9967b1c6bb8d906b2327b7a98.json | Remove exception handling in formula version vheck | Library/Homebrew/utils/repology.rb | @@ -8,8 +8,7 @@ module Repology
MAX_PAGINATION = 15
def query_api(last_package_in_response = "")
- last_package_in_response += "/" unless last_package_in_response.blank?
-
+ last_package_in_response += "/" if last_package_in_response.present?
url = "https://repology.org/api/v1/projects/#{last_package... | true |
Other | Homebrew | brew | 56bde378f3732353be869e7f925002a4b3b2b525.json | remove integration tests | Library/Homebrew/test/cmd/install_spec.rb | @@ -17,26 +17,6 @@
expect(HOMEBREW_CELLAR/"testball1/0.1/foo/test").not_to be_a_file
end
- it "does not install formulae with forbidden license" do
- setup_test_formula "package_license"
-
- expect { brew "install", "package_license", "HOMEBREW_FORBIDDEN_LICENSES" => "0BSD MIT" }
- .to output("E... | false |
Other | Homebrew | brew | c8554296125ad858ac1130e0ec5572007d67cb7a.json | Apply suggestions from code review
code review changes
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> | docs/Manpage.md | @@ -1395,7 +1395,7 @@ Note that environment variables must have a value set to be detected. For exampl
*Default:* `15`.
* `HOMEBREW_FORBIDDEN_LICENSES`:
- Use this environment variable to define a blacklist of space separated licenses and Homebrew will avoid installing the packages with those licenses.
+ ... | false |
Other | Homebrew | brew | 720a00e68ead46fe9669dc2fce355dbf2d3a0d09.json | formula_desc: handle `nil` first character. | Library/Homebrew/rubocops/formula_desc.rb | @@ -87,7 +87,7 @@ def autocorrect(node)
first_word = string_content(node).split.first
unless VALID_LOWERCASE_WORDS.include?(first_word)
first_char = first_word.to_s.chars.first
- correction.sub!(/^(['"]?)([a-z])/, "\\1#{first_char.upcase}")
+ correction... | false |
Other | Homebrew | brew | 300d7e4799ebb15eba35ae7e888a0185059df0fe.json | diagnostic: allow some uncommitted gems.
Until these feature flags are fully enabled/removed these will result
in uncommitted gems (which will block CI). | Library/Homebrew/diagnostic.rb | @@ -670,6 +670,11 @@ def check_git_status
end
next if status.blank?
+ # these will result in uncommitted gems.
+ if path == HOMEBREW_REPOSITORY
+ next if ENV["HOMEBREW_SORBET"] || ENV["HOMEBREW_PATCHELF_RB"]
+ end
+
message ||= ""
messa... | false |
Other | Homebrew | brew | 559d0a91a28b40e6e2c6d2dcf00b14cfdf7989d4.json | Add CPU family ARMv8.3-A
Darwin 20 adds the CPU family `CPUFAMILY_ARM_VORTEX_TEMPEST`
(aka ARMv8.3-A), which is assigned the identifier of `0x07d34b9f`.
This is relevant for `SystemConfig` in Homebrew.
See also:
https://en.wikipedia.org/wiki/Comparison_of_ARMv8-A_cores | Library/Homebrew/extend/os/mac/hardware/cpu.rb | @@ -21,8 +21,6 @@ def type
end
def family
- return :dunno if arm?
-
case sysctl_int("hw.cpufamily")
when 0x73d67300 # Yonah: Core Solo/Duo
:core
@@ -48,6 +46,8 @@ def family
:kabylake
when 0x38435547 # Ice Lake
:icelake
+ when 0x0... | false |
Other | Homebrew | brew | eafc0a3af26ec75f279a92c9d8e459be0fd29011.json | replace each with find for clarity | Library/Homebrew/dev-cmd/bump.rb | @@ -38,12 +38,7 @@ def validate_and_format_packages(outdated_repology_packages)
next if repology_homebrew_repo.blank?
- latest_version = nil
-
- # identify latest version amongst repology repos
- repositories.each do |repo|
- latest_version = repo["version"] if repo["status"] == "newest... | false |
Other | Homebrew | brew | 5194d74c2142c5d0bd4671f2c5eddea821d58661.json | Remove versions module | Library/Homebrew/utils/versions.rb | @@ -1,56 +0,0 @@
-# frozen_string_literal: true
-
-module Versions
- module_function
-
- def current_formula_version(formula_name)
- Formula[formula_name].version.to_s.to_f
- rescue
- nil
- end
-
- def livecheck_formula(formula)
- ohai "Checking livecheck formula : #{formula}" if Homebrew.args.verbose?
-
... | false |
Other | Homebrew | brew | 17ca7527f49f6f83ec57563a3f503cc81ea1cc50.json | formula: allow link_overwrite for old name too. | Library/Homebrew/formula.rb | @@ -1118,9 +1118,8 @@ def link_overwrite?(path)
rescue TapFormulaAmbiguityError, TapFormulaWithOldnameAmbiguityError
return false # this keg belongs to another formula
else
- # this keg belongs to another formula
- # but it is not an alias
- return false unless f.aliases.incl... | false |
Other | Homebrew | brew | d7149d1f76621ffb301c62292c09be8dbda9566f.json | Fix merge conflicts | Library/Homebrew/.rubocop.yml | @@ -2,12 +2,12 @@ inherit_from: ../.rubocop_rspec.yml
AllCops:
Include:
- - '**/*.rb'
- - 'Library/Homebrew/.simplecov'
+ - "**/*.rb"
+ - "Library/Homebrew/.simplecov"
Exclude:
- - 'bin/*'
- - '**/Casks/**/*'
- - '**/vendor/**/*'
+ - "bin/*"
+ - "**/Casks/**/*"
+ - "**/vendor/**/*... | true |
Other | Homebrew | brew | d7149d1f76621ffb301c62292c09be8dbda9566f.json | Fix merge conflicts | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -314,7 +314,7 @@ def bump_formula_pr
new_formula_version = formula_version(formula, requested_spec, new_contents)
- check_for_duplicate_pull_requests(formula, tap_full_name, new_formula_version.to_s)
+ GitHub.check_for_duplicate_pull_requests(formula, tap_full_name, new_formula_version.to_s, args)
... | true |
Other | Homebrew | brew | d7149d1f76621ffb301c62292c09be8dbda9566f.json | Fix merge conflicts | Library/Homebrew/dev-cmd/bump.rb | @@ -12,18 +12,94 @@ def bump_args
Display out-of-date brew formulae, the latest version available, and whether a pull request has been opened.
EOS
+ switch :verbose
+ switch :debug
end
end
def bump
bump_args.parse
- outdated_repology_packages = RepologyParser.parse_api... | true |
Other | Homebrew | brew | d7149d1f76621ffb301c62292c09be8dbda9566f.json | Fix merge conflicts | Library/Homebrew/utils.rb | @@ -10,6 +10,7 @@
require "utils/inreplace"
require "utils/link"
require "utils/popen"
+require "utils/repology"
require "utils/svn"
require "utils/tty"
require "utils/repology" | true |
Other | Homebrew | brew | d7149d1f76621ffb301c62292c09be8dbda9566f.json | Fix merge conflicts | Library/Homebrew/utils/github.rb | @@ -337,6 +337,43 @@ def print_pull_requests_matching(query)
prs.each { |i| puts "#{i["title"]} (#{i["html_url"]})" }
end
+ def fetch_pull_requests(query, tap_full_name, state: nil)
+ issues_for_formula(query, tap_full_name: tap_full_name, state: state).select do |pr|
+ pr["html_url"].include?("/pull... | true |
Other | Homebrew | brew | d7149d1f76621ffb301c62292c09be8dbda9566f.json | Fix merge conflicts | Library/Homebrew/utils/repology.rb | @@ -1,11 +1,8 @@
# frozen_string_literal: true
require "utils/curl"
-require "utils/versions"
-require "formula_info"
-
-module RepologyParser
+module Repology
module_function
MAX_PAGINATION = 15
@@ -14,7 +11,6 @@ def query_api(last_package_in_response = "")
last_package_in_response += "/" unless las... | true |
Other | Homebrew | brew | 0786003fe9d3aef49e62b329d2ed7795d5f871cc.json | Add tests for autocorrect | Library/Homebrew/rubocops/lines.rb | @@ -267,7 +267,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
shell_metacharacters = %w[> < < | ; : & * $ ? : ~ + @ !` ( ) [ ]]
find_every_method_call_by_name(body_node, :system).each do |method|
- # Continue if a shell metacharacter is present
+ ... | true |
Other | Homebrew | brew | 0786003fe9d3aef49e62b329d2ed7795d5f871cc.json | Add tests for autocorrect | Library/Homebrew/test/rubocops/lines_spec.rb | @@ -715,6 +715,111 @@ def install
end
RUBY
end
+
+ it "separates shell commands in system" do
+ source = <<~RUBY
+ class Foo < Formula
+ def install
+ system "foo bar"
+ end
+ end
+ RUBY
+
+ corrected_source = <<~RUBY
+ class Foo <... | true |
Other | Homebrew | brew | df8d22a29b3dfb4313d0b983e92e6683f5df809f.json | Remove debugging markers (oops) | Library/Homebrew/cli/args.rb | @@ -246,21 +246,16 @@ def resolve_keg(name)
require "formula"
require "missing_formula"
- puts 1
raise UsageError if name.blank?
- puts 2
rack = Formulary.to_rack(name.downcase)
- puts 3
dirs = rack.directory? ? rack.subdirs : []
raise NoS... | false |
Other | Homebrew | brew | 7f651de7befd2f447e3fdc9a9c13bff49ca4cb2d.json | Add completion configuration for non-Homebrew fish
Tested on Ubuntu 18.04 LTS | docs/Shell-Completion.md | @@ -54,4 +54,16 @@ Additionally, if you receive "zsh compinit: insecure directories" warnings when
## Configuring Completions in `fish`
-No configuration is needed in `fish`. Friendly!
+No configuration is needed if you're using Homebrew's `fish`. Friendly!
+
+If your `fish` is from somewhere else, add the followi... | false |
Other | Homebrew | brew | 3fb00315e7d15fac496c2922c49bab885f65a521.json | sorbet/files.yaml: add new files | Library/Homebrew/sorbet/files.yaml | @@ -168,6 +168,7 @@ false:
- ./dev-cmd/test.rb
- ./dev-cmd/tests.rb
- ./dev-cmd/unpack.rb
+ - ./dev-cmd/update-license-data.rb
- ./dev-cmd/update-test.rb
- ./dev-cmd/vendor-gems.rb
- ./development_tools.rb
@@ -185,6 +186,7 @@ false:
- ./extend/os/linux/hardware/cpu.rb
- ./extend/os/linux/instal... | false |
Other | Homebrew | brew | fe71d891538e59df3227fd0b4a5de08dfa80c598.json | replace puts with ohai | Library/Homebrew/dev-cmd/bump.rb | @@ -2,6 +2,7 @@
require "cli/parser"
require "utils/popen"
+require "utils/repology"
module Homebrew
module_function
@@ -26,15 +27,14 @@ def bump
end
def display(outdated_packages)
- ohai "Outdated Formulae"
+ ohai "Outdated Formulae\n"
outdated_packages.each do |formula, package_details|... | false |
Other | Homebrew | brew | ea2f4087febd3c9d67cb6013efa5f034a28ee3a2.json | Add livecheck version and duplicate pr check | Library/Homebrew/dev-cmd/bump.rb | @@ -1,6 +1,7 @@
# frozen_string_literal: true
require "cli/parser"
+require "utils/popen"
module Homebrew
module_function
@@ -9,6 +10,7 @@ def bump_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`bump`
+
Display out-of-date brew formulae, the latest version available, and ... | true |
Other | Homebrew | brew | ea2f4087febd3c9d67cb6013efa5f034a28ee3a2.json | Add livecheck version and duplicate pr check | Library/Homebrew/utils/livecheck.rb | @@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-module Livecheck
- def livecheck_formula_response(name)
- ohai "Checking livecheck formula : #{name}"
-
- response = Utils.popen_read("brew", "livecheck", name, "--quiet").chomp
- parse_livecheck_response(response)
- end
-
- def parse_livecheck_response(res... | true |
Other | Homebrew | brew | ea2f4087febd3c9d67cb6013efa5f034a28ee3a2.json | Add livecheck version and duplicate pr check | Library/Homebrew/utils/repology.rb | @@ -1,15 +1,15 @@
# frozen_string_literal: true
require "utils/curl"
+require "utils/versions"
+
require "formula_info"
module RepologyParser
module_function
- MAX_PAGE_LIMIT = 15
-
def query_api(last_package_in_response = "")
- url = "https://repology.org/api/v1/projects/#{last_package_in_response}... | true |
Other | Homebrew | brew | ea2f4087febd3c9d67cb6013efa5f034a28ee3a2.json | Add livecheck version and duplicate pr check | Library/Homebrew/utils/versions.rb | @@ -1,8 +1,8 @@
# frozen_string_literal: true
-require "formula"
-
module Versions
+ module_function
+
def current_formula_version(formula_name)
Formula[formula_name].version.to_s.to_f
end
@@ -12,10 +12,57 @@ def bump_formula_pr(formula_name, url)
formula_name, "--url=#{url}").chom... | true |
Other | Homebrew | brew | 170b38892a4e15cf2fadfd173814954a53c97fb4.json | Use CodeCov for coverage reporting. | .github/workflows/tests.yml | @@ -139,8 +139,7 @@ jobs:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# set variables for coverage reporting
- HOMEBREW_CI_NAME: github-actions
- HOMEBREW_COVERALLS_REPO_TOKEN: 3F6U6ZqctoNJwKyREremsqMgpU3qYgxFk
+ HOMEBREW_CODECOV_TOKEN: 3ea0364c-80ce-47a3-9fba-93a940d... | true |
Other | Homebrew | brew | 170b38892a4e15cf2fadfd173814954a53c97fb4.json | Use CodeCov for coverage reporting. | .gitignore | @@ -86,7 +86,7 @@
**/vendor/bundle/ruby/*/gems/byebug-*/
**/vendor/bundle/ruby/*/gems/coderay-*/
**/vendor/bundle/ruby/*/gems/connection_pool-*/
-**/vendor/bundle/ruby/*/gems/coveralls-*/
+**/vendor/bundle/ruby/*/gems/codecov-*/
**/vendor/bundle/ruby/*/gems/diff-lcs-*/
**/vendor/bundle/ruby/*/gems/docile-*/
**/ve... | true |
Other | Homebrew | brew | 170b38892a4e15cf2fadfd173814954a53c97fb4.json | Use CodeCov for coverage reporting. | Library/Homebrew/.simplecov | @@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+# frozen_string_literal: true
require "English"
@@ -20,7 +21,8 @@ SimpleCov.start do
# Just save result, but don't write formatted output.
coverage_result = Coverage.result
- SimpleCov.add_not_loaded_files(coverage_result)
+ # TODO: this method is pri... | true |
Other | Homebrew | brew | 170b38892a4e15cf2fadfd173814954a53c97fb4.json | Use CodeCov for coverage reporting. | Library/Homebrew/Gemfile | @@ -4,7 +4,7 @@ source "https://rubygems.org"
# installed gems
gem "byebug"
-gem "coveralls", "~> 0.8", require: false
+gem "codecov", require: false
gem "parallel_tests"
gem "ronn", require: false
gem "rspec" | true |
Other | Homebrew | brew | 170b38892a4e15cf2fadfd173814954a53c97fb4.json | Use CodeCov for coverage reporting. | Library/Homebrew/Gemfile.lock | @@ -9,14 +9,12 @@ GEM
zeitwerk (~> 2.2, >= 2.2.2)
ast (2.4.1)
byebug (11.1.3)
+ codecov (0.1.17)
+ json
+ simplecov
+ url
concurrent-ruby (1.1.6)
connection_pool (2.2.3)
- coveralls (0.8.23)
- json (>= 1.8, < 3)
- simplecov (~> 0.16.1)
- term-ansicolor (~> ... | true |
Other | Homebrew | brew | 170b38892a4e15cf2fadfd173814954a53c97fb4.json | Use CodeCov for coverage reporting. | Library/Homebrew/test/spec_helper.rb | @@ -4,12 +4,10 @@
require "simplecov"
formatters = [SimpleCov::Formatter::HTMLFormatter]
- if ENV["HOMEBREW_COVERALLS_REPO_TOKEN"] && RUBY_PLATFORM[/darwin/]
- require "coveralls"
+ if ENV["HOMEBREW_CODECOV_TOKEN"] && RUBY_PLATFORM[/darwin/]
+ require "codecov"
- Coveralls::Output.no_color if !ENV[... | true |
Other | Homebrew | brew | 433d3a327b60408c1eb1363168a3748deeec9045.json | docs/Common-Issues-for-Core-Contributors: add steps to fix failed bottle publish | docs/Common-Issues-for-Core-Contributors.md | @@ -6,6 +6,13 @@ This is a page for maintainers to diagnose certain build errors.
## Issues
+### Bottle publishes failed but the commits are correct in the git history
+
+Follow these steps to fix this issue:
+* `git reset --hard <SHA>` in homebrew/core to reset to the commit before before all the commits created ... | false |
Other | Homebrew | brew | e8f78878cb81c4dec14f7e1498ead71892502072.json | replace capture2e with Utils.popen | Library/Homebrew/utils/livecheck.rb | @@ -1,13 +1,10 @@
# frozen_string_literal: true
-require "open3"
-
module Livecheck
- def livecheck_formula_response(formula_name)
- ohai "Checking livecheck formula : #{formula_name}"
- command_args = ["brew", "livecheck", formula_name, "--quiet"]
+ def livecheck_formula_response(name)
+ ohai "Checking ... | true |
Other | Homebrew | brew | e8f78878cb81c4dec14f7e1498ead71892502072.json | replace capture2e with Utils.popen | Library/Homebrew/utils/versions.rb | @@ -1,6 +1,5 @@
# frozen_string_literal: true
-require "open3"
require "formula"
module Versions
@@ -9,10 +8,9 @@ def current_formula_version(formula_name)
end
def bump_formula_pr(formula_name, url)
- command_args = ["brew", "bump-formula-pr", "--no-browse",
- "--dry-run", formula_n... | true |
Other | Homebrew | brew | 732c6efa19663f69aad52677cbf41b181061dfd9.json | remove extraneous files | Library/Homebrew/dev-cmd/bump.rb | @@ -9,16 +9,15 @@ def bump_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`bump`
-
Display out-of-date brew formulae, the latest version available, and whether a pull request has been opened.
EOS
end
end
def bump
bump_args.parse
- # puts "command run"
- ... | true |
Other | Homebrew | brew | 732c6efa19663f69aad52677cbf41b181061dfd9.json | remove extraneous files | scripts/bumpFormulae.rb | @@ -1,20 +0,0 @@
-require_relative "helpers/parsed_file"
-require_relative "helpers/brew_commands.rb"
-
-brew_commands = BrewCommands.new
-
-parsed_file = ParsedFile.new
-outdated_pckgs_to_update = parsed_file.get_latest_file("data/outdated_pckgs_to_update")
-
-File.foreach(outdated_pckgs_to_update) do |line|
- line_h... | true |
Other | Homebrew | brew | 732c6efa19663f69aad52677cbf41b181061dfd9.json | remove extraneous files | scripts/helpers/brew_commands.rb | @@ -1,54 +0,0 @@
-require "open3"
-
-class BrewCommands
-
- def livecheck_check_formula(formula_name)
- puts "- livecheck formula : #{formula_name}"
- command_args = [
- "brew",
- "livecheck",
- formula_name,
- "--quiet",
- ]
-
- response = Open3.capture2e(*command_args)
- self.parse... | true |
Other | Homebrew | brew | 732c6efa19663f69aad52677cbf41b181061dfd9.json | remove extraneous files | scripts/helpers/homebrew_formula.rb | @@ -1,27 +0,0 @@
-require "net/http"
-require "open-uri"
-
-class HomebrewFormula
-
- def generate_new_download_url(outdated_url, old_version, latest_version)
- if [outdated_url, old_version, latest_version].include? nil
- puts "\n- Could not generate download url"
- nil
- else
- puts "\... | true |
Other | Homebrew | brew | 732c6efa19663f69aad52677cbf41b181061dfd9.json | remove extraneous files | scripts/printPackageUpdates.rb | @@ -1,10 +0,0 @@
-require_relative "helpers/api_parser"
-
-api_parser = ApiParser.new
-
-outdated_repology_packages = api_parser.parse_repology_api()
-brew_formulas = api_parser.parse_homebrew_formulas()
-
-formatted_outdated_packages = api_parser.validate_packages(outdated_repology_packages, brew_formulas)
-
-api_pars... | true |
Other | Homebrew | brew | 98f0d63c9510e930af255ef5e3abb0e7cf53e05f.json | remove unnecessary /scripts; feedback fixes | Library/Homebrew/utils/livecheck.rb | @@ -4,13 +4,8 @@
module Livecheck
def livecheck_formula_response(formula_name)
- ohai "- livecheck formula : #{formula_name}"
- command_args = [
- "brew",
- "livecheck",
- formula_name,
- "--quiet",
- ]
+ ohai "Checking livecheck formula : #{formula_name}"
+ command_args = ["bre... | true |
Other | Homebrew | brew | 98f0d63c9510e930af255ef5e3abb0e7cf53e05f.json | remove unnecessary /scripts; feedback fixes | Library/Homebrew/utils/repology.rb | @@ -6,34 +6,35 @@
module RepologyParser
module_function
+ MAX_PAGE_LIMIT = 15
+
def query_api(last_package_in_response = "")
- url = "https://repology.org/api/v1/projects/#{last_package_in_response}?inrepo=homebrew&outdated=1"
+ url = "https://repology.org/api/v1/projects/#{last_package_in_response}/?in... | true |
Other | Homebrew | brew | 98f0d63c9510e930af255ef5e3abb0e7cf53e05f.json | remove unnecessary /scripts; feedback fixes | Library/Homebrew/utils/versions.rb | @@ -9,14 +9,8 @@ def current_formula_version(formula_name)
end
def bump_formula_pr(formula_name, url)
- command_args = [
- "brew",
- "bump-formula-pr",
- "--no-browse",
- "--dry-run",
- formula_name,
- "--url=#{url}",
- ]
+ command_args = ["brew", "bump-formula-pr", "--no-... | true |
Other | Homebrew | brew | 21c903c133bffca1204766d108d808f34358bb78.json | pr-pull, pr-upload: use safe_system to call brew | Library/Homebrew/dev-cmd/pr-pull.rb | @@ -260,7 +260,7 @@ def pr_pull
upload_args << "--dry-run" if args.dry_run?
upload_args << "--root_url=#{args.root_url}" if args.root_url
upload_args << "--bintray-org=#{bintray_org}"
- system HOMEBREW_BREW_FILE, *upload_args
+ safe_system HOMEBREW_BREW_FILE, *upload_a... | true |
Other | Homebrew | brew | 21c903c133bffca1204766d108d808f34358bb78.json | pr-pull, pr-upload: use safe_system to call brew | Library/Homebrew/dev-cmd/pr-upload.rb | @@ -42,7 +42,7 @@ def pr_upload
if args.dry_run?
puts "brew #{bottle_args.join " "}"
else
- system HOMEBREW_BREW_FILE, *bottle_args
+ safe_system HOMEBREW_BREW_FILE, *bottle_args
end
if args.dry_run? | true |
Other | Homebrew | brew | a721d7bc8f3012deff33ec1fb1e59e5574b52540.json | Remove outdated suggestions from Formula#test doc | Library/Homebrew/formula.rb | @@ -2648,9 +2648,13 @@ def needs(*standards)
#
# The block will create, run in and delete a temporary directory.
#
- # We are fine if the executable does not error out, so we know linking
- # and building the software was OK.
- # <pre>system bin/"foobar", "--version"</pre>
+ # We want tests t... | false |
Other | Homebrew | brew | 32656502796910d573b1788ba10ab90187abf231.json | Update Repology parser and bump command | Library/Homebrew/dev-cmd/bump.rb | @@ -17,7 +17,8 @@ def bump_args
def bump
bump_args.parse
- puts "command run"
- # parse_repology_api()
+ # puts "command run"
+ outdated_repology_pacakges = RepologyParser.parse_api_response()
+ puts RepologyParser.validate__packages(outdated_repology_pacakges)
end
end | true |
Other | Homebrew | brew | 32656502796910d573b1788ba10ab90187abf231.json | Update Repology parser and bump command | Library/Homebrew/utils/livecheck.rb | @@ -4,24 +4,25 @@
module Livecheck
def livecheck_formula_response(formula_name)
- puts "- livecheck formula : #{formula_name}"
+ ohai "- livecheck formula : #{formula_name}"
command_args = [
"brew",
"livecheck",
formula_name,
- "--quiet"
+ "--quiet",
]
respons... | true |
Other | Homebrew | brew | 32656502796910d573b1788ba10ab90187abf231.json | Update Repology parser and bump command | Library/Homebrew/utils/repology.rb | @@ -1,47 +1,75 @@
# frozen_string_literal: true
-require "net/http"
-require "json"
+require "utils/curl"
+require "formula_info"
module RepologyParser
- def call_api(url)
- puts "- Calling API #{url}"
- uri = URI(url)
- response = Net::HTTP.get(uri)
+ module_function
- puts "- Parsing response"
-... | true |
Other | Homebrew | brew | 32656502796910d573b1788ba10ab90187abf231.json | Update Repology parser and bump command | Library/Homebrew/utils/versions.rb | @@ -22,15 +22,15 @@ def bump_formula_pr(formula_name, url)
parse_formula_bump_response(response)
end
- def parse_formula_bump_response(response)
- response, status = formula_bump_response
+ def parse_formula_bump_response(formula_bump_response)
+ response, _status = formula_bump_response
respons... | true |
Other | Homebrew | brew | 32656502796910d573b1788ba10ab90187abf231.json | Update Repology parser and bump command | scripts/README.md | @@ -1,47 +0,0 @@
-# 0.0.1-API-Parser
-
-Parser for fixing this: https://github.com/Homebrew/brew/issues/5725
-
-## Overview
-
-Homebrew is used to install software (packages). Homebrew uses 'formulae' to determine how a package is installed.
-This project will automatically check which packages have had newer versions ... | true |
Other | Homebrew | brew | 32656502796910d573b1788ba10ab90187abf231.json | Update Repology parser and bump command | scripts/bumpFormulae.rb | @@ -1,5 +1,5 @@
-require_relative 'helpers/parsed_file'
-require_relative 'helpers/brew_commands.rb'
+require_relative "helpers/parsed_file"
+require_relative "helpers/brew_commands.rb"
brew_commands = BrewCommands.new
@@ -11,10 +11,10 @@
puts "\n bumping package: #{line_hash['name']} formula"
begin
- b... | true |
Other | Homebrew | brew | 32656502796910d573b1788ba10ab90187abf231.json | Update Repology parser and bump command | scripts/helpers/api_parser.rb | @@ -1,133 +0,0 @@
-require 'net/http'
-require 'json'
-
-require_relative 'brew_commands'
-require_relative 'homebrew_formula'
-
-class ApiParser
- def call_api(url)
- puts "- Calling API #{url}"
- uri = URI(url)
- response = Net::HTTP.get(uri)
-
- puts "- Parsing response"
- JSON.parse(response)
- end... | true |
Other | Homebrew | brew | 32656502796910d573b1788ba10ab90187abf231.json | Update Repology parser and bump command | scripts/helpers/brew_commands.rb | @@ -16,12 +16,12 @@ def livecheck_check_formula(formula_name)
end
def parse_livecheck_response(livecheck_output)
- livecheck_output = livecheck_output.first.gsub(' ', '').split(/:|==>|\n/)
+ livecheck_output = livecheck_output.first.gsub(" ", "").split(/:|==>|\n/)
# eg: ["burp", "2.2.18", "2.2.18"]... | true |
Other | Homebrew | brew | 32656502796910d573b1788ba10ab90187abf231.json | Update Repology parser and bump command | scripts/helpers/homebrew_formula.rb | @@ -1,5 +1,5 @@
-require 'net/http'
-require 'open-uri'
+require "net/http"
+require "open-uri"
class HomebrewFormula
| true |
Other | Homebrew | brew | 32656502796910d573b1788ba10ab90187abf231.json | Update Repology parser and bump command | scripts/helpers/parsed_file.rb | @@ -1,23 +0,0 @@
-require 'fileutils'
-
-class ParsedFile
-
- def get_latest_file(directory)
- puts "- retrieving latest file in directory: #{directory}"
- Dir.glob("#{directory}/*").max_by(1) {|f| File.mtime(f)}[0]
- end
-
- def save_to(directory, data)
- # Create directory if does not exist
- FileU... | true |
Other | Homebrew | brew | 32656502796910d573b1788ba10ab90187abf231.json | Update Repology parser and bump command | scripts/printPackageUpdates.rb | @@ -1,4 +1,4 @@
-require_relative 'helpers/api_parser'
+require_relative "helpers/api_parser"
api_parser = ApiParser.new
| true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.