Skip to content

Commit

Permalink
Merge pull request #7 from theCapypara/ticket/RIP-15-xdebug3
Browse files Browse the repository at this point in the history
[RIP-15] Xdebug 3 Support: Changes and adjustments for new Xdebug functionality
  • Loading branch information
theCapypara authored Sep 28, 2021
2 parents e54bc57 + ed4d7b6 commit 3983a63
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions riptide/config/document/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ def get_config_dir(self):
return riptide_config_dir()

@variable_helper
def get_plugin_flag(self, inp: str) -> bool:
def get_plugin_flag(self, inp: str) -> any:
"""
Returns the value (true/false) of a flag set by a Riptide plugin.
Returns the value (usually true/false, but can also be other data) of a flag set by a Riptide plugin.
If the flag or plugin is not found, false is returned.
Expand Down
10 changes: 9 additions & 1 deletion riptide/engine/abstract.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import shutil
from abc import ABC, abstractmethod
from typing import Tuple, Dict, Union, List
from typing import Tuple, Dict, Union, List, Optional

from distutils.dir_util import copy_tree

Expand Down Expand Up @@ -368,3 +368,11 @@ def create_named_volume(self, name: str) -> None:
:raises: FileExistsError: If 'name' already exists.
"""
pass

@abstractmethod
def get_service_or_command_image_labels(self, obj: Tuple['Service', 'Command']) -> Optional[Dict[str, str]]:
"""
Returns the labels for the images assigned to the provided service or object as a dict.
Returns None if the service or command does not have an image or the image was not pulled yet.
"""
pass
2 changes: 1 addition & 1 deletion riptide/plugin/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def after_reload_config(self, config: 'Config'):
"""Called whenever a project is loaded or if the initial configuration is loaded without a project."""

@abstractmethod
def get_flag_value(self, config: 'Config', flag_name: str) -> bool:
def get_flag_value(self, config: 'Config', flag_name: str) -> any:
"""
Return the value of a requested plugin flag. Return False if not defined.
The current config is passed, to give a context about the calling project.
Expand Down
6 changes: 6 additions & 0 deletions riptide/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
import pkg_resources


class SystemFlag:
"""Useful runtime-dependant global system flags."""
# Whether or not Riptide is currently run via CLI.
IS_CLI = 0


def get_riptide_version():
"""Returns the current version of Riptide (lib) as a tuple (major, minor, patch).
3.0.1 would return (3, 0, 1).
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.5.5'
__version__ = '0.6.0'
from setuptools import setup, find_packages

# README read-in
Expand Down

0 comments on commit 3983a63

Please sign in to comment.