formtastic 5.0.0 → 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 +4 -4
- data/.gitattributes +0 -1
- data/.github/workflows/integration.yaml +36 -0
- data/.github/workflows/test.yml +26 -20
- data/.gitignore +2 -1
- data/Appraisals +23 -0
- data/CONTRIBUTING.md +27 -0
- data/Gemfile +5 -0
- data/MIT-LICENSE +1 -1
- data/README.md +14 -46
- data/RELEASE_PROCESS +0 -1
- data/Rakefile +1 -1
- data/formtastic.gemspec +17 -10
- data/gemfiles/rails_72.gemfile +9 -0
- data/gemfiles/rails_80.gemfile +9 -0
- data/gemfiles/rails_81.gemfile +9 -0
- data/gemfiles/rails_edge.gemfile +9 -0
- data/lib/formtastic/actions/input_action.rb +1 -1
- data/lib/formtastic/actions/link_action.rb +1 -1
- data/lib/formtastic/form_builder.rb +27 -27
- data/lib/formtastic/helpers/action_helper.rb +0 -1
- data/lib/formtastic/helpers/actions_helper.rb +1 -1
- data/lib/formtastic/helpers/errors_helper.rb +71 -14
- data/lib/formtastic/helpers/fieldset_wrapper.rb +1 -1
- data/lib/formtastic/helpers/form_helper.rb +3 -3
- data/lib/formtastic/helpers/input_helper.rb +5 -3
- data/lib/formtastic/i18n.rb +0 -1
- data/lib/formtastic/inputs/base/aria.rb +26 -0
- data/lib/formtastic/inputs/base/collections.rb +1 -1
- data/lib/formtastic/inputs/base/errors.rb +1 -1
- data/lib/formtastic/inputs/base/html.rb +1 -1
- data/lib/formtastic/inputs/base/labelling.rb +1 -1
- data/lib/formtastic/inputs/base/validations.rb +32 -8
- data/lib/formtastic/inputs/base.rb +7 -5
- data/lib/formtastic/inputs/country_input.rb +9 -6
- data/lib/formtastic/inputs/datalist_input.rb +2 -2
- data/lib/formtastic/inputs/number_input.rb +1 -1
- data/lib/formtastic/inputs/range_input.rb +1 -1
- data/lib/formtastic/inputs/time_zone_input.rb +1 -1
- data/lib/formtastic/version.rb +1 -1
- data/lib/formtastic.rb +6 -2
- data/lib/generators/formtastic/form/form_generator.rb +2 -3
- data/lib/generators/formtastic/install/install_generator.rb +0 -1
- data/lib/generators/formtastic/stylesheets/stylesheets_generator.rb +15 -0
- data/{app/assets/stylesheets → lib/generators/templates}/formtastic.css +4 -4
- data/lib/generators/templates/formtastic.rb +7 -1
- data/script/integration-template.rb +14 -11
- data/script/integration.sh +17 -4
- data/spec/action_class_finder_spec.rb +0 -1
- data/spec/actions/button_action_spec.rb +0 -1
- data/spec/actions/generic_action_spec.rb +2 -3
- data/spec/actions/input_action_spec.rb +0 -1
- data/spec/actions/link_action_spec.rb +0 -1
- data/spec/builder/custom_builder_spec.rb +0 -1
- data/spec/builder/error_proc_spec.rb +0 -1
- data/spec/builder/semantic_fields_for_spec.rb +72 -2
- data/spec/fast_spec_helper.rb +0 -1
- data/spec/generators/formtastic/stylesheets/stylesheets_generator_spec.rb +22 -0
- data/spec/helpers/actions_helper_spec.rb +0 -1
- data/spec/helpers/form_helper_spec.rb +0 -1
- data/spec/helpers/input_helper_spec.rb +12 -1
- data/spec/helpers/inputs_helper_spec.rb +1 -2
- data/spec/helpers/reflection_helper_spec.rb +0 -1
- data/spec/helpers/semantic_errors_helper_spec.rb +114 -7
- data/spec/i18n_spec.rb +1 -2
- data/spec/input_class_finder_spec.rb +0 -1
- data/spec/inputs/base/collections_spec.rb +41 -0
- data/spec/inputs/boolean_input_spec.rb +0 -1
- data/spec/inputs/check_boxes_input_spec.rb +1 -2
- data/spec/inputs/color_input_spec.rb +0 -1
- data/spec/inputs/country_input_spec.rb +5 -6
- data/spec/inputs/custom_input_spec.rb +0 -1
- data/spec/inputs/datalist_input_spec.rb +0 -1
- data/spec/inputs/date_picker_input_spec.rb +0 -1
- data/spec/inputs/date_select_input_spec.rb +1 -2
- data/spec/inputs/datetime_picker_input_spec.rb +0 -1
- data/spec/inputs/datetime_select_input_spec.rb +1 -2
- data/spec/inputs/email_input_spec.rb +0 -1
- data/spec/inputs/file_input_spec.rb +0 -1
- data/spec/inputs/hidden_input_spec.rb +0 -1
- data/spec/inputs/include_blank_spec.rb +0 -1
- data/spec/inputs/label_spec.rb +32 -1
- data/spec/inputs/number_input_spec.rb +0 -1
- data/spec/inputs/password_input_spec.rb +1 -2
- data/spec/inputs/phone_input_spec.rb +0 -1
- data/spec/inputs/placeholder_spec.rb +0 -1
- data/spec/inputs/radio_input_spec.rb +0 -1
- data/spec/inputs/range_input_spec.rb +0 -1
- data/spec/inputs/readonly_spec.rb +0 -1
- data/spec/inputs/search_input_spec.rb +0 -1
- data/spec/inputs/select_input_spec.rb +0 -1
- data/spec/inputs/string_input_spec.rb +67 -2
- data/spec/inputs/text_input_spec.rb +0 -1
- data/spec/inputs/time_picker_input_spec.rb +0 -1
- data/spec/inputs/time_select_input_spec.rb +1 -2
- data/spec/inputs/time_zone_input_spec.rb +0 -1
- data/spec/inputs/url_input_spec.rb +0 -1
- data/spec/inputs/with_options_spec.rb +0 -1
- data/spec/localizer_spec.rb +0 -1
- data/spec/namespaced_class_finder_spec.rb +0 -1
- data/spec/spec_helper.rb +2 -1
- data/spec/support/custom_macros.rb +11 -3
- data/spec/support/specialized_class_finder_shared_example.rb +0 -1
- data/spec/support/test_environment.rb +2 -2
- metadata +53 -41
- data/CHANGELOG.md +0 -61
- data/Gemfile.lock +0 -140
- data/app/assets/stylesheets/formtastic_ie6.css +0 -33
- data/app/assets/stylesheets/formtastic_ie7.css +0 -23
- data/gemfiles/rails_6.0/Gemfile +0 -5
- data/gemfiles/rails_6.1/Gemfile +0 -5
- data/gemfiles/rails_7.0/Gemfile +0 -5
- data/gemfiles/rails_7.1/Gemfile +0 -5
- data/gemfiles/rails_edge/Gemfile +0 -13
- data/lib/formtastic/engine.rb +0 -14
data/spec/inputs/label_spec.rb
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
# frozen_string_literal: true
|
|
3
2
|
require 'spec_helper'
|
|
4
3
|
|
|
@@ -40,6 +39,20 @@ RSpec.describe 'Formtastic::FormBuilder#label' do
|
|
|
40
39
|
expect(output_buffer.to_str).to have_tag('label', :text => /Title/)
|
|
41
40
|
end
|
|
42
41
|
|
|
42
|
+
it 'should apply a "for" attribute to the label' do
|
|
43
|
+
concat(semantic_form_for(@new_post) do |builder|
|
|
44
|
+
builder.input(:title)
|
|
45
|
+
end)
|
|
46
|
+
expect(output_buffer.to_str).to have_tag('label[for=post_title]')
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it 'should apply a "label" class to the label' do
|
|
50
|
+
concat(semantic_form_for(@new_post) do |builder|
|
|
51
|
+
builder.input(:title)
|
|
52
|
+
end)
|
|
53
|
+
expect(output_buffer.to_str).to have_tag('label.label')
|
|
54
|
+
end
|
|
55
|
+
|
|
43
56
|
it 'should use i18n instead of the method name when method given as a String' do
|
|
44
57
|
with_config :i18n_cache_lookups, true do
|
|
45
58
|
::I18n.backend.store_translations :en, { :formtastic => { :labels => { :post => { :title => "I18n title" } } } }
|
|
@@ -67,6 +80,24 @@ RSpec.describe 'Formtastic::FormBuilder#label' do
|
|
|
67
80
|
end
|
|
68
81
|
end
|
|
69
82
|
|
|
83
|
+
describe "when label_html is given" do
|
|
84
|
+
it "should allow label_html to override the class" do
|
|
85
|
+
concat(semantic_form_for(@new_post) do |builder|
|
|
86
|
+
builder.input(:title, :label_html => { :class => 'my_class' } )
|
|
87
|
+
end)
|
|
88
|
+
expect(output_buffer.to_str).to have_tag('label.my_class', /Title/)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
it "should allow label_html to add custom attributes" do
|
|
92
|
+
concat(semantic_form_for(@new_post) do |builder|
|
|
93
|
+
builder.input(:title, :label_html => { :data => { :tooltip => 'Great Tooltip' } } )
|
|
94
|
+
end)
|
|
95
|
+
aggregate_failures do
|
|
96
|
+
expect(output_buffer.to_str).to have_tag('label[data-tooltip="Great Tooltip"]')
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
70
101
|
describe 'when a collection is given' do
|
|
71
102
|
it 'should use a supplied label_method for simple collections' do
|
|
72
103
|
with_deprecation_silenced do
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
# frozen_string_literal: true
|
|
3
2
|
require 'spec_helper'
|
|
4
3
|
|
|
@@ -24,7 +23,7 @@ RSpec.describe 'password input' do
|
|
|
24
23
|
it_should_have_input_with_id("post_title")
|
|
25
24
|
it_should_have_input_with_type(:password)
|
|
26
25
|
it_should_have_input_with_name("post[title]")
|
|
27
|
-
|
|
26
|
+
it_should_have_maxlength_matching_string_column_limit
|
|
28
27
|
it_should_use_default_text_field_size_when_not_nil(:string)
|
|
29
28
|
it_should_not_use_default_text_field_size_when_nil(:string)
|
|
30
29
|
it_should_apply_custom_input_attributes_when_input_html_provided(:string)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
# frozen_string_literal: true
|
|
3
2
|
require 'spec_helper'
|
|
4
3
|
|
|
@@ -15,6 +14,7 @@ RSpec.describe 'string input' do
|
|
|
15
14
|
before do
|
|
16
15
|
concat(semantic_form_for(@new_post) do |builder|
|
|
17
16
|
concat(builder.input(:title, :as => :string))
|
|
17
|
+
concat(builder.input(:status, :as => :string))
|
|
18
18
|
end)
|
|
19
19
|
end
|
|
20
20
|
|
|
@@ -27,7 +27,8 @@ RSpec.describe 'string input' do
|
|
|
27
27
|
it_should_have_input_with_id("post_title")
|
|
28
28
|
it_should_have_input_with_type(:text)
|
|
29
29
|
it_should_have_input_with_name("post[title]")
|
|
30
|
-
|
|
30
|
+
it_should_have_maxlength_matching_string_column_limit
|
|
31
|
+
it_should_have_maxlength_matching_integer_column_limit
|
|
31
32
|
it_should_use_default_text_field_size_when_not_nil(:string)
|
|
32
33
|
it_should_not_use_default_text_field_size_when_nil(:string)
|
|
33
34
|
it_should_apply_custom_input_attributes_when_input_html_provided(:string)
|
|
@@ -110,6 +111,70 @@ RSpec.describe 'string input' do
|
|
|
110
111
|
end
|
|
111
112
|
end
|
|
112
113
|
|
|
114
|
+
describe 'and validates_length_of was called with a proc for :maximum' do
|
|
115
|
+
before do
|
|
116
|
+
allow(@new_post.class).to receive(:validators_on).with(:title).and_return([
|
|
117
|
+
active_model_length_validator([:title], { :maximum => Proc.new { 128 } })
|
|
118
|
+
])
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
it 'should use the proc result as maxlength' do
|
|
122
|
+
concat(semantic_form_for(@new_post) do |builder|
|
|
123
|
+
concat(builder.input(:title))
|
|
124
|
+
end)
|
|
125
|
+
expect(output_buffer.to_str).to have_tag("form li input##{@new_post.class.name.underscore}_title[@maxlength='128']")
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
describe 'and validates_length_of was called with a proc for :within' do
|
|
130
|
+
before do
|
|
131
|
+
allow(@new_post.class).to receive(:validators_on).with(:title).and_return([
|
|
132
|
+
active_model_length_validator([:title], { :within => Proc.new { 5..100 } })
|
|
133
|
+
])
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
it 'should use the proc result maximum as maxlength' do
|
|
137
|
+
concat(semantic_form_for(@new_post) do |builder|
|
|
138
|
+
concat(builder.input(:title))
|
|
139
|
+
end)
|
|
140
|
+
expect(output_buffer.to_str).to have_tag("form li input##{@new_post.class.name.underscore}_title[@maxlength='100']")
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
describe 'and validates_length_of was called with a proc for :minimum' do
|
|
145
|
+
before do
|
|
146
|
+
allow(@new_post.class).to receive(:validators_on).with(:title).and_return([
|
|
147
|
+
active_model_length_validator([:title], { :minimum => Proc.new { 8 }, :allow_blank => false })
|
|
148
|
+
])
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
it 'should use the proc result to determine required status' do
|
|
152
|
+
concat(semantic_form_for(@new_post) do |builder|
|
|
153
|
+
concat(builder.input(:title))
|
|
154
|
+
end)
|
|
155
|
+
expect(output_buffer.to_str).to have_tag("form li.required")
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
describe 'and validates_length_of was called with a callable object for :maximum' do
|
|
160
|
+
before do
|
|
161
|
+
callable = Object.new
|
|
162
|
+
def callable.call(record)
|
|
163
|
+
128
|
|
164
|
+
end
|
|
165
|
+
allow(@new_post.class).to receive(:validators_on).with(:title).and_return([
|
|
166
|
+
active_model_length_validator([:title], { :maximum => callable })
|
|
167
|
+
])
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
it 'should use the callable result as maxlength' do
|
|
171
|
+
concat(semantic_form_for(@new_post) do |builder|
|
|
172
|
+
concat(builder.input(:title))
|
|
173
|
+
end)
|
|
174
|
+
expect(output_buffer.to_str).to have_tag("form li input##{@new_post.class.name.underscore}_title[@maxlength='128']")
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
113
178
|
describe 'any conditional validation' do
|
|
114
179
|
describe 'proc that calls an instance method' do
|
|
115
180
|
it 'calls the method on the object' do
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
# frozen_string_literal: true
|
|
3
2
|
require 'spec_helper'
|
|
4
3
|
|
|
@@ -182,7 +181,7 @@ RSpec.describe 'time select input' do
|
|
|
182
181
|
concat(semantic_form_for(@new_post) do |builder|
|
|
183
182
|
concat(builder.input(:created_at, :as => :time_select, :include_seconds => true, :labels => false))
|
|
184
183
|
end)
|
|
185
|
-
expect(output_buffer.to_str).
|
|
184
|
+
expect(output_buffer.to_str).not_to have_tag('form li.time_select fieldset ol li label')
|
|
186
185
|
end
|
|
187
186
|
end
|
|
188
187
|
|
data/spec/localizer_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
# frozen_string_literal: true
|
|
3
2
|
require 'rubygems'
|
|
4
3
|
require 'bundler/setup'
|
|
@@ -365,6 +364,7 @@ module FormtasticSpecHelper
|
|
|
365
364
|
end
|
|
366
365
|
|
|
367
366
|
allow(@new_post).to receive(:title)
|
|
367
|
+
allow(@new_post).to receive(:status)
|
|
368
368
|
allow(@new_post).to receive(:email)
|
|
369
369
|
allow(@new_post).to receive(:url)
|
|
370
370
|
allow(@new_post).to receive(:phone)
|
|
@@ -390,6 +390,7 @@ module FormtasticSpecHelper
|
|
|
390
390
|
allow(@new_post).to receive(:document).and_return(@mock_file)
|
|
391
391
|
allow(@new_post).to receive(:column_for_attribute).with(:meta_description).and_return(double('column', :type => :string, :limit => 255))
|
|
392
392
|
allow(@new_post).to receive(:column_for_attribute).with(:title).and_return(double('column', :type => :string, :limit => 50))
|
|
393
|
+
allow(@new_post).to receive(:column_for_attribute).with(:status).and_return(double('column', :type => :integer, :limit => 1))
|
|
393
394
|
allow(@new_post).to receive(:column_for_attribute).with(:body).and_return(double('column', :type => :text))
|
|
394
395
|
allow(@new_post).to receive(:column_for_attribute).with(:published).and_return(double('column', :type => :boolean))
|
|
395
396
|
allow(@new_post).to receive(:column_for_attribute).with(:publish_at).and_return(double('column', :type => :date))
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
# frozen_string_literal: true
|
|
3
2
|
|
|
4
3
|
module CustomMacros
|
|
@@ -171,13 +170,22 @@ module CustomMacros
|
|
|
171
170
|
end
|
|
172
171
|
end
|
|
173
172
|
|
|
174
|
-
def
|
|
173
|
+
def it_should_have_maxlength_matching_string_column_limit
|
|
175
174
|
it 'should have a maxlength matching column limit' do
|
|
175
|
+
expect(@new_post.column_for_attribute(:title).type).to eq(:string)
|
|
176
176
|
expect(@new_post.column_for_attribute(:title).limit).to eq(50)
|
|
177
177
|
expect(output_buffer.to_str).to have_tag("form li input[@maxlength='50']")
|
|
178
178
|
end
|
|
179
179
|
end
|
|
180
180
|
|
|
181
|
+
def it_should_have_maxlength_matching_integer_column_limit
|
|
182
|
+
it 'should have a maxlength matching column limit' do
|
|
183
|
+
expect(@new_post.column_for_attribute(:status).type).to eq(:integer)
|
|
184
|
+
expect(@new_post.column_for_attribute(:status).limit).to eq(1)
|
|
185
|
+
expect(output_buffer.to_str).to have_tag("form li input[@maxlength='3']")
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
181
189
|
def it_should_use_column_size_for_columns_shorter_than_default_text_field_size(as)
|
|
182
190
|
it 'should use the column size for columns shorter than default_text_field_size' do
|
|
183
191
|
column_limit_shorted_than_default = 1
|
|
@@ -406,7 +414,7 @@ module CustomMacros
|
|
|
406
414
|
|
|
407
415
|
describe 'and the :collection is an OrderedHash of strings' do
|
|
408
416
|
before do
|
|
409
|
-
@categories = ActiveSupport::OrderedHash
|
|
417
|
+
@categories = ActiveSupport::OrderedHash['General' => 'gen', 'Design' => 'des','Development' => 'dev']
|
|
410
418
|
end
|
|
411
419
|
|
|
412
420
|
it "should use the key as the label text and the hash value as the value attribute for each #{countable}" do
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
# frozen_string_literal: true
|
|
3
2
|
require 'rspec/core'
|
|
4
3
|
|
|
@@ -26,7 +25,7 @@ RSpec.configure do |config|
|
|
|
26
25
|
# module like `RSpec.describe` regardless of this setting.
|
|
27
26
|
# For backwards compatibility this defaults to `true`.
|
|
28
27
|
#
|
|
29
|
-
# https://
|
|
28
|
+
# https://rspec.info/features/3-12/rspec-core/configuration/enable-global-dsl/
|
|
30
29
|
config.expose_dsl_globally = false
|
|
31
30
|
end
|
|
32
31
|
|
|
@@ -39,6 +38,7 @@ module FormtasticTest
|
|
|
39
38
|
config.active_support.deprecation = :stderr
|
|
40
39
|
config.secret_key_base = "secret"
|
|
41
40
|
config.eager_load = false
|
|
41
|
+
config.active_support.to_time_preserves_timezone = :zone
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
FormtasticTest::Application.initialize!
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: formtastic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 6.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin French
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: actionpack
|
|
@@ -16,84 +15,98 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
18
|
+
version: 7.2.0
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
25
|
+
version: 7.2.0
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: appraisal
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
type: :development
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '0'
|
|
27
40
|
- !ruby/object:Gem::Dependency
|
|
28
41
|
name: rspec-rails
|
|
29
42
|
requirement: !ruby/object:Gem::Requirement
|
|
30
43
|
requirements:
|
|
31
44
|
- - ">="
|
|
32
45
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
46
|
+
version: '0'
|
|
34
47
|
type: :development
|
|
35
48
|
prerelease: false
|
|
36
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
50
|
requirements:
|
|
38
51
|
- - ">="
|
|
39
52
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
53
|
+
version: '0'
|
|
41
54
|
- !ruby/object:Gem::Dependency
|
|
42
55
|
name: rspec-dom-testing
|
|
43
56
|
requirement: !ruby/object:Gem::Requirement
|
|
44
57
|
requirements:
|
|
45
58
|
- - ">="
|
|
46
59
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0
|
|
60
|
+
version: '0'
|
|
48
61
|
type: :development
|
|
49
62
|
prerelease: false
|
|
50
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
64
|
requirements:
|
|
52
65
|
- - ">="
|
|
53
66
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0
|
|
67
|
+
version: '0'
|
|
55
68
|
- !ruby/object:Gem::Dependency
|
|
56
69
|
name: rspec-mocks
|
|
57
70
|
requirement: !ruby/object:Gem::Requirement
|
|
58
71
|
requirements:
|
|
59
|
-
- - "
|
|
72
|
+
- - ">="
|
|
60
73
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
74
|
+
version: '0'
|
|
62
75
|
type: :development
|
|
63
76
|
prerelease: false
|
|
64
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
78
|
requirements:
|
|
66
|
-
- - "
|
|
79
|
+
- - ">="
|
|
67
80
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
81
|
+
version: '0'
|
|
69
82
|
- !ruby/object:Gem::Dependency
|
|
70
83
|
name: yard
|
|
71
84
|
requirement: !ruby/object:Gem::Requirement
|
|
72
85
|
requirements:
|
|
73
|
-
- - "
|
|
86
|
+
- - ">="
|
|
74
87
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: 0
|
|
88
|
+
version: '0'
|
|
76
89
|
type: :development
|
|
77
90
|
prerelease: false
|
|
78
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
92
|
requirements:
|
|
80
|
-
- - "
|
|
93
|
+
- - ">="
|
|
81
94
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: 0
|
|
95
|
+
version: '0'
|
|
83
96
|
- !ruby/object:Gem::Dependency
|
|
84
97
|
name: ammeter
|
|
85
98
|
requirement: !ruby/object:Gem::Requirement
|
|
86
99
|
requirements:
|
|
87
|
-
- - "
|
|
100
|
+
- - ">="
|
|
88
101
|
- !ruby/object:Gem::Version
|
|
89
|
-
version:
|
|
102
|
+
version: '0'
|
|
90
103
|
type: :development
|
|
91
104
|
prerelease: false
|
|
92
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
106
|
requirements:
|
|
94
|
-
- - "
|
|
107
|
+
- - ">="
|
|
95
108
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
109
|
+
version: '0'
|
|
97
110
|
- !ruby/object:Gem::Dependency
|
|
98
111
|
name: rake
|
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -112,16 +125,16 @@ dependencies:
|
|
|
112
125
|
name: sqlite3
|
|
113
126
|
requirement: !ruby/object:Gem::Requirement
|
|
114
127
|
requirements:
|
|
115
|
-
- - "
|
|
128
|
+
- - ">="
|
|
116
129
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '
|
|
130
|
+
version: '0'
|
|
118
131
|
type: :development
|
|
119
132
|
prerelease: false
|
|
120
133
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
134
|
requirements:
|
|
122
|
-
- - "
|
|
135
|
+
- - ">="
|
|
123
136
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: '
|
|
137
|
+
version: '0'
|
|
125
138
|
description: A Rails form builder plugin/gem with semantically rich and accessible
|
|
126
139
|
markup
|
|
127
140
|
email:
|
|
@@ -132,27 +145,24 @@ extra_rdoc_files:
|
|
|
132
145
|
- README.md
|
|
133
146
|
files:
|
|
134
147
|
- ".gitattributes"
|
|
148
|
+
- ".github/workflows/integration.yaml"
|
|
135
149
|
- ".github/workflows/test.yml"
|
|
136
150
|
- ".gitignore"
|
|
137
151
|
- ".rspec"
|
|
138
152
|
- ".yardopts"
|
|
139
|
-
-
|
|
153
|
+
- Appraisals
|
|
154
|
+
- CONTRIBUTING.md
|
|
140
155
|
- Gemfile
|
|
141
|
-
- Gemfile.lock
|
|
142
156
|
- MIT-LICENSE
|
|
143
157
|
- README.md
|
|
144
158
|
- RELEASE_PROCESS
|
|
145
159
|
- Rakefile
|
|
146
|
-
- app/assets/stylesheets/formtastic.css
|
|
147
|
-
- app/assets/stylesheets/formtastic_ie6.css
|
|
148
|
-
- app/assets/stylesheets/formtastic_ie7.css
|
|
149
160
|
- bin/appraisal
|
|
150
161
|
- formtastic.gemspec
|
|
151
|
-
- gemfiles/
|
|
152
|
-
- gemfiles/
|
|
153
|
-
- gemfiles/
|
|
154
|
-
- gemfiles/
|
|
155
|
-
- gemfiles/rails_edge/Gemfile
|
|
162
|
+
- gemfiles/rails_72.gemfile
|
|
163
|
+
- gemfiles/rails_80.gemfile
|
|
164
|
+
- gemfiles/rails_81.gemfile
|
|
165
|
+
- gemfiles/rails_edge.gemfile
|
|
156
166
|
- lib/formtastic.rb
|
|
157
167
|
- lib/formtastic/action_class_finder.rb
|
|
158
168
|
- lib/formtastic/actions.rb
|
|
@@ -162,7 +172,6 @@ files:
|
|
|
162
172
|
- lib/formtastic/actions/input_action.rb
|
|
163
173
|
- lib/formtastic/actions/link_action.rb
|
|
164
174
|
- lib/formtastic/deprecation.rb
|
|
165
|
-
- lib/formtastic/engine.rb
|
|
166
175
|
- lib/formtastic/form_builder.rb
|
|
167
176
|
- lib/formtastic/helpers.rb
|
|
168
177
|
- lib/formtastic/helpers/action_helper.rb
|
|
@@ -180,6 +189,7 @@ files:
|
|
|
180
189
|
- lib/formtastic/input_class_finder.rb
|
|
181
190
|
- lib/formtastic/inputs.rb
|
|
182
191
|
- lib/formtastic/inputs/base.rb
|
|
192
|
+
- lib/formtastic/inputs/base/aria.rb
|
|
183
193
|
- lib/formtastic/inputs/base/associations.rb
|
|
184
194
|
- lib/formtastic/inputs/base/choices.rb
|
|
185
195
|
- lib/formtastic/inputs/base/collections.rb
|
|
@@ -230,9 +240,11 @@ files:
|
|
|
230
240
|
- lib/generators/formtastic/form/form_generator.rb
|
|
231
241
|
- lib/generators/formtastic/input/input_generator.rb
|
|
232
242
|
- lib/generators/formtastic/install/install_generator.rb
|
|
243
|
+
- lib/generators/formtastic/stylesheets/stylesheets_generator.rb
|
|
233
244
|
- lib/generators/templates/_form.html.erb
|
|
234
245
|
- lib/generators/templates/_form.html.haml
|
|
235
246
|
- lib/generators/templates/_form.html.slim
|
|
247
|
+
- lib/generators/templates/formtastic.css
|
|
236
248
|
- lib/generators/templates/formtastic.rb
|
|
237
249
|
- lib/generators/templates/input.rb
|
|
238
250
|
- lib/locale/en.yml
|
|
@@ -253,6 +265,7 @@ files:
|
|
|
253
265
|
- spec/generators/formtastic/form/form_generator_spec.rb
|
|
254
266
|
- spec/generators/formtastic/input/input_generator_spec.rb
|
|
255
267
|
- spec/generators/formtastic/install/install_generator_spec.rb
|
|
268
|
+
- spec/generators/formtastic/stylesheets/stylesheets_generator_spec.rb
|
|
256
269
|
- spec/helpers/action_helper_spec.rb
|
|
257
270
|
- spec/helpers/actions_helper_spec.rb
|
|
258
271
|
- spec/helpers/form_helper_spec.rb
|
|
@@ -309,7 +322,6 @@ homepage: http://github.com/formtastic/formtastic
|
|
|
309
322
|
licenses:
|
|
310
323
|
- MIT
|
|
311
324
|
metadata: {}
|
|
312
|
-
post_install_message:
|
|
313
325
|
rdoc_options:
|
|
314
326
|
- "--charset=UTF-8"
|
|
315
327
|
require_paths:
|
|
@@ -318,15 +330,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
318
330
|
requirements:
|
|
319
331
|
- - ">="
|
|
320
332
|
- !ruby/object:Gem::Version
|
|
321
|
-
version:
|
|
333
|
+
version: 3.1.0
|
|
322
334
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
323
335
|
requirements:
|
|
324
336
|
- - ">="
|
|
325
337
|
- !ruby/object:Gem::Version
|
|
326
|
-
version:
|
|
338
|
+
version: 1.8.11
|
|
327
339
|
requirements: []
|
|
328
|
-
rubygems_version: 3.
|
|
329
|
-
signing_key:
|
|
340
|
+
rubygems_version: 3.6.8
|
|
330
341
|
specification_version: 4
|
|
331
342
|
summary: A Rails form builder plugin/gem with semantically rich and accessible markup
|
|
332
343
|
test_files:
|
|
@@ -342,6 +353,7 @@ test_files:
|
|
|
342
353
|
- spec/generators/formtastic/form/form_generator_spec.rb
|
|
343
354
|
- spec/generators/formtastic/input/input_generator_spec.rb
|
|
344
355
|
- spec/generators/formtastic/install/install_generator_spec.rb
|
|
356
|
+
- spec/generators/formtastic/stylesheets/stylesheets_generator_spec.rb
|
|
345
357
|
- spec/helpers/action_helper_spec.rb
|
|
346
358
|
- spec/helpers/actions_helper_spec.rb
|
|
347
359
|
- spec/helpers/form_helper_spec.rb
|
data/CHANGELOG.md
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
## 5.0.0
|
|
2
|
-
* Added support for Rails 7.1 ([#1371](https://github.com/formtastic/formtastic/pull/1371))
|
|
3
|
-
* Removed support for Rails < 6.0.0 ([#1354](https://github.com/formtastic/formtastic/pull/1354))
|
|
4
|
-
* Removed support for Rubies < 2.6.0 ([#1332](https://github.com/formtastic/formtastic/pull/1332), [#1355](https://github.com/formtastic/formtastic.git/pull/1355))
|
|
5
|
-
* Added support for scopes in relations ([#1343](https://github.com/formtastic/formtastic/pull/1343))
|
|
6
|
-
* Fixed I18n lookup for enum values in nested select fields ([#1342](https://github.com/formtastic/formtastic/pull/1342))
|
|
7
|
-
* Fixed faster input class lookup ([#1336](https://github.com/formtastic/formtastic/pull/1336))
|
|
8
|
-
* Use frozen_string_literal internally ([#1339](https://github.com/formtastic/formtastic/pull/1339))
|
|
9
|
-
|
|
10
|
-
## 4.0.0
|
|
11
|
-
* Fixed default_columns_for_object when object has non-standard foreign keys (#1241)
|
|
12
|
-
* Fixed missing constants in production (#911)
|
|
13
|
-
* Removed support for Rails 3 and 4.0 (#1108)
|
|
14
|
-
* Removed deprecated input/action finder methods (#1139)
|
|
15
|
-
* Changed boolean label padding to margin (#1202)
|
|
16
|
-
* Added mapping hstore column to text input (#1203)
|
|
17
|
-
* Added support for Rails 5 Attributes API (#1188)
|
|
18
|
-
* Changed required Ruby version to >= 2.0 (#1210)
|
|
19
|
-
* Default to input types text for json & jsonb, string for citext columns (#1229)
|
|
20
|
-
* Allow symbols for numericality options (#1258)
|
|
21
|
-
* Support for rubies under 2.4.0 has been dropped (#1292)
|
|
22
|
-
* Support for Rails under 5.2.0 has been dropped (#1293)
|
|
23
|
-
* Support for Rails 6.0 has been added (#1300)
|
|
24
|
-
* Support for Rails 6.1 has been added (#1324)
|
|
25
|
-
* Support for Ruby 3 has been added (#1323)
|
|
26
|
-
|
|
27
|
-
## 3.1.2
|
|
28
|
-
|
|
29
|
-
* Fixed that we specified 4.0.4 instead of 4.1 in the Rails version deprecation message
|
|
30
|
-
|
|
31
|
-
## 3.1.1
|
|
32
|
-
|
|
33
|
-
* Fixed class custom input & action class loading in test environments
|
|
34
|
-
* Added documentation of custom input & action class finders
|
|
35
|
-
* Added a link to documentation & wiki from custom class deprecation warnings
|
|
36
|
-
|
|
37
|
-
## 3.1.0
|
|
38
|
-
|
|
39
|
-
* Performance and documentation improvements
|
|
40
|
-
|
|
41
|
-
## 3.1.0.rc2
|
|
42
|
-
|
|
43
|
-
* Deprecated :member_value and :member_label options
|
|
44
|
-
|
|
45
|
-
## 3.1.0.rc1
|
|
46
|
-
|
|
47
|
-
* Deprecated support for Rails version < 4.1.0
|
|
48
|
-
* Fixed synchronization issues with custom_namespace configuration
|
|
49
|
-
* Fixed bug where boolean (checkbox) inputs were not being correctly checked (also in 2.3.1)
|
|
50
|
-
* Fixed (silenced) Rails 5 deprecation on column_for_attribute that we're handling fine
|
|
51
|
-
* Added new DatalistInput (:as => :datalist) for HTML5 datalists
|
|
52
|
-
* Added configurable namespaces for custom inputs
|
|
53
|
-
* Various performance and documentation improvements
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
See 3.0-stable branch for 3.0.x changes
|
|
58
|
-
https://github.com/formtastic/formtastic/blob/3.0-stable/CHANGELOG
|
|
59
|
-
|
|
60
|
-
See 2.3-stable branch for 2.3.x and earlier releases
|
|
61
|
-
https://github.com/formtastic/formtastic/blob/2.3-stable/CHANGELOG
|