parent
adc8fbc42b
commit
72ffe7215d
23 changed files with 405 additions and 242 deletions
7
bin/brakeman
Executable file
7
bin/brakeman
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env ruby
|
||||
require "rubygems"
|
||||
require "bundler/setup"
|
||||
|
||||
ARGV.unshift("--ensure-latest")
|
||||
|
||||
load Gem.bin_path("brakeman", "brakeman")
|
|
@ -1,7 +1,12 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# Enable jemalloc for reduced memory usage and latency.
|
||||
if [ -z "${LD_PRELOAD+x}" ] && [ -f /usr/lib/*/libjemalloc.so.2 ]; then
|
||||
export LD_PRELOAD="$(echo /usr/lib/*/libjemalloc.so.2)"
|
||||
fi
|
||||
|
||||
# If running the rails server then create or migrate existing database
|
||||
if [ "${*}" == "./bin/rails server" ]; then
|
||||
if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then
|
||||
./bin/rails db:prepare
|
||||
fi
|
||||
|
||||
|
|
8
bin/rubocop
Executable file
8
bin/rubocop
Executable file
|
@ -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")
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env ruby
|
||||
require "fileutils"
|
||||
|
||||
# path to your application root.
|
||||
APP_ROOT = File.expand_path("..", __dir__)
|
||||
APP_NAME = "family_budget"
|
||||
|
||||
def system!(*args)
|
||||
system(*args, exception: true)
|
||||
|
@ -30,4 +30,8 @@ FileUtils.chdir APP_ROOT do
|
|||
|
||||
puts "\n== Restarting application server =="
|
||||
system! "bin/rails restart"
|
||||
|
||||
# puts "\n== Configuring puma-dev =="
|
||||
# system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}"
|
||||
# system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue