aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
AgeCommit message (Collapse)Author
2017-03-11Deprecate `#plural`.Markus Reiter
2017-03-11Add `Formatter::pluralize`.Markus Reiter
2017-03-04Use `Gem.bindir` instead of `#{Gem.dir}/bin`.Markus Reiter
2017-02-27Merge pull request #1708 from joshka/feature/install-tap-cmd-completionsMike McQuaid
install tap cmd completions
2017-02-26Install tap command completions and manpagesJoshua McKinney
Taps can include completion scripts for external commands under `completions/bash`, `completions/fish`, or `completions/zsh`. `brew tap` will automatically install these into the correct directories during install.
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-20Added support for returning HTTP status codes and for git and svn URLsDavid Broder-Rodgers
2017-01-23emoji: remove hack required for Ruby 1.8.7Alyssa Ross
Since this hack is no longer required, and `Emoji.tick` and `.cross` are only called in one place, I think it's better to just inline them there rather than having methods on `Emoji` that just return a one-character String.
2016-12-30Add option to disable methods on specific date.Markus Reiter
2016-12-10which_all: don't assume path is a string.Mike McQuaid
Fixes #1635.
2016-11-20compat: deprecate Utils::JSON in favor of corelib JSON.William Woodruff
2016-11-14utils: fix capture_stderr styleAlyssa Ross
2016-11-14Warn developers when uninstalling a dependencyAlyssa Ross
Suggested in #1084. Made the existing warning output entirely to STDERR, because previously the first line went to STDERR and subsequent ones went to STDOUT.
2016-10-15Convert `puts_columns` to `puts Formatter.columns`.Markus Reiter
2016-10-15Refactor `puts_columns`.Markus Reiter
2016-10-08Rename FormulaMethodDeprecatedError to MethodDeprecatedError.Markus Reiter
2016-10-04Make `core_tap_version_string` reusable.Markus Reiter
2016-10-04Merge pull request #1145 from reitermarkus/module-functionMarkus Reiter
Use `module_function` for `Homebrew` module.
2016-10-02Fix Style/GuardClause style offense.Markus Reiter
2016-10-02Use `module_function` for commands.Markus Reiter
2016-10-01Add `Formatter` module.Markus Reiter
2016-10-01Refactor Tty.Markus Reiter
2016-09-24Fix Style/GuardClause.Markus Reiter
2016-09-22Use git describe to get the HOMEBREW_VERSION.Mike McQuaid
For tagged commits produces the output: - `1.0.1` For untagged commits with a dirty tree produces the output: - `1.0.1-19-g23efbc5-dirty` Performance: ``` git describe --tags --dirty 2> /dev/null 0.07s user 0.01s system 96% cpu 0.086 total ``` This means we can tag any commit without needing to manually remember to bump the revision every time.
2016-09-20utils: fix completions/manpages/docs linking.Mike McQuaid
2016-09-19Use user GEM_HOME for installing gemsAlyssa Ross
Save the value of GEM_HOME before unsetting it, and resetting it when setting up a gem environment. Fixes #944.
2016-09-19utils: skip migration of broken formulae symlinks.Mike McQuaid
Closes https://github.com/Homebrew/homebrew-core/issues/4973
2016-09-18Merge pull request #989 from MikeMcQuaid/rubocop-finalMike McQuaid
Rubocop: apply auto-corrections and don't use hash-rockets
2016-09-17utils: convert formula name from pathname to stringZhiming Wang
`name` is passed as argument to Formulary.factory which could later be downcased at formulary.rb:349, but Pathname doesn't have a downcase method. Converting `name` to String as it should be fixes the problem. Fixes #1000.
2016-09-17utils: create missing kegs directories if needed.Mike McQuaid
2016-09-17utils: remove bad symlink if it already exists.Mike McQuaid
2016-09-17Improve legacy symlink migration.Mike McQuaid
Read the old symlinks and migrate them across rather than assuming a unlink/link will work fine (as users have conflicts.)
2016-09-17rubocop --auto-correct all hash-rocket usage.Mike McQuaid
2016-09-17Move LinkedKegs migration.Mike McQuaid
Move the `LinkedKegs` migration into `utils.rb` so it can also be called from `brew.rb` on startup.
2016-09-15utils: link_src_dst_dirs: paths not files.Mike McQuaid
This can ask for you to remove directories (e.g. `/usr/local/share/homebrew`) so don’t call this files to avoid confusion.
2016-09-11utils: fix Rubocop warnings.Mike McQuaid
2016-09-06update-report: also link docs, completions.Mike McQuaid
These are more files in the HOMEBREW_REPOSITORY that we want to link to the HOMEBREW_PREFIX.
2016-09-06utils: split link_path_manpages method.Mike McQuaid
Pull more logic into the more generic `link_src_dst_dirs` to be used to do more linkage.
2016-09-04Merge pull request #201 from gregory-nisbet/feature-env-shellsMike McQuaid
--env: support more shells, allow explicit shell selection
2016-09-01utils: fix link_path_manpages message indentation.Mike McQuaid
Otherwise looks weird with multiple items.
2016-08-26Fix missing `magenta` in Tty.Markus Reiter
2016-08-24utils: add link_path_manpages method.Mike McQuaid
2016-08-18remove ruby 1.8 compatible codesXu Cheng
2016-08-14Merge pull request #702 from MikeMcQuaid/silence-audit-revisionsMike McQuaid
Silence auditing formula revisions deprecations
2016-08-12oh1: Add a truncate optionShaun Jackman
2016-08-12utils: check raise deprecation exceptions value.Mike McQuaid
2016-08-10move shell_profile to compat/utils.rb & deprecateGreg Nisbet
2016-08-02utils: add with_custom_locale helperDominyk Tiller
2016-07-31utils: tell people to report deprecations to tap.Mike McQuaid
This should hopefully avoid Homebrew/brew or Homebrew/homebrew-core having these exceptions reported to us.
2016-07-30utils: fix option handling in 'odisabled'Martin Afanasjew
Options passed to `odisabled` were completely ignored. Instead, merge them with the defaults that distinguish `odisabled` from `odeprecated`.