I hereby claim:
- I am dobs on github.
- I am danielobrien (https://keybase.io/danielobrien) on keybase.
- I have a public key ASDZtcYs89ewU11WZKP4_3fa5N3BApwOlJj1k_nfYyTYLgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
module UniquelyIdentified | |
extend ActiveSupport::Concern | |
included do | |
before_create :assign_unique_id | |
end | |
protected | |
def assign_unique_id |
# This Rails template aims to bootstrap features that are standard across most | |
# of my personal projects. | |
# | |
# TODO: Better initialization. | |
# TODO: More thorough configuration. | |
# TODO: More intelligent gem grouping, especially with respect to assets. | |
require 'open-uri' | |
add_source 'https://rubygems.org' |
inputs = %w[ | |
CollectionSelectInput | |
DateTimeInput | |
FileInput | |
GroupedCollectionSelectInput | |
NumericInput | |
PasswordInput | |
RangeInput | |
StringInput | |
TextInput |
rails_env = ENV['RAILS_ENV'] || 'production' | |
rails_root = `pwd`.gsub("\n", "") | |
rails_user = ENV['RAILS_USER'] || 'rails' | |
rails_group = ENV['RAILS_GROUP'] || 'group' | |
unless rails_env == 'production' | |
listen '127.0.0.1:8080' | |
else | |
listen "#{rails_root}/tmp/sockets/unicorn.sock", backlog: 64 | |
end |
set :application, '<%= application %>' | |
set :repo_url, '<%= repo_url %>' | |
set :user, '<%= user %>' | |
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp } | |
set :deploy_to, "<%= deploy_to %>" | |
set :scm, :git | |
set :format, :pretty |
# Simple cookie and modhash generation script. | |
# | |
# Takes a username and password on the command line and generates a | |
# corresponding long-lived password. | |
require 'io/console' | |
require 'multi_json' | |
require 'net/http' | |
printf 'Username: ' |