--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+"""
+@author: Frank Brehm
+@contact: frank.brehm@pixelpark.com
+@copyright: © 2017 by Frank Brehm, Berlin
+@summary: The module for the 'get-module-changes' application object.
+"""
+from __future__ import absolute_import
+
+# Standard modules
+import os
+import logging
+import textwrap
+import json
+import glob
+import datetime
+import fcntl
+import pwd
+import grp
+import errno
+import sys
+
+from operator import itemgetter
+
+# Third party modules
+import six
+import yaml
+
+from six import reraise
+
+# Own modules
+from . import __version__
+
+from .common import pp, to_bytes, to_bool
+
+from .base_app import BaseHookError, UncriticalHookError, BaseHookApp
+
+from .module_info import ModuleInfo
+
+from .module_list import ModuleInfoDict
+
+from .puppetfile import Puppetfile, PuppetfileError
+
+LOG = logging.getLogger(__name__)
+
+
+# =============================================================================
+class GetModuleChangesError(BaseHookError):
+
+ pass
+
+
+# =============================================================================
+class GetModuleChangesApp(BaseHookApp):
+ """
+ Class for the application objects.
+ """
+
+ default_env = 'development'
+
+ # -------------------------------------------------------------------------
+ def __init__(self, appname=None, verbose=0, version=__version__):
+ """Constructor."""
+
+ self.description = textwrap.dedent('''\
+ Generates a list of all Puppets modules, which are newer
+ in Puppet forge than in a defined environment
+ ''').strip()
+
+ super(GetModuleChangesApp, self).__init__(
+ appname=appname, verbose=verbose, version=version)
+
+ # -------------------------------------------------------------------------
+ def as_dict(self, short=True):
+ """
+ Transforms the elements of the object into a dict
+
+ @return: structure as dict
+ @rtype: dict
+ """
+
+ res = super(GetModuleChangesApp, self).as_dict(short=short)
+
+ res['default_env'] = self.default_env
+
+ return res
+
+ # -------------------------------------------------------------------------
+ def evaluate_config(self, config, yaml_file):
+
+ super(GetModuleChangesApp, self).evaluate_config(config, yaml_file)
+
+ # -------------------------------------------------------------------------
+ def post_init(self):
+
+ self.read_stdin = False
+ self.no_error_mail = True
+
+ self.initialized = True
+
+ # -------------------------------------------------------------------------
+ def run(self):
+ """Main routine."""
+
+ LOG.info("Here I go. ...")
+ module_infos = []
+ try:
+ module_infos = self.read_cache_file(only_main_branches=False)
+ except UncriticalHookError as e:
+ LOG.error(str(e))
+ self.exit(7)
+
+
+# =============================================================================
+
+if __name__ == "__main__":
+
+ pass
+
+# =============================================================================
+# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 list
+