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.19.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.18.1 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.18.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.17.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.16.1 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.16.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.15.6 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.15.5 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.15.4 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.15.3 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.15.2 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.15.1 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.15.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.14.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.13.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.12.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.11.2 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.11.1 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.11.0 lib/project_types/extension/loaders/specification_handler.rb
shopify-cli-2.10.2 lib/project_types/extension/loaders/specification_handler.rb