Skip to content

Commit

Permalink
Stubbed plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
codeinthehole committed Mar 23, 2012
0 parents commit de4c9cd
Show file tree
Hide file tree
Showing 12 changed files with 146 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
htmlcov
dist
27 changes: 27 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2011, Tangent Communications PLC and individual contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Neither the name of Tangent Communications PLC nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include *.rst
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=================================
PayPal package for django-oscar
=================================

Just a stub at the moment...
2 changes: 2 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Allow a policy to be specified for Cv2Avs
Extended policy
Empty file added paypal/__init__.py
Empty file.
Empty file added paypal/models.py
Empty file.
7 changes: 7 additions & 0 deletions paypal/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from unittest import TestCase


class SmokeTests(TestCase):

def test_nothing(self):
pass
13 changes: 13 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

RELEASE_NUM=`grep version setup.py | cut -d\' -f2`
git tag | grep $RELEASE_NUM > /dev/null && \
echo "New version number required ($RELEASE_NUM already used)" && exit 1

# Push to PyPi
./setup.py sdist upload

# Tag in Git
git tag $RELEASE_NUM -m "Tagging release $RELEASE_NUM"
git push origin master
git push --tags
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Django==1.3.1
South==0.7.3
mock==0.7.2
coverage==3.5.1
62 changes: 62 additions & 0 deletions run_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/usr/bin/env python
import sys
import os
from coverage import coverage
from optparse import OptionParser

from django.conf import settings, global_settings

if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
},
INSTALLED_APPS=[
'django.contrib.auth',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'paypal',
'south',
],
DEBUG=False,
SITE_ID=1,
)

from django.test.simple import DjangoTestSuiteRunner


def run_tests(*test_args):
if 'south' in settings.INSTALLED_APPS:
from south.management.commands import patch_for_test_db_setup
patch_for_test_db_setup()

if not test_args:
test_args = ['paypal']

# Run tests
test_runner = DjangoTestSuiteRunner(verbosity=2)

c = coverage(source=['paypal'], omit=['*migrations*', '*tests*'])
c.start()
num_failures = test_runner.run_tests(test_args)
c.stop()

if num_failures > 0:
sys.exit(num_failures)
print "Generating HTML coverage report"
c.html_report()

def generate_migration():
from south.management.commands.schemamigration import Command
com = Command()
com.handle(app='paypal', initial=True)


if __name__ == '__main__':
parser = OptionParser()
(options, args) = parser.parse_args()
run_tests(*args)
23 changes: 23 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env python
from setuptools import setup, find_packages

setup(name='django-oscar-paypal',
version='0.1',
url='https://github.com/tangentlabs/django-oscar-paypal',
author="David Winterbottom",
author_email="[email protected]",
description="PayPal payment module for django-oscar",
long_description=open('README.rst').read(),
keywords="Payment, PayPal",
license='BSD',
platforms=['linux'],
packages=find_packages(),
install_requires=[ 'django-oscar',],
# See http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=['Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Programming Language :: Python']
)

0 comments on commit de4c9cd

Please sign in to comment.