File tree 2 files changed +32
-0
lines changed
2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -271,6 +271,10 @@ def after_install_all(install: true)
271
271
272
272
dependency_changes ||= spec != parent_spec
273
273
274
+ if spec . source != parent_spec . source
275
+ parent_spec = parent_spec . dup
276
+ parent_spec . source = spec . source
277
+ end
274
278
parent_spec
275
279
end
276
280
Original file line number Diff line number Diff line change 313
313
end
314
314
end
315
315
316
+ it "maintains consistency across local gem's lockfiless when one is included in the other" do
317
+ with_gemfile ( <<~RUBY ) do
318
+ lockfile("local_test/Gemfile.lock",
319
+ gemfile: "local_test/Gemfile")
320
+
321
+ gem "local_test", path: "local_test"
322
+ gem "net-smtp", "0.3.2"
323
+ RUBY
324
+ create_local_gem ( "local_test" , <<~RUBY )
325
+ spec.add_dependency "net-smtp", "~> 0.3"
326
+ RUBY
327
+
328
+ invoke_bundler ( "install" )
329
+
330
+ replace_lockfile_pin ( "local_test/Gemfile.lock" , "net-smtp" , "0.3.3" )
331
+
332
+ # write_gemfile(<<~RUBY)
333
+ # lockfile("local_test/Gemfile.lock",
334
+ # gemfile: "local_test/Gemfile")
335
+
336
+ # gem "net-smtp", "~> 0.3.2"
337
+ # RUBY
338
+
339
+ invoke_bundler ( "install" )
340
+ expect ( File . read ( "local_test/Gemfile.lock" ) ) . to include ( "0.3.2" )
341
+ end
342
+ end
343
+
316
344
it "syncs from a parent lockfile" do
317
345
with_gemfile ( <<~RUBY ) do
318
346
lockfile do
You can’t perform that action at this time.
0 commit comments