tiny_builder 0.2.3 → 0.2.4
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/lib/models/mongo_warehouse.rb +8 -0
- data/lib/models/mongo_wh_mapping.rb +8 -0
- data/lib/tiny_builder/data_loader.rb +7 -4
- data/lib/tiny_builder/version.rb +1 -1
- data/lib/tiny_builder.rb +2 -0
- metadata +4 -3
- data/lib/tiny_builder/allocation.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8dbf4464a0ba8a69a013088f5905e51fd5317ab25cc73cd68899532ba72b6bc
|
4
|
+
data.tar.gz: c714ea7c8353c7bba0d4f87196b3ff70277abdd38974a9e93946cb8220fe5c9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2e605f5d05efbe4a2287063a59da8a33ce7acc01da2af36341198cb37f7288052f3d81596e8badea6ec4e033cce4fa9ac3662e8359c4141529b2446063b4bc4
|
7
|
+
data.tar.gz: 3886feb17d84a0dc62edf3816d1407371b5b27f1118195f997de9e3d65c51134e0c552e42f01049173b1471dff16c945c4b3c00ed50c146242287854b8c81914
|
@@ -26,9 +26,12 @@ class TinyBuilder
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def warehouse_mappings
|
29
|
-
@warehouse_mappings ||=
|
30
|
-
|
31
|
-
|
29
|
+
@warehouse_mappings ||= get_warehouse_mappings
|
30
|
+
end
|
31
|
+
|
32
|
+
def get_warehouse_mappings
|
33
|
+
wh_mappings = MongoWarehouseMapping.where(profile_channel_association_id: account_id).map{|wm| wm}
|
34
|
+
wh_mappings.select{|wm| !MongoWarehouse.find_by(old_id: wm.warehouse_id).consignment }
|
32
35
|
end
|
33
36
|
|
34
37
|
def warehouse_mapping
|
@@ -36,7 +39,7 @@ class TinyBuilder
|
|
36
39
|
end
|
37
40
|
|
38
41
|
def mapped_wh_mappings
|
39
|
-
@mapped_wh_mappings ||= warehouse_mappings.
|
42
|
+
@mapped_wh_mappings ||= warehouse_mappings.map{|wm| [wm.warehouse_id, wm.channel_warehouse_id] }.to_h
|
40
43
|
end
|
41
44
|
|
42
45
|
def associated_listings
|
data/lib/tiny_builder/version.rb
CHANGED
data/lib/tiny_builder.rb
CHANGED
@@ -5,6 +5,8 @@ require 'models/master_product'
|
|
5
5
|
require 'models/mongo_item_listing'
|
6
6
|
require 'models/mongo_variant_listing'
|
7
7
|
require 'models/mongo_warehouse_space'
|
8
|
+
require 'models/mongo_warehouse'
|
9
|
+
require 'models/mongo_wh_mapping'
|
8
10
|
require 'models/allocation'
|
9
11
|
require 'tiny_builder/version'
|
10
12
|
require 'tiny_builder/mode_executor'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiny_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hayakaza
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -133,11 +133,12 @@ files:
|
|
133
133
|
- lib/models/master_product.rb
|
134
134
|
- lib/models/mongo_item_listing.rb
|
135
135
|
- lib/models/mongo_variant_listing.rb
|
136
|
+
- lib/models/mongo_warehouse.rb
|
136
137
|
- lib/models/mongo_warehouse_space.rb
|
138
|
+
- lib/models/mongo_wh_mapping.rb
|
137
139
|
- lib/tiny_builder.rb
|
138
140
|
- lib/tiny_builder/active_builder.rb
|
139
141
|
- lib/tiny_builder/allocated_stock.rb
|
140
|
-
- lib/tiny_builder/allocation.rb
|
141
142
|
- lib/tiny_builder/apigateway_helper.rb
|
142
143
|
- lib/tiny_builder/base_builder.rb
|
143
144
|
- lib/tiny_builder/data_loader.rb
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class Allocation
|
4
|
-
include Mongoid::Document
|
5
|
-
include Mongoid::Attributes::Dynamic
|
6
|
-
|
7
|
-
store_in collection: 'warehouse_space_allocations', client: 'inventory'
|
8
|
-
|
9
|
-
belongs_to :warehouse_space, class_name: 'MongoWarehouseSpace'
|
10
|
-
end
|