From a98015192b6b7d990ea89b70955a607af327cfd7 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 22 Aug 2016 01:49:12 +0200 Subject: Move Cask man page to root. --- Library/Homebrew/cask/doc/man_page/brew-cask.1.md | 267 ---------------------- Library/Homebrew/cmd/man.rb | 2 +- Library/Homebrew/manpages/brew-cask.1.md | 267 ++++++++++++++++++++++ 3 files changed, 268 insertions(+), 268 deletions(-) delete mode 100644 Library/Homebrew/cask/doc/man_page/brew-cask.1.md create mode 100644 Library/Homebrew/manpages/brew-cask.1.md (limited to 'Library') diff --git a/Library/Homebrew/cask/doc/man_page/brew-cask.1.md b/Library/Homebrew/cask/doc/man_page/brew-cask.1.md deleted file mode 100644 index fc14d54d1..000000000 --- a/Library/Homebrew/cask/doc/man_page/brew-cask.1.md +++ /dev/null @@ -1,267 +0,0 @@ -brew-cask(1) - a friendly binary installer for macOS -======================================================== - -## SYNOPSIS - -`brew cask` command [options] [ ... ] - -## DESCRIPTION - -Homebrew-Cask is a tool for installing precompiled macOS binaries (such as -Applications) from the command line. The user is never required to use the -graphical user interface. - -## ALPHA-QUALITY SOFTWARE - -Homebrew-Cask works robustly enough that we welcome new users, but the -project is still in early development. That means command names, option -names, and other aspects of this manual are still subject to change. - -## FREQUENTLY USED COMMANDS - - * `install [--force] [--skip-cask-deps] [--require-sha]` [ ... ]: - Install Cask identified by . - - * `uninstall [--force]` [ ... ]: - Uninstall Cask identified by . - - * `search` | //: - Perform a substring search of known Cask tokens for . If the text - is delimited by slashes, it is interpreted as a Ruby regular expression. - - The tokens returned by `search` are suitable as arguments for most other - commands, such as `install` or `uninstall`. - -## COMMANDS - - * `audit` [ ... ]: - Check the given Casks for installability. - If no tokens are given on the command line, all Casks are audited. - - * `cat` [ ... ]: - Dump the given Cask definition file to the standard output. - - * `cleanup` [--outdated]: - Clean up cached downloads and tracker symlinks. With `--outdated`, - only clean up cached downloads older than 10 days old. - - * `create` : - Generate a Cask definition file for the Cask identified by - and open a template for it in your favorite editor. - - * `doctor` or `dr`: - Check for configuration issues. Can be useful to upload as a gist for - developers along with a bug report. - - * `edit` : - Open the given Cask definition file for editing. - - * `fetch` [--force] [ ... ]: - Download remote application files for the given Cask to the local - cache. With `--force`, force re-download even if the files are already - cached. - - * `home` or `homepage` [ ... ]: - Display the homepage associated with a given Cask in a browser. - - With no arguments, display the project page . - - * `info` or `abv` [ ... ]: - Display information about the given Cask. - - * `install [--force] [--skip-cask-deps] [--require-sha]` [ ... ]: - Install the given Cask. With `--force`, re-install even if the Cask - appears to be already present. With `--skip-cask-deps`, skip any Cask - dependencies. `--require-sha` will abort installation if the Cask does not - have a checksum defined. - - is usually the ID of a Cask as returned by `brew cask search`, - but see [OTHER WAYS TO SPECIFY A CASK][] for variations. - - * `list` or `ls` [-1 | -l] [ ... ]: - Without any arguments, list all installed Casks. With `-1`, always - format the output in a single column. With `-l`, give a more detailed - listing. - - If is given, summarize the staged files associated with the - given Cask. - - * `search` or `-S`: - Display all Casks available for install. - - * `search` or `-S` | //: - Perform a substring search of known Cask tokens for . If the text - is delimited by slashes, it is interpreted as a Ruby regular expression. - - * `style` [--fix] [ ... ]: - Check the given Casks for correct style using [RuboCop Cask](https://github.com/caskroom/rubocop-cask). - If no tokens are given on the command line, all Casks are checked. - With `--fix`, auto-correct any style errors if possible. - - * `uninstall [--force]` or `rm` or `remove` [ ... ]: - Uninstall the given Cask. With `--force`, uninstall even if the Cask - does not appear to be present. - - Note that `uninstall --force` is currently imperfect. It will follow - the `uninstall` instructions from *newest* Cask definition, even if - the given Cask has changed since you installed it. The result is that - `uninstall --force` will always succeed in removing relevant files - under ``, but will sometimes fail to remove relevant - installed files outside of it. This issue is being - addressed. - - `uninstall` without `--force` is also imperfect. It may be unable to - perform an `uninstall` operation if the given Cask has changed since you - installed it. This issue is being addressed. - - * `update`: - For convenience. `brew cask update` is a synonym for `brew update`. - - * `zap` [ ... ]: - Unconditionally remove _all_ files associated with the given Cask. - - Implicitly performs all actions associated with `uninstall`, even if - the Cask does not appear to be currently installed. - - Removes all staged versions of the Cask distribution found under - `/`. - - If the Cask definition contains a `zap` stanza, performs additional - `zap` actions as defined there, such as removing local preference - files. `zap` actions are variable, depending on the level of detail - defined by the Cask author. - - **`zap` may remove files which are shared between applications.** - -## OPTIONS - -To make these options persistent, see the ENVIRONMENT section, below. - -Some of these (such as `--prefpanedir`) may be subject to removal -in a future version. - - * `--force`: - Force an install to proceed even when a previously-existing install - is detected. - - * `--skip-cask-deps`: - Skip Cask dependencies when installing. - - * `--require-sha`: - Abort Cask installation if the Cask does not have a checksum defined. - - * `--caskroom=`: - Location of the Caskroom, where all binaries are stored. The default value is: `$(brew --repository)/Caskroom`. - - * `--verbose`: - Give additional feedback during installation. - - * `--appdir=`: - Target location for Applications. The default value is `/Applications`. - - * `--colorpickerdir=`: - Target location for Color Pickers. The default value is `~/Library/ColorPickers`. - - * `--prefpanedir=`: - Target location for Preference Panes. The default value is `~/Library/PreferencePanes`. - - * `--qlplugindir=`: - Target location for QuickLook Plugins. The default value is `~/Library/QuickLook`. - - * `--fontdir=`: - Target location for Fonts. The default value is `~/Library/Fonts`. - - * `--servicedir=`: - Target location for Services. The default value is `~/Library/Services`. - - * `--input_methoddir=`: - Target location for Input Methods. The default value is `~/Library/Input Methods`. - - * `--internet_plugindir=`: - Target location for Internet Plugins. The default value is `~/Library/Internet Plug-Ins`. - - * `--audio_unit_plugindir=`: - Target location for Audio Unit Plugins. The default value is `~/Library/Audio/Plug-Ins/Components`. - - * `--vst_plugindir=`: - Target location for VST Plugins. The default value is `~/Library/Audio/Plug-Ins/VST`. - - * `--vst3_plugindir=`: - Target location for VST3 Plugins. The default value is `~/Library/Audio/Plug-Ins/VST3`. - - * `--screen_saverdir=`: - Target location for Screen Savers. The default value is `~/Library/Screen Savers`. - - * `--no-binaries`: - Do not link "helper" executables to `/usr/local/bin`. - - * `--debug`: - Output debugging information of use to Cask authors and developers. - -## INTERACTION WITH HOMEBREW - -Homebrew-Cask is implemented as a external command for Homebrew. That means -this project is entirely built upon the Homebrew infrastructure. For -example, upgrades to the Homebrew-Cask tool are received through Homebrew: - - brew update; brew cleanup; brew cask cleanup - -And updates to individual Cask definitions are received whenever you issue -the Homebrew command: - - brew update - -## OTHER WAYS TO SPECIFY A CASK - -Most Homebrew-Cask commands can accept a Cask token as an argument. As -described above, the argument can take the form of: - - * A token as returned by `brew cask search`, _eg_ `google-chrome` - -Homebrew-Cask also accepts three other forms in place of plain tokens: - - * A fully-qualified token which includes the Tap name, _eg_ - `caskroom/fonts/font-symbola` - - * A fully-qualified pathname to a Cask file, _eg_ - `/usr/local/Library/Taps/caskroom/homebrew-cask/Casks/google-chrome.rb` - - * A `curl`-retrievable URI to a Cask file, _eg_ - `https://raw.githubusercontent.com/caskroom/homebrew-cask/f25b6babcd398abf48e33af3d887b2d00de1d661/Casks/google-chrome.rb` - -## ENVIRONMENT - -Homebrew-Cask respects many of the environment variables used by the -parent command `brew`. Please refer to the `brew`(1) man page for more -information. - -Environment variables specific to Homebrew-Cask: - - * HOMEBREW\_CASK\_OPTS: - This variable may contain any arguments normally used as options on - the command-line. This is particularly useful to make options persistent. - For example, you might add to your .bash_profile or .zshenv something like: - `export HOMEBREW_CASK_OPTS='--appdir=/Applications --caskroom=/etc/Caskroom'`. - -## SEE ALSO - -The Homebrew-Cask home page: . - -The Homebrew-Cask GitHub page: . - -`brew`(1), `curl`(1) - -## AUTHORS - -Paul Hinze and Contributors. - -Man page format based on `brew.1.md` from Homebrew. - -## BUGS - -We still have bugs — and we are busy fixing them! If you have a problem, don’t -be shy about reporting it on our [GitHub issues page](https://github.com/caskroom/homebrew-cask/issues?state=open). - -When reporting bugs, remember that Homebrew-Cask is an independent project from -Homebrew. Do your best to direct bug reports to the appropriate project. If -your command-line started with `brew cask`, bring the bug to us first! diff --git a/Library/Homebrew/cmd/man.rb b/Library/Homebrew/cmd/man.rb index 536b27984..0191d76c7 100644 --- a/Library/Homebrew/cmd/man.rb +++ b/Library/Homebrew/cmd/man.rb @@ -38,7 +38,7 @@ module Homebrew convert_man_page(markup, TARGET_DOC_PATH/"brew.1.html") convert_man_page(markup, TARGET_MAN_PATH/"brew.1") - cask_markup = (HOMEBREW_LIBRARY/"Homebrew/cask/doc/man_page/brew-cask.1.md").read + cask_markup = (HOMEBREW_LIBRARY/"Homebrew/manpages/brew-cask.1.md").read convert_man_page(cask_markup, TARGET_MAN_PATH/"brew-cask.1") end diff --git a/Library/Homebrew/manpages/brew-cask.1.md b/Library/Homebrew/manpages/brew-cask.1.md new file mode 100644 index 000000000..fc14d54d1 --- /dev/null +++ b/Library/Homebrew/manpages/brew-cask.1.md @@ -0,0 +1,267 @@ +brew-cask(1) - a friendly binary installer for macOS +======================================================== + +## SYNOPSIS + +`brew cask` command [options] [ ... ] + +## DESCRIPTION + +Homebrew-Cask is a tool for installing precompiled macOS binaries (such as +Applications) from the command line. The user is never required to use the +graphical user interface. + +## ALPHA-QUALITY SOFTWARE + +Homebrew-Cask works robustly enough that we welcome new users, but the +project is still in early development. That means command names, option +names, and other aspects of this manual are still subject to change. + +## FREQUENTLY USED COMMANDS + + * `install [--force] [--skip-cask-deps] [--require-sha]` [ ... ]: + Install Cask identified by . + + * `uninstall [--force]` [ ... ]: + Uninstall Cask identified by . + + * `search` | //: + Perform a substring search of known Cask tokens for . If the text + is delimited by slashes, it is interpreted as a Ruby regular expression. + + The tokens returned by `search` are suitable as arguments for most other + commands, such as `install` or `uninstall`. + +## COMMANDS + + * `audit` [ ... ]: + Check the given Casks for installability. + If no tokens are given on the command line, all Casks are audited. + + * `cat` [ ... ]: + Dump the given Cask definition file to the standard output. + + * `cleanup` [--outdated]: + Clean up cached downloads and tracker symlinks. With `--outdated`, + only clean up cached downloads older than 10 days old. + + * `create` : + Generate a Cask definition file for the Cask identified by + and open a template for it in your favorite editor. + + * `doctor` or `dr`: + Check for configuration issues. Can be useful to upload as a gist for + developers along with a bug report. + + * `edit` : + Open the given Cask definition file for editing. + + * `fetch` [--force] [ ... ]: + Download remote application files for the given Cask to the local + cache. With `--force`, force re-download even if the files are already + cached. + + * `home` or `homepage` [ ... ]: + Display the homepage associated with a given Cask in a browser. + + With no arguments, display the project page . + + * `info` or `abv` [ ... ]: + Display information about the given Cask. + + * `install [--force] [--skip-cask-deps] [--require-sha]` [ ... ]: + Install the given Cask. With `--force`, re-install even if the Cask + appears to be already present. With `--skip-cask-deps`, skip any Cask + dependencies. `--require-sha` will abort installation if the Cask does not + have a checksum defined. + + is usually the ID of a Cask as returned by `brew cask search`, + but see [OTHER WAYS TO SPECIFY A CASK][] for variations. + + * `list` or `ls` [-1 | -l] [ ... ]: + Without any arguments, list all installed Casks. With `-1`, always + format the output in a single column. With `-l`, give a more detailed + listing. + + If is given, summarize the staged files associated with the + given Cask. + + * `search` or `-S`: + Display all Casks available for install. + + * `search` or `-S` | //: + Perform a substring search of known Cask tokens for . If the text + is delimited by slashes, it is interpreted as a Ruby regular expression. + + * `style` [--fix] [ ... ]: + Check the given Casks for correct style using [RuboCop Cask](https://github.com/caskroom/rubocop-cask). + If no tokens are given on the command line, all Casks are checked. + With `--fix`, auto-correct any style errors if possible. + + * `uninstall [--force]` or `rm` or `remove` [ ... ]: + Uninstall the given Cask. With `--force`, uninstall even if the Cask + does not appear to be present. + + Note that `uninstall --force` is currently imperfect. It will follow + the `uninstall` instructions from *newest* Cask definition, even if + the given Cask has changed since you installed it. The result is that + `uninstall --force` will always succeed in removing relevant files + under ``, but will sometimes fail to remove relevant + installed files outside of it. This issue is being + addressed. + + `uninstall` without `--force` is also imperfect. It may be unable to + perform an `uninstall` operation if the given Cask has changed since you + installed it. This issue is being addressed. + + * `update`: + For convenience. `brew cask update` is a synonym for `brew update`. + + * `zap` [ ... ]: + Unconditionally remove _all_ files associated with the given Cask. + + Implicitly performs all actions associated with `uninstall`, even if + the Cask does not appear to be currently installed. + + Removes all staged versions of the Cask distribution found under + `/`. + + If the Cask definition contains a `zap` stanza, performs additional + `zap` actions as defined there, such as removing local preference + files. `zap` actions are variable, depending on the level of detail + defined by the Cask author. + + **`zap` may remove files which are shared between applications.** + +## OPTIONS + +To make these options persistent, see the ENVIRONMENT section, below. + +Some of these (such as `--prefpanedir`) may be subject to removal +in a future version. + + * `--force`: + Force an install to proceed even when a previously-existing install + is detected. + + * `--skip-cask-deps`: + Skip Cask dependencies when installing. + + * `--require-sha`: + Abort Cask installation if the Cask does not have a checksum defined. + + * `--caskroom=`: + Location of the Caskroom, where all binaries are stored. The default value is: `$(brew --repository)/Caskroom`. + + * `--verbose`: + Give additional feedback during installation. + + * `--appdir=`: + Target location for Applications. The default value is `/Applications`. + + * `--colorpickerdir=`: + Target location for Color Pickers. The default value is `~/Library/ColorPickers`. + + * `--prefpanedir=`: + Target location for Preference Panes. The default value is `~/Library/PreferencePanes`. + + * `--qlplugindir=`: + Target location for QuickLook Plugins. The default value is `~/Library/QuickLook`. + + * `--fontdir=`: + Target location for Fonts. The default value is `~/Library/Fonts`. + + * `--servicedir=`: + Target location for Services. The default value is `~/Library/Services`. + + * `--input_methoddir=`: + Target location for Input Methods. The default value is `~/Library/Input Methods`. + + * `--internet_plugindir=`: + Target location for Internet Plugins. The default value is `~/Library/Internet Plug-Ins`. + + * `--audio_unit_plugindir=`: + Target location for Audio Unit Plugins. The default value is `~/Library/Audio/Plug-Ins/Components`. + + * `--vst_plugindir=`: + Target location for VST Plugins. The default value is `~/Library/Audio/Plug-Ins/VST`. + + * `--vst3_plugindir=`: + Target location for VST3 Plugins. The default value is `~/Library/Audio/Plug-Ins/VST3`. + + * `--screen_saverdir=`: + Target location for Screen Savers. The default value is `~/Library/Screen Savers`. + + * `--no-binaries`: + Do not link "helper" executables to `/usr/local/bin`. + + * `--debug`: + Output debugging information of use to Cask authors and developers. + +## INTERACTION WITH HOMEBREW + +Homebrew-Cask is implemented as a external command for Homebrew. That means +this project is entirely built upon the Homebrew infrastructure. For +example, upgrades to the Homebrew-Cask tool are received through Homebrew: + + brew update; brew cleanup; brew cask cleanup + +And updates to individual Cask definitions are received whenever you issue +the Homebrew command: + + brew update + +## OTHER WAYS TO SPECIFY A CASK + +Most Homebrew-Cask commands can accept a Cask token as an argument. As +described above, the argument can take the form of: + + * A token as returned by `brew cask search`, _eg_ `google-chrome` + +Homebrew-Cask also accepts three other forms in place of plain tokens: + + * A fully-qualified token which includes the Tap name, _eg_ + `caskroom/fonts/font-symbola` + + * A fully-qualified pathname to a Cask file, _eg_ + `/usr/local/Library/Taps/caskroom/homebrew-cask/Casks/google-chrome.rb` + + * A `curl`-retrievable URI to a Cask file, _eg_ + `https://raw.githubusercontent.com/caskroom/homebrew-cask/f25b6babcd398abf48e33af3d887b2d00de1d661/Casks/google-chrome.rb` + +## ENVIRONMENT + +Homebrew-Cask respects many of the environment variables used by the +parent command `brew`. Please refer to the `brew`(1) man page for more +information. + +Environment variables specific to Homebrew-Cask: + + * HOMEBREW\_CASK\_OPTS: + This variable may contain any arguments normally used as options on + the command-line. This is particularly useful to make options persistent. + For example, you might add to your .bash_profile or .zshenv something like: + `export HOMEBREW_CASK_OPTS='--appdir=/Applications --caskroom=/etc/Caskroom'`. + +## SEE ALSO + +The Homebrew-Cask home page: . + +The Homebrew-Cask GitHub page: . + +`brew`(1), `curl`(1) + +## AUTHORS + +Paul Hinze and Contributors. + +Man page format based on `brew.1.md` from Homebrew. + +## BUGS + +We still have bugs — and we are busy fixing them! If you have a problem, don’t +be shy about reporting it on our [GitHub issues page](https://github.com/caskroom/homebrew-cask/issues?state=open). + +When reporting bugs, remember that Homebrew-Cask is an independent project from +Homebrew. Do your best to direct bug reports to the appropriate project. If +your command-line started with `brew cask`, bring the bug to us first! -- cgit v1.2.3 From 66b7cd350eb799bfdfd5ddb28d9b6034c3cd4554 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 22 Aug 2016 02:31:39 +0200 Subject: Remove non-existing directories from Cask’s `.simplecov`. --- Library/Homebrew/cask/.simplecov | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cask/.simplecov b/Library/Homebrew/cask/.simplecov index f152ccc91..e1a2a4001 100644 --- a/Library/Homebrew/cask/.simplecov +++ b/Library/Homebrew/cask/.simplecov @@ -1,7 +1,5 @@ SimpleCov.start do - add_filter 'bin/' - add_filter 'Casks/' - add_filter 'developer/' + add_filter 'lib/vendor/' add_filter 'doc/' add_filter 'spec/' add_filter 'test/' -- cgit v1.2.3 From 84820f2c5a92b7a80ef8e56e472fda5694890d72 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 22 Aug 2016 02:59:50 +0200 Subject: Refactor `.editorconfig`. --- Library/.editorconfig | 12 ++++++------ Library/Homebrew/cask/.editorconfig | 9 --------- 2 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 Library/Homebrew/cask/.editorconfig (limited to 'Library') diff --git a/Library/.editorconfig b/Library/.editorconfig index bbd2c927c..439f7c93c 100644 --- a/Library/.editorconfig +++ b/Library/.editorconfig @@ -1,17 +1,17 @@ # http://editorconfig.org -[Homebrew/**.rb] + +root = true + +[*] charset = utf-8 end_of_line = lf indent_style = space indent_size = 2 insert_final_newline = true + +[{Homebrew/**.rb,.simplecov}] trim_trailing_whitespace = true [Taps/homebrew/**.rb] -charset = utf-8 -end_of_line = lf -indent_style = space -indent_size = 2 -insert_final_newline = true # trailing whitespace is crucial for patches trim_trailing_whitespace = false diff --git a/Library/Homebrew/cask/.editorconfig b/Library/Homebrew/cask/.editorconfig deleted file mode 100644 index c6c8b3621..000000000 --- a/Library/Homebrew/cask/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -- cgit v1.2.3 From 61b38bdf1e11dcbc4f9c6aa0b61fd09c5b87b603 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 22 Aug 2016 03:31:30 +0200 Subject: Remove `man` generation from Cask’s Rakefile. --- Library/Homebrew/cask/Rakefile | 5 ----- 1 file changed, 5 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cask/Rakefile b/Library/Homebrew/cask/Rakefile index 6c638ff49..6a6f76e6f 100644 --- a/Library/Homebrew/cask/Rakefile +++ b/Library/Homebrew/cask/Rakefile @@ -44,8 +44,3 @@ task :console do ARGV.clear Hbc.pry end - -desc "Generate man page from Markdown source" -task :man do - sh "brew man" -end -- cgit v1.2.3 From ff30a303c8844820dc5bf18f6ea12c485180f4a2 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 22 Aug 2016 06:40:25 +0200 Subject: Update Cask’s Gemfile. --- Library/Homebrew/cask/Gemfile | 4 --- Library/Homebrew/cask/Gemfile.lock | 54 +++++++++++--------------------------- 2 files changed, 16 insertions(+), 42 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cask/Gemfile b/Library/Homebrew/cask/Gemfile index cc1771d11..c164a3f67 100644 --- a/Library/Homebrew/cask/Gemfile +++ b/Library/Homebrew/cask/Gemfile @@ -11,10 +11,6 @@ group :development do gem "rubocop-cask", "~> 0.8.3" end -group :release do - gem "ronn", "0.7.3" -end - group :test do gem "coveralls", require: false gem "minitest", "5.4.1" diff --git a/Library/Homebrew/cask/Gemfile.lock b/Library/Homebrew/cask/Gemfile.lock index 954938b17..b65784444 100644 --- a/Library/Homebrew/cask/Gemfile.lock +++ b/Library/Homebrew/cask/Gemfile.lock @@ -4,58 +4,40 @@ GEM ansi (1.5.0) ast (2.3.0) builder (3.2.2) - byebug (8.2.1) - coderay (1.1.0) - coveralls (0.8.10) - json (~> 1.8) - rest-client (>= 1.6.8, < 2) - simplecov (~> 0.11.0) + byebug (9.0.5) + coderay (1.1.1) + coveralls (0.8.15) + json (>= 1.8, < 3) + simplecov (~> 0.12.0) term-ansicolor (~> 1.3) thor (~> 0.19.1) - tins (~> 1.6.0) + tins (>= 1.6.0, < 2) diff-lcs (1.2.5) docile (1.1.5) - domain_name (0.5.25) - unf (>= 0.0.5, < 1.0.0) - hpricot (0.8.6) - http-cookie (1.0.2) - domain_name (~> 0.5) - json (1.8.3) + json (2.0.2) metaclass (0.0.4) method_source (0.8.2) - mime-types (2.99) minitest (5.4.1) - minitest-reporters (1.1.7) + minitest-reporters (1.1.11) ansi builder minitest (>= 5.0) ruby-progressbar mocha (1.1.0) metaclass (~> 0.0.1) - mustache (1.0.2) - netrc (0.11.0) parser (2.3.1.2) ast (~> 2.2) powerpack (0.1.1) - pry (0.10.3) + pry (0.10.4) coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - pry-byebug (3.3.0) - byebug (~> 8.0) + pry-byebug (3.4.0) + byebug (~> 9.0) pry (~> 0.10) public_suffix (2.0.2) rainbow (2.1.0) rake (10.4.2) - rdiscount (2.1.8) - rest-client (1.8.0) - http-cookie (>= 1.0.2, < 2.0) - mime-types (>= 1.16, < 3.0) - netrc (~> 0.7) - ronn (0.7.3) - hpricot (>= 0.8.2) - mustache (>= 0.7.0) - rdiscount (>= 1.5.8) rspec (3.0.0) rspec-core (~> 3.0.0) rspec-expectations (~> 3.0.0) @@ -71,8 +53,8 @@ GEM rspec-mocks (3.0.4) rspec-support (~> 3.0.0) rspec-support (3.0.4) - rspec-wait (0.0.8) - rspec (>= 2.11, < 3.5) + rspec-wait (0.0.9) + rspec (>= 3, < 4) rubocop (0.41.2) parser (>= 2.3.1.1, < 3.0) powerpack (~> 0.1) @@ -83,19 +65,16 @@ GEM public_suffix (~> 2.0) rubocop (~> 0.41.1) ruby-progressbar (1.8.1) - simplecov (0.11.1) + simplecov (0.12.0) docile (~> 1.1.0) - json (~> 1.8) + json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.0) slop (3.6.0) term-ansicolor (1.3.2) tins (~> 1.0) thor (0.19.1) - tins (1.6.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.1) + tins (1.12.0) unicode-display_width (1.1.0) PLATFORMS @@ -109,7 +88,6 @@ DEPENDENCIES pry pry-byebug rake - ronn (= 0.7.3) rspec (~> 3.0.0) rspec-its rspec-wait -- cgit v1.2.3 From 7b8bae710e79f51b4286b9cf955c837d09f078f1 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 22 Aug 2016 08:52:42 +0200 Subject: Use `ThreadError` to break loop. --- Library/Homebrew/cleanup.rb | 9 +++++---- Library/Homebrew/readall.rb | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb index 96689be11..41c4bbf34 100644 --- a/Library/Homebrew/cleanup.rb +++ b/Library/Homebrew/cleanup.rb @@ -121,11 +121,12 @@ module Homebrew map { |p| HOMEBREW_PREFIX/p }.each { |p| paths << p if p.exist? } workers = (0...Hardware::CPU.cores).map do Thread.new do - begin - while p = paths.pop(true) - quiet_system "find", p, "-name", ".DS_Store", "-delete" + Kernel.loop do + begin + quiet_system "find", paths.deq(true), "-name", ".DS_Store", "-delete" + rescue ThreadError + break # if queue is empty end - rescue ThreadError # ignore empty queue error end end end diff --git a/Library/Homebrew/readall.rb b/Library/Homebrew/readall.rb index 4d09226f5..61222e015 100644 --- a/Library/Homebrew/readall.rb +++ b/Library/Homebrew/readall.rb @@ -11,12 +11,13 @@ module Readall failed = false workers = (0...Hardware::CPU.cores).map do Thread.new do - begin - while rb = ruby_files_queue.pop(true) + Kernel.loop do + begin # As a side effect, print syntax errors/warnings to `$stderr`. - failed = true if syntax_errors_or_warnings?(rb) + failed = true if syntax_errors_or_warnings?(ruby_files_queue.deq(true)) + rescue ThreadError + break end - rescue ThreadError # ignore empty queue error end end end -- cgit v1.2.3