shopify-gold 3.2.1 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/gold/billing.rb +22 -0
- data/app/models/gold/machine.rb +1 -1
- data/app/operations/gold/install_op.rb +2 -2
- data/lib/gold/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: 204884a5f73e970e26bd7c1738489a561122c667a719027dbea55f6c823015bd
|
4
|
+
data.tar.gz: 58f4a7020791e7857678d0a563e161264768337836f8e19ed67bf85779f299f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 255380b9df343126c437cf1e1c1e55acff9ab1ac4d818a14769141a307c3f1f5fca203fbb528a68c987d1787a46f9e2d916ec93836825d99c3f8d36fa184c3eb
|
7
|
+
data.tar.gz: 047065c87d4dc3d27e7497399cdc2cc3e8c8f2c1166e71a151fbc9762203d0affd636ca901e8ee92ae1ea50557564c92c9465bf9ca8acd29572b0bbe16966605
|
data/app/models/gold/billing.rb
CHANGED
@@ -124,6 +124,28 @@ module Gold
|
|
124
124
|
end
|
125
125
|
end
|
126
126
|
|
127
|
+
# Shops within these states should not get access to the app or services
|
128
|
+
def app_access?
|
129
|
+
blacklist = %i[
|
130
|
+
new
|
131
|
+
accepted_terms
|
132
|
+
select_tier
|
133
|
+
sudden_charge
|
134
|
+
sudden_charge_declined
|
135
|
+
sudden_charge_expired
|
136
|
+
marked_as_suspended
|
137
|
+
suspended
|
138
|
+
frozen
|
139
|
+
delinquent
|
140
|
+
marked_as_uninstalled
|
141
|
+
uninstalled
|
142
|
+
cleanup
|
143
|
+
done
|
144
|
+
]
|
145
|
+
|
146
|
+
!blacklist.include?(current_state)
|
147
|
+
end
|
148
|
+
|
127
149
|
protected
|
128
150
|
|
129
151
|
# Returns the Shopify-specific properties for the current shop.
|
data/app/models/gold/machine.rb
CHANGED
@@ -261,7 +261,7 @@ module Gold
|
|
261
261
|
guard_transition to: :marked_as_delinquent,
|
262
262
|
&ensure_min_days_in_state(Gold.configuration.days_until_delinquent)
|
263
263
|
transition from: :marked_as_delinquent, to: :delinquent
|
264
|
-
transition from: :delinquent, to: %i[delayed_charge cleanup]
|
264
|
+
transition from: :delinquent, to: %i[marked_as_uninstalled delayed_charge cleanup]
|
265
265
|
|
266
266
|
guard_transition to: :affiliate, &ensure_plan_is(:affiliate?)
|
267
267
|
transition from: :affiliate, to: %i[affiliate_to_paid
|
@@ -14,8 +14,6 @@ module Gold
|
|
14
14
|
@billing.transition_to(:reinstalled)
|
15
15
|
|
16
16
|
case @billing.current_state
|
17
|
-
when :new, :reinstalled
|
18
|
-
Gold.configuration.on_install&.call(@billing)
|
19
17
|
when :frozen
|
20
18
|
return CheckChargeOp.new(@billing).call
|
21
19
|
when :cleanup
|
@@ -24,6 +22,8 @@ module Gold
|
|
24
22
|
return InstallFailed.new(:cleanup_in_progress)
|
25
23
|
end
|
26
24
|
|
25
|
+
Gold.configuration.on_install&.call(@billing)
|
26
|
+
|
27
27
|
Success.new
|
28
28
|
end
|
29
29
|
end
|
data/lib/gold/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify-gold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Smith
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-12-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|