simple_form 3.0.4 → 5.0.3
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 +5 -5
- data/CHANGELOG.md +199 -33
- data/MIT-LICENSE +2 -1
- data/README.md +453 -128
- data/lib/generators/simple_form/install_generator.rb +4 -3
- data/lib/generators/simple_form/templates/README +3 -5
- data/lib/generators/simple_form/templates/_form.html.erb +2 -0
- data/lib/generators/simple_form/templates/_form.html.haml +2 -0
- data/lib/generators/simple_form/templates/_form.html.slim +1 -0
- data/lib/generators/simple_form/templates/config/initializers/simple_form.rb +47 -16
- data/lib/generators/simple_form/templates/config/initializers/simple_form_bootstrap.rb +418 -23
- data/lib/generators/simple_form/templates/config/initializers/simple_form_foundation.rb +101 -5
- data/lib/generators/simple_form/templates/config/locales/simple_form.en.yml +7 -2
- data/lib/simple_form/action_view_extensions/builder.rb +2 -0
- data/lib/simple_form/action_view_extensions/form_helper.rb +10 -3
- data/lib/simple_form/components/errors.rb +39 -6
- data/lib/simple_form/components/hints.rb +3 -2
- data/lib/simple_form/components/html5.rb +16 -5
- data/lib/simple_form/components/label_input.rb +21 -2
- data/lib/simple_form/components/labels.rb +22 -11
- data/lib/simple_form/components/maxlength.rb +9 -5
- data/lib/simple_form/components/min_max.rb +2 -1
- data/lib/simple_form/components/minlength.rb +38 -0
- data/lib/simple_form/components/pattern.rb +2 -1
- data/lib/simple_form/components/placeholders.rb +4 -3
- data/lib/simple_form/components/readonly.rb +2 -1
- data/lib/simple_form/components.rb +2 -0
- data/lib/simple_form/error_notification.rb +1 -0
- data/lib/simple_form/form_builder.rb +220 -89
- data/lib/simple_form/helpers/autofocus.rb +1 -0
- data/lib/simple_form/helpers/disabled.rb +1 -0
- data/lib/simple_form/helpers/readonly.rb +1 -0
- data/lib/simple_form/helpers/required.rb +1 -0
- data/lib/simple_form/helpers/validators.rb +2 -1
- data/lib/simple_form/helpers.rb +6 -5
- data/lib/simple_form/i18n_cache.rb +1 -0
- data/lib/simple_form/inputs/base.rb +62 -16
- data/lib/simple_form/inputs/block_input.rb +2 -1
- data/lib/simple_form/inputs/boolean_input.rb +40 -16
- data/lib/simple_form/inputs/collection_check_boxes_input.rb +3 -2
- data/lib/simple_form/inputs/collection_input.rb +37 -14
- data/lib/simple_form/inputs/collection_radio_buttons_input.rb +9 -13
- data/lib/simple_form/inputs/collection_select_input.rb +5 -2
- data/lib/simple_form/inputs/color_input.rb +14 -0
- data/lib/simple_form/inputs/date_time_input.rb +24 -9
- data/lib/simple_form/inputs/file_input.rb +5 -2
- data/lib/simple_form/inputs/grouped_collection_select_input.rb +16 -3
- data/lib/simple_form/inputs/hidden_input.rb +5 -2
- data/lib/simple_form/inputs/numeric_input.rb +6 -4
- data/lib/simple_form/inputs/password_input.rb +6 -3
- data/lib/simple_form/inputs/priority_input.rb +5 -6
- data/lib/simple_form/inputs/range_input.rb +2 -1
- data/lib/simple_form/inputs/rich_text_area_input.rb +12 -0
- data/lib/simple_form/inputs/string_input.rb +7 -4
- data/lib/simple_form/inputs/text_input.rb +6 -3
- data/lib/simple_form/inputs.rb +3 -0
- data/lib/simple_form/map_type.rb +1 -0
- data/lib/simple_form/railtie.rb +8 -0
- data/lib/simple_form/tags.rb +13 -2
- data/lib/simple_form/version.rb +2 -1
- data/lib/simple_form/wrappers/builder.rb +7 -6
- data/lib/simple_form/wrappers/leaf.rb +29 -0
- data/lib/simple_form/wrappers/many.rb +7 -6
- data/lib/simple_form/wrappers/root.rb +10 -3
- data/lib/simple_form/wrappers/single.rb +7 -4
- data/lib/simple_form/wrappers.rb +2 -0
- data/lib/simple_form.rb +137 -21
- data/test/action_view_extensions/builder_test.rb +64 -45
- data/test/action_view_extensions/form_helper_test.rb +36 -16
- data/test/components/custom_components_test.rb +62 -0
- data/test/components/label_test.rb +70 -41
- data/test/form_builder/association_test.rb +85 -37
- data/test/form_builder/button_test.rb +11 -10
- data/test/form_builder/error_notification_test.rb +2 -1
- data/test/form_builder/error_test.rb +146 -33
- data/test/form_builder/general_test.rb +183 -81
- data/test/form_builder/hint_test.rb +24 -18
- data/test/form_builder/input_field_test.rb +105 -75
- data/test/form_builder/label_test.rb +68 -13
- data/test/form_builder/wrapper_test.rb +197 -22
- data/test/generators/simple_form_generator_test.rb +8 -7
- data/test/inputs/boolean_input_test.rb +97 -6
- data/test/inputs/collection_check_boxes_input_test.rb +117 -25
- data/test/inputs/collection_radio_buttons_input_test.rb +176 -54
- data/test/inputs/collection_select_input_test.rb +189 -77
- data/test/inputs/color_input_test.rb +10 -0
- data/test/inputs/datetime_input_test.rb +121 -50
- data/test/inputs/disabled_test.rb +29 -15
- data/test/inputs/discovery_test.rb +79 -6
- data/test/inputs/file_input_test.rb +3 -2
- data/test/inputs/general_test.rb +23 -22
- data/test/inputs/grouped_collection_select_input_test.rb +54 -17
- data/test/inputs/hidden_input_test.rb +5 -4
- data/test/inputs/numeric_input_test.rb +48 -44
- data/test/inputs/priority_input_test.rb +17 -16
- data/test/inputs/readonly_test.rb +20 -19
- data/test/inputs/required_test.rb +58 -13
- data/test/inputs/rich_text_area_input_test.rb +15 -0
- data/test/inputs/string_input_test.rb +58 -36
- data/test/inputs/text_input_test.rb +20 -7
- data/test/simple_form_test.rb +9 -0
- data/test/support/discovery_inputs.rb +40 -2
- data/test/support/misc_helpers.rb +113 -5
- data/test/support/mock_controller.rb +7 -1
- data/test/support/models.rb +162 -39
- data/test/test_helper.rb +19 -4
- metadata +51 -43
data/test/support/models.rb
CHANGED
@@ -1,22 +1,45 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
Association = Struct.new(:klass, :name, :macro, :scope, :options)
|
2
3
|
|
3
4
|
Column = Struct.new(:name, :type, :limit) do
|
4
|
-
# Returns +true+ if the column is either of type integer, float or decimal.
|
5
|
-
def number?
|
6
|
-
type == :integer || type == :float || type == :decimal
|
7
|
-
end
|
8
5
|
end
|
9
6
|
|
10
|
-
Relation = Struct.new(:
|
7
|
+
Relation = Struct.new(:records) do
|
8
|
+
delegate :each, to: :records
|
9
|
+
|
11
10
|
def where(conditions = nil)
|
12
|
-
self.class.new conditions ?
|
11
|
+
self.class.new conditions ? [records.first] : records
|
13
12
|
end
|
14
13
|
|
15
14
|
def order(conditions = nil)
|
16
|
-
self.class.new conditions ?
|
15
|
+
self.class.new conditions ? records.last : records
|
17
16
|
end
|
18
17
|
|
19
|
-
alias_method :to_a,
|
18
|
+
alias_method :to_a, :records
|
19
|
+
alias_method :to_ary, :records
|
20
|
+
end
|
21
|
+
|
22
|
+
Decorator = Struct.new(:object) do
|
23
|
+
def to_model
|
24
|
+
object
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
Picture = Struct.new(:id, :name) do
|
29
|
+
extend ActiveModel::Naming
|
30
|
+
include ActiveModel::Conversion
|
31
|
+
|
32
|
+
def self.where(conditions = nil)
|
33
|
+
if conditions.is_a?(Hash) && conditions[:name]
|
34
|
+
all.to_a.last
|
35
|
+
else
|
36
|
+
all
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.all
|
41
|
+
Relation.new((1..3).map { |i| new(i, "#{name} #{i}") })
|
42
|
+
end
|
20
43
|
end
|
21
44
|
|
22
45
|
Company = Struct.new(:id, :name) do
|
@@ -28,9 +51,22 @@ Company = Struct.new(:id, :name) do
|
|
28
51
|
end
|
29
52
|
|
30
53
|
def self._relation
|
31
|
-
|
54
|
+
all
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.all
|
58
|
+
Relation.new((1..3).map { |i| new(i, "#{name} #{i}") })
|
32
59
|
end
|
33
60
|
|
61
|
+
def persisted?
|
62
|
+
true
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
Friend = Struct.new(:id, :name) do
|
67
|
+
extend ActiveModel::Naming
|
68
|
+
include ActiveModel::Conversion
|
69
|
+
|
34
70
|
def self.all
|
35
71
|
(1..3).map { |i| new(i, "#{name} #{i}") }
|
36
72
|
end
|
@@ -40,7 +76,11 @@ Company = Struct.new(:id, :name) do
|
|
40
76
|
end
|
41
77
|
end
|
42
78
|
|
43
|
-
class Tag < Company
|
79
|
+
class Tag < Company
|
80
|
+
def group_method
|
81
|
+
["category-1"]
|
82
|
+
end
|
83
|
+
end
|
44
84
|
|
45
85
|
TagGroup = Struct.new(:id, :name, :tags)
|
46
86
|
|
@@ -53,7 +93,9 @@ class User
|
|
53
93
|
:delivery_time, :born_at, :special_company_id, :country, :tags, :tag_ids,
|
54
94
|
:avatar, :home_picture, :email, :status, :residence_country, :phone_number,
|
55
95
|
:post_count, :lock_version, :amount, :attempts, :action, :credit_card, :gender,
|
56
|
-
:extra_special_company_id
|
96
|
+
:extra_special_company_id, :pictures, :picture_ids, :special_pictures,
|
97
|
+
:special_picture_ids, :uuid, :friends, :friend_ids, :special_tags, :special_tag_ids,
|
98
|
+
:citext, :hstore, :json, :jsonb, :hourly, :favorite_color
|
57
99
|
|
58
100
|
def self.build(extra_attributes = {})
|
59
101
|
attributes = {
|
@@ -66,7 +108,7 @@ class User
|
|
66
108
|
new attributes
|
67
109
|
end
|
68
110
|
|
69
|
-
def initialize(options={})
|
111
|
+
def initialize(options = {})
|
70
112
|
@new_record = false
|
71
113
|
options.each do |key, value|
|
72
114
|
send("#{key}=", value)
|
@@ -104,48 +146,108 @@ class User
|
|
104
146
|
when :attempts then :integer
|
105
147
|
when :action then :string
|
106
148
|
when :credit_card then :string
|
149
|
+
else attribute.to_sym
|
107
150
|
end
|
108
151
|
Column.new(attribute, column_type, limit)
|
109
152
|
end
|
110
153
|
|
111
|
-
|
154
|
+
begin
|
155
|
+
require 'active_model/type'
|
156
|
+
begin
|
157
|
+
ActiveModel::Type.lookup(:text)
|
158
|
+
rescue ArgumentError # :text is no longer an ActiveModel::Type
|
159
|
+
# But we don't want our tests to depend on ActiveRecord
|
160
|
+
class ::ActiveModel::Type::Text < ActiveModel::Type::String
|
161
|
+
def type; :text; end
|
162
|
+
end
|
163
|
+
ActiveModel::Type.register(:text, ActiveModel::Type::Text)
|
164
|
+
end
|
165
|
+
def type_for_attribute(attribute)
|
166
|
+
column_type, limit = case attribute
|
167
|
+
when 'name', 'status', 'password' then [:string, 100]
|
168
|
+
when 'description' then [:text, 200]
|
169
|
+
when 'age' then :integer
|
170
|
+
when 'credit_limit' then [:decimal, 15]
|
171
|
+
when 'active' then :boolean
|
172
|
+
when 'born_at' then :date
|
173
|
+
when 'delivery_time' then :time
|
174
|
+
when 'created_at' then :datetime
|
175
|
+
when 'updated_at' then :datetime
|
176
|
+
when 'lock_version' then :integer
|
177
|
+
when 'home_picture' then :string
|
178
|
+
when 'amount' then :integer
|
179
|
+
when 'attempts' then :integer
|
180
|
+
when 'action' then :string
|
181
|
+
when 'credit_card' then :string
|
182
|
+
when 'uuid' then :string
|
183
|
+
when 'citext' then :string
|
184
|
+
when 'hstore' then [:text, 200]
|
185
|
+
when 'json' then [:text, 200]
|
186
|
+
when 'jsonb' then [:text, 200]
|
187
|
+
end
|
188
|
+
|
189
|
+
ActiveModel::Type.lookup(column_type, limit: limit)
|
190
|
+
end
|
191
|
+
rescue LoadError
|
192
|
+
end
|
193
|
+
|
194
|
+
def has_attribute?(attribute)
|
195
|
+
case attribute.to_sym
|
196
|
+
when :name, :status, :password, :description, :age,
|
197
|
+
:credit_limit, :active, :born_at, :delivery_time,
|
198
|
+
:created_at, :updated_at, :lock_version, :home_picture,
|
199
|
+
:amount, :attempts, :action, :credit_card, :uuid,
|
200
|
+
:citext, :hstore, :json, :jsonb then true
|
201
|
+
else false
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
def self.human_attribute_name(attribute, options = {})
|
112
206
|
case attribute
|
113
|
-
when 'name'
|
207
|
+
when 'name', :name
|
114
208
|
'Super User Name!'
|
115
209
|
when 'description'
|
116
210
|
'User Description!'
|
117
211
|
when 'company'
|
118
212
|
'Company Human Name!'
|
119
213
|
else
|
120
|
-
attribute.humanize
|
214
|
+
attribute.to_s.humanize
|
121
215
|
end
|
122
216
|
end
|
123
217
|
|
124
218
|
def self.reflect_on_association(association)
|
125
219
|
case association
|
126
220
|
when :company
|
127
|
-
Association.new(Company, association, :belongs_to, {})
|
221
|
+
Association.new(Company, association, :belongs_to, nil, {})
|
128
222
|
when :tags
|
129
|
-
Association.new(Tag, association, :has_many, {})
|
223
|
+
Association.new(Tag, association, :has_many, nil, {})
|
224
|
+
when :special_tags
|
225
|
+
Association.new(Tag, association, :has_many, ->(user) { where(id: user.id) }, {})
|
130
226
|
when :first_company
|
131
|
-
Association.new(Company, association, :has_one, {})
|
227
|
+
Association.new(Company, association, :has_one, nil, {})
|
132
228
|
when :special_company
|
133
|
-
Association.new(Company, association, :belongs_to,
|
229
|
+
Association.new(Company, association, :belongs_to, nil, conditions: { id: 1 })
|
134
230
|
when :extra_special_company
|
135
|
-
Association.new(Company, association, :belongs_to,
|
231
|
+
Association.new(Company, association, :belongs_to, nil, conditions: proc { { id: self.id } })
|
232
|
+
when :pictures
|
233
|
+
Association.new(Picture, association, :has_many, nil, {})
|
234
|
+
when :special_pictures
|
235
|
+
Association.new(Picture, association, :has_many, proc { where(name: self.name) }, {})
|
236
|
+
when :friends
|
237
|
+
Association.new(Friend, association, :has_many, nil, {})
|
136
238
|
end
|
137
239
|
end
|
138
240
|
|
139
241
|
def errors
|
140
242
|
@errors ||= begin
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
243
|
+
errors = ActiveModel::Errors.new(self)
|
244
|
+
errors.add(:name, "cannot be blank")
|
245
|
+
errors.add(:description, 'must be longer than 15 characters')
|
246
|
+
errors.add(:age, 'is not a number')
|
247
|
+
errors.add(:age, 'must be greater than 18')
|
248
|
+
errors.add(:company, 'company must be present')
|
249
|
+
errors.add(:company_id, 'must be valid')
|
250
|
+
errors
|
149
251
|
end
|
150
252
|
end
|
151
253
|
|
@@ -158,8 +260,8 @@ class ValidatingUser < User
|
|
158
260
|
include ActiveModel::Validations
|
159
261
|
validates :name, presence: true
|
160
262
|
validates :company, presence: true
|
161
|
-
validates :age, presence: true, if:
|
162
|
-
validates :amount, presence: true, unless:
|
263
|
+
validates :age, presence: true, if: proc { |user| user.name }
|
264
|
+
validates :amount, presence: true, unless: proc { |user| user.age }
|
163
265
|
|
164
266
|
validates :action, presence: true, on: :create
|
165
267
|
validates :credit_limit, presence: true, on: :save
|
@@ -177,9 +279,8 @@ class ValidatingUser < User
|
|
177
279
|
greater_than_or_equal_to: :min_attempts,
|
178
280
|
less_than_or_equal_to: :max_attempts,
|
179
281
|
only_integer: true
|
180
|
-
validates_length_of :name, maximum: 25
|
181
|
-
validates_length_of :description,
|
182
|
-
validates_length_of :action, maximum: 10, tokenizer: lambda { |str| str.scan(/\w+/) }
|
282
|
+
validates_length_of :name, maximum: 25, minimum: 5
|
283
|
+
validates_length_of :description, in: 15..50
|
183
284
|
validates_length_of :home_picture, is: 12
|
184
285
|
|
185
286
|
def min_amount
|
@@ -206,16 +307,16 @@ class OtherValidatingUser < User
|
|
206
307
|
less_than: 100,
|
207
308
|
only_integer: true
|
208
309
|
validates_numericality_of :amount,
|
209
|
-
greater_than:
|
210
|
-
less_than:
|
310
|
+
greater_than: proc { |user| user.age },
|
311
|
+
less_than: proc { |user| user.age + 100 },
|
211
312
|
only_integer: true
|
212
313
|
validates_numericality_of :attempts,
|
213
|
-
greater_than_or_equal_to:
|
214
|
-
less_than_or_equal_to:
|
314
|
+
greater_than_or_equal_to: proc { |user| user.age },
|
315
|
+
less_than_or_equal_to: proc { |user| user.age + 100 },
|
215
316
|
only_integer: true
|
216
317
|
|
217
318
|
validates_format_of :country, with: /\w+/
|
218
|
-
validates_format_of :name, with:
|
319
|
+
validates_format_of :name, with: proc { /\w+/ }
|
219
320
|
validates_format_of :description, without: /\d+/
|
220
321
|
end
|
221
322
|
|
@@ -232,3 +333,25 @@ end
|
|
232
333
|
|
233
334
|
class UserNumber1And2 < User
|
234
335
|
end
|
336
|
+
|
337
|
+
class UserWithAttachment < User
|
338
|
+
def avatar_attachment
|
339
|
+
OpenStruct.new
|
340
|
+
end
|
341
|
+
|
342
|
+
def avatars_attachments
|
343
|
+
OpenStruct.new
|
344
|
+
end
|
345
|
+
|
346
|
+
def remote_cover_url
|
347
|
+
"/uploads/cover.png"
|
348
|
+
end
|
349
|
+
|
350
|
+
def profile_image_attacher
|
351
|
+
OpenStruct.new
|
352
|
+
end
|
353
|
+
|
354
|
+
def portrait_file_name
|
355
|
+
"portrait.png"
|
356
|
+
end
|
357
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -1,14 +1,13 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
3
2
|
require 'minitest/autorun'
|
4
3
|
|
5
4
|
require 'active_model'
|
6
5
|
require 'action_controller'
|
7
6
|
require 'action_view'
|
7
|
+
|
8
8
|
ActionView::RoutingUrlFor.send(:include, ActionDispatch::Routing::UrlFor)
|
9
9
|
|
10
10
|
require 'action_view/template'
|
11
|
-
|
12
11
|
require 'action_view/test_case'
|
13
12
|
|
14
13
|
module Rails
|
@@ -30,12 +29,24 @@ I18n.default_locale = :en
|
|
30
29
|
|
31
30
|
require 'country_select'
|
32
31
|
|
33
|
-
|
32
|
+
if defined?(HTMLSelector::NO_STRIP)
|
33
|
+
HTMLSelector::NO_STRIP << "label"
|
34
|
+
else
|
35
|
+
ActionDispatch::Assertions::NO_STRIP << "label"
|
36
|
+
end
|
37
|
+
|
38
|
+
if ActiveSupport::TestCase.respond_to?(:test_order=)
|
39
|
+
ActiveSupport::TestCase.test_order = :random
|
40
|
+
end
|
41
|
+
|
42
|
+
require "rails/test_unit/line_filtering"
|
34
43
|
|
35
44
|
class ActionView::TestCase
|
36
45
|
include MiscHelpers
|
37
46
|
include SimpleForm::ActionViewExtensions::FormHelper
|
38
47
|
|
48
|
+
extend Rails::LineFiltering
|
49
|
+
|
39
50
|
setup :set_controller
|
40
51
|
setup :setup_users
|
41
52
|
|
@@ -45,8 +56,11 @@ class ActionView::TestCase
|
|
45
56
|
|
46
57
|
def setup_users(extra_attributes = {})
|
47
58
|
@user = User.build(extra_attributes)
|
59
|
+
@decorated_user = Decorator.new(@user)
|
48
60
|
|
49
61
|
@validating_user = ValidatingUser.build({
|
62
|
+
name: 'Tester McTesterson',
|
63
|
+
description: 'A test user of the most distinguished caliber',
|
50
64
|
home_picture: 'Home picture',
|
51
65
|
age: 19,
|
52
66
|
amount: 15,
|
@@ -77,4 +91,5 @@ class ActionView::TestCase
|
|
77
91
|
alias :validating_user_path :user_path
|
78
92
|
alias :validating_users_path :user_path
|
79
93
|
alias :other_validating_user_path :user_path
|
94
|
+
alias :user_with_attachment_path :user_path
|
80
95
|
end
|
metadata
CHANGED
@@ -1,47 +1,47 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Valim
|
8
8
|
- Carlos Antônio
|
9
9
|
- Rafael França
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2020-09-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activemodel
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - "
|
19
|
+
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '5.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- - "
|
26
|
+
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
28
|
+
version: '5.0'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: actionpack
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- - "
|
33
|
+
- - ">="
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '
|
35
|
+
version: '5.0'
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- - "
|
40
|
+
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '5.0'
|
43
43
|
description: Forms made easy!
|
44
|
-
email:
|
44
|
+
email: heartcombo@googlegroups.com
|
45
45
|
executables: []
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- lib/simple_form/components/labels.rb
|
71
71
|
- lib/simple_form/components/maxlength.rb
|
72
72
|
- lib/simple_form/components/min_max.rb
|
73
|
+
- lib/simple_form/components/minlength.rb
|
73
74
|
- lib/simple_form/components/pattern.rb
|
74
75
|
- lib/simple_form/components/placeholders.rb
|
75
76
|
- lib/simple_form/components/readonly.rb
|
@@ -90,6 +91,7 @@ files:
|
|
90
91
|
- lib/simple_form/inputs/collection_input.rb
|
91
92
|
- lib/simple_form/inputs/collection_radio_buttons_input.rb
|
92
93
|
- lib/simple_form/inputs/collection_select_input.rb
|
94
|
+
- lib/simple_form/inputs/color_input.rb
|
93
95
|
- lib/simple_form/inputs/date_time_input.rb
|
94
96
|
- lib/simple_form/inputs/file_input.rb
|
95
97
|
- lib/simple_form/inputs/grouped_collection_select_input.rb
|
@@ -98,6 +100,7 @@ files:
|
|
98
100
|
- lib/simple_form/inputs/password_input.rb
|
99
101
|
- lib/simple_form/inputs/priority_input.rb
|
100
102
|
- lib/simple_form/inputs/range_input.rb
|
103
|
+
- lib/simple_form/inputs/rich_text_area_input.rb
|
101
104
|
- lib/simple_form/inputs/string_input.rb
|
102
105
|
- lib/simple_form/inputs/text_input.rb
|
103
106
|
- lib/simple_form/map_type.rb
|
@@ -106,11 +109,13 @@ files:
|
|
106
109
|
- lib/simple_form/version.rb
|
107
110
|
- lib/simple_form/wrappers.rb
|
108
111
|
- lib/simple_form/wrappers/builder.rb
|
112
|
+
- lib/simple_form/wrappers/leaf.rb
|
109
113
|
- lib/simple_form/wrappers/many.rb
|
110
114
|
- lib/simple_form/wrappers/root.rb
|
111
115
|
- lib/simple_form/wrappers/single.rb
|
112
116
|
- test/action_view_extensions/builder_test.rb
|
113
117
|
- test/action_view_extensions/form_helper_test.rb
|
118
|
+
- test/components/custom_components_test.rb
|
114
119
|
- test/components/label_test.rb
|
115
120
|
- test/form_builder/association_test.rb
|
116
121
|
- test/form_builder/button_test.rb
|
@@ -126,6 +131,7 @@ files:
|
|
126
131
|
- test/inputs/collection_check_boxes_input_test.rb
|
127
132
|
- test/inputs/collection_radio_buttons_input_test.rb
|
128
133
|
- test/inputs/collection_select_input_test.rb
|
134
|
+
- test/inputs/color_input_test.rb
|
129
135
|
- test/inputs/datetime_input_test.rb
|
130
136
|
- test/inputs/disabled_test.rb
|
131
137
|
- test/inputs/discovery_test.rb
|
@@ -137,6 +143,7 @@ files:
|
|
137
143
|
- test/inputs/priority_input_test.rb
|
138
144
|
- test/inputs/readonly_test.rb
|
139
145
|
- test/inputs/required_test.rb
|
146
|
+
- test/inputs/rich_text_area_input_test.rb
|
140
147
|
- test/inputs/string_input_test.rb
|
141
148
|
- test/inputs/text_input_test.rb
|
142
149
|
- test/simple_form_test.rb
|
@@ -145,11 +152,11 @@ files:
|
|
145
152
|
- test/support/mock_controller.rb
|
146
153
|
- test/support/models.rb
|
147
154
|
- test/test_helper.rb
|
148
|
-
homepage: https://github.com/
|
155
|
+
homepage: https://github.com/heartcombo/simple_form
|
149
156
|
licenses:
|
150
157
|
- MIT
|
151
158
|
metadata: {}
|
152
|
-
post_install_message:
|
159
|
+
post_install_message:
|
153
160
|
rdoc_options: []
|
154
161
|
require_paths:
|
155
162
|
- lib
|
@@ -157,53 +164,54 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
164
|
requirements:
|
158
165
|
- - ">="
|
159
166
|
- !ruby/object:Gem::Version
|
160
|
-
version:
|
167
|
+
version: 2.3.0
|
161
168
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
169
|
requirements:
|
163
170
|
- - ">="
|
164
171
|
- !ruby/object:Gem::Version
|
165
172
|
version: '0'
|
166
173
|
requirements: []
|
167
|
-
|
168
|
-
|
169
|
-
signing_key:
|
174
|
+
rubygems_version: 3.1.2
|
175
|
+
signing_key:
|
170
176
|
specification_version: 4
|
171
177
|
summary: Forms made easy!
|
172
178
|
test_files:
|
173
|
-
- test/action_view_extensions/builder_test.rb
|
174
|
-
- test/action_view_extensions/form_helper_test.rb
|
175
179
|
- test/components/label_test.rb
|
176
|
-
- test/
|
177
|
-
- test/
|
178
|
-
- test/
|
180
|
+
- test/components/custom_components_test.rb
|
181
|
+
- test/support/discovery_inputs.rb
|
182
|
+
- test/support/misc_helpers.rb
|
183
|
+
- test/support/mock_controller.rb
|
184
|
+
- test/support/models.rb
|
185
|
+
- test/test_helper.rb
|
179
186
|
- test/form_builder/error_test.rb
|
180
|
-
- test/form_builder/general_test.rb
|
181
187
|
- test/form_builder/hint_test.rb
|
188
|
+
- test/form_builder/error_notification_test.rb
|
189
|
+
- test/form_builder/general_test.rb
|
190
|
+
- test/form_builder/button_test.rb
|
182
191
|
- test/form_builder/input_field_test.rb
|
183
192
|
- test/form_builder/label_test.rb
|
184
193
|
- test/form_builder/wrapper_test.rb
|
194
|
+
- test/form_builder/association_test.rb
|
185
195
|
- test/generators/simple_form_generator_test.rb
|
186
|
-
- test/
|
196
|
+
- test/action_view_extensions/builder_test.rb
|
197
|
+
- test/action_view_extensions/form_helper_test.rb
|
198
|
+
- test/simple_form_test.rb
|
199
|
+
- test/inputs/string_input_test.rb
|
200
|
+
- test/inputs/numeric_input_test.rb
|
201
|
+
- test/inputs/rich_text_area_input_test.rb
|
202
|
+
- test/inputs/readonly_test.rb
|
203
|
+
- test/inputs/grouped_collection_select_input_test.rb
|
204
|
+
- test/inputs/text_input_test.rb
|
187
205
|
- test/inputs/collection_check_boxes_input_test.rb
|
188
|
-
- test/inputs/
|
189
|
-
- test/inputs/collection_select_input_test.rb
|
190
|
-
- test/inputs/datetime_input_test.rb
|
206
|
+
- test/inputs/boolean_input_test.rb
|
191
207
|
- test/inputs/disabled_test.rb
|
192
208
|
- test/inputs/discovery_test.rb
|
193
|
-
- test/inputs/
|
209
|
+
- test/inputs/collection_select_input_test.rb
|
194
210
|
- test/inputs/general_test.rb
|
195
|
-
- test/inputs/
|
196
|
-
- test/inputs/hidden_input_test.rb
|
197
|
-
- test/inputs/numeric_input_test.rb
|
198
|
-
- test/inputs/priority_input_test.rb
|
199
|
-
- test/inputs/readonly_test.rb
|
211
|
+
- test/inputs/color_input_test.rb
|
200
212
|
- test/inputs/required_test.rb
|
201
|
-
- test/inputs/
|
202
|
-
- test/inputs/
|
203
|
-
- test/
|
204
|
-
- test/
|
205
|
-
- test/
|
206
|
-
- test/support/mock_controller.rb
|
207
|
-
- test/support/models.rb
|
208
|
-
- test/test_helper.rb
|
209
|
-
has_rdoc:
|
213
|
+
- test/inputs/collection_radio_buttons_input_test.rb
|
214
|
+
- test/inputs/priority_input_test.rb
|
215
|
+
- test/inputs/hidden_input_test.rb
|
216
|
+
- test/inputs/file_input_test.rb
|
217
|
+
- test/inputs/datetime_input_test.rb
|