Skip to content

Commit

Permalink
The sources were full of DOS-style line endings! Set svn:eol-style pr…
Browse files Browse the repository at this point in the history
…operly.
  • Loading branch information
mgedmin committed Feb 8, 2008
1 parent f2f4fcb commit 1842308
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 161 deletions.
6 changes: 3 additions & 3 deletions src/z3c/breadcrumb/SETUP.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<data-files zopeskel/etc/package-includes>
z3c.breadcrumb-*.zcml
</data-files>
<data-files zopeskel/etc/package-includes>
z3c.breadcrumb-*.zcml
</data-files>
32 changes: 16 additions & 16 deletions src/z3c/breadcrumb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
##############################################################################
#
# Copyright (c) 2007 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
$Id: __init__.py 70825 2006-10-20 01:34:05Z rogerineichen $
"""
##############################################################################
#
# Copyright (c) 2007 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
$Id: __init__.py 70825 2006-10-20 01:34:05Z rogerineichen $
"""
38 changes: 19 additions & 19 deletions src/z3c/breadcrumb/configure.zcml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<configure
xmlns="http://namespaces.zope.org/zope">

<!-- Generic IBreadcrumb adapter -->
<adapter
factory="z3c.breadcrumb.browser.GenericBreadcrumb"
trusted="true"
permission="zope.Public"
/>

<!-- Generic IBreadcrumbs adapter -->
<adapter
factory="z3c.breadcrumb.browser.Breadcrumbs"
provides="z3c.breadcrumb.interfaces.IBreadcrumbs"
trusted="true"
permission="zope.Public"
/>

</configure>
<configure
xmlns="http://namespaces.zope.org/zope">

<!-- Generic IBreadcrumb adapter -->
<adapter
factory="z3c.breadcrumb.browser.GenericBreadcrumb"
trusted="true"
permission="zope.Public"
/>

<!-- Generic IBreadcrumbs adapter -->
<adapter
factory="z3c.breadcrumb.browser.Breadcrumbs"
provides="z3c.breadcrumb.interfaces.IBreadcrumbs"
trusted="true"
permission="zope.Public"
/>

</configure>
100 changes: 50 additions & 50 deletions src/z3c/breadcrumb/interfaces.py
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
##############################################################################
#
# Copyright (c) 2007 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
$Id: __init__.py 70825 2006-10-20 01:34:05Z rogerineichen $
"""
__docformat__ = 'reStructuredText'

import zope.interface
import zope.schema


class IBreadcrumbs(zope.interface.Interface):
"""An object providing breadcrumbs.
This object will use the ``IBreadcrumb`` adapter to get its
information from each breadcrumb name.
"""

crumbs = zope.interface.Attribute('An iteratable of all breadcrumbs.')


class IBreadcrumb(zope.interface.Interface):
"""Provides pieces of breadcrumb information about a item."""

name = zope.schema.TextLine(
title=u'Name',
description=u'The name of the breadcrumb.',
required=True)

url = zope.schema.URI(
title=u'URL',
description=u'The url of the breadcrumb.',
required=True)

activeURL = zope.schema.Bool(
title=u'Active',
description=u'Tells whether the breadcrumb link should active.',
required=True,
default=True)
##############################################################################
#
# Copyright (c) 2007 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
$Id: __init__.py 70825 2006-10-20 01:34:05Z rogerineichen $
"""
__docformat__ = 'reStructuredText'

import zope.interface
import zope.schema


class IBreadcrumbs(zope.interface.Interface):
"""An object providing breadcrumbs.
This object will use the ``IBreadcrumb`` adapter to get its
information from each breadcrumb name.
"""

crumbs = zope.interface.Attribute('An iteratable of all breadcrumbs.')


class IBreadcrumb(zope.interface.Interface):
"""Provides pieces of breadcrumb information about a item."""

name = zope.schema.TextLine(
title=u'Name',
description=u'The name of the breadcrumb.',
required=True)

url = zope.schema.URI(
title=u'URL',
description=u'The url of the breadcrumb.',
required=True)

activeURL = zope.schema.Bool(
title=u'Active',
description=u'Tells whether the breadcrumb link should active.',
required=True,
default=True)
136 changes: 68 additions & 68 deletions src/z3c/breadcrumb/tests.py
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
##############################################################################
#
# Copyright (c) 2007 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
$Id: __init__.py 70825 2006-10-20 01:34:05Z rogerineichen $
"""
__docformat__ = 'restructuredtext'

import unittest
from zope.testing import doctest
from zope.app.testing import placelesssetup, setup
from zope.traversing.interfaces import IContainmentRoot
from zope.interface.verify import verifyObject
from zope.interface import implements
from zope.publisher.browser import TestRequest


def doctest_Breadcrumbs_interface():
"""Test that Breadcrumbs matches the interface
>>> from z3c.breadcrumb import browser, interfaces
>>> breadcrumbs = browser.Breadcrumbs(None, None)
>>> verifyObject(interfaces.IBreadcrumbs, breadcrumbs)
True
"""


def doctest_GenericBreadcrumb_interface():
"""Test that GenericBreadcrumb matches the interface
>>> from z3c.breadcrumb import browser, interfaces
>>> class RootStub(object):
... implements(IContainmentRoot)
>>> breadcrumb = browser.GenericBreadcrumb(RootStub(), TestRequest())
>>> verifyObject(interfaces.IBreadcrumb, breadcrumb)
True
"""


def setUp(test):
site = setup.placefulSetUp(site=True)
test.globs['rootFolder'] = site

def tearDown(test):
setup.placefulTearDown()


def test_suite():
return unittest.TestSuite([
doctest.DocFileSuite(
'README.txt',
setUp=setUp, tearDown=tearDown,
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
doctest.DocTestSuite(
setUp=setUp, tearDown=tearDown),
])
##############################################################################
#
# Copyright (c) 2007 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
$Id: __init__.py 70825 2006-10-20 01:34:05Z rogerineichen $
"""
__docformat__ = 'restructuredtext'

import unittest
from zope.testing import doctest
from zope.app.testing import placelesssetup, setup
from zope.traversing.interfaces import IContainmentRoot
from zope.interface.verify import verifyObject
from zope.interface import implements
from zope.publisher.browser import TestRequest


def doctest_Breadcrumbs_interface():
"""Test that Breadcrumbs matches the interface
>>> from z3c.breadcrumb import browser, interfaces
>>> breadcrumbs = browser.Breadcrumbs(None, None)
>>> verifyObject(interfaces.IBreadcrumbs, breadcrumbs)
True
"""


def doctest_GenericBreadcrumb_interface():
"""Test that GenericBreadcrumb matches the interface
>>> from z3c.breadcrumb import browser, interfaces
>>> class RootStub(object):
... implements(IContainmentRoot)
>>> breadcrumb = browser.GenericBreadcrumb(RootStub(), TestRequest())
>>> verifyObject(interfaces.IBreadcrumb, breadcrumb)
True
"""


def setUp(test):
site = setup.placefulSetUp(site=True)
test.globs['rootFolder'] = site

def tearDown(test):
setup.placefulTearDown()


def test_suite():
return unittest.TestSuite([
doctest.DocFileSuite(
'README.txt',
setUp=setUp, tearDown=tearDown,
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
doctest.DocTestSuite(
setUp=setUp, tearDown=tearDown),
])
10 changes: 5 additions & 5 deletions src/z3c/breadcrumb/z3c.breadcrumb-configure.zcml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<configure xmlns="http://namespaces.zope.org/zope">

<include package="z3c.breadcrumb" />

</configure>
<configure xmlns="http://namespaces.zope.org/zope">

<include package="z3c.breadcrumb" />

</configure>

0 comments on commit 1842308

Please sign in to comment.