shopify_app 7.2.0 → 8.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +5 -5
  2. data/.babelrc +5 -0
  3. data/.github/CODEOWNERS +1 -0
  4. data/{ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE.md} +0 -0
  5. data/.github/probots.yml +2 -0
  6. data/.gitignore +5 -0
  7. data/.nvmrc +1 -0
  8. data/.rubocop.yml +10 -0
  9. data/.ruby-version +1 -0
  10. data/.travis.yml +24 -12
  11. data/CHANGELOG.md +151 -0
  12. data/Gemfile +2 -0
  13. data/README.md +167 -68
  14. data/app/assets/images/storage_access.svg +2 -0
  15. data/app/assets/javascripts/shopify_app/enable_cookies.js +3 -0
  16. data/app/assets/javascripts/shopify_app/itp_helper.js +40 -0
  17. data/app/assets/javascripts/shopify_app/partition_cookies.js +7 -0
  18. data/app/assets/javascripts/shopify_app/redirect.js +33 -0
  19. data/app/assets/javascripts/shopify_app/request_storage_access.js +3 -0
  20. data/app/assets/javascripts/shopify_app/storage_access.js +121 -0
  21. data/app/assets/javascripts/shopify_app/storage_access_redirect.js +17 -0
  22. data/app/assets/javascripts/shopify_app/top_level.js +2 -0
  23. data/app/assets/javascripts/shopify_app/top_level_interaction.js +11 -0
  24. data/app/controllers/shopify_app/authenticated_controller.rb +5 -2
  25. data/app/controllers/shopify_app/callback_controller.rb +92 -0
  26. data/app/controllers/shopify_app/sessions_controller.rb +120 -2
  27. data/app/controllers/shopify_app/webhooks_controller.rb +11 -3
  28. data/app/views/shopify_app/partials/_button_styles.html.erb +104 -0
  29. data/app/views/shopify_app/partials/_card_styles.html.erb +33 -0
  30. data/app/views/shopify_app/partials/_empty_state_styles.html.erb +129 -0
  31. data/app/views/shopify_app/partials/_layout_styles.html.erb +167 -0
  32. data/app/views/shopify_app/partials/_typography_styles.html.erb +35 -0
  33. data/app/views/shopify_app/sessions/enable_cookies.html.erb +59 -0
  34. data/app/views/shopify_app/sessions/new.html.erb +88 -60
  35. data/app/views/shopify_app/sessions/request_storage_access.html.erb +67 -0
  36. data/app/views/shopify_app/sessions/top_level_interaction.html.erb +63 -0
  37. data/app/views/shopify_app/shared/redirect.html.erb +22 -0
  38. data/config/locales/de.yml +22 -0
  39. data/config/locales/en.yml +12 -1
  40. data/config/locales/es.yml +21 -3
  41. data/config/locales/fr.yml +23 -0
  42. data/config/locales/it.yml +22 -0
  43. data/config/locales/ja.yml +17 -0
  44. data/config/locales/nl.yml +21 -0
  45. data/config/locales/pt-BR.yml +22 -0
  46. data/config/locales/zh-CN.yml +16 -0
  47. data/config/locales/zh-TW.yml +17 -0
  48. data/config/routes.rb +11 -1
  49. data/{QUICKSTART.md → docs/Quickstart.md} +26 -23
  50. data/docs/Releasing.md +18 -0
  51. data/docs/Troubleshooting.md +16 -0
  52. data/karma.conf.js +43 -0
  53. data/lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb +45 -0
  54. data/lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb +10 -0
  55. data/lib/generators/shopify_app/home_controller/templates/home_controller.rb +1 -0
  56. data/lib/generators/shopify_app/home_controller/templates/index.html.erb +14 -0
  57. data/lib/generators/shopify_app/home_controller/templates/shopify_app_ready_script.html.erb +1 -5
  58. data/lib/generators/shopify_app/install/install_generator.rb +10 -16
  59. data/lib/generators/shopify_app/install/templates/_flash_messages.html.erb +13 -9
  60. data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +1 -1
  61. data/lib/generators/shopify_app/install/templates/shopify_app.rb +5 -3
  62. data/lib/generators/shopify_app/install/templates/shopify_provider.rb +19 -4
  63. data/lib/generators/shopify_app/rotate_shopify_token_job/rotate_shopify_token_job_generator.rb +16 -0
  64. data/lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token.rake +17 -0
  65. data/lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token_job.rb +42 -0
  66. data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +5 -9
  67. data/lib/generators/shopify_app/shop_model/templates/db/migrate/{create_shops.rb → create_shops.erb} +1 -1
  68. data/lib/generators/shopify_app/shop_model/templates/shop.rb +0 -1
  69. data/lib/shopify_app/configuration.rb +27 -8
  70. data/lib/shopify_app/{app_proxy_verification.rb → controller_concerns/app_proxy_verification.rb} +2 -7
  71. data/lib/shopify_app/controller_concerns/embedded_app.rb +19 -0
  72. data/lib/shopify_app/controller_concerns/itp.rb +45 -0
  73. data/lib/shopify_app/controller_concerns/localization.rb +22 -0
  74. data/lib/shopify_app/controller_concerns/login_protection.rb +135 -0
  75. data/lib/shopify_app/{webhook_verification.rb → controller_concerns/webhook_verification.rb} +11 -12
  76. data/lib/shopify_app/engine.rb +10 -0
  77. data/lib/shopify_app/{scripttags_manager_job.rb → jobs/scripttags_manager_job.rb} +2 -2
  78. data/lib/shopify_app/{webhooks_manager_job.rb → jobs/webhooks_manager_job.rb} +0 -0
  79. data/lib/shopify_app/{scripttags_manager.rb → managers/scripttags_manager.rb} +24 -8
  80. data/lib/shopify_app/{webhooks_manager.rb → managers/webhooks_manager.rb} +1 -1
  81. data/lib/shopify_app/session/in_memory_session_store.rb +27 -0
  82. data/lib/shopify_app/{shopify_session_repository.rb → session/session_repository.rb} +0 -0
  83. data/lib/shopify_app/{session_storage.rb → session/session_storage.rb} +9 -0
  84. data/lib/shopify_app/utils.rb +2 -2
  85. data/lib/shopify_app/version.rb +1 -1
  86. data/lib/shopify_app.rb +21 -16
  87. data/package-lock.json +23 -0
  88. data/package.json +28 -0
  89. data/service.yml +7 -0
  90. data/shipit.rubygems.yml +2 -0
  91. data/shopify_app.gemspec +6 -5
  92. data/translation.yml +7 -0
  93. data/webpack.config.js +24 -0
  94. data/yarn.lock +4594 -0
  95. metadata +92 -35
  96. data/Gemfile.rails50 +0 -5
  97. data/Gemfile.ruby22 +0 -6
  98. data/Gemfile.ruby22.rails50 +0 -9
  99. data/RELEASING +0 -13
  100. data/lib/generators/shopify_app/install/templates/shopify_session_repository.rb +0 -23
  101. data/lib/generators/shopify_app/shop_model/templates/shopify_session_repository.rb +0 -7
  102. data/lib/shopify_app/in_memory_session_store.rb +0 -25
  103. data/lib/shopify_app/login_protection.rb +0 -103
  104. data/lib/shopify_app/sessions_concern.rb +0 -101
  105. data/lib/shopify_app/shop.rb +0 -15
data/shopify_app.gemspec CHANGED
@@ -8,15 +8,16 @@ Gem::Specification.new do |s|
8
8
  s.author = "Shopify"
9
9
  s.summary = %q{This gem is used to get quickly started with the Shopify API}
10
10
 
11
- s.required_ruby_version = ">= 2.2.2"
11
+ s.required_ruby_version = ">= 2.3.1"
12
12
 
13
- s.add_runtime_dependency('rails', '>= 4.2.6')
14
- s.add_runtime_dependency('shopify_api', '>= 4.2.2')
15
- s.add_runtime_dependency('omniauth-shopify-oauth2', '~> 1.1.11')
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', '>= 4.3.5')
16
+ s.add_runtime_dependency('omniauth-shopify-oauth2', '~> 2.1.0')
16
17
 
17
18
  s.add_development_dependency('rake')
18
19
  s.add_development_dependency('byebug')
19
- s.add_development_dependency('sqlite3')
20
+ s.add_development_dependency('sqlite3', '~> 1.3.6')
20
21
  s.add_development_dependency('minitest')
21
22
  s.add_development_dependency('mocha')
22
23
 
data/translation.yml ADDED
@@ -0,0 +1,7 @@
1
+ source_language: en
2
+ target_languages: [de, es, fr, it, ja, nl, pt-BR, zh-CN, zh-TW]
3
+ components:
4
+ - name: 'merchant'
5
+ paths:
6
+ - config/locales/{{language}}.yml
7
+ - config/locales/**/{{language}}.yml
data/webpack.config.js ADDED
@@ -0,0 +1,24 @@
1
+
2
+ var path = require('path');
3
+ var webpack = require('webpack');
4
+
5
+ module.exports = {
6
+ mode: 'development',
7
+ entry: 'test/javascripts/test.js',
8
+ output: {
9
+ path: path.resolve(__dirname, 'build'),
10
+ filename: 'test.bundle.js'
11
+ },
12
+ module: {
13
+ loaders: [
14
+ {
15
+ test: /\.js$/,
16
+ loader: 'babel-loader',
17
+ }
18
+ ]
19
+ },
20
+ stats: {
21
+ colors: true
22
+ },
23
+ devtool: 'source-map'
24
+ };