bscf-core 0.4.6 → 0.4.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.
- checksums.yaml +4 -4
- data/app/models/bscf/core/address.rb +1 -1
- data/app/models/bscf/core/business_document.rb +1 -2
- data/db/migrate/20250624062746_rename_business_id_to_user_id_in_bscf_core_business_documents.rb +7 -0
- data/lib/bscf/core/version.rb +1 -1
- data/spec/factories/bscf/core/business_documents.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cf47c7e66d0f00820cfd5175bb4d0dcaf7059018bf48f22a60b41014d7042ff
|
4
|
+
data.tar.gz: f688c46d920deba1e26a836ebabe17277591dd67b9b1bd4d3bbc0c415ece887a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc807f5982ce22a1ee9d952331707fe9a11e4d6295d507d0a8695971b0f8d3d12467e96069754d12a5ac54cd01c05210032d423ce2066e92d5fbeecb6e8be656
|
7
|
+
data.tar.gz: 3c1f6a338140d61b4942767f4cc54fbb67cdb69195b9847d7fba5d28f5d63ab015031243a122fd319fbf572221a6ccd1fc5673262b0606cb41f3487dcd0fc011
|
@@ -11,7 +11,7 @@ module Bscf
|
|
11
11
|
validates :latitude, :longitude, presence: true, if: :requires_coordinates?
|
12
12
|
|
13
13
|
def coordinates
|
14
|
-
[latitude.to_f, longitude.to_f] if latitude.present? && longitude.present?
|
14
|
+
[ latitude.to_f, longitude.to_f ] if latitude.present? && longitude.present?
|
15
15
|
end
|
16
16
|
|
17
17
|
def full_address
|
@@ -1,14 +1,13 @@
|
|
1
1
|
module Bscf
|
2
2
|
module Core
|
3
3
|
class BusinessDocument < ApplicationRecord
|
4
|
-
belongs_to :
|
4
|
+
belongs_to :user
|
5
5
|
has_one_attached :file
|
6
6
|
|
7
7
|
before_validation :format_document_name
|
8
8
|
|
9
9
|
validates :document_number, presence: true
|
10
10
|
validates :document_name, presence: true
|
11
|
-
validates :business_id, presence: true
|
12
11
|
validates :verified_at, presence: true, if: :is_verified?
|
13
12
|
validates :file, presence: true
|
14
13
|
validate :block_executable_files
|
data/db/migrate/20250624062746_rename_business_id_to_user_id_in_bscf_core_business_documents.rb
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
class RenameBusinessIdToUserIdInBscfCoreBusinessDocuments < ActiveRecord::Migration[8.0]
|
2
|
+
def change
|
3
|
+
remove_foreign_key :bscf_core_business_documents, column: :business_id
|
4
|
+
rename_column :bscf_core_business_documents, :business_id, :user_id
|
5
|
+
add_foreign_key :bscf_core_business_documents, :bscf_core_users, column: :user_id
|
6
|
+
end
|
7
|
+
end
|
data/lib/bscf/core/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
FactoryBot.define do
|
2
2
|
factory :business_document, class: 'Bscf::Core::BusinessDocument' do
|
3
|
-
|
3
|
+
user
|
4
4
|
document_number { "DOC-#{SecureRandom.hex(4).upcase}" }
|
5
5
|
document_name { "Business License" }
|
6
6
|
document_description { "Official business license document" }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bscf-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Asrat
|
@@ -359,6 +359,7 @@ files:
|
|
359
359
|
- db/migrate/20250616145522_add_position_to_delivery_order_items.rb
|
360
360
|
- db/migrate/20250623113112_add_drop_off_adress_to_orders.rb
|
361
361
|
- db/migrate/20250623115615_remove_dropoff_address_from_delivery_orders.rb
|
362
|
+
- db/migrate/20250624062746_rename_business_id_to_user_id_in_bscf_core_business_documents.rb
|
362
363
|
- lib/bscf/core.rb
|
363
364
|
- lib/bscf/core/engine.rb
|
364
365
|
- lib/bscf/core/version.rb
|