• 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

73.33
/info_user/src/info_user_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 InfoUserPlugin(colony.Plugin):
11✔
43
    """
44
    The main class for the User Information plugin.
45
    """
46

47
    id = "pt.hive.colony.plugins.info.user"
11✔
48
    name = "User Info"
11✔
49
    description = "The plugin that offers the user information support"
11✔
50
    version = "1.0.0"
11✔
51
    author = "Hive Solutions Lda. <development@hive.pt>"
11✔
52
    platforms = [
11✔
53
        colony.CPYTHON_ENVIRONMENT,
54
        colony.JYTHON_ENVIRONMENT
55
    ]
56
    capabilities = [
11✔
57
        "info.user"
58
    ]
59
    main_modules = [
11✔
60
        "info_user"
61
    ]
62

63
    def load_plugin(self):
11✔
64
        colony.Plugin.load_plugin(self)
×
65
        import info_user
×
66
        self.system = info_user.InfoUser(self)
×
67

68
    @colony.set_configuration_property
11✔
69
    def set_configuration_property(self, property_name, property):
2✔
70
        colony.Plugin.set_configuration_property(self, property_name, property)
×
71

72
    @colony.unset_configuration_property
11✔
73
    def unset_configuration_property(self, property_name):
2✔
74
        colony.Plugin.unset_configuration_property(self, property_name)
×
75

76
    def get_user_info(self, user):
11✔
77
        return self.system.get_user_info(user)
×
78

79
    @colony.set_configuration_property_method("configuration")
11✔
80
    def configuration_set_configuration_property(self, property_name, property):
2✔
81
        self.system.set_configuration_property(property)
×
82

83
    @colony.unset_configuration_property_method("configuration")
11✔
84
    def configuration_unset_configuration_property(self, property_name):
2✔
85
        self.system.unset_configuration_property()
×
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