dependabot-nuget 0.119.0 → 0.119.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f452526e25efb46299d2b758045e4110fab03ba9d09942143eb303a26af4b16d
4
- data.tar.gz: c9c7d280bba08eb0ae19fb476d3069d9c76e44e4f2a211d7a078cf92c5aea9fd
3
+ metadata.gz: 846467aca0385f37b4e168148cf496d5d6dcd53250d052bf0a7dd17ef2137c3d
4
+ data.tar.gz: e01807725ce6e1925d747fe27053ed86aa2dfd50e78d05a707d0a5238e459b34
5
5
  SHA512:
6
- metadata.gz: dcb529858714aa3753d6f46bf8d906383a4b4a3e3ea66862e6ae963e1babd94b5278b14d22716a35a0c1c0ffdedade26bb2e531f52d53457e57eb0753956454d
7
- data.tar.gz: 2f11ab7c5ac2acaa83ee3733bdcab19c7ec10477676b9c2ca4df4d3d33f954c109580028643a8f710d1a0c5564f47a608a1844cf685c8b9c4156e5e54a7ff050
6
+ metadata.gz: bdf671ba9417d2ae1a44b04046d0c229a07e903c0013e5d1323c5abdb9ae1a8b4d3b593e249efbc29ac5c5245d3f9b66b8960da0839c52a764cc97956f0b7315
7
+ data.tar.gz: aa191d37137d723573a01e864d7280cdb5393ad71ab3a3fa372841a2b9bd15d3111a601436117cb0e0e25f081b60e4f85e5bb5a15fc0396ba1e28ef967bb8204
@@ -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.scan(Source::SOURCE_REGEX) do
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
- return unless base_url
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.0
4
+ version: 0.119.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-26 00:00:00.000000000 Z
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.0
19
+ version: 0.119.5
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.0
26
+ version: 0.119.5
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.88.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.88.0
110
+ version: 0.90.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: vcr
113
113
  requirement: !ruby/object:Gem::Requirement