dependabot-common 0.111.2 → 0.111.3
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/file_fetchers/base.rb +12 -4
- data/lib/dependabot/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3e52c9bcfccc4d3891dd4a518c543ce06e94302987b585b3782b3450dd82922d
|
|
4
|
+
data.tar.gz: ea24e9f8444b95fdc18755a4035a3f89484a5c523f3f338e11d9bfc4b23dbf98
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca48137299359b6940959fed6da9121c1f1f98c7bad5f2ac917352640c4bf6d11ba8747fa0dd81c177794123d0c1d5277856e35b5d3f9c53e071ac142f3f7127
|
|
7
|
+
data.tar.gz: 3eee2255f84b0c1103905f69c6fe0b3a06f90f7874696664c70cb812e1be3048c34624901bc213dabdacb771185f4fa9dac87ba22fe20c024f23c32e4b620de0
|
|
@@ -84,13 +84,14 @@ module Dependabot
|
|
|
84
84
|
def fetch_file_from_host(filename, type: "file", fetch_submodules: false)
|
|
85
85
|
path = Pathname.new(File.join(directory, filename)).cleanpath.to_path
|
|
86
86
|
content = _fetch_file_content(path, fetch_submodules: fetch_submodules)
|
|
87
|
-
type = @linked_paths.key?(path) ? "symlink" : type
|
|
87
|
+
type = @linked_paths.key?(path.gsub(%r{^/}, "")) ? "symlink" : type
|
|
88
88
|
|
|
89
89
|
DependencyFile.new(
|
|
90
90
|
name: Pathname.new(filename).cleanpath.to_path,
|
|
91
91
|
directory: directory,
|
|
92
92
|
type: type,
|
|
93
|
-
content: content
|
|
93
|
+
content: content,
|
|
94
|
+
symlink_target: @linked_paths.dig(path.gsub(%r{^/}, ""), :path)
|
|
94
95
|
)
|
|
95
96
|
rescue *CLIENT_NOT_FOUND_ERRORS
|
|
96
97
|
raise Dependabot::DependencyFileNotFound, path
|
|
@@ -323,16 +324,22 @@ module Dependabot
|
|
|
323
324
|
end
|
|
324
325
|
|
|
325
326
|
# rubocop:disable Metrics/AbcSize
|
|
327
|
+
# rubocop:disable Metrics/MethodLength
|
|
326
328
|
def _fetch_file_content_from_github(path, repo, commit)
|
|
327
329
|
tmp = github_client.contents(repo, path: path, ref: commit)
|
|
328
330
|
|
|
329
331
|
raise Octokit::NotFound if tmp.is_a?(Array)
|
|
330
332
|
|
|
331
333
|
if tmp.type == "symlink"
|
|
332
|
-
@linked_paths[path] =
|
|
334
|
+
@linked_paths[path] = {
|
|
335
|
+
repo: repo,
|
|
336
|
+
provider: "github",
|
|
337
|
+
commit: commit,
|
|
338
|
+
path: Pathname.new(tmp.target).cleanpath.to_path
|
|
339
|
+
}
|
|
333
340
|
tmp = github_client.contents(
|
|
334
341
|
repo,
|
|
335
|
-
path: tmp.target,
|
|
342
|
+
path: Pathname.new(tmp.target).cleanpath.to_path,
|
|
336
343
|
ref: commit
|
|
337
344
|
)
|
|
338
345
|
end
|
|
@@ -354,6 +361,7 @@ module Dependabot
|
|
|
354
361
|
Base64.decode64(tmp.content).force_encoding("UTF-8").encode
|
|
355
362
|
end
|
|
356
363
|
# rubocop:enable Metrics/AbcSize
|
|
364
|
+
# rubocop:enable Metrics/MethodLength
|
|
357
365
|
|
|
358
366
|
def default_branch_for_repo
|
|
359
367
|
@default_branch_for_repo ||= client_for_provider.
|
data/lib/dependabot/version.rb
CHANGED