Merge pull request #3845 from MikeMcQuaid/master
Add prof and ruby commands.
This commit is contained in:
commit
96cafb4124
15
Library/Homebrew/dev-cmd/prof.rb
Executable file
15
Library/Homebrew/dev-cmd/prof.rb
Executable file
@ -0,0 +1,15 @@
|
||||
#: * `prof` [<ruby options>]:
|
||||
#: Run Homebrew with the Ruby profiler.
|
||||
#: For example:
|
||||
# brew prof readall
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
def prof
|
||||
Homebrew.install_gem_setup_path! "ruby-prof"
|
||||
FileUtils.mkdir_p "prof"
|
||||
brew_rb = (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path
|
||||
exec "ruby-prof", "--printer=multi", "--file=prof", brew_rb, "--", *ARGV
|
||||
end
|
||||
end
|
||||
13
Library/Homebrew/dev-cmd/ruby.rb
Executable file
13
Library/Homebrew/dev-cmd/ruby.rb
Executable file
@ -0,0 +1,13 @@
|
||||
#: * `ruby` [<ruby options>]:
|
||||
#: Run a Ruby instance with Homebrew's libraries loaded.
|
||||
#: For example:
|
||||
# brew ruby -e "puts :gcc.f.deps"
|
||||
# brew ruby script.rb
|
||||
|
||||
module Homebrew
|
||||
module_function
|
||||
|
||||
def ruby
|
||||
exec ENV["HOMEBREW_RUBY_PATH"], "-I#{HOMEBREW_LIBRARY_PATH}", "-rglobal", "-rcmd/irb", *ARGV
|
||||
end
|
||||
end
|
||||
@ -782,6 +782,10 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
|
||||
Additionally, the date used in new manpages will match those in the existing
|
||||
manpages (to allow comparison without factoring in the date).
|
||||
|
||||
* `prof` [`ruby options`]:
|
||||
Run Homebrew with the Ruby profiler.
|
||||
For example:
|
||||
|
||||
* `pull` [`--bottle`] [`--bump`] [`--clean`] [`--ignore-whitespace`] [`--resolve`] [`--branch-okay`] [`--no-pbcopy`] [`--no-publish`] [`--warn-on-publish-failure`] [`--bintray-org=``bintray-org`] [`--test-bot-user=``test-bot-user`] `patch-source` [`patch-source`]:
|
||||
|
||||
Gets a patch from a GitHub commit or pull request and applies it to Homebrew.
|
||||
@ -839,6 +843,10 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
|
||||
|
||||
If `--markdown` is passed, output as a Markdown list.
|
||||
|
||||
* `ruby` [`ruby options`]:
|
||||
Run a Ruby instance with Homebrew's libraries loaded.
|
||||
For example:
|
||||
|
||||
* `tap-new` `user``/``repo`:
|
||||
Generate the template files for a new tap.
|
||||
|
||||
|
||||
@ -801,6 +801,10 @@ Generate Homebrew\'s manpages\.
|
||||
If \fB\-\-fail\-if\-changed\fR is passed, the command will return a failing status code if changes are detected in the manpage outputs\. This can be used for CI to be notified when the manpages are out of date\. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date)\.
|
||||
.
|
||||
.TP
|
||||
\fBprof\fR [\fIruby options\fR]
|
||||
Run Homebrew with the Ruby profiler\. For example:
|
||||
.
|
||||
.TP
|
||||
\fBpull\fR [\fB\-\-bottle\fR] [\fB\-\-bump\fR] [\fB\-\-clean\fR] [\fB\-\-ignore\-whitespace\fR] [\fB\-\-resolve\fR] [\fB\-\-branch\-okay\fR] [\fB\-\-no\-pbcopy\fR] [\fB\-\-no\-publish\fR] [\fB\-\-warn\-on\-publish\-failure\fR] [\fB\-\-bintray\-org=\fR\fIbintray\-org\fR] [\fB\-\-test\-bot\-user=\fR\fItest\-bot\-user\fR] \fIpatch\-source\fR [\fIpatch\-source\fR]:
|
||||
.
|
||||
.IP
|
||||
@ -862,6 +866,10 @@ Output the merged pull requests on Homebrew/brew between two Git refs\. If no \f
|
||||
If \fB\-\-markdown\fR is passed, output as a Markdown list\.
|
||||
.
|
||||
.TP
|
||||
\fBruby\fR [\fIruby options\fR]
|
||||
Run a Ruby instance with Homebrew\'s libraries loaded\. For example:
|
||||
.
|
||||
.TP
|
||||
\fBtap\-new\fR \fIuser\fR\fB/\fR\fIrepo\fR
|
||||
Generate the template files for a new tap\.
|
||||
.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user