shopify_app 9.0.3 → 9.0.4

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: df66bdb58e5fd652cbd0465fd8b556e1c758b69f161ae2b2d9085d86f9ec0ffc
4
- data.tar.gz: 260638d5df7371f25c953684bc326dd999270473211d361ec95d721aecabef90
3
+ metadata.gz: 9b0c4f236ab9c71186ed3095ed7da95a10dbaa0fd89cb7e0e848bf04257c21ac
4
+ data.tar.gz: 6874836046e839e20e7e7d40f091cab488c4ac61c2fb492ab3044d05cb4c8d9d
5
5
  SHA512:
6
- metadata.gz: 74de73555bac65d91d3a1d6333bec5284738752de73151cb075e58c4f6669cad703d126d7a9937a4e1e040753983b50f9981f782c622b2ff080fa91dc98e9c6c
7
- data.tar.gz: 68b83622ed0253ba4e607dbe3257de879d3f11d9f610224ffe700935bffc3e8c3c6bff33501201e37bee777ac0adb574bef72c9168e73631d3570474ecd3ba3a
6
+ metadata.gz: 256797e0845484538af23db0bf1bb90fae3398a5536e99d095d235bd9d812c3e5d00030b8f3c4cd36ef27a16a282317d341413da3d9fb5854309a06cf3af77ec
7
+ data.tar.gz: 4369be48e85023c76ea2a7ec05a189a17e8f7416e74e80186e4fb3b133687dd125ad7c40b0bfb808f39ac73a1cfaf5eca69d597d571b96882b0439f376d6c4ab
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 9.0.4
2
+ -----
3
+
4
+ * Fix returning to a deep link after authentication [#746](https://github.com/Shopify/shopify_app/pull/746)
5
+
1
6
  9.0.3
2
7
  -----
3
8
 
data/README.md CHANGED
@@ -347,10 +347,12 @@ If your app needs to perform specific actions after the user is authenticated su
347
347
 
348
348
  ```ruby
349
349
  ShopifyApp.configure do |config|
350
- config.after_authenticate_job = { job: Shopify::AfterAuthenticateJob }
350
+ config.after_authenticate_job = { job: "Shopify::AfterAuthenticateJob" }
351
351
  end
352
352
  ```
353
353
 
354
+ The job can be configured as either a class or a class name string.
355
+
354
356
  If you need the job to run synchronously add the `inline` flag:
355
357
 
356
358
  ```ruby
@@ -86,10 +86,13 @@ module ShopifyApp
86
86
 
87
87
  return unless config && config[:job].present?
88
88
 
89
+ job = config[:job]
90
+ job = job.constantize if job.is_a?(String)
91
+
89
92
  if config[:inline] == true
90
- config[:job].perform_now(shop_domain: session[:shopify_domain])
93
+ job.perform_now(shop_domain: session[:shopify_domain])
91
94
  else
92
- config[:job].perform_later(shop_domain: session[:shopify_domain])
95
+ job.perform_later(shop_domain: session[:shopify_domain])
93
96
  end
94
97
  end
95
98
  end
@@ -39,7 +39,7 @@ module ShopifyApp
39
39
  session['shopify.granted_storage_access'] = true
40
40
 
41
41
  params = { shop: @shop }
42
- redirect_to "#{ShopifyApp.configuration.root_url}?#{params.to_query}"
42
+ redirect_to("#{return_address}?#{params.to_query}")
43
43
  end
44
44
 
45
45
  def destroy
@@ -14,7 +14,7 @@ module ShopifyApp
14
14
 
15
15
  after_authenticate_job_config =
16
16
  " config.after_authenticate_job = "\
17
- "{ job: Shopify::AfterAuthenticateJob, inline: false }\n"
17
+ "{ job: \"Shopify::AfterAuthenticateJob\", inline: false }\n"
18
18
 
19
19
  inject_into_file(
20
20
  'config/initializers/shopify_app.rb',
@@ -2,14 +2,14 @@ var eventName = typeof(Turbolinks) !== 'undefined' ? 'turbolinks:load' : 'DOMCon
2
2
 
3
3
  if (!document.documentElement.hasAttribute("data-turbolinks-preview")) {
4
4
  document.addEventListener(eventName, function flash() {
5
- var flash = JSON.parse(document.getElementById('shopify-app-flash').dataset.flash);
5
+ var flashData = JSON.parse(document.getElementById('shopify-app-flash').dataset.flash);
6
6
 
7
- if (flash.notice) {
8
- ShopifyApp.flashNotice(flash.notice);
7
+ if (flashData.notice) {
8
+ ShopifyApp.flashNotice(flashData.notice);
9
9
  }
10
10
 
11
- if (flash.error) {
12
- ShopifyApp.flashError(flash.error);
11
+ if (flashData.error) {
12
+ ShopifyApp.flashError(flashData.error);
13
13
  }
14
14
 
15
15
  document.removeEventListener(eventName, flash)
@@ -1,3 +1,3 @@
1
1
  module ShopifyApp
2
- VERSION = '9.0.3'.freeze
2
+ VERSION = '9.0.4'.freeze
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopify_app",
3
- "version": "9.0.3",
3
+ "version": "9.0.4",
4
4
  "repository": "git@github.com:Shopify/shopify_app.git",
5
5
  "author": "Shopify",
6
6
  "license": "MIT",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.3
4
+ version: 9.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-06 00:00:00.000000000 Z
11
+ date: 2019-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser_sniffer