bundler 1.5.3 → 1.6.0.pre.1

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.

Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +14 -11
  3. data/CHANGELOG.md +10 -3
  4. data/CONTRIBUTING.md +21 -12
  5. data/DEVELOPMENT.md +2 -2
  6. data/README.md +3 -2
  7. data/Rakefile +19 -9
  8. data/bundler.gemspec +1 -1
  9. data/lib/bundler.rb +9 -5
  10. data/lib/bundler/cli.rb +51 -10
  11. data/lib/bundler/dsl.rb +10 -6
  12. data/lib/bundler/friendly_errors.rb +1 -1
  13. data/lib/bundler/installer.rb +28 -17
  14. data/lib/bundler/parallel_workers/worker.rb +1 -1
  15. data/lib/bundler/resolver.rb +191 -207
  16. data/lib/bundler/rubygems_ext.rb +2 -4
  17. data/lib/bundler/rubygems_integration.rb +5 -0
  18. data/lib/bundler/runtime.rb +15 -12
  19. data/lib/bundler/settings.rb +4 -2
  20. data/lib/bundler/source.rb +11 -1
  21. data/lib/bundler/source/git.rb +11 -7
  22. data/lib/bundler/source/git/git_proxy.rb +4 -7
  23. data/lib/bundler/source/path.rb +21 -12
  24. data/lib/bundler/source/path/installer.rb +1 -1
  25. data/lib/bundler/source/rubygems.rb +18 -8
  26. data/lib/bundler/ssl_certs/certificate_manager.rb +41 -0
  27. data/lib/bundler/templates/newgem/README.md.tt +1 -1
  28. data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +2 -2
  29. data/lib/bundler/ui.rb +4 -141
  30. data/lib/bundler/ui/rg_proxy.rb +21 -0
  31. data/lib/bundler/ui/shell.rb +98 -0
  32. data/lib/bundler/ui/silent.rb +44 -0
  33. data/lib/bundler/vendor/net/http/faster.rb +0 -1
  34. data/lib/bundler/vendor/net/http/persistent.rb +0 -1
  35. data/lib/bundler/vendor/net/http/persistent/ssl_reuse.rb +0 -1
  36. data/lib/bundler/version.rb +1 -1
  37. data/spec/bundler/definition_spec.rb +2 -2
  38. data/spec/bundler/dsl_spec.rb +3 -3
  39. data/spec/bundler/gem_helper_spec.rb +5 -7
  40. data/spec/bundler/settings_spec.rb +15 -0
  41. data/spec/bundler/source_spec.rb +1 -1
  42. data/spec/commands/config_spec.rb +18 -0
  43. data/spec/commands/console_spec.rb +22 -0
  44. data/spec/commands/exec_spec.rb +1 -0
  45. data/spec/commands/newgem_spec.rb +2 -2
  46. data/spec/commands/open_spec.rb +13 -0
  47. data/spec/{install/gems/packed_spec.rb → commands/package_spec.rb} +30 -0
  48. data/spec/commands/show_spec.rb +87 -71
  49. data/spec/install/binstubs_spec.rb +1 -1
  50. data/spec/install/bundler_spec.rb +1 -1
  51. data/spec/install/gemfile/git_spec.rb +1 -1
  52. data/spec/install/gemfile/path_spec.rb +12 -0
  53. data/spec/install/gemfile_spec.rb +1 -1
  54. data/spec/install/gems/groups_spec.rb +1 -1
  55. data/spec/install/gems/platform_spec.rb +0 -1
  56. data/spec/install/gems/post_install_spec.rb +74 -0
  57. data/spec/install/gems/resolving_spec.rb +22 -26
  58. data/spec/install/gems/simple_case_spec.rb +17 -1
  59. data/spec/install/gemspecs_spec.rb +1 -1
  60. data/spec/install/path_spec.rb +1 -1
  61. data/spec/install/prereleases_spec.rb +1 -1
  62. data/spec/other/ext_spec.rb +1 -1
  63. data/spec/other/ssl_cert_spec.rb +10 -0
  64. data/spec/realworld/edgecases_spec.rb +1 -1
  65. data/spec/resolver/basic_spec.rb +29 -0
  66. data/spec/support/builders.rb +42 -43
  67. data/spec/support/indexes.rb +129 -1
  68. data/spec/support/permissions.rb +1 -0
  69. data/spec/update/gems_spec.rb +37 -0
  70. data/spec/update/git_spec.rb +24 -1
  71. data/spec/update/source_spec.rb +14 -1
  72. metadata +14 -9
  73. data/lib/bundler/safe_catch.rb +0 -101
  74. data/spec/bundler/safe_catch_spec.rb +0 -37
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+ require 'bundler/ssl_certs/certificate_manager'
3
+
4
+ describe "SSL Certificates", :if => (ENV['RGV'] == "master") do
5
+ it "are up to date with Rubygems" do
6
+ rubygems = File.expand_path("../../../tmp/rubygems", __FILE__)
7
+ manager = Bundler::SSLCerts::CertificateManager.new(rubygems)
8
+ expect(manager).to be_up_to_date
9
+ end
10
+ end
@@ -32,7 +32,7 @@ describe "real world edgecases", :realworld => true do
32
32
  gem 'activerecord', '~> 3.0'
33
33
  gem 'builder', '~> 2.1.2'
34
34
  G
35
- expect(out).to include("activemodel (3.0.5)")
35
+ expect(out).to include("activemodel 3.0.5")
36
36
  end
37
37
 
38
38
  # https://github.com/bundler/bundler/issues/1500
@@ -24,6 +24,35 @@ describe "Resolving" do
24
24
  should_resolve_as %w(activemodel-3.2.11 builder-3.0.4 grape-0.2.6 my_app-1.0.0)
25
25
  end
26
26
 
27
+ it "resolves a complex conflicting index" do
28
+ @index = a_complex_conflict_index
29
+ dep "my_app"
30
+ should_resolve_as %w(a-1.4.0 b-0.3.5 c-3.2 d-0.9.8 my_app-1.1.0)
31
+ end
32
+
33
+ it "resolves a index with conflict on child" do
34
+ @index = index_with_conflict_on_child
35
+ dep "chef_app"
36
+ should_resolve_as %w(berkshelf-2.0.7 chef-10.26 chef_app-1.0.0 json-1.7.7)
37
+ end
38
+
39
+ it "resolves a index with root level conflict on child" do
40
+ @index = a_index_with_root_conflict_on_child
41
+ dep "i18n", "~> 0.4"
42
+ dep "activesupport", "~> 3.0"
43
+ dep "activerecord", "~> 3.0"
44
+ dep "builder", "~> 2.1.2"
45
+ should_resolve_as %w(activesupport-3.0.5 i18n-0.4.2 builder-2.1.2 activerecord-3.0.5 activemodel-3.0.5)
46
+ end
47
+
48
+ it "raises an exception if a child dependency is not resolved" do
49
+ @index = a_unresovable_child_index
50
+ dep "chef_app_error"
51
+ expect {
52
+ resolve
53
+ }.to raise_error(Bundler::VersionConflict)
54
+ end
55
+
27
56
  it "should throw error in case of circular dependencies" do
28
57
  @index = a_circular_index
29
58
  dep "circular_app"
@@ -627,54 +627,53 @@ module Spec
627
627
 
628
628
  TEST_CERT=<<CERT
629
629
  -----BEGIN CERTIFICATE-----
630
- MIIDMjCCAhqgAwIBAgIBATANBgkqhkiG9w0BAQUFADAnMQwwCgYDVQQDDAN5b3Ux
631
- FzAVBgoJkiaJk/IsZAEZFgdleGFtcGxlMB4XDTE0MDIwNTE0MTEwNloXDTE1MDIw
632
- NTE0MTEwNlowJzEMMAoGA1UEAwwDeW91MRcwFQYKCZImiZPyLGQBGRYHZXhhbXBs
633
- ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANlvFdpN43c4DMS9Jo06
634
- m0a7k3bQ3HWQ1yrYhZMi77F1F73NpBknYHIzDktQpGn6hs/4QFJT4m4zNEBF47UL
635
- jHU5nTK5rjkS3niGYUjvh3ZEzVeo9zHUlD/UwflDo4ALl3TSo2KY/KdPS/UTdLXL
636
- ajkQvaVJtEDgBPE3DPhlj5whp+Ik3mDHej7qpV6F502leAwYaFyOtlEG/ZGNG+nZ
637
- L0clH0j77HpP42AylHDi+vakEM3xcjo9BeWQ6Vkboic93c9RTt6CWBWxMQP7Nol1
638
- MOebz9XOSQclxpxWteXNfPRtMdAhmRl76SMI8ywzThNPpa4EH/yz34ftebVOgKyM
639
- nd0CAwEAAaNpMGcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFA7D
640
- n9qo0np23qi3aOYuAAPn/5IdMBYGA1UdEQQPMA2BC3lvdUBleGFtcGxlMBYGA1Ud
641
- EgQPMA2BC3lvdUBleGFtcGxlMA0GCSqGSIb3DQEBBQUAA4IBAQB5N+71KiNX3k0Y
642
- FWizUHUYOqo+fEk3aBoFbOFcx+M5TXPiA91pH8mgyyD9tVzqiYgCGk7g/UrOv5Ec
643
- NHjYqsFecNPayj8u2Po07pp2Nbc9aqt9uxoRSENZ72Dzrk3YDStgji7Sk/LZW5Kn
644
- 4JFTeRof+B7/ZijLZWBEnMfSHSIPaQu0Ig6c19OEhiiuhGOn4WUhGFYCadciKgnj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6qd4AjDCO//e/BHHe44r+vASqglYO
644
+ zTrTWYgjtDmPOLDvZTHhZ3kBV0Q0pGCBi7f0VYpqjEHSeyRfqJH1LT8yYC3vuYzZ
645
+ PPIub1CZNnaS4jvtSKZsEzaijftwI7ddt/S9Yt7BahUrfHCMrA/Nt3XSDu0BcgaF
646
+ cxrVBbDO8ELUvTY1yFcMYE1gzTIPCYE9TWXgm7A9HcD/7XLXkUL6nuvG3wwpBPTa
648
647
  -----END CERTIFICATE-----
649
648
  CERT
650
649
 
651
650
  TEST_PKEY=<<PKEY
652
651
  -----BEGIN RSA PRIVATE KEY-----
653
- MIIEowIBAAKCAQEA2W8V2k3jdzgMxL0mjTqbRruTdtDcdZDXKtiFkyLvsXUXvc2k
654
- GSdgcjMOS1CkafqGz/hAUlPibjM0QEXjtQuMdTmdMrmuORLeeIZhSO+HdkTNV6j3
655
- MdSUP9TB+UOjgAuXdNKjYpj8p09L9RN0tctqORC9pUm0QOAE8TcM+GWPnCGn4iTe
656
- YMd6PuqlXoXnTaV4DBhoXI62UQb9kY0b6dkvRyUfSPvsek/jYDKUcOL69qQQzfFy
657
- Oj0F5ZDpWRuiJz3dz1FO3oJYFbExA/s2iXUw55vP1c5JByXGnFa15c189G0x0CGZ
658
- GXvpIwjzLDNOE0+lrgQf/LPfh+15tU6ArIyd3QIDAQABAoIBACbDqz20TS1gDMa2
659
- gj0DidNedbflHKjJHdNBru7Ad8NHgOgR1YO2hXdWquG6itVqGMbTF4SV9/R1pIcg
660
- 7qvEV1I+50u31tvOBWOvcYCzU48+TO2n7gowQA3xPHPYHzog1uu48fAOHl0lwgD7
661
- av9OOK3b0jO5pC08wyTOD73pPWU0NrkTh2+N364leIi1pNuI1z4V+nEuIIm7XpVd
662
- 5V4sXidMTiEMJwE6baEDfTjHKaoRndXrrPo3ryIXmcX7Ag1SwAQwF5fBCRToCgIx
663
- dszEZB1bJD5gA6r+eGnJLB/F60nK607az5o3EdguoB2LKa6q6krpaRCmZU5svvoF
664
- J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ZfqalPG6oEUSGFJ4SrS+dK24
670
+ CD4Tih+iwzwDAeTgM1oaNVumxLfijgH2wq/sl8rd0ZMBsy88GWmESZPpSUePOCQu
671
+ E0Fny2jJRyiSAHEC9ka4UQKBgDFBmWKDOeBcjzlwYPmQWvp1JVHbodZhCTFJSbuN
672
+ +z3AP0qFA8PaQnAQVzuzzqu2iDNtVu+IKDOIopdqzhxII/TMBGjFip6vG7gNi8+P
673
+ 2Qo8sOJn2/idzMs1UjAvPJlgN8qM6YzjAk1AjHK+kDKvhijIOPEM1dBanXKo+Tpz
674
+ UXJ/AoGABULY7oaW7vW7XLiHVTHeoqi9m9yNTVQRnsMFJm5GhisjavZbCzCGz1Tl
675
+ hiIdZiAgSpltgy7+R7l7JhmFf04xVnEJc/4lyJc4ZwYXkMGqD1tE9FXowbBFKktB
676
+ cPFVDEsR7SPkiAmGm99WiigexSwxW9hl+TjgolcXG7HTDsES2Sg=
678
677
  -----END RSA PRIVATE KEY-----
679
678
  PKEY
680
679
  end
@@ -2,7 +2,7 @@ module Spec
2
2
  module Indexes
3
3
  def dep(name, reqs = nil)
4
4
  @deps ||= []
5
- @deps << Bundler::Dependency.new(name, :version => reqs)
5
+ @deps << Bundler::Dependency.new(name, reqs)
6
6
  end
7
7
 
8
8
  def platform(*args)
@@ -131,6 +131,133 @@ module Spec
131
131
  end
132
132
  end
133
133
 
134
+ def a_complex_conflict_index
135
+ build_index do
136
+ gem("a", %w(1.0.2 1.1.4 1.2.0 1.4.0)) do
137
+ dep "d", ">= 0"
138
+ end
139
+
140
+ gem("d", %w(1.3.0 1.4.1)) do
141
+ dep "x", ">= 0"
142
+ end
143
+
144
+ gem "d", "0.9.8"
145
+
146
+ gem("b", '0.3.4') do
147
+ dep "a", ">= 1.5.0"
148
+ end
149
+
150
+ gem("b", '0.3.5') do
151
+ dep "a", ">= 1.2"
152
+ end
153
+
154
+ gem("b", '0.3.3') do
155
+ dep "a", "> 1.0"
156
+ end
157
+
158
+ versions '3.2 3.3' do |version|
159
+ gem("c", version) do
160
+ dep "a", "~> 1.0"
161
+ end
162
+ end
163
+
164
+ gem("my_app", '1.3.0') do
165
+ dep "c", ">= 4.0"
166
+ dep "b", ">= 0"
167
+ end
168
+
169
+ gem("my_app", '1.2.0') do
170
+ dep "c", "~> 3.3.0"
171
+ dep "b", "0.3.4"
172
+ end
173
+
174
+ gem("my_app", '1.1.0') do
175
+ dep "c", "~> 3.2.0"
176
+ dep "b", "0.3.5"
177
+ end
178
+ end
179
+ end
180
+
181
+ def index_with_conflict_on_child
182
+ build_index do
183
+ gem "json", %w(1.6.5 1.7.7 1.8.0)
184
+
185
+ gem("chef", '10.26') do
186
+ dep "json", [">= 1.4.4", "<= 1.7.7"]
187
+ end
188
+
189
+ gem("berkshelf", "2.0.7") do
190
+ dep "json", ">= 1.7.7"
191
+ end
192
+
193
+ gem("chef_app", '1.0.0') do
194
+ dep "berkshelf", "~> 2.0"
195
+ dep "chef", "~> 10.26"
196
+ end
197
+ end
198
+ end
199
+
200
+ def a_unresovable_child_index
201
+ build_index do
202
+ gem "json", %w(1.8.0)
203
+
204
+ gem("chef", '10.26') do
205
+ dep "json", [">= 1.4.4", "<= 1.7.7"]
206
+ end
207
+
208
+ gem("berkshelf", "2.0.7") do
209
+ dep "json", ">= 1.7.7"
210
+ end
211
+
212
+ gem("chef_app_error", '1.0.0') do
213
+ dep "berkshelf", "~> 2.0"
214
+ dep "chef", "~> 10.26"
215
+ end
216
+ end
217
+ end
218
+
219
+ def a_index_with_root_conflict_on_child
220
+ build_index do
221
+ gem "builder", %w(2.1.2 3.0.1 3.1.3)
222
+ gem "i18n", %w(0.4.1 0.4.2)
223
+
224
+ gem "activesupport", %w(3.0.0 3.0.1 3.0.5 3.1.7)
225
+
226
+ gem("activemodel", '3.0.5') do
227
+ dep "activesupport", "= 3.0.5"
228
+ dep "builder", "~> 2.1.2"
229
+ dep 'i18n', '~> 0.4'
230
+ end
231
+
232
+ gem("activemodel", '3.0.0') do
233
+ dep "activesupport", "= 3.0.0"
234
+ dep "builder", "~> 2.1.2"
235
+ dep 'i18n', '~> 0.4.1'
236
+ end
237
+
238
+ gem("activemodel", '3.1.3') do
239
+ dep "activesupport", "= 3.1.3"
240
+ dep "builder", "~> 2.1.2"
241
+ dep 'i18n', '~> 0.5'
242
+ end
243
+
244
+ gem("activerecord", '3.0.0') do
245
+ dep "activesupport", "= 3.0.0"
246
+ dep "activemodel", "= 3.0.0"
247
+ end
248
+
249
+ gem("activerecord", '3.0.5') do
250
+ dep "activesupport", "= 3.0.5"
251
+ dep "activemodel", "= 3.0.5"
252
+ end
253
+
254
+ gem("activerecord", '3.0.9') do
255
+ dep "activesupport", "= 3.1.5"
256
+ dep "activemodel", "= 3.1.5"
257
+ end
258
+ end
259
+ end
260
+
134
261
  def a_circular_index
135
262
  build_index do
136
263
  gem "rack", "1.0.1"
@@ -148,5 +275,6 @@ module Spec
148
275
  end
149
276
  end
150
277
  end
278
+
151
279
  end
152
280
  end
@@ -8,3 +8,4 @@ module Spec
8
8
  end
9
9
  end
10
10
  end
11
+
@@ -83,6 +83,22 @@ describe "bundle update" do
83
83
  expect(out).not_to match(/Fetching source index/)
84
84
  end
85
85
  end
86
+
87
+ describe "with --group option" do
88
+ it "should update only specifed group gems" do
89
+ install_gemfile <<-G
90
+ source "file://#{gem_repo2}"
91
+ gem "activesupport", :group => :development
92
+ gem "rack"
93
+ G
94
+ update_repo2 do
95
+ build_gem "activesupport", "3.0"
96
+ end
97
+ bundle "update --group development"
98
+ should_be_installed "activesupport 3.0"
99
+ should_not_be_installed "rack 1.2"
100
+ end
101
+ end
86
102
  end
87
103
 
88
104
  describe "bundle update in more complicated situations" do
@@ -151,3 +167,24 @@ describe "bundle update when a gem depends on a newer version of bundler" do
151
167
  expect(out).to match(/perhaps you need to update bundler/i)
152
168
  end
153
169
  end
170
+
171
+ describe "bundle update" do
172
+ it "shows the previous version of the gem when updated from rubygems source" do
173
+ build_repo2
174
+
175
+ install_gemfile <<-G
176
+ source "file://#{gem_repo2}"
177
+ gem "activesupport"
178
+ G
179
+
180
+ bundle "update"
181
+ expect(out).to include("Using activesupport 2.3.5")
182
+
183
+ update_repo2 do
184
+ build_gem "activesupport", "3.0"
185
+ end
186
+
187
+ bundle "update"
188
+ expect(out).to include("Installing activesupport 3.0 (was 2.3.5)")
189
+ end
190
+ end
@@ -32,7 +32,7 @@ describe "bundle update" do
32
32
  G
33
33
 
34
34
  bundle "update rails"
35
- expect(out).to include("Using activesupport (3.0) from #{lib_path('rails')} (at master)")
35
+ expect(out).to include("Using activesupport 3.0 from #{lib_path('rails')} (at master)")
36
36
  should_be_installed "rails 3.0", "activesupport 3.0"
37
37
  end
38
38
 
@@ -209,5 +209,28 @@ describe "bundle update" do
209
209
  expect(out).to include("Your bundle is updated!")
210
210
  end
211
211
 
212
+ it "shows the previous version of the gem" do
213
+ build_git "rails", "3.0", :path => lib_path("rails")
214
+
215
+ install_gemfile <<-G
216
+ gem "rails", :git => "#{lib_path('rails')}"
217
+ G
218
+
219
+ lockfile <<-G
220
+ GIT
221
+ remote: #{lib_path("rails")}
222
+ specs:
223
+ rails (2.3.2)
224
+
225
+ PLATFORMS
226
+ #{generic(Gem::Platform.local)}
227
+
228
+ DEPENDENCIES
229
+ rails!
230
+ G
231
+
232
+ bundle "update"
233
+ expect(out).to include("Using rails 3.0 (was 2.3.2) from #{lib_path('rails')} (at master)")
234
+ end
212
235
  end
213
236
  end
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- describe "bundle update" do
3
+ describe "bundle update --source" do
4
4
  describe "git sources" do
5
5
  before :each do
6
6
  build_repo2
@@ -46,5 +46,18 @@ describe "bundle update" do
46
46
  bundle "update --source foo"
47
47
  should_be_installed "rack 1.0"
48
48
  end
49
+
50
+ it "shows the previous version of the gem when updated from path source" do
51
+ build_lib "activesupport", "2.3.5", :path => lib_path("rails/activesupport")
52
+
53
+ install_gemfile <<-G
54
+ gem "activesupport", :path => "#{lib_path('rails/activesupport')}"
55
+ G
56
+
57
+ build_lib "activesupport", "3.0", :path => lib_path("rails/activesupport")
58
+
59
+ bundle "update --source activesupport"
60
+ expect(out).to include("Using activesupport 3.0 (was 2.3.5) from source at #{lib_path('rails/activesupport')}")
61
+ end
49
62
  end
50
63
  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.5.3
4
+ version: 1.6.0.pre.1
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-02-06 00:00:00.000000000 Z
14
+ date: 2014-01-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: ronn
@@ -33,14 +33,14 @@ dependencies:
33
33
  requirements:
34
34
  - - ~>
35
35
  - !ruby/object:Gem::Version
36
- version: '2.11'
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
- version: '2.11'
43
+ version: 2.99.0.beta1
44
44
  description: Bundler manages an application's dependencies through its entire life,
45
45
  across many machines, systematically and repeatably
46
46
  email:
@@ -107,7 +107,6 @@ files:
107
107
  - lib/bundler/rubygems_ext.rb
108
108
  - lib/bundler/rubygems_integration.rb
109
109
  - lib/bundler/runtime.rb
110
- - lib/bundler/safe_catch.rb
111
110
  - lib/bundler/settings.rb
112
111
  - lib/bundler/setup.rb
113
112
  - lib/bundler/shared_helpers.rb
@@ -124,6 +123,7 @@ files:
124
123
  - lib/bundler/ssl_certs/DigiCertHighAssuranceEVRootCA.pem
125
124
  - lib/bundler/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem
126
125
  - lib/bundler/ssl_certs/GeoTrustGlobalCA.pem
126
+ - lib/bundler/ssl_certs/certificate_manager.rb
127
127
  - lib/bundler/templates/Executable
128
128
  - lib/bundler/templates/Executable.standalone
129
129
  - lib/bundler/templates/Gemfile
@@ -143,6 +143,9 @@ files:
143
143
  - lib/bundler/templates/newgem/test/minitest_helper.rb.tt
144
144
  - lib/bundler/templates/newgem/test/test_newgem.rb.tt
145
145
  - lib/bundler/ui.rb
146
+ - lib/bundler/ui/rg_proxy.rb
147
+ - lib/bundler/ui/shell.rb
148
+ - lib/bundler/ui/silent.rb
146
149
  - lib/bundler/vendor/.document
147
150
  - lib/bundler/vendor/net/http/faster.rb
148
151
  - lib/bundler/vendor/net/http/persistent.rb
@@ -200,7 +203,7 @@ files:
200
203
  - spec/bundler/gem_helper_spec.rb
201
204
  - spec/bundler/psyched_yaml_spec.rb
202
205
  - spec/bundler/retry_spec.rb
203
- - spec/bundler/safe_catch_spec.rb
206
+ - spec/bundler/settings_spec.rb
204
207
  - spec/bundler/source_spec.rb
205
208
  - spec/cache/gems_spec.rb
206
209
  - spec/cache/git_spec.rb
@@ -219,6 +222,7 @@ files:
219
222
  - spec/commands/newgem_spec.rb
220
223
  - spec/commands/open_spec.rb
221
224
  - spec/commands/outdated_spec.rb
225
+ - spec/commands/package_spec.rb
222
226
  - spec/commands/show_spec.rb
223
227
  - spec/install/binstubs_spec.rb
224
228
  - spec/install/bundler_spec.rb
@@ -233,7 +237,6 @@ files:
233
237
  - spec/install/gems/flex_spec.rb
234
238
  - spec/install/gems/groups_spec.rb
235
239
  - spec/install/gems/mirror_spec.rb
236
- - spec/install/gems/packed_spec.rb
237
240
  - spec/install/gems/platform_spec.rb
238
241
  - spec/install/gems/post_install_spec.rb
239
242
  - spec/install/gems/resolving_spec.rb
@@ -253,6 +256,7 @@ files:
253
256
  - spec/other/cli_dispatch_spec.rb
254
257
  - spec/other/ext_spec.rb
255
258
  - spec/other/platform_spec.rb
259
+ - spec/other/ssl_cert_spec.rb
256
260
  - spec/quality_spec.rb
257
261
  - spec/realworld/dependency_api_spec.rb
258
262
  - spec/realworld/edgecases_spec.rb
@@ -345,7 +349,7 @@ test_files:
345
349
  - spec/bundler/gem_helper_spec.rb
346
350
  - spec/bundler/psyched_yaml_spec.rb
347
351
  - spec/bundler/retry_spec.rb
348
- - spec/bundler/safe_catch_spec.rb
352
+ - spec/bundler/settings_spec.rb
349
353
  - spec/bundler/source_spec.rb
350
354
  - spec/cache/gems_spec.rb
351
355
  - spec/cache/git_spec.rb
@@ -364,6 +368,7 @@ test_files:
364
368
  - spec/commands/newgem_spec.rb
365
369
  - spec/commands/open_spec.rb
366
370
  - spec/commands/outdated_spec.rb
371
+ - spec/commands/package_spec.rb
367
372
  - spec/commands/show_spec.rb
368
373
  - spec/install/binstubs_spec.rb
369
374
  - spec/install/bundler_spec.rb
@@ -378,7 +383,6 @@ test_files:
378
383
  - spec/install/gems/flex_spec.rb
379
384
  - spec/install/gems/groups_spec.rb
380
385
  - spec/install/gems/mirror_spec.rb
381
- - spec/install/gems/packed_spec.rb
382
386
  - spec/install/gems/platform_spec.rb
383
387
  - spec/install/gems/post_install_spec.rb
384
388
  - spec/install/gems/resolving_spec.rb
@@ -398,6 +402,7 @@ test_files:
398
402
  - spec/other/cli_dispatch_spec.rb
399
403
  - spec/other/ext_spec.rb
400
404
  - spec/other/platform_spec.rb
405
+ - spec/other/ssl_cert_spec.rb
401
406
  - spec/quality_spec.rb
402
407
  - spec/realworld/dependency_api_spec.rb
403
408
  - spec/realworld/edgecases_spec.rb