292 Commits

Author SHA1 Message Date
Xu Cheng
31ddce85e7 Homebrew.git_*: check git available 2015-09-09 12:19:17 +08:00
Xu Cheng
1b531492ca utils: add Homebrew.git_origin 2015-09-09 12:19:16 +08:00
Dan Martinez
8374374168 Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-09-08 15:23:37 +01:00
Xu Cheng
e3299bb7a3 quiet_system: don't print cmd even when verbose mode
It's kinda annoying that quiet_system wasn't really quiet. This commit
fixes that.
2015-09-08 17:36:28 +08:00
Xu Cheng
8d5c445daa homebrew_version_string: check git available 2015-09-02 15:24:52 +08:00
Xu Cheng
71f794260b add git utils
Two methods:
* `Utils.git_available?` checks whether git is installed.
* `Utils.ensure_git_installed!` installs git for users who don't install
  Xcode or CLT.
2015-09-02 15:24:52 +08:00
Mike McQuaid
2c959a7d58 More API documentation.
And remove the documented stuff from the `example-formula.rb`.

Closes Homebrew/homebrew#43241.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-29 15:43:16 +01:00
Tim D. Smith
143709e679 include git sha1 in --version output
HOMEBREW_VERSION doesn't change very often; the repository state is more
interesting.

Closes Homebrew/homebrew#41886.
2015-08-25 00:13:53 -07:00
Baptiste Fontaine
c631fc3013 which: don't fail on malformed paths in PATH 2015-08-16 17:03:05 +02:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Xu Cheng
70025458f3 interactive_shell: create .zshrc when necessary
Closes Homebrew/homebrew#42190.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-07-29 16:23:10 +08:00
Alex Dunn
c7e986d65e use ohai headers at the top of search results
Closes Homebrew/homebrew#41832.
2015-07-17 18:33:34 -07:00
Mike McQuaid
51a1792e7a Audit GitHub repository notability.
This stuff seems to be taken better when coming from a script rather
than from a human. Feel free to disagree about the specific numbers
chosen here.
2015-07-08 14:53:48 +01:00
Osman Surkatty
310afba026 Make HOMEBREW_GITHUB_API_TOKEN copy/paste friendly
A simple change that allows for easy copy/pasting. Right now if you were to double click on the text it will also inadvertently copy the trailing period. This change will alleviate the unnecessary gymnastics of not capturing the trailing period.

/most_pedantic_pull_request_ever

Closes Homebrew/homebrew#41257.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-07-03 14:42:43 +08:00
Radek Simko
7069509545 Make warnings yellow (previously red)
Closes Homebrew/homebrew#41003.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-06-24 16:39:55 +01:00
Jack Nagel
be9c5d5d16 Remove some 10.5 hacks 2015-06-13 17:18:17 -04:00
Ryan Hendrickson
aa49da2600 utils: prefer keg curl over system on 10.6
Closes Homebrew/homebrew#39927.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-06-04 11:46:25 +01:00
Xu Cheng
b931b98d35 interactive_shell: use Formula#full_name 2015-05-29 17:02:23 +08:00
Xu Cheng
471c5502f5 test-bot: don't complain bottle errors when installing gcc and hg
Closes Homebrew/homebrew#39626.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-05-18 19:48:06 +08:00
Mike McQuaid
0a2dd832b9 Install specific Rubocop version.
Closes Homebrew/homebrew#39620.
2015-05-14 16:05:00 +01:00
Alex Muller
83bcde2317 Update links to GitHub's personal access token
The link for the page that allows creation of API tokens has changed
from /settings/applications to /settings/tokens. Also the wording
on that page calls them "personal access tokens", so update
Homebrew to be consistent with that.

Closes Homebrew/homebrew#39378.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
2015-05-05 15:46:42 -07:00
Mike McQuaid
01c6c73709 utils: tweak access token text.
Closes Homebrew/homebrew#39214.
2015-04-30 18:39:10 +01:00
Xu Cheng
06f72ab38f move safe_fork into a standalone method 2015-04-15 19:51:54 +08:00
Xu Cheng
453990f1aa add method to detect shell profile file based on users' preference shell
Closes Homebrew/homebrew#38017.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-03-24 21:18:32 +08:00
Jack Nagel
b03faffcc1 Remove unused argument 2015-03-14 17:59:06 -04:00
Jack Nagel
04f600bb50 Emit warning when no editor is set
Closes Homebrew/homebrew#34647.
2015-01-05 15:23:35 -05:00
Mike McQuaid
dc16371e19 utils: install_gem_setup_path! now checks PATH.
Check the executable is present to give a better error message if it isn't.

Closes Homebrew/homebrew#35541.
2015-01-05 19:14:55 +00:00
Jack Nagel
a52143c63c Remove readline and zlib hacks 2015-01-03 22:39:07 -05:00
Mike McQuaid
39fb39288f utils: always set PATH in install_gem_setup_path. 2015-01-02 14:13:32 +00:00
Mike McQuaid
167dac74b7 utils: tweak install_gem_setup_path to not warn.
If the `Gem.user_dir/bin` is not already in the PATH it'll complain
unnecessarily (as we add it to the PATH ourselves) so just add it to the
PATH before running the install.
2015-01-02 13:37:06 +00:00
Mike McQuaid
9e8103cf38 Add Homebrew.install_gem_setup_path! function.
This uses the logic from tests.rb in man.rb too so that this can be
shared in a few places.
2015-01-02 12:42:02 +00:00
Mike McQuaid
645e82df83 Remove {start,stop}doc as we're using Yard now. 2014-12-06 09:14:20 +00:00
Jack Nagel
6f6484f0d8 Friendlier error message for EOFError raised inside Net::HTTP
Closes Homebrew/homebrew#34312.
Closes Homebrew/homebrew#34358.
2014-11-20 22:28:11 -06:00
Tim D. Smith
facb82e4bc Shows time since last commit in brew config
Closes Homebrew/homebrew#32936.
2014-10-05 16:17:57 -07:00
Mike McQuaid
05739585d1 Generate RDoc documentation.
This is currently still very messy and we probably want to work out the
best way to declare what parts of our DSL/what files are "public".

Still, even if this is a WIP I'd rather get something committed sooner
rather than later and start iterating on this as a replacement for
`example_formula.rb` and the formula cookbook.

To test:
```bash
cd $(brew --prefix)/Library/Homebrew && \
  rdoc formula.rb requirement.rb utils.rb &&\
  open doc/index.html
```

Closes Homebrew/homebrew#32470.
2014-09-24 15:08:10 -07:00
Jack Nagel
6ad82e65da Don't to_s the cmd parameter in Homebrew.system 2014-09-20 13:53:09 -05:00
Jack Nagel
058f557f6a Stop invoking the editor through an interactive shell
This was added in d2ecfb9 / Homebrew/homebrew#12784 to fix a bug repotted in Homebrew/homebrew#12779, but
at that time we were invoking the editor via `system` rather than
`exec`.

Now we are using exec, and running it through an interactive shell seems
to cause other problems, for example, emacs does not suspend/resume
properly.

Fixes Homebrew/homebrew#32328.
2014-09-20 11:42:19 -05:00
Jack Nagel
56dd575f96 Pass command and arg list into ErrorDuringExecution constructor 2014-09-18 20:32:50 -05:00
Jack Nagel
e5ea0bcd65 Hack around Zlib constant conflict 2014-09-04 01:28:46 -05:00
Federico Bond
22a98624d2 utils: use the $stderr global variable.
For easier capturing.

Closes Homebrew/homebrew#31303.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-08-04 13:17:10 +01:00
Jack Nagel
f34fcd7781 Simplify onoe 2014-07-20 19:47:31 -05:00
Jack Nagel
86b3090d4d Passing an empty array to puts prints nothing 2014-07-19 23:59:44 -05:00
Jack Nagel
7d28a6c54b exec_editor with no arguments should not silently succeed 2014-07-18 12:36:26 -05:00
Jack Nagel
0deedabbaf nostdout doesn't need to capture output 2014-07-06 15:03:42 -05:00
Jack Nagel
6e60b1d8c3 Let File.expand_path also do the join 2014-07-06 13:36:58 -05:00
Jack Nagel
7bd4f76b8c Check File.file? first to avoid second stat() 2014-07-06 13:35:44 -05:00
Jack Nagel
7e268670ed Just use each since we're returning from inside the block 2014-07-06 11:16:10 -05:00
Jack Nagel
c7ac8ce454 Expand ~ in PATH entries 2014-07-06 11:15:14 -05:00
Jack Nagel
ad27b21cd1 Add popen wrapper that does not invoke the shell 2014-07-05 13:50:54 -05:00
Jack Nagel
4c05d411f3 Add a method for getting the repo HEAD 2014-06-30 19:18:28 -05:00