bootstrap_form 5.4.0 → 5.6.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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/.devcontainer.json +38 -0
  3. data/.github/workflows/ruby.yml +19 -7
  4. data/.gitignore +21 -7
  5. data/.rubocop.yml +25 -15
  6. data/CHANGELOG.md +3 -0
  7. data/CONTRIBUTING.md +53 -111
  8. data/DOCKER.md +95 -0
  9. data/Gemfile +7 -1
  10. data/README.md +166 -100
  11. data/RELEASING.md +4 -10
  12. data/Rakefile +34 -16
  13. data/bootstrap_form.gemspec +1 -1
  14. data/compose.yml +36 -0
  15. data/gemfiles/7.2.gemfile +10 -0
  16. data/gemfiles/8.0.gemfile +10 -0
  17. data/gemfiles/8.1.gemfile +9 -0
  18. data/gemfiles/common.gemfile +10 -9
  19. data/gemfiles/edge.gemfile +5 -1
  20. data/lib/bootstrap_form/action_view_extensions/form_helper.rb +6 -6
  21. data/lib/bootstrap_form/components/labels.rb +17 -13
  22. data/lib/bootstrap_form/components/validation.rb +6 -3
  23. data/lib/bootstrap_form/configuration.rb +17 -2
  24. data/lib/bootstrap_form/engine.rb +12 -0
  25. data/lib/bootstrap_form/form_builder.rb +14 -6
  26. data/lib/bootstrap_form/form_group.rb +4 -4
  27. data/lib/bootstrap_form/form_group_builder.rb +17 -8
  28. data/lib/bootstrap_form/helpers/bootstrap.rb +15 -9
  29. data/lib/bootstrap_form/helpers/field.rb +2 -0
  30. data/lib/bootstrap_form/inputs/base.rb +11 -6
  31. data/lib/bootstrap_form/inputs/check_box.rb +13 -6
  32. data/lib/bootstrap_form/inputs/collection_check_boxes.rb +3 -8
  33. data/lib/bootstrap_form/inputs/collection_radio_buttons.rb +1 -0
  34. data/lib/bootstrap_form/inputs/file_field.rb +1 -1
  35. data/lib/bootstrap_form/inputs/inputs_collection.rb +67 -11
  36. data/lib/bootstrap_form/inputs/radio_button.rb +2 -1
  37. data/lib/bootstrap_form/inputs/range_field.rb +1 -1
  38. data/lib/bootstrap_form/inputs/rich_text_area.rb +2 -0
  39. data/lib/bootstrap_form/inputs/submit.rb +3 -1
  40. data/lib/bootstrap_form/inputs/text_area.rb +2 -0
  41. data/lib/bootstrap_form/inputs/time_zone_select.rb +1 -1
  42. data/lib/bootstrap_form/version.rb +4 -2
  43. data/lib/bootstrap_form.rb +4 -15
  44. metadata +17 -18
  45. data/.yarnrc +0 -5
  46. data/Dockerfile +0 -22
  47. data/docker-compose-system-test.yml +0 -45
  48. data/docker-compose.yml +0 -29
  49. data/gemfiles/6.1.gemfile +0 -4
  50. data/gemfiles/7.0.gemfile +0 -5
  51. data/gemfiles/7.1.gemfile +0 -5
@@ -13,13 +13,15 @@ module BootstrapForm
13
13
  content = tag.div(class: check_box_wrapper_class(options), **options[:wrapper].to_h.except(:class)) do
14
14
  html = check_box_without_bootstrap(name, check_box_options(name, options), checked_value, unchecked_value)
15
15
  html << check_box_label(name, options, checked_value, &block) unless options[:skip_label]
16
- html << generate_error(name) if options[:error_message]
16
+ html << generate_error(name, options[:id]) if options[:error_message]
17
17
  html
18
18
  end
19
19
  wrapper(content, options)
20
20
  end
21
21
 
22
22
  bootstrap_alias :check_box
23
+ alias_method :checkbox_with_bootstrap, :check_box_with_bootstrap if Rails::VERSION::MAJOR >= 8
24
+ bootstrap_alias :checkbox if Rails::VERSION::MAJOR >= 8
23
25
  end
24
26
 
25
27
  private
@@ -39,10 +41,11 @@ module BootstrapForm
39
41
  :inline, :label, :label_class, :label_col, :layout, :skip_label,
40
42
  :switch, :wrapper, :wrapper_class)
41
43
  check_box_options[:class] = check_box_classes(name, options)
44
+ check_box_options[:aria] = { describedby: aria_feedback_id(id: options[:id], name:) } if error?(name)
42
45
  check_box_options.merge!(required_field_options(options, name))
43
46
  end
44
47
 
45
- def check_box_label(name, options, checked_value, &block)
48
+ def check_box_label(name, options, checked_value, &)
46
49
  label_name = if options[:multiple]
47
50
  check_box_value(name, checked_value)
48
51
  else
@@ -50,19 +53,20 @@ module BootstrapForm
50
53
  end
51
54
  label_options = { class: check_box_label_class(options) }
52
55
  label_options[:for] = options[:id] if options[:id].present?
53
- label(label_name, check_box_description(name, options, &block), label_options)
56
+ label(label_name, check_box_description(name, options, &), label_options)
54
57
  end
55
58
 
56
59
  def check_box_description(name, options, &block)
57
60
  content = block ? capture(&block) : options[:label]
58
- content || object&.class&.human_attribute_name(name) || name.to_s.humanize
61
+ # Ugh. Next Rails after 7.1 passes `false` when there's no object.
62
+ content || (object && object.class.human_attribute_name(name)) || name.to_s.humanize # rubocop:disable Style/SafeNavigation
59
63
  end
60
64
 
61
65
  def check_box_value(name, value)
62
66
  # label's `for` attribute needs to match checkbox tag's id,
63
67
  # IE sanitized value, IE
64
68
  # https://github.com/rails/rails/blob/5-0-stable/actionview/lib/action_view/helpers/tags/base.rb#L123-L125
65
- "#{name}_#{value.to_s.gsub(/\s/, '_').gsub(/[^-[[:word:]]]/, '').mb_chars.downcase}"
69
+ "#{name}_#{value.to_s.gsub(/\s/, '_').gsub(/[^-[[:word:]]]/, '').downcase}"
66
70
  end
67
71
 
68
72
  def check_box_classes(name, options)
@@ -83,7 +87,10 @@ module BootstrapForm
83
87
  def check_box_wrapper_class(options)
84
88
  classes = ["form-check"]
85
89
  classes << "form-check-inline" if layout_inline?(options[:inline])
86
- classes << "mb-3" unless options[:multiple] || %i[horizontal inline].include?(layout)
90
+ classes << "mb-3" unless options[:multiple] ||
91
+ %i[horizontal inline].include?(layout) ||
92
+ options[:wrapper_class] == false ||
93
+ options.dig(:wrapper, :class) == false
87
94
  classes << "form-switch" if options[:switch]
88
95
  classes << options.dig(:wrapper, :class).presence
89
96
  classes << options[:wrapper_class].presence
@@ -9,6 +9,7 @@ module BootstrapForm
9
9
 
10
10
  included do
11
11
  def collection_check_boxes_with_bootstrap(*args)
12
+ args[4]&.delete(:id)
12
13
  html = inputs_collection(*args) do |name, value, options|
13
14
  options[:multiple] = true
14
15
  check_box(name, options, value, nil)
@@ -21,14 +22,8 @@ module BootstrapForm
21
22
  end
22
23
 
23
24
  bootstrap_alias :collection_check_boxes
24
-
25
- if Rails::VERSION::MAJOR < 7
26
- def field_name(method, *methods, multiple: false, index: @options[:index])
27
- object_name = @options.fetch(:as) { @object_name }
28
-
29
- @template.field_name(object_name, method, *methods, index: index, multiple: multiple)
30
- end
31
- end
25
+ alias_method :collection_checkboxes_with_bootstrap, :collection_check_boxes_with_bootstrap if Rails::VERSION::MAJOR >= 8
26
+ bootstrap_alias :collection_checkboxes if Rails::VERSION::MAJOR >= 8
32
27
  end
33
28
  end
34
29
  end
@@ -9,6 +9,7 @@ module BootstrapForm
9
9
 
10
10
  included do
11
11
  def collection_radio_buttons_with_bootstrap(*args)
12
+ args[4]&.delete(:id)
12
13
  inputs_collection(*args) do |name, value, options|
13
14
  radio_button(name, value, options)
14
15
  end
@@ -10,7 +10,7 @@ module BootstrapForm
10
10
  def file_field_with_bootstrap(name, options={})
11
11
  options = options.reverse_merge(control_class: "form-control")
12
12
  form_group_builder(name, options) do
13
- input_with_error(name) do
13
+ prepend_and_append_input(name, options) do
14
14
  file_field_without_bootstrap(name, options)
15
15
  end
16
16
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module BootstrapForm
2
4
  module Inputs
3
5
  module InputsCollection
@@ -5,23 +7,21 @@ module BootstrapForm
5
7
 
6
8
  private
7
9
 
8
- def inputs_collection(name, collection, value, text, options={})
9
- options[:label] ||= { class: group_label_class(options[:layout]) }
10
+ def inputs_collection(name, collection, value, text, options={}, &)
11
+ options[:label] ||= { class: group_label_class(field_layout(options)) }
10
12
  options[:inline] ||= layout_inline?(options[:layout])
11
13
 
12
- form_group_builder(name, options) do
13
- inputs = ActiveSupport::SafeBuffer.new
14
-
15
- collection.each_with_index do |obj, i|
16
- input_value = value.respond_to?(:call) ? value.call(obj) : obj.send(value)
17
- input_options = form_group_collection_input_options(options, text, obj, i, input_value, collection)
18
- inputs << yield(name, input_value, input_options)
19
- end
14
+ return group_inputs_collection(name, collection, value, text, options, &) if BootstrapForm.config.group_around_collections
20
15
 
21
- inputs
16
+ form_group_builder(name, options) do
17
+ render_collection(name, collection, value, text, options, &)
22
18
  end
23
19
  end
24
20
 
21
+ def field_layout(options)
22
+ (:inline if options[:inline] == true) || options[:layout]
23
+ end
24
+
25
25
  def group_label_class(field_layout)
26
26
  if layout_horizontal?(field_layout)
27
27
  group_label_class = "col-form-label #{label_col} pt-0"
@@ -52,6 +52,62 @@ module BootstrapForm
52
52
  checked == input_value || Array(checked).try(:include?, input_value) ||
53
53
  checked == obj || Array(checked).try(:include?, obj)
54
54
  end
55
+
56
+ def group_inputs_collection(name, collection, value, text, options={}, &)
57
+ group_builder(name, options) do
58
+ render_collection(name, collection, value, text, options, &)
59
+ end
60
+ end
61
+
62
+ def render_collection(name, collection, value, text, options={}, &)
63
+ inputs = ActiveSupport::SafeBuffer.new
64
+
65
+ collection.each_with_index do |obj, i|
66
+ input_value = value.respond_to?(:call) ? value.call(obj) : obj.send(value)
67
+ input_options = form_group_collection_input_options(options, text, obj, i, input_value, collection)
68
+ inputs << yield(name, input_value, input_options)
69
+ end
70
+
71
+ inputs
72
+ end
73
+
74
+ def group_builder(method, options, html_options=nil, &)
75
+ form_group_builder_wrapper(method, options, html_options) do |form_group_options, no_wrapper|
76
+ if no_wrapper
77
+ yield
78
+ else
79
+ field_group(method, form_group_options, &)
80
+ end
81
+ end
82
+ end
83
+
84
+ def field_group(name, options, &)
85
+ options[:class] = form_group_classes(options)
86
+
87
+ tag.div(
88
+ **options.except(
89
+ :add_control_col_class, :append, :control_col, :floating, :help, :icon, :id,
90
+ :input_group_class, :label, :label_col, :layout, :prepend
91
+ ),
92
+ aria: { labelledby: group_label_div_id(id: options[:id], name:) },
93
+ role: :group
94
+ ) do
95
+ group_label_div = generate_group_label_div(name, options)
96
+ prepare_label_options(options[:id], name, options[:label], options[:label_col], options[:layout])
97
+ form_group_content(group_label_div, generate_help(name, options[:help]), options, &)
98
+ end
99
+ end
100
+
101
+ def generate_group_label_div(name, options)
102
+ group_label_div_class = options.dig(:label, :class) || "form-label"
103
+
104
+ tag.div(
105
+ **{ class: group_label_div_class }.compact,
106
+ id: group_label_div_id(id: options[:id], name:)
107
+ ) { label_text(name, options.dig(:label, :text)) }
108
+ end
109
+
110
+ def group_label_div_id(id:, name:) = id || field_id(name)
55
111
  end
56
112
  end
57
113
  end
@@ -14,7 +14,7 @@ module BootstrapForm
14
14
  tag.div(**wrapper_attributes) do
15
15
  html = radio_button_without_bootstrap(name, value, radio_button_options(name, options))
16
16
  html << radio_button_label(name, value, options) unless options[:skip_label]
17
- html << generate_error(name) if options[:error_message]
17
+ html << generate_error(name, options[:id]) if options[:error_message]
18
18
  html
19
19
  end
20
20
  end
@@ -28,6 +28,7 @@ module BootstrapForm
28
28
  radio_button_options = options.except(:class, :label, :label_class, :error_message, :help,
29
29
  :inline, :hide_label, :skip_label, :wrapper, :wrapper_class)
30
30
  radio_button_options[:class] = radio_button_classes(name, options)
31
+ radio_button_options[:aria] = { describedby: aria_feedback_id(id: options[:id], name:) } if error?(name)
31
32
  radio_button_options.merge!(required_field_options(options, name))
32
33
  end
33
34
 
@@ -7,7 +7,7 @@ module BootstrapForm
7
7
  include Base
8
8
 
9
9
  included do
10
- bootstrap_field :range_field, control_class: "form-range"
10
+ bootstrap_field :range_field
11
11
  end
12
12
  end
13
13
  end
@@ -17,6 +17,8 @@ module BootstrapForm
17
17
  end
18
18
 
19
19
  bootstrap_alias :rich_text_area
20
+ alias_method :rich_textarea, :rich_text_area if Rails::VERSION::MAJOR >= 8
21
+ bootstrap_alias :rich_textarea if Rails::VERSION::MAJOR >= 8
20
22
  end
21
23
  end
22
24
  end
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module BootstrapForm
2
4
  module Inputs
3
5
  module Submit
4
- def button(value=nil, options={}, &block)
6
+ def button(value=nil, options={}, &)
5
7
  value = setup_css_class "btn btn-secondary", value, options
6
8
  super
7
9
  end
@@ -8,6 +8,8 @@ module BootstrapForm
8
8
 
9
9
  included do
10
10
  bootstrap_field :text_area
11
+ alias_method :textarea_with_bootstrap, :text_area_with_bootstrap if Rails::VERSION::MAJOR >= 8
12
+ bootstrap_field :textarea if Rails::VERSION::MAJOR >= 8
11
13
  end
12
14
  end
13
15
  end
@@ -10,7 +10,7 @@ module BootstrapForm
10
10
  def time_zone_select_with_bootstrap(method, priority_zones=nil, options={}, html_options={})
11
11
  html_options = html_options.reverse_merge(control_class: "form-select")
12
12
  form_group_builder(method, options, html_options) do
13
- input_with_error(method) do
13
+ input_with_error(method, options[:id]) do
14
14
  time_zone_select_without_bootstrap(method, priority_zones, options, html_options)
15
15
  end
16
16
  end
@@ -1,4 +1,6 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module BootstrapForm
2
- VERSION = "5.4.0".freeze
3
- REQUIRED_RAILS_VERSION = ">= 6.1".freeze
4
+ VERSION = "5.6.0"
5
+ REQUIRED_RAILS_VERSION = ">= 7.2"
4
6
  end
@@ -1,16 +1,9 @@
1
- # NOTE: The rich_text_area and rich_text_area_tag helpers are defined in a file
2
- # with a different name and not in the usual autoload-reachable way.
3
- # The following line is definitely need to make `bootstrap_form` work.
4
- # rubocop:disable Lint/SuppressedException
5
- begin
6
- require "#{Gem::Specification.find_by_name('actiontext').gem_dir}/app/helpers/action_text/tag_helper"
7
- rescue Gem::MissingSpecError
8
- end
9
- # rubocop:enable Lint/SuppressedException
1
+ # frozen_string_literal: true
10
2
 
11
3
  require "action_view"
12
4
  require "action_pack"
13
5
  require "bootstrap_form/action_view_extensions/form_helper"
6
+ require "bootstrap_form/configuration"
14
7
 
15
8
  module BootstrapForm
16
9
  extend ActiveSupport::Autoload
@@ -33,12 +26,8 @@ module BootstrapForm
33
26
  BootstrapForm::Inputs.eager_load!
34
27
  end
35
28
 
36
- def config
37
- @config ||= BootstrapForm::Configuration.new
38
- end
39
-
40
- def configure
41
- yield config
29
+ def deprecator
30
+ @deprecator ||= ActiveSupport::Deprecation.new("a future release", "BootstrapForm")
42
31
  end
43
32
  end
44
33
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Potenza
8
8
  - Carlos Lopes
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-10-30 00:00:00.000000000 Z
12
+ date: 2026-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -17,28 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '6.1'
20
+ version: '7.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: '6.1'
27
+ version: '7.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: '6.1'
34
+ version: '7.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: '6.1'
41
+ version: '7.2'
42
42
  description: bootstrap_form is a rails form builder that makes it super easy to create
43
43
  beautiful-looking forms using Bootstrap 5
44
44
  email:
@@ -48,16 +48,16 @@ executables: []
48
48
  extensions: []
49
49
  extra_rdoc_files: []
50
50
  files:
51
+ - ".devcontainer.json"
51
52
  - ".editorconfig"
52
53
  - ".github/workflows/ruby.yml"
53
54
  - ".gitignore"
54
55
  - ".rubocop.yml"
55
- - ".yarnrc"
56
56
  - CHANGELOG.md
57
57
  - CODE_OF_CONDUCT.md
58
58
  - CONTRIBUTING.md
59
+ - DOCKER.md
59
60
  - Dangerfile
60
- - Dockerfile
61
61
  - Gemfile
62
62
  - LICENSE.txt
63
63
  - OLD-README.md
@@ -68,11 +68,10 @@ files:
68
68
  - UPGRADE-5.0.md
69
69
  - app/assets/stylesheets/rails_bootstrap_forms.css
70
70
  - bootstrap_form.gemspec
71
- - docker-compose-system-test.yml
72
- - docker-compose.yml
73
- - gemfiles/6.1.gemfile
74
- - gemfiles/7.0.gemfile
75
- - gemfiles/7.1.gemfile
71
+ - compose.yml
72
+ - gemfiles/7.2.gemfile
73
+ - gemfiles/8.0.gemfile
74
+ - gemfiles/8.1.gemfile
76
75
  - gemfiles/common.gemfile
77
76
  - gemfiles/edge.gemfile
78
77
  - lib/bootstrap_form.rb
@@ -130,7 +129,7 @@ licenses:
130
129
  - MIT
131
130
  metadata:
132
131
  rubygems_mfa_required: 'true'
133
- post_install_message:
132
+ post_install_message:
134
133
  rdoc_options: []
135
134
  require_paths:
136
135
  - lib
@@ -138,15 +137,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
137
  requirements:
139
138
  - - ">="
140
139
  - !ruby/object:Gem::Version
141
- version: '3.0'
140
+ version: '3.2'
142
141
  required_rubygems_version: !ruby/object:Gem::Requirement
143
142
  requirements:
144
143
  - - ">="
145
144
  - !ruby/object:Gem::Version
146
145
  version: '0'
147
146
  requirements: []
148
- rubygems_version: 3.4.1
149
- signing_key:
147
+ rubygems_version: 3.5.22
148
+ signing_key:
150
149
  specification_version: 4
151
150
  summary: Rails form builder that makes it easy to style forms using Bootstrap 5
152
151
  test_files: []
data/.yarnrc DELETED
@@ -1,5 +0,0 @@
1
- # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
- # yarn lockfile v1
3
-
4
-
5
- lastUpdateCheck 1698606246341
data/Dockerfile DELETED
@@ -1,22 +0,0 @@
1
- ARG RUBY_VERSION=3.0
2
- ARG DISTRO=bullseye
3
-
4
- FROM ruby:$RUBY_VERSION-$DISTRO
5
-
6
- ARG NODE_MAJOR=18
7
-
8
- RUN mkdir -p /app
9
- ENV HOME /app
10
- WORKDIR /app
11
-
12
- ENV GEM_HOME $HOME/vendor/bundle
13
- ENV BUNDLE_APP_CONFIG="$GEM_HOME"
14
- ENV PATH ./bin:$GEM_HOME/bin:$PATH
15
- RUN (echo 'docker'; echo 'docker') | passwd root
16
-
17
- # Rails wants a newer version of node than we get with the Debian distro.
18
- RUN curl -fsSL https://deb.nodesource.com/setup_$NODE_MAJOR.x | bash - && apt-get install -y nodejs
19
- RUN corepack enable && corepack prepare yarn@stable --activate
20
- RUN apt install -y -q sqlite3
21
-
22
- EXPOSE 3000
@@ -1,45 +0,0 @@
1
- version: '3.3'
2
-
3
- services:
4
- app: &app
5
- build:
6
- context: .
7
- args:
8
- NODE_MAJOR: "12"
9
- YARN_VERSION: "1.22.4"
10
- RUBY_VERSION: ${RUBY_VERSION}
11
- image: bootstrap-form:latest-$RUBY_VERSION
12
- tmpfs:
13
- - /tmp
14
-
15
- shell:
16
- <<: *app
17
- stdin_open: true
18
- tty: true
19
- volumes:
20
- - .:/app:cached
21
- environment:
22
- - SSH_AUTH_SOCK=/ssh-agent
23
- - NODE_ENV=development
24
- - BOOTSNAP_CACHE_DIR=/usr/local/bundle/_bootsnap
25
- - WEB_CONCURRENCY=1
26
- - HISTFILE=/app/.bash_history
27
- - SELENIUM_HOST=selenium
28
- - SELENIUM_PORT=4444
29
- - TEST_APP_HOST=shell
30
- - TEST_APP_PORT=3001
31
- ports:
32
- - "3001:3001"
33
- command: /bin/bash
34
-
35
- selenium:
36
- image: selenium/standalone-chrome:118.0
37
- logging:
38
- driver: none
39
- stdin_open: true
40
- tty: true
41
- environment:
42
- - LANG=en_CA.UTF-8
43
- ports:
44
- - '4444:4444'
45
- - '5900:5900'
data/docker-compose.yml DELETED
@@ -1,29 +0,0 @@
1
- version: '3.3'
2
-
3
- services:
4
- app: &app
5
- build:
6
- context: .
7
- args:
8
- NODE_MAJOR: "18"
9
- RUBY_VERSION: ${RUBY_VERSION}
10
- image: bootstrap-form:latest-$RUBY_VERSION
11
- tmpfs:
12
- - /tmp
13
-
14
- shell: &shell
15
- <<: *app
16
- stdin_open: true
17
- tty: true
18
- volumes:
19
- - .:/app:cached
20
- environment:
21
- - SSH_AUTH_SOCK=/ssh-agent
22
- - NODE_ENV=development
23
- - RAILS_ENV=${RAILS_ENV:-development}
24
- - BOOTSNAP_CACHE_DIR=/usr/local/bundle/_bootsnap
25
- - WEB_CONCURRENCY=1
26
- - HISTFILE=/app/.bash_history
27
- ports:
28
- - "3000:3000"
29
- command: /bin/bash
data/gemfiles/6.1.gemfile DELETED
@@ -1,4 +0,0 @@
1
- gems = "#{__dir__}/common.gemfile"
2
- eval File.read(gems), binding, gems # rubocop: disable Security/Eval
3
-
4
- gem "rails", "~> 6.1.0"
data/gemfiles/7.0.gemfile DELETED
@@ -1,5 +0,0 @@
1
- gems = "#{__dir__}/common.gemfile"
2
- eval File.read(gems), binding, gems # rubocop: disable Security/Eval
3
-
4
- gem "rails", "~> 7.0.2"
5
- gem "sprockets-rails", require: "sprockets/railtie"
data/gemfiles/7.1.gemfile DELETED
@@ -1,5 +0,0 @@
1
- gems = "#{__dir__}/common.gemfile"
2
- eval File.read(gems), binding, gems # rubocop: disable Security/Eval
3
-
4
- gem "rails", "~> 7.1.0"
5
- gem "sprockets-rails", require: "sprockets/railtie"