strum 0.0.53 → 0.0.54

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: d704c577b2829f096ddabdc70462bae26c1e8aadd04add2fa829d6414da5b119
4
- data.tar.gz: 4ca6c7303c9cbec55fea20c36e65ba37e5befb0c733bd1e3390b9168e5f49bc9
3
+ metadata.gz: 80f19ba8dea646eebf161137f4ac5f20ee7a6d93857f4949a4b55a1ee7aed4e5
4
+ data.tar.gz: c9430e8d2dfd25e5dc2f244a15b085275e147c57bc5a46cad261f10c111e0b9b
5
5
  SHA512:
6
- metadata.gz: a80c12eaa5f37d651b1c8ca5efa8c735b4b74cea261ecbabb15ae4ea2ff1b24e40a052d91ea2ecb69460d87266a18c9ba9f27f803d446f18b8429dec3192549d
7
- data.tar.gz: ea4cb4fc244f7db0aedf30a8b30ef68d81ad8df2b41e7c5b90437d7033daca373cc5dcaee83a7fa413e1c42ce0b514e1c8db9d0a1dd905cc2ba1deaa5d084d90
6
+ metadata.gz: 6842dd825305d9061c051df4cdd77dad8cb5e924d2a6cab42a26d2931f5eb44d6f7aea7bf2cac290a9e1e7be9defdfd21a09198688c51c31e0d809948a5b1710
7
+ data.tar.gz: 9a4e60fd441f86b3d87721275bdc952f091a5c7f254ba8f7a15853c0d69c984f3a7728e7dc43b3b43599bf7e69bde6c6410388e30749c469d9de4772ea70c591
data/lib/strum/service.rb CHANGED
@@ -140,8 +140,10 @@ module Strum
140
140
  end
141
141
 
142
142
  def parse_json_schema_error(error)
143
- key = error[:fragment].sub(/#\//, "").sub(/0\//, "")
144
- value = error[:message][0, error[:message].index(/ in schema/)].sub(/#\//, "").sub(/0\//, "")
143
+ pos_match = error[:fragment].match(/([0-9]+)[\/]?/)
144
+ pos = pos_match.is_a?(Array) ? pos_match[1] : "_"
145
+ key = error[:fragment].sub(/#\//, "").sub(/([0-9]+)[\/]?/, "")
146
+ value = "Item ##{pos}. " + error[:message][0, error[:message].index(/ in schema/)].sub(/#\//, "").sub(/([0-9]+)[\/]?/, "")
145
147
  [key.to_sym, value]
146
148
  end
147
149
 
data/lib/strum/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Strum
4
- VERSION = "0.0.53"
4
+ VERSION = "0.0.54"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.53
4
+ version: 0.0.54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serhiy Nazarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-02 00:00:00.000000000 Z
11
+ date: 2020-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema