app_manager 1.3.9 → 1.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 +1 -1
- data/app/controllers/app_manager/charges_controller.rb +14 -2
- data/lib/app_manager/config.rb +6 -0
- 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: 323da6aca37d494397aea55d292e70a76b0a7280116fbda06eef42a23359147b
|
|
4
|
+
data.tar.gz: 9e73448ce7fd0d997780dde01638c8d9c342a9408faf58e28fe231d65b577a7b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12b8049dcef01005dce9b9debba9a0eb1d9921e73d4af6d629fb68fbb028711a26d9942031ed654bb93da656a2674e35d891f6bc6acf5b335db646e2a8698978
|
|
7
|
+
data.tar.gz: 62f134c579d43e5187bc0a8cb3c6dd172e36f8b040f2e2421657b7072ac4c7f0ccff910c333f79097380149db8dc4c15c98bcd309e947e347059314f92905a4b
|
data/Gemfile.lock
CHANGED
|
@@ -136,7 +136,11 @@ module AppManager
|
|
|
136
136
|
end
|
|
137
137
|
embed_host = Base64.encode64(params[:shop] + "/admin")
|
|
138
138
|
# redirect_to "/login?host=#{embed_host}&shop=#{shop}" and return
|
|
139
|
-
|
|
139
|
+
if app_slug.present?
|
|
140
|
+
redirect_to "https://#{params[:shop]}/admin/apps/#{app_slug}"
|
|
141
|
+
else
|
|
142
|
+
redirect_to "#{app_url}?host=#{embed_host}&shop=#{params[:shop]}", :status => 301 and return
|
|
143
|
+
end
|
|
140
144
|
else
|
|
141
145
|
raise Error, "Invalid shopify charge #{charges.insect}"
|
|
142
146
|
end
|
|
@@ -146,7 +150,11 @@ module AppManager
|
|
|
146
150
|
else
|
|
147
151
|
if params[:shop].present?
|
|
148
152
|
embed_host = Base64.encode64(params[:shop] + "/admin")
|
|
149
|
-
|
|
153
|
+
if app_slug.present?
|
|
154
|
+
redirect_to "https://#{params[:shop]}/admin/apps/#{app_slug}"
|
|
155
|
+
else
|
|
156
|
+
redirect_to "#{app_url}?host=#{embed_host}&shop=#{params[:shop]}", :status => 301 and return
|
|
157
|
+
end
|
|
150
158
|
else
|
|
151
159
|
raise Error, "Invalid params, must have charge_id,shop && plan in charge controller"
|
|
152
160
|
end
|
|
@@ -185,6 +193,10 @@ module AppManager
|
|
|
185
193
|
AppManager.configuration.app_url
|
|
186
194
|
end
|
|
187
195
|
|
|
196
|
+
def app_slug
|
|
197
|
+
AppManager.configuration.shopify_app_slug
|
|
198
|
+
end
|
|
199
|
+
|
|
188
200
|
def config_trial_days
|
|
189
201
|
@field_names = AppManager.configuration.field_names
|
|
190
202
|
if !@field_names.nil? && @field_names.has_key?('total_trial_days') && !@field_names['total_trial_days'].nil? && !@field_names['total_trial_days'].blank?
|
data/lib/app_manager/config.rb
CHANGED
|
@@ -13,6 +13,7 @@ module AppManager
|
|
|
13
13
|
attr_accessor :plan_id_or_name_field
|
|
14
14
|
attr_accessor :field_names
|
|
15
15
|
attr_accessor :refresh_by_request_params
|
|
16
|
+
attr_accessor :shopify_app_slug
|
|
16
17
|
|
|
17
18
|
def initialize
|
|
18
19
|
@refresh_by_request_params = true
|
|
@@ -24,6 +25,7 @@ module AppManager
|
|
|
24
25
|
@shopify_table_name = 'shops'
|
|
25
26
|
@shopify_domain_field = 'shopify_domain'
|
|
26
27
|
@plan_id_or_name_field = nil
|
|
28
|
+
@shopify_app_slug = nil
|
|
27
29
|
@field_names = {
|
|
28
30
|
'name' => 'shopify_domain', # sample example: demo-chirag-parmar.myshopify.com
|
|
29
31
|
'shopify_email' => 'email', # chirag.p@hulkapps.com
|
|
@@ -82,5 +84,9 @@ module AppManager
|
|
|
82
84
|
@refresh_by_request_params
|
|
83
85
|
end
|
|
84
86
|
|
|
87
|
+
def shopify_app_slug
|
|
88
|
+
@shopify_app_slug
|
|
89
|
+
end
|
|
90
|
+
|
|
85
91
|
end
|
|
86
92
|
end
|
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: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hulkapps
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-09-
|
|
11
|
+
date: 2022-09-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|