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 | 2ad3a87045246f89aa267251315d660f663c42f2.json | Silence all specs by default. | Library/Homebrew/test/support/helper/cask/install_helper.rb | @@ -1,42 +1,29 @@
module InstallHelper
module_function
- require "test/support/helper/shutup"
- extend Test::Helper::Shutup
-
def self.install_without_artifacts(cask)
Hbc::Installer.new(cask).tap do |i|
- shutup do
- i.download
- i.extract_primary_container
- end
+ i.downloa... | true |
Other | Homebrew | brew | 2ad3a87045246f89aa267251315d660f663c42f2.json | Silence all specs by default. | Library/Homebrew/test/support/helper/shutup.rb | @@ -1,24 +0,0 @@
-module Test
- module Helper
- module Shutup
- def shutup
- if ENV.key?("VERBOSE_TESTS")
- yield
- else
- begin
- tmperr = $stderr.clone
- tmpout = $stdout.clone
- $stderr.reopen("/dev/null")
- $stdout.reopen("/dev/nul... | true |
Other | Homebrew | brew | 2ad3a87045246f89aa267251315d660f663c42f2.json | Silence all specs by default. | Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb | @@ -171,22 +171,20 @@ def setup_remote_tap(name)
end
def install_and_rename_coretap_formula(old_name, new_name)
- shutup do
- CoreTap.instance.path.cd do |tap_path|
- system "git", "init"
- system "git", "add", "--all"
- system "git", "commit", "-m",
- "#{old_name.capitaliz... | true |
Other | Homebrew | brew | 2ad3a87045246f89aa267251315d660f663c42f2.json | Silence all specs by default. | Library/Homebrew/test/support/helper/spec/shared_examples/hbc_staged.rb | @@ -18,9 +18,7 @@
["echo", "homebrew-cask", "rocks!"],
)
- shutup do
- staged.system_command("echo", args: ["homebrew-cask", "rocks!"])
- end
+ staged.system_command("echo", args: ["homebrew-cask", "rocks!"])
end
it "can get the Info.plist file for the primary app" do
@@ -34,9 +32,7 ... | true |
Other | Homebrew | brew | 2ad3a87045246f89aa267251315d660f663c42f2.json | Silence all specs by default. | Library/Homebrew/test/tap_spec.rb | @@ -52,12 +52,10 @@ class Foo < Formula
def setup_git_repo
path.cd do
- shutup do
- system "git", "init"
- system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew-foo"
- system "git", "add", "--all"
- system "git", "commit", "-m", "init"
- end
+ ... | true |
Other | Homebrew | brew | dd4609a3e3fba59dea7f3c8d7684e0e9a38917e6.json | Put the five executables in a list | docs/Homebrew-and-Python.md | @@ -9,7 +9,12 @@ Homebrew provides formulae to brew a more up-to-date Python 2.7.x and 3.x.
**Important:** If you choose to install a Python which isn't either of these two (system Python or brewed Python), the Homebrew team can only provide limited support.
## Python 2.x or Python 3.x
-Homebrew provides a formula ... | false |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | CONTRIBUTING.md | @@ -5,7 +5,7 @@ First time contributing to Homebrew? Read our [Code of Conduct](https://github.c
* run `brew update` (twice)
* run and read `brew doctor`
-* read [the Troubleshooting Checklist](http://docs.brew.sh/Troubleshooting.html)
+* read [the Troubleshooting Checklist](https://docs.brew.sh/Troubleshooting.htm... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | Library/Homebrew/README.md | @@ -3,6 +3,6 @@ This is the (partially) documented public API for Homebrew.
The main class you should look at is the {Formula} class (and classes linked from there). That's the class that's used to create Homebrew formulae (i.e. package descriptions). Assume anything else you stumble upon is private.
-You may also... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | Library/Homebrew/cmd/analytics.rb | @@ -1,6 +1,6 @@
#: * `analytics` [`state`]:
#: Display anonymous user behaviour analytics state.
-#: Read more at <http://docs.brew.sh/Analytics.html>.
+#: Read more at <https://docs.brew.sh/Analytics.html>.
#:
#: * `analytics` (`on`|`off`):
#: Turn on/off Homebrew's analytics. | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | Library/Homebrew/cmd/help.rb | @@ -16,7 +16,7 @@
Developers:
brew create [URL [--no-fetch]]
brew edit [FORMULA...]
- http://docs.brew.sh/Formula-Cookbook.html
+ https://docs.brew.sh/Formula-Cookbook.html
Further help:
man brew | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | Library/Homebrew/cmd/info.rb | @@ -14,7 +14,7 @@
#: information on all installed formulae.
#:
#: See the docs for examples of using the JSON output:
-#: <http://docs.brew.sh/Querying-Brew.html>
+#: <https://docs.brew.sh/Querying-Brew.html>
require "missing_formula"
require "caveats" | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | Library/Homebrew/cmd/tap-info.rb | @@ -13,7 +13,7 @@
#: Pass `--installed` to get information on installed taps.
#:
#: See the docs for examples of using the JSON output:
-#: <http://docs.brew.sh/Querying-Brew.html>
+#: <https://docs.brew.sh/Querying-Brew.html>
require "tap"
| true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | Library/Homebrew/cmd/update-report.rb | @@ -35,7 +35,7 @@ def update_report
ohai "Homebrew has enabled anonymous aggregate user behaviour analytics."
puts <<-EOS.undent
#{Tty.bold}Read the analytics documentation (and how to opt-out) here:
- #{Formatter.url("http://docs.brew.sh/Analytics.html")}#{Tty.reset}
+ ... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | Library/Homebrew/dev-cmd/create.rb | @@ -166,7 +166,7 @@ def generate!
end
def template; <<-EOS.undent
- # Documentation: http://docs.brew.sh/Formula-Cookbook.html
+ # Documentation: https://docs.brew.sh/Formula-Cookbook.html
# http://www.rubydoc.info/github/Homebrew/brew/master/Formula
# PLEASE REMOVE ALL GENERATED ... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | Library/Homebrew/dev-cmd/tap-new.rb | @@ -39,7 +39,7 @@ def tap_new
```
## Documentation
- `brew help`, `man brew` or check [Homebrew's documentation](https://github.com/Homebrew/brew/tree/master/docs#readme).
+ `brew help`, `man brew` or check [Homebrew's documentation](https://docs.brew.sh).
EOS
write_path(tap, "README... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | Library/Homebrew/formula.rb | @@ -27,7 +27,7 @@
# @see SharedEnvExtension
# @see FileUtils
# @see Pathname
-# @see http://docs.brew.sh/Formula-Cookbook.html Formula Cookbook
+# @see https://docs.brew.sh/Formula-Cookbook.html Formula Cookbook
# @see https://github.com/styleguide/ruby Ruby Style Guide
#
# <pre>class Wget < Formula
@@ -2069,7 +2... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | Library/Homebrew/manpages/brew.1.md.erb | @@ -76,7 +76,7 @@ scripts that reside somewhere in the `PATH`, named `brew-`<cmdname> or
to create your own commands without modifying Homebrew's internals.
Instructions for creating your own commands can be found in the docs:
-<http://docs.brew.sh/External-Commands.html>
+<https://docs.brew.sh/External-Commands.ht... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | Library/Homebrew/missing_formula.rb | @@ -164,7 +164,7 @@ def deleted_reason(name, silent: false)
git -C "$(brew --repo #{tap})" show #{short_hash}^:#{relative_path}
If you still use this formula consider creating your own tap:
- http://docs.brew.sh/How-to-Create-and-Maintain-a-Tap.html
+ https://docs... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | Library/Homebrew/os.rb | @@ -17,7 +17,7 @@ def self.linux?
require "os/mac"
# Don't tell people to report issues on unsupported versions of macOS.
if !OS::Mac.prerelease? && !OS::Mac.outdated_release?
- ISSUES_URL = "http://docs.brew.sh/Troubleshooting.html".freeze
+ ISSUES_URL = "https://docs.brew.sh/Troubleshooting.h... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | Library/Homebrew/utils/analytics.rb | @@ -35,7 +35,7 @@ def report(type, metadata = {})
end
# Send analytics. Don't send or store any personally identifiable information.
- # http://docs.brew.sh/Analytics.html
+ # https://docs.brew.sh/Analytics.html
# https://developers.google.com/analytics/devguides/collection/pr... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | README.md | @@ -9,12 +9,12 @@ Features, usage and installation instructions are [summarised on the homepage](h
3. Or use `brew search --desc <keyword>` to browse packages from the command line.
## More Documentation
-`brew help`, `man brew` or check [our documentation](http://docs.brew.sh/).
+`brew help`, `man brew` or check [... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | docs/Common-Issues.md | @@ -80,7 +80,7 @@ When running `brew upgrade`, you see something like this:
$ brew upgrade
Error: undefined method `include?' for nil:NilClass
Please report this bug:
- https://github.com/Homebrew/brew/blob/master/docs/Troubleshooting.md
+ https://docs.brew.sh/Troubleshooting.html
/usr/local/Library/Homebrew/... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | docs/Formula-Cookbook.md | @@ -358,7 +358,7 @@ If you have already forked Homebrew on GitHub, then you can manually push (just
git push https://github.com/myname/homebrew-core/ <what-you-called-your-branch>
```
-Now, [open a pull request](http://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request.html) for your changes.
+Now, [open a pull reque... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | docs/Manpage.md | @@ -39,7 +39,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
* `analytics` [`state`]:
Display anonymous user behaviour analytics state.
- Read more at <http://docs.brew.sh/Analytics.html>.
+ Read more at <https://docs.brew.sh/Analytics.html>.
* `analytics` (`on`... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | docs/New-Maintainer-Checklist.md | @@ -34,9 +34,9 @@ A few requests:
own fork.
- if still in doubt please ask for help and we'll help you out
- please read:
- - http://docs.brew.sh/Brew-Test-Bot-For-Core-Contributors.html
- - http://docs.brew.sh/Maintainer-Guidelines.html
- - possibly everything else on http://docs.brew.sh
+ - https://d... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | docs/_layouts/index.html | @@ -115,7 +115,7 @@ <h2 id="question">{{ page.pagecontent.question }}</h2>
<div class="group row">
<h2 id="further-doc">{{ page.pagecontent.doc.further }}</h2>
<div class="button">
- <p><a href="http://docs.brew.sh/">docs.brew.sh</a></p>
+ <p><a href="https://docs.brew.sh/">do... | true |
Other | Homebrew | brew | baa61f5a6e105b9b89f5bef465848c72499cb960.json | Use https for all docs.brew.sh links.
May as well use the more secure link when possible. | manpages/brew.1 | @@ -45,7 +45,7 @@ Perform a substring search of formula names for \fItext\fR\. If \fItext\fR is su
.
.TP
\fBanalytics\fR [\fBstate\fR]
-Display anonymous user behaviour analytics state\. Read more at \fIhttp://docs\.brew\.sh/Analytics\.html\fR\.
+Display anonymous user behaviour analytics state\. Read more at \fIhtt... | true |
Other | Homebrew | brew | d6dd63d1a04cad16d2a6faa17a6d71e4baa8f95f.json | OS: use RbConfig instead of RUBY_PLATFORM
`RUBY_PLATFORM` is always `"java"` when running JRuby, no matter what is
the underlying platform.
See also https://github.com/pry/pry/issues/386. | Library/Homebrew/os.rb | @@ -1,12 +1,14 @@
+require "rbconfig"
+
module OS
def self.mac?
return false if ENV["HOMEBREW_TEST_GENERIC_OS"]
- RUBY_PLATFORM.to_s.downcase.include? "darwin"
+ RbConfig::CONFIG["host_os"].include? "darwin"
end
def self.linux?
return false if ENV["HOMEBREW_TEST_GENERIC_OS"]
- RUBY_PLATFO... | false |
Other | Homebrew | brew | a5fff4547f460642728c88dbad76267f83afa170.json | verion_spec: add test coverage for devel spec version style
also expand coverage for improved dash version style | Library/Homebrew/test/version_spec.rb | @@ -453,6 +453,17 @@
.to be_detected_from("https://example.com/dada-v2017-04-17.tar.gz")
end
+ specify "devel spec version style" do
+ expect(Version.create("1.3.0-beta.1"))
+ .to be_detected_from("https://registry.npmjs.org/@angular/cli/-/cli-1.3.0-beta.1.tgz")
+ expect(Version.crea... | false |
Other | Homebrew | brew | 1502e5b89780629bd5fc9d4d0e49a621c3be02fa.json | version: improve devel spec version parsing
term this 'devel spec version style';
also improve dash version style parsing | Library/Homebrew/version.rb | @@ -406,6 +406,14 @@ def self._parse(spec)
m = /[-_](\d+\.\d+(?:\.\d+)?(?:-\d+)?)[-_.](?:i[36]86|x86|x64(?:[-_](?:32|64))?)$/.match(stem)
return m.captures.first unless m.nil?
+ # devel spec
+ # e.g. https://registry.npmjs.org/@angular/cli/-/cli-1.3.0-beta.1.tgz
+ # e.g. https://github.com/dlang/dm... | false |
Other | Homebrew | brew | 5198e80724fa1ff5a95d2da3a111ad5e5d4e395d.json | cpu: fix SSE4 detection on Linux | Library/Homebrew/extend/os/linux/hardware/cpu.rb | @@ -84,14 +84,18 @@ def features
@features ||= flags[1..-1].map(&:intern)
end
- %w[aes altivec avx avx2 lm ssse3 sse4 sse4_2].each do |flag|
+ %w[aes altivec avx avx2 lm ssse3 sse4_2].each do |flag|
define_method(flag + "?") { flags.include? flag }
end
def sse3?
... | false |
Other | Homebrew | brew | 2d18ba586b3250062cd58c8f5af81fc30a35bb5f.json | Enable more deprecations.
It's been long enough that these have been commented out so let's
enable them globally. | Library/Homebrew/cask/lib/hbc/dsl.rb | @@ -204,9 +204,7 @@ def sha256(arg = nil)
end
def license(*)
- # TODO: Uncomment after `license` has been
- # removed from all official taps.
- # odeprecated "Hbc::DSL#license"
+ odeprecated "Hbc::DSL#license"
end
# depends_on uses a load method so that multiple stanzas... | true |
Other | Homebrew | brew | 2d18ba586b3250062cd58c8f5af81fc30a35bb5f.json | Enable more deprecations.
It's been long enough that these have been commented out so let's
enable them globally. | Library/Homebrew/compat/software_spec.rb | @@ -1,6 +1,6 @@
class BottleSpecification
def revision(*args)
- # odeprecated "BottleSpecification.revision", "BottleSpecification.rebuild"
+ odeprecated "BottleSpecification.revision", "BottleSpecification.rebuild"
rebuild(*args)
end
end | true |
Other | Homebrew | brew | 2d18ba586b3250062cd58c8f5af81fc30a35bb5f.json | Enable more deprecations.
It's been long enough that these have been commented out so let's
enable them globally. | Library/Homebrew/compat/utils.rb | @@ -1,8 +1,3 @@
-def shell_profile
- # odeprecated "shell_profile", "Utils::Shell.profile"
- Utils::Shell.profile
-end
-
module Tty
module_function
| true |
Other | Homebrew | brew | 2d18ba586b3250062cd58c8f5af81fc30a35bb5f.json | Enable more deprecations.
It's been long enough that these have been commented out so let's
enable them globally. | Library/Homebrew/formula.rb | @@ -2368,7 +2368,7 @@ def cxxstdlib_check(check_type)
# version '4.8.1'
# end</pre>
def fails_with(compiler, &block)
- # odeprecated "fails_with :llvm" if compiler == :llvm
+ odeprecated "fails_with :llvm" if compiler == :llvm
specs.each { |spec| spec.fails_with(compiler, &block) }
... | true |
Other | Homebrew | brew | 2d18ba586b3250062cd58c8f5af81fc30a35bb5f.json | Enable more deprecations.
It's been long enough that these have been commented out so let's
enable them globally. | Library/Homebrew/software_spec.rb | @@ -194,7 +194,7 @@ def patch(strip = :p1, src = nil, &block)
end
def fails_with(compiler, &block)
- # odeprecated "fails_with :llvm" if compiler == :llvm
+ odeprecated "fails_with :llvm" if compiler == :llvm
compiler_failures << CompilerFailure.create(compiler, &block)
end
| true |
Other | Homebrew | brew | 2d18ba586b3250062cd58c8f5af81fc30a35bb5f.json | Enable more deprecations.
It's been long enough that these have been commented out so let's
enable them globally. | Library/Homebrew/utils.rb | @@ -556,3 +556,7 @@ def with_env(hash)
ENV.update(old_values)
end
end
+
+def shell_profile
+ Utils::Shell.profile
+end | true |
Other | Homebrew | brew | 7a8c674cebc6c05e4132d6656db3ae415e60f3f7.json | docs: fix fallback fonts | docs/css/screen.scss | @@ -111,7 +111,7 @@ html {
margin: 0;
padding: 0;
font-size: 62.5%;
- font-family: "-apple-system", "BlinkMacSystemFont", "Helvetica Neue", "Roboto", "sans-serif";
+ font-family: "-apple-system", "BlinkMacSystemFont", "Helvetica Neue", "Roboto", sans-serif;
height: 100%;
}
@@ -176,7 +176,7 @@ pre {
... | false |
Other | Homebrew | brew | c6f8887deb892f9ad34cb70a97aa195d40b040e0.json | New-Maintainer-Checklist: use new mailing list. | docs/New-Maintainer-Checklist.md | @@ -49,7 +49,7 @@ If they accept, follow a few steps to get them set up:
- Ask them to sign in to [Bintray](https://bintray.com) using their GitHub account and they should auto-sync to [Bintray's Homebrew organisation](https://bintray.com/homebrew/organization/edit/members) as a member so they can publish new bottles
... | false |
Other | Homebrew | brew | 32b7e32856e61f256f2703faa17cdbcee26e17b7.json | formula: use env helper | Library/Homebrew/formula.rb | @@ -955,30 +955,27 @@ def run_post_install
build = self.build
self.build = Tab.for_formula(self)
- old_tmpdir = ENV["TMPDIR"]
- old_temp = ENV["TEMP"]
- old_tmp = ENV["TMP"]
- old_path = ENV["HOMEBREW_PATH"]
-
- ENV["TMPDIR"] = ENV["TEMP"] = ENV["TMP"] = HOMEBREW_TEMP
- ENV["HOMEBREW_PATH"... | false |
Other | Homebrew | brew | f08b5184816fdc99db8cd0dac1e4debbb2a8c14a.json | python_requirement: add libexec/bin to PATH.
This avoids having to fix formulae that use `python` to make them use
`python2`. | Library/Homebrew/requirements/python_requirement.rb | @@ -21,6 +21,7 @@ class PythonRequirement < Requirement
# Homebrew Python should take precedence over older Pythons in the PATH
elsif short_version != Version.create("2.7")
ENV.prepend_path "PATH", Formula["python"].opt_bin
+ ENV.prepend_path "PATH", Formula["python"].opt_libexec/"bin"
end
... | false |
Other | Homebrew | brew | 8b63214c2e7493903f40511a59aba4dd60419349.json | integration_test: try tests on Gem load failure.
This should help with debugging `Gem::LoadError`s (e.g. for
https://github.com/Homebrew/homebrew-test-bot/pull/111). | Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb | @@ -89,8 +89,14 @@ def brew(*args)
]
if ENV["HOMEBREW_TESTS_COVERAGE"]
simplecov_spec = Gem.loaded_specs["simplecov"]
- specs = simplecov_spec.runtime_dependencies.flat_map(&:to_specs)
- specs << simplecov_spec
+ specs = [simplecov_spec]
+ simplecov_spec.runtime_depend... | false |
Other | Homebrew | brew | 7957e1a7215464486bf559d66438e79df6e766ce.json | Add a suitable explanatory line | Library/Homebrew/cmd/install.rb | @@ -1,4 +1,4 @@
-#: * `install` [`--debug`] [`--env=`(`std`|`super`)] [`--ignore-dependencies`|`--only-dependencies`] [`--cc=`<compiler>] [`--build-from-source`|`--force-bottle`] [`--devel`|`--HEAD`] [`--keep-tmp`] [`--build-bottle`] <formula> [`install-options`]:
+#: * `install` [`--debug`] [`--env=`(`std`|`super`)]... | true |
Other | Homebrew | brew | 7957e1a7215464486bf559d66438e79df6e766ce.json | Add a suitable explanatory line | docs/Manpage.md | @@ -198,7 +198,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
See the docs for examples of using the JSON output:
<http://docs.brew.sh/Querying-Brew.html>
- * `install` [`--debug`] [`--env=`(`std`|`super`)] [`--ignore-dependencies`|`--only-dependencies`] [`--cc=``compi... | true |
Other | Homebrew | brew | 7957e1a7215464486bf559d66438e79df6e766ce.json | Add a suitable explanatory line | manpages/brew.1 | @@ -216,7 +216,7 @@ Pass \fB\-\-all\fR to get information on all formulae, or \fB\-\-installed\fR to
See the docs for examples of using the JSON output: \fIhttp://docs\.brew\.sh/Querying\-Brew\.html\fR
.
.TP
-\fBinstall\fR [\fB\-\-debug\fR] [\fB\-\-env=\fR(\fBstd\fR|\fBsuper\fR)] [\fB\-\-ignore\-dependencies\fR|\fB\... | true |
Other | Homebrew | brew | 66f1b179427335a103d9aafdacee8f577cc66d4f.json | python_virtualenv_constants: update virtualenv to 15.1.0
This release adds support for Python 3.6, the current python3
version in homebrew/core. | Library/Homebrew/language/python_virtualenv_constants.rb | @@ -1,2 +1,2 @@
-PYTHON_VIRTUALENV_URL = "https://files.pythonhosted.org/packages/5c/79/5dae7494b9f5ed061cff9a8ab8d6e1f02db352f3facf907d9eb614fb80e9/virtualenv-15.0.2.tar.gz".freeze
-PYTHON_VIRTUALENV_SHA256 = "fab40f32d9ad298fba04a260f3073505a16d52539a84843cf8c8369d4fd17167".freeze
+PYTHON_VIRTUALENV_URL = "https://fi... | false |
Other | Homebrew | brew | 53a677aba6f28a148c9950cfde7f73fda5cdf81f.json | sandbox: allow write access to /dev/random
This avoids build failure for `root6`.
MacPorts currently avoids the failure with a patch, as their sandbox
doesn't yet allow write access to `/dev/random` either:
https://github.com/macports/macports-ports/blob/7792b2c5655f9d2adb979434a242cc3ac60fea40/science/root6/Portfile... | Library/Homebrew/sandbox.rb | @@ -156,6 +156,7 @@ class SandboxProfile
(literal "/dev/ptmx")
(literal "/dev/dtracehelper")
(literal "/dev/null")
+ (literal "/dev/random")
(literal "/dev/zero")
(regex #"^/dev/fd/[0-9]+$")
(regex #"^/dev/ttys?[0-9]*$") | false |
Other | Homebrew | brew | cabb7e898aaf56404bc692b4cfae5ede7914f78c.json | integration_test: add simplecov libs when needed.
Don't add these unconditionally or with Bundler to speed things up a
bit. Also, to speed things up further cache these arguments so we don't
have to do the same generation every time. | Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb | @@ -80,18 +80,34 @@ def brew(*args)
"GEM_HOME" => nil,
)
- ruby_args = [
- "-W0",
- "-I", "#{HOMEBREW_LIBRARY_PATH}/test/support/lib",
- "-I", HOMEBREW_LIBRARY_PATH.to_s,
- "-rconfig"
- ]
- ruby_args << "-rsimplecov" if ENV["HOMEBREW_TESTS_COVERAGE"]
- ruby_args << "-rtest/... | false |
Other | Homebrew | brew | 4e26fdfcf6922dca9a82b15697b4c76c6bf9212b.json | Add test for non-TTY `brew cask search`. | Library/Homebrew/test/cask/cli/search_spec.rb | @@ -13,6 +13,15 @@
EOS
end
+ it "outputs a plain list when stdout is not a TTY" do
+ expect {
+ Hbc::CLI::Search.run("local")
+ }.to output(<<-EOS.undent).to_stdout
+ local-caffeine
+ local-transmission
+ EOS
+ end
+
it "shows that there are no Casks matching a search term that di... | true |
Other | Homebrew | brew | 4e26fdfcf6922dca9a82b15697b4c76c6bf9212b.json | Add test for non-TTY `brew cask search`. | Library/Homebrew/test/support/helper/output_as_tty.rb | @@ -3,14 +3,6 @@
module Test
module Helper
module OutputAsTTY
- module TTYTrue
- def tty?
- true
- end
-
- alias isatty tty?
- end
-
# This is a custom wrapper for the `output` matcher,
# used for testing output to a TTY:
#
@@ -26,41 +18,33 @@ class ... | true |
Other | Homebrew | brew | 491bb469e75c772d897c29645453a0988a1c7a4a.json | Add example links in Python for Formula Authors | docs/Python-for-Formula-Authors.md | @@ -2,13 +2,13 @@
This document explains how to successfully use Python in a Homebrew formula.
-Homebrew draws a distinction between Python **applications** and Python **libraries**. The difference is that users generally do not care that applications are written in Python; it is unusual that a user would expect t... | false |
Other | Homebrew | brew | dccdac55a835a22d46c36fe915e6e8cdf43a4adc.json | Add helper for testing TTY output. | Library/Homebrew/test/cask/cli/search_spec.rb | @@ -1,12 +1,12 @@
describe Hbc::CLI::Search, :cask do
before(:each) do
- allow($stdout).to receive(:tty?).and_return(true)
+ allow(Tty).to receive(:width).and_return(0)
end
it "lists the available Casks that match the search term" do
expect {
Hbc::CLI::Search.run("local")
- }.to output(... | true |
Other | Homebrew | brew | dccdac55a835a22d46c36fe915e6e8cdf43a4adc.json | Add helper for testing TTY output. | Library/Homebrew/test/spec_helper.rb | @@ -23,6 +23,7 @@
require "test/support/helper/fixtures"
require "test/support/helper/formula"
require "test/support/helper/mktmpdir"
+require "test/support/helper/output_as_tty"
require "test/support/helper/rubocop"
require "test/support/helper/spec/shared_context/homebrew_cask" if OS.mac?
@@ -45,6 +46,7 @@
... | true |
Other | Homebrew | brew | dccdac55a835a22d46c36fe915e6e8cdf43a4adc.json | Add helper for testing TTY output. | Library/Homebrew/test/support/helper/output_as_tty.rb | @@ -0,0 +1,99 @@
+require "delegate"
+
+module Test
+ module Helper
+ module OutputAsTTY
+ module TTYTrue
+ def tty?
+ true
+ end
+
+ alias isatty tty?
+ end
+
+ # This is a custom wrapper for the `output` matcher,
+ # used for testing output to a TTY:
+ #
+ ... | true |
Other | Homebrew | brew | 0b69ca85f763bb0db210384ba2c4a93049bb7b35.json | spec_helper: add focus support.
When adding `, :focus` as a trailing argument to a `describe` or `it`
this allows you to only run that single test. | Library/Homebrew/test/spec_helper.rb | @@ -41,6 +41,8 @@
RSpec.configure do |config|
config.order = :random
+ config.filter_run_when_matching :focus
+
config.include(Test::Helper::Shutup)
config.include(Test::Helper::Fixtures)
config.include(Test::Helper::Formula) | false |
Other | Homebrew | brew | d9e0a0bce6f76f4c52286b70d39131b8351a7c5e.json | rubocop.yml: remove doublenegation disable. | Library/Homebrew/.rubocop.yml | @@ -33,10 +33,6 @@ Style/BlockDelimiters:
Exclude:
- '**/*_spec.rb'
-# used idiomatically to return boolean values
-Style/DoubleNegation:
- Enabled: false
-
# so many of these in formulae but none in here
Style/GuardClause:
Enabled: true | false |
Other | Homebrew | brew | 04d0d384357331877c2cb78132be066233ea7046.json | Fix a broken link | docs/Installation.md | @@ -44,7 +44,7 @@ Uninstallation is documented in the [FAQ](FAQ.md).
<a name="1"><sup>1</sup></a> Not all formulae have CPU or OS requirements, but
you can assume you will have trouble if you don’t conform. Also, you can find
PowerPC and Tiger branches from other users in the fork network. See
-[Interesting Taps & F... | false |
Other | Homebrew | brew | 5ab745574cd951e5e3be018f7872004f78ef624f.json | cpu: fix SSE3 detection on Linux | Library/Homebrew/extend/os/linux/hardware/cpu.rb | @@ -84,9 +84,14 @@ def features
@features ||= flags[1..-1].map(&:intern)
end
- %w[aes altivec avx avx2 lm sse3 ssse3 sse4 sse4_2].each do |flag|
+ %w[aes altivec avx avx2 lm ssse3 sse4 sse4_2].each do |flag|
define_method(flag + "?") { flags.include? flag }
end
+
+ def s... | false |
Other | Homebrew | brew | 31ca5c9aed3bd3254b8152385c5baf2e95160930.json | docs/config: add missing feed plugin. | docs/_config.yml | @@ -12,5 +12,6 @@ lsi: false
highlighter: rouge
gems:
+ - jekyll-feed
- jekyll-sitemap
- jekyll-seo-tag | false |
Other | Homebrew | brew | f87fadd4ee7a5f157df6813c233b9e8684a66a4b.json | version: improve parsing of url-only, non-filename versions
add support for styles prefixed with a r,v,V and an optional _ ,
and styles with four groups of digits, seperated by periods;
combinations of the two are also supported | Library/Homebrew/version.rb | @@ -407,8 +407,13 @@ def self._parse(spec)
# e.g. http://mirrors.jenkins-ci.org/war/1.486/jenkins.war
# e.g. https://github.com/foo/bar/releases/download/0.10.11/bar.phar
- m = %r{/(\d\.\d+(\.\d+)?)}.match(spec_s)
- return m.captures.first unless m.nil?
+ # e.g. https://github.com/clojure/clojuresc... | false |
Other | Homebrew | brew | 02113e2714aae818ee2c43e203137b3cd0b61ced.json | language/node: build native addons from source
By telling node-pre-gyp and prebuild to don't pull prebuild binaries and
instead build them from source. This still may not work for some custom
third party scripts for pulling prebuild binaries. | Library/Homebrew/language/node.rb | @@ -44,6 +44,7 @@ def self.std_npm_install_args(libexec)
%W[
-ddd
--global
+ --build-from-source
--prefix=#{libexec}
#{Dir.pwd}/#{pack}
]
@@ -52,7 +53,10 @@ def self.std_npm_install_args(libexec)
def self.local_npm_install_args
setup_npm_environment
... | true |
Other | Homebrew | brew | 02113e2714aae818ee2c43e203137b3cd0b61ced.json | language/node: build native addons from source
By telling node-pre-gyp and prebuild to don't pull prebuild binaries and
instead build them from source. This still may not work for some custom
third party scripts for pulling prebuild binaries. | Library/Homebrew/test/language/node_spec.rb | @@ -41,6 +41,6 @@
specify "#local_npm_install_args" do
resp = subject.local_npm_install_args
- expect(resp).to include("-ddd")
+ expect(resp).to include("-ddd", "--build-from-source")
end
end | true |
Other | Homebrew | brew | 7013f9dee3ea3e05e0fd51ee6ef0f19e5656176a.json | formula_desc_cop: allow formula name in desc
except at the very beginning, as the audit originally intended.
See https://github.com/Homebrew/legacy-homebrew/pull/45493. | Library/Homebrew/rubocops/formula_desc_cop.rb | @@ -72,9 +72,9 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
problem "Description should start with a capital letter"
end
- # Check if formula's name is used in formula's desc
- return unless regex_match_group(desc, /(^|[^a-z])#{@formula_name}([^a-z]... | true |
Other | Homebrew | brew | 7013f9dee3ea3e05e0fd51ee6ef0f19e5656176a.json | formula_desc_cop: allow formula name in desc
except at the very beginning, as the audit originally intended.
See https://github.com/Homebrew/legacy-homebrew/pull/45493. | Library/Homebrew/test/rubocops/formula_desc_cop_spec.rb | @@ -146,11 +146,11 @@ class Foo < Formula
source = <<-EOS.undent
class Foo < Formula
url 'http://example.com/foo-1.0.tgz'
- desc 'Foo: foobar'
+ desc 'Foo is a foobar'
end
EOS
- expected_offenses = [{ message: "Description shouldn't include the formula... | true |
Other | Homebrew | brew | 3701b11e42a93ee9c1bb94f326ee186d4416501c.json | Fix unshallowing taps in `bump-formula-pr`
Never try to unhshallow full clones. | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -286,8 +286,11 @@ def bump_formula_pr
formula.path.parent.cd do
branch = "#{formula.name}-#{new_formula_version}"
+ git_dir = Utils.popen_read("git rev-parse --git-dir")
+ shallow = !git_dir.empty? && File.exist?("#{git_dir}/shallow")
+
if ARGV.dry_run?
- ohai "git fetch --unsha... | false |
Other | Homebrew | brew | 700b5e2738fad9aa576df25d494e1d7e69962326.json | Add PreToken composite | Library/Homebrew/test/version_spec.rb | @@ -93,6 +93,21 @@
expect(Version.create("1.2.3beta2")).to be < Version.create("1.2.3-p34")
end
+ specify "comparing pre versions" do
+ expect(Version.create("1.2.3pre9")).to be == Version.create("1.2.3PRE9")
+ expect(Version.create("1.2.3pre9")).to be > Version.create("1.2.3pre8")
+ expect(Version.... | true |
Other | Homebrew | brew | 700b5e2738fad9aa576df25d494e1d7e69962326.json | Add PreToken composite | Library/Homebrew/version.rb | @@ -36,7 +36,7 @@ def <=>(other)
0
when NumericToken
other.value.zero? ? 0 : -1
- when AlphaToken, BetaToken, RCToken
+ when AlphaToken, BetaToken, PreToken, RCToken
1
else
-1
@@ -103,6 +103,8 @@ def <=>(other)
case other
when AlphaToken
... | true |
Other | Homebrew | brew | c45cca8e36401f6d95d851befef35879a5629182.json | test: simplify minitest inclusion.
The previous version seems needlessly complicated given we only support
a single Ruby version. It was also blowing up on Bundler 1.15.X. | Library/Homebrew/dev-cmd/test.rb | @@ -83,7 +83,7 @@ def test
exec(*args)
end
end
- rescue Assertions::FailedAssertion => e
+ rescue MiniTest::Assertion => e
ofail "#{f.full_name}: failed"
puts e.message
rescue Exception => e | true |
Other | Homebrew | brew | c45cca8e36401f6d95d851befef35879a5629182.json | test: simplify minitest inclusion.
The previous version seems needlessly complicated given we only support
a single Ruby version. It was also blowing up on Bundler 1.15.X. | Library/Homebrew/formula_assertions.rb | @@ -1,26 +1,6 @@
module Homebrew
module Assertions
- if defined?(Gem)
- begin
- gem "minitest", "< 5.0.0"
- rescue Gem::LoadError
- require "test/unit/assertions"
- else
- require "minitest/unit"
- require "test/unit/assertions"
- end
- else
- require "test... | true |
Other | Homebrew | brew | cbf89e50bb948989f3f19ed92f3251283a918e4b.json | software_spec: define recursive deps and reqs | Library/Homebrew/software_spec.rb | @@ -161,10 +161,24 @@ def deps
dependency_collector.deps
end
+ def recursive_dependencies
+ recursive_dependencies = deps
+ deps.map(&:to_formula).compact.uniq.each do |f|
+ f.recursive_dependencies.each do |dep|
+ recursive_dependencies << dep unless recursive_dependencies.include?(dep)
+ ... | false |
Other | Homebrew | brew | fc739bf82e263b54dca30713388f3ffd712aba6a.json | Add `trash` util. | Library/Homebrew/test/utils/trash_spec.rb | @@ -0,0 +1,32 @@
+require "open3"
+
+describe "trash", :needs_macos do
+ let(:executable) { HOMEBREW_LIBRARY_PATH/"utils/trash.swift" }
+ let(:dir) { mktmpdir }
+ let(:file) { dir/"new_file" }
+
+ it "moves existing files to the trash" do
+ FileUtils.touch file
+
+ expect(file).to exist
+
+ out, err, statu... | true |
Other | Homebrew | brew | fc739bf82e263b54dca30713388f3ffd712aba6a.json | Add `trash` util. | Library/Homebrew/utils/trash.swift | @@ -0,0 +1,43 @@
+#!/usr/bin/swift
+
+import Cocoa
+
+DispatchQueue.main.async {
+ let arguments = CommandLine.arguments.dropFirst().filter { !$0.isEmpty }
+ let URLs = arguments.map { URL(fileURLWithPath: $0) }
+
+ #if swift(>=4.0)
+ let workspace = NSWorkspace.shared
+ #else
+ let workspace = NSWorkspace.shared... | true |
Other | Homebrew | brew | b5a0cfd86180790b0071becc744a2da2fda3703e.json | rubocops: use consistent (_)body_node parameter name | Library/Homebrew/rubocops/bottle_block_cop.rb | @@ -10,8 +10,8 @@ module FormulaAuditStrict
class BottleBlock < FormulaCop
MSG = "Use rebuild instead of revision in bottle block".freeze
- def audit_formula(_node, _class_node, _parent_class_node, formula_class_body_node)
- bottle = find_block(formula_class_body_node, :bottle)
+ ... | true |
Other | Homebrew | brew | b5a0cfd86180790b0071becc744a2da2fda3703e.json | rubocops: use consistent (_)body_node parameter name | Library/Homebrew/rubocops/components_order_cop.rb | @@ -8,7 +8,7 @@ module FormulaAuditStrict
# - component_precedence_list has component hierarchy in a nested list
# where each sub array contains components' details which are at same precedence level
class ComponentsOrder < FormulaCop
- def audit_formula(_node, _class_node, _parent_class_n... | true |
Other | Homebrew | brew | b5a0cfd86180790b0071becc744a2da2fda3703e.json | rubocops: use consistent (_)body_node parameter name | Library/Homebrew/rubocops/components_redundancy_cop.rb | @@ -13,19 +13,19 @@ class ComponentsRedundancy < FormulaCop
HEAD_MSG = "`head` and `head do` should not be simultaneously present".freeze
BOTTLE_MSG = "`bottle :modifier` and `bottle do` should not be simultaneously present".freeze
- def audit_formula(_node, _class_node, _parent_class_node, f... | true |
Other | Homebrew | brew | b5a0cfd86180790b0071becc744a2da2fda3703e.json | rubocops: use consistent (_)body_node parameter name | Library/Homebrew/rubocops/formula_desc_cop.rb | @@ -9,8 +9,8 @@ module FormulaAuditStrict
# - Checks for existence of `desc`
# - Checks if size of `desc` > 80
class DescLength < FormulaCop
- def audit_formula(_node, _class_node, _parent_class_node, body)
- desc_call = find_node_method_by_name(body, :desc)
+ def audit_formu... | true |
Other | Homebrew | brew | b5a0cfd86180790b0071becc744a2da2fda3703e.json | rubocops: use consistent (_)body_node parameter name | Library/Homebrew/rubocops/homepage_cop.rb | @@ -5,8 +5,8 @@ module Cop
module FormulaAudit
# This cop audits `homepage` url in Formulae
class Homepage < FormulaCop
- def audit_formula(_node, _class_node, _parent_class_node, formula_class_body_node)
- homepage_node = find_node_method_by_name(formula_class_body_node, :homepage)
+... | true |
Other | Homebrew | brew | 47fe2149638a85bc956593c12abd5aa5bb15452c.json | linkage_checker: Add harmless dylibs check.
While the linkage checker should normally report all broken links,
there are a few cases where broken links are harmless. One case
is when a the PPC slice of a program links to a PPC-only library
that no longer exists on x86_64 OS X. Since the PPC slice is never
loaded on mo... | Library/Homebrew/os/mac/linkage_checker.rb | @@ -36,6 +36,7 @@ def check_dylibs
rescue NotAKegError
@system_dylibs << dylib
rescue Errno::ENOENT
+ next if harmless_broken_link?(dylib)
@broken_dylibs << dylib
else
tap = Tab.for_keg(owner).tap
@@ -114,6 +115,14 @@ def undeclared_deps... | false |
Other | Homebrew | brew | 77da75e7d6ecc2ca749eb939d8e24ad9e3dfc5e1.json | Simplify Checksum cop by auditing all checksums | Library/Homebrew/rubocops/checksum_cop.rb | @@ -5,55 +5,48 @@ module Cop
module FormulaAudit
class Checksum < FormulaCop
def audit_formula(_node, _class_node, _parent_class_node, body_node)
- %w[stable devel head].each do |name|
- next unless spec_node = find_block(body_node, name.to_sym)
- _, _, spec_body = *s... | true |
Other | Homebrew | brew | 77da75e7d6ecc2ca749eb939d8e24ad9e3dfc5e1.json | Simplify Checksum cop by auditing all checksums | Library/Homebrew/test/rubocops/checksum_cop_spec.rb | @@ -23,15 +23,15 @@ class Foo < Formula
end
EOS
- expected_offenses = [{ message: "stable: sha256 is empty",
+ expected_offenses = [{ message: "sha256 is empty",
severity: :convention,
line: 5,
- col... | true |
Other | Homebrew | brew | 1e7bff808180a35da545630ad75a6fab31cf7da5.json | Remove reference to link_scripts.
Closes #2740. | docs/Python-for-Formula-Authors.md | @@ -98,14 +98,12 @@ def install
venv = virtualenv_create(libexec)
# Install all of the resources declared on the formula into the virtualenv.
venv.pip_install resources
- # `link_scripts` takes a look at the virtualenv's bin directory before and
- # after executing the block which is passed into it. If the b... | false |
Other | Homebrew | brew | dcb85571ca468a573c5ac4f76752ec7e732d9e82.json | Add test for `--language` option. | Library/Homebrew/test/cask/cli_spec.rb | @@ -1,10 +1,10 @@
describe Hbc::CLI, :cask do
it "lists the taps for Casks that show up in two taps" do
- listing = Hbc::CLI.nice_listing(%w[
- caskroom/cask/adium
- caskroom/cask/google-chrome
- passco... | false |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb | @@ -41,6 +41,43 @@ def self.run(*args)
def initialize(*args)
@args = process_arguments(*args)
end
+
+ def self.warn_unavailable_with_suggestion(cask_token, e)
+ exact_match, partial_matches = Search.search(cask_token)
+ error_message = e.message
+ if exact_match
+ ... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/audit.rb | @@ -9,11 +9,8 @@ def self.help
end
def run
- casks_to_audit = args.empty? ? Hbc.all : args.map(&CaskLoader.public_method(:load))
-
- failed_casks = casks_to_audit.reject do |cask|
- audit(cask)
- end
+ failed_casks = casks(alternative: -> { Hbc.all })
+ ... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/cat.rb | @@ -7,10 +7,12 @@ def initialize(*)
end
def run
- args.each do |cask_token|
- cask_path = CaskLoader.path(cask_token)
- raise CaskUnavailableError, cask_token.to_s unless cask_path.exist?
- puts File.open(cask_path, &:read)
+ raise CaskError, "Cat incomplete." if... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/cleanup.rb | @@ -20,7 +20,7 @@ def initialize(*args, cache_location: Hbc.cache)
end
def run
- remove_cache_files(*@args)
+ remove_cache_files(*args)
end
def cache_files | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/edit.rb | @@ -9,10 +9,12 @@ def initialize(*)
def run
cask_token = args.first
- cask_path = CaskLoader.path(cask_token)
-
- unless cask_path.exist?
- raise CaskUnavailableError.new(cask_token, "Run #{Formatter.identifier("brew cask create #{cask_token}")} to create a new Cask.")
+ ... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/fetch.rb | @@ -9,9 +9,12 @@ def initialize(*)
end
def run
- args.each do |cask_token|
- ohai "Downloading external files for Cask #{cask_token}"
- cask = CaskLoader.load(cask_token)
+ raise CaskError, "Fetch incomplete." if fetch_casks == :incomplete
+ end
+
+ def fetch_ca... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/home.rb | @@ -2,9 +2,7 @@ module Hbc
class CLI
class Home < AbstractCommand
def run
- casks = args.map(&CaskLoader.public_method(:load))
-
- if casks.empty?
+ if casks.none?
odebug "Opening project homepage"
self.class.open_url "https://caskroom.github.io/"
else | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/info.rb | @@ -7,10 +7,8 @@ def initialize(*)
end
def run
- args.each do |cask_token|
- odebug "Getting info for Cask #{cask_token}"
- cask = CaskLoader.load(cask_token)
-
+ casks.each do |cask|
+ odebug "Getting info for Cask #{cask}"
self.class.info(cask)
... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/install.rb | @@ -10,47 +10,21 @@ def initialize(*)
end
def run
- retval = install_casks
- # retval is ternary: true/false/nil
-
- raise CaskError, "nothing to install" if retval.nil?
- raise CaskError, "install incomplete" unless retval
+ raise CaskError, "Install incomplete." if i... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/internal_dump.rb | @@ -7,25 +7,11 @@ def initialize(*)
end
def run
- retval = dump_casks
- # retval is ternary: true/false/nil
-
- raise CaskError, "nothing to dump" if retval.nil?
- raise CaskError, "dump incomplete" unless retval
+ raise CaskError, "Dump incomplete." if dump_casks == :... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb | @@ -72,52 +72,36 @@ def initialize(*)
end
def run
- retval = print_stanzas
- # retval is ternary: true/false/nil
- if retval.nil?
- exit 1 if quiet?
- raise CaskError, "nothing to print"
- elsif !retval
- exit 1 if quiet?
- raise CaskError,... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/list.rb | @@ -11,44 +11,22 @@ class List < AbstractCommand
def run
retval = args.any? ? list : list_installed
- # retval is ternary: true/false/nil
- if retval.nil? && args.none?
- opoo "nothing to list" # special case: avoid exit code
- elsif retval.nil?
- raise CaskError... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/outdated.rb | @@ -10,9 +10,7 @@ def initialize(*)
end
def run
- casks_to_check = args.empty? ? Hbc.installed : args.map(&CaskLoader.public_method(:load))
-
- casks_to_check.each do |cask|
+ casks(alternative: -> { Hbc.installed }).each do |cask|
odebug "Checking update info of Cask #{c... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/reinstall.rb | @@ -2,27 +2,13 @@ module Hbc
class CLI
class Reinstall < Install
def install_casks
- count = 0
- args.each do |cask_token|
- begin
- cask = CaskLoader.load(cask_token)
-
- Installer.new(cask,
- binaries: binaries?,
- ... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/style.rb | @@ -31,7 +31,7 @@ def cask_paths
elsif args.any? { |file| File.exist?(file) }
args
else
- args.map { |token| CaskLoader.path(token) }
+ casks.map(&:sourcefile_path)
end
end
| true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/uninstall.rb | @@ -9,9 +9,12 @@ def initialize(*)
end
def run
- args.each do |cask_token|
- odebug "Uninstalling Cask #{cask_token}"
- cask = CaskLoader.load(cask_token)
+ raise CaskError, "Uninstall incomplete." if uninstall_casks == :incomplete
+ end
+
+ def uninstall_casks
... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/cask/lib/hbc/cli/zap.rb | @@ -7,9 +7,12 @@ def initialize(*)
end
def run
- args.each do |cask_token|
- odebug "Zapping Cask #{cask_token}"
- cask = CaskLoader.load(cask_token)
+ raise CaskError, "Zap incomplete." if zap_casks == :incomplete
+ end
+
+ def zap_casks
+ casks.each do ... | true |
Other | Homebrew | brew | 9c8f7138f35625878e017559c896441fda6f357c.json | Add `casks` method to iterate through arguments. | Library/Homebrew/test/cask/cli/audit_spec.rb | @@ -1,5 +1,5 @@
describe Hbc::CLI::Audit, :cask do
- let(:cask) { double }
+ let(:cask) { double("cask", token: nil) }
describe "selection of Casks to audit" do
it "audits all Casks if no tokens are given" do | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.