Sha256: aa9fa74741699c2e1864ed75e8150f888d65123263900b0ce68096ca82534524

Contents?: true

Size: 509 Bytes

Versions: 62

Compression:

Stored size: 509 Bytes

Contents

module Workarea
  class Lint
    class SkusMissingInventory < Lint
      def run
        catalog_skus.each do |sku|
          unless inventory_skus.include?(sku)
            error("#{sku}, Has Catalog::Variant but no matching Inventory::Sku")
          end
        end

        pricing_skus.each do |sku|
          if !catalog_skus.include?(sku) && !inventory_skus.include?(sku)
            error("#{sku},Has Pricing::Sku but no matching Inventory::Sku")
          end
        end
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.5.26 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.4.45 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.5.25 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.5.23 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.4.44 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.5.22 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.4.43 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.5.21 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.4.42 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.5.20 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.4.41 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.5.19 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.4.40 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.5.18 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.4.39 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.5.17 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.4.38 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.5.16 lib/workarea/lint/skus_missing_inventory.rb
workarea-core-3.4.37 lib/workarea/lint/skus_missing_inventory.rb