Class: Extension::Features::ArgoSetupStep

Inherits:
Object
  • Object
show all
Includes:
SmartProperties
Defined in:
lib/project_types/extension/features/argo_setup_step.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.always_successful(&block) ⇒ Object



26
27
28
# File 'lib/project_types/extension/features/argo_setup_step.rb', line 26

def self.always_successful(&block)
  ArgoSetupStep.new(step: block, can_fail: false)
end

.default(&block) ⇒ Object



22
23
24
# File 'lib/project_types/extension/features/argo_setup_step.rb', line 22

def self.default(&block)
  ArgoSetupStep.new(step: block, can_fail: true)
end

Instance Method Details

#call(context, identifier, directory_name, js_system) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/project_types/extension/features/argo_setup_step.rb', line 11

def call(context, identifier, directory_name, js_system)
  step_result = step.call(context, identifier, directory_name, js_system)
  can_fail? ? step_result : true
rescue ShopifyCLI::Abort => e
  context.puts(e.message)
  false
rescue StandardError => e
  context.puts("{{x}} #{e.message}")
  false
end