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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92349304b2fa548c7495ff1bd83bd9890d7aab5886e87a213f1c11bd767fa944
4
- data.tar.gz: 9da5dcebad4286a2dd161ee06ef7eaa7351b0f4dbdddd0b7ca5d5c1d9fc49271
3
+ metadata.gz: 4de40b71c7a0d9be94b79182b776fd9acc461278dbcadf74c1a4cec6df966f68
4
+ data.tar.gz: 1e74036f38c41939523674dc635e5acc40c285e3ad07dde9bb35218ac7fbb38c
5
5
  SHA512:
6
- metadata.gz: 3effc2a2059a58a223e13b357d9995be1f28cbe162e742993ef06b3b0bd6559f64dda2eff1e34b670f907fbc55835fe7a5b4a49b2b6139a8e76b0c9ea0bdc0aa
7
- data.tar.gz: 7093b400bd752a9defb3bece6ef8db540b3bec84d861cc5d88dee594f4ce8ad5387c1a730a179aa04ebf366d2e70ea5ca8b12644086a0105dbab750e134a45b7
6
+ metadata.gz: f8fd54ff16cd9e0687786813cc9b9b62409a9063b1fa25290eb5a6b842a6edff55c211203da8f7328327f30b28cdd493d49b91ed85391c0e21b704f6ec5a5041
7
+ data.tar.gz: 11cad05957d752b29605f8c167e855dc061c104d07a3028cf79f76378084c83946e4a9018999b39eada028b69b4af4463ecbdb426abfcefad8bf183e5e31167f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rsmp_schema (0.8.0)
4
+ rsmp_schema (0.8.1)
5
5
  json_schemer (~> 2.3.0)
6
6
  thor (~> 1.3.1)
7
7
 
@@ -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 version
144
- matched.to_s if matched
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 version
148
- "#{matched.to_s}.0" if matched
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
@@ -1,5 +1,5 @@
1
1
  module RSMP
2
2
  module Schema
3
- VERSION = "0.8.0"
3
+ VERSION = "0.8.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsmp_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Tin