bundler 1.10.0.pre → 1.10.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4128a621db3d926d6579de067a966664457734f
4
- data.tar.gz: b0629f20a391f86092ce149087566e1f16ed7991
3
+ metadata.gz: 21f13f887ed73b0848d65d47894abe47d8326666
4
+ data.tar.gz: 7af0af667a8a5f982f19339c7523976d8c7f7204
5
5
  SHA512:
6
- metadata.gz: 7000dfc488e2c0c88fd3e195803b2ba301004f97a91c1ab7c8d56a4b06391a7000a78f4b9cd429ede5be1d50d34e1e727cd363253ebae4478ef44fd922191d1b
7
- data.tar.gz: e4da7e38155cc47bb60b9727445d36974c19faee89bdaa596dc0d195a57cd69ca9aeb4002b2712e9009c05f7ce6c8061bac5cc271b87bcab016ed21ca249f12f
6
+ metadata.gz: faf27bd7e7ad2043c510ae311fc09dbdd9cc8d38010b4f6c5fc57ce28fc9b5acb721e23c58c099026a4e2e0b3787035458f933e6d35afec5cacca49f0051d7e6
7
+ data.tar.gz: c2a54f343a9e32d396b76ce22c7b1cf54a8c1a45b7a56ab6dfa839cd19385f58d1f62b2807340dae2a6d6242dd12869283346c23228ac0326e41db081823b8b1
@@ -1,3 +1,9 @@
1
+ ## 1.10.0.pre.1 (2015-05-05)
2
+
3
+ Bugfixes:
4
+
5
+ - always clean up tmp dirs (#3277, @hone, @indirect, @segiddins)
6
+
1
7
  ## 1.10.0.pre (2015-05-03)
2
8
 
3
9
  Features:
@@ -206,13 +206,11 @@ module Bundler
206
206
  end
207
207
 
208
208
  def tmp(name = Process.pid.to_s)
209
- @tmp ||= Pathname.new Dir.mktmpdir("bundler")
210
- @tmp.join(name)
209
+ Pathname.new(Dir.mktmpdir(["bundler", name]))
211
210
  end
212
211
 
213
- def cleanup
214
- FileUtils.remove_entry_secure(@tmp) if defined?(@tmp) && @tmp
215
- rescue
212
+ def rm_rf(path)
213
+ FileUtils.remove_entry_secure(path) if path && File.exist?(path)
216
214
  end
217
215
 
218
216
  def settings
@@ -11,8 +11,6 @@ module Bundler
11
11
  rescue Exception => e
12
12
  Bundler.ui = UI::Shell.new
13
13
  raise e
14
- ensure
15
- Bundler.cleanup
16
14
  end
17
15
 
18
16
  def initialize(*args)
@@ -249,6 +249,16 @@ module Bundler
249
249
  return
250
250
  end
251
251
 
252
+ if @locked_bundler_version
253
+ locked_major = @locked_bundler_version.segments.first
254
+ current_major = Gem::Version.create(Bundler::VERSION).segments.first
255
+
256
+ if locked_major < current_major
257
+ Bundler.ui.warn "Warning: the lockfile is being updated to Bundler #{Bundler::VERSION.split('.').first}, " \
258
+ "after which you will be unable to return to Bundler #{@locked_bundler_version.segments.first}."
259
+ end
260
+ end
261
+
252
262
  File.open(file, 'wb'){|f| f.puts(contents) }
253
263
  rescue Errno::EACCES
254
264
  raise Bundler::InstallError,
@@ -60,11 +60,17 @@ module Bundler
60
60
  def warn_for_outdated_bundler_version
61
61
  return unless bundler_version
62
62
  prerelease_text = bundler_version.prerelease? ? " --pre" : ""
63
- if Gem::Version.new(Bundler::VERSION) < Gem::Version.new(bundler_version)
64
- Bundler.ui.warn "Warning: the running version of Bundler is older " \
65
- "than the version that created the lockfile. We suggest you " \
66
- "upgrade to the latest version of Bundler by running `gem " \
67
- "install bundler#{prerelease_text}`.\n"
63
+ current_version = Gem::Version.create(Bundler::VERSION)
64
+ case current_version.segments.first <=> bundler_version.segments.first
65
+ when -1
66
+ raise LockfileError, "You must use Bundler #{bundler_version.segments.first} or greater with this lockfile."
67
+ when 0
68
+ if current_version < bundler_version
69
+ Bundler.ui.warn "Warning: the running version of Bundler is older " \
70
+ "than the version that created the lockfile. We suggest you " \
71
+ "upgrade to the latest version of Bundler by running `gem " \
72
+ "install bundler#{prerelease_text}`.\n"
73
+ end
68
74
  end
69
75
  end
70
76
 
@@ -7,31 +7,34 @@ module Bundler
7
7
 
8
8
  def initialize(spec, options = {})
9
9
  @spec = spec
10
- @tmp_bin_dir = "#{Bundler.tmp(spec.full_name)}/bin"
11
- @gem_bin_dir = "#{Bundler.rubygems.gem_dir}/bin"
12
- @bin_dir = Bundler.requires_sudo? ? @tmp_bin_dir : @gem_bin_dir
13
10
  @gem_dir = Bundler.rubygems.path(spec.full_gem_path)
14
- @wrappers = options[:wrappers] || true
15
- @env_shebang = options[:env_shebang] || true
11
+ @wrappers = true
12
+ @env_shebang = true
16
13
  @format_executable = options[:format_executable] || false
17
14
  @build_args = options[:build_args] || Bundler.rubygems.build_args
15
+ @gem_bin_dir = "#{Bundler.rubygems.gem_dir}/bin"
16
+
17
+ if Bundler.requires_sudo?
18
+ @tmp_dir = Bundler.tmp(spec.full_name).to_s
19
+ @bin_dir = "#{@tmp_dir}/bin"
20
+ else
21
+ @bin_dir = @gem_bin_dir
22
+ end
18
23
  end
19
24
 
20
25
  def generate_bin
21
26
  return if spec.executables.nil? || spec.executables.empty?
22
27
 
23
- if Bundler.requires_sudo?
24
- FileUtils.mkdir_p(@tmp_bin_dir) unless File.exist?(@tmp_bin_dir)
25
- end
26
-
27
28
  super
28
29
 
29
30
  if Bundler.requires_sudo?
30
31
  Bundler.mkdir_p @gem_bin_dir
31
32
  spec.executables.each do |exe|
32
- Bundler.sudo "cp -R #{@tmp_bin_dir}/#{exe} #{@gem_bin_dir}"
33
+ Bundler.sudo "cp -R #{@bin_dir}/#{exe} #{@gem_bin_dir}"
33
34
  end
34
35
  end
36
+ ensure
37
+ Bundler.rm_rf(@tmp_dir) if Bundler.requires_sudo?
35
38
  end
36
39
  end
37
40
 
@@ -160,9 +160,7 @@ module Bundler
160
160
  spec.loaded_from = loaded_from(spec)
161
161
  ["Installing #{version_message(spec)}", spec.post_install_message]
162
162
  ensure
163
- if install_path && Bundler.requires_sudo?
164
- FileUtils.remove_entry_secure(install_path)
165
- end
163
+ Bundler.rm_rf(install_path) if Bundler.requires_sudo?
166
164
  end
167
165
 
168
166
  def cache(spec, custom_path = nil)
@@ -392,10 +390,12 @@ module Bundler
392
390
 
393
391
  if Bundler.requires_sudo?
394
392
  Bundler.mkdir_p "#{Bundler.rubygems.gem_dir}/cache"
395
- Bundler.sudo "mv #{Bundler.tmp(spec.full_name)}/cache/#{spec.full_name}.gem #{gem_path}"
393
+ Bundler.sudo "mv #{download_path}/cache/#{spec.full_name}.gem #{gem_path}"
396
394
  end
397
395
 
398
396
  gem_path
397
+ ensure
398
+ Bundler.rm_rf(download_path) if Bundler.requires_sudo?
399
399
  end
400
400
 
401
401
  def builtin_gem?(spec)
@@ -2,5 +2,5 @@ module Bundler
2
2
  # We're doing this because we might write tests that deal
3
3
  # with other versions of bundler and we are unsure how to
4
4
  # handle this better.
5
- VERSION = "1.10.0.pre" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.10.0.pre.1" unless defined?(::Bundler::VERSION)
6
6
  end
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.10.0.pre
4
+ version: 1.10.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: bin
13
13
  cert_chain: []
14
- date: 2015-05-03 00:00:00.000000000 Z
14
+ date: 2015-05-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: mustache