client_side_validations 18.1.0 → 19.0.0

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: 0e48473024c86d20fe68330cfeb13e2fdc29e4c0a8c619fb51e980d03ec8aae7
4
- data.tar.gz: 67c48790216518f72154e35c22914f4464edea104eaf1538daa772eb5b71ccfc
3
+ metadata.gz: 519cbe68a2ab8902fda80886a2e802995699c9ffe177ff065bb84625c445cadf
4
+ data.tar.gz: be55ec78e3fc953df50882bcc6a068025136c28b15231f08afdac2308d92dcfd
5
5
  SHA512:
6
- metadata.gz: 865cfdfb27838f0fc6718a4fa39ce731c05838a03e4e92d700b0f14a1cf555f782a0db1aab98d38eac8fa2d4cb807a109a551b11b454c563a6f3b60f322b19ca
7
- data.tar.gz: d649a17bf8585839bb0b2ccff97b4f63ee0ddeed9532ca5c97158db427ff8291aea086bc38f0fa440f8f8ac87c6621356b15688689c0b58bb86fc5684ee7190a
6
+ metadata.gz: ad7a540ddcc1d61b6197789a4f1b16cba3c9d3ebe1aa512536b60996df4bf154fc8cb7cab5ac9aa29615adbe08af56890b95626e321fce068d083d8ba22dd764
7
+ data.tar.gz: 7c13e4d20cb92ac469781d13e1395fe14b6cb69d8e3dfee0f20bdbd6f65ffa343e3d3d6de01f4b13c7af2ac0b70e44bdbd77737e7db9ee493b3223f769e2dcc4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 19.0.0 / 2021-10-01
4
+
5
+ * [FEATURE] Add support to `other_than` numericality validator
6
+ * [FEATURE] Drop Ruby 2.4 support
7
+ * [FEATURE] Drop Rails 5.0 and 5.1 support
8
+ * [FEATURE] Drop legacy browsers support (including IE8 and IE9)
9
+ * [FEATURE] Drop Yarn < 1.19 and Node < 12.0 support
10
+ * [FEATURE] Add JavaScript sources to node package
11
+ * [ENHANCEMENT] Minor JS Refactor
12
+ * [ENHANCEMENT] Update development dependencies
13
+ * [ENHANCEMENT] Update QUnit to 2.17.2
14
+
3
15
  ## 18.1.0 / 2021-06-13
4
16
 
5
17
  * [FEATURE] Add support to `fields` method ([#828](https://github.com/DavyJonesLocker/client_side_validations/pull/828))
data/README.md CHANGED
@@ -3,12 +3,12 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/client_side_validations.svg)](https://badge.fury.io/rb/client_side_validations)
4
4
  [![npm version](https://badge.fury.io/js/%40client-side-validations%2Fclient-side-validations.svg)](https://badge.fury.io/js/%40client-side-validations%2Fclient-side-validations)
5
5
  [![SemVer](https://api.dependabot.com/badges/compatibility_score?dependency-name=client_side_validations&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=client_side_validations&package-manager=bundler&version-scheme=semver)
6
- [![Build Status](https://secure.travis-ci.org/DavyJonesLocker/client_side_validations.svg?branch=main)](https://travis-ci.org/DavyJonesLocker/client_side_validations)
6
+ [![Build Status](https://github.com/DavyJonesLocker/client_side_validations/actions/workflows/ruby.yml/badge.svg)](https://github.com/DavyJonesLocker/client_side_validations/actions)
7
7
  [![Maintainability](https://api.codeclimate.com/v1/badges/9f9e8bb6edc92615f34e/maintainability)](https://codeclimate.com/github/DavyJonesLocker/client_side_validations/maintainability)
8
8
  [![Coverage Status](https://coveralls.io/repos/github/DavyJonesLocker/client_side_validations/badge.svg?branch=main)](https://coveralls.io/github/DavyJonesLocker/client_side_validations?branch=main)
9
9
 
10
10
 
11
- `ClientSideValidations` made easy for your Rails 5.x / Rails 6.x applications!
11
+ `ClientSideValidations` made easy for your Rails 5.2 / Rails 6.x applications!
12
12
 
13
13
  ## Project Goals ##
14
14
 
@@ -72,7 +72,7 @@ Then add the following line to your `app/javascript/packs/application.js` pack:
72
72
 
73
73
  ```js
74
74
  // If you are using `import` syntax
75
- import '@client-side-validations/client-side-validations'
75
+ import '@client-side-validations/client-side-validations/src'
76
76
 
77
77
  // If you are using `require` syntax
78
78
  require('@client-side-validations/client-side-validations')
@@ -160,8 +160,8 @@ In your `FormBuilder` you only need to enable validations:
160
160
 
161
161
  That should be enough to get you going.
162
162
 
163
- Starting from version 14.0, ClientSideValidations also supports `form_with`
164
- when used together with Rails >= 5.1. The syntax is the same as `form_for`:
163
+ Starting from version 14.0, ClientSideValidations also supports `form_with`.
164
+ The syntax is the same as `form_for`:
165
165
 
166
166
  ```erb
167
167
  <%= form_with model: @user, validate: true do |f| %>
@@ -324,11 +324,11 @@ If you need to change the markup of how the errors are rendered you can modify t
324
324
 
325
325
  ```js
326
326
  window.ClientSideValidations.formBuilders['ActionView::Helpers::FormBuilder'] = {
327
- add: function(element, settings, message) {
327
+ add: function($element, settings, message) {
328
328
  // custom add code here
329
329
  },
330
330
 
331
- remove: function(element, settings) {
331
+ remove: function($element, settings) {
332
332
  // custom remove code here
333
333
  }
334
334
  }
@@ -378,9 +378,9 @@ Finally we need to add a client side validator. This can be done by hooking into
378
378
  ```js
379
379
  // The validator variable is a JSON Object
380
380
  // The selector variable is a jQuery Object
381
- window.ClientSideValidations.validators.local['email'] = function(element, options) {
381
+ window.ClientSideValidations.validators.local['email'] = function($element, options) {
382
382
  // Your validator code goes in here
383
- if (!/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i.test(element.val())) {
383
+ if (!/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i.test($element.val())) {
384
384
  // When the value fails to pass validation you need to return the error message.
385
385
  // It can be derived from validator.message
386
386
  return options.message;
@@ -439,14 +439,14 @@ $(form).resetClientSideValidations();
439
439
 
440
440
  `ClientSideValidations` will run callbacks based upon the state of the element or form. The following callbacks are supported:
441
441
 
442
- * `ClientSideValidations.callbacks.element.after(element, eventData)`
443
- * `ClientSideValidations.callbacks.element.before(element, eventData)`
444
- * `ClientSideValidations.callbacks.element.fail(element, message, callback, eventData)`
445
- * `ClientSideValidations.callbacks.element.pass(element, callback, eventData)`
446
- * `ClientSideValidations.callbacks.form.after(form, eventData)`
447
- * `ClientSideValidations.callbacks.form.before(form, eventData)`
448
- * `ClientSideValidations.callbacks.form.fail(form, eventData)`
449
- * `ClientSideValidations.callbacks.form.pass(form, eventData)`
442
+ * `ClientSideValidations.callbacks.element.after($element, eventData)`
443
+ * `ClientSideValidations.callbacks.element.before($element, eventData)`
444
+ * `ClientSideValidations.callbacks.element.fail($element, message, callback, eventData)`
445
+ * `ClientSideValidations.callbacks.element.pass($element, callback, eventData)`
446
+ * `ClientSideValidations.callbacks.form.after($form, eventData)`
447
+ * `ClientSideValidations.callbacks.form.before($form, eventData)`
448
+ * `ClientSideValidations.callbacks.form.fail($form, eventData)`
449
+ * `ClientSideValidations.callbacks.form.pass($form, eventData)`
450
450
 
451
451
  The names of the callbacks should be pretty straight forward. For example, `ClientSideValidations.callbacks.form.fail` will be called if a form failed to validate. And `ClientSideValidations.callbacks.element.before` will be called before that particular element's validations are run.
452
452
 
@@ -458,17 +458,17 @@ Here is an example callback for sliding out the error message when the validatio
458
458
 
459
459
  ``` javascript
460
460
  // You will need to require 'jquery-ui' for this to work
461
- window.ClientSideValidations.callbacks.element.fail = function(element, message, callback) {
461
+ window.ClientSideValidations.callbacks.element.fail = function($element, message, callback) {
462
462
  callback();
463
- if (element.data('valid') !== false) {
464
- element.parent().find('.message').hide().show('slide', {direction: "left", easing: "easeOutBounce"}, 500);
463
+ if ($element.data('valid') !== false) {
464
+ $element.parent().find('.message').hide().show('slide', {direction: "left", easing: "easeOutBounce"}, 500);
465
465
  }
466
466
  }
467
467
 
468
- window.ClientSideValidations.callbacks.element.pass = function(element, callback) {
468
+ window.ClientSideValidations.callbacks.element.pass = function($element, callback) {
469
469
  // Take note how we're passing the callback to the hide()
470
470
  // method so it is run after the animation is complete.
471
- element.parent().find('.message').hide('slide', {direction: "left"}, 500, callback);
471
+ $element.parent().find('.message').hide('slide', {direction: "left"}, 500, callback);
472
472
  }
473
473
  ```
474
474
 
@@ -506,7 +506,7 @@ If for some reason you would like to manually validate the form (for example you
506
506
 
507
507
  ```js
508
508
  $input = $('#myInputField');
509
- $form = $input.closest('form');
509
+ $form = $($input[0].form);
510
510
  validators = $form[0].ClientSideValidations.settings.validators;
511
511
 
512
512
  // Validate a single field
@@ -27,11 +27,6 @@ module ClientSideValidations
27
27
  else
28
28
  raise ArgumentError, 'Missing argument'
29
29
  end
30
- when String
31
- # rubocop:disable Security/Eval, Style/DocumentDynamicEvalDefinition
32
- l = eval("->(value) { #{conditional} }", binding, __FILE__, __LINE__)
33
- # rubocop:enable Security/Eval, Style/DocumentDynamicEvalDefinition
34
- instance_exec(nil, &l)
35
30
  when Symbol
36
31
  send conditional
37
32
  else
@@ -18,19 +18,20 @@ module ClientSideValidations
18
18
  private
19
19
 
20
20
  def build_client_side_hash(model, attribute, options)
21
- callbacks_options =
22
- if Rails.version >= '6.1'
23
- ::ActiveModel::Error::CALLBACKS_OPTIONS
24
- else
25
- ::ActiveModel::Errors::CALLBACKS_OPTIONS
26
- end
27
-
28
21
  { message: model.errors.generate_message(attribute, message_type, options) }.merge(options.except(*callbacks_options - %i[allow_blank if unless]))
29
22
  end
30
23
 
31
24
  def message_type
32
25
  kind
33
26
  end
27
+
28
+ def callbacks_options
29
+ if defined?(::ActiveModel::Errors::CALLBACKS_OPTIONS)
30
+ ::ActiveModel::Errors::CALLBACKS_OPTIONS
31
+ else
32
+ ::ActiveModel::Error::CALLBACKS_OPTIONS
33
+ end
34
+ end
34
35
  end
35
36
 
36
37
  module Validations
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ClientSideValidations
4
- VERSION = '18.1.0'
4
+ VERSION = '19.0.0'
5
5
  end
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Client Side Validations JS - v0.1.5 (https://github.com/DavyJonesLocker/client_side_validations)
2
+ * Client Side Validations JS - v0.2.0 (https://github.com/DavyJonesLocker/client_side_validations)
3
3
  * Copyright (c) 2021 Geremia Taglialatela, Brian Cardarella
4
4
  * Licensed under MIT (https://opensource.org/licenses/mit-license.php)
5
5
  */
@@ -7,12 +7,12 @@
7
7
  (function (global, factory) {
8
8
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
9
9
  typeof define === 'function' && define.amd ? define(['jquery'], factory) :
10
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ClientSideValidations = factory(global.$));
11
- }(this, (function ($) { 'use strict';
10
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ClientSideValidations = factory(global.jQuery));
11
+ })(this, (function (jQuery) { 'use strict';
12
12
 
13
13
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
14
 
15
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
15
+ var jQuery__default = /*#__PURE__*/_interopDefaultLegacy(jQuery);
16
16
 
17
17
  function _typeof(obj) {
18
18
  "@babel/helpers - typeof";
@@ -33,20 +33,20 @@
33
33
  var ClientSideValidations = {
34
34
  callbacks: {
35
35
  element: {
36
- after: function after(element, eventData) {},
37
- before: function before(element, eventData) {},
38
- fail: function fail(element, message, addError, eventData) {
36
+ after: function after($element, eventData) {},
37
+ before: function before($element, eventData) {},
38
+ fail: function fail($element, message, addError, eventData) {
39
39
  return addError();
40
40
  },
41
- pass: function pass(element, removeError, eventData) {
41
+ pass: function pass($element, removeError, eventData) {
42
42
  return removeError();
43
43
  }
44
44
  },
45
45
  form: {
46
- after: function after(form, eventData) {},
47
- before: function before(form, eventData) {},
48
- fail: function fail(form, eventData) {},
49
- pass: function pass(form, eventData) {}
46
+ after: function after($form, eventData) {},
47
+ before: function before($form, eventData) {},
48
+ fail: function fail($form, eventData) {},
49
+ pass: function pass($form, eventData) {}
50
50
  }
51
51
  },
52
52
  eventsToBind: {
@@ -80,52 +80,52 @@
80
80
  input: function input(form) {
81
81
  return {
82
82
  'focusout.ClientSideValidations': function focusoutClientSideValidations() {
83
- $__default['default'](this).isValid(form.ClientSideValidations.settings.validators);
83
+ jQuery__default["default"](this).isValid(form.ClientSideValidations.settings.validators);
84
84
  },
85
85
  'change.ClientSideValidations': function changeClientSideValidations() {
86
- $__default['default'](this).data('changed', true);
86
+ jQuery__default["default"](this).data('changed', true);
87
87
  },
88
88
  'element:validate:after.ClientSideValidations': function elementValidateAfterClientSideValidations(eventData) {
89
- ClientSideValidations.callbacks.element.after($__default['default'](this), eventData);
89
+ ClientSideValidations.callbacks.element.after(jQuery__default["default"](this), eventData);
90
90
  },
91
91
  'element:validate:before.ClientSideValidations': function elementValidateBeforeClientSideValidations(eventData) {
92
- ClientSideValidations.callbacks.element.before($__default['default'](this), eventData);
92
+ ClientSideValidations.callbacks.element.before(jQuery__default["default"](this), eventData);
93
93
  },
94
94
  'element:validate:fail.ClientSideValidations': function elementValidateFailClientSideValidations(eventData, message) {
95
- var $element = $__default['default'](this);
95
+ var $element = jQuery__default["default"](this);
96
96
  ClientSideValidations.callbacks.element.fail($element, message, function () {
97
- return form.ClientSideValidations.addError($element, message);
97
+ form.ClientSideValidations.addError($element, message);
98
98
  }, eventData);
99
99
  },
100
100
  'element:validate:pass.ClientSideValidations': function elementValidatePassClientSideValidations(eventData) {
101
- var $element = $__default['default'](this);
101
+ var $element = jQuery__default["default"](this);
102
102
  ClientSideValidations.callbacks.element.pass($element, function () {
103
- return form.ClientSideValidations.removeError($element);
103
+ form.ClientSideValidations.removeError($element);
104
104
  }, eventData);
105
105
  }
106
106
  };
107
107
  },
108
- inputConfirmation: function inputConfirmation(element, form) {
108
+ inputConfirmation: function inputConfirmation($element, form) {
109
109
  return {
110
110
  'focusout.ClientSideValidations': function focusoutClientSideValidations() {
111
- element.data('changed', true).isValid(form.ClientSideValidations.settings.validators);
111
+ $element.data('changed', true).isValid(form.ClientSideValidations.settings.validators);
112
112
  },
113
113
  'keyup.ClientSideValidations': function keyupClientSideValidations() {
114
- element.data('changed', true).isValid(form.ClientSideValidations.settings.validators);
114
+ $element.data('changed', true).isValid(form.ClientSideValidations.settings.validators);
115
115
  }
116
116
  };
117
117
  }
118
118
  },
119
119
  enablers: {
120
120
  form: function form(_form2) {
121
- var $form = $__default['default'](_form2);
121
+ var $form = jQuery__default["default"](_form2);
122
122
  _form2.ClientSideValidations = {
123
123
  settings: $form.data('clientSideValidations'),
124
- addError: function addError(element, message) {
125
- return ClientSideValidations.formBuilders[_form2.ClientSideValidations.settings.html_settings.type].add(element, _form2.ClientSideValidations.settings.html_settings, message);
124
+ addError: function addError($element, message) {
125
+ return ClientSideValidations.formBuilders[_form2.ClientSideValidations.settings.html_settings.type].add($element, _form2.ClientSideValidations.settings.html_settings, message);
126
126
  },
127
- removeError: function removeError(element) {
128
- return ClientSideValidations.formBuilders[_form2.ClientSideValidations.settings.html_settings.type].remove(element, _form2.ClientSideValidations.settings.html_settings);
127
+ removeError: function removeError($element) {
128
+ return ClientSideValidations.formBuilders[_form2.ClientSideValidations.settings.html_settings.type].remove($element, _form2.ClientSideValidations.settings.html_settings);
129
129
  }
130
130
  };
131
131
  var eventsToBind = ClientSideValidations.eventsToBind.form(_form2, $form);
@@ -140,31 +140,31 @@
140
140
  });
141
141
  },
142
142
  input: function input(_input) {
143
- var $input = $__default['default'](_input);
143
+ var $input = jQuery__default["default"](_input);
144
144
  var form = _input.form;
145
- var $form = $__default['default'](form);
145
+ var $form = jQuery__default["default"](form);
146
146
  var eventsToBind = ClientSideValidations.eventsToBind.input(form);
147
147
 
148
148
  for (var eventName in eventsToBind) {
149
149
  var eventFunction = eventsToBind[eventName];
150
150
  $input.filter(':not(:radio):not([id$=_confirmation])').each(function () {
151
- return $__default['default'](this).attr('data-validate', true);
151
+ jQuery__default["default"](this).attr('data-validate', true);
152
152
  }).on(eventName, eventFunction);
153
153
  }
154
154
 
155
155
  $input.filter(':checkbox').on('change.ClientSideValidations', function () {
156
- $__default['default'](this).isValid(form.ClientSideValidations.settings.validators);
156
+ jQuery__default["default"](this).isValid(form.ClientSideValidations.settings.validators);
157
157
  });
158
158
  $input.filter('[id$=_confirmation]').each(function () {
159
- var $element = $__default['default'](this);
160
- var $elementToConfirm = $form.find('#' + this.id.match(/(.+)_confirmation/)[1] + ':input');
159
+ var $element = jQuery__default["default"](this);
160
+ var $elementToConfirm = $form.find("#".concat(this.id.match(/(.+)_confirmation/)[1], ":input"));
161
161
 
162
162
  if ($elementToConfirm.length) {
163
163
  var _eventsToBind = ClientSideValidations.eventsToBind.inputConfirmation($elementToConfirm, form);
164
164
 
165
165
  for (var _eventName in _eventsToBind) {
166
166
  var _eventFunction = _eventsToBind[_eventName];
167
- $__default['default']('#' + $element.attr('id')).on(_eventName, _eventFunction);
167
+ jQuery__default["default"]("#".concat($element.attr('id'))).on(_eventName, _eventFunction);
168
168
  }
169
169
  }
170
170
  });
@@ -172,48 +172,48 @@
172
172
  },
173
173
  formBuilders: {
174
174
  'ActionView::Helpers::FormBuilder': {
175
- add: function add(element, settings, message) {
176
- var form = $__default['default'](element[0].form);
175
+ add: function add($element, settings, message) {
176
+ var $form = jQuery__default["default"]($element[0].form);
177
177
 
178
- if (element.data('valid') !== false && form.find("label.message[for='" + element.attr('id') + "']")[0] == null) {
179
- var inputErrorField = $__default['default'](settings.input_tag);
180
- var labelErrorField = $__default['default'](settings.label_tag);
181
- var label = form.find("label[for='" + element.attr('id') + "']:not(.message)");
178
+ if ($element.data('valid') !== false && $form.find("label.message[for=\"".concat($element.attr('id'), "\"]"))[0] == null) {
179
+ var $inputErrorField = jQuery__default["default"](settings.input_tag);
180
+ var $labelErrorField = jQuery__default["default"](settings.label_tag);
181
+ var $label = $form.find("label[for=\"".concat($element.attr('id'), "\"]:not(.message)"));
182
182
 
183
- if (element.attr('autofocus')) {
184
- element.attr('autofocus', false);
183
+ if ($element.attr('autofocus')) {
184
+ $element.attr('autofocus', false);
185
185
  }
186
186
 
187
- element.before(inputErrorField);
188
- inputErrorField.find('span#input_tag').replaceWith(element);
189
- inputErrorField.find('label.message').attr('for', element.attr('id'));
190
- labelErrorField.find('label.message').attr('for', element.attr('id'));
191
- labelErrorField.insertAfter(label);
192
- labelErrorField.find('label#label_tag').replaceWith(label);
187
+ $element.before($inputErrorField);
188
+ $inputErrorField.find('span#input_tag').replaceWith($element);
189
+ $inputErrorField.find('label.message').attr('for', $element.attr('id'));
190
+ $labelErrorField.find('label.message').attr('for', $element.attr('id'));
191
+ $labelErrorField.insertAfter($label);
192
+ $labelErrorField.find('label#label_tag').replaceWith($label);
193
193
  }
194
194
 
195
- form.find("label.message[for='" + element.attr('id') + "']").text(message);
195
+ $form.find("label.message[for=\"".concat($element.attr('id'), "\"]")).text(message);
196
196
  },
197
- remove: function remove(element, settings) {
198
- var form = $__default['default'](element[0].form);
199
- var inputErrorFieldClass = $__default['default'](settings.input_tag).attr('class');
200
- var inputErrorField = element.closest('.' + inputErrorFieldClass.replace(/ /g, '.'));
201
- var label = form.find("label[for='" + element.attr('id') + "']:not(.message)");
202
- var labelErrorFieldClass = $__default['default'](settings.label_tag).attr('class');
203
- var labelErrorField = label.closest('.' + labelErrorFieldClass.replace(/ /g, '.'));
204
-
205
- if (inputErrorField[0]) {
206
- inputErrorField.find('#' + element.attr('id')).detach();
207
- inputErrorField.replaceWith(element);
208
- label.detach();
209
- labelErrorField.replaceWith(label);
197
+ remove: function remove($element, settings) {
198
+ var $form = jQuery__default["default"]($element[0].form);
199
+ var $inputErrorFieldClass = jQuery__default["default"](settings.input_tag).attr('class');
200
+ var $inputErrorField = $element.closest(".".concat($inputErrorFieldClass.replace(/ /g, '.')));
201
+ var $label = $form.find("label[for=\"".concat($element.attr('id'), "\"]:not(.message)"));
202
+ var $labelErrorFieldClass = jQuery__default["default"](settings.label_tag).attr('class');
203
+ var $labelErrorField = $label.closest(".".concat($labelErrorFieldClass.replace(/ /g, '.')));
204
+
205
+ if ($inputErrorField[0]) {
206
+ $inputErrorField.find("#".concat($element.attr('id'))).detach();
207
+ $inputErrorField.replaceWith($element);
208
+ $label.detach();
209
+ $labelErrorField.replaceWith($label);
210
210
  }
211
211
  }
212
212
  }
213
213
  },
214
214
  patterns: {
215
215
  numericality: {
216
- "default": /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/,
216
+ default: /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/,
217
217
  only_integer: /^[+-]?\d+$/
218
218
  }
219
219
  },
@@ -224,13 +224,13 @@
224
224
  },
225
225
  validators: {
226
226
  all: function all() {
227
- return $__default['default'].extend({}, ClientSideValidations.validators.local, ClientSideValidations.validators.remote);
227
+ return jQuery__default["default"].extend({}, ClientSideValidations.validators.local, ClientSideValidations.validators.remote);
228
228
  },
229
229
  local: {},
230
230
  remote: {}
231
231
  },
232
232
  disable: function disable(target) {
233
- var $target = $__default['default'](target);
233
+ var $target = jQuery__default["default"](target);
234
234
  $target.off('.ClientSideValidations');
235
235
 
236
236
  if ($target.is('form')) {
@@ -238,16 +238,16 @@
238
238
  } else {
239
239
  $target.removeData(['changed', 'valid']);
240
240
  $target.filter(':input').each(function () {
241
- $__default['default'](this).removeAttr('data-validate');
241
+ jQuery__default["default"](this).removeAttr('data-validate');
242
242
  });
243
243
  }
244
244
  },
245
245
  reset: function reset(form) {
246
- var $form = $__default['default'](form);
246
+ var $form = jQuery__default["default"](form);
247
247
  ClientSideValidations.disable(form);
248
248
 
249
249
  for (var key in form.ClientSideValidations.settings.validators) {
250
- form.ClientSideValidations.removeError($form.find("[name='" + key + "']"));
250
+ form.ClientSideValidations.removeError($form.find("[name=\"".concat(key, "\"]")));
251
251
  }
252
252
 
253
253
  ClientSideValidations.enablers.form(form);
@@ -255,12 +255,12 @@
255
255
  start: function start() {
256
256
  if (window.Turbolinks != null && window.Turbolinks.supported) {
257
257
  var initializeOnEvent = window.Turbolinks.EVENTS != null ? 'page:change' : 'turbolinks:load';
258
- $__default['default'](document).on(initializeOnEvent, function () {
259
- return $__default['default'](ClientSideValidations.selectors.forms).validate();
258
+ jQuery__default["default"](document).on(initializeOnEvent, function () {
259
+ return jQuery__default["default"](ClientSideValidations.selectors.forms).validate();
260
260
  });
261
261
  } else {
262
- $__default['default'](function () {
263
- return $__default['default'](ClientSideValidations.selectors.forms).validate();
262
+ jQuery__default["default"](function () {
263
+ return jQuery__default["default"](ClientSideValidations.selectors.forms).validate();
264
264
  });
265
265
  }
266
266
  }
@@ -275,26 +275,22 @@
275
275
 
276
276
  return false;
277
277
  };
278
- var valueIsPresent = function valueIsPresent(value) {
278
+ var isValuePresent = function isValuePresent(value) {
279
279
  return !/^\s*$/.test(value || '');
280
280
  };
281
281
 
282
- var absenceLocalValidator = function absenceLocalValidator(element, options) {
283
- if (valueIsPresent(element.val())) {
282
+ var absenceLocalValidator = function absenceLocalValidator($element, options) {
283
+ if (isValuePresent($element.val())) {
284
284
  return options.message;
285
285
  }
286
286
  };
287
- var presenceLocalValidator = function presenceLocalValidator(element, options) {
288
- if (!valueIsPresent(element.val())) {
287
+ var presenceLocalValidator = function presenceLocalValidator($element, options) {
288
+ if (!isValuePresent($element.val())) {
289
289
  return options.message;
290
290
  }
291
291
  };
292
292
 
293
293
  var DEFAULT_ACCEPT_OPTION = ['1', true];
294
- Array.isArray || (Array.isArray = function (a) {
295
- var object = {};
296
- return '' + a !== a && object.toString.call(a) === '[object Array]';
297
- });
298
294
 
299
295
  var isTextAccepted = function isTextAccepted(value, acceptOption) {
300
296
  if (!acceptOption) {
@@ -308,15 +304,15 @@
308
304
  return value === acceptOption;
309
305
  };
310
306
 
311
- var acceptanceLocalValidator = function acceptanceLocalValidator(element, options) {
307
+ var acceptanceLocalValidator = function acceptanceLocalValidator($element, options) {
312
308
  var valid = true;
313
309
 
314
- if (element.attr('type') === 'checkbox') {
315
- valid = element.prop('checked');
310
+ if ($element.attr('type') === 'checkbox') {
311
+ valid = $element.prop('checked');
316
312
  }
317
313
 
318
- if (element.attr('type') === 'text') {
319
- valid = isTextAccepted(element.val(), options.accept);
314
+ if ($element.attr('type') === 'text') {
315
+ valid = isTextAccepted($element.val(), options.accept);
320
316
  }
321
317
 
322
318
  if (!valid) {
@@ -332,14 +328,14 @@
332
328
  return withOptions && isMatching(value, withOptions) || withoutOptions && !isMatching(value, withoutOptions);
333
329
  };
334
330
 
335
- var formatLocalValidator = function formatLocalValidator(element, options) {
336
- var value = element.val();
331
+ var formatLocalValidator = function formatLocalValidator($element, options) {
332
+ var value = $element.val();
337
333
 
338
- if (options.allow_blank && !valueIsPresent(value)) {
334
+ if (options.allow_blank && !isValuePresent(value)) {
339
335
  return;
340
336
  }
341
337
 
342
- if (!hasValidFormat(value, options["with"], options.without)) {
338
+ if (!hasValidFormat(value, options.with, options.without)) {
343
339
  return options.message;
344
340
  }
345
341
  };
@@ -365,6 +361,9 @@
365
361
  },
366
362
  odd: function odd(a) {
367
363
  return parseInt(a, 10) % 2 === 1;
364
+ },
365
+ other_than: function other_than(a, b) {
366
+ return parseFloat(a) !== parseFloat(b);
368
367
  }
369
368
  };
370
369
 
@@ -373,11 +372,11 @@
373
372
  return validationOption;
374
373
  }
375
374
 
376
- var validationElement = $form.find('[name*=' + validationOption + ']');
375
+ var validationElement = $form.find("[name*=\"".concat(validationOption, "\"]"));
377
376
 
378
377
  if (validationElement.length === 1) {
379
378
  var numberFormat = $form[0].ClientSideValidations.settings.number_format;
380
- var otherFormattedValue = $__default['default'].trim(validationElement.val()).replace(new RegExp('\\' + numberFormat.separator, 'g'), '.');
379
+ var otherFormattedValue = jQuery__default["default"].trim(validationElement.val()).replace(new RegExp("\\".concat(numberFormat.separator), 'g'), '.');
381
380
 
382
381
  if (!isNaN(parseFloat(otherFormattedValue))) {
383
382
  return otherFormattedValue;
@@ -414,23 +413,23 @@
414
413
  return options.messages.only_integer;
415
414
  }
416
415
 
417
- if (!ClientSideValidations.patterns.numericality["default"].test(formattedValue)) {
416
+ if (!ClientSideValidations.patterns.numericality.default.test(formattedValue)) {
418
417
  return options.messages.numericality;
419
418
  }
420
419
 
421
420
  return runFunctionValidations(formattedValue, $form, options);
422
421
  };
423
422
 
424
- var numericalityLocalValidator = function numericalityLocalValidator(element, options) {
425
- var value = element.val();
423
+ var numericalityLocalValidator = function numericalityLocalValidator($element, options) {
424
+ var value = $element.val();
426
425
 
427
- if (options.allow_blank && !valueIsPresent(value)) {
426
+ if (options.allow_blank && !isValuePresent(value)) {
428
427
  return;
429
428
  }
430
429
 
431
- var $form = $__default['default'](element[0].form);
430
+ var $form = jQuery__default["default"]($element[0].form);
432
431
  var numberFormat = $form[0].ClientSideValidations.settings.number_format;
433
- var formattedValue = $__default['default'].trim(value).replace(new RegExp('\\' + numberFormat.separator, 'g'), '.');
432
+ var formattedValue = jQuery__default["default"].trim(value).replace(new RegExp("\\".concat(numberFormat.separator), 'g'), '.');
434
433
  return runValidations$1(formattedValue, $form, options);
435
434
  };
436
435
 
@@ -457,10 +456,10 @@
457
456
  }
458
457
  };
459
458
 
460
- var lengthLocalValidator = function lengthLocalValidator(element, options) {
461
- var value = element.val();
459
+ var lengthLocalValidator = function lengthLocalValidator($element, options) {
460
+ var value = $element.val();
462
461
 
463
- if (options.allow_blank && !valueIsPresent(value)) {
462
+ if (options.allow_blank && !isValuePresent(value)) {
464
463
  return;
465
464
  }
466
465
 
@@ -482,29 +481,31 @@
482
481
  };
483
482
 
484
483
  var isIncluded = function isIncluded(value, options, allowBlank) {
485
- if ((options.allow_blank && !valueIsPresent(value)) === allowBlank) {
484
+ if ((options.allow_blank && !isValuePresent(value)) === allowBlank) {
486
485
  return true;
487
486
  }
488
487
 
489
- return options["in"] && isInList(value, options["in"]) || options.range && isInRange(value, options.range);
488
+ return options.in && isInList(value, options.in) || options.range && isInRange(value, options.range);
490
489
  };
491
490
 
492
- var exclusionLocalValidator = function exclusionLocalValidator(element, options) {
493
- var value = element.val();
491
+ var exclusionLocalValidator = function exclusionLocalValidator($element, options) {
492
+ var value = $element.val();
494
493
 
495
- if (isIncluded(value, options, false) || !options.allow_blank && !valueIsPresent(value)) {
494
+ if (isIncluded(value, options, false) || !options.allow_blank && !isValuePresent(value)) {
496
495
  return options.message;
497
496
  }
498
497
  };
499
- var inclusionLocalValidator = function inclusionLocalValidator(element, options) {
500
- if (!isIncluded(element.val(), options, true)) {
498
+ var inclusionLocalValidator = function inclusionLocalValidator($element, options) {
499
+ var value = $element.val();
500
+
501
+ if (!isIncluded(value, options, true)) {
501
502
  return options.message;
502
503
  }
503
504
  };
504
505
 
505
- var confirmationLocalValidator = function confirmationLocalValidator(element, options) {
506
- var value = element.val();
507
- var confirmationValue = $__default['default']('#' + element.attr('id') + '_confirmation').val();
506
+ var confirmationLocalValidator = function confirmationLocalValidator($element, options) {
507
+ var value = $element.val();
508
+ var confirmationValue = jQuery__default["default"]("#".concat($element.attr('id'), "_confirmation")).val();
508
509
 
509
510
  if (!options.case_sensitive) {
510
511
  value = value.toLowerCase();
@@ -523,30 +524,30 @@
523
524
  }
524
525
 
525
526
  if (otherValue === value) {
526
- $__default['default'](currentElement).data('notLocallyUnique', true);
527
+ jQuery__default["default"](currentElement).data('notLocallyUnique', true);
527
528
  return false;
528
529
  }
529
530
 
530
- if ($__default['default'](currentElement).data('notLocallyUnique')) {
531
- $__default['default'](currentElement).removeData('notLocallyUnique').data('changed', true);
531
+ if (jQuery__default["default"](currentElement).data('notLocallyUnique')) {
532
+ jQuery__default["default"](currentElement).removeData('notLocallyUnique').data('changed', true);
532
533
  }
533
534
 
534
535
  return true;
535
536
  };
536
537
 
537
- var uniquenessLocalValidator = function uniquenessLocalValidator(element, options) {
538
- var elementName = element.attr('name');
538
+ var uniquenessLocalValidator = function uniquenessLocalValidator($element, options) {
539
+ var elementName = $element.attr('name');
539
540
  var matches = elementName.match(/^(.+_attributes\])\[\d+\](.+)$/);
540
541
 
541
542
  if (!matches) {
542
543
  return;
543
544
  }
544
545
 
545
- var form = element.closest('form');
546
- var value = element.val();
546
+ var $form = jQuery__default["default"]($element[0].form);
547
+ var value = $element.val();
547
548
  var valid = true;
548
- form.find(':input[name^="' + matches[1] + '"][name$="' + matches[2] + '"]').not(element).each(function () {
549
- var otherValue = $__default['default'](this).val();
549
+ $form.find(":input[name^=\"".concat(matches[1], "\"][name$=\"").concat(matches[2], "\"]")).not($element).each(function () {
550
+ var otherValue = jQuery__default["default"](this).val();
550
551
 
551
552
  if (!isLocallyUnique(this, value, otherValue, options.case_sensitive)) {
552
553
  valid = false;
@@ -571,12 +572,12 @@
571
572
  uniqueness: uniquenessLocalValidator
572
573
  };
573
574
 
574
- $__default['default'].fn.disableClientSideValidations = function () {
575
+ jQuery__default["default"].fn.disableClientSideValidations = function () {
575
576
  ClientSideValidations.disable(this);
576
577
  return this;
577
578
  };
578
579
 
579
- $__default['default'].fn.enableClientSideValidations = function () {
580
+ jQuery__default["default"].fn.enableClientSideValidations = function () {
580
581
  var _this = this;
581
582
 
582
583
  var selectors = {
@@ -588,7 +589,7 @@
588
589
  var enablers = selectors[selector];
589
590
 
590
591
  _this.filter(ClientSideValidations.selectors[selector]).each(function () {
591
- return ClientSideValidations.enablers[enablers](this);
592
+ ClientSideValidations.enablers[enablers](this);
592
593
  });
593
594
  };
594
595
 
@@ -599,22 +600,22 @@
599
600
  return this;
600
601
  };
601
602
 
602
- $__default['default'].fn.resetClientSideValidations = function () {
603
+ jQuery__default["default"].fn.resetClientSideValidations = function () {
603
604
  this.filter(ClientSideValidations.selectors.forms).each(function () {
604
- return ClientSideValidations.reset(this);
605
+ ClientSideValidations.reset(this);
605
606
  });
606
607
  return this;
607
608
  };
608
609
 
609
- $__default['default'].fn.validate = function () {
610
+ jQuery__default["default"].fn.validate = function () {
610
611
  this.filter(ClientSideValidations.selectors.forms).each(function () {
611
- return $__default['default'](this).enableClientSideValidations();
612
+ jQuery__default["default"](this).enableClientSideValidations();
612
613
  });
613
614
  return this;
614
615
  };
615
616
 
616
- $__default['default'].fn.isValid = function (validators) {
617
- var obj = $__default['default'](this[0]);
617
+ jQuery__default["default"].fn.isValid = function (validators) {
618
+ var obj = jQuery__default["default"](this[0]);
618
619
 
619
620
  if (obj.is('form')) {
620
621
  return validateForm(obj, validators);
@@ -625,7 +626,7 @@
625
626
 
626
627
  var cleanNestedElementName = function cleanNestedElementName(elementName, nestedMatches, validators) {
627
628
  for (var validatorName in validators) {
628
- if (validatorName.match('\\[' + nestedMatches[1] + '\\].*\\[\\]\\[' + nestedMatches[2] + '\\]$')) {
629
+ if (validatorName.match("\\[".concat(nestedMatches[1], "\\].*\\[\\]\\[").concat(nestedMatches[2], "\\]$"))) {
629
630
  elementName = elementName.replace(/\[[\da-z_]+\]\[(\w+)\]$/g, '[][$1]');
630
631
  }
631
632
  }
@@ -652,11 +653,11 @@
652
653
  return validators[cleanElementName(elementName, validators)] || {};
653
654
  };
654
655
 
655
- var validateForm = function validateForm(form, validators) {
656
+ var validateForm = function validateForm($form, validators) {
656
657
  var valid = true;
657
- form.trigger('form:validate:before.ClientSideValidations');
658
- form.find(ClientSideValidations.selectors.validate_inputs).each(function () {
659
- if (!$__default['default'](this).isValid(validators)) {
658
+ $form.trigger('form:validate:before.ClientSideValidations');
659
+ $form.find(ClientSideValidations.selectors.validate_inputs).each(function () {
660
+ if (!jQuery__default["default"](this).isValid(validators)) {
660
661
  valid = false;
661
662
  }
662
663
 
@@ -664,37 +665,37 @@
664
665
  });
665
666
 
666
667
  if (valid) {
667
- form.trigger('form:validate:pass.ClientSideValidations');
668
+ $form.trigger('form:validate:pass.ClientSideValidations');
668
669
  } else {
669
- form.trigger('form:validate:fail.ClientSideValidations');
670
+ $form.trigger('form:validate:fail.ClientSideValidations');
670
671
  }
671
672
 
672
- form.trigger('form:validate:after.ClientSideValidations');
673
+ $form.trigger('form:validate:after.ClientSideValidations');
673
674
  return valid;
674
675
  };
675
676
 
676
- var passElement = function passElement(element) {
677
- element.trigger('element:validate:pass.ClientSideValidations').data('valid', null);
677
+ var passElement = function passElement($element) {
678
+ $element.trigger('element:validate:pass.ClientSideValidations').data('valid', null);
678
679
  };
679
680
 
680
- var failElement = function failElement(element, message) {
681
- element.trigger('element:validate:fail.ClientSideValidations', message).data('valid', false);
681
+ var failElement = function failElement($element, message) {
682
+ $element.trigger('element:validate:fail.ClientSideValidations', message).data('valid', false);
682
683
  };
683
684
 
684
- var afterValidate = function afterValidate(element) {
685
- return element.trigger('element:validate:after.ClientSideValidations').data('valid') !== false;
685
+ var afterValidate = function afterValidate($element) {
686
+ return $element.trigger('element:validate:after.ClientSideValidations').data('valid') !== false;
686
687
  };
687
688
 
688
- var executeValidator = function executeValidator(validatorFunctions, validatorFunction, validatorOptions, element) {
689
+ var executeValidator = function executeValidator(validatorFunctions, validatorFunction, validatorOptions, $element) {
689
690
  for (var validatorOption in validatorOptions) {
690
691
  if (!validatorOptions[validatorOption]) {
691
692
  continue;
692
693
  }
693
694
 
694
- var message = validatorFunction.call(validatorFunctions, element, validatorOptions[validatorOption]);
695
+ var message = validatorFunction.call(validatorFunctions, $element, validatorOptions[validatorOption]);
695
696
 
696
697
  if (message) {
697
- failElement(element, message);
698
+ failElement($element, message);
698
699
  return false;
699
700
  }
700
701
  }
@@ -702,13 +703,13 @@
702
703
  return true;
703
704
  };
704
705
 
705
- var executeValidators = function executeValidators(validatorFunctions, element, validators) {
706
+ var executeValidators = function executeValidators(validatorFunctions, $element, validators) {
706
707
  for (var validator in validators) {
707
708
  if (!validatorFunctions[validator]) {
708
709
  continue;
709
710
  }
710
711
 
711
- if (!executeValidator(validatorFunctions, validatorFunctions[validator], validators[validator], element)) {
712
+ if (!executeValidator(validatorFunctions, validatorFunctions[validator], validators[validator], $element)) {
712
713
  return false;
713
714
  }
714
715
  }
@@ -716,11 +717,11 @@
716
717
  return true;
717
718
  };
718
719
 
719
- var isMarkedForDestroy = function isMarkedForDestroy(element) {
720
- if (element.attr('name').search(/\[([^\]]*?)\]$/) >= 0) {
721
- var destroyInputName = element.attr('name').replace(/\[([^\]]*?)\]$/, '[_destroy]');
720
+ var isMarkedForDestroy = function isMarkedForDestroy($element) {
721
+ if ($element.attr('name').search(/\[([^\]]*?)\]$/) >= 0) {
722
+ var destroyInputName = $element.attr('name').replace(/\[([^\]]*?)\]$/, '[_destroy]');
722
723
 
723
- if ($__default['default']("input[name='" + destroyInputName + "']").val() === '1') {
724
+ if (jQuery__default["default"]("input[name=\"".concat(destroyInputName, "\"]")).val() === '1') {
724
725
  return true;
725
726
  }
726
727
  }
@@ -728,28 +729,28 @@
728
729
  return false;
729
730
  };
730
731
 
731
- var executeAllValidators = function executeAllValidators(element, validators) {
732
- if (element.data('changed') === false || element.prop('disabled')) {
732
+ var executeAllValidators = function executeAllValidators($element, validators) {
733
+ if ($element.data('changed') === false || $element.prop('disabled')) {
733
734
  return;
734
735
  }
735
736
 
736
- element.data('changed', false);
737
+ $element.data('changed', false);
737
738
 
738
- if (executeValidators(ClientSideValidations.validators.all(), element, validators)) {
739
- passElement(element);
739
+ if (executeValidators(ClientSideValidations.validators.all(), $element, validators)) {
740
+ passElement($element);
740
741
  }
741
742
  };
742
743
 
743
- var validateElement = function validateElement(element, validators) {
744
- element.trigger('element:validate:before.ClientSideValidations');
744
+ var validateElement = function validateElement($element, validators) {
745
+ $element.trigger('element:validate:before.ClientSideValidations');
745
746
 
746
- if (isMarkedForDestroy(element)) {
747
- passElement(element);
747
+ if (isMarkedForDestroy($element)) {
748
+ passElement($element);
748
749
  } else {
749
- executeAllValidators(element, validators);
750
+ executeAllValidators($element, validators);
750
751
  }
751
752
 
752
- return afterValidate(element);
753
+ return afterValidate($element);
753
754
  };
754
755
 
755
756
  if (!window.ClientSideValidations) {
@@ -770,4 +771,4 @@
770
771
 
771
772
  return ClientSideValidations;
772
773
 
773
- })));
774
+ }));
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: client_side_validations
3
3
  version: !ruby/object:Gem::Version
4
- version: 18.1.0
4
+ version: 19.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geremia Taglialatela
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-06-13 00:00:00.000000000 Z
12
+ date: 2021-10-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -17,7 +17,7 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 5.0.0.1
20
+ version: '5.2'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
23
  version: '7.0'
@@ -27,7 +27,7 @@ dependencies:
27
27
  requirements:
28
28
  - - ">="
29
29
  - !ruby/object:Gem::Version
30
- version: 5.0.0.1
30
+ version: '5.2'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '7.0'
@@ -73,26 +73,6 @@ dependencies:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '11.1'
76
- - !ruby/object:Gem::Dependency
77
- name: coveralls_reborn
78
- requirement: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0.21'
83
- - - "<"
84
- - !ruby/object:Gem::Version
85
- version: '0.23'
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- version: '0.21'
93
- - - "<"
94
- - !ruby/object:Gem::Version
95
- version: '0.23'
96
76
  - !ruby/object:Gem::Dependency
97
77
  name: m
98
78
  requirement: !ruby/object:Gem::Requirement
@@ -127,14 +107,14 @@ dependencies:
127
107
  requirements:
128
108
  - - "~>"
129
109
  - !ruby/object:Gem::Version
130
- version: '1.12'
110
+ version: '1.13'
131
111
  type: :development
132
112
  prerelease: false
133
113
  version_requirements: !ruby/object:Gem::Requirement
134
114
  requirements:
135
115
  - - "~>"
136
116
  - !ruby/object:Gem::Version
137
- version: '1.12'
117
+ version: '1.13'
138
118
  - !ruby/object:Gem::Dependency
139
119
  name: rake
140
120
  requirement: !ruby/object:Gem::Requirement
@@ -169,6 +149,20 @@ dependencies:
169
149
  - - "<"
170
150
  - !ruby/object:Gem::Version
171
151
  version: '0.22'
152
+ - !ruby/object:Gem::Dependency
153
+ name: simplecov-lcov
154
+ requirement: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - "~>"
157
+ - !ruby/object:Gem::Version
158
+ version: 0.8.0
159
+ type: :development
160
+ prerelease: false
161
+ version_requirements: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - "~>"
164
+ - !ruby/object:Gem::Version
165
+ version: 0.8.0
172
166
  - !ruby/object:Gem::Dependency
173
167
  name: sqlite3
174
168
  requirement: !ruby/object:Gem::Requirement
@@ -282,7 +276,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
282
276
  requirements:
283
277
  - - ">="
284
278
  - !ruby/object:Gem::Version
285
- version: '2.4'
279
+ version: '2.5'
286
280
  required_rubygems_version: !ruby/object:Gem::Requirement
287
281
  requirements:
288
282
  - - ">="