introspective_grape 0.5.6 → 0.5.7

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: 241e7c16a1bb6c575a8dcf5af51190a9c02057e8a425d3b9df0c7004bd336263
4
- data.tar.gz: bdb1de6b44a6be36418df88f3e1211969a8a0827a1f0bbc37e82b2b401899b2f
3
+ metadata.gz: d29e073d96e9a6f2569eeaec65ece289f344fd5f0b6ea88a0dfb345d36d51052
4
+ data.tar.gz: dac77dd6bc6812de00ec06ee5299c5cea5ff0f3539a304e6a1d1335f72e69f36
5
5
  SHA512:
6
- metadata.gz: d97473f518ec0abc2dcb61fa9bfa733d988b930ea99f2fd032dade1f0e6d4b50624f9aba110e14ea17598a3a949b47fa9d88f5adc7cb344b0e4e391c09582036
7
- data.tar.gz: 7a03151630d57796582eef585fe6ed767eb51c0eccd05fd470812c905add8017980552523c78f623844838b32af11f503caf75f94156c88b694c9d715caf01a8
6
+ metadata.gz: 118befdc8fca693dd91610d8c0ecff86ca2e297cdb1b3817384b1fa78958a5949f1d252cc70eadf2187bee87080fb9949382e656b6765f259f4d23bba7fd2c47
7
+ data.tar.gz: 21f3339a6e874bca7d94fa3efcd92812afbbc0e9b74371cafc8eb3e1644334930671ee59841a13237998272acc06954916a5b09ccd9eb760df38c8b3a28557f9
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ 0.5.7 03/10/2022
3
+ ================
4
+
5
+ Handle the switch from Grape::Validations::Base to Grape::Validations::Validators::Base.
6
+
2
7
  0.5.6 03/09/2022
3
8
  ================
4
9
 
@@ -1,7 +1,9 @@
1
1
  require 'grape/validations'
2
2
  module Grape
3
3
  module Validators
4
- class Json < Grape::Validations::Base
4
+ # Validations::Base becomes Validators::Base somewhere between 1.6.0 and 1.6.2
5
+ validation_class = defined?(Grape::Validations::Base) ? Grape::Validations::Base : Grape::Validations::Validators::Base
6
+ class Json < validation_class
5
7
  def validate_param!(field, params)
6
8
  begin
7
9
  JSON.parse( params[field] )
@@ -11,7 +13,7 @@ module Grape
11
13
  end
12
14
  end
13
15
 
14
- class JsonArray < Grape::Validations::Base
16
+ class JsonArray < validation_class
15
17
  def validate_param!(field, params)
16
18
  begin
17
19
  raise unless JSON.parse( params[field] ).is_a? Array
@@ -21,7 +23,7 @@ module Grape
21
23
  end
22
24
  end
23
25
 
24
- class JsonHash < Grape::Validations::Base
26
+ class JsonHash < validation_class
25
27
  def validate_param!(field, params)
26
28
  begin
27
29
  raise unless JSON.parse( params[field] ).is_a? Hash
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IntrospectiveGrape
4
- VERSION = '0.5.6'
4
+ VERSION = '0.5.7'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: introspective_grape
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Buermann