Skip to content

Instantly share code, notes, and snippets.

View anxiousmodernman's full-sized avatar
🎺
ready for a ska revival

Coleman McFarland anxiousmodernman

🎺
ready for a ska revival
View GitHub Profile
@anxiousmodernman
anxiousmodernman / GithubServiceITSpec.scala
Created February 18, 2014 13:40
made use of the FakeApplication() in the Specicification class again
class GithubServiceITSpec extends Specification {
val app = FakeApplication()
val config = Play.configuration(app)
implicit val access_token = AccessToken(config.getString("github.oauth.token") getOrElse {
throw new IllegalStateException("No github.oauth.token")
})
"Github integration" should {
from sqlalchemy.orm import sessionmaker
from shark import app
from settings import MSSQL_ENV_CONFIG
from datasource.engines import get_mssql_engine
from schemas.alchemy import BriefTable, LinkSubscriberBriefTable, SubscriberTable, SubscriberBriefProfileTable
from shark.interfaces import ContainsFieldValueSearch
engine = get_mssql_engine(MSSQL_ENV_CONFIG)
import os
from flask import Flask, request, Response
from flask import render_template, url_for, redirect, send_from_directory
from flask import send_file, make_response, abort, jsonify
from sqlalchemy.orm import sessionmaker
from shark import app
from settings import MSSQL_ENV_CONFIG
@anxiousmodernman
anxiousmodernman / controllers.py
Created January 2, 2014 03:46
make a interface/facade here?
@app.route('/search', methods=['POST'])
def handle_search_call():
# todo implement facade for request
q = db_session.query(SubscriberTable.first_name,
SubscriberTable.last_name,
SubscriberTable.last_open,
SubscriberTable.email,
SubscriberTable.company).\
join(SubscriberBriefProfileTable)
for k, v in request.json: