shopify_app 8.3.2 → 8.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.babelrc +5 -0
  3. data/.github/CODEOWNERS +1 -0
  4. data/.github/probots.yml +2 -0
  5. data/.gitignore +1 -0
  6. data/.nvmrc +1 -0
  7. data/.travis.yml +24 -3
  8. data/CHANGELOG.md +5 -0
  9. data/README.md +1 -0
  10. data/app/assets/images/storage_access.svg +2 -0
  11. data/app/assets/javascripts/shopify_app/enable_cookies.js +3 -0
  12. data/app/assets/javascripts/shopify_app/itp_helper.js +40 -0
  13. data/app/assets/javascripts/shopify_app/partition_cookies.js +7 -0
  14. data/app/assets/javascripts/shopify_app/request_storage_access.js +3 -0
  15. data/app/assets/javascripts/shopify_app/storage_access.js +116 -0
  16. data/app/assets/javascripts/shopify_app/storage_access_redirect.js +17 -0
  17. data/app/assets/javascripts/shopify_app/top_level.js +2 -0
  18. data/app/assets/javascripts/shopify_app/top_level_interaction.js +11 -0
  19. data/app/controllers/shopify_app/callback_controller.rb +92 -0
  20. data/app/controllers/shopify_app/sessions_controller.rb +57 -84
  21. data/app/views/shopify_app/partials/_button_styles.html.erb +104 -0
  22. data/app/views/shopify_app/partials/_card_styles.html.erb +33 -0
  23. data/app/views/shopify_app/partials/_empty_state_styles.html.erb +129 -0
  24. data/app/views/shopify_app/partials/_layout_styles.html.erb +167 -0
  25. data/app/views/shopify_app/partials/_typography_styles.html.erb +35 -0
  26. data/app/views/shopify_app/sessions/enable_cookies.html.erb +7 -334
  27. data/app/views/shopify_app/sessions/request_storage_access.html.erb +67 -0
  28. data/app/views/shopify_app/sessions/top_level_interaction.html.erb +63 -0
  29. data/config/locales/de.yml +10 -0
  30. data/config/locales/en.yml +7 -0
  31. data/config/locales/es.yml +10 -0
  32. data/config/locales/fr.yml +11 -0
  33. data/config/locales/it.yml +11 -0
  34. data/config/locales/ja.yml +8 -0
  35. data/config/locales/pt-BR.yml +10 -0
  36. data/config/routes.rb +10 -1
  37. data/karma.conf.js +43 -0
  38. data/lib/shopify_app.rb +1 -0
  39. data/lib/shopify_app/controller_concerns/itp.rb +45 -0
  40. data/lib/shopify_app/controller_concerns/login_protection.rb +7 -11
  41. data/lib/shopify_app/engine.rb +4 -1
  42. data/lib/shopify_app/utils.rb +1 -1
  43. data/lib/shopify_app/version.rb +1 -1
  44. data/package-lock.json +23 -0
  45. data/package.json +28 -0
  46. data/service.yml +7 -0
  47. data/shipit.rubygems.yml +2 -0
  48. data/shopify_app.gemspec +1 -0
  49. data/webpack.config.js +24 -0
  50. data/yarn.lock +4594 -0
  51. metadata +44 -3
  52. data/app/assets/javascripts/shopify_app/itp_polyfill.js +0 -30
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.3.2
4
+ version: 8.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-16 00:00:00.000000000 Z
11
+ date: 2018-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: browser_sniffer
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.1.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rails
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -128,8 +142,12 @@ executables: []
128
142
  extensions: []
129
143
  extra_rdoc_files: []
130
144
  files:
145
+ - ".babelrc"
146
+ - ".github/CODEOWNERS"
131
147
  - ".github/ISSUE_TEMPLATE.md"
148
+ - ".github/probots.yml"
132
149
  - ".gitignore"
150
+ - ".nvmrc"
133
151
  - ".rubocop.yml"
134
152
  - ".travis.yml"
135
153
  - CHANGELOG.md
@@ -137,13 +155,29 @@ files:
137
155
  - LICENSE
138
156
  - README.md
139
157
  - Rakefile
140
- - app/assets/javascripts/shopify_app/itp_polyfill.js
158
+ - app/assets/images/storage_access.svg
159
+ - app/assets/javascripts/shopify_app/enable_cookies.js
160
+ - app/assets/javascripts/shopify_app/itp_helper.js
161
+ - app/assets/javascripts/shopify_app/partition_cookies.js
141
162
  - app/assets/javascripts/shopify_app/redirect.js
163
+ - app/assets/javascripts/shopify_app/request_storage_access.js
164
+ - app/assets/javascripts/shopify_app/storage_access.js
165
+ - app/assets/javascripts/shopify_app/storage_access_redirect.js
166
+ - app/assets/javascripts/shopify_app/top_level.js
167
+ - app/assets/javascripts/shopify_app/top_level_interaction.js
142
168
  - app/controllers/shopify_app/authenticated_controller.rb
169
+ - app/controllers/shopify_app/callback_controller.rb
143
170
  - app/controllers/shopify_app/sessions_controller.rb
144
171
  - app/controllers/shopify_app/webhooks_controller.rb
172
+ - app/views/shopify_app/partials/_button_styles.html.erb
173
+ - app/views/shopify_app/partials/_card_styles.html.erb
174
+ - app/views/shopify_app/partials/_empty_state_styles.html.erb
175
+ - app/views/shopify_app/partials/_layout_styles.html.erb
176
+ - app/views/shopify_app/partials/_typography_styles.html.erb
145
177
  - app/views/shopify_app/sessions/enable_cookies.html.erb
146
178
  - app/views/shopify_app/sessions/new.html.erb
179
+ - app/views/shopify_app/sessions/request_storage_access.html.erb
180
+ - app/views/shopify_app/sessions/top_level_interaction.html.erb
147
181
  - app/views/shopify_app/shared/redirect.html.erb
148
182
  - config/locales/de.yml
149
183
  - config/locales/en.yml
@@ -157,6 +191,7 @@ files:
157
191
  - docs/Releasing.md
158
192
  - docs/Troubleshooting.md
159
193
  - images/app-proxy-screenshot.png
194
+ - karma.conf.js
160
195
  - lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb
161
196
  - lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb
162
197
  - lib/generators/shopify_app/add_webhook/add_webhook_generator.rb
@@ -188,6 +223,7 @@ files:
188
223
  - lib/shopify_app/configuration.rb
189
224
  - lib/shopify_app/controller_concerns/app_proxy_verification.rb
190
225
  - lib/shopify_app/controller_concerns/embedded_app.rb
226
+ - lib/shopify_app/controller_concerns/itp.rb
191
227
  - lib/shopify_app/controller_concerns/localization.rb
192
228
  - lib/shopify_app/controller_concerns/login_protection.rb
193
229
  - lib/shopify_app/controller_concerns/webhook_verification.rb
@@ -201,9 +237,14 @@ files:
201
237
  - lib/shopify_app/session/session_storage.rb
202
238
  - lib/shopify_app/utils.rb
203
239
  - lib/shopify_app/version.rb
240
+ - package-lock.json
241
+ - package.json
242
+ - service.yml
204
243
  - shipit.rubygems.yml
205
244
  - shopify_app.gemspec
206
245
  - translation.yml
246
+ - webpack.config.js
247
+ - yarn.lock
207
248
  homepage:
208
249
  licenses: []
209
250
  metadata: {}
@@ -1,30 +0,0 @@
1
- (function() {
2
- function setCookieAndRedirect() {
3
- document.cookie = "shopify.cookies_persist=true";
4
- window.location.href = window.shopOrigin + "/admin/apps/" + window.apiKey;
5
- }
6
-
7
- function shouldDisplayPrompt() {
8
- if (navigator.userAgent.indexOf('com.jadedpixel.pos') !== -1) {
9
- return false;
10
- }
11
-
12
- if (navigator.userAgent.indexOf('Shopify Mobile/iOS') !== -1) {
13
- return false;
14
- }
15
-
16
- return Boolean(document.hasStorageAccess);
17
- }
18
-
19
- document.addEventListener("DOMContentLoaded", function() {
20
- if (shouldDisplayPrompt()) {
21
- var itpContent = document.querySelector('#CookiePartitionPrompt');
22
- itpContent.style.display = 'block';
23
-
24
- var button = document.querySelector('#AcceptCookies');
25
- button.addEventListener('click', setCookieAndRedirect);
26
- } else {
27
- setCookieAndRedirect();
28
- }
29
- });
30
- })();