dependabot-go_modules 0.123.1 → 0.124.0
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/go_modules/file_updater.rb +18 -18
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d13f4d2b870711a4a373e4880421aca48e9a2257c6d4520326a007a352317908
|
4
|
+
data.tar.gz: 7724d54a036c5f8b5beb73d3a43e6d17dd5117d2fce87c9e077fc2f3e9976514
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8ef02592caf94dcf6ee7fdd9ff78dffef8839ee94b9697c51c0ee1b6da756782500c29a9df706c6af65ef9413201659d1b7aa6610786ee61f04b57725a9d865
|
7
|
+
data.tar.gz: 4421f494f65e3e7dae5aa397a5cf21dcad19daf82acadeb848806771a8ada685da7e9d8dca2798b679ad5920ca197ea85469607db7865e8569da029d90622270
|
@@ -13,22 +13,8 @@ module Dependabot
|
|
13
13
|
def initialize(dependencies:, dependency_files:, repo_contents_path: nil,
|
14
14
|
credentials:, options: {})
|
15
15
|
super
|
16
|
-
return unless repo_contents_path.nil?
|
17
16
|
|
18
|
-
|
19
|
-
tmp = Dir.mktmpdir
|
20
|
-
Dir.chdir(tmp) do
|
21
|
-
dependency_files.each do |file|
|
22
|
-
File.write(file.name, file.content)
|
23
|
-
end
|
24
|
-
`git config --global user.email "no-reply@github.com"`
|
25
|
-
`git config --global user.name "Dependabot"`
|
26
|
-
`git init .`
|
27
|
-
`git add .`
|
28
|
-
`git commit -m'fake repo_contents_path'`
|
29
|
-
end
|
30
|
-
@repo_contents_path = tmp
|
31
|
-
@repo_contents_stub = true
|
17
|
+
use_repo_contents_stub if repo_contents_path.nil?
|
32
18
|
end
|
33
19
|
|
34
20
|
def self.updated_files_regex
|
@@ -76,6 +62,21 @@ module Dependabot
|
|
76
62
|
raise "No go.mod!"
|
77
63
|
end
|
78
64
|
|
65
|
+
def use_repo_contents_stub
|
66
|
+
@repo_contents_stub = true
|
67
|
+
@repo_contents_path = Dir.mktmpdir
|
68
|
+
Dir.chdir(@repo_contents_path) do
|
69
|
+
dependency_files.each do |file|
|
70
|
+
File.write(file.name, file.content)
|
71
|
+
end
|
72
|
+
`git config --global user.email "no-reply@github.com"`
|
73
|
+
`git config --global user.name "Dependabot"`
|
74
|
+
`git init .`
|
75
|
+
`git add .`
|
76
|
+
`git commit -m'fake repo_contents_path'`
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
79
80
|
def go_mod
|
80
81
|
@go_mod ||= get_original_file("go.mod")
|
81
82
|
end
|
@@ -111,12 +112,11 @@ module Dependabot
|
|
111
112
|
end
|
112
113
|
|
113
114
|
def tidy?
|
114
|
-
!@repo_contents_stub
|
115
|
+
!@repo_contents_stub
|
115
116
|
end
|
116
117
|
|
117
118
|
def vendor?
|
118
|
-
File.exist?(File.join(vendor_dir, "modules.txt"))
|
119
|
-
options.fetch(:go_mod_vendor, false)
|
119
|
+
File.exist?(File.join(vendor_dir, "modules.txt"))
|
120
120
|
end
|
121
121
|
end
|
122
122
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-go_modules
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.124.0
|
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-20 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.
|
19
|
+
version: 0.124.0
|
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.
|
26
|
+
version: 0.124.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|