dependabot-hex 0.124.6 → 0.125.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/hex/file_fetcher.rb +1 -1
- data/lib/dependabot/hex/file_updater/mixfile_git_pin_updater.rb +1 -3
- data/lib/dependabot/hex/file_updater/mixfile_requirement_updater.rb +1 -3
- data/lib/dependabot/hex/update_checker.rb +3 -9
- data/lib/dependabot/hex/update_checker/file_preparer.rb +3 -9
- data/lib/dependabot/hex/update_checker/requirements_updater.rb +2 -6
- data/lib/dependabot/hex/update_checker/version_resolver.rb +1 -3
- data/lib/dependabot/hex/version.rb +1 -3
- 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: ccf5e6c9a745861faf7a85d45261350258c0efcae2f02d89ef2af526e01a53f4
|
4
|
+
data.tar.gz: 4f334bdd914f8bbbea03286c47c45a4495e7c18d46af1eef691dd3bced929803
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2d9a737478470a4ebd393a84d9fbad9df9c9e613ecc82d2653652e53da3b4b9f4ee1f768858e9d2be33de9fcf37986af0b328a87871a147ade252b595b3350d
|
7
|
+
data.tar.gz: b959589f374e322120f2c0554878ba2a5cb7305ef2bc264dc29fcf6afa24e147227aab23ee6276223ade6c1ac3ac0d845fe6907251ccdaefee7d5f82bc8c88e9
|
@@ -68,7 +68,7 @@ module Dependabot
|
|
68
68
|
|
69
69
|
def evaled_files
|
70
70
|
mixfile.content.scan(EVAL_FILE).map do |eval_file_args|
|
71
|
-
path = Pathname.new(File.join(*eval_file_args.reverse)).
|
71
|
+
path = Pathname.new(File.join(*eval_file_args.compact.reverse)).
|
72
72
|
cleanpath.to_path
|
73
73
|
fetch_file_from_host(path).tap { |f| f.support_file = true }
|
74
74
|
end
|
@@ -18,9 +18,7 @@ module Dependabot
|
|
18
18
|
def updated_content
|
19
19
|
updated_content = update_pin(mixfile_content)
|
20
20
|
|
21
|
-
if content_should_change? && mixfile_content == updated_content
|
22
|
-
raise "Expected content to change!"
|
23
|
-
end
|
21
|
+
raise "Expected content to change!" if content_should_change? && mixfile_content == updated_content
|
24
22
|
|
25
23
|
updated_content
|
26
24
|
end
|
@@ -20,9 +20,7 @@ module Dependabot
|
|
20
20
|
def updated_content
|
21
21
|
updated_content = update_requirement(mixfile_content)
|
22
22
|
|
23
|
-
if content_should_change? && mixfile_content == updated_content
|
24
|
-
raise "Expected content to change!"
|
25
|
-
end
|
23
|
+
raise "Expected content to change!" if content_should_change? && mixfile_content == updated_content
|
26
24
|
|
27
25
|
updated_content
|
28
26
|
end
|
@@ -68,9 +68,7 @@ module Dependabot
|
|
68
68
|
def latest_resolvable_version_for_git_dependency
|
69
69
|
# If the gem isn't pinned, the latest version is just the latest
|
70
70
|
# commit for the specified branch.
|
71
|
-
unless git_commit_checker.pinned?
|
72
|
-
return latest_resolvable_commit_with_unchanged_git_source
|
73
|
-
end
|
71
|
+
return latest_resolvable_commit_with_unchanged_git_source unless git_commit_checker.pinned?
|
74
72
|
|
75
73
|
# If the dependency is pinned to a tag that looks like a version then
|
76
74
|
# we want to update that tag. The latest version will then be the SHA
|
@@ -103,9 +101,7 @@ module Dependabot
|
|
103
101
|
def latest_git_version_sha
|
104
102
|
# If the gem isn't pinned, the latest version is just the latest
|
105
103
|
# commit for the specified branch.
|
106
|
-
unless git_commit_checker.pinned?
|
107
|
-
return git_commit_checker.head_commit_for_current_branch
|
108
|
-
end
|
104
|
+
return git_commit_checker.head_commit_for_current_branch unless git_commit_checker.pinned?
|
109
105
|
|
110
106
|
# If the dependency is pinned to a tag that looks like a version then
|
111
107
|
# we want to update that tag. The latest version will then be the SHA
|
@@ -225,9 +221,7 @@ module Dependabot
|
|
225
221
|
ignore_reqs.any? { |r| r.satisfied_by?(v) }
|
226
222
|
end
|
227
223
|
|
228
|
-
if @raise_on_ignored && filtered.empty? && versions.any?
|
229
|
-
raise AllVersionsIgnored
|
230
|
-
end
|
224
|
+
raise AllVersionsIgnored if @raise_on_ignored && filtered.empty? && versions.any?
|
231
225
|
|
232
226
|
filtered.max
|
233
227
|
end
|
@@ -54,14 +54,10 @@ module Dependabot
|
|
54
54
|
def mixfile_content_for_update_check(file)
|
55
55
|
content = file.content
|
56
56
|
|
57
|
-
unless dependency_appears_in_file?(file.name)
|
58
|
-
return sanitize_mixfile(content)
|
59
|
-
end
|
57
|
+
return sanitize_mixfile(content) unless dependency_appears_in_file?(file.name)
|
60
58
|
|
61
59
|
content = relax_version(content, filename: file.name)
|
62
|
-
if replace_git_pin?
|
63
|
-
content = replace_git_pin(content, filename: file.name)
|
64
|
-
end
|
60
|
+
content = replace_git_pin(content, filename: file.name) if replace_git_pin?
|
65
61
|
|
66
62
|
sanitize_mixfile(content)
|
67
63
|
end
|
@@ -85,9 +81,7 @@ module Dependabot
|
|
85
81
|
lower_bound_req = updated_version_req_lower_bound(filename)
|
86
82
|
|
87
83
|
return lower_bound_req if latest_allowable_version.nil?
|
88
|
-
unless version_class.correct?(latest_allowable_version)
|
89
|
-
return lower_bound_req
|
90
|
-
end
|
84
|
+
return lower_bound_req unless version_class.correct?(latest_allowable_version)
|
91
85
|
|
92
86
|
lower_bound_req + " and <= #{latest_allowable_version}"
|
93
87
|
end
|
@@ -54,9 +54,7 @@ module Dependabot
|
|
54
54
|
update_mixfile_range(last_string_reqs).map(&:to_s).join(" and ")
|
55
55
|
end
|
56
56
|
|
57
|
-
if or_string_reqs.count > 1
|
58
|
-
new_requirement = req[:requirement] + " or " + new_requirement
|
59
|
-
end
|
57
|
+
new_requirement = req[:requirement] + " or " + new_requirement if or_string_reqs.count > 1
|
60
58
|
|
61
59
|
req.merge(requirement: new_requirement)
|
62
60
|
end
|
@@ -66,9 +64,7 @@ module Dependabot
|
|
66
64
|
def update_source(requirement_hash)
|
67
65
|
# Only git sources ever need to be updated. Anything else should be
|
68
66
|
# left alone.
|
69
|
-
unless requirement_hash.dig(:source, :type) == "git"
|
70
|
-
return requirement_hash
|
71
|
-
end
|
67
|
+
return requirement_hash unless requirement_hash.dig(:source, :type) == "git"
|
72
68
|
|
73
69
|
requirement_hash.merge(source: updated_source)
|
74
70
|
end
|
@@ -43,9 +43,7 @@ module Dependabot
|
|
43
43
|
end
|
44
44
|
|
45
45
|
return if latest_resolvable_version.nil?
|
46
|
-
if latest_resolvable_version.match?(/^[0-9a-f]{40}$/)
|
47
|
-
return latest_resolvable_version
|
48
|
-
end
|
46
|
+
return latest_resolvable_version if latest_resolvable_version.match?(/^[0-9a-f]{40}$/)
|
49
47
|
|
50
48
|
version_class.new(latest_resolvable_version)
|
51
49
|
rescue SharedHelpers::HelperSubprocessFailed => e
|
@@ -24,9 +24,7 @@ module Dependabot
|
|
24
24
|
def initialize(version)
|
25
25
|
@version_string = version.to_s
|
26
26
|
|
27
|
-
if version.to_s.include?("+")
|
28
|
-
version, @build_info = version.to_s.split("+")
|
29
|
-
end
|
27
|
+
version, @build_info = version.to_s.split("+") if version.to_s.include?("+")
|
30
28
|
|
31
29
|
super
|
32
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-hex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.125.2
|
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-
|
11
|
+
date: 2020-11-11 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.125.2
|
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.125.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|