|
317 | 317 | expect(the_bundle).to include_gems("production_gem 1.0") |
318 | 318 | expect(the_bundle).not_to include_gems("development_gem 1.0") |
319 | 319 | end |
| 320 | + |
| 321 | + it "resolves indirect dependencies from a git source not in the requested groups" do |
| 322 | + build_lib "activesupport", "1.0", path: lib_path("rails/activesupport") |
| 323 | + build_git "activerecord", "1.0", path: lib_path("rails") do |s| |
| 324 | + s.add_dependency "activesupport", "= 1.0" |
| 325 | + end |
| 326 | + |
| 327 | + gemfile <<-G |
| 328 | + source "https://gem.repo1" |
| 329 | +
|
| 330 | + gem "activerecord", :git => "#{lib_path("rails")}" |
| 331 | +
|
| 332 | + group :ci do |
| 333 | + gem "myrack" |
| 334 | + end |
| 335 | + G |
| 336 | + |
| 337 | + bundle "config set --local only ci" |
| 338 | + bundle :install |
| 339 | + |
| 340 | + expect(the_bundle).to include_gems("myrack 1.0.0") |
| 341 | + expect(the_bundle).not_to include_gems("activerecord 1.0") |
| 342 | + end |
| 343 | + |
| 344 | + it "resolves indirect dependencies from a git source not in the requested groups (without compact_index dependency API)" do |
| 345 | + build_lib "activesupport", "1.0", path: lib_path("rails/activesupport") |
| 346 | + build_git "activerecord", "1.0", path: lib_path("rails") do |s| |
| 347 | + s.add_dependency "activesupport", "= 1.0" |
| 348 | + end |
| 349 | + |
| 350 | + gemfile <<-G |
| 351 | + source "https://gem.repo1" |
| 352 | +
|
| 353 | + gem "activerecord", :git => "#{lib_path("rails")}" |
| 354 | +
|
| 355 | + group :ci do |
| 356 | + gem "myrack" |
| 357 | + end |
| 358 | + G |
| 359 | + |
| 360 | + # Force the RubygemsAggregate code path in find_source_requirements by |
| 361 | + # making the dependency API unavailable. |
| 362 | + bundle "config set --local only ci" |
| 363 | + bundle :install, artifice: "endpoint_api_forbidden" |
| 364 | + |
| 365 | + expect(the_bundle).to include_gems("myrack 1.0.0") |
| 366 | + expect(the_bundle).not_to include_gems("activerecord 1.0") |
| 367 | + end |
320 | 368 | end |
321 | 369 | end |
0 commit comments