shopify_app 9.0.0 → 13.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -2
  3. data/CHANGELOG.md +159 -0
  4. data/README.md +221 -130
  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 +2 -2
  8. data/app/controllers/shopify_app/callback_controller.rb +20 -7
  9. data/app/controllers/shopify_app/extension_verification_controller.rb +20 -0
  10. data/app/controllers/shopify_app/sessions_controller.rb +71 -22
  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/home_controller/templates/index.html.erb +1 -1
  47. data/lib/generators/shopify_app/install/install_generator.rb +27 -11
  48. data/lib/generators/shopify_app/install/templates/_flash_messages.html.erb +1 -17
  49. data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +11 -10
  50. data/lib/generators/shopify_app/install/templates/flash_messages.js +26 -0
  51. data/lib/generators/shopify_app/install/templates/shopify_app.js +15 -0
  52. data/lib/generators/shopify_app/install/templates/shopify_app.rb +6 -3
  53. data/lib/generators/shopify_app/install/templates/shopify_app_index.js +2 -0
  54. data/lib/generators/shopify_app/install/templates/shopify_provider.rb +1 -0
  55. data/lib/generators/shopify_app/install/templates/user_agent.rb +5 -0
  56. data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +1 -1
  57. data/lib/generators/shopify_app/shop_model/templates/shop.rb +1 -1
  58. data/lib/generators/shopify_app/user_model/templates/db/migrate/create_users.erb +16 -0
  59. data/lib/generators/shopify_app/user_model/templates/user.rb +7 -0
  60. data/lib/generators/shopify_app/user_model/templates/users.yml +4 -0
  61. data/lib/generators/shopify_app/user_model/user_model_generator.rb +38 -0
  62. data/lib/shopify_app/configuration.rb +22 -10
  63. data/lib/shopify_app/controller_concerns/login_protection.rb +66 -15
  64. data/lib/shopify_app/engine.rb +4 -0
  65. data/lib/shopify_app/managers/webhooks_manager.rb +1 -1
  66. data/lib/shopify_app/middleware/same_site_cookie_middleware.rb +33 -0
  67. data/lib/shopify_app/session/in_memory_session_store.rb +1 -1
  68. data/lib/shopify_app/session/in_memory_shop_session_store.rb +4 -0
  69. data/lib/shopify_app/session/in_memory_user_session_store.rb +4 -0
  70. data/lib/shopify_app/session/session_repository.rb +38 -13
  71. data/lib/shopify_app/session/session_storage.rb +0 -22
  72. data/lib/shopify_app/session/shop_session_storage.rb +30 -0
  73. data/lib/shopify_app/session/user_session_storage.rb +31 -0
  74. data/lib/shopify_app/utils.rb +7 -0
  75. data/lib/shopify_app/version.rb +1 -1
  76. data/lib/shopify_app.rb +48 -29
  77. data/package-lock.json +7227 -5
  78. data/package.json +9 -9
  79. data/service.yml +1 -1
  80. data/shopify_app.gemspec +10 -5
  81. data/translation.yml +1 -1
  82. data/yarn.lock +2555 -1886
  83. metadata +117 -19
  84. data/lib/generators/shopify_app/home_controller/templates/shopify_app_ready_script.html.erb +0 -7
data/package.json CHANGED
@@ -1,26 +1,26 @@
1
1
  {
2
2
  "name": "shopify_app",
3
- "version": "9.0.0",
3
+ "version": "13.0.0",
4
4
  "repository": "git@github.com:Shopify/shopify_app.git",
5
5
  "author": "Shopify",
6
6
  "license": "MIT",
7
7
  "dependencies": {},
8
8
  "devDependencies": {
9
- "babel-loader": "^8.0.2",
10
- "babel-preset-shopify": "^16.5.0",
9
+ "babel-loader": "^8.0.6",
10
+ "babel-preset-shopify": "^20.0.0",
11
11
  "chai": "^4.1.2",
12
- "karma": "^3.0.0",
12
+ "karma": "^4.0.1",
13
13
  "karma-chai-sinon": "^0.1.5",
14
- "karma-chrome-launcher": "^2.2.0",
15
- "karma-cli": "^1.0.1",
14
+ "karma-chrome-launcher": "^3.1.0",
15
+ "karma-cli": "^2.0.0",
16
16
  "karma-mocha": "^1.3.0",
17
17
  "karma-mocha-clean-reporter": "^0.0.1",
18
18
  "karma-mocha-debug": "^0.1.2",
19
- "karma-webpack": "^3.0.5",
19
+ "karma-webpack": "^4.0.2",
20
20
  "mocha-debug": "^0.0.1",
21
- "sinon": "^6.3.4",
21
+ "sinon": "^7.4.2",
22
22
  "sinon-chai": "^3.2.0",
23
- "webpack": "^4.20.2"
23
+ "webpack": "^4.41.3"
24
24
  },
25
25
  "scripts": {
26
26
  "test": "./node_modules/.bin/karma start --browsers ChromeHeadless --single-run"
data/service.yml CHANGED
@@ -2,6 +2,6 @@ audience: partner
2
2
  classification: library
3
3
  org_line: App & Partner Platform
4
4
  owners:
5
- - Shopify/app-partner-dev-tools-education
5
+ - Shopify/platform-dev-tools-education
6
6
  slack_channels:
7
7
  - dev-tools-education
data/shopify_app.gemspec CHANGED
@@ -10,16 +10,21 @@ Gem::Specification.new do |s|
10
10
 
11
11
  s.required_ruby_version = ">= 2.3.1"
12
12
 
13
- s.add_runtime_dependency('browser_sniffer', '~> 1.1.0')
14
- s.add_runtime_dependency('rails', '>= 5.0.0')
15
- s.add_runtime_dependency('shopify_api', '>= 7.0.0')
16
- s.add_runtime_dependency('omniauth-shopify-oauth2', '~> 2.1.0')
13
+ s.add_runtime_dependency('browser_sniffer', '~> 1.2.0')
14
+ s.add_runtime_dependency('rails', '> 5.2.1')
15
+ s.add_runtime_dependency('shopify_api', '~> 9.0.2')
16
+ s.add_runtime_dependency('omniauth-shopify-oauth2', '~> 2.2.2')
17
17
 
18
18
  s.add_development_dependency('rake')
19
19
  s.add_development_dependency('byebug')
20
- s.add_development_dependency('sqlite3', '~> 1.3.6')
20
+ s.add_development_dependency('pry')
21
+ s.add_development_dependency('pry-nav')
22
+ s.add_development_dependency('pry-stack_explorer')
23
+ s.add_development_dependency('rb-readline')
24
+ s.add_development_dependency('sqlite3', '~> 1.4')
21
25
  s.add_development_dependency('minitest')
22
26
  s.add_development_dependency('mocha')
27
+ s.add_development_dependency('webmock')
23
28
 
24
29
  s.files = `git ls-files`.split("\n").reject { |f| f.match(%r{^(test|example)/}) }
25
30
  s.test_files = `git ls-files -- {test}/*`.split("\n")
data/translation.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  source_language: en
2
- target_languages: [de, es, fr, it, ja, nl, pt-BR, zh-CN, zh-TW]
2
+ target_languages: [cs, da, de, es, fi, fr, hi, it, ja, ko, ms, nb, nl, pl, pt-BR, pt-PT, sv, th, tr, zh-CN, zh-TW]
3
3
  components:
4
4
  - name: 'merchant'
5
5
  paths: