app_manager 2.4.0 → 2.4.1

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: 8ef9a51f2af61a37129f4654a1b2d60c4542cbfd3e229d34754f748180a1e75e
4
- data.tar.gz: 6ca85b33ff77d3043f0cc683ab93f033df7964e6844edbf5b706fe2f2adff17f
3
+ metadata.gz: c95901b20e1d3c4085bf8c8405134e61d4a4866e28639a172945e70de743dbfb
4
+ data.tar.gz: c121594095bf641eeed150a9622a4a94a6bbb422ae958833ded6250dc9a7c881
5
5
  SHA512:
6
- metadata.gz: 2dbc7e0beb36d44be94178415ec4ea098bd5baf2ff799963987fa9df4d8bdb9044644a94a799568303ff8b089e8a878675ba318749cfc24adb0c705e3f51707c
7
- data.tar.gz: e4dac67910df25ee2746af43fc70c394367da06ded486065140aa453c84d5873ded867ce3c94a6182fdbe265d4e271734cf0322eee3e1a01cece4a1de65e17c9
6
+ metadata.gz: 538a10b897e1345edabc150ae24d6629ec093ed3aa70b34f84be0ebbc2af3b82c8c29a6ed7be929a5d66c7b9af7a36bdf6a264a2d6ac6afa87a691913e6561d5
7
+ data.tar.gz: 48b7037ace77ff9db72c6d910d1108eaae836e0aae96e380ff4486a80e32f6a17e662fa68ffd84aafb66b9d07cc58f356077072de7f7ea24f716af372b3c1239
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_manager (2.4.0)
4
+ app_manager (2.4.1)
5
5
  activerecord-import (~> 1.4)
6
6
  httparty
7
7
  kaminari (>= 0.16.3)
@@ -103,7 +103,7 @@ GEM
103
103
  diff-lcs (1.6.2)
104
104
  dotenv (2.1.2)
105
105
  drb (2.2.3)
106
- erb (6.0.1)
106
+ erb (6.0.2)
107
107
  erubi (1.13.1)
108
108
  globalid (1.3.0)
109
109
  activesupport (>= 6.1)
@@ -147,7 +147,8 @@ GEM
147
147
  method_source (1.1.0)
148
148
  mini_mime (1.1.5)
149
149
  mini_portile2 (2.8.9)
150
- minitest (6.0.1)
150
+ minitest (6.0.2)
151
+ drb (~> 2.0)
151
152
  prism (~> 1.5)
152
153
  multi_xml (0.8.1)
153
154
  bigdecimal (>= 3.1, < 5)
@@ -205,8 +206,8 @@ GEM
205
206
  activesupport (>= 5.0.0)
206
207
  minitest
207
208
  nokogiri (>= 1.6)
208
- rails-html-sanitizer (1.6.2)
209
- loofah (~> 2.21)
209
+ rails-html-sanitizer (1.7.0)
210
+ loofah (~> 2.25)
210
211
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
211
212
  railties (8.1.2)
212
213
  actionpack (= 8.1.2)
@@ -140,7 +140,7 @@ module AppManager
140
140
 
141
141
  begin
142
142
  plan_obj = AppManager::Client.new
143
- if params[:discount].present? && !params[:discount].nil? && params[:discount] != '0' && !plan_data['is_global']
143
+ if params[:discount].present? && !params[:discount].nil? && params[:discount] != '0' && plan_data['is_global'] == 0
144
144
  discounted_plans = plan_obj.get_related_discounted_plans(params[:discount])
145
145
  if discounted_plans.empty? || discounted_plans.include?(params[:plan].to_i)
146
146
  plan_obj.discount_used(@shop[shopify_domain], params[:discount])
@@ -211,7 +211,7 @@ module AppManager
211
211
  if plan_users.any?
212
212
  extend_plan_users = []
213
213
  plan_users.each do |plan_user|
214
- extend_plan_users << AppManager::PlanUser.new(plan_user_id: plan_user['id'],shop_domain: plan_user['shop_domain'], plan_id: plan_user['plan_id'], created_by: plan_user['created_by'], created_at: plan_user['created_at'], updated_at: plan_user['updated_at'])
214
+ extend_plan_users << AppManager::PlanUser.new(plan_user_id: plan_user['id'],shop_domain: plan_user['shop_domain'], plan_id: plan_user['plan_id'], app_id: plan_user['app_id'],created_by: plan_user['created_by'], created_at: plan_user['created_at'], updated_at: plan_user['updated_at'])
215
215
  # extend_plan_users << AppManager::PlanUser.new(id: plan_user['id'], shop_domain: plan_user['shop_domain'], plan_id: plan_user['plan_id'], created_by: plan_user['created_by'], created_at: plan_user['created_at'], updated_at: plan_user['updated_at'])
216
216
  end
217
217
  AppManager::PlanUser.bulk_import extend_plan_users
@@ -948,9 +948,6 @@ module AppManager
948
948
 
949
949
  rows = Array(payload["usage_relation"]).map do |row|
950
950
  row = row.deep_stringify_keys
951
- puts "================"
952
- puts row.inspect
953
- puts "============="
954
951
  {
955
952
  "discount_id" => main_data["discount_id"],
956
953
  "domain" => row["domain"],
@@ -982,6 +979,7 @@ module AppManager
982
979
  record.update!(filtered)
983
980
 
984
981
  when "plan-user"
982
+ payload["plan_user_id"] = payload.delete("id")
985
983
  filtered = filter_data(payload, date_fields)
986
984
 
987
985
  record = AppManager::PlanUser.find_or_initialize_by(
@@ -997,8 +995,23 @@ module AppManager
997
995
  )
998
996
  record.update!(filtered)
999
997
 
998
+ when "promotional-discounts-app-removed"
999
+
1000
+ discount_id = payload["id"]
1001
+
1002
+ AppManager::Discount
1003
+ .where(discount_id: discount_id)
1004
+ .delete_all
1005
+
1006
+ AppManager::DiscountShop
1007
+ .where(discount_id: discount_id)
1008
+ .delete_all
1009
+
1010
+ AppManager::DiscountUsageLog
1011
+ .where(discount_id: discount_id)
1012
+ .delete_all
1000
1013
  else
1001
- Rails.logger.error("Failsafe: Unhandled sync type: #{sync_type}")
1014
+ # Rails.logger.error("Failsafe: Unhandled sync type: #{sync_type}")
1002
1015
  end
1003
1016
  end
1004
1017
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppManager
4
- VERSION = "2.4.0"
4
+ VERSION = "2.4.1"
5
5
  end
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.0
4
+ version: 2.4.1
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-26 00:00:00.000000000 Z
11
+ date: 2026-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty