rails_exception_log 1.0.1 → 1.0.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: 1837d104081234ee91cf50d520158a47f3ada29bde03c70eab21b9fd87a3495b
4
- data.tar.gz: bc817c81266b7955a3026df62cc88f56391c58d9ab087cc5c8dc71a56a473df8
3
+ metadata.gz: c4183a841770842781604680724d9cd98c892263c4ac37803d9700e4d5351cb1
4
+ data.tar.gz: 563e8d0a60e595bec9c426363ea844c2fd1e2fd17cbd32a127b804ad3ac76a02
5
5
  SHA512:
6
- metadata.gz: bb0f43621afbdc225e1db51822573e33c8bee27260cfc5f9546cfa0bc710c899bb052c8e0e47bd55ff93578d099485ce042478ab257d22e6e9dad17f880361cc
7
- data.tar.gz: c11ac0b66730fa8741af48f007b197b604a3baae5535d5afd5363bc852d3c8af7af56c86320e69bb2844cadd1d5b8376808ca1c61de4761b8380ac537e3e6952
6
+ metadata.gz: be9ce4604010b52163e5eadf4d3b743fb1b69e168e49af1b1d13f7739811b5e084479ad00c07a0ea4bd692ef967e0c6d5d147b559158493417081b61141cbd5a
7
+ data.tar.gz: fca6c0ac8e54c8f02b7b266512129bc731bc447b324bc28874cbf07ec8124f72b7c359edac8d1f283754ad6791d8df8ba88530fe5dd3688e81da034fb4ac3251
@@ -59,31 +59,31 @@ module RailsExceptionLog
59
59
 
60
60
  def destroy
61
61
  @exception.destroy
62
- redirect_to '/exceptions',
62
+ redirect_to railsexceptionlog_exceptions_path,
63
63
  notice: 'Exception deleted successfully'
64
64
  end
65
65
 
66
66
  def resolve
67
67
  @exception.mark_resolved!
68
- redirect_to "/exceptions/#{@exception.id}",
68
+ redirect_to railsexceptionlog_exceptions_path,
69
69
  notice: 'Exception marked as resolved'
70
70
  end
71
71
 
72
72
  def reopen
73
73
  @exception.mark_open!
74
- redirect_to "/exceptions/#{@exception.id}",
74
+ redirect_to railsexceptionlog_exceptions_path,
75
75
  notice: 'Exception reopened'
76
76
  end
77
77
 
78
78
  def ignore
79
79
  @exception.update!(status: :ignored)
80
- redirect_to "/exceptions/#{@exception.id}",
80
+ redirect_to railsexceptionlog_exceptions_path,
81
81
  notice: 'Exception ignored'
82
82
  end
83
83
 
84
84
  def add_comment
85
85
  @exception.add_comment!(params[:comment], author: current_user_email)
86
- redirect_to "/exceptions/#{@exception.id}",
86
+ redirect_to railsexceptionlog_exceptions_path,
87
87
  notice: 'Comment added'
88
88
  end
89
89
 
@@ -93,7 +93,7 @@ module RailsExceptionLog
93
93
  else
94
94
  RailsExceptionLog::LoggedException.delete_all
95
95
  end
96
- redirect_to '/exceptions',
96
+ redirect_to railsexceptionlog_exceptions_path,
97
97
  notice: 'Exceptions cleared'
98
98
  end
99
99
 
data/config/routes.rb ADDED
@@ -0,0 +1,13 @@
1
+ RailsExceptionLog::Engine.routes.draw do
2
+ get '/', to: 'logged_exceptions#index', as: :railsexceptionlog_exceptions
3
+ get '/:id', to: 'logged_exceptions#show', as: :railsexceptionlog_exception
4
+ delete '/:id', to: 'logged_exceptions#destroy'
5
+ delete '/', to: 'logged_exceptions#destroy_all'
6
+ get '/export', to: 'logged_exceptions#export'
7
+
8
+ post '/:id/resolve', to: 'logged_exceptions#resolve', as: :resolve_railsexceptionlog_exception
9
+ post '/:id/reopen', to: 'logged_exceptions#reopen', as: :reopen_railsexceptionlog_exception
10
+ post '/:id/ignore', to: 'logged_exceptions#ignore', as: :ignore_railsexceptionlog_exception
11
+ post '/:id/add_comment', to: 'logged_exceptions#add_comment',
12
+ as: :add_comment_railsexceptionlog_exception
13
+ end
@@ -23,17 +23,3 @@ module RailsExceptionLog
23
23
  end
24
24
  end
25
25
  end
26
-
27
- RailsExceptionLog::Engine.routes.draw do
28
- get '/exceptions', to: 'logged_exceptions#index', as: :railsexceptionlog_exceptions
29
- get '/exceptions/:id', to: 'logged_exceptions#show', as: :railsexceptionlog_exception
30
- delete '/exceptions/:id', to: 'logged_exceptions#destroy'
31
- delete '/exceptions', to: 'logged_exceptions#destroy_all'
32
- get '/exceptions/export', to: 'logged_exceptions#export'
33
-
34
- post '/exceptions/:id/resolve', to: 'logged_exceptions#resolve', as: :resolve_railsexceptionlog_exception
35
- post '/exceptions/:id/reopen', to: 'logged_exceptions#reopen', as: :reopen_railsexceptionlog_exception
36
- post '/exceptions/:id/ignore', to: 'logged_exceptions#ignore', as: :ignore_railsexceptionlog_exception
37
- post '/exceptions/:id/add_comment', to: 'logged_exceptions#add_comment',
38
- as: :add_comment_railsexceptionlog_exception
39
- end
@@ -1,3 +1,3 @@
1
1
  module RailsExceptionLog
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_exception_log
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Tamiru Hailu\n "
@@ -91,6 +91,7 @@ files:
91
91
  - app/models/rails_exception_log/logged_exception.rb
92
92
  - app/views/rails_exception_log/logged_exceptions/index.html.erb
93
93
  - app/views/rails_exception_log/logged_exceptions/show.html.erb
94
+ - config/routes.rb
94
95
  - db/migrate/20240101000000_create_rails_exception_log_logged_exceptions.rb
95
96
  - lib/generators/rails_exception_log/install_generator.rb
96
97
  - lib/rails_exception_log.rb