shopify_app 18.0.2 → 18.0.3

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: 2fcfa987c56d06c327c1cff6e12350711473a1a265844b6f4f3c32b696c1495e
4
- data.tar.gz: 57b44743afc3e0175fe408ccfa688bc0b8c28d7b99db6fae5e6c7ab1a843ec9a
3
+ metadata.gz: a17cc09be2742af3a0e91af4ac4c2e3d4ab246ae10c31dc2c26b1138058f1846
4
+ data.tar.gz: afd2922bb83d113c1c4d16c240db9455d1d63478cd2e231fd4e27d3aebb01958
5
5
  SHA512:
6
- metadata.gz: 583dbf51eaa3a3a600a410eca4d30fab58776709f6882908ed72af5da222163bbeaeba6805682ed95100abcce1217aceeba5851fa9cf00836b7a1f1201f30289
7
- data.tar.gz: 8dcb0f7bceb2f4ec7bcbe8eb5f5d5bb294767fa5ead28b1d329ef34a5119fd835f99669480514473a5e184b91f9e79f4abd9941399b269faf5522ce6f69e6eb7
6
+ metadata.gz: a19c5616ec96c8c454077dd114f4aedd215725e1af274eadc05d2989812bc5bd3b4674b9a850af3b28f7171b9f60c7db7a89398a97cf3ad8ad3023482a8ddd1d
7
+ data.tar.gz: f6eb5a88f94cab3f1555d017f0fada8809661716739186382a5038d880596ba451e2791f616f03400d95ab44c739720feae6b3f677a8188e56f000172b365c8d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ 18.0.3 (Jan 7, 2022)
2
+ ----------
3
+ * Change regexp to match standard ngrok URLs. [#1311](https://github.com/Shopify/shopify_app/pull/1311)
4
+ * Make `EnsureAuthenticatedLinks` compatible with AppBridge 2.0. [#1277](https://github.com/Shopify/shopify_app/pull/1277)
5
+ * Includes the `host` parameter when redirecting to the splash page in an unauthenticated state.
6
+
1
7
  18.0.2 (Jun 15, 2021)
2
8
  ----------
3
9
  * Added careers link to readme. [#1274](https://github.com/Shopify/shopify_app/pull/1274)
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify_app (18.0.2)
5
- browser_sniffer (~> 1.2.2)
4
+ shopify_app (18.0.3)
5
+ browser_sniffer (~> 1.4.0)
6
6
  jwt (>= 2.2.3)
7
7
  omniauth-rails_csrf_protection
8
8
  omniauth-shopify-oauth2 (~> 2.3)
@@ -80,12 +80,12 @@ GEM
80
80
  minitest (>= 5.1)
81
81
  tzinfo (~> 2.0)
82
82
  zeitwerk (~> 2.3)
83
- addressable (2.7.0)
83
+ addressable (2.8.0)
84
84
  public_suffix (>= 2.0.2, < 5.0)
85
85
  ast (2.4.1)
86
86
  binding_of_caller (0.8.0)
87
87
  debug_inspector (>= 0.0.1)
88
- browser_sniffer (1.2.2)
88
+ browser_sniffer (1.4.0)
89
89
  builder (3.2.4)
90
90
  byebug (11.1.3)
91
91
  coderay (1.1.3)
@@ -94,32 +94,46 @@ GEM
94
94
  crass (1.0.6)
95
95
  debug_inspector (0.0.3)
96
96
  erubi (1.10.0)
97
- faraday (1.4.1)
97
+ faraday (1.9.3)
98
+ faraday-em_http (~> 1.0)
99
+ faraday-em_synchrony (~> 1.0)
98
100
  faraday-excon (~> 1.1)
101
+ faraday-httpclient (~> 1.0)
102
+ faraday-multipart (~> 1.0)
99
103
  faraday-net_http (~> 1.0)
100
- faraday-net_http_persistent (~> 1.1)
101
- multipart-post (>= 1.2, < 3)
104
+ faraday-net_http_persistent (~> 1.0)
105
+ faraday-patron (~> 1.0)
106
+ faraday-rack (~> 1.0)
107
+ faraday-retry (~> 1.0)
102
108
  ruby2_keywords (>= 0.0.4)
109
+ faraday-em_http (1.0.0)
110
+ faraday-em_synchrony (1.0.0)
103
111
  faraday-excon (1.1.0)
112
+ faraday-httpclient (1.0.1)
113
+ faraday-multipart (1.0.2)
114
+ multipart-post (>= 1.2, < 3)
104
115
  faraday-net_http (1.0.1)
105
- faraday-net_http_persistent (1.1.0)
106
- globalid (0.4.2)
107
- activesupport (>= 4.2.0)
108
- graphql (1.12.8)
109
- graphql-client (0.16.0)
116
+ faraday-net_http_persistent (1.2.0)
117
+ faraday-patron (1.0.0)
118
+ faraday-rack (1.0.0)
119
+ faraday-retry (1.0.3)
120
+ globalid (1.0.0)
121
+ activesupport (>= 5.0)
122
+ graphql (1.13.4)
123
+ graphql-client (0.17.0)
110
124
  activesupport (>= 3.0)
111
- graphql (~> 1.8)
125
+ graphql (~> 1.10)
112
126
  hashdiff (1.0.1)
113
- hashie (4.1.0)
127
+ hashie (5.0.0)
114
128
  i18n (1.8.9)
115
129
  concurrent-ruby (~> 1.0)
116
- jwt (2.2.3)
130
+ jwt (2.3.0)
117
131
  loofah (2.9.0)
118
132
  crass (~> 1.0.2)
119
133
  nokogiri (>= 1.5.9)
120
134
  mail (2.7.1)
121
135
  mini_mime (>= 0.1.1)
122
- marcel (1.0.1)
136
+ marcel (1.0.2)
123
137
  method_source (0.9.2)
124
138
  mini_mime (1.0.3)
125
139
  mini_portile2 (2.5.0)
@@ -128,7 +142,7 @@ GEM
128
142
  multi_json (1.15.0)
129
143
  multi_xml (0.6.0)
130
144
  multipart-post (2.1.1)
131
- nio4r (2.5.7)
145
+ nio4r (2.5.8)
132
146
  nokogiri (1.11.2)
133
147
  mini_portile2 (~> 2.5.0)
134
148
  racc (~> 1.4)
@@ -142,7 +156,7 @@ GEM
142
156
  hashie (>= 3.4.6)
143
157
  rack (>= 1.6.2, < 3)
144
158
  rack-protection
145
- omniauth-oauth2 (1.7.1)
159
+ omniauth-oauth2 (1.7.2)
146
160
  oauth2 (~> 1.4)
147
161
  omniauth (>= 1.9, < 3)
148
162
  omniauth-rails_csrf_protection (1.0.0)
@@ -220,20 +234,21 @@ GEM
220
234
  rubocop-shopify (1.0.7)
221
235
  rubocop (~> 1.4)
222
236
  ruby-progressbar (1.10.1)
223
- ruby2_keywords (0.0.4)
224
- shopify_api (9.4.1)
237
+ ruby2_keywords (0.0.5)
238
+ shopify_api (9.5)
225
239
  activeresource (>= 4.1.0, < 6.0.0)
226
240
  graphql-client
227
241
  rack
242
+ webrick
228
243
  sprockets (4.0.2)
229
244
  concurrent-ruby (~> 1.0)
230
245
  rack (> 1, < 3)
231
- sprockets-rails (3.2.2)
232
- actionpack (>= 4.0)
233
- activesupport (>= 4.0)
246
+ sprockets-rails (3.4.2)
247
+ actionpack (>= 5.2)
248
+ activesupport (>= 5.2)
234
249
  sprockets (>= 3.0.0)
235
250
  sqlite3 (1.4.2)
236
- thor (1.1.0)
251
+ thor (1.2.1)
237
252
  tzinfo (2.0.4)
238
253
  concurrent-ruby (~> 1.0)
239
254
  unicode-display_width (1.7.0)
@@ -241,7 +256,8 @@ GEM
241
256
  addressable (>= 2.3.6)
242
257
  crack (>= 0.3.2)
243
258
  hashdiff (>= 0.4.0, < 2.0.0)
244
- websocket-driver (0.7.3)
259
+ webrick (1.7.0)
260
+ websocket-driver (0.7.5)
245
261
  websocket-extensions (>= 0.1.0)
246
262
  websocket-extensions (0.1.5)
247
263
  zeitwerk (2.4.2)
@@ -265,4 +281,4 @@ DEPENDENCIES
265
281
  webmock
266
282
 
267
283
  BUNDLED WITH
268
- 2.1.4
284
+ 2.2.22
@@ -10,9 +10,22 @@ module ShopifyApp
10
10
 
11
11
  private
12
12
 
13
+ def splash_page
14
+ splash_page_with_params(
15
+ return_to: request.fullpath,
16
+ shop: current_shopify_domain,
17
+ host: params[:host]
18
+ )
19
+ end
20
+
21
+ def splash_page_with_params(params)
22
+ uri = URI(root_path)
23
+ uri.query = params.compact.to_query
24
+ uri.to_s
25
+ end
26
+
13
27
  def redirect_to_splash_page
14
- splash_page_path = root_path(return_to: request.fullpath, shop: current_shopify_domain)
15
- redirect_to(splash_page_path)
28
+ redirect_to(splash_page)
16
29
  rescue ShopifyApp::LoginProtection::ShopifyDomainNotFound => error
17
30
  Rails.logger.warn("[ShopifyApp::EnsureAuthenticatedLinks] Redirecting to login: [#{error.class}] "\
18
31
  "Could not determine current shop domain")
@@ -15,7 +15,7 @@ While you can customize the login view by creating a `/app/views/shopify_app/ses
15
15
 
16
16
  ```ruby
17
17
  ShopifyApp.configure do |config|
18
- config.login_url = 'https://my.domain.com/nested/login'
18
+ config.login_url = 'https://example.com/nested/login'
19
19
  end
20
20
  ```
21
21
 
@@ -77,6 +77,6 @@ class ReviewsController < ApplicationController
77
77
  end
78
78
  ```
79
79
 
80
- Create your app proxy URL in the [Shopify Partners dashboard](https://partners.shopify.com/organizations), making sure to point it to `https://your_app_website.com/app_proxy`.
80
+ Create your app proxy URL in the [Shopify Partners dashboard](https://partners.shopify.com/organizations), making sure to point it to `https://example.com/app_proxy`.
81
81
 
82
82
  ![Creating an App Proxy](/images/app-proxy-screenshot.png)
@@ -1,5 +1,15 @@
1
1
  # Handling changes in access scopes
2
- The Shopify App gem provides handling changes to scopes for both shop/offline and user/online tokens. To enable your app to login via OAuth on scope changes, you can set the following configuration flag in your `config/initializers/shopify_app.rb`:
2
+ ## Updating the list of scopes the app requests
3
+
4
+ Your app specifies the [access scopes](https://shopify.dev/api/usage/access-scopes) it requires in the Shopify App initializer, located at`config/initializers/shopify_app.rb`. To modify this list, update the comma-delimited configuration option:
5
+
6
+ ```ruby
7
+ config.scope = "read_products,write_discounts"
8
+ ```
9
+
10
+ ## Requesting new scopes from merchants
11
+
12
+ The Shopify App gem will automatically request new scopes from merchants for both shop/offline and user/online tokens. To enable your app to reauth via OAuth on scope changes, you can set the following configuration flag in your `config/initializers/shopify_app.rb`:
3
13
  ```ruby
4
14
  config.reauth_on_access_scope_changes = true
5
15
  ```
@@ -11,7 +11,7 @@ As with webhooks, ShopifyApp can manage your app's [ScriptTags](https://shopify-
11
11
  ```ruby
12
12
  ShopifyApp.configure do |config|
13
13
  config.scripttags = [
14
- {event:'onload', src: 'https://my-shopifyapp.herokuapp.com/fancy.js'},
14
+ {event:'onload', src: 'https://example.com/fancy.js'},
15
15
  {event:'onload', src: ->(domain) { dynamic_tag_url(domain) } }
16
16
  ]
17
17
  end
@@ -12,7 +12,7 @@ ShopifyApp can manage your app's webhooks for you if you set which webhooks you
12
12
  ```ruby
13
13
  ShopifyApp.configure do |config|
14
14
  config.webhooks = [
15
- {topic: 'carts/update', address: 'https://example-app.com/webhooks/carts_update'}
15
+ {topic: 'carts/update', address: 'https://example.com/webhooks/carts_update'}
16
16
  ]
17
17
  end
18
18
  ```
@@ -34,7 +34,7 @@ If you are only interested in particular fields, you can optionally filter the d
34
34
  ```ruby
35
35
  ShopifyApp.configure do |config|
36
36
  config.webhooks = [
37
- {topic: 'products/update', address: 'https://example-app.com/webhooks/products_update', fields: ['title', 'vendor']}
37
+ {topic: 'products/update', address: 'https://example.com/webhooks/products_update', fields: ['title', 'vendor']}
38
38
  ]
39
39
  end
40
40
  ```
@@ -67,7 +67,7 @@ module ShopifyApp
67
67
  def insert_hosts_into_development_config
68
68
  inject_into_file(
69
69
  'config/environments/development.rb',
70
- " config.hosts = (config.hosts rescue []) << /\\w+\\.ngrok\\.io/\n",
70
+ " config.hosts = (config.hosts rescue []) << /\[-\w]+\\.ngrok\\.io/\n",
71
71
  after: "Rails.application.configure do\n"
72
72
  )
73
73
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ShopifyApp
3
- VERSION = '18.0.2'
3
+ VERSION = '18.0.3'
4
4
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopify_app",
3
- "version": "18.0.2",
3
+ "version": "18.0.3",
4
4
  "repository": "git@github.com:Shopify/shopify_app.git",
5
5
  "author": "Shopify",
6
6
  "license": "MIT",
data/shopify_app.gemspec CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
 
14
14
  s.metadata['allowed_push_host'] = 'https://rubygems.org'
15
15
 
16
- s.add_runtime_dependency('browser_sniffer', '~> 1.2.2')
16
+ s.add_runtime_dependency('browser_sniffer', '~> 1.4.0')
17
17
  s.add_runtime_dependency('omniauth-rails_csrf_protection')
18
18
  s.add_runtime_dependency('rails', '> 5.2.1', '< 6.2')
19
19
  s.add_runtime_dependency('shopify_api', '~> 9.4')
data/translation.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  source_language: en
2
- target_languages: [cs, da, de, es, fi, fr, hi, it, ja, ko, ms, nb, nl, pl, pt-BR, pt-PT, sv, th, tr, vi, zh-CN, zh-TW]
2
+ target_languages: [cs, da, de, es, fi, fr, it, ja, ko, nb, nl, pl, pt-BR, pt-PT, sv, th, tr, vi, zh-CN, zh-TW]
3
3
  components:
4
4
  - name: 'merchant'
5
5
  paths:
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: 18.0.2
4
+ version: 18.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-15 00:00:00.000000000 Z
11
+ date: 2022-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser_sniffer
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.2
19
+ version: 1.4.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.2.2
26
+ version: 1.4.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omniauth-rails_csrf_protection
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -321,11 +321,9 @@ files:
321
321
  - config/locales/es.yml
322
322
  - config/locales/fi.yml
323
323
  - config/locales/fr.yml
324
- - config/locales/hi.yml
325
324
  - config/locales/it.yml
326
325
  - config/locales/ja.yml
327
326
  - config/locales/ko.yml
328
- - config/locales/ms.yml
329
327
  - config/locales/nb.yml
330
328
  - config/locales/nl.yml
331
329
  - config/locales/pl.yml
@@ -461,7 +459,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
461
459
  - !ruby/object:Gem::Version
462
460
  version: '0'
463
461
  requirements: []
464
- rubygems_version: 3.2.17
462
+ rubygems_version: 3.2.20
465
463
  signing_key:
466
464
  specification_version: 4
467
465
  summary: This gem is used to get quickly started with the Shopify API
@@ -1,23 +0,0 @@
1
- ---
2
- hi:
3
- logged_out: सफलतापूर्वक लॉग आउट कर दिया
4
- could_not_log_in: Shopify स्टोर में लॉग इन नहीं किया जा सका
5
- invalid_shop_url: अमान्य शॉप डोमेन
6
- enable_cookies_heading: "%{app} के कुकीज़ सक्षम करें"
7
- enable_cookies_body: आपको %{app} का उपयोग Shopify में करने के लिए इस ब्राउज़र में
8
- कुकीज़ मैन्युअल रूप से सक्षम करने चाहिए.
9
- enable_cookies_footer: कुकीज़ अस्थायी रूप से आपकी वरीयताएं और व्यक्तिगत जानकारी स्टोर
10
- कर ऐप को आपको प्रमाणित करने देते हैं. इनकी समय-सीमा 30 दिनों बाद समाप्त हो जाती
11
- है.
12
- enable_cookies_action: कुकीज़ को सक्षम करें
13
- top_level_interaction_heading: आपके ब्राउज़र को %{app} प्रमाणित करने की आवश्यकता
14
- है
15
- top_level_interaction_body: आपके ब्राउज़र को %{app} जैसे ऐप की ज़रूरत होती है, जो
16
- Shopify द्वारा आपके लिए उसे खोलने से पहले कुकीज़ पर पहुंचने करने की अनुमति मांगे.
17
- top_level_interaction_action: जारी रखें
18
- request_storage_access_heading: "%{app} को कुकीज़ पर पहुंच करने की आवश्यकता है"
19
- request_storage_access_body: यह आपकी व्यक्तिगत जानकारी अस्थायी रूप से स्टोर कर ऐप
20
- को आपको प्रमाणित करने देता है. जारी रखें पर क्लिक करें और कुकीज़ को ऐप उपयोग करने
21
- की अनुमति दें.
22
- request_storage_access_footer: कुकीज़ की समय-सीमा 30 दिनों बाद समाप्त हो जाती है.
23
- request_storage_access_action: जारी रखें
@@ -1,22 +0,0 @@
1
- ---
2
- ms:
3
- logged_out: Berjaya log keluar
4
- could_not_log_in: Tidak dapat log masuk ke kedai Shopify
5
- invalid_shop_url: Domain kedai tidak sah
6
- enable_cookies_heading: Dayakan kuki dari %{app}
7
- enable_cookies_body: Anda mesti mengaktifkan kuki secara manual dalam pelayar ini
8
- untuk %{app} digunakan dalam Shopify.
9
- enable_cookies_footer: Kuki membenarkan aplikasi mengesahkan anda dengan menyimpan
10
- keutamaan dan maklumat peribadi anda buat sementara waktu. Ia tamat tempoh selepas
11
- 30 hari.
12
- enable_cookies_action: Dayakan kuki
13
- top_level_interaction_heading: Pelayar anda perlu mengesahkan %{app}
14
- top_level_interaction_body: Pelayar anda memerlukan aplikasi seperti %{app} untuk
15
- meminta anda akses kepada kuki sebelum Shopify boleh membukanya untuk anda.
16
- top_level_interaction_action: Teruskan
17
- request_storage_access_heading: "%{app} memerlukan akses kepada kuki"
18
- request_storage_access_body: Ini membolehkan aplikasi mengesahkan anda dengan menyimpan
19
- maklumat peribadi anda buat sementara waktu. Klik teruskan dan benarkan kuki untuk
20
- menggunakan aplikasi.
21
- request_storage_access_footer: Kuki akan tamat tempoh selepas 30 hari.
22
- request_storage_access_action: Teruskan