rails_error_dashboard 0.1.3 → 0.1.4

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.
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :rails_error_dashboard do
4
+ namespace :db do
5
+ desc "Drop all Rails Error Dashboard database tables (⚠️ DESTRUCTIVE - deletes all error data)"
6
+ task drop: :environment do
7
+ puts "\n"
8
+ puts "=" * 80
9
+ puts " ⚠️ Rails Error Dashboard - Drop Database Tables"
10
+ puts "=" * 80
11
+ puts "\n"
12
+
13
+ # List tables that will be dropped
14
+ tables_to_drop = [
15
+ "rails_error_dashboard_error_comments",
16
+ "rails_error_dashboard_error_occurrences",
17
+ "rails_error_dashboard_cascade_patterns",
18
+ "rails_error_dashboard_error_baselines",
19
+ "rails_error_dashboard_error_logs"
20
+ ]
21
+
22
+ existing_tables = tables_to_drop.select do |table|
23
+ ActiveRecord::Base.connection.table_exists?(table)
24
+ end
25
+
26
+ if existing_tables.empty?
27
+ puts "No Rails Error Dashboard tables found in the database."
28
+ puts "\n"
29
+ exit 0
30
+ end
31
+
32
+ puts "The following tables will be PERMANENTLY DELETED:"
33
+ existing_tables.each do |table|
34
+ record_count = ActiveRecord::Base.connection.execute("SELECT COUNT(*) FROM #{table}").first.values.first rescue 0
35
+ puts " • #{table} (#{record_count} records)"
36
+ end
37
+ puts "\n"
38
+ puts "⚠️ This action CANNOT be undone!"
39
+ puts "\n"
40
+
41
+ # Ask for confirmation
42
+ print "Type 'DELETE ALL DATA' to confirm: "
43
+ confirmation = $stdin.gets.chomp
44
+
45
+ if confirmation != "DELETE ALL DATA"
46
+ puts "\n"
47
+ puts "Cancelled. No tables were dropped."
48
+ puts "\n"
49
+ exit 0
50
+ end
51
+
52
+ puts "\n"
53
+ puts "Dropping tables..."
54
+
55
+ # Drop tables in reverse order (respects foreign keys)
56
+ dropped_count = 0
57
+ existing_tables.reverse.each do |table|
58
+ begin
59
+ ActiveRecord::Base.connection.drop_table(table, if_exists: true)
60
+ puts " ✓ Dropped #{table}"
61
+ dropped_count += 1
62
+ rescue => e
63
+ puts " ✗ Failed to drop #{table}: #{e.message}"
64
+ end
65
+ end
66
+
67
+ puts "\n"
68
+ puts "=" * 80
69
+ puts " ✅ Successfully dropped #{dropped_count} table(s)"
70
+ puts "=" * 80
71
+ puts "\n"
72
+ puts "Next steps:"
73
+ puts " 1. Remove gem 'rails_error_dashboard' from Gemfile"
74
+ puts " 2. Run: bundle install"
75
+ puts " 3. Remove initializer: config/initializers/rails_error_dashboard.rb"
76
+ puts " 4. Remove route from config/routes.rb"
77
+ puts " 5. Delete migration files: db/migrate/*rails_error_dashboard*.rb"
78
+ puts " 6. Restart your Rails server"
79
+ puts "\n"
80
+ puts "Or use the automated uninstaller:"
81
+ puts " rails generate rails_error_dashboard:uninstall"
82
+ puts "\n"
83
+ end
84
+ end
85
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_error_dashboard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anjan Jagirdar
@@ -65,6 +65,20 @@ dependencies:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
67
  version: '6.0'
68
+ - !ruby/object:Gem::Dependency
69
+ name: chartkick
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '5.0'
75
+ type: :runtime
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '5.0'
68
82
  - !ruby/object:Gem::Dependency
69
83
  name: httparty
70
84
  requirement: !ruby/object:Gem::Requirement
@@ -315,6 +329,7 @@ files:
315
329
  - lib/generators/rails_error_dashboard/install/templates/initializer.rb
316
330
  - lib/generators/rails_error_dashboard/solid_queue/solid_queue_generator.rb
317
331
  - lib/generators/rails_error_dashboard/solid_queue/templates/queue.yml
332
+ - lib/generators/rails_error_dashboard/uninstall/uninstall_generator.rb
318
333
  - lib/rails_error_dashboard.rb
319
334
  - lib/rails_error_dashboard/commands/batch_delete_errors.rb
320
335
  - lib/rails_error_dashboard/commands/batch_resolve_errors.rb
@@ -338,7 +353,9 @@ files:
338
353
  - lib/rails_error_dashboard/queries/error_correlation.rb
339
354
  - lib/rails_error_dashboard/queries/errors_list.rb
340
355
  - lib/rails_error_dashboard/queries/filter_options.rb
356
+ - lib/rails_error_dashboard/queries/mttr_stats.rb
341
357
  - lib/rails_error_dashboard/queries/platform_comparison.rb
358
+ - lib/rails_error_dashboard/queries/recurring_issues.rb
342
359
  - lib/rails_error_dashboard/queries/similar_errors.rb
343
360
  - lib/rails_error_dashboard/services/backtrace_parser.rb
344
361
  - lib/rails_error_dashboard/services/baseline_alert_throttler.rb
@@ -349,6 +366,7 @@ files:
349
366
  - lib/rails_error_dashboard/services/similarity_calculator.rb
350
367
  - lib/rails_error_dashboard/value_objects/error_context.rb
351
368
  - lib/rails_error_dashboard/version.rb
369
+ - lib/tasks/rails_error_dashboard_tasks.rake
352
370
  homepage: https://github.com/AnjanJ/rails_error_dashboard
353
371
  licenses:
354
372
  - MIT
@@ -370,7 +388,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
370
388
  - !ruby/object:Gem::Version
371
389
  version: '0'
372
390
  requirements: []
373
- rubygems_version: 3.7.2
391
+ rubygems_version: 3.6.9
374
392
  specification_version: 4
375
393
  summary: Self-hosted Rails error monitoring — free, forever. Zero SaaS fees, zero
376
394
  lock-in.