shopify-gold 4.1.1 → 4.2.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/README.md +6 -8
- data/app/controllers/gold/billing_controller.rb +4 -1
- data/app/controllers/gold/referrals_controller.rb +1 -1
- data/app/controllers/gold/setup_controller.rb +9 -0
- data/config/routes.rb +2 -0
- data/lib/gold/configuration.rb +2 -2
- data/lib/gold/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad7514ffdfb66670043eac39bffbd3f1db861f45c6befd38bb92e570bcd4fd95
|
4
|
+
data.tar.gz: f03dc8cad6c26749cd70d8357e2019695102d944ddfb4300ce33e55937c5d224
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bddd6866e01bc82889115697f3cd3eb5cedf472942640e7c13ed3cc9678feac878179fbd20f027854de47d471dfa65bd548fd8fbb9d489cbede3bb63c81b77f4
|
7
|
+
data.tar.gz: 3db49c76d9554f994852112ce046040b8a7c2ee09b43c5588d75209b5361ac029e7372cb8db431c59f6fab4e5b9dde49d4449fb51dd0798c7fcecf2297361b3b
|
data/README.md
CHANGED
@@ -183,6 +183,11 @@ To add tiers to your app, add a `config/tiers.yml` file. Here's an example file:
|
|
183
183
|
max_customers: 1000
|
184
184
|
```
|
185
185
|
|
186
|
+
Any tier that is visible will appear in the list of choices. If it is hidden, you
|
187
|
+
can link to it either directly (/tier?id=basic) or indirectly (/start?tier=basic).
|
188
|
+
The later will route to the app listing page before selecting this option on the
|
189
|
+
tier page.
|
190
|
+
|
186
191
|
## Controller and views
|
187
192
|
Ok, so it's time to get paid. Let's add our module to show merchants tier choices.
|
188
193
|
|
@@ -262,11 +267,4 @@ which you can do on Mac via Homebrew with `brew install graphviz`
|
|
262
267
|
|
263
268
|
## Release
|
264
269
|
To release gem, run `gem release`, which depends on having `gem-release` installed
|
265
|
-
on your system.
|
266
|
-
|
267
|
-
## Changelog
|
268
|
-
Version 4.0.0
|
269
|
-
- Added referral affiliates
|
270
|
-
|
271
|
-
Version 3.2.0
|
272
|
-
- Removed `force_embedded_redirect` config option
|
270
|
+
on your system.
|
@@ -44,16 +44,19 @@ module Gold
|
|
44
44
|
|
45
45
|
apply_referral_cookie unless billing.tier
|
46
46
|
|
47
|
+
params[:id] = cookies[:gold_tier_id] if cookies[:gold_tier_id].present?
|
48
|
+
|
47
49
|
@tiers = Tier.visible
|
48
50
|
end
|
49
51
|
|
50
52
|
# Process a tier selection.
|
51
53
|
def select_tier
|
52
54
|
@tiers = Tier.visible
|
53
|
-
@tier =
|
55
|
+
@tier = Tier.find(params[:tier])
|
54
56
|
outcome = SelectTierOp.new(billing, @tier).call
|
55
57
|
case outcome
|
56
58
|
when SameTier, TierApplied
|
59
|
+
cookies.delete(:gold_tier_id)
|
57
60
|
redirect_to main_app.root_url
|
58
61
|
when CannotSelectTier
|
59
62
|
flash.now[:error] = "Your shop is not eligible for this plan"
|
data/config/routes.rb
CHANGED
data/lib/gold/configuration.rb
CHANGED
@@ -13,7 +13,7 @@ module Gold
|
|
13
13
|
:days_until_cleanup,
|
14
14
|
:shop_domain_attribute,
|
15
15
|
:force_embedded_redirect,
|
16
|
-
:
|
16
|
+
:app_listing_url
|
17
17
|
|
18
18
|
# Callbacks
|
19
19
|
attr_accessor :on_terms,
|
@@ -71,7 +71,7 @@ module Gold
|
|
71
71
|
|
72
72
|
# The URL to follow after a referral code is tracked
|
73
73
|
# (e.g. https://apps.shopify.com/customr)
|
74
|
-
@
|
74
|
+
@app_listing_url = "https://apps.shopify.com/"
|
75
75
|
end
|
76
76
|
|
77
77
|
def shop_class
|
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: 4.
|
4
|
+
version: 4.2.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-04-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -219,6 +219,7 @@ files:
|
|
219
219
|
- app/controllers/gold/billing_controller.rb
|
220
220
|
- app/controllers/gold/concerns/merchant_facing.rb
|
221
221
|
- app/controllers/gold/referrals_controller.rb
|
222
|
+
- app/controllers/gold/setup_controller.rb
|
222
223
|
- app/jobs/gold/after_authenticate_job.rb
|
223
224
|
- app/jobs/gold/app_uninstalled_job.rb
|
224
225
|
- app/jobs/gold/application_job.rb
|