shopify_app 7.2.0 → 17.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.babelrc +5 -0
- data/.github/CODEOWNERS +1 -0
- data/.github/ISSUE_TEMPLATE/bug-report.md +63 -0
- data/.github/ISSUE_TEMPLATE/config.yml +1 -0
- data/.github/ISSUE_TEMPLATE/feature-request.md +33 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +22 -0
- data/.github/probots.yml +2 -0
- data/.github/workflows/build.yml +38 -0
- data/.github/workflows/release.yml +24 -0
- data/.github/workflows/rubocop.yml +22 -0
- data/.gitignore +4 -1
- data/.nvmrc +1 -0
- data/.rubocop.yml +18 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +465 -0
- data/CONTRIBUTING.md +76 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +256 -0
- data/README.md +73 -288
- data/Rakefile +1 -0
- data/SECURITY.md +59 -0
- data/app/assets/images/storage_access.svg +1 -0
- data/app/assets/javascripts/shopify_app/enable_cookies.js +3 -0
- data/app/assets/javascripts/shopify_app/itp_helper.js +40 -0
- data/app/assets/javascripts/shopify_app/partition_cookies.js +8 -0
- data/app/assets/javascripts/shopify_app/redirect.js +33 -0
- data/app/assets/javascripts/shopify_app/request_storage_access.js +3 -0
- data/app/assets/javascripts/shopify_app/storage_access.js +154 -0
- data/app/assets/javascripts/shopify_app/storage_access_redirect.js +17 -0
- data/app/assets/javascripts/shopify_app/top_level.js +2 -0
- data/app/assets/javascripts/shopify_app/top_level_interaction.js +11 -0
- data/app/controllers/concerns/shopify_app/authenticated.rb +16 -0
- data/app/controllers/concerns/shopify_app/ensure_authenticated_links.rb +26 -0
- data/app/controllers/concerns/shopify_app/require_known_shop.rb +39 -0
- data/app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb +32 -0
- data/app/controllers/shopify_app/authenticated_controller.rb +5 -5
- data/app/controllers/shopify_app/callback_controller.rb +196 -0
- data/app/controllers/shopify_app/extension_verification_controller.rb +15 -0
- data/app/controllers/shopify_app/sessions_controller.rb +190 -2
- data/app/controllers/shopify_app/webhooks_controller.rb +16 -7
- data/app/views/shopify_app/partials/_button_styles.html.erb +109 -0
- data/app/views/shopify_app/partials/_card_styles.html.erb +33 -0
- data/app/views/shopify_app/partials/_empty_state_styles.html.erb +98 -0
- data/app/views/shopify_app/partials/_form_styles.html.erb +56 -0
- data/app/views/shopify_app/partials/_layout_styles.html.erb +182 -0
- data/app/views/shopify_app/partials/_typography_styles.html.erb +35 -0
- data/app/views/shopify_app/sessions/enable_cookies.html.erb +70 -0
- data/app/views/shopify_app/sessions/new.html.erb +39 -83
- data/app/views/shopify_app/sessions/request_storage_access.html.erb +68 -0
- data/app/views/shopify_app/sessions/top_level_interaction.html.erb +63 -0
- data/app/views/shopify_app/shared/redirect.html.erb +23 -0
- data/config/locales/cs.yml +23 -0
- data/config/locales/da.yml +20 -0
- data/config/locales/de.yml +22 -0
- data/config/locales/en.yml +12 -1
- data/config/locales/es.yml +21 -3
- data/config/locales/fi.yml +20 -0
- data/config/locales/fr.yml +23 -0
- data/config/locales/hi.yml +23 -0
- data/config/locales/it.yml +21 -0
- data/config/locales/ja.yml +17 -0
- data/config/locales/ko.yml +19 -0
- data/config/locales/ms.yml +22 -0
- data/config/locales/nb.yml +21 -0
- data/config/locales/nl.yml +21 -0
- data/config/locales/pl.yml +21 -0
- data/config/locales/pt-BR.yml +21 -0
- data/config/locales/pt-PT.yml +22 -0
- data/config/locales/sv.yml +21 -0
- data/config/locales/th.yml +20 -0
- data/config/locales/tr.yml +22 -0
- data/config/locales/vi.yml +22 -0
- data/config/locales/zh-CN.yml +16 -0
- data/config/locales/zh-TW.yml +16 -0
- data/config/routes.rb +12 -1
- data/docs/Quickstart.md +31 -0
- data/docs/Releasing.md +21 -0
- data/docs/Troubleshooting.md +16 -0
- data/docs/Upgrading.md +110 -0
- data/docs/shopify_app/authentication.md +124 -0
- data/docs/shopify_app/engine.md +82 -0
- data/docs/shopify_app/generators.md +127 -0
- data/docs/shopify_app/handling-access-scopes-changes.md +8 -0
- data/docs/shopify_app/script-tags.md +28 -0
- data/docs/shopify_app/session-repository.md +88 -0
- data/docs/shopify_app/testing.md +38 -0
- data/docs/shopify_app/webhooks.md +72 -0
- data/karma.conf.js +44 -0
- data/lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb +47 -0
- data/lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb +11 -0
- data/lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb +40 -0
- data/lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb +62 -0
- data/lib/generators/shopify_app/add_webhook/add_webhook_generator.rb +5 -4
- data/lib/generators/shopify_app/add_webhook/templates/{webhook_job.rb → webhook_job.rb.tt} +5 -0
- data/lib/generators/shopify_app/app_proxy_controller/app_proxy_controller_generator.rb +4 -3
- data/lib/generators/shopify_app/app_proxy_controller/templates/app_proxy_controller.rb +3 -3
- data/lib/generators/shopify_app/app_proxy_controller/templates/app_proxy_route.rb +10 -9
- data/lib/generators/shopify_app/app_proxy_controller/templates/index.html.erb +2 -2
- data/lib/generators/shopify_app/authenticated_controller/authenticated_controller_generator.rb +15 -0
- data/lib/generators/shopify_app/authenticated_controller/templates/authenticated_controller.rb +5 -0
- data/lib/generators/shopify_app/controllers/controllers_generator.rb +2 -1
- data/lib/generators/shopify_app/home_controller/home_controller_generator.rb +31 -9
- data/lib/generators/shopify_app/home_controller/templates/home_controller.rb +6 -1
- data/lib/generators/shopify_app/home_controller/templates/index.html.erb +70 -6
- data/lib/generators/shopify_app/home_controller/templates/unauthenticated_home_controller.rb +11 -0
- data/lib/generators/shopify_app/install/install_generator.rb +78 -27
- data/lib/generators/shopify_app/install/templates/_flash_messages.html.erb +1 -13
- data/lib/generators/shopify_app/install/templates/embedded_app.html.erb +12 -11
- data/lib/generators/shopify_app/install/templates/flash_messages.js +24 -0
- data/lib/generators/shopify_app/install/templates/omniauth.rb +3 -1
- data/lib/generators/shopify_app/install/templates/session_store.rb +4 -0
- data/lib/generators/shopify_app/install/templates/shopify_app.js +15 -0
- data/lib/generators/shopify_app/install/templates/shopify_app.rb.tt +25 -0
- data/lib/generators/shopify_app/install/templates/shopify_app_index.js +2 -0
- data/lib/generators/shopify_app/install/templates/shopify_provider.rb.tt +8 -0
- data/lib/generators/shopify_app/install/templates/user_agent.rb +6 -0
- data/lib/generators/shopify_app/products_controller/products_controller_generator.rb +19 -0
- data/lib/generators/shopify_app/products_controller/templates/products_controller.rb +8 -0
- data/lib/generators/shopify_app/rotate_shopify_token_job/rotate_shopify_token_job_generator.rb +16 -0
- data/lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token.rake +17 -0
- data/lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token_job.rb +42 -0
- data/lib/generators/shopify_app/routes/routes_generator.rb +1 -0
- data/lib/generators/shopify_app/routes/templates/routes.rb +10 -9
- data/lib/generators/shopify_app/shop_model/shop_model_generator.rb +42 -14
- data/lib/generators/shopify_app/shop_model/templates/db/migrate/add_shop_access_scopes_column.erb +5 -0
- data/lib/generators/shopify_app/shop_model/templates/db/migrate/{create_shops.rb → create_shops.erb} +1 -1
- data/lib/generators/shopify_app/shop_model/templates/shop.rb +6 -2
- data/lib/generators/shopify_app/shopify_app_generator.rb +5 -3
- data/lib/generators/shopify_app/user_model/templates/db/migrate/add_user_access_scopes_column.erb +5 -0
- data/lib/generators/shopify_app/user_model/templates/db/migrate/create_users.erb +16 -0
- data/lib/generators/shopify_app/user_model/templates/user.rb +8 -0
- data/lib/generators/shopify_app/user_model/templates/users.yml +4 -0
- data/lib/generators/shopify_app/user_model/user_model_generator.rb +70 -0
- data/lib/generators/shopify_app/views/views_generator.rb +2 -1
- data/lib/shopify_app/access_scopes/noop_strategy.rb +13 -0
- data/lib/shopify_app/access_scopes/shop_strategy.rb +24 -0
- data/lib/shopify_app/access_scopes/user_strategy.rb +41 -0
- data/lib/shopify_app/configuration.rb +69 -5
- data/lib/shopify_app/{app_proxy_verification.rb → controller_concerns/app_proxy_verification.rb} +4 -9
- data/lib/shopify_app/controller_concerns/csrf_protection.rb +15 -0
- data/lib/shopify_app/controller_concerns/embedded_app.rb +20 -0
- data/lib/shopify_app/controller_concerns/itp.rb +45 -0
- data/lib/shopify_app/controller_concerns/localization.rb +23 -0
- data/lib/shopify_app/controller_concerns/login_protection.rb +244 -0
- data/lib/shopify_app/controller_concerns/payload_verification.rb +24 -0
- data/lib/shopify_app/controller_concerns/webhook_verification.rb +23 -0
- data/lib/shopify_app/engine.rb +40 -0
- data/lib/shopify_app/jobs/scripttags_manager_job.rb +16 -0
- data/lib/shopify_app/{webhooks_manager_job.rb → jobs/webhooks_manager_job.rb} +3 -2
- data/lib/shopify_app/{scripttags_manager.rb → managers/scripttags_manager.rb} +25 -8
- data/lib/shopify_app/{webhooks_manager.rb → managers/webhooks_manager.rb} +6 -5
- data/lib/shopify_app/middleware/jwt_middleware.rb +42 -0
- data/lib/shopify_app/middleware/same_site_cookie_middleware.rb +34 -0
- data/lib/shopify_app/omniauth/omniauth_configuration.rb +64 -0
- data/lib/shopify_app/session/in_memory_session_store.rb +31 -0
- data/lib/shopify_app/session/in_memory_shop_session_store.rb +16 -0
- data/lib/shopify_app/session/in_memory_user_session_store.rb +16 -0
- data/lib/shopify_app/session/jwt.rb +63 -0
- data/lib/shopify_app/session/null_user_session_store.rb +22 -0
- data/lib/shopify_app/session/session_repository.rb +56 -0
- data/lib/shopify_app/session/session_storage.rb +20 -0
- data/lib/shopify_app/session/shop_session_storage.rb +42 -0
- data/lib/shopify_app/session/shop_session_storage_with_scopes.rb +58 -0
- data/lib/shopify_app/session/user_session_storage.rb +42 -0
- data/lib/shopify_app/session/user_session_storage_with_scopes.rb +58 -0
- data/lib/shopify_app/test_helpers/all.rb +2 -0
- data/lib/shopify_app/test_helpers/webhook_verification_helper.rb +17 -0
- data/lib/shopify_app/utils.rb +24 -4
- data/lib/shopify_app/version.rb +2 -1
- data/lib/shopify_app.rb +65 -24
- data/package.json +27 -0
- data/service.yml +7 -0
- data/shipit.rubygems.yml +3 -0
- data/shopify_app.gemspec +20 -9
- data/translation.yml +7 -0
- data/webpack.config.js +24 -0
- data/yarn.lock +5215 -0
- metadata +274 -43
- data/.travis.yml +0 -17
- data/Gemfile.rails50 +0 -5
- data/Gemfile.ruby22 +0 -6
- data/Gemfile.ruby22.rails50 +0 -9
- data/ISSUE_TEMPLATE.md +0 -14
- data/QUICKSTART.md +0 -72
- data/RELEASING +0 -13
- data/lib/generators/shopify_app/home_controller/templates/shopify_app_ready_script.html.erb +0 -11
- data/lib/generators/shopify_app/install/templates/shopify_app.rb +0 -9
- data/lib/generators/shopify_app/install/templates/shopify_provider.rb +0 -4
- data/lib/generators/shopify_app/install/templates/shopify_session_repository.rb +0 -23
- data/lib/generators/shopify_app/shop_model/templates/shopify_session_repository.rb +0 -7
- data/lib/shopify_app/in_memory_session_store.rb +0 -25
- data/lib/shopify_app/login_protection.rb +0 -103
- data/lib/shopify_app/scripttags_manager_job.rb +0 -15
- data/lib/shopify_app/session_storage.rb +0 -23
- data/lib/shopify_app/sessions_concern.rb +0 -101
- data/lib/shopify_app/shop.rb +0 -15
- data/lib/shopify_app/shopify_session_repository.rb +0 -34
- data/lib/shopify_app/webhook_verification.rb +0 -39
metadata
CHANGED
@@ -1,57 +1,105 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 17.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-05 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.2.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.2.2
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rails
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- - "
|
31
|
+
- - ">"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 5.2.1
|
34
|
+
- - "<"
|
18
35
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
36
|
+
version: '6.1'
|
20
37
|
type: :runtime
|
21
38
|
prerelease: false
|
22
39
|
version_requirements: !ruby/object:Gem::Requirement
|
23
40
|
requirements:
|
24
|
-
- - "
|
41
|
+
- - ">"
|
25
42
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
43
|
+
version: 5.2.1
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '6.1'
|
27
47
|
- !ruby/object:Gem::Dependency
|
28
48
|
name: shopify_api
|
29
49
|
requirement: !ruby/object:Gem::Requirement
|
30
50
|
requirements:
|
31
|
-
- - "
|
51
|
+
- - "~>"
|
32
52
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4
|
53
|
+
version: '9.4'
|
34
54
|
type: :runtime
|
35
55
|
prerelease: false
|
36
56
|
version_requirements: !ruby/object:Gem::Requirement
|
37
57
|
requirements:
|
38
|
-
- - "
|
58
|
+
- - "~>"
|
39
59
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4
|
60
|
+
version: '9.4'
|
41
61
|
- !ruby/object:Gem::Dependency
|
42
62
|
name: omniauth-shopify-oauth2
|
43
63
|
requirement: !ruby/object:Gem::Requirement
|
44
64
|
requirements:
|
45
65
|
- - "~>"
|
46
66
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
67
|
+
version: 2.2.2
|
48
68
|
type: :runtime
|
49
69
|
prerelease: false
|
50
70
|
version_requirements: !ruby/object:Gem::Requirement
|
51
71
|
requirements:
|
52
72
|
- - "~>"
|
53
73
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
74
|
+
version: 2.2.2
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: jwt
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 2.2.1
|
82
|
+
type: :runtime
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 2.2.1
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: redirect_safely
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.0'
|
96
|
+
type: :runtime
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '1.0'
|
55
103
|
- !ruby/object:Gem::Dependency
|
56
104
|
name: rake
|
57
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,7 +129,21 @@ dependencies:
|
|
81
129
|
- !ruby/object:Gem::Version
|
82
130
|
version: '0'
|
83
131
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
132
|
+
name: pry
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: pry-nav
|
85
147
|
requirement: !ruby/object:Gem::Requirement
|
86
148
|
requirements:
|
87
149
|
- - ">="
|
@@ -94,6 +156,48 @@ dependencies:
|
|
94
156
|
- - ">="
|
95
157
|
- !ruby/object:Gem::Version
|
96
158
|
version: '0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: pry-stack_explorer
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
- !ruby/object:Gem::Dependency
|
174
|
+
name: rb-readline
|
175
|
+
requirement: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
type: :development
|
181
|
+
prerelease: false
|
182
|
+
version_requirements: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
- !ruby/object:Gem::Dependency
|
188
|
+
name: sqlite3
|
189
|
+
requirement: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - "~>"
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '1.4'
|
194
|
+
type: :development
|
195
|
+
prerelease: false
|
196
|
+
version_requirements: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - "~>"
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '1.4'
|
97
201
|
- !ruby/object:Gem::Dependency
|
98
202
|
name: minitest
|
99
203
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,82 +226,210 @@ dependencies:
|
|
122
226
|
- - ">="
|
123
227
|
- !ruby/object:Gem::Version
|
124
228
|
version: '0'
|
229
|
+
- !ruby/object:Gem::Dependency
|
230
|
+
name: webmock
|
231
|
+
requirement: !ruby/object:Gem::Requirement
|
232
|
+
requirements:
|
233
|
+
- - ">="
|
234
|
+
- !ruby/object:Gem::Version
|
235
|
+
version: '0'
|
236
|
+
type: :development
|
237
|
+
prerelease: false
|
238
|
+
version_requirements: !ruby/object:Gem::Requirement
|
239
|
+
requirements:
|
240
|
+
- - ">="
|
241
|
+
- !ruby/object:Gem::Version
|
242
|
+
version: '0'
|
125
243
|
description:
|
126
244
|
email:
|
127
245
|
executables: []
|
128
246
|
extensions: []
|
129
247
|
extra_rdoc_files: []
|
130
248
|
files:
|
249
|
+
- ".babelrc"
|
250
|
+
- ".github/CODEOWNERS"
|
251
|
+
- ".github/ISSUE_TEMPLATE/bug-report.md"
|
252
|
+
- ".github/ISSUE_TEMPLATE/config.yml"
|
253
|
+
- ".github/ISSUE_TEMPLATE/feature-request.md"
|
254
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
255
|
+
- ".github/probots.yml"
|
256
|
+
- ".github/workflows/build.yml"
|
257
|
+
- ".github/workflows/release.yml"
|
258
|
+
- ".github/workflows/rubocop.yml"
|
131
259
|
- ".gitignore"
|
132
|
-
- ".
|
260
|
+
- ".nvmrc"
|
261
|
+
- ".rubocop.yml"
|
262
|
+
- ".ruby-version"
|
133
263
|
- CHANGELOG.md
|
264
|
+
- CONTRIBUTING.md
|
134
265
|
- Gemfile
|
135
|
-
- Gemfile.
|
136
|
-
- Gemfile.ruby22
|
137
|
-
- Gemfile.ruby22.rails50
|
138
|
-
- ISSUE_TEMPLATE.md
|
266
|
+
- Gemfile.lock
|
139
267
|
- LICENSE
|
140
|
-
- QUICKSTART.md
|
141
268
|
- README.md
|
142
|
-
- RELEASING
|
143
269
|
- Rakefile
|
270
|
+
- SECURITY.md
|
271
|
+
- app/assets/images/storage_access.svg
|
272
|
+
- app/assets/javascripts/shopify_app/enable_cookies.js
|
273
|
+
- app/assets/javascripts/shopify_app/itp_helper.js
|
274
|
+
- app/assets/javascripts/shopify_app/partition_cookies.js
|
275
|
+
- app/assets/javascripts/shopify_app/redirect.js
|
276
|
+
- app/assets/javascripts/shopify_app/request_storage_access.js
|
277
|
+
- app/assets/javascripts/shopify_app/storage_access.js
|
278
|
+
- app/assets/javascripts/shopify_app/storage_access_redirect.js
|
279
|
+
- app/assets/javascripts/shopify_app/top_level.js
|
280
|
+
- app/assets/javascripts/shopify_app/top_level_interaction.js
|
281
|
+
- app/controllers/concerns/shopify_app/authenticated.rb
|
282
|
+
- app/controllers/concerns/shopify_app/ensure_authenticated_links.rb
|
283
|
+
- app/controllers/concerns/shopify_app/require_known_shop.rb
|
284
|
+
- app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb
|
144
285
|
- app/controllers/shopify_app/authenticated_controller.rb
|
286
|
+
- app/controllers/shopify_app/callback_controller.rb
|
287
|
+
- app/controllers/shopify_app/extension_verification_controller.rb
|
145
288
|
- app/controllers/shopify_app/sessions_controller.rb
|
146
289
|
- app/controllers/shopify_app/webhooks_controller.rb
|
290
|
+
- app/views/shopify_app/partials/_button_styles.html.erb
|
291
|
+
- app/views/shopify_app/partials/_card_styles.html.erb
|
292
|
+
- app/views/shopify_app/partials/_empty_state_styles.html.erb
|
293
|
+
- app/views/shopify_app/partials/_form_styles.html.erb
|
294
|
+
- app/views/shopify_app/partials/_layout_styles.html.erb
|
295
|
+
- app/views/shopify_app/partials/_typography_styles.html.erb
|
296
|
+
- app/views/shopify_app/sessions/enable_cookies.html.erb
|
147
297
|
- app/views/shopify_app/sessions/new.html.erb
|
298
|
+
- app/views/shopify_app/sessions/request_storage_access.html.erb
|
299
|
+
- app/views/shopify_app/sessions/top_level_interaction.html.erb
|
300
|
+
- app/views/shopify_app/shared/redirect.html.erb
|
301
|
+
- config/locales/cs.yml
|
302
|
+
- config/locales/da.yml
|
303
|
+
- config/locales/de.yml
|
148
304
|
- config/locales/en.yml
|
149
305
|
- config/locales/es.yml
|
306
|
+
- config/locales/fi.yml
|
307
|
+
- config/locales/fr.yml
|
308
|
+
- config/locales/hi.yml
|
309
|
+
- config/locales/it.yml
|
310
|
+
- config/locales/ja.yml
|
311
|
+
- config/locales/ko.yml
|
312
|
+
- config/locales/ms.yml
|
313
|
+
- config/locales/nb.yml
|
314
|
+
- config/locales/nl.yml
|
315
|
+
- config/locales/pl.yml
|
316
|
+
- config/locales/pt-BR.yml
|
317
|
+
- config/locales/pt-PT.yml
|
318
|
+
- config/locales/sv.yml
|
319
|
+
- config/locales/th.yml
|
320
|
+
- config/locales/tr.yml
|
321
|
+
- config/locales/vi.yml
|
322
|
+
- config/locales/zh-CN.yml
|
323
|
+
- config/locales/zh-TW.yml
|
150
324
|
- config/routes.rb
|
325
|
+
- docs/Quickstart.md
|
326
|
+
- docs/Releasing.md
|
327
|
+
- docs/Troubleshooting.md
|
328
|
+
- docs/Upgrading.md
|
329
|
+
- docs/shopify_app/authentication.md
|
330
|
+
- docs/shopify_app/engine.md
|
331
|
+
- docs/shopify_app/generators.md
|
332
|
+
- docs/shopify_app/handling-access-scopes-changes.md
|
333
|
+
- docs/shopify_app/script-tags.md
|
334
|
+
- docs/shopify_app/session-repository.md
|
335
|
+
- docs/shopify_app/testing.md
|
336
|
+
- docs/shopify_app/webhooks.md
|
151
337
|
- images/app-proxy-screenshot.png
|
338
|
+
- karma.conf.js
|
339
|
+
- lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb
|
340
|
+
- lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb
|
341
|
+
- lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb
|
342
|
+
- lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb
|
152
343
|
- lib/generators/shopify_app/add_webhook/add_webhook_generator.rb
|
153
|
-
- lib/generators/shopify_app/add_webhook/templates/webhook_job.rb
|
344
|
+
- lib/generators/shopify_app/add_webhook/templates/webhook_job.rb.tt
|
154
345
|
- lib/generators/shopify_app/app_proxy_controller/app_proxy_controller_generator.rb
|
155
346
|
- lib/generators/shopify_app/app_proxy_controller/templates/app_proxy_controller.rb
|
156
347
|
- lib/generators/shopify_app/app_proxy_controller/templates/app_proxy_route.rb
|
157
348
|
- lib/generators/shopify_app/app_proxy_controller/templates/index.html.erb
|
349
|
+
- lib/generators/shopify_app/authenticated_controller/authenticated_controller_generator.rb
|
350
|
+
- lib/generators/shopify_app/authenticated_controller/templates/authenticated_controller.rb
|
158
351
|
- lib/generators/shopify_app/controllers/controllers_generator.rb
|
159
352
|
- lib/generators/shopify_app/home_controller/home_controller_generator.rb
|
160
353
|
- lib/generators/shopify_app/home_controller/templates/home_controller.rb
|
161
354
|
- lib/generators/shopify_app/home_controller/templates/index.html.erb
|
162
|
-
- lib/generators/shopify_app/home_controller/templates/
|
355
|
+
- lib/generators/shopify_app/home_controller/templates/unauthenticated_home_controller.rb
|
163
356
|
- lib/generators/shopify_app/install/install_generator.rb
|
164
357
|
- lib/generators/shopify_app/install/templates/_flash_messages.html.erb
|
165
358
|
- lib/generators/shopify_app/install/templates/embedded_app.html.erb
|
359
|
+
- lib/generators/shopify_app/install/templates/flash_messages.js
|
166
360
|
- lib/generators/shopify_app/install/templates/omniauth.rb
|
167
|
-
- lib/generators/shopify_app/install/templates/
|
168
|
-
- lib/generators/shopify_app/install/templates/
|
169
|
-
- lib/generators/shopify_app/install/templates/
|
361
|
+
- lib/generators/shopify_app/install/templates/session_store.rb
|
362
|
+
- lib/generators/shopify_app/install/templates/shopify_app.js
|
363
|
+
- lib/generators/shopify_app/install/templates/shopify_app.rb.tt
|
364
|
+
- lib/generators/shopify_app/install/templates/shopify_app_index.js
|
365
|
+
- lib/generators/shopify_app/install/templates/shopify_provider.rb.tt
|
366
|
+
- lib/generators/shopify_app/install/templates/user_agent.rb
|
367
|
+
- lib/generators/shopify_app/products_controller/products_controller_generator.rb
|
368
|
+
- lib/generators/shopify_app/products_controller/templates/products_controller.rb
|
369
|
+
- lib/generators/shopify_app/rotate_shopify_token_job/rotate_shopify_token_job_generator.rb
|
370
|
+
- lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token.rake
|
371
|
+
- lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token_job.rb
|
170
372
|
- lib/generators/shopify_app/routes/routes_generator.rb
|
171
373
|
- lib/generators/shopify_app/routes/templates/routes.rb
|
172
374
|
- lib/generators/shopify_app/shop_model/shop_model_generator.rb
|
173
|
-
- lib/generators/shopify_app/shop_model/templates/db/migrate/
|
375
|
+
- lib/generators/shopify_app/shop_model/templates/db/migrate/add_shop_access_scopes_column.erb
|
376
|
+
- lib/generators/shopify_app/shop_model/templates/db/migrate/create_shops.erb
|
174
377
|
- lib/generators/shopify_app/shop_model/templates/shop.rb
|
175
|
-
- lib/generators/shopify_app/shop_model/templates/shopify_session_repository.rb
|
176
378
|
- lib/generators/shopify_app/shop_model/templates/shops.yml
|
177
379
|
- lib/generators/shopify_app/shopify_app_generator.rb
|
380
|
+
- lib/generators/shopify_app/user_model/templates/db/migrate/add_user_access_scopes_column.erb
|
381
|
+
- lib/generators/shopify_app/user_model/templates/db/migrate/create_users.erb
|
382
|
+
- lib/generators/shopify_app/user_model/templates/user.rb
|
383
|
+
- lib/generators/shopify_app/user_model/templates/users.yml
|
384
|
+
- lib/generators/shopify_app/user_model/user_model_generator.rb
|
178
385
|
- lib/generators/shopify_app/views/views_generator.rb
|
179
386
|
- lib/shopify_app.rb
|
180
|
-
- lib/shopify_app/
|
387
|
+
- lib/shopify_app/access_scopes/noop_strategy.rb
|
388
|
+
- lib/shopify_app/access_scopes/shop_strategy.rb
|
389
|
+
- lib/shopify_app/access_scopes/user_strategy.rb
|
181
390
|
- lib/shopify_app/configuration.rb
|
391
|
+
- lib/shopify_app/controller_concerns/app_proxy_verification.rb
|
392
|
+
- lib/shopify_app/controller_concerns/csrf_protection.rb
|
393
|
+
- lib/shopify_app/controller_concerns/embedded_app.rb
|
394
|
+
- lib/shopify_app/controller_concerns/itp.rb
|
395
|
+
- lib/shopify_app/controller_concerns/localization.rb
|
396
|
+
- lib/shopify_app/controller_concerns/login_protection.rb
|
397
|
+
- lib/shopify_app/controller_concerns/payload_verification.rb
|
398
|
+
- lib/shopify_app/controller_concerns/webhook_verification.rb
|
182
399
|
- lib/shopify_app/engine.rb
|
183
|
-
- lib/shopify_app/
|
184
|
-
- lib/shopify_app/
|
185
|
-
- lib/shopify_app/scripttags_manager.rb
|
186
|
-
- lib/shopify_app/
|
187
|
-
- lib/shopify_app/
|
188
|
-
- lib/shopify_app/
|
189
|
-
- lib/shopify_app/
|
190
|
-
- lib/shopify_app/
|
400
|
+
- lib/shopify_app/jobs/scripttags_manager_job.rb
|
401
|
+
- lib/shopify_app/jobs/webhooks_manager_job.rb
|
402
|
+
- lib/shopify_app/managers/scripttags_manager.rb
|
403
|
+
- lib/shopify_app/managers/webhooks_manager.rb
|
404
|
+
- lib/shopify_app/middleware/jwt_middleware.rb
|
405
|
+
- lib/shopify_app/middleware/same_site_cookie_middleware.rb
|
406
|
+
- lib/shopify_app/omniauth/omniauth_configuration.rb
|
407
|
+
- lib/shopify_app/session/in_memory_session_store.rb
|
408
|
+
- lib/shopify_app/session/in_memory_shop_session_store.rb
|
409
|
+
- lib/shopify_app/session/in_memory_user_session_store.rb
|
410
|
+
- lib/shopify_app/session/jwt.rb
|
411
|
+
- lib/shopify_app/session/null_user_session_store.rb
|
412
|
+
- lib/shopify_app/session/session_repository.rb
|
413
|
+
- lib/shopify_app/session/session_storage.rb
|
414
|
+
- lib/shopify_app/session/shop_session_storage.rb
|
415
|
+
- lib/shopify_app/session/shop_session_storage_with_scopes.rb
|
416
|
+
- lib/shopify_app/session/user_session_storage.rb
|
417
|
+
- lib/shopify_app/session/user_session_storage_with_scopes.rb
|
418
|
+
- lib/shopify_app/test_helpers/all.rb
|
419
|
+
- lib/shopify_app/test_helpers/webhook_verification_helper.rb
|
191
420
|
- lib/shopify_app/utils.rb
|
192
421
|
- lib/shopify_app/version.rb
|
193
|
-
-
|
194
|
-
-
|
195
|
-
- lib/shopify_app/webhooks_manager_job.rb
|
422
|
+
- package.json
|
423
|
+
- service.yml
|
196
424
|
- shipit.rubygems.yml
|
197
425
|
- shopify_app.gemspec
|
426
|
+
- translation.yml
|
427
|
+
- webpack.config.js
|
428
|
+
- yarn.lock
|
198
429
|
homepage:
|
199
430
|
licenses: []
|
200
|
-
metadata:
|
431
|
+
metadata:
|
432
|
+
allowed_push_host: https://rubygems.org
|
201
433
|
post_install_message:
|
202
434
|
rdoc_options: []
|
203
435
|
require_paths:
|
@@ -206,15 +438,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
206
438
|
requirements:
|
207
439
|
- - ">="
|
208
440
|
- !ruby/object:Gem::Version
|
209
|
-
version: 2.
|
441
|
+
version: '2.5'
|
210
442
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
211
443
|
requirements:
|
212
444
|
- - ">="
|
213
445
|
- !ruby/object:Gem::Version
|
214
446
|
version: '0'
|
215
447
|
requirements: []
|
216
|
-
|
217
|
-
rubygems_version: 2.5.1
|
448
|
+
rubygems_version: 3.0.3
|
218
449
|
signing_key:
|
219
450
|
specification_version: 4
|
220
451
|
summary: This gem is used to get quickly started with the Shopify API
|
data/.travis.yml
DELETED
data/Gemfile.rails50
DELETED
data/Gemfile.ruby22
DELETED
data/Gemfile.ruby22.rails50
DELETED
data/ISSUE_TEMPLATE.md
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
Submitting Issues
|
2
|
-
-----------------
|
3
|
-
|
4
|
-
Please open an issue here if you encounter a specific bug with this gem or the generators
|
5
|
-
|
6
|
-
General questions about the Shopify API should be posted on the [Shopify forums](https://ecommerce.shopify.com/c/shopify-apis-and-technology).
|
7
|
-
|
8
|
-
|
9
|
-
Authentication Issues
|
10
|
-
---------------------
|
11
|
-
|
12
|
-
A great deal of the issues surrounding this repo are around authenticating (installing) the generated app with Shopify.
|
13
|
-
|
14
|
-
If you are experiencing issues with your app authenticating/installing the best way to get help fast is to create a repo with the minimal amount of code to demonstrate the issue and a clearly documented set of steps you took to arrive there. This will help us solve your problem quicker since we won't need to spend any time figuring out how to reproduce the bug. Please also include your operating system and browser.
|
data/QUICKSTART.md
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
Quickstart
|
2
|
-
==========
|
3
|
-
|
4
|
-
Build and deploy a new Shopify App to Heroku in minutes
|
5
|
-
|
6
|
-
1. New Rails App (with postgres)
|
7
|
-
--------------------------------
|
8
|
-
|
9
|
-
```
|
10
|
-
rails new test-app --database=postgresql
|
11
|
-
cd test-app
|
12
|
-
git init
|
13
|
-
git add .
|
14
|
-
git commit -m 'new rails app'
|
15
|
-
```
|
16
|
-
|
17
|
-
2. Create a new Heroku app
|
18
|
-
--------------------------
|
19
|
-
|
20
|
-
The next step is to create a new heroku app. Pull up your heroku dashboard and make a new app!
|
21
|
-
|
22
|
-
cli:
|
23
|
-
```
|
24
|
-
heroku create name
|
25
|
-
heroku git:remote -a name
|
26
|
-
```
|
27
|
-
|
28
|
-
now we need to let git know where the remote server is so we'll be able to deploy later
|
29
|
-
|
30
|
-
web:
|
31
|
-
```
|
32
|
-
https://dashboard.heroku.com/new
|
33
|
-
git remote add heroku git@heroku.com:appinfive.git
|
34
|
-
```
|
35
|
-
|
36
|
-
3. Create a new App in the partners area
|
37
|
-
-----------------------------------------
|
38
|
-
[https://app.shopify.com/services/partners/api_clients](https://app.shopify.com/services/partners/api_clients)
|
39
|
-
* set the callback url to `https://<name>.herokuapp.com/`
|
40
|
-
* choose an embedded app
|
41
|
-
* set the redirect_uri to `https://<name>.herokuapp.com/auth/shopify/callback`
|
42
|
-
|
43
|
-
|
44
|
-
4. Add ShopifyApp to gemfile
|
45
|
-
----------------------------
|
46
|
-
```
|
47
|
-
$ echo "gem 'shopify_app'" >> Gemfile
|
48
|
-
|
49
|
-
bundle install
|
50
|
-
```
|
51
|
-
|
52
|
-
Note - its recommended to use the latest released version. Check the git tags to see the latest release and then add it to your Gemfile e.g `gem 'shopify_app', '~> 7.0.0'`
|
53
|
-
|
54
|
-
5. Run the ShopifyApp generator
|
55
|
-
-------------------------------
|
56
|
-
```
|
57
|
-
use the keys from your app in the partners area
|
58
|
-
rails generate shopify_app --api_key a366cbafaccebd2f615aebdfc932fa1c --secret 8750306a895b3dbc7f4136c2ae2ea293
|
59
|
-
git add .
|
60
|
-
git commit -m 'generated shopify app'
|
61
|
-
```
|
62
|
-
|
63
|
-
6. Deploy
|
64
|
-
---------
|
65
|
-
```
|
66
|
-
git push heroku
|
67
|
-
heroku run rake db:migrate
|
68
|
-
```
|
69
|
-
|
70
|
-
7. Install the App!
|
71
|
-
-------------------
|
72
|
-
`https://<name>.herokuapp.com/`
|
data/RELEASING
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
Releasing ShopifyApp
|
2
|
-
|
3
|
-
1. Check the Semantic Versioning page for info on how to version the new release: http://semver.org
|
4
|
-
2. Update the version of ShopifyApp in lib/shopify_app/version.rb
|
5
|
-
3. Add a CHANGELOG entry for the new release with the date
|
6
|
-
4. Commit the changes with a commit message like "Packaging for release X.Y.Z"
|
7
|
-
5. Tag the release with the version (Leave REV blank for HEAD or provide a SHA)
|
8
|
-
$ git tag vX.Y.Z REV
|
9
|
-
6. Push out the changes
|
10
|
-
$ git push
|
11
|
-
7. Push out the tags
|
12
|
-
$ git push --tags
|
13
|
-
8. Use Shipit to build and push the gem
|
@@ -1,9 +0,0 @@
|
|
1
|
-
ShopifyApp.configure do |config|
|
2
|
-
<% if @application_name.present? %>
|
3
|
-
config.application_name = "<%= @application_name %>"
|
4
|
-
<% end %>
|
5
|
-
config.api_key = "<%= @api_key %>"
|
6
|
-
config.secret = "<%= @secret %>"
|
7
|
-
config.scope = "<%= @scope %>"
|
8
|
-
config.embedded_app = <%= embedded_app? %>
|
9
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# You should replace InMemorySessionStore with what you will be using
|
2
|
-
# in Production. For example a model called "Shop":
|
3
|
-
#
|
4
|
-
# ShopifySessionRepository.storage = 'Shop'
|
5
|
-
#
|
6
|
-
# Interface to implement are self.retrieve(id) and self.store(ShopifyAPI::Session)
|
7
|
-
# Here is how you would add these functions to an ActiveRecord:
|
8
|
-
#
|
9
|
-
# class Shop < ActiveRecord::Base
|
10
|
-
# def self.store(session)
|
11
|
-
# shop = self.new(domain: session.url, token: session.token)
|
12
|
-
# shop.save!
|
13
|
-
# shop.id
|
14
|
-
# end
|
15
|
-
#
|
16
|
-
# def self.retrieve(id)
|
17
|
-
# if shop = self.where(id: id).first
|
18
|
-
# ShopifyAPI::Session.new(shop.domain, shop.token)
|
19
|
-
# end
|
20
|
-
# end
|
21
|
-
# end
|
22
|
-
|
23
|
-
ShopifyApp::SessionRepository.storage = InMemorySessionStore
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# WARNING - This really only works for development, see README for more details
|
2
|
-
class InMemorySessionStore
|
3
|
-
class EnvironmentError < StandardError; end
|
4
|
-
|
5
|
-
def self.retrieve(id)
|
6
|
-
repo[id]
|
7
|
-
end
|
8
|
-
|
9
|
-
def self.store(session)
|
10
|
-
id = SecureRandom.uuid
|
11
|
-
repo[id] = session
|
12
|
-
id
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.clear
|
16
|
-
@@repo = nil
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.repo
|
20
|
-
if Rails.env.production?
|
21
|
-
raise EnvironmentError.new("Cannot use InMemorySessionStore in a Production environment")
|
22
|
-
end
|
23
|
-
@@repo ||= {}
|
24
|
-
end
|
25
|
-
end
|