cats_core 1.0.38 → 1.0.39

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: f003ab02e18c4d6748354703954b989a2854beb06d6cedde9a1417dd033b6b0d
4
- data.tar.gz: ec1a54e9e760cf5a8c84109d526b7a6da50696b31bd3647a82b910e108dca482
3
+ metadata.gz: dbd96f5c771c2adceaa0d3c058ba5643b6e38189b4a5afdfbe666affab5a3c36
4
+ data.tar.gz: b55e4ab59388139d7c591194059f001af370df848077f446640ec3e1dc25f975
5
5
  SHA512:
6
- metadata.gz: d21df2b1e4f3052deda19c879fbc0d3c4f4d5bf9754a7c91e6b7260a7ff1cf64292a68da01d847a9caec74d933cded52952d3de3c627afcd9b6a0bd426019cd0
7
- data.tar.gz: 2afec4b8dedd8eb129bd3ad61cc3bcf766c69eb1fbc0d45ef12f18085b62db3856bbc298720be52cc63f040451904cd966cfc6b64fcf6d57037b76254b63f54b
6
+ metadata.gz: '0812bb8e9484cc6dd7f375434c294e7f82320999a9a3ae7a5793c6ede1592fe9eefe50895892895cabe240d1c0fa12197dd9bf2479e1f816d8d31f3c98fe7575'
7
+ data.tar.gz: dc903f04dddb57c08c4c80c0a3c0135b85254a12bc634414a96eab76bdb39c85cf96e2f37abf47d4853b084651a843d45bd42b5cf2771d0667fdab152e260569
@@ -9,7 +9,7 @@ module Cats
9
9
  MEHER = 'Meher'.freeze
10
10
  SEASONS = [BELG, MEHER].freeze
11
11
 
12
- belongs_to :ration
12
+ belongs_to :ration, optional: true
13
13
  has_many :hrp_items
14
14
 
15
15
  validates :reference_no, :year, :status, presence: true
@@ -2,7 +2,6 @@ module Cats
2
2
  module Core
3
3
  class HrpItemDetail < ApplicationRecord
4
4
  belongs_to :hrp_item
5
- belongs_to :hrp_ration
6
5
  belongs_to :ration_item
7
6
 
8
7
  validates :amount, presence: true, numericality: { greater_than: 0 }
@@ -7,7 +7,7 @@ class CreateCatsCoreHrps < ActiveRecord::Migration[6.1]
7
7
  t.string :status, null: false, default: 'Draft'
8
8
 
9
9
  t.references :ration,
10
- null: false,
10
+ null: true,
11
11
  index: { name: 'ration_on_hrp_indx' },
12
12
  foreign_key: { to_table: :cats_core_rations }
13
13
 
@@ -5,10 +5,6 @@ class CreateCatsCoreHrpItemDetails < ActiveRecord::Migration[6.1]
5
5
  null: false,
6
6
  index: { name: 'hi_on_hid_indx' },
7
7
  foreign_key: { to_table: :cats_core_hrp_items }
8
- t.references :hrp_ration,
9
- null: false,
10
- index: { name: 'hr_on_hid_indx' },
11
- foreign_key: { to_table: :cats_core_hrp_rations }
12
8
  t.references :ration_item,
13
9
  null: false,
14
10
  index: { name: 'ri_on_hid_indx' },
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.0.38'.freeze
3
+ VERSION = '1.0.39'.freeze
4
4
  end
5
5
  end
@@ -1,7 +1,6 @@
1
1
  FactoryBot.define do
2
2
  factory :hrp_item_detail, class: 'Cats::Core::HrpItemDetail' do
3
3
  hrp_item
4
- hrp_ration
5
4
  ration_item
6
5
  amount { 150 }
7
6
  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.0.38
4
+ version: 1.0.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.
@@ -243,7 +243,6 @@ files:
243
243
  - app/models/cats/core/hrp.rb
244
244
  - app/models/cats/core/hrp_item.rb
245
245
  - app/models/cats/core/hrp_item_detail.rb
246
- - app/models/cats/core/hrp_ration.rb
247
246
  - app/models/cats/core/location.rb
248
247
  - app/models/cats/core/menu.rb
249
248
  - app/models/cats/core/menu_item.rb
@@ -296,7 +295,6 @@ files:
296
295
  - db/migrate/20210717031343_create_cats_core_ration_items.rb
297
296
  - db/migrate/20210717031810_create_cats_core_hrps.rb
298
297
  - db/migrate/20210717032024_create_cats_core_hrp_items.rb
299
- - db/migrate/20210717032106_create_cats_core_hrp_rations.rb
300
298
  - db/migrate/20210717032240_create_cats_core_hrp_item_details.rb
301
299
  - db/migrate/20210717032330_create_cats_core_donations.rb
302
300
  - db/migrate/20210717032602_create_cats_core_gift_certificates.rb
@@ -333,7 +331,6 @@ files:
333
331
  - spec/factories/cats/core/gift_certificates.rb
334
332
  - spec/factories/cats/core/hrp_item_details.rb
335
333
  - spec/factories/cats/core/hrp_items.rb
336
- - spec/factories/cats/core/hrp_rations.rb
337
334
  - spec/factories/cats/core/hrps.rb
338
335
  - spec/factories/cats/core/locations.rb
339
336
  - spec/factories/cats/core/menu_items.rb
@@ -1,10 +0,0 @@
1
- module Cats
2
- module Core
3
- class HrpRation < ApplicationRecord
4
- belongs_to :hrp
5
- belongs_to :ration
6
-
7
- validates :hrp_id, uniqueness: true
8
- end
9
- end
10
- end
@@ -1,17 +0,0 @@
1
- class CreateCatsCoreHrpRations < ActiveRecord::Migration[6.1]
2
- def change
3
- create_table :cats_core_hrp_rations do |t|
4
- t.references :hrp,
5
- null: false,
6
- index: { name: 'hrp_on_hr_indx' },
7
- foreign_key: { to_table: :cats_core_hrps }
8
- t.references :ration,
9
- null: false,
10
- index: { name: 'ration_on_hr_indx' },
11
- foreign_key: { to_table: :cats_core_rations }
12
-
13
- t.timestamps
14
- end
15
- add_index(:cats_core_hrp_rations, :hrp_id, unique: true)
16
- end
17
- end
@@ -1,6 +0,0 @@
1
- FactoryBot.define do
2
- factory :hrp_ration, class: 'Cats::Core::HrpRation' do
3
- hrp
4
- ration
5
- end
6
- end