bundler 2.1.4 → 2.2.17
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1774 -1430
- data/README.md +6 -8
- data/bundler.gemspec +4 -4
- data/exe/bundle +3 -0
- data/lib/bundler.rb +33 -9
- data/lib/bundler/build_metadata.rb +3 -11
- data/lib/bundler/cli.rb +59 -23
- data/lib/bundler/cli/add.rb +1 -1
- data/lib/bundler/cli/binstubs.rb +6 -2
- data/lib/bundler/cli/cache.rb +2 -7
- data/lib/bundler/cli/clean.rb +1 -1
- data/lib/bundler/cli/common.rb +29 -2
- data/lib/bundler/cli/console.rb +1 -1
- data/lib/bundler/cli/doctor.rb +1 -1
- data/lib/bundler/cli/exec.rb +4 -4
- data/lib/bundler/cli/fund.rb +36 -0
- data/lib/bundler/cli/gem.rb +129 -28
- data/lib/bundler/cli/info.rb +15 -4
- data/lib/bundler/cli/init.rb +2 -2
- data/lib/bundler/cli/inject.rb +1 -1
- data/lib/bundler/cli/install.rb +13 -11
- data/lib/bundler/cli/issue.rb +2 -2
- data/lib/bundler/cli/list.rb +12 -10
- data/lib/bundler/cli/outdated.rb +88 -67
- data/lib/bundler/cli/plugin.rb +10 -0
- data/lib/bundler/cli/pristine.rb +5 -0
- data/lib/bundler/cli/show.rb +1 -1
- data/lib/bundler/cli/update.rb +3 -1
- data/lib/bundler/compact_index_client.rb +1 -1
- data/lib/bundler/compact_index_client/cache.rb +6 -14
- data/lib/bundler/compact_index_client/gem_parser.rb +28 -0
- data/lib/bundler/compact_index_client/updater.rb +13 -17
- data/lib/bundler/current_ruby.rb +1 -0
- data/lib/bundler/definition.rb +121 -131
- data/lib/bundler/dep_proxy.rb +16 -9
- data/lib/bundler/dependency.rb +3 -10
- data/lib/bundler/dsl.rb +40 -33
- data/lib/bundler/endpoint_specification.rb +1 -1
- data/lib/bundler/env.rb +1 -1
- data/lib/bundler/environment_preserver.rb +26 -2
- data/lib/bundler/errors.rb +1 -0
- data/lib/bundler/feature_flag.rb +0 -5
- data/lib/bundler/fetcher.rb +5 -4
- data/lib/bundler/fetcher/base.rb +1 -1
- data/lib/bundler/fetcher/compact_index.rb +1 -1
- data/lib/bundler/fetcher/downloader.rb +9 -5
- data/lib/bundler/fetcher/index.rb +3 -4
- data/lib/bundler/friendly_errors.rb +22 -13
- data/lib/bundler/gem_helper.rb +51 -18
- data/lib/bundler/gem_helpers.rb +36 -25
- data/lib/bundler/gem_version_promoter.rb +4 -4
- data/lib/bundler/graph.rb +1 -1
- data/lib/bundler/index.rb +12 -7
- data/lib/bundler/injector.rb +23 -5
- data/lib/bundler/inline.rb +3 -2
- data/lib/bundler/installer.rb +37 -49
- data/lib/bundler/installer/gem_installer.rb +3 -3
- data/lib/bundler/installer/parallel_installer.rb +46 -25
- data/lib/bundler/installer/standalone.rb +17 -2
- data/lib/bundler/lazy_specification.rb +45 -25
- data/lib/bundler/lockfile_generator.rb +1 -1
- data/lib/bundler/lockfile_parser.rb +4 -14
- data/lib/bundler/man/.document +1 -0
- data/{man → lib/bundler/man}/bundle-add.1 +1 -1
- data/{man/bundle-add.ronn → lib/bundler/man/bundle-add.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-binstubs.1 +5 -3
- data/{man/bundle-binstubs.ronn → lib/bundler/man/bundle-binstubs.1.ronn} +2 -4
- data/{man → lib/bundler/man}/bundle-cache.1 +1 -1
- data/{man/bundle-cache.ronn → lib/bundler/man/bundle-cache.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-check.1 +1 -1
- data/{man/bundle-check.ronn → lib/bundler/man/bundle-check.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-clean.1 +1 -1
- data/{man/bundle-clean.ronn → lib/bundler/man/bundle-clean.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-config.1 +42 -34
- data/{man/bundle-config.ronn → lib/bundler/man/bundle-config.1.ronn} +51 -43
- data/{man → lib/bundler/man}/bundle-doctor.1 +1 -1
- data/{man/bundle-doctor.ronn → lib/bundler/man/bundle-doctor.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-exec.1 +1 -1
- data/{man/bundle-exec.ronn → lib/bundler/man/bundle-exec.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-gem.1 +25 -3
- data/{man/bundle-gem.ronn → lib/bundler/man/bundle-gem.1.ronn} +30 -7
- data/{man → lib/bundler/man}/bundle-info.1 +1 -1
- data/{man/bundle-info.ronn → lib/bundler/man/bundle-info.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-init.1 +1 -1
- data/{man/bundle-init.ronn → lib/bundler/man/bundle-init.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-inject.1 +1 -1
- data/{man/bundle-inject.ronn → lib/bundler/man/bundle-inject.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-install.1 +30 -3
- data/{man/bundle-install.ronn → lib/bundler/man/bundle-install.1.ronn} +25 -3
- data/{man → lib/bundler/man}/bundle-list.1 +7 -7
- data/{man/bundle-list.ronn → lib/bundler/man/bundle-list.1.ronn} +6 -6
- data/{man → lib/bundler/man}/bundle-lock.1 +1 -1
- data/{man/bundle-lock.ronn → lib/bundler/man/bundle-lock.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-open.1 +1 -1
- data/{man/bundle-open.ronn → lib/bundler/man/bundle-open.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-outdated.1 +1 -1
- data/{man/bundle-outdated.ronn → lib/bundler/man/bundle-outdated.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-platform.1 +1 -1
- data/{man/bundle-platform.ronn → lib/bundler/man/bundle-platform.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-pristine.1 +1 -1
- data/{man/bundle-pristine.ronn → lib/bundler/man/bundle-pristine.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-remove.1 +1 -1
- data/{man/bundle-remove.ronn → lib/bundler/man/bundle-remove.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-show.1 +1 -1
- data/{man/bundle-show.ronn → lib/bundler/man/bundle-show.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-update.1 +1 -1
- data/{man/bundle-update.ronn → lib/bundler/man/bundle-update.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle-viz.1 +1 -1
- data/{man/bundle-viz.ronn → lib/bundler/man/bundle-viz.1.ronn} +0 -0
- data/{man → lib/bundler/man}/bundle.1 +1 -1
- data/{man/bundle.ronn → lib/bundler/man/bundle.1.ronn} +0 -0
- data/{man → lib/bundler/man}/gemfile.5 +4 -4
- data/{man → lib/bundler/man}/gemfile.5.ronn +4 -4
- data/{man → lib/bundler/man}/index.txt +0 -0
- data/lib/bundler/mirror.rb +2 -2
- data/lib/bundler/plugin.rb +33 -7
- data/lib/bundler/plugin/api/source.rb +8 -1
- data/lib/bundler/plugin/dsl.rb +1 -1
- data/lib/bundler/plugin/index.rb +10 -1
- data/lib/bundler/plugin/installer.rb +9 -11
- data/lib/bundler/plugin/installer/rubygems.rb +1 -1
- data/lib/bundler/plugin/source_list.rb +5 -1
- data/lib/bundler/psyched_yaml.rb +0 -15
- data/lib/bundler/remote_specification.rb +5 -2
- data/lib/bundler/resolver.rb +133 -77
- data/lib/bundler/resolver/spec_group.rb +75 -48
- data/lib/bundler/retry.rb +2 -2
- data/lib/bundler/ruby_version.rb +1 -1
- data/lib/bundler/rubygems_ext.rb +69 -9
- data/lib/bundler/rubygems_gem_installer.rb +50 -9
- data/lib/bundler/rubygems_integration.rb +25 -60
- data/lib/bundler/runtime.rb +4 -14
- data/lib/bundler/settings.rb +107 -54
- data/lib/bundler/shared_helpers.rb +3 -3
- data/lib/bundler/similarity_detector.rb +1 -1
- data/lib/bundler/source.rb +7 -1
- data/lib/bundler/source/git.rb +24 -22
- data/lib/bundler/source/git/git_proxy.rb +82 -80
- data/lib/bundler/source/metadata.rb +0 -4
- data/lib/bundler/source/path.rb +10 -4
- data/lib/bundler/source/path/installer.rb +10 -10
- data/lib/bundler/source/rubygems.rb +45 -24
- data/lib/bundler/source/rubygems/remote.rb +1 -1
- data/lib/bundler/source_list.rb +31 -26
- data/lib/bundler/spec_set.rb +29 -17
- data/lib/bundler/stub_specification.rb +25 -7
- data/lib/bundler/templates/Gemfile +1 -1
- data/lib/bundler/templates/gems.rb +1 -1
- data/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +57 -47
- data/lib/bundler/templates/newgem/Gemfile.tt +9 -1
- data/lib/bundler/templates/newgem/README.md.tt +6 -5
- data/lib/bundler/templates/newgem/Rakefile.tt +19 -5
- data/lib/bundler/templates/newgem/bin/console.tt +1 -0
- data/lib/bundler/templates/newgem/circleci/config.yml.tt +13 -0
- data/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +2 -0
- data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +16 -0
- data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +4 -2
- data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +2 -0
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +15 -7
- data/lib/bundler/templates/newgem/rubocop.yml.tt +13 -0
- data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +2 -0
- data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +2 -1
- data/lib/bundler/templates/newgem/test/{newgem_test.rb.tt → minitest/newgem_test.rb.tt} +2 -0
- data/lib/bundler/templates/newgem/test/{test_helper.rb.tt → minitest/test_helper.rb.tt} +2 -0
- data/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +15 -0
- data/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +6 -0
- data/lib/bundler/ui/shell.rb +5 -5
- data/lib/bundler/uri_credentials_filter.rb +3 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo.rb +0 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +7 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +34 -2
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +2 -2
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +11 -5
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +3 -3
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +1 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +12 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +49 -47
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +82 -189
- data/lib/bundler/vendor/thor/lib/thor.rb +5 -13
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +2 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +4 -2
- data/lib/bundler/vendor/thor/lib/thor/base.rb +9 -0
- data/lib/bundler/vendor/thor/lib/thor/error.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +5 -1
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +9 -8
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +5 -2
- data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +5 -1
- data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +154 -0
- data/lib/bundler/vendored_persistent.rb +0 -7
- data/lib/bundler/vendored_tmpdir.rb +4 -0
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/worker.rb +1 -1
- data/lib/bundler/yaml_serializer.rb +1 -1
- metadata +71 -85
- data/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb +0 -26
- data/man/bundle-add.1.txt +0 -58
- data/man/bundle-binstubs.1.txt +0 -48
- data/man/bundle-cache.1.txt +0 -78
- data/man/bundle-check.1.txt +0 -33
- data/man/bundle-clean.1.txt +0 -26
- data/man/bundle-config.1.txt +0 -528
- data/man/bundle-doctor.1.txt +0 -44
- data/man/bundle-exec.1.txt +0 -178
- data/man/bundle-gem.1.txt +0 -91
- data/man/bundle-info.1.txt +0 -21
- data/man/bundle-init.1.txt +0 -34
- data/man/bundle-inject.1.txt +0 -32
- data/man/bundle-install.1.txt +0 -401
- data/man/bundle-list.1.txt +0 -43
- data/man/bundle-lock.1.txt +0 -93
- data/man/bundle-open.1.txt +0 -29
- data/man/bundle-outdated.1.txt +0 -131
- data/man/bundle-platform.1.txt +0 -57
- data/man/bundle-pristine.1.txt +0 -44
- data/man/bundle-remove.1.txt +0 -34
- data/man/bundle-show.1.txt +0 -27
- data/man/bundle-update.1.txt +0 -390
- data/man/bundle-viz.1.txt +0 -39
- data/man/bundle.1.txt +0 -116
- data/man/gemfile.5.txt +0 -649
data/lib/bundler/source_list.rb
CHANGED
@@ -1,30 +1,44 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "set"
|
4
|
-
|
5
3
|
module Bundler
|
6
4
|
class SourceList
|
7
5
|
attr_reader :path_sources,
|
8
6
|
:git_sources,
|
9
7
|
:plugin_sources,
|
10
|
-
:
|
8
|
+
:global_path_source,
|
11
9
|
:metadata_source
|
12
10
|
|
11
|
+
def global_rubygems_source
|
12
|
+
@global_rubygems_source ||= rubygems_aggregate_class.new("allow_local" => true)
|
13
|
+
end
|
14
|
+
|
13
15
|
def initialize
|
14
16
|
@path_sources = []
|
15
17
|
@git_sources = []
|
16
18
|
@plugin_sources = []
|
17
19
|
@global_rubygems_source = nil
|
18
|
-
@
|
20
|
+
@global_path_source = nil
|
19
21
|
@rubygems_sources = []
|
20
22
|
@metadata_source = Source::Metadata.new
|
23
|
+
|
24
|
+
@disable_multisource = true
|
25
|
+
end
|
26
|
+
|
27
|
+
def disable_multisource?
|
28
|
+
@disable_multisource
|
29
|
+
end
|
30
|
+
|
31
|
+
def merged_gem_lockfile_sections!
|
32
|
+
@disable_multisource = false
|
21
33
|
end
|
22
34
|
|
23
35
|
def add_path_source(options = {})
|
24
36
|
if options["gemspec"]
|
25
37
|
add_source_to_list Source::Gemspec.new(options), path_sources
|
26
38
|
else
|
27
|
-
add_source_to_list Source::Path.new(options), path_sources
|
39
|
+
path_source = add_source_to_list Source::Path.new(options), path_sources
|
40
|
+
@global_path_source ||= path_source if options["global"]
|
41
|
+
path_source
|
28
42
|
end
|
29
43
|
end
|
30
44
|
|
@@ -43,24 +57,20 @@ module Bundler
|
|
43
57
|
end
|
44
58
|
|
45
59
|
def global_rubygems_source=(uri)
|
46
|
-
|
47
|
-
@global_rubygems_source ||= rubygems_aggregate_class.new("remotes" => uri)
|
48
|
-
end
|
49
|
-
add_rubygems_remote(uri)
|
60
|
+
@global_rubygems_source ||= rubygems_aggregate_class.new("remotes" => uri, "allow_local" => true)
|
50
61
|
end
|
51
62
|
|
52
63
|
def add_rubygems_remote(uri)
|
53
|
-
|
54
|
-
|
55
|
-
@rubygems_aggregate
|
64
|
+
global_rubygems_source.add_remote(uri)
|
65
|
+
global_rubygems_source
|
56
66
|
end
|
57
67
|
|
58
68
|
def default_source
|
59
|
-
|
69
|
+
global_path_source || global_rubygems_source
|
60
70
|
end
|
61
71
|
|
62
72
|
def rubygems_sources
|
63
|
-
@rubygems_sources + [
|
73
|
+
@rubygems_sources + [global_rubygems_source]
|
64
74
|
end
|
65
75
|
|
66
76
|
def rubygems_remotes
|
@@ -77,8 +87,8 @@ module Bundler
|
|
77
87
|
|
78
88
|
def lock_sources
|
79
89
|
lock_sources = (path_sources + git_sources + plugin_sources).sort_by(&:to_s)
|
80
|
-
if
|
81
|
-
lock_sources + rubygems_sources.sort_by(&:to_s)
|
90
|
+
if disable_multisource?
|
91
|
+
lock_sources + rubygems_sources.sort_by(&:to_s).uniq
|
82
92
|
else
|
83
93
|
lock_sources << combine_rubygems_sources
|
84
94
|
end
|
@@ -94,12 +104,11 @@ module Bundler
|
|
94
104
|
end
|
95
105
|
end
|
96
106
|
|
97
|
-
replacement_rubygems = !
|
107
|
+
replacement_rubygems = !disable_multisource? &&
|
98
108
|
replacement_sources.detect {|s| s.is_a?(Source::Rubygems) }
|
99
|
-
@
|
109
|
+
@global_rubygems_source = replacement_rubygems if replacement_rubygems
|
100
110
|
|
101
111
|
return true if !equal_sources?(lock_sources, replacement_sources) && !equivalent_sources?(lock_sources, replacement_sources)
|
102
|
-
return true if replacement_rubygems && rubygems_remotes.to_set != replacement_rubygems.remotes.to_set
|
103
112
|
|
104
113
|
false
|
105
114
|
end
|
@@ -112,11 +121,7 @@ module Bundler
|
|
112
121
|
all_sources.each(&:remote!)
|
113
122
|
end
|
114
123
|
|
115
|
-
|
116
|
-
@rubygems_aggregate.remotes
|
117
|
-
end
|
118
|
-
|
119
|
-
private
|
124
|
+
private
|
120
125
|
|
121
126
|
def rubygems_aggregate_class
|
122
127
|
Source::Rubygems
|
@@ -147,13 +152,13 @@ module Bundler
|
|
147
152
|
if source.uri =~ /^git\:/
|
148
153
|
Bundler.ui.warn "The git source `#{source.uri}` uses the `git` protocol, " \
|
149
154
|
"which transmits data without encryption. Disable this warning with " \
|
150
|
-
"`bundle config set git.allow_insecure true`, or switch to the `https` " \
|
155
|
+
"`bundle config set --local git.allow_insecure true`, or switch to the `https` " \
|
151
156
|
"protocol to keep your data secure."
|
152
157
|
end
|
153
158
|
end
|
154
159
|
|
155
160
|
def equal_sources?(lock_sources, replacement_sources)
|
156
|
-
lock_sources.
|
161
|
+
lock_sources.sort_by(&:to_s) == replacement_sources.sort_by(&:to_s)
|
157
162
|
end
|
158
163
|
|
159
164
|
def equal_source?(source, other_source)
|
data/lib/bundler/spec_set.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "tsort"
|
4
|
-
require "set"
|
5
4
|
|
6
5
|
module Bundler
|
7
6
|
class SpecSet
|
@@ -13,21 +12,24 @@ module Bundler
|
|
13
12
|
end
|
14
13
|
|
15
14
|
def for(dependencies, skip = [], check = false, match_current_platform = false, raise_on_missing = true)
|
16
|
-
handled =
|
15
|
+
handled = []
|
17
16
|
deps = dependencies.dup
|
18
17
|
specs = []
|
19
18
|
skip += ["bundler"]
|
20
19
|
|
21
20
|
loop do
|
22
21
|
break unless dep = deps.shift
|
23
|
-
next if
|
22
|
+
next if handled.include?(dep) || skip.include?(dep.name)
|
24
23
|
|
25
|
-
|
26
|
-
specs << spec
|
24
|
+
handled << dep
|
27
25
|
|
28
|
-
|
26
|
+
specs_for_dep = spec_for_dependency(dep, match_current_platform)
|
27
|
+
if specs_for_dep.any?
|
28
|
+
specs += specs_for_dep
|
29
|
+
|
30
|
+
specs_for_dep.first.dependencies.each do |d|
|
29
31
|
next if d.type == :development
|
30
|
-
d = DepProxy.
|
32
|
+
d = DepProxy.get_proxy(d, dep.__platform) unless match_current_platform
|
31
33
|
deps << d
|
32
34
|
end
|
33
35
|
elsif check
|
@@ -76,10 +78,17 @@ module Bundler
|
|
76
78
|
|
77
79
|
def materialize(deps, missing_specs = nil)
|
78
80
|
materialized = self.for(deps, [], false, true, !missing_specs).to_a
|
79
|
-
|
81
|
+
|
82
|
+
materialized.group_by(&:source).each do |source, specs|
|
83
|
+
next unless specs.any?{|s| s.is_a?(LazySpecification) }
|
84
|
+
|
85
|
+
source.local!
|
86
|
+
names = -> { specs.map(&:name).uniq }
|
87
|
+
source.double_check_for(names)
|
88
|
+
end
|
89
|
+
|
80
90
|
materialized.map! do |s|
|
81
91
|
next s unless s.is_a?(LazySpecification)
|
82
|
-
s.source.dependency_names = deps if s.source.respond_to?(:dependency_names=)
|
83
92
|
spec = s.__materialize__
|
84
93
|
unless spec
|
85
94
|
unless missing_specs
|
@@ -96,10 +105,17 @@ module Bundler
|
|
96
105
|
# This is in contrast to how for does platform filtering (and specifically different from how `materialize` calls `for` only for the current platform)
|
97
106
|
# @return [Array<Gem::Specification>]
|
98
107
|
def materialized_for_all_platforms
|
99
|
-
|
108
|
+
@specs.group_by(&:source).each do |source, specs|
|
109
|
+
next unless specs.any?{|s| s.is_a?(LazySpecification) }
|
110
|
+
|
111
|
+
source.local!
|
112
|
+
source.remote!
|
113
|
+
names = -> { specs.map(&:name).uniq }
|
114
|
+
source.double_check_for(names)
|
115
|
+
end
|
116
|
+
|
100
117
|
@specs.map do |s|
|
101
118
|
next s unless s.is_a?(LazySpecification)
|
102
|
-
s.source.dependency_names = names if s.source.respond_to?(:dependency_names=)
|
103
119
|
spec = s.__materialize__
|
104
120
|
raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec
|
105
121
|
spec
|
@@ -147,7 +163,7 @@ module Bundler
|
|
147
163
|
sorted.each(&b)
|
148
164
|
end
|
149
165
|
|
150
|
-
|
166
|
+
private
|
151
167
|
|
152
168
|
def sorted
|
153
169
|
rake = @specs.find {|s| s.name == "rake" }
|
@@ -183,11 +199,7 @@ module Bundler
|
|
183
199
|
def spec_for_dependency(dep, match_current_platform)
|
184
200
|
specs_for_platforms = lookup[dep.name]
|
185
201
|
if match_current_platform
|
186
|
-
Bundler.
|
187
|
-
match = GemHelpers.select_best_platform_match(specs_for_platforms, pl)
|
188
|
-
return match if match
|
189
|
-
end
|
190
|
-
nil
|
202
|
+
GemHelpers.select_best_platform_match(specs_for_platforms, Bundler.local_platform)
|
191
203
|
else
|
192
204
|
GemHelpers.select_best_platform_match(specs_for_platforms, dep.__platform)
|
193
205
|
end
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "remote_specification"
|
4
|
-
|
5
3
|
module Bundler
|
6
4
|
class StubSpecification < RemoteSpecification
|
7
5
|
def self.from_stub(stub)
|
@@ -28,9 +26,21 @@ module Bundler
|
|
28
26
|
|
29
27
|
# @!group Stub Delegates
|
30
28
|
|
31
|
-
|
29
|
+
def manually_installed?
|
30
|
+
# This is for manually installed gems which are gems that were fixed in place after a
|
31
|
+
# failed installation. Once the issue was resolved, the user then manually created
|
32
|
+
# the gem specification using the instructions provided by `gem help install`
|
33
|
+
installed_by_version == Gem::Version.new(0)
|
34
|
+
end
|
35
|
+
|
36
|
+
# This is defined directly to avoid having to loading the full spec
|
32
37
|
def missing_extensions?
|
33
|
-
|
38
|
+
return false if default_gem?
|
39
|
+
return false if extensions.empty?
|
40
|
+
return false if File.exist? gem_build_complete_path
|
41
|
+
return false if manually_installed?
|
42
|
+
|
43
|
+
true
|
34
44
|
end
|
35
45
|
|
36
46
|
def activated
|
@@ -41,8 +51,16 @@ module Bundler
|
|
41
51
|
stub.instance_variable_set(:@activated, activated)
|
42
52
|
end
|
43
53
|
|
44
|
-
def
|
45
|
-
stub.
|
54
|
+
def extensions
|
55
|
+
stub.extensions
|
56
|
+
end
|
57
|
+
|
58
|
+
def gem_build_complete_path
|
59
|
+
File.join(extension_dir, "gem.build_complete")
|
60
|
+
end
|
61
|
+
|
62
|
+
def default_gem?
|
63
|
+
stub.default_gem?
|
46
64
|
end
|
47
65
|
|
48
66
|
def full_gem_path
|
@@ -71,7 +89,7 @@ module Bundler
|
|
71
89
|
stub.raw_require_paths
|
72
90
|
end
|
73
91
|
|
74
|
-
|
92
|
+
private
|
75
93
|
|
76
94
|
def _remote_specification
|
77
95
|
@_remote_specification ||= begin
|
@@ -2,73 +2,83 @@
|
|
2
2
|
|
3
3
|
## Our Pledge
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
11
8
|
|
12
9
|
## Our Standards
|
13
10
|
|
14
|
-
Examples of behavior that contributes to
|
15
|
-
include:
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
16
12
|
|
17
|
-
*
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
22
18
|
|
23
|
-
Examples of unacceptable behavior
|
19
|
+
Examples of unacceptable behavior include:
|
24
20
|
|
25
|
-
* The use of sexualized language or imagery and
|
26
|
-
advances
|
27
|
-
* Trolling, insulting
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
28
24
|
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or
|
30
|
-
address, without explicit permission
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
31
27
|
* Other conduct which could reasonably be considered inappropriate in a
|
32
28
|
professional setting
|
33
29
|
|
34
|
-
##
|
30
|
+
## Enforcement Responsibilities
|
35
31
|
|
36
|
-
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
39
33
|
|
40
|
-
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
45
35
|
|
46
36
|
## Scope
|
47
37
|
|
48
|
-
This Code of Conduct applies
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
54
39
|
|
55
40
|
## Enforcement
|
56
41
|
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at <%= config[:email] %>. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
63
59
|
|
64
|
-
|
65
|
-
|
66
|
-
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
67
73
|
|
68
74
|
## Attribution
|
69
75
|
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version
|
71
|
-
available at
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
72
82
|
|
73
|
-
|
74
|
-
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|