dependabot-python 0.103.2 → 0.103.3
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/python/requirement.rb +3 -2
- data/lib/dependabot/python/version.rb +43 -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: d64f64df327433ddbf7d5e43161ca5c264124f030f3553459fa158947e7150fb
|
4
|
+
data.tar.gz: e5cc86b5834ffb83185059bad9ff61ebfb1fe341d4339649597de5934efce7cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b5380f5e10eb60c8e91f05dbd2f15f8b57f4c7784a6a3d3f50ce4f9dde11a5679d32e601d113f52d9cfbd5ac4dbc083f6a122fd3e4987a814ce3e6a200cc753
|
7
|
+
data.tar.gz: f04dc6f06d306619384f80904c3556cf6b620fb63aaae5ef9a551da98d0e7b4d32c3260753967e28e2ccc38251318a18b9bd6e4dca086f3d6907cd523ea02113
|
@@ -124,11 +124,12 @@ module Dependabot
|
|
124
124
|
captures.first.to_s&.strip
|
125
125
|
exact_op = ["", "=", "==", "==="].include?(op)
|
126
126
|
|
127
|
-
req_string.
|
127
|
+
req_string.strip.
|
128
128
|
split(".").
|
129
129
|
first(req_string.split(".").index("*") + 1).
|
130
130
|
join(".").
|
131
|
-
|
131
|
+
gsub(/\*(?!$)/, "0").
|
132
|
+
gsub(/\*$/, "0.a").
|
132
133
|
tap { |s| exact_op ? s.gsub!(/^(?<!!)=*/, "~>") : s }
|
133
134
|
end
|
134
135
|
end
|
@@ -45,7 +45,7 @@ module Dependabot
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def <=>(other)
|
48
|
-
version_comparison =
|
48
|
+
version_comparison = old_comp(other)
|
49
49
|
return version_comparison unless version_comparison.zero?
|
50
50
|
|
51
51
|
unless post_version_comparison(other).zero?
|
@@ -110,6 +110,48 @@ module Dependabot
|
|
110
110
|
tr("-", ".").
|
111
111
|
gsub(/(\d)([a-z])/i, '\1.\2')
|
112
112
|
end
|
113
|
+
|
114
|
+
# TODO: Delete this once we're using a version of Rubygems that includes
|
115
|
+
# https://github.com/rubygems/rubygems/pull/2651
|
116
|
+
#
|
117
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
118
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
119
|
+
# rubocop:disable Style/CaseEquality
|
120
|
+
# rubocop:disable Metrics/LineLength
|
121
|
+
# rubocop:disable Style/ParallelAssignment
|
122
|
+
# rubocop:disable Style/RedundantReturn
|
123
|
+
def old_comp(other)
|
124
|
+
return unless Gem::Version === other
|
125
|
+
return 0 if @version == other._version || canonical_segments == other.canonical_segments
|
126
|
+
|
127
|
+
lhsegments = canonical_segments
|
128
|
+
rhsegments = other.canonical_segments
|
129
|
+
|
130
|
+
lhsize = lhsegments.size
|
131
|
+
rhsize = rhsegments.size
|
132
|
+
limit = (lhsize > rhsize ? lhsize : rhsize) - 1
|
133
|
+
|
134
|
+
i = 0
|
135
|
+
|
136
|
+
while i <= limit
|
137
|
+
lhs, rhs = lhsegments[i] || 0, rhsegments[i] || 0
|
138
|
+
i += 1
|
139
|
+
|
140
|
+
next if lhs == rhs
|
141
|
+
return -1 if String === lhs && Numeric === rhs
|
142
|
+
return 1 if Numeric === lhs && String === rhs
|
143
|
+
|
144
|
+
return lhs <=> rhs
|
145
|
+
end
|
146
|
+
|
147
|
+
return 0
|
148
|
+
end
|
149
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
150
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
151
|
+
# rubocop:enable Style/CaseEquality
|
152
|
+
# rubocop:enable Metrics/LineLength
|
153
|
+
# rubocop:enable Style/ParallelAssignment
|
154
|
+
# rubocop:enable Style/RedundantReturn
|
113
155
|
end
|
114
156
|
end
|
115
157
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-python
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.103.
|
4
|
+
version: 0.103.3
|
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.103.
|
19
|
+
version: 0.103.3
|
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.103.
|
26
|
+
version: 0.103.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|