dependabot-common 0.156.6 → 0.156.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/file_fetchers/base.rb +31 -5
- data/lib/dependabot/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a254e2e3ea31fb9c9b91abeb1d5d6a4e83f32f2b86034f6833d5f8ac6cc346b9
|
4
|
+
data.tar.gz: 00e44b2bab13764530fd614c9bcb568167a28b757d6bf289ae465ed511d79bb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4978fc17911c5354112095f2f4a9710311d3bc6e69bb27e9b77d505bea897508a979fe0e99197b6c73c128c297ba3b9176d724435c6bbe85c1c912137ef104aa
|
7
|
+
data.tar.gz: ecae02c62c69d47bfc658d0c5f249caaa2aa376d3404f79b9030956c281fc1dd286eda17222cbb270c893b19d02654e8b2c66b97a296cc90a9ee33e1a8d9cd32
|
@@ -157,11 +157,12 @@ module Dependabot
|
|
157
157
|
path = Pathname.new(File.join(dir)).cleanpath.to_path.gsub(%r{^/*}, "")
|
158
158
|
|
159
159
|
@repo_contents ||= {}
|
160
|
-
@repo_contents[dir] ||=
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
160
|
+
@repo_contents[dir] ||= if repo_contents_path
|
161
|
+
_cloned_repo_contents(path)
|
162
|
+
else
|
163
|
+
_fetch_repo_contents(path, raise_errors: raise_errors,
|
164
|
+
fetch_submodules: fetch_submodules)
|
165
|
+
end
|
165
166
|
end
|
166
167
|
|
167
168
|
#################################################
|
@@ -225,6 +226,31 @@ module Dependabot
|
|
225
226
|
github_response.map { |f| _build_github_file_struct(f) }
|
226
227
|
end
|
227
228
|
|
229
|
+
def _cloned_repo_contents(relative_path)
|
230
|
+
repo_path = File.join(clone_repo_contents, relative_path)
|
231
|
+
return [] unless Dir.exist?(repo_path)
|
232
|
+
|
233
|
+
Dir.entries(repo_path).map do |name|
|
234
|
+
next if [".", ".."].include?(name)
|
235
|
+
|
236
|
+
absolute_path = File.join(repo_path, name)
|
237
|
+
type = if File.symlink?(absolute_path)
|
238
|
+
"symlink"
|
239
|
+
elsif Dir.exist?(absolute_path)
|
240
|
+
"dir"
|
241
|
+
else
|
242
|
+
"file"
|
243
|
+
end
|
244
|
+
|
245
|
+
OpenStruct.new(
|
246
|
+
name: name,
|
247
|
+
path: Pathname.new(File.join(relative_path, name)).cleanpath.to_path,
|
248
|
+
type: type,
|
249
|
+
size: 0 # NOTE: added for parity with github contents API
|
250
|
+
)
|
251
|
+
end.compact
|
252
|
+
end
|
253
|
+
|
228
254
|
def update_linked_paths(repo, path, commit, github_response)
|
229
255
|
case github_response.type
|
230
256
|
when "submodule"
|
data/lib/dependabot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.156.
|
4
|
+
version: 0.156.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -469,7 +469,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
469
469
|
- !ruby/object:Gem::Version
|
470
470
|
version: 2.7.3
|
471
471
|
requirements: []
|
472
|
-
rubygems_version: 3.2.
|
472
|
+
rubygems_version: 3.2.22
|
473
473
|
signing_key:
|
474
474
|
specification_version: 4
|
475
475
|
summary: Shared code used between Dependabot package managers
|