th7-clerk-sdk-ruby 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. checksums.yaml +7 -0
  2. data/.env.example +3 -0
  3. data/.github/workflows/main.yml +30 -0
  4. data/.github/workflows/semgrep.yml +24 -0
  5. data/.gitignore +21 -0
  6. data/.rspec +3 -0
  7. data/.ruby-version +1 -0
  8. data/CHANGELOG.md +212 -0
  9. data/Gemfile +33 -0
  10. data/Gemfile.lock +300 -0
  11. data/Guardfile +14 -0
  12. data/LICENSE.txt +21 -0
  13. data/README.md +278 -0
  14. data/Rakefile +56 -0
  15. data/apps/rack/app.rb +67 -0
  16. data/apps/rack/config.ru +17 -0
  17. data/apps/rack/middleware/disable_paths.rb +13 -0
  18. data/apps/rails-api/.dockerignore +41 -0
  19. data/apps/rails-api/.gitattributes +9 -0
  20. data/apps/rails-api/.gitignore +32 -0
  21. data/apps/rails-api/.kamal/hooks/docker-setup.sample +3 -0
  22. data/apps/rails-api/.kamal/hooks/post-deploy.sample +14 -0
  23. data/apps/rails-api/.kamal/hooks/post-proxy-reboot.sample +3 -0
  24. data/apps/rails-api/.kamal/hooks/pre-build.sample +51 -0
  25. data/apps/rails-api/.kamal/hooks/pre-connect.sample +47 -0
  26. data/apps/rails-api/.kamal/hooks/pre-deploy.sample +109 -0
  27. data/apps/rails-api/.kamal/hooks/pre-proxy-reboot.sample +3 -0
  28. data/apps/rails-api/.kamal/secrets +17 -0
  29. data/apps/rails-api/.rubocop.yml +8 -0
  30. data/apps/rails-api/.ruby-version +1 -0
  31. data/apps/rails-api/Dockerfile +69 -0
  32. data/apps/rails-api/Gemfile +54 -0
  33. data/apps/rails-api/Gemfile.lock +374 -0
  34. data/apps/rails-api/README.md +24 -0
  35. data/apps/rails-api/Rakefile +6 -0
  36. data/apps/rails-api/app/controllers/application_controller.rb +3 -0
  37. data/apps/rails-api/app/controllers/home_controller.rb +5 -0
  38. data/apps/rails-api/app/jobs/application_job.rb +7 -0
  39. data/apps/rails-api/app/mailers/application_mailer.rb +4 -0
  40. data/apps/rails-api/app/models/application_record.rb +3 -0
  41. data/apps/rails-api/app/views/layouts/mailer.html.erb +13 -0
  42. data/apps/rails-api/app/views/layouts/mailer.text.erb +1 -0
  43. data/apps/rails-api/bin/brakeman +7 -0
  44. data/apps/rails-api/bin/bundle +109 -0
  45. data/apps/rails-api/bin/dev +2 -0
  46. data/apps/rails-api/bin/docker-entrypoint +14 -0
  47. data/apps/rails-api/bin/jobs +6 -0
  48. data/apps/rails-api/bin/kamal +27 -0
  49. data/apps/rails-api/bin/rails +4 -0
  50. data/apps/rails-api/bin/rake +4 -0
  51. data/apps/rails-api/bin/rubocop +8 -0
  52. data/apps/rails-api/bin/setup +34 -0
  53. data/apps/rails-api/bin/thrust +5 -0
  54. data/apps/rails-api/config/application.rb +36 -0
  55. data/apps/rails-api/config/boot.rb +4 -0
  56. data/apps/rails-api/config/cable.yml +17 -0
  57. data/apps/rails-api/config/cache.yml +16 -0
  58. data/apps/rails-api/config/credentials.yml.enc +1 -0
  59. data/apps/rails-api/config/database.yml +41 -0
  60. data/apps/rails-api/config/deploy.yml +116 -0
  61. data/apps/rails-api/config/environment.rb +5 -0
  62. data/apps/rails-api/config/environments/development.rb +70 -0
  63. data/apps/rails-api/config/environments/production.rb +88 -0
  64. data/apps/rails-api/config/environments/test.rb +53 -0
  65. data/apps/rails-api/config/initializers/cors.rb +16 -0
  66. data/apps/rails-api/config/initializers/filter_parameter_logging.rb +8 -0
  67. data/apps/rails-api/config/initializers/inflections.rb +16 -0
  68. data/apps/rails-api/config/locales/en.yml +31 -0
  69. data/apps/rails-api/config/puma.rb +41 -0
  70. data/apps/rails-api/config/queue.yml +18 -0
  71. data/apps/rails-api/config/recurring.yml +10 -0
  72. data/apps/rails-api/config/routes.rb +10 -0
  73. data/apps/rails-api/config/storage.yml +34 -0
  74. data/apps/rails-api/config.ru +6 -0
  75. data/apps/rails-api/db/cable_schema.rb +11 -0
  76. data/apps/rails-api/db/cache_schema.rb +14 -0
  77. data/apps/rails-api/db/queue_schema.rb +129 -0
  78. data/apps/rails-api/db/seeds.rb +9 -0
  79. data/apps/rails-api/public/robots.txt +1 -0
  80. data/apps/rails-api/test/controllers/home_controller_test.rb +7 -0
  81. data/apps/rails-api/test/test_helper.rb +15 -0
  82. data/apps/rails-full/.dockerignore +47 -0
  83. data/apps/rails-full/.gitattributes +9 -0
  84. data/apps/rails-full/.gitignore +34 -0
  85. data/apps/rails-full/.kamal/hooks/docker-setup.sample +3 -0
  86. data/apps/rails-full/.kamal/hooks/post-deploy.sample +14 -0
  87. data/apps/rails-full/.kamal/hooks/post-proxy-reboot.sample +3 -0
  88. data/apps/rails-full/.kamal/hooks/pre-build.sample +51 -0
  89. data/apps/rails-full/.kamal/hooks/pre-connect.sample +47 -0
  90. data/apps/rails-full/.kamal/hooks/pre-deploy.sample +109 -0
  91. data/apps/rails-full/.kamal/hooks/pre-proxy-reboot.sample +3 -0
  92. data/apps/rails-full/.kamal/secrets +17 -0
  93. data/apps/rails-full/.rubocop.yml +8 -0
  94. data/apps/rails-full/.ruby-version +1 -0
  95. data/apps/rails-full/Dockerfile +72 -0
  96. data/apps/rails-full/Gemfile +70 -0
  97. data/apps/rails-full/Gemfile.lock +429 -0
  98. data/apps/rails-full/README.md +24 -0
  99. data/apps/rails-full/Rakefile +6 -0
  100. data/apps/rails-full/app/assets/stylesheets/application.css +10 -0
  101. data/apps/rails-full/app/controllers/application_controller.rb +6 -0
  102. data/apps/rails-full/app/controllers/home_controller.rb +11 -0
  103. data/apps/rails-full/app/helpers/application_helper.rb +2 -0
  104. data/apps/rails-full/app/helpers/home_helper.rb +2 -0
  105. data/apps/rails-full/app/javascript/application.js +3 -0
  106. data/apps/rails-full/app/javascript/controllers/application.js +9 -0
  107. data/apps/rails-full/app/javascript/controllers/hello_controller.js +7 -0
  108. data/apps/rails-full/app/javascript/controllers/index.js +4 -0
  109. data/apps/rails-full/app/jobs/application_job.rb +7 -0
  110. data/apps/rails-full/app/mailers/application_mailer.rb +4 -0
  111. data/apps/rails-full/app/models/application_record.rb +3 -0
  112. data/apps/rails-full/app/views/home/index.html.erb +7 -0
  113. data/apps/rails-full/app/views/layouts/application.html.erb +60 -0
  114. data/apps/rails-full/app/views/layouts/mailer.html.erb +13 -0
  115. data/apps/rails-full/app/views/layouts/mailer.text.erb +1 -0
  116. data/apps/rails-full/app/views/pwa/manifest.json.erb +22 -0
  117. data/apps/rails-full/app/views/pwa/service-worker.js +26 -0
  118. data/apps/rails-full/bin/brakeman +7 -0
  119. data/apps/rails-full/bin/bundle +109 -0
  120. data/apps/rails-full/bin/dev +2 -0
  121. data/apps/rails-full/bin/docker-entrypoint +14 -0
  122. data/apps/rails-full/bin/importmap +4 -0
  123. data/apps/rails-full/bin/jobs +6 -0
  124. data/apps/rails-full/bin/kamal +27 -0
  125. data/apps/rails-full/bin/rails +4 -0
  126. data/apps/rails-full/bin/rake +4 -0
  127. data/apps/rails-full/bin/rubocop +8 -0
  128. data/apps/rails-full/bin/setup +34 -0
  129. data/apps/rails-full/bin/thrust +5 -0
  130. data/apps/rails-full/config/application.rb +31 -0
  131. data/apps/rails-full/config/boot.rb +4 -0
  132. data/apps/rails-full/config/cable.yml +17 -0
  133. data/apps/rails-full/config/cache.yml +16 -0
  134. data/apps/rails-full/config/credentials.yml.enc +1 -0
  135. data/apps/rails-full/config/database.yml +41 -0
  136. data/apps/rails-full/config/deploy.yml +116 -0
  137. data/apps/rails-full/config/environment.rb +5 -0
  138. data/apps/rails-full/config/environments/development.rb +72 -0
  139. data/apps/rails-full/config/environments/production.rb +91 -0
  140. data/apps/rails-full/config/environments/test.rb +53 -0
  141. data/apps/rails-full/config/importmap.rb +7 -0
  142. data/apps/rails-full/config/initializers/assets.rb +7 -0
  143. data/apps/rails-full/config/initializers/clerk.rb +4 -0
  144. data/apps/rails-full/config/initializers/content_security_policy.rb +25 -0
  145. data/apps/rails-full/config/initializers/filter_parameter_logging.rb +8 -0
  146. data/apps/rails-full/config/initializers/inflections.rb +16 -0
  147. data/apps/rails-full/config/locales/en.yml +31 -0
  148. data/apps/rails-full/config/puma.rb +41 -0
  149. data/apps/rails-full/config/queue.yml +18 -0
  150. data/apps/rails-full/config/recurring.yml +10 -0
  151. data/apps/rails-full/config/routes.rb +15 -0
  152. data/apps/rails-full/config/storage.yml +34 -0
  153. data/apps/rails-full/config.ru +6 -0
  154. data/apps/rails-full/db/cable_schema.rb +11 -0
  155. data/apps/rails-full/db/cache_schema.rb +14 -0
  156. data/apps/rails-full/db/queue_schema.rb +129 -0
  157. data/apps/rails-full/db/seeds.rb +9 -0
  158. data/apps/rails-full/public/400.html +114 -0
  159. data/apps/rails-full/public/404.html +114 -0
  160. data/apps/rails-full/public/406-unsupported-browser.html +114 -0
  161. data/apps/rails-full/public/422.html +114 -0
  162. data/apps/rails-full/public/500.html +114 -0
  163. data/apps/rails-full/public/icon.png +0 -0
  164. data/apps/rails-full/public/icon.svg +3 -0
  165. data/apps/rails-full/public/robots.txt +1 -0
  166. data/apps/rails-full/test/application_system_test_case.rb +5 -0
  167. data/apps/rails-full/test/controllers/home_controller_test.rb +7 -0
  168. data/apps/rails-full/test/test_helper.rb +15 -0
  169. data/apps/sinatra/app.rb +29 -0
  170. data/apps/sinatra/config.ru +8 -0
  171. data/apps/sinatra/views/index.erb +44 -0
  172. data/bin/console +16 -0
  173. data/bin/release +21 -0
  174. data/bin/setup +8 -0
  175. data/clerk-sdk-ruby.gemspec +38 -0
  176. data/docs/clerk-logo-dark.png +0 -0
  177. data/docs/clerk-logo-light.png +0 -0
  178. data/lib/clerk/authenticatable.rb +32 -0
  179. data/lib/clerk/authenticate_context.rb +168 -0
  180. data/lib/clerk/authenticate_request.rb +261 -0
  181. data/lib/clerk/configuration.rb +84 -0
  182. data/lib/clerk/constants.rb +74 -0
  183. data/lib/clerk/error.rb +17 -0
  184. data/lib/clerk/jwks_cache.rb +37 -0
  185. data/lib/clerk/proxy.rb +135 -0
  186. data/lib/clerk/rack.rb +2 -0
  187. data/lib/clerk/rack_middleware.rb +112 -0
  188. data/lib/clerk/rails.rb +3 -0
  189. data/lib/clerk/railtie.rb +15 -0
  190. data/lib/clerk/sdk.rb +84 -0
  191. data/lib/clerk/sinatra.rb +52 -0
  192. data/lib/clerk/utils.rb +73 -0
  193. data/lib/clerk/version.rb +5 -0
  194. data/lib/clerk.rb +27 -0
  195. metadata +340 -0
@@ -0,0 +1,429 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ clerk-sdk-ruby (4.0.0.beta6)
5
+ clerk-http-client (= 2.0.0.beta5)
6
+ concurrent-ruby (~> 1.1)
7
+ faraday (>= 1.4.1, < 3.0)
8
+ jwt (~> 2.5)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actioncable (8.0.1)
14
+ actionpack (= 8.0.1)
15
+ activesupport (= 8.0.1)
16
+ nio4r (~> 2.0)
17
+ websocket-driver (>= 0.6.1)
18
+ zeitwerk (~> 2.6)
19
+ actionmailbox (8.0.1)
20
+ actionpack (= 8.0.1)
21
+ activejob (= 8.0.1)
22
+ activerecord (= 8.0.1)
23
+ activestorage (= 8.0.1)
24
+ activesupport (= 8.0.1)
25
+ mail (>= 2.8.0)
26
+ actionmailer (8.0.1)
27
+ actionpack (= 8.0.1)
28
+ actionview (= 8.0.1)
29
+ activejob (= 8.0.1)
30
+ activesupport (= 8.0.1)
31
+ mail (>= 2.8.0)
32
+ rails-dom-testing (~> 2.2)
33
+ actionpack (8.0.1)
34
+ actionview (= 8.0.1)
35
+ activesupport (= 8.0.1)
36
+ nokogiri (>= 1.8.5)
37
+ rack (>= 2.2.4)
38
+ rack-session (>= 1.0.1)
39
+ rack-test (>= 0.6.3)
40
+ rails-dom-testing (~> 2.2)
41
+ rails-html-sanitizer (~> 1.6)
42
+ useragent (~> 0.16)
43
+ actiontext (8.0.1)
44
+ actionpack (= 8.0.1)
45
+ activerecord (= 8.0.1)
46
+ activestorage (= 8.0.1)
47
+ activesupport (= 8.0.1)
48
+ globalid (>= 0.6.0)
49
+ nokogiri (>= 1.8.5)
50
+ actionview (8.0.1)
51
+ activesupport (= 8.0.1)
52
+ builder (~> 3.1)
53
+ erubi (~> 1.11)
54
+ rails-dom-testing (~> 2.2)
55
+ rails-html-sanitizer (~> 1.6)
56
+ activejob (8.0.1)
57
+ activesupport (= 8.0.1)
58
+ globalid (>= 0.3.6)
59
+ activemodel (8.0.1)
60
+ activesupport (= 8.0.1)
61
+ activerecord (8.0.1)
62
+ activemodel (= 8.0.1)
63
+ activesupport (= 8.0.1)
64
+ timeout (>= 0.4.0)
65
+ activestorage (8.0.1)
66
+ actionpack (= 8.0.1)
67
+ activejob (= 8.0.1)
68
+ activerecord (= 8.0.1)
69
+ activesupport (= 8.0.1)
70
+ marcel (~> 1.0)
71
+ activesupport (8.0.1)
72
+ base64
73
+ benchmark (>= 0.3)
74
+ bigdecimal
75
+ concurrent-ruby (~> 1.0, >= 1.3.1)
76
+ connection_pool (>= 2.2.5)
77
+ drb
78
+ i18n (>= 1.6, < 2)
79
+ logger (>= 1.4.2)
80
+ minitest (>= 5.1)
81
+ securerandom (>= 0.3)
82
+ tzinfo (~> 2.0, >= 2.0.5)
83
+ uri (>= 0.13.1)
84
+ addressable (2.8.7)
85
+ public_suffix (>= 2.0.2, < 7.0)
86
+ ast (2.4.2)
87
+ base64 (0.2.0)
88
+ bcrypt_pbkdf (1.1.1)
89
+ bcrypt_pbkdf (1.1.1-arm64-darwin)
90
+ bcrypt_pbkdf (1.1.1-x86_64-darwin)
91
+ benchmark (0.4.0)
92
+ bigdecimal (3.1.9)
93
+ bindex (0.8.1)
94
+ bootsnap (1.18.4)
95
+ msgpack (~> 1.2)
96
+ brakeman (7.0.0)
97
+ racc
98
+ builder (3.3.0)
99
+ capybara (3.40.0)
100
+ addressable
101
+ matrix
102
+ mini_mime (>= 0.1.3)
103
+ nokogiri (~> 1.11)
104
+ rack (>= 1.6.0)
105
+ rack-test (>= 0.6.3)
106
+ regexp_parser (>= 1.5, < 3.0)
107
+ xpath (~> 3.2)
108
+ clerk-http-client (2.0.0.beta5)
109
+ faraday (>= 1.0.1, < 3.0)
110
+ faraday-multipart
111
+ marcel
112
+ concurrent-ruby (1.3.4)
113
+ connection_pool (2.4.1)
114
+ crass (1.0.6)
115
+ date (3.4.1)
116
+ debug (1.10.0)
117
+ irb (~> 1.10)
118
+ reline (>= 0.3.8)
119
+ dotenv (3.1.7)
120
+ dotenv-rails (3.1.7)
121
+ dotenv (= 3.1.7)
122
+ railties (>= 6.1)
123
+ drb (2.2.1)
124
+ ed25519 (1.3.0)
125
+ erubi (1.13.1)
126
+ et-orbi (1.2.11)
127
+ tzinfo
128
+ faraday (2.12.2)
129
+ faraday-net_http (>= 2.0, < 3.5)
130
+ json
131
+ logger
132
+ faraday-multipart (1.1.0)
133
+ multipart-post (~> 2.0)
134
+ faraday-net_http (3.4.0)
135
+ net-http (>= 0.5.0)
136
+ fugit (1.11.1)
137
+ et-orbi (~> 1, >= 1.2.11)
138
+ raabro (~> 1.4)
139
+ globalid (1.2.1)
140
+ activesupport (>= 6.1)
141
+ i18n (1.14.6)
142
+ concurrent-ruby (~> 1.0)
143
+ importmap-rails (2.1.0)
144
+ actionpack (>= 6.0.0)
145
+ activesupport (>= 6.0.0)
146
+ railties (>= 6.0.0)
147
+ io-console (0.8.0)
148
+ irb (1.14.3)
149
+ rdoc (>= 4.0.0)
150
+ reline (>= 0.4.2)
151
+ jbuilder (2.13.0)
152
+ actionview (>= 5.0.0)
153
+ activesupport (>= 5.0.0)
154
+ json (2.9.1)
155
+ jwt (2.10.1)
156
+ base64
157
+ kamal (2.4.0)
158
+ activesupport (>= 7.0)
159
+ base64 (~> 0.2)
160
+ bcrypt_pbkdf (~> 1.0)
161
+ concurrent-ruby (~> 1.2)
162
+ dotenv (~> 3.1)
163
+ ed25519 (~> 1.2)
164
+ net-ssh (~> 7.3)
165
+ sshkit (>= 1.23.0, < 2.0)
166
+ thor (~> 1.3)
167
+ zeitwerk (>= 2.6.18, < 3.0)
168
+ language_server-protocol (3.17.0.3)
169
+ logger (1.6.4)
170
+ loofah (2.24.0)
171
+ crass (~> 1.0.2)
172
+ nokogiri (>= 1.12.0)
173
+ mail (2.8.1)
174
+ mini_mime (>= 0.1.1)
175
+ net-imap
176
+ net-pop
177
+ net-smtp
178
+ marcel (1.0.4)
179
+ matrix (0.4.2)
180
+ mini_mime (1.1.5)
181
+ mini_portile2 (2.8.8)
182
+ minitest (5.25.4)
183
+ msgpack (1.7.5)
184
+ multipart-post (2.4.1)
185
+ net-http (0.6.0)
186
+ uri
187
+ net-imap (0.5.5)
188
+ date
189
+ net-protocol
190
+ net-pop (0.1.2)
191
+ net-protocol
192
+ net-protocol (0.2.2)
193
+ timeout
194
+ net-scp (4.0.0)
195
+ net-ssh (>= 2.6.5, < 8.0.0)
196
+ net-sftp (4.0.0)
197
+ net-ssh (>= 5.0.0, < 8.0.0)
198
+ net-smtp (0.5.0)
199
+ net-protocol
200
+ net-ssh (7.3.0)
201
+ nio4r (2.7.4)
202
+ nokogiri (1.18.1)
203
+ mini_portile2 (~> 2.8.2)
204
+ racc (~> 1.4)
205
+ nokogiri (1.18.1-aarch64-linux-gnu)
206
+ racc (~> 1.4)
207
+ nokogiri (1.18.1-aarch64-linux-musl)
208
+ racc (~> 1.4)
209
+ nokogiri (1.18.1-arm-linux-gnu)
210
+ racc (~> 1.4)
211
+ nokogiri (1.18.1-arm-linux-musl)
212
+ racc (~> 1.4)
213
+ nokogiri (1.18.1-arm64-darwin)
214
+ racc (~> 1.4)
215
+ nokogiri (1.18.1-x86_64-darwin)
216
+ racc (~> 1.4)
217
+ nokogiri (1.18.1-x86_64-linux-gnu)
218
+ racc (~> 1.4)
219
+ nokogiri (1.18.1-x86_64-linux-musl)
220
+ racc (~> 1.4)
221
+ ostruct (0.6.1)
222
+ parallel (1.26.3)
223
+ parser (3.3.6.0)
224
+ ast (~> 2.4.1)
225
+ racc
226
+ propshaft (1.1.0)
227
+ actionpack (>= 7.0.0)
228
+ activesupport (>= 7.0.0)
229
+ rack
230
+ railties (>= 7.0.0)
231
+ psych (5.2.2)
232
+ date
233
+ stringio
234
+ public_suffix (6.0.1)
235
+ puma (6.5.0)
236
+ nio4r (~> 2.0)
237
+ raabro (1.4.0)
238
+ racc (1.8.1)
239
+ rack (3.1.8)
240
+ rack-session (2.1.0)
241
+ base64 (>= 0.1.0)
242
+ rack (>= 3.0.0)
243
+ rack-test (2.2.0)
244
+ rack (>= 1.3)
245
+ rackup (2.2.1)
246
+ rack (>= 3)
247
+ rails (8.0.1)
248
+ actioncable (= 8.0.1)
249
+ actionmailbox (= 8.0.1)
250
+ actionmailer (= 8.0.1)
251
+ actionpack (= 8.0.1)
252
+ actiontext (= 8.0.1)
253
+ actionview (= 8.0.1)
254
+ activejob (= 8.0.1)
255
+ activemodel (= 8.0.1)
256
+ activerecord (= 8.0.1)
257
+ activestorage (= 8.0.1)
258
+ activesupport (= 8.0.1)
259
+ bundler (>= 1.15.0)
260
+ railties (= 8.0.1)
261
+ rails-dom-testing (2.2.0)
262
+ activesupport (>= 5.0.0)
263
+ minitest
264
+ nokogiri (>= 1.6)
265
+ rails-html-sanitizer (1.6.2)
266
+ loofah (~> 2.21)
267
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
268
+ railties (8.0.1)
269
+ actionpack (= 8.0.1)
270
+ activesupport (= 8.0.1)
271
+ irb (~> 1.13)
272
+ rackup (>= 1.0.0)
273
+ rake (>= 12.2)
274
+ thor (~> 1.0, >= 1.2.2)
275
+ zeitwerk (~> 2.6)
276
+ rainbow (3.1.1)
277
+ rake (13.2.1)
278
+ rdoc (6.10.0)
279
+ psych (>= 4.0.0)
280
+ regexp_parser (2.10.0)
281
+ reline (0.6.0)
282
+ io-console (~> 0.5)
283
+ rexml (3.4.0)
284
+ rubocop (1.69.2)
285
+ json (~> 2.3)
286
+ language_server-protocol (>= 3.17.0)
287
+ parallel (~> 1.10)
288
+ parser (>= 3.3.0.2)
289
+ rainbow (>= 2.2.2, < 4.0)
290
+ regexp_parser (>= 2.9.3, < 3.0)
291
+ rubocop-ast (>= 1.36.2, < 2.0)
292
+ ruby-progressbar (~> 1.7)
293
+ unicode-display_width (>= 2.4.0, < 4.0)
294
+ rubocop-ast (1.37.0)
295
+ parser (>= 3.3.1.0)
296
+ rubocop-minitest (0.36.0)
297
+ rubocop (>= 1.61, < 2.0)
298
+ rubocop-ast (>= 1.31.1, < 2.0)
299
+ rubocop-performance (1.23.1)
300
+ rubocop (>= 1.48.1, < 2.0)
301
+ rubocop-ast (>= 1.31.1, < 2.0)
302
+ rubocop-rails (2.28.0)
303
+ activesupport (>= 4.2.0)
304
+ rack (>= 1.1)
305
+ rubocop (>= 1.52.0, < 2.0)
306
+ rubocop-ast (>= 1.31.1, < 2.0)
307
+ rubocop-rails-omakase (1.0.0)
308
+ rubocop
309
+ rubocop-minitest
310
+ rubocop-performance
311
+ rubocop-rails
312
+ ruby-progressbar (1.13.0)
313
+ rubyzip (2.4.1)
314
+ securerandom (0.4.1)
315
+ selenium-webdriver (4.27.0)
316
+ base64 (~> 0.2)
317
+ logger (~> 1.4)
318
+ rexml (~> 3.2, >= 3.2.5)
319
+ rubyzip (>= 1.2.2, < 3.0)
320
+ websocket (~> 1.0)
321
+ solid_cable (3.0.5)
322
+ actioncable (>= 7.2)
323
+ activejob (>= 7.2)
324
+ activerecord (>= 7.2)
325
+ railties (>= 7.2)
326
+ solid_cache (1.0.6)
327
+ activejob (>= 7.2)
328
+ activerecord (>= 7.2)
329
+ railties (>= 7.2)
330
+ solid_queue (1.1.2)
331
+ activejob (>= 7.1)
332
+ activerecord (>= 7.1)
333
+ concurrent-ruby (>= 1.3.1)
334
+ fugit (~> 1.11.0)
335
+ railties (>= 7.1)
336
+ thor (~> 1.3.1)
337
+ sqlite3 (2.5.0-aarch64-linux-gnu)
338
+ sqlite3 (2.5.0-aarch64-linux-musl)
339
+ sqlite3 (2.5.0-arm-linux-gnu)
340
+ sqlite3 (2.5.0-arm-linux-musl)
341
+ sqlite3 (2.5.0-arm64-darwin)
342
+ sqlite3 (2.5.0-x86-linux-gnu)
343
+ sqlite3 (2.5.0-x86-linux-musl)
344
+ sqlite3 (2.5.0-x86_64-darwin)
345
+ sqlite3 (2.5.0-x86_64-linux-gnu)
346
+ sqlite3 (2.5.0-x86_64-linux-musl)
347
+ sshkit (1.23.2)
348
+ base64
349
+ net-scp (>= 1.1.2)
350
+ net-sftp (>= 2.1.2)
351
+ net-ssh (>= 2.8.0)
352
+ ostruct
353
+ stimulus-rails (1.3.4)
354
+ railties (>= 6.0.0)
355
+ stringio (3.1.2)
356
+ thor (1.3.2)
357
+ thruster (0.1.10)
358
+ thruster (0.1.10-aarch64-linux)
359
+ thruster (0.1.10-arm64-darwin)
360
+ thruster (0.1.10-x86_64-darwin)
361
+ thruster (0.1.10-x86_64-linux)
362
+ timeout (0.4.3)
363
+ turbo-rails (2.0.11)
364
+ actionpack (>= 6.0.0)
365
+ railties (>= 6.0.0)
366
+ tzinfo (2.0.6)
367
+ concurrent-ruby (~> 1.0)
368
+ unicode-display_width (3.1.3)
369
+ unicode-emoji (~> 4.0, >= 4.0.4)
370
+ unicode-emoji (4.0.4)
371
+ uri (1.0.2)
372
+ useragent (0.16.11)
373
+ web-console (4.2.1)
374
+ actionview (>= 6.0.0)
375
+ activemodel (>= 6.0.0)
376
+ bindex (>= 0.4.0)
377
+ railties (>= 6.0.0)
378
+ websocket (1.2.11)
379
+ websocket-driver (0.7.7)
380
+ base64
381
+ websocket-extensions (>= 0.1.0)
382
+ websocket-extensions (0.1.5)
383
+ xpath (3.2.0)
384
+ nokogiri (~> 1.8)
385
+ zeitwerk (2.7.1)
386
+
387
+ PLATFORMS
388
+ aarch64-linux
389
+ aarch64-linux-gnu
390
+ aarch64-linux-musl
391
+ arm-linux
392
+ arm-linux-gnu
393
+ arm-linux-musl
394
+ arm64-darwin
395
+ x86-linux
396
+ x86-linux-gnu
397
+ x86-linux-musl
398
+ x86_64-darwin
399
+ x86_64-linux
400
+ x86_64-linux-gnu
401
+ x86_64-linux-musl
402
+
403
+ DEPENDENCIES
404
+ bootsnap
405
+ brakeman
406
+ capybara
407
+ clerk-sdk-ruby!
408
+ debug
409
+ dotenv-rails (~> 3.1)
410
+ importmap-rails
411
+ jbuilder
412
+ kamal
413
+ propshaft
414
+ puma (>= 5.0)
415
+ rails (~> 8.0.0)
416
+ rubocop-rails-omakase
417
+ selenium-webdriver
418
+ solid_cable
419
+ solid_cache
420
+ solid_queue
421
+ sqlite3 (>= 2.1)
422
+ stimulus-rails
423
+ thruster
424
+ turbo-rails
425
+ tzinfo-data
426
+ web-console
427
+
428
+ BUNDLED WITH
429
+ 2.6.2
@@ -0,0 +1,24 @@
1
+ # README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative "config/application"
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,10 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css.
3
+ *
4
+ * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
5
+ * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
6
+ * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
7
+ * depending on specificity.
8
+ *
9
+ * Consider organizing styles into separate files for maintainability.
10
+ */
@@ -0,0 +1,6 @@
1
+ class ApplicationController < ActionController::Base
2
+ include Clerk::Authenticatable
3
+
4
+ # Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
5
+ allow_browser versions: :modern
6
+ end
@@ -0,0 +1,11 @@
1
+ class HomeController < ApplicationController
2
+ before_action :require_reverification!, only: [:protected], preset: Clerk::StepUp::Preset::STRICT
3
+
4
+ def index
5
+ @user = clerk.user
6
+ end
7
+
8
+ def protected
9
+ render json: {message: clerk.user? ? "Valid session" : "Not logged in"}
10
+ end
11
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module HomeHelper
2
+ end
@@ -0,0 +1,3 @@
1
+ // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
2
+ import "@hotwired/turbo-rails"
3
+ import "controllers"
@@ -0,0 +1,9 @@
1
+ import { Application } from "@hotwired/stimulus"
2
+
3
+ const application = Application.start()
4
+
5
+ // Configure Stimulus development experience
6
+ application.debug = false
7
+ window.Stimulus = application
8
+
9
+ export { application }
@@ -0,0 +1,7 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class extends Controller {
4
+ connect() {
5
+ this.element.textContent = "Hello World!"
6
+ }
7
+ }
@@ -0,0 +1,4 @@
1
+ // Import and register all your controllers from the importmap via controllers/**/*_controller
2
+ import { application } from "controllers/application"
3
+ import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
4
+ eagerLoadControllersFrom("controllers", application)
@@ -0,0 +1,7 @@
1
+ class ApplicationJob < ActiveJob::Base
2
+ # Automatically retry jobs that encountered a deadlock
3
+ # retry_on ActiveRecord::Deadlocked
4
+
5
+ # Most jobs are safe to ignore if the underlying records are no longer available
6
+ # discard_on ActiveJob::DeserializationError
7
+ end
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: "from@example.com"
3
+ layout "mailer"
4
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ primary_abstract_class
3
+ end
@@ -0,0 +1,7 @@
1
+ <h2>
2
+ <% if @user %>
3
+ Authenticated User: <%= @user.first_name %> (<%= @user.id %>)
4
+ <% else %>
5
+ Not Authenticated
6
+ <% end %>
7
+ </h2>
@@ -0,0 +1,60 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title><%= content_for(:title) || "Rails Full" %></title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <meta name="apple-mobile-web-app-capable" content="yes">
7
+ <meta name="mobile-web-app-capable" content="yes">
8
+ <%= csrf_meta_tags %>
9
+ <%= csp_meta_tag %>
10
+
11
+ <%= yield :head %>
12
+
13
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
14
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
15
+
16
+ <link rel="icon" href="/icon.png" type="image/png">
17
+ <link rel="icon" href="/icon.svg" type="image/svg+xml">
18
+ <link rel="apple-touch-icon" href="/icon.png">
19
+
20
+ <style>
21
+ html { font-family: monospace; }
22
+ @media (prefers-color-scheme: dark) {
23
+ html {
24
+ color: #FFE6E6FF;
25
+ background-color: #201D1E;
26
+ }
27
+ }
28
+ </style>
29
+ <script
30
+ async
31
+ crossorigin="anonymous"
32
+ data-clerk-publishable-key="pk_test_d29ydGh5LWVsZXBoYW50LTE3LmNsZXJrLmFjY291bnRzLmRldiQ"
33
+ src="https://worthy-elephant-17.clerk.accounts.dev/npm/@clerk/clerk-js@latest/dist/clerk.browser.js"
34
+ type="text/javascript"
35
+ ></script>
36
+ <script>
37
+ window.addEventListener('load', async function () {
38
+ await Clerk.load()
39
+ const container = document.getElementById('auth-container')
40
+ if (Clerk.user) {
41
+ container.innerHTML = `<div id="user-button"></div>`
42
+ Clerk.mountUserButton(document.getElementById('user-button'))
43
+ } else {
44
+ container.innerHTML = `<div id="sign-in"></div>`
45
+ Clerk.mountSignIn(document.getElementById('sign-in'))
46
+ }
47
+ })
48
+ </script>
49
+
50
+ <%# Includes all stylesheet files in app/assets/stylesheets %>
51
+ <%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
52
+ <%= javascript_importmap_tags %>
53
+ </head>
54
+
55
+ <body>
56
+ <h1>Rails (Full Stack)</h1>
57
+ <%= yield %>
58
+ <div id="auth-container"></div>
59
+ </body>
60
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "RailsFull",
3
+ "icons": [
4
+ {
5
+ "src": "/icon.png",
6
+ "type": "image/png",
7
+ "sizes": "512x512"
8
+ },
9
+ {
10
+ "src": "/icon.png",
11
+ "type": "image/png",
12
+ "sizes": "512x512",
13
+ "purpose": "maskable"
14
+ }
15
+ ],
16
+ "start_url": "/",
17
+ "display": "standalone",
18
+ "scope": "/",
19
+ "description": "RailsFull.",
20
+ "theme_color": "red",
21
+ "background_color": "red"
22
+ }
@@ -0,0 +1,26 @@
1
+ // Add a service worker for processing Web Push notifications:
2
+ //
3
+ // self.addEventListener("push", async (event) => {
4
+ // const { title, options } = await event.data.json()
5
+ // event.waitUntil(self.registration.showNotification(title, options))
6
+ // })
7
+ //
8
+ // self.addEventListener("notificationclick", function(event) {
9
+ // event.notification.close()
10
+ // event.waitUntil(
11
+ // clients.matchAll({ type: "window" }).then((clientList) => {
12
+ // for (let i = 0; i < clientList.length; i++) {
13
+ // let client = clientList[i]
14
+ // let clientPath = (new URL(client.url)).pathname
15
+ //
16
+ // if (clientPath == event.notification.data.path && "focus" in client) {
17
+ // return client.focus()
18
+ // }
19
+ // }
20
+ //
21
+ // if (clients.openWindow) {
22
+ // return clients.openWindow(event.notification.data.path)
23
+ // }
24
+ // })
25
+ // )
26
+ // })
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ require "rubygems"
3
+ require "bundler/setup"
4
+
5
+ ARGV.unshift("--ensure-latest")
6
+
7
+ load Gem.bin_path("brakeman", "brakeman")