simple_form 5.1.0 → 5.3.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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/MIT-LICENSE +1 -1
  4. data/README.md +64 -16
  5. data/lib/generators/simple_form/install_generator.rb +2 -2
  6. data/lib/generators/simple_form/templates/README +1 -1
  7. data/lib/generators/simple_form/templates/config/initializers/simple_form.rb +1 -1
  8. data/lib/generators/simple_form/templates/config/initializers/simple_form_bootstrap.rb +126 -194
  9. data/lib/simple_form/components/label_input.rb +1 -1
  10. data/lib/simple_form/form_builder.rb +2 -6
  11. data/lib/simple_form/inputs/boolean_input.rb +6 -2
  12. data/lib/simple_form/inputs/grouped_collection_select_input.rb +1 -1
  13. data/lib/simple_form/inputs/priority_input.rb +16 -2
  14. data/lib/simple_form/railtie.rb +4 -0
  15. data/lib/simple_form/version.rb +1 -1
  16. data/lib/simple_form/wrappers/leaf.rb +1 -1
  17. data/lib/simple_form.rb +9 -5
  18. metadata +11 -83
  19. data/test/action_view_extensions/builder_test.rb +0 -634
  20. data/test/action_view_extensions/form_helper_test.rb +0 -172
  21. data/test/components/custom_components_test.rb +0 -62
  22. data/test/components/label_test.rb +0 -352
  23. data/test/form_builder/association_test.rb +0 -252
  24. data/test/form_builder/button_test.rb +0 -48
  25. data/test/form_builder/error_notification_test.rb +0 -80
  26. data/test/form_builder/error_test.rb +0 -281
  27. data/test/form_builder/general_test.rb +0 -539
  28. data/test/form_builder/hint_test.rb +0 -150
  29. data/test/form_builder/input_field_test.rb +0 -195
  30. data/test/form_builder/label_test.rb +0 -136
  31. data/test/form_builder/wrapper_test.rb +0 -378
  32. data/test/generators/simple_form_generator_test.rb +0 -43
  33. data/test/inputs/boolean_input_test.rb +0 -243
  34. data/test/inputs/collection_check_boxes_input_test.rb +0 -323
  35. data/test/inputs/collection_radio_buttons_input_test.rb +0 -446
  36. data/test/inputs/collection_select_input_test.rb +0 -380
  37. data/test/inputs/color_input_test.rb +0 -10
  38. data/test/inputs/datetime_input_test.rb +0 -176
  39. data/test/inputs/disabled_test.rb +0 -92
  40. data/test/inputs/discovery_test.rb +0 -142
  41. data/test/inputs/file_input_test.rb +0 -17
  42. data/test/inputs/general_test.rb +0 -133
  43. data/test/inputs/grouped_collection_select_input_test.rb +0 -183
  44. data/test/inputs/hidden_input_test.rb +0 -32
  45. data/test/inputs/numeric_input_test.rb +0 -177
  46. data/test/inputs/priority_input_test.rb +0 -50
  47. data/test/inputs/readonly_test.rb +0 -102
  48. data/test/inputs/required_test.rb +0 -158
  49. data/test/inputs/rich_text_area_input_test.rb +0 -15
  50. data/test/inputs/string_input_test.rb +0 -158
  51. data/test/inputs/text_input_test.rb +0 -37
  52. data/test/simple_form_test.rb +0 -18
  53. data/test/support/discovery_inputs.rb +0 -65
  54. data/test/support/misc_helpers.rb +0 -274
  55. data/test/support/mock_controller.rb +0 -30
  56. data/test/support/models.rb +0 -357
  57. data/test/test_helper.rb +0 -95
data/lib/simple_form.rb CHANGED
@@ -55,6 +55,10 @@ See http://blog.plataformatec.com.br/2019/09/incorrect-access-control-in-simple-
55
55
  @@configured
56
56
  end
57
57
 
58
+ def self.deprecator
59
+ @deprecator ||= ActiveSupport::Deprecation.new("5.3", "SimpleForm")
60
+ end
61
+
58
62
  ## CONFIGURATION OPTIONS
59
63
 
60
64
  # Method used to tidy up errors.
@@ -114,7 +118,7 @@ See http://blog.plataformatec.com.br/2019/09/incorrect-access-control-in-simple-
114
118
  mattr_reader :form_class
115
119
  @@form_class = :simple_form
116
120
 
117
- # You can define the default class to be used on all forms. Can be overriden
121
+ # You can define the default class to be used on all forms. Can be overridden
118
122
  # with `html: { :class }`. Defaults to none.
119
123
  mattr_accessor :default_form_class
120
124
  @@default_form_class = nil
@@ -264,21 +268,21 @@ See http://blog.plataformatec.com.br/2019/09/incorrect-access-control-in-simple-
264
268
  ## SETUP
265
269
 
266
270
  def self.default_input_size=(*)
267
- ActiveSupport::Deprecation.warn "[SIMPLE_FORM] SimpleForm.default_input_size= is deprecated and has no effect", caller
271
+ SimpleForm.deprecator.warn "[SIMPLE_FORM] SimpleForm.default_input_size= is deprecated and has no effect", caller
268
272
  end
269
273
 
270
274
  def self.form_class=(value)
271
- ActiveSupport::Deprecation.warn "[SIMPLE_FORM] SimpleForm.form_class= is deprecated and will be removed in 4.x. Use SimpleForm.default_form_class= instead", caller
275
+ SimpleForm.deprecator.warn "[SIMPLE_FORM] SimpleForm.form_class= is deprecated and will be removed in 4.x. Use SimpleForm.default_form_class= instead", caller
272
276
  @@form_class = value
273
277
  end
274
278
 
275
279
  def self.file_methods=(file_methods)
276
- ActiveSupport::Deprecation.warn(FILE_METHODS_DEPRECATION_WARN, caller)
280
+ SimpleForm.deprecator.warn(FILE_METHODS_DEPRECATION_WARN, caller)
277
281
  @@file_methods = file_methods
278
282
  end
279
283
 
280
284
  def self.file_methods
281
- ActiveSupport::Deprecation.warn(FILE_METHODS_DEPRECATION_WARN, caller)
285
+ SimpleForm.deprecator.warn(FILE_METHODS_DEPRECATION_WARN, caller)
282
286
  @@file_methods
283
287
  end
284
288
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - José Valim
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-02-09 00:00:00.000000000 Z
13
+ date: 2023-10-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
@@ -112,49 +112,16 @@ files:
112
112
  - lib/simple_form/wrappers/many.rb
113
113
  - lib/simple_form/wrappers/root.rb
114
114
  - lib/simple_form/wrappers/single.rb
115
- - test/action_view_extensions/builder_test.rb
116
- - test/action_view_extensions/form_helper_test.rb
117
- - test/components/custom_components_test.rb
118
- - test/components/label_test.rb
119
- - test/form_builder/association_test.rb
120
- - test/form_builder/button_test.rb
121
- - test/form_builder/error_notification_test.rb
122
- - test/form_builder/error_test.rb
123
- - test/form_builder/general_test.rb
124
- - test/form_builder/hint_test.rb
125
- - test/form_builder/input_field_test.rb
126
- - test/form_builder/label_test.rb
127
- - test/form_builder/wrapper_test.rb
128
- - test/generators/simple_form_generator_test.rb
129
- - test/inputs/boolean_input_test.rb
130
- - test/inputs/collection_check_boxes_input_test.rb
131
- - test/inputs/collection_radio_buttons_input_test.rb
132
- - test/inputs/collection_select_input_test.rb
133
- - test/inputs/color_input_test.rb
134
- - test/inputs/datetime_input_test.rb
135
- - test/inputs/disabled_test.rb
136
- - test/inputs/discovery_test.rb
137
- - test/inputs/file_input_test.rb
138
- - test/inputs/general_test.rb
139
- - test/inputs/grouped_collection_select_input_test.rb
140
- - test/inputs/hidden_input_test.rb
141
- - test/inputs/numeric_input_test.rb
142
- - test/inputs/priority_input_test.rb
143
- - test/inputs/readonly_test.rb
144
- - test/inputs/required_test.rb
145
- - test/inputs/rich_text_area_input_test.rb
146
- - test/inputs/string_input_test.rb
147
- - test/inputs/text_input_test.rb
148
- - test/simple_form_test.rb
149
- - test/support/discovery_inputs.rb
150
- - test/support/misc_helpers.rb
151
- - test/support/mock_controller.rb
152
- - test/support/models.rb
153
- - test/test_helper.rb
154
115
  homepage: https://github.com/heartcombo/simple_form
155
116
  licenses:
156
117
  - MIT
157
- metadata: {}
118
+ metadata:
119
+ homepage_uri: https://github.com/heartcombo/simple_form
120
+ documentation_uri: https://rubydoc.info/github/heartcombo/simple_form
121
+ changelog_uri: https://github.com/heartcombo/simple_form/blob/main/CHANGELOG.md
122
+ source_code_uri: https://github.com/heartcombo/simple_form
123
+ bug_tracker_uri: https://github.com/heartcombo/simple_form/issues
124
+ wiki_uri: https://github.com/heartcombo/simple_form/wiki
158
125
  post_install_message:
159
126
  rdoc_options: []
160
127
  require_paths:
@@ -170,47 +137,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
137
  - !ruby/object:Gem::Version
171
138
  version: '0'
172
139
  requirements: []
173
- rubygems_version: 3.2.6
140
+ rubygems_version: 3.4.10
174
141
  signing_key:
175
142
  specification_version: 4
176
143
  summary: Forms made easy!
177
- test_files:
178
- - test/components/label_test.rb
179
- - test/components/custom_components_test.rb
180
- - test/support/discovery_inputs.rb
181
- - test/support/misc_helpers.rb
182
- - test/support/mock_controller.rb
183
- - test/support/models.rb
184
- - test/test_helper.rb
185
- - test/form_builder/error_test.rb
186
- - test/form_builder/hint_test.rb
187
- - test/form_builder/error_notification_test.rb
188
- - test/form_builder/general_test.rb
189
- - test/form_builder/button_test.rb
190
- - test/form_builder/input_field_test.rb
191
- - test/form_builder/label_test.rb
192
- - test/form_builder/wrapper_test.rb
193
- - test/form_builder/association_test.rb
194
- - test/generators/simple_form_generator_test.rb
195
- - test/action_view_extensions/builder_test.rb
196
- - test/action_view_extensions/form_helper_test.rb
197
- - test/simple_form_test.rb
198
- - test/inputs/string_input_test.rb
199
- - test/inputs/numeric_input_test.rb
200
- - test/inputs/rich_text_area_input_test.rb
201
- - test/inputs/readonly_test.rb
202
- - test/inputs/grouped_collection_select_input_test.rb
203
- - test/inputs/text_input_test.rb
204
- - test/inputs/collection_check_boxes_input_test.rb
205
- - test/inputs/boolean_input_test.rb
206
- - test/inputs/disabled_test.rb
207
- - test/inputs/discovery_test.rb
208
- - test/inputs/collection_select_input_test.rb
209
- - test/inputs/general_test.rb
210
- - test/inputs/color_input_test.rb
211
- - test/inputs/required_test.rb
212
- - test/inputs/collection_radio_buttons_input_test.rb
213
- - test/inputs/priority_input_test.rb
214
- - test/inputs/hidden_input_test.rb
215
- - test/inputs/file_input_test.rb
216
- - test/inputs/datetime_input_test.rb
144
+ test_files: []