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
data/spec/install/path_spec.rb
DELETED
@@ -1,150 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe "bundle install" do
|
4
|
-
|
5
|
-
describe "with --path" do
|
6
|
-
before :each do
|
7
|
-
build_gem "rack", "1.0.0", :to_system => true do |s|
|
8
|
-
s.write "lib/rack.rb", "puts 'FAIL'"
|
9
|
-
end
|
10
|
-
|
11
|
-
gemfile <<-G
|
12
|
-
source "file://#{gem_repo1}"
|
13
|
-
gem "rack"
|
14
|
-
G
|
15
|
-
end
|
16
|
-
|
17
|
-
it "does not use available system gems with bundle --path vendor/bundle" do
|
18
|
-
bundle "install --path vendor/bundle"
|
19
|
-
should_be_installed "rack 1.0.0"
|
20
|
-
end
|
21
|
-
|
22
|
-
it "handles paths with regex characters in them" do
|
23
|
-
dir = bundled_app("bun++dle")
|
24
|
-
dir.mkpath
|
25
|
-
|
26
|
-
Dir.chdir(dir) do
|
27
|
-
bundle "install --path vendor/bundle"
|
28
|
-
expect(out).to include("installed into ./vendor/bundle")
|
29
|
-
end
|
30
|
-
|
31
|
-
dir.rmtree
|
32
|
-
end
|
33
|
-
|
34
|
-
it "prints a warning to let the user know what has happened with bundle --path vendor/bundle" do
|
35
|
-
bundle "install --path vendor/bundle"
|
36
|
-
expect(out).to include("It was installed into ./vendor")
|
37
|
-
end
|
38
|
-
|
39
|
-
it "disallows --path vendor/bundle --system" do
|
40
|
-
bundle "install --path vendor/bundle --system"
|
41
|
-
expect(out).to include("Please choose.")
|
42
|
-
end
|
43
|
-
|
44
|
-
it "remembers to disable system gems after the first time with bundle --path vendor/bundle" do
|
45
|
-
bundle "install --path vendor/bundle"
|
46
|
-
FileUtils.rm_rf bundled_app('vendor')
|
47
|
-
bundle "install"
|
48
|
-
|
49
|
-
expect(vendored_gems('gems/rack-1.0.0')).to be_directory
|
50
|
-
should_be_installed "rack 1.0.0"
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
describe "when BUNDLE_PATH or the global path config is set" do
|
55
|
-
before :each do
|
56
|
-
build_lib "rack", "1.0.0", :to_system => true do |s|
|
57
|
-
s.write "lib/rack.rb", "raise 'FAIL'"
|
58
|
-
end
|
59
|
-
|
60
|
-
gemfile <<-G
|
61
|
-
source "file://#{gem_repo1}"
|
62
|
-
gem "rack"
|
63
|
-
G
|
64
|
-
end
|
65
|
-
|
66
|
-
def set_bundle_path(type, location)
|
67
|
-
if type == :env
|
68
|
-
ENV["BUNDLE_PATH"] = location
|
69
|
-
elsif type == :global
|
70
|
-
bundle "config path #{location}", "no-color" => nil
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
[:env, :global].each do |type|
|
75
|
-
it "installs gems to a path if one is specified" do
|
76
|
-
set_bundle_path(type, bundled_app("vendor2").to_s)
|
77
|
-
bundle "install --path vendor/bundle"
|
78
|
-
|
79
|
-
expect(vendored_gems("gems/rack-1.0.0")).to be_directory
|
80
|
-
expect(bundled_app("vendor2")).not_to be_directory
|
81
|
-
should_be_installed "rack 1.0.0"
|
82
|
-
end
|
83
|
-
|
84
|
-
it "installs gems to BUNDLE_PATH with #{type}" do
|
85
|
-
set_bundle_path(type, bundled_app("vendor").to_s)
|
86
|
-
|
87
|
-
bundle :install
|
88
|
-
|
89
|
-
expect(bundled_app('vendor/gems/rack-1.0.0')).to be_directory
|
90
|
-
should_be_installed "rack 1.0.0"
|
91
|
-
end
|
92
|
-
|
93
|
-
it "installs gems to BUNDLE_PATH relative to root when relative" do
|
94
|
-
set_bundle_path(type, "vendor")
|
95
|
-
|
96
|
-
FileUtils.mkdir_p bundled_app('lol')
|
97
|
-
Dir.chdir(bundled_app('lol')) do
|
98
|
-
bundle :install
|
99
|
-
end
|
100
|
-
|
101
|
-
expect(bundled_app('vendor/gems/rack-1.0.0')).to be_directory
|
102
|
-
should_be_installed "rack 1.0.0"
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
it "installs gems to BUNDLE_PATH from .bundle/config" do
|
107
|
-
config "BUNDLE_PATH" => bundled_app("vendor/bundle").to_s
|
108
|
-
|
109
|
-
bundle :install
|
110
|
-
|
111
|
-
expect(vendored_gems('gems/rack-1.0.0')).to be_directory
|
112
|
-
should_be_installed "rack 1.0.0"
|
113
|
-
end
|
114
|
-
|
115
|
-
it "sets BUNDLE_PATH as the first argument to bundle install" do
|
116
|
-
bundle "install --path ./vendor/bundle"
|
117
|
-
|
118
|
-
expect(vendored_gems('gems/rack-1.0.0')).to be_directory
|
119
|
-
should_be_installed "rack 1.0.0"
|
120
|
-
end
|
121
|
-
|
122
|
-
it "disables system gems when passing a path to install" do
|
123
|
-
# This is so that vendored gems can be distributed to others
|
124
|
-
build_gem "rack", "1.1.0", :to_system => true
|
125
|
-
bundle "install --path ./vendor/bundle"
|
126
|
-
|
127
|
-
expect(vendored_gems('gems/rack-1.0.0')).to be_directory
|
128
|
-
should_be_installed "rack 1.0.0"
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
describe "to a dead symlink" do
|
133
|
-
before do
|
134
|
-
in_app_root do
|
135
|
-
`ln -s /tmp/idontexist bundle`
|
136
|
-
end
|
137
|
-
end
|
138
|
-
|
139
|
-
it "reports the symlink is dead" do
|
140
|
-
gemfile <<-G
|
141
|
-
source "file://#{gem_repo1}"
|
142
|
-
gem "rack"
|
143
|
-
G
|
144
|
-
|
145
|
-
bundle "install --path bundle"
|
146
|
-
expect(out).to match(/invalid symlink/)
|
147
|
-
end
|
148
|
-
end
|
149
|
-
|
150
|
-
end
|
@@ -1,142 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe "post bundle message" do
|
4
|
-
before :each do
|
5
|
-
gemfile <<-G
|
6
|
-
source "file://#{gem_repo1}"
|
7
|
-
gem "rack"
|
8
|
-
gem "activesupport", "2.3.5", :group => [:emo, :test]
|
9
|
-
group :test do
|
10
|
-
gem "rspec"
|
11
|
-
end
|
12
|
-
gem "rack-obama", :group => :obama
|
13
|
-
G
|
14
|
-
end
|
15
|
-
|
16
|
-
let(:bundle_show_message) {"Use `bundle show [gemname]` to see where a bundled gem is installed."}
|
17
|
-
let(:bundle_deployment_message) {"It was installed into ./vendor"}
|
18
|
-
let(:bundle_complete_message) {"Your bundle is complete!"}
|
19
|
-
let(:bundle_updated_message) {"Your bundle is updated!"}
|
20
|
-
|
21
|
-
describe "for fresh bundle install" do
|
22
|
-
it "without any options" do
|
23
|
-
bundle :install
|
24
|
-
expect(out).to include(bundle_show_message)
|
25
|
-
expect(out).not_to include("Gems in the group")
|
26
|
-
expect(out).to include(bundle_complete_message)
|
27
|
-
end
|
28
|
-
|
29
|
-
it "with --without one group" do
|
30
|
-
bundle "install --without emo"
|
31
|
-
expect(out).to include(bundle_show_message)
|
32
|
-
expect(out).to include("Gems in the group emo were not installed")
|
33
|
-
expect(out).to include(bundle_complete_message)
|
34
|
-
end
|
35
|
-
|
36
|
-
it "with --without two groups" do
|
37
|
-
bundle "install --without emo test"
|
38
|
-
expect(out).to include(bundle_show_message)
|
39
|
-
expect(out).to include("Gems in the groups emo and test were not installed")
|
40
|
-
expect(out).to include(bundle_complete_message)
|
41
|
-
end
|
42
|
-
|
43
|
-
it "with --without more groups" do
|
44
|
-
bundle "install --without emo obama test"
|
45
|
-
expect(out).to include(bundle_show_message)
|
46
|
-
expect(out).to include("Gems in the groups emo, obama and test were not installed")
|
47
|
-
expect(out).to include(bundle_complete_message)
|
48
|
-
end
|
49
|
-
|
50
|
-
describe "with --path and" do
|
51
|
-
it "without any options" do
|
52
|
-
bundle "install --path vendor"
|
53
|
-
expect(out).to include(bundle_deployment_message)
|
54
|
-
expect(out).to_not include("Gems in the group")
|
55
|
-
expect(out).to include(bundle_complete_message)
|
56
|
-
end
|
57
|
-
|
58
|
-
it "with --without one group" do
|
59
|
-
bundle "install --without emo --path vendor"
|
60
|
-
expect(out).to include(bundle_deployment_message)
|
61
|
-
expect(out).to include("Gems in the group emo were not installed")
|
62
|
-
expect(out).to include(bundle_complete_message)
|
63
|
-
end
|
64
|
-
|
65
|
-
it "with --without two groups" do
|
66
|
-
bundle "install --without emo test --path vendor"
|
67
|
-
expect(out).to include(bundle_deployment_message)
|
68
|
-
expect(out).to include("Gems in the groups emo and test were not installed")
|
69
|
-
expect(out).to include(bundle_complete_message)
|
70
|
-
end
|
71
|
-
|
72
|
-
it "with --without more groups" do
|
73
|
-
bundle "install --without emo obama test --path vendor"
|
74
|
-
expect(out).to include(bundle_deployment_message)
|
75
|
-
expect(out).to include("Gems in the groups emo, obama and test were not installed")
|
76
|
-
expect(out).to include(bundle_complete_message)
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
describe "for second bundle install run" do
|
82
|
-
it "without any options" do
|
83
|
-
2.times { bundle :install }
|
84
|
-
expect(out).to include(bundle_show_message)
|
85
|
-
expect(out).to_not include("Gems in the groups")
|
86
|
-
expect(out).to include(bundle_complete_message)
|
87
|
-
end
|
88
|
-
|
89
|
-
it "with --without one group" do
|
90
|
-
bundle "install --without emo"
|
91
|
-
bundle :install
|
92
|
-
expect(out).to include(bundle_show_message)
|
93
|
-
expect(out).to include("Gems in the group emo were not installed")
|
94
|
-
expect(out).to include(bundle_complete_message)
|
95
|
-
end
|
96
|
-
|
97
|
-
it "with --without two groups" do
|
98
|
-
bundle "install --without emo test"
|
99
|
-
bundle :install
|
100
|
-
expect(out).to include(bundle_show_message)
|
101
|
-
expect(out).to include("Gems in the groups emo and test were not installed")
|
102
|
-
expect(out).to include(bundle_complete_message)
|
103
|
-
end
|
104
|
-
|
105
|
-
it "with --without more groups" do
|
106
|
-
bundle "install --without emo obama test"
|
107
|
-
bundle :install
|
108
|
-
expect(out).to include(bundle_show_message)
|
109
|
-
expect(out).to include("Gems in the groups emo, obama and test were not installed")
|
110
|
-
expect(out).to include(bundle_complete_message)
|
111
|
-
end
|
112
|
-
end
|
113
|
-
|
114
|
-
describe "for bundle update" do
|
115
|
-
it "without any options" do
|
116
|
-
bundle :update
|
117
|
-
expect(out).not_to include("Gems in the groups")
|
118
|
-
expect(out).to include(bundle_updated_message)
|
119
|
-
end
|
120
|
-
|
121
|
-
it "with --without one group" do
|
122
|
-
bundle :install, :without => :emo
|
123
|
-
bundle :update
|
124
|
-
expect(out).to include("Gems in the group emo were not installed")
|
125
|
-
expect(out).to include(bundle_updated_message)
|
126
|
-
end
|
127
|
-
|
128
|
-
it "with --without two groups" do
|
129
|
-
bundle "install --without emo test"
|
130
|
-
bundle :update
|
131
|
-
expect(out).to include("Gems in the groups emo and test were not installed")
|
132
|
-
expect(out).to include(bundle_updated_message)
|
133
|
-
end
|
134
|
-
|
135
|
-
it "with --without more groups" do
|
136
|
-
bundle "install --without emo obama test"
|
137
|
-
bundle :update
|
138
|
-
expect(out).to include("Gems in the groups emo, obama and test were not installed")
|
139
|
-
expect(out).to include(bundle_updated_message)
|
140
|
-
end
|
141
|
-
end
|
142
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe "bundle install" do
|
4
|
-
|
5
|
-
describe "when prerelease gems are available" do
|
6
|
-
it "finds prereleases" do
|
7
|
-
install_gemfile <<-G
|
8
|
-
source "file://#{gem_repo1}"
|
9
|
-
gem "not_released"
|
10
|
-
G
|
11
|
-
should_be_installed "not_released 1.0.pre"
|
12
|
-
end
|
13
|
-
|
14
|
-
it "uses regular releases if available" do
|
15
|
-
install_gemfile <<-G
|
16
|
-
source "file://#{gem_repo1}"
|
17
|
-
gem "has_prerelease"
|
18
|
-
G
|
19
|
-
should_be_installed "has_prerelease 1.0"
|
20
|
-
end
|
21
|
-
|
22
|
-
it "uses prereleases if requested" do
|
23
|
-
install_gemfile <<-G
|
24
|
-
source "file://#{gem_repo1}"
|
25
|
-
gem "has_prerelease", "1.1.pre"
|
26
|
-
G
|
27
|
-
should_be_installed "has_prerelease 1.1.pre"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
describe "when prerelease gems are not available" do
|
32
|
-
it "still works" do
|
33
|
-
build_repo3
|
34
|
-
install_gemfile <<-G
|
35
|
-
source "file://#{gem_repo3}"
|
36
|
-
gem "rack"
|
37
|
-
G
|
38
|
-
|
39
|
-
should_be_installed "rack 1.0"
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|
@@ -1,77 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
require "rubygems/security"
|
3
|
-
|
4
|
-
# unfortunately, testing signed gems with a provided CA is extremely difficult
|
5
|
-
# as 'gem cert' is currently the only way to add CAs to the system.
|
6
|
-
|
7
|
-
describe "policies with unsigned gems" do
|
8
|
-
before do
|
9
|
-
build_security_repo
|
10
|
-
gemfile <<-G
|
11
|
-
source "file://#{security_repo}"
|
12
|
-
gem "rack"
|
13
|
-
gem "signed_gem"
|
14
|
-
G
|
15
|
-
end
|
16
|
-
|
17
|
-
it "will work after you try to deploy without a lock" do
|
18
|
-
bundle "install --deployment"
|
19
|
-
bundle :install, :exitstatus => true
|
20
|
-
expect(exitstatus).to eq(0)
|
21
|
-
should_be_installed "rack 1.0", "signed_gem 1.0"
|
22
|
-
end
|
23
|
-
|
24
|
-
it "will fail when given invalid security policy" do
|
25
|
-
bundle "install --trust-policy=InvalidPolicyName"
|
26
|
-
expect(out).to include("Rubygems doesn't know about trust policy")
|
27
|
-
end
|
28
|
-
|
29
|
-
it "will fail with High Security setting due to presence of unsigned gem" do
|
30
|
-
bundle "install --trust-policy=HighSecurity"
|
31
|
-
expect(out).to include("security policy didn't allow")
|
32
|
-
end
|
33
|
-
|
34
|
-
# This spec will fail on Rubygems 2 rc1 due to a bug in policy.rb. the bug is fixed in rc3.
|
35
|
-
it "will fail with Medium Security setting due to presence of unsigned gem", :unless => ENV['RGV'] == "v2.0.0.rc.1" do
|
36
|
-
bundle "install --trust-policy=MediumSecurity"
|
37
|
-
expect(out).to include("security policy didn't allow")
|
38
|
-
end
|
39
|
-
|
40
|
-
it "will succeed with no policy" do
|
41
|
-
bundle "install", :exitstatus => true
|
42
|
-
expect(exitstatus).to eq(0)
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
46
|
-
|
47
|
-
describe "policies with signed gems and no CA" do
|
48
|
-
before do
|
49
|
-
build_security_repo
|
50
|
-
gemfile <<-G
|
51
|
-
source "file://#{security_repo}"
|
52
|
-
gem "signed_gem"
|
53
|
-
G
|
54
|
-
end
|
55
|
-
|
56
|
-
it "will fail with High Security setting, gem is self-signed" do
|
57
|
-
bundle "install --trust-policy=HighSecurity"
|
58
|
-
expect(out).to include("security policy didn't allow")
|
59
|
-
end
|
60
|
-
|
61
|
-
it "will fail with Medium Security setting, gem is self-signed" do
|
62
|
-
bundle "install --trust-policy=MediumSecurity"
|
63
|
-
expect(out).to include("security policy didn't allow")
|
64
|
-
end
|
65
|
-
|
66
|
-
it "will succeed with Low Security setting, low security accepts self signed gem" do
|
67
|
-
bundle "install --trust-policy=LowSecurity", :exitstatus => true
|
68
|
-
expect(exitstatus).to eq(0)
|
69
|
-
should_be_installed "signed_gem 1.0"
|
70
|
-
end
|
71
|
-
|
72
|
-
it "will succeed with no policy" do
|
73
|
-
bundle "install", :exitstatus => true
|
74
|
-
expect(exitstatus).to eq(0)
|
75
|
-
should_be_installed "signed_gem 1.0"
|
76
|
-
end
|
77
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe "bundle install for the first time with v1.0" do
|
4
|
-
before :each do
|
5
|
-
in_app_root
|
6
|
-
|
7
|
-
gemfile <<-G
|
8
|
-
source "file://#{gem_repo1}"
|
9
|
-
gem "rack"
|
10
|
-
G
|
11
|
-
end
|
12
|
-
|
13
|
-
it "removes lockfiles in 0.9 YAML format" do
|
14
|
-
File.open("Gemfile.lock", "w"){|f| YAML.dump({}, f) }
|
15
|
-
bundle :install
|
16
|
-
expect(File.read("Gemfile.lock")).not_to match(/^---/)
|
17
|
-
end
|
18
|
-
|
19
|
-
it "removes env.rb if it exists" do
|
20
|
-
bundled_app.join(".bundle").mkdir
|
21
|
-
bundled_app.join(".bundle/environment.rb").open("w"){|f| f.write("raise 'nooo'") }
|
22
|
-
bundle :install
|
23
|
-
expect(bundled_app.join(".bundle/environment.rb")).not_to exist
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
data/spec/lock/git_spec.rb
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe "bundle lock with git gems" do
|
4
|
-
before :each do
|
5
|
-
build_git "foo"
|
6
|
-
|
7
|
-
install_gemfile <<-G
|
8
|
-
gem 'foo', :git => "#{lib_path('foo-1.0')}"
|
9
|
-
G
|
10
|
-
end
|
11
|
-
|
12
|
-
it "doesn't break right after running lock" do
|
13
|
-
should_be_installed "foo 1.0.0"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "locks a git source to the current ref" do
|
17
|
-
update_git "foo"
|
18
|
-
bundle :install
|
19
|
-
|
20
|
-
run <<-RUBY
|
21
|
-
require 'foo'
|
22
|
-
puts "WIN" unless defined?(FOO_PREV_REF)
|
23
|
-
RUBY
|
24
|
-
|
25
|
-
expect(out).to eq("WIN")
|
26
|
-
end
|
27
|
-
|
28
|
-
it "provides correct #full_gem_path" do
|
29
|
-
run <<-RUBY
|
30
|
-
puts Bundler.rubygems.find_name('foo').first.full_gem_path
|
31
|
-
RUBY
|
32
|
-
expect(out).to eq(bundle("show foo"))
|
33
|
-
end
|
34
|
-
end
|