summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorBen Cullen-Kerney <ben@beancuke.com>2014-08-18 14:31:50 -0700
committerBen Cullen-Kerney <ben@beancuke.com>2014-08-18 14:43:40 -0700
commitdc693262bcbae5b943be2c6b3a8b4a8375c53819 (patch)
tree90d8ba82cb9895cc39993a511d23c916f06de2a7 /man
parent3f1ff17b7636bbbc2cf5ffc96a5c5cc2902def23 (diff)
downloadbundler-dc693262bcbae5b943be2c6b3a8b4a8375c53819.tar.gz
Document git_source method in gemfile man page
Diffstat (limited to 'man')
-rw-r--r--man/gemfile.5.ronn44
1 files changed, 42 insertions, 2 deletions
diff --git a/man/gemfile.5.ronn b/man/gemfile.5.ronn
index 720b26f8d1..46e1c07e3c 100644
--- a/man/gemfile.5.ronn
+++ b/man/gemfile.5.ronn
@@ -291,6 +291,19 @@ and then installs the resulting gem. The `gem build` command,
which comes standard with Rubygems, evaluates the `.gemspec` in
the context of the directory in which it is located.
+### GIT SOURCE (:git_source)
+
+A custom git source can be defined via the `git_source` method. Provide the source's name
+as an argument, and a block which receives a single argument and interpolates it into a
+string to return the full repo address:
+
+ git_source(:stash){ |repo_name| "https://stash.corp.acme.pl/#{repo_name}.git" }
+ gem 'rails', :stash => 'forks/rails'
+
+In addition, if you wish to choose a specific branch:
+
+ gem "rails", :stash => "forks/rails", :branch => "branch_name"
+
### GITHUB (:github)
`NOTE`: This shorthand should be avoided until Bundler 2.0, since it
@@ -309,9 +322,36 @@ Are both equivalent to
gem "rails", :git => "git://github.com/rails/rails.git"
-In addition, if you wish to choose a specific branch:
+Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument.
+
+### GIST (:gist)
+
+If the git repository you want to use is hosted as a Github Gist and is public, you can use
+the :gist shorthand to specify just the gist identifier (without the trailing ".git").
+
+ gem "the_hatch", :gist => "4815162342"
+
+Is equivalent to:
+
+ gem "the_hatch", :git => "https://gist.github.com/4815162342.git"
+
+Since the `gist` method is a specialization of `git_source`, it accepts a `:branch` named argument.
+
+### BITBUCKET (:bitbucket)
+
+If the git repository you want to use is hosted on Bitbucket and is public, you can use the
+:bitbucket shorthand to specify just the bitbucket username and repository name (without the
+trailing ".git"), separated by a slash. If both the username and repository name are the
+same, you can omit one.
+
+ gem "rails", :bitbucket => "rails/rails"
+ gem "rails", :bitbucket => "rails"
+
+Are both equivalent to
+
+ gem "rails", :git => "https://rails@bitbucket.org/rails/rails.git"
- gem "rails", :github => "rails/rails", :branch => "branch_name"
+Since the `bitbucket` method is a specialization of `git_source`, it accepts a `:branch` named argument.
### PATH (:path)