judge 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/judge.js +6 -3
- data/lib/judge/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcf1e3ed1bb5500b69d1cc9e5074e56f43e86a46
|
4
|
+
data.tar.gz: 9536e4c10547ccf7abbcb7dd6e83699096f7c282
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 208177747be57442d0ff59bf79b86ceda1a675c40ae2d28f9b883a40da6b7fd8f7281b746074138e3c9e885d47a78ec31b29f424bd971f3816527e9c9156b90f
|
7
|
+
data.tar.gz: b7893ca20ab01d91c325de6585642177af687a2065ca2931543f45a73459e8628063bfd535f77bbef8cd7916eb3673ba9abc9ebfaeacfa35c5aad8d99b387921
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// Judge 2.1.
|
1
|
+
// Judge 2.1.1
|
2
2
|
// (c) 2011-2013 Joe Corcoran
|
3
3
|
// http://raw.github.com/joecorcoran/judge/master/LICENSE.txt
|
4
4
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
var judge = root.judge = {},
|
15
15
|
_ = root._;
|
16
16
|
|
17
|
-
judge.VERSION = '2.1.
|
17
|
+
judge.VERSION = '2.1.1';
|
18
18
|
|
19
19
|
// Trying to be a bit more descriptive than the basic error types allow.
|
20
20
|
var DependencyError = function(message) {
|
@@ -273,7 +273,10 @@
|
|
273
273
|
is: { operator: '!=', message: 'wrong_length' }
|
274
274
|
};
|
275
275
|
_(types).each(function(properties, type) {
|
276
|
-
var
|
276
|
+
var length = this.length || this.value.length;
|
277
|
+
// Rails validations count new lines as two characters, we account for them here
|
278
|
+
length += (this.value.match(/\n/g) || []).length;
|
279
|
+
var invalid = operate(length, properties.operator, options[type]);
|
277
280
|
if (_(options).has(type) && invalid) {
|
278
281
|
msgs.push(messages[properties.message]);
|
279
282
|
}
|
data/lib/judge/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: judge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Corcoran
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|