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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +3 -1
- data/app/controllers/shopify_app/callback_controller.rb +5 -2
- data/app/controllers/shopify_app/sessions_controller.rb +1 -1
- data/lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb +1 -1
- data/lib/generators/shopify_app/install/templates/flash_messages.js +5 -5
- data/lib/shopify_app/version.rb +1 -1
- data/package.json +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: 9b0c4f236ab9c71186ed3095ed7da95a10dbaa0fd89cb7e0e848bf04257c21ac
|
4
|
+
data.tar.gz: 6874836046e839e20e7e7d40f091cab488c4ac61c2fb492ab3044d05cb4c8d9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 256797e0845484538af23db0bf1bb90fae3398a5536e99d095d235bd9d812c3e5d00030b8f3c4cd36ef27a16a282317d341413da3d9fb5854309a06cf3af77ec
|
7
|
+
data.tar.gz: 4369be48e85023c76ea2a7ec05a189a17e8f7416e74e80186e4fb3b133687dd125ad7c40b0bfb808f39ac73a1cfaf5eca69d597d571b96882b0439f376d6c4ab
|
data/CHANGELOG.md
CHANGED
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
|
-
|
93
|
+
job.perform_now(shop_domain: session[:shopify_domain])
|
91
94
|
else
|
92
|
-
|
95
|
+
job.perform_later(shop_domain: session[:shopify_domain])
|
93
96
|
end
|
94
97
|
end
|
95
98
|
end
|
data/lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb
CHANGED
@@ -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
|
5
|
+
var flashData = JSON.parse(document.getElementById('shopify-app-flash').dataset.flash);
|
6
6
|
|
7
|
-
if (
|
8
|
-
ShopifyApp.flashNotice(
|
7
|
+
if (flashData.notice) {
|
8
|
+
ShopifyApp.flashNotice(flashData.notice);
|
9
9
|
}
|
10
10
|
|
11
|
-
if (
|
12
|
-
ShopifyApp.flashError(
|
11
|
+
if (flashData.error) {
|
12
|
+
ShopifyApp.flashError(flashData.error);
|
13
13
|
}
|
14
14
|
|
15
15
|
document.removeEventListener(eventName, flash)
|
data/lib/shopify_app/version.rb
CHANGED
data/package.json
CHANGED
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.
|
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-
|
11
|
+
date: 2019-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: browser_sniffer
|