bootstrap_form 4.2.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +13 -0
  3. data/.github/workflows/ruby.yml +46 -0
  4. data/.gitignore +16 -1
  5. data/.rubocop.yml +20 -17
  6. data/CHANGELOG.md +59 -1
  7. data/CONTRIBUTING.md +72 -6
  8. data/Dangerfile +5 -7
  9. data/Dockerfile +26 -0
  10. data/Gemfile +10 -13
  11. data/OLD-README.md +12 -1
  12. data/README.md +140 -60
  13. data/RELEASING.md +2 -2
  14. data/UPGRADE-4.0.md +1 -1
  15. data/UPGRADE-5.0.md +25 -0
  16. data/bootstrap_form.gemspec +9 -5
  17. data/demo/app/assets/config/manifest.js +1 -2
  18. data/demo/app/helpers/bootstrap_helper.rb +5 -5
  19. data/demo/app/views/bootstrap/form.html.erb +14 -1
  20. data/demo/app/views/layouts/application.html.erb +3 -3
  21. data/demo/config/environments/development.rb +1 -1
  22. data/demo/config/puma.rb +2 -2
  23. data/demo/db/schema.rb +2 -2
  24. data/docker-compose.yml +70 -0
  25. data/gemfiles/5.2.gemfile +4 -0
  26. data/gemfiles/6.0.gemfile +4 -0
  27. data/gemfiles/6.1.gemfile +4 -0
  28. data/gemfiles/edge.gemfile +4 -0
  29. data/lib/bootstrap_form/action_view_extensions/form_helper.rb +1 -15
  30. data/lib/bootstrap_form/components/labels.rb +1 -1
  31. data/lib/bootstrap_form/components/layout.rb +1 -1
  32. data/lib/bootstrap_form/components/validation.rb +1 -1
  33. data/lib/bootstrap_form/configuration.rb +22 -0
  34. data/lib/bootstrap_form/form_builder.rb +17 -2
  35. data/lib/bootstrap_form/form_group.rb +21 -10
  36. data/lib/bootstrap_form/form_group_builder.rb +6 -8
  37. data/lib/bootstrap_form/helpers/bootstrap.rb +16 -18
  38. data/lib/bootstrap_form/inputs/base.rb +5 -5
  39. data/lib/bootstrap_form/inputs/check_box.rb +9 -23
  40. data/lib/bootstrap_form/inputs/collection_select.rb +1 -0
  41. data/lib/bootstrap_form/inputs/file_field.rb +3 -15
  42. data/lib/bootstrap_form/inputs/grouped_collection_select.rb +1 -0
  43. data/lib/bootstrap_form/inputs/radio_button.rb +6 -24
  44. data/lib/bootstrap_form/inputs/select.rb +1 -0
  45. data/lib/bootstrap_form/inputs/time_zone_select.rb +1 -0
  46. data/lib/bootstrap_form/version.rb +1 -1
  47. data/lib/bootstrap_form.rb +17 -7
  48. metadata +33 -10
  49. data/.travis.yml +0 -38
@@ -1,3 +1,3 @@
1
1
  module BootstrapForm
2
- VERSION = "4.2.0".freeze
2
+ VERSION = "5.0.0".freeze
3
3
  end
@@ -2,8 +2,7 @@
2
2
  # name and not in the usual autoload-reachable way.
3
3
  # The following line is definitely need to make `bootstrap_form` work.
4
4
  if ::Rails::VERSION::STRING > "6"
5
- require Gem::Specification.find_by_name("actiontext").gem_dir + # rubocop:disable Rails/DynamicFindBy
6
- "/app/helpers/action_text/tag_helper"
5
+ require "#{Gem::Specification.find_by_name('actiontext').gem_dir}/app/helpers/action_text/tag_helper"
7
6
  end
8
7
  require "action_view"
9
8
  require "action_pack"
@@ -13,6 +12,7 @@ module BootstrapForm
13
12
  extend ActiveSupport::Autoload
14
13
 
15
14
  eager_autoload do
15
+ autoload :Configuration
16
16
  autoload :FormBuilder
17
17
  autoload :FormGroupBuilder
18
18
  autoload :FormGroup
@@ -21,11 +21,21 @@ module BootstrapForm
21
21
  autoload :Helpers
22
22
  end
23
23
 
24
- def self.eager_load!
25
- super
26
- BootstrapForm::Components.eager_load!
27
- BootstrapForm::Helpers.eager_load!
28
- BootstrapForm::Inputs.eager_load!
24
+ class << self
25
+ def eager_load!
26
+ super
27
+ BootstrapForm::Components.eager_load!
28
+ BootstrapForm::Helpers.eager_load!
29
+ BootstrapForm::Inputs.eager_load!
30
+ end
31
+
32
+ def config
33
+ @config ||= BootstrapForm::Configuration.new
34
+ end
35
+
36
+ def configure
37
+ yield config
38
+ end
29
39
  end
30
40
 
31
41
  mattr_accessor :field_error_proc
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Potenza
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-03-08 00:00:00.000000000 Z
12
+ date: 2021-11-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -17,30 +17,44 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '5.0'
20
+ version: '5.2'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '5.0'
27
+ version: '5.2'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: activemodel
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: '5.0'
34
+ version: '5.2'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: '5.0'
41
+ version: '5.2'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rails
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '5.2'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '5.2'
42
56
  description: bootstrap_form is a rails form builder that makes it super easy to create
43
- beautiful-looking forms using Bootstrap 4
57
+ beautiful-looking forms using Bootstrap 5
44
58
  email:
45
59
  - potenza@gmail.com
46
60
  - carlos.el.lopes@gmail.com
@@ -48,13 +62,15 @@ executables: []
48
62
  extensions: []
49
63
  extra_rdoc_files: []
50
64
  files:
65
+ - ".editorconfig"
66
+ - ".github/workflows/ruby.yml"
51
67
  - ".gitignore"
52
68
  - ".rubocop.yml"
53
- - ".travis.yml"
54
69
  - CHANGELOG.md
55
70
  - CODE_OF_CONDUCT.md
56
71
  - CONTRIBUTING.md
57
72
  - Dangerfile
73
+ - Dockerfile
58
74
  - Gemfile
59
75
  - LICENSE.txt
60
76
  - OLD-README.md
@@ -62,6 +78,7 @@ files:
62
78
  - RELEASING.md
63
79
  - Rakefile
64
80
  - UPGRADE-4.0.md
81
+ - UPGRADE-5.0.md
65
82
  - app/assets/stylesheets/rails_bootstrap_forms.css
66
83
  - bootstrap_form.gemspec
67
84
  - demo/.postcssrc.yml
@@ -124,6 +141,11 @@ files:
124
141
  - demo/public/favicon.ico
125
142
  - demo/test/fixtures/action_text/rich_texts.yml
126
143
  - demo/yarn.lock
144
+ - docker-compose.yml
145
+ - gemfiles/5.2.gemfile
146
+ - gemfiles/6.0.gemfile
147
+ - gemfiles/6.1.gemfile
148
+ - gemfiles/edge.gemfile
127
149
  - lib/bootstrap_form.rb
128
150
  - lib/bootstrap_form/action_view_extensions/form_helper.rb
129
151
  - lib/bootstrap_form/components.rb
@@ -131,6 +153,7 @@ files:
131
153
  - lib/bootstrap_form/components/labels.rb
132
154
  - lib/bootstrap_form/components/layout.rb
133
155
  - lib/bootstrap_form/components/validation.rb
156
+ - lib/bootstrap_form/configuration.rb
134
157
  - lib/bootstrap_form/engine.rb
135
158
  - lib/bootstrap_form/form_builder.rb
136
159
  - lib/bootstrap_form/form_group.rb
@@ -183,7 +206,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
183
206
  requirements:
184
207
  - - ">="
185
208
  - !ruby/object:Gem::Version
186
- version: 2.2.2
209
+ version: '2.5'
187
210
  required_rubygems_version: !ruby/object:Gem::Requirement
188
211
  requirements:
189
212
  - - ">="
@@ -194,5 +217,5 @@ rubyforge_project:
194
217
  rubygems_version: 2.7.6
195
218
  signing_key:
196
219
  specification_version: 4
197
- summary: Rails form builder that makes it easy to style forms using Bootstrap 4
220
+ summary: Rails form builder that makes it easy to style forms using Bootstrap 5
198
221
  test_files: []
data/.travis.yml DELETED
@@ -1,38 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.9
4
- - 2.3.6
5
- - 2.4.3
6
- - 2.5.0
7
- gemfile:
8
- - test/gemfiles/5.0.gemfile
9
- - test/gemfiles/5.1.gemfile
10
- - test/gemfiles/5.2.gemfile
11
- before_install:
12
- - gem i rubygems-update -v '<3' && update_rubygems
13
- - gem install bundler -v 1.17.3 --no-document
14
- script:
15
- - bundle exec rake test
16
-
17
- matrix:
18
- include:
19
- # Bleeding edge Ruby
20
- - rvm: ruby-head
21
- gemfile: test/gemfiles/5.2.gemfile
22
-
23
- # Next version of Rails
24
- - rvm: 2.5.0
25
- gemfile: test/gemfiles/6.0.gemfile
26
-
27
- # Running one job to execute DANGER bot and linting
28
- - rvm: 2.5.0
29
- gemfile: test/gemfiles/5.2.gemfile
30
- script:
31
- - gem install danger
32
- - danger
33
- - bundle exec rake rubocop
34
-
35
- allow_failures:
36
- - rvm: ruby-head
37
- - rvm: 2.5.0
38
- gemfile: test/gemfiles/6.0.gemfile