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
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 { |
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
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) |
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
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 |
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
@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: |
NewerOlder