shopify_app 18.0.4 → 18.1.2

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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +2 -3
  3. data/.nvmrc +1 -1
  4. data/.ruby-version +1 -1
  5. data/CHANGELOG.md +14 -0
  6. data/Gemfile.lock +82 -104
  7. data/README.md +1 -0
  8. data/app/assets/javascripts/shopify_app/app_bridge_2.0.12.js +10 -0
  9. data/app/assets/javascripts/shopify_app/app_bridge_redirect.js +3 -4
  10. data/app/assets/javascripts/shopify_app/storage_access.js +1 -1
  11. data/app/controllers/concerns/shopify_app/require_known_shop.rb +1 -0
  12. data/app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb +1 -1
  13. data/app/controllers/shopify_app/sessions_controller.rb +5 -0
  14. data/app/controllers/shopify_app/webhooks_controller.rb +1 -2
  15. data/app/views/shopify_app/sessions/enable_cookies.html.erb +1 -8
  16. data/app/views/shopify_app/sessions/request_storage_access.html.erb +1 -8
  17. data/app/views/shopify_app/sessions/top_level_interaction.html.erb +1 -1
  18. data/app/views/shopify_app/shared/redirect.html.erb +1 -7
  19. data/config/locales/zh-CN.yml +1 -1
  20. data/docs/Upgrading.md +10 -3
  21. data/lib/generators/shopify_app/home_controller/templates/index.html.erb +4 -0
  22. data/lib/generators/shopify_app/install/install_generator.rb +5 -1
  23. data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +2 -0
  24. data/lib/generators/shopify_app/install/templates/shopify_app_importmap.js +13 -0
  25. data/lib/shopify_app/controller_concerns/login_protection.rb +11 -3
  26. data/lib/shopify_app/middleware/jwt_middleware.rb +1 -0
  27. data/lib/shopify_app/session/jwt.rb +4 -0
  28. data/lib/shopify_app/utils.rb +2 -1
  29. data/lib/shopify_app/version.rb +1 -1
  30. data/lib/shopify_app.rb +8 -0
  31. data/package.json +1 -1
  32. data/shopify_app.gemspec +2 -2
  33. data/yarn.lock +97 -82
  34. metadata +5 -10
  35. data/app/assets/javascripts/shopify_app/app_bridge_1.30.0.js +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0945fed22675681ffec4e7818341d42ad7d62ebe6b9309a8132f65c5a954e37
4
- data.tar.gz: 51c7ec2c5e1c43b06fc2dc67b57418b24197b0bf98a252b6940980614daa5a79
3
+ metadata.gz: 525ace7cd1e154da3bad80a1d26631b6ae7db48a84c83adb10ca996725608550
4
+ data.tar.gz: 2f235e4eed6025df20cfb985eb19cb77b781048d1b8b10873071bfd5e6c71e5e
5
5
  SHA512:
6
- metadata.gz: 07b2adbc4b9c44023a6fed8ffaa358f07b463d9713d9825803d356184d1d2392194f71adf239371b9311e67326336b8de9f5b7fc9778c15e2f38c2d2903a2357
7
- data.tar.gz: e4771d9ef9a4c337c6a1902be6a4d04ac859cd0a446f641d40ec66813464aa4b329defa75d1349017bfad040f355d3a27e67be89807fbc9da33399fa0221e56d
6
+ metadata.gz: 8bae3cec01980b2450d81f2d38143325095637f769d2127ff5d62ccf36c706a72bfcb89ff3b60cd82b2c9ed3636b9c387457b7dcdd55bb0ca474cf72e2bbd0f4
7
+ data.tar.gz: 2768f243dfdd36ff183846b4b31110217aa37ae2709bd4f4255f8f769500b1a494063bea7ccf0b73dc5c9db41efc17918915f170be7b85a6b1e66a167e41ae3f
@@ -12,7 +12,7 @@ jobs:
12
12
  name: Ruby ${{ matrix.version }}
13
13
  strategy:
14
14
  matrix:
15
- version: [2.5, 2.6, 2.7]
15
+ version: ['2.6', '2.7', '3.0']
16
16
 
17
17
  steps:
18
18
  - uses: actions/checkout@v2
@@ -24,7 +24,7 @@ jobs:
24
24
  key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
25
25
  - name: Set up Ruby ${{ matrix.version }}
26
26
  uses: ruby/setup-ruby@v1
27
- with:
27
+ with:
28
28
  ruby-version: ${{ matrix.version }}
29
29
  bundler-cache: true
30
30
  - name: Set up Node
@@ -38,4 +38,3 @@ jobs:
38
38
  run: |
39
39
  yarn test
40
40
  bundle exec rake test
41
-
data/.nvmrc CHANGED
@@ -1 +1 @@
1
- 8.10.0
1
+ 12.22.8
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.0
1
+ 3.0.3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ 18.1.2 (Mar 3, 2022)
2
+ ----------
3
+ * Use the App Bridge 2.0 redirect when attempting to break out of an iframe. This happens when an app is installed, requires new access scopes, or re-authentication because the login session is expired. [#1376](https://github.com/Shopify/shopify_app/pull/1376)
4
+
5
+ 18.1.1 (Feb 2, 2022)
6
+ ----------
7
+ * Fix bug causing `unsafe-inline` CSP violation. [#1362](https://github.com/Shopify/shopify_app/pull/1362)
8
+
9
+ 18.1.0 (Jan 28, 2022)
10
+ ----------
11
+ * Support Rails 7 [#1354](https://github.com/Shopify/shopify_app/pull/1354)
12
+ * Fix webhooks handling in Ruby 3 [#1342](https://github.com/Shopify/shopify_app/pull/1342)
13
+ * Update to Ruby 3 and drop support to Ruby 2.5 [#1359](https://github.com/Shopify/shopify_app/pull/1359)
14
+
1
15
  18.0.4 (Jan 27, 2022)
2
16
  ----------
3
17
  * Use App Bridge client for redirect [#1247](https://github.com/Shopify/shopify_app/pull/1247)
data/Gemfile.lock CHANGED
@@ -1,80 +1,80 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify_app (18.0.4)
4
+ shopify_app (18.1.2)
5
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)
9
- rails (> 5.2.1, < 6.2)
9
+ rails (> 5.2.1)
10
10
  redirect_safely (~> 1.0)
11
11
  shopify_api (~> 9.4)
12
12
 
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- actioncable (6.1.3.1)
17
- actionpack (= 6.1.3.1)
18
- activesupport (= 6.1.3.1)
16
+ actioncable (6.1.4.4)
17
+ actionpack (= 6.1.4.4)
18
+ activesupport (= 6.1.4.4)
19
19
  nio4r (~> 2.0)
20
20
  websocket-driver (>= 0.6.1)
21
- actionmailbox (6.1.3.1)
22
- actionpack (= 6.1.3.1)
23
- activejob (= 6.1.3.1)
24
- activerecord (= 6.1.3.1)
25
- activestorage (= 6.1.3.1)
26
- activesupport (= 6.1.3.1)
21
+ actionmailbox (6.1.4.4)
22
+ actionpack (= 6.1.4.4)
23
+ activejob (= 6.1.4.4)
24
+ activerecord (= 6.1.4.4)
25
+ activestorage (= 6.1.4.4)
26
+ activesupport (= 6.1.4.4)
27
27
  mail (>= 2.7.1)
28
- actionmailer (6.1.3.1)
29
- actionpack (= 6.1.3.1)
30
- actionview (= 6.1.3.1)
31
- activejob (= 6.1.3.1)
32
- activesupport (= 6.1.3.1)
28
+ actionmailer (6.1.4.4)
29
+ actionpack (= 6.1.4.4)
30
+ actionview (= 6.1.4.4)
31
+ activejob (= 6.1.4.4)
32
+ activesupport (= 6.1.4.4)
33
33
  mail (~> 2.5, >= 2.5.4)
34
34
  rails-dom-testing (~> 2.0)
35
- actionpack (6.1.3.1)
36
- actionview (= 6.1.3.1)
37
- activesupport (= 6.1.3.1)
35
+ actionpack (6.1.4.4)
36
+ actionview (= 6.1.4.4)
37
+ activesupport (= 6.1.4.4)
38
38
  rack (~> 2.0, >= 2.0.9)
39
39
  rack-test (>= 0.6.3)
40
40
  rails-dom-testing (~> 2.0)
41
41
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
42
- actiontext (6.1.3.1)
43
- actionpack (= 6.1.3.1)
44
- activerecord (= 6.1.3.1)
45
- activestorage (= 6.1.3.1)
46
- activesupport (= 6.1.3.1)
42
+ actiontext (6.1.4.4)
43
+ actionpack (= 6.1.4.4)
44
+ activerecord (= 6.1.4.4)
45
+ activestorage (= 6.1.4.4)
46
+ activesupport (= 6.1.4.4)
47
47
  nokogiri (>= 1.8.5)
48
- actionview (6.1.3.1)
49
- activesupport (= 6.1.3.1)
48
+ actionview (6.1.4.4)
49
+ activesupport (= 6.1.4.4)
50
50
  builder (~> 3.1)
51
51
  erubi (~> 1.4)
52
52
  rails-dom-testing (~> 2.0)
53
53
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
54
- activejob (6.1.3.1)
55
- activesupport (= 6.1.3.1)
54
+ activejob (6.1.4.4)
55
+ activesupport (= 6.1.4.4)
56
56
  globalid (>= 0.3.6)
57
- activemodel (6.1.3.1)
58
- activesupport (= 6.1.3.1)
57
+ activemodel (6.1.4.4)
58
+ activesupport (= 6.1.4.4)
59
59
  activemodel-serializers-xml (1.0.2)
60
60
  activemodel (> 5.x)
61
61
  activesupport (> 5.x)
62
62
  builder (~> 3.1)
63
- activerecord (6.1.3.1)
64
- activemodel (= 6.1.3.1)
65
- activesupport (= 6.1.3.1)
66
- activeresource (5.1.1)
67
- activemodel (>= 5.0, < 7)
63
+ activerecord (6.1.4.4)
64
+ activemodel (= 6.1.4.4)
65
+ activesupport (= 6.1.4.4)
66
+ activeresource (6.0.0)
67
+ activemodel (>= 6.0)
68
68
  activemodel-serializers-xml (~> 1.0)
69
- activesupport (>= 5.0, < 7)
70
- activestorage (6.1.3.1)
71
- actionpack (= 6.1.3.1)
72
- activejob (= 6.1.3.1)
73
- activerecord (= 6.1.3.1)
74
- activesupport (= 6.1.3.1)
69
+ activesupport (>= 6.0)
70
+ activestorage (6.1.4.4)
71
+ actionpack (= 6.1.4.4)
72
+ activejob (= 6.1.4.4)
73
+ activerecord (= 6.1.4.4)
74
+ activesupport (= 6.1.4.4)
75
75
  marcel (~> 1.0.0)
76
- mini_mime (~> 1.0.2)
77
- activesupport (6.1.3.1)
76
+ mini_mime (>= 1.1.0)
77
+ activesupport (6.1.4.4)
78
78
  concurrent-ruby (~> 1.0, >= 1.0.2)
79
79
  i18n (>= 1.6, < 2)
80
80
  minitest (>= 5.1)
@@ -89,65 +89,45 @@ GEM
89
89
  builder (3.2.4)
90
90
  byebug (11.1.3)
91
91
  coderay (1.1.3)
92
- concurrent-ruby (1.1.8)
92
+ concurrent-ruby (1.1.9)
93
93
  crack (0.4.4)
94
94
  crass (1.0.6)
95
95
  debug_inspector (0.0.3)
96
96
  erubi (1.10.0)
97
- faraday (1.9.3)
98
- faraday-em_http (~> 1.0)
99
- faraday-em_synchrony (~> 1.0)
100
- faraday-excon (~> 1.1)
101
- faraday-httpclient (~> 1.0)
102
- faraday-multipart (~> 1.0)
103
- faraday-net_http (~> 1.0)
104
- faraday-net_http_persistent (~> 1.0)
105
- faraday-patron (~> 1.0)
106
- faraday-rack (~> 1.0)
107
- faraday-retry (~> 1.0)
97
+ faraday (2.2.0)
98
+ faraday-net_http (~> 2.0)
108
99
  ruby2_keywords (>= 0.0.4)
109
- faraday-em_http (1.0.0)
110
- faraday-em_synchrony (1.0.0)
111
- faraday-excon (1.1.0)
112
- faraday-httpclient (1.0.1)
113
- faraday-multipart (1.0.2)
114
- multipart-post (>= 1.2, < 3)
115
- faraday-net_http (1.0.1)
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)
100
+ faraday-net_http (2.0.1)
120
101
  globalid (1.0.0)
121
102
  activesupport (>= 5.0)
122
- graphql (1.13.4)
103
+ graphql (1.13.10)
123
104
  graphql-client (0.17.0)
124
105
  activesupport (>= 3.0)
125
106
  graphql (~> 1.10)
126
107
  hashdiff (1.0.1)
127
108
  hashie (5.0.0)
128
- i18n (1.8.9)
109
+ i18n (1.9.1)
129
110
  concurrent-ruby (~> 1.0)
130
111
  jwt (2.3.0)
131
- loofah (2.9.0)
112
+ loofah (2.13.0)
132
113
  crass (~> 1.0.2)
133
114
  nokogiri (>= 1.5.9)
134
115
  mail (2.7.1)
135
116
  mini_mime (>= 0.1.1)
136
117
  marcel (1.0.2)
137
118
  method_source (0.9.2)
138
- mini_mime (1.0.3)
139
- mini_portile2 (2.5.0)
119
+ mini_mime (1.1.2)
120
+ mini_portile2 (2.6.1)
140
121
  minitest (5.14.4)
141
122
  mocha (1.11.2)
142
123
  multi_json (1.15.0)
143
124
  multi_xml (0.6.0)
144
- multipart-post (2.1.1)
145
125
  nio4r (2.5.8)
146
- nokogiri (1.11.2)
147
- mini_portile2 (~> 2.5.0)
126
+ nokogiri (1.12.5)
127
+ mini_portile2 (~> 2.6.1)
148
128
  racc (~> 1.4)
149
- oauth2 (1.4.7)
150
- faraday (>= 0.8, < 2.0)
129
+ oauth2 (1.4.9)
130
+ faraday (>= 0.17.3, < 3.0)
151
131
  jwt (>= 1.0, < 3.0)
152
132
  multi_json (~> 1.3)
153
133
  multi_xml (~> 0.5)
@@ -159,7 +139,7 @@ GEM
159
139
  omniauth-oauth2 (1.7.2)
160
140
  oauth2 (~> 1.4)
161
141
  omniauth (>= 1.9, < 3)
162
- omniauth-rails_csrf_protection (1.0.0)
142
+ omniauth-rails_csrf_protection (1.0.1)
163
143
  actionpack (>= 4.2)
164
144
  omniauth (~> 2.0)
165
145
  omniauth-shopify-oauth2 (2.3.2)
@@ -177,26 +157,26 @@ GEM
177
157
  binding_of_caller (>= 0.7)
178
158
  pry (>= 0.9.11)
179
159
  public_suffix (4.0.6)
180
- racc (1.5.2)
160
+ racc (1.6.0)
181
161
  rack (2.2.3)
182
- rack-protection (2.1.0)
162
+ rack-protection (2.2.0)
183
163
  rack
184
164
  rack-test (1.1.0)
185
165
  rack (>= 1.0, < 3)
186
- rails (6.1.3.1)
187
- actioncable (= 6.1.3.1)
188
- actionmailbox (= 6.1.3.1)
189
- actionmailer (= 6.1.3.1)
190
- actionpack (= 6.1.3.1)
191
- actiontext (= 6.1.3.1)
192
- actionview (= 6.1.3.1)
193
- activejob (= 6.1.3.1)
194
- activemodel (= 6.1.3.1)
195
- activerecord (= 6.1.3.1)
196
- activestorage (= 6.1.3.1)
197
- activesupport (= 6.1.3.1)
166
+ rails (6.1.4.4)
167
+ actioncable (= 6.1.4.4)
168
+ actionmailbox (= 6.1.4.4)
169
+ actionmailer (= 6.1.4.4)
170
+ actionpack (= 6.1.4.4)
171
+ actiontext (= 6.1.4.4)
172
+ actionview (= 6.1.4.4)
173
+ activejob (= 6.1.4.4)
174
+ activemodel (= 6.1.4.4)
175
+ activerecord (= 6.1.4.4)
176
+ activestorage (= 6.1.4.4)
177
+ activesupport (= 6.1.4.4)
198
178
  bundler (>= 1.15.0)
199
- railties (= 6.1.3.1)
179
+ railties (= 6.1.4.4)
200
180
  sprockets-rails (>= 2.0.0)
201
181
  rails-controller-testing (1.0.5)
202
182
  actionpack (>= 5.0.1.rc1)
@@ -205,13 +185,13 @@ GEM
205
185
  rails-dom-testing (2.0.3)
206
186
  activesupport (>= 4.2.0)
207
187
  nokogiri (>= 1.6)
208
- rails-html-sanitizer (1.3.0)
188
+ rails-html-sanitizer (1.4.2)
209
189
  loofah (~> 2.3)
210
- railties (6.1.3.1)
211
- actionpack (= 6.1.3.1)
212
- activesupport (= 6.1.3.1)
190
+ railties (6.1.4.4)
191
+ actionpack (= 6.1.4.4)
192
+ activesupport (= 6.1.4.4)
213
193
  method_source
214
- rake (>= 0.8.7)
194
+ rake (>= 0.13)
215
195
  thor (~> 1.0)
216
196
  rainbow (3.0.0)
217
197
  rake (13.0.3)
@@ -219,7 +199,7 @@ GEM
219
199
  redirect_safely (1.0.0)
220
200
  activemodel
221
201
  regexp_parser (2.0.0)
222
- rexml (3.2.4)
202
+ rexml (3.2.5)
223
203
  rubocop (1.5.2)
224
204
  parallel (~> 1.10)
225
205
  parser (>= 2.7.1.5)
@@ -235,11 +215,10 @@ GEM
235
215
  rubocop (~> 1.4)
236
216
  ruby-progressbar (1.10.1)
237
217
  ruby2_keywords (0.0.5)
238
- shopify_api (9.5)
239
- activeresource (>= 4.1.0, < 6.0.0)
218
+ shopify_api (9.5.1)
219
+ activeresource (>= 4.1.0)
240
220
  graphql-client
241
221
  rack
242
- webrick
243
222
  sprockets (4.0.2)
244
223
  concurrent-ruby (~> 1.0)
245
224
  rack (> 1, < 3)
@@ -256,11 +235,10 @@ GEM
256
235
  addressable (>= 2.3.6)
257
236
  crack (>= 0.3.2)
258
237
  hashdiff (>= 0.4.0, < 2.0.0)
259
- webrick (1.7.0)
260
238
  websocket-driver (0.7.5)
261
239
  websocket-extensions (>= 0.1.0)
262
240
  websocket-extensions (0.1.5)
263
- zeitwerk (2.4.2)
241
+ zeitwerk (2.5.4)
264
242
 
265
243
  PLATFORMS
266
244
  ruby
@@ -281,4 +259,4 @@ DEPENDENCIES
281
259
  webmock
282
260
 
283
261
  BUNDLED WITH
284
- 2.2.29
262
+ 2.3.5
data/README.md CHANGED
@@ -17,6 +17,7 @@ This gem builds Rails applications that can be embedded in the Shopify Admin.
17
17
  [Contributing](/CONTRIBUTING.md) |
18
18
  [License](/LICENSE)
19
19
 
20
+
20
21
  ## Introduction
21
22
 
22
23
  This gem includes a Rails engine, generators, modules, and mixins that help create Rails applications that work with Shopify APIs. The [Shopify App Rails engine](/docs/shopify_app/engine.md) provides all the code required to implement OAuth with Shopify. The [default Shopify App generator](/docs/shopify_app/generators.md#-environment-rails-generate-shopify_app) builds an app that can be embedded in the Shopify Admin and secures it with [session tokens](https://shopify.dev/concepts/apps/building-embedded-apps-using-session-tokens).