This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Library/Homebrew/test/formulary_spec.rb b/Library/Homebrew/test/formulary_spec.rb | |
index 6b53acf40c..d63121af9a 100644 | |
--- a/Library/Homebrew/test/formulary_spec.rb | |
+++ b/Library/Homebrew/test/formulary_spec.rb | |
@@ -641,6 +641,42 @@ RSpec.describe Formulary do | |
# end | |
# end | |
end | |
+ | |
+ context "to a third-party tap" do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This action does the following on a push to the `main` branch: | |
# 1. It generates the docs website with `crystal docs`. | |
# 2. It bundles that docs folder and pushes it to the `gh-pages` branch. | |
# 3. It deploys that branch to Github pages. | |
# | |
# First time setup: | |
# - Go into the Github settings and specify that the `gh-pages` branch | |
# should be deployed on Github pages. | |
name: Github Pages for Crystal Project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env brew ruby | |
# Related to: https://github.com/Homebrew/brew/pull/16433 | |
sample = Homebrew::API::Formula.all_formulae.keys.sample(25) | |
formulae = sample.map { Formulary.factory(_1) } | |
json = formulae.map(&:to_hash_with_variations) | |
json = json.map { Homebrew::API::Formula.slim_hash(_1) } | |
json_string = JSON.pretty_generate(json) | |
outfile_path = File.expand_path("~/Desktop/slim-formula-sample.json") | |
File.write(outfile_path, json_string) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Benchmarking things to explore `brew desc` without a cache. | |
# See: https://github.com/Homebrew/brew/issues/16237 | |
Benchmark.bm do |x| | |
x.report("JSON") do | |
Homebrew::API::Formula.all_formulae | |
end | |
x.report("Ruby") do | |
CoreTap.instance.formula_files.map do |file| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
awk ' | |
BEGIN { | |
TRUE = 1 | |
FALSE = 0 | |
arg_parse() | |
if(HELP) { |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
***************** | |
* Homebrew/Core * | |
***************** | |
>>> Flat Profile | |
Measure Mode: wall_time | |
Thread ID: 80 | |
Fiber ID: 60 | |
Total: 736.246833 | |
Sort by: self_time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env gawk -f | |
# Inspired by zbg | |
# We use gawk to allow next inside a function. | |
BEGIN { | |
if(!is_git_installed()) { | |
die("Git is not installed!") | |
} | |
if(!is_git_repo()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env awk -f | |
# Run `ksink` to see usage. | |
################################ | |
# Main | |
################################ | |
BEGIN { | |
parse_args() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env awk -f | |
# Slight variation of this script: https://stackoverflow.com/a/48869665 | |
BEGIN { | |
if (k !~ /^[1-9][0-9]*$/) { | |
help() | |
exit(0) | |
} | |
srand(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script to manually run each custom cop individually to see if | |
# there are any very slow cops that can be improved on average. | |
# | |
# Note: This is very slow since each cop takes 20-50 seconds to run. | |
require "pathname" | |
require "benchmark" | |
unless system("brew --prefix > /dev/null") | |
raise "Missing: Brew is NOT installed locally since `brew --prefix` doesn't work." |
NewerOlder