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 | cc8f029f222a618eb30b585ccb22efcce1e5cf91.json | secure urls + remove -k from in-doc curl command | Library/Homebrew/vendor/macho/macho/utils.rb | @@ -5,7 +5,7 @@ module Utils
# @param value [Fixnum] the number being rounded
# @param round [Fixnum] the number being rounded with
# @return [Fixnum] the rounded value
- # @see http://www.opensource.apple.com/source/cctools/cctools-870/libstuff/rnd.c
+ # @see https://www.opensource.apple.com/sourc... | true |
Other | Homebrew | brew | cc8f029f222a618eb30b585ccb22efcce1e5cf91.json | secure urls + remove -k from in-doc curl command | Library/Homebrew/version.rb | @@ -360,8 +360,8 @@ def self._parse(spec)
m = /-((?:\d+\.)*\d+-(?:alpha|beta|rc)\d*)$/.match(stem)
return m.captures.first unless m.nil?
- # e.g. http://ftpmirror.gnu.org/libidn/libidn-1.29-win64.zip
- # e.g. http://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-0.9.17-w32.zip
+ # e.g. https://ftpmi... | true |
Other | Homebrew | brew | cc8f029f222a618eb30b585ccb22efcce1e5cf91.json | secure urls + remove -k from in-doc curl command | docs/Gems,-Eggs-and-Perl-Modules.md | @@ -131,7 +131,7 @@ If you don’t even want (or can’t) use sudo for bootstrapping
Another alternative is to use `perlbrew` to install a separate copy of Perl in your home directory, or wherever you like :
```bash
-curl -kL http://install.perlbrew.pl | bash
+curl -L https://install.perlbrew.pl | bash
perlbrew instal... | true |
Other | Homebrew | brew | cc8f029f222a618eb30b585ccb22efcce1e5cf91.json | secure urls + remove -k from in-doc curl command | docs/Python-for-Formula-Authors.md | @@ -213,7 +213,7 @@ Distribute (not to be confused with distutils) is an obsolete fork of setuptools
## What is `--single-version-externally-managed`?
-`--single-version-externally-managed` ("SVEM") is a setuptools-only [argument to setup.py install](http://setuptools.readthedocs.io/en/latest/setuptools.html?#inst... | true |
Other | Homebrew | brew | cc8f029f222a618eb30b585ccb22efcce1e5cf91.json | secure urls + remove -k from in-doc curl command | 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="http://docs.brew.sh/">docs... | true |
Other | Homebrew | brew | cc8f029f222a618eb30b585ccb22efcce1e5cf91.json | secure urls + remove -k from in-doc curl command | docs/brew.1.html | @@ -592,7 +592,7 @@ <h2 id="DEVELOPER-COMMANDS">DEVELOPER COMMANDS</h2>
<p> ~ The URL of a commit on GitHub</p>
-<p> ~ A "http://bot.brew.sh/job/..." string specifying a testing job ID</p>
+<p> ~ A "https://bot.brew.sh/job/..." string specifying a testing job ID</p>
<p>If <code>--bottle</code> is passed, han... | true |
Other | Homebrew | brew | cc8f029f222a618eb30b585ccb22efcce1e5cf91.json | secure urls + remove -k from in-doc curl command | manpages/brew-cask.1 | @@ -67,7 +67,7 @@ Download remote application files for the given Cask to the local cache\. With \
Display the homepage associated with a given Cask in a browser\.
.
.IP
-With no arguments, display the project page \fIhttp://caskroom\.github\.io\fR\.
+With no arguments, display the project page \fIhttps://caskroom\.... | true |
Other | Homebrew | brew | cc8f029f222a618eb30b585ccb22efcce1e5cf91.json | secure urls + remove -k from in-doc curl command | manpages/brew.1 | @@ -786,7 +786,7 @@ Each \fIpatch\-source\fR may be one of:
~ The URL of a commit on GitHub
.
.IP
-~ A "http://bot\.brew\.sh/job/\.\.\." string specifying a testing job ID
+~ A "https://bot\.brew\.sh/job/\.\.\." string specifying a testing job ID
.
.IP
If \fB\-\-bottle\fR is passed, handle bottles, pulling the bo... | true |
Other | Homebrew | brew | f6b1f88c3c7715a72a2dbd8ec9a7359450909747.json | Update RuboCop-Cask to 0.12.0. | Library/Homebrew/constants.rb | @@ -1,3 +1,3 @@
# RuboCop version used for `brew style` and `brew cask style`
HOMEBREW_RUBOCOP_VERSION = "0.47.1".freeze
-HOMEBREW_RUBOCOP_CASK_VERSION = "~> 0.11.0".freeze # has to be updated when RuboCop version changes
+HOMEBREW_RUBOCOP_CASK_VERSION = "~> 0.12.0".freeze # has to be updated when RuboCop version cha... | false |
Other | Homebrew | brew | c0468a3266ca173cb1e04a764bcc205a88957bba.json | docs: add markers to ordered lists and sublists
While GitHub allows a single space to denote a sublist, Jekyll is not
so lenient. It also seems unable to handle ordered sublists. | docs/How-To-Open-a-Homebrew-Pull-Request.md | @@ -12,18 +12,18 @@ Depending on the change you want to make, you need to send the pull request to t
### Core `brew` code related pull request
1. [Fork the Homebrew/brew repository on GitHub](https://github.com/Homebrew/brew/fork).
- * This creates a personal remote repository that you can push to. This is needed b... | true |
Other | Homebrew | brew | c0468a3266ca173cb1e04a764bcc205a88957bba.json | docs: add markers to ordered lists and sublists
While GitHub allows a single space to denote a sublist, Jekyll is not
so lenient. It also seems unable to handle ordered sublists. | docs/Prose-Style-Guidelines.md | @@ -28,7 +28,7 @@ We prefer:
* British/Commonwealth English over American English, in general
* "e.g." and "i.e.": Go ahead and use "e.g." or "i.e." instead of spelling them out. Don't worry about putting a comma after them.
- * "e.g." means "for example"; "i.e." means "that is"
+ * "e.g." means "for example"; "i.... | true |
Other | Homebrew | brew | c0468a3266ca173cb1e04a764bcc205a88957bba.json | docs: add markers to ordered lists and sublists
While GitHub allows a single space to denote a sublist, Jekyll is not
so lenient. It also seems unable to handle ordered sublists. | docs/css/screen.css | @@ -158,8 +158,12 @@ pre code {
box-shadow: 0 -1px 0 rgba(0,0,0,0.5);
}
+#home ol, #page ol, .postcontent ol {
+ list-style: decimal;
+}
+
#home ul, #page ul, .postcontent ul {
- list-style: inherit;
+ list-style: disc;
}
#home h1, #page h1 { | true |
Other | Homebrew | brew | 282622e449e640a61361890296eee46d880f77a3.json | update: stop autoupdate skipping no formula taps.
This will be slightly slower if you have a bunch of non-formula (i.e.
command or cask) taps but it avoids the confusion of having Homebrew
saying it's updated when it only did so selectively.
Fixes #1946. | Library/Homebrew/cmd/update.sh | @@ -458,14 +458,6 @@ EOS
then
# Skip taps checked/fetched recently
[[ -n "$(find "$DIR/.git/FETCH_HEAD" -type f -mtime -"${HOMEBREW_AUTO_UPDATE_SECS}"s 2>/dev/null)" ]] && exit
-
- # Skip taps without formulae (but always update Homebrew/brew and Homebrew/homebrew-core)
- if [[ "$... | false |
Other | Homebrew | brew | 31d7d6e5f3ec88ffbaf8aa86ac6239e79cd9d160.json | Remove old metadata when installing with `--force`. | Library/Homebrew/cask/lib/hbc/cask.rb | @@ -32,7 +32,6 @@ def metadata_versioned_container_path
end
def metadata_path(timestamp = :latest, create = false)
- return nil unless metadata_versioned_container_path.respond_to?(:join)
if create && timestamp == :latest
raise CaskError, "Cannot create metadata path when timestamp is :... | true |
Other | Homebrew | brew | 31d7d6e5f3ec88ffbaf8aa86ac6239e79cd9d160.json | Remove old metadata when installing with `--force`. | Library/Homebrew/cask/lib/hbc/installer.rb | @@ -295,16 +295,15 @@ def disable_accessibility_access
end
def save_caskfile
- timestamp = :now
- create = true
- savedir = @cask.metadata_subdir("Casks", timestamp, create)
- if Dir.entries(savedir).size > 2
- # should not happen
- raise CaskAlreadyInstalledError, @ca... | true |
Other | Homebrew | brew | c5a9ee5719413d0d93f44da61100e7beee469410.json | java_requirement.rb: use HTTPS in Java Platform URL
It's redirected to cleartext, though this URL will be opened
in a browser so it won't be something hidden, and maybe
Oracle will fix this in the future. | Library/Homebrew/requirements/java_requirement.rb | @@ -2,7 +2,7 @@
class JavaRequirement < Requirement
fatal true
- download "http://www.oracle.com/technetwork/java/javase/downloads/index.html"
+ download "https://www.oracle.com/technetwork/java/javase/downloads/index.html"
satisfy build_env: false do
setup_java | false |
Other | Homebrew | brew | 642e355b4f042de80a78036f66d5810dc392cfdc.json | Save flags in `with_full_permissions`. | Library/Homebrew/cask/lib/hbc/pkg.rb | @@ -92,12 +92,14 @@ def rmdir(path)
def with_full_permissions(path)
original_mode = (path.stat.mode % 01000).to_s(8)
- # TODO: similarly read and restore macOS flags (cf man chflags)
+ original_flags = @command.run!("/usr/bin/stat", args: ["-f", "%Of", "--", path]).stdout.chomp
+
@command... | true |
Other | Homebrew | brew | 642e355b4f042de80a78036f66d5810dc392cfdc.json | Save flags in `with_full_permissions`. | Library/Homebrew/test/cask/pkg_spec.rb | @@ -1,7 +1,7 @@
describe Hbc::Pkg, :cask do
describe "#uninstall" do
let(:fake_system_command) { Hbc::NeverSudoSystemCommand }
- let(:empty_response) { double(stdout: "", plist: {"volume" => "/", "install-location" => "", "paths" => {}}) }
+ let(:empty_response) { double(stdout: "", plist: { "volume" => ... | true |
Other | Homebrew | brew | d0f1fa668ce2a943f1613080f8b517decdeab215.json | hardware: use march=native for generic module.
This matches Linux where this behaviour was original imported from. | Library/Homebrew/hardware.rb | @@ -12,7 +12,7 @@ class << self
penryn: "-march=core2 -msse4.1",
core2: "-march=core2",
core: "-march=prescott",
- dunno: "",
+ dunno: "-march=native",
}.freeze
def optimization_flags | false |
Other | Homebrew | brew | c6cbf9590d897db7cff7f2f81863ae34ccc947ed.json | linux: Add ARM to CPU.type | Library/Homebrew/extend/os/linux/hardware/cpu.rb | @@ -12,6 +12,8 @@ def cpuinfo
def type
@type ||= if cpuinfo =~ /Intel|AMD/
:intel
+ elsif cpuinfo =~ /ARM|Marvell/
+ :arm
else
:dunno
end
@@ -71,7 +73,7 @@ def cores
end
def flags
- @flags ||= cpuinfo[/^flags.*/, 0].split
+ ... | false |
Other | Homebrew | brew | 0e30d34d272cbec3ed6b07eebc4c9fcbb3189317.json | test: fix tests with a shallow clone.
In this case `HOMEBREW_VERSION` is `>1.1.0 (no git repository)` so these
tests failed. This was the cause of the Homebrew/homebrew-test-bot
Linux CI failures as it was testing a shallow clone. | Library/Homebrew/test/cmd/config_spec.rb | @@ -1,7 +1,7 @@
describe "brew config", :integration_test do
it "prints information about the current Homebrew configuration" do
expect { brew "config" }
- .to output(/HOMEBREW_VERSION: #{HOMEBREW_VERSION}/).to_stdout
+ .to output(/HOMEBREW_VERSION: #{Regexp.escape HOMEBREW_VERSION}/).to_stdout
... | true |
Other | Homebrew | brew | 0e30d34d272cbec3ed6b07eebc4c9fcbb3189317.json | test: fix tests with a shallow clone.
In this case `HOMEBREW_VERSION` is `>1.1.0 (no git repository)` so these
tests failed. This was the cause of the Homebrew/homebrew-test-bot
Linux CI failures as it was testing a shallow clone. | Library/Homebrew/test/tab_spec.rb | @@ -18,7 +18,7 @@
subject {
described_class.new(
- "homebrew_version" => HOMEBREW_VERSION,
+ "homebrew_version" => HOMEBREW_VERSION,
"used_options" => used_options.as_flags,
"unused_options" => unused_options.as_flags,
"built_as_bottle" => false,
@@ -51,6 ... | true |
Other | Homebrew | brew | 10a235d6abfed687236b14577a02df13a9b5adca.json | pull: check Bintray mirror URLs | Library/Homebrew/dev-cmd/pull.rb | @@ -155,6 +155,13 @@ def pull
next
end
+ if f.stable
+ stable_urls = [f.stable.url] + f.stable.mirrors
+ stable_urls.grep(%r{^https://dl.bintray.com/homebrew/mirror/}) do |mirror_url|
+ check_bintray_mirror(f.full_name, mirror_url)
+ end
+ end
+
... | false |
Other | Homebrew | brew | e0acaeef816ae73566b2067608a6530b61a8037a.json | Remove redundant `Utils`. | Library/Homebrew/cask/lib/hbc/cli/cleanup.rb | @@ -62,7 +62,7 @@ def cache_completes
end
def disk_cleanup_size
- Utils.size_in_bytes(cache_files)
+ cache_files.map(&:disk_usage).inject(:+)
end
def remove_cache_files(*tokens) | true |
Other | Homebrew | brew | e0acaeef816ae73566b2067608a6530b61a8037a.json | Remove redundant `Utils`. | Library/Homebrew/cask/lib/hbc/cli/style.rb | @@ -24,7 +24,7 @@ def run
end
def install_rubocop
- Utils.capture_stderr do
+ capture_stderr do
begin
Homebrew.install_gem_setup_path! "rubocop-cask", HOMEBREW_RUBOCOP_CASK_VERSION, "rubocop"
rescue SystemExit | true |
Other | Homebrew | brew | e0acaeef816ae73566b2067608a6530b61a8037a.json | Remove redundant `Utils`. | Library/Homebrew/cask/lib/hbc/utils.rb | @@ -90,27 +90,6 @@ def self.current_user
Etc.getpwuid(Process.euid).name
end
- # paths that "look" descendant (textually) will still
- # return false unless both the given paths exist
- def self.file_is_descendant(file, dir)
- file = Pathname.new(file)
- dir = Pathname.new(dir)
- ... | true |
Other | Homebrew | brew | e0acaeef816ae73566b2067608a6530b61a8037a.json | Remove redundant `Utils`. | Library/Homebrew/test/cask/cli/cleanup_spec.rb | @@ -19,7 +19,7 @@
cached_downloads.each(&FileUtils.method(:touch))
- cleanup_size = Hbc::Utils.size_in_bytes(cached_downloads[0])
+ cleanup_size = cached_downloads[0].disk_usage
expect {
subject.cleanup(cleaned_up_cached_download) | true |
Other | Homebrew | brew | 76e65ca070c0142f05ba2fcaf05fb6931c929547.json | Move legacy cache and caskroom code to `compat/*`. | Library/Homebrew/cask/lib/hbc.rb | @@ -45,9 +45,6 @@ module Hbc
def self.init
Cache.ensure_cache_exists
- Cache.delete_legacy_cache
-
- Caskroom.migrate_caskroom_from_repo_to_prefix
Caskroom.ensure_caskroom_exists
end
| true |
Other | Homebrew | brew | 76e65ca070c0142f05ba2fcaf05fb6931c929547.json | Move legacy cache and caskroom code to `compat/*`. | Library/Homebrew/cask/lib/hbc/cache.rb | @@ -8,13 +8,5 @@ def ensure_cache_exists
odebug "Creating Cache at #{Hbc.cache}"
Hbc.cache.mkpath
end
-
- def delete_legacy_cache
- legacy_cache = HOMEBREW_CACHE.join("Casks")
- return unless legacy_cache.exist?
-
- ohai "Deleting legacy cache at #{legacy_cache}..."
- FileUtils... | true |
Other | Homebrew | brew | 76e65ca070c0142f05ba2fcaf05fb6931c929547.json | Move legacy cache and caskroom code to `compat/*`. | Library/Homebrew/cask/lib/hbc/caskroom.rb | @@ -2,21 +2,6 @@ module Hbc
module Caskroom
module_function
- def migrate_caskroom_from_repo_to_prefix
- repo_caskroom = HOMEBREW_REPOSITORY.join("Caskroom")
- return if Hbc.caskroom.exist?
- return unless repo_caskroom.directory?
-
- ohai "Moving Caskroom from HOMEBREW_REPOSITORY to HO... | true |
Other | Homebrew | brew | 76e65ca070c0142f05ba2fcaf05fb6931c929547.json | Move legacy cache and caskroom code to `compat/*`. | Library/Homebrew/compat/hbc.rb | @@ -1,2 +1,19 @@
require "compat/hbc/cask_loader"
require "compat/hbc/cli/update"
+require "compat/hbc/cache"
+require "compat/hbc/caskroom"
+
+module Hbc
+ class << self
+ prepend(
+ Module.new do
+ def init
+ Cache.delete_legacy_cache
+ Caskroom.migrate_caskroom_from_repo_to_prefix... | true |
Other | Homebrew | brew | 76e65ca070c0142f05ba2fcaf05fb6931c929547.json | Move legacy cache and caskroom code to `compat/*`. | Library/Homebrew/compat/hbc/cache.rb | @@ -0,0 +1,13 @@
+module Hbc
+ module Cache
+ module_function
+
+ def delete_legacy_cache
+ legacy_cache = HOMEBREW_CACHE.join("Casks")
+ return unless legacy_cache.exist?
+
+ ohai "Deleting legacy cache at #{legacy_cache}"
+ FileUtils.remove_entry_secure(legacy_cache)
+ end
+ end
+end | true |
Other | Homebrew | brew | 76e65ca070c0142f05ba2fcaf05fb6931c929547.json | Move legacy cache and caskroom code to `compat/*`. | Library/Homebrew/compat/hbc/caskroom.rb | @@ -0,0 +1,20 @@
+module Hbc
+ module Caskroom
+ module_function
+
+ def migrate_caskroom_from_repo_to_prefix
+ repo_caskroom = HOMEBREW_REPOSITORY.join("Caskroom")
+ return if Hbc.caskroom.exist?
+ return unless repo_caskroom.directory?
+
+ ohai "Moving Caskroom from HOMEBREW_REPOSITORY to H... | true |
Other | Homebrew | brew | 0d3e1119a1155dc60fb9a0840ea4fb2783dc3f37.json | bottle: Remove superfluous odie | Library/Homebrew/dev-cmd/bottle.rb | @@ -437,7 +437,6 @@ def merge
--keep-old was passed but there are changes in:
#{mismatches.join("\n")}
EOS
- odie "--keep-old was passed but there were changes in #{mismatches.join(", ")}!"
end
output = bottle_output bot... | false |
Other | Homebrew | brew | d37f2e7ae7b6915063960998df16b3cf4f76115c.json | New-Maintainer-Checklist: add analytics link. | docs/New-Maintainer-Checklist.md | @@ -46,6 +46,7 @@ If they accept, follow a few steps to get them set up:
- Invite them to the [`homebrew-dev` private maintainers mailing list](https://groups.google.com/forum/#!managemembers/homebrew-dev/invite)
- Invite them to the [`machomebrew` private maintainers Slack](https://machomebrew.slack.com/admin/invite... | false |
Other | Homebrew | brew | aee23ccb0355228f24d387fcbe7cf5d30f57d8b6.json | Add more flags and descriptions to man pages. | Library/Homebrew/cmd/install.rb | @@ -1,4 +1,4 @@
-#: * `install` [`--debug`] [`--env=`<std>|<super>] [`--ignore-dependencies`] [`--only-dependencies`] [`--cc=`<compiler>] [`--build-from-source`] [`--devel`|`--HEAD`] [`--keep-tmp`] <formula>:
+#: * `install` [`--debug`] [`--env=`(`std`|`super`)] [`--ignore-dependencies`|`--only-dependencies`] [`--cc=... | true |
Other | Homebrew | brew | aee23ccb0355228f24d387fcbe7cf5d30f57d8b6.json | Add more flags and descriptions to man pages. | Library/Homebrew/cmd/sh.rb | @@ -1,9 +1,11 @@
#: * `sh` [`--env=std`]:
-#: Instantiate a Homebrew build environment. Uses our years-battle-hardened
+#: Start a Homebrew build environment shell. Uses our years-battle-hardened
#: Homebrew build logic to help your `./configure && make && make install`
#: or even your `gem install` suc... | true |
Other | Homebrew | brew | aee23ccb0355228f24d387fcbe7cf5d30f57d8b6.json | Add more flags and descriptions to man pages. | Library/Homebrew/dev-cmd/bottle.rb | @@ -1,7 +1,29 @@
-#: * `bottle` [`--verbose`] [`--no-rebuild`] [`--keep-old`] [`--skip-relocation`] [`--root-url=`<URL>] [`--force-core-tap`]:
-#: * `bottle` `--merge` [`--no-commit`] [`--keep-old`] [`--write`]:
+#: * `bottle` [`--verbose`] [`--no-rebuild`|`--keep-old`] [`--skip-relocation`] [`--root-url=`<URL>] [`-... | true |
Other | Homebrew | brew | aee23ccb0355228f24d387fcbe7cf5d30f57d8b6.json | Add more flags and descriptions to man pages. | Library/Homebrew/dev-cmd/tests.rb | @@ -1,5 +1,21 @@
-#: * `tests` [`-v`] [`--coverage`] [`--generic`] [`--no-compat`] [`--only=`<test_script>`:`<line_number>] [`--seed` <seed>] [`--online`] [`--official-cmd-taps`]:
-#: Run Homebrew's unit and integration tests.
+#: * `tests` [`--verbose`] [`--coverage`] [`--generic`] [`--no-compat`] [`--only=`<test... | true |
Other | Homebrew | brew | aee23ccb0355228f24d387fcbe7cf5d30f57d8b6.json | Add more flags and descriptions to man pages. | Library/Homebrew/dev-cmd/update-test.rb | @@ -1,4 +1,4 @@
-#: * `update-test` [`--commit=`<commit>] [`--before=`<date>] [`--keep-tmp`]:
+#: * `update-test` [`--commit=`<commit>] [`--before=`<date>] [`--to-tag`] [`--keep-tmp`]:
#: Runs a test of `brew update` with a new repository clone.
#:
#: If no arguments are passed, use `origin/master` as the st... | true |
Other | Homebrew | brew | aee23ccb0355228f24d387fcbe7cf5d30f57d8b6.json | Add more flags and descriptions to man pages. | Library/Homebrew/manpages/brew.1.md.erb | @@ -65,7 +65,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
<https://github.com/caskroom/homebrew-cask>
* `services`:
- Integrates Homebrew formulae with macOS's `launchctl` manager:
+ Integrates Homebrew formulae with macOS's `launchctl`(1) manager:
<https://g... | true |
Other | Homebrew | brew | aee23ccb0355228f24d387fcbe7cf5d30f57d8b6.json | Add more flags and descriptions to man pages. | docs/brew.1.html | @@ -152,7 +152,7 @@ <h2 id="COMMANDS">COMMANDS</h2>
<p>See the docs for examples of using the JSON output:
<a href="http://docs.brew.sh/Querying-Brew.html" data-bare-link="true">http://docs.brew.sh/Querying-Brew.html</a></p></dd>
-<dt><code>install</code> [<code>--debug</code>] [<code>--env=</code><var>std</var>|<v... | true |
Other | Homebrew | brew | aee23ccb0355228f24d387fcbe7cf5d30f57d8b6.json | Add more flags and descriptions to man pages. | 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\fIstd\fR|\fIsuper\fR] [\fB\-\-ignore\-dependencies\fR] [\fB\... | true |
Other | Homebrew | brew | bba2c632ec972eab5289e5114908eff28eb82be9.json | Remove Cask Gemfile. | Library/Homebrew/cask/Gemfile | @@ -1,11 +0,0 @@
-source "https://rubygems.org"
-
-gem "parallel_tests"
-gem "rspec"
-gem "rspec-its", require: false
-gem "rspec-wait", require: false
-
-group :coverage do
- gem "simplecov", require: false
- gem "codecov", require: false
-end | true |
Other | Homebrew | brew | bba2c632ec972eab5289e5114908eff28eb82be9.json | Remove Cask Gemfile. | Library/Homebrew/cask/Gemfile.lock | @@ -1,51 +0,0 @@
-GEM
- remote: https://rubygems.org/
- specs:
- codecov (0.1.9)
- json
- simplecov
- url
- diff-lcs (1.3)
- docile (1.1.5)
- json (2.0.3)
- parallel (1.10.0)
- parallel_tests (2.13.0)
- parallel
- rspec (3.5.0)
- rspec-core (~> 3.5.0)
- rspec-expecta... | true |
Other | Homebrew | brew | b7135eec493c1b2cad69b934bbf0d1aefbcbf8ab.json | Move `shared_examples` and `matcher` into specs. | Library/Homebrew/cask/spec/cask/audit_spec.rb | @@ -1,5 +1,39 @@
describe Hbc::Audit do
- include AuditMatchers
+ def include_msg?(messages, msg)
+ if msg.is_a?(Regexp)
+ Array(messages).any? { |m| m =~ msg }
+ else
+ Array(messages).include?(msg)
+ end
+ end
+
+ matcher :pass do
+ match do |audit|
+ !audit.errors? && !audit.warnings?... | true |
Other | Homebrew | brew | b7135eec493c1b2cad69b934bbf0d1aefbcbf8ab.json | Move `shared_examples` and `matcher` into specs. | Library/Homebrew/cask/spec/cask/dsl/version_spec.rb | @@ -1,7 +1,12 @@
describe Hbc::DSL::Version do
- include ExpectationsHashHelper
-
- let(:version) { described_class.new(raw_version) }
+ shared_examples "expectations hash" do |input_name, expectations|
+ expectations.each do |input_value, expected_output|
+ context "when #{input_name} is #{input_value.insp... | true |
Other | Homebrew | brew | b7135eec493c1b2cad69b934bbf0d1aefbcbf8ab.json | Move `shared_examples` and `matcher` into specs. | Library/Homebrew/cask/spec/support/audit_matchers.rb | @@ -1,39 +0,0 @@
-module AuditMatchers
- extend RSpec::Matchers::DSL
-
- matcher :pass do
- match do |audit|
- !audit.errors? && !audit.warnings?
- end
- end
-
- matcher :fail do
- match(&:errors?)
- end
-
- matcher :warn do
- match do |audit|
- audit.warnings? && !audit.errors?
- end
- ... | true |
Other | Homebrew | brew | b7135eec493c1b2cad69b934bbf0d1aefbcbf8ab.json | Move `shared_examples` and `matcher` into specs. | Library/Homebrew/cask/spec/support/expectations_hash_helper.rb | @@ -1,10 +0,0 @@
-module ExpectationsHashHelper
- shared_examples "expectations hash" do |input_name, expectations|
- expectations.each do |input_value, expected_output|
- context "when #{input_name} is #{input_value.inspect}" do
- let(input_name.to_sym) { input_value }
- it { is_expected.to eq e... | true |
Other | Homebrew | brew | a1fbb1020bdfa5cad0659b466c4b236c7d37c789.json | Simplify Cask `spec_helper`. | Library/Homebrew/cask/lib/hbc/locations.rb | @@ -15,6 +15,8 @@ def default_caskroom
@default_caskroom ||= HOMEBREW_PREFIX.join("Caskroom")
end
+ attr_writer :caskroom
+
def caskroom
@caskroom ||= begin
if Utils.path_occupied?(legacy_caskroom)
@@ -36,14 +38,12 @@ def caskroom
end
end
- def ca... | true |
Other | Homebrew | brew | a1fbb1020bdfa5cad0659b466c4b236c7d37c789.json | Simplify Cask `spec_helper`. | Library/Homebrew/cask/spec/spec_helper.rb | @@ -1,4 +1,3 @@
-require "pathname"
require "rspec/its"
require "rspec/wait"
@@ -22,9 +21,6 @@
require "hbc"
# create and override default directories
-Hbc.appdir = Pathname.new(TEST_TMPDIR).join("Applications").tap(&:mkpath)
-Hbc.cache.mkpath
-Hbc.caskroom = Hbc.default_caskroom.tap(&:mkpath)
Hbc.default_tap ... | true |
Other | Homebrew | brew | 8385f179dfc6dc056a248cb445627fa02f83f397.json | audit: reject versions starting with HEAD
Many parts of Homebrew assume that a version string beginning with
"HEAD" is, in fact, a head build. A stable version that begins with
"HEAD" violates this assumption and causes problems, as it's treated
as a head build in some places and as a stable build in others. | Library/Homebrew/dev-cmd/audit.rb | @@ -755,6 +755,9 @@ def audit_specs
if version.to_s !~ /\d/
problem "#{name}: version (#{version}) is set to a string without a digit"
end
+ if version.to_s.start_with?("HEAD")
+ problem "#{name}: non-HEAD version name (#{version}) should not begin with HEAD"
+ end
end
... | false |
Other | Homebrew | brew | ea28c79031b157e7604ac905e7a09fbe2e603778.json | java_requirement: avoid nil in possible_javas | Library/Homebrew/extend/os/mac/requirements/java_requirement.rb | @@ -14,7 +14,7 @@ def possible_javas
javas << java_home_cmd
javas << which("java")
javas.delete(Pathname.new("/usr/bin/java")) # /usr/bin/java is a stub on macOS
- javas
+ javas.compact
end
def java_home_cmd | false |
Other | Homebrew | brew | f9e07fcaab781d9d7e37348f5af37a832cd914ea.json | Fix typo in the new issue template | .github/ISSUE_TEMPLATE.md | @@ -4,7 +4,7 @@ If Homebrew was updated on Aug 10-11th 2016 and `brew update` always says `Alrea
- [ ] Ran `brew update` and retried your prior step?
- [ ] Ran `brew doctor`, fixed as many issues as possible and retried your prior step?
-- [ ] Confirmed this is problem with Homebrew/brew and not specific formulae? ... | false |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/cmd/bundle_spec.rb | @@ -10,9 +10,9 @@
end
end
- Dir.mktmpdir do |path|
+ mktmpdir do |path|
FileUtils.touch "#{path}/Brewfile"
- Dir.chdir path do
+ path.cd do
expect { brew "bundle", "check" }
.to output("The Brewfile's dependencies are satisfied.\n").to_stdout
... | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/cmd/commands_spec.rb | @@ -54,7 +54,7 @@
end
specify "::external_commands" do
- Dir.mktmpdir do |dir|
+ mktmpdir do |dir|
%w[brew-t1 brew-t2.rb brew-t3.py].each do |file|
path = "#{dir}/#{file}"
FileUtils.touch path | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/cmd/custom-external-command_spec.rb | @@ -1,8 +1,6 @@
describe "brew custom-external-command", :integration_test do
it "is supported" do
- Dir.mktmpdir do |path|
- path = Pathname.new(path)
-
+ mktmpdir do |path|
cmd = "custom-external-command-#{rand}"
file = path/"brew-#{cmd}"
| true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/cmd/linkapps_spec.rb | @@ -1,11 +1,7 @@
describe "brew linkapps", :integration_test do
- let(:home_dir) { @home_dir = Pathname.new(Dir.mktmpdir) }
+ let(:home_dir) { mktmpdir }
let(:apps_dir) { home_dir/"Applications" }
- after(:each) do
- home_dir.rmtree unless @home_dir.nil?
- end
-
it "symlinks applications" do
apps_d... | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/cmd/unlinkapps_spec.rb | @@ -1,11 +1,7 @@
describe "brew unlinkapps", :integration_test do
- let(:home_dir) { @home_dir = Pathname.new(Dir.mktmpdir) }
+ let(:home_dir) { mktmpdir }
let(:apps_dir) { home_dir/"Applications" }
- after(:each) do
- home_dir.rmtree unless @home_dir.nil?
- end
-
it "unlinks symlinked applications" do
... | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/cmd/unpack_spec.rb | @@ -2,9 +2,7 @@
it "unpacks a given Formula's archive" do
setup_test_formula "testball"
- Dir.mktmpdir do |path|
- path = Pathname.new(path)
-
+ mktmpdir do |path|
shutup do
expect { brew "unpack", "testball", "--destdir=#{path}" }
.to be_a_success | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/dev-cmd/audit_spec.rb | @@ -6,11 +6,7 @@
RSpec::Matchers.alias_matcher :have_trailing_newline, :be_trailing_newline
describe FormulaText do
- let(:dir) { @dir = Pathname.new(Dir.mktmpdir) }
-
- after(:each) do
- dir.rmtree unless @dir.nil?
- end
+ let(:dir) { mktmpdir }
def formula_text(name, body = nil, options = {})
pat... | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/diagnostic_spec.rb | @@ -13,7 +13,7 @@
end
specify "#check_for_anaconda" do
- Dir.mktmpdir do |path|
+ mktmpdir do |path|
anaconda = "#{path}/anaconda"
python = "#{path}/python"
FileUtils.touch anaconda
@@ -23,7 +23,7 @@
FileUtils.chmod 0755, anaconda
FileUtils.chmod 0755, python
- EN... | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/gpg2_requirement_spec.rb | @@ -2,11 +2,7 @@
require "fileutils"
describe GPG2Requirement do
- let(:dir) { @dir = Pathname.new(Dir.mktmpdir) }
-
- after(:each) do
- FileUtils.rm_rf dir unless @dir.nil?
- end
+ let(:dir) { mktmpdir }
describe "#satisfied?" do
it "returns true if GPG2 is installed" do | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/gpg_spec.rb | @@ -7,9 +7,8 @@
it "creates a test key in the home directory" do
skip "GPG Unavailable" unless subject.available?
- Dir.mktmpdir do |dir|
+ mktmpdir do |dir|
ENV["HOME"] = dir
- dir = Pathname.new(dir)
shutup do
subject.create_test_key(dir) | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/java_requirement_spec.rb | @@ -46,7 +46,7 @@
end
context "when #possible_javas contains paths" do
- let(:path) { Pathname.new(Dir.mktmpdir) }
+ let(:path) { mktmpdir }
let(:java) { path/"java" }
def setup_java_with_version(version)
@@ -61,10 +61,6 @@ def setup_java_with_version(version)
allow(subjec... | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/language/go_spec.rb | @@ -6,7 +6,7 @@
expect(described_class).to receive(:opoo).once
- Dir.mktmpdir do |path|
+ mktmpdir do |path|
shutup do
described_class.stage_deps [], path
end | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/language/python_spec.rb | @@ -4,14 +4,12 @@
describe Language::Python::Virtualenv::Virtualenv do
subject { described_class.new(formula, dir, "python") }
- let(:dir) { @dir = Pathname.new(Dir.mktmpdir) }
+ let(:dir) { mktmpdir }
let(:resource) { double("resource", stage: true) }
let(:formula_bin) { dir/"formula_bin" }
let(:for... | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/os/mac/java_requirement_spec.rb | @@ -3,32 +3,29 @@
describe JavaRequirement do
subject { described_class.new(%w[1.8]) }
- let(:java_home) { Dir.mktmpdir }
- let(:java_home_path) { Pathname.new(java_home) }
+ let(:java_home) { mktmpdir }
before(:each) do
- FileUtils.mkdir java_home_path/"bin"
- FileUtils.touch java_home_path/"bin/ja... | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/pathname_spec.rb | @@ -5,13 +5,11 @@
describe Pathname do
include FileUtils
- let(:src) { Pathname.new(Dir.mktmpdir) }
- let(:dst) { Pathname.new(Dir.mktmpdir) }
+ let(:src) { mktmpdir }
+ let(:dst) { mktmpdir }
let(:file) { src/"foo" }
let(:dir) { src/"bar" }
- after(:each) { rm_rf [src, dst] }
-
describe DiskUsage... | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/sandbox_spec.rb | @@ -3,17 +3,13 @@
RSpec::Matchers.define_negated_matcher :not_matching, :matching
describe Sandbox do
- let(:dir) { @dir = Pathname.new(Dir.mktmpdir) }
+ let(:dir) { mktmpdir }
let(:file) { dir/"foo" }
before(:each) do
skip "Sandbox not implemented." unless described_class.available?
end
- afte... | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/spec_helper.rb | @@ -17,6 +17,7 @@
require "test/support/helper/shutup"
require "test/support/helper/fixtures"
require "test/support/helper/formula"
+require "test/support/helper/mktmpdir"
require "test/support/helper/spec/shared_context/integration_test"
TEST_DIRECTORIES = [
@@ -35,6 +36,7 @@
config.include(Test::Helper::Shu... | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/support/helper/mktmpdir.rb | @@ -0,0 +1,11 @@
+module Test
+ module Helper
+ module MkTmpDir
+ def mktmpdir(prefix_suffix = nil)
+ new_dir = Pathname.new(Dir.mktmpdir(prefix_suffix, HOMEBREW_TEMP))
+ return yield new_dir if block_given?
+ new_dir
+ end
+ end
+ end
+end | true |
Other | Homebrew | brew | a5549023804a8cef50f71dc2d7a723be8e83f3d1.json | Add `mktmpdir` helper method. | Library/Homebrew/test/utils_spec.rb | @@ -1,9 +1,7 @@
require "utils"
describe "globally-scoped helper methods" do
- let(:dir) { @dir = Pathname.new(Dir.mktmpdir) }
-
- after(:each) { dir.rmtree unless @dir.nil? }
+ let(:dir) { mktmpdir }
def esc(code)
/(\e\[\d+m)*\e\[#{code}m/
@@ -195,8 +193,7 @@ def esc(code)
end
specify "#gzip" ... | true |
Other | Homebrew | brew | 0457f0d3e2186991c16e2136b12a5ecc034d99da.json | README: point new contributors to strict audit. | README.md | @@ -27,7 +27,7 @@ We'd love you to contribute to Homebrew. First, please read our [Contribution Gu
We explicitly welcome contributions from people who have never contributed to open-source before: we were all beginners once! We can help build on a partially working pull request with the aim of getting it merged. We ... | false |
Other | Homebrew | brew | ebe4042b2f9b7b66e1c2ee9082de002795ea0b81.json | Convert FormulaAuditor test to spec. | Library/Homebrew/test/audit_test.rb | @@ -1,464 +0,0 @@
-require "testing_env"
-require "fileutils"
-require "pathname"
-require "formulary"
-require "dev-cmd/audit"
-
-class FormulaAuditorTests < Homebrew::TestCase
- def setup
- super
- @dir = mktmpdir
- end
-
- def formula_auditor(name, text, options = {})
- path = Pathname.new "#{@dir}/#{nam... | true |
Other | Homebrew | brew | ebe4042b2f9b7b66e1c2ee9082de002795ea0b81.json | Convert FormulaAuditor test to spec. | Library/Homebrew/test/dev-cmd/audit_spec.rb | @@ -59,3 +59,501 @@ class #{Formulary.class_s(name)} < Formula
expect(ft.without_patch).to eq("class End < Formula\n \nend")
end
end
+
+describe FormulaAuditor do
+ def formula_auditor(name, text, options = {})
+ path = Pathname.new "#{dir}/#{name}.rb"
+ path.open("w") do |f|
+ f.write text
+ e... | true |
Other | Homebrew | brew | ebe4042b2f9b7b66e1c2ee9082de002795ea0b81.json | Convert FormulaAuditor test to spec. | Library/Homebrew/test/spec_helper.rb | @@ -36,6 +36,10 @@
config.include(Test::Helper::Fixtures)
config.include(Test::Helper::Formula)
+ config.before(:each, :needs_compat) do
+ skip "Requires compatibility layer." if ENV["HOMEBREW_NO_COMPAT"]
+ end
+
config.before(:each, :needs_official_cmd_taps) do
skip "Needs official command Taps." ... | true |
Other | Homebrew | brew | 8676960d09fda58ea36a34ce202ce30431474ac6.json | Convert FormulaText test to spec. | Library/Homebrew/test/audit_test.rb | @@ -4,55 +4,6 @@
require "formulary"
require "dev-cmd/audit"
-class FormulaTextTests < Homebrew::TestCase
- def setup
- super
- @dir = mktmpdir
- end
-
- def formula_text(name, body = nil, options = {})
- path = Pathname.new "#{@dir}/#{name}.rb"
- path.open("w") do |f|
- f.write <<-EOS.undent
- ... | true |
Other | Homebrew | brew | 8676960d09fda58ea36a34ce202ce30431474ac6.json | Convert FormulaText test to spec. | Library/Homebrew/test/dev-cmd/audit_spec.rb | @@ -0,0 +1,61 @@
+require "dev-cmd/audit"
+require "formulary"
+
+RSpec::Matchers.alias_matcher :have_data, :be_data
+RSpec::Matchers.alias_matcher :have_end, :be_end
+RSpec::Matchers.alias_matcher :have_trailing_newline, :be_trailing_newline
+
+describe FormulaText do
+ let(:dir) { @dir = Pathname.new(Dir.mktmpdir) }... | true |
Other | Homebrew | brew | 3dcbb84fb5fd1601e669ea15c9ddb1056c839325.json | Convert Tap test to spec. | Library/Homebrew/test/tap_spec.rb | @@ -0,0 +1,346 @@
+RSpec::Matchers.alias_matcher :have_formula_file, :be_formula_file
+RSpec::Matchers.alias_matcher :have_custom_remote, :be_custom_remote
+
+describe Tap do
+ include FileUtils
+
+ subject { Tap.new("Homebrew", "foo") }
+ let(:path) { Tap::TAP_DIRECTORY/"homebrew/homebrew-foo" }
+ let(:formula_fil... | true |
Other | Homebrew | brew | 3dcbb84fb5fd1601e669ea15c9ddb1056c839325.json | Convert Tap test to spec. | Library/Homebrew/test/tap_test.rb | @@ -1,319 +0,0 @@
-require "testing_env"
-
-class TapTest < Homebrew::TestCase
- include FileUtils
-
- def setup
- super
- @path = Tap::TAP_DIRECTORY/"homebrew/homebrew-foo"
- @path.mkpath
- @tap = Tap.new("Homebrew", "foo")
- end
-
- def setup_tap_files
- @formula_file = @path/"Formula/foo.rb"
- ... | true |
Other | Homebrew | brew | 14ae87d5c907165dcce7554edaf0c82ec89c2881.json | Add a space after the emoji for terminals
Closes #2198.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com> | Library/Homebrew/test/emoji_spec.rb | @@ -9,7 +9,7 @@
ENV.delete("HOMEBREW_INSTALL_BADGE")
end
- it "returns 🍺 by default" do
+ it "returns 🍺 by default" do
expect(subject).to eq "🍺"
end
| false |
Other | Homebrew | brew | ba34cbdc6256b76cd5e3bb31dc9c3fc0ec511333.json | Convert `checksum_verification` test to spec. | Library/Homebrew/test/checksum_verification_spec.rb | @@ -0,0 +1,36 @@
+require "formula"
+
+describe Formula do
+ def formula(&block)
+ super do
+ url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
+ instance_eval(&block)
+ end
+ end
+
+ describe "#brew" do
+ it "does not raise an error when the checksum matches" do
+ expect {
+ ... | true |
Other | Homebrew | brew | ba34cbdc6256b76cd5e3bb31dc9c3fc0ec511333.json | Convert `checksum_verification` test to spec. | Library/Homebrew/test/checksum_verification_test.rb | @@ -1,35 +0,0 @@
-require "testing_env"
-require "formula"
-
-class ChecksumVerificationTests < Homebrew::TestCase
- def assert_checksum_good
- assert_nothing_raised { shutup { @_f.brew {} } }
- end
-
- def assert_checksum_bad
- assert_raises(ChecksumMismatchError) { shutup { @_f.brew {} } }
- end
-
- def fo... | true |
Other | Homebrew | brew | 834824754f1837aceefe0518b7fe4023053ecfff.json | Convert `formula_validation` test to spec. | Library/Homebrew/test/formula_validation_spec.rb | @@ -0,0 +1,94 @@
+require "formula"
+
+describe Formula do
+ describe "::new" do
+ matcher :fail_with_invalid do |attr|
+ match do |actual|
+ expect {
+ begin
+ actual.call
+ rescue => e
+ expect(e.attr).to eq(attr)
+ raise e
+ end
+ }.t... | true |
Other | Homebrew | brew | 834824754f1837aceefe0518b7fe4023053ecfff.json | Convert `formula_validation` test to spec. | Library/Homebrew/test/formula_validation_test.rb | @@ -1,75 +0,0 @@
-require "testing_env"
-require "formula"
-
-class FormulaValidationTests < Homebrew::TestCase
- def assert_invalid(attr, &block)
- e = assert_raises(FormulaValidationError, &block)
- assert_equal attr, e.attr
- end
-
- def test_cant_override_brew
- e = assert_raises(RuntimeError) { formula... | true |
Other | Homebrew | brew | fb09867ba35e3cb30651cc6b9ab871849c7e8474.json | Convert `formula_support` test to spec. | Library/Homebrew/test/formula_support_spec.rb | @@ -0,0 +1,29 @@
+require "formula_support"
+
+describe KegOnlyReason do
+ describe "#to_s" do
+ it "returns the reason provided" do
+ r = KegOnlyReason.new :provided_by_osx, "test"
+ expect(r.to_s).to eq("test")
+ end
+
+ it "returns a default message when no reason is provided" do
+ r = KegOn... | true |
Other | Homebrew | brew | fb09867ba35e3cb30651cc6b9ab871849c7e8474.json | Convert `formula_support` test to spec. | Library/Homebrew/test/formula_support_test.rb | @@ -1,28 +0,0 @@
-require "testing_env"
-require "formula_support"
-
-class KegOnlyReasonTests < Homebrew::TestCase
- def test_to_s_explanation
- r = KegOnlyReason.new :provided_by_osx, "test"
- assert_equal "test", r.to_s
- end
-
- def test_to_s_no_explanation
- r = KegOnlyReason.new :provided_by_macos, ""... | true |
Other | Homebrew | brew | 26c01b4c43c5bf45799d81cd0e86ebca61a328c6.json | Convert X11Requirement test to spec. | Library/Homebrew/test/os/mac/x11_requirement_test.rb | @@ -1,13 +0,0 @@
-require "testing_env"
-require "requirements/x11_requirement"
-
-class OSMacX11RequirementTests < Homebrew::TestCase
- def test_satisfied
- MacOS::XQuartz.stubs(:version).returns("2.7.5")
- MacOS::XQuartz.stubs(:installed?).returns(true)
- assert_predicate X11Requirement.new, :satisfied?
-
-... | true |
Other | Homebrew | brew | 26c01b4c43c5bf45799d81cd0e86ebca61a328c6.json | Convert X11Requirement test to spec. | Library/Homebrew/test/x11_requirement_spec.rb | @@ -33,4 +33,17 @@
subject.modify_build_environment
end
end
+
+ describe "#satisfied?", :needs_macos do
+ it "returns true if X11 is installed" do
+ expect(MacOS::XQuartz).to receive(:version).and_return("2.7.5")
+ expect(MacOS::XQuartz).to receive(:installed?).and_return(true)
+ expec... | true |
Other | Homebrew | brew | d25f9498244d2adebe3046c8857e05ded17f7485.json | Convert Sandbox test to spec. | Library/Homebrew/test/sandbox_spec.rb | @@ -0,0 +1,78 @@
+require "sandbox"
+
+RSpec::Matchers.define_negated_matcher :not_matching, :matching
+
+describe Sandbox do
+ let(:dir) { @dir = Pathname.new(Dir.mktmpdir) }
+ let(:file) { dir/"foo" }
+
+ before(:each) do
+ skip "Sandbox not implemented." unless described_class.available?
+ end
+
+ after(:eac... | true |
Other | Homebrew | brew | d25f9498244d2adebe3046c8857e05ded17f7485.json | Convert Sandbox test to spec. | Library/Homebrew/test/sandbox_test.rb | @@ -1,73 +0,0 @@
-require "testing_env"
-require "sandbox"
-
-class SandboxTest < Homebrew::TestCase
- def setup
- super
- skip "sandbox not implemented" unless Sandbox.available?
- @sandbox = Sandbox.new
- @dir = Pathname.new(mktmpdir)
- @file = @dir/"foo"
- end
-
- def test_formula?
- f = formula... | true |
Other | Homebrew | brew | 76acd1e6eeb567647ac9a41dd23a78263c1c1643.json | Convert Version test to spec. | Library/Homebrew/test/support/helper/test_case.rb | @@ -6,11 +6,9 @@ class TestCase < ::Minitest::Test
require "test/support/helper/fs_leak_logger"
require "test/support/helper/lifecycle_enforcer"
require "test/support/helper/shutup"
- require "test/support/helper/version_assertions"
include Test::Helper::FSLeakLogger
include Test::Helper::Li... | true |
Other | Homebrew | brew | 76acd1e6eeb567647ac9a41dd23a78263c1c1643.json | Convert Version test to spec. | Library/Homebrew/test/support/helper/version_assertions.rb | @@ -1,23 +0,0 @@
-require "rubygems"
-
-module Test
- module Helper
- module VersionAssertions
- def version(v)
- Version.create(v)
- end
-
- def assert_version_equal(expected, actual)
- assert_equal Version.create(expected), actual
- end
-
- def assert_version_detected(expect... | true |
Other | Homebrew | brew | 76acd1e6eeb567647ac9a41dd23a78263c1c1643.json | Convert Version test to spec. | Library/Homebrew/test/version_spec.rb | @@ -0,0 +1,602 @@
+require "version"
+
+describe Version::Token do
+ specify "#inspect" do
+ expect(Version::Token.new("foo").inspect).to eq('#<Version::Token "foo">')
+ end
+
+ specify "#to_s" do
+ expect(Version::Token.new("foo").to_s).to eq("foo")
+ end
+end
+
+describe Version::NULL do
+ it "is always sm... | true |
Other | Homebrew | brew | 76acd1e6eeb567647ac9a41dd23a78263c1c1643.json | Convert Version test to spec. | Library/Homebrew/test/versions_test.rb | @@ -1,528 +0,0 @@
-require "testing_env"
-require "version"
-
-class VersionTests < Homebrew::TestCase
- def test_accepts_objects_responding_to_to_str
- value = stub(to_str: "0.1")
- assert_equal "0.1", Version.create(value).to_s
- end
-
- def test_raises_for_non_string_objects
- assert_raises(TypeError) { ... | true |
Other | Homebrew | brew | dda5d3ac0564cb491f9d55f2b0d2476d40ee1ee9.json | Convert DependencyCollector test to spec. | Library/Homebrew/test/dependency_collector_spec.rb | @@ -0,0 +1,137 @@
+require "dependency_collector"
+
+RSpec::Matchers.alias_matcher :be_a_build_requirement, :be_build
+
+describe DependencyCollector do
+ def find_dependency(name)
+ subject.deps.find { |dep| dep.name == name }
+ end
+
+ def find_requirement(klass)
+ subject.requirements.find { |req| req.is_a?... | true |
Other | Homebrew | brew | dda5d3ac0564cb491f9d55f2b0d2476d40ee1ee9.json | Convert DependencyCollector test to spec. | Library/Homebrew/test/dependency_collector_test.rb | @@ -1,148 +0,0 @@
-require "testing_env"
-require "dependency_collector"
-
-class DependencyCollectorTests < Homebrew::TestCase
- def find_dependency(name)
- @d.deps.find { |dep| dep.name == name }
- end
-
- def find_requirement(klass)
- @d.requirements.find { |req| req.is_a? klass }
- end
-
- def setup
- ... | true |
Other | Homebrew | brew | 3abfdc9e8012fb7d36010237323a054306a1ea83.json | Convert Dependency test to spec. | Library/Homebrew/test/dependable_spec.rb | @@ -0,0 +1,24 @@
+require "dependable"
+
+RSpec::Matchers.alias_matcher :be_a_build_dependency, :be_build
+
+describe Dependable do
+ subject { double(tags: tags).extend(described_class) }
+ let(:tags) { ["foo", "bar", :build] }
+
+ specify "#options" do
+ expect(subject.options.as_flags.sort).to eq(%w[--foo --ba... | true |
Other | Homebrew | brew | 3abfdc9e8012fb7d36010237323a054306a1ea83.json | Convert Dependency test to spec. | Library/Homebrew/test/dependency_spec.rb | @@ -0,0 +1,121 @@
+require "dependency"
+
+RSpec::Matchers.alias_matcher :be_a_build_dependency, :be_build
+RSpec::Matchers.alias_matcher :be_a_runtime_dependency, :be_run
+
+describe Dependency do
+ describe "::new" do
+ it "accepts a single tag" do
+ dep = described_class.new("foo", %w[bar])
+ expect(de... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.