guardsjs-rails 1.4.2 → 1.5.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: dc2348983238ae6b8ea63aed9f0a0fb57ffe6c69
4
- data.tar.gz: 2c7fc38a40a9f2bda81572b05184ad13b2e3954d
3
+ metadata.gz: 8b7cd3781971dda62987c9bac7706fddb481a526
4
+ data.tar.gz: b36add19563e88ca973b009f992ebbd7c09b15de
5
5
  SHA512:
6
- metadata.gz: 42f99bc0262db77bc545fe39d57c065d18c510702ee2d092b6365554d44b9335c811a22902eef8f88ba4371c71248af0315ac3be9985b7693b78e687cd682cd6
7
- data.tar.gz: 3a34db039739705c71b727bd2a40eef5bc2c120bd28279512abde936769afd6e2f571af8ec7b6ed414492831e4864de1acb676b53e573f3703846b927c357f45
6
+ metadata.gz: 282ecf6277d3b2679d27e545973828b47c041e332aaba649d4904550445dbb687730ff7eaeacb99f4fba1b1842432647ae6bfcd59f360ca1d6d39e8087845618
7
+ data.tar.gz: 7b4e7ee943ba2782919c939a19685fd34202313e0b7e1ffcbd964a0276622161c4a5ce01a6ae150be63ac1f87f715b78c997273ec72240be15ca9723ae65f781
@@ -1,14 +1,14 @@
1
1
  /*!
2
- * Guards JavaScript jQuery Plugin v1.4.2
2
+ * Guards JavaScript jQuery Plugin v1.5.0
3
3
  * https://github.com/on-site/guards.js
4
4
  *
5
- * Copyright 2010-2014, On-Site.com, http://www.on-site.com/
5
+ * Copyright 2010-2015, On-Site.com, http://www.on-site.com/
6
6
  * Licensed under the MIT license.
7
7
  *
8
8
  * Includes code for email and phone number validation from the jQuery
9
9
  * Validation plugin. http://docs.jquery.com/Plugins/Validation
10
10
  *
11
- * Date: Fri Nov 14 01:44:15 2014 -0800
11
+ * Date: Tue Jan 13 14:24:09 2015 -0800
12
12
  */
13
13
 
14
14
  /**
@@ -48,7 +48,7 @@
48
48
  return $.guards.add(selector);
49
49
  };
50
50
 
51
- $.guard.version = "1.4.2";
51
+ $.guard.version = "1.5.0";
52
52
 
53
53
  $.Guards = function() {
54
54
  var self = this;
@@ -745,7 +745,7 @@
745
745
  * This version of guards.js library as a string, like <code>"1.0.0"</code>.
746
746
  * </p>
747
747
  */
748
- $.Guards.prototype.version = "1.4.2";
748
+ $.Guards.prototype.version = "1.5.0";
749
749
 
750
750
  $.Guards.prototype.parentContext = function(element) {
751
751
  var $element = $(element);
@@ -2002,7 +2002,7 @@
2002
2002
  };
2003
2003
 
2004
2004
  $.Guard.prototype.attachError = function(elements, errorElement) {
2005
- var target = this.getTarget();
2005
+ var target = this.getTarget(elements);
2006
2006
 
2007
2007
  if (target && $.isFunction(target)) {
2008
2008
  var result = target.call(elements, errorElement);
@@ -2017,7 +2017,13 @@
2017
2017
  }
2018
2018
  };
2019
2019
 
2020
- $.Guard.prototype.getTarget = function() {
2020
+ $.Guard.prototype.getTarget = function(elements) {
2021
+ var dataTarget = this.getGuardDataArguments(elements, "target", true);
2022
+
2023
+ if (dataTarget !== null) {
2024
+ return dataTarget;
2025
+ }
2026
+
2021
2027
  if (this._target === undefined) {
2022
2028
  return this._guards.defaults.target;
2023
2029
  }
@@ -1,5 +1,5 @@
1
1
  module GuardsJS
2
2
  module Rails
3
- VERSION = "1.4.2"
3
+ VERSION = "1.5.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guardsjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Virata-Stone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-14 00:00:00.000000000 Z
11
+ date: 2015-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  version: '0'
62
62
  requirements: []
63
63
  rubyforge_project:
64
- rubygems_version: 2.2.2
64
+ rubygems_version: 2.4.4
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: Rails asset gem for guards.js.