app_manager 2.3.7 → 2.4.0
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 +2 -2
- data/app/controllers/app_manager/plans_controller.rb +38 -5
- data/config/routes.rb +16 -19
- data/lib/app_manager/config.rb +5 -0
- data/lib/app_manager/fail_safe.rb +248 -1
- data/lib/app_manager/version.rb +1 -1
- data/lib/generators/app_manager/install/templates/app_manager.rb.tt +2 -0
- 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: 8ef9a51f2af61a37129f4654a1b2d60c4542cbfd3e229d34754f748180a1e75e
|
|
4
|
+
data.tar.gz: 6ca85b33ff77d3043f0cc683ab93f033df7964e6844edbf5b706fe2f2adff17f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2dbc7e0beb36d44be94178415ec4ea098bd5baf2ff799963987fa9df4d8bdb9044644a94a799568303ff8b089e8a878675ba318749cfc24adb0c705e3f51707c
|
|
7
|
+
data.tar.gz: e4dac67910df25ee2746af43fc70c394367da06ded486065140aa453c84d5873ded867ce3c94a6182fdbe265d4e271734cf0322eee3e1a01cece4a1de65e17c9
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
app_manager (2.
|
|
4
|
+
app_manager (2.4.0)
|
|
5
5
|
activerecord-import (~> 1.4)
|
|
6
6
|
httparty
|
|
7
7
|
kaminari (>= 0.16.3)
|
|
@@ -257,7 +257,7 @@ GEM
|
|
|
257
257
|
base64
|
|
258
258
|
websocket-extensions (>= 0.1.0)
|
|
259
259
|
websocket-extensions (0.1.5)
|
|
260
|
-
zeitwerk (2.7.
|
|
260
|
+
zeitwerk (2.7.5)
|
|
261
261
|
|
|
262
262
|
PLATFORMS
|
|
263
263
|
ruby
|
|
@@ -13,6 +13,8 @@ module AppManager
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def plans
|
|
16
|
+
most_popular_plan_ids_raw = AppManager.configuration.most_popular_plan_ids || []
|
|
17
|
+
most_popular_plan_ids = Array(most_popular_plan_ids_raw).filter_map { |v| v.to_s =~ /\A\d+\z/ ? v.to_i : nil }.uniq
|
|
16
18
|
active_plan_id_or_name = nil
|
|
17
19
|
shopify_plan = nil
|
|
18
20
|
plan = nil
|
|
@@ -96,6 +98,7 @@ module AppManager
|
|
|
96
98
|
'bundle_plan' => bundle_plan,
|
|
97
99
|
'bundle_details' => app_bundle_data,
|
|
98
100
|
'default_plan_id' => default_plan_id,
|
|
101
|
+
'most_popular_plan_ids' => most_popular_plan_ids,
|
|
99
102
|
'choose_later' => choose_later,
|
|
100
103
|
'has_active_charge' => (((active_charge && active_charge.any? && !active_charge['active_charge'].nil?) or !trial_activated_at) ? true : false),
|
|
101
104
|
'global_plan_charge' => plan.present? && plan['is_global'] && active_charge.present? && active_charge.any? && !active_charge['active_charge'].nil? && !active_charge['bundle_charge'].nil?
|
|
@@ -192,20 +195,50 @@ module AppManager
|
|
|
192
195
|
|
|
193
196
|
def fail_safe_backup
|
|
194
197
|
params_permit
|
|
198
|
+
backup_type = params[:backup_type] || "full"
|
|
199
|
+
if (backup_type == "incremental")
|
|
200
|
+
fail_safe_incremental_backup
|
|
201
|
+
else
|
|
202
|
+
rebuild_failsafe
|
|
203
|
+
end
|
|
204
|
+
head :ok
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
def fail_safe_incremental_backup
|
|
195
208
|
Thread.new do
|
|
196
209
|
@fs = AppManager::FailSafe.new
|
|
197
210
|
begin
|
|
198
|
-
|
|
211
|
+
@fs.sync_app_manager
|
|
199
212
|
rescue Exception => e
|
|
200
213
|
Rails.logger.info "APP MANAGER >>>> LOCAL DB couldn't sync with POTAL DB #{e.inspect}"
|
|
201
214
|
end
|
|
202
215
|
|
|
203
216
|
begin
|
|
204
|
-
|
|
205
|
-
|
|
217
|
+
@fs.fail_safe_incremental_backup(params)
|
|
218
|
+
rescue Exception => e
|
|
219
|
+
Rails.logger.info "APP MANAGER fail_safe_incremental_backup >>>> #{e.inspect}"
|
|
220
|
+
end
|
|
221
|
+
AppManager.clear_cache
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
def rebuild_failsafe
|
|
227
|
+
params_permit
|
|
228
|
+
Thread.new do
|
|
229
|
+
@fs = AppManager::FailSafe.new
|
|
230
|
+
begin
|
|
231
|
+
@fs.sync_app_manager
|
|
232
|
+
rescue Exception => e
|
|
233
|
+
Rails.logger.info "APP MANAGER >>>> LOCAL DB couldn't sync with POTAL DB #{e.inspect}"
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
begin
|
|
237
|
+
@fs.save_api_data(params)
|
|
238
|
+
rescue Exception => e
|
|
206
239
|
Rails.logger.info "APP MANAGER >>>> #{e.inspect}"
|
|
207
|
-
|
|
208
|
-
|
|
240
|
+
end
|
|
241
|
+
AppManager.clear_cache
|
|
209
242
|
end
|
|
210
243
|
head :ok
|
|
211
244
|
end
|
data/config/routes.rb
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
AppManager::Engine.routes.draw do
|
|
2
2
|
scope 'api/app-manager' do
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
scope 'app-manager-api' do
|
|
20
|
-
post 'store-charge' => 'plans#store_charge'
|
|
21
|
-
end
|
|
3
|
+
get 'marketing-banners' => 'banners#marketing_banner'
|
|
4
|
+
get 'plan-features' => 'plans#index'
|
|
5
|
+
get 'plans' => 'plans#plans'
|
|
6
|
+
get 'users' => 'plans#users'
|
|
7
|
+
post 'active-without-plan' => 'plans#active_without_plan'
|
|
8
|
+
post 'burst-cache' => 'plans#burst_cache'
|
|
9
|
+
post 'fail-safe-backup' => 'plans#fail_safe_backup'
|
|
10
|
+
post 'fail-safe-backup-full' => 'plans#rebuild_failsafe'
|
|
11
|
+
get 'plan/process/:plan_id' => 'charges#process_plan'
|
|
12
|
+
get 'plan/callback' => 'charges#callback', as: :plan_callback
|
|
13
|
+
post 'cancel-charge' => 'charges#cancel_charge'
|
|
14
|
+
post 'plan/activate-global' => 'charges#activate_global'
|
|
15
|
+
post 'plan/cancel-global' => 'charges#cancel_global'
|
|
16
|
+
scope 'app-manager-api' do
|
|
17
|
+
post 'store-charge' => 'plans#store_charge'
|
|
18
|
+
end
|
|
22
19
|
end
|
|
23
20
|
end
|
data/lib/app_manager/config.rb
CHANGED
|
@@ -14,6 +14,7 @@ module AppManager
|
|
|
14
14
|
attr_accessor :field_names
|
|
15
15
|
attr_accessor :refresh_by_request_params
|
|
16
16
|
attr_accessor :shopify_app_slug
|
|
17
|
+
attr_accessor :most_popular_plan_ids
|
|
17
18
|
attr_accessor :plan_page_route
|
|
18
19
|
|
|
19
20
|
def initialize
|
|
@@ -28,6 +29,7 @@ module AppManager
|
|
|
28
29
|
@plan_id_or_name_field = nil
|
|
29
30
|
@shopify_app_slug = nil
|
|
30
31
|
@plan_page_route = nil
|
|
32
|
+
@most_popular_plan_ids = []
|
|
31
33
|
@field_names = {
|
|
32
34
|
'name' => 'shopify_domain', # sample example: demo-chirag-parmar.myshopify.com
|
|
33
35
|
'shopify_email' => 'email', # chirag.p@hulkapps.com
|
|
@@ -94,5 +96,8 @@ module AppManager
|
|
|
94
96
|
@plan_page_route
|
|
95
97
|
end
|
|
96
98
|
|
|
99
|
+
def most_popular_plan_ids
|
|
100
|
+
@most_popular_plan_ids
|
|
101
|
+
end
|
|
97
102
|
end
|
|
98
103
|
end
|
|
@@ -110,7 +110,9 @@ module AppManager
|
|
|
110
110
|
store_base_plan = plan['store_base_plan'] ? 1 : 0
|
|
111
111
|
choose_later_plan = plan['choose_later_plan'] ? 1 : 0
|
|
112
112
|
is_external_charge = plan['is_external_charge'] ? 1 : 0
|
|
113
|
+
if !plan["id"].nil?
|
|
113
114
|
plan_data << AppManager::Plan.new(plan_id: plan["id"], type: plan["type"], name: plan["name"], price: plan["price"], offer_text: plan["offer_text"], description: plan["description"], interval: interval, shopify_plans: shopify_plans, trial_days: plan["trial_days"], test: plan_test, on_install: plan["on_install"], is_custom: is_custom, app_id: plan["app_id"], base_plan: plan["base_plan"], created_at: plan["created_at"], updated_at: plan["updated_at"], public: public_val, discount: plan["discount"], cycle_count: plan["cycle_count"], store_base_plan: store_base_plan, choose_later_plan: choose_later_plan, discount_type: plan["discount_type"], affiliate: affiliate, features: features, deleted_at: plan["deleted_at"],is_external_charge: plan["is_external_charge"],external_charge_limit: plan["external_charge_limit"],terms: plan["terms"])
|
|
115
|
+
end
|
|
114
116
|
end
|
|
115
117
|
AppManager::Plan.bulk_import plan_data
|
|
116
118
|
end
|
|
@@ -128,7 +130,9 @@ module AppManager
|
|
|
128
130
|
charge_data = []
|
|
129
131
|
charges.each do |charge|
|
|
130
132
|
charge_test = charge['test'] ? true : false
|
|
133
|
+
if !charge["id"].nil?
|
|
131
134
|
charge_data << AppManager::Charge.new(c_id: charge["id"],charge_id: charge["charge_id"], test: charge_test, status: charge["status"], name: charge["name"], type: charge["type"], price: charge["price"], interval: charge["interval"], trial_days: charge["trial_days"], billing_on: charge["billing_on"], activated_on: charge["activated_on"], trial_ends_on: charge["trial_ends_on"], cancelled_on: charge["cancelled_on"], expires_on: charge["expires_on"], plan_id: charge["plan_id"], description: charge["description"], shop_domain: charge["shop_domain"], created_at: charge["created_at"], updated_at: charge["updated_at"], app_id: charge["app_id"], sync: true)
|
|
135
|
+
end
|
|
132
136
|
end
|
|
133
137
|
AppManager::Charge.bulk_import charge_data
|
|
134
138
|
end
|
|
@@ -148,7 +152,7 @@ module AppManager
|
|
|
148
152
|
# apps_data << AppManager::App.new(id: app['id'], name: app['name'], slug: app['slug'], url: app['url'], image: app['image'], api_token: app['api_token'], slack: app['slack'], created_at: app['created_at'], updated_at: app['updated_at'])
|
|
149
153
|
apps_data << AppManager::App.new(app_id: app['id'],name: app['name'], slug: app['slug'], url: app['url'], image: app['image'], api_token: app['api_token'], slack: app['slack'], created_at: app['created_at'], updated_at: app['updated_at'])
|
|
150
154
|
end
|
|
151
|
-
AppManager::
|
|
155
|
+
AppManager::App.bulk_import apps_data
|
|
152
156
|
end
|
|
153
157
|
end
|
|
154
158
|
|
|
@@ -754,6 +758,249 @@ module AppManager
|
|
|
754
758
|
end
|
|
755
759
|
|
|
756
760
|
|
|
761
|
+
|
|
762
|
+
def standardize_data_format(data)
|
|
763
|
+
case data
|
|
764
|
+
when Array
|
|
765
|
+
data
|
|
766
|
+
when Hash
|
|
767
|
+
[data]
|
|
768
|
+
else
|
|
769
|
+
[]
|
|
770
|
+
end
|
|
771
|
+
end
|
|
772
|
+
|
|
773
|
+
def single_record?(data)
|
|
774
|
+
return true if data.is_a?(Hash) && data.key?("id")
|
|
775
|
+
return true if data.respond_to?(:id) && data.id.present?
|
|
776
|
+
false
|
|
777
|
+
end
|
|
778
|
+
|
|
779
|
+
def format_date(value)
|
|
780
|
+
Time.parse(value.to_s).strftime("%Y-%m-%d %H:%M:%S")
|
|
781
|
+
rescue
|
|
782
|
+
value
|
|
783
|
+
end
|
|
784
|
+
|
|
785
|
+
def filter_data(data, date_fields = [], exclude_keys = %w[app_id pivot])
|
|
786
|
+
rows = standardize_data_format(data)
|
|
787
|
+
|
|
788
|
+
processed = rows.map do |row|
|
|
789
|
+
row = row.is_a?(Hash) ? row : {}
|
|
790
|
+
serialize_row_for_failsafe(row, date_fields, exclude_keys)
|
|
791
|
+
end
|
|
792
|
+
|
|
793
|
+
processed.first || {}
|
|
794
|
+
end
|
|
795
|
+
|
|
796
|
+
def serialize_row_for_failsafe(row, date_fields, exclude_keys)
|
|
797
|
+
row.each_with_object({}) do |(key, value), result|
|
|
798
|
+
next if exclude_keys.include?(key.to_s)
|
|
799
|
+
|
|
800
|
+
if date_fields.include?(key.to_s) && value.present?
|
|
801
|
+
result[key] = format_date(value)
|
|
802
|
+
elsif value.is_a?(Hash) || value.is_a?(Array)
|
|
803
|
+
result[key] = value.to_json
|
|
804
|
+
else
|
|
805
|
+
result[key] = value
|
|
806
|
+
end
|
|
807
|
+
end
|
|
808
|
+
end
|
|
809
|
+
|
|
810
|
+
def fail_safe_incremental_backup(params)
|
|
811
|
+
params = params.to_unsafe_h.deep_stringify_keys
|
|
812
|
+
|
|
813
|
+
sync_type = params["sync_type"]
|
|
814
|
+
payload = params["payload"] || {}
|
|
815
|
+
|
|
816
|
+
#initialize_failsafe_db
|
|
817
|
+
|
|
818
|
+
date_fields = %w[
|
|
819
|
+
created_at
|
|
820
|
+
updated_at
|
|
821
|
+
deleted_at
|
|
822
|
+
valid_from
|
|
823
|
+
valid_to
|
|
824
|
+
cancelled_on
|
|
825
|
+
]
|
|
826
|
+
|
|
827
|
+
case sync_type
|
|
828
|
+
|
|
829
|
+
when "plans"
|
|
830
|
+
|
|
831
|
+
payload["plan_id"] = payload.delete("id")
|
|
832
|
+
payload["test"] ||= 0
|
|
833
|
+
|
|
834
|
+
filtered = filter_data(payload, date_fields)
|
|
835
|
+
|
|
836
|
+
record = AppManager::Plan.find_or_initialize_by(
|
|
837
|
+
plan_id: filtered["plan_id"]
|
|
838
|
+
)
|
|
839
|
+
|
|
840
|
+
record.update!(filtered)
|
|
841
|
+
when "plan-delete"
|
|
842
|
+
AppManager::Plan.where(plan_id: payload["id"]).delete_all
|
|
843
|
+
|
|
844
|
+
when "plan-user-delete"
|
|
845
|
+
AppManager::PlanUser.where(shop_domain: payload["shop_domain"]).delete_all
|
|
846
|
+
|
|
847
|
+
when "charges"
|
|
848
|
+
payload["c_id"] = payload.delete("id")
|
|
849
|
+
filtered = filter_data(payload, date_fields)
|
|
850
|
+
|
|
851
|
+
record = AppManager::Charge.find_or_initialize_by(c_id: filtered["c_id"])
|
|
852
|
+
record.update!(filtered)
|
|
853
|
+
|
|
854
|
+
when "charges-cancel"
|
|
855
|
+
AppManager::Charge
|
|
856
|
+
.where(shop_domain: payload["shop_domain"])
|
|
857
|
+
.update_all(
|
|
858
|
+
status: "cancelled",
|
|
859
|
+
cancelled_on: format_date(payload["cancelled_on"] || Time.current),
|
|
860
|
+
updated_at: format_date(Time.current)
|
|
861
|
+
)
|
|
862
|
+
|
|
863
|
+
when "banners"
|
|
864
|
+
record = AppManager::AppStructure.first_or_initialize
|
|
865
|
+
|
|
866
|
+
record.banners =
|
|
867
|
+
if payload.is_a?(String)
|
|
868
|
+
payload
|
|
869
|
+
else
|
|
870
|
+
payload.to_json
|
|
871
|
+
end
|
|
872
|
+
|
|
873
|
+
record.save!
|
|
874
|
+
|
|
875
|
+
when "promotional-discounts"
|
|
876
|
+
|
|
877
|
+
# Normalize main payload
|
|
878
|
+
payload["discount_id"] = payload.delete("id")
|
|
879
|
+
payload["discount_type"] = payload.delete("type")
|
|
880
|
+
|
|
881
|
+
filtered = filter_data(payload, date_fields, ["pivot"])
|
|
882
|
+
|
|
883
|
+
main_data = filtered.except(
|
|
884
|
+
"shops_relation",
|
|
885
|
+
"apps_relation",
|
|
886
|
+
"plans_relation",
|
|
887
|
+
"usage_relation"
|
|
888
|
+
)
|
|
889
|
+
|
|
890
|
+
discount = AppManager::Discount.find_or_initialize_by(
|
|
891
|
+
discount_id: main_data["discount_id"]
|
|
892
|
+
)
|
|
893
|
+
discount.update!(main_data)
|
|
894
|
+
|
|
895
|
+
# ==========================================================
|
|
896
|
+
# SHOPS RELATION
|
|
897
|
+
# ==========================================================
|
|
898
|
+
|
|
899
|
+
if payload["shops_relation"].present?
|
|
900
|
+
|
|
901
|
+
AppManager::DiscountShop
|
|
902
|
+
.where(discount_id: main_data["discount_id"])
|
|
903
|
+
.delete_all
|
|
904
|
+
|
|
905
|
+
rows = Array(payload["shops_relation"]).map do |row|
|
|
906
|
+
row = row.deep_stringify_keys
|
|
907
|
+
|
|
908
|
+
{
|
|
909
|
+
"discount_id" => main_data["discount_id"],
|
|
910
|
+
"domain" => row["domain"]
|
|
911
|
+
}
|
|
912
|
+
end
|
|
913
|
+
|
|
914
|
+
AppManager::DiscountShop.insert_all(rows) if rows.present?
|
|
915
|
+
end
|
|
916
|
+
|
|
917
|
+
# ==========================================================
|
|
918
|
+
# PLANS RELATION
|
|
919
|
+
# ==========================================================
|
|
920
|
+
|
|
921
|
+
if payload["plans_relation"].present?
|
|
922
|
+
|
|
923
|
+
AppManager::DiscountLinkPlan
|
|
924
|
+
.where(discount_id: main_data["discount_id"])
|
|
925
|
+
.delete_all
|
|
926
|
+
|
|
927
|
+
rows = Array(payload["plans_relation"]).map do |row|
|
|
928
|
+
row = row.deep_stringify_keys
|
|
929
|
+
|
|
930
|
+
{
|
|
931
|
+
"discount_id" => main_data["discount_id"],
|
|
932
|
+
"plan_id" => row["plan_id"]
|
|
933
|
+
}
|
|
934
|
+
end
|
|
935
|
+
|
|
936
|
+
AppManager::DiscountLinkPlan.insert_all(rows) if rows.present?
|
|
937
|
+
end
|
|
938
|
+
|
|
939
|
+
# ==========================================================
|
|
940
|
+
# USAGE RELATION
|
|
941
|
+
# ==========================================================
|
|
942
|
+
|
|
943
|
+
if payload["usage_relation"].present?
|
|
944
|
+
|
|
945
|
+
AppManager::DiscountUsageLog
|
|
946
|
+
.where(discount_id: main_data["discount_id"])
|
|
947
|
+
.delete_all
|
|
948
|
+
|
|
949
|
+
rows = Array(payload["usage_relation"]).map do |row|
|
|
950
|
+
row = row.deep_stringify_keys
|
|
951
|
+
puts "================"
|
|
952
|
+
puts row.inspect
|
|
953
|
+
puts "============="
|
|
954
|
+
{
|
|
955
|
+
"discount_id" => main_data["discount_id"],
|
|
956
|
+
"domain" => row["domain"],
|
|
957
|
+
"created_at" => row["created_at"],
|
|
958
|
+
"updated_at" => row["updated_at"],
|
|
959
|
+
"app_id" => row["app_id"],
|
|
960
|
+
"sync" => row['sync'],
|
|
961
|
+
"process_type" => row['process_type']
|
|
962
|
+
}
|
|
963
|
+
end
|
|
964
|
+
|
|
965
|
+
AppManager::DiscountUsageLog.insert_all(rows) if rows.present?
|
|
966
|
+
end
|
|
967
|
+
|
|
968
|
+
when "promotional-discounts-delete"
|
|
969
|
+
AppManager::Discount
|
|
970
|
+
.where(discount_id: payload["id"])
|
|
971
|
+
.update_all(
|
|
972
|
+
deleted_at: format_date(payload["deleted_at"] || Time.current),
|
|
973
|
+
updated_at: format_date(Time.current)
|
|
974
|
+
)
|
|
975
|
+
|
|
976
|
+
when "plan-discount"
|
|
977
|
+
filtered = filter_data(payload, date_fields)
|
|
978
|
+
|
|
979
|
+
record = AppManager::DiscountPlan.find_or_initialize_by(
|
|
980
|
+
discount_plan_id: filtered["discount_plan_id"]
|
|
981
|
+
)
|
|
982
|
+
record.update!(filtered)
|
|
983
|
+
|
|
984
|
+
when "plan-user"
|
|
985
|
+
filtered = filter_data(payload, date_fields)
|
|
986
|
+
|
|
987
|
+
record = AppManager::PlanUser.find_or_initialize_by(
|
|
988
|
+
plan_user_id: filtered["plan_user_id"]
|
|
989
|
+
)
|
|
990
|
+
record.update!(filtered)
|
|
991
|
+
|
|
992
|
+
when "extend-trial"
|
|
993
|
+
filtered = filter_data(payload, date_fields)
|
|
994
|
+
|
|
995
|
+
record = AppManager::ExtendTrial.find_or_initialize_by(
|
|
996
|
+
extend_trial_id: filtered["extend_trial_id"]
|
|
997
|
+
)
|
|
998
|
+
record.update!(filtered)
|
|
999
|
+
|
|
1000
|
+
else
|
|
1001
|
+
Rails.logger.error("Failsafe: Unhandled sync type: #{sync_type}")
|
|
1002
|
+
end
|
|
1003
|
+
end
|
|
757
1004
|
end
|
|
758
1005
|
|
|
759
1006
|
end
|
data/lib/app_manager/version.rb
CHANGED
|
@@ -8,6 +8,7 @@ AppManager.configure do |config|
|
|
|
8
8
|
config.shopify_domain_field = 'shopify_domain' #shopify domain field
|
|
9
9
|
config.plan_id_or_name_field = 'plan_id'
|
|
10
10
|
config.shopify_app_slug = '' #Add your app slug here
|
|
11
|
+
config.most_popular_plan_ids = [] #Add your app slug here
|
|
11
12
|
config.field_names = {
|
|
12
13
|
'name' => 'shopify_domain', # demo-rahul-tiwari.myshopify.com
|
|
13
14
|
'shopify_email' => 'email', # rahul.t@hulkapps.com
|
|
@@ -17,6 +18,7 @@ AppManager.configure do |config|
|
|
|
17
18
|
'created_at' => 'created_at', # 2022-04-15 10:43:05
|
|
18
19
|
'trial_activated_at' => 'trial_activated_at', # field name that stores trial start/activated date
|
|
19
20
|
'grandfathered' => 'grandfathered',
|
|
21
|
+
'partner_development' => 'partner_development',
|
|
20
22
|
'total_trial_days' => '' #optional, put a trial days field from your shops table otherwise leave it blank
|
|
21
23
|
}
|
|
22
24
|
config.plan_features = [
|
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
|
+
version: 2.4.0
|
|
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-02-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|