Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Resolved merge conflict. (Needs some CSS fixes)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyungmin committed Mar 1, 2014
2 parents 17165c1 + bb66d3b commit c00b183
Show file tree
Hide file tree
Showing 108 changed files with 2,728 additions and 3,712 deletions.
6 changes: 6 additions & 0 deletions .slugignore
@@ -0,0 +1,6 @@
# Files removed before slug
# compilation on Heroku
# See: https://devcenter.heroku.com/articles/slug-compiler#slug-size
img-src/
tests/
jstests/
2 changes: 2 additions & 0 deletions .travis.yml
@@ -1,4 +1,6 @@
language: python
addons:
postgresql: 9.3
before_install:
- node --version
install: make env node_modules
Expand Down
2 changes: 2 additions & 0 deletions 404.html.spt → 404.spt
@@ -1,4 +1,6 @@
[---]

[---] text/html
{% extends "templates/base.html" %}

{% block heading %}
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Expand Up @@ -60,11 +60,16 @@ test-schema: env

test-db: test-cloud-db test-schema

pyflakes: env
./$(env_bin)/pyflakes bin gittip tests

test: env test-schema
./$(env_bin)/honcho -e tests/defaults.env,tests/local.env run ./$(env_bin)/py.test ./tests/
@$(MAKE) --no-print-directory pyflakes

retest: env
./$(env_bin)/honcho -e tests/defaults.env,tests/local.env run ./$(env_bin)/py.test ./tests/ --lf
@$(MAKE) --no-print-directory pyflakes

test-cov: env test-schema
./$(env_bin)/honcho -e tests/defaults.env,tests/local.env run ./$(env_bin)/py.test --cov gittip ./tests/
Expand Down
4 changes: 4 additions & 0 deletions README.md
@@ -1,5 +1,8 @@
# Welcome to Gittip [<img height="26px" src="www/assets/gittip.opengraph.png"/>](https://www.gittip.com/)

[![Build Status](https://travis-ci.org/gittip/www.gittip.com.png?branch=master)](https://travis-ci.org/gittip/www.gittip.com)
[![HuBoard badge](http://img.shields.io/badge/Hu-Board-7965cc.svg)](https://huboard.com/gittip/www.gittip.com)

Gittip is a weekly gift exchange, helping to create a culture of generosity.
If you'd like to learn more, check out <https://gittip.com/about>.
If you'd like to contribute to Gittip, the best first reference is <https://gittip.com/for/contributors>.
Expand Down Expand Up @@ -506,3 +509,4 @@ and [crowdsourcing.org's](http://www.crowdsourcing.org/directory)*
- [MedStartr](http://www.medstartr.com/) - Fund the medical breakthroughs and innovations you care about
- [Upstart](https://www.upstart.com/) - Raise money from your future self
- [Gitcoin](http://www.gitcoin.co/) - Give bitcoin donations to your favorite projects.
- [Patronism](http://patronism.com/) - Become a patron of your favorite band.
9 changes: 0 additions & 9 deletions configure-aspen.py
@@ -1,6 +1,5 @@
from __future__ import division

from importlib import import_module
import os
import sys
import threading
Expand All @@ -12,7 +11,6 @@
from gittip import canonize, configure_payments
from gittip.security import authentication, csrf, x_frame_options
from gittip.utils import cache_static, timer
from gittip.elsewhere import platform_classes


from aspen import log_dammit
Expand Down Expand Up @@ -46,12 +44,6 @@
gittip.wireup.envvars(website)
tell_sentry = gittip.wireup.make_sentry_teller(website)

# this serves two purposes:
# 1) ensure all platform classes are created (and thus added to platform_classes)
# 2) keep the platform modules around to be added to the context below
platform_modules = {platform: import_module("gittip.elsewhere.%s" % platform)
for platform in platform_classes}

# The homepage wants expensive queries. Let's periodically select into an
# intermediate table.

Expand Down Expand Up @@ -124,7 +116,6 @@ def log_busy_threads():

def add_stuff_to_context(request):
request.context['username'] = None
request.context.update(platform_modules)

def scab_body_onto_response(response):

Expand Down
13 changes: 8 additions & 5 deletions defaults.env
Expand Up @@ -16,6 +16,10 @@ STRIPE_PUBLISHABLE_API_KEY=1

BALANCED_API_SECRET=ak-test-21vi4ozmxY4RPh5A3O9cqvp7AVcFSKGTP

DEBUG=1 # Used by oauthlib to bypass security checks. We need it because when
# running locally the OAuth callbacks are http:, not https:. Of course
# DEBUG shouldn't be set in production.

GITHUB_CLIENT_ID=3785a9ac30df99feeef5
GITHUB_CLIENT_SECRET=e69825fafa163a0b0b6d2424c107a49333d46985
GITHUB_CALLBACK=http://127.0.0.1:8537/on/github/associate
Expand All @@ -26,23 +30,22 @@ BITBUCKET_CALLBACK=http://127.0.0.1:8537/on/bitbucket/associate

TWITTER_CONSUMER_KEY=QBB9vEhxO4DFiieRF68zTA
TWITTER_CONSUMER_SECRET=mUymh1hVMiQdMQbduQFYRi79EYYVeOZGrhj27H59H78
TWITTER_ACCESS_TOKEN=34175404-G6W8Hh19GWuUhIMEXK0LyZsy7N9aCMcy1bYJ9rI
TWITTER_ACCESS_TOKEN_SECRET=K6wxV1OCsihZAkEPkWtoLYDiRJnWajBBWn4UgliTRQ
TWITTER_CALLBACK=http://127.0.0.1:8537/on/twitter/associate

BOUNTYSOURCE_API_SECRET=e2BbqjNY60kC7V-Uq1dv2oHgGavbWm9pUJmiRHCApFZHDiY9aZyAspInhZaZ94x9
BOUNTYSOURCE_API_HOST=https://staging-qa.bountysource.com
BOUNTYSOURCE_WWW_HOST=https://staging.bountysource.com
BOUNTYSOURCE_CALLBACK=http://127.0.0.1:8537/on/bountysource/associate
BOUNTYSOURCE_API_HOST=https://staging-api.bountysource.com
BOUNTYSOURCE_WWW_HOST=https://staging.bountysource.com

VENMO_CLIENT_ID=1534
VENMO_CLIENT_SECRET=55ckgsguYC3cj7xWW5c95PHvUzrwgZMA
VENMO_CALLBACK=http://127.0.0.1:8537/on/venmo/associate

OPENSTREETMAP_API=http://master.apis.dev.openstreetmap.org
OPENSTREETMAP_CONSUMER_KEY=J2SS5GM0A7tM1CIBjAHXUTMeCEkRBMYsTJzGONxe
OPENSTREETMAP_CONSUMER_SECRET=hgvZkbtWVOEoaJV5AzQPcBI9m8f7BylkpT0cP7wS
OPENSTREETMAP_CALLBACK=http://127.0.0.1:8537/on/openstreetmap/associate
OPENSTREETMAP_API_URL=http://master.apis.dev.openstreetmap.org/api/0.6
OPENSTREETMAP_AUTH_URL=http://master.apis.dev.openstreetmap.org

NANSWERS_THRESHOLD=2

Expand Down
2 changes: 0 additions & 2 deletions gittip/billing/__init__.py
Expand Up @@ -17,9 +17,7 @@
"""
from __future__ import unicode_literals
from urllib import quote

import gittip
import balanced
import stripe
from aspen.utils import typecheck
Expand Down
4 changes: 2 additions & 2 deletions gittip/billing/steady_state.py
Expand Up @@ -42,12 +42,12 @@ def converge(payouts, epsilon = 1e-10, max_rounds = 100):
Converges to the steady state.
"""
if not issparse(payouts):
raise ArgumentError("Please provide a sparse matrix")
raise ValueError("Please provide a sparse matrix")

(n_rows, n_cols) = payouts.shape

if n_rows != n_cols:
raise ArgumentError("The payout matrix must be square")
raise ValueError("The payout matrix must be square")

payouts_d = lil_matrix((n_rows, n_cols))
payouts_d.setdiag(payouts.diagonal())
Expand Down

0 comments on commit c00b183

Please sign in to comment.