dependabot-common 0.124.3 → 0.124.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of dependabot-common might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/dependabot/file_updaters/vendor_updater.rb +11 -2
- data/lib/dependabot/shared_helpers.rb +8 -3
- 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: 50e57b1a257d59576c24575a534069736197b6113cc7dd40cb893c3fd956163a
|
4
|
+
data.tar.gz: bbf0c5e4ddf71645bd79bce4926bcb4f8b57f3e511ae575d2db7843ee48a2110
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73a199310a81d48b0c9325f6ff8568192cce7fbd89e9fd432a75636ff24d4bbe80e38f00ecaa61f1f80579c075e87872022a71b7fdfab345f0a75ea3248fa210
|
7
|
+
data.tar.gz: ef8e642c0cb9de980c1f07a766b6f61113353ca80e10fd0d82a1ac87a32f282a408e4a00f9cb1c1cd6829e039ae41eea9f0a51120a9e514b74f2bbcc7ccac42a
|
@@ -18,7 +18,10 @@ module Dependabot
|
|
18
18
|
return [] unless repo_contents_path && vendor_dir
|
19
19
|
|
20
20
|
Dir.chdir(repo_contents_path) do
|
21
|
-
relative_dir = vendor_dir.
|
21
|
+
relative_dir = Pathname.new(vendor_dir).relative_path_from(
|
22
|
+
repo_contents_path
|
23
|
+
)
|
24
|
+
|
22
25
|
status = SharedHelpers.run_shell_command(
|
23
26
|
"git status --untracked-files=all --porcelain=v1 #{relative_dir}"
|
24
27
|
)
|
@@ -31,8 +34,14 @@ module Dependabot
|
|
31
34
|
encoding = Dependabot::DependencyFile::ContentEncoding::BASE64
|
32
35
|
encoded_content = Base64.encode64(encoded_content) unless deleted
|
33
36
|
end
|
37
|
+
|
38
|
+
project_root =
|
39
|
+
Pathname.new(File.expand_path(File.join(Dir.pwd, base_directory)))
|
40
|
+
file_path =
|
41
|
+
Pathname.new(path).expand_path.relative_path_from(project_root)
|
42
|
+
|
34
43
|
Dependabot::DependencyFile.new(
|
35
|
-
name:
|
44
|
+
name: file_path.to_s,
|
36
45
|
content: encoded_content,
|
37
46
|
directory: base_directory,
|
38
47
|
deleted: deleted,
|
@@ -42,6 +42,9 @@ module Dependabot
|
|
42
42
|
path = Pathname.new(File.join(repo_contents_path, directory)).
|
43
43
|
expand_path
|
44
44
|
reset_git_repo(repo_contents_path)
|
45
|
+
# Handle missing directories by creating an empty one and relying on the
|
46
|
+
# file fetcher to raise a DependencyFileNotFound error
|
47
|
+
FileUtils.mkdir_p(path) unless Dir.exist?(path)
|
45
48
|
Dir.chdir(path) { yield(path) }
|
46
49
|
else
|
47
50
|
in_a_temporary_directory(directory, &block)
|
@@ -58,13 +61,14 @@ module Dependabot
|
|
58
61
|
end
|
59
62
|
|
60
63
|
class HelperSubprocessFailed < StandardError
|
61
|
-
attr_reader :error_class, :error_context
|
64
|
+
attr_reader :error_class, :error_context, :trace
|
62
65
|
|
63
|
-
def initialize(message:, error_context:, error_class: nil)
|
66
|
+
def initialize(message:, error_context:, error_class: nil, trace: nil)
|
64
67
|
super(message)
|
65
68
|
@error_class = error_class || ""
|
66
69
|
@error_context = error_context
|
67
70
|
@command = error_context[:command]
|
71
|
+
@trace = trace
|
68
72
|
end
|
69
73
|
|
70
74
|
def raven_context
|
@@ -113,7 +117,8 @@ module Dependabot
|
|
113
117
|
raise HelperSubprocessFailed.new(
|
114
118
|
message: response["error"],
|
115
119
|
error_class: response["error_class"],
|
116
|
-
error_context: error_context
|
120
|
+
error_context: error_context,
|
121
|
+
trace: response["trace"]
|
117
122
|
)
|
118
123
|
rescue JSON::ParserError
|
119
124
|
raise HelperSubprocessFailed.new(
|
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.124.
|
4
|
+
version: 0.124.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-codecommit
|
@@ -438,7 +438,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
438
438
|
- !ruby/object:Gem::Version
|
439
439
|
version: 2.7.3
|
440
440
|
requirements: []
|
441
|
-
rubygems_version: 3.1.
|
441
|
+
rubygems_version: 3.1.4
|
442
442
|
signing_key:
|
443
443
|
specification_version: 4
|
444
444
|
summary: Shared code used between Dependabot package managers
|