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.

Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +24 -0
  3. data/.gitignore +2 -2
  4. data/.rubocop.yml +17 -2
  5. data/.rubocop_todo.yml +145 -18
  6. data/.travis.yml +9 -2
  7. data/CHANGELOG.md +42 -0
  8. data/Rakefile +20 -13
  9. data/bin/rake +5 -0
  10. data/bin/rspec +5 -0
  11. data/bin/rubocop +7 -1
  12. data/bundler.gemspec +2 -1
  13. data/exe/bundle +10 -2
  14. data/exe/bundle_ruby +2 -1
  15. data/exe/bundler +3 -1
  16. data/lib/bundler.rb +54 -51
  17. data/lib/bundler/capistrano.rb +1 -0
  18. data/lib/bundler/cli.rb +26 -4
  19. data/lib/bundler/cli/binstubs.rb +1 -0
  20. data/lib/bundler/cli/cache.rb +1 -0
  21. data/lib/bundler/cli/check.rb +4 -1
  22. data/lib/bundler/cli/clean.rb +1 -0
  23. data/lib/bundler/cli/common.rb +1 -0
  24. data/lib/bundler/cli/config.rb +5 -5
  25. data/lib/bundler/cli/console.rb +1 -0
  26. data/lib/bundler/cli/exec.rb +4 -9
  27. data/lib/bundler/cli/gem.rb +12 -9
  28. data/lib/bundler/cli/init.rb +1 -0
  29. data/lib/bundler/cli/inject.rb +1 -0
  30. data/lib/bundler/cli/install.rb +8 -5
  31. data/lib/bundler/cli/lock.rb +2 -0
  32. data/lib/bundler/cli/open.rb +1 -0
  33. data/lib/bundler/cli/outdated.rb +36 -9
  34. data/lib/bundler/cli/package.rb +1 -0
  35. data/lib/bundler/cli/platform.rb +4 -1
  36. data/lib/bundler/cli/show.rb +1 -0
  37. data/lib/bundler/cli/update.rb +6 -6
  38. data/lib/bundler/cli/viz.rb +4 -6
  39. data/lib/bundler/constants.rb +1 -0
  40. data/lib/bundler/current_ruby.rb +34 -168
  41. data/lib/bundler/definition.rb +41 -15
  42. data/lib/bundler/dep_proxy.rb +1 -0
  43. data/lib/bundler/dependency.rb +10 -0
  44. data/lib/bundler/deployment.rb +1 -0
  45. data/lib/bundler/deprecate.rb +1 -0
  46. data/lib/bundler/dsl.rb +19 -9
  47. data/lib/bundler/endpoint_specification.rb +37 -8
  48. data/lib/bundler/env.rb +4 -3
  49. data/lib/bundler/environment.rb +1 -0
  50. data/lib/bundler/errors.rb +51 -32
  51. data/lib/bundler/fetcher.rb +44 -30
  52. data/lib/bundler/fetcher/base.rb +3 -2
  53. data/lib/bundler/fetcher/compact_index.rb +98 -0
  54. data/lib/bundler/fetcher/dependency.rb +36 -36
  55. data/lib/bundler/fetcher/downloader.rb +14 -8
  56. data/lib/bundler/fetcher/index.rb +28 -5
  57. data/lib/bundler/friendly_errors.rb +93 -85
  58. data/lib/bundler/gem_helper.rb +20 -21
  59. data/lib/bundler/gem_helpers.rb +9 -2
  60. data/lib/bundler/gem_remote_fetcher.rb +1 -0
  61. data/lib/bundler/gem_tasks.rb +1 -0
  62. data/lib/bundler/graph.rb +16 -17
  63. data/lib/bundler/index.rb +4 -6
  64. data/lib/bundler/injector.rb +1 -0
  65. data/lib/bundler/inline.rb +8 -2
  66. data/lib/bundler/installer.rb +4 -4
  67. data/lib/bundler/installer/gem_installer.rb +1 -0
  68. data/lib/bundler/installer/parallel_installer.rb +3 -2
  69. data/lib/bundler/installer/standalone.rb +5 -1
  70. data/lib/bundler/lazy_specification.rb +5 -2
  71. data/lib/bundler/lockfile_parser.rb +22 -15
  72. data/lib/bundler/match_platform.rb +1 -0
  73. data/lib/bundler/mirror.rb +218 -0
  74. data/lib/bundler/path_preserver.rb +12 -0
  75. data/lib/bundler/psyched_yaml.rb +1 -0
  76. data/lib/bundler/remote_specification.rb +4 -1
  77. data/lib/bundler/resolver.rb +17 -16
  78. data/lib/bundler/retry.rb +1 -0
  79. data/lib/bundler/ruby_dsl.rb +8 -2
  80. data/lib/bundler/ruby_version.rb +58 -61
  81. data/lib/bundler/rubygems_ext.rb +4 -3
  82. data/lib/bundler/rubygems_gem_installer.rb +1 -0
  83. data/lib/bundler/rubygems_integration.rb +9 -14
  84. data/lib/bundler/runtime.rb +17 -22
  85. data/lib/bundler/settings.rb +17 -21
  86. data/lib/bundler/setup.rb +1 -0
  87. data/lib/bundler/shared_helpers.rb +47 -17
  88. data/lib/bundler/similarity_detector.rb +1 -0
  89. data/lib/bundler/source.rb +2 -1
  90. data/lib/bundler/source/git.rb +2 -1
  91. data/lib/bundler/source/git/git_proxy.rb +33 -7
  92. data/lib/bundler/source/path.rb +17 -10
  93. data/lib/bundler/source/path/installer.rb +1 -0
  94. data/lib/bundler/source/rubygems.rb +4 -3
  95. data/lib/bundler/source/rubygems/remote.rb +16 -0
  96. data/lib/bundler/source_list.rb +1 -0
  97. data/lib/bundler/spec_set.rb +1 -0
  98. data/lib/bundler/ssl_certs/certificate_manager.rb +1 -0
  99. data/lib/bundler/stub_specification.rb +1 -0
  100. data/lib/bundler/templates/Executable +1 -0
  101. data/lib/bundler/templates/Gemfile +1 -0
  102. data/lib/bundler/templates/newgem/.travis.yml.tt +1 -0
  103. data/lib/bundler/templates/newgem/newgem.gemspec.tt +2 -2
  104. data/lib/bundler/ui.rb +1 -0
  105. data/lib/bundler/ui/rg_proxy.rb +1 -0
  106. data/lib/bundler/ui/shell.rb +2 -1
  107. data/lib/bundler/ui/silent.rb +1 -0
  108. data/lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb +78 -0
  109. data/lib/bundler/vendor/compact_index_client/lib/compact_index_client/cache.rb +97 -0
  110. data/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb +55 -0
  111. data/lib/bundler/vendor/compact_index_client/lib/compact_index_client/version.rb +3 -0
  112. data/lib/bundler/vendor/molinillo/lib/molinillo.rb +4 -0
  113. data/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb +13 -0
  114. data/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +5 -0
  115. data/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +2 -1
  116. data/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb +2 -1
  117. data/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +37 -14
  118. data/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb +2 -1
  119. data/lib/bundler/vendor/molinillo/lib/molinillo/state.rb +7 -7
  120. data/lib/bundler/vendored_molinillo.rb +1 -0
  121. data/lib/bundler/vendored_persistent.rb +1 -0
  122. data/lib/bundler/vendored_thor.rb +1 -0
  123. data/lib/bundler/version.rb +6 -1
  124. data/lib/bundler/vlad.rb +1 -0
  125. data/lib/bundler/worker.rb +12 -2
  126. data/man/bundle-config.ronn +6 -0
  127. data/man/bundle-gem.ronn +5 -5
  128. metadata +14 -6
  129. data/lib/bundler/gem_path_manipulation.rb +0 -8
@@ -3,7 +3,7 @@ require 'bundler/vendor/molinillo/lib/molinillo/dependency_graph'
3
3
  module Bundler::Molinillo
4
4
  # This class encapsulates a dependency resolver.
5
5
  # The resolver is responsible for determining which set of dependencies to
6
- # activate, with feedback from the the {#specification_provider}
6
+ # activate, with feedback from the {#specification_provider}
7
7
  #
8
8
  #
9
9
  class Resolver
@@ -17,6 +17,7 @@ module Bundler::Molinillo
17
17
  # during the resolution process
18
18
  attr_reader :resolver_ui
19
19
 
20
+ # Initializes a new resolver.
20
21
  # @param [SpecificationProvider] specification_provider
21
22
  # see {#specification_provider}
22
23
  # @param [UI] resolver_ui
@@ -1,12 +1,12 @@
1
1
  module Bundler::Molinillo
2
2
  # A state that a {Resolution} can be in
3
- # @attr [String] name
4
- # @attr [Array<Object>] requirements
5
- # @attr [DependencyGraph] activated
6
- # @attr [Object] requirement
7
- # @attr [Object] possibility
8
- # @attr [Integer] depth
9
- # @attr [Set<Object>] conflicts
3
+ # @attr [String] name the name of the current requirement
4
+ # @attr [Array<Object>] requirements currently unsatisfied requirements
5
+ # @attr [DependencyGraph] activated the graph of activated dependencies
6
+ # @attr [Object] requirement the current requirement
7
+ # @attr [Object] possibilities the possibilities to satisfy the current requirement
8
+ # @attr [Integer] depth the depth of the resolution
9
+ # @attr [Set<Object>] conflicts unresolved conflicts
10
10
  ResolutionState = Struct.new(
11
11
  :name,
12
12
  :requirements,
@@ -1,2 +1,3 @@
1
+ # frozen_string_literal: true
1
2
  module Bundler; end
2
3
  require "bundler/vendor/molinillo/lib/molinillo"
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # We forcibly require OpenSSL, because net/http/persistent will only autoload
2
3
  # it. On some Rubies, autoload fails but explicit require succeeds.
3
4
  begin
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bundler; end
2
3
  require "bundler/vendor/thor/lib/thor"
3
4
  require "bundler/vendor/thor/lib/thor/actions"
@@ -1,6 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Ruby 1.9.3 and old RubyGems don't play nice with frozen version strings
4
+ # rubocop:disable MutableConstant
5
+
1
6
  module Bundler
2
7
  # We're doing this because we might write tests that deal
3
8
  # with other versions of bundler and we are unsure how to
4
9
  # handle this better.
5
- VERSION = "1.11.2" unless defined?(::Bundler::VERSION)
10
+ VERSION = "1.12.0.pre.1" unless defined?(::Bundler::VERSION)
6
11
  end
data/lib/bundler/vlad.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Vlad task for Bundler.
2
3
  #
3
4
  # Just add "require 'bundler/vlad'" in your Vlad deploy.rb, and
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "thread"
2
3
 
3
4
  module Bundler
@@ -11,15 +12,24 @@ module Bundler
11
12
  end
12
13
  end
13
14
 
15
+ # @return [String] the name of the worker
16
+ attr_reader :name
17
+
14
18
  # Creates a worker pool of specified size
15
19
  #
16
20
  # @param size [Integer] Size of pool
21
+ # @param name [String] name the name of the worker
17
22
  # @param func [Proc] job to run in inside the worker pool
18
- def initialize(size, func)
23
+ def initialize(size, name, func)
24
+ @name = name
19
25
  @request_queue = Queue.new
20
26
  @response_queue = Queue.new
21
27
  @func = func
22
- @threads = size.times.map {|i| Thread.start { process_queue(i) } }
28
+ @threads = Array.new(size) do |i|
29
+ Thread.start { process_queue(i) }.tap do |thread|
30
+ thread.name = "#{name} Worker ##{i}" if thread.respond_to?(:name=)
31
+ end
32
+ end
23
33
  trap("INT") { abort_threads }
24
34
  end
25
35
 
@@ -117,6 +117,12 @@ learn more about their operation in [bundle install(1)][bundle-install].
117
117
  * `ignore_messages` (`BUNDLE_IGNORE_MESSAGES`): When set, no post install
118
118
  messages will be printed. To silence a single gem, use dot notation like
119
119
  `ignore_messages.httparty true`.
120
+ * `retry` (`BUNDLE_RETRY`):
121
+ The number of times to retry failed network requests. Defaults to `3`.
122
+ * `redirect` (`BUNDLE_REDIRECT`):
123
+ The number of redirects allowed for network requests. Defaults to `5`.
124
+ * `timeout` (`BUNDLE_TIMEOUT`):
125
+ The seconds allowed before timing out for network requests. Defaults to `10`.
120
126
 
121
127
  In general, you should set these settings per-application by using the applicable
122
128
  flag to the [bundle install(1)][bundle-install] or [bundle package(1)][bundle-package] command.
data/man/bundle-gem.ronn CHANGED
@@ -24,13 +24,13 @@ configuration file using the following names:
24
24
 
25
25
  ## OPTIONS
26
26
 
27
- * `-b` or `--bin`:
28
- Specify that Bundler should create a binary (as `exe/GEM_NAME`) in the
29
- generated rubygem project. This binary will also be added to the
27
+ * `--exe` or `-b` or `--bin`:
28
+ Specify that Bundler should create a binary executable (as `exe/GEM_NAME`)
29
+ in the generated rubygem project. This binary will also be added to the
30
30
  `GEM_NAME.gemspec` manifest. This behavior is disabled by default.
31
31
 
32
- * `--no-bin`:
33
- Do not create a binary (overrides `--bin` specified in the global config).
32
+ * `--no-exe`:
33
+ Do not create a binary (overrides `--exe` specified in the global config).
34
34
 
35
35
  * `--coc`:
36
36
  Add a `CODE_OF_CONDUCT.md` file to the root of the generated project. If
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: 1.11.2
4
+ version: 1.12.0.pre.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2015-12-16 00:00:00.000000000 Z
14
+ date: 2016-02-09 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: automatiek
@@ -61,14 +61,14 @@ dependencies:
61
61
  requirements:
62
62
  - - "~>"
63
63
  - !ruby/object:Gem::Version
64
- version: '1.6'
64
+ version: 2.1.8
65
65
  type: :development
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - "~>"
70
70
  - !ruby/object:Gem::Version
71
- version: '1.6'
71
+ version: 2.1.8
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: ronn
74
74
  requirement: !ruby/object:Gem::Requirement
@@ -107,6 +107,7 @@ executables:
107
107
  extensions: []
108
108
  extra_rdoc_files: []
109
109
  files:
110
+ - ".codeclimate.yml"
110
111
  - ".gitignore"
111
112
  - ".rspec"
112
113
  - ".rubocop.yml"
@@ -164,13 +165,13 @@ files:
164
165
  - lib/bundler/errors.rb
165
166
  - lib/bundler/fetcher.rb
166
167
  - lib/bundler/fetcher/base.rb
168
+ - lib/bundler/fetcher/compact_index.rb
167
169
  - lib/bundler/fetcher/dependency.rb
168
170
  - lib/bundler/fetcher/downloader.rb
169
171
  - lib/bundler/fetcher/index.rb
170
172
  - lib/bundler/friendly_errors.rb
171
173
  - lib/bundler/gem_helper.rb
172
174
  - lib/bundler/gem_helpers.rb
173
- - lib/bundler/gem_path_manipulation.rb
174
175
  - lib/bundler/gem_remote_fetcher.rb
175
176
  - lib/bundler/gem_tasks.rb
176
177
  - lib/bundler/graph.rb
@@ -204,6 +205,8 @@ files:
204
205
  - lib/bundler/man/gemfile.5
205
206
  - lib/bundler/man/gemfile.5.txt
206
207
  - lib/bundler/match_platform.rb
208
+ - lib/bundler/mirror.rb
209
+ - lib/bundler/path_preserver.rb
207
210
  - lib/bundler/psyched_yaml.rb
208
211
  - lib/bundler/remote_specification.rb
209
212
  - lib/bundler/resolver.rb
@@ -264,6 +267,10 @@ files:
264
267
  - lib/bundler/ui/rg_proxy.rb
265
268
  - lib/bundler/ui/shell.rb
266
269
  - lib/bundler/ui/silent.rb
270
+ - lib/bundler/vendor/compact_index_client/lib/compact_index_client.rb
271
+ - lib/bundler/vendor/compact_index_client/lib/compact_index_client/cache.rb
272
+ - lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb
273
+ - lib/bundler/vendor/compact_index_client/lib/compact_index_client/version.rb
267
274
  - lib/bundler/vendor/molinillo/lib/molinillo.rb
268
275
  - lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb
269
276
  - lib/bundler/vendor/molinillo/lib/molinillo/errors.rb
@@ -345,8 +352,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
345
352
  version: 1.3.6
346
353
  requirements: []
347
354
  rubyforge_project:
348
- rubygems_version: 2.4.8
355
+ rubygems_version: 2.5.2
349
356
  signing_key:
350
357
  specification_version: 4
351
358
  summary: The best way to manage your application's dependencies
352
359
  test_files: []
360
+ has_rdoc:
@@ -1,8 +0,0 @@
1
- module Bundler
2
- def self.preserve_gem_path
3
- original_gem_path = ENV["_ORIGINAL_GEM_PATH"]
4
- gem_path = ENV["GEM_PATH"]
5
- ENV["_ORIGINAL_GEM_PATH"] = gem_path if original_gem_path.nil? || original_gem_path == ""
6
- ENV["GEM_PATH"] = original_gem_path if gem_path.nil? || gem_path == ""
7
- end
8
- end