bundler 1.7.15 → 1.8.0.pre

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 (191) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -14
  3. data/.rspec +1 -0
  4. data/.travis.yml +22 -15
  5. data/CHANGELOG.md +43 -13
  6. data/CODE_OF_CONDUCT.md +40 -0
  7. data/CONTRIBUTING.md +14 -12
  8. data/DEVELOPMENT.md +4 -2
  9. data/ISSUES.md +1 -1
  10. data/README.md +10 -14
  11. data/Rakefile +10 -10
  12. data/bin/bundle +1 -1
  13. data/bundler.gemspec +5 -4
  14. data/lib/bundler.rb +22 -3
  15. data/lib/bundler/anonymizable_uri.rb +24 -8
  16. data/lib/bundler/cli.rb +103 -66
  17. data/lib/bundler/cli/cache.rb +1 -0
  18. data/lib/bundler/cli/clean.rb +11 -4
  19. data/lib/bundler/cli/common.rb +2 -0
  20. data/lib/bundler/cli/console.rb +22 -26
  21. data/lib/bundler/cli/exec.rb +29 -22
  22. data/lib/bundler/cli/gem.rb +125 -37
  23. data/lib/bundler/cli/install.rb +22 -9
  24. data/lib/bundler/cli/outdated.rb +1 -1
  25. data/lib/bundler/cli/package.rb +8 -1
  26. data/lib/bundler/cli/show.rb +29 -3
  27. data/lib/bundler/cli/update.rb +2 -2
  28. data/lib/bundler/cli/viz.rb +1 -1
  29. data/lib/bundler/definition.rb +14 -22
  30. data/lib/bundler/dependency.rb +8 -1
  31. data/lib/bundler/dsl.rb +17 -4
  32. data/lib/bundler/endpoint_specification.rb +1 -1
  33. data/lib/bundler/env.rb +44 -25
  34. data/lib/bundler/fetcher.rb +33 -25
  35. data/lib/bundler/friendly_errors.rb +38 -5
  36. data/lib/bundler/gem_helper.rb +16 -10
  37. data/lib/bundler/gem_helpers.rb +1 -0
  38. data/lib/bundler/graph.rb +4 -1
  39. data/lib/bundler/index.rb +15 -25
  40. data/lib/bundler/installer.rb +6 -6
  41. data/lib/bundler/lockfile_parser.rb +7 -7
  42. data/lib/bundler/resolver.rb +2 -1
  43. data/lib/bundler/ruby_version.rb +1 -1
  44. data/lib/bundler/rubygems_ext.rb +1 -0
  45. data/lib/bundler/rubygems_integration.rb +1 -1
  46. data/lib/bundler/runtime.rb +22 -40
  47. data/lib/bundler/settings.rb +14 -5
  48. data/lib/bundler/setup.rb +2 -1
  49. data/lib/bundler/shared_helpers.rb +56 -4
  50. data/lib/bundler/source.rb +8 -9
  51. data/lib/bundler/source/git.rb +5 -1
  52. data/lib/bundler/source/git/git_proxy.rb +4 -0
  53. data/lib/bundler/source/path.rb +8 -11
  54. data/lib/bundler/source/path/installer.rb +0 -2
  55. data/lib/bundler/source/rubygems.rb +58 -72
  56. data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +13 -0
  57. data/lib/bundler/templates/newgem/LICENSE.txt.tt +17 -18
  58. data/lib/bundler/templates/newgem/README.md.tt +9 -1
  59. data/lib/bundler/templates/newgem/Rakefile.tt +2 -0
  60. data/lib/bundler/templates/newgem/bin/console.tt +14 -0
  61. data/lib/bundler/templates/newgem/bin/setup.tt +7 -0
  62. data/lib/bundler/templates/newgem/exe/newgem.tt +3 -0
  63. data/lib/bundler/templates/newgem/gitignore.tt +2 -0
  64. data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +1 -1
  65. data/lib/bundler/templates/newgem/newgem.gemspec.tt +17 -13
  66. data/lib/bundler/templates/newgem/test/test_newgem.rb.tt +1 -1
  67. data/lib/bundler/ui/shell.rb +1 -1
  68. data/lib/bundler/version.rb +1 -1
  69. data/lib/bundler/worker.rb +73 -0
  70. data/man/bundle-config.ronn +17 -15
  71. data/man/bundle-install.ronn +102 -93
  72. data/man/bundle-update.ronn +39 -30
  73. data/man/bundle.ronn +6 -0
  74. data/man/gemfile.5.ronn +74 -13
  75. metadata +10 -231
  76. data/lib/bundler/parallel_workers.rb +0 -18
  77. data/lib/bundler/parallel_workers/thread_worker.rb +0 -30
  78. data/lib/bundler/parallel_workers/unix_worker.rb +0 -101
  79. data/lib/bundler/parallel_workers/worker.rb +0 -69
  80. data/lib/bundler/templates/newgem/bin/newgem.tt +0 -3
  81. data/spec/bundler/anonymizable_uri_spec.rb +0 -32
  82. data/spec/bundler/bundler_spec.rb +0 -72
  83. data/spec/bundler/cli_spec.rb +0 -16
  84. data/spec/bundler/definition_spec.rb +0 -22
  85. data/spec/bundler/dsl_spec.rb +0 -82
  86. data/spec/bundler/friendly_errors_spec.rb +0 -13
  87. data/spec/bundler/gem_helper_spec.rb +0 -226
  88. data/spec/bundler/psyched_yaml_spec.rb +0 -8
  89. data/spec/bundler/retry_spec.rb +0 -59
  90. data/spec/bundler/settings_spec.rb +0 -13
  91. data/spec/bundler/source/rubygems_spec.rb +0 -25
  92. data/spec/bundler/source_list_spec.rb +0 -361
  93. data/spec/cache/gems_spec.rb +0 -284
  94. data/spec/cache/git_spec.rb +0 -188
  95. data/spec/cache/path_spec.rb +0 -121
  96. data/spec/cache/platform_spec.rb +0 -57
  97. data/spec/commands/binstubs_spec.rb +0 -219
  98. data/spec/commands/check_spec.rb +0 -278
  99. data/spec/commands/clean_spec.rb +0 -592
  100. data/spec/commands/config_spec.rb +0 -263
  101. data/spec/commands/console_spec.rb +0 -76
  102. data/spec/commands/exec_spec.rb +0 -309
  103. data/spec/commands/help_spec.rb +0 -39
  104. data/spec/commands/init_spec.rb +0 -39
  105. data/spec/commands/inject_spec.rb +0 -78
  106. data/spec/commands/licenses_spec.rb +0 -18
  107. data/spec/commands/newgem_spec.rb +0 -428
  108. data/spec/commands/open_spec.rb +0 -68
  109. data/spec/commands/outdated_spec.rb +0 -156
  110. data/spec/commands/package_spec.rb +0 -114
  111. data/spec/commands/show_spec.rb +0 -125
  112. data/spec/install/binstubs_spec.rb +0 -24
  113. data/spec/install/bundler_spec.rb +0 -146
  114. data/spec/install/deploy_spec.rb +0 -250
  115. data/spec/install/gemfile/gemspec_spec.rb +0 -170
  116. data/spec/install/gemfile/git_spec.rb +0 -967
  117. data/spec/install/gemfile/path_spec.rb +0 -500
  118. data/spec/install/gemfile_spec.rb +0 -44
  119. data/spec/install/gems/c_ext_spec.rb +0 -48
  120. data/spec/install/gems/dependency_api_spec.rb +0 -652
  121. data/spec/install/gems/env_spec.rb +0 -107
  122. data/spec/install/gems/flex_spec.rb +0 -314
  123. data/spec/install/gems/groups_spec.rb +0 -308
  124. data/spec/install/gems/mirror_spec.rb +0 -39
  125. data/spec/install/gems/platform_spec.rb +0 -195
  126. data/spec/install/gems/post_install_spec.rb +0 -121
  127. data/spec/install/gems/resolving_spec.rb +0 -124
  128. data/spec/install/gems/simple_case_spec.rb +0 -377
  129. data/spec/install/gems/sources_spec.rb +0 -386
  130. data/spec/install/gems/standalone_spec.rb +0 -260
  131. data/spec/install/gems/sudo_spec.rb +0 -136
  132. data/spec/install/gems/win32_spec.rb +0 -26
  133. data/spec/install/gemspecs_spec.rb +0 -50
  134. data/spec/install/path_spec.rb +0 -150
  135. data/spec/install/post_bundle_message_spec.rb +0 -142
  136. data/spec/install/prereleases_spec.rb +0 -43
  137. data/spec/install/security_policy_spec.rb +0 -77
  138. data/spec/install/upgrade_spec.rb +0 -26
  139. data/spec/lock/git_spec.rb +0 -34
  140. data/spec/lock/lockfile_spec.rb +0 -924
  141. data/spec/other/bundle_ruby_spec.rb +0 -142
  142. data/spec/other/cli_dispatch_spec.rb +0 -21
  143. data/spec/other/ext_spec.rb +0 -60
  144. data/spec/other/platform_spec.rb +0 -1285
  145. data/spec/other/ssl_cert_spec.rb +0 -23
  146. data/spec/quality_spec.rb +0 -88
  147. data/spec/realworld/dependency_api_spec.rb +0 -60
  148. data/spec/realworld/edgecases_spec.rb +0 -212
  149. data/spec/realworld/parallel_spec.rb +0 -71
  150. data/spec/resolver/basic_spec.rb +0 -66
  151. data/spec/resolver/platform_spec.rb +0 -88
  152. data/spec/runtime/executable_spec.rb +0 -149
  153. data/spec/runtime/load_spec.rb +0 -107
  154. data/spec/runtime/platform_spec.rb +0 -90
  155. data/spec/runtime/require_spec.rb +0 -332
  156. data/spec/runtime/setup_spec.rb +0 -853
  157. data/spec/runtime/with_clean_env_spec.rb +0 -91
  158. data/spec/spec_helper.rb +0 -123
  159. data/spec/support/artifice/endopint_marshal_fail_basic_authentication.rb +0 -13
  160. data/spec/support/artifice/endpoint.rb +0 -71
  161. data/spec/support/artifice/endpoint_500.rb +0 -37
  162. data/spec/support/artifice/endpoint_api_forbidden.rb +0 -11
  163. data/spec/support/artifice/endpoint_api_missing.rb +0 -16
  164. data/spec/support/artifice/endpoint_basic_authentication.rb +0 -13
  165. data/spec/support/artifice/endpoint_creds_diff_host.rb +0 -38
  166. data/spec/support/artifice/endpoint_extra.rb +0 -31
  167. data/spec/support/artifice/endpoint_extra_api.rb +0 -32
  168. data/spec/support/artifice/endpoint_extra_missing.rb +0 -15
  169. data/spec/support/artifice/endpoint_fallback.rb +0 -17
  170. data/spec/support/artifice/endpoint_host_redirect.rb +0 -15
  171. data/spec/support/artifice/endpoint_marshal_fail.rb +0 -11
  172. data/spec/support/artifice/endpoint_redirect.rb +0 -15
  173. data/spec/support/artifice/endpoint_strict_basic_authentication.rb +0 -18
  174. data/spec/support/artifice/endpoint_timeout.rb +0 -13
  175. data/spec/support/builders.rb +0 -693
  176. data/spec/support/fakeweb/rack-1.0.0.marshal +0 -2
  177. data/spec/support/fakeweb/windows.rb +0 -23
  178. data/spec/support/hax.rb +0 -22
  179. data/spec/support/helpers.rb +0 -361
  180. data/spec/support/indexes.rb +0 -280
  181. data/spec/support/matchers.rb +0 -77
  182. data/spec/support/path.rb +0 -85
  183. data/spec/support/permissions.rb +0 -10
  184. data/spec/support/platforms.rb +0 -94
  185. data/spec/support/ruby_ext.rb +0 -20
  186. data/spec/support/rubygems_ext.rb +0 -39
  187. data/spec/support/streams.rb +0 -13
  188. data/spec/support/sudo.rb +0 -16
  189. data/spec/update/gems_spec.rb +0 -201
  190. data/spec/update/git_spec.rb +0 -283
  191. data/spec/update/path_spec.rb +0 -18
@@ -1,283 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe "bundle update" do
4
- describe "git sources" do
5
- it "floats on a branch when :branch is used" do
6
- build_git "foo", "1.0"
7
- update_git "foo", :branch => "omg"
8
-
9
- install_gemfile <<-G
10
- git "#{lib_path('foo-1.0')}", :branch => "omg" do
11
- gem 'foo'
12
- end
13
- G
14
-
15
- update_git "foo", :branch => "omg" do |s|
16
- s.write "lib/foo.rb", "FOO = '1.1'"
17
- end
18
-
19
- bundle "update"
20
-
21
- should_be_installed "foo 1.1"
22
- end
23
-
24
- it "updates correctly when you have like craziness" do
25
- build_lib "activesupport", "3.0", :path => lib_path("rails/activesupport")
26
- build_git "rails", "3.0", :path => lib_path("rails") do |s|
27
- s.add_dependency "activesupport", "= 3.0"
28
- end
29
-
30
- install_gemfile <<-G
31
- gem "rails", :git => "#{lib_path('rails')}"
32
- G
33
-
34
- bundle "update rails"
35
- expect(out).to include("Using activesupport 3.0 from #{lib_path('rails')} (at master)")
36
- should_be_installed "rails 3.0", "activesupport 3.0"
37
- end
38
-
39
- it "floats on a branch when :branch is used and the source is specified in the update" do
40
- build_git "foo", "1.0", :path => lib_path("foo")
41
- update_git "foo", :branch => "omg", :path => lib_path("foo")
42
-
43
- install_gemfile <<-G
44
- git "#{lib_path('foo')}", :branch => "omg" do
45
- gem 'foo'
46
- end
47
- G
48
-
49
- update_git "foo", :branch => "omg", :path => lib_path("foo") do |s|
50
- s.write "lib/foo.rb", "FOO = '1.1'"
51
- end
52
-
53
- bundle "update --source foo"
54
-
55
- should_be_installed "foo 1.1"
56
- end
57
-
58
- it "floats on master when updating all gems that are pinned to the source even if you have child dependencies" do
59
- build_git "foo", :path => lib_path('foo')
60
- build_gem "bar", :to_system => true do |s|
61
- s.add_dependency "foo"
62
- end
63
-
64
- install_gemfile <<-G
65
- gem "foo", :git => "#{lib_path('foo')}"
66
- gem "bar"
67
- G
68
-
69
- update_git "foo", :path => lib_path('foo') do |s|
70
- s.write "lib/foo.rb", "FOO = '1.1'"
71
- end
72
-
73
- bundle "update foo"
74
-
75
- should_be_installed "foo 1.1"
76
- end
77
-
78
- it "notices when you change the repo url in the Gemfile" do
79
- build_git "foo", :path => lib_path("foo_one")
80
- build_git "foo", :path => lib_path("foo_two")
81
-
82
- install_gemfile <<-G
83
- gem "foo", "1.0", :git => "#{lib_path('foo_one')}"
84
- G
85
-
86
- FileUtils.rm_rf lib_path("foo_one")
87
-
88
- install_gemfile <<-G
89
- gem "foo", "1.0", :git => "#{lib_path('foo_two')}"
90
- G
91
-
92
- expect(err).to be_empty
93
- expect(out).to include("Fetching #{lib_path}/foo_two")
94
- expect(out).to include("Your bundle is complete!")
95
- end
96
-
97
-
98
- it "fetches tags from the remote" do
99
- build_git "foo"
100
- @remote = build_git("bar", :bare => true)
101
- update_git "foo", :remote => @remote.path
102
- update_git "foo", :push => "master"
103
-
104
- install_gemfile <<-G
105
- gem 'foo', :git => "#{@remote.path}"
106
- G
107
-
108
- # Create a new tag on the remote that needs fetching
109
- update_git "foo", :tag => "fubar"
110
- update_git "foo", :push => "fubar"
111
-
112
- gemfile <<-G
113
- gem 'foo', :git => "#{@remote.path}", :tag => "fubar"
114
- G
115
-
116
- bundle "update", :exitstatus => true
117
- expect(exitstatus).to eq(0)
118
- end
119
-
120
- describe "with submodules" do
121
- before :each do
122
- build_gem "submodule", :to_system => true do |s|
123
- s.write "lib/submodule.rb", "puts 'GEM'"
124
- end
125
-
126
- build_git "submodule", "1.0" do |s|
127
- s.write "lib/submodule.rb", "puts 'GIT'"
128
- end
129
-
130
- build_git "has_submodule", "1.0" do |s|
131
- s.add_dependency "submodule"
132
- end
133
-
134
- Dir.chdir(lib_path('has_submodule-1.0')) do
135
- `git submodule add #{lib_path('submodule-1.0')} submodule-1.0`
136
- `git commit -m "submodulator"`
137
- end
138
- end
139
-
140
- it "it unlocks the source when submodules are added to a git source" do
141
- install_gemfile <<-G
142
- git "#{lib_path('has_submodule-1.0')}" do
143
- gem "has_submodule"
144
- end
145
- G
146
-
147
- run "require 'submodule'"
148
- expect(out).to eq('GEM')
149
-
150
- install_gemfile <<-G
151
- git "#{lib_path('has_submodule-1.0')}", :submodules => true do
152
- gem "has_submodule"
153
- end
154
- G
155
-
156
- run "require 'submodule'"
157
- expect(out).to eq('GIT')
158
- end
159
-
160
- it "it unlocks the source when submodules are removed from git source" do
161
- pending "This would require actually removing the submodule from the clone"
162
- install_gemfile <<-G
163
- git "#{lib_path('has_submodule-1.0')}", :submodules => true do
164
- gem "has_submodule"
165
- end
166
- G
167
-
168
- run "require 'submodule'"
169
- expect(out).to eq('GIT')
170
-
171
- install_gemfile <<-G
172
- git "#{lib_path('has_submodule-1.0')}" do
173
- gem "has_submodule"
174
- end
175
- G
176
-
177
- run "require 'submodule'"
178
- expect(out).to eq('GEM')
179
- end
180
- end
181
-
182
- it "errors with a message when the .git repo is gone" do
183
- build_git "foo", "1.0"
184
-
185
- install_gemfile <<-G
186
- gem "foo", :git => "#{lib_path('foo-1.0')}"
187
- G
188
-
189
- lib_path("foo-1.0").join(".git").rmtree
190
-
191
- bundle :update, :expect_err => true
192
- expect(out).to include(lib_path("foo-1.0").to_s)
193
- end
194
-
195
- it "should not explode on invalid revision on update of gem by name" do
196
- build_git "rack", "0.8"
197
-
198
- build_git "rack", "0.8", :path => lib_path('local-rack') do |s|
199
- s.write "lib/rack.rb", "puts :LOCAL"
200
- end
201
-
202
- install_gemfile <<-G
203
- source "file://#{gem_repo1}"
204
- gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master"
205
- G
206
-
207
- bundle %|config local.rack #{lib_path('local-rack')}|
208
- bundle "update rack"
209
- expect(out).to include("Your bundle is updated!")
210
- end
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
235
- end
236
-
237
- describe "with --source flag" do
238
- before :each do
239
- build_repo2
240
- @git = build_git "foo", :path => lib_path("foo") do |s|
241
- s.executables = "foobar"
242
- end
243
-
244
- install_gemfile <<-G
245
- source "file://#{gem_repo2}"
246
- git "#{lib_path('foo')}" do
247
- gem 'foo'
248
- end
249
- gem 'rack'
250
- G
251
- end
252
-
253
- it "updates the source" do
254
- update_git "foo", :path => @git.path
255
-
256
- bundle "update --source foo"
257
-
258
- in_app_root do
259
- run <<-RUBY
260
- require 'foo'
261
- puts "WIN" if defined?(FOO_PREV_REF)
262
- RUBY
263
-
264
- expect(out).to eq("WIN")
265
- end
266
- end
267
-
268
- it "unlocks gems that were originally pulled in by the source" do
269
- update_git "foo", "2.0", :path => @git.path
270
-
271
- bundle "update --source foo"
272
- should_be_installed "foo 2.0"
273
- end
274
-
275
- it "leaves all other gems frozen" do
276
- update_repo2
277
- update_git "foo", :path => @git.path
278
-
279
- bundle "update --source foo"
280
- should_be_installed "rack 1.0"
281
- end
282
- end
283
- end
@@ -1,18 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe "path sources" do
4
- describe "bundle update --source" do
5
- it "shows the previous version of the gem when updated from path source" do
6
- build_lib "activesupport", "2.3.5", :path => lib_path("rails/activesupport")
7
-
8
- install_gemfile <<-G
9
- gem "activesupport", :path => "#{lib_path('rails/activesupport')}"
10
- G
11
-
12
- build_lib "activesupport", "3.0", :path => lib_path("rails/activesupport")
13
-
14
- bundle "update --source activesupport"
15
- expect(out).to include("Using activesupport 3.0 (was 2.3.5) from source at #{lib_path('rails/activesupport')}")
16
- end
17
- end
18
- end