-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
533 additions
and
301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env ruby | ||
require "rubygems" | ||
require "bundler/setup" | ||
|
||
ARGV.unshift("--ensure-latest") | ||
|
||
load Gem.bin_path("brakeman", "brakeman") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env ruby | ||
exec "./bin/rails", "server", *ARGV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env ruby | ||
require "rubygems" | ||
require "bundler/setup" | ||
|
||
# explicit rubocop config increases performance slightly while avoiding config confusion. | ||
ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__)) | ||
|
||
load Gem.bin_path("rubocop", "rubocop") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,7 @@ | |
Rails.application.configure do | ||
# Settings specified here will take precedence over those in config/application.rb. | ||
|
||
# In the development environment your application's code is reloaded any time | ||
# it changes. This slows down response time but is perfect for development | ||
# since you don't have to restart the web server when you make code changes. | ||
# Make code changes take effect immediately without server restart. | ||
config.enable_reloading = true | ||
|
||
# Do not eager load code on boot. | ||
|
@@ -19,48 +17,44 @@ | |
# Enable server timing. | ||
config.server_timing = true | ||
|
||
# Enable/disable caching. By default caching is disabled. | ||
# Run rails dev:cache to toggle caching. | ||
# Enable/disable Action Controller caching. By default Action Controller caching is disabled. | ||
# Run rails dev:cache to toggle Action Controller caching. | ||
if Rails.root.join('tmp/caching-dev.txt').exist? | ||
config.action_controller.perform_caching = true | ||
config.action_controller.enable_fragment_cache_logging = true | ||
|
||
config.cache_store = :memory_store | ||
config.public_file_server.headers = { 'Cache-Control' => "public, max-age=#{2.days.to_i}" } | ||
config.public_file_server.headers = { 'cache-control' => "public, max-age=#{2.days.to_i}" } | ||
else | ||
config.action_controller.perform_caching = false | ||
|
||
config.cache_store = :null_store | ||
end | ||
|
||
# Change to :null_store to avoid any caching. | ||
config.cache_store = :memory_store | ||
|
||
# Store uploaded files on the local file system (see config/storage.yml for options). | ||
config.active_storage.service = :local | ||
|
||
# Don't care if the mailer can't send. | ||
config.action_mailer.raise_delivery_errors = false | ||
|
||
# Disable caching for Action Mailer templates even if Action Controller | ||
# caching is enabled. | ||
# Make template changes take effect immediately. | ||
config.action_mailer.perform_caching = false | ||
|
||
config.action_mailer.default_options = { from: '[email protected]' } | ||
# Set localhost to be used by links generated in mailer templates. | ||
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } | ||
config.action_mailer.default_options = { from: '[email protected]' } | ||
|
||
# Print deprecation notices to the Rails logger. | ||
config.active_support.deprecation = :log | ||
|
||
# Raise exceptions for disallowed deprecations. | ||
config.active_support.disallowed_deprecation = :raise | ||
|
||
# Tell Active Support which deprecation messages to disallow. | ||
config.active_support.disallowed_deprecation_warnings = [] | ||
|
||
# Raise an error on page load if there are pending migrations. | ||
config.active_record.migration_error = :page_load | ||
|
||
# Highlight code that triggered database queries in logs. | ||
config.active_record.verbose_query_logs = true | ||
|
||
# Append comments with runtime information tags to SQL queries in logs. | ||
config.active_record.query_log_tags_enabled = true | ||
|
||
# Highlight code that enqueued background job in logs. | ||
config.active_job.verbose_enqueue_logs = true | ||
|
||
|
@@ -77,7 +71,7 @@ | |
config.action_controller.raise_on_missing_callback_actions = true | ||
|
||
# Apply autocorrection by RuboCop to files generated by `bin/rails generate`. | ||
# config.generators.apply_rubocop_autocorrect_after_generate! | ||
config.generators.apply_rubocop_autocorrect_after_generate! | ||
|
||
# Set domain for inbound emails | ||
config.inbound_email_domain = ENV.fetch('RAILS_INBOUND_EMAIL_DOMAIN', 'example.com') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'active_support/core_ext/integer/time' | ||
|
||
# The test environment is used exclusively to run your application's | ||
# test suite. You never need to work with it otherwise. Remember that | ||
# your test database is "scratch space" for the test suite and is wiped | ||
|
@@ -19,12 +17,11 @@ | |
# loading is working properly before deploying your code. | ||
config.eager_load = ENV['CI'].present? | ||
|
||
# Configure public file server for tests with Cache-Control for performance. | ||
config.public_file_server.headers = { 'Cache-Control' => "public, max-age=#{1.hour.to_i}" } | ||
# Configure public file server for tests with cache-control for performance. | ||
config.public_file_server.headers = { 'cache-control' => 'public, max-age=3600' } | ||
|
||
# Show full error reports and disable caching. | ||
# Show full error reports. | ||
config.consider_all_requests_local = true | ||
config.action_controller.perform_caching = false | ||
config.cache_store = :null_store | ||
|
||
# Render exception templates for rescuable exceptions and raise for other exceptions. | ||
|
@@ -36,29 +33,18 @@ | |
# Store uploaded files on the local file system in a temporary directory. | ||
config.active_storage.service = :test | ||
|
||
# Disable caching for Action Mailer templates even if Action Controller | ||
# caching is enabled. | ||
config.action_mailer.perform_caching = false | ||
|
||
# Tell Action Mailer not to deliver emails to the real world. | ||
# The :test delivery method accumulates sent emails in the | ||
# ActionMailer::Base.deliveries array. | ||
config.action_mailer.delivery_method = :test | ||
|
||
# Unlike controllers, the mailer instance doesn't have any context about the | ||
# incoming request so you'll need to provide the :host parameter yourself. | ||
# Set host to be used by links generated in mailer templates. | ||
config.action_mailer.default_url_options = { host: 'www.example.com' } | ||
config.action_mailer.default_options = { from: '[email protected]' } | ||
|
||
# Print deprecation notices to the stderr. | ||
config.active_support.deprecation = :stderr | ||
|
||
# Raise exceptions for disallowed deprecations. | ||
config.active_support.disallowed_deprecation = :raise | ||
|
||
# Tell Active Support which deprecation messages to disallow. | ||
config.active_support.disallowed_deprecation_warnings = [] | ||
|
||
# Raises error for missing translations. | ||
# config.i18n.raise_on_missing_translations = true | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.