shopify-gold 5.2.1 → 5.3.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b0c1d7836dbfa17bc2904e5b3e28db56c975615067cec4ab0f333db6342b7a56
|
|
4
|
+
data.tar.gz: 602576cfdf68190454a2ad5e62bd7aa50d87f7e2607b10f01f0204f29f54f089
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e91088357efbc98973a9aa90d8095cedb0d5cf51dfaae13cb478dcb4b8a00ec990fcd70994a390d4b2d3598173c26f48e8b104193940d47cf75b4447d07b35a8
|
|
7
|
+
data.tar.gz: 4f69024f139ccc4d8760e94162c21d53796edc2918786ee65ea4f08fb3aa793e7d57936c317a4f989eab4cd3b10c406c7e8c583f1e600ebc530e3ae9767c89fd
|
|
@@ -49,7 +49,7 @@ module Gold
|
|
|
49
49
|
Gold.logger.info("Confronting billing, state is '#{state}'")
|
|
50
50
|
|
|
51
51
|
case state
|
|
52
|
-
when nil, :new
|
|
52
|
+
when nil, :new, :install
|
|
53
53
|
Gold.logger.info("Redirecting to terms page...")
|
|
54
54
|
return @context.redirect_to(@engine.terms_url)
|
|
55
55
|
when :select_tier, :reinstalled, :accepted_terms
|
data/app/models/gold/machine.rb
CHANGED
|
@@ -12,6 +12,9 @@ module Gold
|
|
|
12
12
|
|
|
13
13
|
state :new, initial: true
|
|
14
14
|
|
|
15
|
+
# A merchant has installed the app
|
|
16
|
+
state :install
|
|
17
|
+
|
|
15
18
|
# Before merchants can use our app, they will need to review and accept our
|
|
16
19
|
# Terms of Service.
|
|
17
20
|
state :accepted_terms
|
|
@@ -165,7 +168,8 @@ module Gold
|
|
|
165
168
|
|
|
166
169
|
# Transitions
|
|
167
170
|
|
|
168
|
-
transition from: :new, to: %i[
|
|
171
|
+
transition from: :new, to: %i[install marked_as_uninstalled]
|
|
172
|
+
transition from: :install, to: %i[accepted_terms marked_as_uninstalled]
|
|
169
173
|
transition from: :accepted_terms, to: %i[select_tier marked_as_uninstalled]
|
|
170
174
|
|
|
171
175
|
before_transition to: :select_tier, &require_metadata(:tier_id)
|
|
@@ -10,11 +10,13 @@ module Gold
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def call
|
|
13
|
-
#
|
|
13
|
+
# Transition to reinstalled, if possible
|
|
14
14
|
@billing.transition_to(:reinstalled)
|
|
15
15
|
|
|
16
16
|
case @billing.current_state
|
|
17
17
|
when :new, :reinstalled
|
|
18
|
+
# Transition to install, if possible
|
|
19
|
+
@billing.transition_to(:install)
|
|
18
20
|
Gold.configuration.on_install&.call(@billing)
|
|
19
21
|
when :frozen
|
|
20
22
|
return CheckChargeOp.new(@billing).call
|
data/lib/gold/version.rb
CHANGED
data/lib/tasks/gold_tasks.rake
CHANGED
|
@@ -66,8 +66,7 @@ namespace :gold do
|
|
|
66
66
|
Gold::UninstallOp.new(billing).call
|
|
67
67
|
rescue ActiveResource::ClientError => e
|
|
68
68
|
puts "Error for '#{billing.shop.shopify_domain}', #{e}"
|
|
69
|
-
rescue Statesman::GuardFailedError
|
|
70
|
-
Statesman::TransitionFailedError => e
|
|
69
|
+
rescue Statesman::GuardFailedError => e
|
|
71
70
|
puts "Cannot transition: #{e.message}"
|
|
72
71
|
end
|
|
73
72
|
end
|
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: 5.
|
|
4
|
+
version: 5.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: 2020-
|
|
12
|
+
date: 2020-10-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|
|
@@ -45,14 +45,14 @@ dependencies:
|
|
|
45
45
|
requirements:
|
|
46
46
|
- - "~>"
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: '
|
|
48
|
+
version: '15'
|
|
49
49
|
type: :runtime
|
|
50
50
|
prerelease: false
|
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
|
52
52
|
requirements:
|
|
53
53
|
- - "~>"
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: '
|
|
55
|
+
version: '15'
|
|
56
56
|
- !ruby/object:Gem::Dependency
|
|
57
57
|
name: statesman
|
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -157,14 +157,14 @@ dependencies:
|
|
|
157
157
|
requirements:
|
|
158
158
|
- - "~>"
|
|
159
159
|
- !ruby/object:Gem::Version
|
|
160
|
-
version: '
|
|
160
|
+
version: '15'
|
|
161
161
|
type: :development
|
|
162
162
|
prerelease: false
|
|
163
163
|
version_requirements: !ruby/object:Gem::Requirement
|
|
164
164
|
requirements:
|
|
165
165
|
- - "~>"
|
|
166
166
|
- !ruby/object:Gem::Version
|
|
167
|
-
version: '
|
|
167
|
+
version: '15'
|
|
168
168
|
- !ruby/object:Gem::Dependency
|
|
169
169
|
name: sqlite3
|
|
170
170
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -317,7 +317,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
317
317
|
- !ruby/object:Gem::Version
|
|
318
318
|
version: '0'
|
|
319
319
|
requirements: []
|
|
320
|
-
rubygems_version: 3.
|
|
320
|
+
rubygems_version: 3.1.2
|
|
321
321
|
signing_key:
|
|
322
322
|
specification_version: 4
|
|
323
323
|
summary: Helium's approach to billing for Shopify apps
|