dependabot-nuget 0.182.1 → 0.182.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/nuget/metadata_finder.rb +1 -56
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd112f60d5684ef24177b5c8142288d71c8244c7c91bc108c538954d17aab8be
|
4
|
+
data.tar.gz: ca17802fb58a0e5b97eb6b49c08f373196ce128104e34aabef20e693b1117489
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9794bb694a3a33a524d6d99a7695cc8d3202fb708cf5fca9a37bb4788ed214c0eed16c36c4b6f4ea84eacf057ce9b4ae4111f9d6ddebc181962b45b023206bf7
|
7
|
+
data.tar.gz: 282c8208c99282d83c74e330994d5c478c25e39f963bd50b9aa3998e699b31525450ff177d4bf7cf5a1233d74f942222f0429005a30283a892bfaa8c776b3c98
|
@@ -12,62 +12,7 @@ module Dependabot
|
|
12
12
|
def look_up_source
|
13
13
|
return Source.from_url(dependency_source_url) if dependency_source_url
|
14
14
|
|
15
|
-
|
16
|
-
return src_repo if src_repo
|
17
|
-
|
18
|
-
# Fallback to getting source from the search result's projectUrl or licenseUrl.
|
19
|
-
# GitHub Packages doesn't support getting the `.nuspec`, switch to getting
|
20
|
-
# that instead once it is supported.
|
21
|
-
src_repo_from_project
|
22
|
-
end
|
23
|
-
|
24
|
-
def src_repo_from_project
|
25
|
-
source = dependency.requirements.find { |r| r&.fetch(:source) }&.fetch(:source)
|
26
|
-
return unless source
|
27
|
-
|
28
|
-
# Query the service index e.g. https://nuget.pkg.github.com/ORG/index.json
|
29
|
-
response = Excon.get(
|
30
|
-
source.fetch(:url),
|
31
|
-
idempotent: true,
|
32
|
-
**SharedHelpers.excon_defaults(headers: auth_header)
|
33
|
-
)
|
34
|
-
return unless response.status == 200
|
35
|
-
|
36
|
-
# Extract the query url e.g. https://nuget.pkg.github.com/ORG/query
|
37
|
-
search_base = extract_search_url(response.body)
|
38
|
-
return unless search_base
|
39
|
-
|
40
|
-
response = Excon.get(
|
41
|
-
search_base + "?q=#{dependency.name.downcase}&prerelease=true&semVerLevel=2.0.0",
|
42
|
-
idempotent: true,
|
43
|
-
**SharedHelpers.excon_defaults(headers: auth_header)
|
44
|
-
)
|
45
|
-
return unless response.status == 200
|
46
|
-
|
47
|
-
# Find a projectUrl or licenseUrl that look like a source URL
|
48
|
-
extract_source_repo(response.body)
|
49
|
-
end
|
50
|
-
|
51
|
-
def extract_search_url(body)
|
52
|
-
JSON.parse(body).
|
53
|
-
fetch("resources", []).
|
54
|
-
find { |r| r.fetch("@type") == "SearchQueryService" }&.
|
55
|
-
fetch("@id")
|
56
|
-
end
|
57
|
-
|
58
|
-
def extract_source_repo(body)
|
59
|
-
JSON.parse(body).fetch("data", []).each do |search_result|
|
60
|
-
next unless search_result["id"].downcase == dependency.name.downcase
|
61
|
-
|
62
|
-
if search_result.key?("projectUrl")
|
63
|
-
source = Source.from_url(search_result.fetch("projectUrl"))
|
64
|
-
return source unless source.repo.nil?
|
65
|
-
end
|
66
|
-
if search_result.key?("licenseUrl")
|
67
|
-
source = Source.from_url(search_result.fetch("licenseUrl"))
|
68
|
-
return source unless source.repo.nil?
|
69
|
-
end
|
70
|
-
end
|
15
|
+
look_up_source_in_nuspec(dependency_nuspec_file)
|
71
16
|
end
|
72
17
|
|
73
18
|
def look_up_source_in_nuspec(nuspec)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-nuget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.182.
|
4
|
+
version: 0.182.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dependabot-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.182.
|
19
|
+
version: 0.182.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.182.
|
26
|
+
version: 0.182.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debase
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|