Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add solid errors gem #7

Merged
merged 2 commits into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,5 @@ gem "rouge", "~> 4.2"
# analytics
gem "ahoy_matey"
gem "blazer"

gem "solid_errors", "~> 0.3.3"
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ GEM
sitepress-core (= 4.0.2)
sprockets-rails (>= 2.0.0)
smart_properties (1.17.0)
solid_errors (0.3.3)
rails (~> 7.0)
sorbet-runtime (0.5.11200)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -568,6 +570,7 @@ DEPENDENCIES
ruby-lsp-rails
selenium-webdriver
sitepress-rails (~> 4.0)
solid_errors (~> 0.3.3)
sqlite3 (~> 1.4)
standardrb (~> 1.0)
stimulus-rails
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
authenticate :admin do
mount Avo::Engine, at: Avo.configuration.root_path
mount Blazer::Engine, at: "blazer"
mount SolidErrors::Engine, at: "/solid_errors"
end

# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
Expand Down
25 changes: 25 additions & 0 deletions db/migrate/20240128210010_create_solid_errors_tables.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# frozen_string_literal: true

class CreateSolidErrorsTables < ActiveRecord::Migration[7.1]
def change
create_table :solid_errors do |t|
t.string :exception_class, null: false
t.string :message, null: false
t.string :severity, null: false
t.string :source
t.datetime :resolved_at, index: true

t.timestamps

t.index [:exception_class, :message, :severity, :source], unique: true, name: "solid_error_uniqueness_index"
end

create_table :solid_errors_occurrences do |t|
t.belongs_to :error, null: false, foreign_key: {to_table: :solid_errors}
t.text :backtrace
t.json :context

t.timestamps
end
end
end
24 changes: 23 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading