Sha256: 8addffcb921733d549e2ae2935b95a4e172e14377696c23c488430725cffba2e
Contents?: true
Size: 1013 Bytes
Versions: 31
Compression:
Stored size: 1013 Bytes
Contents
# frozen_string_literal: true require 'eac_launcher/instances/error' module EacLauncher module Publish class Base attr_reader :instance def initialize(instance) @instance = instance end def run s = check info("Check: #{s}") return unless s.status == ::EacLauncher::Publish::CheckResult::STATUS_PENDING publish end def check s = check_with_rescue ::EacLauncher::Context.current.instance_manager.publish_state_set( instance, stereotype.stereotype_name, s.status ) s end private def stereotype self.class.name.deconstantize.constantize end def check_with_rescue internal_check rescue ::EacLauncher::Instances::Error => e ::EacLauncher::Publish::CheckResult.blocked("Error: #{e}") rescue ::EacLauncher::Git::Error => e ::EacLauncher::Publish::CheckResult.blocked("Git error: #{e}") end end end end
Version data entries
31 entries across 31 versions & 2 rubygems