Sha256: 43a30beb0b894455961c4ca34ec652bf03f924c0356560e35725a227b9c21d16
Contents?: true
Size: 1 KB
Versions: 9
Compression:
Stored size: 1 KB
Contents
# frozen_string_literal: true module Extension module Forms class Connect < ShopifyCli::Form attr_reader :registration, :app flag_arguments :type class ExtensionProjectDetails include SmartProperties property :registration, accepts: Models::Registration property :app, accepts: Models::App def complete? !!(registration && app) end end def ask ShopifyCli::Result.wrap(ExtensionProjectDetails.new) .then(&Questions::AskRegistration.new(ctx: ctx, type: type)) .unwrap { |e| raise e } .tap do |project_details| ctx.abort(ctx.message("connect.incomplete_configuration")) unless project_details.complete? self.registration = project_details.registration self.app = project_details.app end end def directory_name name.strip.gsub(/( )/, "_").downcase end private attr_writer :registration, :app end end end
Version data entries
9 entries across 9 versions & 1 rubygems