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

promote Teams to first-class citizenship #3400

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ schema-diff: test-schema
diff -uw prod.sql local.sql
rm prod.sql local.sql

data:
fake:
$(honcho_run) $(env_bin)/fake_data fake_data

run: env
Expand Down
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ If you haven't run Gratipay for a while, you can reinstall the dependencies:
Add the necessary schemas and insert dummy data into postgres:

$ make schema
$ make data
$ make fake


Launching
Expand Down Expand Up @@ -310,7 +310,7 @@ $ docker logs [container_id]

```
$ docker exec [container_id] make schema
$ docker exec [container_id] make data
$ docker exec [container_id] make fake
```

Once you're done, kill the running container:
Expand Down Expand Up @@ -405,7 +405,7 @@ Which populates the database named by `DATABASE_URL` with the schema from `sql/s
The gratipay database created in the last step is empty. To populate it with
some fake data, so that more of the site is functional, run this command:

$ make data
$ make fake


API
Expand Down Expand Up @@ -451,13 +451,6 @@ given user.
- "3.00"—user tips this participant the given amount
<br><br>

- "goal"&mdash;funding goal of the given participant; possible values are:

- `undefined` (key not present)&mdash;participant is a patron (or has 0 as the goal)
- `null`&mdash;participant is grateful for gifts, but doesn't have a specific funding goal
- "100.00"&mdash;participant's goal is to receive the given amount per week
<br><br>

- "elsewhere"&mdash;participant's connected accounts elsewhere; returns an object with these keys:

- "bitbucket"&mdash;participant's Bitbucket account; possible values are:
Expand Down
2 changes: 1 addition & 1 deletion emails/verification.spt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[---] text/html
{{ _("We've received a request to connect {0} to the {1} account on Gratipay. Sound familiar?",
('<b>%s</b>'|safe) % email,
('<b><a href="https://gratipay.com/{0}">{0}</a></b>'|safe).format(username)) }}
('<b><a href="https://gratipay.com/~{0}/">{0}</a></b>'|safe).format(username)) }}
<br>
<br>
<a href="{{ link }}" style="{{ button_style }}">{{ _("Yes, proceed!") }}</a>
Expand Down
3 changes: 1 addition & 2 deletions gratipay/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ class NotSane(Exception):
# gratipay.postgres.PostgresManager.


MAX_TIP_SINGULAR = Decimal('100.00')
MAX_TIP_PLURAL = Decimal('1000.00')
MAX_TIP = Decimal('1000.00')
MIN_TIP = Decimal('0.00')

RESTRICTED_IDS = None
Expand Down
3 changes: 0 additions & 3 deletions gratipay/billing/payday.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ def prepare(cursor, ts_start):
, balance AS old_balance
, balance AS new_balance
, is_suspicious
, goal
, false AS card_hold_ok
, ( SELECT count(*)
FROM exchange_routes r
Expand Down Expand Up @@ -227,7 +226,6 @@ def prepare(cursor, ts_start):
JOIN payday_participants p ON p.username = t.tipper
JOIN payday_participants p2 ON p2.username = t.tippee
WHERE t.amount > 0
AND (p2.goal IS NULL or p2.goal >= 0)
AND ( SELECT id
FROM payday_transfers_done t2
WHERE t.tipper = t2.tipper
Expand Down Expand Up @@ -738,7 +736,6 @@ def notify_participants(self):
) t
JOIN participants p ON p.username = t.tippee
WHERE t.amount > 0
AND (p.goal IS NULL or p.goal >= 0)
AND p.is_suspicious IS NOT true
AND p.claimed_time < %(ts_start)s
)
Expand Down
4 changes: 1 addition & 3 deletions gratipay/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ class HasBigTips(ProblemChangingNumber):


class TooGreedy(Exception): pass
class NoSelfTipping(Exception): pass
class NoTippee(Exception): pass
class NoTeam(Exception): pass
class BadAmount(Exception): pass
class UserDoesntAcceptTips(Exception): pass

class FailedToReserveUsername(Exception): pass

Expand Down
1 change: 1 addition & 0 deletions gratipay/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
algorithm['parse_body_into_request'],
algorithm['raise_200_for_OPTIONS'],

utils.use_tildes_for_participants,
canonize,
i18n.set_up_i18n,
authentication.start_user_as_anon,
Expand Down
Loading