diff options
Diffstat (limited to 'man')
-rw-r--r-- | man/bundle-config.ronn | 32 | ||||
-rw-r--r-- | man/bundle-install.ronn | 195 | ||||
-rw-r--r-- | man/bundle-package.ronn | 7 | ||||
-rw-r--r-- | man/bundle-update.ronn | 69 | ||||
-rw-r--r-- | man/bundle.ronn | 6 | ||||
-rw-r--r-- | man/gemfile.5.ronn | 87 |
6 files changed, 245 insertions, 151 deletions
diff --git a/man/bundle-config.ronn b/man/bundle-config.ronn index d158f5b02d..8bbc5140e1 100644 --- a/man/bundle-config.ronn +++ b/man/bundle-config.ronn @@ -70,6 +70,10 @@ The canonical form of this configuration is `"without"`. To convert the canonica form to the environment variable form, capitalize it, and prepend `BUNDLE_`. The environment variable form of `"without"` is `BUNDLE_WITHOUT`. +Any periods in the configuration keys must be replaced with two underscores when +setting it via environment variables. The configuration key `local.rack` becomes +the environment variable `BUNDLE_LOCAL__RACK`. + ## LIST OF AVAILABLE KEYS The following is a list of all configuration keys and their purpose. You can @@ -77,7 +81,7 @@ learn more about their operation in [bundle install(1)][bundle-install]. * `path` (`BUNDLE_PATH`): The location on disk to install gems. Defaults to `$GEM_HOME` in development - and `vendor/bundler` when `--deployment` is used + and `vendor/bundle` when `--deployment` is used * `frozen` (`BUNDLE_FROZEN`): Disallow changes to the `Gemfile`. Defaults to `true` when `--deployment` is used. @@ -86,6 +90,12 @@ learn more about their operation in [bundle install(1)][bundle-install]. * `bin` (`BUNDLE_BIN`): Install executables from gems in the bundle to the specified directory. Defaults to `false`. +* `gemfile` (`BUNDLE_GEMFILE`): + The name of the file that bundler should use as the `Gemfile`. This location + of this file also sets the root of the project, which is used to resolve + relative paths in the `Gemfile`, among other things. By default, bundler + will search up from the current working directory until it finds a + `Gemfile`. * `ssl_ca_cert` (`BUNDLE_SSL_CA_CERT`): Path to a designated CA certificate file or folder containing multiple certificates for trusted CAs in PEM format. @@ -100,18 +110,6 @@ You can set them globally either via environment variables or `bundle config`, whichever is preferable for your setup. If you use both, environment variables will take preference over global settings. -An additional setting is available only as an environment variable: - -* `BUNDLE_GEMFILE`: - The name of the file that bundler should use as the `Gemfile`. This location - of this file also sets the root of the project, which is used to resolve - relative paths in the `Gemfile`, among other things. By default, bundler - will search up from the current working directory until it finds a - `Gemfile`. - -Bundler will ignore any `BUNDLE_GEMFILE` entries in local or global -configuration files. - ## LOCAL GIT REPOS Bundler also allows you to work against a git repository locally @@ -162,9 +160,13 @@ For example, to use a mirror of rubygems.org hosted at Bundler allows you to configure credentials for any gem source, which allows you to avoid putting secrets into your Gemfile. - bundle config SOURCE_URL USERNAME:PASSWORD + bundle config SOURCE_HOSTNAME USERNAME:PASSWORD For example, to save the credentials of user `claudette` for the gem source at `gems.longerous.com`, you would run: - bundle config https://gems.longerous.com/ claudette:s00pers3krit + bundle config gems.longerous.com claudette:s00pers3krit + +Or you can set the credentials as an environment variable like this: + + export BUNDLE_GEMS__LONGEROUS__COM="claudette:s00pers3krit" diff --git a/man/bundle-install.ronn b/man/bundle-install.ronn index a4448333f8..e9706b51bd 100644 --- a/man/bundle-install.ronn +++ b/man/bundle-install.ronn @@ -3,128 +3,137 @@ bundle-install(1) -- Install the dependencies specified in your Gemfile ## SYNOPSIS -`bundle install` [--gemfile=GEMFILE] - [--path PATH] [--system] - [--without=GROUP1[ GROUP2...]] - [--local] [--deployment] - [--binstubs[=DIRECTORY]] - [--standalone[=GROUP1[ GROUP2...]]] - [--trust-policy=POLICY] - [--jobs=SIZE] - [--retry=TRIES] - [--no-cache] - [--quiet] +`bundle install` [--binstubs[=DIRECTORY]] [--clean] [--full-index] + [--gemfile=GEMFILE] + [--jobs=NUMBER] + [--local] [--deployment] + [--no-cache] [--no-prune] + [--path PATH] [--system] + [--quiet] + [--retry=NUMBER] [--shebang] + [--standalone[=GROUP[ GROUP...]]] + [--trust-policy=POLICY] + [--without=GROUP[ GROUP...]] ## DESCRIPTION Install the gems specified in your Gemfile(5). If this is the first time you run bundle install (and a `Gemfile.lock` does not exist), -bundler will fetch all remote sources, resolve dependencies and +Bundler will fetch all remote sources, resolve dependencies and install all needed gems. If a `Gemfile.lock` does exist, and you have not updated your Gemfile(5), -bundler will fetch all remote sources, but use the dependencies +Bundler will fetch all remote sources, but use the dependencies specified in the `Gemfile.lock` instead of resolving dependencies. If a `Gemfile.lock` does exist, and you have updated your Gemfile(5), -bundler will use the dependencies in the `Gemfile.lock` for all gems +Bundler will use the dependencies in the `Gemfile.lock` for all gems that you did not update, but will re-resolve the dependencies of gems that you did update. You can find more information about this update process below under [CONSERVATIVE UPDATING][]. ## OPTIONS -* `--gemfile=<gemfile>`: - The location of the Gemfile(5) that bundler should use. This defaults - to a gemfile in the current working directory. In general, bundler - will assume that the location of the Gemfile(5) is also the project - root, and will look for the `Gemfile.lock` and `vendor/cache` relative - to it. +* `--binstubs[=<directory>]`: + Creates a directory (defaults to `~/bin`) and place any executables from the + gem there. These executables run in Bundler's context. If used, you might add + this directory to your environment's `PATH` variable. For instance, if the + `rails` gem comes with a `rails` executable, this flag will create a + `bin/rails` executable that ensures that all referred dependencies will be + resolved using the bundled gems. -* `--path=<path>`: - The location to install the gems in the bundle to. This defaults to - Rubygems' gem home, which is also the default location where `gem - install` installs gems. This means that, by default, gems installed - without a `--path` setting will show up in `gem list`. This setting is - a [remembered option][REMEMBERED OPTIONS]. +* `--clean`: + On finishing the installation Bundler is going to remove any gems not present + in the current Gemfile(5). Don't worry, gems currently in use will not be + removed. -* `--system`: - Installs the gems in the bundle to the system location. This - overrides any previous [remembered][REMEMBERED OPTIONS] use of - `--path`. +* `--full-index`: + Bundler will not call Rubygems' API endpoint (default) but download and cache + a (currently big) index file of all gems. Performance can be improved for + large bundles that seldomly change by enabling this option. -* `--without=<list>`: - A space-separated list of groups to skip installing. This is a - [remembered option][REMEMBERED OPTIONS]. +* `--gemfile=<gemfile>`: + The location of the Gemfile(5) which Bundler should use. This defaults + to a Gemfile(5) in the current working directory. In general, Bundler + will assume that the location of the Gemfile(5) is also the project's + root and will try to find `Gemfile.lock` and `vendor/cache` relative + to this location. + +* `--jobs=[<number>]`: + Install gems by starting <number> of workers parallely. * `--local`: - Do not attempt to connect to `rubygems.org`, instead using just - the gems already present in Rubygems' cache or in `vendor/cache`. - Note that if a more appropriate platform-specific gem exists on - `rubygems.org`, it will not be found. + Do not attempt to connect to `rubygems.org`. Instead, Bundler will use the + gems already present in Rubygems' cache or in `vendor/cache`. Note that if a + appropriate platform-specific gem exists on `rubygems.org` it will not be + found. * `--deployment`: - Switches bundler's defaults into [deployment mode][DEPLOYMENT MODE]. - Do not use this flag on development machines. + In [deployment mode][DEPLOYMENT MODE], Bundler will 'roll-out' the bundle for + `production` use. Please check carefully if you want to have this option + enabled in `development` or `test` environments. -* `--binstubs[=<directory>]`: - Create a directory (defaults to `bin`) containing an executable - that runs in the context of the bundle. For instance, if the - `rails` gem comes with a `rails` executable, this flag will create - a `bin/rails` executable that ensures that all dependencies used - come from the bundled gems. +* `--system`: + Installs the gems specified in the bundle to the system's Rubygems location. + This overrides any previous [remembered][REMEMBERED OPTIONS] use of `--path`. -* `--shebang ruby-install-name`: - Uses the ruby executable (usually `ruby`) provided to execute the scripts created - with --binstubs. For instance, if you use --binstubs with `--shebang jruby`, - all executables will be created to use jruby instead. +* `--no-cache`: + Do not update the cache in `vendor/cache` with the newly bundled gems. This + does not remove any gems in the cache but keeps the newly bundled gems from + being cached during the install. -* `--standalone[=<list>]`: - Make a bundle that can work without Ruby Gems or Bundler at runtime. - It takes a space separated list of groups to install. It creates a - `bundle` directory and installs the bundle there. It also generates - a `bundle/bundler/setup.rb` file to replace Bundler's own setup. +* `--no-prune`: + Don't remove stale gems from the cache when the installation finishes. -* `--trust-policy=[<policy>]`: - Apply the Rubygems security policy named <policy>, where policy is one of - HighSecurity, MediumSecurity, LowSecurity, AlmostNoSecurity, or NoSecurity. - For more detail, see the Rubygems signing documentation, linked below in - [SEE ALSO][]. +* `--path=<path>`: + The location to install the specified gems to. This defaults to Rubygems' + setting. Bundler shares this location with Rubygems, `gem install ...` will + have gem installed there, too. Therefore, gems installed without a + `--path ...` setting will show up by calling `gem list`. Accodingly, gems + installed to other locations will not get listed. This setting is a + [remembered option][REMEMBERED OPTIONS]. -* `--jobs=[<size>]`: - Install gems parallely by starting <size> number of parallel workers. +* `--quiet`: + Do not print progress information to the standard output. Instead, Bundler + will exit using a status code (`$?`). -* `--retry[<tries]`: - Retries failed network or git requests <tries> times. +* `--retry=[<number>]`: + Retry failed network or git requests for <number> times. -* `--no-cache`: - Do not update the cache in `vendor/cache` with the newly bundled gems. This - does not remove any existing cached gems, only stops the newly bundled gems - from being cached during the install. +* `--shebang=<ruby-executable>`: + Uses the specified ruby executable (usually `ruby`) to execute the scripts + created with `--binstubs`. In addition, if you use `--binstubs` together with + `--shebang jruby` these executables will be changed to execute `jruby` + instead. -* `--quiet`: - Do not print progress information to stdout. Instead, communicate the - success of the install operation via exit status code. +* `--standalone[=<list>]`: + Makes a bundle that can work without depending on Rubygems or Bundler at + runtime. A space separated list of groups to install has to be specified. + Bundler creates a directory named `bundle` and installs the bundle there. It + also generates a `bundle/bundler/setup.rb` file to replace Bundler's own setup + in the manner required. -* `--clean`: - Run bundle clean automatically after install. +* `--trust-policy=[<policy>]`: + Apply the Rubygems security policy <policy>, where policy is one of + `HighSecurity`, `MediumSecurity`, `LowSecurity`, `AlmostNoSecurity`, or + `NoSecurity`. For more details, please see the Rubygems signing documentation + linked below in [SEE ALSO][]. -* `--full-index`: - Use the rubygems modern index instead of the API endpoint. +* `--without=<list>`: + A space-separated list of groups referencing gems to skip during installation. + This is a [remembered option][REMEMBERED OPTIONS]. -* `--no-prune`: - Don't remove stale gems from the cache. ## DEPLOYMENT MODE Bundler's defaults are optimized for development. To switch to defaults optimized for deployment, use the `--deployment` flag. Do not activate deployment mode on development machines, as it -will cause in an error when the Gemfile is modified. +will cause an error when the Gemfile(5) is modified. 1. A `Gemfile.lock` is required. @@ -161,10 +170,10 @@ will cause in an error when the Gemfile is modified. ## SUDO USAGE -By default, bundler installs gems to the same location as `gem install`. +By default, Bundler installs gems to the same location as `gem install`. In some cases, that location may not be writable by your Unix user. In -that case, bundler will stage everything in a temporary directory, +that case, Bundler will stage everything in a temporary directory, then ask you for your `sudo` password in order to copy the gems into their system location. @@ -185,7 +194,7 @@ the current user. Therefore, git gems are downloaded and installed into `~/.bundle` rather than $GEM_HOME or $BUNDLE_PATH. As a result, you should run `bundle install` as the current user, -and bundler will ask for your password if it is needed to put the +and Bundler will ask for your password if it is needed to put the gems into their final location. ## INSTALLING GROUPS @@ -193,7 +202,7 @@ gems into their final location. By default, `bundle install` will install all gems in all groups in your Gemfile(5), except those declared for a different platform. -However, you can explicitly tell bundler to skip installing +However, you can explicitly tell Bundler to skip installing certain groups with the `--without` option. This option takes a space-separated list of groups. @@ -214,21 +223,21 @@ third-party code being used in different environments.` For a simple illustration, consider the following Gemfile(5): - source "https://rubygems.org" + source 'https://rubygems.org' - gem "sinatra" + gem 'sinatra' group :production do - gem "rack-perftools-profiler" + gem 'rack-perftools-profiler' end -In this case, `sinatra` depends on any version of Rack (`>= 1.0`, while +In this case, `sinatra` depends on any version of Rack (`>= 1.0`), while `rack-perftools-profiler` depends on 1.x (`~> 1.0`). When you run `bundle install --without production` in development, we look at the dependencies of `rack-perftools-profiler` as well. That way, you do not spend all your time developing against Rack 2.0, using new -APIs unavailable in Rack 1.x, only to have bundler switch to Rack 1.2 +APIs unavailable in Rack 1.x, only to have Bundler switch to Rack 1.2 when the `production` group _is_ used. This should not cause any problems in practice, because we do not @@ -310,10 +319,10 @@ same versions of all dependencies as it used before the update. Let's take a look at an example. Here's your original Gemfile(5): - source "https://rubygems.org" + source 'https://rubygems.org' - gem "actionpack", "2.3.8" - gem "activemerchant" + gem 'actionpack', '2.3.8' + gem 'activemerchant' In this case, both `actionpack` and `activemerchant` depend on `activesupport`. The `actionpack` gem depends on `activesupport 2.3.8` @@ -326,10 +335,10 @@ gems in your Gemfile(5). Next, you modify your Gemfile(5) to: - source "https://rubygems.org" + source 'https://rubygems.org' - gem "actionpack", "3.0.0.rc" - gem "activemerchant" + gem 'actionpack', '3.0.0.rc' + gem 'activemerchant' The `actionpack 3.0.0.rc` gem has a number of new dependencies, and updates the `activesupport` dependency to `= 3.0.0.rc` and @@ -351,7 +360,7 @@ you would not expect it to suddenly stop working after updating dependency of actionpack requires updating one of its dependencies. Even though `activemerchant` declares a very loose dependency -that theoretically matches `activesupport 3.0.0.rc`, bundler treats +that theoretically matches `activesupport 3.0.0.rc`, Bundler treats gems in your Gemfile(5) that have not changed as an atomic unit together with their dependencies. In this case, the `activemerchant` dependency is treated as `activemerchant 1.7.1 + activesupport 2.3.8`, diff --git a/man/bundle-package.ronn b/man/bundle-package.ronn index 610f820487..8a6b439cd5 100644 --- a/man/bundle-package.ronn +++ b/man/bundle-package.ronn @@ -17,6 +17,13 @@ Since Bundler 1.2, the `bundle package` command can also package `:git` and `:path` dependencies besides .gem files. This needs to be explicitly enabled via the `--all` option. Once used, the `--all` option will be remembered. +## SUPPORT FOR MULTIPLE PLATFORMS + +When using gems that have different packages for different platforms, Bundler +1.8 and newer support caching of gems for other platforms in `vendor/cache`. +This needs to be enabled via the `--all-platforms` option. This setting will be +remembered in your local bundler configuration. + ## REMOTE FETCHING By default, if you simply run [bundle install(1)][bundle-install] after running diff --git a/man/bundle-update.ronn b/man/bundle-update.ronn index 3ac60c5715..b9900e3b50 100644 --- a/man/bundle-update.ronn +++ b/man/bundle-update.ronn @@ -3,7 +3,7 @@ bundle-update(1) -- Update your gems to the latest available versions ## SYNOPSIS -`bundle update` <*gems> [--source=NAME] [--local] +`bundle update` <*gems> [--group=NAME] [--source=NAME] [--local] ## DESCRIPTION @@ -17,6 +17,12 @@ gem. ## OPTIONS +* `--group=<name>`: + Only update the gems in the specified group. For instance, you can update all gems + in the development group with `bundle update --group development`. You can also + call `bundle update rails --group test` to update the rails gem and all gems in + the test group, for example. + * `--source=<name>`: The name of a `:git` or `:path` source used in the Gemfile(5). For instance, with a `:git` source of `http://github.com/rails/rails.git`, @@ -41,37 +47,40 @@ Consider the following Gemfile(5): When you run [bundle install(1)][bundle-install] the first time, bundler will resolve all of the dependencies, all the way down, and install what you need: - Fetching source index for https://rubygems.org/ - Installing rake (10.0.2) - Installing abstract (1.0.0) - Installing activesupport (3.0.0.rc) - Installing builder (2.1.2) - Installing i18n (0.4.1) - Installing activemodel (3.0.0.rc) - Installing erubis (2.6.6) - Installing rack (1.2.1) - Installing rack-mount (0.6.9) - Installing rack-test (0.5.4) - Installing tzinfo (0.3.22) - Installing actionpack (3.0.0.rc) - Installing mime-types (1.16) - Installing polyglot (0.3.1) - Installing treetop (1.4.8) - Installing mail (2.2.5) - Installing actionmailer (3.0.0.rc) - Installing arel (0.4.0) - Installing activerecord (3.0.0.rc) - Installing activeresource (3.0.0.rc) - Installing bundler (1.0.0.rc.3) - Installing nokogiri (1.4.3.1) with native extensions - Installing thor (0.14.0) - Installing railties (3.0.0.rc) - Installing rails (3.0.0.rc) - - Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. + Fetching gem metadata from https://rubygems.org/......... + Resolving dependencies... + Installing builder 2.1.2 + Installing abstract 1.0.0 + Installing rack 1.2.8 + Using bundler 1.7.6 + Installing rake 10.4.0 + Installing polyglot 0.3.5 + Installing mime-types 1.25.1 + Installing i18n 0.4.2 + Installing mini_portile 0.6.1 + Installing tzinfo 0.3.42 + Installing rack-mount 0.6.14 + Installing rack-test 0.5.7 + Installing treetop 1.4.15 + Installing thor 0.14.6 + Installing activesupport 3.0.0.rc + Installing erubis 2.6.6 + Installing activemodel 3.0.0.rc + Installing arel 0.4.0 + Installing mail 2.2.20 + Installing activeresource 3.0.0.rc + Installing actionpack 3.0.0.rc + Installing activerecord 3.0.0.rc + Installing actionmailer 3.0.0.rc + Installing railties 3.0.0.rc + Installing rails 3.0.0.rc + Installing nokogiri 1.6.5 + + Bundle complete! 2 Gemfile dependencies, 26 gems total. + Use `bundle show [gemname]` to see where a bundled gem is installed. As you can see, even though you have just two gems in the Gemfile(5), your application -actually needs 25 different gems in order to run. Bundler remembers the exact versions +actually needs 26 different gems in order to run. Bundler remembers the exact versions it installed in `Gemfile.lock`. The next time you run [bundle install(1)][bundle-install], bundler skips the dependency resolution and installs the same gems as it installed last time. diff --git a/man/bundle.ronn b/man/bundle.ronn index 1167b0b5ec..7b69c6735c 100644 --- a/man/bundle.ronn +++ b/man/bundle.ronn @@ -82,6 +82,12 @@ We divide `bundle` subcommands into primary commands and utilities. * `bundle clean(1)`: Cleans up unused gems in your bundler directory +## PLUGINS + +When running a command that isn't listed in PRIMARY COMMANDS or UTILITIES, +Bundler will try to find an executable on your path named `bundler-<command>` +and execute it, passing down any extra arguments to it. + ## OBSOLETE These commands are obsolete and should no longer be used diff --git a/man/gemfile.5.ronn b/man/gemfile.5.ronn index 88d6f0ffa7..876c927380 100644 --- a/man/gemfile.5.ronn +++ b/man/gemfile.5.ronn @@ -40,7 +40,7 @@ the username and password for any sources that need it. The command must be run once on each computer that will install the Gemfile, but this keeps the credentials from being stored in plain text in version control. - bundle config https://gems.example.com/ user:password + bundle config gems.example.com user:password For some sources, like a company Gemfury account, it may be easier to simply include the credentials in the Gemfile as part of the source URL. @@ -254,16 +254,26 @@ gem warning described above in ### GIT (:git) If necessary, you can specify that a gem is located at a particular -git repository. The repository can be public (`http://github.com/rails/rails.git`) -or private (`git@github.com:rails/rails.git`). If the repository is private, -the user that you use to run `bundle install` `MUST` have the appropriate -keys available in their `$HOME/.ssh`. +git repository using the `:git` parameter. The repository can be accessed via +several protocols: + + * `HTTP(S)`: + gem "rails", :git => "https://github.com/rails/rails.git" + * `SSH`: + gem "rails", :git => "git@github.com:rails/rails.git" + * `git`: + gem "rails", :git => "git://github.com/rails/rails.git" -Git repositories are specified using the `:git` parameter. The `group`, -`platforms`, and `require` options are available and behave exactly the same -as they would for a normal gem. +If using SSH, the user that you use to run `bundle install` `MUST` have the +appropriate keys available in their `$HOME/.ssh`. - gem "rails", :git => "git://github.com/rails/rails.git" +`NOTE`: `http://` and `git://` URLs should be avoided if at all possible. These +protocols are unauthenticated, so a man-in-the-middle attacker can deliver +malicious code and compromise your system. HTTPS and SSH are strongly +preferred. + +The `group`, `platforms`, and `require` options are available and behave +exactly the same as they would for a normal gem. A git repository `SHOULD` have at least one file, at the root of the directory containing the gem, with the extension `.gemspec`. This file @@ -280,7 +290,7 @@ to, a version specifier, if provided, means that the git repository is only valid if the `.gemspec` specifies a version matching the version specifier. If not, bundler will print a warning. - gem "rails", "2.3.8", :git => "git://github.com/rails/rails.git" + gem "rails", "2.3.8", :git => "https://github.com/rails/rails.git" # bundle install will fail, because the .gemspec in the rails # repository's master branch specifies version 3.0.0 @@ -315,8 +325,25 @@ 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 +currently expands to an insecure `git://` URL. This allows a +man-in-the-middle attacker to compromise your system. + If the git repository you want to use is hosted on GitHub and is public, you can use the :github shorthand to specify just the github username and repository name (without the trailing ".git"), separated by a slash. If both the username and repository name are the @@ -329,9 +356,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" - gem "rails", :github => "rails/rails", :branch => "branch_name" +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" + +Since the `bitbucket` method is a specialization of `git_source`, it accepts a `:branch` named argument. ### PATH (:path) @@ -349,6 +403,13 @@ gems specified as paths. gem "rails", :path => "vendor/rails" +If you would like to use multiple local gems directly from the filesystem, you can set a global `path` option to the path containing the gem's files. This will automatically load gemspec files from subdirectories. + + path 'components' do + gem 'admin_ui' + gem 'public_ui' + end + ## BLOCK FORM OF SOURCE, GIT, PATH, GROUP and PLATFORMS The `:source`, `:git`, `:path`, `:group`, and `:platforms` options may be @@ -359,7 +420,7 @@ applied to a group of gems by using block form. gem "another_internal_gem" end - git "git://github.com/rails/rails.git" do + git "https://github.com/rails/rails.git" do gem "activesupport" gem "actionpack" end |