57 |
--------------------------------------------------------------------------------
/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/bin/bundler:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'bundler' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('bundler', 'bundler')
17 |
--------------------------------------------------------------------------------
/bin/coderay:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'coderay' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('coderay', 'coderay')
17 |
--------------------------------------------------------------------------------
/bin/erubis:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'erubis' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('erubis', 'erubis')
17 |
--------------------------------------------------------------------------------
/bin/rackup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'rackup' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('rack', 'rackup')
17 |
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_PATH = File.expand_path("../config/application", __dir__)
3 | require_relative "../config/boot"
4 | require "rails/commands"
5 |
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require_relative "../config/boot"
3 | require "rake"
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/bin/rspec:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # frozen_string_literal: true
3 | #
4 | # This file was generated by Bundler.
5 | #
6 | # The application 'rspec' is installed as part of a gem, and
7 | # this file is here to facilitate running it.
8 | #
9 |
10 | require "pathname"
11 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12 | Pathname.new(__FILE__).realpath)
13 |
14 | require "rubygems"
15 | require "bundler/setup"
16 |
17 | load Gem.bin_path("rspec-core", "rspec")
18 |
--------------------------------------------------------------------------------
/bin/sass:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'sass' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('sass', 'sass')
17 |
--------------------------------------------------------------------------------
/bin/sass-convert:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'sass-convert' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('sass', 'sass-convert')
17 |
--------------------------------------------------------------------------------
/bin/scss:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'scss' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('sass', 'scss')
17 |
--------------------------------------------------------------------------------
/bin/setup:
--------------------------------------------------------------------------------
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) || abort("\n== Command #{args} failed ==")
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
34 |
--------------------------------------------------------------------------------
/bin/sprockets:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'sprockets' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('sprockets', 'sprockets')
17 |
--------------------------------------------------------------------------------
/bin/thin:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'thin' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('thin', 'thin')
17 |
--------------------------------------------------------------------------------
/bin/thor:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'thor' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('thor', 'thor')
17 |
--------------------------------------------------------------------------------
/bin/tilt:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'tilt' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('tilt', 'tilt')
17 |
--------------------------------------------------------------------------------
/bin/tt:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'tt' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('treetop', 'tt')
17 |
--------------------------------------------------------------------------------
/bin/update:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'pathname'
3 | require 'fileutils'
4 | include FileUtils
5 |
6 | # path to your application root.
7 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8 |
9 | def system!(*args)
10 | system(*args) || abort("\n== Command #{args} failed ==")
11 | end
12 |
13 | chdir APP_ROOT do
14 | # This script is a way to update your development environment automatically.
15 | # Add necessary update steps to this file.
16 |
17 | puts '== Installing dependencies =='
18 | system! 'gem install bundler --conservative'
19 | system('bundle check') || system!('bundle install')
20 |
21 | puts "\n== Updating database =="
22 | system! 'bin/rails db:migrate'
23 |
24 | puts "\n== Removing old logs and tempfiles =="
25 | system! 'bin/rails log:clear tmp:clear'
26 |
27 | puts "\n== Restarting application server =="
28 | system! 'bin/rails restart'
29 | end
30 |
--------------------------------------------------------------------------------
/bin/yarn:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_ROOT = File.expand_path('..', __dir__)
3 | Dir.chdir(APP_ROOT) do
4 | yarn = ENV["PATH"].split(File::PATH_SEPARATOR).
5 | select { |dir| File.expand_path(dir) != __dir__ }.
6 | product(["yarn", "yarn.cmd", "yarn.ps1"]).
7 | map { |dir, file| File.expand_path(file, dir) }.
8 | find { |file| File.executable?(file) }
9 |
10 | if yarn
11 | exec yarn, *ARGV
12 | else
13 | $stderr.puts "Yarn executable was not detected in the system."
14 | $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
15 | exit 1
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require_relative 'config/environment'
4 |
5 | run Rails.application
6 | Rails.application.load_server
7 |
--------------------------------------------------------------------------------
/config/application.rb:
--------------------------------------------------------------------------------
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 RubyTr
10 | class Application < Rails::Application
11 | # Initialize configuration defaults for originally generated Rails version.
12 | config.load_defaults 7.0
13 |
14 | # Configuration for the application, engines, and railties goes here.
15 | #
16 | # These settings can be overridden in specific environments using the files
17 | # in config/environments, which are processed later.
18 | #
19 | # config.time_zone = "Central Time (US & Canada)"
20 | # config.eager_load_paths << Rails.root.join("extras")
21 |
22 | config.i18n.default_locale = :tr
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/config/boot.rb:
--------------------------------------------------------------------------------
1 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
2 |
3 | require "bundler/setup" # Set up gems listed in the Gemfile.
4 |
--------------------------------------------------------------------------------
/config/cable.yml:
--------------------------------------------------------------------------------
1 | development:
2 | adapter: async
3 |
4 | test:
5 | adapter: test
6 |
7 | production:
8 | adapter: redis
9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10 | channel_prefix: ruby_tr_production
11 |
--------------------------------------------------------------------------------
/config/database.yml:
--------------------------------------------------------------------------------
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 | development:
7 | adapter: sqlite3
8 | database: db/development.sqlite3
9 | pool: 5
10 | timeout: 5000
11 |
12 | # Warning: The database defined as "test" will be erased and
13 | # re-generated from your development database when you run "rake".
14 | # Do not set this db to the same as development or production.
15 | test:
16 | adapter: sqlite3
17 | database: db/test.sqlite3
18 | pool: 5
19 | timeout: 5000
20 |
21 | production:
22 | adapter: postgresql
23 | pool: 5
24 | timeout: 5000
25 |
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative "application"
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/config/environments/development.rb:
--------------------------------------------------------------------------------
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.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 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 | # Suppress logger output for asset requests.
60 | config.assets.quiet = true
61 |
62 | # Raises error for missing translations.
63 | # config.i18n.raise_on_missing_translations = true
64 |
65 | # Annotate rendered view with file names.
66 | # config.action_view.annotate_rendered_view_with_filenames = true
67 |
68 | # Uncomment if you wish to allow Action Cable access from any origin.
69 | # config.action_cable.disable_request_forgery_protection = true
70 | end
71 |
--------------------------------------------------------------------------------
/config/environments/production.rb:
--------------------------------------------------------------------------------
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.cache_classes = true
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 either ENV["RAILS_MASTER_KEY"]
20 | # or in config/master.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 the `/public` folder by default since
24 | # Apache or NGINX already handles this.
25 | config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
26 |
27 | # Compress CSS using a preprocessor.
28 | # config.assets.css_compressor = :sass
29 |
30 | # Do not fallback to assets pipeline if a precompiled asset is missed.
31 | config.assets.compile = true
32 |
33 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
34 | # config.asset_host = "http://assets.example.com"
35 |
36 | # Specifies the header that your server uses for sending files.
37 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
38 | # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
39 |
40 | # Store uploaded files on the local file system (see config/storage.yml for options).
41 | config.active_storage.service = :local
42 |
43 | # Mount Action Cable outside main process or domain.
44 | # config.action_cable.mount_path = nil
45 | # config.action_cable.url = "wss://example.com/cable"
46 | # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
47 |
48 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
49 | # config.force_ssl = true
50 |
51 | # Include generic and useful information about system operation, but avoid logging too much
52 | # information to avoid inadvertent exposure of personally identifiable information (PII).
53 | config.log_level = :info
54 |
55 | # Prepend all log lines with the following tags.
56 | config.log_tags = [ :request_id ]
57 |
58 | # Use a different cache store in production.
59 | # config.cache_store = :mem_cache_store
60 |
61 | # Use a real queuing backend for Active Job (and separate queues per environment).
62 | # config.active_job.queue_adapter = :resque
63 | # config.active_job.queue_name_prefix = "ruby_tr_production"
64 |
65 | config.action_mailer.perform_caching = false
66 |
67 | # Ignore bad email addresses and do not raise email delivery errors.
68 | # Set this to true and configure the email server for immediate delivery to raise delivery errors.
69 | # config.action_mailer.raise_delivery_errors = false
70 |
71 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
72 | # the I18n.default_locale when a translation cannot be found).
73 | config.i18n.fallbacks = true
74 |
75 | # Don't log any deprecations.
76 | config.active_support.report_deprecations = false
77 |
78 | # Use default logging formatter so that PID and timestamp are not suppressed.
79 | config.log_formatter = ::Logger::Formatter.new
80 |
81 | # Use a different logger for distributed setups.
82 | # require "syslog/logger"
83 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
84 |
85 | if ENV["RAILS_LOG_TO_STDOUT"].present?
86 | logger = ActiveSupport::Logger.new(STDOUT)
87 | logger.formatter = config.log_formatter
88 | config.logger = ActiveSupport::TaggedLogging.new(logger)
89 | end
90 |
91 | # Do not dump schema after migrations.
92 | config.active_record.dump_schema_after_migration = false
93 | end
94 |
--------------------------------------------------------------------------------
/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | require "active_support/core_ext/integer/time"
2 |
3 | # The test environment is used exclusively to run your application's
4 | # test suite. You never need to work with it otherwise. Remember that
5 | # your test database is "scratch space" for the test suite and is wiped
6 | # and recreated between test runs. Don't rely on the data there!
7 |
8 | Rails.application.configure do
9 | # Settings specified here will take precedence over those in config/application.rb.
10 |
11 | # Turn false under Spring and add config.action_view.cache_template_loading = true.
12 | config.cache_classes = true
13 |
14 | # Eager loading loads your whole application. When running a single test locally,
15 | # this probably isn't necessary. It's a good idea to do in a continuous integration
16 | # system, or in some way before deploying your code.
17 | config.eager_load = ENV["CI"].present?
18 |
19 | # Configure public file server for tests with Cache-Control for performance.
20 | config.public_file_server.enabled = true
21 | config.public_file_server.headers = {
22 | "Cache-Control" => "public, max-age=#{1.hour.to_i}"
23 | }
24 |
25 | # Show full error reports and disable caching.
26 | config.consider_all_requests_local = true
27 | config.action_controller.perform_caching = false
28 | config.cache_store = :null_store
29 |
30 | # Raise exceptions instead of rendering exception templates.
31 | config.action_dispatch.show_exceptions = false
32 |
33 | # Disable request forgery protection in test environment.
34 | config.action_controller.allow_forgery_protection = false
35 |
36 | # Store uploaded files on the local file system in a temporary directory.
37 | config.active_storage.service = :test
38 |
39 | config.action_mailer.perform_caching = false
40 |
41 | # Tell Action Mailer not to deliver emails to the real world.
42 | # The :test delivery method accumulates sent emails in the
43 | # ActionMailer::Base.deliveries array.
44 | config.action_mailer.delivery_method = :test
45 |
46 | # Print deprecation notices to the stderr.
47 | config.active_support.deprecation = :stderr
48 |
49 | # Raise exceptions for disallowed deprecations.
50 | config.active_support.disallowed_deprecation = :raise
51 |
52 | # Tell Active Support which deprecation messages to disallow.
53 | config.active_support.disallowed_deprecation_warnings = []
54 |
55 | # Raises error for missing translations.
56 | # config.i18n.raise_on_missing_translations = true
57 |
58 | # Annotate rendered view with file names.
59 | # config.action_view.annotate_rendered_view_with_filenames = true
60 | end
61 |
--------------------------------------------------------------------------------
/config/initializers/active_admin.rb:
--------------------------------------------------------------------------------
1 | ActiveAdmin.setup do |config|
2 | # == Site Title
3 | #
4 | # Set the title that is displayed on the main layout
5 | # for each of the active admin pages.
6 | #
7 | config.site_title = "Ruby Tr"
8 |
9 | # Set the link url for the title. For example, to take
10 | # users to your main site. Defaults to no link.
11 | #
12 | # config.site_title_link = "/"
13 |
14 | # Set an optional image to be displayed for the header
15 | # instead of a string (overrides :site_title)
16 | #
17 | # Note: Aim for an image that's 21px high so it fits in the header.
18 | #
19 | # config.site_title_image = "logo.png"
20 |
21 | # == Default Namespace
22 | #
23 | # Set the default namespace each administration resource
24 | # will be added to.
25 | #
26 | # eg:
27 | # config.default_namespace = :hello_world
28 | #
29 | # This will create resources in the HelloWorld module and
30 | # will namespace routes to /hello_world/*
31 | #
32 | # To set no namespace by default, use:
33 | # config.default_namespace = false
34 | #
35 | # Default:
36 | # config.default_namespace = :admin
37 | #
38 | # You can customize the settings for each namespace by using
39 | # a namespace block. For example, to change the site title
40 | # within a namespace:
41 | #
42 | # config.namespace :admin do |admin|
43 | # admin.site_title = "Custom Admin Title"
44 | # end
45 | #
46 | # This will ONLY change the title for the admin section. Other
47 | # namespaces will continue to use the main "site_title" configuration.
48 |
49 | # == User Authentication
50 | #
51 | # Active Admin will automatically call an authentication
52 | # method in a before filter of all controller actions to
53 | # ensure that there is a currently logged in admin user.
54 | #
55 | # This setting changes the method which Active Admin calls
56 | # within the application controller.
57 | config.authentication_method = :authenticate_admin_user!
58 |
59 | # == User Authorization
60 | #
61 | # Active Admin will automatically call an authorization
62 | # method in a before filter of all controller actions to
63 | # ensure that there is a user with proper rights. You can use
64 | # CanCanAdapter or make your own. Please refer to documentation.
65 | # config.authorization_adapter = ActiveAdmin::CanCanAdapter
66 |
67 | # In case you prefer Pundit over other solutions you can here pass
68 | # the name of default policy class. This policy will be used in every
69 | # case when Pundit is unable to find suitable policy.
70 | # config.pundit_default_policy = "MyDefaultPunditPolicy"
71 |
72 | # You can customize your CanCan Ability class name here.
73 | # config.cancan_ability_class = "Ability"
74 |
75 | # You can specify a method to be called on unauthorized access.
76 | # This is necessary in order to prevent a redirect loop which happens
77 | # because, by default, user gets redirected to Dashboard. If user
78 | # doesn't have access to Dashboard, he'll end up in a redirect loop.
79 | # Method provided here should be defined in application_controller.rb.
80 | # config.on_unauthorized_access = :access_denied
81 |
82 | # == Current User
83 | #
84 | # Active Admin will associate actions with the current
85 | # user performing them.
86 | #
87 | # This setting changes the method which Active Admin calls
88 | # (within the application controller) to return the currently logged in user.
89 | config.current_user_method = :current_admin_user
90 |
91 | # == Logging Out
92 | #
93 | # Active Admin displays a logout link on each screen. These
94 | # settings configure the location and method used for the link.
95 | #
96 | # This setting changes the path where the link points to. If it's
97 | # a string, the strings is used as the path. If it's a Symbol, we
98 | # will call the method to return the path.
99 | #
100 | # Default:
101 | config.logout_link_path = :destroy_admin_user_session_path
102 |
103 | # This setting changes the http method used when rendering the
104 | # link. For example :get, :delete, :put, etc..
105 | #
106 | # Default:
107 | # config.logout_link_method = :get
108 |
109 | # == Root
110 | #
111 | # Set the action to call for the root path. You can set different
112 | # roots for each namespace.
113 | #
114 | # Default:
115 | # config.root_to = 'dashboard#index'
116 |
117 | # == Admin Comments
118 | #
119 | # This allows your users to comment on any resource registered with Active Admin.
120 | #
121 | # You can completely disable comments:
122 | # config.comments = false
123 | #
124 | # You can disable the menu item for the comments index page:
125 | # config.show_comments_in_menu = false
126 | #
127 | # You can change the name under which comments are registered:
128 | # config.comments_registration_name = 'AdminComment'
129 | #
130 | # You can change the order for the comments and you can change the column
131 | # to be used for ordering
132 | # config.comments_order = 'created_at ASC'
133 |
134 | # == Batch Actions
135 | #
136 | # Enable and disable Batch Actions
137 | #
138 | config.batch_actions = true
139 |
140 | # == Controller Filters
141 | #
142 | # You can add before, after and around filters to all of your
143 | # Active Admin resources and pages from here.
144 | #
145 | # config.before_filter :do_something_awesome
146 |
147 | # == Localize Date/Time Format
148 | #
149 | # Set the localize format to display dates and times.
150 | # To understand how to localize your app with I18n, read more at
151 | # https://github.com/svenfuchs/i18n/blob/master/lib%2Fi18n%2Fbackend%2Fbase.rb#L52
152 | #
153 | config.localize_format = :long
154 |
155 | # == Setting a Favicon
156 | #
157 | # config.favicon = 'favicon.ico'
158 |
159 | # == Meta Tags
160 | #
161 | # Add additional meta tags to the head element of active admin pages.
162 | #
163 | # Add tags to all pages logged in users see:
164 | # config.meta_tags = { author: 'My Company' }
165 |
166 | # By default, sign up/sign in/recover password pages are excluded
167 | # from showing up in search engine results by adding a robots meta
168 | # tag. You can reset the hash of meta tags included in logged out
169 | # pages:
170 | # config.meta_tags_for_logged_out_pages = {}
171 |
172 | # == Removing Breadcrumbs
173 | #
174 | # Breadcrumbs are enabled by default. You can customize them for individual
175 | # resources or you can disable them globally from here.
176 | #
177 | # config.breadcrumb = false
178 |
179 | # == Register Stylesheets & Javascripts
180 | #
181 | # We recommend using the built in Active Admin layout and loading
182 | # up your own stylesheets / javascripts to customize the look
183 | # and feel.
184 | #
185 | # To load a stylesheet:
186 | # config.register_stylesheet 'my_stylesheet.css'
187 | #
188 | # You can provide an options hash for more control, which is passed along to stylesheet_link_tag():
189 | # config.register_stylesheet 'my_print_stylesheet.css', media: :print
190 | #
191 | # To load a javascript file:
192 | # config.register_javascript 'my_javascript.js'
193 |
194 | # == CSV options
195 | #
196 | # Set the CSV builder separator
197 | # config.csv_options = { col_sep: ';' }
198 | #
199 | # Force the use of quotes
200 | # config.csv_options = { force_quotes: true }
201 |
202 | # == Menu System
203 | #
204 | # You can add a navigation menu to be used in your application, or configure a provided menu
205 | #
206 | # To change the default utility navigation to show a link to your website & a logout btn
207 | #
208 | # config.namespace :admin do |admin|
209 | # admin.build_menu :utility_navigation do |menu|
210 | # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
211 | # admin.add_logout_button_to_menu menu
212 | # end
213 | # end
214 | #
215 | # If you wanted to add a static menu item to the default menu provided:
216 | #
217 | # config.namespace :admin do |admin|
218 | # admin.build_menu :default do |menu|
219 | # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
220 | # end
221 | # end
222 |
223 | # == Download Links
224 | #
225 | # You can disable download links on resource listing pages,
226 | # or customize the formats shown per namespace/globally
227 | #
228 | # To disable/customize for the :admin namespace:
229 | #
230 | # config.namespace :admin do |admin|
231 | #
232 | # # Disable the links entirely
233 | # admin.download_links = false
234 | #
235 | # # Only show XML & PDF options
236 | # admin.download_links = [:xml, :pdf]
237 | #
238 | # # Enable/disable the links based on block
239 | # # (for example, with cancan)
240 | # admin.download_links = proc { can?(:view_download_links) }
241 | #
242 | # end
243 |
244 | # == Pagination
245 | #
246 | # Pagination is enabled by default for all resources.
247 | # You can control the default per page count for all resources here.
248 | #
249 | # config.default_per_page = 30
250 | #
251 | # You can control the max per page count too.
252 | #
253 | # config.max_per_page = 10_000
254 |
255 | # == Filters
256 | #
257 | # By default the index screen includes a "Filters" sidebar on the right
258 | # hand side with a filter for each attribute of the registered model.
259 | # You can enable or disable them for all resources here.
260 | #
261 | # config.filters = true
262 | #
263 | # By default the filters include associations in a select, which means
264 | # that every record will be loaded for each association.
265 | # You can enabled or disable the inclusion
266 | # of those filters by default here.
267 | #
268 | # config.include_default_association_filters = true
269 | end
270 |
--------------------------------------------------------------------------------
/config/initializers/application_controller_renderer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # ActiveSupport::Reloader.to_prepare do
4 | # ApplicationController.renderer.defaults.merge!(
5 | # http_host: 'example.org',
6 | # https: false
7 | # )
8 | # end
9 |
--------------------------------------------------------------------------------
/config/initializers/assets.rb:
--------------------------------------------------------------------------------
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 |
9 | # Precompile additional assets.
10 | # application.js, application.css, and all non-JS/CSS in the app/assets
11 | # folder are already added.
12 | # Rails.application.config.assets.precompile += %w( admin.js admin.css )
13 |
--------------------------------------------------------------------------------
/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
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| /my_noisy_library/.match?(line) }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
7 | # by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'".
8 | Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]
9 |
--------------------------------------------------------------------------------
/config/initializers/content_security_policy.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Define an application-wide content security policy.
4 | # See the Securing Rails Applications Guide for more information:
5 | # https://guides.rubyonrails.org/security.html#content-security-policy-header
6 |
7 | # Rails.application.configure do
8 | # config.content_security_policy do |policy|
9 | # policy.default_src :self, :https
10 | # policy.font_src :self, :https, :data
11 | # policy.img_src :self, :https, :data
12 | # policy.object_src :none
13 | # policy.script_src :self, :https
14 | # policy.style_src :self, :https
15 | # # Specify URI for violation reports
16 | # # policy.report_uri "/csp-violation-report-endpoint"
17 | # end
18 | #
19 | # # Generate session nonces for permitted importmap and inline scripts
20 | # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21 | # config.content_security_policy_nonce_directives = %w(script-src)
22 | #
23 | # # Report violations without enforcing the policy.
24 | # # config.content_security_policy_report_only = true
25 | # end
26 |
--------------------------------------------------------------------------------
/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Specify a serializer for the signed and encrypted cookie jars.
4 | # Valid options are :json, :marshal, and :hybrid.
5 | Rails.application.config.action_dispatch.cookies_serializer = :hybrid
6 |
--------------------------------------------------------------------------------
/config/initializers/devise.rb:
--------------------------------------------------------------------------------
1 | # Use this hook to configure devise mailer, warden hooks and so forth.
2 | # Many of these configuration options can be set straight in your model.
3 | Devise.setup do |config|
4 | # The secret key used by Devise. Devise uses this key to generate
5 | # random tokens. Changing this key will render invalid all existing
6 | # confirmation, reset password and unlock tokens in the database.
7 | # Devise will use the `secret_key_base` on Rails 4+ applications as its `secret_key`
8 | # by default. You can change it below and use your own secret key.
9 | # config.secret_key = 'fa3a14047470b8e1f5a79494f429318b03022913143d1cc191fa149bdb4a8330f50d46e1b6ea2f5275fb319318babe36af4025c213d6313bf40375be6b2fa208'
10 |
11 | # ==> Mailer Configuration
12 | # Configure the e-mail address which will be shown in Devise::Mailer,
13 | # note that it will be overwritten if you use your own mailer class
14 | # with default "from" parameter.
15 | config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
16 |
17 | # Configure the class responsible to send e-mails.
18 | # config.mailer = 'Devise::Mailer'
19 |
20 | # ==> ORM configuration
21 | # Load and configure the ORM. Supports :active_record (default) and
22 | # :mongoid (bson_ext recommended) by default. Other ORMs may be
23 | # available as additional gems.
24 | require 'devise/orm/active_record'
25 |
26 | # ==> Configuration for any authentication mechanism
27 | # Configure which keys are used when authenticating a user. The default is
28 | # just :email. You can configure it to use [:username, :subdomain], so for
29 | # authenticating a user, both parameters are required. Remember that those
30 | # parameters are used only when authenticating and not when retrieving from
31 | # session. If you need permissions, you should implement that in a before filter.
32 | # You can also supply a hash where the value is a boolean determining whether
33 | # or not authentication should be aborted when the value is not present.
34 | # config.authentication_keys = [:email]
35 |
36 | # Configure parameters from the request object used for authentication. Each entry
37 | # given should be a request method and it will automatically be passed to the
38 | # find_for_authentication method and considered in your model lookup. For instance,
39 | # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
40 | # The same considerations mentioned for authentication_keys also apply to request_keys.
41 | # config.request_keys = []
42 |
43 | # Configure which authentication keys should be case-insensitive.
44 | # These keys will be downcased upon creating or modifying a user and when used
45 | # to authenticate or find a user. Default is :email.
46 | config.case_insensitive_keys = [:email]
47 |
48 | # Configure which authentication keys should have whitespace stripped.
49 | # These keys will have whitespace before and after removed upon creating or
50 | # modifying a user and when used to authenticate or find a user. Default is :email.
51 | config.strip_whitespace_keys = [:email]
52 |
53 | # Tell if authentication through request.params is enabled. True by default.
54 | # It can be set to an array that will enable params authentication only for the
55 | # given strategies, for example, `config.params_authenticatable = [:database]` will
56 | # enable it only for database (email + password) authentication.
57 | # config.params_authenticatable = true
58 |
59 | # Tell if authentication through HTTP Auth is enabled. False by default.
60 | # It can be set to an array that will enable http authentication only for the
61 | # given strategies, for example, `config.http_authenticatable = [:database]` will
62 | # enable it only for database authentication. The supported strategies are:
63 | # :database = Support basic authentication with authentication key + password
64 | # config.http_authenticatable = false
65 |
66 | # If 401 status code should be returned for AJAX requests. True by default.
67 | # config.http_authenticatable_on_xhr = true
68 |
69 | # The realm used in Http Basic Authentication. 'Application' by default.
70 | # config.http_authentication_realm = 'Application'
71 |
72 | # It will change confirmation, password recovery and other workflows
73 | # to behave the same regardless if the e-mail provided was right or wrong.
74 | # Does not affect registerable.
75 | # config.paranoid = true
76 |
77 | # By default Devise will store the user in session. You can skip storage for
78 | # particular strategies by setting this option.
79 | # Notice that if you are skipping storage for all authentication paths, you
80 | # may want to disable generating routes to Devise's sessions controller by
81 | # passing skip: :sessions to `devise_for` in your config/routes.rb
82 | config.skip_session_storage = [:http_auth]
83 |
84 | # By default, Devise cleans up the CSRF token on authentication to
85 | # avoid CSRF token fixation attacks. This means that, when using AJAX
86 | # requests for sign in and sign up, you need to get a new CSRF token
87 | # from the server. You can disable this option at your own risk.
88 | # config.clean_up_csrf_token_on_authentication = true
89 |
90 | # ==> Configuration for :database_authenticatable
91 | # For bcrypt, this is the cost for hashing the password and defaults to 10. If
92 | # using other encryptors, it sets how many times you want the password re-encrypted.
93 | #
94 | # Limiting the stretches to just one in testing will increase the performance of
95 | # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
96 | # a value less than 10 in other environments. Note that, for bcrypt (the default
97 | # encryptor), the cost increases exponentially with the number of stretches (e.g.
98 | # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
99 | config.stretches = Rails.env.test? ? 1 : 10
100 |
101 | # Setup a pepper to generate the encrypted password.
102 | # config.pepper = '7b7762a27d10ee731f977c945f475bf1391c3c8c9c9e5ea383634c8fa18df9bf93e01fd8f20eefca18948361471ed1c4d4fcf52080609842d606ae350bb12692'
103 |
104 | # ==> Configuration for :confirmable
105 | # A period that the user is allowed to access the website even without
106 | # confirming their account. For instance, if set to 2.days, the user will be
107 | # able to access the website for two days without confirming their account,
108 | # access will be blocked just in the third day. Default is 0.days, meaning
109 | # the user cannot access the website without confirming their account.
110 | # config.allow_unconfirmed_access_for = 2.days
111 |
112 | # A period that the user is allowed to confirm their account before their
113 | # token becomes invalid. For example, if set to 3.days, the user can confirm
114 | # their account within 3 days after the mail was sent, but on the fourth day
115 | # their account can't be confirmed with the token any more.
116 | # Default is nil, meaning there is no restriction on how long a user can take
117 | # before confirming their account.
118 | # config.confirm_within = 3.days
119 |
120 | # If true, requires any email changes to be confirmed (exactly the same way as
121 | # initial account confirmation) to be applied. Requires additional unconfirmed_email
122 | # db field (see migrations). Until confirmed, new email is stored in
123 | # unconfirmed_email column, and copied to email column on successful confirmation.
124 | config.reconfirmable = true
125 |
126 | # Defines which key will be used when confirming an account
127 | # config.confirmation_keys = [:email]
128 |
129 | # ==> Configuration for :rememberable
130 | # The time the user will be remembered without asking for credentials again.
131 | # config.remember_for = 2.weeks
132 |
133 | # Invalidates all the remember me tokens when the user signs out.
134 | config.expire_all_remember_me_on_sign_out = true
135 |
136 | # If true, extends the user's remember period when remembered via cookie.
137 | # config.extend_remember_period = false
138 |
139 | # Options to be passed to the created cookie. For instance, you can set
140 | # secure: true in order to force SSL only cookies.
141 | # config.rememberable_options = {}
142 |
143 | # ==> Configuration for :validatable
144 | # Range for password length.
145 | config.password_length = 8..72
146 |
147 | # Email regex used to validate email formats. It simply asserts that
148 | # one (and only one) @ exists in the given string. This is mainly
149 | # to give user feedback and not to assert the e-mail validity.
150 | # config.email_regexp = /\A[^@]+@[^@]+\z/
151 |
152 | # ==> Configuration for :timeoutable
153 | # The time you want to timeout the user session without activity. After this
154 | # time the user will be asked for credentials again. Default is 30 minutes.
155 | # config.timeout_in = 30.minutes
156 |
157 | # ==> Configuration for :lockable
158 | # Defines which strategy will be used to lock an account.
159 | # :failed_attempts = Locks an account after a number of failed attempts to sign in.
160 | # :none = No lock strategy. You should handle locking by yourself.
161 | # config.lock_strategy = :failed_attempts
162 |
163 | # Defines which key will be used when locking and unlocking an account
164 | # config.unlock_keys = [:email]
165 |
166 | # Defines which strategy will be used to unlock an account.
167 | # :email = Sends an unlock link to the user email
168 | # :time = Re-enables login after a certain amount of time (see :unlock_in below)
169 | # :both = Enables both strategies
170 | # :none = No unlock strategy. You should handle unlocking by yourself.
171 | # config.unlock_strategy = :both
172 |
173 | # Number of authentication tries before locking an account if lock_strategy
174 | # is failed attempts.
175 | # config.maximum_attempts = 20
176 |
177 | # Time interval to unlock the account if :time is enabled as unlock_strategy.
178 | # config.unlock_in = 1.hour
179 |
180 | # Warn on the last attempt before the account is locked.
181 | # config.last_attempt_warning = true
182 |
183 | # ==> Configuration for :recoverable
184 | #
185 | # Defines which key will be used when recovering the password for an account
186 | # config.reset_password_keys = [:email]
187 |
188 | # Time interval you can reset your password with a reset password key.
189 | # Don't put a too small interval or your users won't have the time to
190 | # change their passwords.
191 | config.reset_password_within = 6.hours
192 |
193 | # When set to false, does not sign a user in automatically after their password is
194 | # reset. Defaults to true, so a user is signed in automatically after a reset.
195 | # config.sign_in_after_reset_password = true
196 |
197 | # ==> Configuration for :encryptable
198 | # Allow you to use another encryption algorithm besides bcrypt (default). You can use
199 | # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
200 | # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
201 | # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
202 | # REST_AUTH_SITE_KEY to pepper).
203 | #
204 | # Require the `devise-encryptable` gem when using anything other than bcrypt
205 | # config.encryptor = :sha512
206 |
207 | # ==> Scopes configuration
208 | # Turn scoped views on. Before rendering "sessions/new", it will first check for
209 | # "users/sessions/new". It's turned off by default because it's slower if you
210 | # are using only default views.
211 | # config.scoped_views = false
212 |
213 | # Configure the default scope given to Warden. By default it's the first
214 | # devise role declared in your routes (usually :user).
215 | # config.default_scope = :user
216 |
217 | # Set this configuration to false if you want /users/sign_out to sign out
218 | # only the current scope. By default, Devise signs out all scopes.
219 | # config.sign_out_all_scopes = true
220 |
221 | # ==> Navigation configuration
222 | # Lists the formats that should be treated as navigational. Formats like
223 | # :html, should redirect to the sign in page when the user does not have
224 | # access, but formats like :xml or :json, should return 401.
225 | #
226 | # If you have any extra navigational formats, like :iphone or :mobile, you
227 | # should add them to the navigational formats lists.
228 | #
229 | # The "*/*" below is required to match Internet Explorer requests.
230 | # config.navigational_formats = ['*/*', :html]
231 |
232 | # The default HTTP method used to sign out a resource. Default is :delete.
233 | config.sign_out_via = :delete
234 |
235 | # ==> OmniAuth
236 | # Add a new OmniAuth provider. Check the wiki for more information on setting
237 | # up on your models and hooks.
238 | config.omniauth :github, ENV['GITHUB_APP_ID'], ENV['GITHUB_APP_SECRET'], scope: 'user'
239 |
240 | # ==> Warden configuration
241 | # If you want to use other strategies, that are not supported by Devise, or
242 | # change the failure app, you can configure them inside the config.warden block.
243 | #
244 | # config.warden do |manager|
245 | # manager.intercept_401 = false
246 | # manager.default_strategies(scope: :user).unshift :some_external_strategy
247 | # end
248 |
249 | # ==> Mountable engine configurations
250 | # When using Devise inside an engine, let's call it `MyEngine`, and this engine
251 | # is mountable, there are some extra configurations to be taken into account.
252 | # The following options are available, assuming the engine is mounted as:
253 | #
254 | # mount MyEngine, at: '/my_engine'
255 | #
256 | # The router that invoked `devise_for`, in the example above, would be:
257 | # config.router_name = :my_engine
258 | #
259 | # When using OmniAuth, Devise cannot automatically set OmniAuth path,
260 | # so you need to do it manually. For the users scope, it would be:
261 | # config.omniauth_path_prefix = '/my_engine/users/auth'
262 | end
263 |
--------------------------------------------------------------------------------
/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure parameters to be filtered from the log file. Use this to limit dissemination of
4 | # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
5 | # notations and behaviors.
6 | Rails.application.config.filter_parameters += [
7 | :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
8 | ]
9 |
--------------------------------------------------------------------------------
/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
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
17 |
--------------------------------------------------------------------------------
/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 |
--------------------------------------------------------------------------------
/config/initializers/new_framework_defaults_5_1.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 | #
3 | # This file contains migration options to ease your Rails 5.1 upgrade.
4 | #
5 | # Once upgraded flip defaults one by one to migrate to the new default.
6 | #
7 | # Read the Guide for Upgrading Ruby on Rails for more info on each option.
8 |
9 | # Make `form_with` generate non-remote forms.
10 | Rails.application.config.action_view.form_with_generates_remote_forms = false
11 |
12 | # Unknown asset fallback will return the path passed in when the given
13 | # asset is not present in the asset pipeline.
14 | # Rails.application.config.assets.unknown_asset_fallback = false
15 |
--------------------------------------------------------------------------------
/config/initializers/new_framework_defaults_6_1.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 | #
3 | # This file contains migration options to ease your Rails 6.1 upgrade.
4 | #
5 | # Once upgraded flip defaults one by one to migrate to the new default.
6 | #
7 | # Read the Guide for Upgrading Ruby on Rails for more info on each option.
8 |
9 | # Support for inversing belongs_to -> has_many Active Record associations.
10 | # Rails.application.config.active_record.has_many_inversing = true
11 |
12 | # Track Active Storage variants in the database.
13 | # Rails.application.config.active_storage.track_variants = true
14 |
15 | # Apply random variation to the delay when retrying failed jobs.
16 | # Rails.application.config.active_job.retry_jitter = 0.15
17 |
18 | # Stop executing `after_enqueue`/`after_perform` callbacks if
19 | # `before_enqueue`/`before_perform` respectively halts with `throw :abort`.
20 | # Rails.application.config.active_job.skip_after_callbacks_if_terminated = true
21 |
22 | # Specify cookies SameSite protection level: either :none, :lax, or :strict.
23 | #
24 | # This change is not backwards compatible with earlier Rails versions.
25 | # It's best enabled when your entire app is migrated and stable on 6.1.
26 | # Rails.application.config.action_dispatch.cookies_same_site_protection = :lax
27 |
28 | # Generate CSRF tokens that are encoded in URL-safe Base64.
29 | #
30 | # This change is not backwards compatible with earlier Rails versions.
31 | # It's best enabled when your entire app is migrated and stable on 6.1.
32 | # Rails.application.config.action_controller.urlsafe_csrf_tokens = true
33 |
34 | # Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an
35 | # UTC offset or a UTC time.
36 | # ActiveSupport.utc_to_local_returns_utc_offset_times = true
37 |
38 | # Change the default HTTP status code to `308` when redirecting non-GET/HEAD
39 | # requests to HTTPS in `ActionDispatch::SSL` middleware.
40 | # Rails.application.config.action_dispatch.ssl_default_redirect_status = 308
41 |
42 | # Use new connection handling API. For most applications this won't have any
43 | # effect. For applications using multiple databases, this new API provides
44 | # support for granular connection swapping.
45 | # Rails.application.config.active_record.legacy_connection_handling = false
46 |
47 | # Make `form_with` generate non-remote forms by default.
48 | # Rails.application.config.action_view.form_with_generates_remote_forms = false
49 |
50 | # Set the default queue name for the analysis job to the queue adapter default.
51 | # Rails.application.config.active_storage.queues.analysis = nil
52 |
53 | # Set the default queue name for the purge job to the queue adapter default.
54 | # Rails.application.config.active_storage.queues.purge = nil
55 |
56 | # Set the default queue name for the incineration job to the queue adapter default.
57 | # Rails.application.config.action_mailbox.queues.incineration = nil
58 |
59 | # Set the default queue name for the routing job to the queue adapter default.
60 | # Rails.application.config.action_mailbox.queues.routing = nil
61 |
62 | # Set the default queue name for the mail deliver job to the queue adapter default.
63 | # Rails.application.config.action_mailer.deliver_later_queue_name = nil
64 |
65 | # Generate a `Link` header that gives a hint to modern browsers about
66 | # preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`.
67 | # Rails.application.config.action_view.preload_links_header = true
68 |
--------------------------------------------------------------------------------
/config/initializers/new_framework_defaults_7_0.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 | #
3 | # This file eases your Rails 7.0 framework defaults upgrade.
4 | #
5 | # Uncomment each configuration one by one to switch to the new default.
6 | # Once your application is ready to run with all new defaults, you can remove
7 | # this file and set the `config.load_defaults` to `7.0`.
8 | #
9 | # Read the Guide for Upgrading Ruby on Rails for more info on each option.
10 | # https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
11 |
12 | # `button_to` view helper will render `