File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -376,27 +376,28 @@ describe "install" do
376
376
end
377
377
end
378
378
379
- it " fails when shard.yml version doesn't match git tag" do
379
+ it " warns when shard.yml version doesn't match git tag" do
380
380
metadata = {
381
381
dependencies: {
382
382
version_mismatch: {git: git_url(:version_mismatch ), version: " 0.2.0" },
383
383
},
384
384
}
385
385
with_shard(metadata) do
386
- ex = expect_raises( FailedCommand ) { run " shards install --no-color" }
387
- ex. stdout.should contain(" Error shard version (0.1.0) doesn't match tag version (0.2.0)" )
388
- refute_installed " version_mismatch"
386
+ stdout = run " shards install --no-color"
387
+ stdout.should contain(" W: Shard version (0.1.0) doesn't match tag version (0.2.0)" )
388
+ assert_installed " version_mismatch"
389
389
end
390
390
end
391
391
392
- it " succeeds when version mismatch is fixed" do
392
+ it " doesn't warn when version mismatch is fixed" do
393
393
metadata = {
394
394
dependencies: {
395
395
version_mismatch: {git: git_url(:version_mismatch ), version: " 0.2.1" },
396
396
},
397
397
}
398
398
with_shard(metadata) do
399
- run " shards install"
399
+ stdout = run " shards install --no-color"
400
+ stdout.should_not contain(" doesn't match tag version" )
400
401
assert_installed " version_mismatch" , " 0.2.1"
401
402
end
402
403
end
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ module Shards
71
71
raise Error .new(" Error shard name (#{ spec.name } ) doesn't match dependency name (#{ dependency.name } )" )
72
72
end
73
73
if spec.mismatched_version?
74
- raise Error .new( " Error shard version (#{ spec.original_version } ) doesn't match tag version (#{ spec.version } )" )
74
+ Log .warn { " Shard version (#{ spec.original_version } ) doesn't match tag version (#{ spec.version } )" }
75
75
end
76
76
end
77
77
resolver = spec.resolver || raise " BUG: returned Spec has no resolver"
You can’t perform that action at this time.
0 commit comments