rsmp_schema 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rsmp_schema/schema.rb +6 -6
- data/lib/rsmp_schema/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4de40b71c7a0d9be94b79182b776fd9acc461278dbcadf74c1a4cec6df966f68
|
4
|
+
data.tar.gz: 1e74036f38c41939523674dc635e5acc40c285e3ad07dde9bb35218ac7fbb38c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8fd54ff16cd9e0687786813cc9b9b62409a9063b1fa25290eb5a6b842a6edff55c211203da8f7328327f30b28cdd493d49b91ed85391c0e21b704f6ec5a5041
|
7
|
+
data.tar.gz: 11cad05957d752b29605f8c167e855dc061c104d07a3028cf79f76378084c83946e4a9018999b39eada028b69b4af4463ecbdb426abfcefad8bf183e5e31167f
|
data/Gemfile.lock
CHANGED
data/lib/rsmp_schema/schema.rb
CHANGED
@@ -139,13 +139,13 @@ module RSMP::Schema
|
|
139
139
|
# 3.1A3r3 >= 3.1
|
140
140
|
# return nil if string doesn't match
|
141
141
|
def self.sanitize_version version
|
142
|
-
# match normal z.y.z format
|
143
|
-
matched = /^\d+\.\d+\.\d+/.match
|
144
|
-
|
145
|
-
|
142
|
+
# match normal semver z.y.z format
|
143
|
+
if matched = /^\d+\.\d+\.\d+/.match(version)
|
144
|
+
matched.to_s
|
146
145
|
# match x.y format, and add patch version zero to get z.y.0
|
147
|
-
matched = /^\d+\.\d+/.match
|
148
|
-
|
146
|
+
elsif matched = /^\d+\.\d+/.match(version)
|
147
|
+
"#{matched.to_s}.0"
|
148
|
+
end
|
149
149
|
end
|
150
150
|
|
151
151
|
# find schema for a particular schema and version
|
data/lib/rsmp_schema/version.rb
CHANGED