bundler 1.11.2 → 1.12.0.pre.1
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/.codeclimate.yml +24 -0
- data/.gitignore +2 -2
- data/.rubocop.yml +17 -2
- data/.rubocop_todo.yml +145 -18
- data/.travis.yml +9 -2
- data/CHANGELOG.md +42 -0
- data/Rakefile +20 -13
- data/bin/rake +5 -0
- data/bin/rspec +5 -0
- data/bin/rubocop +7 -1
- data/bundler.gemspec +2 -1
- data/exe/bundle +10 -2
- data/exe/bundle_ruby +2 -1
- data/exe/bundler +3 -1
- data/lib/bundler.rb +54 -51
- data/lib/bundler/capistrano.rb +1 -0
- data/lib/bundler/cli.rb +26 -4
- data/lib/bundler/cli/binstubs.rb +1 -0
- data/lib/bundler/cli/cache.rb +1 -0
- data/lib/bundler/cli/check.rb +4 -1
- data/lib/bundler/cli/clean.rb +1 -0
- data/lib/bundler/cli/common.rb +1 -0
- data/lib/bundler/cli/config.rb +5 -5
- data/lib/bundler/cli/console.rb +1 -0
- data/lib/bundler/cli/exec.rb +4 -9
- data/lib/bundler/cli/gem.rb +12 -9
- data/lib/bundler/cli/init.rb +1 -0
- data/lib/bundler/cli/inject.rb +1 -0
- data/lib/bundler/cli/install.rb +8 -5
- data/lib/bundler/cli/lock.rb +2 -0
- data/lib/bundler/cli/open.rb +1 -0
- data/lib/bundler/cli/outdated.rb +36 -9
- data/lib/bundler/cli/package.rb +1 -0
- data/lib/bundler/cli/platform.rb +4 -1
- data/lib/bundler/cli/show.rb +1 -0
- data/lib/bundler/cli/update.rb +6 -6
- data/lib/bundler/cli/viz.rb +4 -6
- data/lib/bundler/constants.rb +1 -0
- data/lib/bundler/current_ruby.rb +34 -168
- data/lib/bundler/definition.rb +41 -15
- data/lib/bundler/dep_proxy.rb +1 -0
- data/lib/bundler/dependency.rb +10 -0
- data/lib/bundler/deployment.rb +1 -0
- data/lib/bundler/deprecate.rb +1 -0
- data/lib/bundler/dsl.rb +19 -9
- data/lib/bundler/endpoint_specification.rb +37 -8
- data/lib/bundler/env.rb +4 -3
- data/lib/bundler/environment.rb +1 -0
- data/lib/bundler/errors.rb +51 -32
- data/lib/bundler/fetcher.rb +44 -30
- data/lib/bundler/fetcher/base.rb +3 -2
- data/lib/bundler/fetcher/compact_index.rb +98 -0
- data/lib/bundler/fetcher/dependency.rb +36 -36
- data/lib/bundler/fetcher/downloader.rb +14 -8
- data/lib/bundler/fetcher/index.rb +28 -5
- data/lib/bundler/friendly_errors.rb +93 -85
- data/lib/bundler/gem_helper.rb +20 -21
- data/lib/bundler/gem_helpers.rb +9 -2
- data/lib/bundler/gem_remote_fetcher.rb +1 -0
- data/lib/bundler/gem_tasks.rb +1 -0
- data/lib/bundler/graph.rb +16 -17
- data/lib/bundler/index.rb +4 -6
- data/lib/bundler/injector.rb +1 -0
- data/lib/bundler/inline.rb +8 -2
- data/lib/bundler/installer.rb +4 -4
- data/lib/bundler/installer/gem_installer.rb +1 -0
- data/lib/bundler/installer/parallel_installer.rb +3 -2
- data/lib/bundler/installer/standalone.rb +5 -1
- data/lib/bundler/lazy_specification.rb +5 -2
- data/lib/bundler/lockfile_parser.rb +22 -15
- data/lib/bundler/match_platform.rb +1 -0
- data/lib/bundler/mirror.rb +218 -0
- data/lib/bundler/path_preserver.rb +12 -0
- data/lib/bundler/psyched_yaml.rb +1 -0
- data/lib/bundler/remote_specification.rb +4 -1
- data/lib/bundler/resolver.rb +17 -16
- data/lib/bundler/retry.rb +1 -0
- data/lib/bundler/ruby_dsl.rb +8 -2
- data/lib/bundler/ruby_version.rb +58 -61
- data/lib/bundler/rubygems_ext.rb +4 -3
- data/lib/bundler/rubygems_gem_installer.rb +1 -0
- data/lib/bundler/rubygems_integration.rb +9 -14
- data/lib/bundler/runtime.rb +17 -22
- data/lib/bundler/settings.rb +17 -21
- data/lib/bundler/setup.rb +1 -0
- data/lib/bundler/shared_helpers.rb +47 -17
- data/lib/bundler/similarity_detector.rb +1 -0
- data/lib/bundler/source.rb +2 -1
- data/lib/bundler/source/git.rb +2 -1
- data/lib/bundler/source/git/git_proxy.rb +33 -7
- data/lib/bundler/source/path.rb +17 -10
- data/lib/bundler/source/path/installer.rb +1 -0
- data/lib/bundler/source/rubygems.rb +4 -3
- data/lib/bundler/source/rubygems/remote.rb +16 -0
- data/lib/bundler/source_list.rb +1 -0
- data/lib/bundler/spec_set.rb +1 -0
- data/lib/bundler/ssl_certs/certificate_manager.rb +1 -0
- data/lib/bundler/stub_specification.rb +1 -0
- data/lib/bundler/templates/Executable +1 -0
- data/lib/bundler/templates/Gemfile +1 -0
- data/lib/bundler/templates/newgem/.travis.yml.tt +1 -0
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -2
- data/lib/bundler/ui.rb +1 -0
- data/lib/bundler/ui/rg_proxy.rb +1 -0
- data/lib/bundler/ui/shell.rb +2 -1
- data/lib/bundler/ui/silent.rb +1 -0
- data/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb +78 -0
- data/lib/bundler/vendor/compact_index_client/lib/compact_index_client/cache.rb +97 -0
- data/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb +55 -0
- data/lib/bundler/vendor/compact_index_client/lib/compact_index_client/version.rb +3 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo.rb +4 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +13 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +5 -0
- data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +2 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +2 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +37 -14
- data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +2 -1
- data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +7 -7
- data/lib/bundler/vendored_molinillo.rb +1 -0
- data/lib/bundler/vendored_persistent.rb +1 -0
- data/lib/bundler/vendored_thor.rb +1 -0
- data/lib/bundler/version.rb +6 -1
- data/lib/bundler/vlad.rb +1 -0
- data/lib/bundler/worker.rb +12 -2
- data/man/bundle-config.ronn +6 -0
- data/man/bundle-gem.ronn +5 -5
- metadata +14 -6
- data/lib/bundler/gem_path_manipulation.rb +0 -8
data/bin/rake
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require "rubygems"
|
4
5
|
|
@@ -11,4 +12,8 @@ bundler_spec.dependencies.each do |dep|
|
|
11
12
|
end
|
12
13
|
end
|
13
14
|
|
15
|
+
Gem::Specification.unresolved_deps.each do |_name, dep|
|
16
|
+
gem dep.name, *dep.requirement
|
17
|
+
end
|
18
|
+
|
14
19
|
load Gem.bin_path("rake", "rake")
|
data/bin/rspec
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require "rubygems"
|
4
5
|
|
@@ -7,4 +8,8 @@ bundler_spec.dependencies.each do |dep|
|
|
7
8
|
gem dep.name, dep.requirement.to_s
|
8
9
|
end
|
9
10
|
|
11
|
+
Gem::Specification.unresolved_deps.each do |_name, dep|
|
12
|
+
gem dep.name, *dep.requirement
|
13
|
+
end
|
14
|
+
|
10
15
|
load Gem.bin_path("rspec-core", "rspec")
|
data/bin/rubocop
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require "rubygems"
|
4
5
|
|
@@ -7,5 +8,10 @@ bundler_spec.dependencies.each do |dep|
|
|
7
8
|
gem dep.name, dep.requirement.to_s
|
8
9
|
end
|
9
10
|
|
10
|
-
gem "rubocop", "= 0.
|
11
|
+
gem "rubocop", "= 0.37.0"
|
12
|
+
|
13
|
+
Gem::Specification.unresolved_deps.each do |_name, dep|
|
14
|
+
gem dep.name, *dep.requirement
|
15
|
+
end
|
16
|
+
|
11
17
|
load Gem.bin_path("rubocop", "rubocop")
|
data/bundler.gemspec
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
# frozen_string_literal: true
|
2
3
|
lib = File.expand_path("../lib/", __FILE__)
|
3
4
|
$:.unshift lib unless $:.include?(lib)
|
4
5
|
require "bundler/version"
|
@@ -19,7 +20,7 @@ Gem::Specification.new do |s|
|
|
19
20
|
s.add_development_dependency "automatiek", "~> 0.1.0"
|
20
21
|
s.add_development_dependency "mustache", "0.99.6"
|
21
22
|
s.add_development_dependency "rake", "~> 10.0"
|
22
|
-
s.add_development_dependency "rdiscount", "~> 1.
|
23
|
+
s.add_development_dependency "rdiscount", "~> 2.1.8"
|
23
24
|
s.add_development_dependency "ronn", "~> 0.7.3"
|
24
25
|
s.add_development_dependency "rspec", "~> 3.0"
|
25
26
|
|
data/exe/bundle
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
# Exit cleanly from an early interrupt
|
4
5
|
Signal.trap("INT") { exit 1 }
|
@@ -7,7 +8,8 @@ require "bundler"
|
|
7
8
|
# Check if an older version of bundler is installed
|
8
9
|
$LOAD_PATH.each do |path|
|
9
10
|
next unless path =~ %r{/bundler-0\.(\d+)} && $1.to_i < 9
|
10
|
-
err =
|
11
|
+
err = String.new
|
12
|
+
err << "Looks like you have a version of bundler that's older than 0.9.\n"
|
11
13
|
err << "Please remove your old versions.\n"
|
12
14
|
err << "An easy way to do this is by running `gem cleanup bundler`."
|
13
15
|
abort(err)
|
@@ -16,5 +18,11 @@ end
|
|
16
18
|
require "bundler/friendly_errors"
|
17
19
|
Bundler.with_friendly_errors do
|
18
20
|
require "bundler/cli"
|
19
|
-
|
21
|
+
|
22
|
+
# Allow any command to use --help flag to show help for that command
|
23
|
+
help_flags = %w(--help -h)
|
24
|
+
help_flag_used = ARGV.any? {|a| help_flags.include? a }
|
25
|
+
args = help_flag_used ? Bundler::CLI.reformatted_help_args(ARGV) : ARGV
|
26
|
+
|
27
|
+
Bundler::CLI.start(args, :debug => true)
|
20
28
|
end
|
data/exe/bundle_ruby
CHANGED
data/exe/bundler
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
# Exit cleanly from an early interrupt
|
4
5
|
Signal.trap("INT") { exit 1 }
|
@@ -7,7 +8,8 @@ require "bundler"
|
|
7
8
|
# Check if an older version of bundler is installed
|
8
9
|
$LOAD_PATH.each do |path|
|
9
10
|
next unless path =~ %r{/bundler-0\.(\d+)} && $1.to_i < 9
|
10
|
-
err =
|
11
|
+
err = String.new
|
12
|
+
err << "Looks like you have a version of bundler that's older than 0.9.\n"
|
11
13
|
err << "Please remove your old versions.\n"
|
12
14
|
err << "An easy way to do this is by running `gem cleanup bundler`."
|
13
15
|
abort(err)
|
data/lib/bundler.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "fileutils"
|
2
3
|
require "pathname"
|
3
4
|
require "rbconfig"
|
4
5
|
require "thread"
|
5
|
-
require "bundler/
|
6
|
+
require "bundler/path_preserver"
|
6
7
|
require "bundler/gem_remote_fetcher"
|
7
8
|
require "bundler/rubygems_ext"
|
8
9
|
require "bundler/rubygems_integration"
|
@@ -12,43 +13,45 @@ require "bundler/current_ruby"
|
|
12
13
|
require "bundler/errors"
|
13
14
|
|
14
15
|
module Bundler
|
15
|
-
|
16
|
+
PathPreserver.preserve_path_in_environment("PATH", ENV)
|
17
|
+
PathPreserver.preserve_path_in_environment("GEM_PATH", ENV)
|
16
18
|
ORIGINAL_ENV = ENV.to_hash
|
17
19
|
SUDO_MUTEX = Mutex.new
|
18
20
|
|
19
|
-
autoload :Definition,
|
20
|
-
autoload :Dependency,
|
21
|
-
autoload :DepProxy,
|
22
|
-
autoload :Deprecate,
|
23
|
-
autoload :Dsl,
|
24
|
-
autoload :EndpointSpecification,
|
25
|
-
autoload :Environment,
|
26
|
-
autoload :Env,
|
27
|
-
autoload :Fetcher,
|
28
|
-
autoload :GemHelper,
|
29
|
-
autoload :GemHelpers,
|
30
|
-
autoload :
|
31
|
-
autoload :
|
32
|
-
autoload :
|
33
|
-
autoload :
|
34
|
-
autoload :
|
35
|
-
autoload :
|
36
|
-
autoload :
|
37
|
-
autoload :
|
38
|
-
autoload :
|
39
|
-
autoload :
|
40
|
-
autoload :
|
41
|
-
autoload :
|
42
|
-
autoload :
|
43
|
-
autoload :
|
44
|
-
autoload :
|
45
|
-
autoload :
|
46
|
-
autoload :
|
47
|
-
autoload :
|
48
|
-
autoload :
|
49
|
-
autoload :
|
50
|
-
autoload :
|
51
|
-
autoload :
|
21
|
+
autoload :Definition, "bundler/definition"
|
22
|
+
autoload :Dependency, "bundler/dependency"
|
23
|
+
autoload :DepProxy, "bundler/dep_proxy"
|
24
|
+
autoload :Deprecate, "bundler/deprecate"
|
25
|
+
autoload :Dsl, "bundler/dsl"
|
26
|
+
autoload :EndpointSpecification, "bundler/endpoint_specification"
|
27
|
+
autoload :Environment, "bundler/environment"
|
28
|
+
autoload :Env, "bundler/env"
|
29
|
+
autoload :Fetcher, "bundler/fetcher"
|
30
|
+
autoload :GemHelper, "bundler/gem_helper"
|
31
|
+
autoload :GemHelpers, "bundler/gem_helpers"
|
32
|
+
autoload :Graph, "bundler/graph"
|
33
|
+
autoload :Index, "bundler/index"
|
34
|
+
autoload :Installer, "bundler/installer"
|
35
|
+
autoload :Injector, "bundler/injector"
|
36
|
+
autoload :LazySpecification, "bundler/lazy_specification"
|
37
|
+
autoload :LockfileParser, "bundler/lockfile_parser"
|
38
|
+
autoload :MatchPlatform, "bundler/match_platform"
|
39
|
+
autoload :Mirror, "bundler/mirror"
|
40
|
+
autoload :Mirrors, "bundler/mirror"
|
41
|
+
autoload :RemoteSpecification, "bundler/remote_specification"
|
42
|
+
autoload :Resolver, "bundler/resolver"
|
43
|
+
autoload :Retry, "bundler/retry"
|
44
|
+
autoload :RubyVersion, "bundler/ruby_version"
|
45
|
+
autoload :RubyDsl, "bundler/ruby_dsl"
|
46
|
+
autoload :Runtime, "bundler/runtime"
|
47
|
+
autoload :Settings, "bundler/settings"
|
48
|
+
autoload :SharedHelpers, "bundler/shared_helpers"
|
49
|
+
autoload :SpecSet, "bundler/spec_set"
|
50
|
+
autoload :StubSpecification, "bundler/stub_specification"
|
51
|
+
autoload :Source, "bundler/source"
|
52
|
+
autoload :SourceList, "bundler/source_list"
|
53
|
+
autoload :RubyGemsGemInstaller, "bundler/rubygems_gem_installer"
|
54
|
+
autoload :UI, "bundler/ui"
|
52
55
|
|
53
56
|
class << self
|
54
57
|
attr_writer :bundle_path
|
@@ -136,7 +139,7 @@ module Bundler
|
|
136
139
|
end
|
137
140
|
|
138
141
|
def user_bundle_path
|
139
|
-
Pathname.new(Bundler.rubygems.user_home).join(".
|
142
|
+
Pathname.new(Bundler.rubygems.user_home).join(".bundle")
|
140
143
|
end
|
141
144
|
|
142
145
|
def home
|
@@ -155,6 +158,10 @@ module Bundler
|
|
155
158
|
bundle_path.join("cache/bundler")
|
156
159
|
end
|
157
160
|
|
161
|
+
def user_cache
|
162
|
+
user_bundle_path.join("cache")
|
163
|
+
end
|
164
|
+
|
158
165
|
def root
|
159
166
|
@root ||= begin
|
160
167
|
default_gemfile.dirname.expand_path
|
@@ -286,12 +293,12 @@ module Bundler
|
|
286
293
|
def which(executable)
|
287
294
|
if File.file?(executable) && File.executable?(executable)
|
288
295
|
executable
|
289
|
-
elsif ENV["PATH"]
|
290
|
-
|
296
|
+
elsif path = ENV["PATH"]
|
297
|
+
executable_path = path.split(File::PATH_SEPARATOR).find do |p|
|
291
298
|
abs_path = File.join(p, executable)
|
292
299
|
File.file?(abs_path) && File.executable?(abs_path)
|
293
300
|
end
|
294
|
-
|
301
|
+
executable_path && File.expand_path(executable, executable_path)
|
295
302
|
end
|
296
303
|
end
|
297
304
|
|
@@ -347,9 +354,9 @@ module Bundler
|
|
347
354
|
spec
|
348
355
|
end
|
349
356
|
rescue Gem::InvalidSpecificationException => e
|
350
|
-
|
351
|
-
"The validation error was '#{e.message}'"
|
352
|
-
|
357
|
+
error_message = "The gemspec at #{file} is not valid. Please fix this gemspec.\n" \
|
358
|
+
"The validation error was '#{e.message}'\n"
|
359
|
+
raise Gem::InvalidSpecificationException.new(error_message)
|
353
360
|
end
|
354
361
|
|
355
362
|
def clear_gemspec_cache
|
@@ -361,10 +368,6 @@ module Bundler
|
|
361
368
|
@git_present = Bundler.which("git") || Bundler.which("git.exe")
|
362
369
|
end
|
363
370
|
|
364
|
-
def ruby_version
|
365
|
-
@ruby_version ||= SystemRubyVersion.new
|
366
|
-
end
|
367
|
-
|
368
371
|
def reset!
|
369
372
|
@definition = nil
|
370
373
|
end
|
@@ -383,7 +386,8 @@ module Bundler
|
|
383
386
|
eval(contents, TOPLEVEL_BINDING, path.expand_path.to_s)
|
384
387
|
rescue ScriptError, StandardError => e
|
385
388
|
original_line = e.backtrace.find {|line| line.include?(path.to_s) }
|
386
|
-
msg =
|
389
|
+
msg = String.new
|
390
|
+
msg << "There was a #{e.class} while loading #{path.basename}: \n#{e.message}"
|
387
391
|
msg << " from\n #{original_line}" if original_line
|
388
392
|
msg << "\n"
|
389
393
|
|
@@ -422,10 +426,9 @@ module Bundler
|
|
422
426
|
|
423
427
|
def upgrade_lockfile
|
424
428
|
lockfile = default_lockfile
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
end
|
429
|
+
return unless lockfile.exist? && lockfile.read(3) == "---"
|
430
|
+
Bundler.ui.warn "Detected Gemfile.lock generated by 0.9, deleting..."
|
431
|
+
lockfile.rmtree
|
429
432
|
end
|
430
433
|
end
|
431
434
|
end
|
data/lib/bundler/capistrano.rb
CHANGED
data/lib/bundler/cli.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "bundler"
|
2
3
|
require "bundler/vendored_thor"
|
3
4
|
|
4
5
|
module Bundler
|
5
6
|
class CLI < Thor
|
6
7
|
include Thor::Actions
|
7
|
-
AUTO_INSTALL_CMDS = %w(show binstubs outdated exec open console licenses clean)
|
8
|
+
AUTO_INSTALL_CMDS = %w(show binstubs outdated exec open console licenses clean).freeze
|
8
9
|
|
9
10
|
def self.start(*)
|
10
11
|
super
|
@@ -136,7 +137,7 @@ module Bundler
|
|
136
137
|
method_option "frozen", :type => :boolean, :banner =>
|
137
138
|
"Do not allow the Gemfile.lock to be updated after this install"
|
138
139
|
method_option "full-index", :type => :boolean, :banner =>
|
139
|
-
"
|
140
|
+
"Fall back to using the single-file index of all gems"
|
140
141
|
method_option "gemfile", :type => :string, :banner =>
|
141
142
|
"Use the specified gemfile instead of Gemfile"
|
142
143
|
method_option "jobs", :aliases => "-j", :type => :numeric, :banner =>
|
@@ -179,7 +180,7 @@ module Bundler
|
|
179
180
|
possible versions of the gems in the bundle.
|
180
181
|
D
|
181
182
|
method_option "full-index", :type => :boolean, :banner =>
|
182
|
-
"
|
183
|
+
"Fall back to using the single-file index of all gems"
|
183
184
|
method_option "group", :aliases => "-g", :type => :array, :banner =>
|
184
185
|
"Update a specific group"
|
185
186
|
method_option "jobs", :aliases => "-j", :type => :numeric, :banner =>
|
@@ -192,6 +193,8 @@ module Bundler
|
|
192
193
|
"Update a specific source (and all gems associated with it)"
|
193
194
|
method_option "force", :type => :boolean, :banner =>
|
194
195
|
"Force downloading every gem."
|
196
|
+
method_option "ruby", :type => :boolean, :banner =>
|
197
|
+
"Update ruby specified in Gemfile.lock"
|
195
198
|
def update(*gems)
|
196
199
|
require "bundler/cli/update"
|
197
200
|
Update.new(options, gems).run
|
@@ -240,6 +243,10 @@ module Bundler
|
|
240
243
|
method_option "source", :type => :array, :banner => "Check against a specific source"
|
241
244
|
method_option "strict", :type => :boolean, :banner =>
|
242
245
|
"Only list newer versions allowed by your Gemfile requirements"
|
246
|
+
method_option "major", :type => :boolean, :banner => "Only list major newer versions"
|
247
|
+
method_option "minor", :type => :boolean, :banner => "Only list at least minor newer versions"
|
248
|
+
method_option "parseable", :aliases => "--porcelain", :type => :boolean, :banner =>
|
249
|
+
"Use minimal formatting for more parseable output"
|
243
250
|
def outdated(*gems)
|
244
251
|
require "bundler/cli/outdated"
|
245
252
|
Outdated.new(options, gems).run
|
@@ -356,7 +363,7 @@ module Bundler
|
|
356
363
|
end
|
357
364
|
|
358
365
|
desc "gem GEM [OPTIONS]", "Creates a skeleton for creating a rubygem"
|
359
|
-
method_option :
|
366
|
+
method_option :exe, :type => :boolean, :default => false, :aliases => ["--bin", "-b"], :desc => "Generate a binary executable for your library."
|
360
367
|
method_option :coc, :type => :boolean, :desc => "Generate a code of conduct file. Set a default with `bundle config gem.coc true`."
|
361
368
|
method_option :edit, :type => :string, :aliases => "-e", :required => false, :banner => "EDITOR",
|
362
369
|
:lazy_default => [ENV["BUNDLER_EDITOR"], ENV["VISUAL"], ENV["EDITOR"]].find {|e| !e.nil? && !e.empty? },
|
@@ -407,6 +414,8 @@ module Bundler
|
|
407
414
|
"print the lockfile to STDOUT instead of writing to the file system"
|
408
415
|
method_option "lockfile", :type => :string, :default => nil, :banner =>
|
409
416
|
"the path the lockfile should be written to"
|
417
|
+
method_option "full-index", :type => :boolean, :default => false, :banner =>
|
418
|
+
"Fall back to using the single-file index of all gems"
|
410
419
|
def lock
|
411
420
|
require "bundler/cli/lock"
|
412
421
|
Lock.new(options).run
|
@@ -417,6 +426,19 @@ module Bundler
|
|
417
426
|
Env.new.write($stdout)
|
418
427
|
end
|
419
428
|
|
429
|
+
# Reformat the arguments passed to bundle that include a --help flag
|
430
|
+
# into the corresponding `bundle help #{command}` call
|
431
|
+
def self.reformatted_help_args(args)
|
432
|
+
bundler_commands = all_commands.keys
|
433
|
+
command = args.select {|a| bundler_commands.include? a }
|
434
|
+
if command.empty?
|
435
|
+
abort("Could not find command \"#{args.join(" ")}\".")
|
436
|
+
else
|
437
|
+
command = command.first
|
438
|
+
end
|
439
|
+
["help", command]
|
440
|
+
end
|
441
|
+
|
420
442
|
private
|
421
443
|
|
422
444
|
# Automatically invoke `bundle install` and resume if
|
data/lib/bundler/cli/binstubs.rb
CHANGED
data/lib/bundler/cli/cache.rb
CHANGED
data/lib/bundler/cli/check.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module Bundler
|
2
3
|
class CLI::Check
|
3
4
|
attr_reader :options
|
5
|
+
|
4
6
|
def initialize(options)
|
5
7
|
@options = options
|
6
8
|
end
|
@@ -8,8 +10,9 @@ module Bundler
|
|
8
10
|
def run
|
9
11
|
if options[:path]
|
10
12
|
Bundler.settings[:path] = File.expand_path(options[:path])
|
11
|
-
Bundler.settings[:disable_shared_gems] =
|
13
|
+
Bundler.settings[:disable_shared_gems] = true
|
12
14
|
end
|
15
|
+
|
13
16
|
begin
|
14
17
|
definition = Bundler.definition
|
15
18
|
definition.validate_ruby!
|
data/lib/bundler/cli/clean.rb
CHANGED
data/lib/bundler/cli/common.rb
CHANGED
data/lib/bundler/cli/config.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module Bundler
|
2
3
|
class CLI::Config
|
3
4
|
attr_reader :name, :options, :scope, :thor
|
@@ -9,10 +10,9 @@ module Bundler
|
|
9
10
|
@thor = thor
|
10
11
|
@name = peek = args.shift
|
11
12
|
@scope = "global"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
13
|
+
return unless peek && peek.start_with?("--")
|
14
|
+
@name = args.shift
|
15
|
+
@scope = peek[2..-1]
|
16
16
|
end
|
17
17
|
|
18
18
|
def run
|
@@ -59,7 +59,7 @@ module Bundler
|
|
59
59
|
|
60
60
|
def new_value
|
61
61
|
pathname = Pathname.new(args.join(" "))
|
62
|
-
if name.
|
62
|
+
if name.start_with?("local.") && pathname.directory?
|
63
63
|
pathname.expand_path.to_s
|
64
64
|
else
|
65
65
|
args.join(" ")
|