cats_core 1.1.10 → 1.1.11

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: ad7b5e46d923da177a938b7b5728a731a9ce0dc5368bd3c9acae0670a713cbab
4
- data.tar.gz: 07b751a5a1eb18a7a3f9e4f4893ea1b21a9ac74c99c4e975c6fb132861e322b3
3
+ metadata.gz: bbc34455b593fd71880ccf827b6d2e3c9aea723471d877780d4f44b18297cb92
4
+ data.tar.gz: f2867e4a074fe84990e005a845844f06a3433e6fed52d9e56f12eb5943c061ed
5
5
  SHA512:
6
- metadata.gz: ca48a9753bfcaabe058712978d76f725502f89b3f4cdff386739dc881e3c737dcda23715b0dbb1cbdb7734c85275c5c0c135bb5a53e844a2eb61b4e3a17757eb
7
- data.tar.gz: 2f0626ceca03fd6203818f948b5c98ee94161aa6014df76de98836d1a5d8be6c1939df2b23dc0ae7c8f9a9cd9fc6f59c1e5791f0bc6f776ff35e53494dd547f2
6
+ metadata.gz: 13a7abd31cdaa640da8486fb394b7896e919c79229233fdee4f8fd5ebae5498f55987ba72f30189486812a9273be8efe4e246cd2bd9d410f32996bee1deff037
7
+ data.tar.gz: e9dafd860e39d9751a6ddade1adf4d6df4373c37c38f4e267ed2056b1eef7e756a1a29b4b44d62907329348e1a8d8e8d7998e4bd92d78baf2564e6ffc0daf7a6
@@ -3,8 +3,9 @@ module Cats
3
3
  class RhnRequest < ApplicationRecord
4
4
  belongs_to :commodity
5
5
 
6
- validates :reference_no, :request_date, presence: true
6
+ validates :reference_no, :request_date, :quantity, presence: true
7
7
  validates :reference_no, uniqueness: true
8
+ validates :quantity, numericality: { greater_than: 0 }
8
9
 
9
10
  delegate(:batch_no, to: :commodity, prefix: true)
10
11
  end
@@ -6,6 +6,7 @@ class CreateCatsCoreRhnRequests < ActiveRecord::Migration[6.1]
6
6
  null: false,
7
7
  index: { name: 'commodity_on_rhn_indx' },
8
8
  foreign_key: { to_table: :cats_core_commodities }
9
+ t.float :quantity, null: false
9
10
  t.date :request_date, null: false
10
11
  t.string :requested_by
11
12
 
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.1.10'.freeze
3
+ VERSION = '1.1.11'.freeze
4
4
  end
5
5
  end
@@ -2,6 +2,7 @@ FactoryBot.define do
2
2
  factory :rhn_request, class: 'Cats::Core::RhnRequest' do
3
3
  reference_no { FFaker::Name.name }
4
4
  commodity
5
+ quantity { 100 }
5
6
  request_date { Date.today }
6
7
  requested_by { FFaker::Name.name }
7
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cats_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
4
+ version: 1.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.