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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4549572e0353ea5da5a91719cb77444249dbd5e30f199f4d50faa7a8c1b585d
4
- data.tar.gz: c4744eb78ce03c4a654a56814d368c2d6f4fd0aa4345eca818cc659acd9991f3
3
+ metadata.gz: ac54da2224203400008bdcc488a07f6014466645135dba8447a328b88d01a5c3
4
+ data.tar.gz: fb4f9564c440553d0a5ac8a1580b3545c5d394219c9169547765d07dc3610a41
5
5
  SHA512:
6
- metadata.gz: 4309c00a5b4b5cb3eca9cfcec32a75fe918ca58954d80a10b489d834e1d8ea82f9348ae14ee92f4baba038ef0804f467fdf4fa7acd3e6e147c7762dcc89fa12c
7
- data.tar.gz: a9cf4f8d1f3d57585ff4b22e5b91daa07d725927f56f7394bd70f7ecd57f891ef264ce245d50a0b286154c88c968b8ef628875a7bfcaa4abd5d51dabaea0269c
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
- if (string[offset] == '-')
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.2.4
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: 2018-02-12 00:00:00.000000000 Z
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
- rubyforge_project:
45
- rubygems_version: 2.7.3
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: []