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
376376 end
377377 end
378378
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
380380 metadata = {
381381 dependencies: {
382382 version_mismatch: {git: git_url(:version_mismatch ), version: " 0.2.0" },
383383 },
384384 }
385385 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"
389389 end
390390 end
391391
392- it " succeeds when version mismatch is fixed" do
392+ it " doesn't warn when version mismatch is fixed" do
393393 metadata = {
394394 dependencies: {
395395 version_mismatch: {git: git_url(:version_mismatch ), version: " 0.2.1" },
396396 },
397397 }
398398 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" )
400401 assert_installed " version_mismatch" , " 0.2.1"
401402 end
402403 end
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ module Shards
7171 raise Error .new(" Error shard name (#{ spec.name } ) doesn't match dependency name (#{ dependency.name } )" )
7272 end
7373 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 } )" }
7575 end
7676 end
7777 resolver = spec.resolver || raise " BUG: returned Spec has no resolver"
You can’t perform that action at this time.
0 commit comments