Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run brew style --fix #104617

Merged
merged 22 commits into from Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Formula/aqbanking.rb
Expand Up @@ -65,8 +65,8 @@ def install
EOS

match = "110000000 000123456789 12.12.2022 -110.96 US44110000000000123456789 BYLADEM1001"
out = shell_output("#{bin}/aqbanking-cli -D .aqbanking listbal "\
"-T '$(bankcode) $(accountnumber) $(dateAsString) "\
out = shell_output("#{bin}/aqbanking-cli -D .aqbanking listbal " \
"-T '$(bankcode) $(accountnumber) $(dateAsString) " \
"$(valueAsString) $(iban) $(bic)' < #{context}")
assert_match match, out.gsub(/\s+/, " ")
end
Expand Down
8 changes: 4 additions & 4 deletions Formula/aws-sso-util.rb
Expand Up @@ -115,10 +115,10 @@ def install
end

test do
cmd = "#{bin}/aws-sso-util configure profile invalid"\
" --sso-start-url https://example.com/start --sso-region eu-west-1" \
" --account-id 000000000000 --role-name InvalidRole" \
" --region eu-west-1 --non-interactive"
cmd = "#{bin}/aws-sso-util configure profile invalid " \
"--sso-start-url https://example.com/start --sso-region eu-west-1 " \
"--account-id 000000000000 --role-name InvalidRole " \
"--region eu-west-1 --non-interactive"

assert_empty shell_output "AWS_CONFIG_FILE=#{testpath}/config #{cmd}"

Expand Down
4 changes: 2 additions & 2 deletions Formula/chart-testing.rb
Expand Up @@ -39,8 +39,8 @@ def install

# Lint an empty Helm chart that we create with `helm create`
system "helm", "create", "testchart"
output = shell_output("#{bin}/ct lint --charts ./testchart --validate-chart-schema=false" \
" --validate-maintainers=false").lines.last.chomp
output = shell_output("#{bin}/ct lint --charts ./testchart --validate-chart-schema=false " \
"--validate-maintainers=false").lines.last.chomp
assert_match "All charts linted successfully", output
end
end
2 changes: 1 addition & 1 deletion Formula/couchdb.rb
Expand Up @@ -55,7 +55,7 @@ def install
# setting new database dir
inreplace "rel/couchdb/etc/default.ini", "./data", "#{var}/couchdb/data"
# remove windows startup script
File.delete("rel/couchdb/bin/couchdb.cmd") if File.exist?("rel/couchdb/bin/couchdb.cmd")
rm_rf("rel/couchdb/bin/couchdb.cmd")
# install files
prefix.install Dir["rel/couchdb/*"]
if File.exist?(prefix/"Library/LaunchDaemons/org.apache.couchdb.plist")
Expand Down
2 changes: 1 addition & 1 deletion Formula/emojify.rb
Expand Up @@ -15,7 +15,7 @@ def install
end

test do
input = "Hey, I just :raising_hand: you, and this is :scream: , but here's my :calling: , "\
input = "Hey, I just :raising_hand: you, and this is :scream: , but here's my :calling: , " \
"so :telephone_receiver: me, maybe?"
assert_equal "Hey, I just 🙋 you, and this is 😱 , but here's my 📲 , so 📞 me, maybe?",
shell_output("#{bin}/emojify \"#{input}\"").strip
Expand Down
2 changes: 1 addition & 1 deletion Formula/gspell.rb
Expand Up @@ -129,7 +129,7 @@ def install
$(BUILT_SOURCES)

libgspell_core_la_LIBADD = \
+ $(GTK_MAC_LIBS) \
+ $(GTK_MAC_LIBS) \
MikeMcQuaid marked this conversation as resolved.
Show resolved Hide resolved
$(CODE_COVERAGE_LIBS)

libgspell_core_la_CFLAGS = \
Expand Down
4 changes: 2 additions & 2 deletions Formula/hashpump.rb
Expand Up @@ -40,8 +40,8 @@ def install
end

test do
output = `#{bin}/hashpump -s '6d5f807e23db210bc254a28be2d6759a0f5f5d99' \\
-d 'count=10&lat=37.351&user_id=1&long=-119.827&waffle=eggo' \\
output = `#{bin}/hashpump -s '6d5f807e23db210bc254a28be2d6759a0f5f5d99' \ \
-d 'count=10&lat=37.351&user_id=1&long=-119.827&waffle=eggo' \ \
-a '&waffle=liege' -k 14`
assert_match "0e41270260895979317fff3898ab85668953aaa2", output
assert_match "&waffle=liege", output
Expand Down
2 changes: 1 addition & 1 deletion Formula/jmxtrans.rb
Expand Up @@ -30,7 +30,7 @@ def install

cd "jmxtrans" do
# Point JAR_FILE into Cellar where we've installed the jar file
inreplace "jmxtrans.sh", "$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )/../lib\" "\
inreplace "jmxtrans.sh", "$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )/../lib\" " \
">/dev/null && pwd )/jmxtrans-all.jar",
libexec/"target/jmxtrans-#{version}-all.jar"

Expand Down
2 changes: 1 addition & 1 deletion Formula/libexosip.rb
Expand Up @@ -30,7 +30,7 @@ def install
# https://growingshoot.blogspot.com/2013/02/manually-install-osip-and-exosip-as.html
# Upstream bug ticket: https://savannah.nongnu.org/bugs/index.php?45079
if OS.mac?
ENV.append "LDFLAGS", "-framework CoreFoundation -framework CoreServices "\
ENV.append "LDFLAGS", "-framework CoreFoundation -framework CoreServices " \
"-framework Security"
end
system "./configure", "--disable-debug", "--disable-dependency-tracking",
Expand Down
6 changes: 3 additions & 3 deletions Formula/liquigraph.rb
Expand Up @@ -45,9 +45,9 @@ def install
EOS

jdbc = "jdbc:neo4j:http://#{failing_hostname}:7474/"
output = shell_output("#{bin}/liquigraph "\
"dry-run -d #{testpath} "\
"--changelog #{changelog.realpath} "\
output = shell_output("#{bin}/liquigraph " \
"dry-run -d #{testpath} " \
"--changelog #{changelog.realpath} " \
"--graph-db-uri #{jdbc} 2>&1", 1)
assert_match "Exception: #{failing_hostname}", output
end
Expand Down
8 changes: 4 additions & 4 deletions Formula/parliament.rb
Expand Up @@ -70,9 +70,9 @@ def install
end

test do
assert_equal "MEDIUM - No resources match for the given action - - [{'action': 's3:GetObject',"\
" 'required_format': 'arn:*:s3:::*/*'}] - {'line': 1, 'column': 40, 'filepath': None}", \
pipe_output("#{bin}/parliament --string \'{\"Version\": \"2012-10-17\", \"Statement\": {\"Effect\": \"Allow\","\
" \"Action\": \"s3:GetObject\", \"Resource\": \"arn:aws:s3:::secretbucket\"}}\'").strip
assert_equal "MEDIUM - No resources match for the given action - - [{'action': 's3:GetObject', " \
"'required_format': 'arn:*:s3:::*/*'}] - {'line': 1, 'column': 40, 'filepath': None}", \
pipe_output("#{bin}/parliament --string \'{\"Version\": \"2012-10-17\", \"Statement\": {\"Effect\": \"Allow\", " \
"\"Action\": \"s3:GetObject\", \"Resource\": \"arn:aws:s3:::secretbucket\"}}\'").strip
end
end
4 changes: 2 additions & 2 deletions Formula/php.rb
Expand Up @@ -87,8 +87,8 @@ def install
# possible to recompile as suggested in the original message
inreplace "sapi/apache2handler/sapi_apache2.c",
"You need to recompile PHP.",
"Homebrew PHP does not support a thread-safe php binary. "\
"To use the PHP apache sapi please change "\
"Homebrew PHP does not support a thread-safe php binary. " \
"To use the PHP apache sapi please change " \
"your httpd config to use the prefork MPM"

inreplace "sapi/fpm/php-fpm.conf.in", ";daemonize = yes", "daemonize = no"
Expand Down
4 changes: 2 additions & 2 deletions Formula/php@7.2.rb
Expand Up @@ -97,8 +97,8 @@ def install
# possible to recompile as suggested in the original message
inreplace "sapi/apache2handler/sapi_apache2.c",
"You need to recompile PHP.",
"Homebrew PHP does not support a thread-safe php binary. "\
"To use the PHP apache sapi please change "\
"Homebrew PHP does not support a thread-safe php binary. " \
"To use the PHP apache sapi please change " \
"your httpd config to use the prefork MPM"

inreplace "sapi/fpm/php-fpm.conf.in", ";daemonize = yes", "daemonize = no"
Expand Down
4 changes: 2 additions & 2 deletions Formula/php@7.3.rb
Expand Up @@ -81,8 +81,8 @@ def install
# possible to recompile as suggested in the original message
inreplace "sapi/apache2handler/sapi_apache2.c",
"You need to recompile PHP.",
"Homebrew PHP does not support a thread-safe php binary. "\
"To use the PHP apache sapi please change "\
"Homebrew PHP does not support a thread-safe php binary. " \
"To use the PHP apache sapi please change " \
"your httpd config to use the prefork MPM"

inreplace "sapi/fpm/php-fpm.conf.in", ";daemonize = yes", "daemonize = no"
Expand Down
4 changes: 2 additions & 2 deletions Formula/php@7.4.rb
Expand Up @@ -88,8 +88,8 @@ def install
# possible to recompile as suggested in the original message
inreplace "sapi/apache2handler/sapi_apache2.c",
"You need to recompile PHP.",
"Homebrew PHP does not support a thread-safe php binary. "\
"To use the PHP apache sapi please change "\
"Homebrew PHP does not support a thread-safe php binary. " \
"To use the PHP apache sapi please change " \
"your httpd config to use the prefork MPM"

inreplace "sapi/fpm/php-fpm.conf.in", ";daemonize = yes", "daemonize = no"
Expand Down
4 changes: 2 additions & 2 deletions Formula/php@8.0.rb
Expand Up @@ -88,8 +88,8 @@ def install
# possible to recompile as suggested in the original message
inreplace "sapi/apache2handler/sapi_apache2.c",
"You need to recompile PHP.",
"Homebrew PHP does not support a thread-safe php binary. "\
"To use the PHP apache sapi please change "\
"Homebrew PHP does not support a thread-safe php binary. " \
"To use the PHP apache sapi please change " \
"your httpd config to use the prefork MPM"

inreplace "sapi/fpm/php-fpm.conf.in", ";daemonize = yes", "daemonize = no"
Expand Down
2 changes: 1 addition & 1 deletion Formula/sail.rb
Expand Up @@ -151,7 +151,7 @@ def install

test do
xy = Language::Python.major_minor_version "#{libexec}/bin/python"
unittest = "#{libexec}/bin/python -m unittest discover "\
unittest = "#{libexec}/bin/python -m unittest discover " \
"#{libexec}/lib/python#{xy}/site-packages/sail/tests 2>&1"

assert_match(version.to_s, shell_output("#{bin}/sail --version"))
Expand Down
4 changes: 2 additions & 2 deletions Formula/scry.rb
Expand Up @@ -35,8 +35,8 @@ def rpc(json)
"#{json}"
end

input = rpc '{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params":' \
' { "processId": 1, "rootPath": "/dev/null", "capabilities": {}, "trace": "off" } }'
input = rpc '{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": ' \
'{ "processId": 1, "rootPath": "/dev/null", "capabilities": {}, "trace": "off" } }'
input += rpc '{ "jsonrpc": "2.0", "method": "initialized", "params": {} }'
input += rpc '{ "jsonrpc": "2.0", "id": 1, "method": "shutdown" }'
assert_match(/"capabilities"\s*:\s*{/, pipe_output(bin/"scry", input, 0))
Expand Down
2 changes: 1 addition & 1 deletion Formula/step.rb
Expand Up @@ -80,7 +80,7 @@ def install
# certificate using the API.
(testpath/"password.txt").write("password")
steppath = "#{testpath}/.step"
Dir.mkdir(steppath) unless File.exist?(steppath)
mkdir_p(steppath)
ENV["STEPPATH"] = steppath
system "#{bin}/step", "ca", "init", "--address", "127.0.0.1:8081",
"--dns", "127.0.0.1", "--password-file", "#{testpath}/password.txt",
Expand Down
2 changes: 1 addition & 1 deletion Formula/twoping.rb
Expand Up @@ -34,7 +34,7 @@ def install

test do
assert_match "OK 2PING", shell_output(
"#{bin}/2ping --count=10 --interval=0.2 --port=-1 --interface-address=127.0.0.1 "\
"#{bin}/2ping --count=10 --interval=0.2 --port=-1 --interface-address=127.0.0.1 " \
"--listen --nagios=1000,5%,1000,5% 127.0.0.1",
)
end
Expand Down
8 changes: 4 additions & 4 deletions Formula/vcluster.rb
Expand Up @@ -36,10 +36,10 @@ def install
help_output = "vcluster root command"
assert_match help_output, shell_output("#{bin}/vcluster --help")

create_output = "there is an error loading your current kube config "\
"(invalid configuration: no configuration has been provided, "\
"try setting KUBERNETES_MASTER environment variable), "\
"please make sure you have access to a kubernetes cluster and the command "\
create_output = "there is an error loading your current kube config " \
"(invalid configuration: no configuration has been provided, " \
"try setting KUBERNETES_MASTER environment variable), " \
"please make sure you have access to a kubernetes cluster and the command " \
"`kubectl get namespaces` is working"
assert_match create_output, shell_output("#{bin}/vcluster create vcluster -n vcluster --create-namespace", 1)
end
Expand Down
6 changes: 3 additions & 3 deletions Formula/zbctl.rb
Expand Up @@ -34,9 +34,9 @@ def install
test do
# Check status for a nonexistent cluster
status_error_message =
"Error: rpc error: code =" \
" Unavailable desc = connection error:" \
" desc = \"transport: Error while dialing dial tcp 127.0.0.1:26500: connect: connection refused\""
"Error: rpc error: code = " \
"Unavailable desc = connection error: " \
"desc = \"transport: Error while dialing dial tcp 127.0.0.1:26500: connect: connection refused\""
output = shell_output("#{bin}/zbctl status 2>&1", 1)
assert_match status_error_message, output
# Check version
Expand Down