- Install pow: http://pow.cx/
- Install nginx:
brew install nginx
- download and run
powssl
- copy
powssl.conf
to/usr/local/etc/nginx/servers
- restart
nginx
- copy
org.nginx.pow.ssl.plist
to/Library/LaunchDaemons
(as root) - Run the following to get port 443 working
- If you are on Yosemite or later:
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
# converts URIs in vcr cassettes from uri-based basic auth | |
# to header-based basic auth to be compatible with webmock 2.0. | |
# it will create a basic auth header with an ERB tag | |
# to keep user and password be editable. | |
# | |
# Authorization: Basic <%= Base64.encode64("user:password").chomp %> | |
# | |
# may not work if using VCR's filter_sensitive_data. | |
# in that case use https://gist.github.com/ujh/594c99385b6cbe92e32b1bbfa8578a45 | |
# |
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
# PostgreSQL enums support (adapted from https://coderwall.com/p/azi3ka) | |
# Should be fixed in Rails >= 4.2 (https://github.com/rails/rails/pull/13244) | |
# put this code in an initializer file | |
raise "Remove this patch!" if Rails.version >= "4.2.0" | |
module ActiveRecord | |
module ConnectionAdapters | |
class PostgreSQLAdapter | |
module OID | |
class Enum < Type | |
def type_cast(value) |
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
class BaseDaemon | |
attr_reader :logger | |
def initialize | |
@stopping = false | |
@logger = ::Logger.new(STDOUT) | |
@ending_thread = Thread.new do | |
Thread.stop | |
logger.info "Received a signal in #{name}" |
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
gem 'rails' | |
# hack to make heroku cedar not install special groups | |
def hg(g) | |
(ENV['HOME'].gsub('/','') == 'app' ? 'test' : g) | |
end | |
group hg(:cucumber) do | |
gem 'cucumber-rails' | |
gem 'capybara' |
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
[global] | |
tds version = 8.0 | |
text size = 645120 |
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
<VirtualHost *:80> | |
ServerName pow | |
ServerAlias *.dev | |
ServerAlias *.xip.io | |
ProxyPass / http://localhost:20559/ | |
ProxyPassReverse / http://localhost:20559/ | |
ProxyPreserveHost On | |
</VirtualHost> |
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 | |
bundle check | |
if [[ $? = 1 ]] ; then | |
bundle install $@ | |
fi |
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
require 'rack' | |
require 'rack/lobster' | |
use Rack::ShowExceptions | |
use Rack::CommonLogger | |
map '/fails' do | |
run Rack::Lobster.new | |
end | |
map 'http://localhost:3000/works' do |