formtastic 3.1.3 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitattributes +1 -0
- data/.github/workflows/test.yml +61 -0
- data/.gitignore +3 -2
- data/CHANGELOG.md +61 -0
- data/Gemfile.lock +140 -0
- data/MIT-LICENSE +1 -1
- data/{README.textile → README.md} +183 -167
- data/RELEASE_PROCESS +3 -1
- data/Rakefile +20 -1
- data/app/assets/stylesheets/formtastic.css +1 -1
- data/bin/appraisal +8 -0
- data/formtastic.gemspec +12 -16
- data/gemfiles/rails_6.0/Gemfile +5 -0
- data/gemfiles/rails_6.1/Gemfile +5 -0
- data/gemfiles/rails_7.0/Gemfile +5 -0
- data/gemfiles/rails_7.1/Gemfile +5 -0
- data/gemfiles/rails_edge/Gemfile +13 -0
- data/lib/formtastic/action_class_finder.rb +1 -0
- data/lib/formtastic/actions/base.rb +1 -0
- data/lib/formtastic/actions/button_action.rb +1 -0
- data/lib/formtastic/actions/buttonish.rb +1 -0
- data/lib/formtastic/actions/input_action.rb +1 -0
- data/lib/formtastic/actions/link_action.rb +1 -0
- data/lib/formtastic/actions.rb +7 -3
- data/lib/formtastic/deprecation.rb +2 -38
- data/lib/formtastic/engine.rb +4 -1
- data/lib/formtastic/form_builder.rb +12 -24
- data/lib/formtastic/helpers/action_helper.rb +2 -48
- data/lib/formtastic/helpers/actions_helper.rb +1 -0
- data/lib/formtastic/helpers/enum.rb +14 -0
- data/lib/formtastic/helpers/errors_helper.rb +3 -2
- data/lib/formtastic/helpers/fieldset_wrapper.rb +14 -9
- data/lib/formtastic/helpers/file_column_detection.rb +1 -0
- data/lib/formtastic/helpers/form_helper.rb +2 -1
- data/lib/formtastic/helpers/input_helper.rb +20 -76
- data/lib/formtastic/helpers/inputs_helper.rb +29 -23
- data/lib/formtastic/helpers/reflection.rb +1 -0
- data/lib/formtastic/helpers.rb +2 -2
- data/lib/formtastic/html_attributes.rb +1 -0
- data/lib/formtastic/i18n.rb +2 -1
- data/lib/formtastic/input_class_finder.rb +1 -0
- data/lib/formtastic/inputs/base/associations.rb +1 -0
- data/lib/formtastic/inputs/base/choices.rb +3 -2
- data/lib/formtastic/inputs/base/collections.rb +46 -10
- data/lib/formtastic/inputs/base/database.rb +5 -7
- data/lib/formtastic/inputs/base/datetime_pickerish.rb +1 -0
- data/lib/formtastic/inputs/base/errors.rb +7 -6
- data/lib/formtastic/inputs/base/fileish.rb +1 -0
- data/lib/formtastic/inputs/base/hints.rb +2 -1
- data/lib/formtastic/inputs/base/html.rb +9 -7
- data/lib/formtastic/inputs/base/labelling.rb +3 -2
- data/lib/formtastic/inputs/base/naming.rb +5 -4
- data/lib/formtastic/inputs/base/numeric.rb +1 -0
- data/lib/formtastic/inputs/base/options.rb +3 -3
- data/lib/formtastic/inputs/base/placeholder.rb +1 -0
- data/lib/formtastic/inputs/base/stringish.rb +1 -0
- data/lib/formtastic/inputs/base/timeish.rb +9 -4
- data/lib/formtastic/inputs/base/validations.rb +39 -12
- data/lib/formtastic/inputs/base/wrapping.rb +1 -0
- data/lib/formtastic/inputs/base.rb +3 -2
- data/lib/formtastic/inputs/boolean_input.rb +2 -1
- data/lib/formtastic/inputs/check_boxes_input.rb +15 -6
- data/lib/formtastic/inputs/color_input.rb +1 -1
- data/lib/formtastic/inputs/country_input.rb +4 -1
- data/lib/formtastic/inputs/datalist_input.rb +1 -0
- data/lib/formtastic/inputs/date_picker_input.rb +1 -0
- data/lib/formtastic/inputs/date_select_input.rb +1 -0
- data/lib/formtastic/inputs/datetime_picker_input.rb +1 -0
- data/lib/formtastic/inputs/datetime_select_input.rb +1 -0
- data/lib/formtastic/inputs/email_input.rb +1 -0
- data/lib/formtastic/inputs/file_input.rb +1 -0
- data/lib/formtastic/inputs/hidden_input.rb +3 -2
- data/lib/formtastic/inputs/number_input.rb +1 -0
- data/lib/formtastic/inputs/password_input.rb +1 -0
- data/lib/formtastic/inputs/phone_input.rb +1 -0
- data/lib/formtastic/inputs/radio_input.rb +21 -0
- data/lib/formtastic/inputs/range_input.rb +1 -0
- data/lib/formtastic/inputs/search_input.rb +1 -0
- data/lib/formtastic/inputs/select_input.rb +30 -1
- data/lib/formtastic/inputs/string_input.rb +1 -0
- data/lib/formtastic/inputs/text_input.rb +1 -0
- data/lib/formtastic/inputs/time_picker_input.rb +1 -0
- data/lib/formtastic/inputs/time_select_input.rb +1 -0
- data/lib/formtastic/inputs/time_zone_input.rb +17 -6
- data/lib/formtastic/inputs/url_input.rb +1 -0
- data/lib/formtastic/inputs.rb +33 -29
- data/lib/formtastic/localized_string.rb +1 -0
- data/lib/formtastic/localizer.rb +21 -22
- data/lib/formtastic/namespaced_class_finder.rb +8 -9
- data/lib/formtastic/version.rb +2 -1
- data/lib/formtastic.rb +10 -11
- data/lib/generators/formtastic/form/form_generator.rb +2 -1
- data/lib/generators/formtastic/input/input_generator.rb +47 -0
- data/lib/generators/formtastic/install/install_generator.rb +1 -0
- data/lib/generators/templates/formtastic.rb +15 -13
- data/lib/generators/templates/input.rb +19 -0
- data/sample/basic_inputs.html +1 -1
- data/script/integration-template.rb +73 -0
- data/script/integration.sh +19 -0
- data/spec/action_class_finder_spec.rb +2 -1
- data/spec/actions/button_action_spec.rb +21 -20
- data/spec/actions/generic_action_spec.rb +134 -133
- data/spec/actions/input_action_spec.rb +20 -19
- data/spec/actions/link_action_spec.rb +30 -29
- data/spec/builder/custom_builder_spec.rb +39 -22
- data/spec/builder/error_proc_spec.rb +6 -5
- data/spec/builder/semantic_fields_for_spec.rb +46 -45
- data/spec/fast_spec_helper.rb +13 -0
- data/spec/generators/formtastic/form/form_generator_spec.rb +33 -32
- data/spec/generators/formtastic/input/input_generator_spec.rb +125 -0
- data/spec/generators/formtastic/install/install_generator_spec.rb +10 -9
- data/spec/helpers/action_helper_spec.rb +329 -10
- data/spec/helpers/actions_helper_spec.rb +43 -42
- data/spec/helpers/form_helper_spec.rb +45 -38
- data/spec/helpers/input_helper_spec.rb +976 -2
- data/spec/helpers/inputs_helper_spec.rb +217 -202
- data/spec/helpers/reflection_helper_spec.rb +7 -6
- data/spec/helpers/semantic_errors_helper_spec.rb +26 -25
- data/spec/i18n_spec.rb +30 -29
- data/spec/input_class_finder_spec.rb +2 -1
- data/spec/inputs/base/collections_spec.rb +78 -0
- data/spec/inputs/base/validations_spec.rb +481 -0
- data/spec/inputs/boolean_input_spec.rb +73 -72
- data/spec/inputs/check_boxes_input_spec.rb +169 -121
- data/spec/inputs/color_input_spec.rb +53 -64
- data/spec/inputs/country_input_spec.rb +23 -22
- data/spec/inputs/custom_input_spec.rb +3 -6
- data/spec/inputs/datalist_input_spec.rb +3 -2
- data/spec/inputs/date_picker_input_spec.rb +114 -113
- data/spec/inputs/date_select_input_spec.rb +76 -61
- data/spec/inputs/datetime_picker_input_spec.rb +123 -122
- data/spec/inputs/datetime_select_input_spec.rb +85 -68
- data/spec/inputs/email_input_spec.rb +17 -16
- data/spec/inputs/file_input_spec.rb +18 -17
- data/spec/inputs/hidden_input_spec.rb +32 -31
- data/spec/inputs/include_blank_spec.rb +10 -9
- data/spec/inputs/label_spec.rb +26 -25
- data/spec/inputs/number_input_spec.rb +212 -211
- data/spec/inputs/password_input_spec.rb +17 -16
- data/spec/inputs/phone_input_spec.rb +17 -16
- data/spec/inputs/placeholder_spec.rb +18 -17
- data/spec/inputs/radio_input_spec.rb +92 -65
- data/spec/inputs/range_input_spec.rb +136 -135
- data/spec/inputs/readonly_spec.rb +51 -0
- data/spec/inputs/search_input_spec.rb +16 -15
- data/spec/inputs/select_input_spec.rb +209 -102
- data/spec/inputs/string_input_spec.rb +51 -50
- data/spec/inputs/text_input_spec.rb +34 -33
- data/spec/inputs/time_picker_input_spec.rb +115 -114
- data/spec/inputs/time_select_input_spec.rb +84 -70
- data/spec/inputs/time_zone_input_spec.rb +58 -31
- data/spec/inputs/url_input_spec.rb +17 -16
- data/spec/inputs/with_options_spec.rb +9 -8
- data/spec/localizer_spec.rb +18 -17
- data/spec/namespaced_class_finder_spec.rb +18 -6
- data/spec/schema.rb +22 -0
- data/spec/spec_helper.rb +172 -260
- data/spec/support/custom_macros.rb +74 -76
- data/spec/support/deprecation.rb +2 -1
- data/spec/support/shared_examples.rb +2 -1233
- data/spec/support/specialized_class_finder_shared_example.rb +1 -0
- data/spec/support/test_environment.rb +24 -9
- metadata +78 -170
- data/.travis.yml +0 -29
- data/Appraisals +0 -29
- data/CHANGELOG +0 -39
- data/DEPRECATIONS +0 -49
- data/gemfiles/rails_3.2.gemfile +0 -7
- data/gemfiles/rails_4.0.4.gemfile +0 -7
- data/gemfiles/rails_4.1.gemfile +0 -7
- data/gemfiles/rails_4.2.gemfile +0 -7
- data/gemfiles/rails_4.gemfile +0 -7
- data/gemfiles/rails_edge.gemfile +0 -10
- data/lib/formtastic/util.rb +0 -57
- data/spec/helpers/namespaced_action_helper_spec.rb +0 -43
- data/spec/helpers/namespaced_input_helper_spec.rb +0 -36
- data/spec/support/deferred_garbage_collection.rb +0 -21
- data/spec/util_spec.rb +0 -66
@@ -1,11 +1,33 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
+
# frozen_string_literal: true
|
2
3
|
require 'rspec/core'
|
3
|
-
|
4
|
+
|
5
|
+
require 'rspec-dom-testing'
|
4
6
|
|
5
7
|
RSpec.configure do |config|
|
6
|
-
config.include RspecTagMatchers
|
7
8
|
config.include CustomMacros
|
9
|
+
config.include RSpec::Dom::Testing::Matchers
|
8
10
|
config.mock_with :rspec
|
11
|
+
|
12
|
+
# rspec-rails 3 will no longer automatically infer an example group's spec type
|
13
|
+
# from the file location. You can explicitly opt-in to the feature using this
|
14
|
+
# config option.
|
15
|
+
# To explicitly tag specs without using automatic inference, set the `:type`
|
16
|
+
# metadata manually:
|
17
|
+
#
|
18
|
+
# describe ThingsController, :type => :controller do
|
19
|
+
# # Equivalent to being in spec/controllers
|
20
|
+
# end
|
21
|
+
config.infer_spec_type_from_file_location!
|
22
|
+
|
23
|
+
# Setting this config option `false` removes rspec-core's monkey patching of the
|
24
|
+
# top level methods like `describe`, `shared_examples_for` and `shared_context`
|
25
|
+
# on `main` and `Module`. The methods are always available through the `RSpec`
|
26
|
+
# module like `RSpec.describe` regardless of this setting.
|
27
|
+
# For backwards compatibility this defaults to `true`.
|
28
|
+
#
|
29
|
+
# https://relishapp.com/rspec/rspec-core/v/3-0/docs/configuration/global-namespace-dsl
|
30
|
+
config.expose_dsl_globally = false
|
9
31
|
end
|
10
32
|
|
11
33
|
require "action_controller/railtie"
|
@@ -14,8 +36,6 @@ require 'active_model'
|
|
14
36
|
# Create a simple rails application for use in testing the viewhelper
|
15
37
|
module FormtasticTest
|
16
38
|
class Application < Rails::Application
|
17
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
18
|
-
config.encoding = "utf-8"
|
19
39
|
config.active_support.deprecation = :stderr
|
20
40
|
config.secret_key_base = "secret"
|
21
41
|
config.eager_load = false
|
@@ -24,8 +44,3 @@ end
|
|
24
44
|
FormtasticTest::Application.initialize!
|
25
45
|
|
26
46
|
require 'rspec/rails'
|
27
|
-
|
28
|
-
# Quick hack to avoid the 'Spec' deprecation warnings from rspec_tag_matchers
|
29
|
-
module Spec
|
30
|
-
include RSpec
|
31
|
-
end
|
metadata
CHANGED
@@ -1,224 +1,127 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formtastic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 5.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Justin French
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2023-10-23 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: actionpack
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
version: 6.0.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: nokogiri
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ! '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '0'
|
38
|
-
type: :development
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
26
|
+
version: 6.0.0
|
46
27
|
- !ruby/object:Gem::Dependency
|
47
28
|
name: rspec-rails
|
48
29
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
30
|
requirements:
|
51
|
-
- -
|
31
|
+
- - ">="
|
52
32
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
33
|
+
version: '4.0'
|
54
34
|
type: :development
|
55
35
|
prerelease: false
|
56
36
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
37
|
requirements:
|
59
|
-
- -
|
38
|
+
- - ">="
|
60
39
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
40
|
+
version: '4.0'
|
62
41
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
42
|
+
name: rspec-dom-testing
|
64
43
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
44
|
requirements:
|
67
|
-
- -
|
45
|
+
- - ">="
|
68
46
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
47
|
+
version: 0.1.0
|
70
48
|
type: :development
|
71
49
|
prerelease: false
|
72
50
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
51
|
requirements:
|
75
|
-
- -
|
52
|
+
- - ">="
|
76
53
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
54
|
+
version: 0.1.0
|
78
55
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
56
|
+
name: rspec-mocks
|
80
57
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
58
|
requirements:
|
83
|
-
- - ~>
|
59
|
+
- - "~>"
|
84
60
|
- !ruby/object:Gem::Version
|
85
|
-
version:
|
61
|
+
version: 3.12.2
|
86
62
|
type: :development
|
87
63
|
prerelease: false
|
88
64
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
65
|
requirements:
|
91
|
-
- - ~>
|
66
|
+
- - "~>"
|
92
67
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: RedCloth
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
|
-
requirements:
|
99
|
-
- - ~>
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '4.2'
|
102
|
-
type: :development
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
|
-
requirements:
|
107
|
-
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '4.2'
|
68
|
+
version: 3.12.2
|
110
69
|
- !ruby/object:Gem::Dependency
|
111
70
|
name: yard
|
112
71
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
72
|
requirements:
|
115
|
-
- - ~>
|
73
|
+
- - "~>"
|
116
74
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
75
|
+
version: 0.9.20
|
118
76
|
type: :development
|
119
77
|
prerelease: false
|
120
78
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
79
|
requirements:
|
123
|
-
- - ~>
|
80
|
+
- - "~>"
|
124
81
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
126
|
-
- !ruby/object:Gem::Dependency
|
127
|
-
name: colored
|
128
|
-
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
|
-
requirements:
|
131
|
-
- - ~>
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
version: '1.2'
|
134
|
-
type: :development
|
135
|
-
prerelease: false
|
136
|
-
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
|
-
requirements:
|
139
|
-
- - ~>
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: '1.2'
|
142
|
-
- !ruby/object:Gem::Dependency
|
143
|
-
name: tzinfo
|
144
|
-
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
|
-
requirements:
|
147
|
-
- - ! '>='
|
148
|
-
- !ruby/object:Gem::Version
|
149
|
-
version: '0'
|
150
|
-
type: :development
|
151
|
-
prerelease: false
|
152
|
-
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
|
-
requirements:
|
155
|
-
- - ! '>='
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: '0'
|
82
|
+
version: 0.9.20
|
158
83
|
- !ruby/object:Gem::Dependency
|
159
84
|
name: ammeter
|
160
85
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
|
-
requirements:
|
163
|
-
- - '='
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: 1.1.1
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
|
-
requirements:
|
171
|
-
- - '='
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: 1.1.1
|
174
|
-
- !ruby/object:Gem::Dependency
|
175
|
-
name: appraisal
|
176
|
-
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
86
|
requirements:
|
179
|
-
- - ~>
|
87
|
+
- - "~>"
|
180
88
|
- !ruby/object:Gem::Version
|
181
|
-
version:
|
89
|
+
version: 1.1.3
|
182
90
|
type: :development
|
183
91
|
prerelease: false
|
184
92
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
93
|
requirements:
|
187
|
-
- - ~>
|
94
|
+
- - "~>"
|
188
95
|
- !ruby/object:Gem::Version
|
189
|
-
version:
|
96
|
+
version: 1.1.3
|
190
97
|
- !ruby/object:Gem::Dependency
|
191
98
|
name: rake
|
192
99
|
requirement: !ruby/object:Gem::Requirement
|
193
|
-
none: false
|
194
100
|
requirements:
|
195
|
-
- -
|
101
|
+
- - ">="
|
196
102
|
- !ruby/object:Gem::Version
|
197
103
|
version: '0'
|
198
104
|
type: :development
|
199
105
|
prerelease: false
|
200
106
|
version_requirements: !ruby/object:Gem::Requirement
|
201
|
-
none: false
|
202
107
|
requirements:
|
203
|
-
- -
|
108
|
+
- - ">="
|
204
109
|
- !ruby/object:Gem::Version
|
205
110
|
version: '0'
|
206
111
|
- !ruby/object:Gem::Dependency
|
207
|
-
name:
|
112
|
+
name: sqlite3
|
208
113
|
requirement: !ruby/object:Gem::Requirement
|
209
|
-
none: false
|
210
114
|
requirements:
|
211
|
-
- -
|
115
|
+
- - "~>"
|
212
116
|
- !ruby/object:Gem::Version
|
213
|
-
version:
|
117
|
+
version: '1.4'
|
214
118
|
type: :development
|
215
119
|
prerelease: false
|
216
120
|
version_requirements: !ruby/object:Gem::Requirement
|
217
|
-
none: false
|
218
121
|
requirements:
|
219
|
-
- -
|
122
|
+
- - "~>"
|
220
123
|
- !ruby/object:Gem::Version
|
221
|
-
version:
|
124
|
+
version: '1.4'
|
222
125
|
description: A Rails form builder plugin/gem with semantically rich and accessible
|
223
126
|
markup
|
224
127
|
email:
|
@@ -226,30 +129,30 @@ email:
|
|
226
129
|
executables: []
|
227
130
|
extensions: []
|
228
131
|
extra_rdoc_files:
|
229
|
-
- README.
|
132
|
+
- README.md
|
230
133
|
files:
|
231
|
-
- .
|
232
|
-
- .
|
233
|
-
- .
|
234
|
-
- .
|
235
|
-
-
|
236
|
-
- CHANGELOG
|
237
|
-
- DEPRECATIONS
|
134
|
+
- ".gitattributes"
|
135
|
+
- ".github/workflows/test.yml"
|
136
|
+
- ".gitignore"
|
137
|
+
- ".rspec"
|
138
|
+
- ".yardopts"
|
139
|
+
- CHANGELOG.md
|
238
140
|
- Gemfile
|
141
|
+
- Gemfile.lock
|
239
142
|
- MIT-LICENSE
|
240
|
-
- README.
|
143
|
+
- README.md
|
241
144
|
- RELEASE_PROCESS
|
242
145
|
- Rakefile
|
243
146
|
- app/assets/stylesheets/formtastic.css
|
244
147
|
- app/assets/stylesheets/formtastic_ie6.css
|
245
148
|
- app/assets/stylesheets/formtastic_ie7.css
|
149
|
+
- bin/appraisal
|
246
150
|
- formtastic.gemspec
|
247
|
-
- gemfiles/
|
248
|
-
- gemfiles/
|
249
|
-
- gemfiles/
|
250
|
-
- gemfiles/
|
251
|
-
- gemfiles/
|
252
|
-
- gemfiles/rails_edge.gemfile
|
151
|
+
- gemfiles/rails_6.0/Gemfile
|
152
|
+
- gemfiles/rails_6.1/Gemfile
|
153
|
+
- gemfiles/rails_7.0/Gemfile
|
154
|
+
- gemfiles/rails_7.1/Gemfile
|
155
|
+
- gemfiles/rails_edge/Gemfile
|
253
156
|
- lib/formtastic.rb
|
254
157
|
- lib/formtastic/action_class_finder.rb
|
255
158
|
- lib/formtastic/actions.rb
|
@@ -264,6 +167,7 @@ files:
|
|
264
167
|
- lib/formtastic/helpers.rb
|
265
168
|
- lib/formtastic/helpers/action_helper.rb
|
266
169
|
- lib/formtastic/helpers/actions_helper.rb
|
170
|
+
- lib/formtastic/helpers/enum.rb
|
267
171
|
- lib/formtastic/helpers/errors_helper.rb
|
268
172
|
- lib/formtastic/helpers/fieldset_wrapper.rb
|
269
173
|
- lib/formtastic/helpers/file_column_detection.rb
|
@@ -322,18 +226,21 @@ files:
|
|
322
226
|
- lib/formtastic/localized_string.rb
|
323
227
|
- lib/formtastic/localizer.rb
|
324
228
|
- lib/formtastic/namespaced_class_finder.rb
|
325
|
-
- lib/formtastic/util.rb
|
326
229
|
- lib/formtastic/version.rb
|
327
230
|
- lib/generators/formtastic/form/form_generator.rb
|
231
|
+
- lib/generators/formtastic/input/input_generator.rb
|
328
232
|
- lib/generators/formtastic/install/install_generator.rb
|
329
233
|
- lib/generators/templates/_form.html.erb
|
330
234
|
- lib/generators/templates/_form.html.haml
|
331
235
|
- lib/generators/templates/_form.html.slim
|
332
236
|
- lib/generators/templates/formtastic.rb
|
237
|
+
- lib/generators/templates/input.rb
|
333
238
|
- lib/locale/en.yml
|
334
239
|
- sample/basic_inputs.html
|
335
240
|
- sample/config.ru
|
336
241
|
- sample/index.html
|
242
|
+
- script/integration-template.rb
|
243
|
+
- script/integration.sh
|
337
244
|
- spec/action_class_finder_spec.rb
|
338
245
|
- spec/actions/button_action_spec.rb
|
339
246
|
- spec/actions/generic_action_spec.rb
|
@@ -342,19 +249,21 @@ files:
|
|
342
249
|
- spec/builder/custom_builder_spec.rb
|
343
250
|
- spec/builder/error_proc_spec.rb
|
344
251
|
- spec/builder/semantic_fields_for_spec.rb
|
252
|
+
- spec/fast_spec_helper.rb
|
345
253
|
- spec/generators/formtastic/form/form_generator_spec.rb
|
254
|
+
- spec/generators/formtastic/input/input_generator_spec.rb
|
346
255
|
- spec/generators/formtastic/install/install_generator_spec.rb
|
347
256
|
- spec/helpers/action_helper_spec.rb
|
348
257
|
- spec/helpers/actions_helper_spec.rb
|
349
258
|
- spec/helpers/form_helper_spec.rb
|
350
259
|
- spec/helpers/input_helper_spec.rb
|
351
260
|
- spec/helpers/inputs_helper_spec.rb
|
352
|
-
- spec/helpers/namespaced_action_helper_spec.rb
|
353
|
-
- spec/helpers/namespaced_input_helper_spec.rb
|
354
261
|
- spec/helpers/reflection_helper_spec.rb
|
355
262
|
- spec/helpers/semantic_errors_helper_spec.rb
|
356
263
|
- spec/i18n_spec.rb
|
357
264
|
- spec/input_class_finder_spec.rb
|
265
|
+
- spec/inputs/base/collections_spec.rb
|
266
|
+
- spec/inputs/base/validations_spec.rb
|
358
267
|
- spec/inputs/boolean_input_spec.rb
|
359
268
|
- spec/inputs/check_boxes_input_spec.rb
|
360
269
|
- spec/inputs/color_input_spec.rb
|
@@ -376,6 +285,7 @@ files:
|
|
376
285
|
- spec/inputs/placeholder_spec.rb
|
377
286
|
- spec/inputs/radio_input_spec.rb
|
378
287
|
- spec/inputs/range_input_spec.rb
|
288
|
+
- spec/inputs/readonly_spec.rb
|
379
289
|
- spec/inputs/search_input_spec.rb
|
380
290
|
- spec/inputs/select_input_spec.rb
|
381
291
|
- spec/inputs/string_input_spec.rb
|
@@ -387,40 +297,37 @@ files:
|
|
387
297
|
- spec/inputs/with_options_spec.rb
|
388
298
|
- spec/localizer_spec.rb
|
389
299
|
- spec/namespaced_class_finder_spec.rb
|
300
|
+
- spec/schema.rb
|
390
301
|
- spec/spec.opts
|
391
302
|
- spec/spec_helper.rb
|
392
303
|
- spec/support/custom_macros.rb
|
393
|
-
- spec/support/deferred_garbage_collection.rb
|
394
304
|
- spec/support/deprecation.rb
|
395
305
|
- spec/support/shared_examples.rb
|
396
306
|
- spec/support/specialized_class_finder_shared_example.rb
|
397
307
|
- spec/support/test_environment.rb
|
398
|
-
|
399
|
-
homepage: http://github.com/justinfrench/formtastic
|
308
|
+
homepage: http://github.com/formtastic/formtastic
|
400
309
|
licenses:
|
401
310
|
- MIT
|
402
|
-
|
311
|
+
metadata: {}
|
312
|
+
post_install_message:
|
403
313
|
rdoc_options:
|
404
|
-
- --charset=UTF-8
|
314
|
+
- "--charset=UTF-8"
|
405
315
|
require_paths:
|
406
316
|
- lib
|
407
317
|
required_ruby_version: !ruby/object:Gem::Requirement
|
408
|
-
none: false
|
409
318
|
requirements:
|
410
|
-
- -
|
319
|
+
- - ">="
|
411
320
|
- !ruby/object:Gem::Version
|
412
|
-
version:
|
321
|
+
version: 2.6.0
|
413
322
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
414
|
-
none: false
|
415
323
|
requirements:
|
416
|
-
- -
|
324
|
+
- - ">="
|
417
325
|
- !ruby/object:Gem::Version
|
418
326
|
version: '0'
|
419
327
|
requirements: []
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
specification_version: 3
|
328
|
+
rubygems_version: 3.3.26
|
329
|
+
signing_key:
|
330
|
+
specification_version: 4
|
424
331
|
summary: A Rails form builder plugin/gem with semantically rich and accessible markup
|
425
332
|
test_files:
|
426
333
|
- spec/action_class_finder_spec.rb
|
@@ -431,19 +338,21 @@ test_files:
|
|
431
338
|
- spec/builder/custom_builder_spec.rb
|
432
339
|
- spec/builder/error_proc_spec.rb
|
433
340
|
- spec/builder/semantic_fields_for_spec.rb
|
341
|
+
- spec/fast_spec_helper.rb
|
434
342
|
- spec/generators/formtastic/form/form_generator_spec.rb
|
343
|
+
- spec/generators/formtastic/input/input_generator_spec.rb
|
435
344
|
- spec/generators/formtastic/install/install_generator_spec.rb
|
436
345
|
- spec/helpers/action_helper_spec.rb
|
437
346
|
- spec/helpers/actions_helper_spec.rb
|
438
347
|
- spec/helpers/form_helper_spec.rb
|
439
348
|
- spec/helpers/input_helper_spec.rb
|
440
349
|
- spec/helpers/inputs_helper_spec.rb
|
441
|
-
- spec/helpers/namespaced_action_helper_spec.rb
|
442
|
-
- spec/helpers/namespaced_input_helper_spec.rb
|
443
350
|
- spec/helpers/reflection_helper_spec.rb
|
444
351
|
- spec/helpers/semantic_errors_helper_spec.rb
|
445
352
|
- spec/i18n_spec.rb
|
446
353
|
- spec/input_class_finder_spec.rb
|
354
|
+
- spec/inputs/base/collections_spec.rb
|
355
|
+
- spec/inputs/base/validations_spec.rb
|
447
356
|
- spec/inputs/boolean_input_spec.rb
|
448
357
|
- spec/inputs/check_boxes_input_spec.rb
|
449
358
|
- spec/inputs/color_input_spec.rb
|
@@ -465,6 +374,7 @@ test_files:
|
|
465
374
|
- spec/inputs/placeholder_spec.rb
|
466
375
|
- spec/inputs/radio_input_spec.rb
|
467
376
|
- spec/inputs/range_input_spec.rb
|
377
|
+
- spec/inputs/readonly_spec.rb
|
468
378
|
- spec/inputs/search_input_spec.rb
|
469
379
|
- spec/inputs/select_input_spec.rb
|
470
380
|
- spec/inputs/string_input_spec.rb
|
@@ -476,13 +386,11 @@ test_files:
|
|
476
386
|
- spec/inputs/with_options_spec.rb
|
477
387
|
- spec/localizer_spec.rb
|
478
388
|
- spec/namespaced_class_finder_spec.rb
|
389
|
+
- spec/schema.rb
|
479
390
|
- spec/spec.opts
|
480
391
|
- spec/spec_helper.rb
|
481
392
|
- spec/support/custom_macros.rb
|
482
|
-
- spec/support/deferred_garbage_collection.rb
|
483
393
|
- spec/support/deprecation.rb
|
484
394
|
- spec/support/shared_examples.rb
|
485
395
|
- spec/support/specialized_class_finder_shared_example.rb
|
486
396
|
- spec/support/test_environment.rb
|
487
|
-
- spec/util_spec.rb
|
488
|
-
has_rdoc:
|
data/.travis.yml
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
before_install:
|
3
|
-
- gem update --system
|
4
|
-
- gem update bundler
|
5
|
-
rvm:
|
6
|
-
- 1.9.3
|
7
|
-
- 2.0.0
|
8
|
-
- 2.1
|
9
|
-
gemfile:
|
10
|
-
- gemfiles/rails_3.2.gemfile
|
11
|
-
- gemfiles/rails_4.gemfile
|
12
|
-
- gemfiles/rails_4.0.4.gemfile
|
13
|
-
- gemfiles/rails_4.1.gemfile
|
14
|
-
- gemfiles/rails_4.2.gemfile
|
15
|
-
- gemfiles/rails_edge.gemfile
|
16
|
-
env:
|
17
|
-
- DEFER_GC=false RAILS_EDGE=true
|
18
|
-
script: "bundle exec rake spec"
|
19
|
-
matrix:
|
20
|
-
allow_failures:
|
21
|
-
- rvm: 1.9.3
|
22
|
-
gemfile: gemfiles/rails_edge.gemfile
|
23
|
-
env: DEFER_GC=false RAILS_EDGE=true
|
24
|
-
- rvm: 2.0.0
|
25
|
-
gemfile: gemfiles/rails_edge.gemfile
|
26
|
-
env: DEFER_GC=false RAILS_EDGE=true
|
27
|
-
- rvm: 2.1
|
28
|
-
gemfile: gemfiles/rails_edge.gemfile
|
29
|
-
env: DEFER_GC=false RAILS_EDGE=true
|
data/Appraisals
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
appraise 'rails-3.2' do
|
2
|
-
gem 'rails', '~> 3.2.0'
|
3
|
-
end
|
4
|
-
|
5
|
-
appraise 'rails-4' do
|
6
|
-
gem 'rails', '~> 4.0.0'
|
7
|
-
end
|
8
|
-
|
9
|
-
# Special case for a change in I18n
|
10
|
-
appraise 'rails-4.0.4' do
|
11
|
-
gem 'rails', '4.0.4'
|
12
|
-
end
|
13
|
-
|
14
|
-
appraise 'rails-4.1' do
|
15
|
-
gem 'rails', '~>4.1.0'
|
16
|
-
end
|
17
|
-
|
18
|
-
appraise 'rails-4.2' do
|
19
|
-
gem 'rails', '~>4.2.0.beta4'
|
20
|
-
end
|
21
|
-
|
22
|
-
if ENV["RAILS_EDGE"] == "true"
|
23
|
-
appraise 'rails-edge' do
|
24
|
-
gem 'rails', :git => 'git://github.com/rails/rails.git'
|
25
|
-
gem 'rack', :github => 'rack/rack'
|
26
|
-
gem 'i18n', :github => 'svenfuchs/i18n'
|
27
|
-
gem 'arel', :github => 'rails/arel'
|
28
|
-
end
|
29
|
-
end
|
data/CHANGELOG
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
3.1.3
|
2
|
-
|
3
|
-
* Fixed (silenced) additional Rails 5 deprecation on column_for_attribute that we missed in 3.1.0
|
4
|
-
|
5
|
-
3.1.2
|
6
|
-
|
7
|
-
* Fixed that we specified 4.0.4 instead of 4.1 in the Rails version deprecation message
|
8
|
-
|
9
|
-
3.1.1
|
10
|
-
|
11
|
-
* Fixed class custom input & action class loading in test environments
|
12
|
-
* Added documentation of custom input & action class finders
|
13
|
-
* Added a link to documentation & wiki from custom class deprecation warnings
|
14
|
-
|
15
|
-
3.1.0
|
16
|
-
|
17
|
-
* Performance and documentation improvements
|
18
|
-
|
19
|
-
3.1.0.rc2
|
20
|
-
|
21
|
-
* Deprecated :member_value and :member_label options
|
22
|
-
|
23
|
-
3.1.0.rc1
|
24
|
-
|
25
|
-
* Deprecated support for Rails version < 4.1.0
|
26
|
-
* Fixed synchronization issues with custom_namespace configuration
|
27
|
-
* Fixed bug where boolean (checkbox) inputs were not being correctly checked (also in 2.3.1)
|
28
|
-
* Fixed (silenced) Rails 5 deprecation on column_for_attribute that we're handling fine
|
29
|
-
* Added new DatalistInput (:as => :datalist) for HTML5 datalists
|
30
|
-
* Added configurable namespaces for custom inputs
|
31
|
-
* Various performance and documentation improvements
|
32
|
-
|
33
|
-
---
|
34
|
-
|
35
|
-
See 3.0-stable branch for 3.0.x changes
|
36
|
-
https://github.com/justinfrench/formtastic/blob/3.0-stable/CHANGELOG
|
37
|
-
|
38
|
-
See 2.3-stable branch for 2.3.x and earlier releases
|
39
|
-
https://github.com/justinfrench/formtastic/blob/2.3-stable/CHANGELOG
|
data/DEPRECATIONS
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
This document is for tracking deprecations and removals of
|
2
|
-
Formtastic features and compatibilities.
|
3
|
-
|
4
|
-
v4.0 (planned)
|
5
|
-
|
6
|
-
* Remove support for Rails < 4.1
|
7
|
-
* Remove support for country_select 1.x syntax (they want to remove it in 3.0)
|
8
|
-
|
9
|
-
v3.1 (master)
|
10
|
-
|
11
|
-
* Deprecate support for Rails < 4.1
|
12
|
-
* Deprecate :member_value option
|
13
|
-
* Deprecate :member_label option
|
14
|
-
|
15
|
-
v3.0
|
16
|
-
|
17
|
-
* Remove support for Ruby version < 1.9.3
|
18
|
-
* Remove support for Rails version < 3.2.13
|
19
|
-
* Remove deprecated option :value (#1025)
|
20
|
-
* Remove deprecated option :hint_class (#1025)
|
21
|
-
* Remove deprecated option :error_class (#1025)
|
22
|
-
* Remove deprecated option :group_by (#1025)
|
23
|
-
* Remove deprecated option :group_label (#1025)
|
24
|
-
* Remove deprecated option :find_options (#1025)
|
25
|
-
* Deprecate support for Rails < 4.0.4
|
26
|
-
|
27
|
-
v2.3
|
28
|
-
|
29
|
-
* Remove deprecated date, time and datetime inputs
|
30
|
-
* Deprecate :error_class option
|
31
|
-
* Deprecate support for Rails < 3.2.13
|
32
|
-
|
33
|
-
v2.2
|
34
|
-
|
35
|
-
* Remove deprecated buttons DSL, ButtonHelper and commit_button helper
|
36
|
-
* Deprecate :value option
|
37
|
-
* Deprecate :hint_class option
|
38
|
-
* Deprecate :error_class option
|
39
|
-
* Deprecate :group_by and :group_label options
|
40
|
-
* Deprecate :find_options option
|
41
|
-
|
42
|
-
v2.1
|
43
|
-
|
44
|
-
* Remove the previously deprecated :label_method, :value_method & :group_label_method options
|
45
|
-
* Remove the previously deprecated :as => :numeric
|
46
|
-
* Remove the previously deprecated inline_errors_for and related methods
|
47
|
-
* Remove the previously deprecated SemanticFormHelper and SemanticFormBuilder
|
48
|
-
* Deprecate the Buttons DSL (f.buttons, f.commit_button) in favor of the new Actions DSL — see above
|
49
|
-
|
data/gemfiles/rails_3.2.gemfile
DELETED