Skip to content

Instantly share code, notes, and snippets.

Given /^I am an authorized publisher admin$/i do
@publisher = Factory.create(:publisher)
@mp_config = Factory.create(:marketplace_config,
:url => 'localhost',
:publisher => @publisher)
@admin = Factory.create :publisher_admin
@admin.publishers << @publisher
@admin.save
# NOTE !!
# Works only if you do NOT have the require cucumber step in your Rakefile
# ci_reporter 1.7 crashes on the command `rake ci:setup:cucumber cucumber`.
# I've followed the instuctions here https://github.com/nicksieger/ci_reporter/issues/4
# and created my own ci:setup:cucumber rake task.
# And this seems to have solved the issue.
namespace :ci do
namespace :setup do
require 'spec_helper'
describe CustomerZipCode
describe "#import_businesses" do
it "queries the spelunkerUBL data api"
it "builds a business for each record returned from the spelunkerUBL data"
it "normalizes each business returned from the spelunkerUBL data"
it "categorizes each business return from the spelunkerUBL data"
it "saves each business built from the spelunkerUBL data"
context "a business from the splunkerUBL data already exists and is has a paid listing" do
ubuntu@domU-12-31-38-00-90-C5:/mnt/adftp/done/leesburg_dailycommercial$ ack-grep -A 15 '08102900'
2012-05-14/Default_5-14-12.xml
333: <CUSTOMERNUMBER><![CDATA[08102900]]></CUSTOMERNUMBER>
334- <FIRSTNAME><![CDATA[]]></FIRSTNAME>
335- <LASTNAME><![CDATA[]]></LASTNAME>
336- <COMPANYNAME><![CDATA[LEADING EDGE-VAZIRI]]></COMPANYNAME>
337- <ADDRSS1><![CDATA[10601 US HWY 441C-1B]]></ADDRSS1>
338- <ADDRSS2><![CDATA[]]></ADDRSS2>
339- <CITY><![CDATA[LEESBURG]]></CITY>
340- <STATE><![CDATA[]]></STATE>
@flsafe
flsafe / refresh.rb
Created August 29, 2012 18:44
refresh ads
pdfs=[
"864546-01.pdf",
"869017-01.pdf",
"869017-01.pdf",
"867131-01.pdf",
"867131-01.pdf",
"865896-01.pdf",
"865896-01.pdf",
"863510-01.pdf",
"863510-01.pdf",
Search index:
"All American Dogs Hot Dog Coney Dog Coney Cheese Dog A&w Burgers Papa Burger Original Bacon Double Cheeseburger Original Bacon Cheeseburger Cheeseburger Hamburger Chicken Mama's Recipe Chicken Crispy Chicken Sandwich Grilled Chicken Sandwich Chicken Strips Sides Fries Chili Cheese Fries Onion Rings Cheese Curds Onion Rings Sweets & Treats A&w Root Beer Float Famous Floats Shakes Soft Serve Cones Sundaes"
Or search index, slower but more rich:
"All American Dog Topped Just the Way You Like for a Satisfying Taste That's Bursting with Flavor All American Dogs our big & beefy hot dog are made piping hot and served on our special bun. Hot Dog an a&w original. the great american hot dog with our own meaty chili sauce and sweet onions. Coney Dog it's hard to believe that the coney dog could get may better but top it with creamy cheese sauce and it's one special treat. Coney Cheese Dog Big, Juicy 100% U.s. Beef Burgers Loaded with Delicious Toppings, Available Only At Your Neighborhood A&w A&w Burg
@flsafe
flsafe / initialspec
Created November 14, 2013 22:05
Adforge API v2 spec
Ads API V2
Returns 422 if a valid publisher_id is not specified
Returns 422 if business_ids and phone_numbers are not specified
When it's a business ads query
Only returns ads with start_date <= the current date
Returns ads by business phone numbers
Returns ads by business ids
returns an array of json objects with the following keys: id, job_id, batch_id, text, business, pdf, large, slider
thumb, hover, url, start_date, end_date
when both business_id and phone are provided