dependabot-common 0.124.3 → 0.124.8
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.
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 +11 -4
- 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: 80c540f125632234755c77d16b45d2d94c4bc4329f21e525bbbe16df6bf0fdc9
|
4
|
+
data.tar.gz: 3794b1793d4184c6ae968c922ddf9a614f532787d9f9071209edb8cfdeb019d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 887254213c78624a12d5e52bedb87dc991009695ac4d2a80f585c972c1c017b17d67744f9bd5bb6765446d880ab9b200fc2278682a4030bfcffdcce799a681a5
|
7
|
+
data.tar.gz: 309c2e451b0a0dac5b8250c86e130ce529739ca486f0a531a1eeb6c5e6652aac027ef5dfa5f4a0a31334c9a09f196899ff6ccab72cef7e8e146d3627f669345e
|
@@ -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,
|
@@ -19,6 +19,7 @@ module Dependabot
|
|
19
19
|
"#{Excon::USER_AGENT} ruby/#{RUBY_VERSION} "\
|
20
20
|
"(#{RUBY_PLATFORM}) "\
|
21
21
|
"(+https://github.com/dependabot/dependabot-core)"
|
22
|
+
SIGKILL = 9
|
22
23
|
|
23
24
|
class ChildProcessFailed < StandardError
|
24
25
|
attr_reader :error_class, :error_message, :error_backtrace
|
@@ -42,6 +43,9 @@ module Dependabot
|
|
42
43
|
path = Pathname.new(File.join(repo_contents_path, directory)).
|
43
44
|
expand_path
|
44
45
|
reset_git_repo(repo_contents_path)
|
46
|
+
# Handle missing directories by creating an empty one and relying on the
|
47
|
+
# file fetcher to raise a DependencyFileNotFound error
|
48
|
+
FileUtils.mkdir_p(path) unless Dir.exist?(path)
|
45
49
|
Dir.chdir(path) { yield(path) }
|
46
50
|
else
|
47
51
|
in_a_temporary_directory(directory, &block)
|
@@ -58,13 +62,14 @@ module Dependabot
|
|
58
62
|
end
|
59
63
|
|
60
64
|
class HelperSubprocessFailed < StandardError
|
61
|
-
attr_reader :error_class, :error_context
|
65
|
+
attr_reader :error_class, :error_context, :trace
|
62
66
|
|
63
|
-
def initialize(message:, error_context:, error_class: nil)
|
67
|
+
def initialize(message:, error_context:, error_class: nil, trace: nil)
|
64
68
|
super(message)
|
65
69
|
@error_class = error_class || ""
|
66
70
|
@error_context = error_context
|
67
71
|
@command = error_context[:command]
|
72
|
+
@trace = trace
|
68
73
|
end
|
69
74
|
|
70
75
|
def raven_context
|
@@ -104,7 +109,8 @@ module Dependabot
|
|
104
109
|
args: args,
|
105
110
|
time_taken: time_taken,
|
106
111
|
stderr_output: stderr ? stderr[0..50_000] : "", # Truncate to ~100kb
|
107
|
-
process_exit_value: process.to_s
|
112
|
+
process_exit_value: process.to_s,
|
113
|
+
process_termsig: process.termsig
|
108
114
|
}
|
109
115
|
|
110
116
|
response = JSON.parse(stdout)
|
@@ -113,7 +119,8 @@ module Dependabot
|
|
113
119
|
raise HelperSubprocessFailed.new(
|
114
120
|
message: response["error"],
|
115
121
|
error_class: response["error_class"],
|
116
|
-
error_context: error_context
|
122
|
+
error_context: error_context,
|
123
|
+
trace: response["trace"]
|
117
124
|
)
|
118
125
|
rescue JSON::ParserError
|
119
126
|
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.8
|
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-11-04 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
|