cats_core 1.4.28 → 1.4.31
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee7760669a69dc6d1df8d3fe4cd79365ac759ab1ac8197e8d4e5020be437df17
|
4
|
+
data.tar.gz: 780bfaad187ab3c971cc1d073ff50e46702b2eaa46889fe3b2ea372f489751e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e02a405acb7159588c446fdfc5cfd396d539167fef0a7d41df8f2b8ced64894eb2a02f43e1d2e23fd7d84432c50b0d5cda0ab69c8cd051fe784ee8215ddd8364
|
7
|
+
data.tar.gz: ad68bf4257f469b9c4d5b5a2713d9dc13b908b02d0cfe7430e651332acea306868802250514679879ea432beb84f95c4148fb06b56c69d3ed0db954a42a2e0d2
|
@@ -9,7 +9,8 @@ module Cats
|
|
9
9
|
validates :plan_item_id, uniqueness: { scope: :beneficiary_category_id }
|
10
10
|
|
11
11
|
validates :rounds, presence: true, numericality: { greater_than: 0 }, if: :psnp?
|
12
|
-
validates :rounds_served, presence: true, numericality: { greater_than_or_equal_to: 0 }, allow_nil: true,
|
12
|
+
validates :rounds_served, presence: true, numericality: { greater_than_or_equal_to: 0 }, allow_nil: true,
|
13
|
+
if: :psnp?
|
13
14
|
validates :rounds, :rounds_served, absence: true, unless: :psnp?
|
14
15
|
validate :validate_rounds
|
15
16
|
|
@@ -80,6 +80,11 @@ module Cats
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def stack
|
83
|
+
# check if all receipt transactions have been committed and change status
|
84
|
+
# of dispatch to stacked.
|
85
|
+
statuses = receipt_transactions.map(&:status).uniq
|
86
|
+
return unless statuses.length == 1 && statuses[0] == Transaction::COMMITTED
|
87
|
+
|
83
88
|
self.dispatch_status = STACKED
|
84
89
|
save!
|
85
90
|
end
|
data/lib/cats/core/version.rb
CHANGED
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.4.
|
4
|
+
version: 1.4.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henock L.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|