bundler 2.3.17 → 2.3.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/compact_index_client/updater.rb +16 -3
- data/lib/bundler/definition.rb +20 -6
- data/lib/bundler/dependency.rb +2 -1
- data/lib/bundler/dsl.rb +1 -1
- data/lib/bundler/gem_helpers.rb +1 -0
- data/lib/bundler/lazy_specification.rb +2 -2
- data/lib/bundler/lockfile_parser.rb +4 -0
- data/lib/bundler/man/bundle-add.1 +1 -1
- data/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/lib/bundler/man/bundle-cache.1 +1 -1
- data/lib/bundler/man/bundle-check.1 +1 -1
- data/lib/bundler/man/bundle-clean.1 +1 -1
- data/lib/bundler/man/bundle-config.1 +1 -1
- data/lib/bundler/man/bundle-doctor.1 +1 -1
- data/lib/bundler/man/bundle-exec.1 +1 -1
- data/lib/bundler/man/bundle-gem.1 +1 -1
- data/lib/bundler/man/bundle-info.1 +1 -1
- data/lib/bundler/man/bundle-init.1 +1 -1
- data/lib/bundler/man/bundle-inject.1 +1 -1
- data/lib/bundler/man/bundle-install.1 +1 -1
- data/lib/bundler/man/bundle-list.1 +1 -1
- data/lib/bundler/man/bundle-lock.1 +1 -1
- data/lib/bundler/man/bundle-open.1 +1 -1
- data/lib/bundler/man/bundle-outdated.1 +1 -1
- data/lib/bundler/man/bundle-platform.1 +1 -1
- data/lib/bundler/man/bundle-pristine.1 +1 -1
- data/lib/bundler/man/bundle-remove.1 +1 -1
- data/lib/bundler/man/bundle-show.1 +1 -1
- data/lib/bundler/man/bundle-update.1 +1 -1
- data/lib/bundler/man/bundle-viz.1 +1 -1
- data/lib/bundler/man/bundle.1 +1 -1
- data/lib/bundler/man/gemfile.5 +62 -38
- data/lib/bundler/man/gemfile.5.ronn +52 -38
- data/lib/bundler/resolver/spec_group.rb +5 -4
- data/lib/bundler/resolver.rb +5 -2
- data/lib/bundler/runtime.rb +0 -1
- data/lib/bundler/source/rubygems.rb +12 -6
- data/lib/bundler/spec_set.rb +2 -2
- data/lib/bundler/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 677949dc949f82b847c011ee0a401b180743c294d2ea7cc62d1d969483289a59
|
4
|
+
data.tar.gz: 4ad73bf323c1b3fe9370af0b853992249126ce54624fb97ea5e454f15dbb1e3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83b95a19fc8a0077e2660776321547d1b33a83fde01a60819d624b1a5df19e825cd6173d07f595b050f4b6686d82587a886bd5c1f88629b77538d24df65e09d3
|
7
|
+
data.tar.gz: c29b1d158826b44d561a3dc3484f4a498bbfb9dd2d764160cbb16e5d84e78d7ef3098ce4b67a275f3d5622f94f0739cdf8f599d2e1bb17a20cc88137f82fa190
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
# 2.3.18 (July 14, 2022)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Extend `gem` DSL with a `force_ruby_platform` option [#4049](https://github.com/rubygems/rubygems/pull/4049)
|
6
|
+
|
7
|
+
## Bug fixes:
|
8
|
+
|
9
|
+
- Fix misleading error if compact index cannot be copied [#5709](https://github.com/rubygems/rubygems/pull/5709)
|
10
|
+
- Fix TruffleRuby no longer able to install lockfiles generated with other implementations [#5711](https://github.com/rubygems/rubygems/pull/5711)
|
11
|
+
- Fix TruffleRuby no longer installing lockfiles using "ruby" platform correctly [#5694](https://github.com/rubygems/rubygems/pull/5694)
|
12
|
+
- Fix crash when updating vendor cache of default gems [#5679](https://github.com/rubygems/rubygems/pull/5679)
|
13
|
+
|
14
|
+
## Performance:
|
15
|
+
|
16
|
+
- Speed up `bundler/setup` by using the raw `Gemfile.lock` information without extra processing whenever possible [#5695](https://github.com/rubygems/rubygems/pull/5695)
|
17
|
+
|
18
|
+
## Documentation:
|
19
|
+
|
20
|
+
- Use modern style hashes in Gemfile DSL docs [#5674](https://github.com/rubygems/rubygems/pull/5674)
|
21
|
+
|
1
22
|
# 2.3.17 (June 29, 2022)
|
2
23
|
|
3
24
|
## Enhancements:
|
@@ -4,8 +4,8 @@ module Bundler
|
|
4
4
|
# Represents metadata from when the Bundler gem was built.
|
5
5
|
module BuildMetadata
|
6
6
|
# begin ivars
|
7
|
-
@built_at = "2022-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2022-07-14".freeze
|
8
|
+
@git_commit_sha = "fc31b7f7d9".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
@@ -31,9 +31,8 @@ module Bundler
|
|
31
31
|
|
32
32
|
# first try to fetch any new bytes on the existing file
|
33
33
|
if retrying.nil? && local_path.file?
|
34
|
-
|
35
|
-
|
36
|
-
end
|
34
|
+
copy_file local_path, local_temp_path
|
35
|
+
|
37
36
|
headers["If-None-Match"] = etag_for(local_temp_path)
|
38
37
|
headers["Range"] =
|
39
38
|
if local_temp_path.size.nonzero?
|
@@ -98,6 +97,20 @@ module Bundler
|
|
98
97
|
SharedHelpers.digest(:MD5).hexdigest(File.read(path))
|
99
98
|
end
|
100
99
|
end
|
100
|
+
|
101
|
+
private
|
102
|
+
|
103
|
+
def copy_file(source, dest)
|
104
|
+
SharedHelpers.filesystem_access(source, :read) do
|
105
|
+
File.open(source, "r") do |s|
|
106
|
+
SharedHelpers.filesystem_access(dest, :write) do
|
107
|
+
File.open(dest, "wb", s.stat.mode) do |f|
|
108
|
+
IO.copy_stream(s, f)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
101
114
|
end
|
102
115
|
end
|
103
116
|
end
|
data/lib/bundler/definition.rb
CHANGED
@@ -235,6 +235,14 @@ module Bundler
|
|
235
235
|
@locked_deps.values
|
236
236
|
end
|
237
237
|
|
238
|
+
def new_deps
|
239
|
+
@new_deps ||= @dependencies - locked_dependencies
|
240
|
+
end
|
241
|
+
|
242
|
+
def deleted_deps
|
243
|
+
@deleted_deps ||= locked_dependencies - @dependencies
|
244
|
+
end
|
245
|
+
|
238
246
|
def specs_for(groups)
|
239
247
|
return specs if groups.empty?
|
240
248
|
deps = dependencies_for(groups)
|
@@ -259,8 +267,17 @@ module Bundler
|
|
259
267
|
Bundler.ui.debug "Frozen, using resolution from the lockfile"
|
260
268
|
@locked_specs
|
261
269
|
elsif !unlocking? && nothing_changed?
|
262
|
-
|
263
|
-
|
270
|
+
if deleted_deps.any?
|
271
|
+
Bundler.ui.debug("Some dependencies were deleted, using a subset of the resolution from the lockfile")
|
272
|
+
SpecSet.new(filter_specs(@locked_specs, @dependencies - deleted_deps))
|
273
|
+
else
|
274
|
+
Bundler.ui.debug("Found no changes, using resolution from the lockfile")
|
275
|
+
if @locked_gems.may_include_redundant_platform_specific_gems?
|
276
|
+
SpecSet.new(filter_specs(@locked_specs, @dependencies))
|
277
|
+
else
|
278
|
+
@locked_specs
|
279
|
+
end
|
280
|
+
end
|
264
281
|
else
|
265
282
|
last_resolve = converge_locked_specs
|
266
283
|
# Run a resolve against the locally available gems
|
@@ -359,9 +376,6 @@ module Bundler
|
|
359
376
|
added.concat new_platforms.map {|p| "* platform: #{p}" }
|
360
377
|
deleted.concat deleted_platforms.map {|p| "* platform: #{p}" }
|
361
378
|
|
362
|
-
new_deps = @dependencies - locked_dependencies
|
363
|
-
deleted_deps = locked_dependencies - @dependencies
|
364
|
-
|
365
379
|
added.concat new_deps.map {|d| "* #{pretty_dep(d)}" } if new_deps.any?
|
366
380
|
deleted.concat deleted_deps.map {|d| "* #{pretty_dep(d)}" } if deleted_deps.any?
|
367
381
|
|
@@ -806,7 +820,7 @@ module Bundler
|
|
806
820
|
return [] unless @locked_gems && unlocking? && !sources.expired_sources?(@locked_gems.sources)
|
807
821
|
converge_specs(@originally_locked_specs).map do |locked_spec|
|
808
822
|
name = locked_spec.name
|
809
|
-
dep =
|
823
|
+
dep = Dependency.new(name, ">= #{locked_spec.version}")
|
810
824
|
DepProxy.get_proxy(dep, locked_spec.platform)
|
811
825
|
end
|
812
826
|
end
|
data/lib/bundler/dependency.rb
CHANGED
@@ -7,7 +7,7 @@ require_relative "rubygems_ext"
|
|
7
7
|
module Bundler
|
8
8
|
class Dependency < Gem::Dependency
|
9
9
|
attr_reader :autorequire
|
10
|
-
attr_reader :groups, :platforms, :gemfile, :git, :github, :branch, :ref
|
10
|
+
attr_reader :groups, :platforms, :gemfile, :git, :github, :branch, :ref, :force_ruby_platform
|
11
11
|
|
12
12
|
# rubocop:disable Naming/VariableNumber
|
13
13
|
PLATFORM_MAP = {
|
@@ -109,6 +109,7 @@ module Bundler
|
|
109
109
|
@env = options["env"]
|
110
110
|
@should_include = options.fetch("should_include", true)
|
111
111
|
@gemfile = options["gemfile"]
|
112
|
+
@force_ruby_platform = options["force_ruby_platform"]
|
112
113
|
|
113
114
|
@autorequire = Array(options["require"] || []) if options.key?("require")
|
114
115
|
end
|
data/lib/bundler/dsl.rb
CHANGED
@@ -16,7 +16,7 @@ module Bundler
|
|
16
16
|
VALID_PLATFORMS = Bundler::Dependency::PLATFORM_MAP.keys.freeze
|
17
17
|
|
18
18
|
VALID_KEYS = %w[group groups git path glob name branch ref tag require submodules
|
19
|
-
platform platforms type source install_if gemfile].freeze
|
19
|
+
platform platforms type source install_if gemfile force_ruby_platform].freeze
|
20
20
|
|
21
21
|
GITHUB_PULL_REQUEST_URL = %r{\Ahttps://github\.com/([A-Za-z0-9_\-\.]+/[A-Za-z0-9_\-\.]+)/pull/(\d+)\z}.freeze
|
22
22
|
|
data/lib/bundler/gem_helpers.rb
CHANGED
@@ -5,6 +5,7 @@ module Bundler
|
|
5
5
|
GENERIC_CACHE = { Gem::Platform::RUBY => Gem::Platform::RUBY } # rubocop:disable Style/MutableConstant
|
6
6
|
GENERICS = [
|
7
7
|
[Gem::Platform.new("java"), Gem::Platform.new("java")],
|
8
|
+
[Gem::Platform.new("universal-java"), Gem::Platform.new("java")],
|
8
9
|
[Gem::Platform.new("mswin32"), Gem::Platform.new("mswin32")],
|
9
10
|
[Gem::Platform.new("mswin64"), Gem::Platform.new("mswin64")],
|
10
11
|
[Gem::Platform.new("universal-mingw32"), Gem::Platform.new("universal-mingw32")],
|
@@ -7,7 +7,7 @@ module Bundler
|
|
7
7
|
include MatchPlatform
|
8
8
|
|
9
9
|
attr_reader :name, :version, :dependencies, :platform
|
10
|
-
attr_accessor :source, :remote
|
10
|
+
attr_accessor :source, :remote, :force_ruby_platform
|
11
11
|
|
12
12
|
def initialize(name, version, platform, source = nil)
|
13
13
|
@name = name
|
@@ -152,7 +152,7 @@ module Bundler
|
|
152
152
|
# explicitly add a more specific platform.
|
153
153
|
#
|
154
154
|
def ruby_platform_materializes_to_ruby_platform?
|
155
|
-
!Bundler.most_specific_locked_platform?(generic_local_platform) || Bundler.settings[:force_ruby_platform]
|
155
|
+
!Bundler.most_specific_locked_platform?(generic_local_platform) || force_ruby_platform || Bundler.settings[:force_ruby_platform]
|
156
156
|
end
|
157
157
|
end
|
158
158
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CACHE" "1" "
|
4
|
+
.TH "BUNDLE\-CACHE" "1" "June 2022" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-CHECK" "1" "
|
4
|
+
.TH "BUNDLE\-CHECK" "1" "June 2022" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INJECT" "1" "
|
4
|
+
.TH "BUNDLE\-INJECT" "1" "June 2022" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-INSTALL" "1" "
|
4
|
+
.TH "BUNDLE\-INSTALL" "1" "June 2022" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-OUTDATED" "1" "
|
4
|
+
.TH "BUNDLE\-OUTDATED" "1" "June 2022" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-outdated\fR \- List installed gems with newer versions available
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "BUNDLE\-PRISTINE" "1" "
|
4
|
+
.TH "BUNDLE\-PRISTINE" "1" "June 2022" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
|
data/lib/bundler/man/bundle.1
CHANGED
data/lib/bundler/man/gemfile.5
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "GEMFILE" "5" "
|
4
|
+
.TH "GEMFILE" "5" "June 2022" "" ""
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
|
@@ -100,7 +100,7 @@ Each application \fImay\fR specify a Ruby engine version\. If an engine version
|
|
100
100
|
.
|
101
101
|
.nf
|
102
102
|
|
103
|
-
ruby "1\.8\.7", :
|
103
|
+
ruby "1\.8\.7", engine: "jruby", engine_version: "1\.6\.7"
|
104
104
|
.
|
105
105
|
.fi
|
106
106
|
.
|
@@ -113,7 +113,7 @@ Each application \fImay\fR specify a Ruby patchlevel\.
|
|
113
113
|
.
|
114
114
|
.nf
|
115
115
|
|
116
|
-
ruby "2\.0\.0", :
|
116
|
+
ruby "2\.0\.0", patchlevel: "247"
|
117
117
|
.
|
118
118
|
.fi
|
119
119
|
.
|
@@ -156,9 +156,9 @@ Each \fIgem\fR \fBMAY\fR specify files that should be used when autorequiring vi
|
|
156
156
|
.
|
157
157
|
.nf
|
158
158
|
|
159
|
-
gem "redis", :
|
160
|
-
gem "webmock", :
|
161
|
-
gem "byebug", :
|
159
|
+
gem "redis", require: ["redis/connection/hiredis", "redis"]
|
160
|
+
gem "webmock", require: false
|
161
|
+
gem "byebug", require: true
|
162
162
|
.
|
163
163
|
.fi
|
164
164
|
.
|
@@ -172,8 +172,8 @@ The argument defaults to the name of the gem\. For example, these are identical:
|
|
172
172
|
.nf
|
173
173
|
|
174
174
|
gem "nokogiri"
|
175
|
-
gem "nokogiri", :
|
176
|
-
gem "nokogiri", :
|
175
|
+
gem "nokogiri", require: "nokogiri"
|
176
|
+
gem "nokogiri", require: true
|
177
177
|
.
|
178
178
|
.fi
|
179
179
|
.
|
@@ -186,8 +186,8 @@ Each \fIgem\fR \fBMAY\fR specify membership in one or more groups\. Any \fIgem\f
|
|
186
186
|
.
|
187
187
|
.nf
|
188
188
|
|
189
|
-
gem "rspec", :
|
190
|
-
gem "wirble", :
|
189
|
+
gem "rspec", group: :test
|
190
|
+
gem "wirble", groups: [:development, :test]
|
191
191
|
.
|
192
192
|
.fi
|
193
193
|
.
|
@@ -320,9 +320,9 @@ As with groups, you can specify one or more platforms:
|
|
320
320
|
.
|
321
321
|
.nf
|
322
322
|
|
323
|
-
gem "weakling", :
|
324
|
-
gem "ruby\-debug", :
|
325
|
-
gem "nokogiri", :
|
323
|
+
gem "weakling", platforms: :jruby
|
324
|
+
gem "ruby\-debug", platforms: :mri_18
|
325
|
+
gem "nokogiri", platforms: [:mri_18, :jruby]
|
326
326
|
.
|
327
327
|
.fi
|
328
328
|
.
|
@@ -331,6 +331,30 @@ gem "nokogiri", :platforms => [:mri_18, :jruby]
|
|
331
331
|
.P
|
332
332
|
All operations involving groups (\fBbundle install\fR \fIbundle\-install\.1\.html\fR, \fBBundler\.setup\fR, \fBBundler\.require\fR) behave exactly the same as if any groups not matching the current platform were explicitly excluded\.
|
333
333
|
.
|
334
|
+
.SS "FORCE_RUBY_PLATFORM"
|
335
|
+
If you always want the pure ruby variant of a gem to be chosen over platform specific variants, you can use the \fBforce_ruby_platform\fR option:
|
336
|
+
.
|
337
|
+
.IP "" 4
|
338
|
+
.
|
339
|
+
.nf
|
340
|
+
|
341
|
+
gem "ffi", force_ruby_platform: true
|
342
|
+
.
|
343
|
+
.fi
|
344
|
+
.
|
345
|
+
.IP "" 0
|
346
|
+
.
|
347
|
+
.P
|
348
|
+
This can be handy (assuming the pure ruby variant works fine) when:
|
349
|
+
.
|
350
|
+
.IP "\(bu" 4
|
351
|
+
You\'re having issues with the platform specific variant\.
|
352
|
+
.
|
353
|
+
.IP "\(bu" 4
|
354
|
+
The platform specific variant does not yet support a newer ruby (and thus has a \fBrequired_ruby_version\fR upper bound), but you still want your Gemfile{\.lock} files to resolve under that ruby\.
|
355
|
+
.
|
356
|
+
.IP "" 0
|
357
|
+
.
|
334
358
|
.SS "SOURCE"
|
335
359
|
You can select an alternate Rubygems repository for a gem using the \':source\' option\.
|
336
360
|
.
|
@@ -338,7 +362,7 @@ You can select an alternate Rubygems repository for a gem using the \':source\'
|
|
338
362
|
.
|
339
363
|
.nf
|
340
364
|
|
341
|
-
gem "some_internal_gem", :
|
365
|
+
gem "some_internal_gem", source: "https://gems\.example\.com"
|
342
366
|
.
|
343
367
|
.fi
|
344
368
|
.
|
@@ -361,15 +385,15 @@ If necessary, you can specify that a gem is located at a particular git reposito
|
|
361
385
|
.
|
362
386
|
.TP
|
363
387
|
\fBHTTP(S)\fR
|
364
|
-
gem "rails", :
|
388
|
+
gem "rails", git: "https://github\.com/rails/rails\.git"
|
365
389
|
.
|
366
390
|
.TP
|
367
391
|
\fBSSH\fR
|
368
|
-
gem "rails", :
|
392
|
+
gem "rails", git: "git@github\.com:rails/rails\.git"
|
369
393
|
.
|
370
394
|
.TP
|
371
395
|
\fBgit\fR
|
372
|
-
gem "rails", :
|
396
|
+
gem "rails", git: "git://github\.com/rails/rails\.git"
|
373
397
|
.
|
374
398
|
.P
|
375
399
|
If using SSH, the user that you use to run \fBbundle install\fR \fBMUST\fR have the appropriate keys available in their \fB$HOME/\.ssh\fR\.
|
@@ -393,7 +417,7 @@ If a git repository does have a \fB\.gemspec\fR for the gem you attached it to,
|
|
393
417
|
.
|
394
418
|
.nf
|
395
419
|
|
396
|
-
gem "rails", "2\.3\.8", :
|
420
|
+
gem "rails", "2\.3\.8", git: "https://github\.com/rails/rails\.git"
|
397
421
|
# bundle install will fail, because the \.gemspec in the rails
|
398
422
|
# repository\'s master branch specifies version 3\.0\.0
|
399
423
|
.
|
@@ -409,20 +433,20 @@ Git repositories support a number of additional options\.
|
|
409
433
|
.
|
410
434
|
.TP
|
411
435
|
\fBbranch\fR, \fBtag\fR, and \fBref\fR
|
412
|
-
You \fBMUST\fR only specify at most one of these options\. The default is \
|
436
|
+
You \fBMUST\fR only specify at most one of these options\. The default is \fBbranch: "master"\fR\. For example:
|
413
437
|
.
|
414
438
|
.IP
|
415
|
-
gem "rails", :
|
439
|
+
gem "rails", git: "https://github\.com/rails/rails\.git", branch: "5\-0\-stable"
|
416
440
|
.
|
417
441
|
.IP
|
418
|
-
gem "rails", :
|
442
|
+
gem "rails", git: "https://github\.com/rails/rails\.git", tag: "v5\.0\.0"
|
419
443
|
.
|
420
444
|
.IP
|
421
|
-
gem "rails", :
|
445
|
+
gem "rails", git: "https://github\.com/rails/rails\.git", ref: "4aded"
|
422
446
|
.
|
423
447
|
.TP
|
424
448
|
\fBsubmodules\fR
|
425
|
-
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 \
|
449
|
+
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
|
426
450
|
.
|
427
451
|
.P
|
428
452
|
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\.
|
@@ -454,7 +478,7 @@ A custom git source can be defined via the \fBgit_source\fR method\. Provide the
|
|
454
478
|
.nf
|
455
479
|
|
456
480
|
git_source(:stash){ |repo_name| "https://stash\.corp\.acme\.pl/#{repo_name}\.git" }
|
457
|
-
gem \'rails\', :
|
481
|
+
gem \'rails\', stash: \'forks/rails\'
|
458
482
|
.
|
459
483
|
.fi
|
460
484
|
.
|
@@ -467,7 +491,7 @@ In addition, if you wish to choose a specific branch:
|
|
467
491
|
.
|
468
492
|
.nf
|
469
493
|
|
470
|
-
gem "rails", :
|
494
|
+
gem "rails", stash: "forks/rails", branch: "branch_name"
|
471
495
|
.
|
472
496
|
.fi
|
473
497
|
.
|
@@ -483,8 +507,8 @@ If the git repository you want to use is hosted on GitHub and is public, you can
|
|
483
507
|
.
|
484
508
|
.nf
|
485
509
|
|
486
|
-
gem "rails", :
|
487
|
-
gem "rails", :
|
510
|
+
gem "rails", github: "rails/rails"
|
511
|
+
gem "rails", github: "rails"
|
488
512
|
.
|
489
513
|
.fi
|
490
514
|
.
|
@@ -497,7 +521,7 @@ Are both equivalent to
|
|
497
521
|
.
|
498
522
|
.nf
|
499
523
|
|
500
|
-
gem "rails", :
|
524
|
+
gem "rails", git: "git://github\.com/rails/rails\.git"
|
501
525
|
.
|
502
526
|
.fi
|
503
527
|
.
|
@@ -513,7 +537,7 @@ You can also directly pass a pull request URL:
|
|
513
537
|
.
|
514
538
|
.nf
|
515
539
|
|
516
|
-
gem "rails", :
|
540
|
+
gem "rails", github: "https://github\.com/rails/rails/pull/43753"
|
517
541
|
.
|
518
542
|
.fi
|
519
543
|
.
|
@@ -526,7 +550,7 @@ Which is equivalent to:
|
|
526
550
|
.
|
527
551
|
.nf
|
528
552
|
|
529
|
-
gem "rails", :
|
553
|
+
gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
|
530
554
|
.
|
531
555
|
.fi
|
532
556
|
.
|
@@ -539,7 +563,7 @@ If the git repository you want to use is hosted as a GitHub Gist and is public,
|
|
539
563
|
.
|
540
564
|
.nf
|
541
565
|
|
542
|
-
gem "the_hatch", :
|
566
|
+
gem "the_hatch", gist: "4815162342"
|
543
567
|
.
|
544
568
|
.fi
|
545
569
|
.
|
@@ -552,7 +576,7 @@ Is equivalent to:
|
|
552
576
|
.
|
553
577
|
.nf
|
554
578
|
|
555
|
-
gem "the_hatch", :
|
579
|
+
gem "the_hatch", git: "https://gist\.github\.com/4815162342\.git"
|
556
580
|
.
|
557
581
|
.fi
|
558
582
|
.
|
@@ -568,8 +592,8 @@ If the git repository you want to use is hosted on Bitbucket and is public, you
|
|
568
592
|
.
|
569
593
|
.nf
|
570
594
|
|
571
|
-
gem "rails", :
|
572
|
-
gem "rails", :
|
595
|
+
gem "rails", bitbucket: "rails/rails"
|
596
|
+
gem "rails", bitbucket: "rails"
|
573
597
|
.
|
574
598
|
.fi
|
575
599
|
.
|
@@ -582,7 +606,7 @@ Are both equivalent to
|
|
582
606
|
.
|
583
607
|
.nf
|
584
608
|
|
585
|
-
gem "rails", :
|
609
|
+
gem "rails", git: "https://rails@bitbucket\.org/rails/rails\.git"
|
586
610
|
.
|
587
611
|
.fi
|
588
612
|
.
|
@@ -604,7 +628,7 @@ Unlike \fB:git\fR, bundler does not compile C extensions for gems specified as p
|
|
604
628
|
.
|
605
629
|
.nf
|
606
630
|
|
607
|
-
gem "rails", :
|
631
|
+
gem "rails", path: "vendor/rails"
|
608
632
|
.
|
609
633
|
.fi
|
610
634
|
.
|
@@ -648,7 +672,7 @@ platforms :ruby do
|
|
648
672
|
gem "sqlite3"
|
649
673
|
end
|
650
674
|
|
651
|
-
group :development, :
|
675
|
+
group :development, optional: true do
|
652
676
|
gem "wirble"
|
653
677
|
gem "faker"
|
654
678
|
end
|
@@ -688,7 +712,7 @@ The \fB\.gemspec\fR \fIhttp://guides\.rubygems\.org/specification\-reference/\fR
|
|
688
712
|
If you wish to use Bundler to help install dependencies for a gem while it is being developed, use the \fBgemspec\fR method to pull in the dependencies listed in the \fB\.gemspec\fR file\.
|
689
713
|
.
|
690
714
|
.P
|
691
|
-
The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\
|
715
|
+
The \fBgemspec\fR method adds any runtime dependencies as gem requirements in the default group\. It also adds development dependencies as gem requirements in the \fBdevelopment\fR group\. Finally, it adds a gem requirement on your project (\fBpath: \'\.\'\fR)\. In conjunction with \fBBundler\.setup\fR, this allows you to require project files in your test code as you would if the project were installed as a gem; you need not manipulate the load path manually or require project files via relative paths\.
|
692
716
|
.
|
693
717
|
.P
|
694
718
|
The \fBgemspec\fR method supports optional \fB:path\fR, \fB:glob\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, the glob it uses to look for the gemspec (defaults to: "{,\fI,\fR/*}\.gemspec"), what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
|
@@ -91,13 +91,13 @@ Each application _may_ specify a Ruby engine version. If an engine version is
|
|
91
91
|
specified, an engine _must_ also be specified. If the engine is "ruby" the
|
92
92
|
engine version specified _must_ match the Ruby version.
|
93
93
|
|
94
|
-
ruby "1.8.7", :
|
94
|
+
ruby "1.8.7", engine: "jruby", engine_version: "1.6.7"
|
95
95
|
|
96
96
|
### PATCHLEVEL
|
97
97
|
|
98
98
|
Each application _may_ specify a Ruby patchlevel.
|
99
99
|
|
100
|
-
ruby "2.0.0", :
|
100
|
+
ruby "2.0.0", patchlevel: "247"
|
101
101
|
|
102
102
|
## GEMS
|
103
103
|
|
@@ -124,23 +124,23 @@ Each _gem_ `MAY` specify files that should be used when autorequiring via
|
|
124
124
|
you want `required` has the same name as _gem_ or `false` to
|
125
125
|
prevent any file from being autorequired.
|
126
126
|
|
127
|
-
gem "redis", :
|
128
|
-
gem "webmock", :
|
129
|
-
gem "byebug", :
|
127
|
+
gem "redis", require: ["redis/connection/hiredis", "redis"]
|
128
|
+
gem "webmock", require: false
|
129
|
+
gem "byebug", require: true
|
130
130
|
|
131
131
|
The argument defaults to the name of the gem. For example, these are identical:
|
132
132
|
|
133
133
|
gem "nokogiri"
|
134
|
-
gem "nokogiri", :
|
135
|
-
gem "nokogiri", :
|
134
|
+
gem "nokogiri", require: "nokogiri"
|
135
|
+
gem "nokogiri", require: true
|
136
136
|
|
137
137
|
### GROUPS
|
138
138
|
|
139
139
|
Each _gem_ `MAY` specify membership in one or more groups. Any _gem_ that does
|
140
140
|
not specify membership in any group is placed in the `default` group.
|
141
141
|
|
142
|
-
gem "rspec", :
|
143
|
-
gem "wirble", :
|
142
|
+
gem "rspec", group: :test
|
143
|
+
gem "wirble", groups: [:development, :test]
|
144
144
|
|
145
145
|
The Bundler runtime allows its two main methods, `Bundler.setup` and
|
146
146
|
`Bundler.require`, to limit their impact to particular groups.
|
@@ -223,20 +223,34 @@ The full list of platforms and supported versions includes:
|
|
223
223
|
|
224
224
|
As with groups, you can specify one or more platforms:
|
225
225
|
|
226
|
-
gem "weakling", :
|
227
|
-
gem "ruby-debug", :
|
228
|
-
gem "nokogiri", :
|
226
|
+
gem "weakling", platforms: :jruby
|
227
|
+
gem "ruby-debug", platforms: :mri_18
|
228
|
+
gem "nokogiri", platforms: [:mri_18, :jruby]
|
229
229
|
|
230
230
|
All operations involving groups ([`bundle install`](bundle-install.1.html), `Bundler.setup`,
|
231
231
|
`Bundler.require`) behave exactly the same as if any groups not
|
232
232
|
matching the current platform were explicitly excluded.
|
233
233
|
|
234
|
+
### FORCE_RUBY_PLATFORM
|
235
|
+
|
236
|
+
If you always want the pure ruby variant of a gem to be chosen over platform
|
237
|
+
specific variants, you can use the `force_ruby_platform` option:
|
238
|
+
|
239
|
+
gem "ffi", force_ruby_platform: true
|
240
|
+
|
241
|
+
This can be handy (assuming the pure ruby variant works fine) when:
|
242
|
+
|
243
|
+
* You're having issues with the platform specific variant.
|
244
|
+
* The platform specific variant does not yet support a newer ruby (and thus has
|
245
|
+
a `required_ruby_version` upper bound), but you still want your Gemfile{.lock}
|
246
|
+
files to resolve under that ruby.
|
247
|
+
|
234
248
|
### SOURCE
|
235
249
|
|
236
250
|
You can select an alternate Rubygems repository for a gem using the ':source'
|
237
251
|
option.
|
238
252
|
|
239
|
-
gem "some_internal_gem", :
|
253
|
+
gem "some_internal_gem", source: "https://gems.example.com"
|
240
254
|
|
241
255
|
This forces the gem to be loaded from this source and ignores any global sources
|
242
256
|
declared at the top level of the file. If the gem does not exist in this source,
|
@@ -263,11 +277,11 @@ git repository using the `:git` parameter. The repository can be accessed via
|
|
263
277
|
several protocols:
|
264
278
|
|
265
279
|
* `HTTP(S)`:
|
266
|
-
gem "rails", :
|
280
|
+
gem "rails", git: "https://github.com/rails/rails.git"
|
267
281
|
* `SSH`:
|
268
|
-
gem "rails", :
|
282
|
+
gem "rails", git: "git@github.com:rails/rails.git"
|
269
283
|
* `git`:
|
270
|
-
gem "rails", :
|
284
|
+
gem "rails", git: "git://github.com/rails/rails.git"
|
271
285
|
|
272
286
|
If using SSH, the user that you use to run `bundle install` `MUST` have the
|
273
287
|
appropriate keys available in their `$HOME/.ssh`.
|
@@ -295,7 +309,7 @@ to, a version specifier, if provided, means that the git repository is
|
|
295
309
|
only valid if the `.gemspec` specifies a version matching the version
|
296
310
|
specifier. If not, bundler will print a warning.
|
297
311
|
|
298
|
-
gem "rails", "2.3.8", :
|
312
|
+
gem "rails", "2.3.8", git: "https://github.com/rails/rails.git"
|
299
313
|
# bundle install will fail, because the .gemspec in the rails
|
300
314
|
# repository's master branch specifies version 3.0.0
|
301
315
|
|
@@ -307,18 +321,18 @@ Git repositories support a number of additional options.
|
|
307
321
|
|
308
322
|
* `branch`, `tag`, and `ref`:
|
309
323
|
You `MUST` only specify at most one of these options. The default
|
310
|
-
is
|
324
|
+
is `branch: "master"`. For example:
|
311
325
|
|
312
|
-
gem "rails", :
|
326
|
+
gem "rails", git: "https://github.com/rails/rails.git", branch: "5-0-stable"
|
313
327
|
|
314
|
-
gem "rails", :
|
328
|
+
gem "rails", git: "https://github.com/rails/rails.git", tag: "v5.0.0"
|
315
329
|
|
316
|
-
gem "rails", :
|
330
|
+
gem "rails", git: "https://github.com/rails/rails.git", ref: "4aded"
|
317
331
|
|
318
332
|
* `submodules`:
|
319
333
|
For reference, a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
|
320
334
|
lets you have another git repository within a subfolder of your repository.
|
321
|
-
Specify
|
335
|
+
Specify `submodules: true` to cause bundler to expand any
|
322
336
|
submodules included in the git repository
|
323
337
|
|
324
338
|
If a git repository contains multiple `.gemspecs`, each `.gemspec`
|
@@ -346,11 +360,11 @@ as an argument, and a block which receives a single argument and interpolates it
|
|
346
360
|
string to return the full repo address:
|
347
361
|
|
348
362
|
git_source(:stash){ |repo_name| "https://stash.corp.acme.pl/#{repo_name}.git" }
|
349
|
-
gem 'rails', :
|
363
|
+
gem 'rails', stash: 'forks/rails'
|
350
364
|
|
351
365
|
In addition, if you wish to choose a specific branch:
|
352
366
|
|
353
|
-
gem "rails", :
|
367
|
+
gem "rails", stash: "forks/rails", branch: "branch_name"
|
354
368
|
|
355
369
|
### GITHUB
|
356
370
|
|
@@ -363,33 +377,33 @@ If the git repository you want to use is hosted on GitHub and is public, you can
|
|
363
377
|
trailing ".git"), separated by a slash. If both the username and repository name are the
|
364
378
|
same, you can omit one.
|
365
379
|
|
366
|
-
gem "rails", :
|
367
|
-
gem "rails", :
|
380
|
+
gem "rails", github: "rails/rails"
|
381
|
+
gem "rails", github: "rails"
|
368
382
|
|
369
383
|
Are both equivalent to
|
370
384
|
|
371
|
-
gem "rails", :
|
385
|
+
gem "rails", git: "git://github.com/rails/rails.git"
|
372
386
|
|
373
387
|
Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument.
|
374
388
|
|
375
389
|
You can also directly pass a pull request URL:
|
376
390
|
|
377
|
-
gem "rails", :
|
391
|
+
gem "rails", github: "https://github.com/rails/rails/pull/43753"
|
378
392
|
|
379
393
|
Which is equivalent to:
|
380
394
|
|
381
|
-
gem "rails", :
|
395
|
+
gem "rails", github: "rails/rails", branch: "refs/pull/43753/head"
|
382
396
|
|
383
397
|
### GIST
|
384
398
|
|
385
399
|
If the git repository you want to use is hosted as a GitHub Gist and is public, you can use
|
386
400
|
the :gist shorthand to specify the gist identifier (without the trailing ".git").
|
387
401
|
|
388
|
-
gem "the_hatch", :
|
402
|
+
gem "the_hatch", gist: "4815162342"
|
389
403
|
|
390
404
|
Is equivalent to:
|
391
405
|
|
392
|
-
gem "the_hatch", :
|
406
|
+
gem "the_hatch", git: "https://gist.github.com/4815162342.git"
|
393
407
|
|
394
408
|
Since the `gist` method is a specialization of `git_source`, it accepts a `:branch` named argument.
|
395
409
|
|
@@ -400,12 +414,12 @@ If the git repository you want to use is hosted on Bitbucket and is public, you
|
|
400
414
|
trailing ".git"), separated by a slash. If both the username and repository name are the
|
401
415
|
same, you can omit one.
|
402
416
|
|
403
|
-
gem "rails", :
|
404
|
-
gem "rails", :
|
417
|
+
gem "rails", bitbucket: "rails/rails"
|
418
|
+
gem "rails", bitbucket: "rails"
|
405
419
|
|
406
420
|
Are both equivalent to
|
407
421
|
|
408
|
-
gem "rails", :
|
422
|
+
gem "rails", git: "https://rails@bitbucket.org/rails/rails.git"
|
409
423
|
|
410
424
|
Since the `bitbucket` method is a specialization of `git_source`, it accepts a `:branch` named argument.
|
411
425
|
|
@@ -423,7 +437,7 @@ version that bundler should use.
|
|
423
437
|
Unlike `:git`, bundler does not compile C extensions for
|
424
438
|
gems specified as paths.
|
425
439
|
|
426
|
-
gem "rails", :
|
440
|
+
gem "rails", path: "vendor/rails"
|
427
441
|
|
428
442
|
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.
|
429
443
|
|
@@ -452,7 +466,7 @@ applied to a group of gems by using block form.
|
|
452
466
|
gem "sqlite3"
|
453
467
|
end
|
454
468
|
|
455
|
-
group :development, :
|
469
|
+
group :development, optional: true do
|
456
470
|
gem "wirble"
|
457
471
|
gem "faker"
|
458
472
|
end
|
@@ -495,8 +509,8 @@ the `.gemspec` file.
|
|
495
509
|
|
496
510
|
The `gemspec` method adds any runtime dependencies as gem requirements in the
|
497
511
|
default group. It also adds development dependencies as gem requirements in the
|
498
|
-
`development` group. Finally, it adds a gem requirement on your project (
|
499
|
-
|
512
|
+
`development` group. Finally, it adds a gem requirement on your project (`path:
|
513
|
+
'.'`). In conjunction with `Bundler.setup`, this allows you to require project
|
500
514
|
files in your test code as you would if the project were installed as a gem; you
|
501
515
|
need not manipulate the load path manually or require project files via relative
|
502
516
|
paths.
|
@@ -4,7 +4,7 @@ module Bundler
|
|
4
4
|
class Resolver
|
5
5
|
class SpecGroup
|
6
6
|
attr_accessor :name, :version, :source
|
7
|
-
attr_accessor :activated_platforms
|
7
|
+
attr_accessor :activated_platforms, :force_ruby_platform
|
8
8
|
|
9
9
|
def self.create_for(specs, all_platforms, specific_platform)
|
10
10
|
specific_platform_specs = specs[specific_platform]
|
@@ -35,6 +35,7 @@ module Bundler
|
|
35
35
|
|
36
36
|
specs.map do |s|
|
37
37
|
lazy_spec = LazySpecification.new(name, version, s.platform, source)
|
38
|
+
lazy_spec.force_ruby_platform = force_ruby_platform
|
38
39
|
lazy_spec.dependencies.replace s.dependencies
|
39
40
|
lazy_spec
|
40
41
|
end
|
@@ -88,7 +89,7 @@ module Bundler
|
|
88
89
|
dependencies = []
|
89
90
|
@specs[platform].first.dependencies.each do |dep|
|
90
91
|
next if dep.type == :development
|
91
|
-
dependencies << DepProxy.get_proxy(dep, platform)
|
92
|
+
dependencies << DepProxy.get_proxy(Dependency.new(dep.name, dep.requirement), platform)
|
92
93
|
end
|
93
94
|
dependencies
|
94
95
|
end
|
@@ -98,10 +99,10 @@ module Bundler
|
|
98
99
|
return [] if spec.is_a?(LazySpecification)
|
99
100
|
dependencies = []
|
100
101
|
unless spec.required_ruby_version.none?
|
101
|
-
dependencies << DepProxy.get_proxy(
|
102
|
+
dependencies << DepProxy.get_proxy(Dependency.new("Ruby\0", spec.required_ruby_version), platform)
|
102
103
|
end
|
103
104
|
unless spec.required_rubygems_version.none?
|
104
|
-
dependencies << DepProxy.get_proxy(
|
105
|
+
dependencies << DepProxy.get_proxy(Dependency.new("RubyGems\0", spec.required_rubygems_version), platform)
|
105
106
|
end
|
106
107
|
dependencies
|
107
108
|
end
|
data/lib/bundler/resolver.rb
CHANGED
@@ -143,9 +143,12 @@ module Bundler
|
|
143
143
|
end
|
144
144
|
|
145
145
|
spec_group_ruby = SpecGroup.create_for(specs_by_platform, [Gem::Platform::RUBY], Gem::Platform::RUBY)
|
146
|
-
|
146
|
+
if spec_group_ruby
|
147
|
+
spec_group_ruby.force_ruby_platform = dependency.force_ruby_platform
|
148
|
+
groups << spec_group_ruby
|
149
|
+
end
|
147
150
|
|
148
|
-
next groups if @resolving_only_for_ruby
|
151
|
+
next groups if @resolving_only_for_ruby || dependency.force_ruby_platform
|
149
152
|
|
150
153
|
spec_group = SpecGroup.create_for(specs_by_platform, @platforms, platform)
|
151
154
|
groups << spec_group
|
data/lib/bundler/runtime.rb
CHANGED
@@ -125,7 +125,6 @@ module Bundler
|
|
125
125
|
specs_to_cache.each do |spec|
|
126
126
|
next if spec.name == "bundler"
|
127
127
|
next if spec.source.is_a?(Source::Gemspec)
|
128
|
-
spec.source.send(:fetch_gem, spec) if Bundler.settings[:cache_all_platforms] && spec.source.respond_to?(:fetch_gem, true)
|
129
128
|
spec.source.cache(spec, custom_path) if spec.source.respond_to?(:cache)
|
130
129
|
end
|
131
130
|
|
@@ -153,13 +153,11 @@ module Bundler
|
|
153
153
|
# Check for this spec from other sources
|
154
154
|
uris = [spec.remote, *remotes_for_spec(spec)].map(&:anonymized_uri).uniq
|
155
155
|
Installer.ambiguous_gems << [spec.name, *uris] if uris.length > 1
|
156
|
-
|
157
|
-
path = fetch_gem(spec, options[:previous_spec])
|
158
|
-
else
|
159
|
-
path = cached_gem(spec)
|
160
|
-
raise GemNotFound, "Could not find #{spec.file_name} for installation" unless path
|
161
156
|
end
|
162
157
|
|
158
|
+
path = fetch_gem_if_possible(spec, options[:previous_spec])
|
159
|
+
raise GemNotFound, "Could not find #{spec.file_name} for installation" unless path
|
160
|
+
|
163
161
|
return if Bundler.settings[:no_install]
|
164
162
|
|
165
163
|
if requires_sudo?
|
@@ -242,7 +240,7 @@ module Bundler
|
|
242
240
|
end
|
243
241
|
|
244
242
|
def cache(spec, custom_path = nil)
|
245
|
-
cached_path = cached_gem(spec)
|
243
|
+
cached_path = Bundler.settings[:cache_all_platforms] ? fetch_gem_if_possible(spec) : cached_gem(spec)
|
246
244
|
raise GemNotFound, "Missing gem file '#{spec.file_name}'." unless cached_path
|
247
245
|
return if File.dirname(cached_path) == Bundler.app_cache.to_s
|
248
246
|
Bundler.ui.info " * #{File.basename(cached_path)}"
|
@@ -462,6 +460,14 @@ module Bundler
|
|
462
460
|
end
|
463
461
|
end
|
464
462
|
|
463
|
+
def fetch_gem_if_possible(spec, previous_spec = nil)
|
464
|
+
if spec.remote
|
465
|
+
fetch_gem(spec, previous_spec)
|
466
|
+
else
|
467
|
+
cached_gem(spec)
|
468
|
+
end
|
469
|
+
end
|
470
|
+
|
465
471
|
def fetch_gem(spec, previous_spec = nil)
|
466
472
|
spec.fetch_platform
|
467
473
|
|
data/lib/bundler/spec_set.rb
CHANGED
@@ -30,7 +30,7 @@ module Bundler
|
|
30
30
|
|
31
31
|
specs_for_dep.first.dependencies.each do |d|
|
32
32
|
next if d.type == :development
|
33
|
-
d = DepProxy.get_proxy(d, dep.__platform) unless match_current_platform
|
33
|
+
d = DepProxy.get_proxy(Dependency.new(d.name, d.requirement), dep.__platform) unless match_current_platform
|
34
34
|
deps << d
|
35
35
|
end
|
36
36
|
elsif check
|
@@ -178,7 +178,7 @@ module Bundler
|
|
178
178
|
if match_current_platform
|
179
179
|
GemHelpers.select_best_platform_match(specs_for_name.select {|s| Gem::Platform.match_spec?(s) }, Bundler.local_platform)
|
180
180
|
else
|
181
|
-
specs_for_name_and_platform = GemHelpers.select_best_platform_match(specs_for_name, dep.__platform)
|
181
|
+
specs_for_name_and_platform = GemHelpers.select_best_platform_match(specs_for_name, dep.force_ruby_platform ? Gem::Platform::RUBY : dep.__platform)
|
182
182
|
specs_for_name_and_platform.any? ? specs_for_name_and_platform : specs_for_name
|
183
183
|
end
|
184
184
|
end
|
data/lib/bundler/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- André Arko
|
@@ -22,7 +22,7 @@ authors:
|
|
22
22
|
autorequire:
|
23
23
|
bindir: exe
|
24
24
|
cert_chain: []
|
25
|
-
date: 2022-
|
25
|
+
date: 2022-07-14 00:00:00.000000000 Z
|
26
26
|
dependencies: []
|
27
27
|
description: Bundler manages an application's dependencies through its entire life,
|
28
28
|
across many machines, systematically and repeatably
|
@@ -369,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
369
369
|
- !ruby/object:Gem::Version
|
370
370
|
version: 2.5.2
|
371
371
|
requirements: []
|
372
|
-
rubygems_version: 3.3.
|
372
|
+
rubygems_version: 3.3.18
|
373
373
|
signing_key:
|
374
374
|
specification_version: 4
|
375
375
|
summary: The best way to manage your application's dependencies
|