rails_error_dashboard 0.1.3 → 0.1.5

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.5
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
@@ -296,6 +310,7 @@ files:
296
310
  - app/views/rails_error_dashboard/errors/index.html.erb
297
311
  - app/views/rails_error_dashboard/errors/overview.html.erb
298
312
  - app/views/rails_error_dashboard/errors/platform_comparison.html.erb
313
+ - app/views/rails_error_dashboard/errors/settings.html.erb
299
314
  - app/views/rails_error_dashboard/errors/show.html.erb
300
315
  - config/routes.rb
301
316
  - db/migrate/20251224000001_create_rails_error_dashboard_error_logs.rb
@@ -315,6 +330,7 @@ files:
315
330
  - lib/generators/rails_error_dashboard/install/templates/initializer.rb
316
331
  - lib/generators/rails_error_dashboard/solid_queue/solid_queue_generator.rb
317
332
  - lib/generators/rails_error_dashboard/solid_queue/templates/queue.yml
333
+ - lib/generators/rails_error_dashboard/uninstall/uninstall_generator.rb
318
334
  - lib/rails_error_dashboard.rb
319
335
  - lib/rails_error_dashboard/commands/batch_delete_errors.rb
320
336
  - lib/rails_error_dashboard/commands/batch_resolve_errors.rb
@@ -338,7 +354,9 @@ files:
338
354
  - lib/rails_error_dashboard/queries/error_correlation.rb
339
355
  - lib/rails_error_dashboard/queries/errors_list.rb
340
356
  - lib/rails_error_dashboard/queries/filter_options.rb
357
+ - lib/rails_error_dashboard/queries/mttr_stats.rb
341
358
  - lib/rails_error_dashboard/queries/platform_comparison.rb
359
+ - lib/rails_error_dashboard/queries/recurring_issues.rb
342
360
  - lib/rails_error_dashboard/queries/similar_errors.rb
343
361
  - lib/rails_error_dashboard/services/backtrace_parser.rb
344
362
  - lib/rails_error_dashboard/services/baseline_alert_throttler.rb
@@ -349,6 +367,7 @@ files:
349
367
  - lib/rails_error_dashboard/services/similarity_calculator.rb
350
368
  - lib/rails_error_dashboard/value_objects/error_context.rb
351
369
  - lib/rails_error_dashboard/version.rb
370
+ - lib/tasks/rails_error_dashboard_tasks.rake
352
371
  homepage: https://github.com/AnjanJ/rails_error_dashboard
353
372
  licenses:
354
373
  - MIT
@@ -370,7 +389,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
370
389
  - !ruby/object:Gem::Version
371
390
  version: '0'
372
391
  requirements: []
373
- rubygems_version: 3.7.2
392
+ rubygems_version: 3.6.9
374
393
  specification_version: 4
375
394
  summary: Self-hosted Rails error monitoring — free, forever. Zero SaaS fees, zero
376
395
  lock-in.