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
14 15 16 |
# File 'app/serializers/uffizzi_core/api/cli/v1/project_serializer.rb', line 14 def default_compose object.compose_files.main.first end |
#deployments ⇒ Object
18 19 20 21 22 23 |
# File 'app/serializers/uffizzi_core/api/cli/v1/project_serializer.rb', line 18 def deployments object.deployments.active.map do |deployment| deployment.state = UffizziCore::DeploymentService.failed?(deployment) ? 'failed' : 'active' deployment end end |
#secrets ⇒ Object
25 26 27 28 29 |
# File 'app/serializers/uffizzi_core/api/cli/v1/project_serializer.rb', line 25 def secrets return [] unless object.secrets object.secrets.map(&:name) end |