aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/utils_spec.rb
AgeCommit message (Collapse)Author
2017-10-29Tweak use of with_envMike McQuaid
- Use it in more places where it saves code - Allow using symbolic keys for a cleaner interface - Use `HOMEBREW_GEM_*` instead of `GEM_OLD_*`
2017-10-18Use “squiggly” heredocs.Markus Reiter
2017-09-16List cask full-namesDan Wendorf
`brew cask list` supports the `--full-name` flag which will include the tap name for casks not part of the core caskroom/cask tap. For example, if cask "foo-beta" is installed from the caskroom/versions cask, `brew cask list --full-name` will report the name as "caskroom/versions/foo-beta".
2017-07-15Add `with_env` helper to set temporary ENV varsMisty De Meo
2017-06-01don't try to find the full path of the editor in 'brew edit'adrian
fixes #2709
2017-04-24Remove puts_hash, require ppMike McQuaid
I wasn’t aware this existed when I created puts_hash so: may as well remove it.
2017-04-24utils: make which_editor handle editor args.Mike McQuaid
Handle cases like e.g. `EDITOR="subl -w"`.
2017-04-23Fix audit version_scheme and revision checks.Mike McQuaid
Another attempt at fixing `brew audit` issues around detecting `revision` and `version_scheme` changes correctly. First done in #1754 and #2086 (reverted in #2099 and #2100). To ease future debugging a `ph` helper has been added to print a hash and a series of RSpec tests to verify that the `revision`, `version_scheme` and `version` formula version audits behave as expected. Fixes #1731.
2017-04-21Fix `brew edit` with environment filtering.Mike McQuaid
For many people `brew edit` makes use of the `EDITOR` variable to pick a sensible editor. With environment filtering enabled unless this editor is found in the default system PATH it'll fall back to e.g. `vim`. Instead, ensure that we export the original, pre-filtering `PATH` as `HOMEBREW_PATH` and use that internally to locate the editor. In future this same approach will likely be used for requirements to be able to find tools, too, and for other variables which we want to expose to Homebrew itself but not other build tools. Note that `HOMEBREW_PATH` is the same as `PATH` when build filtering hasn't been enabled.
2017-03-11Deprecate `#plural`.Markus Reiter
2017-02-28Add `mktmpdir` helper method.Markus Reiter
2017-02-25Add 'B' for bytes to cleanup command outputJeppe Toustrup
When `brew cleanup` is run it prints out a message like the following: > This operation has freed approximately 222M of disk space. The '222M' refers to megabytes but the normal acronym for megabytes would be 'MB'. The 'B' is also missing from kilobytes and gigabytes in the output, so that's what this commit adds.
2017-02-19Handle `Homebrew.failed` in `spec_helper`.Markus Reiter
2017-02-19Convert Utils test to spec.Markus Reiter