Sha256: 844a3a873e5a153e1fecea7b9b5fc66eb071f3ec7bcae19205f8405bfe7ca791

Contents?: true

Size: 685 Bytes

Versions: 45

Compression:

Stored size: 685 Bytes

Contents

# frozen_string_literal: true

module Extension
  module Loaders
    module SpecificationHandler
      def self.load(project:, context:)
        identifier = project.specification_identifier
        Models::LazySpecificationHandler.new(identifier) do
          specifications = Models::Specifications.new(
            fetch_specifications: Tasks::FetchSpecifications.new(api_key: project.app.api_key, context: context)
          )

          unless specifications.valid?(identifier)
            raise ShopifyCLI::Abort, context.message("errors.unknown_type", project.specification_identifier)
          end

          specifications[identifier]
        end
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
shopify-cli-2.36.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.35.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.34.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.33.1 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.33.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.32.1 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.32.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.31.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.30.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.29.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.28.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.27.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.26.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.25.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.24.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.23.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.22.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.21.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.20.1 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.20.0 lib/project_types/extension/loaders/specification_handler.rb