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:
- 2682 Bytes
1 | class LoggedExceptionsController < ActionController::Base |
2 | cattr_accessor :application_name |
3 | layout nil |
4 | |
5 | def index |
6 | @exception_names = LoggedException.find_exception_class_names |
7 | @controller_actions = LoggedException.find_exception_controllers_and_actions |
8 | query |
9 | end |
10 | |
11 | def query |
12 | conditions = [] |
13 | parameters = [] |
14 | unless params[:id].blank? |
15 | conditions << 'id = ?' |
16 | parameters << params[:id] |
17 | end |
18 | unless params[:query].blank? |
19 | conditions << 'message LIKE ?' |
20 | parameters << "%#{params[:query]}%" |
21 | end |
22 | unless params[:date_ranges_filter].blank? |
23 | conditions << 'created_at >= ?' |
24 | parameters << params[:date_ranges_filter].to_f.days.ago.utc |
25 | end |
26 | unless params[:exception_names_filter].blank? |
27 | conditions << 'exception_class = ?' |
28 | parameters << params[:exception_names_filter] |
29 | end |
30 | unless params[:controller_actions_filter].blank? |
31 | conditions << 'controller_name = ? AND action_name = ?' |
32 | parameters += params[:controller_actions_filter].split('/').collect(&:downcase) |
33 | end |
34 | @exception_pages, @exceptions = paginate :logged_exceptions, :order => 'created_at desc', :per_page => 30, |
35 | :conditions => conditions.empty? ? nil : parameters.unshift(conditions * ' and ') |
36 | |
37 | respond_to do |format| |
38 | format.html { redirect_to :action => 'index' unless action_name == 'index' } |
39 | format.js |
40 | format.rss { render :action => 'query.rxml' } |
41 | end |
42 | end |
43 | |
44 | def show |
45 | @exc = LoggedException.find params[:id] |
46 | end |
47 | |
48 | def destroy |
49 | LoggedException.destroy params[:id] |
50 | end |
51 | |
52 | def destroy_all |
53 | LoggedException.delete_all ['id in (?)', params[:ids]] unless params[:ids].blank? |
54 | query |
55 | end |
56 | |
57 | private |
58 | def access_denied_with_basic_auth |
59 | headers["Status"] = "Unauthorized" |
60 | headers["WWW-Authenticate"] = %(Basic realm="Web Password") |
61 | render :text => "Could't authenticate you", :status => '401 Unauthorized' |
62 | end |
63 | |
64 | # gets BASIC auth info |
65 | def get_auth_data |
66 | user, pass = '', '' |
67 | # extract authorisation credentials |
68 | if request.env.has_key? 'X-HTTP_AUTHORIZATION' |
69 | # try to get it where mod_rewrite might have put it |
70 | authdata = request.env['X-HTTP_AUTHORIZATION'].to_s.split |
71 | elsif request.env.has_key? 'HTTP_AUTHORIZATION' |
72 | # this is the regular location |
73 | authdata = request.env['HTTP_AUTHORIZATION'].to_s.split |
74 | end |
75 | |
76 | # at the moment we only support basic authentication |
77 | if authdata && authdata[0] == 'Basic' |
78 | user, pass = Base64.decode64(authdata[1]).split(':')[0..1] |
79 | end |
80 | return [user, pass] |
81 | end |
82 | end |