judge 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- // Judge 2.0.0
1
+ // Judge 2.0.1
2
2
  // (c) 2011-2012 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.0.0';
17
+ judge.VERSION = '2.0.1';
18
18
 
19
19
  // Trying to be a bit more descriptive than the basic error types allow.
20
20
  var DependencyError = function(message) {
@@ -144,10 +144,10 @@
144
144
  params = {
145
145
  'klass' : classFromName(el.name),
146
146
  'attribute': attrFromName(el.name),
147
- 'value' : encodeURIComponent(el.value),
147
+ 'value' : el.value,
148
148
  'kind' : kind
149
149
  };
150
- return encodeURI(path + queryString(params));
150
+ return path + queryString(params);
151
151
  };
152
152
 
153
153
  // Convert an object literal into an encoded query string.
@@ -1,3 +1,5 @@
1
+ require 'uri'
2
+
1
3
  module Judge
2
4
  module Controller
3
5
 
@@ -19,9 +21,10 @@ module Judge
19
21
 
20
22
  def normalize_validation_params(params)
21
23
  params.keep_if { |key| %w{klass attribute value kind}.include?(key) }
22
- params[:klass] = find_klass(params[:klass])
24
+ params[:klass] = find_klass(params[:klass])
23
25
  params[:attribute] = params[:attribute].to_sym
24
- params[:kind] = params[:kind].to_sym
26
+ params[:value] = URI.decode(params[:value])
27
+ params[:kind] = params[:kind].to_sym
25
28
  params
26
29
  end
27
30
 
@@ -1,3 +1,3 @@
1
1
  module Judge
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: judge
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-27 00:00:00.000000000 Z
12
+ date: 2013-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails