client_side_validations-simple_form 9.1.0 → 11.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: f3eb13986e0e6ae5587221bae373cd1f61ed4996b45e5737d35757302a3846cf
4
- data.tar.gz: 20b5d81a2c3eec3f184c53f95c3aff917fc5352f30c3c12c0b2eb1e81684cad9
3
+ metadata.gz: ccd0e1d781759f2179c834a9ee46b9fe119c116aa8c780f1641a09312e7075f8
4
+ data.tar.gz: 746e52e205596687597a28e7688460e7ce6025ef1ecefd10438edda35b2de6be
5
5
  SHA512:
6
- metadata.gz: ba0cc63c9161d29c7b0fd23fcaf9f15afaf9263f747b352a02f1286e7c685e891cec823745ad9b794b646c7abc70953ccc4284a2d855696ca1d699b2c1bde8bd
7
- data.tar.gz: eea83ab45fb0413fd4f3ad8d6a44bf4d1e6da025f393656ed3621dc98fdbedddc2baca1eb43a8613e856a3de3a65b76693a1374ddd930ea93a50d5c47c8cc800
6
+ metadata.gz: f2a07e84e3ed9dd522b55ef54d75c82333ee31bb4a4b19bc702a1433d20eca873b3c006bf55a510627a1c770d6ba63dc48345d114f1a0a75ef2642a3c78aac8b
7
+ data.tar.gz: 5ad626c8f572f811def7c636dcee86a25f7c3447d5c687fa97c8ee1449ff2d180f024709e107c5698cd1e2fad380587d6541fa4e7c98ee159a7704ae745421b8
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 11.1.0 / 2020-10-10
4
+
5
+ * [FEATURE] Allow Ruby 3.0.0
6
+ * [ENHANCEMENT] Test against latest Ruby 2.7.2
7
+ * [ENHANCEMENT] Update QUnit to 2.11.3
8
+ * [ENHANCEMENT] Update development dependencies
9
+
10
+ ## 11.0.0 / 2020-05-16
11
+
12
+ * [FEATURE] Drop Ruby 2.3 support
13
+ * [FEATURE] Add Client Side Validations 17.0 compatibility
14
+ * [ENHANCEMENT] Test against jQuery 3.5.1 by default
15
+
16
+ ## 10.1.0 / 2020-04-10
17
+
18
+ * [FEATURE] Add jQuery 3.5.0 compatibility ([#77](https://github.com/DavyJonesLocker/client_side_validations-simple_form/pull/77))
19
+ * [ENHANCEMENT] Test against latest Ruby versions
20
+ * [ENHANCEMENT] Update development dependencies
21
+
22
+ ## 10.0.0 / 2020-03-18
23
+
24
+ * [FEATURE] Fallback on `full_error` if `error` component is not found ([#75](https://github.com/DavyJonesLocker/client_side_validations-simple_form/issues/75))
25
+ * [FEATURE] Support multiple css classes in error element and input wrappers
26
+ * [ENHANCEMENT] Update development dependencies
27
+
28
+ ## 9.2.0 / 2019-12-25
29
+
30
+ * [FEATURE] Ruby 2.7 support
31
+ * [ENHANCEMENT] Update development dependencies
32
+
3
33
  ## 9.1.0 / 2019-10-06
4
34
 
5
35
  * [FEATURE] Add ClientSideValidations JS 0.1.0 compatibility
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.1.0'
5
+ VERSION = '11.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.0 (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));
11
- }(this, function ($, ClientSideValidations) { 'use strict';
10
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.$, global.ClientSideValidations));
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
  });
@@ -52,4 +54,4 @@
52
54
  }
53
55
  };
54
56
 
55
- }));
57
+ })));
@@ -1,19 +1,21 @@
1
1
  /*!
2
- * Client Side Validations Simple Form JS (Default) - v0.1.0 (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));
11
- }(this, function ($, ClientSideValidations) { 'use strict';
10
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.$, global.ClientSideValidations));
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
  });
@@ -50,4 +52,4 @@
50
52
  }
51
53
  };
52
54
 
53
- }));
55
+ })));
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.1.0
4
+ version: 11.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: 2019-10-06 00:00:00.000000000 Z
12
+ date: 2020-10-10 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.13.1
82
+ version: 0.18.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.13.1
89
+ version: 0.18.0
96
90
  - !ruby/object:Gem::Dependency
97
91
  name: m
98
92
  requirement: !ruby/object:Gem::Requirement
@@ -113,28 +107,28 @@ dependencies:
113
107
  requirements:
114
108
  - - "~>"
115
109
  - !ruby/object:Gem::Version
116
- version: '5.12'
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.12'
117
+ version: '5.14'
124
118
  - !ruby/object:Gem::Dependency
125
119
  name: mocha
126
120
  requirement: !ruby/object:Gem::Requirement
127
121
  requirements:
128
122
  - - "~>"
129
123
  - !ruby/object:Gem::Version
130
- version: '1.9'
124
+ version: '1.11'
131
125
  type: :development
132
126
  prerelease: false
133
127
  version_requirements: !ruby/object:Gem::Requirement
134
128
  requirements:
135
129
  - - "~>"
136
130
  - !ruby/object:Gem::Version
137
- version: '1.9'
131
+ version: '1.11'
138
132
  - !ruby/object:Gem::Dependency
139
133
  name: rake
140
134
  requirement: !ruby/object:Gem::Requirement
@@ -155,56 +149,62 @@ dependencies:
155
149
  requirements:
156
150
  - - "~>"
157
151
  - !ruby/object:Gem::Version
158
- version: 0.75.0
152
+ version: 0.93.0
159
153
  type: :development
160
154
  prerelease: false
161
155
  version_requirements: !ruby/object:Gem::Requirement
162
156
  requirements:
163
157
  - - "~>"
164
158
  - !ruby/object:Gem::Version
165
- version: 0.75.0
159
+ version: 0.93.0
166
160
  - !ruby/object:Gem::Dependency
167
161
  name: rubocop-performance
168
162
  requirement: !ruby/object:Gem::Requirement
169
163
  requirements:
170
164
  - - "~>"
171
165
  - !ruby/object:Gem::Version
172
- version: '1.5'
166
+ version: '1.8'
173
167
  type: :development
174
168
  prerelease: false
175
169
  version_requirements: !ruby/object:Gem::Requirement
176
170
  requirements:
177
171
  - - "~>"
178
172
  - !ruby/object:Gem::Version
179
- version: '1.5'
173
+ version: '1.8'
180
174
  - !ruby/object:Gem::Dependency
181
175
  name: rubocop-rails
182
176
  requirement: !ruby/object:Gem::Requirement
183
177
  requirements:
184
178
  - - "~>"
185
179
  - !ruby/object:Gem::Version
186
- version: '2.3'
180
+ version: '2.8'
187
181
  type: :development
188
182
  prerelease: false
189
183
  version_requirements: !ruby/object:Gem::Requirement
190
184
  requirements:
191
185
  - - "~>"
192
186
  - !ruby/object:Gem::Version
193
- version: '2.3'
187
+ version: '2.8'
194
188
  - !ruby/object:Gem::Dependency
195
189
  name: simplecov
196
190
  requirement: !ruby/object:Gem::Requirement
197
191
  requirements:
198
- - - "~>"
192
+ - - ">="
199
193
  - !ruby/object:Gem::Version
200
- version: 0.17.1
194
+ version: 0.18.5
195
+ - - "<"
196
+ - !ruby/object:Gem::Version
197
+ version: 0.20.0
201
198
  type: :development
202
199
  prerelease: false
203
200
  version_requirements: !ruby/object:Gem::Requirement
204
201
  requirements:
205
- - - "~>"
202
+ - - ">="
203
+ - !ruby/object:Gem::Version
204
+ version: 0.18.5
205
+ - - "<"
206
206
  - !ruby/object:Gem::Version
207
- version: 0.17.1
207
+ version: 0.20.0
208
208
  - !ruby/object:Gem::Dependency
209
209
  name: shotgun
210
210
  requirement: !ruby/object:Gem::Requirement
@@ -268,8 +268,11 @@ files:
268
268
  homepage: https://github.com/DavyJonesLocker/client_side_validations-simple_form
269
269
  licenses:
270
270
  - MIT
271
- metadata: {}
272
- post_install_message:
271
+ metadata:
272
+ bug_tracker_uri: https://github.com/DavyJonesLocker/client_side_validations-simple_form/issues
273
+ changelog_uri: https://github.com/DavyJonesLocker/client_side_validations-simple_form/blob/master/CHANGELOG.md
274
+ source_code_uri: https://github.com/DavyJonesLocker/client_side_validations-simple_form
275
+ post_install_message:
273
276
  rdoc_options: []
274
277
  require_paths:
275
278
  - lib
@@ -277,15 +280,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
277
280
  requirements:
278
281
  - - "~>"
279
282
  - !ruby/object:Gem::Version
280
- version: '2.3'
283
+ version: '2.4'
281
284
  required_rubygems_version: !ruby/object:Gem::Requirement
282
285
  requirements:
283
286
  - - ">="
284
287
  - !ruby/object:Gem::Version
285
288
  version: '0'
286
289
  requirements: []
287
- rubygems_version: 3.0.6
288
- signing_key:
290
+ rubygems_version: 3.2.0.rc.1
291
+ signing_key:
289
292
  specification_version: 4
290
293
  summary: ClientSideValidations SimpleForm
291
294
  test_files: []