client_side_validations-simple_form 9.2.0 → 11.2.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
  SHA256:
3
- metadata.gz: f5d77668bc65187db5728dd50a1c8b3473522ffeecab8cc3fb97b97a97491723
4
- data.tar.gz: 934341d14784f9557db30ae8b1c3c3f3f094b298a4a2a0c92a6e1db4a8532bee
3
+ metadata.gz: a94f0bccb2a8db9bf69adc71777b1eb2f403ae5dc6a044bebdab4f3e0bb3e9e3
4
+ data.tar.gz: f46120015641294acd98dae3cede6c3cd52b68775b827c9308888b25169776e3
5
5
  SHA512:
6
- metadata.gz: 78389f0636baafb94b8cc4e00baccba4280d9b4607fa721ba71e378cb4bade9baa88a82cda310de3f09988b931c442ae90e229d51ff0c36431e8cd84b8b422d2
7
- data.tar.gz: 2002a1a074fe1badeae4d497bcc41260f2abdf2326ae680bdb209b822442e139615937466d41b2f9f304f4cc1bfef4be2cf0bf93aa328e2df65c7e3e5f8f6012
6
+ metadata.gz: 0b81c4304e80b755a702d1141f840ffb3a010176d2887eed3bd67ada79c1a52646aabc147c99ea5db66a13aa1d8bd12a839558f703bbbda6ecbadf46ab5664cf
7
+ data.tar.gz: 972e5cf285e09c9dcdb474f37f29d6f0567f9072e47f278471200aae1444e05615e7f6fe70cf04174df4ebd54d564d9c965b42ff1dbf2516ad146d047647aedc
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 11.2.0 / 2020-12-21
4
+
5
+ * [FEATURE] Allow Ruby 3.0.0 (really)
6
+ * [ENHANCEMENT] Replace Thin with Webrick
7
+ * [ENHANCEMENT] Update development dependencies
8
+
9
+ ## 11.1.0 / 2020-10-10
10
+
11
+ * [FEATURE] Allow Ruby 3.0.0
12
+ * [ENHANCEMENT] Test against latest Ruby 2.7.2
13
+ * [ENHANCEMENT] Update QUnit to 2.11.3
14
+ * [ENHANCEMENT] Update development dependencies
15
+
16
+ ## 11.0.0 / 2020-05-16
17
+
18
+ * [FEATURE] Drop Ruby 2.3 support
19
+ * [FEATURE] Add Client Side Validations 17.0 compatibility
20
+ * [ENHANCEMENT] Test against jQuery 3.5.1 by default
21
+
22
+ ## 10.1.0 / 2020-04-10
23
+
24
+ * [FEATURE] Add jQuery 3.5.0 compatibility ([#77](https://github.com/DavyJonesLocker/client_side_validations-simple_form/pull/77))
25
+ * [ENHANCEMENT] Test against latest Ruby versions
26
+ * [ENHANCEMENT] Update development dependencies
27
+
28
+ ## 10.0.0 / 2020-03-18
29
+
30
+ * [FEATURE] Fallback on `full_error` if `error` component is not found ([#75](https://github.com/DavyJonesLocker/client_side_validations-simple_form/issues/75))
31
+ * [FEATURE] Support multiple css classes in error element and input wrappers
32
+ * [ENHANCEMENT] Update development dependencies
33
+
3
34
  ## 9.2.0 / 2019-12-25
4
35
 
5
36
  * [FEATURE] Ruby 2.7 support
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019 Geremia Taglialatela, Brian Cardarella
3
+ Copyright (c) 2020 Geremia Taglialatela, Brian Cardarella
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/client_side_validations-simple_form.svg)](https://badge.fury.io/rb/client_side_validations-simple_form)
4
4
  [![npm version](https://badge.fury.io/js/%40client-side-validations%2Fsimple-form.svg)](https://badge.fury.io/js/%40client-side-validations%2Fsimple-form)
5
+ [![SemVer](https://api.dependabot.com/badges/compatibility_score?dependency-name=client_side_validations-simple_form&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=client_side_validations-simple_form&package-manager=bundler&version-scheme=semver)
5
6
  [![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)
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
+ [![Maintainability](https://api.codeclimate.com/v1/badges/b9e9cbbd0d9f454adba7/maintainability)](https://codeclimate.com/github/DavyJonesLocker/client_side_validations-simple_form/maintainability)
7
8
  [![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
9
 
9
10
  [Simple Form](https://github.com/plataformatec/simple_form) plugin for [ClientSideValidations](https://github.com/DavyJonesLocker/client_side_validations)
@@ -37,16 +38,22 @@ Add the following package:
37
38
  yarn add @client-side-validations/simple-form
38
39
  ```
39
40
 
40
- Then, according to the CSS framework you are using, add **one** of the following
41
- lines to your `app/javascript/packs/application.js` pack, **after**
42
- `import '@client-side-validations/client-side-validations'`:
41
+ Then, according to the CSS framework and module system you are using, add
42
+ **one** of the following lines to your `app/javascript/packs/application.js`
43
+ pack, **after** `'@client-side-validations/client-side-validations'`:
43
44
 
44
45
  ```js
45
- // No framework / Generic frameworks / Bootstrap 3
46
+ // No framework / Generic frameworks / Bootstrap 3 with `import` syntax
46
47
  import '@client-side-validations/simple-form'
47
48
 
48
- // Bootstrap 4
49
+ // Bootstrap 4 with `import` syntax
49
50
  import '@client-side-validations/simple-form/dist/simple-form.bootstrap4'
51
+
52
+ // No framework / Generic frameworks / Bootstrap 3 with `require` syntax
53
+ require('@client-side-validations/simple-form')
54
+
55
+ // Bootstrap 4 with `require` syntax
56
+ require('@client-side-validations/simple-form/dist/simple-form.bootstrap4')
50
57
  ```
51
58
 
52
59
  #### When using Sprockets ####
@@ -109,7 +116,7 @@ on how to properly submit issues and pull requests.
109
116
 
110
117
  ## Legal ##
111
118
 
112
- [DockYard](https://dockyard.com/), LLC © 2012-2019
119
+ [DockYard](https://dockyard.com/), LLC © 2012-2020
113
120
 
114
121
  [@dockyard](https://twitter.com/dockyard)
115
122
 
@@ -6,11 +6,11 @@ module ClientSideValidations
6
6
  def client_side_form_settings(options, _form_helper)
7
7
  {
8
8
  type: self.class.to_s,
9
- error_class: wrapper.find(:error).defaults[:class].first,
10
- error_tag: wrapper.find(:error).defaults[:tag],
9
+ error_class: wrapper_error_component.defaults[:class].join(' '),
10
+ error_tag: wrapper_error_component.defaults[:tag],
11
11
  wrapper_error_class: wrapper.defaults[:error_class],
12
12
  wrapper_tag: wrapper.defaults[:tag],
13
- wrapper_class: wrapper.defaults[:class].first,
13
+ wrapper_class: wrapper.defaults[:class].join(' '),
14
14
  wrapper: options[:wrapper] || ::SimpleForm.default_wrapper
15
15
  }
16
16
  end
@@ -24,6 +24,16 @@ module ClientSideValidations
24
24
 
25
25
  super(attribute_name, options, &block)
26
26
  end
27
+
28
+ private
29
+
30
+ def wrapper_error_component
31
+ if wrapper.components.map(&:namespace).include?(:error)
32
+ wrapper.find(:error)
33
+ else
34
+ wrapper.find(:full_error)
35
+ end
36
+ end
27
37
  end
28
38
  end
29
39
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ClientSideValidations
4
4
  module SimpleForm
5
- VERSION = '9.2.0'
5
+ VERSION = '11.2.0'
6
6
  end
7
7
  end
@@ -1,19 +1,21 @@
1
1
  /*!
2
- * Client Side Validations Simple Form JS (Bootstrap 4) - v0.1.1 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
3
- * Copyright (c) 2019 Geremia Taglialatela, Brian Cardarella
2
+ * Client Side Validations Simple Form JS (Bootstrap 4) - v0.1.3 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
3
+ * Copyright (c) 2020 Geremia Taglialatela, Brian Cardarella
4
4
  * Licensed under MIT (https://opensource.org/licenses/mit-license.php)
5
5
  */
6
6
 
7
7
  (function (global, factory) {
8
8
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('@client-side-validations/client-side-validations')) :
9
9
  typeof define === 'function' && define.amd ? define(['jquery', '@client-side-validations/client-side-validations'], factory) :
10
- (global = global || self, factory(global.$, global.ClientSideValidations));
10
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.$, global.ClientSideValidations));
11
11
  }(this, (function ($, ClientSideValidations) { 'use strict';
12
12
 
13
- $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
14
- ClientSideValidations = ClientSideValidations && ClientSideValidations.hasOwnProperty('default') ? ClientSideValidations['default'] : ClientSideValidations;
13
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
14
 
16
- ClientSideValidations.formBuilders['SimpleForm::FormBuilder'] = {
15
+ var $__default = /*#__PURE__*/_interopDefaultLegacy($);
16
+ var ClientSideValidations__default = /*#__PURE__*/_interopDefaultLegacy(ClientSideValidations);
17
+
18
+ ClientSideValidations__default['default'].formBuilders['SimpleForm::FormBuilder'] = {
17
19
  add: function add(element, settings, message) {
18
20
  this.wrapper(settings.wrapper).add.call(this, element, settings, message);
19
21
  },
@@ -30,7 +32,7 @@
30
32
  var errorElement = wrapperElement.find(settings.error_tag + '.invalid-feedback');
31
33
 
32
34
  if (!errorElement.length) {
33
- errorElement = $('<' + settings.error_tag + '/>', {
35
+ errorElement = $__default['default']('<' + settings.error_tag + '>', {
34
36
  "class": 'invalid-feedback',
35
37
  text: message
36
38
  });
@@ -1,19 +1,21 @@
1
1
  /*!
2
- * Client Side Validations Simple Form JS (Default) - v0.1.1 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
3
- * Copyright (c) 2019 Geremia Taglialatela, Brian Cardarella
2
+ * Client Side Validations Simple Form JS (Default) - v0.1.3 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
3
+ * Copyright (c) 2020 Geremia Taglialatela, Brian Cardarella
4
4
  * Licensed under MIT (https://opensource.org/licenses/mit-license.php)
5
5
  */
6
6
 
7
7
  (function (global, factory) {
8
8
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery'), require('@client-side-validations/client-side-validations')) :
9
9
  typeof define === 'function' && define.amd ? define(['jquery', '@client-side-validations/client-side-validations'], factory) :
10
- (global = global || self, factory(global.$, global.ClientSideValidations));
10
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.$, global.ClientSideValidations));
11
11
  }(this, (function ($, ClientSideValidations) { 'use strict';
12
12
 
13
- $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
14
- ClientSideValidations = ClientSideValidations && ClientSideValidations.hasOwnProperty('default') ? ClientSideValidations['default'] : ClientSideValidations;
13
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
14
 
16
- ClientSideValidations.formBuilders['SimpleForm::FormBuilder'] = {
15
+ var $__default = /*#__PURE__*/_interopDefaultLegacy($);
16
+ var ClientSideValidations__default = /*#__PURE__*/_interopDefaultLegacy(ClientSideValidations);
17
+
18
+ ClientSideValidations__default['default'].formBuilders['SimpleForm::FormBuilder'] = {
17
19
  add: function add(element, settings, message) {
18
20
  this.wrapper(settings.wrapper).add.call(this, element, settings, message);
19
21
  },
@@ -30,7 +32,7 @@
30
32
  var errorElement = wrapper.find(settings.error_tag + '.' + settings.error_class.replace(/ /g, '.'));
31
33
 
32
34
  if (!errorElement.length) {
33
- errorElement = $('<' + settings.error_tag + '/>', {
35
+ errorElement = $__default['default']('<' + settings.error_tag + '>', {
34
36
  "class": settings.error_class,
35
37
  text: message
36
38
  });
metadata CHANGED
@@ -1,15 +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: 9.2.0
4
+ version: 11.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geremia Taglialatela
8
8
  - Brian Cardarella
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-12-25 00:00:00.000000000 Z
12
+ date: 2020-12-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: client_side_validations
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: '15.0'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '17.0'
23
+ version: '18.0'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: '15.0'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '17.0'
33
+ version: '18.0'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: simple_form
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -51,48 +51,42 @@ dependencies:
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.2'
54
+ version: '2.3'
55
55
  type: :development
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.2'
61
+ version: '2.3'
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: byebug
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '10'
69
- - - "<"
66
+ - - "~>"
70
67
  - !ruby/object:Gem::Version
71
- version: '12'
68
+ version: '11.1'
72
69
  type: :development
73
70
  prerelease: false
74
71
  version_requirements: !ruby/object:Gem::Requirement
75
72
  requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- version: '10'
79
- - - "<"
73
+ - - "~>"
80
74
  - !ruby/object:Gem::Version
81
- version: '12'
75
+ version: '11.1'
82
76
  - !ruby/object:Gem::Dependency
83
77
  name: coveralls_reborn
84
78
  requirement: !ruby/object:Gem::Requirement
85
79
  requirements:
86
80
  - - "~>"
87
81
  - !ruby/object:Gem::Version
88
- version: 0.14.0
82
+ version: 0.19.0
89
83
  type: :development
90
84
  prerelease: false
91
85
  version_requirements: !ruby/object:Gem::Requirement
92
86
  requirements:
93
87
  - - "~>"
94
88
  - !ruby/object:Gem::Version
95
- version: 0.14.0
89
+ version: 0.19.0
96
90
  - !ruby/object:Gem::Dependency
97
91
  name: m
98
92
  requirement: !ruby/object:Gem::Requirement
@@ -113,14 +107,14 @@ dependencies:
113
107
  requirements:
114
108
  - - "~>"
115
109
  - !ruby/object:Gem::Version
116
- version: '5.13'
110
+ version: '5.14'
117
111
  type: :development
118
112
  prerelease: false
119
113
  version_requirements: !ruby/object:Gem::Requirement
120
114
  requirements:
121
115
  - - "~>"
122
116
  - !ruby/object:Gem::Version
123
- version: '5.13'
117
+ version: '5.14'
124
118
  - !ruby/object:Gem::Dependency
125
119
  name: mocha
126
120
  requirement: !ruby/object:Gem::Requirement
@@ -155,56 +149,90 @@ dependencies:
155
149
  requirements:
156
150
  - - "~>"
157
151
  - !ruby/object:Gem::Version
158
- version: 0.78.0
152
+ version: '1.6'
153
+ type: :development
154
+ prerelease: false
155
+ version_requirements: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '1.6'
160
+ - !ruby/object:Gem::Dependency
161
+ name: rubocop-minitest
162
+ requirement: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 0.10.1
159
167
  type: :development
160
168
  prerelease: false
161
169
  version_requirements: !ruby/object:Gem::Requirement
162
170
  requirements:
163
171
  - - "~>"
164
172
  - !ruby/object:Gem::Version
165
- version: 0.78.0
173
+ version: 0.10.1
166
174
  - !ruby/object:Gem::Dependency
167
175
  name: rubocop-performance
168
176
  requirement: !ruby/object:Gem::Requirement
169
177
  requirements:
170
178
  - - "~>"
171
179
  - !ruby/object:Gem::Version
172
- version: '1.5'
180
+ version: '1.9'
173
181
  type: :development
174
182
  prerelease: false
175
183
  version_requirements: !ruby/object:Gem::Requirement
176
184
  requirements:
177
185
  - - "~>"
178
186
  - !ruby/object:Gem::Version
179
- version: '1.5'
187
+ version: '1.9'
180
188
  - !ruby/object:Gem::Dependency
181
189
  name: rubocop-rails
182
190
  requirement: !ruby/object:Gem::Requirement
183
191
  requirements:
184
192
  - - "~>"
185
193
  - !ruby/object:Gem::Version
186
- version: '2.4'
194
+ version: '2.9'
187
195
  type: :development
188
196
  prerelease: false
189
197
  version_requirements: !ruby/object:Gem::Requirement
190
198
  requirements:
191
199
  - - "~>"
192
200
  - !ruby/object:Gem::Version
193
- version: '2.4'
201
+ version: '2.9'
194
202
  - !ruby/object:Gem::Dependency
195
- name: simplecov
203
+ name: rubocop-rake
196
204
  requirement: !ruby/object:Gem::Requirement
197
205
  requirements:
198
206
  - - "~>"
199
207
  - !ruby/object:Gem::Version
200
- version: 0.17.1
208
+ version: 0.5.1
201
209
  type: :development
202
210
  prerelease: false
203
211
  version_requirements: !ruby/object:Gem::Requirement
204
212
  requirements:
205
213
  - - "~>"
206
214
  - !ruby/object:Gem::Version
207
- version: 0.17.1
215
+ version: 0.5.1
216
+ - !ruby/object:Gem::Dependency
217
+ name: simplecov
218
+ requirement: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: 0.18.5
223
+ - - "<"
224
+ - !ruby/object:Gem::Version
225
+ version: '0.21'
226
+ type: :development
227
+ prerelease: false
228
+ version_requirements: !ruby/object:Gem::Requirement
229
+ requirements:
230
+ - - ">="
231
+ - !ruby/object:Gem::Version
232
+ version: 0.18.5
233
+ - - "<"
234
+ - !ruby/object:Gem::Version
235
+ version: '0.21'
208
236
  - !ruby/object:Gem::Dependency
209
237
  name: shotgun
210
238
  requirement: !ruby/object:Gem::Requirement
@@ -234,7 +262,7 @@ dependencies:
234
262
  - !ruby/object:Gem::Version
235
263
  version: '2.0'
236
264
  - !ruby/object:Gem::Dependency
237
- name: thin
265
+ name: webrick
238
266
  requirement: !ruby/object:Gem::Requirement
239
267
  requirements:
240
268
  - - "~>"
@@ -268,24 +296,27 @@ files:
268
296
  homepage: https://github.com/DavyJonesLocker/client_side_validations-simple_form
269
297
  licenses:
270
298
  - MIT
271
- metadata: {}
272
- post_install_message:
299
+ metadata:
300
+ bug_tracker_uri: https://github.com/DavyJonesLocker/client_side_validations-simple_form/issues
301
+ changelog_uri: https://github.com/DavyJonesLocker/client_side_validations-simple_form/blob/master/CHANGELOG.md
302
+ source_code_uri: https://github.com/DavyJonesLocker/client_side_validations-simple_form
303
+ post_install_message:
273
304
  rdoc_options: []
274
305
  require_paths:
275
306
  - lib
276
307
  required_ruby_version: !ruby/object:Gem::Requirement
277
308
  requirements:
278
- - - "~>"
309
+ - - ">="
279
310
  - !ruby/object:Gem::Version
280
- version: '2.3'
311
+ version: '2.4'
281
312
  required_rubygems_version: !ruby/object:Gem::Requirement
282
313
  requirements:
283
314
  - - ">="
284
315
  - !ruby/object:Gem::Version
285
316
  version: '0'
286
317
  requirements: []
287
- rubygems_version: 3.1.2
288
- signing_key:
318
+ rubygems_version: 3.1.4
319
+ signing_key:
289
320
  specification_version: 4
290
321
  summary: ClientSideValidations SimpleForm
291
322
  test_files: []