comee_core 0.1.49 → 0.1.51

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b3684b9a8c34e5336fb9807dbe0d5f6e2febc8052d10d83e6b48b34234b965e
4
- data.tar.gz: edb8e850be3e304310219b9a89778d8969ec129e04a6d4749da4afb0fa376ead
3
+ metadata.gz: 8507c4dd25c1bcfa029f438953fe12ec069c715c4bec5783f0653e4a87b77332
4
+ data.tar.gz: 474a2d3f78b9f0961130e2ace5dc66074b39d430c4c610b6b5a4ef0e2574c86b
5
5
  SHA512:
6
- metadata.gz: b6dc053ee12f89c8af8843d08e2e75287fce1bf9a66d9eddca75845ede987b77b11589675fcbc664135872d9aac29c7db3bc3e9a47f6b7fba1861e365395d5b2
7
- data.tar.gz: 1812781e0652ac0f8148bf2433aedadd59ff051f464e9f47358060cce19e26b1598102e1e4094857b0559a1c881b926a82d310d1f68896119c92a9a78de6f24d
6
+ metadata.gz: e65a2a474b37e891703e2f55b6c763b3ba8510c243d6cf8266fa987b7949b487c8086a29c8b5d49fda223d406ed5b6ae552a30c82e8e07a38e80bcaa4e02884c
7
+ data.tar.gz: 6573cf6978274afeafb4467e74e9fe34340244bd08dca739115fd07fabca16974b083f100029ebb77534cabb686775bb586725aaee37e6ca9085b23bdd4001f3
@@ -3,6 +3,7 @@ module Comee
3
3
  class Inventory < ApplicationRecord
4
4
  belongs_to :product
5
5
 
6
+ validates :hash_code, presence: true
6
7
  validates :quantity, presence: true, numericality: {greater_than: 0}
7
8
  end
8
9
  end
@@ -1,6 +1,7 @@
1
1
  class CreateComeeCoreInventories < ActiveRecord::Migration[7.0]
2
2
  def change
3
3
  create_table :comee_core_inventories do |t|
4
+ t.bigint :hash_code, null: false
4
5
  t.references :product,
5
6
  null: false,
6
7
  index: {name: "product_on_cci_indx"},
@@ -9,5 +10,6 @@ class CreateComeeCoreInventories < ActiveRecord::Migration[7.0]
9
10
 
10
11
  t.timestamps
11
12
  end
13
+ add_index :comee_core_inventories, :product_id, unique: true
12
14
  end
13
15
  end
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.1.49".freeze
3
+ VERSION = "0.1.51".freeze
4
4
  end
5
5
  end
@@ -1,5 +1,6 @@
1
1
  FactoryBot.define do
2
2
  factory :inventory, class: "Comee::Core::Inventory" do
3
+ hash_code { rand(1000000) }
3
4
  quantity { 200 }
4
5
  product
5
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comee_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.49
4
+ version: 0.1.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-13 00:00:00.000000000 Z
11
+ date: 2023-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers