version_sorter 2.2.4 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/version_sorter/version_sorter.c +5 -4
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac54da2224203400008bdcc488a07f6014466645135dba8447a328b88d01a5c3
|
4
|
+
data.tar.gz: fb4f9564c440553d0a5ac8a1580b3545c5d394219c9169547765d07dc3610a41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e7a5716f656e8bbad48a61d8d82c2c7330b9027eb7bc7a45ce1bd6f40f0717e46515e0243a938e524ac2e024263fd84202d267ffba4efa61567f209c2e9eec0
|
7
|
+
data.tar.gz: 20018a183745d8b1d139181b061307e095add6cc77e4d5120d27c93b31081120ffef00c784cada52681b4491acfca2b3db7db42b8c1cf000fccf0a36ce7a64ad
|
@@ -71,6 +71,10 @@ compare_version_number(const struct version_number *a,
|
|
71
71
|
}
|
72
72
|
}
|
73
73
|
|
74
|
+
if (max_n == 0) {
|
75
|
+
return strcmp(a->original, b->original);
|
76
|
+
}
|
77
|
+
|
74
78
|
if (a->size < b->size)
|
75
79
|
return (b->num_flags & (1ull << n)) ? -1 : 1;
|
76
80
|
|
@@ -149,10 +153,7 @@ parse_version_number(const char *string)
|
|
149
153
|
if (string[offset] == '-' || isalpha(string[offset])) {
|
150
154
|
uint16_t start = offset;
|
151
155
|
|
152
|
-
|
153
|
-
offset++;
|
154
|
-
|
155
|
-
while (isalpha(string[offset]))
|
156
|
+
while (string[offset] == '-' || isalpha(string[offset]))
|
156
157
|
offset++;
|
157
158
|
|
158
159
|
version->comp[comp_n].string.offset = start;
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: version_sorter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Wanstrath
|
8
8
|
- K. Adam Christensen
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: VersionSorter is a C extension that does fast sorting of large sets of
|
15
15
|
version strings.
|
@@ -26,7 +26,7 @@ homepage: https://github.com/github/version_sorter#readme
|
|
26
26
|
licenses:
|
27
27
|
- MIT
|
28
28
|
metadata: {}
|
29
|
-
post_install_message:
|
29
|
+
post_install_message:
|
30
30
|
rdoc_options: []
|
31
31
|
require_paths:
|
32
32
|
- lib
|
@@ -41,9 +41,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
43
|
requirements: []
|
44
|
-
|
45
|
-
|
46
|
-
signing_key:
|
44
|
+
rubygems_version: 3.2.15
|
45
|
+
signing_key:
|
47
46
|
specification_version: 4
|
48
47
|
summary: Fast sorting of version strings
|
49
48
|
test_files: []
|