client_side_validations-simple_form 9.2.0 → 10.0.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: f5d77668bc65187db5728dd50a1c8b3473522ffeecab8cc3fb97b97a97491723
4
- data.tar.gz: 934341d14784f9557db30ae8b1c3c3f3f094b298a4a2a0c92a6e1db4a8532bee
3
+ metadata.gz: c3e9f462a74df20b7e1a312f57ca7393016316415ce7b3c3eaf6f3c4293f9c2d
4
+ data.tar.gz: f48d05508c5c5a28bc5139c127c139430c41a3770a6ade30d0d3b5698062085f
5
5
  SHA512:
6
- metadata.gz: 78389f0636baafb94b8cc4e00baccba4280d9b4607fa721ba71e378cb4bade9baa88a82cda310de3f09988b931c442ae90e229d51ff0c36431e8cd84b8b422d2
7
- data.tar.gz: 2002a1a074fe1badeae4d497bcc41260f2abdf2326ae680bdb209b822442e139615937466d41b2f9f304f4cc1bfef4be2cf0bf93aa328e2df65c7e3e5f8f6012
6
+ metadata.gz: 63d64d7a04ca569c14270001772ec385d0a56015753041d1e6046345b16bb914368ea552a630a3bf145f2d5b8c53200fd9c8720b6f4d424c823a131a31a0487c
7
+ data.tar.gz: 03bb9af6c6a80e909c817484dc1e5d576be4607456cf0ec0c44a9c97bcc105b092160ab1eff7541781bd797e4ee67503e11d6b53d9c48a6dce6c2ef3ea1def90
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 10.0.0 / 2020-03-18
4
+
5
+ * [FEATURE] Fallback on `full_error` if `error` component is not found ([#75](https://github.com/DavyJonesLocker/client_side_validations-simple_form/issues/75))
6
+ * [FEATURE] Support multiple css classes in error element and input wrappers
7
+ * [ENHANCEMENT] Update development dependencies
8
+
3
9
  ## 9.2.0 / 2019-12-25
4
10
 
5
11
  * [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
@@ -109,7 +109,7 @@ on how to properly submit issues and pull requests.
109
109
 
110
110
  ## Legal ##
111
111
 
112
- [DockYard](https://dockyard.com/), LLC © 2012-2019
112
+ [DockYard](https://dockyard.com/), LLC © 2012-2020
113
113
 
114
114
  [@dockyard](https://twitter.com/dockyard)
115
115
 
@@ -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 = '10.0.0'
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
1
  /*!
2
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
3
+ * Copyright (c) 2020 Geremia Taglialatela, Brian Cardarella
4
4
  * Licensed under MIT (https://opensource.org/licenses/mit-license.php)
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
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
3
+ * Copyright (c) 2020 Geremia Taglialatela, Brian Cardarella
4
4
  * Licensed under MIT (https://opensource.org/licenses/mit-license.php)
5
5
  */
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: 9.2.0
4
+ version: 10.0.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: 2019-12-25 00:00:00.000000000 Z
12
+ date: 2020-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: client_side_validations
@@ -65,7 +65,7 @@ dependencies:
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '10'
68
+ version: '10.0'
69
69
  - - "<"
70
70
  - !ruby/object:Gem::Version
71
71
  version: '12'
@@ -75,7 +75,7 @@ dependencies:
75
75
  requirements:
76
76
  - - ">="
77
77
  - !ruby/object:Gem::Version
78
- version: '10'
78
+ version: '10.0'
79
79
  - - "<"
80
80
  - !ruby/object:Gem::Version
81
81
  version: '12'
@@ -83,16 +83,22 @@ dependencies:
83
83
  name: coveralls_reborn
84
84
  requirement: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - "~>"
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: 0.14.0
89
+ - - "<"
90
+ - !ruby/object:Gem::Version
91
+ version: '0.16'
89
92
  type: :development
90
93
  prerelease: false
91
94
  version_requirements: !ruby/object:Gem::Requirement
92
95
  requirements:
93
- - - "~>"
96
+ - - ">="
94
97
  - !ruby/object:Gem::Version
95
98
  version: 0.14.0
99
+ - - "<"
100
+ - !ruby/object:Gem::Version
101
+ version: '0.16'
96
102
  - !ruby/object:Gem::Dependency
97
103
  name: m
98
104
  requirement: !ruby/object:Gem::Requirement
@@ -113,14 +119,14 @@ dependencies:
113
119
  requirements:
114
120
  - - "~>"
115
121
  - !ruby/object:Gem::Version
116
- version: '5.13'
122
+ version: '5.14'
117
123
  type: :development
118
124
  prerelease: false
119
125
  version_requirements: !ruby/object:Gem::Requirement
120
126
  requirements:
121
127
  - - "~>"
122
128
  - !ruby/object:Gem::Version
123
- version: '5.13'
129
+ version: '5.14'
124
130
  - !ruby/object:Gem::Dependency
125
131
  name: mocha
126
132
  requirement: !ruby/object:Gem::Requirement
@@ -155,14 +161,14 @@ dependencies:
155
161
  requirements:
156
162
  - - "~>"
157
163
  - !ruby/object:Gem::Version
158
- version: 0.78.0
164
+ version: 0.80.1
159
165
  type: :development
160
166
  prerelease: false
161
167
  version_requirements: !ruby/object:Gem::Requirement
162
168
  requirements:
163
169
  - - "~>"
164
170
  - !ruby/object:Gem::Version
165
- version: 0.78.0
171
+ version: 0.80.1
166
172
  - !ruby/object:Gem::Dependency
167
173
  name: rubocop-performance
168
174
  requirement: !ruby/object:Gem::Requirement
@@ -195,16 +201,22 @@ dependencies:
195
201
  name: simplecov
196
202
  requirement: !ruby/object:Gem::Requirement
197
203
  requirements:
198
- - - "~>"
204
+ - - ">="
199
205
  - !ruby/object:Gem::Version
200
206
  version: 0.17.1
207
+ - - "<"
208
+ - !ruby/object:Gem::Version
209
+ version: '0.19'
201
210
  type: :development
202
211
  prerelease: false
203
212
  version_requirements: !ruby/object:Gem::Requirement
204
213
  requirements:
205
- - - "~>"
214
+ - - ">="
206
215
  - !ruby/object:Gem::Version
207
216
  version: 0.17.1
217
+ - - "<"
218
+ - !ruby/object:Gem::Version
219
+ version: '0.19'
208
220
  - !ruby/object:Gem::Dependency
209
221
  name: shotgun
210
222
  requirement: !ruby/object:Gem::Requirement