Skip to content

Instantly share code, notes, and snippets.

@ywen
ywen / .vimrc
Created January 20, 2012 01:23
let g:gist_clip_command = 'pbcopy'
let g:gist_detect_filetype = 1
let g:gist_open_browser_after_post = 1
if ENV["SIMPLECOV"]
p "use simple cov"
require 'simplecov'
SimpleCov.start 'rails'
SimpleCov.at_exit do
threshold = 100
SimpleCov.result.format!
if SimpleCov.result.covered_percent != threshold
puts "the threshold is #{threshold}%. the actual coverage is #{SimpleCov.result.covered_percent}%".foreground(:red)
exit 1
module Presenter
class Person
attr_reader :model
def initialize(model)
@model = model
end
def gender
model.male? ? "Male" : "Female"
end
Given a user exists
When I send a GET request as:
"""
/users/user-id.json?api_token=your-token
"""
Then I receive a JSON response as:
"""
{
user: {
id: user's unique identifier,
subject { Factory.build : merchant_location, pk => 12, : physical_location_se_number => "92929"}
describe "#create" do
it "sends out email" do # or whatever desc makes sense
Merchant::Location.should_receive(:enqueue).at_least(1).times.with(:validate_external_location, 12)
subject.after_create
end
end
1,(508) 333.4304
2,8609339713
3,347.908.5342
4,615.554.4463
5,209.915.5720
6,919-924-3464
7,917.399.8115
8,718 288 2436
9,716.785.2007
10,480.628.5739
First name Last name Phone Email Tags Positions
Baric Schlanger (873)986-5679 ebschlanger@gmail.com cool;fun;friendly Bartender;Waiter
Nicka Lillios 1-457-928-3838 nick@nowsta.com tall;bearded Model
Schlanger (373)786-5679 aebschlanger@gmail.com cool;fun;friendly Bartender;Waiter
company user id user id company id name email phone number
544 640 7 Victor Apaez worker_1435760238@nowsta.com 3473577054
1346 593 7 Gregory Baldwin - 2nd String gregory.baldwin.ny@gmail.com 9146022344
1207 638 7 Salvador Barragan worker_1435760011@nowsta.com 3473666995
808 596 7 Alan Beard - (2nd String) alanjbeard@me.com 5038883378
272 551 7 Brook Bisrat - (1st String) brook.bisrat@gmail.com 9376842494
619 511 7 Jeremy Bite catering jeremy@bitecatering.com 6462813492
698 642 7 Fransisco Bonifaz justineboni@gmail.com 9176869705
608 554 7 Rusty Broughton - 1st String jamesonruss@gmail.com 3472605264
1410 597 7 Mat Burrow - 2nd String matburrow@gmail.com 6314556328