formtastic 3.1.3 → 5.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.
Files changed (179) hide show
  1. checksums.yaml +7 -0
  2. data/.gitattributes +1 -0
  3. data/.github/workflows/test.yml +61 -0
  4. data/.gitignore +3 -2
  5. data/CHANGELOG.md +61 -0
  6. data/Gemfile.lock +140 -0
  7. data/MIT-LICENSE +1 -1
  8. data/{README.textile → README.md} +183 -167
  9. data/RELEASE_PROCESS +3 -1
  10. data/Rakefile +20 -1
  11. data/app/assets/stylesheets/formtastic.css +1 -1
  12. data/bin/appraisal +8 -0
  13. data/formtastic.gemspec +12 -16
  14. data/gemfiles/rails_6.0/Gemfile +5 -0
  15. data/gemfiles/rails_6.1/Gemfile +5 -0
  16. data/gemfiles/rails_7.0/Gemfile +5 -0
  17. data/gemfiles/rails_7.1/Gemfile +5 -0
  18. data/gemfiles/rails_edge/Gemfile +13 -0
  19. data/lib/formtastic/action_class_finder.rb +1 -0
  20. data/lib/formtastic/actions/base.rb +1 -0
  21. data/lib/formtastic/actions/button_action.rb +1 -0
  22. data/lib/formtastic/actions/buttonish.rb +1 -0
  23. data/lib/formtastic/actions/input_action.rb +1 -0
  24. data/lib/formtastic/actions/link_action.rb +1 -0
  25. data/lib/formtastic/actions.rb +7 -3
  26. data/lib/formtastic/deprecation.rb +2 -38
  27. data/lib/formtastic/engine.rb +4 -1
  28. data/lib/formtastic/form_builder.rb +12 -24
  29. data/lib/formtastic/helpers/action_helper.rb +2 -48
  30. data/lib/formtastic/helpers/actions_helper.rb +1 -0
  31. data/lib/formtastic/helpers/enum.rb +14 -0
  32. data/lib/formtastic/helpers/errors_helper.rb +3 -2
  33. data/lib/formtastic/helpers/fieldset_wrapper.rb +14 -9
  34. data/lib/formtastic/helpers/file_column_detection.rb +1 -0
  35. data/lib/formtastic/helpers/form_helper.rb +2 -1
  36. data/lib/formtastic/helpers/input_helper.rb +20 -76
  37. data/lib/formtastic/helpers/inputs_helper.rb +29 -23
  38. data/lib/formtastic/helpers/reflection.rb +1 -0
  39. data/lib/formtastic/helpers.rb +2 -2
  40. data/lib/formtastic/html_attributes.rb +1 -0
  41. data/lib/formtastic/i18n.rb +2 -1
  42. data/lib/formtastic/input_class_finder.rb +1 -0
  43. data/lib/formtastic/inputs/base/associations.rb +1 -0
  44. data/lib/formtastic/inputs/base/choices.rb +3 -2
  45. data/lib/formtastic/inputs/base/collections.rb +46 -10
  46. data/lib/formtastic/inputs/base/database.rb +5 -7
  47. data/lib/formtastic/inputs/base/datetime_pickerish.rb +1 -0
  48. data/lib/formtastic/inputs/base/errors.rb +7 -6
  49. data/lib/formtastic/inputs/base/fileish.rb +1 -0
  50. data/lib/formtastic/inputs/base/hints.rb +2 -1
  51. data/lib/formtastic/inputs/base/html.rb +9 -7
  52. data/lib/formtastic/inputs/base/labelling.rb +3 -2
  53. data/lib/formtastic/inputs/base/naming.rb +5 -4
  54. data/lib/formtastic/inputs/base/numeric.rb +1 -0
  55. data/lib/formtastic/inputs/base/options.rb +3 -3
  56. data/lib/formtastic/inputs/base/placeholder.rb +1 -0
  57. data/lib/formtastic/inputs/base/stringish.rb +1 -0
  58. data/lib/formtastic/inputs/base/timeish.rb +9 -4
  59. data/lib/formtastic/inputs/base/validations.rb +39 -12
  60. data/lib/formtastic/inputs/base/wrapping.rb +1 -0
  61. data/lib/formtastic/inputs/base.rb +3 -2
  62. data/lib/formtastic/inputs/boolean_input.rb +2 -1
  63. data/lib/formtastic/inputs/check_boxes_input.rb +15 -6
  64. data/lib/formtastic/inputs/color_input.rb +1 -1
  65. data/lib/formtastic/inputs/country_input.rb +4 -1
  66. data/lib/formtastic/inputs/datalist_input.rb +1 -0
  67. data/lib/formtastic/inputs/date_picker_input.rb +1 -0
  68. data/lib/formtastic/inputs/date_select_input.rb +1 -0
  69. data/lib/formtastic/inputs/datetime_picker_input.rb +1 -0
  70. data/lib/formtastic/inputs/datetime_select_input.rb +1 -0
  71. data/lib/formtastic/inputs/email_input.rb +1 -0
  72. data/lib/formtastic/inputs/file_input.rb +1 -0
  73. data/lib/formtastic/inputs/hidden_input.rb +3 -2
  74. data/lib/formtastic/inputs/number_input.rb +1 -0
  75. data/lib/formtastic/inputs/password_input.rb +1 -0
  76. data/lib/formtastic/inputs/phone_input.rb +1 -0
  77. data/lib/formtastic/inputs/radio_input.rb +21 -0
  78. data/lib/formtastic/inputs/range_input.rb +1 -0
  79. data/lib/formtastic/inputs/search_input.rb +1 -0
  80. data/lib/formtastic/inputs/select_input.rb +30 -1
  81. data/lib/formtastic/inputs/string_input.rb +1 -0
  82. data/lib/formtastic/inputs/text_input.rb +1 -0
  83. data/lib/formtastic/inputs/time_picker_input.rb +1 -0
  84. data/lib/formtastic/inputs/time_select_input.rb +1 -0
  85. data/lib/formtastic/inputs/time_zone_input.rb +17 -6
  86. data/lib/formtastic/inputs/url_input.rb +1 -0
  87. data/lib/formtastic/inputs.rb +33 -29
  88. data/lib/formtastic/localized_string.rb +1 -0
  89. data/lib/formtastic/localizer.rb +21 -22
  90. data/lib/formtastic/namespaced_class_finder.rb +8 -9
  91. data/lib/formtastic/version.rb +2 -1
  92. data/lib/formtastic.rb +10 -11
  93. data/lib/generators/formtastic/form/form_generator.rb +2 -1
  94. data/lib/generators/formtastic/input/input_generator.rb +47 -0
  95. data/lib/generators/formtastic/install/install_generator.rb +1 -0
  96. data/lib/generators/templates/formtastic.rb +15 -13
  97. data/lib/generators/templates/input.rb +19 -0
  98. data/sample/basic_inputs.html +1 -1
  99. data/script/integration-template.rb +73 -0
  100. data/script/integration.sh +19 -0
  101. data/spec/action_class_finder_spec.rb +2 -1
  102. data/spec/actions/button_action_spec.rb +21 -20
  103. data/spec/actions/generic_action_spec.rb +134 -133
  104. data/spec/actions/input_action_spec.rb +20 -19
  105. data/spec/actions/link_action_spec.rb +30 -29
  106. data/spec/builder/custom_builder_spec.rb +39 -22
  107. data/spec/builder/error_proc_spec.rb +6 -5
  108. data/spec/builder/semantic_fields_for_spec.rb +46 -45
  109. data/spec/fast_spec_helper.rb +13 -0
  110. data/spec/generators/formtastic/form/form_generator_spec.rb +33 -32
  111. data/spec/generators/formtastic/input/input_generator_spec.rb +125 -0
  112. data/spec/generators/formtastic/install/install_generator_spec.rb +10 -9
  113. data/spec/helpers/action_helper_spec.rb +329 -10
  114. data/spec/helpers/actions_helper_spec.rb +43 -42
  115. data/spec/helpers/form_helper_spec.rb +45 -38
  116. data/spec/helpers/input_helper_spec.rb +976 -2
  117. data/spec/helpers/inputs_helper_spec.rb +217 -202
  118. data/spec/helpers/reflection_helper_spec.rb +7 -6
  119. data/spec/helpers/semantic_errors_helper_spec.rb +26 -25
  120. data/spec/i18n_spec.rb +30 -29
  121. data/spec/input_class_finder_spec.rb +2 -1
  122. data/spec/inputs/base/collections_spec.rb +78 -0
  123. data/spec/inputs/base/validations_spec.rb +481 -0
  124. data/spec/inputs/boolean_input_spec.rb +73 -72
  125. data/spec/inputs/check_boxes_input_spec.rb +169 -121
  126. data/spec/inputs/color_input_spec.rb +53 -64
  127. data/spec/inputs/country_input_spec.rb +23 -22
  128. data/spec/inputs/custom_input_spec.rb +3 -6
  129. data/spec/inputs/datalist_input_spec.rb +3 -2
  130. data/spec/inputs/date_picker_input_spec.rb +114 -113
  131. data/spec/inputs/date_select_input_spec.rb +76 -61
  132. data/spec/inputs/datetime_picker_input_spec.rb +123 -122
  133. data/spec/inputs/datetime_select_input_spec.rb +85 -68
  134. data/spec/inputs/email_input_spec.rb +17 -16
  135. data/spec/inputs/file_input_spec.rb +18 -17
  136. data/spec/inputs/hidden_input_spec.rb +32 -31
  137. data/spec/inputs/include_blank_spec.rb +10 -9
  138. data/spec/inputs/label_spec.rb +26 -25
  139. data/spec/inputs/number_input_spec.rb +212 -211
  140. data/spec/inputs/password_input_spec.rb +17 -16
  141. data/spec/inputs/phone_input_spec.rb +17 -16
  142. data/spec/inputs/placeholder_spec.rb +18 -17
  143. data/spec/inputs/radio_input_spec.rb +92 -65
  144. data/spec/inputs/range_input_spec.rb +136 -135
  145. data/spec/inputs/readonly_spec.rb +51 -0
  146. data/spec/inputs/search_input_spec.rb +16 -15
  147. data/spec/inputs/select_input_spec.rb +209 -102
  148. data/spec/inputs/string_input_spec.rb +51 -50
  149. data/spec/inputs/text_input_spec.rb +34 -33
  150. data/spec/inputs/time_picker_input_spec.rb +115 -114
  151. data/spec/inputs/time_select_input_spec.rb +84 -70
  152. data/spec/inputs/time_zone_input_spec.rb +58 -31
  153. data/spec/inputs/url_input_spec.rb +17 -16
  154. data/spec/inputs/with_options_spec.rb +9 -8
  155. data/spec/localizer_spec.rb +18 -17
  156. data/spec/namespaced_class_finder_spec.rb +18 -6
  157. data/spec/schema.rb +22 -0
  158. data/spec/spec_helper.rb +172 -260
  159. data/spec/support/custom_macros.rb +74 -76
  160. data/spec/support/deprecation.rb +2 -1
  161. data/spec/support/shared_examples.rb +2 -1233
  162. data/spec/support/specialized_class_finder_shared_example.rb +1 -0
  163. data/spec/support/test_environment.rb +24 -9
  164. metadata +78 -170
  165. data/.travis.yml +0 -29
  166. data/Appraisals +0 -29
  167. data/CHANGELOG +0 -39
  168. data/DEPRECATIONS +0 -49
  169. data/gemfiles/rails_3.2.gemfile +0 -7
  170. data/gemfiles/rails_4.0.4.gemfile +0 -7
  171. data/gemfiles/rails_4.1.gemfile +0 -7
  172. data/gemfiles/rails_4.2.gemfile +0 -7
  173. data/gemfiles/rails_4.gemfile +0 -7
  174. data/gemfiles/rails_edge.gemfile +0 -10
  175. data/lib/formtastic/util.rb +0 -57
  176. data/spec/helpers/namespaced_action_helper_spec.rb +0 -43
  177. data/spec/helpers/namespaced_input_helper_spec.rb +0 -36
  178. data/spec/support/deferred_garbage_collection.rb +0 -21
  179. data/spec/util_spec.rb +0 -66
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+ # frozen_string_literal: true
2
3
  #
3
4
  RSpec.shared_examples 'Specialized Class Finder' do
4
5
  let(:builder) { Formtastic::FormBuilder.allocate }
@@ -1,11 +1,33 @@
1
1
  # encoding: utf-8
2
+ # frozen_string_literal: true
2
3
  require 'rspec/core'
3
- require 'rspec_tag_matchers'
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: 3.1.3
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: 2015-01-09 00:00:00.000000000 Z
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: 3.2.13
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: 3.2.13
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: '2.14'
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: '2.14'
40
+ version: '4.0'
62
41
  - !ruby/object:Gem::Dependency
63
- name: rspec_tag_matchers
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: '1.0'
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: '1.0'
54
+ version: 0.1.0
78
55
  - !ruby/object:Gem::Dependency
79
- name: hpricot
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: 0.8.3
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: 0.8.3
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: '0.8'
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: '0.8'
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: '1.0'
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: '1.0'
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: activemodel
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: 3.2.13
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: 3.2.13
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.textile
132
+ - README.md
230
133
  files:
231
- - .gitignore
232
- - .rspec
233
- - .travis.yml
234
- - .yardopts
235
- - Appraisals
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.textile
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/rails_3.2.gemfile
248
- - gemfiles/rails_4.0.4.gemfile
249
- - gemfiles/rails_4.1.gemfile
250
- - gemfiles/rails_4.2.gemfile
251
- - gemfiles/rails_4.gemfile
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
- - spec/util_spec.rb
399
- homepage: http://github.com/justinfrench/formtastic
308
+ homepage: http://github.com/formtastic/formtastic
400
309
  licenses:
401
310
  - MIT
402
- post_install_message:
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: 1.9.3
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
- rubyforge_project:
421
- rubygems_version: 1.8.23
422
- signing_key:
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
-
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~> 3.2.0"
6
-
7
- gemspec :path => "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "4.0.4"
6
-
7
- gemspec :path => "../"