dscf-core 0.2.5 → 0.2.7

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.
@@ -1,5 +1,5 @@
1
1
  module Dscf
2
2
  module Core
3
- VERSION = "0.2.5".freeze
3
+ VERSION = "0.2.7".freeze
4
4
  end
5
5
  end
@@ -0,0 +1,11 @@
1
+ FactoryBot.define do
2
+ factory :auditable_test_model, class: "AuditableTestModel" do
3
+ name { Faker::Company.name }
4
+ description { Faker::Company.catch_phrase }
5
+ contact_email { Faker::Internet.email }
6
+ contact_phone { Faker::PhoneNumber.phone_number }
7
+ tin_number { Faker::Number.number(digits: 10).to_s }
8
+ user
9
+ business_type
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ FactoryBot.define do
2
+ factory :audit_log, class: "Dscf::Core::AuditLog" do
3
+ auditable { association :business }
4
+ action { "update" }
5
+ audited_changes { {"name" => ["Old name", "New name"]} }
6
+ metadata { {} }
7
+ actor { association :user }
8
+ request_uuid { SecureRandom.uuid }
9
+ ip_address { "127.0.0.1" }
10
+ user_agent { "RSpec" }
11
+ end
12
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dscf-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Asrat
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-10-13 00:00:00.000000000 Z
10
+ date: 2025-11-12 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails
@@ -425,6 +425,7 @@ files:
425
425
  - MIT-LICENSE
426
426
  - README.md
427
427
  - Rakefile
428
+ - app/controllers/concerns/dscf/core/auditable_controller.rb
428
429
  - app/controllers/concerns/dscf/core/authenticatable.rb
429
430
  - app/controllers/concerns/dscf/core/common.rb
430
431
  - app/controllers/concerns/dscf/core/filterable.rb
@@ -439,11 +440,14 @@ files:
439
440
  - app/controllers/dscf/core/businesses_controller.rb
440
441
  - app/errors/dscf/core/authentication_error.rb
441
442
  - app/jobs/dscf/core/application_job.rb
443
+ - app/jobs/dscf/core/audit_logger_job.rb
442
444
  - app/mailers/dscf/core/application_mailer.rb
445
+ - app/models/concerns/dscf/core/auditable_model.rb
443
446
  - app/models/concerns/dscf/core/reviewable_model.rb
444
447
  - app/models/concerns/dscf/core/user_authenticatable.rb
445
448
  - app/models/dscf/core/address.rb
446
449
  - app/models/dscf/core/application_record.rb
450
+ - app/models/dscf/core/audit_log.rb
447
451
  - app/models/dscf/core/business.rb
448
452
  - app/models/dscf/core/business_type.rb
449
453
  - app/models/dscf/core/document.rb
@@ -454,6 +458,7 @@ files:
454
458
  - app/models/dscf/core/user_profile.rb
455
459
  - app/models/dscf/core/user_role.rb
456
460
  - app/serializers/dscf/core/address_serializer.rb
461
+ - app/serializers/dscf/core/audit_log_serializer.rb
457
462
  - app/serializers/dscf/core/business_serializer.rb
458
463
  - app/serializers/dscf/core/business_type_serializer.rb
459
464
  - app/serializers/dscf/core/document_serializer.rb
@@ -482,6 +487,7 @@ files:
482
487
  - db/migrate/20250824200927_make_email_and_phone_optional_for_users.rb
483
488
  - db/migrate/20250825192113_add_defaults_to_user_profiles.rb
484
489
  - db/migrate/20250926102025_create_dscf_core_reviews.rb
490
+ - db/migrate/20251023000000_create_dscf_core_audit_logs.rb
485
491
  - lib/dscf/core.rb
486
492
  - lib/dscf/core/engine.rb
487
493
  - lib/dscf/core/version.rb
@@ -491,7 +497,9 @@ files:
491
497
  - lib/generators/common/templates/request_spec.rb.erb
492
498
  - lib/generators/common/templates/serializer.rb.erb
493
499
  - lib/tasks/dscf/core_tasks.rake
500
+ - spec/factories/auditable_test_model.rb
494
501
  - spec/factories/dscf/core/addresses.rb
502
+ - spec/factories/dscf/core/audit_logs.rb
495
503
  - spec/factories/dscf/core/business_types.rb
496
504
  - spec/factories/dscf/core/businesses.rb
497
505
  - spec/factories/dscf/core/documents.rb