File tree 2 files changed +3
-32
lines changed
2 files changed +3
-32
lines changed Original file line number Diff line number Diff line change @@ -121,21 +121,7 @@ def dependency_nuspec_url
121
121
source = dependency . requirements .
122
122
find { |r | r &.fetch ( :source ) } &.fetch ( :source )
123
123
124
- if source &.key? ( :nuspec_url )
125
- source . fetch ( :nuspec_url ) ||
126
- "https://api.nuget.org/v3-flatcontainer/" \
127
- "#{ dependency . name . downcase } /#{ dependency . version } /" \
128
- "#{ dependency . name . downcase } .nuspec"
129
- elsif source &.key? ( :nuspec_url )
130
- source . fetch ( "nuspec_url" ) ||
131
- "https://api.nuget.org/v3-flatcontainer/" \
132
- "#{ dependency . name . downcase } /#{ dependency . version } /" \
133
- "#{ dependency . name . downcase } .nuspec"
134
- else
135
- "https://api.nuget.org/v3-flatcontainer/" \
136
- "#{ dependency . name . downcase } /#{ dependency . version } /" \
137
- "#{ dependency . name . downcase } .nuspec"
138
- end
124
+ return source . fetch ( :nuspec_url ) if source &.key? ( :nuspec_url )
139
125
end
140
126
141
127
def dependency_source_url
Original file line number Diff line number Diff line change 59
59
)
60
60
end
61
61
62
- context "with a github link in the nuspec" do
63
- it { is_expected . to eq ( "https://github.com/dotnet/core-setup" ) }
64
-
65
- it "caches the call to nuget" do
66
- 2 . times { source_url }
67
- expect ( WebMock ) . to have_requested ( :get , nuget_url ) . once
68
- end
69
- end
70
-
71
62
context "with a source" do
72
63
let ( :source ) do
73
64
{
94
85
expect ( WebMock ) . to have_requested ( :get , nuget_url ) . once
95
86
end
96
87
97
- context "that has a source_url" do
88
+ context "that has a source_url only " do
98
89
let ( :source ) do
99
90
{
100
91
type : "nuget_repo" ,
117
108
}
118
109
end
119
110
120
- let ( :nuget_url ) do
121
- "https://api.nuget.org/v3-flatcontainer/" \
122
- "microsoft.extensions.dependencymodel/2.1.0/" \
123
- "microsoft.extensions.dependencymodel.nuspec"
124
- end
125
-
126
- it { is_expected . to eq ( "https://github.com/dotnet/core-setup" ) }
111
+ it { is_expected . to eq ( nil ) }
127
112
end
128
113
129
114
context "with details in the credentials (but no token)" do
You can’t perform that action at this time.
0 commit comments