dependabot-hex 0.125.0 → 0.125.1
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/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 +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 26b5f28280265cfe54780f05f821f5419e1e377a77b9df4f13d2060a9ac7d738
|
|
4
|
+
data.tar.gz: 737e4c9e908e096f300d57c14f8715e31b3a2ed450da3e15492e63698a4a5be2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8cd99096a4190cc5257b4572f92eb1ea94bd4de1d523abc195251e9725e5d104e3f85d216993204e2823d48b9c6534c572166c5fe1505cb13ada404b008f658e
|
|
7
|
+
data.tar.gz: f8d2a2237d0a72ead20c85c5ca22d0e15b8d33e511a8311bc135d7ecc6562b5216de995a47f6588e1b2c67929f18c002cb71e4d8f884ea6815cb6b4b2ee04f79
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dependabot-hex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.125.
|
|
4
|
+
version: 0.125.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dependabot
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.125.
|
|
19
|
+
version: 0.125.1
|
|
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.125.
|
|
26
|
+
version: 0.125.1
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: byebug
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|