bundler 2.1.4 → 2.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2164 -1430
- data/README.md +7 -9
- data/bundler.gemspec +5 -6
- data/exe/bundle +10 -8
- data/exe/bundler +1 -1
- data/lib/bundler/.document +1 -0
- data/lib/bundler/build_metadata.rb +3 -11
- data/lib/bundler/cli/add.rb +1 -1
- data/lib/bundler/cli/binstubs.rb +6 -2
- data/lib/bundler/cli/cache.rb +3 -8
- data/lib/bundler/cli/check.rb +4 -2
- data/lib/bundler/cli/clean.rb +1 -1
- data/lib/bundler/cli/common.rb +30 -3
- data/lib/bundler/cli/config.rb +10 -1
- data/lib/bundler/cli/console.rb +1 -1
- data/lib/bundler/cli/doctor.rb +25 -6
- data/lib/bundler/cli/exec.rb +5 -10
- data/lib/bundler/cli/fund.rb +36 -0
- data/lib/bundler/cli/gem.rb +219 -28
- data/lib/bundler/cli/info.rb +38 -6
- data/lib/bundler/cli/init.rb +3 -3
- data/lib/bundler/cli/inject.rb +1 -1
- data/lib/bundler/cli/install.rb +20 -52
- data/lib/bundler/cli/issue.rb +5 -4
- data/lib/bundler/cli/list.rb +19 -11
- data/lib/bundler/cli/lock.rb +5 -1
- data/lib/bundler/cli/open.rb +1 -2
- data/lib/bundler/cli/outdated.rb +95 -75
- data/lib/bundler/cli/platform.rb +1 -1
- data/lib/bundler/cli/plugin.rb +10 -0
- data/lib/bundler/cli/pristine.rb +5 -0
- data/lib/bundler/cli/remove.rb +1 -2
- data/lib/bundler/cli/show.rb +2 -2
- data/lib/bundler/cli/update.rb +20 -9
- data/lib/bundler/cli.rb +101 -81
- data/lib/bundler/compact_index_client/cache.rb +6 -23
- data/lib/bundler/compact_index_client/gem_parser.rb +28 -0
- data/lib/bundler/compact_index_client/updater.rb +13 -22
- data/lib/bundler/compact_index_client.rb +3 -9
- data/lib/bundler/current_ruby.rb +6 -4
- data/lib/bundler/definition.rb +201 -385
- data/lib/bundler/dep_proxy.rb +16 -9
- data/lib/bundler/dependency.rb +23 -14
- data/lib/bundler/digest.rb +71 -0
- data/lib/bundler/dsl.rb +71 -74
- data/lib/bundler/endpoint_specification.rb +22 -12
- data/lib/bundler/env.rb +2 -2
- data/lib/bundler/environment_preserver.rb +29 -2
- data/lib/bundler/errors.rb +20 -3
- data/lib/bundler/feature_flag.rb +0 -8
- data/lib/bundler/fetcher/base.rb +1 -1
- data/lib/bundler/fetcher/compact_index.rb +11 -16
- data/lib/bundler/fetcher/downloader.rb +10 -7
- data/lib/bundler/fetcher/index.rb +2 -30
- data/lib/bundler/fetcher.rb +18 -23
- data/lib/bundler/friendly_errors.rb +25 -43
- data/lib/bundler/gem_helper.rb +53 -31
- 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 +9 -9
- data/lib/bundler/injector.rb +33 -6
- data/lib/bundler/inline.rb +3 -2
- data/lib/bundler/installer/gem_installer.rb +7 -25
- data/lib/bundler/installer/parallel_installer.rb +46 -25
- data/lib/bundler/installer/standalone.rb +30 -10
- data/lib/bundler/installer.rb +36 -59
- data/lib/bundler/lazy_specification.rb +62 -26
- data/lib/bundler/lockfile_generator.rb +2 -2
- data/lib/bundler/lockfile_parser.rb +17 -46
- data/lib/bundler/man/.document +1 -0
- data/{man → lib/bundler/man}/bundle-add.1 +10 -2
- data/{man/bundle-add.ronn → lib/bundler/man/bundle-add.1.ronn} +7 -1
- 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 → lib/bundler/man}/bundle-check.1 +1 -1
- data/{man → lib/bundler/man}/bundle-clean.1 +1 -1
- data/{man → lib/bundler/man}/bundle-config.1 +44 -45
- data/{man/bundle-config.ronn → lib/bundler/man/bundle-config.1.ronn} +59 -60
- data/{man → lib/bundler/man}/bundle-doctor.1 +1 -1
- data/{man → lib/bundler/man}/bundle-exec.1 +1 -1
- data/{man → lib/bundler/man}/bundle-gem.1 +38 -3
- data/{man/bundle-gem.ronn → lib/bundler/man/bundle-gem.1.ronn} +46 -7
- data/{man → lib/bundler/man}/bundle-info.1 +1 -1
- data/{man → lib/bundler/man}/bundle-init.1 +1 -1
- data/{man → lib/bundler/man}/bundle-inject.1 +1 -1
- data/{man → lib/bundler/man}/bundle-install.1 +31 -4
- data/{man/bundle-install.ronn → lib/bundler/man/bundle-install.1.ronn} +27 -5
- 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 → lib/bundler/man}/bundle-open.1 +1 -1
- data/{man → lib/bundler/man}/bundle-outdated.1 +3 -10
- data/{man/bundle-outdated.ronn → lib/bundler/man/bundle-outdated.1.ronn} +1 -10
- data/{man → lib/bundler/man}/bundle-platform.1 +1 -1
- data/{man → lib/bundler/man}/bundle-pristine.1 +1 -1
- data/{man → lib/bundler/man}/bundle-remove.1 +1 -1
- data/{man → lib/bundler/man}/bundle-show.1 +1 -1
- data/{man → lib/bundler/man}/bundle-update.1 +5 -5
- data/{man/bundle-update.ronn → lib/bundler/man/bundle-update.1.ronn} +5 -4
- data/{man → lib/bundler/man}/bundle-viz.1 +1 -1
- data/{man → lib/bundler/man}/bundle.1 +1 -1
- data/{man → lib/bundler/man}/gemfile.5 +31 -5
- data/{man → lib/bundler/man}/gemfile.5.ronn +13 -5
- data/lib/bundler/mirror.rb +2 -2
- data/lib/bundler/plugin/api/source.rb +23 -7
- data/lib/bundler/plugin/dsl.rb +1 -1
- data/lib/bundler/plugin/index.rb +13 -1
- data/lib/bundler/plugin/installer/rubygems.rb +1 -1
- data/lib/bundler/plugin/installer.rb +11 -11
- data/lib/bundler/plugin/source_list.rb +5 -1
- data/lib/bundler/plugin.rb +56 -11
- data/lib/bundler/process_lock.rb +1 -1
- data/lib/bundler/remote_specification.rb +12 -2
- data/lib/bundler/resolver/spec_group.rb +58 -55
- data/lib/bundler/resolver.rb +176 -177
- data/lib/bundler/retry.rb +2 -2
- data/lib/bundler/ruby_version.rb +2 -15
- data/lib/bundler/rubygems_ext.rb +137 -28
- data/lib/bundler/rubygems_gem_installer.rb +69 -8
- data/lib/bundler/rubygems_integration.rb +69 -133
- data/lib/bundler/runtime.rb +22 -25
- data/lib/bundler/self_manager.rb +168 -0
- data/lib/bundler/settings.rb +144 -65
- data/lib/bundler/setup.rb +2 -2
- data/lib/bundler/shared_helpers.rb +12 -27
- data/lib/bundler/similarity_detector.rb +1 -1
- data/lib/bundler/source/git/git_proxy.rb +88 -84
- data/lib/bundler/source/git.rb +43 -23
- data/lib/bundler/source/metadata.rb +3 -7
- data/lib/bundler/source/path/installer.rb +10 -10
- data/lib/bundler/source/path.rb +10 -4
- data/lib/bundler/source/rubygems/remote.rb +1 -1
- data/lib/bundler/source/rubygems.rb +126 -116
- data/lib/bundler/source/rubygems_aggregate.rb +68 -0
- data/lib/bundler/source.rb +22 -1
- data/lib/bundler/source_list.rb +101 -63
- data/lib/bundler/source_map.rb +71 -0
- data/lib/bundler/spec_set.rb +26 -41
- data/lib/bundler/stub_specification.rb +25 -7
- data/lib/bundler/templates/Executable +2 -4
- data/lib/bundler/templates/Executable.bundler +8 -8
- data/lib/bundler/templates/Executable.standalone +2 -4
- data/lib/bundler/templates/Gemfile +0 -2
- data/lib/bundler/templates/gems.rb +0 -3
- 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 +12 -1
- data/lib/bundler/templates/newgem/README.md.tt +9 -14
- data/lib/bundler/templates/newgem/Rakefile.tt +32 -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 +27 -0
- data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
- data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +2 -0
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +4 -2
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +27 -17
- data/lib/bundler/templates/newgem/rubocop.yml.tt +13 -0
- data/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -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/standard.yml.tt +3 -0
- data/lib/bundler/templates/newgem/test/{test_helper.rb.tt → minitest/test_helper.rb.tt} +2 -0
- data/lib/bundler/templates/newgem/test/{newgem_test.rb.tt → minitest/test_newgem.rb.tt} +3 -1
- 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 +6 -6
- data/lib/bundler/uri_credentials_filter.rb +3 -1
- data/lib/bundler/vendor/.document +1 -0
- data/lib/bundler/vendor/connection_pool/LICENSE +20 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +19 -21
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +57 -0
- data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +39 -74
- data/lib/bundler/vendor/fileutils/LICENSE.txt +22 -0
- data/lib/bundler/vendor/molinillo/LICENSE +9 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +7 -0
- 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/dependency_graph.rb +37 -5
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +34 -28
- 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/molinillo/lib/molinillo.rb +0 -1
- data/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
- data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +82 -189
- data/lib/bundler/vendor/thor/LICENSE.md +20 -0
- data/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +2 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +9 -7
- data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +1 -2
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +7 -3
- data/lib/bundler/vendor/thor/lib/thor/base.rb +9 -0
- data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +6 -0
- data/lib/bundler/vendor/thor/lib/thor/error.rb +10 -5
- data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +5 -1
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +28 -9
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +27 -6
- data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +5 -1
- data/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/util.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor.rb +5 -13
- data/lib/bundler/vendor/tmpdir/lib/tmpdir.rb +154 -0
- data/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
- data/lib/bundler/vendor/tsort/lib/tsort.rb +452 -0
- data/lib/bundler/vendor/uri/LICENSE.txt +22 -0
- data/lib/bundler/vendor/uri/lib/uri/common.rb +17 -80
- data/lib/bundler/vendor/uri/lib/uri/ftp.rb +0 -1
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +5 -6
- data/lib/bundler/vendor/uri/lib/uri/http.rb +0 -1
- data/lib/bundler/vendor/uri/lib/uri/https.rb +0 -1
- data/lib/bundler/vendor/uri/lib/uri/ldap.rb +1 -1
- data/lib/bundler/vendor/uri/lib/uri/mailto.rb +0 -1
- data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +1 -14
- data/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +1 -12
- data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/bundler/vendor/uri/lib/uri/ws.rb +84 -0
- data/lib/bundler/vendor/uri/lib/uri/wss.rb +22 -0
- data/lib/bundler/vendor/uri/lib/uri.rb +0 -1
- data/lib/bundler/vendored_persistent.rb +0 -7
- data/lib/bundler/vendored_tmpdir.rb +4 -0
- data/lib/bundler/vendored_tsort.rb +4 -0
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/worker.rb +20 -5
- data/lib/bundler/yaml_serializer.rb +1 -1
- data/lib/bundler.rb +64 -43
- metadata +94 -91
- data/lib/bundler/gemdeps.rb +0 -29
- data/lib/bundler/psyched_yaml.rb +0 -37
- data/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb +0 -66
- 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/{man/bundle-cache.ronn → lib/bundler/man/bundle-cache.1.ronn} +0 -0
- /data/{man/bundle-check.ronn → lib/bundler/man/bundle-check.1.ronn} +0 -0
- /data/{man/bundle-clean.ronn → lib/bundler/man/bundle-clean.1.ronn} +0 -0
- /data/{man/bundle-doctor.ronn → lib/bundler/man/bundle-doctor.1.ronn} +0 -0
- /data/{man/bundle-exec.ronn → lib/bundler/man/bundle-exec.1.ronn} +0 -0
- /data/{man/bundle-info.ronn → lib/bundler/man/bundle-info.1.ronn} +0 -0
- /data/{man/bundle-init.ronn → lib/bundler/man/bundle-init.1.ronn} +0 -0
- /data/{man/bundle-inject.ronn → lib/bundler/man/bundle-inject.1.ronn} +0 -0
- /data/{man/bundle-lock.ronn → lib/bundler/man/bundle-lock.1.ronn} +0 -0
- /data/{man/bundle-open.ronn → lib/bundler/man/bundle-open.1.ronn} +0 -0
- /data/{man/bundle-platform.ronn → lib/bundler/man/bundle-platform.1.ronn} +0 -0
- /data/{man/bundle-pristine.ronn → lib/bundler/man/bundle-pristine.1.ronn} +0 -0
- /data/{man/bundle-remove.ronn → lib/bundler/man/bundle-remove.1.ronn} +0 -0
- /data/{man/bundle-show.ronn → lib/bundler/man/bundle-show.1.ronn} +0 -0
- /data/{man/bundle-viz.ronn → lib/bundler/man/bundle-viz.1.ronn} +0 -0
- /data/{man/bundle.ronn → lib/bundler/man/bundle.1.ronn} +0 -0
- /data/{man → lib/bundler/man}/index.txt +0 -0
data/lib/bundler/cli/gem.rb
CHANGED
@@ -12,6 +12,7 @@ module Bundler
|
|
12
12
|
TEST_FRAMEWORK_VERSIONS = {
|
13
13
|
"rspec" => "3.0",
|
14
14
|
"minitest" => "5.0",
|
15
|
+
"test-unit" => "3.0",
|
15
16
|
}.freeze
|
16
17
|
|
17
18
|
attr_reader :options, :gem_name, :thor, :name, :target
|
@@ -37,12 +38,21 @@ module Bundler
|
|
37
38
|
namespaced_path = name.tr("-", "/")
|
38
39
|
constant_name = name.gsub(/-[_-]*(?![_-]|$)/) { "::" }.gsub(/([_-]+|(::)|^)(.|$)/) { $2.to_s + $3.upcase }
|
39
40
|
constant_array = constant_name.split("::")
|
41
|
+
minitest_constant_name = constant_array.clone.tap {|a| a[-1] = "Test#{a[-1]}" }.join("::") # Foo::Bar => Foo::TestBar
|
40
42
|
|
41
|
-
|
43
|
+
use_git = Bundler.git_present? && options[:git]
|
42
44
|
|
43
|
-
git_author_name =
|
44
|
-
|
45
|
-
git_user_email =
|
45
|
+
git_author_name = use_git ? `git config user.name`.chomp : ""
|
46
|
+
git_username = use_git ? `git config github.user`.chomp : ""
|
47
|
+
git_user_email = use_git ? `git config user.email`.chomp : ""
|
48
|
+
|
49
|
+
github_username = if options[:github_username].nil?
|
50
|
+
git_username
|
51
|
+
elsif options[:github_username] == false
|
52
|
+
""
|
53
|
+
else
|
54
|
+
options[:github_username]
|
55
|
+
end
|
46
56
|
|
47
57
|
config = {
|
48
58
|
:name => name,
|
@@ -57,14 +67,18 @@ module Bundler
|
|
57
67
|
:ext => options[:ext],
|
58
68
|
:exe => options[:exe],
|
59
69
|
:bundler_version => bundler_dependency_version,
|
70
|
+
:git => use_git,
|
60
71
|
:github_username => github_username.empty? ? "[USERNAME]" : github_username,
|
72
|
+
:required_ruby_version => required_ruby_version,
|
73
|
+
:minitest_constant_name => minitest_constant_name,
|
61
74
|
}
|
62
75
|
ensure_safe_gem_name(name, constant_array)
|
63
76
|
|
64
77
|
templates = {
|
65
|
-
"
|
78
|
+
"#{Bundler.preferred_gemfile_name}.tt" => Bundler.preferred_gemfile_name,
|
66
79
|
"lib/newgem.rb.tt" => "lib/#{namespaced_path}.rb",
|
67
80
|
"lib/newgem/version.rb.tt" => "lib/#{namespaced_path}/version.rb",
|
81
|
+
"sig/newgem.rbs.tt" => "sig/#{namespaced_path}.rbs",
|
68
82
|
"newgem.gemspec.tt" => "#{name}.gemspec",
|
69
83
|
"Rakefile.tt" => "Rakefile",
|
70
84
|
"README.md.tt" => "README.md",
|
@@ -77,14 +91,12 @@ module Bundler
|
|
77
91
|
bin/setup
|
78
92
|
]
|
79
93
|
|
80
|
-
templates.merge!("gitignore.tt" => ".gitignore") if
|
94
|
+
templates.merge!("gitignore.tt" => ".gitignore") if use_git
|
81
95
|
|
82
96
|
if test_framework = ask_and_set_test_framework
|
83
97
|
config[:test] = test_framework
|
84
98
|
config[:test_framework_version] = TEST_FRAMEWORK_VERSIONS[test_framework]
|
85
99
|
|
86
|
-
templates.merge!("travis.yml.tt" => ".travis.yml")
|
87
|
-
|
88
100
|
case test_framework
|
89
101
|
when "rspec"
|
90
102
|
templates.merge!(
|
@@ -92,15 +104,41 @@ module Bundler
|
|
92
104
|
"spec/spec_helper.rb.tt" => "spec/spec_helper.rb",
|
93
105
|
"spec/newgem_spec.rb.tt" => "spec/#{namespaced_path}_spec.rb"
|
94
106
|
)
|
107
|
+
config[:test_task] = :spec
|
95
108
|
when "minitest"
|
109
|
+
# Generate path for minitest target file (FileList["test/**/test_*.rb"])
|
110
|
+
# foo => test/test_foo.rb
|
111
|
+
# foo-bar => test/foo/test_bar.rb
|
112
|
+
# foo_bar => test/test_foo_bar.rb
|
113
|
+
paths = namespaced_path.rpartition("/")
|
114
|
+
paths[2] = "test_#{paths[2]}"
|
115
|
+
minitest_namespaced_path = paths.join("")
|
116
|
+
|
117
|
+
templates.merge!(
|
118
|
+
"test/minitest/test_helper.rb.tt" => "test/test_helper.rb",
|
119
|
+
"test/minitest/test_newgem.rb.tt" => "test/#{minitest_namespaced_path}.rb"
|
120
|
+
)
|
121
|
+
config[:test_task] = :test
|
122
|
+
when "test-unit"
|
96
123
|
templates.merge!(
|
97
|
-
"test/test_helper.rb.tt" => "test/test_helper.rb",
|
98
|
-
"test/newgem_test.rb.tt" => "test/#{namespaced_path}_test.rb"
|
124
|
+
"test/test-unit/test_helper.rb.tt" => "test/test_helper.rb",
|
125
|
+
"test/test-unit/newgem_test.rb.tt" => "test/#{namespaced_path}_test.rb"
|
99
126
|
)
|
127
|
+
config[:test_task] = :test
|
100
128
|
end
|
101
129
|
end
|
102
130
|
|
103
|
-
config[:
|
131
|
+
config[:ci] = ask_and_set_ci
|
132
|
+
case config[:ci]
|
133
|
+
when "github"
|
134
|
+
templates.merge!("github/workflows/main.yml.tt" => ".github/workflows/main.yml")
|
135
|
+
when "travis"
|
136
|
+
templates.merge!("travis.yml.tt" => ".travis.yml")
|
137
|
+
when "gitlab"
|
138
|
+
templates.merge!("gitlab-ci.yml.tt" => ".gitlab-ci.yml")
|
139
|
+
when "circle"
|
140
|
+
templates.merge!("circleci/config.yml.tt" => ".circleci/config.yml")
|
141
|
+
end
|
104
142
|
|
105
143
|
if ask_and_set(:mit, "Do you want to license your code permissively under the MIT license?",
|
106
144
|
"This means that any other developer or company will be legally allowed to use your code " \
|
@@ -124,6 +162,30 @@ module Bundler
|
|
124
162
|
templates.merge!("CODE_OF_CONDUCT.md.tt" => "CODE_OF_CONDUCT.md")
|
125
163
|
end
|
126
164
|
|
165
|
+
if ask_and_set(:changelog, "Do you want to include a changelog?",
|
166
|
+
"A changelog is a file which contains a curated, chronologically ordered list of notable " \
|
167
|
+
"changes for each version of a project. To make it easier for users and contributors to" \
|
168
|
+
" see precisely what notable changes have been made between each release (or version) of" \
|
169
|
+
" the project. Whether consumers or developers, the end users of software are" \
|
170
|
+
" human beings who care about what's in the software. When the software changes, people " \
|
171
|
+
"want to know why and how. see https://keepachangelog.com")
|
172
|
+
config[:changelog] = true
|
173
|
+
Bundler.ui.info "Changelog enabled in config"
|
174
|
+
templates.merge!("CHANGELOG.md.tt" => "CHANGELOG.md")
|
175
|
+
end
|
176
|
+
|
177
|
+
config[:linter] = ask_and_set_linter
|
178
|
+
case config[:linter]
|
179
|
+
when "rubocop"
|
180
|
+
config[:linter_version] = rubocop_version
|
181
|
+
Bundler.ui.info "RuboCop enabled in config"
|
182
|
+
templates.merge!("rubocop.yml.tt" => ".rubocop.yml")
|
183
|
+
when "standard"
|
184
|
+
config[:linter_version] = standard_version
|
185
|
+
Bundler.ui.info "Standard enabled in config"
|
186
|
+
templates.merge!("standard.yml.tt" => ".standard.yml")
|
187
|
+
end
|
188
|
+
|
127
189
|
templates.merge!("exe/newgem.tt" => "exe/#{name}") if config[:exe]
|
128
190
|
|
129
191
|
if options[:ext]
|
@@ -134,24 +196,32 @@ module Bundler
|
|
134
196
|
)
|
135
197
|
end
|
136
198
|
|
199
|
+
if target.exist? && !target.directory?
|
200
|
+
Bundler.ui.error "Couldn't create a new gem named `#{gem_name}` because there's an existing file named `#{gem_name}`."
|
201
|
+
exit Bundler::BundlerError.all_errors[Bundler::GenericSystemCallError]
|
202
|
+
end
|
203
|
+
|
204
|
+
if use_git
|
205
|
+
Bundler.ui.info "Initializing git repo in #{target}"
|
206
|
+
require "shellwords"
|
207
|
+
`git init #{target.to_s.shellescape}`
|
208
|
+
|
209
|
+
config[:git_default_branch] = File.read("#{target}/.git/HEAD").split("/").last.chomp
|
210
|
+
end
|
211
|
+
|
137
212
|
templates.each do |src, dst|
|
138
213
|
destination = target.join(dst)
|
139
|
-
|
140
|
-
thor.template("newgem/#{src}", destination, config)
|
141
|
-
end
|
214
|
+
thor.template("newgem/#{src}", destination, config)
|
142
215
|
end
|
143
216
|
|
144
217
|
executables.each do |file|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
end
|
218
|
+
path = target.join(file)
|
219
|
+
executable = (path.stat.mode | 0o111)
|
220
|
+
path.chmod(executable)
|
149
221
|
end
|
150
222
|
|
151
|
-
if
|
152
|
-
Bundler.ui.info "Initializing git repo in #{target}"
|
223
|
+
if use_git
|
153
224
|
Dir.chdir(target) do
|
154
|
-
`git init`
|
155
225
|
`git add .`
|
156
226
|
end
|
157
227
|
end
|
@@ -161,11 +231,9 @@ module Bundler
|
|
161
231
|
|
162
232
|
Bundler.ui.info "Gem '#{name}' was successfully created. " \
|
163
233
|
"For more information on making a RubyGem visit https://bundler.io/guides/creating_gem.html"
|
164
|
-
rescue Errno::EEXIST => e
|
165
|
-
raise GenericSystemCallError.new(e, "There was a conflict while creating the new gem.")
|
166
234
|
end
|
167
235
|
|
168
|
-
|
236
|
+
private
|
169
237
|
|
170
238
|
def resolve_name(name)
|
171
239
|
SharedHelpers.pwd.join(name).basename.to_s
|
@@ -197,11 +265,12 @@ module Bundler
|
|
197
265
|
def ask_and_set_test_framework
|
198
266
|
test_framework = options[:test] || Bundler.settings["gem.test"]
|
199
267
|
|
200
|
-
if test_framework.
|
268
|
+
if test_framework.to_s.empty?
|
201
269
|
Bundler.ui.confirm "Do you want to generate tests with your gem?"
|
202
|
-
|
203
|
-
|
204
|
-
|
270
|
+
Bundler.ui.info hint_text("test")
|
271
|
+
|
272
|
+
result = Bundler.ui.ask "Enter a test framework. rspec/minitest/test-unit/(none):"
|
273
|
+
if result =~ /rspec|minitest|test-unit/
|
205
274
|
test_framework = result
|
206
275
|
else
|
207
276
|
test_framework = false
|
@@ -212,9 +281,106 @@ module Bundler
|
|
212
281
|
Bundler.settings.set_global("gem.test", test_framework)
|
213
282
|
end
|
214
283
|
|
284
|
+
if options[:test] == Bundler.settings["gem.test"]
|
285
|
+
Bundler.ui.info "#{options[:test]} is already configured, ignoring --test flag."
|
286
|
+
end
|
287
|
+
|
215
288
|
test_framework
|
216
289
|
end
|
217
290
|
|
291
|
+
def hint_text(setting)
|
292
|
+
if Bundler.settings["gem.#{setting}"] == false
|
293
|
+
"Your choice will only be applied to this gem."
|
294
|
+
else
|
295
|
+
"Future `bundle gem` calls will use your choice. " \
|
296
|
+
"This setting can be changed anytime with `bundle config gem.#{setting}`."
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
def ask_and_set_ci
|
301
|
+
ci_template = options[:ci] || Bundler.settings["gem.ci"]
|
302
|
+
|
303
|
+
if ci_template.to_s.empty?
|
304
|
+
Bundler.ui.confirm "Do you want to set up continuous integration for your gem? " \
|
305
|
+
"Supported services:\n" \
|
306
|
+
"* CircleCI: https://circleci.com/\n" \
|
307
|
+
"* GitHub Actions: https://github.com/features/actions\n" \
|
308
|
+
"* GitLab CI: https://docs.gitlab.com/ee/ci/\n" \
|
309
|
+
"* Travis CI: https://travis-ci.org/\n" \
|
310
|
+
"\n"
|
311
|
+
Bundler.ui.info hint_text("ci")
|
312
|
+
|
313
|
+
result = Bundler.ui.ask "Enter a CI service. github/travis/gitlab/circle/(none):"
|
314
|
+
if result =~ /github|travis|gitlab|circle/
|
315
|
+
ci_template = result
|
316
|
+
else
|
317
|
+
ci_template = false
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
321
|
+
if Bundler.settings["gem.ci"].nil?
|
322
|
+
Bundler.settings.set_global("gem.ci", ci_template)
|
323
|
+
end
|
324
|
+
|
325
|
+
if options[:ci] == Bundler.settings["gem.ci"]
|
326
|
+
Bundler.ui.info "#{options[:ci]} is already configured, ignoring --ci flag."
|
327
|
+
end
|
328
|
+
|
329
|
+
ci_template
|
330
|
+
end
|
331
|
+
|
332
|
+
def ask_and_set_linter
|
333
|
+
linter_template = options[:linter] || Bundler.settings["gem.linter"]
|
334
|
+
linter_template = deprecated_rubocop_option if linter_template.nil?
|
335
|
+
|
336
|
+
if linter_template.to_s.empty?
|
337
|
+
Bundler.ui.confirm "Do you want to add a code linter and formatter to your gem? " \
|
338
|
+
"Supported Linters:\n" \
|
339
|
+
"* RuboCop: https://rubocop.org\n" \
|
340
|
+
"* Standard: https://github.com/testdouble/standard\n" \
|
341
|
+
"\n"
|
342
|
+
Bundler.ui.info hint_text("linter")
|
343
|
+
|
344
|
+
result = Bundler.ui.ask "Enter a linter. rubocop/standard/(none):"
|
345
|
+
if result =~ /rubocop|standard/
|
346
|
+
linter_template = result
|
347
|
+
else
|
348
|
+
linter_template = false
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
if Bundler.settings["gem.linter"].nil?
|
353
|
+
Bundler.settings.set_global("gem.linter", linter_template)
|
354
|
+
end
|
355
|
+
|
356
|
+
# Once gem.linter safely set, unset the deprecated gem.rubocop
|
357
|
+
unless Bundler.settings["gem.rubocop"].nil?
|
358
|
+
Bundler.settings.set_global("gem.rubocop", nil)
|
359
|
+
end
|
360
|
+
|
361
|
+
if options[:linter] == Bundler.settings["gem.linter"]
|
362
|
+
Bundler.ui.info "#{options[:linter]} is already configured, ignoring --linter flag."
|
363
|
+
end
|
364
|
+
|
365
|
+
linter_template
|
366
|
+
end
|
367
|
+
|
368
|
+
def deprecated_rubocop_option
|
369
|
+
if !options[:rubocop].nil?
|
370
|
+
if options[:rubocop]
|
371
|
+
Bundler::SharedHelpers.major_deprecation 2, "--rubocop is deprecated, use --linter=rubocop"
|
372
|
+
"rubocop"
|
373
|
+
else
|
374
|
+
Bundler::SharedHelpers.major_deprecation 2, "--no-rubocop is deprecated, use --linter"
|
375
|
+
false
|
376
|
+
end
|
377
|
+
elsif !Bundler.settings["gem.rubocop"].nil?
|
378
|
+
Bundler::SharedHelpers.major_deprecation 2,
|
379
|
+
"config gem.rubocop is deprecated; we've updated your config to use gem.linter instead"
|
380
|
+
Bundler.settings["gem.rubocop"] ? "rubocop" : false
|
381
|
+
end
|
382
|
+
end
|
383
|
+
|
218
384
|
def bundler_dependency_version
|
219
385
|
v = Gem::Version.new(Bundler::VERSION)
|
220
386
|
req = v.segments[0..1]
|
@@ -248,5 +414,30 @@ module Bundler
|
|
248
414
|
def open_editor(editor, file)
|
249
415
|
thor.run(%(#{editor} "#{file}"))
|
250
416
|
end
|
417
|
+
|
418
|
+
def required_ruby_version
|
419
|
+
if Gem.ruby_version < Gem::Version.new("2.4.a") then "2.3.0"
|
420
|
+
elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "2.4.0"
|
421
|
+
elsif Gem.ruby_version < Gem::Version.new("2.6.a") then "2.5.0"
|
422
|
+
else
|
423
|
+
"2.6.0"
|
424
|
+
end
|
425
|
+
end
|
426
|
+
|
427
|
+
def rubocop_version
|
428
|
+
if Gem.ruby_version < Gem::Version.new("2.4.a") then "0.81.0"
|
429
|
+
elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "1.12"
|
430
|
+
else
|
431
|
+
"1.21"
|
432
|
+
end
|
433
|
+
end
|
434
|
+
|
435
|
+
def standard_version
|
436
|
+
if Gem.ruby_version < Gem::Version.new("2.4.a") then "0.2.5"
|
437
|
+
elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "1.0"
|
438
|
+
else
|
439
|
+
"1.3"
|
440
|
+
end
|
441
|
+
end
|
251
442
|
end
|
252
443
|
end
|
data/lib/bundler/cli/info.rb
CHANGED
@@ -18,11 +18,12 @@ module Bundler
|
|
18
18
|
|
19
19
|
if spec
|
20
20
|
return print_gem_path(spec) if @options[:path]
|
21
|
+
return print_gem_version(spec) if @options[:version]
|
21
22
|
print_gem_info(spec)
|
22
23
|
end
|
23
24
|
end
|
24
25
|
|
25
|
-
|
26
|
+
private
|
26
27
|
|
27
28
|
def spec_for_gem(gem_name)
|
28
29
|
spec = Bundler.definition.specs.find {|s| s.name == gem_name }
|
@@ -39,24 +40,55 @@ module Bundler
|
|
39
40
|
raise GemNotFound, Bundler::CLI::Common.gem_not_found_message(gem_name, Bundler.definition.dependencies)
|
40
41
|
end
|
41
42
|
|
43
|
+
def print_gem_version(spec)
|
44
|
+
Bundler.ui.info spec.version.to_s
|
45
|
+
end
|
46
|
+
|
42
47
|
def print_gem_path(spec)
|
43
|
-
|
44
|
-
|
48
|
+
name = spec.name
|
49
|
+
if name == "bundler"
|
50
|
+
path = File.expand_path("../../..", __dir__)
|
45
51
|
else
|
46
|
-
spec.full_gem_path
|
52
|
+
path = spec.full_gem_path
|
53
|
+
if spec.deleted_gem?
|
54
|
+
return Bundler.ui.warn "The gem #{name} has been deleted. It was installed at: #{path}"
|
55
|
+
end
|
47
56
|
end
|
48
57
|
|
49
58
|
Bundler.ui.info path
|
50
59
|
end
|
51
60
|
|
52
61
|
def print_gem_info(spec)
|
62
|
+
metadata = spec.metadata
|
63
|
+
name = spec.name
|
53
64
|
gem_info = String.new
|
54
|
-
gem_info << " * #{
|
65
|
+
gem_info << " * #{name} (#{spec.version}#{spec.git_version})\n"
|
55
66
|
gem_info << "\tSummary: #{spec.summary}\n" if spec.summary
|
56
67
|
gem_info << "\tHomepage: #{spec.homepage}\n" if spec.homepage
|
68
|
+
gem_info << "\tDocumentation: #{metadata["documentation_uri"]}\n" if metadata.key?("documentation_uri")
|
69
|
+
gem_info << "\tSource Code: #{metadata["source_code_uri"]}\n" if metadata.key?("source_code_uri")
|
70
|
+
gem_info << "\tFunding: #{metadata["funding_uri"]}\n" if metadata.key?("funding_uri")
|
71
|
+
gem_info << "\tWiki: #{metadata["wiki_uri"]}\n" if metadata.key?("wiki_uri")
|
72
|
+
gem_info << "\tChangelog: #{metadata["changelog_uri"]}\n" if metadata.key?("changelog_uri")
|
73
|
+
gem_info << "\tBug Tracker: #{metadata["bug_tracker_uri"]}\n" if metadata.key?("bug_tracker_uri")
|
74
|
+
gem_info << "\tMailing List: #{metadata["mailing_list_uri"]}\n" if metadata.key?("mailing_list_uri")
|
57
75
|
gem_info << "\tPath: #{spec.full_gem_path}\n"
|
58
|
-
gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
|
76
|
+
gem_info << "\tDefault Gem: yes\n" if spec.respond_to?(:default_gem?) && spec.default_gem?
|
77
|
+
gem_info << "\tReverse Dependencies: \n\t\t#{gem_dependencies.join("\n\t\t")}" if gem_dependencies.any?
|
78
|
+
|
79
|
+
if name != "bundler" && spec.deleted_gem?
|
80
|
+
return Bundler.ui.warn "The gem #{name} has been deleted. Gemspec information is still available though:\n#{gem_info}"
|
81
|
+
end
|
82
|
+
|
59
83
|
Bundler.ui.info gem_info
|
60
84
|
end
|
85
|
+
|
86
|
+
def gem_dependencies
|
87
|
+
@gem_dependencies ||= Bundler.definition.specs.map do |spec|
|
88
|
+
dependency = spec.dependencies.find {|dep| dep.name == gem_name }
|
89
|
+
next unless dependency
|
90
|
+
"#{spec.name} (#{spec.version}) depends on #{gem_name} (#{dependency.requirements_list.join(", ")})"
|
91
|
+
end.compact.sort
|
92
|
+
end
|
61
93
|
end
|
62
94
|
end
|
data/lib/bundler/cli/init.rb
CHANGED
@@ -32,16 +32,16 @@ module Bundler
|
|
32
32
|
file << spec.to_gemfile
|
33
33
|
end
|
34
34
|
else
|
35
|
-
FileUtils.cp(File.expand_path("
|
35
|
+
FileUtils.cp(File.expand_path("../templates/#{gemfile}", __dir__), gemfile)
|
36
36
|
end
|
37
37
|
|
38
38
|
puts "Writing new #{gemfile} to #{SharedHelpers.pwd}/#{gemfile}"
|
39
39
|
end
|
40
40
|
|
41
|
-
|
41
|
+
private
|
42
42
|
|
43
43
|
def gemfile
|
44
|
-
@gemfile ||= Bundler.
|
44
|
+
@gemfile ||= Bundler.preferred_gemfile_name
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
data/lib/bundler/cli/inject.rb
CHANGED
data/lib/bundler/cli/install.rb
CHANGED
@@ -8,11 +8,11 @@ module Bundler
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def run
|
11
|
-
Bundler.ui.level = "
|
11
|
+
Bundler.ui.level = "warn" if options[:quiet]
|
12
12
|
|
13
13
|
warn_if_root
|
14
14
|
|
15
|
-
|
15
|
+
Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed
|
16
16
|
|
17
17
|
Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Bundler::FREEBSD
|
18
18
|
|
@@ -35,12 +35,8 @@ module Bundler
|
|
35
35
|
|
36
36
|
options[:local] = true if Bundler.app_cache.exist?
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
else
|
41
|
-
Bundler.settings.set_command_option :deployment, true if options[:deployment]
|
42
|
-
Bundler.settings.set_command_option :frozen, true if options[:frozen]
|
43
|
-
end
|
38
|
+
Bundler.settings.set_command_option :deployment, true if options[:deployment]
|
39
|
+
Bundler.settings.set_command_option :frozen, true if options[:frozen]
|
44
40
|
end
|
45
41
|
|
46
42
|
# When install is called with --no-deployment, disable deployment mode
|
@@ -55,7 +51,7 @@ module Bundler
|
|
55
51
|
|
56
52
|
if options["binstubs"]
|
57
53
|
Bundler::SharedHelpers.major_deprecation 2,
|
58
|
-
"The --binstubs option will be removed in favor of `bundle binstubs`"
|
54
|
+
"The --binstubs option will be removed in favor of `bundle binstubs --all`"
|
59
55
|
end
|
60
56
|
|
61
57
|
Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins?
|
@@ -64,7 +60,10 @@ module Bundler
|
|
64
60
|
definition.validate_runtime!
|
65
61
|
|
66
62
|
installer = Installer.install(Bundler.root, definition, options)
|
67
|
-
|
63
|
+
|
64
|
+
Bundler.settings.temporary(:cache_all_platforms => options[:local] ? false : Bundler.settings[:cache_all_platforms]) do
|
65
|
+
Bundler.load.cache(nil, options[:local]) if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.frozen_bundle?
|
66
|
+
end
|
68
67
|
|
69
68
|
Bundler.ui.confirm "Bundle complete! #{dependencies_count_for(definition)}, #{gems_installed_for(definition)}."
|
70
69
|
Bundler::CLI::Common.output_without_groups_message(:install)
|
@@ -84,28 +83,17 @@ module Bundler
|
|
84
83
|
require_relative "clean"
|
85
84
|
Bundler::CLI::Clean.new(options).run
|
86
85
|
end
|
87
|
-
rescue GemNotFound, VersionConflict => e
|
88
|
-
if options[:local] && Bundler.app_cache.exist?
|
89
|
-
Bundler.ui.warn "Some gems seem to be missing from your #{Bundler.settings.app_cache_path} directory."
|
90
|
-
end
|
91
86
|
|
92
|
-
|
93
|
-
|
94
|
-
Your Gemfile has no gem server sources. If you need gems that are \
|
95
|
-
not already on your machine, add a line like this to your Gemfile:
|
96
|
-
source 'https://rubygems.org'
|
97
|
-
WARN
|
98
|
-
end
|
99
|
-
raise e
|
100
|
-
rescue Gem::InvalidSpecificationException => e
|
87
|
+
Bundler::CLI::Common.output_fund_metadata_summary
|
88
|
+
rescue Gem::InvalidSpecificationException
|
101
89
|
Bundler.ui.warn "You have one or more invalid gemspecs that need to be fixed."
|
102
|
-
raise
|
90
|
+
raise
|
103
91
|
end
|
104
92
|
|
105
|
-
|
93
|
+
private
|
106
94
|
|
107
95
|
def warn_if_root
|
108
|
-
return if Bundler.settings[:silence_root_warning] ||
|
96
|
+
return if Bundler.settings[:silence_root_warning] || Gem.win_platform? || !Process.uid.zero?
|
109
97
|
Bundler.ui.warn "Don't run Bundler as root. Bundler can ask for sudo " \
|
110
98
|
"if it is needed, and installing your bundle as root will break this " \
|
111
99
|
"application for all non-root users on this machine.", :wrap => true
|
@@ -147,31 +135,17 @@ module Bundler
|
|
147
135
|
end
|
148
136
|
|
149
137
|
def normalize_groups
|
150
|
-
options[:with] &&= options[:with].join(":").tr(" ", ":").split(":")
|
151
|
-
options[:without] &&= options[:without].join(":").tr(" ", ":").split(":")
|
152
|
-
|
153
138
|
check_for_group_conflicts_in_cli_options
|
154
139
|
|
155
|
-
|
156
|
-
Bundler.settings.set_command_option :without, nil
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
with -= options[:without] if options[:without]
|
161
|
-
|
162
|
-
without = options.fetch(:without, [])
|
163
|
-
without |= Bundler.settings[:without].map(&:to_s)
|
164
|
-
without -= options[:with] if options[:with]
|
165
|
-
|
166
|
-
options[:with] = with
|
167
|
-
options[:without] = without
|
140
|
+
# need to nil them out first to get around validation for backwards compatibility
|
141
|
+
Bundler.settings.set_command_option :without, nil
|
142
|
+
Bundler.settings.set_command_option :with, nil
|
143
|
+
Bundler.settings.set_command_option :without, options[:without]
|
144
|
+
Bundler.settings.set_command_option :with, options[:with]
|
168
145
|
end
|
169
146
|
|
170
147
|
def normalize_settings
|
171
148
|
Bundler.settings.set_command_option :path, nil if options[:system]
|
172
|
-
Bundler.settings.temporary(:path_relative_to_cwd => false) do
|
173
|
-
Bundler.settings.set_command_option :path, "vendor/bundle" if Bundler.settings[:deployment] && Bundler.settings[:path].nil?
|
174
|
-
end
|
175
149
|
Bundler.settings.set_command_option_if_given :path, options[:path]
|
176
150
|
Bundler.settings.temporary(:path_relative_to_cwd => false) do
|
177
151
|
Bundler.settings.set_command_option :path, "bundle" if options["standalone"] && Bundler.settings[:path].nil?
|
@@ -191,13 +165,7 @@ module Bundler
|
|
191
165
|
|
192
166
|
Bundler.settings.set_command_option_if_given :clean, options["clean"]
|
193
167
|
|
194
|
-
|
195
|
-
# need to nil them out first to get around validation for backwards compatibility
|
196
|
-
Bundler.settings.set_command_option :without, nil
|
197
|
-
Bundler.settings.set_command_option :with, nil
|
198
|
-
Bundler.settings.set_command_option :without, options[:without] - options[:with]
|
199
|
-
Bundler.settings.set_command_option :with, options[:with]
|
200
|
-
end
|
168
|
+
normalize_groups if options[:without] || options[:with]
|
201
169
|
|
202
170
|
options[:force] = options[:redownload]
|
203
171
|
end
|
data/lib/bundler/cli/issue.rb
CHANGED
@@ -10,7 +10,7 @@ module Bundler
|
|
10
10
|
be sure to check out these resources:
|
11
11
|
|
12
12
|
1. Check out our troubleshooting guide for quick fixes to common issues:
|
13
|
-
https://github.com/
|
13
|
+
https://github.com/rubygems/rubygems/blob/master/bundler/doc/TROUBLESHOOTING.md
|
14
14
|
|
15
15
|
2. Instructions for common Bundler uses can be found on the documentation
|
16
16
|
site: https://bundler.io/
|
@@ -20,9 +20,10 @@ module Bundler
|
|
20
20
|
|
21
21
|
Hopefully the troubleshooting steps above resolved your problem! If things
|
22
22
|
still aren't working the way you expect them to, please let us know so
|
23
|
-
that we can diagnose and help fix the problem you're having
|
24
|
-
|
25
|
-
https://github.com/
|
23
|
+
that we can diagnose and help fix the problem you're having, by filling
|
24
|
+
in the new issue form located at
|
25
|
+
https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md,
|
26
|
+
and copy and pasting the information below.
|
26
27
|
|
27
28
|
EOS
|
28
29
|
|