ruby_shopify_app 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/CHANGELOG.md +6 -0
  4. data/Gemfile +1 -0
  5. data/Gemfile.lock +169 -155
  6. data/README.md +1 -6
  7. data/Rakefile +1 -1
  8. data/app/controllers/products_controller.rb +8 -0
  9. data/bin/rails +14 -0
  10. data/config/routes.rb +1 -0
  11. data/lib/{shopify_app → ruby_shopify_app}/version.rb +1 -1
  12. data/lib/ruby_shopify_app.rb +80 -0
  13. data/shopify_app.gemspec +5 -7
  14. metadata +63 -89
  15. data/lib/shopify_app.rb +0 -80
  16. /data/lib/{shopify_app → ruby_shopify_app}/access_scopes/noop_strategy.rb +0 -0
  17. /data/lib/{shopify_app → ruby_shopify_app}/access_scopes/shop_strategy.rb +0 -0
  18. /data/lib/{shopify_app → ruby_shopify_app}/access_scopes/user_strategy.rb +0 -0
  19. /data/lib/{shopify_app → ruby_shopify_app}/configuration.rb +0 -0
  20. /data/lib/{shopify_app → ruby_shopify_app}/controller_concerns/app_proxy_verification.rb +0 -0
  21. /data/lib/{shopify_app → ruby_shopify_app}/controller_concerns/csrf_protection.rb +0 -0
  22. /data/lib/{shopify_app → ruby_shopify_app}/controller_concerns/embedded_app.rb +0 -0
  23. /data/lib/{shopify_app → ruby_shopify_app}/controller_concerns/itp.rb +0 -0
  24. /data/lib/{shopify_app → ruby_shopify_app}/controller_concerns/localization.rb +0 -0
  25. /data/lib/{shopify_app → ruby_shopify_app}/controller_concerns/login_protection.rb +0 -0
  26. /data/lib/{shopify_app → ruby_shopify_app}/controller_concerns/payload_verification.rb +0 -0
  27. /data/lib/{shopify_app → ruby_shopify_app}/controller_concerns/webhook_verification.rb +0 -0
  28. /data/lib/{shopify_app → ruby_shopify_app}/engine.rb +0 -0
  29. /data/lib/{shopify_app → ruby_shopify_app}/jobs/scripttags_manager_job.rb +0 -0
  30. /data/lib/{shopify_app → ruby_shopify_app}/jobs/webhooks_manager_job.rb +0 -0
  31. /data/lib/{shopify_app → ruby_shopify_app}/managers/scripttags_manager.rb +0 -0
  32. /data/lib/{shopify_app → ruby_shopify_app}/managers/webhooks_manager.rb +0 -0
  33. /data/lib/{shopify_app → ruby_shopify_app}/middleware/jwt_middleware.rb +0 -0
  34. /data/lib/{shopify_app → ruby_shopify_app}/middleware/same_site_cookie_middleware.rb +0 -0
  35. /data/lib/{shopify_app → ruby_shopify_app}/omniauth/omniauth_configuration.rb +0 -0
  36. /data/lib/{shopify_app → ruby_shopify_app}/session/in_memory_session_store.rb +0 -0
  37. /data/lib/{shopify_app → ruby_shopify_app}/session/in_memory_shop_session_store.rb +0 -0
  38. /data/lib/{shopify_app → ruby_shopify_app}/session/in_memory_user_session_store.rb +0 -0
  39. /data/lib/{shopify_app → ruby_shopify_app}/session/jwt.rb +0 -0
  40. /data/lib/{shopify_app → ruby_shopify_app}/session/null_user_session_store.rb +0 -0
  41. /data/lib/{shopify_app → ruby_shopify_app}/session/session_repository.rb +0 -0
  42. /data/lib/{shopify_app → ruby_shopify_app}/session/session_storage.rb +0 -0
  43. /data/lib/{shopify_app → ruby_shopify_app}/session/shop_session_storage.rb +0 -0
  44. /data/lib/{shopify_app → ruby_shopify_app}/session/shop_session_storage_with_scopes.rb +0 -0
  45. /data/lib/{shopify_app → ruby_shopify_app}/session/user_session_storage.rb +0 -0
  46. /data/lib/{shopify_app → ruby_shopify_app}/session/user_session_storage_with_scopes.rb +0 -0
  47. /data/lib/{shopify_app → ruby_shopify_app}/test_helpers/all.rb +0 -0
  48. /data/lib/{shopify_app → ruby_shopify_app}/test_helpers/webhook_verification_helper.rb +0 -0
  49. /data/lib/{shopify_app → ruby_shopify_app}/utils.rb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 723d05fdb4b99b038fa9579850e7ecc4e8f5f2ebbcffd9f0aa7c829c1ed6dff0
4
- data.tar.gz: 8a0337c5bb80f8d251271c2f6f6d659a3f58c9e2a35ffb2013c0ac9e4cff8df2
3
+ metadata.gz: c906c98c85e0ecff5777e1c540e66e1e98ab910a958b23026b58db1c54994ff2
4
+ data.tar.gz: 054b8c58d09906b598d2c168a9c3fd549e3115332be76ce0fd2ca6187f1c4e25
5
5
  SHA512:
6
- metadata.gz: 4adf59ff7798d44e844e9ac21984980afe2eea04c6c800861c5aa5620f7247219c2ebc3a75e53eb5fce869bef674358f96083c26174e445bfdaeb15da1cd9845
7
- data.tar.gz: 8582b8af9f75639421e3a7254e457dc558e5c0b48c4c9d7f8830a61ac556761557909887f6d5096f040cedb461bc8d75f7b3c4fcabba37fc3d161c7d5677f72c
6
+ metadata.gz: 3543a5662caec2fb5ecff0aa30652f8ff8a99b81c08a0ba5655e1867ea80c5e547cff828889fd03c29534c5d5ddbc23010dbbe814ec49a7390b6bf6682fc4385
7
+ data.tar.gz: fa36e379c6a89076af24441d13db09e0569a47c34c45b32a3f129c1be3d4e5fe47229945aefd80e0f49e0cdb2a8a77a1c77bb6ae17b59e24acf12f24bfed9e73
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.3
1
+ 3.1.3
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
1
 
2
+ 1.1.0
3
+ -----
4
+
5
+ * Update browser_sniffer to 2.0.0
6
+ * Support Rails 7.0
7
+
2
8
  1.0.0
3
9
  -----
4
10
 
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ source "https://rubygems.org"
5
5
  gemspec
6
6
 
7
7
  gem 'rails-controller-testing', group: :test
8
+ gem 'minitest-focus'
8
9
 
9
10
  group :rubocop do
10
11
  gem 'rubocop-shopify', require: false
data/Gemfile.lock CHANGED
@@ -1,142 +1,158 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_shopify_app (1.0.0)
5
- browser_sniffer (~> 1.4.0)
4
+ ruby_shopify_app (1.1.0)
5
+ browser_sniffer (~> 2.0)
6
6
  jwt (>= 2.2.3)
7
7
  omniauth-rails_csrf_protection
8
8
  omniauth-shopify-oauth2 (~> 2.3)
9
- rails (> 5.2.1)
9
+ rails (>= 6.1.0)
10
10
  redirect_safely (~> 1.0)
11
- ruby_shopify_api (~> 1.0)
11
+ ruby_shopify_api (~> 1.2)
12
+ sprockets-rails (>= 2.0.0)
12
13
 
13
14
  GEM
14
15
  remote: https://rubygems.org/
15
16
  specs:
16
- actioncable (6.1.4.4)
17
- actionpack (= 6.1.4.4)
18
- activesupport (= 6.1.4.4)
17
+ actioncable (7.0.8.1)
18
+ actionpack (= 7.0.8.1)
19
+ activesupport (= 7.0.8.1)
19
20
  nio4r (~> 2.0)
20
21
  websocket-driver (>= 0.6.1)
21
- actionmailbox (6.1.4.4)
22
- actionpack (= 6.1.4.4)
23
- activejob (= 6.1.4.4)
24
- activerecord (= 6.1.4.4)
25
- activestorage (= 6.1.4.4)
26
- activesupport (= 6.1.4.4)
22
+ actionmailbox (7.0.8.1)
23
+ actionpack (= 7.0.8.1)
24
+ activejob (= 7.0.8.1)
25
+ activerecord (= 7.0.8.1)
26
+ activestorage (= 7.0.8.1)
27
+ activesupport (= 7.0.8.1)
27
28
  mail (>= 2.7.1)
28
- actionmailer (6.1.4.4)
29
- actionpack (= 6.1.4.4)
30
- actionview (= 6.1.4.4)
31
- activejob (= 6.1.4.4)
32
- activesupport (= 6.1.4.4)
29
+ net-imap
30
+ net-pop
31
+ net-smtp
32
+ actionmailer (7.0.8.1)
33
+ actionpack (= 7.0.8.1)
34
+ actionview (= 7.0.8.1)
35
+ activejob (= 7.0.8.1)
36
+ activesupport (= 7.0.8.1)
33
37
  mail (~> 2.5, >= 2.5.4)
38
+ net-imap
39
+ net-pop
40
+ net-smtp
34
41
  rails-dom-testing (~> 2.0)
35
- actionpack (6.1.4.4)
36
- actionview (= 6.1.4.4)
37
- activesupport (= 6.1.4.4)
38
- rack (~> 2.0, >= 2.0.9)
42
+ actionpack (7.0.8.1)
43
+ actionview (= 7.0.8.1)
44
+ activesupport (= 7.0.8.1)
45
+ rack (~> 2.0, >= 2.2.4)
39
46
  rack-test (>= 0.6.3)
40
47
  rails-dom-testing (~> 2.0)
41
48
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
42
- actiontext (6.1.4.4)
43
- actionpack (= 6.1.4.4)
44
- activerecord (= 6.1.4.4)
45
- activestorage (= 6.1.4.4)
46
- activesupport (= 6.1.4.4)
49
+ actiontext (7.0.8.1)
50
+ actionpack (= 7.0.8.1)
51
+ activerecord (= 7.0.8.1)
52
+ activestorage (= 7.0.8.1)
53
+ activesupport (= 7.0.8.1)
54
+ globalid (>= 0.6.0)
47
55
  nokogiri (>= 1.8.5)
48
- actionview (6.1.4.4)
49
- activesupport (= 6.1.4.4)
56
+ actionview (7.0.8.1)
57
+ activesupport (= 7.0.8.1)
50
58
  builder (~> 3.1)
51
59
  erubi (~> 1.4)
52
60
  rails-dom-testing (~> 2.0)
53
61
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
54
- activejob (6.1.4.4)
55
- activesupport (= 6.1.4.4)
62
+ activejob (7.0.8.1)
63
+ activesupport (= 7.0.8.1)
56
64
  globalid (>= 0.3.6)
57
- activemodel (6.1.4.4)
58
- activesupport (= 6.1.4.4)
65
+ activemodel (7.0.8.1)
66
+ activesupport (= 7.0.8.1)
59
67
  activemodel-serializers-xml (1.0.2)
60
68
  activemodel (> 5.x)
61
69
  activesupport (> 5.x)
62
70
  builder (~> 3.1)
63
- activerecord (6.1.4.4)
64
- activemodel (= 6.1.4.4)
65
- activesupport (= 6.1.4.4)
66
- activeresource (6.0.0)
71
+ activerecord (7.0.8.1)
72
+ activemodel (= 7.0.8.1)
73
+ activesupport (= 7.0.8.1)
74
+ activeresource (6.1.0)
67
75
  activemodel (>= 6.0)
68
76
  activemodel-serializers-xml (~> 1.0)
69
77
  activesupport (>= 6.0)
70
- activestorage (6.1.4.4)
71
- actionpack (= 6.1.4.4)
72
- activejob (= 6.1.4.4)
73
- activerecord (= 6.1.4.4)
74
- activesupport (= 6.1.4.4)
75
- marcel (~> 1.0.0)
78
+ activestorage (7.0.8.1)
79
+ actionpack (= 7.0.8.1)
80
+ activejob (= 7.0.8.1)
81
+ activerecord (= 7.0.8.1)
82
+ activesupport (= 7.0.8.1)
83
+ marcel (~> 1.0)
76
84
  mini_mime (>= 1.1.0)
77
- activesupport (6.1.4.4)
85
+ activesupport (7.0.8.1)
78
86
  concurrent-ruby (~> 1.0, >= 1.0.2)
79
87
  i18n (>= 1.6, < 2)
80
88
  minitest (>= 5.1)
81
89
  tzinfo (~> 2.0)
82
- zeitwerk (~> 2.3)
83
- addressable (2.8.0)
84
- public_suffix (>= 2.0.2, < 5.0)
85
- ast (2.4.1)
86
- binding_of_caller (0.8.0)
87
- debug_inspector (>= 0.0.1)
88
- browser_sniffer (1.4.0)
90
+ addressable (2.8.6)
91
+ public_suffix (>= 2.0.2, < 6.0)
92
+ ast (2.4.2)
93
+ base64 (0.2.0)
94
+ bigdecimal (3.1.7)
95
+ browser_sniffer (2.4.0)
89
96
  builder (3.2.4)
90
97
  byebug (11.1.3)
91
- coderay (1.1.3)
92
- concurrent-ruby (1.1.9)
93
- crack (0.4.4)
98
+ concurrent-ruby (1.2.3)
99
+ crack (1.0.0)
100
+ bigdecimal
101
+ rexml
94
102
  crass (1.0.6)
95
- date (3.3.3)
96
- debug_inspector (0.0.3)
97
- erubi (1.10.0)
98
- faraday (2.7.4)
99
- faraday-net_http (>= 2.0, < 3.1)
100
- ruby2_keywords (>= 0.0.4)
101
- faraday-net_http (3.0.2)
102
- globalid (1.1.0)
103
- activesupport (>= 5.0)
104
- graphql (2.0.18)
105
- graphql-client (0.18.0)
103
+ date (3.3.4)
104
+ erubi (1.12.0)
105
+ faraday (2.9.0)
106
+ faraday-net_http (>= 2.0, < 3.2)
107
+ faraday-net_http (3.1.0)
108
+ net-http
109
+ globalid (1.2.1)
110
+ activesupport (>= 6.1)
111
+ graphql (2.3.2)
112
+ base64
113
+ graphql-client (0.22.0)
106
114
  activesupport (>= 3.0)
107
- graphql
108
- hashdiff (1.0.1)
115
+ graphql (>= 1.13.0)
116
+ hashdiff (1.1.0)
109
117
  hashie (5.0.0)
110
- i18n (1.9.1)
118
+ i18n (1.14.4)
111
119
  concurrent-ruby (~> 1.0)
112
- jwt (2.7.0)
113
- loofah (2.13.0)
120
+ json (2.7.2)
121
+ jwt (2.8.1)
122
+ base64
123
+ language_server-protocol (3.17.0.3)
124
+ loofah (2.22.0)
114
125
  crass (~> 1.0.2)
115
- nokogiri (>= 1.5.9)
126
+ nokogiri (>= 1.12.0)
116
127
  mail (2.8.1)
117
128
  mini_mime (>= 0.1.1)
118
129
  net-imap
119
130
  net-pop
120
131
  net-smtp
121
- marcel (1.0.2)
122
- method_source (0.9.2)
123
- mini_mime (1.1.2)
124
- mini_portile2 (2.6.1)
125
- minitest (5.14.4)
126
- mocha (1.11.2)
132
+ marcel (1.0.4)
133
+ method_source (1.1.0)
134
+ mini_mime (1.1.5)
135
+ mini_portile2 (2.8.6)
136
+ minitest (5.22.3)
137
+ minitest-focus (1.4.0)
138
+ minitest (>= 4, < 6)
139
+ mocha (2.2.0)
140
+ ruby2_keywords (>= 0.0.5)
127
141
  multi_xml (0.6.0)
128
- net-imap (0.3.4)
142
+ net-http (0.4.1)
143
+ uri
144
+ net-imap (0.4.10)
129
145
  date
130
146
  net-protocol
131
147
  net-pop (0.1.2)
132
148
  net-protocol
133
- net-protocol (0.2.1)
149
+ net-protocol (0.2.2)
134
150
  timeout
135
- net-smtp (0.3.3)
151
+ net-smtp (0.5.0)
136
152
  net-protocol
137
- nio4r (2.5.8)
138
- nokogiri (1.12.5)
139
- mini_portile2 (~> 2.6.1)
153
+ nio4r (2.7.1)
154
+ nokogiri (1.16.4)
155
+ mini_portile2 (~> 2.8.2)
140
156
  racc (~> 1.4)
141
157
  oauth2 (2.0.9)
142
158
  faraday (>= 0.17.3, < 3.0)
@@ -145,7 +161,7 @@ GEM
145
161
  rack (>= 1.2, < 4)
146
162
  snaky_hash (~> 2.0)
147
163
  version_gem (~> 1.1)
148
- omniauth (2.1.1)
164
+ omniauth (2.1.2)
149
165
  hashie (>= 3.4.6)
150
166
  rack (>= 2.2.3)
151
167
  rack-protection
@@ -155,108 +171,108 @@ GEM
155
171
  omniauth-rails_csrf_protection (1.0.1)
156
172
  actionpack (>= 4.2)
157
173
  omniauth (~> 2.0)
158
- omniauth-shopify-oauth2 (2.3.2)
174
+ omniauth-shopify-oauth2 (2.4.0)
159
175
  activesupport
160
176
  omniauth-oauth2 (~> 1.5)
161
- parallel (1.20.1)
162
- parser (2.7.2.0)
177
+ parallel (1.24.0)
178
+ parser (3.3.1.0)
163
179
  ast (~> 2.4.1)
164
- pry (0.12.2)
165
- coderay (~> 1.1.0)
166
- method_source (~> 0.9.0)
167
- pry-nav (0.3.0)
168
- pry (>= 0.9.10, < 0.13.0)
169
- pry-stack_explorer (0.4.9.3)
170
- binding_of_caller (>= 0.7)
171
- pry (>= 0.9.11)
172
- public_suffix (4.0.6)
173
- racc (1.6.0)
174
- rack (2.2.3)
175
- rack-protection (3.0.5)
176
- rack
177
- rack-test (1.1.0)
178
- rack (>= 1.0, < 3)
179
- rails (6.1.4.4)
180
- actioncable (= 6.1.4.4)
181
- actionmailbox (= 6.1.4.4)
182
- actionmailer (= 6.1.4.4)
183
- actionpack (= 6.1.4.4)
184
- actiontext (= 6.1.4.4)
185
- actionview (= 6.1.4.4)
186
- activejob (= 6.1.4.4)
187
- activemodel (= 6.1.4.4)
188
- activerecord (= 6.1.4.4)
189
- activestorage (= 6.1.4.4)
190
- activesupport (= 6.1.4.4)
180
+ racc
181
+ public_suffix (5.0.5)
182
+ racc (1.7.3)
183
+ rack (2.2.9)
184
+ rack-protection (3.2.0)
185
+ base64 (>= 0.1.0)
186
+ rack (~> 2.2, >= 2.2.4)
187
+ rack-test (2.1.0)
188
+ rack (>= 1.3)
189
+ rails (7.0.8.1)
190
+ actioncable (= 7.0.8.1)
191
+ actionmailbox (= 7.0.8.1)
192
+ actionmailer (= 7.0.8.1)
193
+ actionpack (= 7.0.8.1)
194
+ actiontext (= 7.0.8.1)
195
+ actionview (= 7.0.8.1)
196
+ activejob (= 7.0.8.1)
197
+ activemodel (= 7.0.8.1)
198
+ activerecord (= 7.0.8.1)
199
+ activestorage (= 7.0.8.1)
200
+ activesupport (= 7.0.8.1)
191
201
  bundler (>= 1.15.0)
192
- railties (= 6.1.4.4)
193
- sprockets-rails (>= 2.0.0)
202
+ railties (= 7.0.8.1)
194
203
  rails-controller-testing (1.0.5)
195
204
  actionpack (>= 5.0.1.rc1)
196
205
  actionview (>= 5.0.1.rc1)
197
206
  activesupport (>= 5.0.1.rc1)
198
- rails-dom-testing (2.0.3)
199
- activesupport (>= 4.2.0)
207
+ rails-dom-testing (2.2.0)
208
+ activesupport (>= 5.0.0)
209
+ minitest
200
210
  nokogiri (>= 1.6)
201
- rails-html-sanitizer (1.4.2)
202
- loofah (~> 2.3)
203
- railties (6.1.4.4)
204
- actionpack (= 6.1.4.4)
205
- activesupport (= 6.1.4.4)
211
+ rails-html-sanitizer (1.6.0)
212
+ loofah (~> 2.21)
213
+ nokogiri (~> 1.14)
214
+ railties (7.0.8.1)
215
+ actionpack (= 7.0.8.1)
216
+ activesupport (= 7.0.8.1)
206
217
  method_source
207
- rake (>= 0.13)
218
+ rake (>= 12.2)
208
219
  thor (~> 1.0)
209
- rainbow (3.0.0)
210
- rake (13.0.3)
220
+ zeitwerk (~> 2.5)
221
+ rainbow (3.1.1)
222
+ rake (13.2.1)
211
223
  rb-readline (0.5.5)
212
224
  redirect_safely (1.0.0)
213
225
  activemodel
214
- regexp_parser (2.0.0)
215
- rexml (3.2.5)
216
- rubocop (1.5.2)
226
+ regexp_parser (2.9.0)
227
+ rexml (3.2.6)
228
+ rubocop (1.63.4)
229
+ json (~> 2.3)
230
+ language_server-protocol (>= 3.17.0)
217
231
  parallel (~> 1.10)
218
- parser (>= 2.7.1.5)
232
+ parser (>= 3.3.0.2)
219
233
  rainbow (>= 2.2.2, < 4.0)
220
234
  regexp_parser (>= 1.8, < 3.0)
221
- rexml
222
- rubocop-ast (>= 1.2.0, < 2.0)
235
+ rexml (>= 3.2.5, < 4.0)
236
+ rubocop-ast (>= 1.31.1, < 2.0)
223
237
  ruby-progressbar (~> 1.7)
224
- unicode-display_width (>= 1.4.0, < 2.0)
225
- rubocop-ast (1.3.0)
226
- parser (>= 2.7.1.5)
227
- rubocop-shopify (1.0.7)
228
- rubocop (~> 1.4)
229
- ruby-progressbar (1.10.1)
238
+ unicode-display_width (>= 2.4.0, < 3.0)
239
+ rubocop-ast (1.31.3)
240
+ parser (>= 3.3.1.0)
241
+ rubocop-shopify (2.15.1)
242
+ rubocop (~> 1.51)
243
+ ruby-progressbar (1.13.0)
230
244
  ruby2_keywords (0.0.5)
231
- ruby_shopify_api (1.0.0)
232
- activeresource (>= 4.1.0)
245
+ ruby_shopify_api (1.2.0)
246
+ activeresource
233
247
  graphql-client
234
248
  rack
235
249
  snaky_hash (2.0.1)
236
250
  hashie
237
251
  version_gem (~> 1.1, >= 1.1.1)
238
- sprockets (4.1.1)
252
+ sprockets (4.2.1)
239
253
  concurrent-ruby (~> 1.0)
240
- rack (> 1, < 3)
254
+ rack (>= 2.2.4, < 4)
241
255
  sprockets-rails (3.4.2)
242
256
  actionpack (>= 5.2)
243
257
  activesupport (>= 5.2)
244
258
  sprockets (>= 3.0.0)
245
- sqlite3 (1.4.2)
246
- thor (1.2.1)
247
- timeout (0.3.2)
248
- tzinfo (2.0.4)
259
+ sqlite3 (1.7.3)
260
+ mini_portile2 (~> 2.8.0)
261
+ thor (1.3.1)
262
+ timeout (0.4.1)
263
+ tzinfo (2.0.6)
249
264
  concurrent-ruby (~> 1.0)
250
- unicode-display_width (1.7.0)
251
- version_gem (1.1.1)
252
- webmock (3.9.1)
253
- addressable (>= 2.3.6)
265
+ unicode-display_width (2.5.0)
266
+ uri (0.13.0)
267
+ version_gem (1.1.4)
268
+ webmock (3.23.0)
269
+ addressable (>= 2.8.0)
254
270
  crack (>= 0.3.2)
255
271
  hashdiff (>= 0.4.0, < 2.0.0)
256
- websocket-driver (0.7.5)
272
+ websocket-driver (0.7.6)
257
273
  websocket-extensions (>= 0.1.0)
258
274
  websocket-extensions (0.1.5)
259
- zeitwerk (2.5.4)
275
+ zeitwerk (2.6.13)
260
276
 
261
277
  PLATFORMS
262
278
  ruby
@@ -264,10 +280,8 @@ PLATFORMS
264
280
  DEPENDENCIES
265
281
  byebug
266
282
  minitest
283
+ minitest-focus
267
284
  mocha
268
- pry
269
- pry-nav
270
- pry-stack_explorer
271
285
  rails-controller-testing
272
286
  rake
273
287
  rb-readline
data/README.md CHANGED
@@ -25,11 +25,6 @@ This gem includes a Rails engine, generators, modules, and mixins that help crea
25
25
  <!-- This section is linked to in `templates/shopify_app.rb.tt`. Be careful renaming this heading. -->
26
26
  ## Requirements
27
27
 
28
- > **Rails compatibility**
29
- > * Use Shopify App `<= v7.2.8` if you need to work with Rails 4.
30
-
31
- To become a Shopify app developer, you will need a [Shopify Partners](https://www.shopify.com/partners) account. Explore the [Shopify dev docs](https://shopify.dev/concepts/shopify-introduction) to learn more about [building Shopify apps](https://shopify.dev/concepts/apps).
32
-
33
28
  This gem requires that you have the following credentials:
34
29
 
35
30
  - **Shopify API key:** The API key app credential specified in your [Shopify Partners dashboard](https://partners.shopify.com/organizations).
@@ -46,7 +41,7 @@ $ rails new my_shopify_app
46
41
  2. Add the Shopify App gem to `my_shopify_app`'s Gemfile.
47
42
 
48
43
  ```sh
49
- $ bundle add shopify_app
44
+ $ bundle add ruby_shopify_app
50
45
  ```
51
46
 
52
47
  3. Create a `.env` file in the root of `my_shopify_app` to specify your Shopify API credentials:
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: true
1
+ require "bundler/setup"
2
2
  require 'bundler/gem_tasks'
3
3
  require 'rake/testtask'
4
4
 
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ProductsController < AuthenticatedController
4
+ def index
5
+ @products = ShopifyAPI::Product.find(:all, params: { limit: 10 })
6
+ render(json: { products: @products })
7
+ end
8
+ end
data/bin/rails ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails gems
3
+ # installed from the root of your application.
4
+
5
+ ENGINE_ROOT = File.expand_path("..", __dir__)
6
+ ENGINE_PATH = File.expand_path("../lib/ruby_shopify_app/engine", __dir__)
7
+ APP_PATH = File.expand_path("../test/dummy/config/application", __dir__)
8
+
9
+ # Set up gems listed in the Gemfile.
10
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
11
+ require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
12
+
13
+ require "rails/all"
14
+ require "rails/engine/commands"
data/config/routes.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  ShopifyApp::Engine.routes.draw do
3
+ get '/products', :to => 'products#index'
3
4
  controller :sessions do
4
5
  get 'login' => :new, :as => :login
5
6
  post 'login' => :create, :as => :authenticate
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ShopifyApp
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
  end
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+ require 'ruby_shopify_app/version'
3
+
4
+ # deps
5
+ require 'ruby_shopify_api'
6
+ require 'omniauth/rails_csrf_protection'
7
+ require 'omniauth-shopify-oauth2'
8
+ require 'redirect_safely'
9
+
10
+ module ShopifyApp
11
+ def self.rails6?
12
+ Rails::VERSION::MAJOR >= 6
13
+ end
14
+
15
+ def self.rails7?
16
+ Rails::VERSION::MAJOR >= 7
17
+ end
18
+
19
+ def self.use_importmap?
20
+ rails7? && File.exist?("config/importmap.rb")
21
+ end
22
+
23
+ def self.use_webpacker?
24
+ rails6? &&
25
+ defined?(Webpacker) == 'constant' &&
26
+ !configuration.disable_webpacker
27
+ end
28
+
29
+ # config
30
+ require 'ruby_shopify_app/configuration'
31
+
32
+ # engine
33
+ require 'ruby_shopify_app/engine'
34
+
35
+ # utils
36
+ require 'ruby_shopify_app/utils'
37
+
38
+ # controller concerns
39
+ require 'ruby_shopify_app/controller_concerns/csrf_protection'
40
+ require 'ruby_shopify_app/controller_concerns/localization'
41
+ require 'ruby_shopify_app/controller_concerns/itp'
42
+ require 'ruby_shopify_app/controller_concerns/login_protection'
43
+ require 'ruby_shopify_app/controller_concerns/embedded_app'
44
+ require 'ruby_shopify_app/controller_concerns/payload_verification'
45
+ require 'ruby_shopify_app/controller_concerns/app_proxy_verification'
46
+ require 'ruby_shopify_app/controller_concerns/webhook_verification'
47
+
48
+ # jobs
49
+ require 'ruby_shopify_app/jobs/webhooks_manager_job'
50
+ require 'ruby_shopify_app/jobs/scripttags_manager_job'
51
+
52
+ # managers
53
+ require 'ruby_shopify_app/managers/webhooks_manager'
54
+ require 'ruby_shopify_app/managers/scripttags_manager'
55
+
56
+ # middleware
57
+ require 'ruby_shopify_app/middleware/jwt_middleware'
58
+ require 'ruby_shopify_app/middleware/same_site_cookie_middleware'
59
+
60
+ # session
61
+ require 'ruby_shopify_app/session/in_memory_session_store'
62
+ require 'ruby_shopify_app/session/in_memory_shop_session_store'
63
+ require 'ruby_shopify_app/session/in_memory_user_session_store'
64
+ require 'ruby_shopify_app/session/jwt'
65
+ require 'ruby_shopify_app/session/null_user_session_store'
66
+ require 'ruby_shopify_app/session/session_repository'
67
+ require 'ruby_shopify_app/session/session_storage'
68
+ require 'ruby_shopify_app/session/shop_session_storage'
69
+ require 'ruby_shopify_app/session/shop_session_storage_with_scopes'
70
+ require 'ruby_shopify_app/session/user_session_storage'
71
+ require 'ruby_shopify_app/session/user_session_storage_with_scopes'
72
+
73
+ # access scopes strategies
74
+ require 'ruby_shopify_app/access_scopes/shop_strategy'
75
+ require 'ruby_shopify_app/access_scopes/user_strategy'
76
+ require 'ruby_shopify_app/access_scopes/noop_strategy'
77
+
78
+ # omniauth_configuration
79
+ require 'ruby_shopify_app/omniauth/omniauth_configuration'
80
+ end
data/shopify_app.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  $LOAD_PATH.push(File.expand_path('../lib', __FILE__))
3
- require "shopify_app/version"
3
+ require "ruby_shopify_app/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "ruby_shopify_app"
@@ -14,19 +14,17 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.metadata['allowed_push_host'] = 'https://rubygems.org'
16
16
 
17
- s.add_runtime_dependency('browser_sniffer', '~> 1.4.0')
17
+ s.add_runtime_dependency('browser_sniffer', '~> 2.0')
18
18
  s.add_runtime_dependency('omniauth-rails_csrf_protection')
19
- s.add_runtime_dependency('rails', '> 5.2.1')
20
- s.add_runtime_dependency('ruby_shopify_api', '~> 1.0')
19
+ s.add_runtime_dependency('rails', '>= 6.1.0')
20
+ s.add_runtime_dependency('sprockets-rails', ">= 2.0.0")
21
+ s.add_runtime_dependency('ruby_shopify_api', '~> 1.2')
21
22
  s.add_runtime_dependency('omniauth-shopify-oauth2', '~> 2.3')
22
23
  s.add_runtime_dependency('jwt', '>= 2.2.3')
23
24
  s.add_runtime_dependency('redirect_safely', '~> 1.0')
24
25
 
25
26
  s.add_development_dependency('rake')
26
27
  s.add_development_dependency('byebug')
27
- s.add_development_dependency('pry')
28
- s.add_development_dependency('pry-nav')
29
- s.add_development_dependency('pry-stack_explorer')
30
28
  s.add_development_dependency('rb-readline')
31
29
  s.add_development_dependency('sqlite3', '~> 1.4')
32
30
  s.add_development_dependency('minitest')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_shopify_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hopper Gee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-14 00:00:00.000000000 Z
11
+ date: 2024-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser_sniffer
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.4.0
19
+ version: '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.4.0
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omniauth-rails_csrf_protection
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,30 +42,44 @@ dependencies:
42
42
  name: rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">"
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 6.1.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
46
53
  - !ruby/object:Gem::Version
47
- version: 5.2.1
54
+ version: 6.1.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: sprockets-rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 2.0.0
48
62
  type: :runtime
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - ">"
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
- version: 5.2.1
68
+ version: 2.0.0
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: ruby_shopify_api
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '1.0'
75
+ version: '1.2'
62
76
  type: :runtime
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: '1.0'
82
+ version: '1.2'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: omniauth-shopify-oauth2
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -136,48 +150,6 @@ dependencies:
136
150
  - - ">="
137
151
  - !ruby/object:Gem::Version
138
152
  version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: pry
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'
153
- - !ruby/object:Gem::Dependency
154
- name: pry-nav
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: pry-stack_explorer
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
153
  - !ruby/object:Gem::Dependency
182
154
  name: rb-readline
183
155
  requirement: !ruby/object:Gem::Requirement
@@ -295,6 +267,7 @@ files:
295
267
  - app/controllers/concerns/shopify_app/ensure_authenticated_links.rb
296
268
  - app/controllers/concerns/shopify_app/require_known_shop.rb
297
269
  - app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb
270
+ - app/controllers/products_controller.rb
298
271
  - app/controllers/shopify_app/authenticated_controller.rb
299
272
  - app/controllers/shopify_app/callback_controller.rb
300
273
  - app/controllers/shopify_app/extension_verification_controller.rb
@@ -312,6 +285,7 @@ files:
312
285
  - app/views/shopify_app/sessions/top_level_interaction.html.erb
313
286
  - app/views/shopify_app/shared/post_redirect_to_auth_shopify.html.erb
314
287
  - app/views/shopify_app/shared/redirect.html.erb
288
+ - bin/rails
315
289
  - config/locales/cs.yml
316
290
  - config/locales/da.yml
317
291
  - config/locales/de.yml
@@ -396,42 +370,42 @@ files:
396
370
  - lib/generators/shopify_app/user_model/templates/users.yml
397
371
  - lib/generators/shopify_app/user_model/user_model_generator.rb
398
372
  - lib/generators/shopify_app/views/views_generator.rb
399
- - lib/shopify_app.rb
400
- - lib/shopify_app/access_scopes/noop_strategy.rb
401
- - lib/shopify_app/access_scopes/shop_strategy.rb
402
- - lib/shopify_app/access_scopes/user_strategy.rb
403
- - lib/shopify_app/configuration.rb
404
- - lib/shopify_app/controller_concerns/app_proxy_verification.rb
405
- - lib/shopify_app/controller_concerns/csrf_protection.rb
406
- - lib/shopify_app/controller_concerns/embedded_app.rb
407
- - lib/shopify_app/controller_concerns/itp.rb
408
- - lib/shopify_app/controller_concerns/localization.rb
409
- - lib/shopify_app/controller_concerns/login_protection.rb
410
- - lib/shopify_app/controller_concerns/payload_verification.rb
411
- - lib/shopify_app/controller_concerns/webhook_verification.rb
412
- - lib/shopify_app/engine.rb
413
- - lib/shopify_app/jobs/scripttags_manager_job.rb
414
- - lib/shopify_app/jobs/webhooks_manager_job.rb
415
- - lib/shopify_app/managers/scripttags_manager.rb
416
- - lib/shopify_app/managers/webhooks_manager.rb
417
- - lib/shopify_app/middleware/jwt_middleware.rb
418
- - lib/shopify_app/middleware/same_site_cookie_middleware.rb
419
- - lib/shopify_app/omniauth/omniauth_configuration.rb
420
- - lib/shopify_app/session/in_memory_session_store.rb
421
- - lib/shopify_app/session/in_memory_shop_session_store.rb
422
- - lib/shopify_app/session/in_memory_user_session_store.rb
423
- - lib/shopify_app/session/jwt.rb
424
- - lib/shopify_app/session/null_user_session_store.rb
425
- - lib/shopify_app/session/session_repository.rb
426
- - lib/shopify_app/session/session_storage.rb
427
- - lib/shopify_app/session/shop_session_storage.rb
428
- - lib/shopify_app/session/shop_session_storage_with_scopes.rb
429
- - lib/shopify_app/session/user_session_storage.rb
430
- - lib/shopify_app/session/user_session_storage_with_scopes.rb
431
- - lib/shopify_app/test_helpers/all.rb
432
- - lib/shopify_app/test_helpers/webhook_verification_helper.rb
433
- - lib/shopify_app/utils.rb
434
- - lib/shopify_app/version.rb
373
+ - lib/ruby_shopify_app.rb
374
+ - lib/ruby_shopify_app/access_scopes/noop_strategy.rb
375
+ - lib/ruby_shopify_app/access_scopes/shop_strategy.rb
376
+ - lib/ruby_shopify_app/access_scopes/user_strategy.rb
377
+ - lib/ruby_shopify_app/configuration.rb
378
+ - lib/ruby_shopify_app/controller_concerns/app_proxy_verification.rb
379
+ - lib/ruby_shopify_app/controller_concerns/csrf_protection.rb
380
+ - lib/ruby_shopify_app/controller_concerns/embedded_app.rb
381
+ - lib/ruby_shopify_app/controller_concerns/itp.rb
382
+ - lib/ruby_shopify_app/controller_concerns/localization.rb
383
+ - lib/ruby_shopify_app/controller_concerns/login_protection.rb
384
+ - lib/ruby_shopify_app/controller_concerns/payload_verification.rb
385
+ - lib/ruby_shopify_app/controller_concerns/webhook_verification.rb
386
+ - lib/ruby_shopify_app/engine.rb
387
+ - lib/ruby_shopify_app/jobs/scripttags_manager_job.rb
388
+ - lib/ruby_shopify_app/jobs/webhooks_manager_job.rb
389
+ - lib/ruby_shopify_app/managers/scripttags_manager.rb
390
+ - lib/ruby_shopify_app/managers/webhooks_manager.rb
391
+ - lib/ruby_shopify_app/middleware/jwt_middleware.rb
392
+ - lib/ruby_shopify_app/middleware/same_site_cookie_middleware.rb
393
+ - lib/ruby_shopify_app/omniauth/omniauth_configuration.rb
394
+ - lib/ruby_shopify_app/session/in_memory_session_store.rb
395
+ - lib/ruby_shopify_app/session/in_memory_shop_session_store.rb
396
+ - lib/ruby_shopify_app/session/in_memory_user_session_store.rb
397
+ - lib/ruby_shopify_app/session/jwt.rb
398
+ - lib/ruby_shopify_app/session/null_user_session_store.rb
399
+ - lib/ruby_shopify_app/session/session_repository.rb
400
+ - lib/ruby_shopify_app/session/session_storage.rb
401
+ - lib/ruby_shopify_app/session/shop_session_storage.rb
402
+ - lib/ruby_shopify_app/session/shop_session_storage_with_scopes.rb
403
+ - lib/ruby_shopify_app/session/user_session_storage.rb
404
+ - lib/ruby_shopify_app/session/user_session_storage_with_scopes.rb
405
+ - lib/ruby_shopify_app/test_helpers/all.rb
406
+ - lib/ruby_shopify_app/test_helpers/webhook_verification_helper.rb
407
+ - lib/ruby_shopify_app/utils.rb
408
+ - lib/ruby_shopify_app/version.rb
435
409
  - package.json
436
410
  - service.yml
437
411
  - shipit.rubygems.yml
@@ -458,7 +432,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
458
432
  - !ruby/object:Gem::Version
459
433
  version: '0'
460
434
  requirements: []
461
- rubygems_version: 3.2.32
435
+ rubygems_version: 3.3.26
462
436
  signing_key:
463
437
  specification_version: 4
464
438
  summary: This gem is used to get quickly started with the Shopify API
data/lib/shopify_app.rb DELETED
@@ -1,80 +0,0 @@
1
- # frozen_string_literal: true
2
- require 'shopify_app/version'
3
-
4
- # deps
5
- require 'ruby_shopify_api'
6
- require 'omniauth/rails_csrf_protection'
7
- require 'omniauth-shopify-oauth2'
8
- require 'redirect_safely'
9
-
10
- module ShopifyApp
11
- def self.rails6?
12
- Rails::VERSION::MAJOR >= 6
13
- end
14
-
15
- def self.rails7?
16
- Rails::VERSION::MAJOR >= 7
17
- end
18
-
19
- def self.use_importmap?
20
- rails7? && File.exist?("config/importmap.rb")
21
- end
22
-
23
- def self.use_webpacker?
24
- rails6? &&
25
- defined?(Webpacker) == 'constant' &&
26
- !configuration.disable_webpacker
27
- end
28
-
29
- # config
30
- require 'shopify_app/configuration'
31
-
32
- # engine
33
- require 'shopify_app/engine'
34
-
35
- # utils
36
- require 'shopify_app/utils'
37
-
38
- # controller concerns
39
- require 'shopify_app/controller_concerns/csrf_protection'
40
- require 'shopify_app/controller_concerns/localization'
41
- require 'shopify_app/controller_concerns/itp'
42
- require 'shopify_app/controller_concerns/login_protection'
43
- require 'shopify_app/controller_concerns/embedded_app'
44
- require 'shopify_app/controller_concerns/payload_verification'
45
- require 'shopify_app/controller_concerns/app_proxy_verification'
46
- require 'shopify_app/controller_concerns/webhook_verification'
47
-
48
- # jobs
49
- require 'shopify_app/jobs/webhooks_manager_job'
50
- require 'shopify_app/jobs/scripttags_manager_job'
51
-
52
- # managers
53
- require 'shopify_app/managers/webhooks_manager'
54
- require 'shopify_app/managers/scripttags_manager'
55
-
56
- # middleware
57
- require 'shopify_app/middleware/jwt_middleware'
58
- require 'shopify_app/middleware/same_site_cookie_middleware'
59
-
60
- # session
61
- require 'shopify_app/session/in_memory_session_store'
62
- require 'shopify_app/session/in_memory_shop_session_store'
63
- require 'shopify_app/session/in_memory_user_session_store'
64
- require 'shopify_app/session/jwt'
65
- require 'shopify_app/session/null_user_session_store'
66
- require 'shopify_app/session/session_repository'
67
- require 'shopify_app/session/session_storage'
68
- require 'shopify_app/session/shop_session_storage'
69
- require 'shopify_app/session/shop_session_storage_with_scopes'
70
- require 'shopify_app/session/user_session_storage'
71
- require 'shopify_app/session/user_session_storage_with_scopes'
72
-
73
- # access scopes strategies
74
- require 'shopify_app/access_scopes/shop_strategy'
75
- require 'shopify_app/access_scopes/user_strategy'
76
- require 'shopify_app/access_scopes/noop_strategy'
77
-
78
- # omniauth_configuration
79
- require 'shopify_app/omniauth/omniauth_configuration'
80
- end
File without changes
File without changes