This file contains hidden or 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
# Setup a new project | |
# rails project -m http://gist.github.com/105257 | |
# | |
# Or apply to an existing project | |
# rake rails:template LOCATION=http://gist.github.com/105257 | |
############## plugin commands ################# | |
plugin 'app_helpers', :git => '[email protected]:chip/app_helpers.git' | |
plugin 'ubistrano', :git => '[email protected]:chip/ubistrano.git', :to => 'config/ubistrano' | |
plugin 'haml', :git => "git://github.com/nex3/haml.git" |
This file contains hidden or 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 'rubygems' | |
require 'spork' | |
Spork.prefork do | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
# Requires supporting ruby files with custom matchers and macros, etc, | |
# in spec/support/ and its subdirectories. |
This file contains hidden or 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 'rubygems' | |
require 'hash' | |
require 'active_resource' | |
require 'basecamp' | |
require 'httparty' | |
require 'json' | |
class GithubIssues | |
include HTTParty | |
base_uri "https://api.github.com" |
This file contains hidden or 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
git log --pretty=oneline | head -1 | perl -pne 's/^(.{1,41}) (.*)$/$2/; s/\n//g' | pbcopy |
This file contains hidden or 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
Failures: | |
1) OrderNote resolving issues With an existing order Charge the customer 100% of the purchase price should charge the customer | |
Failure/Error: subject.resolves(params, creator) | |
NoMethodError: | |
undefined method `[]' for nil:NilClass | |
# ./app/models/order_transaction.rb:199:in `fee!' | |
# ./app/models/order_note.rb:167:in `charge' | |
# ./app/models/order_note.rb:88:in `resolves' | |
# ./spec/models/order_note_spec.rb:290 |
This file contains hidden or 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
source 'http://rubygems.org' | |
gem 'rack-test' | |
gem 'rails', '3.1.3' | |
# Gems used only for assets and not required | |
# in production environments by default. | |
group :assets do | |
gem 'sass-rails', " ~> 3.1.0" | |
gem 'coffee-rails', "~> 3.1.0" |
This file contains hidden or 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
# Gemfile | |
gem 'pry', :group => :development | |
# config/environments/development.rb | |
silence_warnings do | |
require 'pry' | |
IRB = Pry | |
end |
This file contains hidden or 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
AN AUTHORIZATION IS CHARGEABLE | |
============================== | |
* It's still valid, which means it's Authorization.state = 'authorized' | |
* It's not monitored (handled by the backend scripts. Is "monitored" a valid Authorization.state setting?) | |
* Is completely or partially shipped (at least 1 shipped item) | |
* Was created at least 2 Business days ago | |
How to test: | |
1. Buy a book on both Cybersource and PlugnPay |
This file contains hidden or 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
source :rubygems | |
gem 'shotgun' | |
gem 'sinatra' | |
gem 'yajl-ruby' |
This file contains hidden or 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
post '/deploy' do | |
json = request.body.read | |
data = Yajl::Parser.parse(json) | |
token = ENV['CAMPFIRE_TOKEN'] | |
account = ENV['CAMPFIRE_ACCOUNT'] | |
campfire = Tinder::Campfire.new account, :token => token, :ssl_verify => false | |
room = campfire.find_room_by_name("Rental Dev") | |
commit = data['commit'] |
OlderNewer