- All directions assume each app passes a
health_check
- All projects should be using their correct
ruby version
- All projects should run against
master
ordevelop
to test Panda dropdb [site]_dev
will fail ifdelayed_job
is running for that appdropdb [site]_dev
will fail ifpow
/rails
is running against that app
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
[core] | |
# Use custom `.gitignore` and `.gitattributes` | |
attributesfile = ~/.gitattributes | |
editor = /opt/homebrew/bin/code -w | |
excludesfile = ~/.gitignore | |
ignorecase = false | |
noAheadBehind = true | |
pager = delta | |
preloadIndex = 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
PROCESSING = { | |
cb: { | |
1 => { | |
cost: 1500.00 | |
}, | |
2 => { | |
cost: 2200.00 | |
}, | |
3 => { | |
cost: 2900.00 |
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
STORAGE = { | |
cb: { | |
1 => { | |
annual: 149.00, | |
prepaid_term: 2199.00, | |
prepaid_life: 3199.00 | |
}, | |
2 => { | |
annual: 298.00, | |
prepaid_term: 4398.00, |
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
# To validate the changes I made to database config I ran the following under Rails console | |
original = YAML.load(ERB.new(File.read("#{Rails.root}/config/database.yml")).result) | |
new_config = YAML.load(ERB.new(File.read("#{Rails.root}/config/database_new.yml")).result) | |
# require 'pp' | |
# pp original -> | |
{"local"=> | |
{"adapter"=>"mysql2", | |
"encoding"=>"utf8", | |
"database"=>"connect", |
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
AllCops: | |
RunRailsCops: true | |
# Commonly used screens these days easily fit more than 80 characters. | |
Metrics/LineLength: | |
Max: 120 | |
# Too short methods lead to extraction of single-use methods, which can make | |
# the code easier to read (by naming things), but can also clutter the class | |
Metrics/MethodLength: |
- Choose Amazon Linux AMI as it comes configured with a strong set of tools
- Create security group with access to TCP on ports 22, 80, 8080, and 52698
- Generate key-pair called
jenkins
-> download asjenkins.pem
- move
jenkins.pem
into ~/.ssh - run
chmod 400
onjenkins.pem
to set correct permissions
- move
- Launch Instance
- Locate public IP settings in AWS instance management console and copy to clipboard
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
#!/bin/bash | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://gist.github.com/seth-macpherson/04287d9b1cb7ca1a5caf/raw/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
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
MAPPING = { | |
"International Date Line West" => "Pacific/Midway", | |
"Midway Island" => "Pacific/Midway", | |
"Samoa" => "Pacific/Pago_Pago", | |
"Hawaii" => "Pacific/Honolulu", | |
"Alaska" => "America/Juneau", | |
"Pacific Time (US & Canada)" => "America/Los_Angeles", | |
"Tijuana" => "America/Tijuana", | |
"Mountain Time (US & Canada)" => "America/Denver", | |
"Arizona" => "America/Phoenix", |
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
namespace :grape do | |
desc "Condensed API Routes" | |
task :routes => :environment do | |
mapped_prefix = '' # where mounted in routes.rb | |
format = "%46s %3s %7s %50s %12s: %s" | |
API.routes.each do |grape_route| | |
info = grape_route.instance_variable_get :@options | |
puts format % [ | |
info[:description] ? info[:description][0..45] : '', | |
info[:version], |
NewerOlder