• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hivesolutions / colony-plugins / 1474

pending completion
1474

push

travis-ci-com

joamag
feat: new binaries

41245 of 79069 relevant lines covered (52.16%)

2.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

82.61
/wsgi/src/wsgi_plugin.py
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3

4
# Hive Colony Framework
5
# Copyright (c) 2008-2020 Hive Solutions Lda.
6
#
7
# This file is part of Hive Colony Framework.
8
#
9
# Hive Colony Framework is free software: you can redistribute it and/or modify
10
# it under the terms of the Apache License as published by the Apache
11
# Foundation, either version 2.0 of the License, or (at your option) any
12
# later version.
13
#
14
# Hive Colony Framework is distributed in the hope that it will be useful,
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# Apache License for more details.
18
#
19
# You should have received a copy of the Apache License along with
20
# Hive Colony Framework. If not, see <http://www.apache.org/licenses/>.
21

22
__author__ = "João Magalhães <joamag@hive.pt>"
11✔
23
""" The author(s) of the module """
24

25
__version__ = "1.0.0"
11✔
26
""" The version of the module """
27

28
__revision__ = "$LastChangedRevision$"
11✔
29
""" The revision number of the module """
30

31
__date__ = "$LastChangedDate$"
11✔
32
""" The last change date of the module """
33

34
__copyright__ = "Copyright (c) 2008-2020 Hive Solutions Lda."
11✔
35
""" The copyright for the module """
36

37
__license__ = "Apache License, Version 2.0"
11✔
38
""" The license for the module """
39

40
import colony
11✔
41

42
class WSGIPlugin(colony.Plugin):
11✔
43
    """
44
    The main class for the WSGI plugin.
45
    """
46

47
    id = "pt.hive.colony.plugins.wsgi"
11✔
48
    name = "WSGI"
11✔
49
    description = "Provides the basic mechanism to integrate\
11✔
50
    colony into an WSGI based infra-structure"
51
    version = "1.0.0"
11✔
52
    author = "Hive Solutions Lda. <development@hive.pt>"
11✔
53
    platforms = [
11✔
54
        colony.CPYTHON_ENVIRONMENT,
55
        colony.JYTHON_ENVIRONMENT,
56
        colony.IRON_PYTHON_ENVIRONMENT
57
    ]
58
    capabilities = [
11✔
59
        "wsgi"
60
    ]
61
    dependencies = [
11✔
62
        colony.PluginDependency("pt.hive.colony.plugins.rest")
63
    ]
64
    main_modules = [
11✔
65
        "wsgi"
66
    ]
67

68
    def load_plugin(self):
11✔
69
        colony.Plugin.load_plugin(self)
×
70
        import wsgi
×
71
        self.system = wsgi.WSGI(self)
×
72

73
    def handle(self, environ, start_response, prefix, alias, rewrite):
11✔
74
        return self.system.handle(environ, start_response, prefix, alias, rewrite)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc