rubygems-update 2.7.6 → 2.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -23
  3. data/History.txt +53 -0
  4. data/Manifest.txt +1 -0
  5. data/bundler/CHANGELOG.md +50 -0
  6. data/bundler/README.md +4 -0
  7. data/bundler/lib/bundler.rb +2 -2
  8. data/bundler/lib/bundler/cli.rb +2 -0
  9. data/bundler/lib/bundler/cli/check.rb +1 -1
  10. data/bundler/lib/bundler/cli/exec.rb +3 -4
  11. data/bundler/lib/bundler/cli/gem.rb +5 -2
  12. data/bundler/lib/bundler/cli/init.rb +5 -0
  13. data/bundler/lib/bundler/cli/install.rb +2 -2
  14. data/bundler/lib/bundler/cli/outdated.rb +1 -1
  15. data/bundler/lib/bundler/compact_index_client/updater.rb +10 -1
  16. data/bundler/lib/bundler/definition.rb +16 -11
  17. data/bundler/lib/bundler/fetcher.rb +2 -2
  18. data/bundler/lib/bundler/fetcher/index.rb +2 -2
  19. data/bundler/lib/bundler/friendly_errors.rb +2 -0
  20. data/bundler/lib/bundler/injector.rb +4 -4
  21. data/bundler/lib/bundler/installer.rb +12 -4
  22. data/bundler/lib/bundler/installer/gem_installer.rb +6 -1
  23. data/bundler/lib/bundler/plugin/index.rb +6 -1
  24. data/bundler/lib/bundler/resolver/spec_group.rb +0 -1
  25. data/bundler/lib/bundler/rubygems_integration.rb +9 -3
  26. data/bundler/lib/bundler/runtime.rb +1 -1
  27. data/bundler/lib/bundler/source/git.rb +2 -1
  28. data/bundler/lib/bundler/source/git/git_proxy.rb +6 -1
  29. data/bundler/lib/bundler/source/rubygems.rb +6 -1
  30. data/bundler/lib/bundler/spec_set.rb +4 -1
  31. data/bundler/lib/bundler/templates/Executable +1 -1
  32. data/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +4 -2
  33. data/bundler/lib/bundler/ui/shell.rb +3 -1
  34. data/bundler/lib/bundler/version.rb +1 -1
  35. data/bundler/man/bundle-binstubs.ronn +3 -3
  36. data/bundler/man/bundle-check.ronn +3 -3
  37. data/bundler/man/bundle-config.ronn +13 -9
  38. data/bundler/man/bundle-doctor.ronn +33 -0
  39. data/bundler/man/bundle-exec.ronn +3 -3
  40. data/bundler/man/bundle-gem.ronn +1 -1
  41. data/bundler/man/bundle-init.ronn +15 -4
  42. data/bundler/man/bundle-inject.ronn +3 -3
  43. data/bundler/man/bundle-install.ronn +1 -1
  44. data/bundler/man/bundle-lock.ronn +1 -1
  45. data/bundler/man/bundle-outdated.ronn +1 -1
  46. data/bundler/man/bundle-package.ronn +3 -3
  47. data/bundler/man/bundle-show.ronn +2 -2
  48. data/bundler/man/bundle-update.ronn +8 -8
  49. data/bundler/man/bundle-viz.ronn +1 -1
  50. data/bundler/man/bundle.ronn +25 -25
  51. data/bundler/man/gemfile.5.ronn +3 -3
  52. data/lib/rubygems.rb +21 -3
  53. data/lib/rubygems/bundler_version_finder.rb +5 -1
  54. data/lib/rubygems/commands/push_command.rb +1 -1
  55. data/lib/rubygems/commands/setup_command.rb +3 -3
  56. data/lib/rubygems/commands/unpack_command.rb +1 -1
  57. data/lib/rubygems/dependency.rb +1 -0
  58. data/lib/rubygems/dependency_installer.rb +4 -2
  59. data/lib/rubygems/exceptions.rb +5 -1
  60. data/lib/rubygems/indexer.rb +1 -1
  61. data/lib/rubygems/installer.rb +5 -1
  62. data/lib/rubygems/package.rb +10 -2
  63. data/lib/rubygems/remote_fetcher.rb +1 -1
  64. data/lib/rubygems/request_set.rb +3 -1
  65. data/lib/rubygems/server.rb +3 -3
  66. data/lib/rubygems/source.rb +1 -1
  67. data/lib/rubygems/specification.rb +7 -10
  68. data/lib/rubygems/test_case.rb +21 -3
  69. data/lib/rubygems/test_utilities.rb +1 -1
  70. data/lib/rubygems/user_interaction.rb +4 -0
  71. data/lib/rubygems/version.rb +1 -0
  72. data/lib/ubygems.rb +3 -0
  73. data/test/rubygems/test_gem.rb +7 -7
  74. data/test/rubygems/test_gem_commands_setup_command.rb +6 -1
  75. data/test/rubygems/test_gem_package.rb +54 -5
  76. data/test/rubygems/test_gem_package_tar_header.rb +2 -1
  77. data/test/rubygems/test_gem_remote_fetcher.rb +1 -1
  78. data/test/rubygems/test_gem_security_policy.rb +3 -3
  79. data/test/rubygems/test_gem_server.rb +12 -12
  80. data/test/rubygems/test_gem_specification.rb +1 -1
  81. data/test/rubygems/test_gem_util.rb +4 -2
  82. data/test/rubygems/test_gem_version.rb +1 -0
  83. data/util/ci +1 -0
  84. metadata +6 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0fa366bda5b1ed46730b8c276ce161ef32966ec9dde14f974663508163df41da
4
- data.tar.gz: 76d8c2583652ec7266303e5af81014b7b6c440ff207e1d4cbe483959226db55d
3
+ metadata.gz: 8894c9873527e4af5cc83ac8aded3cee104bcc856ca20bb56fc1323b42505e12
4
+ data.tar.gz: 931f155a8de59dd9b17423356e1dc0de54f3cf5b40bbe5eae801c884420a9407
5
5
  SHA512:
6
- metadata.gz: cd712f404f5e736191c312af58dafdfe897e155b9cdec68a634547606846bb31bae7cdefc46ace35eb143db7f8281c20092a534a7ccb94760ad5701d8c0ca06f
7
- data.tar.gz: 1d80df8990549a07c91d94c5e848141f72045a71046ef0a3be5b871e8af9f0909187b196d117b6c508ec9fd0c9238a0ed96e4f9a8c7f6a9f6b59feac8a7df25b
6
+ metadata.gz: 2b23ba224604b357bb71d7f0aff9bb7e73979bb53c59310ef70566e8df2bbaca3c3aec46961cfdd38262baba89af52c8131a4d3eecc50470b2181c52b8db340d
7
+ data.tar.gz: e1632f7987dbd4eaa50704237ea7b78cb952ca6f775ed4613399c7b4797e0fb92402a1af7ea4f4cd39e38065c4883a4ba0acc07086ee908d0eb6e50ad356e497
@@ -28,28 +28,7 @@ env:
28
28
  - "TEST_TOOL=rubygems YAML=psych"
29
29
  - "TEST_TOOL=bundler RGV=master"
30
30
  script:
31
- - util/ci script
31
+ - util/ci script
32
32
  matrix:
33
- exclude:
34
- - rvm: 1.8.7
35
- env: "TEST_TOOL=rubygems YAML=psych"
36
- - rvm: 1.9.2
37
- env: "TEST_TOOL=bundler RGV=master"
38
- - rvm: 2.0.0
39
- env: "TEST_TOOL=rubygems YAML=syck"
40
- - rvm: 2.1.10
41
- env: "TEST_TOOL=rubygems YAML=syck"
42
- - rvm: 2.2.9
43
- env: "TEST_TOOL=rubygems YAML=syck"
44
- - rvm: 2.3.6
45
- env: "TEST_TOOL=rubygems YAML=syck"
46
- - rvm: 2.4.3
47
- env: "TEST_TOOL=rubygems YAML=syck"
48
- - rvm: 2.5.0
49
- env: "TEST_TOOL=rubygems YAML=syck"
50
- - rvm: ruby-head
51
- env: "TEST_TOOL=rubygems YAML=syck"
52
33
  allow_failures:
53
- - rvm: ruby-head
54
- - rvm: 2.5.0
55
- env: "TEST_TOOL=rubygems YAML=psych"
34
+ - env: "TEST_TOOL=bundler RGV=master"
@@ -1,5 +1,44 @@
1
1
  # coding: UTF-8
2
2
 
3
+ === 2.7.7 / 2018-05-08
4
+
5
+ Minor enhancements:
6
+
7
+ * [RequestSet] Only suggest a gem version with an installable platform.
8
+ Pull request #2175 by Samuel Giddins.
9
+ * Fixed no assignment variables about default gems installation. Pull
10
+ request #2181 by SHIBATA Hiroshi.
11
+ * Backport improvements for test-case from Ruby core. Pull request #2189
12
+ by SHIBATA Hiroshi.
13
+ * Fix ruby warnings in test suite. Pull request #2205 by Colby Swandale.
14
+ * To use Gem::Specification#bindir of bundler instead of hard coded path.
15
+ Pull request #2208 by SHIBATA Hiroshi.
16
+ * Update gem push --help description. Pull request #2215 by Luis
17
+ Sagastume.
18
+ * Backport ruby core commits. Pull request #2264 by SHIBATA Hiroshi.
19
+
20
+ Bug fixes:
21
+
22
+ * Frozen string fix - lib/rubygems/bundler_version_finder.rb. Pull request
23
+ #2115 by MSP-Greg.
24
+ * Fixed tempfile leak for RubyGems 2.7.6. Pull request #2194 by SHIBATA
25
+ Hiroshi.
26
+ * Add missing requires. Pull request #2196 by David Rodríguez.
27
+ * Fix Gem::Version.correct?. Pull request #2203 by Masato Nakamura.
28
+ * Fix verify_entry regex for metadata. Pull request #2212 by Luis
29
+ Sagastume.
30
+ * Fix path checks for case insensitive filesystem. Pull request #2211 by
31
+ Lars Kanis.
32
+
33
+ Compatibility changes:
34
+
35
+ * Deprecate unused code before removing them at #1524. Pull request #2197
36
+ by SHIBATA Hiroshi.
37
+ * Deprecate for rubygems 3. Pull request #2214 by SHIBATA Hiroshi.
38
+ * Mark deprecation to `ubygems.rb` for RubyGems 4. Pull request #2269 by
39
+ SHIBATA Hiroshi.
40
+ * Update bundler-1.16.2. Pull request #2291 by SHIBATA Hiroshi.
41
+
3
42
  === 2.7.6 / 2018-02-16
4
43
 
5
44
  Security fixes:
@@ -19,6 +58,20 @@ Security fixes:
19
58
  * Prevent Path Traversal issue during gem installation.
20
59
  Discovered by nmalkin.
21
60
 
61
+ === 2.7.5
62
+
63
+ Bug fixes:
64
+
65
+ * To use bundler-1.16.1 #2121 by SHIBATA Hiroshi.
66
+ * Fixed leaked FDs. Pull request #2127 by Nobuyoshi Nakada.
67
+ * Support option for `--destdir` with upgrade installer. #2169 by Thibault Jouan.
68
+ * Remove PID from gem index directory. #2155 by SHIBATA Hiroshi.
69
+ * Avoid a #mkdir race condition #2148 by Samuel Giddins.
70
+ * Gem::Util.traverse_parents should not crash on permissions error #2147 by Robert Ulejczyk.
71
+ * Use `File.open` instead of `open`. #2142 by SHIBATA Hiroshi.
72
+ * Set whether bundler is used for gemdeps with an environmental variable #2126 by SHIBATA Hiroshi.
73
+ * Fix undefined method error when printing alert #1884 by Robert Ross.
74
+
22
75
  === 2.7.4
23
76
 
24
77
  Bug fixes:
@@ -247,6 +247,7 @@ bundler/man/bundle-binstubs.ronn
247
247
  bundler/man/bundle-check.ronn
248
248
  bundler/man/bundle-clean.ronn
249
249
  bundler/man/bundle-config.ronn
250
+ bundler/man/bundle-doctor.ronn
250
251
  bundler/man/bundle-exec.ronn
251
252
  bundler/man/bundle-gem.ronn
252
253
  bundler/man/bundle-info.ronn
@@ -1,3 +1,53 @@
1
+ ## 1.16.2 (2018-04-20)
2
+
3
+ Changes:
4
+
5
+ - Include the gem's source in the gem install error message when available (@papanikge)
6
+ - Remove unnecessary executable bit from gem template (@voxik)
7
+ - Dont add the timestamp comment with gems added to the Gemfile via `bundle add` ([#6193](https://github.com/bundler/bundler/issues/6193), @cpgo)
8
+ - Improve yanked gem error message (@alyssais)
9
+ - Use `Bundler.rubygems.inflate` instead of the Gem::Util method directly (@segiddins)
10
+ - Remove unused instance variable (@segiddins)
11
+
12
+ Bugfixes:
13
+
14
+ - Only trap INT signal and have Ruby's signal default handler be invoked (@shayonj)
15
+ - Fix warning about the use of `__FILE__` in RubyGems integration testing (@MSP-Greg)
16
+ - Skip the outdated bundler check when MD5 is not available ([#6032](https://github.com/bundler/bundler/issues/6032), @segiddins)
17
+ - Fallback to the original error if the friendly message raises (@segiddins)
18
+ - Rename Bundler.frozen? to avoid Object method conflict ([#6252](https://github.com/bundler/bundler/issues/6252), @segiddins)
19
+ - Ensure the bindir exists before installing gems (@segiddins)
20
+ - Handle gzip corruption errors in the compact index client ([#6261](https://github.com/bundler/bundler/issues/6261), @colby-swandale)
21
+ - Check if the current directory is writeable when writing files in `bundle gem` ([#6219](https://github.com/bundler/bundler/issues/6219), @nilsding)
22
+ - Fix hang when gemspec has incompatible encoding (@deivid-rodriguez)
23
+ - Gracefully handle when the lockfile is missing spec entries for the current platform ([#6079](https://github.com/bundler/bundler/issues/6079), @segiddins)
24
+ - Use Gem::Util.inflate instead of Gem.inflate (@hsbt)
25
+ - Update binstub generator to use new ERB.new arity in Ruby 2.6 (@koic)
26
+ - Fix `source_location` call in rubygems integration (@MSP-Greg)
27
+ - Use `filesystem_access` when copying files in Compact Index Updater ([#6289](https://github.com/bundler/bundler/issues/6289), @segiddins)
28
+ - Fail gracefully when resetting git gems to the given revision fails ([#6324](https://github.com/bundler/bundler/issues/6324), @segiddins)
29
+ - Handle exceptions that do not have a backtrace ([#6342](https://github.com/bundler/bundler/issues/6342), @nesaulov)
30
+ - Check if stderr was closed before writing to it (@shime)
31
+ - Handle updating a specific gem for a non-local platform ([#6350](https://github.com/bundler/bundler/issues/6350), @greysteil)
32
+ - Bump the `bundle_binstub` check-length to 300 characters (@tduffield)
33
+ - Fix specifying alterntive Lockfile with `bundle lock` when default gemfile is present ([#6460](https://github.com/bundler/bundler/issues/6460), @agrim123)
34
+ - Allow installing dependencies when the path is set to `.` ([#6475](https://github.com/bundler/bundler/issues/6475), @segiddins)
35
+ - Support Bundler installing on a readonly filesystem without a home directory ([#6461](https://github.com/bundler/bundler/issues/6461), @grosser)
36
+ - Filter git uri credentials in source description (@segiddins)
37
+
38
+ Documentation:
39
+
40
+ - Correct typos in `bundle binstubs` man page (@erikj, @samueloph)
41
+ - Update links in `bundle gem` command documentation to use https (@KrauseFx)
42
+ - Fix broken links between bundler man pages (@segiddins)
43
+ - Add man page for the `bundle doctor` command ([#6243](https://github.com/bundler/bundler/issues/6243), @nholden)
44
+ - Document `# frozen_string_literal` in `bundle init` Gemfile (@315tky)
45
+ - Explain the gemspec files attribute in `bundle gem` template and print a link to bundler.io guides when running `bundle gem` ([#6246](https://github.com/bundler/bundler/issues/6246), @nesaulov)
46
+ - Small copy tweaks & removed redundant phrasing in the bundler man page (@rubymorillo)
47
+ - Improve the documentation of the settings load order in Bundler (@rubymorillo)
48
+ - Added license info to main README (@rubymorillo)
49
+ - Document parameters and return value of Injector#inject (@tobias-grasse)
50
+
1
51
  ## 1.16.1 (2017-12-12)
2
52
 
3
53
  Bugfixes:
@@ -57,3 +57,7 @@ While some Bundler contributors are compensated by Ruby Together, the project ma
57
57
  ### Code of Conduct
58
58
 
59
59
  Everyone interacting in the Bundler project’s codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [Bundler code of conduct](https://github.com/bundler/bundler/blob/master/CODE_OF_CONDUCT.md).
60
+
61
+ ### License
62
+
63
+ [MIT License](https://github.com/bundler/bundler/blob/master/LICENSE.md)
@@ -136,7 +136,7 @@ module Bundler
136
136
  end
137
137
  end
138
138
 
139
- def frozen?
139
+ def frozen_bundle?
140
140
  frozen = settings[:deployment]
141
141
  frozen ||= settings[:frozen] unless feature_flag.deployment_means_frozen?
142
142
  frozen
@@ -427,7 +427,7 @@ EOF
427
427
 
428
428
  def load_gemspec_uncached(file, validate = false)
429
429
  path = Pathname.new(file)
430
- contents = path.read
430
+ contents = read_file(file)
431
431
  spec = if contents.start_with?("---") # YAML header
432
432
  eval_yaml_gemspec(path, contents)
433
433
  else
@@ -717,6 +717,8 @@ module Bundler
717
717
  command_name = current_command.name
718
718
  return if PARSEABLE_COMMANDS.include?(command_name)
719
719
 
720
+ return unless SharedHelpers.md5_available?
721
+
720
722
  latest = Fetcher::CompactIndex.
721
723
  new(nil, Source::Rubygems::Remote.new(URI("https://rubygems.org")), nil).
722
724
  send(:compact_index_client).
@@ -26,7 +26,7 @@ module Bundler
26
26
  not_installed.each {|s| Bundler.ui.error " * #{s.name} (#{s.version})" }
27
27
  Bundler.ui.warn "Install missing gems with `bundle install`"
28
28
  exit 1
29
- elsif !Bundler.default_lockfile.file? && Bundler.frozen?
29
+ elsif !Bundler.default_lockfile.file? && Bundler.frozen_bundle?
30
30
  Bundler.ui.error "This bundle has been frozen, but there is no #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} present"
31
31
  exit 1
32
32
  else
@@ -6,7 +6,7 @@ module Bundler
6
6
  class CLI::Exec
7
7
  attr_reader :options, :args, :cmd
8
8
 
9
- RESERVED_SIGNALS = %w[SEGV BUS ILL FPE VTALRM KILL STOP].freeze
9
+ TRAPPED_SIGNALS = %w[INT].freeze
10
10
 
11
11
  def initialize(options, args)
12
12
  @options = options
@@ -70,15 +70,14 @@ module Bundler
70
70
  ui = Bundler.ui
71
71
  Bundler.ui = nil
72
72
  require "bundler/setup"
73
- signals = Signal.list.keys - RESERVED_SIGNALS
74
- signals.each {|s| trap(s, "DEFAULT") }
73
+ TRAPPED_SIGNALS.each {|s| trap(s, "DEFAULT") }
75
74
  Kernel.load(file)
76
75
  rescue SystemExit, SignalException
77
76
  raise
78
77
  rescue Exception => e # rubocop:disable Lint/RescueException
79
78
  Bundler.ui = ui
80
79
  Bundler.ui.error "bundler: failed to load command: #{cmd} (#{file})"
81
- backtrace = e.backtrace.take_while {|bt| !bt.start_with?(__FILE__) }
80
+ backtrace = e.backtrace ? e.backtrace.take_while {|bt| !bt.start_with?(__FILE__) } : []
82
81
  abort "#{e.class}: #{e.message}\n #{backtrace.join("\n ")}"
83
82
  end
84
83
 
@@ -105,7 +105,7 @@ module Bundler
105
105
  if ask_and_set(:mit, "Do you want to license your code permissively under the MIT license?",
106
106
  "This means that any other developer or company will be legally allowed to use your code " \
107
107
  "for free as long as they admit you created it. You can read more about the MIT license " \
108
- "at http://choosealicense.com/licenses/mit.")
108
+ "at https://choosealicense.com/licenses/mit.")
109
109
  config[:mit] = true
110
110
  Bundler.ui.info "MIT License enabled in config"
111
111
  templates.merge!("LICENSE.txt.tt" => "LICENSE.txt")
@@ -118,7 +118,7 @@ module Bundler
118
118
  "of enforcing it, so be sure that you are prepared to do that. Be sure that your email " \
119
119
  "address is specified as a contact in the generated code of conduct so that people know " \
120
120
  "who to contact in case of a violation. For suggestions about " \
121
- "how to enforce codes of conduct, see http://bit.ly/coc-enforcement.")
121
+ "how to enforce codes of conduct, see https://bit.ly/coc-enforcement.")
122
122
  config[:coc] = true
123
123
  Bundler.ui.info "Code of conduct enabled in config"
124
124
  templates.merge!("CODE_OF_CONDUCT.md.tt" => "CODE_OF_CONDUCT.md")
@@ -158,6 +158,9 @@ module Bundler
158
158
 
159
159
  # Open gemspec in editor
160
160
  open_editor(options["edit"], target.join("#{name}.gemspec")) if options[:edit]
161
+
162
+ Bundler.ui.info "Gem '#{name}' was successfully created. " \
163
+ "For more information on making a RubyGem visit https://bundler.io/guides/creating_gem.html"
161
164
  rescue Errno::EEXIST => e
162
165
  raise GenericSystemCallError.new(e, "There was a conflict while creating the new gem.")
163
166
  end
@@ -13,6 +13,11 @@ module Bundler
13
13
  exit 1
14
14
  end
15
15
 
16
+ unless File.writable?(Dir.pwd)
17
+ Bundler.ui.error "Can not create #{gemfile} as the current directory is not writable."
18
+ exit 1
19
+ end
20
+
16
21
  if options[:gemspec]
17
22
  gemspec = File.expand_path(options[:gemspec])
18
23
  unless File.exist?(gemspec)
@@ -23,7 +23,7 @@ module Bundler
23
23
 
24
24
  check_trust_policy
25
25
 
26
- if options[:deployment] || options[:frozen] || Bundler.frozen?
26
+ if options[:deployment] || options[:frozen] || Bundler.frozen_bundle?
27
27
  unless Bundler.default_lockfile.exist?
28
28
  flag = "--deployment flag" if options[:deployment]
29
29
  flag ||= "--frozen flag" if options[:frozen]
@@ -63,7 +63,7 @@ module Bundler
63
63
  definition.validate_runtime!
64
64
 
65
65
  installer = Installer.install(Bundler.root, definition, options)
66
- Bundler.load.cache if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.frozen?
66
+ Bundler.load.cache if Bundler.app_cache.exist? && !options["no-cache"] && !Bundler.frozen_bundle?
67
67
 
68
68
  Bundler.ui.confirm "Bundle complete! #{dependencies_count_for(definition)}, #{gems_installed_for(definition)}."
69
69
  Bundler::CLI::Common.output_without_groups_message
@@ -213,7 +213,7 @@ module Bundler
213
213
  end
214
214
 
215
215
  def check_for_deployment_mode
216
- return unless Bundler.frozen?
216
+ return unless Bundler.frozen_bundle?
217
217
  suggested_command = if Bundler.settings.locations("frozen")[:global]
218
218
  "bundle config --delete frozen"
219
219
  elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any?
@@ -33,7 +33,9 @@ module Bundler
33
33
 
34
34
  # first try to fetch any new bytes on the existing file
35
35
  if retrying.nil? && local_path.file?
36
- FileUtils.cp local_path, local_temp_path
36
+ SharedHelpers.filesystem_access(local_temp_path) do
37
+ FileUtils.cp local_path, local_temp_path
38
+ end
37
39
  headers["If-None-Match"] = etag_for(local_temp_path)
38
40
  headers["Range"] =
39
41
  if local_temp_path.size.nonzero?
@@ -78,6 +80,13 @@ module Bundler
78
80
 
79
81
  update(local_path, remote_path, :retrying)
80
82
  end
83
+ rescue Errno::EACCES
84
+ raise Bundler::PermissionError,
85
+ "Bundler does not have write access to create a temp directory " \
86
+ "within #{Dir.tmpdir}. Bundler must have write access to your " \
87
+ "systems temp directory to function properly. "
88
+ rescue Zlib::GzipFile::Error
89
+ raise Bundler::HTTPError
81
90
  end
82
91
 
83
92
  def etag_for(path)
@@ -77,6 +77,7 @@ module Bundler
77
77
  @lockfile_contents = String.new
78
78
  @locked_bundler_version = nil
79
79
  @locked_ruby_version = nil
80
+ @locked_specs_incomplete_for_platform = false
80
81
 
81
82
  if lockfile && File.exist?(lockfile)
82
83
  @lockfile_contents = Bundler.read_file(lockfile)
@@ -113,15 +114,15 @@ module Bundler
113
114
  end
114
115
  @unlocking ||= @unlock[:ruby] ||= (!@locked_ruby_version ^ !@ruby_version)
115
116
 
116
- add_current_platform unless Bundler.frozen?
117
+ add_current_platform unless Bundler.frozen_bundle?
117
118
 
118
119
  converge_path_sources_to_gemspec_sources
119
120
  @path_changes = converge_paths
120
121
  @source_changes = converge_sources
121
122
 
122
123
  unless @unlock[:lock_shared_dependencies]
123
- eager_unlock = expand_dependencies(@unlock[:gems])
124
- @unlock[:gems] = @locked_specs.for(eager_unlock).map(&:name)
124
+ eager_unlock = expand_dependencies(@unlock[:gems], true)
125
+ @unlock[:gems] = @locked_specs.for(eager_unlock, [], false, false, false).map(&:name)
125
126
  end
126
127
 
127
128
  @gem_version_promoter = create_gem_version_promoter
@@ -175,7 +176,7 @@ module Bundler
175
176
  raise GemNotFound, "Your bundle is locked to #{locked_gem}, but that version could not " \
176
177
  "be found in any of the sources listed in your Gemfile. If you haven't changed sources, " \
177
178
  "that means the author of #{locked_gem} has removed it. You'll need to update your bundle " \
178
- "to a different version of #{locked_gem} that hasn't been removed in order to install."
179
+ "to a version other than #{locked_gem} that hasn't been removed in order to install."
179
180
  end
180
181
  unless specs["bundler"].any?
181
182
  bundler = sources.metadata_source.specs.search(Gem::Dependency.new("bundler", VERSION)).last
@@ -245,7 +246,7 @@ module Bundler
245
246
  def resolve
246
247
  @resolve ||= begin
247
248
  last_resolve = converge_locked_specs
248
- if Bundler.frozen?
249
+ if Bundler.frozen_bundle?
249
250
  Bundler.ui.debug "Frozen, using resolution from the lockfile"
250
251
  last_resolve
251
252
  elsif !unlocking? && nothing_changed?
@@ -336,10 +337,11 @@ module Bundler
336
337
  end
337
338
  end
338
339
 
339
- preserve_unknown_sections ||= !updating_major && (Bundler.frozen? || !(unlocking? || @unlocking_bundler))
340
- return if lockfiles_equal?(@lockfile_contents, contents, preserve_unknown_sections)
340
+ preserve_unknown_sections ||= !updating_major && (Bundler.frozen_bundle? || !(unlocking? || @unlocking_bundler))
341
341
 
342
- if Bundler.frozen?
342
+ return if file && File.exist?(file) && lockfiles_equal?(@lockfile_contents, contents, preserve_unknown_sections)
343
+
344
+ if Bundler.frozen_bundle?
343
345
  Bundler.ui.error "Cannot write a changed lockfile while frozen."
344
346
  return
345
347
  end
@@ -530,7 +532,7 @@ module Bundler
530
532
  private :sources
531
533
 
532
534
  def nothing_changed?
533
- !@source_changes && !@dependency_changes && !@new_platform && !@path_changes && !@local_changes
535
+ !@source_changes && !@dependency_changes && !@new_platform && !@path_changes && !@local_changes && !@locked_specs_incomplete_for_platform
534
536
  end
535
537
 
536
538
  def unlocking?
@@ -557,6 +559,7 @@ module Bundler
557
559
  [@new_platform, "you added a new platform to your gemfile"],
558
560
  [@path_changes, "the gemspecs for path gems changed"],
559
561
  [@local_changes, "the gemspecs for git local gems changed"],
562
+ [@locked_specs_incomplete_for_platform, "the lockfile does not have all gems needed for the current platform"],
560
563
  ].select(&:first).map(&:last).join(", ")
561
564
  end
562
565
 
@@ -682,7 +685,7 @@ module Bundler
682
685
  end
683
686
 
684
687
  def converge_dependencies
685
- frozen = Bundler.frozen?
688
+ frozen = Bundler.frozen_bundle?
686
689
  (@dependencies + @locked_deps.values).each do |dep|
687
690
  locked_source = @locked_deps[dep.name]
688
691
  # This is to make sure that if bundler is installing in deployment mode and
@@ -803,7 +806,9 @@ module Bundler
803
806
  end
804
807
 
805
808
  resolve = SpecSet.new(converged)
806
- resolve = resolve.for(expand_dependencies(deps, true), @unlock[:gems], false, false, false)
809
+ expanded_deps = expand_dependencies(deps, true)
810
+ @locked_specs_incomplete_for_platform = !resolve.for(expanded_deps, @unlock[:gems], true, true)
811
+ resolve = resolve.for(expanded_deps, @unlock[:gems], false, false, false)
807
812
  diff = nil
808
813
 
809
814
  # Now, we unlock any sources that do not have anymore gems pinned to it
@@ -96,11 +96,11 @@ module Bundler
96
96
 
97
97
  uri = URI.parse("#{remote_uri}#{Gem::MARSHAL_SPEC_DIR}#{spec_file_name}.rz")
98
98
  if uri.scheme == "file"
99
- Bundler.load_marshal Gem.inflate(Gem.read_binary(uri.path))
99
+ Bundler.load_marshal Bundler.rubygems.inflate(Gem.read_binary(uri.path))
100
100
  elsif cached_spec_path = gemspec_cached_path(spec_file_name)
101
101
  Bundler.load_gemspec(cached_spec_path)
102
102
  else
103
- Bundler.load_marshal Gem.inflate(downloader.fetch(uri).body)
103
+ Bundler.load_marshal Bundler.rubygems.inflate(downloader.fetch(uri).body)
104
104
  end
105
105
  rescue MarshalError
106
106
  raise HTTPError, "Gemspec #{spec} contained invalid data.\n" \