File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,11 @@ module Shards
54
54
55
55
# pre-releases are opt-in, so we must check that the solution didn't
56
56
# select one unless at least one requirement in the selected graph asked
57
- # for it:
57
+ # for it, or we install the dependency at a Git refs :
58
58
unless @prereleases
59
59
packages.each do |package |
60
60
next unless Versions .prerelease?(package.version)
61
+ next if package.commit
61
62
62
63
if dependency = @spec .dependencies.find { |d | d.name == package.name }
63
64
break if Versions .prerelease?(dependency.version)
Original file line number Diff line number Diff line change @@ -71,6 +71,18 @@ class InstallCommandTest < Minitest::Test
71
71
end
72
72
end
73
73
74
+ def test_installs_prerelease_version_at_refs
75
+ metadata = {
76
+ dependencies: {
77
+ unstable: {git: git_url(:unstable ), branch: " master" }
78
+ }
79
+ }
80
+ with_shard(metadata) do
81
+ run " shards install"
82
+ assert_installed " unstable" , " 0.3.0.beta"
83
+ end
84
+ end
85
+
74
86
def test_installs_dependencies_at_locked_version
75
87
metadata = {
76
88
dependencies: {web: " 1.0.0" },
You can’t perform that action at this time.
0 commit comments