dependabot-python 0.95.0 → 0.95.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/python/version.rb +21 -8
- 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: 01da0ba3b1b18494e874c99adcc12e5730c9fe3f5a5b0f90e8ef3117695076a2
|
4
|
+
data.tar.gz: 15264183de0c00a1b645fa2e95d49bf8c15ae4f8b13cef6b58e005a718f2189e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 212cf0a812d7782595dee59a3094312c79c112e0e03d0fbf8c638277f077696c6d6dbad2994ac0a56680b102201cec81227e77174edaf64cf33f88aaff0067f1
|
7
|
+
data.tar.gz: ee2a708a8b39f1680c6b6af4553b1a1b48bb46f765b84932146474ab54d21a69cd5144c5b2146615a950d8ce004ab54ded35e9449480d0d8e94d923eb584c405
|
@@ -11,6 +11,7 @@ module Dependabot
|
|
11
11
|
module Python
|
12
12
|
class Version < Gem::Version
|
13
13
|
attr_reader :local_version
|
14
|
+
attr_reader :post_release_version
|
14
15
|
|
15
16
|
VERSION_PATTERN = '[0-9]+[0-9a-zA-Z]*(?>\.[0-9a-zA-Z]+)*' \
|
16
17
|
'(-[0-9A-Za-z-]+(\.[0-9a-zA-Z-]+)*)?' \
|
@@ -28,6 +29,8 @@ module Dependabot
|
|
28
29
|
version, @local_version = version.split("+")
|
29
30
|
version ||= ""
|
30
31
|
version = normalise_prerelease(version)
|
32
|
+
version, @post_release_version = version.split(/\.r(?=\d)/)
|
33
|
+
version ||= ""
|
31
34
|
@local_version = normalise_prerelease(@local_version) if @local_version
|
32
35
|
super
|
33
36
|
end
|
@@ -44,6 +47,24 @@ module Dependabot
|
|
44
47
|
version_comparison = super(other)
|
45
48
|
return version_comparison unless version_comparison.zero?
|
46
49
|
|
50
|
+
unless post_version_comparison(other).zero?
|
51
|
+
return post_version_comparison(other)
|
52
|
+
end
|
53
|
+
|
54
|
+
local_version_comparison(other)
|
55
|
+
end
|
56
|
+
|
57
|
+
def post_version_comparison(other)
|
58
|
+
unless other.is_a?(Python::Version) && other.post_release_version
|
59
|
+
return post_release_version.nil? ? 0 : 1
|
60
|
+
end
|
61
|
+
|
62
|
+
# Post release versions should only ever be a single number, so we can
|
63
|
+
# just string-comparison them.
|
64
|
+
post_release_version <=> other.post_release_version
|
65
|
+
end
|
66
|
+
|
67
|
+
def local_version_comparison(other)
|
47
68
|
unless other.is_a?(Python::Version)
|
48
69
|
return local_version.nil? ? 0 : 1
|
49
70
|
end
|
@@ -65,14 +86,6 @@ module Dependabot
|
|
65
86
|
lhsegments.count <=> rhsegments.count
|
66
87
|
end
|
67
88
|
|
68
|
-
def prerelease?
|
69
|
-
if @version_string.match?(/^([0-9]+[.\-])+(post|rev|r)?\d+$/)
|
70
|
-
return false
|
71
|
-
end
|
72
|
-
|
73
|
-
super
|
74
|
-
end
|
75
|
-
|
76
89
|
private
|
77
90
|
|
78
91
|
def normalise_prerelease(version)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-python
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.95.
|
4
|
+
version: 0.95.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-08 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.95.
|
19
|
+
version: 0.95.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.95.
|
26
|
+
version: 0.95.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|