def setUp(self): self.cp = utils.ConfigProxy(mybaz="baz")
from allura.lib import helpers as h from allura.lib.plugin import ImportIdConverter from allura.tasks import mail_tasks from paste.deploy.converters import asbool log = logging.getLogger(__name__) CUSTOM_FIELD_SOLR_TYPES = dict(boolean='_b', number='_i') SOLR_TYPE_DEFAULTS = dict(_b=False, _i=0) def get_default_for_solr_type(solr_type): return SOLR_TYPE_DEFAULTS.get(solr_type, u'') config = utils.ConfigProxy(common_suffix='forgemail.domain', new_solr='solr.use_new_types') class Globals(MappedClass): class __mongometa__: name = 'globals' session = project_orm_session indexes = ['app_config_id'] type_s = 'Globals' _id = FieldProperty(schema.ObjectId) app_config_id = ForeignIdProperty(AppConfig, if_missing=lambda: c.app.config._id) app_config = RelationProperty(AppConfig, via='app_config_id') last_ticket_num = FieldProperty(int) status_names = FieldProperty(str)
Feed, Thread, Post, User, BaseAttachment, Notification, project_orm_session, Shortlink, ) from allura.model.timeline import ActivityObject from allura.model.types import MarkdownCache from allura.lib import helpers as h from allura.lib import utils config = utils.ConfigProxy( common_suffix='forgemail.domain') class Globals(MappedClass): class __mongometa__: name = 'wiki-globals' session = project_orm_session indexes = ['app_config_id'] type_s = 'WikiGlobals' _id = FieldProperty(schema.ObjectId) app_config_id = ForeignIdProperty( 'AppConfig', if_missing=lambda: context.app.config._id) root = FieldProperty(str)
from ming.orm import FieldProperty, session, Mapper from ming.orm.declarative import MappedClass from allura.lib import helpers as h from allura.lib import utils from .artifact import Artifact, VersionedArtifact, Feed from .auth import User from .session import repository_orm_session, project_orm_session from .notification import Notification from .repo_refresh import refresh_repo from .timeline import ActivityObject log = logging.getLogger(__name__) config = utils.ConfigProxy( common_suffix='forgemail.domain', common_prefix='forgemail.url') README_RE = re.compile('^README(\.[^.]*)?$', re.IGNORECASE) VIEWABLE_EXTENSIONS = ['.php','.py','.js','.java','.html','.htm','.yaml','.sh', '.rb','.phtml','.txt','.bat','.ps1','.xhtml','.css','.cfm','.jsp','.jspx', '.pl','.php4','.php3','.rhtml','.svg','.markdown','.json','.ini','.tcl','.vbs','.xsl'] class RepositoryImplementation(object): # Repository-specific code def init(self): # pragma no cover raise NotImplementedError, 'init' def clone_from(self, source_url): # pragma no cover raise NotImplementedError, 'clone_from'