api_validator 0.1.1 → 0.1.3
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 +5 -5
- data/README.md +1 -0
- data/api_validator.gemspec +1 -1
- data/lib/api_validator.rb +2 -2
- data/lib/api_validator/version.rb +1 -1
- metadata +12 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 43abcdf0795c1930706ba075cd788eb51ddfe082a591de48cafd22a0d963c052
|
|
4
|
+
data.tar.gz: c7b6ea0833a200f94b85fbcc099024ca249027e59567678d7ae6913483017f21
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6bf7d13a94c8571d4564a60c2c6a9d2e7574163614a485eac3faadcb4e8f9e450e47c3af079f714517a7968dd0cd5b03e8d6f1eade44f87e4c40de02750333f
|
|
7
|
+
data.tar.gz: 2c2c55aa241a40b88a1cdb74145e499b2e9c1dc2392574cecf57c45b0df7a303b5635458b4dc82342a5bb83078a543d9b291bb0efbdf92ad8f886022a923f875
|
data/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# api_validator
|
|
2
2
|
[](https://badge.fury.io/rb/api_validator)
|
|
3
|
+
|
|
3
4
|
This gem helpful to validate api calls. You need to set rules and messages in yml file and rest of the things are handle by gem.
|
|
4
5
|
|
|
5
6
|
## Installation
|
data/api_validator.gemspec
CHANGED
data/lib/api_validator.rb
CHANGED
|
@@ -17,7 +17,7 @@ module ApiValidator
|
|
|
17
17
|
# when param's value is JSON string then parse it and validate parameters
|
|
18
18
|
if (rule == "json_string" and defination == true)
|
|
19
19
|
begin
|
|
20
|
-
json_data = JSON.parse(params[key])
|
|
20
|
+
json_data = JSON.parse(params[key]) rescue params[key]
|
|
21
21
|
json_data = [json_data] unless json_data.class == Array
|
|
22
22
|
json_data.each do |data|
|
|
23
23
|
data.keys.each do |json_data_key|
|
|
@@ -109,4 +109,4 @@ module ApiValidator
|
|
|
109
109
|
end
|
|
110
110
|
end
|
|
111
111
|
# Require our engine
|
|
112
|
-
require "api_validator/engine"
|
|
112
|
+
require "api_validator/engine"
|
metadata
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: api_validator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- sandipkaranjekar
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-05-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - ~>
|
|
17
|
+
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '1.12'
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - ~>
|
|
24
|
+
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '1.12'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rake
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - ~>
|
|
31
|
+
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
33
|
+
version: 12.3.3
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- - ~>
|
|
38
|
+
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
40
|
+
version: 12.3.3
|
|
41
41
|
description: RubyGem for API validation. Here you need to set rules and messages in
|
|
42
42
|
yml, rest of the things are handle by gem.
|
|
43
43
|
email:
|
|
@@ -46,7 +46,7 @@ executables: []
|
|
|
46
46
|
extensions: []
|
|
47
47
|
extra_rdoc_files: []
|
|
48
48
|
files:
|
|
49
|
-
- .gitignore
|
|
49
|
+
- ".gitignore"
|
|
50
50
|
- CODE_OF_CONDUCT.md
|
|
51
51
|
- Gemfile
|
|
52
52
|
- LICENSE.txt
|
|
@@ -70,17 +70,16 @@ require_paths:
|
|
|
70
70
|
- lib
|
|
71
71
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- -
|
|
73
|
+
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
75
|
version: '0'
|
|
76
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
requirements:
|
|
78
|
-
- -
|
|
78
|
+
- - ">="
|
|
79
79
|
- !ruby/object:Gem::Version
|
|
80
80
|
version: '0'
|
|
81
81
|
requirements: []
|
|
82
|
-
|
|
83
|
-
rubygems_version: 2.4.8
|
|
82
|
+
rubygems_version: 3.0.8
|
|
84
83
|
signing_key:
|
|
85
84
|
specification_version: 4
|
|
86
85
|
summary: RubyGem for API validation
|