gibson-cli 0.3.4__tar.gz → 0.3.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gibson_cli-0.3.4/gibson_cli.egg-info → gibson_cli-0.3.5}/PKG-INFO +1 -1
- gibson_cli-0.3.5/gibson/services/code/customization/Authenticator.py +13 -0
- gibson_cli-0.3.5/gibson/services/code/customization/BaseCustomization.py +45 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/services/code/customization/CustomizationManager.py +5 -1
- gibson_cli-0.3.5/gibson/services/code/customization/Index.py +13 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5/gibson_cli.egg-info}/PKG-INFO +1 -1
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson_cli.egg-info/SOURCES.txt +1 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/pyproject.toml +1 -1
- gibson_cli-0.3.4/gibson/services/code/customization/Authenticator.py +0 -51
- gibson_cli-0.3.4/gibson/services/code/customization/BaseCustomization.py +0 -12
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/.gitignore +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/.pre-commit-config.yaml +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/README.md +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/bin/build.sh +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/bin/release.sh +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/api/BaseApi.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/api/Cli.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/bin/gibson.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/BaseCommand.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Build.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Code.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Conf.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Count.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Dev.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Forget.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Import.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/List.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Merge.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Model.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Modify.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Module.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/New.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/OpenApi.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Question.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Remove.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Rename.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Schema.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Show.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Test.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Tree.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/Version.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/WarGames.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/auth/Auth.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/auth/Login.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/auth/Logout.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/rewrite/Api.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/rewrite/Base.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/rewrite/Models.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/rewrite/Rewrite.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/rewrite/Schemas.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/rewrite/Tests.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/tests/test_command_BaseCommand.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/command/tests/test_command_Conf.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/Api.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/Code.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/Custom.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/Datastore.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/Dependencies.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/Dev.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/Frameworks.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/Modeler.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/Paths.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/Platform.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/Project.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/Version.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/dev/Api.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/dev/Base.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/dev/Model.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/dev/Schema.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/tests/test_conf_Dependencies.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/conf/tests/test_conf_Platform.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/core/Colors.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/core/CommandRouter.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/core/Completions.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/core/Configuration.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/core/Conversation.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/core/Env.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/core/Memory.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/core/TimeKeeper.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/core/utils.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/data/bash-completion.tmpl +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/data/default-ref-table.tmpl +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/data/default-table.tmpl +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/db/TableExceptions.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/db/tests/test_db_TableExceptions.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/dev/Dev.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/display/Header.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/display/WorkspaceFooter.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/display/WorkspaceHeader.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/display/tests/test_display_Header.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/display/tests/test_display_WorkspaceFooter.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/display/tests/test_display_WorkspaceHeader.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/lang/Python.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/lang/tests/test_lang_Python.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/services/auth/Server.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/services/code/context/schema/DataDictionary.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/services/code/context/schema/EntityKeys.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/services/code/context/schema/Manager.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/services/code/context/schema/tests/test_code_context_schema_DataDictionary.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/services/code/context/schema/tests/test_code_context_schema_EntityKeys.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/services/code/context/schema/tests/test_code_context_schema_Manager.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/services/code/customization/tests/test_code_customization_Authenticator.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/services/code/customization/tests/test_code_customization_BaseCustomization.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/structure/Entity.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/structure/constraints/ReferenceConstraint.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/structure/keys/ForeignKey.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/structure/keys/Index.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/structure/keys/IndexAttribute.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/structure/keys/tests/test_ForeignKey.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/structure/keys/tests/test_Index.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/structure/keys/tests/test_IndexAttribute.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/structure/testing.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/structure/tests/test_Entity.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/tests/test_Env.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/tests/test_Memory.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/tests/test_utils.py +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson_cli.egg-info/dependency_links.txt +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson_cli.egg-info/entry_points.txt +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson_cli.egg-info/top_level.txt +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/requirements.txt +0 -0
- {gibson_cli-0.3.4 → gibson_cli-0.3.5}/setup.cfg +0 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
import os
|
2
|
+
|
3
|
+
from gibson.services.code.customization.BaseCustomization import BaseCustomization
|
4
|
+
|
5
|
+
|
6
|
+
class Authenticator(BaseCustomization):
|
7
|
+
def _get_file_name(self):
|
8
|
+
return os.path.expandvars(
|
9
|
+
self.configuration.project.dev.api.path
|
10
|
+
+ "/"
|
11
|
+
+ self.configuration.project.dev.api.version
|
12
|
+
+ "/Authenticator.py"
|
13
|
+
)
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import os
|
2
|
+
|
3
|
+
from gibson.core.Configuration import Configuration
|
4
|
+
|
5
|
+
|
6
|
+
class BaseCustomization:
|
7
|
+
def __init__(self, configuration: Configuration):
|
8
|
+
self.__link_target = None
|
9
|
+
self.__file_contents = None
|
10
|
+
self.configuration = configuration
|
11
|
+
|
12
|
+
def _get_file_name(self):
|
13
|
+
return NotImplementedError
|
14
|
+
|
15
|
+
def preserve(self):
|
16
|
+
file_name = self._get_file_name()
|
17
|
+
|
18
|
+
if os.path.islink(file_name):
|
19
|
+
self.__link_target = os.readlink(file_name)
|
20
|
+
elif os.path.isfile(file_name):
|
21
|
+
with open(file_name, "r") as f:
|
22
|
+
self.__file_contents = f.read()
|
23
|
+
|
24
|
+
return self
|
25
|
+
|
26
|
+
def restore(self):
|
27
|
+
file_name = self._get_file_name()
|
28
|
+
|
29
|
+
if self.__link_target is not None:
|
30
|
+
try:
|
31
|
+
os.unlink(file_name)
|
32
|
+
except FileNotFoundError:
|
33
|
+
pass
|
34
|
+
|
35
|
+
os.symlink(self.__link_target, file_name)
|
36
|
+
elif self.__file_contents is not None:
|
37
|
+
try:
|
38
|
+
os.unlink(file_name)
|
39
|
+
except FileNotFoundError:
|
40
|
+
pass
|
41
|
+
|
42
|
+
with open(file_name, "w") as f:
|
43
|
+
f.write(self.__file_contents)
|
44
|
+
|
45
|
+
return self
|
{gibson_cli-0.3.4 → gibson_cli-0.3.5}/gibson/services/code/customization/CustomizationManager.py
RENAMED
@@ -1,11 +1,15 @@
|
|
1
1
|
from gibson.core.Configuration import Configuration
|
2
2
|
from gibson.services.code.customization.Authenticator import Authenticator
|
3
|
+
from gibson.services.code.customization.Index import Index
|
3
4
|
|
4
5
|
|
5
6
|
class CustomizationManager:
|
6
7
|
def __init__(self, configuration: Configuration):
|
7
8
|
self.configuration = configuration
|
8
|
-
self.customizations = [
|
9
|
+
self.customizations = [
|
10
|
+
Authenticator(self.configuration),
|
11
|
+
Index(self.configuration),
|
12
|
+
]
|
9
13
|
|
10
14
|
def preserve(self):
|
11
15
|
for customization in self.customizations:
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import os
|
2
|
+
|
3
|
+
from gibson.services.code.customization.BaseCustomization import BaseCustomization
|
4
|
+
|
5
|
+
|
6
|
+
class Index(BaseCustomization):
|
7
|
+
def _get_file_name(self):
|
8
|
+
return os.path.expandvars(
|
9
|
+
self.configuration.project.dev.api.path
|
10
|
+
+ "/"
|
11
|
+
+ self.configuration.project.dev.api.version
|
12
|
+
+ "/routers/index.py"
|
13
|
+
)
|
@@ -94,6 +94,7 @@ gibson/services/code/context/schema/tests/test_code_context_schema_Manager.py
|
|
94
94
|
gibson/services/code/customization/Authenticator.py
|
95
95
|
gibson/services/code/customization/BaseCustomization.py
|
96
96
|
gibson/services/code/customization/CustomizationManager.py
|
97
|
+
gibson/services/code/customization/Index.py
|
97
98
|
gibson/services/code/customization/tests/test_code_customization_Authenticator.py
|
98
99
|
gibson/services/code/customization/tests/test_code_customization_BaseCustomization.py
|
99
100
|
gibson/structure/Entity.py
|
@@ -1,51 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
|
3
|
-
from gibson.core.Configuration import Configuration
|
4
|
-
from gibson.services.code.customization.BaseCustomization import BaseCustomization
|
5
|
-
|
6
|
-
|
7
|
-
class Authenticator(BaseCustomization):
|
8
|
-
def __init__(self, configuration: Configuration):
|
9
|
-
super().__init__(configuration)
|
10
|
-
self.__link_target = None
|
11
|
-
self.__file_contents = None
|
12
|
-
|
13
|
-
def __get_file_name(self):
|
14
|
-
return os.path.expandvars(
|
15
|
-
self.configuration.project.dev.api.path
|
16
|
-
+ "/"
|
17
|
-
+ self.configuration.project.dev.api.version
|
18
|
-
+ "/Authenticator.py"
|
19
|
-
)
|
20
|
-
|
21
|
-
def preserve(self):
|
22
|
-
authenticator_file_name = self.__get_file_name()
|
23
|
-
|
24
|
-
if os.path.islink(authenticator_file_name):
|
25
|
-
self.__link_target = os.readlink(authenticator_file_name)
|
26
|
-
elif os.path.isfile(authenticator_file_name):
|
27
|
-
with open(authenticator_file_name, "r") as f:
|
28
|
-
self.__file_contents = f.read()
|
29
|
-
|
30
|
-
return self
|
31
|
-
|
32
|
-
def restore(self):
|
33
|
-
authenticator_file_name = self.__get_file_name()
|
34
|
-
|
35
|
-
if self.__link_target is not None:
|
36
|
-
try:
|
37
|
-
os.unlink(authenticator_file_name)
|
38
|
-
except FileNotFoundError:
|
39
|
-
pass
|
40
|
-
|
41
|
-
os.symlink(self.__link_target, authenticator_file_name)
|
42
|
-
elif self.__file_contents is not None:
|
43
|
-
try:
|
44
|
-
os.unlink(authenticator_file_name)
|
45
|
-
except FileNotFoundError:
|
46
|
-
pass
|
47
|
-
|
48
|
-
with open(authenticator_file_name, "w") as f:
|
49
|
-
f.write(self.__file_contents)
|
50
|
-
|
51
|
-
return self
|
@@ -1,12 +0,0 @@
|
|
1
|
-
from gibson.core.Configuration import Configuration
|
2
|
-
|
3
|
-
|
4
|
-
class BaseCustomization:
|
5
|
-
def __init__(self, configuration: Configuration):
|
6
|
-
self.configuration = configuration
|
7
|
-
|
8
|
-
def preserve(self):
|
9
|
-
raise NotImplementedError
|
10
|
-
|
11
|
-
def restore(self):
|
12
|
-
raise NotImplementedError
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|