express_validations 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 82cad3c08526d5d9a3a983988c6c92c4212e3e10
4
+ data.tar.gz: 7fd2414f2d33ece0b128d5b17b5a02bcad4ab0ac
5
+ SHA512:
6
+ metadata.gz: cb303806f09bc997662a084f9ab9e74b07b2c991cadbe9c2dd6938282d66b808c05f2d8cd150bfbe02b87c5f5d25523bdabc0e6840e2e490fe5ecc9b03700247
7
+ data.tar.gz: eb663b7865ea67f6c19ef6bedd1c58ce750257617b78cc564302fdf0ad34038ec82540a7db3fbcdd6694305cc1699cbd5cb68724648e83d939ecdacdcd82956f
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /spec/support/secrets.yml
11
+ /express_validations-0.1.0.gem
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.2.4
5
+ before_install: gem install bundler -v 1.13.6
data/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ ## v0.1.0
2
+
3
+ * first release
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in express_validations.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 ToDo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # ExpressValidations
2
+
3
+ This gem allows you to express the validations in your Rails models as JSON objects, so that you can implement them as client side validations with JQuery --- the way you want to.
4
+
5
+ This gem helps to maintain consistency between validation rules on server-side and implementations on client-side.
6
+
7
+ It can be very handy if you want to display validations in a more user-friendly manner or when you are creating a wizard and want to implement model validations on each step.
8
+
9
+ ## Installation
10
+
11
+ Add this line to your Rails application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'express_validations'
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install express_validations
24
+
25
+ ## Usage
26
+
27
+ For model classes where you require the validations on client-side, add the following line to it:
28
+
29
+ ```include ExpressValidations```
30
+
31
+ Then in the views for this model do:
32
+
33
+ ```
34
+ <%= javascript_tag do %>
35
+ window.validationRules = <%= #{Your Model}.validations_as_json.html_safe %>;
36
+ <% end %>
37
+ ```
38
+
39
+ This will give access of the model's validation definitions to your application's client-side.
40
+
41
+ But that is not it. You can use the JQuery functions provided with this gem to check if validation passes on a particular field or form, as well as get validation details for a field or a set of fields.
42
+
43
+ Include the following line in your ```application.js``` file:
44
+
45
+ ```//= require express.validations```
46
+
47
+ Then you can use the included functions, for examples, as:
48
+
49
+ ```
50
+ // returns true or false
51
+ var fieldValidation = expressValidations.checkFieldValidation($('input#user_first_name'), window.validationRules);
52
+
53
+ // returns true or false
54
+ var formValidation = expressValidations.checkFieldValidation($('form#new_user'), window.validationRules);
55
+
56
+ // returns an object
57
+ var fieldValidationRules = expressValidations.getValidationsFor($('input#user_first_name'), window.validationRules);
58
+
59
+ // returns an array of objects
60
+ var multipleFieldsValidationRules = expressValidations.getValidationsForMultiple([$('input#username'), $('input#password')], window.validationRules);
61
+
62
+ ```
63
+
64
+ ## Notes
65
+
66
+ - It requires ```Ruby >= 1.9.3```
67
+ - It requires ```activesupport >= 3.2.22```
68
+ - It requires that you declare validations with the form ```validates_#{validation_name}_of``` such as ```validates_presence_of```, with specified options and messages
69
+ - It skips on ```numericality``` validator
70
+ - It cannot take custom validations into account
71
+
72
+
73
+ ## ToDo
74
+
75
+ - Add more JS examples
76
+ - Add the ```numericality``` validator
77
+ - Add tests for Javascript functions
78
+
79
+ ## Contributing
80
+
81
+ Bug reports and pull requests are welcome on GitHub at https://github.com/vikramanity/express_validations.
82
+
83
+
84
+ ## License
85
+
86
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "express_validations"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,32 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'express_validations/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "express_validations"
8
+ spec.version = ExpressValidations::VERSION
9
+ spec.authors = ["Vikram Anand"]
10
+ spec.email = ["vikram983@outlook.com"]
11
+
12
+ spec.summary = %q{Express the validations in your models as JSON objects.}
13
+ spec.description = %q{This gem allows you to express the validations in your models as JSON objects, so that you can implement them as client side validations.}
14
+ spec.homepage = "https://github.com/vikramanity/express_validations"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ f.match(%r{^(test|spec|features)/})
19
+ end
20
+ spec.bindir = "exe"
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.required_ruby_version = '>= 1.9.3'
25
+ spec.add_development_dependency "bundler", "~> 1.13"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "rspec", "~> 3.0"
28
+ spec.add_development_dependency 'pg', '0.17.1'
29
+ spec.add_development_dependency 'with_model', '~> 1.2'
30
+ spec.add_dependency 'activesupport', '>= 3.2.22', '<= 5.0.0.1'
31
+ spec.add_dependency 'railties', '>= 3.2.22', '<= 5.0.0.1'
32
+ end
@@ -0,0 +1,35 @@
1
+ require "active_support/concern"
2
+
3
+ require "express_validations/version"
4
+
5
+ module ExpressValidations
6
+ require "express_validations/engine" if defined? Rails
7
+
8
+ extend ActiveSupport::Concern
9
+
10
+ module ClassMethods
11
+ def validations_as_json(attributes = [])
12
+ raise ArgumentError, "Argument must be an array!" unless attributes.is_a?(Array)
13
+
14
+ validatons = []
15
+ attrs_with_validations = attributes
16
+
17
+ attribute_names.map{ |attr|
18
+ attrs_with_validations << attr.to_sym unless validators_on(attr).blank?
19
+ }
20
+
21
+ attrs_with_validations.each do |attr|
22
+ validators = []
23
+ attr_validators = validators_on(attr)
24
+
25
+ attr_validators.each do |attr_validator|
26
+ validators << { attr_validator.class.name.demodulize.to_sym => attr_validator.options }
27
+ end
28
+
29
+ validatons << { attr => { :validators => validators } }
30
+ end
31
+
32
+ validatons.to_json
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,3 @@
1
+ class Engine < ::Rails::Engine
2
+ isolate_namespace ExpressValidations
3
+ end
@@ -0,0 +1,3 @@
1
+ module ExpressValidations
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,246 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Express Validations - (https://github.com/vikramanity/express_validations)
3
+ // Copyright (c) 2016 Vikram Anand
4
+ // Licensed under MIT (https://opensource.org/licenses/MIT)
5
+ // ---------------------------------------------------------------------------
6
+
7
+
8
+ (function() {
9
+ var displayValidation, getValidationsFor, railsValidations, validateField;
10
+
11
+ // A list of all (most) Rails validations
12
+ // railsValidations = [
13
+ // "absence",
14
+ // "acceptance",
15
+ // "confirmation",
16
+ // "exclusion",
17
+ // "format",
18
+ // "inclusion",
19
+ // "length",
20
+ // "numericality",
21
+ // "presence",
22
+ // "uniqueness"
23
+ // ];
24
+
25
+ getValidationsFor = function($element, validationRules) {
26
+ var elName, fieldName, validationObjects;
27
+ elName = $element.attr('name');
28
+ fieldName = elName.substring(elName.indexOf("[") + 1, elName.indexOf("]"));
29
+ validationObjects = [];
30
+ $.each(validationRules, function(i1, validationRule) {
31
+ var validators;
32
+ if (fieldName === Object.keys(validationRule)[0]) {
33
+ validators = validationRule[fieldName].validators;
34
+ return $.each(validators, function(i2, validator) {
35
+ var opts, valdor;
36
+ valdor = Object.keys(validator)[0];
37
+ opts = validator[Object.keys(validator)[0]];
38
+ return validationObjects.push({
39
+ validator: valdor,
40
+ options: opts
41
+ });
42
+ });
43
+ }
44
+ });
45
+ return validationObjects;
46
+ };
47
+
48
+ displayValidation = function($element, message) {
49
+ // code to display validation error message
50
+ };
51
+
52
+ validateField = function($element, fieldValidation, exceptions) {
53
+ var $el, flag, labelText, options, regex, regexString, tMsg, validationPassed, validator;
54
+ if (exceptions == null) {
55
+ exceptions = [];
56
+ }
57
+ validationPassed = true;
58
+ validator = fieldValidation.validator;
59
+ options = fieldValidation.options;
60
+ if ((validator === "AbsenceValidator") && ($.inArray(validator, exceptions) === -1)) {
61
+ if (($element.val() != null) && ($element.val() != "")) {
62
+ validationPassed = false;
63
+ labelText = $("label[for='" + $element.attr('id') + "']").first().text();
64
+ tMsg = labelText + ' ' + options.message;
65
+ displayValidation($element, tMsg);
66
+ }
67
+ } else if ((validator === "AcceptanceValidator") && ($.inArray(validator, exceptions) === -1)) {
68
+ if ($element.val().not(':checked')) {
69
+ validationPassed = false;
70
+ labelText = $("label[for='" + $element.attr('id') + "']").first().text();
71
+ tMsg = labelText + ' ' + options.message;
72
+ displayValidation($element, tMsg);
73
+ }
74
+ } else if ((validator === "ConfirmationValidator") && ($.inArray(validator, exceptions) === -1)) {
75
+ $el = $('input#' + $element.attr('id') + '_confirmation').first();
76
+ if ($element.val() !== $el.val()) {
77
+ validationPassed = false;
78
+ displayValidation($el, options.message);
79
+ }
80
+ } else if ((validator === "ExclusionValidator") && ($.inArray(validator, exceptions) === -1)) {
81
+ if ($.inArray($element.val(), options["in"]) > -1) {
82
+ validationPassed = false;
83
+ labelText = $("label[for='" + $element.attr('id') + "']").first().text();
84
+ tMsg = labelText + ' ' + options.message;
85
+ displayValidation($element, tMsg);
86
+ }
87
+ } else if ((validator === "FormatValidator") && ($.inArray(validator, exceptions) === -1)) {
88
+ regexString = options["with"].source;
89
+ flag = options["with"].options;
90
+ regex = new RegExp(regexString, flag);
91
+ if (!regex.test($element.val())) {
92
+ validationPassed = false;
93
+ labelText = $("label[for='" + $element.attr('id') + "']").first().text();
94
+ tMsg = labelText + ' ' + options.message;
95
+ displayValidation($element, tMsg);
96
+ }
97
+ } else if ((validator === "InclusionValidator") && ($.inArray(validator, exceptions) === -1)) {
98
+ if ($.inArray($element.val(), options["in"]) < 0) {
99
+ validationPassed = false;
100
+ labelText = $("label[for='" + $element.attr('id') + "']").first().text();
101
+ tMsg = labelText + ' ' + options.message;
102
+ displayValidation($element, tMsg);
103
+ }
104
+ } else if ((validator === "LengthValidator") && ($.inArray(validator, exceptions) === -1)) {
105
+ if ($element.val().length < options.minimum) {
106
+ validationPassed = false;
107
+ labelText = $("label[for='" + $element.attr('id') + "']").first().text();
108
+ tMsg = labelText + ' ' + (options.too_short || options.message);
109
+ displayValidation($element, tMsg);
110
+ }
111
+ if ($element.val().length > options.maximum) {
112
+ validationPassed = false;
113
+ labelText = $("label[for='" + $element.attr('id') + "']").first().text();
114
+ tMsg = labelText + ' ' + (options.too_long || options.message);
115
+ displayValidation($element, tMsg);
116
+ }
117
+ } else if ((validator === "PresenceValidator") && ($.inArray(validator, exceptions) === -1)) {
118
+ if ($element.val() === "") {
119
+ validationPassed = false;
120
+ labelText = $("label[for='" + $element.attr('id') + "']").first().text();
121
+ tMsg = labelText + ' ' + options.message;
122
+ displayValidation($element, tMsg);
123
+ }
124
+ }
125
+ return validationPassed;
126
+ };
127
+
128
+
129
+ this.expressValidations = {
130
+ checkFieldValidation: function($validationField, validationRules, exceptions) {
131
+ var validationPassed, validationResult, fieldValidations;
132
+ if (exceptions == null) {
133
+ exceptions = [];
134
+ }
135
+ validationPassed = true;
136
+ validationResult = [];
137
+ fieldValidations = getValidationsFor($validationField, validationRules);
138
+ $.each(fieldValidations, function(i1, fieldValidation) {
139
+ var result;
140
+ result = validateField($validationField, fieldValidation, exceptions);
141
+ validationResult.push(result);
142
+ if (!result) {
143
+ return false;
144
+ }
145
+ });
146
+ if ($.inArray(false, validationResult) > -1) {
147
+ validationPassed = false;
148
+ }
149
+ return validationPassed;
150
+ },
151
+ checkFormValidation: function($form, validationRules, exceptions) {
152
+ var validationFields = $form.find(':input:not(:hidden):not(:button):not(:submit)');
153
+ var validationPassed, validationResult;
154
+ if (exceptions == null) {
155
+ exceptions = [];
156
+ }
157
+ validationPassed = true;
158
+ validationResult = [];
159
+ $.each(validationFields, function(i1, $validationField) {
160
+ var fieldValidations;
161
+ fieldValidations = getValidationsFor($validationField, validationRules);
162
+ return $.each(fieldValidations, function(i2, fieldValidation) {
163
+ var result;
164
+ result = validateField($validationField, fieldValidation, exceptions);
165
+ validationResult.push(result);
166
+ if (!result) {
167
+ return false;
168
+ }
169
+ });
170
+ });
171
+ if ($.inArray(false, validationResult) > -1) {
172
+ validationPassed = false;
173
+ }
174
+ return validationPassed;
175
+ },
176
+ getValidationsFor: function($element, validationRules) {
177
+ var elName, fieldName, validationObjects;
178
+ elName = $element.attr('name');
179
+ fieldName = elName.substring(elName.indexOf("[") + 1, elName.indexOf("]"));
180
+ validationObjects = [];
181
+ $.each(validationRules, function(i1, validationRule) {
182
+ var validators;
183
+ if (fieldName === Object.keys(validationRule)[0]) {
184
+ validators = validationRule[fieldName].validators;
185
+ return $.each(validators, function(i2, validator) {
186
+ var opts, valdor;
187
+ valdor = Object.keys(validator)[0];
188
+ opts = validator[Object.keys(validator)[0]];
189
+ return validationObjects.push({
190
+ validator: valdor,
191
+ options: opts
192
+ });
193
+ });
194
+ }
195
+ });
196
+ return validationObjects;
197
+ },
198
+ getValidationsForMultiple: function(validationFields, validationRules) {
199
+ var fieldValidations = [];
200
+ $.each(validationFields, function(i1, $validationField) {
201
+ var key = $validationField;
202
+ var val = getValidationsFor($validationField, validationRules);
203
+ fieldValidations.push({
204
+ field: key,
205
+ validations: val
206
+ });
207
+ });
208
+ return fieldValidations;
209
+ },
210
+ checkUniqueness: function($element, uniquenessResults) {
211
+ $.ajax({
212
+ url: "determine_uniqueness",
213
+ type: "get",
214
+ data: {
215
+ field: $element.attr('name'),
216
+ value: $element.val()
217
+ },
218
+ dataType: "json",
219
+ success: function(data) {
220
+ return uniquenessResults.push([$element, data.uniqueness]);
221
+ },
222
+ error: function(j, s, e) {
223
+ return window.networkError = true;
224
+ }
225
+ });
226
+ return uniquenessResults;
227
+ },
228
+ checkAge: function(age, validationFields, msg) {
229
+ var $element1, $element2, $element3, ageDate, givenDate, validationPassed;
230
+ validationPassed = true;
231
+ ageDate = new Date();
232
+ ageDate.setFullYear(ageDate.getUTCFullYear() - age);
233
+ ageDate.setMonth(ageDate.getUTCMonth());
234
+ ageDate.setDate(ageDate.getUTCDate());
235
+ $element1 = validationFields[0];
236
+ $element2 = validationFields[1];
237
+ $element3 = validationFields[2];
238
+ givenDate = new Date($element1.val(), $element2.val(), $element3.val());
239
+ if (ageDate.getTime() <= givenDate.getTime()) {
240
+ validationPassed = false;
241
+ displayValidation($element3, msg);
242
+ }
243
+ return validationPassed;
244
+ }
245
+ };
246
+ }).call(this);
metadata ADDED
@@ -0,0 +1,170 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: express_validations
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Vikram Anand
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-12-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.13'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.13'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pg
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.17.1
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 0.17.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: with_model
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.2'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.2'
83
+ - !ruby/object:Gem::Dependency
84
+ name: activesupport
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 3.2.22
90
+ - - "<="
91
+ - !ruby/object:Gem::Version
92
+ version: 5.0.0.1
93
+ type: :runtime
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 3.2.22
100
+ - - "<="
101
+ - !ruby/object:Gem::Version
102
+ version: 5.0.0.1
103
+ - !ruby/object:Gem::Dependency
104
+ name: railties
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: 3.2.22
110
+ - - "<="
111
+ - !ruby/object:Gem::Version
112
+ version: 5.0.0.1
113
+ type: :runtime
114
+ prerelease: false
115
+ version_requirements: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: 3.2.22
120
+ - - "<="
121
+ - !ruby/object:Gem::Version
122
+ version: 5.0.0.1
123
+ description: This gem allows you to express the validations in your models as JSON
124
+ objects, so that you can implement them as client side validations.
125
+ email:
126
+ - vikram983@outlook.com
127
+ executables: []
128
+ extensions: []
129
+ extra_rdoc_files: []
130
+ files:
131
+ - ".gitignore"
132
+ - ".rspec"
133
+ - ".travis.yml"
134
+ - CHANGELOG.md
135
+ - Gemfile
136
+ - LICENSE.txt
137
+ - README.md
138
+ - Rakefile
139
+ - bin/console
140
+ - bin/setup
141
+ - express_validations.gemspec
142
+ - lib/express_validations.rb
143
+ - lib/express_validations/engine.rb
144
+ - lib/express_validations/version.rb
145
+ - vendor/assets/javascripts/express.validations.js
146
+ homepage: https://github.com/vikramanity/express_validations
147
+ licenses:
148
+ - MIT
149
+ metadata: {}
150
+ post_install_message:
151
+ rdoc_options: []
152
+ require_paths:
153
+ - lib
154
+ required_ruby_version: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: 1.9.3
159
+ required_rubygems_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ requirements: []
165
+ rubyforge_project:
166
+ rubygems_version: 2.4.8
167
+ signing_key:
168
+ specification_version: 4
169
+ summary: Express the validations in your models as JSON objects.
170
+ test_files: []