Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bundler/lib/bundler/dependency.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def glob
@glob = @options["glob"]
end

def sparse_checkout
return @sparse_checkout if defined?(@sparse_checkout)

@sparse_checkout = @options["sparse_checkout"]
end

def platforms
@platforms ||= Array(@options["platforms"])
end
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def self.evaluate(gemfile, lockfile, unlock)
VALID_PLATFORMS = Bundler::CurrentRuby::PLATFORM_MAP.keys.freeze

VALID_KEYS = %w[group groups git path glob name branch ref tag require submodules
platform platforms source install_if force_ruby_platform].freeze
platform platforms source install_if force_ruby_platform sparse_checkout].freeze

GITHUB_PULL_REQUEST_URL = %r{\Ahttps://github\.com/([A-Za-z0-9_\-\.]+/[A-Za-z0-9_\-\.]+)/pull/(\d+)\z}
GITLAB_MERGE_REQUEST_URL = %r{\Ahttps://gitlab\.com/([A-Za-z0-9_\-\./]+)/-/merge_requests/(\d+)\z}
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/lockfile_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def to_s
PATH = "PATH"
PLUGIN = "PLUGIN SOURCE"
SPECS = " specs:"
OPTIONS = /^ ([a-z]+): (.*)$/i
OPTIONS = /^ ([a-z_]+): (.*)$/i
SOURCE = [GIT, GEM, PATH, PLUGIN].freeze

SECTIONS_BY_VERSION_INTRODUCED = {
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-add.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-ADD" "1" "September 2025" ""
.TH "BUNDLE\-ADD" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-binstubs.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-BINSTUBS" "1" "September 2025" ""
.TH "BUNDLE\-BINSTUBS" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-cache.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-CACHE" "1" "September 2025" ""
.TH "BUNDLE\-CACHE" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-check.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-CHECK" "1" "September 2025" ""
.TH "BUNDLE\-CHECK" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-clean.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-CLEAN" "1" "September 2025" ""
.TH "BUNDLE\-CLEAN" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-config.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-CONFIG" "1" "September 2025" ""
.TH "BUNDLE\-CONFIG" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-config\fR \- Set bundler configuration options
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-console.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-CONSOLE" "1" "September 2025" ""
.TH "BUNDLE\-CONSOLE" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-console\fR \- Open an IRB session with the bundle pre\-loaded
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-doctor.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-DOCTOR" "1" "September 2025" ""
.TH "BUNDLE\-DOCTOR" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-doctor\fR \- Checks the bundle for common problems
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-env.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-ENV" "1" "September 2025" ""
.TH "BUNDLE\-ENV" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-env\fR \- Print information about the environment Bundler is running under
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-exec.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-EXEC" "1" "September 2025" ""
.TH "BUNDLE\-EXEC" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-exec\fR \- Execute a command in the context of the bundle
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-fund.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-FUND" "1" "September 2025" ""
.TH "BUNDLE\-FUND" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-fund\fR \- Lists information about gems seeking funding assistance
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-gem.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-GEM" "1" "September 2025" ""
.TH "BUNDLE\-GEM" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-help.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-HELP" "1" "September 2025" ""
.TH "BUNDLE\-HELP" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-help\fR \- Displays detailed help for each subcommand
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-info.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-INFO" "1" "September 2025" ""
.TH "BUNDLE\-INFO" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-info\fR \- Show information for the given gem in your bundle
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-init.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-INIT" "1" "September 2025" ""
.TH "BUNDLE\-INIT" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-install.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-INSTALL" "1" "September 2025" ""
.TH "BUNDLE\-INSTALL" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-issue.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-ISSUE" "1" "September 2025" ""
.TH "BUNDLE\-ISSUE" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-issue\fR \- Get help reporting Bundler issues
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-licenses.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-LICENSES" "1" "September 2025" ""
.TH "BUNDLE\-LICENSES" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-licenses\fR \- Print the license of all gems in the bundle
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-list.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-LIST" "1" "September 2025" ""
.TH "BUNDLE\-LIST" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-list\fR \- List all the gems in the bundle
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-lock.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-LOCK" "1" "September 2025" ""
.TH "BUNDLE\-LOCK" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-open.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-OPEN" "1" "September 2025" ""
.TH "BUNDLE\-OPEN" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-outdated.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-OUTDATED" "1" "September 2025" ""
.TH "BUNDLE\-OUTDATED" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-outdated\fR \- List installed gems with newer versions available
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-platform.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-PLATFORM" "1" "September 2025" ""
.TH "BUNDLE\-PLATFORM" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-platform\fR \- Displays platform compatibility information
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-plugin.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-PLUGIN" "1" "September 2025" ""
.TH "BUNDLE\-PLUGIN" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-plugin\fR \- Manage Bundler plugins
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-pristine.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-PRISTINE" "1" "September 2025" ""
.TH "BUNDLE\-PRISTINE" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-remove.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-REMOVE" "1" "September 2025" ""
.TH "BUNDLE\-REMOVE" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-remove\fR \- Removes gems from the Gemfile
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-show.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-SHOW" "1" "September 2025" ""
.TH "BUNDLE\-SHOW" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-update.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-UPDATE" "1" "September 2025" ""
.TH "BUNDLE\-UPDATE" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-update\fR \- Update your gems to the latest available versions
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle-version.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE\-VERSION" "1" "September 2025" ""
.TH "BUNDLE\-VERSION" "1" "February 2026" ""
.SH "NAME"
\fBbundle\-version\fR \- Prints Bundler version information
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/man/bundle.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "BUNDLE" "1" "September 2025" ""
.TH "BUNDLE" "1" "February 2026" ""
.SH "NAME"
\fBbundle\fR \- Ruby Dependency Management
.SH "SYNOPSIS"
Expand Down
9 changes: 8 additions & 1 deletion bundler/lib/bundler/man/gemfile.5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.10.1
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
.TH "GEMFILE" "5" "September 2025" ""
.TH "GEMFILE" "5" "February 2026" ""
.SH "NAME"
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
.SH "SYNOPSIS"
Expand Down Expand Up @@ -293,6 +293,13 @@ gem "rails", git: "https://github\.com/rails/rails\.git", ref: "4aded"
.TP
\fBsubmodules\fR
For reference, a git submodule \fIhttps://git\-scm\.com/book/en/v2/Git\-Tools\-Submodules\fR lets you have another git repository within a subfolder of your repository\. Specify \fBsubmodules: true\fR to cause bundler to expand any submodules included in the git repository
.TP
\fBsparse_checkout\fR
Specify a directory to include when checking out a git repository\. Uses git's sparse\-checkout feature (requires git 2\.25+) to only download the specified directory, reducing disk usage for large repos\.
.IP
gem "foo", git: "https://github\.com/org/monorepo\.git", sparse_checkout: "packages/foo", glob: "packages/foo/*\.gemspec"
.IP
On git versions below 2\.25, the entire repository will be cloned with a warning\.
.P
If a git repository contains multiple \fB\.gemspecs\fR, each \fB\.gemspec\fR represents a gem located at the same place in the file system as the \fB\.gemspec\fR\.
.IP "" 4
Expand Down
12 changes: 12 additions & 0 deletions bundler/lib/bundler/man/gemfile.5.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,18 @@ Git repositories support a number of additional options.
Specify `submodules: true` to cause bundler to expand any
submodules included in the git repository

* `sparse_checkout`:
Specify a directory to include when checking out a git repository.
Uses git's sparse-checkout feature (requires git 2.25+) to only
download the specified directory, reducing disk usage for large repos.

gem "foo", git: "https://github.com/org/monorepo.git",
sparse_checkout: "packages/foo",
glob: "packages/foo/*.gemspec"

On git versions below 2.25, the entire repository will be cloned
with a warning.

If a git repository contains multiple `.gemspecs`, each `.gemspec`
represents a gem located at the same place in the file system as
the `.gemspec`.
Expand Down
Loading