cats_core 1.5.14 → 1.5.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e2ffcd4caf018a81ee3d83fabd7b7e20ddf97c9f6309a66a005805c78c41bc4
4
- data.tar.gz: 4d139393006f70306d84cbef40f273e1e578cf855783f63dc1ee37ff2d2e979f
3
+ metadata.gz: 6457c97964fc710efb411ae032843b88a46ce765fbf60464599f792c93207b67
4
+ data.tar.gz: 1b53f9c80054286052e21d6b10177b4811c358a4dc6e38cd71c5fb1a794807e6
5
5
  SHA512:
6
- metadata.gz: '0309049d3508085b5cacfb155388fab2de02480a91b7869b9b2f1f5e8a51e6f574a70955e04aaa8b9524fd3f374410a27c864217d524557015eaf08b293ff57c'
7
- data.tar.gz: 3667ef926f2952820d2b6c73c20fe3515ccdd411f7e8b91605e90f7e3bcaba7507611f74f76a2f389e4236eb96ca63ab4e6ef10da74c146b97b753dc5dec595f
6
+ metadata.gz: 8acd12651e100d5ebdf42c37aaaaca6d2aff0925a8fe54c44ae10d329a62ca2dc391b19d35fc66fb4955b9de822ebcb6edecead4a9b642ac6f0c7ca682088375
7
+ data.tar.gz: 0fbaee0d078bb58773c7e0f0be993b50a922b441a6d08b7f55bf9b843642c85aa098c83b1ce491f7cf718877488852c87762eceb049ee66dddda813853c7878e
@@ -7,7 +7,7 @@ module Cats
7
7
  belongs_to :dispatch_authorization
8
8
 
9
9
  validates :source_id, uniqueness: { scope: :dispatch_authorization_id }
10
- validates :reference_no, presence: true
10
+ # validates :reference_no, presence: true
11
11
  validate :validate_dispatch
12
12
  validate :validate_source_quantity, :validate_authorized_quantity, unless: :skip_quantity_validation
13
13
 
@@ -9,7 +9,7 @@ module Cats
9
9
  validates :commodity_status, presence: true, inclusion: { in: Commodity::COMMODITY_STATUSES }
10
10
  validates :commodity_grade, inclusion: { in: Commodity::COMMODITY_GRADES }, allow_nil: true
11
11
  validates :quantity, presence: true, numericality: { greater_than: 0 }
12
- validates :reference_no, presence: true
12
+ # validates :reference_no, presence: true
13
13
  validate :validate_quantity
14
14
 
15
15
  delegate(:abbreviation, to: :unit, prefix: true)
@@ -52,7 +52,7 @@ module Cats
52
52
  def validate_rounds
53
53
  return unless rounds && plan
54
54
 
55
- errors.add(:rounds, 'cannot be an empty list') if rounds.length.zero?
55
+ errors.add(:rounds, 'cannot be an empty list') if rounds.empty?
56
56
 
57
57
  existing_rounds = plan.round_plans.where(region: region).map(&:rounds).sum([])
58
58
  rounds.each do |round|
@@ -1,5 +1,5 @@
1
1
  class AddReferenceNoToCatsCoreReceipts < ActiveRecord::Migration[7.0]
2
2
  def change
3
- add_column :cats_core_receipts, :reference_no, :string, null: false
3
+ add_column :cats_core_receipts, :reference_no, :string, null: true
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  class AddReferenceNoToCatsCoreDispatchTransactions < ActiveRecord::Migration[7.0]
2
2
  def change
3
- add_column :cats_core_dispatch_transactions, :reference_no, :string, null: false
3
+ add_column :cats_core_dispatch_transactions, :reference_no, :string, null: true
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.5.14'.freeze
3
+ VERSION = '1.5.15'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cats_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.14
4
+ version: 1.5.15
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-01-29 00:00:00.000000000 Z
11
+ date: 2023-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers