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,109 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # A sample pre-deploy hook
4
+ #
5
+ # Checks the Github status of the build, waiting for a pending build to complete for up to 720 seconds.
6
+ #
7
+ # Fails unless the combined status is "success"
8
+ #
9
+ # These environment variables are available:
10
+ # KAMAL_RECORDED_AT
11
+ # KAMAL_PERFORMER
12
+ # KAMAL_VERSION
13
+ # KAMAL_HOSTS
14
+ # KAMAL_COMMAND
15
+ # KAMAL_SUBCOMMAND
16
+ # KAMAL_ROLE (if set)
17
+ # KAMAL_DESTINATION (if set)
18
+
19
+ # Only check the build status for production deployments
20
+ if ENV["KAMAL_COMMAND"] == "rollback" || ENV["KAMAL_DESTINATION"] != "production"
21
+ exit 0
22
+ end
23
+
24
+ require "bundler/inline"
25
+
26
+ # true = install gems so this is fast on repeat invocations
27
+ gemfile(true, quiet: true) do
28
+ source "https://rubygems.org"
29
+
30
+ gem "octokit"
31
+ gem "faraday-retry"
32
+ end
33
+
34
+ MAX_ATTEMPTS = 72
35
+ ATTEMPTS_GAP = 10
36
+
37
+ def exit_with_error(message)
38
+ $stderr.puts message
39
+ exit 1
40
+ end
41
+
42
+ class GithubStatusChecks
43
+ attr_reader :remote_url, :git_sha, :github_client, :combined_status
44
+
45
+ def initialize
46
+ @remote_url = `git config --get remote.origin.url`.strip.delete_prefix("https://github.com/")
47
+ @git_sha = `git rev-parse HEAD`.strip
48
+ @github_client = Octokit::Client.new(access_token: ENV["GITHUB_TOKEN"])
49
+ refresh!
50
+ end
51
+
52
+ def refresh!
53
+ @combined_status = github_client.combined_status(remote_url, git_sha)
54
+ end
55
+
56
+ def state
57
+ combined_status[:state]
58
+ end
59
+
60
+ def first_status_url
61
+ first_status = combined_status[:statuses].find { |status| status[:state] == state }
62
+ first_status && first_status[:target_url]
63
+ end
64
+
65
+ def complete_count
66
+ combined_status[:statuses].count { |status| status[:state] != "pending"}
67
+ end
68
+
69
+ def total_count
70
+ combined_status[:statuses].count
71
+ end
72
+
73
+ def current_status
74
+ if total_count > 0
75
+ "Completed #{complete_count}/#{total_count} checks, see #{first_status_url} ..."
76
+ else
77
+ "Build not started..."
78
+ end
79
+ end
80
+ end
81
+
82
+
83
+ $stdout.sync = true
84
+
85
+ puts "Checking build status..."
86
+ attempts = 0
87
+ checks = GithubStatusChecks.new
88
+
89
+ begin
90
+ loop do
91
+ case checks.state
92
+ when "success"
93
+ puts "Checks passed, see #{checks.first_status_url}"
94
+ exit 0
95
+ when "failure"
96
+ exit_with_error "Checks failed, see #{checks.first_status_url}"
97
+ when "pending"
98
+ attempts += 1
99
+ end
100
+
101
+ exit_with_error "Checks are still pending, gave up after #{MAX_ATTEMPTS * ATTEMPTS_GAP} seconds" if attempts == MAX_ATTEMPTS
102
+
103
+ puts checks.current_status
104
+ sleep(ATTEMPTS_GAP)
105
+ checks.refresh!
106
+ end
107
+ rescue Octokit::NotFound
108
+ exit_with_error "Build status could not be found"
109
+ end
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+
3
+ echo "Rebooting kamal-proxy on $KAMAL_HOSTS..."
@@ -0,0 +1,17 @@
1
+ # Secrets defined here are available for reference under registry/password, env/secret, builder/secrets,
2
+ # and accessories/*/env/secret in config/deploy.yml. All secrets should be pulled from either
3
+ # password manager, ENV, or a file. DO NOT ENTER RAW CREDENTIALS HERE! This file needs to be safe for git.
4
+
5
+ # Example of extracting secrets from 1password (or another compatible pw manager)
6
+ # SECRETS=$(kamal secrets fetch --adapter 1password --account your-account --from Vault/Item KAMAL_REGISTRY_PASSWORD RAILS_MASTER_KEY)
7
+ # KAMAL_REGISTRY_PASSWORD=$(kamal secrets extract KAMAL_REGISTRY_PASSWORD ${SECRETS})
8
+ # RAILS_MASTER_KEY=$(kamal secrets extract RAILS_MASTER_KEY ${SECRETS})
9
+
10
+ # Use a GITHUB_TOKEN if private repositories are needed for the image
11
+ # GITHUB_TOKEN=$(gh config get -h github.com oauth_token)
12
+
13
+ # Grab the registry password from ENV
14
+ KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
15
+
16
+ # Improve security by using a password manager. Never check config/master.key into git!
17
+ RAILS_MASTER_KEY=$(cat config/master.key)
@@ -0,0 +1,8 @@
1
+ # Omakase Ruby styling for Rails
2
+ inherit_gem: { rubocop-rails-omakase: rubocop.yml }
3
+
4
+ # Overwrite or add rules to create your own house style
5
+ #
6
+ # # Use `[a, [b, c]]` not `[ a, [ b, c ] ]`
7
+ # Layout/SpaceInsideArrayLiteralBrackets:
8
+ # Enabled: false
@@ -0,0 +1 @@
1
+ 3.3.5
@@ -0,0 +1,69 @@
1
+ # syntax=docker/dockerfile:1
2
+ # check=error=true
3
+
4
+ # This Dockerfile is designed for production, not development. Use with Kamal or build'n'run by hand:
5
+ # docker build -t rails_api .
6
+ # docker run -d -p 80:80 -e RAILS_MASTER_KEY=<value from config/master.key> --name rails_api rails_api
7
+
8
+ # For a containerized dev environment, see Dev Containers: https://guides.rubyonrails.org/getting_started_with_devcontainer.html
9
+
10
+ # Make sure RUBY_VERSION matches the Ruby version in .ruby-version
11
+ ARG RUBY_VERSION=3.3.5
12
+ FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
13
+
14
+ # Rails app lives here
15
+ WORKDIR /rails
16
+
17
+ # Install base packages
18
+ RUN apt-get update -qq && \
19
+ apt-get install --no-install-recommends -y curl libjemalloc2 libvips sqlite3 && \
20
+ rm -rf /var/lib/apt/lists /var/cache/apt/archives
21
+
22
+ # Set production environment
23
+ ENV RAILS_ENV="production" \
24
+ BUNDLE_DEPLOYMENT="1" \
25
+ BUNDLE_PATH="/usr/local/bundle" \
26
+ BUNDLE_WITHOUT="development"
27
+
28
+ # Throw-away build stage to reduce size of final image
29
+ FROM base AS build
30
+
31
+ # Install packages needed to build gems
32
+ RUN apt-get update -qq && \
33
+ apt-get install --no-install-recommends -y build-essential git pkg-config && \
34
+ rm -rf /var/lib/apt/lists /var/cache/apt/archives
35
+
36
+ # Install application gems
37
+ COPY Gemfile Gemfile.lock ./
38
+ RUN bundle install && \
39
+ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
40
+ bundle exec bootsnap precompile --gemfile
41
+
42
+ # Copy application code
43
+ COPY . .
44
+
45
+ # Precompile bootsnap code for faster boot times
46
+ RUN bundle exec bootsnap precompile app/ lib/
47
+
48
+
49
+
50
+
51
+ # Final stage for app image
52
+ FROM base
53
+
54
+ # Copy built artifacts: gems, application
55
+ COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}"
56
+ COPY --from=build /rails /rails
57
+
58
+ # Run and own only the runtime files as a non-root user for security
59
+ RUN groupadd --system --gid 1000 rails && \
60
+ useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \
61
+ chown -R rails:rails db log storage tmp
62
+ USER 1000:1000
63
+
64
+ # Entrypoint prepares the database.
65
+ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
66
+
67
+ # Start server via Thruster by default, this can be overwritten at runtime
68
+ EXPOSE 80
69
+ CMD ["./bin/thrust", "./bin/rails", "server"]
@@ -0,0 +1,54 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
4
+ gem "rails", "~> 8.0.0"
5
+ # Use sqlite3 as the database for Active Record
6
+ gem "sqlite3", ">= 2.1"
7
+ # Use the Puma web server [https://github.com/puma/puma]
8
+ gem "puma", ">= 5.0"
9
+ # Build JSON APIs with ease [https://github.com/rails/jbuilder]
10
+ # gem "jbuilder"
11
+
12
+ # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
13
+ # gem "bcrypt", "~> 3.1.7"
14
+
15
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
16
+ gem "tzinfo-data", platforms: %i[windows jruby]
17
+
18
+ # Use the database-backed adapters for Rails.cache, Active Job, and Action Cable
19
+ gem "solid_cache"
20
+ gem "solid_queue"
21
+ gem "solid_cable"
22
+
23
+ # Reduces boot times through caching; required in config/boot.rb
24
+ gem "bootsnap", require: false
25
+
26
+ # Deploy this application anywhere as a Docker container [https://kamal-deploy.org]
27
+ gem "kamal", require: false
28
+
29
+ # Add HTTP asset caching/compression and X-Sendfile acceleration to Puma [https://github.com/basecamp/thruster/]
30
+ gem "thruster", require: false
31
+
32
+ # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
33
+ # gem "image_processing", "~> 1.2"
34
+
35
+ # Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin Ajax possible
36
+ # gem "rack-cors"
37
+
38
+ path "../.." do
39
+ gem "clerk-sdk-ruby", require: "clerk"
40
+ end
41
+
42
+
43
+ group :development, :test do
44
+ # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
45
+ gem "debug", platforms: %i[mri windows], require: "debug/prelude"
46
+
47
+ # Static analysis for security vulnerabilities [https://brakemanscanner.org/]
48
+ gem "brakeman", require: false
49
+
50
+ # Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/]
51
+ gem "rubocop-rails-omakase", require: false
52
+ end
53
+
54
+ gem "dotenv-rails", "~> 3.1"
@@ -0,0 +1,374 @@
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
+ ast (2.4.2)
85
+ base64 (0.2.0)
86
+ bcrypt_pbkdf (1.1.1)
87
+ bcrypt_pbkdf (1.1.1-arm64-darwin)
88
+ bcrypt_pbkdf (1.1.1-x86_64-darwin)
89
+ benchmark (0.4.0)
90
+ bigdecimal (3.1.9)
91
+ bootsnap (1.18.4)
92
+ msgpack (~> 1.2)
93
+ brakeman (7.0.0)
94
+ racc
95
+ builder (3.3.0)
96
+ clerk-http-client (2.0.0.beta5)
97
+ faraday (>= 1.0.1, < 3.0)
98
+ faraday-multipart
99
+ marcel
100
+ concurrent-ruby (1.3.4)
101
+ connection_pool (2.4.1)
102
+ crass (1.0.6)
103
+ date (3.4.1)
104
+ debug (1.10.0)
105
+ irb (~> 1.10)
106
+ reline (>= 0.3.8)
107
+ dotenv (3.1.7)
108
+ dotenv-rails (3.1.7)
109
+ dotenv (= 3.1.7)
110
+ railties (>= 6.1)
111
+ drb (2.2.1)
112
+ ed25519 (1.3.0)
113
+ erubi (1.13.1)
114
+ et-orbi (1.2.11)
115
+ tzinfo
116
+ faraday (2.12.2)
117
+ faraday-net_http (>= 2.0, < 3.5)
118
+ json
119
+ logger
120
+ faraday-multipart (1.1.0)
121
+ multipart-post (~> 2.0)
122
+ faraday-net_http (3.4.0)
123
+ net-http (>= 0.5.0)
124
+ fugit (1.11.1)
125
+ et-orbi (~> 1, >= 1.2.11)
126
+ raabro (~> 1.4)
127
+ globalid (1.2.1)
128
+ activesupport (>= 6.1)
129
+ i18n (1.14.6)
130
+ concurrent-ruby (~> 1.0)
131
+ io-console (0.8.0)
132
+ irb (1.14.3)
133
+ rdoc (>= 4.0.0)
134
+ reline (>= 0.4.2)
135
+ json (2.9.1)
136
+ jwt (2.10.1)
137
+ base64
138
+ kamal (2.4.0)
139
+ activesupport (>= 7.0)
140
+ base64 (~> 0.2)
141
+ bcrypt_pbkdf (~> 1.0)
142
+ concurrent-ruby (~> 1.2)
143
+ dotenv (~> 3.1)
144
+ ed25519 (~> 1.2)
145
+ net-ssh (~> 7.3)
146
+ sshkit (>= 1.23.0, < 2.0)
147
+ thor (~> 1.3)
148
+ zeitwerk (>= 2.6.18, < 3.0)
149
+ language_server-protocol (3.17.0.3)
150
+ logger (1.6.4)
151
+ loofah (2.24.0)
152
+ crass (~> 1.0.2)
153
+ nokogiri (>= 1.12.0)
154
+ mail (2.8.1)
155
+ mini_mime (>= 0.1.1)
156
+ net-imap
157
+ net-pop
158
+ net-smtp
159
+ marcel (1.0.4)
160
+ mini_mime (1.1.5)
161
+ mini_portile2 (2.8.8)
162
+ minitest (5.25.4)
163
+ msgpack (1.7.5)
164
+ multipart-post (2.4.1)
165
+ net-http (0.6.0)
166
+ uri
167
+ net-imap (0.5.5)
168
+ date
169
+ net-protocol
170
+ net-pop (0.1.2)
171
+ net-protocol
172
+ net-protocol (0.2.2)
173
+ timeout
174
+ net-scp (4.0.0)
175
+ net-ssh (>= 2.6.5, < 8.0.0)
176
+ net-sftp (4.0.0)
177
+ net-ssh (>= 5.0.0, < 8.0.0)
178
+ net-smtp (0.5.0)
179
+ net-protocol
180
+ net-ssh (7.3.0)
181
+ nio4r (2.7.4)
182
+ nokogiri (1.18.1)
183
+ mini_portile2 (~> 2.8.2)
184
+ racc (~> 1.4)
185
+ nokogiri (1.18.1-aarch64-linux-gnu)
186
+ racc (~> 1.4)
187
+ nokogiri (1.18.1-aarch64-linux-musl)
188
+ racc (~> 1.4)
189
+ nokogiri (1.18.1-arm-linux-gnu)
190
+ racc (~> 1.4)
191
+ nokogiri (1.18.1-arm-linux-musl)
192
+ racc (~> 1.4)
193
+ nokogiri (1.18.1-arm64-darwin)
194
+ racc (~> 1.4)
195
+ nokogiri (1.18.1-x86_64-darwin)
196
+ racc (~> 1.4)
197
+ nokogiri (1.18.1-x86_64-linux-gnu)
198
+ racc (~> 1.4)
199
+ nokogiri (1.18.1-x86_64-linux-musl)
200
+ racc (~> 1.4)
201
+ ostruct (0.6.1)
202
+ parallel (1.26.3)
203
+ parser (3.3.6.0)
204
+ ast (~> 2.4.1)
205
+ racc
206
+ psych (5.2.2)
207
+ date
208
+ stringio
209
+ puma (6.5.0)
210
+ nio4r (~> 2.0)
211
+ raabro (1.4.0)
212
+ racc (1.8.1)
213
+ rack (3.1.8)
214
+ rack-session (2.1.0)
215
+ base64 (>= 0.1.0)
216
+ rack (>= 3.0.0)
217
+ rack-test (2.2.0)
218
+ rack (>= 1.3)
219
+ rackup (2.2.1)
220
+ rack (>= 3)
221
+ rails (8.0.1)
222
+ actioncable (= 8.0.1)
223
+ actionmailbox (= 8.0.1)
224
+ actionmailer (= 8.0.1)
225
+ actionpack (= 8.0.1)
226
+ actiontext (= 8.0.1)
227
+ actionview (= 8.0.1)
228
+ activejob (= 8.0.1)
229
+ activemodel (= 8.0.1)
230
+ activerecord (= 8.0.1)
231
+ activestorage (= 8.0.1)
232
+ activesupport (= 8.0.1)
233
+ bundler (>= 1.15.0)
234
+ railties (= 8.0.1)
235
+ rails-dom-testing (2.2.0)
236
+ activesupport (>= 5.0.0)
237
+ minitest
238
+ nokogiri (>= 1.6)
239
+ rails-html-sanitizer (1.6.2)
240
+ loofah (~> 2.21)
241
+ 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)
242
+ railties (8.0.1)
243
+ actionpack (= 8.0.1)
244
+ activesupport (= 8.0.1)
245
+ irb (~> 1.13)
246
+ rackup (>= 1.0.0)
247
+ rake (>= 12.2)
248
+ thor (~> 1.0, >= 1.2.2)
249
+ zeitwerk (~> 2.6)
250
+ rainbow (3.1.1)
251
+ rake (13.2.1)
252
+ rdoc (6.10.0)
253
+ psych (>= 4.0.0)
254
+ regexp_parser (2.10.0)
255
+ reline (0.6.0)
256
+ io-console (~> 0.5)
257
+ rubocop (1.69.2)
258
+ json (~> 2.3)
259
+ language_server-protocol (>= 3.17.0)
260
+ parallel (~> 1.10)
261
+ parser (>= 3.3.0.2)
262
+ rainbow (>= 2.2.2, < 4.0)
263
+ regexp_parser (>= 2.9.3, < 3.0)
264
+ rubocop-ast (>= 1.36.2, < 2.0)
265
+ ruby-progressbar (~> 1.7)
266
+ unicode-display_width (>= 2.4.0, < 4.0)
267
+ rubocop-ast (1.37.0)
268
+ parser (>= 3.3.1.0)
269
+ rubocop-minitest (0.36.0)
270
+ rubocop (>= 1.61, < 2.0)
271
+ rubocop-ast (>= 1.31.1, < 2.0)
272
+ rubocop-performance (1.23.1)
273
+ rubocop (>= 1.48.1, < 2.0)
274
+ rubocop-ast (>= 1.31.1, < 2.0)
275
+ rubocop-rails (2.28.0)
276
+ activesupport (>= 4.2.0)
277
+ rack (>= 1.1)
278
+ rubocop (>= 1.52.0, < 2.0)
279
+ rubocop-ast (>= 1.31.1, < 2.0)
280
+ rubocop-rails-omakase (1.0.0)
281
+ rubocop
282
+ rubocop-minitest
283
+ rubocop-performance
284
+ rubocop-rails
285
+ ruby-progressbar (1.13.0)
286
+ securerandom (0.4.1)
287
+ solid_cable (3.0.5)
288
+ actioncable (>= 7.2)
289
+ activejob (>= 7.2)
290
+ activerecord (>= 7.2)
291
+ railties (>= 7.2)
292
+ solid_cache (1.0.6)
293
+ activejob (>= 7.2)
294
+ activerecord (>= 7.2)
295
+ railties (>= 7.2)
296
+ solid_queue (1.1.2)
297
+ activejob (>= 7.1)
298
+ activerecord (>= 7.1)
299
+ concurrent-ruby (>= 1.3.1)
300
+ fugit (~> 1.11.0)
301
+ railties (>= 7.1)
302
+ thor (~> 1.3.1)
303
+ sqlite3 (2.5.0-aarch64-linux-gnu)
304
+ sqlite3 (2.5.0-aarch64-linux-musl)
305
+ sqlite3 (2.5.0-arm-linux-gnu)
306
+ sqlite3 (2.5.0-arm-linux-musl)
307
+ sqlite3 (2.5.0-arm64-darwin)
308
+ sqlite3 (2.5.0-x86-linux-gnu)
309
+ sqlite3 (2.5.0-x86-linux-musl)
310
+ sqlite3 (2.5.0-x86_64-darwin)
311
+ sqlite3 (2.5.0-x86_64-linux-gnu)
312
+ sqlite3 (2.5.0-x86_64-linux-musl)
313
+ sshkit (1.23.2)
314
+ base64
315
+ net-scp (>= 1.1.2)
316
+ net-sftp (>= 2.1.2)
317
+ net-ssh (>= 2.8.0)
318
+ ostruct
319
+ stringio (3.1.2)
320
+ thor (1.3.2)
321
+ thruster (0.1.10)
322
+ thruster (0.1.10-aarch64-linux)
323
+ thruster (0.1.10-arm64-darwin)
324
+ thruster (0.1.10-x86_64-darwin)
325
+ thruster (0.1.10-x86_64-linux)
326
+ timeout (0.4.3)
327
+ tzinfo (2.0.6)
328
+ concurrent-ruby (~> 1.0)
329
+ unicode-display_width (3.1.3)
330
+ unicode-emoji (~> 4.0, >= 4.0.4)
331
+ unicode-emoji (4.0.4)
332
+ uri (1.0.2)
333
+ useragent (0.16.11)
334
+ websocket-driver (0.7.7)
335
+ base64
336
+ websocket-extensions (>= 0.1.0)
337
+ websocket-extensions (0.1.5)
338
+ zeitwerk (2.7.1)
339
+
340
+ PLATFORMS
341
+ aarch64-linux
342
+ aarch64-linux-gnu
343
+ aarch64-linux-musl
344
+ arm-linux
345
+ arm-linux-gnu
346
+ arm-linux-musl
347
+ arm64-darwin
348
+ x86-linux
349
+ x86-linux-gnu
350
+ x86-linux-musl
351
+ x86_64-darwin
352
+ x86_64-linux
353
+ x86_64-linux-gnu
354
+ x86_64-linux-musl
355
+
356
+ DEPENDENCIES
357
+ bootsnap
358
+ brakeman
359
+ clerk-sdk-ruby!
360
+ debug
361
+ dotenv-rails (~> 3.1)
362
+ kamal
363
+ puma (>= 5.0)
364
+ rails (~> 8.0.0)
365
+ rubocop-rails-omakase
366
+ solid_cable
367
+ solid_cache
368
+ solid_queue
369
+ sqlite3 (>= 2.1)
370
+ thruster
371
+ tzinfo-data
372
+
373
+ BUNDLED WITH
374
+ 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,3 @@
1
+ class ApplicationController < ActionController::API
2
+ include Clerk::Authenticatable
3
+ end
@@ -0,0 +1,5 @@
1
+ class HomeController < ApplicationController
2
+ def index
3
+ render json: clerk.user || {message: "Not authenticated"}
4
+ end
5
+ end
@@ -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