shopify_app 9.0.0 → 12.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -2
  3. data/CHANGELOG.md +145 -0
  4. data/README.md +180 -126
  5. data/app/assets/javascripts/shopify_app/itp_helper.js +6 -6
  6. data/app/assets/javascripts/shopify_app/storage_access.js +36 -7
  7. data/app/controllers/concerns/shopify_app/authenticated.rb +1 -1
  8. data/app/controllers/shopify_app/callback_controller.rb +14 -5
  9. data/app/controllers/shopify_app/extension_verification_controller.rb +20 -0
  10. data/app/controllers/shopify_app/sessions_controller.rb +44 -18
  11. data/app/views/shopify_app/sessions/enable_cookies.html.erb +3 -1
  12. data/app/views/shopify_app/sessions/request_storage_access.html.erb +2 -1
  13. data/app/views/shopify_app/sessions/top_level_interaction.html.erb +1 -0
  14. data/app/views/shopify_app/shared/redirect.html.erb +1 -0
  15. data/config/locales/cs.yml +23 -0
  16. data/config/locales/da.yml +20 -0
  17. data/config/locales/de.yml +5 -5
  18. data/config/locales/en.yml +1 -1
  19. data/config/locales/es.yml +3 -3
  20. data/config/locales/fi.yml +20 -0
  21. data/config/locales/fr.yml +3 -3
  22. data/config/locales/hi.yml +23 -0
  23. data/config/locales/it.yml +2 -3
  24. data/config/locales/ja.yml +1 -1
  25. data/config/locales/ko.yml +19 -0
  26. data/config/locales/ms.yml +22 -0
  27. data/config/locales/nb.yml +21 -0
  28. data/config/locales/nl.yml +3 -3
  29. data/config/locales/pl.yml +21 -0
  30. data/config/locales/pt-BR.yml +9 -10
  31. data/config/locales/pt-PT.yml +22 -0
  32. data/config/locales/sv.yml +21 -0
  33. data/config/locales/th.yml +20 -0
  34. data/config/locales/tr.yml +22 -0
  35. data/config/locales/zh-CN.yml +3 -3
  36. data/config/locales/zh-TW.yml +1 -2
  37. data/docs/Quickstart.md +44 -16
  38. data/docs/Releasing.md +0 -1
  39. data/docs/install-on-dev-shop.png +0 -0
  40. data/docs/test-your-app.png +0 -0
  41. data/karma.conf.js +1 -0
  42. data/lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb +2 -2
  43. data/lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb +39 -0
  44. data/lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb +62 -0
  45. data/lib/generators/shopify_app/home_controller/home_controller_generator.rb +0 -6
  46. data/lib/generators/shopify_app/install/install_generator.rb +27 -11
  47. data/lib/generators/shopify_app/install/templates/_flash_messages.html.erb +1 -17
  48. data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +11 -10
  49. data/lib/generators/shopify_app/install/templates/flash_messages.js +26 -0
  50. data/lib/generators/shopify_app/install/templates/shopify_app.js +15 -0
  51. data/lib/generators/shopify_app/install/templates/shopify_app.rb +6 -3
  52. data/lib/generators/shopify_app/install/templates/shopify_app_index.js +2 -0
  53. data/lib/generators/shopify_app/install/templates/shopify_provider.rb +1 -0
  54. data/lib/generators/shopify_app/install/templates/user_agent.rb +5 -0
  55. data/lib/generators/shopify_app/user_model/templates/db/migrate/create_users.erb +16 -0
  56. data/lib/generators/shopify_app/user_model/templates/user.rb +7 -0
  57. data/lib/generators/shopify_app/user_model/templates/users.yml +4 -0
  58. data/lib/generators/shopify_app/user_model/user_model_generator.rb +38 -0
  59. data/lib/shopify_app.rb +46 -29
  60. data/lib/shopify_app/configuration.rb +24 -9
  61. data/lib/shopify_app/controller_concerns/login_protection.rb +53 -7
  62. data/lib/shopify_app/engine.rb +4 -0
  63. data/lib/shopify_app/managers/webhooks_manager.rb +1 -1
  64. data/lib/shopify_app/middleware/same_site_cookie_middleware.rb +33 -0
  65. data/lib/shopify_app/session/in_memory_session_store.rb +1 -1
  66. data/lib/shopify_app/session/session_repository.rb +2 -2
  67. data/lib/shopify_app/session/session_storage.rb +10 -22
  68. data/lib/shopify_app/session/storage_strategies/shop_storage_strategy.rb +23 -0
  69. data/lib/shopify_app/session/storage_strategies/user_storage_strategy.rb +24 -0
  70. data/lib/shopify_app/utils.rb +7 -0
  71. data/lib/shopify_app/version.rb +1 -1
  72. data/package-lock.json +7212 -11
  73. data/package.json +9 -9
  74. data/service.yml +1 -1
  75. data/shopify_app.gemspec +10 -5
  76. data/translation.yml +1 -1
  77. data/yarn.lock +2555 -1886
  78. metadata +115 -19
  79. data/lib/generators/shopify_app/home_controller/templates/shopify_app_ready_script.html.erb +0 -7
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.0
4
+ version: 12.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-09 00:00:00.000000000 Z
11
+ date: 2020-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser_sniffer
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.1.0
19
+ version: 1.2.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.1.0
26
+ version: 1.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ">"
32
32
  - !ruby/object:Gem::Version
33
- version: 5.0.0
33
+ version: 5.2.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ">"
39
39
  - !ruby/object:Gem::Version
40
- version: 5.0.0
40
+ version: 5.2.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: shopify_api
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 7.0.0
47
+ version: 9.0.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 7.0.0
54
+ version: 9.0.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: omniauth-shopify-oauth2
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 2.1.0
61
+ version: 2.2.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 2.1.0
68
+ version: 2.2.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -94,20 +94,76 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry-nav
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: pry-stack_explorer
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rb-readline
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
97
153
  - !ruby/object:Gem::Dependency
98
154
  name: sqlite3
99
155
  requirement: !ruby/object:Gem::Requirement
100
156
  requirements:
101
157
  - - "~>"
102
158
  - !ruby/object:Gem::Version
103
- version: 1.3.6
159
+ version: '1.4'
104
160
  type: :development
105
161
  prerelease: false
106
162
  version_requirements: !ruby/object:Gem::Requirement
107
163
  requirements:
108
164
  - - "~>"
109
165
  - !ruby/object:Gem::Version
110
- version: 1.3.6
166
+ version: '1.4'
111
167
  - !ruby/object:Gem::Dependency
112
168
  name: minitest
113
169
  requirement: !ruby/object:Gem::Requirement
@@ -136,6 +192,20 @@ dependencies:
136
192
  - - ">="
137
193
  - !ruby/object:Gem::Version
138
194
  version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: webmock
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
139
209
  description:
140
210
  email:
141
211
  executables: []
@@ -169,6 +239,7 @@ files:
169
239
  - app/controllers/concerns/shopify_app/authenticated.rb
170
240
  - app/controllers/shopify_app/authenticated_controller.rb
171
241
  - app/controllers/shopify_app/callback_controller.rb
242
+ - app/controllers/shopify_app/extension_verification_controller.rb
172
243
  - app/controllers/shopify_app/sessions_controller.rb
173
244
  - app/controllers/shopify_app/webhooks_controller.rb
174
245
  - app/views/shopify_app/partials/_button_styles.html.erb
@@ -181,24 +252,40 @@ files:
181
252
  - app/views/shopify_app/sessions/request_storage_access.html.erb
182
253
  - app/views/shopify_app/sessions/top_level_interaction.html.erb
183
254
  - app/views/shopify_app/shared/redirect.html.erb
255
+ - config/locales/cs.yml
256
+ - config/locales/da.yml
184
257
  - config/locales/de.yml
185
258
  - config/locales/en.yml
186
259
  - config/locales/es.yml
260
+ - config/locales/fi.yml
187
261
  - config/locales/fr.yml
262
+ - config/locales/hi.yml
188
263
  - config/locales/it.yml
189
264
  - config/locales/ja.yml
265
+ - config/locales/ko.yml
266
+ - config/locales/ms.yml
267
+ - config/locales/nb.yml
190
268
  - config/locales/nl.yml
269
+ - config/locales/pl.yml
191
270
  - config/locales/pt-BR.yml
271
+ - config/locales/pt-PT.yml
272
+ - config/locales/sv.yml
273
+ - config/locales/th.yml
274
+ - config/locales/tr.yml
192
275
  - config/locales/zh-CN.yml
193
276
  - config/locales/zh-TW.yml
194
277
  - config/routes.rb
195
278
  - docs/Quickstart.md
196
279
  - docs/Releasing.md
197
280
  - docs/Troubleshooting.md
281
+ - docs/install-on-dev-shop.png
282
+ - docs/test-your-app.png
198
283
  - images/app-proxy-screenshot.png
199
284
  - karma.conf.js
200
285
  - lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb
201
286
  - lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb
287
+ - lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb
288
+ - lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb
202
289
  - lib/generators/shopify_app/add_webhook/add_webhook_generator.rb
203
290
  - lib/generators/shopify_app/add_webhook/templates/webhook_job.rb
204
291
  - lib/generators/shopify_app/app_proxy_controller/app_proxy_controller_generator.rb
@@ -211,14 +298,17 @@ files:
211
298
  - lib/generators/shopify_app/home_controller/home_controller_generator.rb
212
299
  - lib/generators/shopify_app/home_controller/templates/home_controller.rb
213
300
  - lib/generators/shopify_app/home_controller/templates/index.html.erb
214
- - lib/generators/shopify_app/home_controller/templates/shopify_app_ready_script.html.erb
215
301
  - lib/generators/shopify_app/install/install_generator.rb
216
302
  - lib/generators/shopify_app/install/templates/_flash_messages.html.erb
217
303
  - lib/generators/shopify_app/install/templates/embedded_app.html.erb
304
+ - lib/generators/shopify_app/install/templates/flash_messages.js
218
305
  - lib/generators/shopify_app/install/templates/omniauth.rb
219
306
  - lib/generators/shopify_app/install/templates/session_store.rb
307
+ - lib/generators/shopify_app/install/templates/shopify_app.js
220
308
  - lib/generators/shopify_app/install/templates/shopify_app.rb
309
+ - lib/generators/shopify_app/install/templates/shopify_app_index.js
221
310
  - lib/generators/shopify_app/install/templates/shopify_provider.rb
311
+ - lib/generators/shopify_app/install/templates/user_agent.rb
222
312
  - lib/generators/shopify_app/rotate_shopify_token_job/rotate_shopify_token_job_generator.rb
223
313
  - lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token.rake
224
314
  - lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token_job.rb
@@ -229,6 +319,10 @@ files:
229
319
  - lib/generators/shopify_app/shop_model/templates/shop.rb
230
320
  - lib/generators/shopify_app/shop_model/templates/shops.yml
231
321
  - lib/generators/shopify_app/shopify_app_generator.rb
322
+ - lib/generators/shopify_app/user_model/templates/db/migrate/create_users.erb
323
+ - lib/generators/shopify_app/user_model/templates/user.rb
324
+ - lib/generators/shopify_app/user_model/templates/users.yml
325
+ - lib/generators/shopify_app/user_model/user_model_generator.rb
232
326
  - lib/generators/shopify_app/views/views_generator.rb
233
327
  - lib/shopify_app.rb
234
328
  - lib/shopify_app/configuration.rb
@@ -243,9 +337,12 @@ files:
243
337
  - lib/shopify_app/jobs/webhooks_manager_job.rb
244
338
  - lib/shopify_app/managers/scripttags_manager.rb
245
339
  - lib/shopify_app/managers/webhooks_manager.rb
340
+ - lib/shopify_app/middleware/same_site_cookie_middleware.rb
246
341
  - lib/shopify_app/session/in_memory_session_store.rb
247
342
  - lib/shopify_app/session/session_repository.rb
248
343
  - lib/shopify_app/session/session_storage.rb
344
+ - lib/shopify_app/session/storage_strategies/shop_storage_strategy.rb
345
+ - lib/shopify_app/session/storage_strategies/user_storage_strategy.rb
249
346
  - lib/shopify_app/utils.rb
250
347
  - lib/shopify_app/version.rb
251
348
  - package-lock.json
@@ -274,8 +371,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
274
371
  - !ruby/object:Gem::Version
275
372
  version: '0'
276
373
  requirements: []
277
- rubyforge_project:
278
- rubygems_version: 2.7.6
374
+ rubygems_version: 3.0.3
279
375
  signing_key:
280
376
  specification_version: 4
281
377
  summary: This gem is used to get quickly started with the Shopify API
@@ -1,7 +0,0 @@
1
- <% content_for :javascript do %>
2
- <script type="text/javascript">
3
- ShopifyApp.ready(function(){
4
- ShopifyApp.Bar.initialize({ title: "Home" });
5
- });
6
- </script>
7
- <% end %>