client_side_validations-simple_form 3.2.3 → 6.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
  SHA1:
3
- metadata.gz: b9834bbbd1e991f8a8ded640f64da3b9e9691312
4
- data.tar.gz: f9561f3a8c0dd92d39fb95f1e6998d83984f205a
3
+ metadata.gz: 25b2c100b3f4e876164bd7284aae63da64d30a1b
4
+ data.tar.gz: a889c5834c01b0326d7156bfaca48023fb9f3bcf
5
5
  SHA512:
6
- metadata.gz: 8e42a3d900df09bb0e41d76afaae06267365439a491132d06b7bb0dcb2a0288f932c2e8c9d8dc9294a718a1c230221b16ef8321f05225ef25b5c76f59743da26
7
- data.tar.gz: c46a8d07b216481910c4ec11aab394a21ad4854e97d36678ee9e4e65d500614fe4921f62189c1b2f280d7646eeb968eb553f7e71f2c7d6fe4042b2429623d3e9
6
+ metadata.gz: 35a6f20ec2e6ac8e987210d5f7414da1d76bea764673d9311376a106a9f41fea2bf957bea85a9b475c59b5e100590bf05df3feec8de4b6b27eb1716d105e253e
7
+ data.tar.gz: 9a6260d9dd89eca31559f9cfa6f292d2ba950737afe7159a0254faf66a1ccaafce49294eecc6b72baad9db2d542b2244661d24f7d5bda7bfd9e50347557636cc
data/CHANGELOG.md ADDED
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ ## 6.0.0 (2017-01-31)
4
+
5
+ * ClientSideValidations 9.0 compatibility
6
+
7
+ ## 5.2.0 (2017-01-22)
8
+
9
+ * ClientSideValidations 8.0 compatibility
10
+
11
+ ## 5.1.0 (2017-01-22)
12
+
13
+ * ClientSideValidations 7.0 compatibility
14
+ * Update development dependencies
15
+
16
+ ## 5.0.0 (2017-01-20)
17
+
18
+ * ClientSideValidations 6.0 compatibility
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Geremia Taglialatela, Brian Cardarella
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -63,9 +63,9 @@ Per-input options are done with `:validate`
63
63
 
64
64
  ## Authors ##
65
65
 
66
- [Brian Cardarella](http://twitter.com/bcardarella)
66
+ [Brian Cardarella](https://twitter.com/bcardarella)
67
67
 
68
- [Geremia Taglialatela](http://twitter.com/gtagliala)
68
+ [Geremia Taglialatela](https://twitter.com/gtagliala)
69
69
 
70
70
  [We are very thankful for the many contributors](https://github.com/DavyJonesLocker/client_side_validations-simple_form/graphs/contributors)
71
71
 
@@ -73,11 +73,6 @@ Per-input options are done with `:validate`
73
73
 
74
74
  This gem follows [Semantic Versioning](http://semver.org)
75
75
 
76
- Major and minor version numbers will follow `simple_form`'s major and
77
- minor version numbers. For example,
78
- `client_side_validations-simple_form-3.2.0` will be compatible up to
79
- `~> simple_form-3.2.0`
80
-
81
76
  ## Want to help? ##
82
77
 
83
78
  Please do! We are always looking to improve this gem. Please see our
@@ -86,8 +81,8 @@ on how to properly submit issues and pull requests.
86
81
 
87
82
  ## Legal ##
88
83
 
89
- [DockYard](http://dockyard.com), LLC © 2012-2016
84
+ [DockYard](https://dockyard.com/), LLC © 2012-2017
90
85
 
91
- [@dockyard](http://twitter.com/dockyard)
86
+ [@dockyard](https://twitter.com/dockyard)
92
87
 
93
- [Licensed under the MIT license](http://www.opensource.org/licenses/mit-license.php)
88
+ [Licensed under the MIT license](http://opensource.org/licenses/mit-license.php)
@@ -1,12 +1,6 @@
1
1
  module ClientSideValidations
2
2
  module SimpleForm
3
3
  module FormBuilder
4
- def self.included(base)
5
- base.class_eval do
6
- alias_method_chain :input, :client_side_validations
7
- end
8
- end
9
-
10
4
  def client_side_form_settings(options, _form_helper)
11
5
  {
12
6
  type: self.class.to_s,
@@ -19,17 +13,17 @@ module ClientSideValidations
19
13
  }
20
14
  end
21
15
 
22
- def input_with_client_side_validations(attribute_name, options = {}, &block)
16
+ def input(attribute_name, options = {}, &block)
23
17
  if options.key?(:validate)
24
18
  options[:input_html] ||= {}
25
19
  options[:input_html][:validate] = options[:validate]
26
20
  options.delete(:validate)
27
21
  end
28
22
 
29
- input_without_client_side_validations(attribute_name, options, &block)
23
+ super(attribute_name, options, &block)
30
24
  end
31
25
  end
32
26
  end
33
27
  end
34
28
 
35
- SimpleForm::FormBuilder.send(:include, ClientSideValidations::SimpleForm::FormBuilder)
29
+ SimpleForm::FormBuilder.send(:prepend, ClientSideValidations::SimpleForm::FormBuilder)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module ClientSideValidations
3
3
  module SimpleForm
4
- VERSION = '3.2.3'.freeze
4
+ VERSION = '6.0.0'.freeze
5
5
  end
6
6
  end
@@ -1,8 +1,8 @@
1
1
  require 'simple_form'
2
-
3
2
  require 'client_side_validations'
4
-
5
3
  require 'client_side_validations/simple_form/form_builder'
6
- require 'client_side_validations/simple_form/engine'
7
4
 
8
- require 'client_side_validations/generators/simple_form' if defined?(::Rails)
5
+ if defined?(::Rails)
6
+ require 'client_side_validations/simple_form/engine'
7
+ require 'client_side_validations/generators/simple_form'
8
+ end
@@ -1,24 +1,27 @@
1
1
 
2
2
  /*!
3
- * Client Side Validations - SimpleForm - v3.2.3 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
4
- * Copyright (c) 2016 Geremia Taglialatela, Brian Cardarella
3
+ * Client Side Validations - SimpleForm - v6.0.0 (https://github.com/DavyJonesLocker/client_side_validations-simple_form)
4
+ * Copyright (c) 2017 Geremia Taglialatela, Brian Cardarella
5
5
  * Licensed under MIT (http://opensource.org/licenses/mit-license.php)
6
6
  */
7
7
 
8
8
  (function() {
9
9
  ClientSideValidations.formBuilders['SimpleForm::FormBuilder'] = {
10
10
  add: function(element, settings, message) {
11
- return this.wrappers[settings.wrapper].add.call(this, element, settings, message);
11
+ return this.wrapper(settings.wrapper).add.call(this, element, settings, message);
12
12
  },
13
13
  remove: function(element, settings) {
14
- return this.wrappers[settings.wrapper].remove.call(this, 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"];
15
18
  },
16
19
  wrappers: {
17
20
  "default": {
18
21
  add: function(element, settings, message) {
19
22
  var errorElement, wrapper;
20
23
  wrapper = element.closest(settings.wrapper_tag + "." + (settings.wrapper_class.replace(/\ /g, '.')));
21
- errorElement = wrapper.find(settings.error_tag + "." + settings.error_class);
24
+ errorElement = wrapper.find(settings.error_tag + "." + (settings.error_class.replace(/\ /g, '.')));
22
25
  if (!errorElement.length) {
23
26
  errorElement = $("<" + settings.error_tag + "/>", {
24
27
  "class": settings.error_class,
@@ -32,7 +35,7 @@
32
35
  remove: function(element, settings) {
33
36
  var errorElement, wrapper;
34
37
  wrapper = element.closest(settings.wrapper_tag + "." + (settings.wrapper_class.replace(/\ /g, '.')) + "." + settings.wrapper_error_class);
35
- errorElement = wrapper.find(settings.error_tag + "." + settings.error_class);
38
+ errorElement = wrapper.find(settings.error_tag + "." + (settings.error_class.replace(/\ /g, '.')));
36
39
  wrapper.removeClass(settings.wrapper_error_class);
37
40
  return errorElement.remove();
38
41
  }
@@ -40,10 +43,4 @@
40
43
  }
41
44
  };
42
45
 
43
- ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.vertical_form = ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers["default"];
44
-
45
- ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.horizontal_form = ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers["default"];
46
-
47
- ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.inline_form = ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers["default"];
48
-
49
46
  }).call(this);
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: 3.2.3
4
+ version: 6.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: 2016-03-14 00:00:00.000000000 Z
12
+ date: 2017-01-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: client_side_validations
@@ -17,28 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 4.2.3
20
+ version: '9.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 4.2.3
27
+ version: '9.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: simple_form
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '3.2'
34
+ version: '3.4'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '3.2'
41
+ version: '3.4'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: appraisal
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -54,179 +54,159 @@ dependencies:
54
54
  - !ruby/object:Gem::Version
55
55
  version: '2.1'
56
56
  - !ruby/object:Gem::Dependency
57
- name: coveralls
57
+ name: byebug
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: 0.8.13
62
+ version: '9.0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: 0.8.13
69
+ version: '9.0'
70
70
  - !ruby/object:Gem::Dependency
71
- name: m
71
+ name: coveralls
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: '1.4'
76
+ version: 0.8.19
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: '1.4'
83
+ version: 0.8.19
84
84
  - !ruby/object:Gem::Dependency
85
- name: minitest
85
+ name: m
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: 4.7.5
91
- - - "<"
88
+ - - "~>"
92
89
  - !ruby/object:Gem::Version
93
- version: 6.0.0
90
+ version: '1.5'
94
91
  type: :development
95
92
  prerelease: false
96
93
  version_requirements: !ruby/object:Gem::Requirement
97
94
  requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- version: 4.7.5
101
- - - "<"
95
+ - - "~>"
102
96
  - !ruby/object:Gem::Version
103
- version: 6.0.0
97
+ version: '1.5'
104
98
  - !ruby/object:Gem::Dependency
105
- name: mocha
99
+ name: minitest
106
100
  requirement: !ruby/object:Gem::Requirement
107
101
  requirements:
108
102
  - - "~>"
109
103
  - !ruby/object:Gem::Version
110
- version: '1.1'
104
+ version: '5.10'
111
105
  type: :development
112
106
  prerelease: false
113
107
  version_requirements: !ruby/object:Gem::Requirement
114
108
  requirements:
115
109
  - - "~>"
116
110
  - !ruby/object:Gem::Version
117
- version: '1.1'
111
+ version: '5.10'
118
112
  - !ruby/object:Gem::Dependency
119
- name: rake
113
+ name: mocha
120
114
  requirement: !ruby/object:Gem::Requirement
121
115
  requirements:
122
116
  - - "~>"
123
117
  - !ruby/object:Gem::Version
124
- version: '11.1'
118
+ version: '1.2'
125
119
  type: :development
126
120
  prerelease: false
127
121
  version_requirements: !ruby/object:Gem::Requirement
128
122
  requirements:
129
123
  - - "~>"
130
124
  - !ruby/object:Gem::Version
131
- version: '11.1'
125
+ version: '1.2'
132
126
  - !ruby/object:Gem::Dependency
133
- name: rubocop
127
+ name: rake
134
128
  requirement: !ruby/object:Gem::Requirement
135
129
  requirements:
136
130
  - - "~>"
137
131
  - !ruby/object:Gem::Version
138
- version: 0.38.0
132
+ version: '12.0'
139
133
  type: :development
140
134
  prerelease: false
141
135
  version_requirements: !ruby/object:Gem::Requirement
142
136
  requirements:
143
137
  - - "~>"
144
138
  - !ruby/object:Gem::Version
145
- version: 0.38.0
139
+ version: '12.0'
146
140
  - !ruby/object:Gem::Dependency
147
- name: simplecov
141
+ name: rubocop
148
142
  requirement: !ruby/object:Gem::Requirement
149
143
  requirements:
150
144
  - - "~>"
151
145
  - !ruby/object:Gem::Version
152
- version: 0.11.2
146
+ version: 0.47.1
153
147
  type: :development
154
148
  prerelease: false
155
149
  version_requirements: !ruby/object:Gem::Requirement
156
150
  requirements:
157
151
  - - "~>"
158
152
  - !ruby/object:Gem::Version
159
- version: 0.11.2
153
+ version: 0.47.1
160
154
  - !ruby/object:Gem::Dependency
161
- name: byebug
155
+ name: simplecov
162
156
  requirement: !ruby/object:Gem::Requirement
163
157
  requirements:
164
158
  - - "~>"
165
159
  - !ruby/object:Gem::Version
166
- version: '8.2'
160
+ version: 0.12.0
167
161
  type: :development
168
162
  prerelease: false
169
163
  version_requirements: !ruby/object:Gem::Requirement
170
164
  requirements:
171
165
  - - "~>"
172
166
  - !ruby/object:Gem::Version
173
- version: '8.2'
167
+ version: 0.12.0
174
168
  - !ruby/object:Gem::Dependency
175
169
  name: sinatra
176
170
  requirement: !ruby/object:Gem::Requirement
177
171
  requirements:
178
172
  - - "~>"
179
173
  - !ruby/object:Gem::Version
180
- version: '1.4'
174
+ version: 2.0.0.beta2
181
175
  type: :development
182
176
  prerelease: false
183
177
  version_requirements: !ruby/object:Gem::Requirement
184
178
  requirements:
185
179
  - - "~>"
186
180
  - !ruby/object:Gem::Version
187
- version: '1.4'
181
+ version: 2.0.0.beta2
188
182
  - !ruby/object:Gem::Dependency
189
183
  name: shotgun
190
184
  requirement: !ruby/object:Gem::Requirement
191
185
  requirements:
192
186
  - - "~>"
193
187
  - !ruby/object:Gem::Version
194
- version: 0.9.1
188
+ version: 0.9.2
195
189
  type: :development
196
190
  prerelease: false
197
191
  version_requirements: !ruby/object:Gem::Requirement
198
192
  requirements:
199
193
  - - "~>"
200
194
  - !ruby/object:Gem::Version
201
- version: 0.9.1
195
+ version: 0.9.2
202
196
  - !ruby/object:Gem::Dependency
203
197
  name: thin
204
198
  requirement: !ruby/object:Gem::Requirement
205
199
  requirements:
206
200
  - - "~>"
207
201
  - !ruby/object:Gem::Version
208
- version: '1.6'
209
- type: :development
210
- prerelease: false
211
- version_requirements: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - "~>"
214
- - !ruby/object:Gem::Version
215
- version: '1.6'
216
- - !ruby/object:Gem::Dependency
217
- name: json
218
- requirement: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - "~>"
221
- - !ruby/object:Gem::Version
222
- version: '1.8'
202
+ version: '1.7'
223
203
  type: :development
224
204
  prerelease: false
225
205
  version_requirements: !ruby/object:Gem::Requirement
226
206
  requirements:
227
207
  - - "~>"
228
208
  - !ruby/object:Gem::Version
229
- version: '1.8'
209
+ version: '1.7'
230
210
  - !ruby/object:Gem::Dependency
231
211
  name: coffee-script
232
212
  requirement: !ruby/object:Gem::Requirement
@@ -249,6 +229,8 @@ executables: []
249
229
  extensions: []
250
230
  extra_rdoc_files: []
251
231
  files:
232
+ - CHANGELOG.md
233
+ - LICENSE.md
252
234
  - README.md
253
235
  - lib/client_side_validations/generators/simple_form.rb
254
236
  - lib/client_side_validations/simple_form.rb
@@ -260,10 +242,7 @@ homepage: https://github.com/DavyJonesLocker/client_side_validations-simple_form
260
242
  licenses:
261
243
  - MIT
262
244
  metadata: {}
263
- post_install_message: |-
264
- *** POTENTIAL BREAKING CHANGE ***
265
- If you are upgrading from client_side_validations-simple_form <= 3.2.1,
266
- please take a look at https://goo.gl/j70wIR
245
+ post_install_message:
267
246
  rdoc_options: []
268
247
  require_paths:
269
248
  - lib
@@ -279,8 +258,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
258
  version: '0'
280
259
  requirements: []
281
260
  rubyforge_project:
282
- rubygems_version: 2.5.1
261
+ rubygems_version: 2.6.9
283
262
  signing_key:
284
263
  specification_version: 4
285
- summary: SimpleForm Plugin for ClientSideValidations
264
+ summary: ClientSideValidations SimpleForm
286
265
  test_files: []