Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 171
- Log:
Initial import of Beast 0.9 from downloaded Tarball. Beast is a Ruby
On Rails based forum application. The original tarball came from the
following location:http://s3.amazonaws.com/beast-forum/beast-0.9.tar.gz
The forum post which announced this version's availability was at:
http://beast.caboo.se/forums/1/topics/446
- Author:
- rool
- Date:
- Fri Mar 02 15:51:55 +0000 2007
- Size:
- 2602 Bytes
1 | ExceptionLogger |
2 | =============== |
3 | |
4 | The Exception Logger (forgive the horrible name) logs your Rails exceptions in the database and provides a funky web interface to manage them. |
5 | |
6 | First you need to generate the migration: |
7 | |
8 | ./script/generate exception_migration |
9 | |
10 | Next, you'll need to include the ExceptionLoggable module into ApplicationController. Once that's done you might want to modify key methods to customize the logging: |
11 | |
12 | render_404(exception) - Shows the 404 template. |
13 | |
14 | render_500(exception) - Shows the 500 template. |
15 | |
16 | log_exception(exception) - Logs the actual exception in the database. |
17 | |
18 | rescue_action_in_public(exception) - Does not log these exceptions: ActiveRecord::RecordNotFound, ActionController::UnknownController, ActionController::UnknownAction |
19 | |
20 | After that, visit /logged_exceptions in your application to manage the exceptions. |
21 | |
22 | It's understandable that you may want to require authentication. Add this to your config/environments/production.rb: |
23 | |
24 | # config/environments/production.rb |
25 | config.after_initialize do |
26 | require 'application' unless Object.const_defined?(:ApplicationController) |
27 | LoggedExceptionsController.class_eval do |
28 | # set the same session key as the app |
29 | session :session_key => '_beast_session_id' |
30 | |
31 | # include any custom auth modules you need |
32 | include AuthenticationSystem |
33 | |
34 | before_filter :login_required |
35 | |
36 | # optional, sets the application name for the rss feeds |
37 | self.application_name = "Beast" |
38 | |
39 | protected |
40 | # only allow admins |
41 | # this obviously depends on how your auth system works |
42 | def authorized? |
43 | current_user.is_a?(Admin) |
44 | end |
45 | |
46 | # assume app's login required doesn't use http basic |
47 | def login_required_with_basic |
48 | respond_to do |accepts| |
49 | # alias_method_chain will alias the app's login_required to login_required_without_basic |
50 | accepts.html { login_required_without_basic } |
51 | |
52 | # access_denied_with_basic_auth is defined in LoggedExceptionsController |
53 | # get_auth_data returns back the user/password pair |
54 | accepts.rss do |
55 | access_denied_with_basic_auth unless self.current_user = User.authenticate(*get_auth_data) |
56 | end |
57 | end |
58 | end |
59 | |
60 | alias_method_chain :login_required, :basic |
61 | end |
62 | end |
63 | |
64 | The exact code of course depends on the specific needs of your application. |
65 | |
66 | CREDITS |
67 | |
68 | Jamis Buck - original exception_notification plugin |
69 | Rick Olson - model/controller code |
70 | Josh Goebel - design |