def DefaultContainerPathForOwner(self, module): """Overrides the default.""" if module.owner_domain == 'google.com': if ((self._options and self._options.get('google_api')) or not module.package_path): return 'com/google/api/services' return '/'.join(utilities.ReversedDomainComponents( module.owner_domain))
def DefaultContainerPathForOwner(self, module): """Computes the default path to a module for the given owner information. For a given module, compute the portions of the path which are determined by the owner of the module - excluding the module path itself. Subclasses almost certainly want to override this. Args: module: (template_objects.Module) The module. Returns: (str) The path to use for the namespace of this API. """ return '/'.join(utilities.ReversedDomainComponents( module.owner_domain))
def DefaultContainerPathForOwner(self, module): return '/'.join(utilities.ReversedDomainComponents( module.owner_domain))
def testReversedDomainComponents(self): self.assertEquals([], utilities.ReversedDomainComponents('')) self.assertEquals(['com', 'google'], utilities.ReversedDomainComponents('google.com'))
def DefaultContainerPathForOwner(self, module): """Overrides the default implementation.""" return '%s/api/gwt/services' % '/'.join( utilities.ReversedDomainComponents(module.owner_domain))