app_manager 1.4.2 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +23 -21
- data/app/controllers/app_manager/charges_controller.rb +1 -1
- data/lib/app_manager/fail_safe.rb +10 -6
- 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: 12f885e36cfc5b5d0884b2728fb4d3bb6eb413a3f8fc582f3c9d14987da29710
|
4
|
+
data.tar.gz: bc2e8f8640351cb0e77627a62973157f4881c5f9f95037f77097c16b48da1e25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3598cd82cace65cb43350d12342cd1f5803febf7448ebacd5baf4ac9ad53eccf15b2efcf1a5b5f6b39c1ccfa181dd7d84bc5e434f8b9efa350262202871779ce
|
7
|
+
data.tar.gz: 75c8b0cbd26af4c9978c19914bc40bb30bb7427da667dc64cd1fc4d0b9e786472457892b96ed4bb75f887fcff2dbbe724d5e92d069620dcbe17e5dff94eb9cd9
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
app_manager (1.4.
|
4
|
+
app_manager (1.4.4)
|
5
5
|
activerecord-import (~> 1.4)
|
6
6
|
httparty
|
7
7
|
kaminari (>= 0.16.3)
|
@@ -85,14 +85,15 @@ GEM
|
|
85
85
|
crack (0.4.5)
|
86
86
|
rexml
|
87
87
|
crass (1.0.6)
|
88
|
+
date (3.3.3)
|
88
89
|
diff-lcs (1.5.0)
|
89
90
|
dotenv (2.1.2)
|
90
|
-
erubi (1.
|
91
|
+
erubi (1.12.0)
|
91
92
|
globalid (1.0.0)
|
92
93
|
activesupport (>= 5.0)
|
93
94
|
hashdiff (1.0.1)
|
94
|
-
httparty (0.
|
95
|
-
|
95
|
+
httparty (0.21.0)
|
96
|
+
mini_mime (>= 1.0.0)
|
96
97
|
multi_xml (>= 0.5.2)
|
97
98
|
i18n (1.12.0)
|
98
99
|
concurrent-ruby (~> 1.0)
|
@@ -108,38 +109,39 @@ GEM
|
|
108
109
|
activerecord
|
109
110
|
kaminari-core (= 1.2.2)
|
110
111
|
kaminari-core (1.2.2)
|
111
|
-
loofah (2.19.
|
112
|
+
loofah (2.19.1)
|
112
113
|
crass (~> 1.0.2)
|
113
114
|
nokogiri (>= 1.5.9)
|
114
|
-
mail (2.
|
115
|
+
mail (2.8.0)
|
115
116
|
mini_mime (>= 0.1.1)
|
117
|
+
net-imap
|
118
|
+
net-pop
|
119
|
+
net-smtp
|
116
120
|
marcel (1.0.2)
|
117
121
|
method_source (1.0.0)
|
118
|
-
mime-types (3.4.1)
|
119
|
-
mime-types-data (~> 3.2015)
|
120
|
-
mime-types-data (3.2022.0105)
|
121
122
|
mini_mime (1.1.2)
|
122
|
-
mini_portile2 (2.8.
|
123
|
-
minitest (5.
|
123
|
+
mini_portile2 (2.8.1)
|
124
|
+
minitest (5.17.0)
|
124
125
|
multi_xml (0.6.0)
|
125
|
-
net-imap (0.3.
|
126
|
+
net-imap (0.3.4)
|
127
|
+
date
|
126
128
|
net-protocol
|
127
129
|
net-pop (0.1.2)
|
128
130
|
net-protocol
|
129
|
-
net-protocol (0.1
|
131
|
+
net-protocol (0.2.1)
|
130
132
|
timeout
|
131
|
-
net-smtp (0.3.
|
133
|
+
net-smtp (0.3.3)
|
132
134
|
net-protocol
|
133
135
|
nio4r (2.5.8)
|
134
|
-
nokogiri (1.13.
|
136
|
+
nokogiri (1.13.10)
|
135
137
|
mini_portile2 (~> 2.8.0)
|
136
138
|
racc (~> 1.4)
|
137
139
|
pry (0.14.1)
|
138
140
|
coderay (~> 1.1)
|
139
141
|
method_source (~> 1.0)
|
140
142
|
public_suffix (4.0.6)
|
141
|
-
racc (1.6.
|
142
|
-
rack (2.2.
|
143
|
+
racc (1.6.2)
|
144
|
+
rack (2.2.5)
|
143
145
|
rack-test (2.0.2)
|
144
146
|
rack (>= 1.3)
|
145
147
|
rails (7.0.4)
|
@@ -159,8 +161,8 @@ GEM
|
|
159
161
|
rails-dom-testing (2.0.3)
|
160
162
|
activesupport (>= 4.2.0)
|
161
163
|
nokogiri (>= 1.6)
|
162
|
-
rails-html-sanitizer (1.4.
|
163
|
-
loofah (~> 2.
|
164
|
+
rails-html-sanitizer (1.4.4)
|
165
|
+
loofah (~> 2.19, >= 2.19.1)
|
164
166
|
railties (7.0.4)
|
165
167
|
actionpack (= 7.0.4)
|
166
168
|
activesupport (= 7.0.4)
|
@@ -186,7 +188,7 @@ GEM
|
|
186
188
|
rspec-support (~> 3.11.0)
|
187
189
|
rspec-support (3.11.0)
|
188
190
|
thor (1.2.1)
|
189
|
-
timeout (0.3.
|
191
|
+
timeout (0.3.1)
|
190
192
|
tzinfo (2.0.5)
|
191
193
|
concurrent-ruby (~> 1.0)
|
192
194
|
webmock (3.14.0)
|
@@ -196,7 +198,7 @@ GEM
|
|
196
198
|
websocket-driver (0.7.5)
|
197
199
|
websocket-extensions (>= 0.1.0)
|
198
200
|
websocket-extensions (0.1.5)
|
199
|
-
zeitwerk (2.6.
|
201
|
+
zeitwerk (2.6.6)
|
200
202
|
|
201
203
|
PLATFORMS
|
202
204
|
ruby
|
@@ -142,7 +142,7 @@ module AppManager
|
|
142
142
|
redirect_to "#{app_url}?host=#{embed_host}&shop=#{params[:shop]}", :status => 301 and return
|
143
143
|
end
|
144
144
|
else
|
145
|
-
raise Error, "Invalid shopify charge #{charges.
|
145
|
+
raise Error, "Invalid shopify charge #{charges.inspect}"
|
146
146
|
end
|
147
147
|
else
|
148
148
|
raise ModelNotFound, "Shop not found"
|
@@ -119,7 +119,8 @@ module AppManager
|
|
119
119
|
if apps.any?
|
120
120
|
apps_data = []
|
121
121
|
apps.each do |app|
|
122
|
-
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'])
|
122
|
+
# 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'])
|
123
|
+
apps_data << AppManager::App.new(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'])
|
123
124
|
end
|
124
125
|
AppManager::Charge.bulk_import apps_data
|
125
126
|
end
|
@@ -128,8 +129,8 @@ module AppManager
|
|
128
129
|
#Complete
|
129
130
|
def save_api_app_structures(app_structures)
|
130
131
|
begin
|
131
|
-
ActiveRecord::Base.establish_connection(:app_manager).connection.execute("TRUNCATE app_structures RESTART IDENTITY")
|
132
|
-
|
132
|
+
# ActiveRecord::Base.establish_connection(:app_manager).connection.execute("TRUNCATE app_structures RESTART IDENTITY")
|
133
|
+
AppManager::AppStructure.connection.truncate(AppManager::AppStructure.table_name)
|
133
134
|
rescue
|
134
135
|
AppManager::AppStructure.delete_all
|
135
136
|
end
|
@@ -146,7 +147,8 @@ module AppManager
|
|
146
147
|
if discount_plans.any?
|
147
148
|
discount_plans_data = []
|
148
149
|
discount_plans.each do |discount_plan|
|
149
|
-
discount_plans_data << AppManager::DiscountPlan.new(
|
150
|
+
discount_plans_data << AppManager::DiscountPlan.new(discount: discount_plan['discount'], shop_domain: discount_plan['shop_domain'], cycle_count: discount_plan['cycle_count'], plan_id: discount_plan['plan_id'], created_by: discount_plan['created_by'], created_at: discount_plan['created_at'], updated_at: discount_plan['updated_at'], app_id: discount_plan['app_id'], discount_type: discount_plan['discount_type'])
|
151
|
+
# discount_plans_data << AppManager::DiscountPlan.new(id: discount_plan['id'], discount: discount_plan['discount'], shop_domain: discount_plan['shop_domain'], cycle_count: discount_plan['cycle_count'], plan_id: discount_plan['plan_id'], created_by: discount_plan['created_by'], created_at: discount_plan['created_at'], updated_at: discount_plan['updated_at'], app_id: discount_plan['app_id'], discount_type: discount_plan['discount_type'])
|
150
152
|
end
|
151
153
|
AppManager::DiscountPlan.bulk_import discount_plans_data
|
152
154
|
end
|
@@ -162,7 +164,8 @@ module AppManager
|
|
162
164
|
if extend_trials.any?
|
163
165
|
extend_trials_data = []
|
164
166
|
extend_trials.each do |extend_trial|
|
165
|
-
extend_trials_data << AppManager::ExtendTrial.new(
|
167
|
+
extend_trials_data << AppManager::ExtendTrial.new(shop_domain: extend_trial['shop_domain'], plan_id: extend_trial['plan_id'], app_id: extend_trial['app_id'], days: extend_trial['days'], created_by: extend_trial['created_by'], created_at: extend_trial['created_at'], updated_at: extend_trial['updated_at'], extend_trial_start_at: extend_trial['extend_trial_start_at'])
|
168
|
+
# extend_trials_data << AppManager::ExtendTrial.new(id: extend_trial['id'], shop_domain: extend_trial['shop_domain'], plan_id: extend_trial['plan_id'], app_id: extend_trial['app_id'], days: extend_trial['days'], created_by: extend_trial['created_by'], created_at: extend_trial['created_at'], updated_at: extend_trial['updated_at'], extend_trial_start_at: extend_trial['extend_trial_start_at'])
|
166
169
|
end
|
167
170
|
AppManager::ExtendTrial.bulk_import extend_trials_data
|
168
171
|
end
|
@@ -178,7 +181,8 @@ module AppManager
|
|
178
181
|
if plan_users.any?
|
179
182
|
extend_plan_users = []
|
180
183
|
plan_users.each do |plan_user|
|
181
|
-
extend_plan_users << AppManager::PlanUser.new(
|
184
|
+
extend_plan_users << AppManager::PlanUser.new(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'])
|
185
|
+
# 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'])
|
182
186
|
end
|
183
187
|
AppManager::ExtendTrial.bulk_import extend_plan_users
|
184
188
|
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.
|
4
|
+
version: 1.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hulkapps
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|