Beispiel #1
0
 def test_in_development(self):
     self.assertTrue(
         in_development(get_distribution('ftw.lawgiver').location
                        + '/ftw/lawgiver/__init__.py'),
         'Expected ftw.lawgiver to be in development.')
     self.assertFalse(
         in_development(get_distribution('Products.CMFPlone').location
                        + 'Products/CMFPlone/__init__.py'),
         'Expected Plone to not be in development.')
Beispiel #2
0
 def test_in_development(self):
     self.assertTrue(
         in_development(get_distribution('ftw.lawgiver').location
                        + '/ftw/lawgiver/__init__.py'),
         'Expected ftw.lawgiver to be in development.')
     self.assertFalse(
         in_development(get_distribution('Products.CMFPlone').location
                        + 'Products/CMFPlone/__init__.py'),
         'Expected Plone to not be in development.')
Beispiel #3
0
    def update_all_specifications(self, output_formatter=None):
        discovery = getMultiAdapter((getSite(), getSite().REQUEST),
                                    IWorkflowSpecificationDiscovery)
        result = []
        for specification_path in discovery.discover():
            if not in_development(specification_path):
                if output_formatter:
                    output_formatter(
                        'warning',
                        _(u'warning_skipped_released_spec',
                          default=u'${id}: Skipping released specification.',
                          mapping={
                              'id': self._workflow_id(specification_path)}))
                continue

            self.write_workflow(specification_path,
                                output_formatter=output_formatter)
            self.update_translations(specification_path,
                                     output_formatter=output_formatter)
            result.append(specification_path)

        return result
Beispiel #4
0
    def update_all_specifications(self, output_formatter=None):
        discovery = getMultiAdapter((getSite(), getSite().REQUEST),
                                    IWorkflowSpecificationDiscovery)
        result = []
        for specification_path in discovery.discover():
            if not in_development(specification_path):
                if output_formatter:
                    output_formatter(
                        'warning',
                        _(u'warning_skipped_released_spec',
                          default=u'${id}: Skipping released specification.',
                          mapping={
                              'id': self._workflow_id(specification_path)
                          }))
                continue

            self.write_workflow(specification_path,
                                output_formatter=output_formatter)
            self.update_translations(specification_path,
                                     output_formatter=output_formatter)
            result.append(specification_path)

        return result
Beispiel #5
0
 def is_released_distribution(self):
     return not in_development(self.get_definition_path())
Beispiel #6
0
 def is_released_distribution(self):
     return not in_development(self.get_definition_path())