shopify_app 11.3.2 → 11.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -2
  3. data/CHANGELOG.md +24 -0
  4. data/README.md +100 -102
  5. data/app/controllers/concerns/shopify_app/authenticated.rb +1 -1
  6. data/app/controllers/shopify_app/callback_controller.rb +8 -2
  7. data/app/controllers/shopify_app/extension_verification_controller.rb +20 -0
  8. data/config/locales/nl.yml +7 -7
  9. data/lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb +39 -0
  10. data/lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb +66 -0
  11. data/lib/generators/shopify_app/install/install_generator.rb +0 -4
  12. data/lib/generators/shopify_app/install/templates/shopify_app.rb +1 -1
  13. data/lib/generators/shopify_app/install/templates/shopify_provider.rb +1 -0
  14. data/lib/generators/shopify_app/user_model/templates/db/migrate/create_users.erb +16 -0
  15. data/lib/generators/shopify_app/user_model/templates/user.rb +7 -0
  16. data/lib/generators/shopify_app/user_model/templates/users.yml +4 -0
  17. data/lib/generators/shopify_app/user_model/user_model_generator.rb +38 -0
  18. data/lib/shopify_app.rb +5 -0
  19. data/lib/shopify_app/configuration.rb +13 -8
  20. data/lib/shopify_app/controller_concerns/login_protection.rb +22 -3
  21. data/lib/shopify_app/engine.rb +4 -0
  22. data/lib/shopify_app/middleware/same_site_cookie_middleware.rb +60 -0
  23. data/lib/shopify_app/session/in_memory_session_store.rb +1 -1
  24. data/lib/shopify_app/session/session_repository.rb +2 -2
  25. data/lib/shopify_app/session/session_storage.rb +14 -15
  26. data/lib/shopify_app/session/storage_strategies/shop_storage_strategy.rb +24 -0
  27. data/lib/shopify_app/session/storage_strategies/user_storage_strategy.rb +26 -0
  28. data/lib/shopify_app/version.rb +1 -1
  29. data/package-lock.json +33 -35
  30. data/package.json +3 -2
  31. data/service.yml +1 -1
  32. data/shopify_app.gemspec +4 -2
  33. data/yarn.lock +14 -14
  34. metadata +49 -11
@@ -1,3 +1,3 @@
1
1
  module ShopifyApp
2
- VERSION = '11.3.2'.freeze
2
+ VERSION = '11.7.0'.freeze
3
3
  end
@@ -5909,12 +5909,6 @@
5909
5909
  "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
5910
5910
  "dev": true
5911
5911
  },
5912
- "serialize-javascript": {
5913
- "version": "1.9.1",
5914
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz",
5915
- "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==",
5916
- "dev": true
5917
- },
5918
5912
  "set-blocking": {
5919
5913
  "version": "2.0.0",
5920
5914
  "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
@@ -6497,31 +6491,6 @@
6497
6491
  }
6498
6492
  }
6499
6493
  },
6500
- "terser-webpack-plugin": {
6501
- "version": "1.4.1",
6502
- "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz",
6503
- "integrity": "sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==",
6504
- "dev": true,
6505
- "requires": {
6506
- "cacache": "12.0.3",
6507
- "find-cache-dir": "2.1.0",
6508
- "is-wsl": "1.1.0",
6509
- "schema-utils": "1.0.0",
6510
- "serialize-javascript": "1.9.1",
6511
- "source-map": "0.6.1",
6512
- "terser": "4.3.1",
6513
- "webpack-sources": "1.4.3",
6514
- "worker-farm": "1.7.0"
6515
- },
6516
- "dependencies": {
6517
- "source-map": {
6518
- "version": "0.6.1",
6519
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
6520
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
6521
- "dev": true
6522
- }
6523
- }
6524
- },
6525
6494
  "through2": {
6526
6495
  "version": "2.0.5",
6527
6496
  "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
@@ -6878,9 +6847,9 @@
6878
6847
  }
6879
6848
  },
6880
6849
  "webpack": {
6881
- "version": "4.40.2",
6882
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.40.2.tgz",
6883
- "integrity": "sha512-5nIvteTDCUws2DVvP9Qe+JPla7kWPPIDFZv55To7IycHWZ+Z5qBdaBYPyuXWdhggTufZkQwfIK+5rKQTVovm2A==",
6850
+ "version": "4.41.3",
6851
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.41.3.tgz",
6852
+ "integrity": "sha512-EcNzP9jGoxpQAXq1VOoTet0ik7/VVU1MovIfcUSAjLowc7GhcQku/sOXALvq5nPpSei2HF6VRhibeJSC3i/Law==",
6884
6853
  "dev": true,
6885
6854
  "requires": {
6886
6855
  "@webassemblyjs/ast": "1.8.5",
@@ -6903,7 +6872,7 @@
6903
6872
  "node-libs-browser": "2.2.1",
6904
6873
  "schema-utils": "1.0.0",
6905
6874
  "tapable": "1.1.3",
6906
- "terser-webpack-plugin": "1.4.1",
6875
+ "terser-webpack-plugin": "1.4.3",
6907
6876
  "watchpack": "1.6.0",
6908
6877
  "webpack-sources": "1.4.3"
6909
6878
  },
@@ -6925,6 +6894,35 @@
6925
6894
  "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz",
6926
6895
  "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==",
6927
6896
  "dev": true
6897
+ },
6898
+ "serialize-javascript": {
6899
+ "version": "2.1.2",
6900
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz",
6901
+ "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==",
6902
+ "dev": true
6903
+ },
6904
+ "source-map": {
6905
+ "version": "0.6.1",
6906
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
6907
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
6908
+ "dev": true
6909
+ },
6910
+ "terser-webpack-plugin": {
6911
+ "version": "1.4.3",
6912
+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz",
6913
+ "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==",
6914
+ "dev": true,
6915
+ "requires": {
6916
+ "cacache": "12.0.3",
6917
+ "find-cache-dir": "2.1.0",
6918
+ "is-wsl": "1.1.0",
6919
+ "schema-utils": "1.0.0",
6920
+ "serialize-javascript": "2.1.2",
6921
+ "source-map": "0.6.1",
6922
+ "terser": "4.3.1",
6923
+ "webpack-sources": "1.4.3",
6924
+ "worker-farm": "1.7.0"
6925
+ }
6928
6926
  }
6929
6927
  }
6930
6928
  },
@@ -19,9 +19,10 @@
19
19
  "mocha-debug": "^0.0.1",
20
20
  "sinon": "^7.4.2",
21
21
  "sinon-chai": "^3.2.0",
22
- "webpack": "^4.40.2"
22
+ "webpack": "^4.41.3"
23
23
  },
24
24
  "scripts": {
25
25
  "test": "./node_modules/.bin/karma start --browsers ChromeHeadless --single-run"
26
- }
26
+ },
27
+ "version": "11.6.0"
27
28
  }
@@ -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
@@ -14,11 +14,13 @@ Gem::Specification.new do |s|
14
14
  s.add_runtime_dependency('rails', '> 5.2.1')
15
15
  s.add_runtime_dependency('shopify_api', '~> 8.0')
16
16
  s.add_runtime_dependency('omniauth-shopify-oauth2', '~> 2.2.0')
17
- s.add_runtime_dependency('dotenv-rails', '~> 2.7.5')
18
17
 
19
18
  s.add_development_dependency('rake')
20
19
  s.add_development_dependency('byebug')
21
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')
22
24
  s.add_development_dependency('sqlite3', '~> 1.4')
23
25
  s.add_development_dependency('minitest')
24
26
  s.add_development_dependency('mocha')
@@ -27,4 +29,4 @@ Gem::Specification.new do |s|
27
29
  s.files = `git ls-files`.split("\n").reject { |f| f.match(%r{^(test|example)/}) }
28
30
  s.test_files = `git ls-files -- {test}/*`.split("\n")
29
31
  s.require_paths = ["lib"]
30
- end
32
+ end
data/yarn.lock CHANGED
@@ -4360,10 +4360,10 @@ semver@^6.3.0:
4360
4360
  resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
4361
4361
  integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
4362
4362
 
4363
- serialize-javascript@^1.7.0:
4364
- version "1.9.1"
4365
- resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.9.1.tgz#cfc200aef77b600c47da9bb8149c943e798c2fdb"
4366
- integrity sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==
4363
+ serialize-javascript@^2.1.2:
4364
+ version "2.1.2"
4365
+ resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61"
4366
+ integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==
4367
4367
 
4368
4368
  set-blocking@^2.0.0, set-blocking@~2.0.0:
4369
4369
  version "2.0.0"
@@ -4769,16 +4769,16 @@ tar@^4:
4769
4769
  safe-buffer "^5.1.2"
4770
4770
  yallist "^3.0.3"
4771
4771
 
4772
- terser-webpack-plugin@^1.4.1:
4773
- version "1.4.1"
4774
- resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz#61b18e40eaee5be97e771cdbb10ed1280888c2b4"
4775
- integrity sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==
4772
+ terser-webpack-plugin@^1.4.3:
4773
+ version "1.4.3"
4774
+ resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c"
4775
+ integrity sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==
4776
4776
  dependencies:
4777
4777
  cacache "^12.0.2"
4778
4778
  find-cache-dir "^2.1.0"
4779
4779
  is-wsl "^1.1.0"
4780
4780
  schema-utils "^1.0.0"
4781
- serialize-javascript "^1.7.0"
4781
+ serialize-javascript "^2.1.2"
4782
4782
  source-map "^0.6.1"
4783
4783
  terser "^4.1.2"
4784
4784
  webpack-sources "^1.4.0"
@@ -5083,10 +5083,10 @@ webpack-sources@^1.4.0, webpack-sources@^1.4.1:
5083
5083
  source-list-map "^2.0.0"
5084
5084
  source-map "~0.6.1"
5085
5085
 
5086
- webpack@^4.40.2:
5087
- version "4.40.2"
5088
- resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.40.2.tgz#d21433d250f900bf0facbabe8f50d585b2dc30a7"
5089
- integrity sha512-5nIvteTDCUws2DVvP9Qe+JPla7kWPPIDFZv55To7IycHWZ+Z5qBdaBYPyuXWdhggTufZkQwfIK+5rKQTVovm2A==
5086
+ webpack@^4.41.3:
5087
+ version "4.41.3"
5088
+ resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.41.3.tgz#cb7592c43080337dbc9be9e98fc6478eb3981026"
5089
+ integrity sha512-EcNzP9jGoxpQAXq1VOoTet0ik7/VVU1MovIfcUSAjLowc7GhcQku/sOXALvq5nPpSei2HF6VRhibeJSC3i/Law==
5090
5090
  dependencies:
5091
5091
  "@webassemblyjs/ast" "1.8.5"
5092
5092
  "@webassemblyjs/helper-module-context" "1.8.5"
@@ -5108,7 +5108,7 @@ webpack@^4.40.2:
5108
5108
  node-libs-browser "^2.2.1"
5109
5109
  schema-utils "^1.0.0"
5110
5110
  tapable "^1.1.3"
5111
- terser-webpack-plugin "^1.4.1"
5111
+ terser-webpack-plugin "^1.4.3"
5112
5112
  watchpack "^1.6.0"
5113
5113
  webpack-sources "^1.4.1"
5114
5114
 
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: 11.3.2
4
+ version: 11.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-21 00:00:00.000000000 Z
11
+ date: 2020-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser_sniffer
@@ -67,21 +67,21 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: 2.2.0
69
69
  - !ruby/object:Gem::Dependency
70
- name: dotenv-rails
70
+ name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 2.7.5
76
- type: :runtime
75
+ version: '0'
76
+ type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 2.7.5
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rake
84
+ name: byebug
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: byebug
98
+ name: pry
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -109,7 +109,35 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: pry
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
113
141
  requirement: !ruby/object:Gem::Requirement
114
142
  requirements:
115
143
  - - ">="
@@ -211,6 +239,7 @@ files:
211
239
  - app/controllers/concerns/shopify_app/authenticated.rb
212
240
  - app/controllers/shopify_app/authenticated_controller.rb
213
241
  - app/controllers/shopify_app/callback_controller.rb
242
+ - app/controllers/shopify_app/extension_verification_controller.rb
214
243
  - app/controllers/shopify_app/sessions_controller.rb
215
244
  - app/controllers/shopify_app/webhooks_controller.rb
216
245
  - app/views/shopify_app/partials/_button_styles.html.erb
@@ -253,6 +282,8 @@ files:
253
282
  - karma.conf.js
254
283
  - lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb
255
284
  - lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb
285
+ - lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb
286
+ - lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb
256
287
  - lib/generators/shopify_app/add_webhook/add_webhook_generator.rb
257
288
  - lib/generators/shopify_app/add_webhook/templates/webhook_job.rb
258
289
  - lib/generators/shopify_app/app_proxy_controller/app_proxy_controller_generator.rb
@@ -287,6 +318,10 @@ files:
287
318
  - lib/generators/shopify_app/shop_model/templates/shop.rb
288
319
  - lib/generators/shopify_app/shop_model/templates/shops.yml
289
320
  - lib/generators/shopify_app/shopify_app_generator.rb
321
+ - lib/generators/shopify_app/user_model/templates/db/migrate/create_users.erb
322
+ - lib/generators/shopify_app/user_model/templates/user.rb
323
+ - lib/generators/shopify_app/user_model/templates/users.yml
324
+ - lib/generators/shopify_app/user_model/user_model_generator.rb
290
325
  - lib/generators/shopify_app/views/views_generator.rb
291
326
  - lib/shopify_app.rb
292
327
  - lib/shopify_app/configuration.rb
@@ -301,9 +336,12 @@ files:
301
336
  - lib/shopify_app/jobs/webhooks_manager_job.rb
302
337
  - lib/shopify_app/managers/scripttags_manager.rb
303
338
  - lib/shopify_app/managers/webhooks_manager.rb
339
+ - lib/shopify_app/middleware/same_site_cookie_middleware.rb
304
340
  - lib/shopify_app/session/in_memory_session_store.rb
305
341
  - lib/shopify_app/session/session_repository.rb
306
342
  - lib/shopify_app/session/session_storage.rb
343
+ - lib/shopify_app/session/storage_strategies/shop_storage_strategy.rb
344
+ - lib/shopify_app/session/storage_strategies/user_storage_strategy.rb
307
345
  - lib/shopify_app/utils.rb
308
346
  - lib/shopify_app/version.rb
309
347
  - package-lock.json