-
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
17 changed files
with
163 additions
and
77 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
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 |
---|---|---|
@@ -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,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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) | ||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) | ||
Check failure on line 1 in config/boot.rb GitHub Actions / lint
|
||
|
||
require 'bundler/setup' # Set up gems listed in the Gemfile. | ||
require 'bootsnap/setup' # Speed up boot time by caching expensive operations. | ||
require "bundler/setup" # Set up gems listed in the Gemfile. | ||
require "bootsnap/setup" # Speed up boot time by caching expensive operations. | ||
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,5 +1,5 @@ | ||
# Load the Rails application. | ||
require_relative 'application' | ||
require_relative "application" | ||
|
||
# Initialize the Rails application. | ||
Rails.application.initialize! |
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
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,43 +1,33 @@ | ||
# Puma can serve each request in a thread from an internal thread pool. | ||
# The `threads` method setting takes two numbers: a minimum and maximum. | ||
# Any libraries that use thread pools should be configured to match | ||
# the maximum value specified for Puma. Default is set to 5 threads for minimum | ||
# and maximum; this matches the default thread size of Active Record. | ||
# | ||
max_threads_count = ENV.fetch('RAILS_MAX_THREADS', 5) | ||
min_threads_count = ENV.fetch('RAILS_MIN_THREADS') { max_threads_count } | ||
threads min_threads_count, max_threads_count | ||
# This configuration file will be evaluated by Puma. The top-level methods that | ||
# are invoked here are part of Puma's configuration DSL. For more information | ||
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. | ||
|
||
# Specifies the `worker_timeout` threshold that Puma will use to wait before | ||
# terminating a worker in development environments. | ||
# Puma starts a configurable number of processes (workers) and each process | ||
# serves each request in a thread from an internal thread pool. | ||
# | ||
worker_timeout 3600 if ENV.fetch('RAILS_ENV', 'development') == 'development' | ||
|
||
# Specifies the `port` that Puma will listen on to receive requests; default is 3000. | ||
# The ideal number of threads per worker depends both on how much time the | ||
# application spends waiting for IO operations and on how much you wish to | ||
# to prioritize throughput over latency. | ||
# | ||
port ENV.fetch('PORT', 3000) | ||
|
||
# Specifies the `environment` that Puma will run in. | ||
# As a rule of thumb, increasing the number of threads will increase how much | ||
# traffic a given process can handle (throughput), but due to CRuby's | ||
# Global VM Lock (GVL) it has diminishing returns and will degrade the | ||
# response time (latency) of the application. | ||
# | ||
environment ENV.fetch('RAILS_ENV') { 'development' } | ||
|
||
# Specifies the `pidfile` that Puma will use. | ||
pidfile ENV.fetch('PIDFILE') { 'tmp/pids/server.pid' } | ||
|
||
# Specifies the number of `workers` to boot in clustered mode. | ||
# Workers are forked web server processes. If using threads and workers together | ||
# the concurrency of the application would be max `threads` * `workers`. | ||
# Workers do not work on JRuby or Windows (both of which do not support | ||
# processes). | ||
# The default is set to 3 threads as it's deemed a decent compromise between | ||
# throughput and latency for the average Rails application. | ||
# | ||
# workers ENV.fetch("WEB_CONCURRENCY") { 2 } | ||
# Any libraries that use a connection pool or another resource pool should | ||
# be configured to provide at least as many connections as the number of | ||
# threads. This includes Active Record's `pool` parameter in `database.yml`. | ||
threads_count = ENV.fetch("RAILS_MAX_THREADS", 3) | ||
threads threads_count, threads_count | ||
|
||
# Use the `preload_app!` method when specifying a `workers` number. | ||
# This directive tells Puma to first boot the application and load code | ||
# before forking the application. This takes advantage of Copy On Write | ||
# process behavior so workers use less memory. | ||
# | ||
# preload_app! | ||
# Specifies the `port` that Puma will listen on to receive requests; default is 3000. | ||
port ENV.fetch("PORT", 3000) | ||
|
||
# Allow puma to be restarted by `bin/rails restart` command. | ||
plugin :tmp_restart | ||
|
||
# Only use a pidfile when requested | ||
pidfile ENV["PIDFILE"] if ENV["PIDFILE"] |
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,66 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Your browser is not supported (406)</title> | ||
<meta name="viewport" content="width=device-width,initial-scale=1"> | ||
<style> | ||
.rails-default-error-page { | ||
background-color: #EFEFEF; | ||
color: #2E2F30; | ||
text-align: center; | ||
font-family: arial, sans-serif; | ||
margin: 0; | ||
} | ||
|
||
.rails-default-error-page div.dialog { | ||
width: 95%; | ||
max-width: 33em; | ||
margin: 4em auto 0; | ||
} | ||
|
||
.rails-default-error-page div.dialog > div { | ||
border: 1px solid #CCC; | ||
border-right-color: #999; | ||
border-left-color: #999; | ||
border-bottom-color: #BBB; | ||
border-top: #B00100 solid 4px; | ||
border-top-left-radius: 9px; | ||
border-top-right-radius: 9px; | ||
background-color: white; | ||
padding: 7px 12% 0; | ||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); | ||
} | ||
|
||
.rails-default-error-page h1 { | ||
font-size: 100%; | ||
color: #730E15; | ||
line-height: 1.5em; | ||
} | ||
|
||
.rails-default-error-page div.dialog > p { | ||
margin: 0 0 1em; | ||
padding: 1em; | ||
background-color: #F7F7F7; | ||
border: 1px solid #CCC; | ||
border-right-color: #999; | ||
border-left-color: #999; | ||
border-bottom-color: #999; | ||
border-bottom-left-radius: 4px; | ||
border-bottom-right-radius: 4px; | ||
border-top-color: #DADADA; | ||
color: #666; | ||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); | ||
} | ||
</style> | ||
</head> | ||
|
||
<body class="rails-default-error-page"> | ||
<!-- This file lives in public/406-unsupported-browser.html --> | ||
<div class="dialog"> | ||
<div> | ||
<h1>Your browser is not supported.</h1> | ||
<p>Please upgrade your browser to continue.</p> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.