cats_core 1.1.11 → 1.1.12

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: bbc34455b593fd71880ccf827b6d2e3c9aea723471d877780d4f44b18297cb92
4
- data.tar.gz: f2867e4a074fe84990e005a845844f06a3433e6fed52d9e56f12eb5943c061ed
3
+ metadata.gz: 94bf88876f024323ea55e55b6a01fe74af037d2dda21c0c673d969e603d4d3ff
4
+ data.tar.gz: 865354149f6c009cec575207990fd8c5b47bbf002e5a884f6a2dd717886ba1d8
5
5
  SHA512:
6
- metadata.gz: 13a7abd31cdaa640da8486fb394b7896e919c79229233fdee4f8fd5ebae5498f55987ba72f30189486812a9273be8efe4e246cd2bd9d410f32996bee1deff037
7
- data.tar.gz: e9dafd860e39d9751a6ddade1adf4d6df4373c37c38f4e267ed2056b1eef7e756a1a29b4b44d62907329348e1a8d8e8d7998e4bd92d78baf2564e6ffc0daf7a6
6
+ metadata.gz: 20da152cd17a483350c82d530d24e09489b0b85a2150752b3bd008902346364cc8cd506dcd8c3c4306558ec47be7a34b5c4215e5bbba7772173b0a1d120ea42f
7
+ data.tar.gz: 5ef09f36850fcc7a1ce7af5bb5f584d4fe6c1245edc0df3ed1226985fb38e493ac9589036d749b98cdb2db75413fc68356538b1c4035ace11368504dc4bc339d
@@ -0,0 +1,8 @@
1
+ module Cats
2
+ module Core
3
+ class NotificationRule < ApplicationRecord
4
+ validates :code, :roles, presence: true
5
+ validates :code, uniqueness: true
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ class CreateCatsCoreNotificationRules < ActiveRecord::Migration[6.1]
2
+ def change
3
+ create_table :cats_core_notification_rules do |t|
4
+ t.string :code, unique: true
5
+ t.string :roles, array: true, null: false
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.1.11'.freeze
3
+ VERSION = '1.1.12'.freeze
4
4
  end
5
5
  end
@@ -0,0 +1,6 @@
1
+ FactoryBot.define do
2
+ factory :notification_rule, class: 'Cats::Core::NotificationRule' do
3
+ code { FFaker::Name.name }
4
+ roles { %i[role1 role2] }
5
+ end
6
+ 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.1.11
4
+ version: 1.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-30 00:00:00.000000000 Z
11
+ date: 2021-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers
@@ -266,6 +266,7 @@ files:
266
266
  - app/models/cats/core/menu.rb
267
267
  - app/models/cats/core/menu_item.rb
268
268
  - app/models/cats/core/notification.rb
269
+ - app/models/cats/core/notification_rule.rb
269
270
  - app/models/cats/core/operator.rb
270
271
  - app/models/cats/core/program.rb
271
272
  - app/models/cats/core/purchase_order.rb
@@ -339,6 +340,7 @@ files:
339
340
  - db/migrate/20210727074646_create_cats_core_receipts.rb
340
341
  - db/migrate/20210814160628_create_cats_core_receipt_transactions.rb
341
342
  - db/migrate/20210814175406_create_cats_core_stack_transactions.rb
343
+ - db/migrate/20211002050739_create_cats_core_notification_rules.rb
342
344
  - lib/cats/core.rb
343
345
  - lib/cats/core/engine.rb
344
346
  - lib/cats/core/version.rb
@@ -361,6 +363,7 @@ files:
361
363
  - spec/factories/cats/core/locations.rb
362
364
  - spec/factories/cats/core/menu_items.rb
363
365
  - spec/factories/cats/core/menus.rb
366
+ - spec/factories/cats/core/notification_rules.rb
364
367
  - spec/factories/cats/core/notifications.rb
365
368
  - spec/factories/cats/core/operators.rb
366
369
  - spec/factories/cats/core/programs.rb