bundler 1.6.0.pre.2 → 1.6.0.rc

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: 82bb96245aad548e3f54e66a218d8e3067896263
4
- data.tar.gz: b2db8a96173217dbe55870f6cfb5010d20c3dfb9
3
+ metadata.gz: 5d32bda726a60693191debeba799d0381900a0ad
4
+ data.tar.gz: 3030c023da47b1d7d59a812883ce432b1aea0204
5
5
  SHA512:
6
- metadata.gz: 8ecbe4d05b632741d905d9ed74d5041e4e4c22215e30557db72d982e5c0414caf5e6ae8c297d79ede129b6ef1370d35dae597b3b7ffa09d38106f7ad0fcd20ef
7
- data.tar.gz: cde92cfd5835369cc85496e4dbd42a6d63b8bd5091cb416031b161f0f9738ff9e3409cdbf598d4ad5283b402864a9325e83c61913d4fed07f6adbd8a22507f6c
6
+ metadata.gz: 3913a39ba40e4d72850c24ae963f28d83dfbf82de3905da16acc6f6322fab22bd72fdb0b5a0aa51b527c53a4560e3af25c5efcf6843bec3b97614e0f8add37cd
7
+ data.tar.gz: 16519e8be7841230cdaba12ff2dde2b04f60562d4221ae75d97c85ac39d4be471dc63a30ab05816c0c9f2b98ad2e0a1a1dd28a9d173de45f6a6dd4f5d0d871ef
@@ -7,6 +7,9 @@ Bugfixes:
7
7
  - gemspecs now handle filenames with newlines (#2634, @jasonmp85)
8
8
  - support escaped characters in usernames and passwords (@punkie)
9
9
  - no more exception on `update GEM` without lock file (@simi)
10
+ - allow long config values (#2823, @kgrz)
11
+ - cache successfully even locked to gems shipped with Ruby (#2869, @aughr)
12
+ - respect NO_PROXY even if a proxy is configured (#2878, @stlay)
10
13
 
11
14
  Features:
12
15
 
@@ -24,7 +27,7 @@ Features:
24
27
  Bugfixes:
25
28
 
26
29
  - find "missing" gems that are actually present (#2780, #2818, #2854)
27
- - pse n-1 cores when given n jobs for parallel install (@jdickey)
30
+ - use n-1 cores when given n jobs for parallel install (@jdickey)
28
31
 
29
32
  ## 1.5.2 (2014-01-10)
30
33
 
@@ -158,7 +158,7 @@ module Bundler
158
158
  return @locked_gems if defined?(@locked_gems)
159
159
  if Bundler.default_lockfile.exist?
160
160
  lock = Bundler.read_file(Bundler.default_lockfile)
161
- @lock_gems = LockfileParser.new(lock)
161
+ @locked_gems = LockfileParser.new(lock)
162
162
  else
163
163
  @locked_gems = nil
164
164
  end
@@ -61,7 +61,7 @@ module Bundler
61
61
  end
62
62
 
63
63
  def _local_specification
64
- eval(File.read(local_specification_path)) if @loaded_from && File.exists?(local_specification_path)
64
+ eval(File.read(local_specification_path)) if @loaded_from && File.exist?(local_specification_path)
65
65
  end
66
66
 
67
67
  def __swap__(spec)
@@ -151,7 +151,7 @@ module Bundler
151
151
  else
152
152
  Bundler.load_marshal Gem.inflate(fetch(uri))
153
153
  end
154
- rescue MarshalError => e
154
+ rescue MarshalError
155
155
  raise HTTPError, "Gemspec #{spec} contained invalid data.\n" \
156
156
  "Your network or your gem server is probably having issues right now."
157
157
  end
@@ -166,7 +166,6 @@ module Bundler
166
166
  # return the specs in the bundler format as an index
167
167
  def specs(gem_names, source)
168
168
  index = Index.new
169
- use_full_source_index = !gem_names || @remote_uri.scheme == "file" || Bundler::Fetcher.disable_endpoint
170
169
 
171
170
  if gem_names && use_api
172
171
  specs = fetch_remote_specs(gem_names)
@@ -220,7 +219,7 @@ module Bundler
220
219
  spec_list, deps_list = remote_specs
221
220
  returned_gems = spec_list.map {|spec| spec.first }.uniq
222
221
  fetch_remote_specs(deps_list, full_dependency_list + returned_gems, spec_list + last_spec_list)
223
- rescue HTTPError, MarshalError, GemspecError => e
222
+ rescue HTTPError, MarshalError, GemspecError
224
223
  Bundler.ui.info "" unless Bundler.ui.debug? # new line now that the dots are over
225
224
  Bundler.ui.debug "could not fetch from the dependency API, trying the full index"
226
225
  @use_api = false
@@ -283,7 +282,7 @@ module Bundler
283
282
  password = uri.password ? CGI.unescape(uri.password) : nil
284
283
  req.basic_auth(user, password)
285
284
  end
286
- response = connection.request(uri, req)
285
+ connection.request(uri, req)
287
286
  rescue Net::HTTPUnauthorized, Net::HTTPForbidden
288
287
  retry_with_auth { request(uri) }
289
288
  rescue OpenSSL::SSL::SSLError
@@ -172,7 +172,7 @@ module Bundler
172
172
  next if executable == "bundle"
173
173
 
174
174
  binstub_path = "#{bin_path}/#{executable}"
175
- if File.exists?(binstub_path) && !options[:force]
175
+ if File.exist?(binstub_path) && !options[:force]
176
176
  exists << executable
177
177
  next
178
178
  end
@@ -236,14 +236,11 @@ module Bundler
236
236
  end
237
237
 
238
238
  def resolve_conflict(current, states)
239
- # Return a requirement/gem which has other possibles states
240
- # Given the set of constraints placed by requrired_by
241
-
242
- debug { " -> Going to: #{current.name} state" }
243
-
244
239
  # Find the state where the conflict has occurred
245
240
  state = find_conflict_state(current, states)
246
241
 
242
+ debug { " -> Going to: #{current.name} state" } if current
243
+
247
244
  # Resolve the conflicts by rewinding the state
248
245
  # when the conflicted gem was activated
249
246
  reqs, activated, depth = resolve_for_conflict(state)
@@ -106,7 +106,7 @@ module Bundler
106
106
 
107
107
  def cache(custom_path = nil)
108
108
  cache_path = cache_path(custom_path)
109
- FileUtils.mkdir_p(cache_path) unless File.exists?(cache_path)
109
+ FileUtils.mkdir_p(cache_path) unless File.exist?(cache_path)
110
110
 
111
111
  Bundler.ui.info "Updating files in vendor/cache"
112
112
  specs.each do |spec|
@@ -124,7 +124,7 @@ module Bundler
124
124
 
125
125
  def prune_cache(custom_path)
126
126
  cache_path = cache_path(custom_path)
127
- FileUtils.mkdir_p(cache_path) unless File.exists?(cache_path)
127
+ FileUtils.mkdir_p(cache_path) unless File.exist?(cache_path)
128
128
  resolve = @definition.resolve
129
129
  prune_gem_cache(resolve, custom_path)
130
130
  prune_git_and_path_cache(resolve, custom_path)
@@ -202,10 +202,10 @@ module Bundler
202
202
  end
203
203
 
204
204
  unless dry_run
205
- stale_gem_bins.each { |bin| FileUtils.rm(bin) if File.exists?(bin) }
206
- stale_gem_files.each { |file| FileUtils.rm(file) if File.exists?(file) }
207
- stale_gemspec_files.each { |file| FileUtils.rm(file) if File.exists?(file) }
208
- stale_git_cache_dirs.each { |dir| FileUtils.rm_rf(dir) if File.exists?(dir) }
205
+ stale_gem_bins.each { |bin| FileUtils.rm(bin) if File.exist?(bin) }
206
+ stale_gem_files.each { |file| FileUtils.rm(file) if File.exist?(file) }
207
+ stale_gemspec_files.each { |file| FileUtils.rm(file) if File.exist?(file) }
208
+ stale_git_cache_dirs.each { |dir| FileUtils.rm_rf(dir) if File.exist?(dir) }
209
209
  end
210
210
 
211
211
  output
@@ -154,8 +154,8 @@ module Bundler
154
154
  def load_config(config_file)
155
155
  valid_file = config_file && config_file.exist? && !config_file.size.zero?
156
156
  if !ignore_config? && valid_file
157
- config_regex = /^(BUNDLE_.+): (?:['"](.*)['"]|(.+))$/
158
- config_pairs = config_file.read.scan(config_regex).map{|m| m.compact }
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?/, "") } }
159
159
  Hash[config_pairs]
160
160
  else
161
161
  {}
@@ -136,6 +136,10 @@ module Bundler
136
136
 
137
137
  # TODO: actually cache git specs
138
138
  def specs(*)
139
+ if has_app_cache? && !local?
140
+ set_local!(app_cache_path)
141
+ end
142
+
139
143
  if requires_checkout? && !@copied
140
144
  git_proxy.checkout
141
145
  git_proxy.copy_to(install_path, submodules)
@@ -69,9 +69,7 @@ module Bundler
69
69
  else
70
70
  Bundler.ui.info "Fetching #{uri}"
71
71
  FileUtils.mkdir_p(path.dirname)
72
- clone_command = %|clone #{uri_escaped} "#{path}" --bare --no-hardlinks|
73
- clone_command = "#{clone_command} --quiet" if Bundler.ui.quiet?
74
- git clone_command
72
+ git %|clone #{uri_escaped} "#{path}" --bare --no-hardlinks --quiet|
75
73
  end
76
74
  end
77
75
 
@@ -79,7 +77,7 @@ module Bundler
79
77
  unless File.exist?(destination.join(".git"))
80
78
  FileUtils.mkdir_p(destination.dirname)
81
79
  FileUtils.rm_rf(destination)
82
- git %|clone --no-checkout "#{path}" "#{destination}"|
80
+ git %|clone --no-checkout --quiet "#{path}" "#{destination}"|
83
81
  File.chmod((0777 & ~File.umask), destination)
84
82
  end
85
83
 
@@ -146,7 +146,7 @@ module Bundler
146
146
  end
147
147
  end
148
148
  end
149
- elsif File.exists?(expanded_path)
149
+ elsif File.exist?(expanded_path)
150
150
  raise PathError, "The path `#{expanded_path}` is not a directory."
151
151
  else
152
152
  raise PathError, "The path `#{expanded_path}` does not exist."
@@ -114,6 +114,10 @@ module Bundler
114
114
  end
115
115
 
116
116
  def cache(spec, custom_path = nil)
117
+ # Gems bundled with Ruby don't have .gem files cached locally, but it doesn't matter
118
+ # since they're always going to be installed on this Ruby version.
119
+ return if builtin_gem?(spec)
120
+
117
121
  cached_path = cached_gem(spec)
118
122
  raise GemNotFound, "Missing gem file '#{spec.full_name}.gem'." unless cached_path
119
123
  return if File.dirname(cached_path) == Bundler.app_cache.to_s
@@ -273,6 +277,13 @@ module Bundler
273
277
  end
274
278
  end
275
279
 
280
+ def builtin_gem?(spec)
281
+ # Ruby 2.1-style
282
+ return true if spec.summary =~ /is bundled with Ruby/
283
+
284
+ # Ruby 2.0 style
285
+ spec.loaded_from.include?("specifications/default/")
286
+ end
276
287
  end
277
288
  end
278
289
  end
@@ -22,8 +22,8 @@ TODO: Write usage instructions here
22
22
 
23
23
  ## Contributing
24
24
 
25
- 1. Fork it ( http://github.com/[my-github-username]/<%=config[:name]%>/fork )
25
+ 1. Fork it ( https://github.com/[my-github-username]/<%=config[:name]%>/fork )
26
26
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
27
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
28
  4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
29
+ 5. Create a new Pull Request
@@ -616,6 +616,8 @@ class Net::HTTP::Persistent
616
616
  if @proxy_uri and not proxy_bypass? uri.host, uri.port then
617
617
  connection_id << @proxy_connection_id
618
618
  net_http_args.concat @proxy_args
619
+ elsif proxy_bypass? uri.host, uri.port then
620
+ net_http_args.concat [nil, nil]
619
621
  end
620
622
 
621
623
  connection = connections[connection_id]
@@ -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.6.0.pre.2" unless defined?(::Bundler::VERSION)
5
+ VERSION = "1.6.0.rc" unless defined?(::Bundler::VERSION)
6
6
  end
@@ -74,6 +74,42 @@ describe "bundle cache" do
74
74
  end
75
75
  end
76
76
 
77
+ describe "when there is a built-in gem" do
78
+ let(:version) { "1.0.0" }
79
+
80
+ before :each do
81
+ build_repo2 do
82
+ build_gem "builtin_gem", version do |s|
83
+ s.summary = "This builtin_gem is bundled with Ruby"
84
+ end
85
+
86
+ build_gem "remote_gem", version do |s|
87
+ s.summary = "Totally normal gem"
88
+ end
89
+ end
90
+
91
+ build_gem "builtin_gem", version, :to_system => true do |s|
92
+ s.summary = "This builtin_gem is bundled with Ruby"
93
+ end
94
+
95
+ install_gemfile <<-G
96
+ source "file://#{gem_repo2}"
97
+ gem 'builtin_gem', '#{version}'
98
+ gem 'remote_gem', '#{version}'
99
+ G
100
+
101
+ FileUtils.rm("#{system_gem_path}/cache/builtin_gem-#{version}.gem")
102
+ end
103
+
104
+ it "caches normal gems successfully" do
105
+ bundle :cache, :exitstatus => true
106
+
107
+ expect(exitstatus).to be_zero
108
+ expect(bundled_app("vendor/cache/builtin_gem-#{version}.gem")).to_not exist
109
+ expect(bundled_app("vendor/cache/remote_gem-#{version}.gem")).to exist
110
+ end
111
+ end
112
+
77
113
  describe "when there are also git sources" do
78
114
  before do
79
115
  build_git "foo"
@@ -210,4 +210,18 @@ E
210
210
  expect(out).to eq("1")
211
211
  end
212
212
  end
213
+
214
+ describe "very long lines" do
215
+ before(:each) { bundle :install }
216
+ let(:long_string) do
217
+ "--with-xml2-include=/usr/pkg/include/libxml2 --with-xml2-lib=/usr/pkg/lib --with-xslt-dir=/usr/pkg"
218
+ end
219
+
220
+ it "doesn't wrap values" do
221
+ bundle "config foo #{long_string}"
222
+ run "puts Bundler.settings[:foo]"
223
+ expect(out).to match(long_string)
224
+ end
225
+ end
226
+
213
227
  end
@@ -298,7 +298,7 @@ describe "bundle install with gem sources" do
298
298
  install_gemfile <<-G
299
299
  G
300
300
 
301
- expect(File.exists?(bundled_app("Gemfile.lock"))).to eq(true)
301
+ expect(File.exist?(bundled_app("Gemfile.lock"))).to eq(true)
302
302
  end
303
303
 
304
304
  it "gracefully handles error when rubygems server is unavailable" do
@@ -53,7 +53,7 @@ describe "Bundler.load" do
53
53
 
54
54
  it "does not find a Gemfile above the testing directory" do
55
55
  bundler_gemfile = tmp.join("../Gemfile")
56
- unless File.exists?(bundler_gemfile)
56
+ unless File.exist?(bundler_gemfile)
57
57
  FileUtils.touch(bundler_gemfile)
58
58
  @remove_bundler_gemfile = true
59
59
  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.6.0.pre.2
4
+ version: 1.6.0.rc
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -11,34 +11,34 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-02-07 00:00:00.000000000 Z
14
+ date: 2014-02-17 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: ronn
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
- - - "~>"
20
+ - - ~>
21
21
  - !ruby/object:Gem::Version
22
22
  version: 0.7.3
23
23
  type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: 0.7.3
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rspec
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - "~>"
34
+ - - ~>
35
35
  - !ruby/object:Gem::Version
36
36
  version: 2.99.0.beta1
37
37
  type: :development
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - "~>"
41
+ - - ~>
42
42
  - !ruby/object:Gem::Version
43
43
  version: 2.99.0.beta1
44
44
  description: Bundler manages an application's dependencies through its entire life,
@@ -51,9 +51,9 @@ executables:
51
51
  extensions: []
52
52
  extra_rdoc_files: []
53
53
  files:
54
- - ".gitignore"
55
- - ".rspec"
56
- - ".travis.yml"
54
+ - .gitignore
55
+ - .rspec
56
+ - .travis.yml
57
57
  - CHANGELOG.md
58
58
  - CONTRIBUTING.md
59
59
  - DEVELOPMENT.md
@@ -346,17 +346,17 @@ require_paths:
346
346
  - lib
347
347
  required_ruby_version: !ruby/object:Gem::Requirement
348
348
  requirements:
349
- - - ">="
349
+ - - '>='
350
350
  - !ruby/object:Gem::Version
351
351
  version: 1.8.7
352
352
  required_rubygems_version: !ruby/object:Gem::Requirement
353
353
  requirements:
354
- - - ">="
354
+ - - '>='
355
355
  - !ruby/object:Gem::Version
356
356
  version: 1.3.6
357
357
  requirements: []
358
358
  rubyforge_project:
359
- rubygems_version: 2.2.0
359
+ rubygems_version: 2.2.2
360
360
  signing_key:
361
361
  specification_version: 4
362
362
  summary: The best way to manage your application's dependencies
@@ -467,3 +467,4 @@ test_files:
467
467
  - spec/update/gems_spec.rb
468
468
  - spec/update/git_spec.rb
469
469
  - spec/update/source_spec.rb
470
+ has_rdoc: