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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/bundler.rb +4 -5
- data/lib/bundler/fetcher.rb +1 -1
- data/lib/bundler/rubygems_integration.rb +1 -1
- data/lib/bundler/settings.rb +5 -2
- data/lib/bundler/shared_helpers.rb +10 -16
- data/lib/bundler/source/git.rb +1 -1
- data/lib/bundler/source/path.rb +10 -7
- data/lib/bundler/version.rb +1 -1
- data/spec/commands/config_spec.rb +15 -1
- data/spec/spec_helper.rb +1 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a89eb823ec7cbdb414f00ff9332326cfc87dee65
|
4
|
+
data.tar.gz: 547184539810c8c7c3ff1bfb5f7863c7408360e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8c4602184d1fae30a6feb1cd9b798737ef3d1dc03bdc42d917283232c3527d4f16242af034ace71a701973acc77c207ae7b12c6e0ae40893e795b299b85cc9b
|
7
|
+
data.tar.gz: a5246b6165e3463a9e38edb0fd7cf8c28db10c97a60f5e8c7a668d0336dd8b28e2bbf79b9d92b36e8d505130b2d8170f8b19f5db8e084c01c3010403b1c8c821
|
data/CHANGELOG.md
CHANGED
@@ -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:
|
data/lib/bundler.rb
CHANGED
@@ -210,11 +210,10 @@ module Bundler
|
|
210
210
|
end
|
211
211
|
|
212
212
|
def settings
|
213
|
-
@settings
|
214
|
-
|
215
|
-
|
216
|
-
|
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
|
data/lib/bundler/fetcher.rb
CHANGED
@@ -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}"
|
data/lib/bundler/settings.rb
CHANGED
@@ -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
|
158
|
-
config_pairs = config_file.read.scan(config_regex).map
|
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
|
-
|
37
|
-
|
38
|
-
|
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
|
-
|
46
|
-
|
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
|
-
|
48
|
+
def pwd
|
49
|
+
chdir_monitor.synchronize do
|
56
50
|
Dir.pwd
|
57
51
|
end
|
58
52
|
end
|
data/lib/bundler/source/git.rb
CHANGED
data/lib/bundler/source/path.rb
CHANGED
@@ -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
|
-
|
185
|
+
SharedHelpers.chdir(gem_dir) do
|
186
|
+
gem_file = Bundler.rubygems.build_gem gem_dir, spec
|
185
187
|
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
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 " \
|
data/lib/bundler/version.rb
CHANGED
@@ -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.
|
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) {
|
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
|
data/spec/spec_helper.rb
CHANGED
@@ -76,11 +76,7 @@ RSpec.configure do |config|
|
|
76
76
|
config.filter_run_excluding :rubygems => "2.2"
|
77
77
|
end
|
78
78
|
|
79
|
-
|
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.
|
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-
|
14
|
+
date: 2014-11-21 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: mustache
|