bundler 1.7.6 → 1.7.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: ced74899cff274adbec06e5601be3abc4c20c45c
4
- data.tar.gz: aad3f866ca2062e2cacf71949d1d72bddc496a5d
3
+ metadata.gz: a89eb823ec7cbdb414f00ff9332326cfc87dee65
4
+ data.tar.gz: 547184539810c8c7c3ff1bfb5f7863c7408360e1
5
5
  SHA512:
6
- metadata.gz: 5732a5f69f62662e3f47c51a2e31858a478202e6ed49eb4d5b2f1eefc6eddc452f6924a755efba2d61b348fd0ccd8d4b8a4c84ac5e6587475aaa7757c3e99d99
7
- data.tar.gz: 5a1d0fbd3f34682bf03a340e40db6f8a547634b24a4c8c845921ef9bb6fabc222ab3d12f2606cf15b7b155c6fa3ede6e1e2abe3b2f0ac5e85bb3f916b93938e8
6
+ metadata.gz: d8c4602184d1fae30a6feb1cd9b798737ef3d1dc03bdc42d917283232c3527d4f16242af034ace71a701973acc77c207ae7b12c6e0ae40893e795b299b85cc9b
7
+ data.tar.gz: a5246b6165e3463a9e38edb0fd7cf8c28db10c97a60f5e8c7a668d0336dd8b28e2bbf79b9d92b36e8d505130b2d8170f8b19f5db8e084c01c3010403b1c8c821
@@ -1,3 +1,11 @@
1
+ ## 1.7.7 (2014-11-19)
2
+
3
+ Bugfixes:
4
+
5
+ - Ensure server credentials stored in config or ENV will be used (#3180, @arronmabrey)
6
+ - Fix race condition causing errors while installing git-based gems (#3174, @Who828)
7
+ - Use single quotes in config so YAML won't add more quotes (#3261, @indirect)
8
+
1
9
  ## 1.7.6 (2014-11-11)
2
10
 
3
11
  Bugfixes:
@@ -210,11 +210,10 @@ module Bundler
210
210
  end
211
211
 
212
212
  def settings
213
- @settings ||= begin
214
- Settings.new(app_config_path)
215
- rescue GemfileNotFound
216
- Settings.new
217
- end
213
+ return @settings if defined?(@settings)
214
+ @settings = Settings.new(app_config_path)
215
+ rescue GemfileNotFound
216
+ @settings = Settings.new
218
217
  end
219
218
 
220
219
  def with_original_env
@@ -277,7 +277,7 @@ module Bundler
277
277
  response.body
278
278
  when Net::HTTPRequestEntityTooLarge
279
279
  raise FallbackError, response.body
280
- when Net::HTTPUnauthorized
280
+ when Net::HTTPUnauthorized, Net::HTTPForbidden
281
281
  raise AuthenticationRequiredError, "#{response.class}: #{response.body}"
282
282
  else
283
283
  raise HTTPError, "#{response.class}: #{response.body}"
@@ -193,7 +193,7 @@ module Bundler
193
193
  end
194
194
 
195
195
  def build_gem(gem_dir, spec)
196
- SharedHelpers.chdir(gem_dir) { build(spec) }
196
+ build(spec)
197
197
  end
198
198
 
199
199
  def download_gem(spec, uri, path)
@@ -139,6 +139,7 @@ module Bundler
139
139
  require 'bundler/psyched_yaml'
140
140
  File.open(file, "w") { |f| f.puts YAML.dump(hash) }
141
141
  end
142
+
142
143
  value
143
144
  end
144
145
 
@@ -154,8 +155,10 @@ module Bundler
154
155
  def load_config(config_file)
155
156
  valid_file = config_file && config_file.exist? && !config_file.size.zero?
156
157
  if !ignore_config? && valid_file
157
- config_regex =/^(BUNDLE_.+): (?:['"](.*)['"]|(.+(?:\n(?!BUNDLE).+))|(.+))$/
158
- config_pairs = config_file.read.scan(config_regex).map{|m| m.compact.map { |n| n.gsub(/\n\s?/, "") } }
158
+ config_regex = /^(BUNDLE_.+): (?:['"](.*)['"]|(.+(?:\n(?!BUNDLE).+))|(.+))$/
159
+ config_pairs = config_file.read.scan(config_regex).map do |m|
160
+ m.compact.map { |n| n.gsub(/\s+/, " ").tr('"', "'") }
161
+ end
159
162
  Hash[config_pairs]
160
163
  else
161
164
  {}
@@ -1,3 +1,4 @@
1
+ require 'monitor'
1
2
  require 'pathname'
2
3
  require 'rubygems'
3
4
 
@@ -18,6 +19,7 @@ end
18
19
  module Bundler
19
20
  module SharedHelpers
20
21
  attr_accessor :gem_loaded
22
+ CHDIR_MONITOR = Monitor.new
21
23
 
22
24
  def default_gemfile
23
25
  gemfile = find_gemfile
@@ -33,26 +35,18 @@ module Bundler
33
35
  find_gemfile
34
36
  end
35
37
 
36
- if Bundler.current_ruby.mswin? || Bundler.current_ruby.jruby?
37
- require 'monitor'
38
- @chdir_monitor = Monitor.new
39
- def chdir(dir, &blk)
40
- @chdir_monitor.synchronize do
41
- Dir.chdir dir, &blk
42
- end
43
- end
38
+ def chdir_monitor
39
+ CHDIR_MONITOR
40
+ end
44
41
 
45
- def pwd
46
- @chdir_monitor.synchronize do
47
- Dir.pwd
48
- end
49
- end
50
- else
51
- def chdir(dir, &blk)
42
+ def chdir(dir, &blk)
43
+ chdir_monitor.synchronize do
52
44
  Dir.chdir dir, &blk
53
45
  end
46
+ end
54
47
 
55
- def pwd
48
+ def pwd
49
+ chdir_monitor.synchronize do
56
50
  Dir.pwd
57
51
  end
58
52
  end
@@ -216,7 +216,7 @@ module Bundler
216
216
  @allow_remote || @allow_cached
217
217
  end
218
218
 
219
- private
219
+ private
220
220
 
221
221
  def serialize_gemspecs_in(destination)
222
222
  expanded_path = destination.expand_path(Bundler.root)
@@ -169,6 +169,7 @@ module Bundler
169
169
 
170
170
  def generate_bin(spec, disable_extensions = false)
171
171
  gem_dir = Pathname.new(spec.full_gem_path)
172
+ gem_file = nil
172
173
 
173
174
  # Some gem authors put absolute paths in their gemspec
174
175
  # and we have to save them from themselves
@@ -181,14 +182,16 @@ module Bundler
181
182
  end
182
183
  end.compact
183
184
 
184
- gem_file = Bundler.rubygems.build_gem gem_dir, spec
185
+ SharedHelpers.chdir(gem_dir) do
186
+ gem_file = Bundler.rubygems.build_gem gem_dir, spec
185
187
 
186
- installer = Path::Installer.new(spec, :env_shebang => false)
187
- run_hooks(:pre_install, installer)
188
- installer.build_extensions unless disable_extensions
189
- run_hooks(:post_build, installer)
190
- installer.generate_bin
191
- run_hooks(:post_install, installer)
188
+ installer = Path::Installer.new(spec, :env_shebang => false)
189
+ run_hooks(:pre_install, installer)
190
+ installer.build_extensions unless disable_extensions
191
+ run_hooks(:post_build, installer)
192
+ installer.generate_bin
193
+ run_hooks(:post_install, installer)
194
+ end
192
195
  rescue Gem::InvalidSpecificationException => e
193
196
  Bundler.ui.warn "\n#{spec.name} at #{spec.full_gem_path} did not have a valid gemspec.\n" \
194
197
  "This prevents bundler from installing bins or native extensions, but " \
@@ -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.7.6" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.7.7" unless defined?(::Bundler::VERSION)
6
6
  end
@@ -194,7 +194,7 @@ E
194
194
  end
195
195
 
196
196
  describe "quoting" do
197
- before(:each) { bundle :install }
197
+ before(:each) { gemfile "# no gems" }
198
198
 
199
199
  it "saves quotes" do
200
200
  bundle "config foo something\\'"
@@ -209,6 +209,20 @@ E
209
209
  run "puts Bundler.settings[:foo]"
210
210
  expect(out).to eq("1")
211
211
  end
212
+
213
+ it "doesn't duplicate quotes around values", :if => (RUBY_VERSION >= "2.1") do
214
+ bundled_app(".bundle").mkpath
215
+ File.open(bundled_app(".bundle/config"), 'w') do |f|
216
+ f.write 'BUNDLE_FOO: "$BUILD_DIR"'
217
+ end
218
+ expect(bundled_app(".bundle/config").read).to eq('BUNDLE_FOO: "$BUILD_DIR"')
219
+ bundle :install, :jobs => 4
220
+ run "puts Bundler.settings.send(:local_config_file).read"
221
+
222
+ # Starting in Ruby 2.1, YAML automatically adds double quotes
223
+ # around some values, including $ and newlines.
224
+ expect(out).to include('BUNDLE_FOO: "$BUILD_DIR"')
225
+ end
212
226
  end
213
227
 
214
228
  describe "very long lines" do
@@ -76,11 +76,7 @@ RSpec.configure do |config|
76
76
  config.filter_run_excluding :rubygems => "2.2"
77
77
  end
78
78
 
79
- if ENV['RGV'] == "master"
80
- config.filter_run :rubygems_master => true
81
- else
82
- config.filter_run_excluding :rubygems_master => true
83
- end
79
+ config.filter_run_excluding :rubygems_master => (ENV['RGV'] != "master")
84
80
 
85
81
  config.filter_run :focused => true unless ENV['CI']
86
82
  config.run_all_when_everything_filtered = true
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.7.6
4
+ version: 1.7.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: 2014-11-12 00:00:00.000000000 Z
14
+ date: 2014-11-21 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: mustache