Class: UffizziCore::Api::Cli::V1::ProjectSerializer
- Inherits:
-
BaseSerializer
- Object
- BaseSerializer
- UffizziCore::Api::Cli::V1::ProjectSerializer
- Defined in:
- app/serializers/uffizzi_core/api/cli/v1/project_serializer.rb
Instance Method Summary collapse
Instance Method Details
#default_compose ⇒ Object
15 16 17 |
# File 'app/serializers/uffizzi_core/api/cli/v1/project_serializer.rb', line 15 def default_compose object.compose_files.main.first end |
#deployments ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'app/serializers/uffizzi_core/api/cli/v1/project_serializer.rb', line 19 def deployments object.deployments.active.map do |deployment| deployment.state = if UffizziCore::DeploymentService.failed?(deployment) UffizziCore::Deployment::STATE_FAILED else UffizziCore::Deployment::STATE_ACTIVE end deployment end end |
#secrets ⇒ Object
30 31 32 33 34 |
# File 'app/serializers/uffizzi_core/api/cli/v1/project_serializer.rb', line 30 def secrets return [] unless object.secrets object.secrets.map(&:name) end |