shopify_app 18.0.4 → 18.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +2 -3
- data/.nvmrc +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +82 -104
- data/README.md +1 -0
- data/app/assets/javascripts/shopify_app/app_bridge_2.0.12.js +10 -0
- data/app/assets/javascripts/shopify_app/app_bridge_redirect.js +3 -4
- data/app/assets/javascripts/shopify_app/storage_access.js +1 -1
- data/app/controllers/concerns/shopify_app/require_known_shop.rb +1 -0
- data/app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb +1 -1
- data/app/controllers/shopify_app/sessions_controller.rb +5 -0
- data/app/controllers/shopify_app/webhooks_controller.rb +1 -2
- data/app/views/shopify_app/sessions/enable_cookies.html.erb +1 -8
- data/app/views/shopify_app/sessions/request_storage_access.html.erb +1 -8
- data/app/views/shopify_app/sessions/top_level_interaction.html.erb +1 -1
- data/app/views/shopify_app/shared/redirect.html.erb +1 -7
- data/config/locales/zh-CN.yml +1 -1
- data/docs/Upgrading.md +10 -3
- data/lib/generators/shopify_app/home_controller/templates/index.html.erb +4 -0
- data/lib/generators/shopify_app/install/install_generator.rb +5 -1
- data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +2 -0
- data/lib/generators/shopify_app/install/templates/shopify_app_importmap.js +13 -0
- data/lib/shopify_app/controller_concerns/login_protection.rb +11 -3
- data/lib/shopify_app/middleware/jwt_middleware.rb +1 -0
- data/lib/shopify_app/session/jwt.rb +4 -0
- data/lib/shopify_app/utils.rb +2 -1
- data/lib/shopify_app/version.rb +1 -1
- data/lib/shopify_app.rb +8 -0
- data/package.json +1 -1
- data/shopify_app.gemspec +2 -2
- data/yarn.lock +97 -82
- metadata +5 -10
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 525ace7cd1e154da3bad80a1d26631b6ae7db48a84c83adb10ca996725608550
|
4
|
+
data.tar.gz: 2f235e4eed6025df20cfb985eb19cb77b781048d1b8b10873071bfd5e6c71e5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bae3cec01980b2450d81f2d38143325095637f769d2127ff5d62ccf36c706a72bfcb89ff3b60cd82b2c9ed3636b9c387457b7dcdd55bb0ca474cf72e2bbd0f4
|
7
|
+
data.tar.gz: 2768f243dfdd36ff183846b4b31110217aa37ae2709bd4f4255f8f769500b1a494063bea7ccf0b73dc5c9db41efc17918915f170be7b85a6b1e66a167e41ae3f
|
data/.github/workflows/build.yml
CHANGED
@@ -12,7 +12,7 @@ jobs:
|
|
12
12
|
name: Ruby ${{ matrix.version }}
|
13
13
|
strategy:
|
14
14
|
matrix:
|
15
|
-
version: [2.
|
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
|
-
|
1
|
+
12.22.8
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
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.
|
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
|
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.
|
17
|
-
actionpack (= 6.1.
|
18
|
-
activesupport (= 6.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.
|
22
|
-
actionpack (= 6.1.
|
23
|
-
activejob (= 6.1.
|
24
|
-
activerecord (= 6.1.
|
25
|
-
activestorage (= 6.1.
|
26
|
-
activesupport (= 6.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.
|
29
|
-
actionpack (= 6.1.
|
30
|
-
actionview (= 6.1.
|
31
|
-
activejob (= 6.1.
|
32
|
-
activesupport (= 6.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.
|
36
|
-
actionview (= 6.1.
|
37
|
-
activesupport (= 6.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.
|
43
|
-
actionpack (= 6.1.
|
44
|
-
activerecord (= 6.1.
|
45
|
-
activestorage (= 6.1.
|
46
|
-
activesupport (= 6.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.
|
49
|
-
activesupport (= 6.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.
|
55
|
-
activesupport (= 6.1.
|
54
|
+
activejob (6.1.4.4)
|
55
|
+
activesupport (= 6.1.4.4)
|
56
56
|
globalid (>= 0.3.6)
|
57
|
-
activemodel (6.1.
|
58
|
-
activesupport (= 6.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.
|
64
|
-
activemodel (= 6.1.
|
65
|
-
activesupport (= 6.1.
|
66
|
-
activeresource (
|
67
|
-
activemodel (>=
|
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 (>=
|
70
|
-
activestorage (6.1.
|
71
|
-
actionpack (= 6.1.
|
72
|
-
activejob (= 6.1.
|
73
|
-
activerecord (= 6.1.
|
74
|
-
activesupport (= 6.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 (
|
77
|
-
activesupport (6.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.
|
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 (
|
98
|
-
faraday-
|
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-
|
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.
|
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.
|
109
|
+
i18n (1.9.1)
|
129
110
|
concurrent-ruby (~> 1.0)
|
130
111
|
jwt (2.3.0)
|
131
|
-
loofah (2.
|
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.
|
139
|
-
mini_portile2 (2.
|
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.
|
147
|
-
mini_portile2 (~> 2.
|
126
|
+
nokogiri (1.12.5)
|
127
|
+
mini_portile2 (~> 2.6.1)
|
148
128
|
racc (~> 1.4)
|
149
|
-
oauth2 (1.4.
|
150
|
-
faraday (>= 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.
|
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.
|
160
|
+
racc (1.6.0)
|
181
161
|
rack (2.2.3)
|
182
|
-
rack-protection (2.
|
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.
|
187
|
-
actioncable (= 6.1.
|
188
|
-
actionmailbox (= 6.1.
|
189
|
-
actionmailer (= 6.1.
|
190
|
-
actionpack (= 6.1.
|
191
|
-
actiontext (= 6.1.
|
192
|
-
actionview (= 6.1.
|
193
|
-
activejob (= 6.1.
|
194
|
-
activemodel (= 6.1.
|
195
|
-
activerecord (= 6.1.
|
196
|
-
activestorage (= 6.1.
|
197
|
-
activesupport (= 6.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.
|
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.
|
188
|
+
rails-html-sanitizer (1.4.2)
|
209
189
|
loofah (~> 2.3)
|
210
|
-
railties (6.1.
|
211
|
-
actionpack (= 6.1.
|
212
|
-
activesupport (= 6.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.
|
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.
|
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
|
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
|
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.
|
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).
|