formtastic 5.0.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitattributes +0 -1
- data/.github/workflows/integration.yaml +36 -0
- data/.github/workflows/test.yml +26 -20
- data/.gitignore +2 -1
- data/Appraisals +23 -0
- data/CONTRIBUTING.md +27 -0
- data/Gemfile +5 -0
- data/MIT-LICENSE +1 -1
- data/README.md +14 -46
- data/RELEASE_PROCESS +0 -1
- data/Rakefile +1 -1
- data/formtastic.gemspec +17 -10
- data/gemfiles/rails_72.gemfile +9 -0
- data/gemfiles/rails_80.gemfile +9 -0
- data/gemfiles/rails_81.gemfile +9 -0
- data/gemfiles/rails_edge.gemfile +9 -0
- data/lib/formtastic/actions/input_action.rb +1 -1
- data/lib/formtastic/actions/link_action.rb +1 -1
- data/lib/formtastic/form_builder.rb +27 -27
- data/lib/formtastic/helpers/action_helper.rb +0 -1
- data/lib/formtastic/helpers/actions_helper.rb +1 -1
- data/lib/formtastic/helpers/errors_helper.rb +71 -14
- data/lib/formtastic/helpers/fieldset_wrapper.rb +1 -1
- data/lib/formtastic/helpers/form_helper.rb +3 -3
- data/lib/formtastic/helpers/input_helper.rb +5 -3
- data/lib/formtastic/i18n.rb +0 -1
- data/lib/formtastic/inputs/base/aria.rb +26 -0
- data/lib/formtastic/inputs/base/collections.rb +1 -1
- data/lib/formtastic/inputs/base/errors.rb +1 -1
- data/lib/formtastic/inputs/base/html.rb +1 -1
- data/lib/formtastic/inputs/base/labelling.rb +1 -1
- data/lib/formtastic/inputs/base/validations.rb +32 -8
- data/lib/formtastic/inputs/base.rb +7 -5
- data/lib/formtastic/inputs/country_input.rb +9 -6
- data/lib/formtastic/inputs/datalist_input.rb +2 -2
- data/lib/formtastic/inputs/number_input.rb +1 -1
- data/lib/formtastic/inputs/range_input.rb +1 -1
- data/lib/formtastic/inputs/time_zone_input.rb +1 -1
- data/lib/formtastic/version.rb +1 -1
- data/lib/formtastic.rb +6 -2
- data/lib/generators/formtastic/form/form_generator.rb +2 -3
- data/lib/generators/formtastic/install/install_generator.rb +0 -1
- data/lib/generators/formtastic/stylesheets/stylesheets_generator.rb +15 -0
- data/{app/assets/stylesheets → lib/generators/templates}/formtastic.css +4 -4
- data/lib/generators/templates/formtastic.rb +7 -1
- data/script/integration-template.rb +14 -11
- data/script/integration.sh +17 -4
- data/spec/action_class_finder_spec.rb +0 -1
- data/spec/actions/button_action_spec.rb +0 -1
- data/spec/actions/generic_action_spec.rb +2 -3
- data/spec/actions/input_action_spec.rb +0 -1
- data/spec/actions/link_action_spec.rb +0 -1
- data/spec/builder/custom_builder_spec.rb +0 -1
- data/spec/builder/error_proc_spec.rb +0 -1
- data/spec/builder/semantic_fields_for_spec.rb +72 -2
- data/spec/fast_spec_helper.rb +0 -1
- data/spec/generators/formtastic/stylesheets/stylesheets_generator_spec.rb +22 -0
- data/spec/helpers/actions_helper_spec.rb +0 -1
- data/spec/helpers/form_helper_spec.rb +0 -1
- data/spec/helpers/input_helper_spec.rb +12 -1
- data/spec/helpers/inputs_helper_spec.rb +1 -2
- data/spec/helpers/reflection_helper_spec.rb +0 -1
- data/spec/helpers/semantic_errors_helper_spec.rb +114 -7
- data/spec/i18n_spec.rb +1 -2
- data/spec/input_class_finder_spec.rb +0 -1
- data/spec/inputs/base/collections_spec.rb +41 -0
- data/spec/inputs/boolean_input_spec.rb +0 -1
- data/spec/inputs/check_boxes_input_spec.rb +1 -2
- data/spec/inputs/color_input_spec.rb +0 -1
- data/spec/inputs/country_input_spec.rb +5 -6
- data/spec/inputs/custom_input_spec.rb +0 -1
- data/spec/inputs/datalist_input_spec.rb +0 -1
- data/spec/inputs/date_picker_input_spec.rb +0 -1
- data/spec/inputs/date_select_input_spec.rb +1 -2
- data/spec/inputs/datetime_picker_input_spec.rb +0 -1
- data/spec/inputs/datetime_select_input_spec.rb +1 -2
- data/spec/inputs/email_input_spec.rb +0 -1
- data/spec/inputs/file_input_spec.rb +0 -1
- data/spec/inputs/hidden_input_spec.rb +0 -1
- data/spec/inputs/include_blank_spec.rb +0 -1
- data/spec/inputs/label_spec.rb +32 -1
- data/spec/inputs/number_input_spec.rb +0 -1
- data/spec/inputs/password_input_spec.rb +1 -2
- data/spec/inputs/phone_input_spec.rb +0 -1
- data/spec/inputs/placeholder_spec.rb +0 -1
- data/spec/inputs/radio_input_spec.rb +0 -1
- data/spec/inputs/range_input_spec.rb +0 -1
- data/spec/inputs/readonly_spec.rb +0 -1
- data/spec/inputs/search_input_spec.rb +0 -1
- data/spec/inputs/select_input_spec.rb +0 -1
- data/spec/inputs/string_input_spec.rb +67 -2
- data/spec/inputs/text_input_spec.rb +0 -1
- data/spec/inputs/time_picker_input_spec.rb +0 -1
- data/spec/inputs/time_select_input_spec.rb +1 -2
- data/spec/inputs/time_zone_input_spec.rb +0 -1
- data/spec/inputs/url_input_spec.rb +0 -1
- data/spec/inputs/with_options_spec.rb +0 -1
- data/spec/localizer_spec.rb +0 -1
- data/spec/namespaced_class_finder_spec.rb +0 -1
- data/spec/spec_helper.rb +2 -1
- data/spec/support/custom_macros.rb +11 -3
- data/spec/support/specialized_class_finder_shared_example.rb +0 -1
- data/spec/support/test_environment.rb +2 -2
- metadata +53 -41
- data/CHANGELOG.md +0 -61
- data/Gemfile.lock +0 -140
- data/app/assets/stylesheets/formtastic_ie6.css +0 -33
- data/app/assets/stylesheets/formtastic_ie7.css +0 -23
- data/gemfiles/rails_6.0/Gemfile +0 -5
- data/gemfiles/rails_6.1/Gemfile +0 -5
- data/gemfiles/rails_7.0/Gemfile +0 -5
- data/gemfiles/rails_7.1/Gemfile +0 -5
- data/gemfiles/rails_edge/Gemfile +0 -13
- data/lib/formtastic/engine.rb +0 -14
data/Gemfile.lock
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
formtastic (4.0.0)
|
|
5
|
-
actionpack (>= 6.0.0)
|
|
6
|
-
|
|
7
|
-
GEM
|
|
8
|
-
remote: https://rubygems.org/
|
|
9
|
-
specs:
|
|
10
|
-
actionpack (7.1.1)
|
|
11
|
-
actionview (= 7.1.1)
|
|
12
|
-
activesupport (= 7.1.1)
|
|
13
|
-
nokogiri (>= 1.8.5)
|
|
14
|
-
rack (>= 2.2.4)
|
|
15
|
-
rack-session (>= 1.0.1)
|
|
16
|
-
rack-test (>= 0.6.3)
|
|
17
|
-
rails-dom-testing (~> 2.2)
|
|
18
|
-
rails-html-sanitizer (~> 1.6)
|
|
19
|
-
actionview (7.1.1)
|
|
20
|
-
activesupport (= 7.1.1)
|
|
21
|
-
builder (~> 3.1)
|
|
22
|
-
erubi (~> 1.11)
|
|
23
|
-
rails-dom-testing (~> 2.2)
|
|
24
|
-
rails-html-sanitizer (~> 1.6)
|
|
25
|
-
activesupport (7.1.1)
|
|
26
|
-
base64
|
|
27
|
-
bigdecimal
|
|
28
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
29
|
-
connection_pool (>= 2.2.5)
|
|
30
|
-
drb
|
|
31
|
-
i18n (>= 1.6, < 2)
|
|
32
|
-
minitest (>= 5.1)
|
|
33
|
-
mutex_m
|
|
34
|
-
tzinfo (~> 2.0)
|
|
35
|
-
ammeter (1.1.5)
|
|
36
|
-
activesupport (>= 3.0)
|
|
37
|
-
railties (>= 3.0)
|
|
38
|
-
rspec-rails (>= 2.2)
|
|
39
|
-
base64 (0.1.1)
|
|
40
|
-
bigdecimal (3.1.4)
|
|
41
|
-
builder (3.2.4)
|
|
42
|
-
concurrent-ruby (1.2.2)
|
|
43
|
-
connection_pool (2.4.1)
|
|
44
|
-
crass (1.0.6)
|
|
45
|
-
diff-lcs (1.5.0)
|
|
46
|
-
drb (2.1.1)
|
|
47
|
-
ruby2_keywords
|
|
48
|
-
erubi (1.12.0)
|
|
49
|
-
i18n (1.14.1)
|
|
50
|
-
concurrent-ruby (~> 1.0)
|
|
51
|
-
io-console (0.6.0)
|
|
52
|
-
irb (1.8.1)
|
|
53
|
-
rdoc
|
|
54
|
-
reline (>= 0.3.8)
|
|
55
|
-
loofah (2.21.4)
|
|
56
|
-
crass (~> 1.0.2)
|
|
57
|
-
nokogiri (>= 1.12.0)
|
|
58
|
-
mini_portile2 (2.8.4)
|
|
59
|
-
minitest (5.20.0)
|
|
60
|
-
mutex_m (0.1.2)
|
|
61
|
-
nokogiri (1.15.4)
|
|
62
|
-
mini_portile2 (~> 2.8.2)
|
|
63
|
-
racc (~> 1.4)
|
|
64
|
-
psych (5.1.1)
|
|
65
|
-
stringio
|
|
66
|
-
racc (1.7.1)
|
|
67
|
-
rack (3.0.8)
|
|
68
|
-
rack-session (2.0.0)
|
|
69
|
-
rack (>= 3.0.0)
|
|
70
|
-
rack-test (2.1.0)
|
|
71
|
-
rack (>= 1.3)
|
|
72
|
-
rackup (2.1.0)
|
|
73
|
-
rack (>= 3)
|
|
74
|
-
webrick (~> 1.8)
|
|
75
|
-
rails-dom-testing (2.2.0)
|
|
76
|
-
activesupport (>= 5.0.0)
|
|
77
|
-
minitest
|
|
78
|
-
nokogiri (>= 1.6)
|
|
79
|
-
rails-html-sanitizer (1.6.0)
|
|
80
|
-
loofah (~> 2.21)
|
|
81
|
-
nokogiri (~> 1.14)
|
|
82
|
-
railties (7.1.1)
|
|
83
|
-
actionpack (= 7.1.1)
|
|
84
|
-
activesupport (= 7.1.1)
|
|
85
|
-
irb
|
|
86
|
-
rackup (>= 1.0.0)
|
|
87
|
-
rake (>= 12.2)
|
|
88
|
-
thor (~> 1.0, >= 1.2.2)
|
|
89
|
-
zeitwerk (~> 2.6)
|
|
90
|
-
rake (13.0.6)
|
|
91
|
-
rdoc (6.5.0)
|
|
92
|
-
psych (>= 4.0.0)
|
|
93
|
-
reline (0.3.9)
|
|
94
|
-
io-console (~> 0.5)
|
|
95
|
-
rspec-core (3.12.2)
|
|
96
|
-
rspec-support (~> 3.12.0)
|
|
97
|
-
rspec-dom-testing (0.1.0)
|
|
98
|
-
rails-dom-testing (>= 1.0, < 3)
|
|
99
|
-
rspec-expectations (~> 3.0)
|
|
100
|
-
rspec-expectations (3.12.3)
|
|
101
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
102
|
-
rspec-support (~> 3.12.0)
|
|
103
|
-
rspec-mocks (3.12.6)
|
|
104
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
105
|
-
rspec-support (~> 3.12.0)
|
|
106
|
-
rspec-rails (6.0.3)
|
|
107
|
-
actionpack (>= 6.1)
|
|
108
|
-
activesupport (>= 6.1)
|
|
109
|
-
railties (>= 6.1)
|
|
110
|
-
rspec-core (~> 3.12)
|
|
111
|
-
rspec-expectations (~> 3.12)
|
|
112
|
-
rspec-mocks (~> 3.12)
|
|
113
|
-
rspec-support (~> 3.12)
|
|
114
|
-
rspec-support (3.12.1)
|
|
115
|
-
ruby2_keywords (0.0.5)
|
|
116
|
-
sqlite3 (1.6.7)
|
|
117
|
-
mini_portile2 (~> 2.8.0)
|
|
118
|
-
stringio (3.0.8)
|
|
119
|
-
thor (1.2.2)
|
|
120
|
-
tzinfo (2.0.6)
|
|
121
|
-
concurrent-ruby (~> 1.0)
|
|
122
|
-
webrick (1.8.1)
|
|
123
|
-
yard (0.9.34)
|
|
124
|
-
zeitwerk (2.6.12)
|
|
125
|
-
|
|
126
|
-
PLATFORMS
|
|
127
|
-
ruby
|
|
128
|
-
|
|
129
|
-
DEPENDENCIES
|
|
130
|
-
ammeter (~> 1.1.3)
|
|
131
|
-
formtastic!
|
|
132
|
-
rake
|
|
133
|
-
rspec-dom-testing (>= 0.1.0)
|
|
134
|
-
rspec-mocks (~> 3.12.2)
|
|
135
|
-
rspec-rails (>= 4.0)
|
|
136
|
-
sqlite3 (~> 1.4)
|
|
137
|
-
yard (~> 0.9.20)
|
|
138
|
-
|
|
139
|
-
BUNDLED WITH
|
|
140
|
-
2.3.18
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/* additional stylesheets only for IE6, if you wish to support it */
|
|
2
|
-
|
|
3
|
-
/* legend labels apper to have a left margin or padding I couldn't get rid of cleanly in main stylesheet */
|
|
4
|
-
.formtastic .input fieldset legend.label {
|
|
5
|
-
margin-left:-7px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/* checkbox and radio inputs appear to have a margin around them that I couldn't remove in main stylesheet */
|
|
9
|
-
.formtastic .choice label input,
|
|
10
|
-
.formtastic .boolean label input {
|
|
11
|
-
position:relative;
|
|
12
|
-
left:-1px;
|
|
13
|
-
size:15px;
|
|
14
|
-
margin-left:0;
|
|
15
|
-
margin-right:0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* inline hints and errors appear a few pixel too far over to the left */
|
|
19
|
-
.formtastic .inline-hints,
|
|
20
|
-
.formtastic .inline-errors {
|
|
21
|
-
padding-left:3px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* fragment (eg year, month, day) appear a few pixels too far to the left*/
|
|
25
|
-
.formtastic .fragment {
|
|
26
|
-
padding-left:3px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.formtastic .buttons,
|
|
30
|
-
.formtastic .inputs,
|
|
31
|
-
.formtastic .input {
|
|
32
|
-
zoom:1;
|
|
33
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/* additional stylesheets only for IE7, if you wish to support it */
|
|
2
|
-
|
|
3
|
-
/* legend labels apper to have a left margin or padding I couldn't get rid of cleanly in main stylesheet */
|
|
4
|
-
.formtastic .input fieldset legend.label {
|
|
5
|
-
margin-left:-7px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/* checkbox and radio inputs appear to have a margin around them that I couldn't remove in main stylesheet */
|
|
9
|
-
.formtastic .choice label input,
|
|
10
|
-
.formtastic .boolean label input {
|
|
11
|
-
position:relative;
|
|
12
|
-
left:-4px;
|
|
13
|
-
right:-4px;
|
|
14
|
-
size:15px;
|
|
15
|
-
margin-left:0;
|
|
16
|
-
margin-right:0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.formtastic .buttons,
|
|
20
|
-
.formtastic .inputs,
|
|
21
|
-
.formtastic .input {
|
|
22
|
-
zoom:1;
|
|
23
|
-
}
|
data/gemfiles/rails_6.0/Gemfile
DELETED
data/gemfiles/rails_6.1/Gemfile
DELETED
data/gemfiles/rails_7.0/Gemfile
DELETED
data/gemfiles/rails_7.1/Gemfile
DELETED
data/gemfiles/rails_edge/Gemfile
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
source "https://rubygems.org"
|
|
2
|
-
|
|
3
|
-
gem "rails", git: "https://github.com/rails/rails.git", branch: "main"
|
|
4
|
-
gem "rack", git: "https://github.com/rack/rack.git"
|
|
5
|
-
gem "i18n", git: "https://github.com/svenfuchs/i18n.git"
|
|
6
|
-
gem "arel", git: "https://github.com/rails/arel.git"
|
|
7
|
-
gem "rspec-rails", git: "https://github.com/rspec/rspec-rails.git"
|
|
8
|
-
gem "rspec-mocks", git: "https://github.com/rspec/rspec-mocks.git"
|
|
9
|
-
gem "rspec-support", git: "https://github.com/rspec/rspec-support.git"
|
|
10
|
-
gem "rspec-core", git: "https://github.com/rspec/rspec-core.git"
|
|
11
|
-
gem "rspec-expectations", git: "https://github.com/rspec/rspec-expectations.git"
|
|
12
|
-
|
|
13
|
-
gemspec path: "../.."
|
data/lib/formtastic/engine.rb
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
module Formtastic
|
|
3
|
-
# Required for formtastic.css to be discoverable in the asset pipeline
|
|
4
|
-
# @private
|
|
5
|
-
class Engine < ::Rails::Engine
|
|
6
|
-
initializer 'formtastic.initialize' do
|
|
7
|
-
ActiveSupport.on_load(:action_view) do
|
|
8
|
-
include Formtastic::Helpers::FormHelper
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
config.eager_load_namespaces << Formtastic
|
|
13
|
-
end
|
|
14
|
-
end
|