bootstrap_form 5.0.0 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +31 -16
- data/.gitignore +15 -3
- data/.rubocop.yml +3 -1
- data/.yarnrc +5 -0
- data/CHANGELOG.md +53 -2
- data/CONTRIBUTING.md +110 -22
- data/Dangerfile +5 -5
- data/Dockerfile +6 -11
- data/Gemfile +5 -23
- data/README.md +805 -54
- data/RELEASING.md +16 -10
- data/Rakefile +7 -6
- data/bootstrap_form.gemspec +7 -10
- data/docker-compose.yml +9 -48
- data/gemfiles/6.0.gemfile +1 -1
- data/gemfiles/6.1.gemfile +1 -1
- data/gemfiles/7.0.gemfile +5 -0
- data/gemfiles/common.gemfile +28 -0
- data/gemfiles/edge.gemfile +3 -2
- data/lib/bootstrap_form/components/hints.rb +13 -4
- data/lib/bootstrap_form/components/labels.rb +4 -10
- data/lib/bootstrap_form/components/validation.rb +36 -19
- data/lib/bootstrap_form/form_builder.rb +9 -6
- data/lib/bootstrap_form/form_group.rb +15 -8
- data/lib/bootstrap_form/form_group_builder.rb +10 -7
- data/lib/bootstrap_form/helpers/bootstrap.rb +12 -9
- data/lib/bootstrap_form/helpers/field.rb +26 -0
- data/lib/bootstrap_form/helpers.rb +1 -0
- data/lib/bootstrap_form/inputs/check_box.rb +26 -8
- data/lib/bootstrap_form/inputs/collection_check_boxes.rb +5 -1
- data/lib/bootstrap_form/inputs/collection_select.rb +1 -1
- data/lib/bootstrap_form/inputs/grouped_collection_select.rb +1 -1
- data/lib/bootstrap_form/inputs/radio_button.rb +15 -10
- data/lib/bootstrap_form/version.rb +2 -1
- data/lib/bootstrap_form.rb +1 -1
- metadata +17 -88
- data/demo/.postcssrc.yml +0 -3
- data/demo/README.md +0 -17
- data/demo/Rakefile +0 -6
- data/demo/app/assets/config/manifest.js +0 -1
- data/demo/app/assets/stylesheets/actiontext.scss +0 -38
- data/demo/app/assets/stylesheets/application.scss +0 -1
- data/demo/app/controllers/application_controller.rb +0 -2
- data/demo/app/controllers/bootstrap_controller.rb +0 -14
- data/demo/app/helpers/bootstrap_helper.rb +0 -27
- data/demo/app/javascript/channels/consumer.js +0 -6
- data/demo/app/javascript/channels/index.js +0 -5
- data/demo/app/javascript/packs/application.js +0 -11
- data/demo/app/models/address.rb +0 -3
- data/demo/app/models/application_record.rb +0 -3
- data/demo/app/models/faux_user.rb +0 -9
- data/demo/app/models/super_user.rb +0 -2
- data/demo/app/models/user.rb +0 -11
- data/demo/app/views/active_storage/blobs/_blob.html.erb +0 -14
- data/demo/app/views/bootstrap/form.html.erb +0 -67
- data/demo/app/views/layouts/application.html.erb +0 -68
- data/demo/bin/bundle +0 -3
- data/demo/bin/rails +0 -4
- data/demo/bin/rake +0 -4
- data/demo/bin/setup +0 -36
- data/demo/bin/update +0 -31
- data/demo/bin/webpack +0 -15
- data/demo/bin/webpack-dev-server +0 -15
- data/demo/bin/yarn +0 -11
- data/demo/config/application.rb +0 -21
- data/demo/config/boot.rb +0 -5
- data/demo/config/database.yml +0 -21
- data/demo/config/environment.rb +0 -5
- data/demo/config/environments/development.rb +0 -60
- data/demo/config/environments/production.rb +0 -48
- data/demo/config/environments/test.rb +0 -46
- data/demo/config/initializers/application_controller_renderer.rb +0 -8
- data/demo/config/initializers/assets.rb +0 -14
- data/demo/config/initializers/backtrace_silencers.rb +0 -7
- data/demo/config/initializers/cookies_serializer.rb +0 -5
- data/demo/config/initializers/filter_parameter_logging.rb +0 -4
- data/demo/config/initializers/inflections.rb +0 -16
- data/demo/config/initializers/mime_types.rb +0 -4
- data/demo/config/initializers/wrap_parameters.rb +0 -14
- data/demo/config/locales/en.yml +0 -33
- data/demo/config/puma.rb +0 -56
- data/demo/config/routes.rb +0 -5
- data/demo/config/spring.rb +0 -6
- data/demo/config/storage.yml +0 -35
- data/demo/config/webpack/development.js +0 -5
- data/demo/config/webpack/environment.js +0 -3
- data/demo/config/webpack/production.js +0 -5
- data/demo/config/webpack/test.js +0 -5
- data/demo/config/webpacker.yml +0 -92
- data/demo/config.ru +0 -5
- data/demo/db/schema.rb +0 -69
- data/demo/log/.keep +0 -0
- data/demo/package.json +0 -17
- data/demo/public/favicon.ico +0 -0
- data/demo/test/fixtures/action_text/rich_texts.yml +0 -4
- data/demo/yarn.lock +0 -6257
- data/gemfiles/5.2.gemfile +0 -4
@@ -1,68 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<!-- Required meta tags -->
|
5
|
-
<meta charset="utf-8">
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
7
|
-
|
8
|
-
<!-- Bootstrap CSS -->
|
9
|
-
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
|
10
|
-
|
11
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.33.0/codemirror.min.css">
|
12
|
-
|
13
|
-
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
14
|
-
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
15
|
-
|
16
|
-
<style type="text/css">
|
17
|
-
.example {
|
18
|
-
padding: 1.5em;
|
19
|
-
border: .2rem solid #f7f7f9;
|
20
|
-
margin-bottom: 3em;
|
21
|
-
}
|
22
|
-
form {
|
23
|
-
margin-bottom: 1.5em;
|
24
|
-
}
|
25
|
-
.CodeMirror {
|
26
|
-
border: 1px solid #eee;
|
27
|
-
height: auto;
|
28
|
-
}
|
29
|
-
.rails-bootstrap-forms-datetime-select select {
|
30
|
-
display: inline-block;
|
31
|
-
width: auto;
|
32
|
-
}
|
33
|
-
</style>
|
34
|
-
|
35
|
-
<title>Hello, world!</title>
|
36
|
-
<%= csrf_meta_tags %>
|
37
|
-
</head>
|
38
|
-
|
39
|
-
<body>
|
40
|
-
<div class="container">
|
41
|
-
<%= yield %>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
<!-- Optional JavaScript -->
|
45
|
-
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
46
|
-
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
47
|
-
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.1/dist/umd/popper.min.js" integrity="sha384-SR1sx49pcuLnqZUnnPwx6FCym0wLsk5JZuNx2bPPENzswTNFaQU1RDvt3wT4gWFG" crossorigin="anonymous"></script>
|
48
|
-
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.min.js" integrity="sha384-j0CNLUeiqtyaRmlzUHCPZ+Gy5fQu0dQ6eZ/xAww941Ai1SxSY+0EQqNXNE6DZiVc" crossorigin="anonymous"></script>
|
49
|
-
|
50
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.33.0/codemirror.min.js"></script>
|
51
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.33.0/mode/htmlmixed/htmlmixed.min.js"></script>
|
52
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.33.0/mode/xml/xml.min.js"></script>
|
53
|
-
|
54
|
-
<script type="text/javascript">
|
55
|
-
$(document).on("click", "button.toggle", function(){
|
56
|
-
var example = $(this).parent(".example");
|
57
|
-
$(this).hide();
|
58
|
-
$(".code", example).show()
|
59
|
-
CodeMirror.fromTextArea($("textarea.codemirror", example)[0], {
|
60
|
-
mode: "htmlmixed",
|
61
|
-
tabSize: 2,
|
62
|
-
lineNumbers: true,
|
63
|
-
viewportMargin: Infinity
|
64
|
-
})
|
65
|
-
});
|
66
|
-
</script>
|
67
|
-
</body>
|
68
|
-
</html>
|
data/demo/bin/bundle
DELETED
data/demo/bin/rails
DELETED
data/demo/bin/rake
DELETED
data/demo/bin/setup
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require "fileutils"
|
3
|
-
include FileUtils
|
4
|
-
|
5
|
-
# path to your application root.
|
6
|
-
APP_ROOT = File.expand_path("..", __dir__)
|
7
|
-
|
8
|
-
def system!(*args)
|
9
|
-
system(*args) || abort("\n== Command #{args} failed ==")
|
10
|
-
end
|
11
|
-
|
12
|
-
chdir APP_ROOT do
|
13
|
-
# This script is a starting point to setup your application.
|
14
|
-
# Add necessary setup steps to this file.
|
15
|
-
|
16
|
-
puts "== Installing dependencies =="
|
17
|
-
system! "gem install bundler --conservative"
|
18
|
-
system("bundle check") || system!("bundle install")
|
19
|
-
|
20
|
-
# Install JavaScript dependencies if using Yarn
|
21
|
-
# system('bin/yarn')
|
22
|
-
|
23
|
-
# puts "\n== Copying sample files =="
|
24
|
-
# unless File.exist?('config/database.yml')
|
25
|
-
# cp 'config/database.yml.sample', 'config/database.yml'
|
26
|
-
# end
|
27
|
-
|
28
|
-
puts "\n== Preparing database =="
|
29
|
-
system! "bin/rails db:setup"
|
30
|
-
|
31
|
-
puts "\n== Removing old logs and tempfiles =="
|
32
|
-
system! "bin/rails log:clear tmp:clear"
|
33
|
-
|
34
|
-
puts "\n== Restarting application server =="
|
35
|
-
system! "bin/rails restart"
|
36
|
-
end
|
data/demo/bin/update
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require "fileutils"
|
3
|
-
include FileUtils
|
4
|
-
|
5
|
-
# path to your application root.
|
6
|
-
APP_ROOT = File.expand_path("..", __dir__)
|
7
|
-
|
8
|
-
def system!(*args)
|
9
|
-
system(*args) || abort("\n== Command #{args} failed ==")
|
10
|
-
end
|
11
|
-
|
12
|
-
chdir APP_ROOT do
|
13
|
-
# This script is a way to update your development environment automatically.
|
14
|
-
# Add necessary update steps to this file.
|
15
|
-
|
16
|
-
puts "== Installing dependencies =="
|
17
|
-
system! "gem install bundler --conservative"
|
18
|
-
system("bundle check") || system!("bundle install")
|
19
|
-
|
20
|
-
# Install JavaScript dependencies if using Yarn
|
21
|
-
# system('bin/yarn')
|
22
|
-
|
23
|
-
puts "\n== Updating database =="
|
24
|
-
system! "bin/rails db:migrate"
|
25
|
-
|
26
|
-
puts "\n== Removing old logs and tempfiles =="
|
27
|
-
system! "bin/rails log:clear tmp:clear"
|
28
|
-
|
29
|
-
puts "\n== Restarting application server =="
|
30
|
-
system! "bin/rails restart"
|
31
|
-
end
|
data/demo/bin/webpack
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
|
4
|
-
ENV["NODE_ENV"] ||= "development"
|
5
|
-
|
6
|
-
require "pathname"
|
7
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
8
|
-
Pathname.new(__FILE__).realpath)
|
9
|
-
|
10
|
-
require "rubygems"
|
11
|
-
require "bundler/setup"
|
12
|
-
|
13
|
-
require "webpacker"
|
14
|
-
require "webpacker/webpack_runner"
|
15
|
-
Webpacker::WebpackRunner.run(ARGV)
|
data/demo/bin/webpack-dev-server
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
|
4
|
-
ENV["NODE_ENV"] ||= "development"
|
5
|
-
|
6
|
-
require "pathname"
|
7
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
8
|
-
Pathname.new(__FILE__).realpath)
|
9
|
-
|
10
|
-
require "rubygems"
|
11
|
-
require "bundler/setup"
|
12
|
-
|
13
|
-
require "webpacker"
|
14
|
-
require "webpacker/dev_server_runner"
|
15
|
-
Webpacker::DevServerRunner.run(ARGV)
|
data/demo/bin/yarn
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path("..", __dir__)
|
3
|
-
Dir.chdir(APP_ROOT) do
|
4
|
-
begin
|
5
|
-
exec "yarnpkg #{ARGV.join(' ')}"
|
6
|
-
rescue Errno::ENOENT
|
7
|
-
warn "Yarn executable was not detected in the system."
|
8
|
-
warn "Download Yarn at https://yarnpkg.com/en/docs/install"
|
9
|
-
exit 1
|
10
|
-
end
|
11
|
-
end
|
data/demo/config/application.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require_relative "boot"
|
2
|
-
|
3
|
-
require "rails/all"
|
4
|
-
|
5
|
-
Bundler.require(*Rails.groups)
|
6
|
-
require "bootstrap_form"
|
7
|
-
|
8
|
-
module Dummy
|
9
|
-
class Application < Rails::Application
|
10
|
-
# Initialize configuration defaults for originally generated Rails version.
|
11
|
-
|
12
|
-
config.respond_to?(:load_defaults) &&
|
13
|
-
config.load_defaults([Rails::VERSION::MAJOR, Rails::VERSION::MINOR].join("."))
|
14
|
-
|
15
|
-
config.secret_key_base = "ignore" if config.respond_to?(:secret_key_base)
|
16
|
-
|
17
|
-
# Settings in config/environments/* take precedence over those specified here.
|
18
|
-
# Application configuration should go into files in config/initializers
|
19
|
-
# -- all .rb files in that directory are automatically loaded.
|
20
|
-
end
|
21
|
-
end
|
data/demo/config/boot.rb
DELETED
data/demo/config/database.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# SQLite version 3.x
|
2
|
-
# gem install sqlite3
|
3
|
-
#
|
4
|
-
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
-
# gem 'sqlite3'
|
6
|
-
#
|
7
|
-
default: &default
|
8
|
-
adapter: sqlite3
|
9
|
-
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
10
|
-
timeout: 5000
|
11
|
-
|
12
|
-
development:
|
13
|
-
<<: *default
|
14
|
-
database: db/development.sqlite3
|
15
|
-
|
16
|
-
# Warning: The database defined as "test" will be erased and
|
17
|
-
# re-generated from your development database when you run "rake".
|
18
|
-
# Do not set this db to the same as development or production.
|
19
|
-
test:
|
20
|
-
<<: *default
|
21
|
-
database: db/test.sqlite3
|
data/demo/config/environment.rb
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Verifies that versions and hashed value of the package contents in the project's package.json
|
3
|
-
config.webpacker.check_yarn_integrity = true
|
4
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
5
|
-
|
6
|
-
# In the development environment your application's code is reloaded on
|
7
|
-
# every request. This slows down response time but is perfect for development
|
8
|
-
# since you don't have to restart the web server when you make code changes.
|
9
|
-
config.cache_classes = false
|
10
|
-
|
11
|
-
# Do not eager load code on boot.
|
12
|
-
config.eager_load = false
|
13
|
-
|
14
|
-
# Show full error reports.
|
15
|
-
config.consider_all_requests_local = true
|
16
|
-
|
17
|
-
# Enable/disable caching. By default caching is disabled.
|
18
|
-
# Run rails dev:cache to toggle caching.
|
19
|
-
if Rails.root.join("tmp/caching-dev.txt").exist?
|
20
|
-
config.action_controller.perform_caching = true
|
21
|
-
|
22
|
-
config.cache_store = :memory_store
|
23
|
-
config.public_file_server.headers = {
|
24
|
-
"Cache-Control" => "public, max-age=#{2.days.to_i}"
|
25
|
-
}
|
26
|
-
else
|
27
|
-
config.action_controller.perform_caching = false
|
28
|
-
|
29
|
-
config.cache_store = :null_store
|
30
|
-
end
|
31
|
-
|
32
|
-
# Store uploaded files on the local file system (see config/storage.yml for options)
|
33
|
-
config.active_storage.service = :local if config.respond_to?(:active_storage)
|
34
|
-
|
35
|
-
# Don't care if the mailer can't send.
|
36
|
-
config.action_mailer.raise_delivery_errors = false
|
37
|
-
|
38
|
-
config.action_mailer.perform_caching = false
|
39
|
-
|
40
|
-
# Print deprecation notices to the Rails logger.
|
41
|
-
config.active_support.deprecation = :log
|
42
|
-
|
43
|
-
# Raise an error on page load if there are pending migrations.
|
44
|
-
config.active_record.migration_error = :page_load
|
45
|
-
|
46
|
-
# Debug mode disables concatenation and preprocessing of assets.
|
47
|
-
# This option may cause significant delays in view rendering with a large
|
48
|
-
# number of complex assets.
|
49
|
-
config.assets.debug = true
|
50
|
-
|
51
|
-
# Suppress logger output for asset requests.
|
52
|
-
config.assets.quiet = true
|
53
|
-
|
54
|
-
# Raises error for missing translations
|
55
|
-
# config.action_view.raise_on_missing_translations = true
|
56
|
-
|
57
|
-
# Use an evented file watcher to asynchronously detect changes in source code,
|
58
|
-
# routes, locales, etc. This feature depends on the listen gem.
|
59
|
-
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
60
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Verifies that versions and hashed value of the package contents in the project's package.json
|
3
|
-
config.webpacker.check_yarn_integrity = false
|
4
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
5
|
-
|
6
|
-
# The test environment is used exclusively to run your application's
|
7
|
-
# test suite. You never need to work with it otherwise. Remember that
|
8
|
-
# your test database is "scratch space" for the test suite and is wiped
|
9
|
-
# and recreated between test runs. Don't rely on the data there!
|
10
|
-
config.cache_classes = true
|
11
|
-
|
12
|
-
# Do not eager load code on boot. This avoids loading your whole application
|
13
|
-
# just for the purpose of running a single test. If you are using a tool that
|
14
|
-
# preloads Rails for running tests, you may have to set it to true.
|
15
|
-
config.eager_load = false
|
16
|
-
|
17
|
-
# Configure public file server for tests with Cache-Control for performance.
|
18
|
-
config.public_file_server.enabled = true
|
19
|
-
config.public_file_server.headers = {
|
20
|
-
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
|
21
|
-
}
|
22
|
-
|
23
|
-
# Show full error reports and disable caching.
|
24
|
-
config.consider_all_requests_local = true
|
25
|
-
config.action_controller.perform_caching = false
|
26
|
-
|
27
|
-
# Raise exceptions instead of rendering exception templates.
|
28
|
-
config.action_dispatch.show_exceptions = false
|
29
|
-
|
30
|
-
# Disable request forgery protection in test environment.
|
31
|
-
config.action_controller.allow_forgery_protection = false
|
32
|
-
|
33
|
-
# Store uploaded files on the local file system in a temporary directory
|
34
|
-
config.active_storage.service = :test if config.respond_to?(:active_storage)
|
35
|
-
|
36
|
-
config.action_mailer.perform_caching = false
|
37
|
-
|
38
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
39
|
-
# The :test delivery method accumulates sent emails in the
|
40
|
-
# ActionMailer::Base.deliveries array.
|
41
|
-
config.action_mailer.delivery_method = :test
|
42
|
-
|
43
|
-
# Print deprecation notices to the stderr.
|
44
|
-
config.active_support.deprecation = :stderr
|
45
|
-
|
46
|
-
# Raises error for missing translations
|
47
|
-
# config.action_view.raise_on_missing_translations = true
|
48
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite. You never need to work with it otherwise. Remember that
|
6
|
-
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs. Don't rely on the data there!
|
8
|
-
config.cache_classes = true
|
9
|
-
|
10
|
-
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
-
# just for the purpose of running a single test. If you are using a tool that
|
12
|
-
# preloads Rails for running tests, you may have to set it to true.
|
13
|
-
config.eager_load = false
|
14
|
-
|
15
|
-
# Configure public file server for tests with Cache-Control for performance.
|
16
|
-
config.public_file_server.enabled = true
|
17
|
-
config.public_file_server.headers = {
|
18
|
-
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
|
19
|
-
}
|
20
|
-
|
21
|
-
# Show full error reports and disable caching.
|
22
|
-
config.consider_all_requests_local = true
|
23
|
-
config.action_controller.perform_caching = false
|
24
|
-
|
25
|
-
# Raise exceptions instead of rendering exception templates.
|
26
|
-
config.action_dispatch.show_exceptions = false
|
27
|
-
|
28
|
-
# Disable request forgery protection in test environment.
|
29
|
-
config.action_controller.allow_forgery_protection = false
|
30
|
-
|
31
|
-
# Store uploaded files on the local file system in a temporary directory
|
32
|
-
config.active_storage.service = :test if config.respond_to?(:active_storage)
|
33
|
-
|
34
|
-
config.action_mailer.perform_caching = false
|
35
|
-
|
36
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
37
|
-
# The :test delivery method accumulates sent emails in the
|
38
|
-
# ActionMailer::Base.deliveries array.
|
39
|
-
config.action_mailer.delivery_method = :test
|
40
|
-
|
41
|
-
# Print deprecation notices to the stderr.
|
42
|
-
config.active_support.deprecation = :stderr
|
43
|
-
|
44
|
-
# Raises error for missing translations
|
45
|
-
# config.action_view.raise_on_missing_translations = true
|
46
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Version of your assets, change this if you want to expire all your assets.
|
4
|
-
Rails.application.config.assets.version = "1.0"
|
5
|
-
|
6
|
-
# Add additional assets to the asset load path.
|
7
|
-
# Rails.application.config.assets.paths << Emoji.images_path
|
8
|
-
# Add Yarn node_modules folder to the asset load path.
|
9
|
-
Rails.application.config.assets.paths << Rails.root.join("node_modules")
|
10
|
-
|
11
|
-
# Precompile additional assets.
|
12
|
-
# application.js, application.css, and all non-JS/CSS in the app/assets
|
13
|
-
# folder are already added.
|
14
|
-
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format. Inflections
|
4
|
-
# are locale specific, and you may define rules for as many different
|
5
|
-
# locales as you wish. All of these examples are active by default:
|
6
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
-
# inflect.singular /^(ox)en/i, '\1'
|
9
|
-
# inflect.irregular 'person', 'people'
|
10
|
-
# inflect.uncountable %w( fish sheep )
|
11
|
-
# end
|
12
|
-
|
13
|
-
# These inflection rules are supported but not enabled by default:
|
14
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
-
# inflect.acronym 'RESTful'
|
16
|
-
# end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
-
# is enabled by default.
|
5
|
-
|
6
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
-
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json]
|
9
|
-
end
|
10
|
-
|
11
|
-
# To enable root element in JSON for ActiveRecord objects.
|
12
|
-
# ActiveSupport.on_load(:active_record) do
|
13
|
-
# self.include_root_in_json = true
|
14
|
-
# end
|
data/demo/config/locales/en.yml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
2
|
-
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
-
# than English, add the necessary files in this directory.
|
4
|
-
#
|
5
|
-
# To use the locales, use `I18n.t`:
|
6
|
-
#
|
7
|
-
# I18n.t 'hello'
|
8
|
-
#
|
9
|
-
# In views, this is aliased to just `t`:
|
10
|
-
#
|
11
|
-
# <%= t('hello') %>
|
12
|
-
#
|
13
|
-
# To use a different locale, set it with `I18n.locale`:
|
14
|
-
#
|
15
|
-
# I18n.locale = :es
|
16
|
-
#
|
17
|
-
# This would use the information in config/locales/es.yml.
|
18
|
-
#
|
19
|
-
# The following keys must be escaped otherwise they will not be retrieved by
|
20
|
-
# the default I18n backend:
|
21
|
-
#
|
22
|
-
# true, false, on, off, yes, no
|
23
|
-
#
|
24
|
-
# Instead, surround them with single quotes.
|
25
|
-
#
|
26
|
-
# en:
|
27
|
-
# 'true': 'foo'
|
28
|
-
#
|
29
|
-
# To learn more, please read the Rails Internationalization guide
|
30
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
31
|
-
|
32
|
-
en:
|
33
|
-
hello: "Hello world"
|
data/demo/config/puma.rb
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
# Puma can serve each request in a thread from an internal thread pool.
|
2
|
-
# The `threads` method setting takes two numbers: a minimum and maximum.
|
3
|
-
# Any libraries that use thread pools should be configured to match
|
4
|
-
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
5
|
-
# and maximum; this matches the default thread size of Active Record.
|
6
|
-
#
|
7
|
-
threads_count = ENV.fetch("RAILS_MAX_THREADS", 5)
|
8
|
-
threads threads_count, threads_count
|
9
|
-
|
10
|
-
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
11
|
-
#
|
12
|
-
port ENV.fetch("PORT", 3000)
|
13
|
-
|
14
|
-
# Specifies the `environment` that Puma will run in.
|
15
|
-
#
|
16
|
-
environment ENV.fetch("RAILS_ENV") { "development" }
|
17
|
-
|
18
|
-
# Specifies the number of `workers` to boot in clustered mode.
|
19
|
-
# Workers are forked webserver processes. If using threads and workers together
|
20
|
-
# the concurrency of the application would be max `threads` * `workers`.
|
21
|
-
# Workers do not work on JRuby or Windows (both of which do not support
|
22
|
-
# processes).
|
23
|
-
#
|
24
|
-
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
|
25
|
-
|
26
|
-
# Use the `preload_app!` method when specifying a `workers` number.
|
27
|
-
# This directive tells Puma to first boot the application and load code
|
28
|
-
# before forking the application. This takes advantage of Copy On Write
|
29
|
-
# process behavior so workers use less memory. If you use this option
|
30
|
-
# you need to make sure to reconnect any threads in the `on_worker_boot`
|
31
|
-
# block.
|
32
|
-
#
|
33
|
-
# preload_app!
|
34
|
-
|
35
|
-
# If you are preloading your application and using Active Record, it's
|
36
|
-
# recommended that you close any connections to the database before workers
|
37
|
-
# are forked to prevent connection leakage.
|
38
|
-
#
|
39
|
-
# before_fork do
|
40
|
-
# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
|
41
|
-
# end
|
42
|
-
|
43
|
-
# The code in the `on_worker_boot` will be called if you are using
|
44
|
-
# clustered mode by specifying a number of `workers`. After each worker
|
45
|
-
# process is booted, this block will be run. If you are using the `preload_app!`
|
46
|
-
# option, you will want to use this block to reconnect to any threads
|
47
|
-
# or connections that may have been created at application boot, as Ruby
|
48
|
-
# cannot share connections between processes.
|
49
|
-
#
|
50
|
-
# on_worker_boot do
|
51
|
-
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
52
|
-
# end
|
53
|
-
#
|
54
|
-
|
55
|
-
# Allow puma to be restarted by `rails restart` command.
|
56
|
-
plugin :tmp_restart
|
data/demo/config/routes.rb
DELETED
data/demo/config/spring.rb
DELETED
data/demo/config/storage.yml
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
test:
|
2
|
-
service: Disk
|
3
|
-
root: <%= Rails.root.join("tmp/storage") %>
|
4
|
-
|
5
|
-
local:
|
6
|
-
service: Disk
|
7
|
-
root: <%= Rails.root.join("storage") %>
|
8
|
-
|
9
|
-
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
|
10
|
-
# amazon:
|
11
|
-
# service: S3
|
12
|
-
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
|
13
|
-
# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
|
14
|
-
# region: us-east-1
|
15
|
-
# bucket: your_own_bucket
|
16
|
-
|
17
|
-
# Remember not to checkin your GCS keyfile to a repository
|
18
|
-
# google:
|
19
|
-
# service: GCS
|
20
|
-
# project: your_project
|
21
|
-
# keyfile: <%= Rails.root.join("path/to/gcs.keyfile") %>
|
22
|
-
# bucket: your_own_bucket
|
23
|
-
|
24
|
-
# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
|
25
|
-
# microsoft:
|
26
|
-
# service: AzureStorage
|
27
|
-
# path: your_azure_storage_path
|
28
|
-
# storage_account_name: your_account_name
|
29
|
-
# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
|
30
|
-
# container: your_container_name
|
31
|
-
|
32
|
-
# mirror:
|
33
|
-
# service: Mirror
|
34
|
-
# primary: local
|
35
|
-
# mirrors: [ amazon, google, microsoft ]
|