I love Foreman, but need some additional capabilities:
- upstart/init script with different options than foreman supports (dependencies)
- monit config files
- separate export templates per app-type
- separate start and stop commands for some app-types
#!/usr/bin/env ruby | |
DATA = <<-EOF | |
A, B, C | |
A, C, E | |
E, F, D | |
D, A, J | |
E, D, J | |
EOF |
asdf | |
asdf | |
asdf | |
asdf | |
asdfL |
# this Define just ensures that app and configuration | |
# directories have been created for the deploy user. | |
# | |
# production apps are always stored in "/home/<user>/a". | |
# nginx configuration for the app is stored in "/home/<user>/a/_conf" | |
# the configuration directory is referenced in nginx.conf | |
define ngusr($duser = $title) { | |
sysuser { $duser : } |
# The mail servers of many SMS gateways treat email as spam if the mails | |
# arrive too frequently. This has happened using the SMS-gateways managed | |
# by Verizon and Sprint. | |
# | |
# Maintains a queue of delivery addresses for a given carrier. | |
# Limits the sending frequency, to reduce the chance of being rejected as spam. | |
# | |
class CarrierQueue |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'spreadsheet' | |
book = Spreadsheet.open 'input.xls' | |
sheet = book.worksheet 0 | |
sheet[0,0] = "Changed Cell" | |
book.write 'output.xls' |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'spreadsheet' | |
book = Spreadsheet.open 'input.xls' | |
sheet = book.worksheet 0 | |
sheet[0,0] = "Changed Cell" | |
book.write 'output.xls' |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'faye' | |
abort "Usage: #{$0} <url> <channel> <nick>" if ARGV.length != 3 | |
$url, $channel, $nick = ARGV | |
$client = Faye::Client.new($url) |
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
def current_ability | |
@current_ability ||= Ability.new(current_member) | |
end | |
rescue_from CanCan::AccessDenied do |exception| | |
flash[:alert] = "Access Denied." | |
redirect_to root_url |
class SessionsController < ApplicationController | |
def new | |
if member = Member.find_by_password_digest(cookies[:digest]) | |
session[:member_id] = member.id | |
redirect_to (session[:ref] || root_path), :notice => "Welcome back #{member.first_name}" | |
end | |
end | |
def create |