formtastic 3.0.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. checksums.yaml +5 -13
  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} +191 -168
  9. data/RELEASE_PROCESS +3 -1
  10. data/Rakefile +24 -8
  11. data/app/assets/stylesheets/formtastic.css +1 -1
  12. data/bin/appraisal +8 -0
  13. data/formtastic.gemspec +13 -17
  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 +19 -0
  20. data/lib/formtastic/actions/base.rb +1 -0
  21. data/lib/formtastic/actions/button_action.rb +56 -53
  22. data/lib/formtastic/actions/buttonish.rb +1 -0
  23. data/lib/formtastic/actions/input_action.rb +60 -57
  24. data/lib/formtastic/actions/link_action.rb +69 -67
  25. data/lib/formtastic/actions.rb +7 -3
  26. data/lib/formtastic/deprecation.rb +6 -0
  27. data/lib/formtastic/engine.rb +4 -1
  28. data/lib/formtastic/form_builder.rb +32 -25
  29. data/lib/formtastic/helpers/action_helper.rb +22 -31
  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 +16 -11
  34. data/lib/formtastic/helpers/file_column_detection.rb +1 -0
  35. data/lib/formtastic/helpers/form_helper.rb +4 -3
  36. data/lib/formtastic/helpers/input_helper.rb +59 -80
  37. data/lib/formtastic/helpers/inputs_helper.rb +33 -27
  38. data/lib/formtastic/helpers/reflection.rb +5 -4
  39. data/lib/formtastic/helpers.rb +2 -2
  40. data/lib/formtastic/html_attributes.rb +13 -1
  41. data/lib/formtastic/i18n.rb +2 -1
  42. data/lib/formtastic/input_class_finder.rb +19 -0
  43. data/lib/formtastic/inputs/base/associations.rb +1 -0
  44. data/lib/formtastic/inputs/base/choices.rb +4 -3
  45. data/lib/formtastic/inputs/base/collections.rb +47 -11
  46. data/lib/formtastic/inputs/base/database.rb +8 -5
  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 +12 -10
  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 +2 -3
  61. data/lib/formtastic/inputs/base.rb +17 -12
  62. data/lib/formtastic/inputs/boolean_input.rb +2 -1
  63. data/lib/formtastic/inputs/check_boxes_input.rb +16 -24
  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 +42 -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 +3 -2
  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 +26 -21
  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 +32 -10
  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 -28
  88. data/lib/formtastic/localized_string.rb +2 -1
  89. data/lib/formtastic/localizer.rb +23 -24
  90. data/lib/formtastic/namespaced_class_finder.rb +98 -0
  91. data/lib/formtastic/version.rb +2 -1
  92. data/lib/formtastic.rb +19 -14
  93. data/lib/generators/formtastic/form/form_generator.rb +8 -2
  94. data/lib/generators/formtastic/input/input_generator.rb +47 -0
  95. data/lib/generators/formtastic/install/install_generator.rb +2 -0
  96. data/lib/generators/templates/formtastic.rb +29 -7
  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 +13 -0
  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 +70 -97
  114. data/spec/helpers/actions_helper_spec.rb +43 -42
  115. data/spec/helpers/form_helper_spec.rb +56 -39
  116. data/spec/helpers/input_helper_spec.rb +314 -255
  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 +11 -0
  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 +174 -123
  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 +62 -0
  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 +36 -31
  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 +91 -0
  157. data/spec/schema.rb +22 -0
  158. data/spec/spec_helper.rb +180 -249
  159. data/spec/support/custom_macros.rb +128 -98
  160. data/spec/support/deprecation.rb +2 -1
  161. data/spec/support/shared_examples.rb +13 -0
  162. data/spec/support/specialized_class_finder_shared_example.rb +28 -0
  163. data/spec/support/test_environment.rb +25 -10
  164. metadata +95 -136
  165. data/.travis.yml +0 -28
  166. data/Appraisals +0 -25
  167. data/CHANGELOG +0 -27
  168. data/gemfiles/rails_3.2.gemfile +0 -7
  169. data/gemfiles/rails_4.0.4.gemfile +0 -7
  170. data/gemfiles/rails_4.1.gemfile +0 -7
  171. data/gemfiles/rails_4.gemfile +0 -7
  172. data/gemfiles/rails_edge.gemfile +0 -10
  173. data/lib/formtastic/util.rb +0 -53
  174. data/spec/support/deferred_garbage_collection.rb +0 -21
  175. data/spec/util_spec.rb +0 -52
@@ -1,11 +1,33 @@
1
1
  # encoding: utf-8
2
- require 'rspec'
3
- require 'rspec_tag_matchers'
2
+ # frozen_string_literal: true
3
+ require 'rspec/core'
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,197 +1,127 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formtastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin French
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-06 00:00:00.000000000 Z
11
+ date: 2023-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.2.13
19
+ version: 6.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 3.2.13
27
- - !ruby/object:Gem::Dependency
28
- name: nokogiri
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - <
32
- - !ruby/object:Gem::Version
33
- version: 1.6.0
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - <
39
- - !ruby/object:Gem::Version
40
- version: 1.6.0
26
+ version: 6.0.0
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rspec-rails
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
- - - ~>
31
+ - - ">="
46
32
  - !ruby/object:Gem::Version
47
- version: '2.14'
33
+ version: '4.0'
48
34
  type: :development
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
- - - ~>
38
+ - - ">="
53
39
  - !ruby/object:Gem::Version
54
- version: '2.14'
40
+ version: '4.0'
55
41
  - !ruby/object:Gem::Dependency
56
- name: rspec_tag_matchers
42
+ name: rspec-dom-testing
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
- - - ~>
45
+ - - ">="
60
46
  - !ruby/object:Gem::Version
61
- version: '1.0'
47
+ version: 0.1.0
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - ~>
52
+ - - ">="
67
53
  - !ruby/object:Gem::Version
68
- version: '1.0'
54
+ version: 0.1.0
69
55
  - !ruby/object:Gem::Dependency
70
- name: hpricot
56
+ name: rspec-mocks
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - ~>
59
+ - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: 0.8.3
61
+ version: 3.12.2
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - ~>
66
+ - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: 0.8.3
83
- - !ruby/object:Gem::Dependency
84
- name: BlueCloth
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- version: '1.0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ~>
95
- - !ruby/object:Gem::Version
96
- version: '1.0'
68
+ version: 3.12.2
97
69
  - !ruby/object:Gem::Dependency
98
70
  name: yard
99
71
  requirement: !ruby/object:Gem::Requirement
100
72
  requirements:
101
- - - ~>
73
+ - - "~>"
102
74
  - !ruby/object:Gem::Version
103
- version: '0.6'
75
+ version: 0.9.20
104
76
  type: :development
105
77
  prerelease: false
106
78
  version_requirements: !ruby/object:Gem::Requirement
107
79
  requirements:
108
- - - ~>
80
+ - - "~>"
109
81
  - !ruby/object:Gem::Version
110
- version: '0.6'
111
- - !ruby/object:Gem::Dependency
112
- name: colored
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ~>
116
- - !ruby/object:Gem::Version
117
- version: '1.2'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ~>
123
- - !ruby/object:Gem::Version
124
- version: '1.2'
125
- - !ruby/object:Gem::Dependency
126
- name: tzinfo
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ! '>='
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ! '>='
137
- - !ruby/object:Gem::Version
138
- version: '0'
82
+ version: 0.9.20
139
83
  - !ruby/object:Gem::Dependency
140
84
  name: ammeter
141
85
  requirement: !ruby/object:Gem::Requirement
142
86
  requirements:
143
- - - '='
144
- - !ruby/object:Gem::Version
145
- version: 0.2.5
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - '='
151
- - !ruby/object:Gem::Version
152
- version: 0.2.5
153
- - !ruby/object:Gem::Dependency
154
- name: appraisal
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ~>
87
+ - - "~>"
158
88
  - !ruby/object:Gem::Version
159
- version: '1.0'
89
+ version: 1.1.3
160
90
  type: :development
161
91
  prerelease: false
162
92
  version_requirements: !ruby/object:Gem::Requirement
163
93
  requirements:
164
- - - ~>
94
+ - - "~>"
165
95
  - !ruby/object:Gem::Version
166
- version: '1.0'
96
+ version: 1.1.3
167
97
  - !ruby/object:Gem::Dependency
168
98
  name: rake
169
99
  requirement: !ruby/object:Gem::Requirement
170
100
  requirements:
171
- - - <=
101
+ - - ">="
172
102
  - !ruby/object:Gem::Version
173
- version: 10.1.1
103
+ version: '0'
174
104
  type: :development
175
105
  prerelease: false
176
106
  version_requirements: !ruby/object:Gem::Requirement
177
107
  requirements:
178
- - - <=
108
+ - - ">="
179
109
  - !ruby/object:Gem::Version
180
- version: 10.1.1
110
+ version: '0'
181
111
  - !ruby/object:Gem::Dependency
182
- name: activemodel
112
+ name: sqlite3
183
113
  requirement: !ruby/object:Gem::Requirement
184
114
  requirements:
185
- - - ! '>='
115
+ - - "~>"
186
116
  - !ruby/object:Gem::Version
187
- version: 3.2.13
117
+ version: '1.4'
188
118
  type: :development
189
119
  prerelease: false
190
120
  version_requirements: !ruby/object:Gem::Requirement
191
121
  requirements:
192
- - - ! '>='
122
+ - - "~>"
193
123
  - !ruby/object:Gem::Version
194
- version: 3.2.13
124
+ version: '1.4'
195
125
  description: A Rails form builder plugin/gem with semantically rich and accessible
196
126
  markup
197
127
  email:
@@ -199,40 +129,45 @@ email:
199
129
  executables: []
200
130
  extensions: []
201
131
  extra_rdoc_files:
202
- - README.textile
132
+ - README.md
203
133
  files:
204
- - .gitignore
205
- - .rspec
206
- - .travis.yml
207
- - .yardopts
208
- - Appraisals
209
- - CHANGELOG
134
+ - ".gitattributes"
135
+ - ".github/workflows/test.yml"
136
+ - ".gitignore"
137
+ - ".rspec"
138
+ - ".yardopts"
139
+ - CHANGELOG.md
210
140
  - Gemfile
141
+ - Gemfile.lock
211
142
  - MIT-LICENSE
212
- - README.textile
143
+ - README.md
213
144
  - RELEASE_PROCESS
214
145
  - Rakefile
215
146
  - app/assets/stylesheets/formtastic.css
216
147
  - app/assets/stylesheets/formtastic_ie6.css
217
148
  - app/assets/stylesheets/formtastic_ie7.css
149
+ - bin/appraisal
218
150
  - formtastic.gemspec
219
- - gemfiles/rails_3.2.gemfile
220
- - gemfiles/rails_4.0.4.gemfile
221
- - gemfiles/rails_4.1.gemfile
222
- - gemfiles/rails_4.gemfile
223
- - 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
224
156
  - lib/formtastic.rb
157
+ - lib/formtastic/action_class_finder.rb
225
158
  - lib/formtastic/actions.rb
226
159
  - lib/formtastic/actions/base.rb
227
160
  - lib/formtastic/actions/button_action.rb
228
161
  - lib/formtastic/actions/buttonish.rb
229
162
  - lib/formtastic/actions/input_action.rb
230
163
  - lib/formtastic/actions/link_action.rb
164
+ - lib/formtastic/deprecation.rb
231
165
  - lib/formtastic/engine.rb
232
166
  - lib/formtastic/form_builder.rb
233
167
  - lib/formtastic/helpers.rb
234
168
  - lib/formtastic/helpers/action_helper.rb
235
169
  - lib/formtastic/helpers/actions_helper.rb
170
+ - lib/formtastic/helpers/enum.rb
236
171
  - lib/formtastic/helpers/errors_helper.rb
237
172
  - lib/formtastic/helpers/fieldset_wrapper.rb
238
173
  - lib/formtastic/helpers/file_column_detection.rb
@@ -242,6 +177,7 @@ files:
242
177
  - lib/formtastic/helpers/reflection.rb
243
178
  - lib/formtastic/html_attributes.rb
244
179
  - lib/formtastic/i18n.rb
180
+ - lib/formtastic/input_class_finder.rb
245
181
  - lib/formtastic/inputs.rb
246
182
  - lib/formtastic/inputs/base.rb
247
183
  - lib/formtastic/inputs/base/associations.rb
@@ -266,6 +202,7 @@ files:
266
202
  - lib/formtastic/inputs/check_boxes_input.rb
267
203
  - lib/formtastic/inputs/color_input.rb
268
204
  - lib/formtastic/inputs/country_input.rb
205
+ - lib/formtastic/inputs/datalist_input.rb
269
206
  - lib/formtastic/inputs/date_picker_input.rb
270
207
  - lib/formtastic/inputs/date_select_input.rb
271
208
  - lib/formtastic/inputs/datetime_picker_input.rb
@@ -288,18 +225,23 @@ files:
288
225
  - lib/formtastic/inputs/url_input.rb
289
226
  - lib/formtastic/localized_string.rb
290
227
  - lib/formtastic/localizer.rb
291
- - lib/formtastic/util.rb
228
+ - lib/formtastic/namespaced_class_finder.rb
292
229
  - lib/formtastic/version.rb
293
230
  - lib/generators/formtastic/form/form_generator.rb
231
+ - lib/generators/formtastic/input/input_generator.rb
294
232
  - lib/generators/formtastic/install/install_generator.rb
295
233
  - lib/generators/templates/_form.html.erb
296
234
  - lib/generators/templates/_form.html.haml
297
235
  - lib/generators/templates/_form.html.slim
298
236
  - lib/generators/templates/formtastic.rb
237
+ - lib/generators/templates/input.rb
299
238
  - lib/locale/en.yml
300
239
  - sample/basic_inputs.html
301
240
  - sample/config.ru
302
241
  - sample/index.html
242
+ - script/integration-template.rb
243
+ - script/integration.sh
244
+ - spec/action_class_finder_spec.rb
303
245
  - spec/actions/button_action_spec.rb
304
246
  - spec/actions/generic_action_spec.rb
305
247
  - spec/actions/input_action_spec.rb
@@ -307,7 +249,9 @@ files:
307
249
  - spec/builder/custom_builder_spec.rb
308
250
  - spec/builder/error_proc_spec.rb
309
251
  - spec/builder/semantic_fields_for_spec.rb
252
+ - spec/fast_spec_helper.rb
310
253
  - spec/generators/formtastic/form/form_generator_spec.rb
254
+ - spec/generators/formtastic/input/input_generator_spec.rb
311
255
  - spec/generators/formtastic/install/install_generator_spec.rb
312
256
  - spec/helpers/action_helper_spec.rb
313
257
  - spec/helpers/actions_helper_spec.rb
@@ -317,11 +261,15 @@ files:
317
261
  - spec/helpers/reflection_helper_spec.rb
318
262
  - spec/helpers/semantic_errors_helper_spec.rb
319
263
  - spec/i18n_spec.rb
264
+ - spec/input_class_finder_spec.rb
265
+ - spec/inputs/base/collections_spec.rb
266
+ - spec/inputs/base/validations_spec.rb
320
267
  - spec/inputs/boolean_input_spec.rb
321
268
  - spec/inputs/check_boxes_input_spec.rb
322
269
  - spec/inputs/color_input_spec.rb
323
270
  - spec/inputs/country_input_spec.rb
324
271
  - spec/inputs/custom_input_spec.rb
272
+ - spec/inputs/datalist_input_spec.rb
325
273
  - spec/inputs/date_picker_input_spec.rb
326
274
  - spec/inputs/date_select_input_spec.rb
327
275
  - spec/inputs/datetime_picker_input_spec.rb
@@ -337,6 +285,7 @@ files:
337
285
  - spec/inputs/placeholder_spec.rb
338
286
  - spec/inputs/radio_input_spec.rb
339
287
  - spec/inputs/range_input_spec.rb
288
+ - spec/inputs/readonly_spec.rb
340
289
  - spec/inputs/search_input_spec.rb
341
290
  - spec/inputs/select_input_spec.rb
342
291
  - spec/inputs/string_input_spec.rb
@@ -347,39 +296,41 @@ files:
347
296
  - spec/inputs/url_input_spec.rb
348
297
  - spec/inputs/with_options_spec.rb
349
298
  - spec/localizer_spec.rb
299
+ - spec/namespaced_class_finder_spec.rb
300
+ - spec/schema.rb
350
301
  - spec/spec.opts
351
302
  - spec/spec_helper.rb
352
303
  - spec/support/custom_macros.rb
353
- - spec/support/deferred_garbage_collection.rb
354
304
  - spec/support/deprecation.rb
305
+ - spec/support/shared_examples.rb
306
+ - spec/support/specialized_class_finder_shared_example.rb
355
307
  - spec/support/test_environment.rb
356
- - spec/util_spec.rb
357
- homepage: http://github.com/justinfrench/formtastic
308
+ homepage: http://github.com/formtastic/formtastic
358
309
  licenses:
359
310
  - MIT
360
311
  metadata: {}
361
- post_install_message:
312
+ post_install_message:
362
313
  rdoc_options:
363
- - --charset=UTF-8
314
+ - "--charset=UTF-8"
364
315
  require_paths:
365
316
  - lib
366
317
  required_ruby_version: !ruby/object:Gem::Requirement
367
318
  requirements:
368
- - - ! '>='
319
+ - - ">="
369
320
  - !ruby/object:Gem::Version
370
- version: 1.9.3
321
+ version: 2.6.0
371
322
  required_rubygems_version: !ruby/object:Gem::Requirement
372
323
  requirements:
373
- - - ! '>='
324
+ - - ">="
374
325
  - !ruby/object:Gem::Version
375
326
  version: '0'
376
327
  requirements: []
377
- rubyforge_project:
378
- rubygems_version: 2.4.1
379
- signing_key:
328
+ rubygems_version: 3.3.26
329
+ signing_key:
380
330
  specification_version: 4
381
331
  summary: A Rails form builder plugin/gem with semantically rich and accessible markup
382
332
  test_files:
333
+ - spec/action_class_finder_spec.rb
383
334
  - spec/actions/button_action_spec.rb
384
335
  - spec/actions/generic_action_spec.rb
385
336
  - spec/actions/input_action_spec.rb
@@ -387,7 +338,9 @@ test_files:
387
338
  - spec/builder/custom_builder_spec.rb
388
339
  - spec/builder/error_proc_spec.rb
389
340
  - spec/builder/semantic_fields_for_spec.rb
341
+ - spec/fast_spec_helper.rb
390
342
  - spec/generators/formtastic/form/form_generator_spec.rb
343
+ - spec/generators/formtastic/input/input_generator_spec.rb
391
344
  - spec/generators/formtastic/install/install_generator_spec.rb
392
345
  - spec/helpers/action_helper_spec.rb
393
346
  - spec/helpers/actions_helper_spec.rb
@@ -397,11 +350,15 @@ test_files:
397
350
  - spec/helpers/reflection_helper_spec.rb
398
351
  - spec/helpers/semantic_errors_helper_spec.rb
399
352
  - spec/i18n_spec.rb
353
+ - spec/input_class_finder_spec.rb
354
+ - spec/inputs/base/collections_spec.rb
355
+ - spec/inputs/base/validations_spec.rb
400
356
  - spec/inputs/boolean_input_spec.rb
401
357
  - spec/inputs/check_boxes_input_spec.rb
402
358
  - spec/inputs/color_input_spec.rb
403
359
  - spec/inputs/country_input_spec.rb
404
360
  - spec/inputs/custom_input_spec.rb
361
+ - spec/inputs/datalist_input_spec.rb
405
362
  - spec/inputs/date_picker_input_spec.rb
406
363
  - spec/inputs/date_select_input_spec.rb
407
364
  - spec/inputs/datetime_picker_input_spec.rb
@@ -417,6 +374,7 @@ test_files:
417
374
  - spec/inputs/placeholder_spec.rb
418
375
  - spec/inputs/radio_input_spec.rb
419
376
  - spec/inputs/range_input_spec.rb
377
+ - spec/inputs/readonly_spec.rb
420
378
  - spec/inputs/search_input_spec.rb
421
379
  - spec/inputs/select_input_spec.rb
422
380
  - spec/inputs/string_input_spec.rb
@@ -427,11 +385,12 @@ test_files:
427
385
  - spec/inputs/url_input_spec.rb
428
386
  - spec/inputs/with_options_spec.rb
429
387
  - spec/localizer_spec.rb
388
+ - spec/namespaced_class_finder_spec.rb
389
+ - spec/schema.rb
430
390
  - spec/spec.opts
431
391
  - spec/spec_helper.rb
432
392
  - spec/support/custom_macros.rb
433
- - spec/support/deferred_garbage_collection.rb
434
393
  - spec/support/deprecation.rb
394
+ - spec/support/shared_examples.rb
395
+ - spec/support/specialized_class_finder_shared_example.rb
435
396
  - spec/support/test_environment.rb
436
- - spec/util_spec.rb
437
- has_rdoc:
data/.travis.yml DELETED
@@ -1,28 +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_edge.gemfile
15
- env:
16
- - DEFER_GC=false RAILS_EDGE=true
17
- script: "bundle exec rake spec"
18
- matrix:
19
- allow_failures:
20
- - rvm: 1.9.3
21
- gemfile: gemfiles/rails_edge.gemfile
22
- env: DEFER_GC=false RAILS_EDGE=true
23
- - rvm: 2.0.0
24
- gemfile: gemfiles/rails_edge.gemfile
25
- env: DEFER_GC=false RAILS_EDGE=true
26
- - rvm: 2.1
27
- gemfile: gemfiles/rails_edge.gemfile
28
- env: DEFER_GC=false RAILS_EDGE=true
data/Appraisals DELETED
@@ -1,25 +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
- if ENV["RAILS_EDGE"] == "true"
19
- appraise 'rails-edge' do
20
- gem 'rails', :git => 'git://github.com/rails/rails.git'
21
- gem 'rack', :github => 'rack/rack'
22
- gem 'i18n', :github => 'svenfuchs/i18n'
23
- gem 'arel', :github => 'rails/arel'
24
- end
25
- end
data/CHANGELOG DELETED
@@ -1,27 +0,0 @@
1
- 3.0.0
2
-
3
- * No changes since 3.0.0.rc2
4
-
5
- 3.0.0.rc2
6
-
7
- * Fixed bug where boolean (checkbox) inputs were not being correctly checked
8
-
9
-
10
- 3.0.0.rc
11
-
12
- * Removed support for Ruby version < 1.9.3
13
- * Removed support for Rails version < 3.2.13
14
- * Removed deprecated option :input_html => { :value => '...'} (#1025)
15
- * Removed deprecated option :hint_class (#1025)
16
- * Removed deprecated option :error_class (#1025)
17
- * Removed deprecated option :group_by (#1025)
18
- * Removed deprecated option :group_label (#1025)
19
- * Removed deprecated option :find_options (#1025)
20
- * Deprecated support for Rails < 4.0.4
21
- * Changed i18n lookups to use the `:as` option from the form builder (#1033)
22
- * Improved documentation for country_select gem compatibility & support (#1061)
23
- * Improved documentation for browser support of datetime and datetime-local (#1029)
24
- * Added support for ColorInput (:as => :color) in Rails 4 (#1039)
25
-
26
- See 2.3-stable branch for earlier releases
27
- https://github.com/justinfrench/formtastic/blob/2.3-stable/CHANGELOG
@@ -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 => "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "~>4.1.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.0"
6
-
7
- gemspec :path => "../"
@@ -1,10 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", :git => "git://github.com/rails/rails.git"
6
- gem "rack", :github => "rack/rack"
7
- gem "i18n", :github => "svenfuchs/i18n"
8
- gem "arel", :github => "rails/arel"
9
-
10
- gemspec :path => "../"