rails-mermaid_erd_markdown 0.2.0 → 0.3.1
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/.github/CODEOWNERS.md +1 -0
- data/.github/workflows/CI.yml +42 -0
- data/.github/workflows/codeql.yml +93 -0
- data/.rubocop.yml +30 -6
- data/.ruby-version +1 -0
- data/CHANGELOG.md +14 -1
- data/Gemfile +6 -9
- data/Gemfile.lock +88 -86
- data/README.md +111 -17
- data/Rakefile +1 -1
- data/bin/console +1 -1
- data/bin/rubocop +29 -0
- data/docs/examples/erd.yml +3 -3
- data/lib/rails-mermaid_erd_markdown/configuration.rb +11 -3
- data/lib/rails-mermaid_erd_markdown/generator.rb +169 -0
- data/lib/rails-mermaid_erd_markdown/markdown_document.rb +104 -0
- data/lib/rails-mermaid_erd_markdown/source_data.rb +63 -0
- data/lib/rails-mermaid_erd_markdown/version.rb +1 -1
- data/lib/rails-mermaid_erd_markdown.rb +3 -93
- data/rails-mermaid_erd_markdown.gemspec +6 -4
- data/test/example_output/mock_ERD.md +48 -0
- data/test/example_output/mock_ERD_index.md +10 -0
- data/test/example_output/mock_ERD_model.md +46 -0
- data/test/mock_data/models.rb +105 -0
- data/test/test_helper.rb +4 -2
- data/test/test_rails/rails-mermaid_erd_markdown/test_generator.rb +54 -0
- data/test/test_rails/rails-mermaid_erd_markdown/test_markdown_document.rb +76 -0
- data/test/test_rails/rails-mermaid_erd_markdown/test_source_data.rb +70 -0
- data/test/test_rails/test_rails-mermaid_erd_markdown.rb +0 -40
- metadata +23 -67
- data/test/dummy-rails/.dockerignore +0 -37
- data/test/dummy-rails/.ruby-version +0 -1
- data/test/dummy-rails/Rakefile +0 -6
- data/test/dummy-rails/app/assets/config/manifest.js +0 -4
- data/test/dummy-rails/app/assets/images/.keep +0 -0
- data/test/dummy-rails/app/assets/stylesheets/application.css +0 -15
- data/test/dummy-rails/app/channels/application_cable/channel.rb +0 -4
- data/test/dummy-rails/app/channels/application_cable/connection.rb +0 -4
- data/test/dummy-rails/app/controllers/application_controller.rb +0 -2
- data/test/dummy-rails/app/controllers/concerns/.keep +0 -0
- data/test/dummy-rails/app/helpers/application_helper.rb +0 -2
- data/test/dummy-rails/app/javascript/application.js +0 -3
- data/test/dummy-rails/app/javascript/controllers/application.js +0 -9
- data/test/dummy-rails/app/javascript/controllers/hello_controller.js +0 -7
- data/test/dummy-rails/app/javascript/controllers/index.js +0 -11
- data/test/dummy-rails/app/jobs/application_job.rb +0 -7
- data/test/dummy-rails/app/mailers/application_mailer.rb +0 -4
- data/test/dummy-rails/app/models/application_record.rb +0 -3
- data/test/dummy-rails/app/models/concerns/.keep +0 -0
- data/test/dummy-rails/app/views/layouts/application.html.erb +0 -16
- data/test/dummy-rails/app/views/layouts/mailer.html.erb +0 -13
- data/test/dummy-rails/app/views/layouts/mailer.text.erb +0 -1
- data/test/dummy-rails/bin/bundle +0 -114
- data/test/dummy-rails/bin/docker-entrypoint +0 -8
- data/test/dummy-rails/bin/importmap +0 -4
- data/test/dummy-rails/bin/rails +0 -4
- data/test/dummy-rails/bin/rake +0 -4
- data/test/dummy-rails/bin/setup +0 -33
- data/test/dummy-rails/config/application.rb +0 -27
- data/test/dummy-rails/config/boot.rb +0 -3
- data/test/dummy-rails/config/cable.yml +0 -10
- data/test/dummy-rails/config/credentials.yml.enc +0 -1
- data/test/dummy-rails/config/database.yml +0 -25
- data/test/dummy-rails/config/environment.rb +0 -5
- data/test/dummy-rails/config/environments/development.rb +0 -76
- data/test/dummy-rails/config/environments/production.rb +0 -97
- data/test/dummy-rails/config/environments/test.rb +0 -64
- data/test/dummy-rails/config/importmap.rb +0 -7
- data/test/dummy-rails/config/initializers/content_security_policy.rb +0 -25
- data/test/dummy-rails/config/initializers/filter_parameter_logging.rb +0 -8
- data/test/dummy-rails/config/initializers/inflections.rb +0 -16
- data/test/dummy-rails/config/initializers/permissions_policy.rb +0 -13
- data/test/dummy-rails/config/locales/en.yml +0 -31
- data/test/dummy-rails/config/puma.rb +0 -35
- data/test/dummy-rails/config/routes.rb +0 -10
- data/test/dummy-rails/config/storage.yml +0 -34
- data/test/dummy-rails/config.ru +0 -6
- data/test/dummy-rails/db/seeds.rb +0 -9
- data/test/dummy-rails/test/application_system_test_case.rb +0 -5
- data/test/dummy-rails/test/channels/application_cable/connection_test.rb +0 -13
- data/test/dummy-rails/test/controllers/.keep +0 -0
- data/test/dummy-rails/test/fixtures/files/.keep +0 -0
- data/test/dummy-rails/test/helpers/.keep +0 -0
- data/test/dummy-rails/test/integration/.keep +0 -0
- data/test/dummy-rails/test/mailers/.keep +0 -0
- data/test/dummy-rails/test/models/.keep +0 -0
- data/test/dummy-rails/test/system/.keep +0 -0
- data/test/dummy-rails/test/test_helper.rb +0 -15
- data/test/dummy-rails/vendor/.keep +0 -0
- data/test/dummy-rails/vendor/javascript/.keep +0 -0
- data/test/util/mock_ERD.md +0 -27
@@ -1,37 +0,0 @@
|
|
1
|
-
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files.
|
2
|
-
|
3
|
-
# Ignore git directory.
|
4
|
-
/.git/
|
5
|
-
|
6
|
-
# Ignore bundler config.
|
7
|
-
/.bundle
|
8
|
-
|
9
|
-
# Ignore all environment files (except templates).
|
10
|
-
/.env*
|
11
|
-
!/.env*.erb
|
12
|
-
|
13
|
-
# Ignore all default key files.
|
14
|
-
/config/master.key
|
15
|
-
/config/credentials/*.key
|
16
|
-
|
17
|
-
# Ignore all logfiles and tempfiles.
|
18
|
-
/log/*
|
19
|
-
/tmp/*
|
20
|
-
!/log/.keep
|
21
|
-
!/tmp/.keep
|
22
|
-
|
23
|
-
# Ignore pidfiles, but keep the directory.
|
24
|
-
/tmp/pids/*
|
25
|
-
!/tmp/pids/.keep
|
26
|
-
|
27
|
-
# Ignore storage (uploaded files in development and any SQLite databases).
|
28
|
-
/storage/*
|
29
|
-
!/storage/.keep
|
30
|
-
/tmp/storage/*
|
31
|
-
!/tmp/storage/.keep
|
32
|
-
|
33
|
-
# Ignore assets.
|
34
|
-
/node_modules/
|
35
|
-
/app/assets/builds/*
|
36
|
-
!/app/assets/builds/.keep
|
37
|
-
/public/assets
|
@@ -1 +0,0 @@
|
|
1
|
-
ruby-3.1.0
|
data/test/dummy-rails/Rakefile
DELETED
File without changes
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
|
6
|
-
* vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any other CSS
|
10
|
-
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
-
* It is generally better to create a new file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
File without changes
|
@@ -1,11 +0,0 @@
|
|
1
|
-
// Import and register all your controllers from the importmap under controllers/*
|
2
|
-
|
3
|
-
import { application } from "controllers/application"
|
4
|
-
|
5
|
-
// Eager load all controllers defined in the import map under controllers/**/*_controller
|
6
|
-
import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
|
7
|
-
eagerLoadControllersFrom("controllers", application)
|
8
|
-
|
9
|
-
// Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
|
10
|
-
// import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
|
11
|
-
// lazyLoadControllersFrom("controllers", application)
|
@@ -1,7 +0,0 @@
|
|
1
|
-
class ApplicationJob < ActiveJob::Base
|
2
|
-
# Automatically retry jobs that encountered a deadlock
|
3
|
-
# retry_on ActiveRecord::Deadlocked
|
4
|
-
|
5
|
-
# Most jobs are safe to ignore if the underlying records are no longer available
|
6
|
-
# discard_on ActiveJob::DeserializationError
|
7
|
-
end
|
File without changes
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>DummyRails</title>
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
-
<%= csrf_meta_tags %>
|
7
|
-
<%= csp_meta_tag %>
|
8
|
-
|
9
|
-
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
10
|
-
<%= javascript_importmap_tags %>
|
11
|
-
</head>
|
12
|
-
|
13
|
-
<body>
|
14
|
-
<%= yield %>
|
15
|
-
</body>
|
16
|
-
</html>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= yield %>
|
data/test/dummy-rails/bin/bundle
DELETED
@@ -1,114 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
#
|
5
|
-
# This file was generated by Bundler.
|
6
|
-
#
|
7
|
-
# The application 'bundle' is installed as part of a gem, and
|
8
|
-
# this file is here to facilitate running it.
|
9
|
-
#
|
10
|
-
|
11
|
-
require "rubygems"
|
12
|
-
|
13
|
-
m = Module.new do
|
14
|
-
module_function
|
15
|
-
|
16
|
-
def invoked_as_script?
|
17
|
-
File.expand_path($0) == File.expand_path(__FILE__)
|
18
|
-
end
|
19
|
-
|
20
|
-
def env_var_version
|
21
|
-
ENV["BUNDLER_VERSION"]
|
22
|
-
end
|
23
|
-
|
24
|
-
def cli_arg_version
|
25
|
-
return unless invoked_as_script? # don't want to hijack other binstubs
|
26
|
-
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
27
|
-
bundler_version = nil
|
28
|
-
update_index = nil
|
29
|
-
ARGV.each_with_index do |a, i|
|
30
|
-
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
31
|
-
bundler_version = a
|
32
|
-
end
|
33
|
-
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
|
34
|
-
bundler_version = $1
|
35
|
-
update_index = i
|
36
|
-
end
|
37
|
-
bundler_version
|
38
|
-
end
|
39
|
-
|
40
|
-
def gemfile
|
41
|
-
gemfile = ENV["BUNDLE_GEMFILE"]
|
42
|
-
return gemfile if gemfile && !gemfile.empty?
|
43
|
-
|
44
|
-
File.expand_path("../../Gemfile", __FILE__)
|
45
|
-
end
|
46
|
-
|
47
|
-
def lockfile
|
48
|
-
lockfile =
|
49
|
-
case File.basename(gemfile)
|
50
|
-
when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
|
51
|
-
else "#{gemfile}.lock"
|
52
|
-
end
|
53
|
-
File.expand_path(lockfile)
|
54
|
-
end
|
55
|
-
|
56
|
-
def lockfile_version
|
57
|
-
return unless File.file?(lockfile)
|
58
|
-
lockfile_contents = File.read(lockfile)
|
59
|
-
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
60
|
-
Regexp.last_match(1)
|
61
|
-
end
|
62
|
-
|
63
|
-
def bundler_requirement
|
64
|
-
@bundler_requirement ||=
|
65
|
-
env_var_version || cli_arg_version ||
|
66
|
-
bundler_requirement_for(lockfile_version)
|
67
|
-
end
|
68
|
-
|
69
|
-
def bundler_requirement_for(version)
|
70
|
-
return "#{Gem::Requirement.default}.a" unless version
|
71
|
-
|
72
|
-
bundler_gem_version = Gem::Version.new(version)
|
73
|
-
|
74
|
-
requirement = bundler_gem_version.approximate_recommendation
|
75
|
-
|
76
|
-
return requirement unless Gem.rubygems_version < Gem::Version.new("2.7.0")
|
77
|
-
|
78
|
-
requirement += ".a" if bundler_gem_version.prerelease?
|
79
|
-
|
80
|
-
requirement
|
81
|
-
end
|
82
|
-
|
83
|
-
def load_bundler!
|
84
|
-
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
85
|
-
|
86
|
-
activate_bundler
|
87
|
-
end
|
88
|
-
|
89
|
-
def activate_bundler
|
90
|
-
gem_error = activation_error_handling do
|
91
|
-
gem "bundler", bundler_requirement
|
92
|
-
end
|
93
|
-
return if gem_error.nil?
|
94
|
-
require_error = activation_error_handling do
|
95
|
-
require "bundler/version"
|
96
|
-
end
|
97
|
-
return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
|
98
|
-
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
|
99
|
-
exit 42
|
100
|
-
end
|
101
|
-
|
102
|
-
def activation_error_handling
|
103
|
-
yield
|
104
|
-
nil
|
105
|
-
rescue StandardError, LoadError => e
|
106
|
-
e
|
107
|
-
end
|
108
|
-
end
|
109
|
-
|
110
|
-
m.load_bundler!
|
111
|
-
|
112
|
-
if m.invoked_as_script?
|
113
|
-
load Gem.bin_path("bundler", "bundle")
|
114
|
-
end
|
data/test/dummy-rails/bin/rails
DELETED
data/test/dummy-rails/bin/rake
DELETED
data/test/dummy-rails/bin/setup
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require "fileutils"
|
3
|
-
|
4
|
-
# path to your application root.
|
5
|
-
APP_ROOT = File.expand_path("..", __dir__)
|
6
|
-
|
7
|
-
def system!(*args)
|
8
|
-
system(*args, exception: true)
|
9
|
-
end
|
10
|
-
|
11
|
-
FileUtils.chdir APP_ROOT do
|
12
|
-
# This script is a way to set up or update your development environment automatically.
|
13
|
-
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
|
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
|
-
# puts "\n== Copying sample files =="
|
21
|
-
# unless File.exist?("config/database.yml")
|
22
|
-
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
|
23
|
-
# end
|
24
|
-
|
25
|
-
puts "\n== Preparing database =="
|
26
|
-
system! "bin/rails db:prepare"
|
27
|
-
|
28
|
-
puts "\n== Removing old logs and tempfiles =="
|
29
|
-
system! "bin/rails log:clear tmp:clear"
|
30
|
-
|
31
|
-
puts "\n== Restarting application server =="
|
32
|
-
system! "bin/rails restart"
|
33
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require_relative "boot"
|
2
|
-
|
3
|
-
require "rails/all"
|
4
|
-
|
5
|
-
# Require the gems listed in Gemfile, including any gems
|
6
|
-
# you've limited to :test, :development, or :production.
|
7
|
-
Bundler.require(*Rails.groups)
|
8
|
-
|
9
|
-
module DummyRails
|
10
|
-
class Application < Rails::Application
|
11
|
-
# Initialize configuration defaults for originally generated Rails version.
|
12
|
-
config.load_defaults 7.1
|
13
|
-
|
14
|
-
# Please, add to the `ignore` list any other `lib` subdirectories that do
|
15
|
-
# not contain `.rb` files, or that should not be reloaded or eager loaded.
|
16
|
-
# Common ones are `templates`, `generators`, or `middleware`, for example.
|
17
|
-
config.autoload_lib(ignore: %w(assets tasks))
|
18
|
-
|
19
|
-
# Configuration for the application, engines, and railties goes here.
|
20
|
-
#
|
21
|
-
# These settings can be overridden in specific environments using the files
|
22
|
-
# in config/environments, which are processed later.
|
23
|
-
#
|
24
|
-
# config.time_zone = "Central Time (US & Canada)"
|
25
|
-
# config.eager_load_paths << Rails.root.join("extras")
|
26
|
-
end
|
27
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
MpQ9UnYRFOGUgfNw4wGkH5prfevwMyoSzKT8u28xguSkUWeGJm2DSLMe3a6RH0XnQciqcEvEuUHWS7/9ju2r6NdQDWWqy24fwYFxTxteK0lVJLMZmzP43cYKnMQHwJbOl7NBHArN0W9BNxB6/3b9eVuRgV0NojPMnvgv7DoEDbjkZPTHiWAqg8auYQBVviuQl0HjeUadqBtuyjyPz0GZyoVfDmXSQf7gFVAB/QjN90YENQjGNxtSSPjr4uo37QrcC0Spfr5QcsGJutfgmTps1JA2FNU1U/1ibfbi+jMuG1hIGQ9Uc9bkCHRflU46Jki6+ocu8VkMacI9UwcJsyk2NldN+kB0pNl/V0N8xj7W3TXuIUnmGV/99q6qWJmvXwF2AUbYIZRVadvg2+id99/wb76sjUPw--tEZ6vr+ZxmlKrI4h--JeUs4ZUabtROAZ2I3mEWnQ==
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# SQLite. Versions 3.8.0 and up are supported.
|
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: storage/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: storage/test.sqlite3
|
22
|
-
|
23
|
-
production:
|
24
|
-
<<: *default
|
25
|
-
database: storage/production.sqlite3
|
@@ -1,76 +0,0 @@
|
|
1
|
-
require "active_support/core_ext/integer/time"
|
2
|
-
|
3
|
-
Rails.application.configure do
|
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 any time
|
7
|
-
# it changes. 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.enable_reloading = true
|
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 server timing
|
18
|
-
config.server_timing = true
|
19
|
-
|
20
|
-
# Enable/disable caching. By default caching is disabled.
|
21
|
-
# Run rails dev:cache to toggle caching.
|
22
|
-
if Rails.root.join("tmp/caching-dev.txt").exist?
|
23
|
-
config.action_controller.perform_caching = true
|
24
|
-
config.action_controller.enable_fragment_cache_logging = true
|
25
|
-
|
26
|
-
config.cache_store = :memory_store
|
27
|
-
config.public_file_server.headers = {
|
28
|
-
"Cache-Control" => "public, max-age=#{2.days.to_i}"
|
29
|
-
}
|
30
|
-
else
|
31
|
-
config.action_controller.perform_caching = false
|
32
|
-
|
33
|
-
config.cache_store = :null_store
|
34
|
-
end
|
35
|
-
|
36
|
-
# Store uploaded files on the local file system (see config/storage.yml for options).
|
37
|
-
config.active_storage.service = :local
|
38
|
-
|
39
|
-
# Don't care if the mailer can't send.
|
40
|
-
config.action_mailer.raise_delivery_errors = false
|
41
|
-
|
42
|
-
config.action_mailer.perform_caching = false
|
43
|
-
|
44
|
-
# Print deprecation notices to the Rails logger.
|
45
|
-
config.active_support.deprecation = :log
|
46
|
-
|
47
|
-
# Raise exceptions for disallowed deprecations.
|
48
|
-
config.active_support.disallowed_deprecation = :raise
|
49
|
-
|
50
|
-
# Tell Active Support which deprecation messages to disallow.
|
51
|
-
config.active_support.disallowed_deprecation_warnings = []
|
52
|
-
|
53
|
-
# Raise an error on page load if there are pending migrations.
|
54
|
-
config.active_record.migration_error = :page_load
|
55
|
-
|
56
|
-
# Highlight code that triggered database queries in logs.
|
57
|
-
config.active_record.verbose_query_logs = true
|
58
|
-
|
59
|
-
# Highlight code that enqueued background job in logs.
|
60
|
-
config.active_job.verbose_enqueue_logs = true
|
61
|
-
|
62
|
-
# Suppress logger output for asset requests.
|
63
|
-
config.assets.quiet = true
|
64
|
-
|
65
|
-
# Raises error for missing translations.
|
66
|
-
# config.i18n.raise_on_missing_translations = true
|
67
|
-
|
68
|
-
# Annotate rendered view with file names.
|
69
|
-
# config.action_view.annotate_rendered_view_with_filenames = true
|
70
|
-
|
71
|
-
# Uncomment if you wish to allow Action Cable access from any origin.
|
72
|
-
# config.action_cable.disable_request_forgery_protection = true
|
73
|
-
|
74
|
-
# Raise error when a before_action's only/except options reference missing actions
|
75
|
-
config.action_controller.raise_on_missing_callback_actions = true
|
76
|
-
end
|
@@ -1,97 +0,0 @@
|
|
1
|
-
require "active_support/core_ext/integer/time"
|
2
|
-
|
3
|
-
Rails.application.configure do
|
4
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
5
|
-
|
6
|
-
# Code is not reloaded between requests.
|
7
|
-
config.enable_reloading = false
|
8
|
-
|
9
|
-
# Eager load code on boot. This eager loads most of Rails and
|
10
|
-
# your application in memory, allowing both threaded web servers
|
11
|
-
# and those relying on copy on write to perform better.
|
12
|
-
# Rake tasks automatically ignore this option for performance.
|
13
|
-
config.eager_load = true
|
14
|
-
|
15
|
-
# Full error reports are disabled and caching is turned on.
|
16
|
-
config.consider_all_requests_local = false
|
17
|
-
config.action_controller.perform_caching = true
|
18
|
-
|
19
|
-
# Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
|
20
|
-
# key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files).
|
21
|
-
# config.require_master_key = true
|
22
|
-
|
23
|
-
# Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
|
24
|
-
# config.public_file_server.enabled = false
|
25
|
-
|
26
|
-
# Compress CSS using a preprocessor.
|
27
|
-
# config.assets.css_compressor = :sass
|
28
|
-
|
29
|
-
# Do not fall back to assets pipeline if a precompiled asset is missed.
|
30
|
-
config.assets.compile = false
|
31
|
-
|
32
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
33
|
-
# config.asset_host = "http://assets.example.com"
|
34
|
-
|
35
|
-
# Specifies the header that your server uses for sending files.
|
36
|
-
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
|
37
|
-
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
|
38
|
-
|
39
|
-
# Store uploaded files on the local file system (see config/storage.yml for options).
|
40
|
-
config.active_storage.service = :local
|
41
|
-
|
42
|
-
# Mount Action Cable outside main process or domain.
|
43
|
-
# config.action_cable.mount_path = nil
|
44
|
-
# config.action_cable.url = "wss://example.com/cable"
|
45
|
-
# config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
|
46
|
-
|
47
|
-
# Assume all access to the app is happening through a SSL-terminating reverse proxy.
|
48
|
-
# Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies.
|
49
|
-
# config.assume_ssl = true
|
50
|
-
|
51
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
52
|
-
config.force_ssl = true
|
53
|
-
|
54
|
-
# Log to STDOUT by default
|
55
|
-
config.logger = ActiveSupport::Logger.new(STDOUT)
|
56
|
-
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
|
57
|
-
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }
|
58
|
-
|
59
|
-
# Prepend all log lines with the following tags.
|
60
|
-
config.log_tags = [ :request_id ]
|
61
|
-
|
62
|
-
# "info" includes generic and useful information about system operation, but avoids logging too much
|
63
|
-
# information to avoid inadvertent exposure of personally identifiable information (PII). If you
|
64
|
-
# want to log everything, set the level to "debug".
|
65
|
-
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
|
66
|
-
|
67
|
-
# Use a different cache store in production.
|
68
|
-
# config.cache_store = :mem_cache_store
|
69
|
-
|
70
|
-
# Use a real queuing backend for Active Job (and separate queues per environment).
|
71
|
-
# config.active_job.queue_adapter = :resque
|
72
|
-
# config.active_job.queue_name_prefix = "dummy_rails_production"
|
73
|
-
|
74
|
-
config.action_mailer.perform_caching = false
|
75
|
-
|
76
|
-
# Ignore bad email addresses and do not raise email delivery errors.
|
77
|
-
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
78
|
-
# config.action_mailer.raise_delivery_errors = false
|
79
|
-
|
80
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
81
|
-
# the I18n.default_locale when a translation cannot be found).
|
82
|
-
config.i18n.fallbacks = true
|
83
|
-
|
84
|
-
# Don't log any deprecations.
|
85
|
-
config.active_support.report_deprecations = false
|
86
|
-
|
87
|
-
# Do not dump schema after migrations.
|
88
|
-
config.active_record.dump_schema_after_migration = false
|
89
|
-
|
90
|
-
# Enable DNS rebinding protection and other `Host` header attacks.
|
91
|
-
# config.hosts = [
|
92
|
-
# "example.com", # Allow requests from example.com
|
93
|
-
# /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
|
94
|
-
# ]
|
95
|
-
# Skip DNS rebinding protection for the default health check endpoint.
|
96
|
-
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
|
97
|
-
end
|