client_side_validations-simple_form 10.1.0 → 12.1.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: db0707826650c43ed05c4f2ec685f6a482b60c5f84b3a2fe57cca74906e44700
4
- data.tar.gz: 20a6d4287144708a19c956cae1a03a17dbc2a287d21841d3618aa8d27c2ebfc8
3
+ metadata.gz: 773956c7d0691597395b09189f3fcc0e5ecb8bf218736bbf55dd99e01845adc3
4
+ data.tar.gz: aa33789b6bf674912400b5cb2e8a52d3d00519968d64e3acfb8ab687053551cc
5
5
  SHA512:
6
- metadata.gz: c8915c25bb200828d96fad6d87d40af9b4affb0fa3067590462b61006a800856e63c363e1491d7d30070f93cf05609ce92b160f7b8d709ac4cd3b58a5d765a2f
7
- data.tar.gz: f73b561515a940053afe15799af7fb7f9c68f69751abbe870685883e5f3357771d5fe6cc86e66d99d0333fb51a6d219b1a65838886e2a392d5177ae4e61b391f
6
+ metadata.gz: afdb2f2e1db9a6804fea8ce2b9ddee03dc0e1335d6c633dfa0468738fd51b732426eaf9c0493bca4a5aa8d8a7e9f6db0e4f6a02764967273e3752a757afc5bb6
7
+ data.tar.gz: 29e41bcf1882d15d51c78b369ee44925c8bae802a25bc4813374b46f3d7804d5ee58c4b628dd3b2af0d9cfeac3042dd05142f8b28722011c3b44f42d92154368
data/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 12.1.0 / 2020-02-13
4
+
5
+ * Add CSV 18.0 compatibility
6
+ * [ENHANCEMENT] Update development dependencies
7
+
8
+ ## 12.0.0 / 2020-01-23
9
+
10
+ * [FEATURE] Allow nested `:error` component [#111](https://github.com/DavyJonesLocker/client_side_validations-simple_form/pull/111) **POSSIBLE BREAKING CHANGE!**
11
+ * [ENHANCEMENT] Default branch is now `main` **POSSIBLE BREAKING CHANGE!**
12
+ * [ENHANCEMENT] Update QUnit to 2.14.0
13
+ * [ENHANCEMENT] Update development dependencies
14
+
15
+ ## 11.2.0 / 2020-12-21
16
+
17
+ * [FEATURE] Allow Ruby 3.0.0 (really)
18
+ * [ENHANCEMENT] Replace Thin with Webrick
19
+ * [ENHANCEMENT] Update development dependencies
20
+
21
+ ## 11.1.0 / 2020-10-10
22
+
23
+ * [FEATURE] Allow Ruby 3.0.0
24
+ * [ENHANCEMENT] Test against latest Ruby 2.7.2
25
+ * [ENHANCEMENT] Update QUnit to 2.11.3
26
+ * [ENHANCEMENT] Update development dependencies
27
+
28
+ ## 11.0.0 / 2020-05-16
29
+
30
+ * [FEATURE] Drop Ruby 2.3 support
31
+ * [FEATURE] Add Client Side Validations 17.0 compatibility
32
+ * [ENHANCEMENT] Test against jQuery 3.5.1 by default
33
+
3
34
  ## 10.1.0 / 2020-04-10
4
35
 
5
36
  * [FEATURE] Add jQuery 3.5.0 compatibility ([#77](https://github.com/DavyJonesLocker/client_side_validations-simple_form/pull/77))
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Geremia Taglialatela, Brian Cardarella
3
+ Copyright (c) 2021 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,9 +2,10 @@
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
- [![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
- [![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)
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)
6
+ [![Build Status](https://secure.travis-ci.org/DavyJonesLocker/client_side_validations-simple_form.svg?branch=main)](https://travis-ci.org/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)
8
+ [![Coverage Status](https://coveralls.io/repos/github/DavyJonesLocker/client_side_validations-simple_form/badge.svg?branch=main)](https://coveralls.io/github/DavyJonesLocker/client_side_validations-simple_form?branch=main)
8
9
 
9
10
  [Simple Form](https://github.com/plataformatec/simple_form) plugin for [ClientSideValidations](https://github.com/DavyJonesLocker/client_side_validations)
10
11
 
@@ -21,7 +22,7 @@ gem 'client_side_validations-simple_form'
21
22
  Order matters here. `simple_form` and `client_side_validations` need to be
22
23
  required **before** `client_side_validations-simple_form`.
23
24
 
24
- [Follow the remaining installation instructions for ClientSideValidations](https://github.com/DavyJonesLocker/client_side_validations/blob/master/README.md)
25
+ [Follow the remaining installation instructions for ClientSideValidations](https://github.com/DavyJonesLocker/client_side_validations/blob/main/README.md)
25
26
 
26
27
  ### JavaScript file ###
27
28
 
@@ -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 ####
@@ -104,12 +111,12 @@ This gem follows [Semantic Versioning](https://semver.org)
104
111
  ## Want to help? ##
105
112
 
106
113
  Please do! We are always looking to improve this gem. Please see our
107
- [Contribution Guidelines](https://github.com/DavyJonesLocker/client_side_validations-simple_form/blob/master/CONTRIBUTING.md)
114
+ [Contribution Guidelines](https://github.com/DavyJonesLocker/client_side_validations-simple_form/blob/main/CONTRIBUTING.md)
108
115
  on how to properly submit issues and pull requests.
109
116
 
110
117
  ## Legal ##
111
118
 
112
- [DockYard](https://dockyard.com/), LLC © 2012-2020
119
+ [DockYard](https://dockyard.com/), LLC © 2012-2021
113
120
 
114
121
  [@dockyard](https://twitter.com/dockyard)
115
122
 
@@ -28,12 +28,22 @@ module ClientSideValidations
28
28
  private
29
29
 
30
30
  def wrapper_error_component
31
- if wrapper.components.map(&:namespace).include?(:error)
31
+ if namespace_present?(wrapper, :error)
32
32
  wrapper.find(:error)
33
33
  else
34
34
  wrapper.find(:full_error)
35
35
  end
36
36
  end
37
+
38
+ def namespace_present?(component, namespace)
39
+ return true if component.namespace == namespace
40
+
41
+ component.try(:components)&.each do |child_component|
42
+ return true if namespace_present?(child_component, namespace)
43
+ end
44
+
45
+ false
46
+ end
37
47
  end
38
48
  end
39
49
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ClientSideValidations
4
4
  module SimpleForm
5
- VERSION = '10.1.0'
5
+ VERSION = '12.1.0'
6
6
  end
7
7
  end
@@ -1,19 +1,21 @@
1
1
  /*!
2
- * Client Side Validations Simple Form JS (Bootstrap 4) - v0.1.2 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
3
- * Copyright (c) 2020 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) 2021 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
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
14
- ClientSideValidations = ClientSideValidations && Object.prototype.hasOwnProperty.call(ClientSideValidations, '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.2 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
3
- * Copyright (c) 2020 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) 2021 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
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
14
- ClientSideValidations = ClientSideValidations && Object.prototype.hasOwnProperty.call(ClientSideValidations, '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: 10.1.0
4
+ version: 12.1.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: 2020-04-11 00:00:00.000000000 Z
12
+ date: 2021-02-13 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: '19.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: '19.0'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: simple_form
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -51,54 +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.0'
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.0'
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
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: 0.14.0
89
- - - "<"
80
+ - - "~>"
90
81
  - !ruby/object:Gem::Version
91
- version: '0.16'
82
+ version: 0.20.0
92
83
  type: :development
93
84
  prerelease: false
94
85
  version_requirements: !ruby/object:Gem::Requirement
95
86
  requirements:
96
- - - ">="
97
- - !ruby/object:Gem::Version
98
- version: 0.14.0
99
- - - "<"
87
+ - - "~>"
100
88
  - !ruby/object:Gem::Version
101
- version: '0.16'
89
+ version: 0.20.0
102
90
  - !ruby/object:Gem::Dependency
103
91
  name: m
104
92
  requirement: !ruby/object:Gem::Requirement
@@ -161,62 +149,90 @@ dependencies:
161
149
  requirements:
162
150
  - - "~>"
163
151
  - !ruby/object:Gem::Version
164
- version: 0.81.0
152
+ version: '1.9'
165
153
  type: :development
166
154
  prerelease: false
167
155
  version_requirements: !ruby/object:Gem::Requirement
168
156
  requirements:
169
157
  - - "~>"
170
158
  - !ruby/object:Gem::Version
171
- version: 0.81.0
159
+ version: '1.9'
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.3
167
+ type: :development
168
+ prerelease: false
169
+ version_requirements: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 0.10.3
172
174
  - !ruby/object:Gem::Dependency
173
175
  name: rubocop-performance
174
176
  requirement: !ruby/object:Gem::Requirement
175
177
  requirements:
176
178
  - - "~>"
177
179
  - !ruby/object:Gem::Version
178
- version: '1.5'
180
+ version: '1.9'
179
181
  type: :development
180
182
  prerelease: false
181
183
  version_requirements: !ruby/object:Gem::Requirement
182
184
  requirements:
183
185
  - - "~>"
184
186
  - !ruby/object:Gem::Version
185
- version: '1.5'
187
+ version: '1.9'
186
188
  - !ruby/object:Gem::Dependency
187
189
  name: rubocop-rails
188
190
  requirement: !ruby/object:Gem::Requirement
189
191
  requirements:
190
192
  - - "~>"
191
193
  - !ruby/object:Gem::Version
192
- version: '2.5'
194
+ version: '2.9'
195
+ type: :development
196
+ prerelease: false
197
+ version_requirements: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '2.9'
202
+ - !ruby/object:Gem::Dependency
203
+ name: rubocop-rake
204
+ requirement: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: 0.5.1
193
209
  type: :development
194
210
  prerelease: false
195
211
  version_requirements: !ruby/object:Gem::Requirement
196
212
  requirements:
197
213
  - - "~>"
198
214
  - !ruby/object:Gem::Version
199
- version: '2.5'
215
+ version: 0.5.1
200
216
  - !ruby/object:Gem::Dependency
201
217
  name: simplecov
202
218
  requirement: !ruby/object:Gem::Requirement
203
219
  requirements:
204
220
  - - ">="
205
221
  - !ruby/object:Gem::Version
206
- version: 0.17.1
222
+ version: 0.18.5
207
223
  - - "<"
208
224
  - !ruby/object:Gem::Version
209
- version: '0.19'
225
+ version: '0.22'
210
226
  type: :development
211
227
  prerelease: false
212
228
  version_requirements: !ruby/object:Gem::Requirement
213
229
  requirements:
214
230
  - - ">="
215
231
  - !ruby/object:Gem::Version
216
- version: 0.17.1
232
+ version: 0.18.5
217
233
  - - "<"
218
234
  - !ruby/object:Gem::Version
219
- version: '0.19'
235
+ version: '0.22'
220
236
  - !ruby/object:Gem::Dependency
221
237
  name: shotgun
222
238
  requirement: !ruby/object:Gem::Requirement
@@ -246,7 +262,7 @@ dependencies:
246
262
  - !ruby/object:Gem::Version
247
263
  version: '2.0'
248
264
  - !ruby/object:Gem::Dependency
249
- name: thin
265
+ name: webrick
250
266
  requirement: !ruby/object:Gem::Requirement
251
267
  requirements:
252
268
  - - "~>"
@@ -282,25 +298,25 @@ licenses:
282
298
  - MIT
283
299
  metadata:
284
300
  bug_tracker_uri: https://github.com/DavyJonesLocker/client_side_validations-simple_form/issues
285
- changelog_uri: https://github.com/DavyJonesLocker/client_side_validations-simple_form/blob/master/CHANGELOG.md
301
+ changelog_uri: https://github.com/DavyJonesLocker/client_side_validations-simple_form/blob/main/CHANGELOG.md
286
302
  source_code_uri: https://github.com/DavyJonesLocker/client_side_validations-simple_form
287
- post_install_message:
303
+ post_install_message:
288
304
  rdoc_options: []
289
305
  require_paths:
290
306
  - lib
291
307
  required_ruby_version: !ruby/object:Gem::Requirement
292
308
  requirements:
293
- - - "~>"
309
+ - - ">="
294
310
  - !ruby/object:Gem::Version
295
- version: '2.3'
311
+ version: '2.4'
296
312
  required_rubygems_version: !ruby/object:Gem::Requirement
297
313
  requirements:
298
314
  - - ">="
299
315
  - !ruby/object:Gem::Version
300
316
  version: '0'
301
317
  requirements: []
302
- rubygems_version: 3.1.2
303
- signing_key:
318
+ rubygems_version: 3.1.4
319
+ signing_key:
304
320
  specification_version: 4
305
321
  summary: ClientSideValidations SimpleForm
306
322
  test_files: []