dependabot-nuget 0.119.1 → 0.119.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dependabot/nuget/file_fetcher.rb +2 -0
- data/lib/dependabot/nuget/file_parser/project_file_parser.rb +4 -0
- data/lib/dependabot/nuget/file_updater/packages_config_declaration_finder.rb +2 -0
- data/lib/dependabot/nuget/file_updater/project_file_declaration_finder.rb +4 -0
- data/lib/dependabot/nuget/metadata_finder.rb +4 -1
- data/lib/dependabot/nuget/update_checker/repository_finder.rb +9 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc3398025c0de812457f149aa42337c1cbfe9522cb9babcf07fb0f42c980dd31
|
4
|
+
data.tar.gz: 848073c8e6783e6ff09205d26c1ce765ce2a87e410ce8e226b30285c53c4fa67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc6b7acb56d3d0ce4110013693a823d7caa589ca44df60ab53fc9b3566f54a27126104fedd477e5e0c8f1c06924a05f63b0bf3a109ab0563009d077c2c3b5af9
|
7
|
+
data.tar.gz: b41577c408ddbd261e5e0f747668e120a13d8483b0ab46ebcbe0d4d21679e5eadbd48117410548736cc525abeb18eb3a0854de6505591467899aac1cac1723d4
|
@@ -82,6 +82,7 @@ module Dependabot
|
|
82
82
|
end.compact
|
83
83
|
end
|
84
84
|
|
85
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
85
86
|
def sln_file_names
|
86
87
|
sln_files = repo_contents.select { |f| f.name.end_with?(".sln") }
|
87
88
|
src_dir = repo_contents.any? { |f| f.name == "src" && f.type == "dir" }
|
@@ -98,6 +99,7 @@ module Dependabot
|
|
98
99
|
|
99
100
|
sln_files.map(&:name)
|
100
101
|
end
|
102
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
101
103
|
|
102
104
|
def directory_build_files
|
103
105
|
return @directory_build_files if @directory_build_files_checked
|
@@ -79,6 +79,7 @@ module Dependabot
|
|
79
79
|
)
|
80
80
|
end
|
81
81
|
|
82
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
82
83
|
def dependency_name(dependency_node, project_file)
|
83
84
|
raw_name =
|
84
85
|
dependency_node.attribute("Include")&.value&.strip ||
|
@@ -93,6 +94,7 @@ module Dependabot
|
|
93
94
|
|
94
95
|
evaluated_value(raw_name, project_file)
|
95
96
|
end
|
97
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
96
98
|
|
97
99
|
def dependency_requirement(dependency_node, project_file)
|
98
100
|
raw_requirement = get_node_version_value(dependency_node)
|
@@ -127,6 +129,7 @@ module Dependabot
|
|
127
129
|
named_captures.fetch("property")
|
128
130
|
end
|
129
131
|
|
132
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
130
133
|
def get_node_version_value(node)
|
131
134
|
attribute = "Version"
|
132
135
|
value =
|
@@ -137,6 +140,7 @@ module Dependabot
|
|
137
140
|
|
138
141
|
value == "" ? nil : value
|
139
142
|
end
|
143
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
140
144
|
|
141
145
|
def evaluated_value(value, project_file)
|
142
146
|
return value unless value.match?(PROPERTY_REGEX)
|
@@ -40,6 +40,7 @@ module Dependabot
|
|
40
40
|
|
41
41
|
private
|
42
42
|
|
43
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
43
44
|
def fetch_declaration_strings
|
44
45
|
deep_find_declarations(packages_config.content).select do |nd|
|
45
46
|
node = Nokogiri::XML(nd)
|
@@ -55,6 +56,7 @@ module Dependabot
|
|
55
56
|
node_requirement == declaring_requirement.fetch(:requirement)
|
56
57
|
end
|
57
58
|
end
|
59
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
58
60
|
|
59
61
|
def deep_find_declarations(string)
|
60
62
|
string.scan(DECLARATION_REGEX).flat_map do |matching_node|
|
@@ -52,6 +52,7 @@ module Dependabot
|
|
52
52
|
end
|
53
53
|
|
54
54
|
# rubocop:disable Metrics/CyclomaticComplexity
|
55
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
55
56
|
def fetch_declaration_strings
|
56
57
|
deep_find_declarations(declaring_file.content).select do |nd|
|
57
58
|
node = Nokogiri::XML(nd)
|
@@ -68,8 +69,10 @@ module Dependabot
|
|
68
69
|
node_requirement == declaring_requirement.fetch(:requirement)
|
69
70
|
end
|
70
71
|
end
|
72
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
71
73
|
# rubocop:enable Metrics/CyclomaticComplexity
|
72
74
|
|
75
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
73
76
|
def get_node_version_value(node)
|
74
77
|
attribute = "Version"
|
75
78
|
node.attribute(attribute)&.value&.strip ||
|
@@ -77,6 +80,7 @@ module Dependabot
|
|
77
80
|
node.attribute(attribute.downcase)&.value&.strip ||
|
78
81
|
node.at_xpath("./#{attribute.downcase}")&.content&.strip
|
79
82
|
end
|
83
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
80
84
|
|
81
85
|
def deep_find_declarations(string)
|
82
86
|
string.scan(DECLARATION_REGEX).flat_map do |matching_node|
|
@@ -32,7 +32,8 @@ module Dependabot
|
|
32
32
|
|
33
33
|
def source_from_anywhere_in_nuspec(nuspec)
|
34
34
|
github_urls = []
|
35
|
-
nuspec.to_s.
|
35
|
+
nuspec.to_s.force_encoding(Encoding::UTF_8).
|
36
|
+
scan(Source::SOURCE_REGEX) do
|
36
37
|
github_urls << Regexp.last_match.to_s
|
37
38
|
end
|
38
39
|
|
@@ -86,6 +87,7 @@ module Dependabot
|
|
86
87
|
source.fetch("source_url")
|
87
88
|
end
|
88
89
|
|
90
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
89
91
|
def auth_header
|
90
92
|
source = dependency.requirements.
|
91
93
|
find { |r| r&.fetch(:source) }&.fetch(:source)
|
@@ -108,6 +110,7 @@ module Dependabot
|
|
108
110
|
{ "Authorization" => "Bearer #{token}" }
|
109
111
|
end
|
110
112
|
end
|
113
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
111
114
|
end
|
112
115
|
end
|
113
116
|
end
|
@@ -93,10 +93,12 @@ module Dependabot
|
|
93
93
|
|
94
94
|
def build_v2_url(response, repo_details)
|
95
95
|
doc = Nokogiri::XML(response.body)
|
96
|
+
|
96
97
|
doc.remove_namespaces!
|
97
98
|
base_url = doc.at_xpath("service")&.attributes&.
|
98
99
|
fetch("base", nil)&.value
|
99
|
-
|
100
|
+
|
101
|
+
base_url ||= repo_details.fetch(:url)
|
100
102
|
|
101
103
|
{
|
102
104
|
repository_url: base_url,
|
@@ -148,6 +150,8 @@ module Dependabot
|
|
148
150
|
end
|
149
151
|
|
150
152
|
# rubocop:disable Metrics/CyclomaticComplexity
|
153
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
154
|
+
# rubocop:disable Metrics/AbcSize
|
151
155
|
def repos_from_config_file(config_file)
|
152
156
|
doc = Nokogiri::XML(config_file.content)
|
153
157
|
doc.remove_namespaces!
|
@@ -179,6 +183,8 @@ module Dependabot
|
|
179
183
|
|
180
184
|
sources
|
181
185
|
end
|
186
|
+
# rubocop:enable Metrics/AbcSize
|
187
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
182
188
|
# rubocop:enable Metrics/CyclomaticComplexity
|
183
189
|
|
184
190
|
def default_repository_details
|
@@ -193,6 +199,7 @@ module Dependabot
|
|
193
199
|
}
|
194
200
|
end
|
195
201
|
|
202
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
196
203
|
def add_config_file_credentials(sources:, doc:)
|
197
204
|
sources.each do |source_details|
|
198
205
|
key = source_details.fetch(:key)
|
@@ -225,6 +232,7 @@ module Dependabot
|
|
225
232
|
|
226
233
|
sources
|
227
234
|
end
|
235
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
228
236
|
|
229
237
|
def remove_wrapping_zero_width_chars(string)
|
230
238
|
string.force_encoding("UTF-8").encode.
|
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.119.
|
4
|
+
version: 0.119.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-21 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.119.
|
19
|
+
version: 0.119.6
|
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.119.
|
26
|
+
version: 0.119.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.90.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.90.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: vcr
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|