bundler 1.7.15 → 1.8.0.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.gitignore +5 -14
- data/.rspec +1 -0
- data/.travis.yml +22 -15
- data/CHANGELOG.md +43 -13
- data/CODE_OF_CONDUCT.md +40 -0
- data/CONTRIBUTING.md +14 -12
- data/DEVELOPMENT.md +4 -2
- data/ISSUES.md +1 -1
- data/README.md +10 -14
- data/Rakefile +10 -10
- data/bin/bundle +1 -1
- data/bundler.gemspec +5 -4
- data/lib/bundler.rb +22 -3
- data/lib/bundler/anonymizable_uri.rb +24 -8
- data/lib/bundler/cli.rb +103 -66
- data/lib/bundler/cli/cache.rb +1 -0
- data/lib/bundler/cli/clean.rb +11 -4
- data/lib/bundler/cli/common.rb +2 -0
- data/lib/bundler/cli/console.rb +22 -26
- data/lib/bundler/cli/exec.rb +29 -22
- data/lib/bundler/cli/gem.rb +125 -37
- data/lib/bundler/cli/install.rb +22 -9
- data/lib/bundler/cli/outdated.rb +1 -1
- data/lib/bundler/cli/package.rb +8 -1
- data/lib/bundler/cli/show.rb +29 -3
- data/lib/bundler/cli/update.rb +2 -2
- data/lib/bundler/cli/viz.rb +1 -1
- data/lib/bundler/definition.rb +14 -22
- data/lib/bundler/dependency.rb +8 -1
- data/lib/bundler/dsl.rb +17 -4
- data/lib/bundler/endpoint_specification.rb +1 -1
- data/lib/bundler/env.rb +44 -25
- data/lib/bundler/fetcher.rb +33 -25
- data/lib/bundler/friendly_errors.rb +38 -5
- data/lib/bundler/gem_helper.rb +16 -10
- data/lib/bundler/gem_helpers.rb +1 -0
- data/lib/bundler/graph.rb +4 -1
- data/lib/bundler/index.rb +15 -25
- data/lib/bundler/installer.rb +6 -6
- data/lib/bundler/lockfile_parser.rb +7 -7
- data/lib/bundler/resolver.rb +2 -1
- data/lib/bundler/ruby_version.rb +1 -1
- data/lib/bundler/rubygems_ext.rb +1 -0
- data/lib/bundler/rubygems_integration.rb +1 -1
- data/lib/bundler/runtime.rb +22 -40
- data/lib/bundler/settings.rb +14 -5
- data/lib/bundler/setup.rb +2 -1
- data/lib/bundler/shared_helpers.rb +56 -4
- data/lib/bundler/source.rb +8 -9
- data/lib/bundler/source/git.rb +5 -1
- data/lib/bundler/source/git/git_proxy.rb +4 -0
- data/lib/bundler/source/path.rb +8 -11
- data/lib/bundler/source/path/installer.rb +0 -2
- data/lib/bundler/source/rubygems.rb +58 -72
- data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +13 -0
- data/lib/bundler/templates/newgem/LICENSE.txt.tt +17 -18
- data/lib/bundler/templates/newgem/README.md.tt +9 -1
- data/lib/bundler/templates/newgem/Rakefile.tt +2 -0
- data/lib/bundler/templates/newgem/bin/console.tt +14 -0
- data/lib/bundler/templates/newgem/bin/setup.tt +7 -0
- data/lib/bundler/templates/newgem/exe/newgem.tt +3 -0
- data/lib/bundler/templates/newgem/gitignore.tt +2 -0
- data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +1 -1
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +17 -13
- data/lib/bundler/templates/newgem/test/test_newgem.rb.tt +1 -1
- data/lib/bundler/ui/shell.rb +1 -1
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler/worker.rb +73 -0
- data/man/bundle-config.ronn +17 -15
- data/man/bundle-install.ronn +102 -93
- data/man/bundle-update.ronn +39 -30
- data/man/bundle.ronn +6 -0
- data/man/gemfile.5.ronn +74 -13
- metadata +10 -231
- data/lib/bundler/parallel_workers.rb +0 -18
- data/lib/bundler/parallel_workers/thread_worker.rb +0 -30
- data/lib/bundler/parallel_workers/unix_worker.rb +0 -101
- data/lib/bundler/parallel_workers/worker.rb +0 -69
- data/lib/bundler/templates/newgem/bin/newgem.tt +0 -3
- data/spec/bundler/anonymizable_uri_spec.rb +0 -32
- data/spec/bundler/bundler_spec.rb +0 -72
- data/spec/bundler/cli_spec.rb +0 -16
- data/spec/bundler/definition_spec.rb +0 -22
- data/spec/bundler/dsl_spec.rb +0 -82
- data/spec/bundler/friendly_errors_spec.rb +0 -13
- data/spec/bundler/gem_helper_spec.rb +0 -226
- data/spec/bundler/psyched_yaml_spec.rb +0 -8
- data/spec/bundler/retry_spec.rb +0 -59
- data/spec/bundler/settings_spec.rb +0 -13
- data/spec/bundler/source/rubygems_spec.rb +0 -25
- data/spec/bundler/source_list_spec.rb +0 -361
- data/spec/cache/gems_spec.rb +0 -284
- data/spec/cache/git_spec.rb +0 -188
- data/spec/cache/path_spec.rb +0 -121
- data/spec/cache/platform_spec.rb +0 -57
- data/spec/commands/binstubs_spec.rb +0 -219
- data/spec/commands/check_spec.rb +0 -278
- data/spec/commands/clean_spec.rb +0 -592
- data/spec/commands/config_spec.rb +0 -263
- data/spec/commands/console_spec.rb +0 -76
- data/spec/commands/exec_spec.rb +0 -309
- data/spec/commands/help_spec.rb +0 -39
- data/spec/commands/init_spec.rb +0 -39
- data/spec/commands/inject_spec.rb +0 -78
- data/spec/commands/licenses_spec.rb +0 -18
- data/spec/commands/newgem_spec.rb +0 -428
- data/spec/commands/open_spec.rb +0 -68
- data/spec/commands/outdated_spec.rb +0 -156
- data/spec/commands/package_spec.rb +0 -114
- data/spec/commands/show_spec.rb +0 -125
- data/spec/install/binstubs_spec.rb +0 -24
- data/spec/install/bundler_spec.rb +0 -146
- data/spec/install/deploy_spec.rb +0 -250
- data/spec/install/gemfile/gemspec_spec.rb +0 -170
- data/spec/install/gemfile/git_spec.rb +0 -967
- data/spec/install/gemfile/path_spec.rb +0 -500
- data/spec/install/gemfile_spec.rb +0 -44
- data/spec/install/gems/c_ext_spec.rb +0 -48
- data/spec/install/gems/dependency_api_spec.rb +0 -652
- data/spec/install/gems/env_spec.rb +0 -107
- data/spec/install/gems/flex_spec.rb +0 -314
- data/spec/install/gems/groups_spec.rb +0 -308
- data/spec/install/gems/mirror_spec.rb +0 -39
- data/spec/install/gems/platform_spec.rb +0 -195
- data/spec/install/gems/post_install_spec.rb +0 -121
- data/spec/install/gems/resolving_spec.rb +0 -124
- data/spec/install/gems/simple_case_spec.rb +0 -377
- data/spec/install/gems/sources_spec.rb +0 -386
- data/spec/install/gems/standalone_spec.rb +0 -260
- data/spec/install/gems/sudo_spec.rb +0 -136
- data/spec/install/gems/win32_spec.rb +0 -26
- data/spec/install/gemspecs_spec.rb +0 -50
- data/spec/install/path_spec.rb +0 -150
- data/spec/install/post_bundle_message_spec.rb +0 -142
- data/spec/install/prereleases_spec.rb +0 -43
- data/spec/install/security_policy_spec.rb +0 -77
- data/spec/install/upgrade_spec.rb +0 -26
- data/spec/lock/git_spec.rb +0 -34
- data/spec/lock/lockfile_spec.rb +0 -924
- data/spec/other/bundle_ruby_spec.rb +0 -142
- data/spec/other/cli_dispatch_spec.rb +0 -21
- data/spec/other/ext_spec.rb +0 -60
- data/spec/other/platform_spec.rb +0 -1285
- data/spec/other/ssl_cert_spec.rb +0 -23
- data/spec/quality_spec.rb +0 -88
- data/spec/realworld/dependency_api_spec.rb +0 -60
- data/spec/realworld/edgecases_spec.rb +0 -212
- data/spec/realworld/parallel_spec.rb +0 -71
- data/spec/resolver/basic_spec.rb +0 -66
- data/spec/resolver/platform_spec.rb +0 -88
- data/spec/runtime/executable_spec.rb +0 -149
- data/spec/runtime/load_spec.rb +0 -107
- data/spec/runtime/platform_spec.rb +0 -90
- data/spec/runtime/require_spec.rb +0 -332
- data/spec/runtime/setup_spec.rb +0 -853
- data/spec/runtime/with_clean_env_spec.rb +0 -91
- data/spec/spec_helper.rb +0 -123
- data/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb +0 -13
- data/spec/support/artifice/endpoint.rb +0 -71
- data/spec/support/artifice/endpoint_500.rb +0 -37
- data/spec/support/artifice/endpoint_api_forbidden.rb +0 -11
- data/spec/support/artifice/endpoint_api_missing.rb +0 -16
- data/spec/support/artifice/endpoint_basic_authentication.rb +0 -13
- data/spec/support/artifice/endpoint_creds_diff_host.rb +0 -38
- data/spec/support/artifice/endpoint_extra.rb +0 -31
- data/spec/support/artifice/endpoint_extra_api.rb +0 -32
- data/spec/support/artifice/endpoint_extra_missing.rb +0 -15
- data/spec/support/artifice/endpoint_fallback.rb +0 -17
- data/spec/support/artifice/endpoint_host_redirect.rb +0 -15
- data/spec/support/artifice/endpoint_marshal_fail.rb +0 -11
- data/spec/support/artifice/endpoint_redirect.rb +0 -15
- data/spec/support/artifice/endpoint_strict_basic_authentication.rb +0 -18
- data/spec/support/artifice/endpoint_timeout.rb +0 -13
- data/spec/support/builders.rb +0 -693
- data/spec/support/fakeweb/rack-1.0.0.marshal +0 -2
- data/spec/support/fakeweb/windows.rb +0 -23
- data/spec/support/hax.rb +0 -22
- data/spec/support/helpers.rb +0 -361
- data/spec/support/indexes.rb +0 -280
- data/spec/support/matchers.rb +0 -77
- data/spec/support/path.rb +0 -85
- data/spec/support/permissions.rb +0 -10
- data/spec/support/platforms.rb +0 -94
- data/spec/support/ruby_ext.rb +0 -20
- data/spec/support/rubygems_ext.rb +0 -39
- data/spec/support/streams.rb +0 -13
- data/spec/support/sudo.rb +0 -16
- data/spec/update/gems_spec.rb +0 -201
- data/spec/update/git_spec.rb +0 -283
- data/spec/update/path_spec.rb +0 -18
@@ -1,260 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe "bundle install --standalone" do
|
4
|
-
describe "with simple gems" do
|
5
|
-
before do
|
6
|
-
install_gemfile <<-G, :standalone => true
|
7
|
-
source "file://#{gem_repo1}"
|
8
|
-
gem "rails"
|
9
|
-
G
|
10
|
-
end
|
11
|
-
|
12
|
-
it "still makes the gems available to normal bundler" do
|
13
|
-
should_be_installed "actionpack 2.3.2", "rails 2.3.2"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "generates a bundle/bundler/setup.rb" do
|
17
|
-
expect(bundled_app("bundle/bundler/setup.rb")).to exist
|
18
|
-
end
|
19
|
-
|
20
|
-
it "makes the gems available without bundler" do
|
21
|
-
ruby <<-RUBY, :no_lib => true
|
22
|
-
$:.unshift File.expand_path("bundle")
|
23
|
-
require "bundler/setup"
|
24
|
-
|
25
|
-
require "actionpack"
|
26
|
-
puts ACTIONPACK
|
27
|
-
RUBY
|
28
|
-
|
29
|
-
expect(out).to eq("2.3.2")
|
30
|
-
end
|
31
|
-
|
32
|
-
it "works on a different system" do
|
33
|
-
FileUtils.mv(bundled_app, "#{bundled_app}2")
|
34
|
-
Dir.chdir("#{bundled_app}2")
|
35
|
-
|
36
|
-
ruby <<-RUBY, :no_lib => true
|
37
|
-
$:.unshift File.expand_path("bundle")
|
38
|
-
require "bundler/setup"
|
39
|
-
|
40
|
-
require "actionpack"
|
41
|
-
puts ACTIONPACK
|
42
|
-
RUBY
|
43
|
-
|
44
|
-
expect(out).to eq("2.3.2")
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
describe "with a combination of gems and git repos" do
|
49
|
-
before do
|
50
|
-
build_git "devise", "1.0"
|
51
|
-
|
52
|
-
install_gemfile <<-G, :standalone => true
|
53
|
-
source "file://#{gem_repo1}"
|
54
|
-
gem "rails"
|
55
|
-
gem "devise", :git => "#{lib_path('devise-1.0')}"
|
56
|
-
G
|
57
|
-
end
|
58
|
-
|
59
|
-
it "still makes the gems available to normal bundler" do
|
60
|
-
should_be_installed "actionpack 2.3.2", "rails 2.3.2", "devise 1.0"
|
61
|
-
end
|
62
|
-
|
63
|
-
it "generates a bundle/bundler/setup.rb" do
|
64
|
-
expect(bundled_app("bundle/bundler/setup.rb")).to exist
|
65
|
-
end
|
66
|
-
|
67
|
-
it "makes the gems available without bundler" do
|
68
|
-
ruby <<-RUBY, :no_lib => true
|
69
|
-
$:.unshift File.expand_path("bundle")
|
70
|
-
require "bundler/setup"
|
71
|
-
|
72
|
-
require "devise"
|
73
|
-
require "actionpack"
|
74
|
-
puts DEVISE
|
75
|
-
puts ACTIONPACK
|
76
|
-
RUBY
|
77
|
-
|
78
|
-
expect(out).to eq("1.0\n2.3.2")
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
describe "with groups" do
|
83
|
-
before do
|
84
|
-
build_git "devise", "1.0"
|
85
|
-
|
86
|
-
install_gemfile <<-G, :standalone => true
|
87
|
-
source "file://#{gem_repo1}"
|
88
|
-
gem "rails"
|
89
|
-
|
90
|
-
group :test do
|
91
|
-
gem "rspec"
|
92
|
-
gem "rack-test"
|
93
|
-
end
|
94
|
-
G
|
95
|
-
end
|
96
|
-
|
97
|
-
it "makes the gems available without bundler" do
|
98
|
-
ruby <<-RUBY, :no_lib => true
|
99
|
-
$:.unshift File.expand_path("bundle")
|
100
|
-
require "bundler/setup"
|
101
|
-
|
102
|
-
require "actionpack"
|
103
|
-
require "spec"
|
104
|
-
require "rack/test"
|
105
|
-
puts ACTIONPACK
|
106
|
-
puts SPEC
|
107
|
-
puts RACK_TEST
|
108
|
-
RUBY
|
109
|
-
|
110
|
-
expect(out).to eq("2.3.2\n1.2.7\n1.0")
|
111
|
-
end
|
112
|
-
|
113
|
-
it "allows creating a standalone file with limited groups" do
|
114
|
-
bundle "install --standalone default"
|
115
|
-
|
116
|
-
load_error_ruby <<-RUBY, 'spec', :no_lib => true
|
117
|
-
$:.unshift File.expand_path("bundle")
|
118
|
-
require "bundler/setup"
|
119
|
-
|
120
|
-
require "actionpack"
|
121
|
-
puts ACTIONPACK
|
122
|
-
require "spec"
|
123
|
-
RUBY
|
124
|
-
|
125
|
-
expect(out).to eq("2.3.2")
|
126
|
-
expect(err).to eq("ZOMG LOAD ERROR")
|
127
|
-
end
|
128
|
-
|
129
|
-
it "allows --without to limit the groups used in a standalone" do
|
130
|
-
bundle "install --standalone --without test"
|
131
|
-
|
132
|
-
load_error_ruby <<-RUBY, 'spec', :no_lib => true
|
133
|
-
$:.unshift File.expand_path("bundle")
|
134
|
-
require "bundler/setup"
|
135
|
-
|
136
|
-
require "actionpack"
|
137
|
-
puts ACTIONPACK
|
138
|
-
require "spec"
|
139
|
-
RUBY
|
140
|
-
|
141
|
-
expect(out).to eq("2.3.2")
|
142
|
-
expect(err).to eq("ZOMG LOAD ERROR")
|
143
|
-
end
|
144
|
-
|
145
|
-
it "allows --path to change the location of the standalone bundle" do
|
146
|
-
bundle "install --standalone --path path/to/bundle"
|
147
|
-
|
148
|
-
ruby <<-RUBY, :no_lib => true, :expect_err => false
|
149
|
-
$:.unshift File.expand_path("path/to/bundle")
|
150
|
-
require "bundler/setup"
|
151
|
-
|
152
|
-
require "actionpack"
|
153
|
-
puts ACTIONPACK
|
154
|
-
RUBY
|
155
|
-
|
156
|
-
expect(out).to eq("2.3.2")
|
157
|
-
end
|
158
|
-
|
159
|
-
it "allows remembered --without to limit the groups used in a standalone" do
|
160
|
-
bundle "install --without test"
|
161
|
-
bundle "install --standalone"
|
162
|
-
|
163
|
-
load_error_ruby <<-RUBY, 'spec', :no_lib => true
|
164
|
-
$:.unshift File.expand_path("bundle")
|
165
|
-
require "bundler/setup"
|
166
|
-
|
167
|
-
require "actionpack"
|
168
|
-
puts ACTIONPACK
|
169
|
-
require "spec"
|
170
|
-
RUBY
|
171
|
-
|
172
|
-
expect(out).to eq("2.3.2")
|
173
|
-
expect(err).to eq("ZOMG LOAD ERROR")
|
174
|
-
end
|
175
|
-
end
|
176
|
-
|
177
|
-
describe "with gemcutter's dependency API" do
|
178
|
-
let(:source_uri) { "http://localgemserver.test" }
|
179
|
-
|
180
|
-
describe "simple gems" do
|
181
|
-
before do
|
182
|
-
gemfile <<-G
|
183
|
-
source "#{source_uri}"
|
184
|
-
gem "rails"
|
185
|
-
G
|
186
|
-
end
|
187
|
-
|
188
|
-
it "should run without errors" do
|
189
|
-
bundle "install --standalone", :artifice => "endpoint", :exitstatus => true
|
190
|
-
|
191
|
-
expect(@exitstatus).to eq(0)
|
192
|
-
end
|
193
|
-
|
194
|
-
it "still makes the gems available to normal bundler" do
|
195
|
-
bundle "install --standalone", :artifice => "endpoint"
|
196
|
-
|
197
|
-
should_be_installed "actionpack 2.3.2", "rails 2.3.2"
|
198
|
-
end
|
199
|
-
|
200
|
-
it "generates a bundle/bundler/setup.rb" do
|
201
|
-
bundle "install --standalone", :artifice => "endpoint"
|
202
|
-
|
203
|
-
expect(bundled_app("bundle/bundler/setup.rb")).to exist
|
204
|
-
end
|
205
|
-
|
206
|
-
it "makes the gems available without bundler" do
|
207
|
-
bundle "install --standalone", :artifice => "endpoint"
|
208
|
-
|
209
|
-
ruby <<-RUBY, :no_lib => true
|
210
|
-
$:.unshift File.expand_path("bundle")
|
211
|
-
require "bundler/setup"
|
212
|
-
|
213
|
-
require "actionpack"
|
214
|
-
puts ACTIONPACK
|
215
|
-
RUBY
|
216
|
-
|
217
|
-
expect(out).to eq("2.3.2")
|
218
|
-
end
|
219
|
-
|
220
|
-
it "works on a different system" do
|
221
|
-
bundle "install --standalone", :artifice => "endpoint"
|
222
|
-
|
223
|
-
FileUtils.mv(bundled_app, "#{bundled_app}2")
|
224
|
-
Dir.chdir("#{bundled_app}2")
|
225
|
-
|
226
|
-
ruby <<-RUBY, :no_lib => true
|
227
|
-
$:.unshift File.expand_path("bundle")
|
228
|
-
require "bundler/setup"
|
229
|
-
|
230
|
-
require "actionpack"
|
231
|
-
puts ACTIONPACK
|
232
|
-
RUBY
|
233
|
-
|
234
|
-
expect(out).to eq("2.3.2")
|
235
|
-
end
|
236
|
-
end
|
237
|
-
end
|
238
|
-
|
239
|
-
describe "with --binstubs" do
|
240
|
-
before do
|
241
|
-
install_gemfile <<-G, :standalone => true, :binstubs => true
|
242
|
-
source "file://#{gem_repo1}"
|
243
|
-
gem "rails"
|
244
|
-
G
|
245
|
-
end
|
246
|
-
|
247
|
-
it "creates stubs that use the standalone load path" do
|
248
|
-
Dir.chdir(bundled_app) do
|
249
|
-
expect(`bin/rails -v`.chomp).to eql "2.3.2"
|
250
|
-
end
|
251
|
-
end
|
252
|
-
|
253
|
-
it "creates stubs that can be executed from anywhere" do
|
254
|
-
require 'tmpdir'
|
255
|
-
Dir.chdir(Dir.tmpdir) do
|
256
|
-
expect(`#{bundled_app}/bin/rails -v`.chomp).to eql "2.3.2"
|
257
|
-
end
|
258
|
-
end
|
259
|
-
end
|
260
|
-
end
|
@@ -1,136 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe "when using sudo", :sudo => true do
|
4
|
-
describe "and BUNDLE_PATH is writable" do
|
5
|
-
context "but BUNDLE_PATH/build_info is not writable" do
|
6
|
-
before do
|
7
|
-
subdir = system_gem_path('cache')
|
8
|
-
subdir.mkpath
|
9
|
-
sudo "chmod u-w #{subdir}"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "installs" do
|
13
|
-
install_gemfile <<-G
|
14
|
-
source "file://#{gem_repo1}"
|
15
|
-
gem "rack"
|
16
|
-
G
|
17
|
-
|
18
|
-
expect(out).to_not match(/an error occurred/i)
|
19
|
-
expect(system_gem_path("cache/rack-1.0.0.gem")).to exist
|
20
|
-
should_be_installed "rack 1.0"
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe "and GEM_HOME is owned by root" do
|
26
|
-
before :each do
|
27
|
-
chown_system_gems_to_root
|
28
|
-
end
|
29
|
-
|
30
|
-
it "installs" do
|
31
|
-
install_gemfile <<-G
|
32
|
-
source "file://#{gem_repo1}"
|
33
|
-
gem "rack", '1.0'
|
34
|
-
gem "thin"
|
35
|
-
G
|
36
|
-
|
37
|
-
expect(system_gem_path("gems/rack-1.0.0")).to exist
|
38
|
-
expect(system_gem_path("gems/rack-1.0.0").stat.uid).to eq(0)
|
39
|
-
should_be_installed "rack 1.0"
|
40
|
-
end
|
41
|
-
|
42
|
-
it "installs rake and a gem dependent on rake in the same session" do
|
43
|
-
gemfile <<-G
|
44
|
-
source "file://#{gem_repo1}"
|
45
|
-
gem "rake"
|
46
|
-
gem "another_implicit_rake_dep"
|
47
|
-
G
|
48
|
-
bundle "install"
|
49
|
-
expect(system_gem_path("gems/another_implicit_rake_dep-1.0")).to exist
|
50
|
-
end
|
51
|
-
|
52
|
-
|
53
|
-
it "installs when BUNDLE_PATH is owned by root" do
|
54
|
-
bundle_path = tmp("owned_by_root")
|
55
|
-
FileUtils.mkdir_p bundle_path
|
56
|
-
sudo "chown -R root #{bundle_path}"
|
57
|
-
|
58
|
-
ENV['BUNDLE_PATH'] = bundle_path.to_s
|
59
|
-
install_gemfile <<-G
|
60
|
-
source "file://#{gem_repo1}"
|
61
|
-
gem "rack", '1.0'
|
62
|
-
G
|
63
|
-
|
64
|
-
expect(bundle_path.join("gems/rack-1.0.0")).to exist
|
65
|
-
expect(bundle_path.join("gems/rack-1.0.0").stat.uid).to eq(0)
|
66
|
-
should_be_installed "rack 1.0"
|
67
|
-
end
|
68
|
-
|
69
|
-
it "installs when BUNDLE_PATH does not exist" do
|
70
|
-
root_path = tmp("owned_by_root")
|
71
|
-
FileUtils.mkdir_p root_path
|
72
|
-
sudo "chown -R root #{root_path}"
|
73
|
-
bundle_path = root_path.join("does_not_exist")
|
74
|
-
|
75
|
-
ENV['BUNDLE_PATH'] = bundle_path.to_s
|
76
|
-
install_gemfile <<-G
|
77
|
-
source "file://#{gem_repo1}"
|
78
|
-
gem "rack", '1.0'
|
79
|
-
G
|
80
|
-
|
81
|
-
expect(bundle_path.join("gems/rack-1.0.0")).to exist
|
82
|
-
expect(bundle_path.join("gems/rack-1.0.0").stat.uid).to eq(0)
|
83
|
-
should_be_installed "rack 1.0"
|
84
|
-
end
|
85
|
-
|
86
|
-
it "installs extensions/ compiled by Rubygems 2.2", :rubygems => "2.2" do
|
87
|
-
install_gemfile <<-G
|
88
|
-
source "file://#{gem_repo1}"
|
89
|
-
gem "very_simple_binary"
|
90
|
-
G
|
91
|
-
|
92
|
-
expect(system_gem_path("gems/very_simple_binary-1.0")).to exist
|
93
|
-
binary_glob = system_gem_path("extensions/*/*/very_simple_binary-1.0")
|
94
|
-
expect(Dir.glob(binary_glob).first).to be
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
describe "and BUNDLE_PATH is not writable" do
|
99
|
-
it "installs" do
|
100
|
-
sudo "chmod ugo-w #{default_bundle_path}"
|
101
|
-
install_gemfile <<-G
|
102
|
-
source "file://#{gem_repo1}"
|
103
|
-
gem "rack", '1.0'
|
104
|
-
G
|
105
|
-
|
106
|
-
expect(default_bundle_path("gems/rack-1.0.0")).to exist
|
107
|
-
should_be_installed "rack 1.0"
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
describe "and GEM_HOME is not writable" do
|
112
|
-
it "installs" do
|
113
|
-
gem_home = tmp('sudo_gem_home')
|
114
|
-
sudo "mkdir -p #{gem_home}"
|
115
|
-
sudo "chmod ugo-w #{gem_home}"
|
116
|
-
|
117
|
-
gemfile <<-G
|
118
|
-
source "file://#{gem_repo1}"
|
119
|
-
gem "rack", '1.0'
|
120
|
-
G
|
121
|
-
|
122
|
-
bundle :install, :env => {'GEM_HOME' => gem_home.to_s, 'GEM_PATH' => nil}
|
123
|
-
expect(gem_home.join('bin/rackup')).to exist
|
124
|
-
should_be_installed "rack 1.0", :env => {'GEM_HOME' => gem_home.to_s, 'GEM_PATH' => nil}
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
describe "and root runs install" do
|
129
|
-
it "warns against that" do
|
130
|
-
gemfile %|source "file://#{gem_repo1}"|
|
131
|
-
bundle :install, :sudo => true
|
132
|
-
expect(out).to include("Don't run Bundler as root.")
|
133
|
-
end
|
134
|
-
end
|
135
|
-
|
136
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe "bundle install with win32-generated lockfile" do
|
4
|
-
it "should read lockfile" do
|
5
|
-
File.open(bundled_app('Gemfile.lock'), 'wb') do |f|
|
6
|
-
f << "GEM\r\n"
|
7
|
-
f << " remote: file:#{gem_repo1}/\r\n"
|
8
|
-
f << " specs:\r\n"
|
9
|
-
f << "\r\n"
|
10
|
-
f << " rack (1.0.0)\r\n"
|
11
|
-
f << "\r\n"
|
12
|
-
f << "PLATFORMS\r\n"
|
13
|
-
f << " ruby\r\n"
|
14
|
-
f << "\r\n"
|
15
|
-
f << "DEPENDENCIES\r\n"
|
16
|
-
f << " rack\r\n"
|
17
|
-
end
|
18
|
-
|
19
|
-
install_gemfile <<-G, :exitstatus => true
|
20
|
-
source "file://#{gem_repo1}"
|
21
|
-
|
22
|
-
gem "rack"
|
23
|
-
G
|
24
|
-
expect(@exitstatus).to eq(0)
|
25
|
-
end
|
26
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe "bundle install" do
|
4
|
-
|
5
|
-
describe "when a gem has a YAML gemspec" do
|
6
|
-
before :each do
|
7
|
-
build_repo2 do
|
8
|
-
build_gem "yaml_spec", :gemspec => :yaml
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
it "still installs correctly" do
|
13
|
-
gemfile <<-G
|
14
|
-
source "file://#{gem_repo2}"
|
15
|
-
gem "yaml_spec"
|
16
|
-
G
|
17
|
-
bundle :install
|
18
|
-
expect(err).to be_empty
|
19
|
-
end
|
20
|
-
|
21
|
-
it "still installs correctly when using path" do
|
22
|
-
build_lib 'yaml_spec', :gemspec => :yaml
|
23
|
-
|
24
|
-
install_gemfile <<-G
|
25
|
-
gem 'yaml_spec', :path => "#{lib_path('yaml_spec-1.0')}"
|
26
|
-
G
|
27
|
-
expect(err).to eq("")
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
it "should use gemspecs in the system cache when available" do
|
32
|
-
gemfile <<-G
|
33
|
-
source "http://localtestserver.gem"
|
34
|
-
gem 'rack'
|
35
|
-
G
|
36
|
-
|
37
|
-
FileUtils.mkdir_p "#{tmp}/gems/system/specifications"
|
38
|
-
File.open("#{tmp}/gems/system/specifications/rack-1.0.0.gemspec", 'w+') do |f|
|
39
|
-
spec = Gem::Specification.new do |s|
|
40
|
-
s.name = 'rack'
|
41
|
-
s.version = '1.0.0'
|
42
|
-
s.add_runtime_dependency 'activesupport', '2.3.2'
|
43
|
-
end
|
44
|
-
f.write spec.to_ruby
|
45
|
-
end
|
46
|
-
bundle :install, :artifice => 'endpoint_marshal_fail' # force gemspec load
|
47
|
-
should_be_installed "activesupport 2.3.2"
|
48
|
-
end
|
49
|
-
|
50
|
-
end
|