dscf-banking 0.1.14 → 0.1.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: a4ca1ade5bfdb0a8bf2472275df55b6b4209c0306bcc747a8ca065637b159177
4
- data.tar.gz: 2d5d05152332e6d287dbbff3b1ec9ea255714015d7d59695f67f28986ee4cddc
3
+ metadata.gz: f53a3bc93d277dada58412069b4fbd4e5dda1878b4ebb361d55377ad1aa60338
4
+ data.tar.gz: 3b0890dcb58acccbe42e6edf620c0835a37a64fd5ce3f86ca0fc16ac2b723fd1
5
5
  SHA512:
6
- metadata.gz: b5e05d2e67811e0fb3edc22c2652cf1b0febfd34e3a9bde6c9a51facae604b90df1d14c141bc4a770a169d6b1d6e6fb2fbadbfc8a3a080bdc0ab5f61bf7077fe
7
- data.tar.gz: 05fe6fd1c9d99252eba049c1eda43510d9d3dff737833945cf79c20ba2aaf0daa0e7839ceed42a1226db91a4748f3a2a2dbeaa55c86154589bfc76439eccf918
6
+ metadata.gz: 66bfaaba90120d6a43baa41839b3d705aa6a2c923a82f28316253b0762ff3b2036dfe340df5c82c1898fb489184acd4764129b47e4f6f1da29ab396c89c1fac8
7
+ data.tar.gz: 62dedb335c91073a61d023b804d7e9b5e2ccb6c392097911640535484caa88fbbb58030bcdab05459ed32e389a5dcfab4d06991f4dd75c603a76097b1b120dbc
data/db/seeds.rb ADDED
@@ -0,0 +1,51 @@
1
+ # db/seeds.rb
2
+ # This file should contain all the record creation needed to seed the database with its default values.
3
+ # The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
4
+ #
5
+ # Examples:
6
+ #
7
+ # movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }])
8
+ # Character.create(name: "Luke", movie: movies.first)
9
+
10
+ # Seed roles based on RBAC documentation
11
+ puts "Seeding roles..."
12
+ user_role = Role.find_or_create_by(name: 'User')
13
+ officer_role = Role.find_or_create_by(name: 'Virtual Account Officer')
14
+ manager_role = Role.find_or_create_by(name: 'Virtual Account Manager')
15
+ kyc_officer_role = Role.find_or_create_by(name: 'KYC Officer')
16
+ branch_manager_role = Role.find_or_create_by(name: 'Branch Manager')
17
+ puts "Roles seeded successfully."
18
+
19
+ # Seed users with roles
20
+ puts "Seeding users..."
21
+ # Create users and assign roles
22
+ user1 = User.create(name: "Abebe Kebede", email: "abebe@example.com", password: "SecurePassword123!")
23
+ user1.roles << user_role
24
+ puts "Created user: #{user1.name}"
25
+
26
+ user2 = User.create(name: "Tigist Haile", email: "tigist@example.com", password: "SecurePassword123!")
27
+ user2.roles << officer_role
28
+ puts "Created user: #{user2.name}"
29
+
30
+ user3 = User.create(name: "Dawit Mekonnen", email: "dawit@example.com", password: "SecurePassword123!")
31
+ user3.roles << manager_role
32
+ puts "Created user: #{user3.name}"
33
+
34
+ # Additional users for testing
35
+ user4 = User.create(name: "Hirut Assefa", email: "hirut@example.com", password: "SecurePassword123!")
36
+ user4.roles << [user_role, officer_role] # User with multiple roles if supported
37
+ puts "Created user: #{user4.name}"
38
+
39
+ user5 = User.create(name: "Solomon Tesfaye", email: "solomon@example.com", password: "SecurePassword123!")
40
+ user5.roles << manager_role
41
+ puts "Created user: #{user5.name}"
42
+
43
+ user6 = User.create(name: "Mulugeta Bekele", email: "mulugeta@example.com", password: "SecurePassword123!")
44
+ user6.roles << kyc_officer_role
45
+ puts "Created user: #{user6.name}"
46
+
47
+ user7 = User.create(name: "Fikirte Alemayehu", email: "fikirte@example.com", password: "SecurePassword123!")
48
+ user7.roles << branch_manager_role
49
+ puts "Created user: #{user7.name}"
50
+
51
+ puts "Seeding completed successfully."
@@ -1,5 +1,5 @@
1
1
  module Dscf
2
2
  module Banking
3
- VERSION = "0.1.14"
3
+ VERSION = "0.1.15"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dscf-banking
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eyosiyas Mekbib
@@ -482,6 +482,7 @@ files:
482
482
  - db/migrate/20250831084706_allow_null_virtual_account_product_id_in_product_audit_logs.rb
483
483
  - db/migrate/20250912193134_create_dscf_banking_applications.rb
484
484
  - db/migrate/20250912203527_create_dscf_banking_accounts.rb
485
+ - db/seeds.rb
485
486
  - lib/dscf/banking.rb
486
487
  - lib/dscf/banking/engine.rb
487
488
  - lib/dscf/banking/version.rb