Sha256: db06661773fbb486ae6c7dd47849a407999b1126e8cba7cc99812039122a3452

Contents?: true

Size: 502 Bytes

Versions: 62

Compression:

Stored size: 502 Bytes

Contents

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

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

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.15 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.4.36 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.5.14 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.4.35 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.5.13 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.4.34 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.5.12 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.4.33 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.5.11 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.5.10 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.4.32 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.5.9 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.4.31 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.5.8 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.4.30 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.5.7 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.4.29 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.5.6 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.4.28 lib/workarea/lint/skus_missing_pricing.rb
workarea-core-3.5.5 lib/workarea/lint/skus_missing_pricing.rb