app_manager 2.4.2 → 2.4.3
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/Gemfile.lock +1 -1
- data/lib/app_manager/fail_safe.rb +33 -25
- data/lib/app_manager/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0290bbafdb7d1f3176dc2fa2a81f2826e5ca3fad4438786347b6ad4b075e8c08'
|
|
4
|
+
data.tar.gz: 57f949f7c33cf5aa80d1c58fc0d5d30e9d55a91e76907ce194c59e0f846fcb01
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25811aad36f0e14134924c08563b56358910e8e47371d040adc9045d0e41fe0aaece9cb7a6346d816d5df0396c987b634e9f7cc0ea646a04fa0774b76d2d2441
|
|
7
|
+
data.tar.gz: 6ae46323bb5bcade4371e2142d70148e8b8dfb555e2a79ed2ac145457a42fd525087631e0df5a12cf7c83b75619fd5ece268b73b927ffce4933d4838b57c382d
|
data/Gemfile.lock
CHANGED
|
@@ -895,56 +895,63 @@ module AppManager
|
|
|
895
895
|
# ==========================================================
|
|
896
896
|
# SHOPS RELATION
|
|
897
897
|
# ==========================================================
|
|
898
|
-
|
|
899
|
-
if payload["shops_relation"].present?
|
|
898
|
+
if payload.key?("shops_relation")
|
|
900
899
|
|
|
901
900
|
AppManager::DiscountShop
|
|
902
|
-
|
|
903
|
-
|
|
901
|
+
.where(discount_id: main_data["discount_id"])
|
|
902
|
+
.delete_all
|
|
904
903
|
|
|
905
|
-
|
|
906
|
-
row = row.deep_stringify_keys
|
|
904
|
+
if payload["shops_relation"].present?
|
|
907
905
|
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
906
|
+
rows = Array(payload["shops_relation"]).map do |row|
|
|
907
|
+
row = row.deep_stringify_keys
|
|
908
|
+
|
|
909
|
+
{
|
|
910
|
+
"discount_id" => main_data["discount_id"],
|
|
911
|
+
"domain" => row["domain"]
|
|
912
|
+
}
|
|
913
|
+
end
|
|
914
|
+
|
|
915
|
+
AppManager::DiscountShop.insert_all(rows) if rows.present?
|
|
912
916
|
end
|
|
913
917
|
|
|
914
|
-
AppManager::DiscountShop.insert_all(rows) if rows.present?
|
|
915
918
|
end
|
|
916
|
-
|
|
917
919
|
# ==========================================================
|
|
918
920
|
# PLANS RELATION
|
|
919
921
|
# ==========================================================
|
|
920
922
|
|
|
921
|
-
if payload
|
|
923
|
+
if payload.key?("plans_relation")
|
|
922
924
|
|
|
923
925
|
AppManager::DiscountLinkPlan
|
|
924
926
|
.where(discount_id: main_data["discount_id"])
|
|
925
927
|
.delete_all
|
|
926
928
|
|
|
927
|
-
|
|
928
|
-
row = row.deep_stringify_keys
|
|
929
|
+
if payload["plans_relation"].present?
|
|
929
930
|
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
931
|
+
rows = Array(payload["plans_relation"]).map do |row|
|
|
932
|
+
row = row.deep_stringify_keys
|
|
933
|
+
|
|
934
|
+
{
|
|
935
|
+
"discount_id" => main_data["discount_id"],
|
|
936
|
+
"plan_id" => row["plan_id"]
|
|
937
|
+
}
|
|
938
|
+
end
|
|
939
|
+
|
|
940
|
+
AppManager::DiscountLinkPlan.insert_all(rows) if rows.present?
|
|
934
941
|
end
|
|
935
942
|
|
|
936
|
-
AppManager::DiscountLinkPlan.insert_all(rows) if rows.present?
|
|
937
943
|
end
|
|
938
|
-
|
|
939
944
|
# ==========================================================
|
|
940
945
|
# USAGE RELATION
|
|
941
946
|
# ==========================================================
|
|
947
|
+
#
|
|
948
|
+
if payload.key?("usage_relation")
|
|
942
949
|
|
|
943
|
-
|
|
950
|
+
AppManager::DiscountUsageLog
|
|
951
|
+
.where(discount_id: main_data["discount_id"])
|
|
952
|
+
.delete_all
|
|
944
953
|
|
|
945
|
-
|
|
946
|
-
.where(discount_id: main_data["discount_id"])
|
|
947
|
-
.delete_all
|
|
954
|
+
if payload["usage_relation"].present?
|
|
948
955
|
|
|
949
956
|
rows = Array(payload["usage_relation"]).map do |row|
|
|
950
957
|
row = row.deep_stringify_keys
|
|
@@ -961,6 +968,7 @@ module AppManager
|
|
|
961
968
|
|
|
962
969
|
AppManager::DiscountUsageLog.insert_all(rows) if rows.present?
|
|
963
970
|
end
|
|
971
|
+
end
|
|
964
972
|
|
|
965
973
|
when "promotional-discounts-delete"
|
|
966
974
|
AppManager::Discount
|
data/lib/app_manager/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: app_manager
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.4.
|
|
4
|
+
version: 2.4.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rahul Tiwari @ Hulkapps
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02
|
|
11
|
+
date: 2026-03-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|