Permalink
Browse files

first cut at conversion from repoze.cluegun

  • Loading branch information...
1 parent 9faf287 commit 418c9590793f9ab1712b1eb9d431e8c17197f024 @mcdonc mcdonc committed Nov 21, 2010
View
@@ -0,0 +1,15 @@
+*.egg
+*.egg-info
+*.pyc
+*$py.class
+*.pt.py
+*.txt.py
+.coverage
+env26/
+env24/
+env27/
+jyenv/
+pypyenv/
+build/
+dist/
+cluegun.db*
View
@@ -1,8 +1,4 @@
Next release
+------------
- Forward compatibility with upcoming BFG releases.
-
-0.1
-
- Initial release.
-
+- Forked from repoze.cluebin after 0.1.
View
@@ -1,3 +1,3 @@
-Copyright (c) 2008 Agendaless Consulting and Contributors.
+Copyright (c) 2010 Agendaless Consulting and Contributors.
(http://www.agendaless.com), All Rights Reserved
View
@@ -1,3 +1,4 @@
-An implementation of Rocky Burt's ClueBin based on ``repoze.bfg``.
+An implementation of Rocky Burt's ClueBin based on Pyramid.
+
View
@@ -1,5 +1,5 @@
-repoze.cluegun TODOs
-====================
+cluegun TODOs
+=============
- [_] Add support for notifying an IRC channel (or channels) when a new
paste is added.
View
@@ -0,0 +1,13 @@
+from pyramid.configuration import Configurator
+from cluegun.models import appmaker
+
+def main(global_config, **settings):
+ db_path = settings.get('db_path', None)
+ if db_path is None:
+ raise ValueError('db_path must not be None')
+ from repoze.zodbconn.finder import PersistentApplicationFinder
+ finder = PersistentApplicationFinder('file://%s' % db_path, appmaker)
+ config = Configurator(root_factory=finder, settings=settings)
+ config.load_zcml('cluegun:configure.zcml')
+ return config.make_wsgi_app()
+
@@ -1,7 +1,7 @@
-<configure xmlns="http://namespaces.repoze.org/bfg"
+<configure xmlns="http://pylonshq.com/pyramid"
i18n_domain="repoze.bfg">
- <include package="repoze.bfg.includes" />
+ <include package="pyramid.includes" />
<view
context=".models.PasteBin"
@@ -1,9 +1,9 @@
from datetime import datetime
from persistent import Persistent
-from repoze.bfg.security import Allow
-from repoze.bfg.security import Everyone
-from repoze.bfg.security import Authenticated
+from pyramid.security import Allow
+from pyramid.security import Everyone
+from pyramid.security import Authenticated
from repoze.folder import Folder
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -10,15 +10,15 @@
from pygments import formatters
from pygments import util
-from repoze.bfg.traversal import find_interface
-from repoze.bfg.security import authenticated_userid
-from repoze.bfg.security import has_permission
+from pyramid.traversal import find_interface
+from pyramid.security import authenticated_userid
+from pyramid.security import has_permission
from repoze.monty import marshal
-from repoze.cluegun.models import PasteEntry
-from repoze.cluegun.models import PasteBin
+from cluegun.models import PasteEntry
+from cluegun.models import PasteBin
-app_version = '0.3dev'
+app_version = '0.0'
COOKIE_LANGUAGE = 'cluebin.last_lang'
COOKIE_AUTHOR = 'cluebin.last_author'
@@ -1,8 +1,5 @@
-[DEFAULT]
-debug = true
-
[app:cluegun]
-use = egg:repoze.cluegun#make_app
+use = egg:cluegun
db_path = %(here)s/cluegun.db
[filter:who]
@@ -12,7 +9,6 @@ config_file = %(here)s/who.ini
[pipeline:main]
pipeline = egg:repoze.zodbconn#closer
egg:repoze.tm2#tm
-# egg:repoze.profile#profile
who
cluegun
View
@@ -1 +0,0 @@
-__import__('pkg_resources').declare_namespace(__name__)
@@ -1 +0,0 @@
-# a package
View
@@ -1,15 +0,0 @@
-def make_app(global_config, **kw):
- from repoze.bfg.configuration import Configurator
- from repoze.cluegun.models import appmaker
- db_path = kw.get('db_path', None)
- if db_path is None:
- raise ValueError('db_path must not be None')
- from repoze.zodbconn.finder import PersistentApplicationFinder
- finder = PersistentApplicationFinder('file://%s' % db_path, appmaker)
- config = Configurator(root_factory=finder, settings=kw)
- config.begin()
- config.load_zcml('repoze.cluegun:configure.zcml')
- config.end()
- app = config.make_wsgi_app()
- return app
-
View
@@ -4,6 +4,6 @@ zip_ok = false
[nosetests]
match=^test
nocapture=1
-where=repoze/cluegun
-cover-package=repoze.cluegun
+where=cluegun
+cover-package=cluegun
cover-erase=1
View
@@ -1,6 +1,6 @@
##############################################################################
#
-# Copyright (c) 2008 Agendaless Consulting and Contributors.
+# Copyright (c) 2010 Agendaless Consulting and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the BSD-like license at
@@ -21,7 +21,7 @@
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
- 'repoze.bfg',
+ 'pyramid',
'repoze.tm2',
'repoze.monty',
'repoze.who>=2.0a1',
@@ -34,36 +34,35 @@
'repoze.folder',
]
-__version__ = '0.3dev'
+__version__ = '0.0'
-setup(name='repoze.cluegun',
+setup(name='cluegun',
version=__version__,
- description='A pastebin implementation based on ClueBin using repoze.bfg',
+ description='A Pyramid sample application: pastebin (based on ClueBin)',
long_description=README + '\n\n' + CHANGES,
classifiers=[
- "Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python",
+ "Framework :: Pylons",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Internet :: WWW/HTTP :: WSGI",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
],
- keywords='cluebin repoze bfg wsgi',
+ keywords='cluebin pyramid pylons',
author="Agendaless Consulting",
- author_email="repoze-dev@lists.repoze.org",
+ author_email="pylons-devel@googlegroups.com",
url="http://www.repoze.org",
license="BSD-derived (http://www.repoze.org/LICENSE.txt)",
packages=find_packages(),
include_package_data=True,
- namespace_packages=['repoze'],
zip_safe=False,
tests_require = requires,
install_requires= requires,
- test_suite="repoze.cluegun.tests",
+ test_suite="cluegun.tests",
entry_points = """\
[paste.app_factory]
- make_app = repoze.cluegun.run:make_app
+ main = cluegun:main
"""
)

0 comments on commit 418c959

Please sign in to comment.