bundler 1.9.6 → 1.9.7

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: 553a69b15deef7d959ae0290d04daa23e0caa732
4
- data.tar.gz: 221e5cb9211137431446b472826c5494d808a7ab
3
+ metadata.gz: 9da845ed48643f130b627dbdb032cb956e9e31c9
4
+ data.tar.gz: 0918eef63ba429595173b14172905fcb2d1626e2
5
5
  SHA512:
6
- metadata.gz: 9cb54b02735aa3eeac4ec223c8cfb3e25906526590d1d59bcd89271f79aa53e3ef5462017a96ac12b4d2079091a5c217e58947bbc257e674552d590fdf372c2d
7
- data.tar.gz: 07d82e6e251c21f7a745820d2d7a320452c170c2354abb8ce90424b4496bf44223995bed880d511a17bea8129c23e800edad3aa0608d811bebebfa2628a08fac
6
+ metadata.gz: 9e4d0bac4e002f42948dae0daaf690f38408dde5e240525f37cda092a04078233f41f916baee55604d557a2cf28e47d4a1c3f5312b68906e0e9ba9a41c61312b
7
+ data.tar.gz: ba9684a0fcdfe506bf0dc3fac3b380fa57614a17550a848b1c314d84bba987cbb392dd34d753bf204873e34b7217ad0ac876d3cd286dd4f02eb532110b2b3bae
@@ -1,8 +1,14 @@
1
+ ## 1.9.7 (2015-05-05)
2
+
3
+ Bugfixes:
4
+
5
+ - always clean up tmp dirs (#3277, @hone, @indirect, @segiddins)
6
+
1
7
  ## 1.9.6 (2015-05-02)
2
8
 
3
9
  Bugfixes:
4
10
 
5
- - support RubyGems versions above 2.4.6 (@tenderlove, @segiddins, @indirect)
11
+ - use RubyGems spec stubs if available (@segiddins)
6
12
  - allow creating gems with names containing two dashes (#3483, @janlelis)
7
13
  - allow creating gems with names extending constants (#3603, @amatsuda)
8
14
 
@@ -75,7 +81,7 @@ Features:
75
81
 
76
82
  Bugfixes:
77
83
 
78
- - Support RubyGems versions above 2.4.6 (@tenderlove, @segiddins, @indirect)
84
+ - Use RubyGems spec stubs if available (@segiddins)
79
85
 
80
86
  ## 1.8.8 (2015-04-29)
81
87
 
@@ -212,13 +212,11 @@ module Bundler
212
212
  end
213
213
 
214
214
  def tmp(name = Process.pid.to_s)
215
- @tmp ||= Pathname.new Dir.mktmpdir("bundler")
216
- @tmp.join(name)
215
+ Pathname.new(Dir.mktmpdir(["bundler", name]))
217
216
  end
218
217
 
219
- def cleanup
220
- FileUtils.remove_entry_secure(@tmp) if @tmp
221
- rescue
218
+ def rm_rf(path)
219
+ FileUtils.remove_entry_secure(path) if path && File.exist?(path)
222
220
  end
223
221
 
224
222
  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)
@@ -68,6 +68,8 @@ module Bundler
68
68
  end
69
69
 
70
70
  gem_path
71
+ ensure
72
+ Bundler.rm_rf(download_path) if Bundler.requires_sudo?
71
73
  end
72
74
 
73
75
  def user_agent
@@ -21,12 +21,13 @@ module Bundler
21
21
  PATH = "PATH"
22
22
  SPECS = " specs:"
23
23
  OPTIONS = /^ ([a-z]+): (.*)$/i
24
+ SOURCE = [GIT, GEM, PATH]
24
25
 
25
26
  def initialize(lockfile)
26
27
  @platforms = []
27
28
  @sources = []
28
29
  @dependencies = []
29
- @state = :source
30
+ @state = nil
30
31
  @specs = {}
31
32
 
32
33
  @rubygems_aggregate = Source::Rubygems.new
@@ -37,11 +38,16 @@ module Bundler
37
38
  end
38
39
 
39
40
  lockfile.split(/(?:\r?\n)+/).each do |line|
40
- if line == DEPENDENCIES
41
+ if SOURCE.include?(line)
42
+ @state = :source
43
+ parse_source(line)
44
+ elsif line == DEPENDENCIES
41
45
  @state = :dependency
42
46
  elsif line == PLATFORMS
43
47
  @state = :platform
44
- else
48
+ elsif line =~ /^[^\s]/
49
+ @state = nil
50
+ elsif @state
45
51
  send("parse_#{@state}", line)
46
52
  end
47
53
  end
@@ -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
11
  @wrappers = options[:wrappers] || true
15
12
  @env_shebang = options[: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
 
@@ -145,9 +145,7 @@ module Bundler
145
145
  spec.loaded_from = loaded_from(spec)
146
146
  ["Installing #{version_message(spec)}", spec.post_install_message]
147
147
  ensure
148
- if install_path && Bundler.requires_sudo?
149
- FileUtils.remove_entry_secure(install_path)
150
- end
148
+ Bundler.rm_rf(install_path) if Bundler.requires_sudo?
151
149
  end
152
150
 
153
151
  def cache(spec, custom_path = nil)
@@ -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.9.6" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.9.7" 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.9.6
4
+ version: 1.9.7
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-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: mustache