activeadmin_mitosis_editor 0.1.0

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 (165) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +17 -0
  3. data/CLAUDE.md +118 -0
  4. data/Gemfile +3 -0
  5. data/LICENSE +21 -0
  6. data/README.md +126 -0
  7. data/RELEASE.md +80 -0
  8. data/Rakefile +2 -0
  9. data/activeadmin_mitosis_editor.gemspec +17 -0
  10. data/app/views/inputs/mitosis_editor_input/_dependencies.html.erb +9 -0
  11. data/app/views/inputs/mitosis_editor_input/_form.html.erb +52 -0
  12. data/bin/console +5 -0
  13. data/bin/setup +14 -0
  14. data/demo/.dockerignore +51 -0
  15. data/demo/.gitattributes +9 -0
  16. data/demo/.gitignore +37 -0
  17. data/demo/.kamal/hooks/docker-setup.sample +3 -0
  18. data/demo/.kamal/hooks/post-app-boot.sample +3 -0
  19. data/demo/.kamal/hooks/post-deploy.sample +14 -0
  20. data/demo/.kamal/hooks/post-proxy-reboot.sample +3 -0
  21. data/demo/.kamal/hooks/pre-app-boot.sample +3 -0
  22. data/demo/.kamal/hooks/pre-build.sample +51 -0
  23. data/demo/.kamal/hooks/pre-connect.sample +47 -0
  24. data/demo/.kamal/hooks/pre-deploy.sample +122 -0
  25. data/demo/.kamal/hooks/pre-proxy-reboot.sample +3 -0
  26. data/demo/.kamal/secrets +20 -0
  27. data/demo/.rubocop.yml +8 -0
  28. data/demo/.ruby-version +1 -0
  29. data/demo/Dockerfile +76 -0
  30. data/demo/Gemfile +78 -0
  31. data/demo/Procfile.dev +2 -0
  32. data/demo/README.md +24 -0
  33. data/demo/Rakefile +6 -0
  34. data/demo/app/admin/articles.rb +12 -0
  35. data/demo/app/admin/dashboard.rb +17 -0
  36. data/demo/app/admin/pages.rb +12 -0
  37. data/demo/app/admin/posts.rb +12 -0
  38. data/demo/app/assets/builds/.keep +0 -0
  39. data/demo/app/assets/builds/active_admin.css +3852 -0
  40. data/demo/app/assets/images/.keep +0 -0
  41. data/demo/app/assets/stylesheets/active_admin.css +3 -0
  42. data/demo/app/assets/stylesheets/application.css +1 -0
  43. data/demo/app/assets/stylesheets/mitosis-editor.css +1 -0
  44. data/demo/app/assets/stylesheets/theme-dark.css +1 -0
  45. data/demo/app/assets/stylesheets/theme-light.css +1 -0
  46. data/demo/app/controllers/application_controller.rb +7 -0
  47. data/demo/app/controllers/articles_controller.rb +7 -0
  48. data/demo/app/controllers/concerns/.keep +0 -0
  49. data/demo/app/helpers/application_helper.rb +2 -0
  50. data/demo/app/helpers/articles_helper.rb +2 -0
  51. data/demo/app/javascript/application.js +3 -0
  52. data/demo/app/javascript/controllers/application.js +9 -0
  53. data/demo/app/javascript/controllers/hello_controller.js +7 -0
  54. data/demo/app/javascript/controllers/index.js +4 -0
  55. data/demo/app/jobs/application_job.rb +7 -0
  56. data/demo/app/mailers/application_mailer.rb +4 -0
  57. data/demo/app/models/application_record.rb +3 -0
  58. data/demo/app/models/article.rb +5 -0
  59. data/demo/app/models/concerns/.keep +0 -0
  60. data/demo/app/models/page.rb +5 -0
  61. data/demo/app/models/post.rb +5 -0
  62. data/demo/app/views/articles/_article.html.erb +12 -0
  63. data/demo/app/views/articles/_article.json.jbuilder +2 -0
  64. data/demo/app/views/articles/_form.html.erb +27 -0
  65. data/demo/app/views/articles/edit.html.erb +12 -0
  66. data/demo/app/views/articles/index.html.erb +16 -0
  67. data/demo/app/views/articles/index.json.jbuilder +1 -0
  68. data/demo/app/views/articles/new.html.erb +11 -0
  69. data/demo/app/views/articles/show.html.erb +10 -0
  70. data/demo/app/views/articles/show.json.jbuilder +1 -0
  71. data/demo/app/views/inputs/mitosis_editor_input/_dependencies.html.erb +17 -0
  72. data/demo/app/views/layouts/application.html.erb +29 -0
  73. data/demo/app/views/layouts/mailer.html.erb +13 -0
  74. data/demo/app/views/layouts/mailer.text.erb +1 -0
  75. data/demo/app/views/pwa/manifest.json.erb +22 -0
  76. data/demo/app/views/pwa/service-worker.js +26 -0
  77. data/demo/bin/brakeman +7 -0
  78. data/demo/bin/bundler-audit +6 -0
  79. data/demo/bin/ci +6 -0
  80. data/demo/bin/dev +8 -0
  81. data/demo/bin/docker-entrypoint +8 -0
  82. data/demo/bin/importmap +4 -0
  83. data/demo/bin/jobs +6 -0
  84. data/demo/bin/kamal +27 -0
  85. data/demo/bin/rails +4 -0
  86. data/demo/bin/rake +4 -0
  87. data/demo/bin/rubocop +8 -0
  88. data/demo/bin/setup +35 -0
  89. data/demo/bin/thrust +5 -0
  90. data/demo/config/application.rb +27 -0
  91. data/demo/config/boot.rb +4 -0
  92. data/demo/config/bundler-audit.yml +5 -0
  93. data/demo/config/cable.yml +17 -0
  94. data/demo/config/cache.yml +16 -0
  95. data/demo/config/ci.rb +23 -0
  96. data/demo/config/credentials.yml.enc +1 -0
  97. data/demo/config/database.yml +41 -0
  98. data/demo/config/deploy.yml +120 -0
  99. data/demo/config/environment.rb +21 -0
  100. data/demo/config/environments/development.rb +78 -0
  101. data/demo/config/environments/production.rb +90 -0
  102. data/demo/config/environments/test.rb +53 -0
  103. data/demo/config/importmap.rb +7 -0
  104. data/demo/config/initializers/active_admin.rb +275 -0
  105. data/demo/config/initializers/activeadmin_mitosis_editor.rb +19 -0
  106. data/demo/config/initializers/assets.rb +7 -0
  107. data/demo/config/initializers/content_security_policy.rb +29 -0
  108. data/demo/config/initializers/filter_parameter_logging.rb +8 -0
  109. data/demo/config/initializers/inflections.rb +16 -0
  110. data/demo/config/locales/en.yml +31 -0
  111. data/demo/config/puma.rb +42 -0
  112. data/demo/config/queue.yml +18 -0
  113. data/demo/config/recurring.yml +15 -0
  114. data/demo/config/routes.rb +16 -0
  115. data/demo/config/storage.yml +27 -0
  116. data/demo/config.ru +6 -0
  117. data/demo/db/cable_schema.rb +11 -0
  118. data/demo/db/cache_schema.rb +12 -0
  119. data/demo/db/migrate/20260215110410_create_active_admin_comments.rb +16 -0
  120. data/demo/db/migrate/20260215110416_create_articles.rb +10 -0
  121. data/demo/db/migrate/20260216124916_create_posts.rb +10 -0
  122. data/demo/db/migrate/20260216124919_create_pages.rb +10 -0
  123. data/demo/db/queue_schema.rb +129 -0
  124. data/demo/db/schema.rb +48 -0
  125. data/demo/db/seeds.rb +9 -0
  126. data/demo/lib/tasks/.keep +0 -0
  127. data/demo/log/.keep +0 -0
  128. data/demo/package-lock.json +1260 -0
  129. data/demo/package.json +13 -0
  130. data/demo/public/400.html +135 -0
  131. data/demo/public/404.html +135 -0
  132. data/demo/public/406-unsupported-browser.html +135 -0
  133. data/demo/public/422.html +135 -0
  134. data/demo/public/500.html +135 -0
  135. data/demo/public/icon.png +0 -0
  136. data/demo/public/icon.svg +3 -0
  137. data/demo/public/robots.txt +1 -0
  138. data/demo/script/.keep +0 -0
  139. data/demo/spec/rails_helper.rb +72 -0
  140. data/demo/spec/spec_helper.rb +94 -0
  141. data/demo/spec/system/admin_articles_spec.rb +22 -0
  142. data/demo/spec/system/mitosis_editor_prism_spec.rb +34 -0
  143. data/demo/spec/system/mitosis_editor_theme_spec.rb +63 -0
  144. data/demo/storage/.keep +0 -0
  145. data/demo/tailwind-active_admin.config.js +17 -0
  146. data/demo/tmp/.keep +0 -0
  147. data/demo/tmp/storage/.keep +0 -0
  148. data/demo/vendor/.keep +0 -0
  149. data/demo/vendor/javascript/.keep +0 -0
  150. data/docs/plans/2026-02-15-mitosis-editor-gem-design.md +70 -0
  151. data/docs/plans/2026-02-15-mitosis-editor-gem-implementation.md +407 -0
  152. data/lib/activeadmin_mitosis_editor/inputs/mitosis_editor_input.rb +29 -0
  153. data/lib/activeadmin_mitosis_editor/railtie.rb +7 -0
  154. data/lib/activeadmin_mitosis_editor/version.rb +3 -0
  155. data/lib/activeadmin_mitosis_editor.rb +13 -0
  156. data/lib/generators/mitosis_editor/styles_generator.rb +23 -0
  157. data/lib/generators/mitosis_editor/templates/_dependencies.html.erb +17 -0
  158. data/lib/generators/mitosis_editor/views_generator.rb +14 -0
  159. data/preview.png +0 -0
  160. data/script/bump-version +78 -0
  161. data/vendor/assets/javascripts/mitosis-editor.js +61 -0
  162. data/vendor/assets/stylesheets/mitosis-editor.css +1 -0
  163. data/vendor/assets/stylesheets/theme-dark.min.css +1 -0
  164. data/vendor/assets/stylesheets/theme-light.min.css +1 -0
  165. metadata +248 -0
@@ -0,0 +1,19 @@
1
+ # Require the gem's input
2
+ require "activeadmin_mitosis_editor"
3
+
4
+ # Register custom input with Formtastic
5
+ Formtastic::Inputs.send(:include, Module.new do
6
+ def self.included(base)
7
+ base.extend(ClassMethods)
8
+ end
9
+
10
+ module ClassMethods
11
+ def custom_input_class(name, class_name)
12
+ @custom_input_classes ||= {}
13
+ @custom_input_classes[name.to_sym] = class_name
14
+ end
15
+ end
16
+ end)
17
+
18
+ # Make sure the input is loaded and available
19
+ Formtastic::Inputs::MitosisEditorInput = ActiveAdminMitosisEditor::Inputs::MitosisEditorInput
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = "1.0"
5
+
6
+ # Add additional assets to the asset load path.
7
+ # Rails.application.config.assets.paths << Emoji.images_path
@@ -0,0 +1,29 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Define an application-wide content security policy.
4
+ # See the Securing Rails Applications Guide for more information:
5
+ # https://guides.rubyonrails.org/security.html#content-security-policy-header
6
+
7
+ # Rails.application.configure do
8
+ # config.content_security_policy do |policy|
9
+ # policy.default_src :self, :https
10
+ # policy.font_src :self, :https, :data
11
+ # policy.img_src :self, :https, :data
12
+ # policy.object_src :none
13
+ # policy.script_src :self, :https
14
+ # policy.style_src :self, :https
15
+ # # Specify URI for violation reports
16
+ # # policy.report_uri "/csp-violation-report-endpoint"
17
+ # end
18
+ #
19
+ # # Generate session nonces for permitted importmap, inline scripts, and inline styles.
20
+ # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21
+ # config.content_security_policy_nonce_directives = %w(script-src style-src)
22
+ #
23
+ # # Automatically add `nonce` to `javascript_tag`, `javascript_include_tag`, and `stylesheet_link_tag`
24
+ # # if the corresponding directives are specified in `content_security_policy_nonce_directives`.
25
+ # # config.content_security_policy_nonce_auto = true
26
+ #
27
+ # # Report violations without enforcing the policy.
28
+ # # config.content_security_policy_report_only = true
29
+ # end
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
4
+ # Use this to limit dissemination of sensitive information.
5
+ # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
6
+ Rails.application.config.filter_parameters += [
7
+ :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc
8
+ ]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, "\\1en"
8
+ # inflect.singular /^(ox)en/i, "\\1"
9
+ # inflect.irregular "person", "people"
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym "RESTful"
16
+ # end
@@ -0,0 +1,31 @@
1
+ # Files in the config/locales directory are used for internationalization and
2
+ # are automatically loaded by Rails. If you want to use locales other than
3
+ # English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t "hello"
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t("hello") %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more about the API, please read the Rails Internationalization guide
20
+ # at https://guides.rubyonrails.org/i18n.html.
21
+ #
22
+ # Be aware that YAML interprets the following case-insensitive strings as
23
+ # booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings
24
+ # must be quoted to be interpreted as strings. For example:
25
+ #
26
+ # en:
27
+ # "yes": yup
28
+ # enabled: "ON"
29
+
30
+ en:
31
+ hello: "Hello world"
@@ -0,0 +1,42 @@
1
+ # This configuration file will be evaluated by Puma. The top-level methods that
2
+ # are invoked here are part of Puma's configuration DSL. For more information
3
+ # about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
4
+ #
5
+ # Puma starts a configurable number of processes (workers) and each process
6
+ # serves each request in a thread from an internal thread pool.
7
+ #
8
+ # You can control the number of workers using ENV["WEB_CONCURRENCY"]. You
9
+ # should only set this value when you want to run 2 or more workers. The
10
+ # default is already 1. You can set it to `auto` to automatically start a worker
11
+ # for each available processor.
12
+ #
13
+ # The ideal number of threads per worker depends both on how much time the
14
+ # application spends waiting for IO operations and on how much you wish to
15
+ # prioritize throughput over latency.
16
+ #
17
+ # As a rule of thumb, increasing the number of threads will increase how much
18
+ # traffic a given process can handle (throughput), but due to CRuby's
19
+ # Global VM Lock (GVL) it has diminishing returns and will degrade the
20
+ # response time (latency) of the application.
21
+ #
22
+ # The default is set to 3 threads as it's deemed a decent compromise between
23
+ # throughput and latency for the average Rails application.
24
+ #
25
+ # Any libraries that use a connection pool or another resource pool should
26
+ # be configured to provide at least as many connections as the number of
27
+ # threads. This includes Active Record's `pool` parameter in `database.yml`.
28
+ threads_count = ENV.fetch("RAILS_MAX_THREADS", 3)
29
+ threads threads_count, threads_count
30
+
31
+ # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
32
+ port ENV.fetch("PORT", 3000)
33
+
34
+ # Allow puma to be restarted by `bin/rails restart` command.
35
+ plugin :tmp_restart
36
+
37
+ # Run the Solid Queue supervisor inside of Puma for single-server deployments.
38
+ plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"]
39
+
40
+ # Specify the PID file. Defaults to tmp/pids/server.pid in development.
41
+ # In other environments, only set the PID file if requested.
42
+ pidfile ENV["PIDFILE"] if ENV["PIDFILE"]
@@ -0,0 +1,18 @@
1
+ default: &default
2
+ dispatchers:
3
+ - polling_interval: 1
4
+ batch_size: 500
5
+ workers:
6
+ - queues: "*"
7
+ threads: 3
8
+ processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %>
9
+ polling_interval: 0.1
10
+
11
+ development:
12
+ <<: *default
13
+
14
+ test:
15
+ <<: *default
16
+
17
+ production:
18
+ <<: *default
@@ -0,0 +1,15 @@
1
+ # examples:
2
+ # periodic_cleanup:
3
+ # class: CleanSoftDeletedRecordsJob
4
+ # queue: background
5
+ # args: [ 1000, { batch_size: 500 } ]
6
+ # schedule: every hour
7
+ # periodic_cleanup_with_command:
8
+ # command: "SoftDeletedRecord.due.delete_all"
9
+ # priority: 2
10
+ # schedule: at 5am every day
11
+
12
+ production:
13
+ clear_solid_queue_finished_jobs:
14
+ command: "SolidQueue::Job.clear_finished_in_batches(sleep_between_batches: 0.3)"
15
+ schedule: every hour at minute 12
@@ -0,0 +1,16 @@
1
+ Rails.application.routes.draw do
2
+ resources :articles
3
+ ActiveAdmin.routes(self)
4
+ # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
5
+
6
+ # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
7
+ # Can be used by load balancers and uptime monitors to verify that the app is live.
8
+ get "up" => "rails/health#show", as: :rails_health_check
9
+
10
+ # Render dynamic PWA files from app/views/pwa/* (remember to link manifest in application.html.erb)
11
+ # get "manifest" => "rails/pwa#manifest", as: :pwa_manifest
12
+ # get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
13
+
14
+ # Defines the root path route ("/")
15
+ # root "posts#index"
16
+ end
@@ -0,0 +1,27 @@
1
+ test:
2
+ service: Disk
3
+ root: <%= Rails.root.join("tmp/storage") %>
4
+
5
+ local:
6
+ service: Disk
7
+ root: <%= Rails.root.join("storage") %>
8
+
9
+ # Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10
+ # amazon:
11
+ # service: S3
12
+ # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13
+ # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14
+ # region: us-east-1
15
+ # bucket: your_own_bucket-<%= Rails.env %>
16
+
17
+ # Remember not to checkin your GCS keyfile to a repository
18
+ # google:
19
+ # service: GCS
20
+ # project: your_project
21
+ # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22
+ # bucket: your_own_bucket-<%= Rails.env %>
23
+
24
+ # mirror:
25
+ # service: Mirror
26
+ # primary: local
27
+ # mirrors: [ amazon, google, microsoft ]
data/demo/config.ru ADDED
@@ -0,0 +1,6 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require_relative "config/environment"
4
+
5
+ run Rails.application
6
+ Rails.application.load_server
@@ -0,0 +1,11 @@
1
+ ActiveRecord::Schema[7.1].define(version: 1) do
2
+ create_table "solid_cable_messages", force: :cascade do |t|
3
+ t.binary "channel", limit: 1024, null: false
4
+ t.binary "payload", limit: 536870912, null: false
5
+ t.datetime "created_at", null: false
6
+ t.integer "channel_hash", limit: 8, null: false
7
+ t.index ["channel"], name: "index_solid_cable_messages_on_channel"
8
+ t.index ["channel_hash"], name: "index_solid_cable_messages_on_channel_hash"
9
+ t.index ["created_at"], name: "index_solid_cable_messages_on_created_at"
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ ActiveRecord::Schema[7.2].define(version: 1) do
2
+ create_table "solid_cache_entries", force: :cascade do |t|
3
+ t.binary "key", limit: 1024, null: false
4
+ t.binary "value", limit: 536870912, null: false
5
+ t.datetime "created_at", null: false
6
+ t.integer "key_hash", limit: 8, null: false
7
+ t.integer "byte_size", limit: 4, null: false
8
+ t.index ["byte_size"], name: "index_solid_cache_entries_on_byte_size"
9
+ t.index ["key_hash", "byte_size"], name: "index_solid_cache_entries_on_key_hash_and_byte_size"
10
+ t.index ["key_hash"], name: "index_solid_cache_entries_on_key_hash", unique: true
11
+ end
12
+ end
@@ -0,0 +1,16 @@
1
+ class CreateActiveAdminComments < ActiveRecord::Migration[8.1]
2
+ def self.up
3
+ create_table :active_admin_comments do |t|
4
+ t.string :namespace
5
+ t.text :body
6
+ t.references :resource, polymorphic: true
7
+ t.references :author, polymorphic: true
8
+ t.timestamps
9
+ end
10
+ add_index :active_admin_comments, [ :namespace ]
11
+ end
12
+
13
+ def self.down
14
+ drop_table :active_admin_comments
15
+ end
16
+ end
@@ -0,0 +1,10 @@
1
+ class CreateArticles < ActiveRecord::Migration[8.1]
2
+ def change
3
+ create_table :articles do |t|
4
+ t.string :title
5
+ t.text :body
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ class CreatePosts < ActiveRecord::Migration[8.1]
2
+ def change
3
+ create_table :posts do |t|
4
+ t.string :title
5
+ t.text :body
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ class CreatePages < ActiveRecord::Migration[8.1]
2
+ def change
3
+ create_table :pages do |t|
4
+ t.string :title
5
+ t.text :body
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,129 @@
1
+ ActiveRecord::Schema[7.1].define(version: 1) do
2
+ create_table "solid_queue_blocked_executions", force: :cascade do |t|
3
+ t.bigint "job_id", null: false
4
+ t.string "queue_name", null: false
5
+ t.integer "priority", default: 0, null: false
6
+ t.string "concurrency_key", null: false
7
+ t.datetime "expires_at", null: false
8
+ t.datetime "created_at", null: false
9
+ t.index [ "concurrency_key", "priority", "job_id" ], name: "index_solid_queue_blocked_executions_for_release"
10
+ t.index [ "expires_at", "concurrency_key" ], name: "index_solid_queue_blocked_executions_for_maintenance"
11
+ t.index [ "job_id" ], name: "index_solid_queue_blocked_executions_on_job_id", unique: true
12
+ end
13
+
14
+ create_table "solid_queue_claimed_executions", force: :cascade do |t|
15
+ t.bigint "job_id", null: false
16
+ t.bigint "process_id"
17
+ t.datetime "created_at", null: false
18
+ t.index [ "job_id" ], name: "index_solid_queue_claimed_executions_on_job_id", unique: true
19
+ t.index [ "process_id", "job_id" ], name: "index_solid_queue_claimed_executions_on_process_id_and_job_id"
20
+ end
21
+
22
+ create_table "solid_queue_failed_executions", force: :cascade do |t|
23
+ t.bigint "job_id", null: false
24
+ t.text "error"
25
+ t.datetime "created_at", null: false
26
+ t.index [ "job_id" ], name: "index_solid_queue_failed_executions_on_job_id", unique: true
27
+ end
28
+
29
+ create_table "solid_queue_jobs", force: :cascade do |t|
30
+ t.string "queue_name", null: false
31
+ t.string "class_name", null: false
32
+ t.text "arguments"
33
+ t.integer "priority", default: 0, null: false
34
+ t.string "active_job_id"
35
+ t.datetime "scheduled_at"
36
+ t.datetime "finished_at"
37
+ t.string "concurrency_key"
38
+ t.datetime "created_at", null: false
39
+ t.datetime "updated_at", null: false
40
+ t.index [ "active_job_id" ], name: "index_solid_queue_jobs_on_active_job_id"
41
+ t.index [ "class_name" ], name: "index_solid_queue_jobs_on_class_name"
42
+ t.index [ "finished_at" ], name: "index_solid_queue_jobs_on_finished_at"
43
+ t.index [ "queue_name", "finished_at" ], name: "index_solid_queue_jobs_for_filtering"
44
+ t.index [ "scheduled_at", "finished_at" ], name: "index_solid_queue_jobs_for_alerting"
45
+ end
46
+
47
+ create_table "solid_queue_pauses", force: :cascade do |t|
48
+ t.string "queue_name", null: false
49
+ t.datetime "created_at", null: false
50
+ t.index [ "queue_name" ], name: "index_solid_queue_pauses_on_queue_name", unique: true
51
+ end
52
+
53
+ create_table "solid_queue_processes", force: :cascade do |t|
54
+ t.string "kind", null: false
55
+ t.datetime "last_heartbeat_at", null: false
56
+ t.bigint "supervisor_id"
57
+ t.integer "pid", null: false
58
+ t.string "hostname"
59
+ t.text "metadata"
60
+ t.datetime "created_at", null: false
61
+ t.string "name", null: false
62
+ t.index [ "last_heartbeat_at" ], name: "index_solid_queue_processes_on_last_heartbeat_at"
63
+ t.index [ "name", "supervisor_id" ], name: "index_solid_queue_processes_on_name_and_supervisor_id", unique: true
64
+ t.index [ "supervisor_id" ], name: "index_solid_queue_processes_on_supervisor_id"
65
+ end
66
+
67
+ create_table "solid_queue_ready_executions", force: :cascade do |t|
68
+ t.bigint "job_id", null: false
69
+ t.string "queue_name", null: false
70
+ t.integer "priority", default: 0, null: false
71
+ t.datetime "created_at", null: false
72
+ t.index [ "job_id" ], name: "index_solid_queue_ready_executions_on_job_id", unique: true
73
+ t.index [ "priority", "job_id" ], name: "index_solid_queue_poll_all"
74
+ t.index [ "queue_name", "priority", "job_id" ], name: "index_solid_queue_poll_by_queue"
75
+ end
76
+
77
+ create_table "solid_queue_recurring_executions", force: :cascade do |t|
78
+ t.bigint "job_id", null: false
79
+ t.string "task_key", null: false
80
+ t.datetime "run_at", null: false
81
+ t.datetime "created_at", null: false
82
+ t.index [ "job_id" ], name: "index_solid_queue_recurring_executions_on_job_id", unique: true
83
+ t.index [ "task_key", "run_at" ], name: "index_solid_queue_recurring_executions_on_task_key_and_run_at", unique: true
84
+ end
85
+
86
+ create_table "solid_queue_recurring_tasks", force: :cascade do |t|
87
+ t.string "key", null: false
88
+ t.string "schedule", null: false
89
+ t.string "command", limit: 2048
90
+ t.string "class_name"
91
+ t.text "arguments"
92
+ t.string "queue_name"
93
+ t.integer "priority", default: 0
94
+ t.boolean "static", default: true, null: false
95
+ t.text "description"
96
+ t.datetime "created_at", null: false
97
+ t.datetime "updated_at", null: false
98
+ t.index [ "key" ], name: "index_solid_queue_recurring_tasks_on_key", unique: true
99
+ t.index [ "static" ], name: "index_solid_queue_recurring_tasks_on_static"
100
+ end
101
+
102
+ create_table "solid_queue_scheduled_executions", force: :cascade do |t|
103
+ t.bigint "job_id", null: false
104
+ t.string "queue_name", null: false
105
+ t.integer "priority", default: 0, null: false
106
+ t.datetime "scheduled_at", null: false
107
+ t.datetime "created_at", null: false
108
+ t.index [ "job_id" ], name: "index_solid_queue_scheduled_executions_on_job_id", unique: true
109
+ t.index [ "scheduled_at", "priority", "job_id" ], name: "index_solid_queue_dispatch_all"
110
+ end
111
+
112
+ create_table "solid_queue_semaphores", force: :cascade do |t|
113
+ t.string "key", null: false
114
+ t.integer "value", default: 1, null: false
115
+ t.datetime "expires_at", null: false
116
+ t.datetime "created_at", null: false
117
+ t.datetime "updated_at", null: false
118
+ t.index [ "expires_at" ], name: "index_solid_queue_semaphores_on_expires_at"
119
+ t.index [ "key", "value" ], name: "index_solid_queue_semaphores_on_key_and_value"
120
+ t.index [ "key" ], name: "index_solid_queue_semaphores_on_key", unique: true
121
+ end
122
+
123
+ add_foreign_key "solid_queue_blocked_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade
124
+ add_foreign_key "solid_queue_claimed_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade
125
+ add_foreign_key "solid_queue_failed_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade
126
+ add_foreign_key "solid_queue_ready_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade
127
+ add_foreign_key "solid_queue_recurring_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade
128
+ add_foreign_key "solid_queue_scheduled_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade
129
+ end
data/demo/db/schema.rb ADDED
@@ -0,0 +1,48 @@
1
+ # This file is auto-generated from the current state of the database. Instead
2
+ # of editing this file, please use the migrations feature of Active Record to
3
+ # incrementally modify your database, and then regenerate this schema definition.
4
+ #
5
+ # This file is the source Rails uses to define your schema when running `bin/rails
6
+ # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
+ # be faster and is potentially less error prone than running all of your
8
+ # migrations from scratch. Old migrations may fail to apply correctly if those
9
+ # migrations use external dependencies or application code.
10
+ #
11
+ # It's strongly recommended that you check this file into your version control system.
12
+
13
+ ActiveRecord::Schema[8.1].define(version: 2026_02_16_124919) do
14
+ create_table "active_admin_comments", force: :cascade do |t|
15
+ t.integer "author_id"
16
+ t.string "author_type"
17
+ t.text "body"
18
+ t.datetime "created_at", null: false
19
+ t.string "namespace"
20
+ t.integer "resource_id"
21
+ t.string "resource_type"
22
+ t.datetime "updated_at", null: false
23
+ t.index ["author_type", "author_id"], name: "index_active_admin_comments_on_author"
24
+ t.index ["namespace"], name: "index_active_admin_comments_on_namespace"
25
+ t.index ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource"
26
+ end
27
+
28
+ create_table "articles", force: :cascade do |t|
29
+ t.text "body"
30
+ t.datetime "created_at", null: false
31
+ t.string "title"
32
+ t.datetime "updated_at", null: false
33
+ end
34
+
35
+ create_table "pages", force: :cascade do |t|
36
+ t.text "body"
37
+ t.datetime "created_at", null: false
38
+ t.string "title"
39
+ t.datetime "updated_at", null: false
40
+ end
41
+
42
+ create_table "posts", force: :cascade do |t|
43
+ t.text "body"
44
+ t.datetime "created_at", null: false
45
+ t.string "title"
46
+ t.datetime "updated_at", null: false
47
+ end
48
+ end
data/demo/db/seeds.rb ADDED
@@ -0,0 +1,9 @@
1
+ # This file should ensure the existence of records required to run the application in every environment (production,
2
+ # development, test). The code here should be idempotent so that it can be executed at any point in every environment.
3
+ # The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
4
+ #
5
+ # Example:
6
+ #
7
+ # ["Action", "Comedy", "Drama", "Horror"].each do |genre_name|
8
+ # MovieGenre.find_or_create_by!(name: genre_name)
9
+ # end
File without changes
data/demo/log/.keep ADDED
File without changes