client_side_validations 9.0.1 → 9.1.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
  SHA1:
3
- metadata.gz: 6b15deec1fb17531b940c270d8cda8c3bcd5a3a8
4
- data.tar.gz: d2d7910b1e7242ee8215a2458dbd313d4d58b457
3
+ metadata.gz: 90df211b4f5892467d0353fe4de921dd9424cca3
4
+ data.tar.gz: 42dbbd51195d63ad7b9fb99015d197a298b9dae6
5
5
  SHA512:
6
- metadata.gz: f4c2ae59deedd8e82854986703ea5277df8fb9e4be7fc57ded193396cce0158bbef2374d4f945f53f4add5d72d66861dbf14085aedb9fe33f65e690a0443a3bf
7
- data.tar.gz: 07f71ec49d6148943f1a76e831105814354f2b342e7016bc57cae228edacdae1d423b7b6689ab877f51f30141870298c09166b5ff6cb3bd0dd6c34dcc9ccb74d
6
+ metadata.gz: 61fff69cc9fd41f3aae9e4840a4905ffa4dc558eda4076adfa52071b1733803edbd137fba8e5600d7117e73ff588848f186912183a3ea3965bcf19ee38fd2183
7
+ data.tar.gz: 3637f5796ec4ff194f03a3bb5b1282289beff41231dbf5a54fb6a8d8dc646feace8e22b1061330913ccc3ad4469c6df712edd7bf58b6077842f87bb01849122f
data/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Changelog
2
2
 
3
- ## 9.0.1.master / Unreleased
3
+ ## 9.1.0 / 2017-03-07
4
+
5
+ * [ENHANCEMENT] Rails 5.1 compatibility
6
+ * [ENHANCEMENT] Support deeply nested attributes ([#697](https://github.com/DavyJonesLocker/client_side_validations/pull/697))
4
7
 
5
8
  ## 9.0.1 / 2017-02-06
6
9
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ClientSideValidations
3
- VERSION = '9.0.1'.freeze
3
+ VERSION = '9.1.0'.freeze
4
4
  end
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*!
3
- * Client Side Validations - v9.0.1 (https://github.com/DavyJonesLocker/client_side_validations)
3
+ * Client Side Validations - v9.1.0 (https://github.com/DavyJonesLocker/client_side_validations)
4
4
  * Copyright (c) 2017 Geremia Taglialatela, Brian Cardarella
5
5
  * Licensed under MIT (http://opensource.org/licenses/mit-license.php)
6
6
  */
@@ -54,6 +54,10 @@
54
54
 
55
55
  validatorsFor = function(name, validators) {
56
56
  var captures, validator, validator_name;
57
+ if (validators.hasOwnProperty(name)) {
58
+ return validators[name];
59
+ }
60
+ name = name.replace(/\[(\w+_attributes)\]\[[\da-z_]+\](?=\[(?:\w+_attributes)\])/g, '[$1][]');
57
61
  if (captures = name.match(/\[(\w+_attributes)\].*\[(\w+)\]$/)) {
58
62
  for (validator_name in validators) {
59
63
  validator = validators[validator_name];
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: 9.0.1
4
+ version: 9.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geremia Taglialatela
@@ -9,28 +9,28 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-02-06 00:00:00.000000000 Z
12
+ date: 2017-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: 5.0.0
21
18
  - - ">="
22
19
  - !ruby/object:Gem::Version
23
20
  version: 5.0.0.1
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '5.2'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - "~>"
29
- - !ruby/object:Gem::Version
30
- version: 5.0.0
31
28
  - - ">="
32
29
  - !ruby/object:Gem::Version
33
30
  version: 5.0.0.1
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.2'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: jquery-rails
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -205,14 +205,14 @@ dependencies:
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: 2.0.0.beta2
208
+ version: 2.0.0.rc1
209
209
  type: :development
210
210
  prerelease: false
211
211
  version_requirements: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: 2.0.0.beta2
215
+ version: 2.0.0.rc1
216
216
  - !ruby/object:Gem::Dependency
217
217
  name: shotgun
218
218
  requirement: !ruby/object:Gem::Requirement