solid_errors 0.2.1 → 0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 509ba91aaa45d6edaf9918a6f9d0de411e0870d4342f6aeaa41bbe6fea4b0610
4
- data.tar.gz: 11745536969906ac0f57a1e473b69d5d005e856ab416b5a5a91eaceed6bdbdc2
3
+ metadata.gz: 760689e543a0af0e87d8998ddcbb6f94611a5b9da8ad2b9d2a7fc11da1ceaa27
4
+ data.tar.gz: 83ecabee79fb2ffe3572922e6b97b1a6895b935ec491d0df9d858632cae8d4c2
5
5
  SHA512:
6
- metadata.gz: f80084195a84102dbabccc585486d1dd6754aa339d522d5d204ea1c3b6b63b7f0fe57a4f36cac9cfbcd9bb3b2dec85612d99c86506f651960ad6b667b1b58967
7
- data.tar.gz: d5244b25271c162e7db7b2ec41634bf4d38c27a185e255ba8076973c63c68ab5a6dae5683933084a9cefb1edff06e1b03e61ab426e3915d5949e4f30699beb61
6
+ metadata.gz: 40cf2bebf1c854caf6bce78db0b99e03a4a3e05b12fe5ccc254d2cfd0448b924610bee0bc7306237fac7ce09d48c93423ed5299cf82481d96e2fa145648d5965
7
+ data.tar.gz: b87fc4639cd99f4e326dd8bbc37c8c5d613209b83c5286f25bdd8f1f30d07d13e5ba6b4ad6e1419e4f57074124ef0feba78a5583622114bd01b9a0aef2069b3b
@@ -0,0 +1,23 @@
1
+ class CreateSolidErrorsTables < ActiveRecord::Migration[7.1]
2
+ def change
3
+ create_table :errors do |t|
4
+ t.string :exception_class, null: false
5
+ t.string :message, null: false
6
+ t.string :severity, null: false
7
+ t.string :source
8
+ t.datetime :resolved_at, index: true
9
+
10
+ t.timestamps
11
+
12
+ t.index [:exception_class, :message, :severity, :source], unique: true
13
+ end
14
+
15
+ create_table :occurrences do |t|
16
+ t.belongs_to :error, null: false, foreign_key: true
17
+ t.text :backtrace
18
+ t.json :context
19
+
20
+ t.timestamps
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,8 @@
1
+ Description:
2
+ Installs solid_errors as a Rails error subscriber
3
+
4
+ Example:
5
+ bin/rails generate solid_errors:install
6
+
7
+ This will perform the following:
8
+ Installs solid_errors migrations
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ class SolidErrors::InstallGenerator < Rails::Generators::Base
4
+ source_root File.expand_path("templates", __dir__)
5
+
6
+ class_option :skip_migrations, type: :boolean, default: nil, desc: "Skip migrations"
7
+
8
+ def create_migrations
9
+ unless options[:skip_migrations]
10
+ rails_command "railties:install:migrations FROM=solid_errors", inline: true
11
+ end
12
+ end
13
+ end
@@ -4,10 +4,6 @@ module SolidErrors
4
4
  class Engine < ::Rails::Engine
5
5
  isolate_namespace SolidErrors
6
6
 
7
- rake_tasks do
8
- load "solid_errors/tasks.rb"
9
- end
10
-
11
7
  config.solid_errors = ActiveSupport::OrderedOptions.new
12
8
 
13
9
  initializer "solid_errors.config" do
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidErrors
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solid_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Margheim
@@ -45,6 +45,9 @@ files:
45
45
  - app/views/solid_errors/occurrences/_collection.html.erb
46
46
  - app/views/solid_errors/occurrences/_occurrence.html.erb
47
47
  - config/routes.rb
48
+ - db/migrate/20240112191645_create_solid_errors_tables.rb
49
+ - lib/generators/solid_errors/install/USAGE
50
+ - lib/generators/solid_errors/install/install_generator.rb
48
51
  - lib/solid_errors.rb
49
52
  - lib/solid_errors/backtrace.rb
50
53
  - lib/solid_errors/backtrace_line.rb