bundler 1.1.pre.10 → 1.1.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.
- data/.travis.yml +7 -0
- data/CHANGELOG.md +30 -1
- data/Rakefile +15 -27
- data/lib/bundler.rb +5 -3
- data/lib/bundler/cli.rb +3 -0
- data/lib/bundler/dep_proxy.rb +35 -0
- data/lib/bundler/endpoint_specification.rb +11 -0
- data/lib/bundler/fetcher.rb +45 -23
- data/lib/bundler/gem_helpers.rb +23 -0
- data/lib/bundler/index.rb +1 -1
- data/lib/bundler/match_platform.rb +13 -0
- data/lib/bundler/resolver.rb +16 -19
- data/lib/bundler/rubygems_ext.rb +2 -70
- data/lib/bundler/templates/Executable +1 -1
- data/lib/bundler/ui.rb +5 -4
- data/lib/bundler/version.rb +1 -1
- data/man/gemfile.5.ronn +6 -6
- data/spec/install/gems/dependency_api_spec.rb +97 -23
- data/spec/install/gems/flex_spec.rb +1 -1
- data/spec/install/gems/groups_spec.rb +17 -8
- data/spec/install/gems/simple_case_spec.rb +3 -3
- data/spec/install/gems/standalone_spec.rb +6 -6
- data/spec/realworld/edgecases_spec.rb +12 -0
- data/spec/runtime/executable_spec.rb +10 -0
- data/spec/runtime/require_spec.rb +8 -9
- data/spec/spec_helper.rb +6 -0
- data/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb +13 -0
- data/spec/support/artifice/endpoint_500.rb +37 -0
- data/spec/support/helpers.rb +25 -0
- data/spec/support/rubygems_ext.rb +2 -1
- metadata +22 -88
@@ -0,0 +1,12 @@
|
|
1
|
+
describe "real world edgecases", :realworld => true do
|
2
|
+
if RUBY_VERSION < "1.9"
|
3
|
+
# there is no rbx-relative-require gem that will install on 1.9
|
4
|
+
it "ignores extra gems with bad platforms" do
|
5
|
+
install_gemfile <<-G
|
6
|
+
source :rubygems
|
7
|
+
gem "linecache", "0.46"
|
8
|
+
G
|
9
|
+
err.should eq("")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -36,6 +36,16 @@ describe "Running bin/* commands" do
|
|
36
36
|
out.should == "1.0.0"
|
37
37
|
end
|
38
38
|
|
39
|
+
it "uses the default ruby install name when shebang is not specified" do
|
40
|
+
bundle "install --binstubs"
|
41
|
+
File.open("bin/rackup").gets.should == "#!/usr/bin/env #{RbConfig::CONFIG['ruby_install_name']}\n"
|
42
|
+
end
|
43
|
+
|
44
|
+
it "allows the name of the shebang executable to be specified" do
|
45
|
+
bundle "install --binstubs --shebang ruby-foo"
|
46
|
+
File.open("bin/rackup").gets.should == "#!/usr/bin/env ruby-foo\n"
|
47
|
+
end
|
48
|
+
|
39
49
|
it "runs the bundled command when out of the bundle" do
|
40
50
|
bundle "install --binstubs"
|
41
51
|
|
@@ -82,14 +82,11 @@ describe "Bundler.require" do
|
|
82
82
|
gem "two", :require => 'fail'
|
83
83
|
G
|
84
84
|
|
85
|
-
|
86
|
-
|
87
|
-
Bundler.require
|
88
|
-
rescue LoadError => e
|
89
|
-
puts e.message
|
90
|
-
end
|
85
|
+
load_error_run <<-R, 'fail'
|
86
|
+
Bundler.require
|
91
87
|
R
|
92
|
-
|
88
|
+
|
89
|
+
err.should == "ZOMG LOAD ERROR"
|
93
90
|
end
|
94
91
|
|
95
92
|
describe "using bundle exec" do
|
@@ -191,8 +188,10 @@ describe "Bundler.require" do
|
|
191
188
|
gem "busted_require"
|
192
189
|
G
|
193
190
|
|
194
|
-
|
195
|
-
|
191
|
+
load_error_run <<-R, 'no_such_file_omg'
|
192
|
+
Bundler.require
|
193
|
+
R
|
194
|
+
err.should == 'ZOMG LOAD ERROR'
|
196
195
|
end
|
197
196
|
end
|
198
197
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -53,6 +53,12 @@ RSpec.configure do |config|
|
|
53
53
|
config.filter_run_excluding :sudo => true
|
54
54
|
end
|
55
55
|
|
56
|
+
if ENV['BUNDLER_REALWORLD_TESTS']
|
57
|
+
config.filter_run :realworld => true
|
58
|
+
else
|
59
|
+
config.filter_run_excluding :realworld => true
|
60
|
+
end
|
61
|
+
|
56
62
|
config.filter_run :focused => true unless ENV['CI']
|
57
63
|
config.run_all_when_everything_filtered = true
|
58
64
|
config.alias_example_to :fit, :focused => true
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require File.expand_path("../endpoint_marshal_fail", __FILE__)
|
2
|
+
|
3
|
+
Artifice.deactivate
|
4
|
+
|
5
|
+
class EndpointMarshalFailBasicAuthentication < EndpointMarshalFail
|
6
|
+
before do
|
7
|
+
unless env["HTTP_AUTHORIZATION"]
|
8
|
+
halt 401, "Authentication info not supplied"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
Artifice.activate_with(EndpointMarshalFailBasicAuthentication)
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require File.expand_path("../../path.rb", __FILE__)
|
2
|
+
include Spec::Path
|
3
|
+
|
4
|
+
$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/artifice*/lib")].first}"
|
5
|
+
$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/rack-*/lib")].first}"
|
6
|
+
$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/rack-*/lib")].last}"
|
7
|
+
$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/tilt*/lib")].first}"
|
8
|
+
$LOAD_PATH.unshift "#{Dir[base_system_gems.join("gems/sinatra*/lib")].first}"
|
9
|
+
|
10
|
+
require 'artifice'
|
11
|
+
require 'sinatra/base'
|
12
|
+
|
13
|
+
Artifice.deactivate
|
14
|
+
|
15
|
+
class Endpoint500 < Sinatra::Base
|
16
|
+
get "/quick/Marshal.4.8/:id" do
|
17
|
+
halt 500
|
18
|
+
end
|
19
|
+
|
20
|
+
get "/fetch/actual/gem/:id" do
|
21
|
+
halt 500
|
22
|
+
end
|
23
|
+
|
24
|
+
get "/gems/:id" do
|
25
|
+
halt 500
|
26
|
+
end
|
27
|
+
|
28
|
+
get "/api/v1/dependencies" do
|
29
|
+
halt 500
|
30
|
+
end
|
31
|
+
|
32
|
+
get "/specs.4.8.gz" do
|
33
|
+
halt 500
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
Artifice.activate_with(Endpoint500)
|
data/spec/support/helpers.rb
CHANGED
@@ -35,6 +35,20 @@ module Spec
|
|
35
35
|
@out = ruby(setup + cmd, :expect_err => expect_err, :env => env)
|
36
36
|
end
|
37
37
|
|
38
|
+
def load_error_run(ruby, gem, *args)
|
39
|
+
cmd = <<-R
|
40
|
+
begin
|
41
|
+
#{ruby}
|
42
|
+
rescue LoadError => e
|
43
|
+
$stderr.puts "ZOMG LOAD ERROR" if e.message.include?("-- #{gem}")
|
44
|
+
end
|
45
|
+
R
|
46
|
+
opts = args.last.is_a?(Hash) ? args.pop : {}
|
47
|
+
opts.merge!(:expect_err => true)
|
48
|
+
args += [opts]
|
49
|
+
run(cmd, *args)
|
50
|
+
end
|
51
|
+
|
38
52
|
def lib
|
39
53
|
File.expand_path('../../../lib', __FILE__)
|
40
54
|
end
|
@@ -73,6 +87,17 @@ module Spec
|
|
73
87
|
sys_exec(%{#{env}#{Gem.ruby}#{lib_option} -e "#{ruby}"}, expect_err)
|
74
88
|
end
|
75
89
|
|
90
|
+
def load_error_ruby(ruby, gem, opts = {})
|
91
|
+
cmd = <<-R
|
92
|
+
begin
|
93
|
+
#{ruby}
|
94
|
+
rescue LoadError => e
|
95
|
+
$stderr.puts "ZOMG LOAD ERROR"# if e.message.include?("-- #{gem}")
|
96
|
+
end
|
97
|
+
R
|
98
|
+
ruby(cmd, opts.merge(:expect_err => true))
|
99
|
+
end
|
100
|
+
|
76
101
|
def gembin(cmd)
|
77
102
|
lib = File.expand_path("../../../lib", __FILE__)
|
78
103
|
old, ENV['RUBYOPT'] = ENV['RUBYOPT'], "#{ENV['RUBYOPT']} -I#{lib}"
|
@@ -12,7 +12,8 @@ module Spec
|
|
12
12
|
unless File.exist?("#{Path.base_system_gems}")
|
13
13
|
FileUtils.mkdir_p(Path.base_system_gems)
|
14
14
|
puts "fetching fakeweb, artifice, sinatra, rake, and builder for the tests to use..."
|
15
|
-
`gem install fakeweb artifice
|
15
|
+
`gem install fakeweb artifice --no-rdoc --no-ri`
|
16
|
+
`gem install sinatra --version 1.2.7 --no-rdoc --no-ri`
|
16
17
|
# Rake version has to be consistent for tests to pass
|
17
18
|
`gem install rake --version 0.8.7 --no-rdoc --no-ri`
|
18
19
|
# 3.0.0 breaks 1.9.2 specs
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7712070
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
|
11
|
-
version: 1.1.pre.10
|
9
|
+
- rc
|
10
|
+
version: 1.1.rc
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- "Andr\xC3\xA9 Arko"
|
@@ -19,7 +18,7 @@ autorequire:
|
|
19
18
|
bindir: bin
|
20
19
|
cert_chain: []
|
21
20
|
|
22
|
-
date: 2011-
|
21
|
+
date: 2011-10-04 00:00:00 -05:00
|
23
22
|
default_executable:
|
24
23
|
dependencies:
|
25
24
|
- !ruby/object:Gem::Dependency
|
@@ -75,6 +74,7 @@ files:
|
|
75
74
|
- lib/bundler/capistrano.rb
|
76
75
|
- lib/bundler/cli.rb
|
77
76
|
- lib/bundler/definition.rb
|
77
|
+
- lib/bundler/dep_proxy.rb
|
78
78
|
- lib/bundler/dependency.rb
|
79
79
|
- lib/bundler/deployment.rb
|
80
80
|
- lib/bundler/dsl.rb
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- lib/bundler/environment.rb
|
83
83
|
- lib/bundler/fetcher.rb
|
84
84
|
- lib/bundler/gem_helper.rb
|
85
|
+
- lib/bundler/gem_helpers.rb
|
85
86
|
- lib/bundler/gem_installer.rb
|
86
87
|
- lib/bundler/gem_tasks.rb
|
87
88
|
- lib/bundler/graph.rb
|
@@ -89,6 +90,7 @@ files:
|
|
89
90
|
- lib/bundler/installer.rb
|
90
91
|
- lib/bundler/lazy_specification.rb
|
91
92
|
- lib/bundler/lockfile_parser.rb
|
93
|
+
- lib/bundler/match_platform.rb
|
92
94
|
- lib/bundler/remote_specification.rb
|
93
95
|
- lib/bundler/resolver.rb
|
94
96
|
- lib/bundler/rubygems_ext.rb
|
@@ -193,6 +195,7 @@ files:
|
|
193
195
|
- spec/other/outdated_spec.rb
|
194
196
|
- spec/other/show_spec.rb
|
195
197
|
- spec/quality_spec.rb
|
198
|
+
- spec/realworld/edgecases_spec.rb
|
196
199
|
- spec/resolver/basic_spec.rb
|
197
200
|
- spec/resolver/platform_spec.rb
|
198
201
|
- spec/runtime/executable_spec.rb
|
@@ -202,7 +205,9 @@ files:
|
|
202
205
|
- spec/runtime/setup_spec.rb
|
203
206
|
- spec/runtime/with_clean_env_spec.rb
|
204
207
|
- spec/spec_helper.rb
|
208
|
+
- spec/support/artifice/endopint_marshal_fail_basic_authentication.rb
|
205
209
|
- spec/support/artifice/endpoint.rb
|
210
|
+
- spec/support/artifice/endpoint_500.rb
|
206
211
|
- spec/support/artifice/endpoint_api_missing.rb
|
207
212
|
- spec/support/artifice/endpoint_basic_authentication.rb
|
208
213
|
- spec/support/artifice/endpoint_extra.rb
|
@@ -225,20 +230,22 @@ files:
|
|
225
230
|
- spec/update/gems_spec.rb
|
226
231
|
- spec/update/git_spec.rb
|
227
232
|
- spec/update/source_spec.rb
|
228
|
-
- lib/bundler/man/bundle
|
229
|
-
- lib/bundler/man/bundle-config
|
230
|
-
- lib/bundler/man/bundle-config.txt
|
231
233
|
- lib/bundler/man/bundle-exec
|
232
|
-
- lib/bundler/man/bundle
|
234
|
+
- lib/bundler/man/bundle
|
233
235
|
- lib/bundler/man/bundle-install
|
234
|
-
- lib/bundler/man/
|
236
|
+
- lib/bundler/man/gemfile.5
|
237
|
+
- lib/bundler/man/bundle-benchmark
|
235
238
|
- lib/bundler/man/bundle-package
|
236
|
-
- lib/bundler/man/bundle-package.txt
|
237
239
|
- lib/bundler/man/bundle-update
|
240
|
+
- lib/bundler/man/bundle-exec.txt
|
241
|
+
- lib/bundler/man/gemfile.5.txt
|
238
242
|
- lib/bundler/man/bundle-update.txt
|
243
|
+
- lib/bundler/man/bundle-config
|
244
|
+
- lib/bundler/man/bundle-config.txt
|
245
|
+
- lib/bundler/man/bundle-benchmark.txt
|
239
246
|
- lib/bundler/man/bundle.txt
|
240
|
-
- lib/bundler/man/
|
241
|
-
- lib/bundler/man/
|
247
|
+
- lib/bundler/man/bundle-package.txt
|
248
|
+
- lib/bundler/man/bundle-install.txt
|
242
249
|
has_rdoc: true
|
243
250
|
homepage: http://gembundler.com
|
244
251
|
licenses: []
|
@@ -275,78 +282,5 @@ rubygems_version: 1.3.7
|
|
275
282
|
signing_key:
|
276
283
|
specification_version: 3
|
277
284
|
summary: The best way to manage your application's dependencies
|
278
|
-
test_files:
|
279
|
-
|
280
|
-
- spec/bundler/gem_helper_spec.rb
|
281
|
-
- spec/bundler/source_spec.rb
|
282
|
-
- spec/cache/gems_spec.rb
|
283
|
-
- spec/cache/git_spec.rb
|
284
|
-
- spec/cache/path_spec.rb
|
285
|
-
- spec/cache/platform_spec.rb
|
286
|
-
- spec/install/deploy_spec.rb
|
287
|
-
- spec/install/deprecated_spec.rb
|
288
|
-
- spec/install/gems/c_ext_spec.rb
|
289
|
-
- spec/install/gems/dependency_api_spec.rb
|
290
|
-
- spec/install/gems/env_spec.rb
|
291
|
-
- spec/install/gems/flex_spec.rb
|
292
|
-
- spec/install/gems/groups_spec.rb
|
293
|
-
- spec/install/gems/packed_spec.rb
|
294
|
-
- spec/install/gems/platform_spec.rb
|
295
|
-
- spec/install/gems/post_install_spec.rb
|
296
|
-
- spec/install/gems/resolving_spec.rb
|
297
|
-
- spec/install/gems/simple_case_spec.rb
|
298
|
-
- spec/install/gems/standalone_spec.rb
|
299
|
-
- spec/install/gems/sudo_spec.rb
|
300
|
-
- spec/install/gems/win32_spec.rb
|
301
|
-
- spec/install/gemspec_spec.rb
|
302
|
-
- spec/install/git_spec.rb
|
303
|
-
- spec/install/invalid_spec.rb
|
304
|
-
- spec/install/path_spec.rb
|
305
|
-
- spec/install/upgrade_spec.rb
|
306
|
-
- spec/lock/git_spec.rb
|
307
|
-
- spec/lock/lockfile_spec.rb
|
308
|
-
- spec/other/check_spec.rb
|
309
|
-
- spec/other/clean_spec.rb
|
310
|
-
- spec/other/config_spec.rb
|
311
|
-
- spec/other/console_spec.rb
|
312
|
-
- spec/other/exec_spec.rb
|
313
|
-
- spec/other/ext_spec.rb
|
314
|
-
- spec/other/help_spec.rb
|
315
|
-
- spec/other/init_spec.rb
|
316
|
-
- spec/other/newgem_spec.rb
|
317
|
-
- spec/other/open_spec.rb
|
318
|
-
- spec/other/outdated_spec.rb
|
319
|
-
- spec/other/show_spec.rb
|
320
|
-
- spec/quality_spec.rb
|
321
|
-
- spec/resolver/basic_spec.rb
|
322
|
-
- spec/resolver/platform_spec.rb
|
323
|
-
- spec/runtime/executable_spec.rb
|
324
|
-
- spec/runtime/load_spec.rb
|
325
|
-
- spec/runtime/platform_spec.rb
|
326
|
-
- spec/runtime/require_spec.rb
|
327
|
-
- spec/runtime/setup_spec.rb
|
328
|
-
- spec/runtime/with_clean_env_spec.rb
|
329
|
-
- spec/spec_helper.rb
|
330
|
-
- spec/support/artifice/endpoint.rb
|
331
|
-
- spec/support/artifice/endpoint_api_missing.rb
|
332
|
-
- spec/support/artifice/endpoint_basic_authentication.rb
|
333
|
-
- spec/support/artifice/endpoint_extra.rb
|
334
|
-
- spec/support/artifice/endpoint_extra_missing.rb
|
335
|
-
- spec/support/artifice/endpoint_fallback.rb
|
336
|
-
- spec/support/artifice/endpoint_marshal_fail.rb
|
337
|
-
- spec/support/artifice/endpoint_redirect.rb
|
338
|
-
- spec/support/builders.rb
|
339
|
-
- spec/support/fakeweb/rack-1.0.0.marshal
|
340
|
-
- spec/support/fakeweb/windows.rb
|
341
|
-
- spec/support/helpers.rb
|
342
|
-
- spec/support/indexes.rb
|
343
|
-
- spec/support/matchers.rb
|
344
|
-
- spec/support/path.rb
|
345
|
-
- spec/support/platforms.rb
|
346
|
-
- spec/support/ruby_ext.rb
|
347
|
-
- spec/support/rubygems_ext.rb
|
348
|
-
- spec/support/rubygems_hax/platform.rb
|
349
|
-
- spec/support/sudo.rb
|
350
|
-
- spec/update/gems_spec.rb
|
351
|
-
- spec/update/git_spec.rb
|
352
|
-
- spec/update/source_spec.rb
|
285
|
+
test_files: []
|
286
|
+
|