client_side_validations-simple_form 6.6.0 → 6.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f16a965a0b9e39fdf046cec75c8bbe35e192ee2cdab4a2da8289da67fad32959
4
- data.tar.gz: 2a897040c2fb847b855729182ad2b891e8343d8da8450ecce94686b093a0ddf0
3
+ metadata.gz: c535798603a3d70b324c7941578e1b0b00338c9ac581a2904cf7025817846cc0
4
+ data.tar.gz: d266fdf5ec344753016599bc8682ce266f1aa23d59add30032b20f619b400234
5
5
  SHA512:
6
- metadata.gz: 2761944e2691f04e36892c96de3ed96857e39f9ef01a422e1d63e3be2f4113eefb185ed36c6d76a103fb4d15ae7fd6e04055f5b447023608df84fa89410bccdc
7
- data.tar.gz: ab6eb7d7f121b1423770c71622d07f38b411204df2ca28b3547f92343dbc21e9266495697aad2ea0f5c0a83d8264071adf35587b2318e9e1dc29b2f618de2a48
6
+ metadata.gz: 637f20ba18279b6531dab4645b2742d009e1acd045fac2f2a5851176ef64d01b3c3ffcb0dfd21e617901bd105c0d312612d07303ac7d4bffe8b33cf55246f6c7
7
+ data.tar.gz: e8d38753ecd524755324859791fb3cce5bd66e23e70664ebe813f7493fdf658c91bdb29019b06bb0002247204e46482052f99f0919d4dcb5c736b4e63cb097a9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.7.0 / 2018-09-09
4
+
5
+ * [FEATURE] Add Bootstrap 4 support
6
+ * [ENHANCEMENT] Update QUnit to 2.6.2
7
+ * [ENHANCEMENT] Update development dependencies
8
+
3
9
  ## 6.6.0 / 2018-04-13
4
10
 
5
11
  * [FEATURE] Add Simple Form 4.0 compatibility
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/client_side_validations-simple_form.svg)](http://badge.fury.io/rb/client_side_validations-simple_form)
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
- [![Dependency Status](https://gemnasium.com/DavyJonesLocker/client_side_validations-simple_form.svg)](https://gemnasium.com/DavyJonesLocker/client_side_validations-simple_form)
6
5
  [![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
6
  [![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
7
 
@@ -23,10 +22,14 @@ required **before** `ClientSideValidations-SimpleForm`.
23
22
 
24
23
  [Follow the remaining installation instructions for ClientSideValidations](https://github.com/DavyJonesLocker/client_side_validations/blob/master/README.md)
25
24
 
26
- Add the following line to `app/assets/javascripts/application.js`
25
+ According to the web framework you are using, add **one** of the following lines to `app/assets/javascripts/application.js`
27
26
 
28
27
  ```javascript
28
+ // No framework / Generic frameworks / Bootstrap 3
29
29
  //= require rails.validations.simple_form
30
+
31
+ // Bootstrap 4
32
+ //= require rails.validations.simple_form.bootstrap4
30
33
  ```
31
34
 
32
35
  Again, order matters. You should add this line after the require for `rails.validations` as described in the `ClientSideValidations` installation instructions.
@@ -81,7 +84,7 @@ on how to properly submit issues and pull requests.
81
84
 
82
85
  ## Legal ##
83
86
 
84
- [DockYard](https://dockyard.com/), LLC © 2012-2017
87
+ [DockYard](https://dockyard.com/), LLC © 2012-2018
85
88
 
86
89
  [@dockyard](https://twitter.com/dockyard)
87
90
 
@@ -7,7 +7,11 @@ module ClientSideValidations
7
7
  [{
8
8
  path: File.expand_path('../../../vendor/assets/javascripts', __dir__),
9
9
  file: 'rails.validations.simple_form.js'
10
- }]
10
+ },
11
+ {
12
+ path: File.expand_path('../../../vendor/assets/javascripts', __dir__),
13
+ file: 'rails.validations.simple_form.bootstrap4.js'
14
+ }]
11
15
  end
12
16
 
13
17
  Generators.register_assets(self)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ClientSideValidations
4
4
  module SimpleForm
5
- VERSION = '6.6.0'.freeze
5
+ VERSION = '6.7.0'.freeze
6
6
  end
7
7
  end
@@ -0,0 +1,48 @@
1
+
2
+ /*!
3
+ * Client Side Validations - SimpleForm (Bootstrap 4) - v6.7.0 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
4
+ * Copyright (c) 2018 Geremia Taglialatela, Brian Cardarella
5
+ * Licensed under MIT (http://opensource.org/licenses/mit-license.php)
6
+ */
7
+
8
+ (function() {
9
+ ClientSideValidations.formBuilders['SimpleForm::FormBuilder'] = {
10
+ add: function(element, settings, message) {
11
+ return this.wrapper(settings.wrapper).add.call(this, element, settings, message);
12
+ },
13
+ remove: function(element, settings) {
14
+ return this.wrapper(settings.wrapper).remove.call(this, element, settings);
15
+ },
16
+ wrapper: function(name) {
17
+ return this.wrappers[name] || this.wrappers["default"];
18
+ },
19
+ wrappers: {
20
+ "default": {
21
+ add: function(element, settings, message) {
22
+ var errorElement, wrapperElement;
23
+ wrapperElement = element.parent();
24
+ errorElement = wrapperElement.find(settings.error_tag + ".invalid-feedback");
25
+ if (!errorElement.length) {
26
+ errorElement = $("<" + settings.error_tag + "/>", {
27
+ "class": 'invalid-feedback',
28
+ text: message
29
+ });
30
+ wrapperElement.append(errorElement);
31
+ }
32
+ wrapperElement.addClass(settings.wrapper_error_class);
33
+ element.addClass('is-invalid');
34
+ return errorElement.text(message);
35
+ },
36
+ remove: function(element, settings) {
37
+ var errorElement, wrapperElement;
38
+ wrapperElement = element.parent();
39
+ errorElement = wrapperElement.find(settings.error_tag + ".invalid-feedback");
40
+ wrapperElement.removeClass(settings.wrapper_error_class);
41
+ element.removeClass('is-invalid');
42
+ return errorElement.remove();
43
+ }
44
+ }
45
+ }
46
+ };
47
+
48
+ }).call(this);
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*!
3
- * Client Side Validations - SimpleForm - v6.6.0 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
3
+ * Client Side Validations - SimpleForm - v6.7.0 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
4
4
  * Copyright (c) 2018 Geremia Taglialatela, Brian Cardarella
5
5
  * Licensed under MIT (http://opensource.org/licenses/mit-license.php)
6
6
  */
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: client_side_validations-simple_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.6.0
4
+ version: 6.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geremia Taglialatela
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-04-13 00:00:00.000000000 Z
12
+ date: 2018-09-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: client_side_validations
@@ -85,14 +85,14 @@ dependencies:
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: 0.11.1
88
+ version: 0.12.0
89
89
  type: :development
90
90
  prerelease: false
91
91
  version_requirements: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 0.11.1
95
+ version: 0.12.0
96
96
  - !ruby/object:Gem::Dependency
97
97
  name: m
98
98
  requirement: !ruby/object:Gem::Requirement
@@ -127,14 +127,14 @@ dependencies:
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '1.5'
130
+ version: '1.7'
131
131
  type: :development
132
132
  prerelease: false
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: '1.5'
137
+ version: '1.7'
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: rake
140
140
  requirement: !ruby/object:Gem::Requirement
@@ -155,14 +155,14 @@ dependencies:
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: 0.54.0
158
+ version: 0.58.2
159
159
  type: :development
160
160
  prerelease: false
161
161
  version_requirements: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - "~>"
164
164
  - !ruby/object:Gem::Version
165
- version: 0.54.0
165
+ version: 0.58.2
166
166
  - !ruby/object:Gem::Dependency
167
167
  name: simplecov
168
168
  requirement: !ruby/object:Gem::Requirement
@@ -249,6 +249,7 @@ files:
249
249
  - lib/client_side_validations/simple_form/engine.rb
250
250
  - lib/client_side_validations/simple_form/form_builder.rb
251
251
  - lib/client_side_validations/simple_form/version.rb
252
+ - vendor/assets/javascripts/rails.validations.simple_form.bootstrap4.js
252
253
  - vendor/assets/javascripts/rails.validations.simple_form.js
253
254
  homepage: https://github.com/DavyJonesLocker/client_side_validations-simple_form
254
255
  licenses:
@@ -270,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
271
  version: '0'
271
272
  requirements: []
272
273
  rubyforge_project:
273
- rubygems_version: 2.7.6
274
+ rubygems_version: 2.7.7
274
275
  signing_key:
275
276
  specification_version: 4
276
277
  summary: ClientSideValidations SimpleForm