semver_dialects 4.1.3 → 4.1.5
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/semver_dialects/semantic_version.rb +2 -1
- data/lib/semver_dialects/semver2.rb +1 -1
- data/lib/semver_dialects/version.rb +1 -1
- data/lib/utils.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89fd07c154a7fb66af0842a68a5b2bd34bc567f936039cda78f985fc5ace2220
|
|
4
|
+
data.tar.gz: 83285cf46f6881fc46645055f29b81604ce60bef90777ff5b4d4b369065bebac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af6416feb2dabe5074b0998c0c1a7a648957a162df457b905785e14766f613234690d2cbc0cc0945549bb57c17f26df5108dd0b7052a58f2ec371219cc11c19a
|
|
7
|
+
data.tar.gz: c043fba75b29828a8eee873cd0890af4a55746d7c898a8fbad256ebc47706ca02bae85323c490e81ce83881d94cbdf773feb2f42bff30fd60b18ac5538fe2810
|
|
@@ -207,7 +207,8 @@ module SemverDialects
|
|
|
207
207
|
@normalized_group_string = group_string_ucase
|
|
208
208
|
end
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
# Base 10, as in String#number?: a zero-padded segment is a decimal number.
|
|
211
|
+
parsed = Integer(@normalized_group_string, 10, exception: false)
|
|
211
212
|
@numeric_value = parsed
|
|
212
213
|
@is_numeric = !parsed.nil?
|
|
213
214
|
@is_wildcard = @normalized_group_string == 'X'
|
|
@@ -142,7 +142,7 @@ module SemverDialects
|
|
|
142
142
|
at_build_tag = false
|
|
143
143
|
|
|
144
144
|
until scanner.eos? || at_build_tag
|
|
145
|
-
if (s = scanner.scan(/\d
|
|
145
|
+
if (s = scanner.scan(/\d++(?![a-zA-Z-])/))
|
|
146
146
|
tokens << s.to_i
|
|
147
147
|
elsif (s = scanner.scan(/[0-9a-zA-Z-]+/))
|
|
148
148
|
tokens << s
|
data/lib/utils.rb
CHANGED
|
@@ -13,8 +13,10 @@ class String
|
|
|
13
13
|
!empty?
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
+
# Base 10: without a base, Integer reads a leading 0 as an octal prefix,
|
|
17
|
+
# so '010' would be 8 and '08' would not be a number at all.
|
|
16
18
|
def number?
|
|
17
|
-
!!Integer(self, exception: false)
|
|
19
|
+
!!Integer(self, 10, exception: false)
|
|
18
20
|
end
|
|
19
21
|
|
|
20
22
|
def initial
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: semver_dialects
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.1.
|
|
4
|
+
version: 4.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Julian Thome
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: exe
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2026-
|
|
13
|
+
date: 2026-11-16 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: pastel
|