Class: Ci::Catalog::Resources::ValidateService
- Inherits:
-
Object
- Object
- Ci::Catalog::Resources::ValidateService
- Defined in:
- app/services/ci/catalog/resources/validate_service.rb
Constant Summary collapse
- MINIMUM_AMOUNT_OF_COMPONENTS =
1
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(project, ref) ⇒ ValidateService
constructor
A new instance of ValidateService.
Constructor Details
#initialize(project, ref) ⇒ ValidateService
9 10 11 12 13 |
# File 'app/services/ci/catalog/resources/validate_service.rb', line 9 def initialize(project, ref) @project = project @ref = ref @errors = [] end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/services/ci/catalog/resources/validate_service.rb', line 15 def execute verify_presence_project_readme verify_presence_project_description scan_directory_for_components if errors.empty? ServiceResponse.success else ServiceResponse.error(message: errors.join(', ')) end end |