From 01221ead536a9fc5d1673d0deb9391c3231ab1c5 Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Fri, 7 Dec 2012 10:16:41 -0500 Subject: [PATCH] Rename gittip.networks to gittip.elsewhere (#406) --- configure-aspen.py | 2 +- gittip/{networks => elsewhere}/__init__.py | 0 gittip/{networks => elsewhere}/github.py | 12 ++++++------ gittip/{networks => elsewhere}/twitter.py | 12 ++++++------ gittip/testing.py | 2 +- www/%participant_id/index.html | 2 +- www/%participant_id/participant_id.json | 2 +- www/about/charts.html | 2 -- www/bank-account.html | 2 +- www/credit-card.html | 2 +- www/index.html | 2 +- www/on/github/%login/index.html | 2 +- www/on/twitter/%screen_name/index.html | 2 +- 13 files changed, 21 insertions(+), 23 deletions(-) rename gittip/{networks => elsewhere}/__init__.py (100%) rename gittip/{networks => elsewhere}/github.py (92%) rename gittip/{networks => elsewhere}/twitter.py (79%) diff --git a/configure-aspen.py b/configure-aspen.py index 2281138fae..133716609f 100644 --- a/configure-aspen.py +++ b/configure-aspen.py @@ -29,7 +29,7 @@ __version__ = open(os.path.join(website.www_root, 'version.txt')).read().strip() def add_stuff(request): - from gittip.networks import github, twitter + from gittip.elsewhere import github, twitter request.context['__version__'] = __version__ request.context['username'] = None request.context['github'] = github diff --git a/gittip/networks/__init__.py b/gittip/elsewhere/__init__.py similarity index 100% rename from gittip/networks/__init__.py rename to gittip/elsewhere/__init__.py diff --git a/gittip/networks/github.py b/gittip/elsewhere/github.py similarity index 92% rename from gittip/networks/github.py rename to gittip/elsewhere/github.py index 69138ca8e8..e66d5cbb9e 100644 --- a/gittip/networks/github.py +++ b/gittip/elsewhere/github.py @@ -2,15 +2,15 @@ from aspen import json, log, Response from aspen.website import Website from aspen.utils import typecheck -from gittip import db, networks +from gittip import db, elsewhere def upsert(user_info): - return networks.upsert( 'github' - , user_info['id'] - , user_info['login'] - , user_info - ) + return elsewhere.upsert( 'github' + , user_info['id'] + , user_info['login'] + , user_info + ) def oauth_url(website, action, then=u""): diff --git a/gittip/networks/twitter.py b/gittip/elsewhere/twitter.py similarity index 79% rename from gittip/networks/twitter.py rename to gittip/elsewhere/twitter.py index 943169331f..fce2f73590 100644 --- a/gittip/networks/twitter.py +++ b/gittip/elsewhere/twitter.py @@ -1,12 +1,12 @@ -from gittip import db, networks +from gittip import db, elsewhere def upsert(user_info): - return networks.upsert( 'twitter' - , user_info['id'] - , user_info['screen_name'] - , user_info - ) + return elsewhere.upsert( 'twitter' + , user_info['id'] + , user_info['screen_name'] + , user_info + ) def resolve(user_id): diff --git a/gittip/testing.py b/gittip/testing.py index 706eeef0e2..fe8ca27b43 100644 --- a/gittip/testing.py +++ b/gittip/testing.py @@ -35,7 +35,7 @@ def create_schema(db): ] def populate_db_with_dummy_data(db): - from gittip.networks import github, change_participant_id + from gittip.elsewhere import github, change_participant_id for user_id, login in GITHUB_USERS: participant_id, a,b,c = github.upsert({"id": user_id, "login": login}) change_participant_id(None, participant_id, login) diff --git a/www/%participant_id/index.html b/www/%participant_id/index.html index b5de5cc6a4..fc2402d2a4 100644 --- a/www/%participant_id/index.html +++ b/www/%participant_id/index.html @@ -17,7 +17,7 @@ from gittip import AMOUNTS from gittip.participant import Participant from gittip.utils import wrap -from gittip.networks import github, resolve_unclaimed +from gittip.elsewhere import github, resolve_unclaimed tip_suggestions = ('jeresig', 'antirez', 'wycats', 'fabpot', 'mitsuhiko', diff --git a/www/%participant_id/participant_id.json b/www/%participant_id/participant_id.json index b5f7c14f97..7f0f5e0d47 100644 --- a/www/%participant_id/participant_id.json +++ b/www/%participant_id/participant_id.json @@ -1,5 +1,5 @@ from aspen import Response -from gittip.networks import change_participant_id +from gittip.elsewhere import change_participant_id from psycopg2 import IntegrityError # ========================================================================== ^L diff --git a/www/about/charts.html b/www/about/charts.html index 8c66a41632..cd30f9c7d2 100644 --- a/www/about/charts.html +++ b/www/about/charts.html @@ -1,5 +1,3 @@ -from gittip.networks import github -^L title = "Charts" ^L {% extends templates/base.html %} diff --git a/www/bank-account.html b/www/bank-account.html index b7a53d2ae9..4004c1fa3d 100644 --- a/www/bank-account.html +++ b/www/bank-account.html @@ -4,7 +4,7 @@ import balanced from aspen import json, log, Response from gittip import billing, MONTHS -from gittip.networks import github +from gittip.elsewhere import github # ========================================================================== ^L balanced_account_uri = None diff --git a/www/credit-card.html b/www/credit-card.html index f1a3a8580c..e292bad05a 100644 --- a/www/credit-card.html +++ b/www/credit-card.html @@ -3,7 +3,7 @@ import balanced from aspen import json, log, Response from gittip import billing -from gittip.networks import github +from gittip.elsewhere import github # ========================================================================== ^L diff --git a/www/index.html b/www/index.html index 5d1236c2ec..d1423b331a 100644 --- a/www/index.html +++ b/www/index.html @@ -1,5 +1,5 @@ from gittip import db, AMOUNTS -from gittip.networks import github +from gittip.elsewhere import github ^L try: diff --git a/www/on/github/%login/index.html b/www/on/github/%login/index.html index 2726139725..ce0060107e 100644 --- a/www/on/github/%login/index.html +++ b/www/on/github/%login/index.html @@ -5,7 +5,7 @@ import requests from aspen import json, Response from gittip import AMOUNTS, CARDINALS, db -from gittip.networks import github +from gittip.elsewhere import github from gittip.participant import Participant diff --git a/www/on/twitter/%screen_name/index.html b/www/on/twitter/%screen_name/index.html index 159926d938..16edede1d1 100644 --- a/www/on/twitter/%screen_name/index.html +++ b/www/on/twitter/%screen_name/index.html @@ -8,7 +8,7 @@ from aspen.utils import to_age, utc from gittip import AMOUNTS, CARDINALS, db from gittip.participant import Participant -from gittip.networks import twitter +from gittip.elsewhere import twitter # ========================================================================== ^L