shopify-gold 3.1.7 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a795cc0d103b86c8a4f1d7d951181edab0233506953b777b98ca22e7d135a5f3
4
- data.tar.gz: ebbc2af3462ab39fcb2ce7b194d3950cbe96bf6b9a9a93b7425c1a6a3f63765a
3
+ metadata.gz: 141b054c45d49dff9fa6b42225fbff18e164b7eab11b9065df28f47545d87668
4
+ data.tar.gz: c1671372a49f5b7badadfe6b6ae176fb42efeeb7f023fa289b9d0d883a8e42a5
5
5
  SHA512:
6
- metadata.gz: cc4b6dbe0cd9c39d8b098cfe79d3f1ed1205eda8c52b1385d64621fadbe1dfaf3171cfc4816c01757f3fa562dcab3d7808ea05da8ebf67d1f3be6fc690ee51e2
7
- data.tar.gz: 38d2a4071fcda83a9fe228f84413a035efcad80f092302d0d96822c965a2fb70ee36d56b5a619c76a7c83b422639c918d397e8063a11641b209573aec6bc5e6e
6
+ metadata.gz: a62956f9a4afdabc1399e6ae736daf5d2473f4103db1ec48670e841d61b8ed8bbd5c5797dba79427a95e0e4c97386d043530cc804b92cd74b9af22aed642df14
7
+ data.tar.gz: cca7881006d1e7783e327ead4534e455a41a90e3abc639793f92314a927642a229295f64778ea042fc737100934a84e37f68d90e83b2c71d714b2021e044b3de
data/README.md CHANGED
@@ -59,9 +59,10 @@ include Gold::Concerns::Gilded
59
59
 
60
60
  Add the following methods to your `Shop` class:
61
61
  `#shopify_domain`, which responds with the *.myshopify.com domain of the shop
62
- `#shopify_plan_name`, which responds to the plan name of the Shopify store (e.g. "unlimited", "affilaite")
63
- `#qualifies_for_tier?(_tier)`, return a boolean if the shop should qualify to a tier
62
+ `#shopify_plan_name`, which responds to the plan name of the Shopify store (e.g. "unlimited", "affiliate")
63
+ `#qualifies_for_tier?(_tier)`, return if the shop should qualify to a tier
64
64
  `#with_shopify_session`, provided by the Shopify App gem
65
+ `#installed?`, return if the app is installed in the merchant's Shopify admin
65
66
 
66
67
  After shop properties have been updated (say, after a shop/update webhook), call:
67
68
  `shop.billing.after_shop_update!`. This tells Gold something has changed about the
@@ -124,9 +125,6 @@ Gold.configure do |config|
124
125
  # If Gold is allowed to cancel charges (paid -> free) automatically
125
126
  config.allow_automated_charge_cancellation = true
126
127
 
127
- # Force Gold billing view's to redirect to iframe
128
- config.force_embedded_redirect = false
129
-
130
128
  config.admin_credentials = {
131
129
  user: "admin",
132
130
  password: "password123"
@@ -256,4 +254,8 @@ which you can do on Mac via Homebrew with `brew install graphviz`
256
254
 
257
255
  ## Release
258
256
  To release gem, run `gem release`, which depends on having `gem-release` installed
259
- on your system.
257
+ on your system.
258
+
259
+ ## Changelog
260
+ Version 3.2.0
261
+ - Removed `force_embedded_redirect` config option
@@ -123,7 +123,7 @@ module Gold
123
123
  end
124
124
  end
125
125
  end
126
-
126
+
127
127
  protected
128
128
 
129
129
  # Returns the Shopify-specific properties for the current shop.
@@ -4,15 +4,7 @@
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
5
  <title><%= Gold.configuration.app_name %></title>
6
6
 
7
- <% if ShopifyApp.configuration.embedded_app && Gold.configuration.force_embedded_redirect %>
8
- <script>
9
- if (window.self === window.top) {
10
- location.href = "https://<%= billing.shop.shopify_domain %>/admin/apps/<%= ShopifyApp.configuration.api_key %>" + location.pathname;
11
- }
12
- </script>
13
- <% end %>
14
-
15
- <% if ShopifyApp.configuration.embedded_app %>
7
+ <% if ShopifyApp.configuration.embedded_app && billing.shop.installed? %>
16
8
  <script src="https://unpkg.com/@shopify/app-bridge@1.6.6/umd/index.js"></script>
17
9
 
18
10
  <script>
data/lib/gold/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gold
2
- VERSION = "3.1.7".freeze
2
+ VERSION = "3.2.0".freeze
3
3
  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: 3.1.7
4
+ version: 3.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: 2019-09-30 00:00:00.000000000 Z
12
+ date: 2019-10-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails