client_side_validations-simple_form 3.2.1 → 3.2.2

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: 4a02b9a6238eb9859eb8a36f0ecadac5b19892db
4
- data.tar.gz: 4ba8df37145771a6322cd0aadd4fc0417cf0165b
3
+ metadata.gz: 15d5de403fbea1f44a667c0d9e8bc15197798180
4
+ data.tar.gz: 642483af14c2d7848caf5b374c31d8973ffb3b3c
5
5
  SHA512:
6
- metadata.gz: 86649469ddd45848c6c69331e2dd7a45e3570f80d45029ef6c794d968e36160dc15cdcc2df6cd836f6851f91911a222f1e11ab1616a05ce1785bd16f3b3eeb20
7
- data.tar.gz: 12c47e4eddfa9834ac8499a421bf7d43b170c5883202ccf784167cb768d40c3e4d7508773d1b295fe22a8b196f085cb332bff33555324b7b9c1740f21012a112
6
+ metadata.gz: a52b942f98eafbee79e43d80d30a9f26f1e5a3c4d23968188b9a18be116aa5ebcab11903589203162f86ca32c00d65572d81882fc65f14b3046aa5ab3b980a0e
7
+ data.tar.gz: 2d42c4afdad894d416a85ab97b8b2e0fecff780197a637ef4bfbc0ac43d837df5ae2d94a20b7df1dfa06f75968022943330ac9c73b8c8fda6c8bd2dfb450b66d
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![Build Status](https://secure.travis-ci.org/DavyJonesLocker/client_side_validations-simple_form.svg?branch=master)](https://travis-ci.org/DavyJonesLocker/client_side_validations-simple_form)
5
5
  [![Dependency Status](https://gemnasium.com/DavyJonesLocker/client_side_validations-simple_form.svg)](https://gemnasium.com/DavyJonesLocker/client_side_validations-simple_form)
6
6
  [![Code Climate](https://codeclimate.com/github/DavyJonesLocker/client_side_validations-simple_form/badges/gpa.svg)](https://codeclimate.com/github/DavyJonesLocker/client_side_validations-simple_form)
7
- [![Coverage Status](https://coveralls.io/repos/DavyJonesLocker/client_side_validations-simple_form/badge.svg?branch=master)](https://coveralls.io/r/DavyJonesLocker/client_side_validations-simple_form?branch=master)
7
+ [![Coverage Status](https://coveralls.io/repos/github/DavyJonesLocker/client_side_validations-simple_form/badge.svg?branch=master)](https://coveralls.io/github/DavyJonesLocker/client_side_validations-simple_form?branch=master)
8
8
 
9
9
  [SimpleForm](https://github.com/plataformatec/simple_form) plugin for [ClientSideValidations](https://github.com/DavyJonesLocker/client_side_validations)
10
10
 
@@ -47,10 +47,10 @@ defined)
47
47
 
48
48
  ## Usage ##
49
49
 
50
- The usage is the same as `ClientSideValidations`, just pass `:validate => true` to the form builder
50
+ The usage is the same as `ClientSideValidations`, just pass `validate: true` to the form builder
51
51
 
52
52
  ```ruby
53
- <%= simple_form_for @book, :validate => true do |book| %>
53
+ <%= simple_form_for @book, validate: true do |book| %>
54
54
  <%= book.input :name %>
55
55
  <% end %>
56
56
  ```
@@ -58,7 +58,7 @@ The usage is the same as `ClientSideValidations`, just pass `:validate => true`
58
58
  Per-input options are done with `:validate`
59
59
 
60
60
  ```ruby
61
- <%= book.input :name, :validate => { :presence => true, :uniqueness => false }
61
+ <%= book.input :name, validate: { presence: true, uniqueness: false } %>
62
62
  ```
63
63
 
64
64
  ## Authors ##
@@ -86,7 +86,7 @@ on how to properly submit issues and pull requests.
86
86
 
87
87
  ## Legal ##
88
88
 
89
- [DockYard](http://dockyard.com), LLC &copy; 2012-2015
89
+ [DockYard](http://dockyard.com), LLC &copy; 2012-2016
90
90
 
91
91
  [@dockyard](http://twitter.com/dockyard)
92
92
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module ClientSideValidations
3
3
  module SimpleForm
4
- VERSION = '3.2.1'.freeze
4
+ VERSION = '3.2.2'.freeze
5
5
  end
6
6
  end
@@ -1,7 +1,7 @@
1
1
 
2
2
  /*!
3
3
  * Client Side Validations - SimpleForm - v3.2.1 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
4
- * Copyright (c) 2016 Brian Cardarella
4
+ * Copyright (c) 2016 Geremia Taglialatela, Brian Cardarella
5
5
  * Licensed under MIT (http://opensource.org/licenses/mit-license.php)
6
6
  */
7
7
 
@@ -17,9 +17,9 @@
17
17
  "default": {
18
18
  add: function(element, settings, message) {
19
19
  var errorElement, wrapper;
20
- errorElement = element.parent().find(settings.error_tag + "." + settings.error_class);
21
- wrapper = element.closest(settings.wrapper_tag);
22
- if (errorElement[0] == null) {
20
+ wrapper = element.closest(settings.wrapper_tag + "." + (settings.wrapper_class.replace(/\ /g, '.')));
21
+ errorElement = wrapper.find(settings.error_tag + "." + settings.error_class);
22
+ if (!errorElement.length) {
23
23
  errorElement = $("<" + settings.error_tag + "/>", {
24
24
  "class": settings.error_class,
25
25
  text: message
@@ -31,44 +31,19 @@
31
31
  },
32
32
  remove: function(element, settings) {
33
33
  var errorElement, wrapper;
34
- wrapper = element.closest(settings.wrapper_tag + "." + settings.wrapper_error_class);
35
- wrapper.removeClass(settings.wrapper_error_class);
34
+ wrapper = element.closest(settings.wrapper_tag + "." + (settings.wrapper_class.replace(/\ /g, '.')) + "." + settings.wrapper_error_class);
36
35
  errorElement = wrapper.find(settings.error_tag + "." + settings.error_class);
37
- return errorElement.remove();
38
- }
39
- },
40
- bootstrap: {
41
- add: function(element, settings, message) {
42
- var errorElement, wrapperClassElement, wrapperTagElement;
43
- errorElement = element.parent().find(settings.error_tag + "." + settings.error_class);
44
- if (errorElement[0] == null) {
45
- wrapperTagElement = element.closest(settings.wrapper_tag);
46
- errorElement = $("<" + settings.error_tag + "/>", {
47
- "class": settings.error_class,
48
- text: message
49
- });
50
- wrapperTagElement.append(errorElement);
51
- }
52
- wrapperClassElement = element.closest("." + (settings.wrapper_class.replace(/\ /g, '.')));
53
- wrapperClassElement.addClass(settings.wrapper_error_class);
54
- return errorElement.text(message);
55
- },
56
- remove: function(element, settings) {
57
- var errorElement, wrapperClassElement, wrapperTagElement;
58
- wrapperClassElement = element.closest("." + (settings.wrapper_class.replace(/\ /g, '.')) + "." + settings.wrapper_error_class);
59
- wrapperClassElement.removeClass(settings.wrapper_error_class);
60
- wrapperTagElement = element.closest(settings.wrapper_tag);
61
- errorElement = wrapperTagElement.find(settings.error_tag + "." + settings.error_class);
36
+ wrapper.removeClass(settings.wrapper_error_class);
62
37
  return errorElement.remove();
63
38
  }
64
39
  }
65
40
  }
66
41
  };
67
42
 
68
- ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.vertical_form = ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.bootstrap;
43
+ ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.vertical_form = ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers["default"];
69
44
 
70
- ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.horizontal_form = ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.bootstrap;
45
+ ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.horizontal_form = ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers["default"];
71
46
 
72
- ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.inline_form = ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.bootstrap;
47
+ ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.inline_form = ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers["default"];
73
48
 
74
49
  }).call(this);
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: client_side_validations-simple_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.2
5
5
  platform: ruby
6
6
  authors:
7
+ - Geremia Taglialatela
7
8
  - Brian Cardarella
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2016-01-15 00:00:00.000000000 Z
12
+ date: 2016-02-29 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: client_side_validations
@@ -58,14 +59,14 @@ dependencies:
58
59
  requirements:
59
60
  - - "~>"
60
61
  - !ruby/object:Gem::Version
61
- version: 0.8.10
62
+ version: 0.8.12
62
63
  type: :development
63
64
  prerelease: false
64
65
  version_requirements: !ruby/object:Gem::Requirement
65
66
  requirements:
66
67
  - - "~>"
67
68
  - !ruby/object:Gem::Version
68
- version: 0.8.10
69
+ version: 0.8.12
69
70
  - !ruby/object:Gem::Dependency
70
71
  name: m
71
72
  requirement: !ruby/object:Gem::Requirement
@@ -120,28 +121,28 @@ dependencies:
120
121
  requirements:
121
122
  - - "~>"
122
123
  - !ruby/object:Gem::Version
123
- version: 0.36.0
124
+ version: 0.37.2
124
125
  type: :development
125
126
  prerelease: false
126
127
  version_requirements: !ruby/object:Gem::Requirement
127
128
  requirements:
128
129
  - - "~>"
129
130
  - !ruby/object:Gem::Version
130
- version: 0.36.0
131
+ version: 0.37.2
131
132
  - !ruby/object:Gem::Dependency
132
133
  name: simplecov
133
134
  requirement: !ruby/object:Gem::Requirement
134
135
  requirements:
135
136
  - - "~>"
136
137
  - !ruby/object:Gem::Version
137
- version: 0.11.1
138
+ version: 0.11.2
138
139
  type: :development
139
140
  prerelease: false
140
141
  version_requirements: !ruby/object:Gem::Requirement
141
142
  requirements:
142
143
  - - "~>"
143
144
  - !ruby/object:Gem::Version
144
- version: 0.11.1
145
+ version: 0.11.2
145
146
  - !ruby/object:Gem::Dependency
146
147
  name: byebug
147
148
  requirement: !ruby/object:Gem::Requirement
@@ -228,6 +229,7 @@ dependencies:
228
229
  version: '2.4'
229
230
  description: SimpleForm Plugin for ClientSideValidations
230
231
  email:
232
+ - tagliala.dev@gmail.com
231
233
  - bcardarella@gmail.com
232
234
  executables: []
233
235
  extensions: []
@@ -244,7 +246,10 @@ homepage: https://github.com/DavyJonesLocker/client_side_validations-simple_form
244
246
  licenses:
245
247
  - MIT
246
248
  metadata: {}
247
- post_install_message:
249
+ post_install_message: |-
250
+ *** POTENTIAL BREAKING CHANGE ***
251
+ If you are upgrading from client_side_validations-simple_form <= 3.2.1,
252
+ please take a look at https://goo.gl/j70wIR
248
253
  rdoc_options: []
249
254
  require_paths:
250
255
  - lib