Skip to content

Commit

Permalink
[+] Organize code in a better way
Browse files Browse the repository at this point in the history
[+] Added setup directives
  • Loading branch information
fmount committed Dec 20, 2017
1 parent 580d4ea commit be72e3c
Show file tree
Hide file tree
Showing 22 changed files with 69 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fmount <[email protected]>
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CHANGES
=======

* [+] Added support to crud for user objects [+] Added admin support both in conf and in the model [+] Added new user endpoint as resource
* [+] Add expiring time support to be able to retrieve (or not) the link [+] Fix oslo config loading and nopaste.conf options [+] Add helper function to check expiring time [+] Make sqlite\_middleware more generic
* [+] Added new options (expire) [+] More config parameters and Log parameter [+] Fix exception in sqlalchemy middleware
* [+] First commit: Importing repo
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ KNOWN ISSUES

TODO
===
* Make a file / link available for a predefined timeframe window, then it expires and it's not available anymore.
* Show/Delete user(s)
* Put db in /var/lib/nopaste by default

File renamed without changes.
5 changes: 4 additions & 1 deletion basicpastev2.py → nopaste/basicpastev2.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ def show_me_thefile(url):
api.add_resource(UserAPI, "/api/user/<int:uuid>", endpoint="user")


def run():
app.run(host='127.0.0.1', debug=CONF.default.debug)


if __name__ == '__main__':
app.run(debug=CONF.default.debug)
run()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[metadata]
name = nopaste
summary = A nopaste service
description-file = README.md
license = MIT
author = fmount
author-email = [email protected]
classifier =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python :: 2.7
keywords = nopaste

[files]
packages = nopaste
extra-files = nopaste/config/nopaste.conf

[entry_points]
console_scripts =
nopaste = basicpastev2.run

[pbr]
autodoc_index_modules = True


[wheel]
universal = 1
13 changes: 13 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools

# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
except ImportError:
pass

setuptools.setup(
setup_requires=['pbr>=2.0.0'], pbr=True)
14 changes: 14 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# content of: tox.ini , put in same dir as setup.py
[tox]
envlist = py27,py36
skipsdist = true

#[testenv]
#deps=pytest
#commands=pytest
[testenv]
deps =
nose
unittest2
commands =
nosetests

0 comments on commit be72e3c

Please sign in to comment.