evelpidon_validators 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZDJkOGExZGYwMWY5MDM4OTc4YTlkMDc1M2JkZTk3Yzc1OTM0NjZhOA==
5
- data.tar.gz: !binary |-
6
- YTJhOTViZmZjMzRmNGZhNWFmOWNjNDQ2Njg4YmM0MjFjNjA5Nzc2Mg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NzZiOTMzMzc2N2Q5ODcyMGUzOTlmNTg4MmQzZjNkY2ExMjc4NGU3YjBhYTEx
10
- MTk1Y2ViZTY4NTdlZTcwYmU1YTUzMTEwMGQ1YzBhMWUyMmFkNThiNzc4NGJm
11
- NzYwNzcyMzVmYzk3YzczNTNhNjZkOGRiZTFhZTFiMzRjYTA3NmY=
12
- data.tar.gz: !binary |-
13
- YzVlZGM3ZmUyMzFmNjlmZWUwZTU5ZWNmZWNhOGIwOWVjZTE5N2E5ODk0Mzhh
14
- YTY1NTBjMGU5YzIyYzE3NDZlZjY0NmUxM2I1ZWQ3NTUwMGMwYzEwNzY0MzUz
15
- ZjY2MzQyMGU1ZDg1N2QzMWI1NzQ4YzhmNWFiZjM2OGRhODk4NDI=
2
+ SHA1:
3
+ metadata.gz: 6db01856065c3e2b996d644e972f17db9bf8ac84
4
+ data.tar.gz: 314853198564ef776815e046debc8245e23c0b83
5
+ SHA512:
6
+ metadata.gz: f5bfe9d47e11eefdd5299f37bed70513782b65d55d0077b4e0e16ac5f73a15cfc3f93c829d31e26bdaef6cc03970df7731b1f5eda482d49335aabe81c84adc8c
7
+ data.tar.gz: fc585dce5401144705d2290f9aea86a5e15aee1b20943997ebfd9f59d85d765d62479bad52d1a952da0bee1412722db56a2b2cb2b3a175b0a2f0068424631b6c
@@ -1,5 +1,9 @@
1
1
  # Evelpidon Validators changelog
2
2
 
3
+ ## 0.6.0 - 06/09/2013
4
+
5
+ * Minor changes to make gem compatible to Ruby 2.0.0 (and Rails 3.2 and Client Side Validations 3.2)
6
+
3
7
  ## 0.5.1 / 2013-08-29
4
8
 
5
9
  * CreditCardValidator with `:luhn_only` true accepts nil values.
@@ -1,9 +1,9 @@
1
1
  //= require_self
2
2
  //= require_tree ./evelpidon_validators
3
3
 
4
- clientSideValidations.helpers = clientSideValidations.helpers || {};
4
+ ClientSideValidations.helpers = ClientSideValidations.helpers || {};
5
5
 
6
- clientSideValidations.helpers.getSiblingField = function(field, siblingName) {
6
+ ClientSideValidations.helpers.getSiblingField = function(field, siblingName) {
7
7
  var thanName = field.attr('name').replace(/\[[^\]]*\]$/, '[' + siblingName + ']');
8
8
  return field.parents('form').find("[name='" + thanName + "']");
9
9
  };
@@ -1,4 +1,4 @@
1
- clientSideValidations.helpers = clientSideValidations.helpers || {};
1
+ ClientSideValidations.helpers = ClientSideValidations.helpers || {};
2
2
 
3
3
  /**
4
4
  * Variant of Avraham Plotnitzky's String.prototype method mixed with the "fast" version
@@ -9,7 +9,7 @@ clientSideValidations.helpers = clientSideValidations.helpers || {};
9
9
  * @param luhn {Integer}
10
10
  * @returns {boolean}
11
11
  */
12
- clientSideValidations.helpers.luhnChk = function(luhn) {
12
+ ClientSideValidations.helpers.luhnChk = function(luhn) {
13
13
  var len = luhn.length,
14
14
  mul = 0,
15
15
  prodArr = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [0, 2, 4, 6, 8, 1, 3, 5, 7, 9]],
@@ -23,15 +23,15 @@ clientSideValidations.helpers.luhnChk = function(luhn) {
23
23
  return sum % 10 === 0 && sum > 0;
24
24
  };
25
25
 
26
- clientSideValidations.validators.remote['credit_card'] = function(element, options) {
26
+ ClientSideValidations.validators.remote['credit_card'] = function(element, options) {
27
27
  if (options.luhn_only) {
28
- if (clientSideValidations.helpers.luhnChk(element.val()) == false) {
28
+ if (ClientSideValidations.helpers.luhnChk(element.val()) == false) {
29
29
  return options.message;
30
30
  }
31
31
  } else {
32
32
  if ($.ajax({
33
33
  url: '/validators/credit_card.json',
34
- data: { value: element.val(), type: clientSideValidations.helpers.getSiblingField(element, options.type_attribute).val()},
34
+ data: { value: element.val(), type: ClientSideValidations.helpers.getSiblingField(element, options.type_attribute).val()},
35
35
  async: false
36
36
  }).status == 404) { return options.message; }
37
37
  }
@@ -1,7 +1,7 @@
1
- clientSideValidations.validators.remote['different'] = function(element, options) {
1
+ ClientSideValidations.validators.remote['different'] = function(element, options) {
2
2
  if ($.ajax({
3
- url: '/validators/different.json',
4
- data: { value: element.val(), than: clientSideValidations.helpers.getSiblingField(element, options.than).val() },
3
+ url: '/validators/different',
4
+ data: { value: element.val(), than: ClientSideValidations.helpers.getSiblingField(element, options.than).val() },
5
5
  async: false
6
6
  }).status == 404) { return options.message; }
7
7
  };
@@ -1,7 +1,7 @@
1
- clientSideValidations.validators.remote['greater'] = function(element, options) {
1
+ ClientSideValidations.validators.remote['greater'] = function(element, options) {
2
2
  if ($.ajax({
3
- url: '/validators/greater.json',
4
- data: { value: element.val(), than: clientSideValidations.helpers.getSiblingField(element, options.than).val() },
3
+ url: '/validators/greater',
4
+ data: { value: element.val(), than: ClientSideValidations.helpers.getSiblingField(element, options.than).val() },
5
5
  async: false
6
6
  }).status == 404) { return options.message; }
7
7
  };
@@ -1,7 +1,7 @@
1
- clientSideValidations.validators.remote['less'] = function(element, options) {
1
+ ClientSideValidations.validators.remote['less'] = function(element, options) {
2
2
  if ($.ajax({
3
- url: '/validators/less.json',
4
- data: { value: element.val(), than: clientSideValidations.helpers.getSiblingField(element, options.than).val() },
3
+ url: '/validators/less',
4
+ data: { value: element.val(), than: ClientSideValidations.helpers.getSiblingField(element, options.than).val() },
5
5
  async: false
6
6
  }).status == 404) { return options.message; }
7
7
  };
@@ -1,3 +1,3 @@
1
1
  module EvelpidonValidators
2
- VERSION = "0.5.1"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evelpidon_validators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikos Dimitrakopoulos
@@ -9,90 +9,90 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-29 00:00:00.000000000 Z
12
+ date: 2013-09-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ! '>='
18
+ - - '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ! '>='
25
+ - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: activesupport
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ! '>='
32
+ - - '>='
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ! '>='
39
+ - - '>='
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: evelpidon_test_helpers
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ! '>='
46
+ - - '>='
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ! '>='
53
+ - - '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: test-unit
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ! '>='
60
+ - - '>='
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ! '>='
67
+ - - '>='
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: activemodel
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ! '>='
74
+ - - '>='
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ! '>='
81
+ - - '>='
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: credit_card_validator
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ! '>='
88
+ - - '>='
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ! '>='
95
+ - - '>='
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  description: Useful ActiveModel validators with ClientSideValidations support.
@@ -139,17 +139,17 @@ require_paths:
139
139
  - lib
140
140
  required_ruby_version: !ruby/object:Gem::Requirement
141
141
  requirements:
142
- - - ! '>='
142
+ - - '>='
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  requirements:
147
- - - ! '>='
147
+ - - '>='
148
148
  - !ruby/object:Gem::Version
149
149
  version: '0'
150
150
  requirements: []
151
151
  rubyforge_project: evelpidon_validators
152
- rubygems_version: 2.0.3
152
+ rubygems_version: 2.0.6
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Useful ActiveModel validators