Permalink
Browse files

beginning to update for rails 2.3.2.1

  • Loading branch information...
1 parent c4d5308 commit 081061e8f621679fe4140ea5e31473226141b195 activefx committed Mar 22, 2009
Showing with 36 additions and 1,042 deletions.
  1. +0 −3 .gitmodules
  2. +1 −1 README
  3. +0 −1 app/controllers/application_controller.rb
  4. +1 −0 config/boot.rb
  5. +9 −3 config/database.yml.sample
  6. +5 −1 config/environment.rb
  7. +9 −23 config/environments/production.rb
  8. +6 −0 config/environments/test.rb
  9. +0 −2 config/routes.rb
  10. +1 −1 vendor/plugins/auto_migrations
  11. +0 −80 vendor/plugins/exception_logger/README
  12. +0 −22 vendor/plugins/exception_logger/Rakefile
  13. +0 −48 vendor/plugins/exception_logger/assets/exception_logger.js
  14. +0 −307 vendor/plugins/exception_logger/assets/style.css
  15. +0 −14 vendor/plugins/exception_logger/generators/exception_migration/USAGE
  16. +0 −14 vendor/plugins/exception_logger/generators/exception_migration/exception_migration_generator.rb
  17. +0 −18 vendor/plugins/exception_logger/generators/exception_migration/templates/migration.rb
  18. +0 −7 vendor/plugins/exception_logger/init.rb
  19. +0 −1 vendor/plugins/exception_logger/install.rb
  20. +0 −73 vendor/plugins/exception_logger/lib/exception_loggable.rb
  21. +0 −67 vendor/plugins/exception_logger/lib/logged_exception.rb
  22. +0 −87 vendor/plugins/exception_logger/lib/logged_exceptions_controller.rb
  23. +0 −45 vendor/plugins/exception_logger/lib/logged_exceptions_helper.rb
  24. +0 −4 vendor/plugins/exception_logger/tasks/exception_logger_tasks.rake
  25. +0 −8 vendor/plugins/exception_logger/test/exception_logger_test.rb
  26. +0 −1 vendor/plugins/exception_logger/uninstall.rb
  27. +0 −55 vendor/plugins/exception_logger/views/logged_exceptions/_exceptions.rhtml
  28. +0 −8 vendor/plugins/exception_logger/views/logged_exceptions/_feed.rhtml
  29. +0 −29 vendor/plugins/exception_logger/views/logged_exceptions/_show.rhtml
  30. +0 −2 vendor/plugins/exception_logger/views/logged_exceptions/destroy.rjs
  31. +0 −2 vendor/plugins/exception_logger/views/logged_exceptions/destroy_all.rjs
  32. +0 −85 vendor/plugins/exception_logger/views/logged_exceptions/index.rhtml
  33. +0 −3 vendor/plugins/exception_logger/views/logged_exceptions/query.rjs
  34. +0 −20 vendor/plugins/exception_logger/views/logged_exceptions/query.rxml
  35. +0 −2 vendor/plugins/exception_logger/views/logged_exceptions/show.rjs
  36. +1 −1 vendor/plugins/permalink_fu
  37. +0 −1 vendor/plugins/pseudo_cursors
  38. +1 −1 vendor/plugins/restful_authentication
  39. +1 −1 vendor/plugins/will_paginate
  40. +1 −1 vendor/rails
View
@@ -28,9 +28,6 @@
[submodule "vendor/plugins/open_id_authentication"]
path = vendor/plugins/open_id_authentication
url = git://github.com/activefx/open_id_authentication.git
-[submodule "vendor/plugins/pseudo_cursors"]
- path = vendor/plugins/pseudo_cursors
- url = git://github.com/sml/pseudo_cursors.git
[submodule "vendor/plugins/footnotes"]
path = vendor/plugins/footnotes
url = git://github.com/activefx/rails-footnotes.git
View
2 README
@@ -46,7 +46,7 @@ CURRENT FEATURES
- UI Plugins
- custom-err-msg, permalink_fu, uberkit, will_paginate
- Debug Plugins
- - exception_logger, rails-footnotes, query_analyzer, query_stats, rows_logger
+ - rails-footnotes, query_analyzer, query_stats, rows_logger
- Development and Performance Plugins
- auto_migrations, pseudo_cursors
- Testing
@@ -7,7 +7,6 @@ class ApplicationController < ActionController::Base
include AuthenticatedSystem
# You can move this into a different controller, if you wish. This module gives you the require_role helpers, and others.
include RoleRequirementSystem
- include ExceptionLoggable
helper :all # include all helpers, all the time
View
@@ -44,6 +44,7 @@ class VendorBoot < Boot
def load_initializer
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
Rails::Initializer.run(:install_gem_spec_stubs)
+ Rails::GemDependency.add_frozen_gem_path
end
end
View
@@ -17,7 +17,9 @@
development:
adapter: mysql
encoding: utf8
- database: restful_authentication_tutorial_development
+ reconnect: true
+ database: sample_development
+ pool: 5
username: root
password:
socket: /var/run/mysqld/mysqld.sock
@@ -28,15 +30,19 @@ development:
test:
adapter: mysql
encoding: utf8
- database: restful_authentication_tutorial_test
+ reconnect: true
+ database: sample_test
+ pool: 5
username: root
password:
socket: /var/run/mysqld/mysqld.sock
production:
adapter: mysql
encoding: utf8
- database: restful_authentication_tutorial_production
+ reconnect: true
+ database: sample_production
+ pool: 5
username: root
password:
socket: /var/run/mysqld/mysqld.sock
View
@@ -6,7 +6,7 @@
# ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
@@ -77,6 +77,10 @@
# Activate observers that should always be running
# config.active_record.observers = :cacher, :garbage_collector
config.active_record.observers = :user_observer
+
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
+ # config.i18n.default_locale = :de
end
@@ -4,39 +4,25 @@
# Code is not reloaded between requests
config.cache_classes = true
-# Use a different logger for distributed setups
-# config.logger = SyslogLogger.new
-
# Full error reports are disabled and caching is turned on
config.action_controller.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.action_view.cache_template_loading = true
+# See everything in the log (default is :info)
+# config.log_level = :debug
+
+# Use a different logger for distributed setups
+# config.logger = SyslogLogger.new
+
# Use a different cache store in production
# config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and javascripts from an asset server
-# config.action_controller.asset_host = "http://assets.example.com"
+# config.action_controller.asset_host = "http://assets.example.com"
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
- config.after_initialize do
- require 'application' unless Object.const_defined?(:ApplicationController)
- LoggedExceptionsController.class_eval do
- # set the same session key as the app
- session :session_key => APP_CONFIG['settings']['session_key']
-
- # include any custom auth modules you need
- include AuthenticatedSystem
- include RoleRequirementSystem
-
- before_filter :login_required
- require_role :admin
-
- # optional, sets the application name for the rss feeds
- self.application_name = APP_CONFIG['settings']['name']
-
- end
- end
-
+# Enable threaded mode
+# config.threadsafe!
@@ -12,6 +12,7 @@
# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching = false
+config.action_view.cache_template_loading = true
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false
@@ -20,3 +21,8 @@
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
+
+# Use SQL instead of Active Record's schema dumper when creating the test database.
+# This is necessary if your schema can't be completely dumped by the schema dumper,
+# like if you have constraints or database-specific column types
+# config.active_record.schema_format = :sql
View
@@ -73,8 +73,6 @@
# See how all your routes lay out with "rake routes"
- map.logged_exceptions "logged_exceptions/:action/:id", :controller => "logged_exceptions"
-
# Install the default routes as the lowest priority.
#map.connect ':controller/:action/:id'
#map.connect ':controller/:action/:id.:format'
@@ -1,80 +0,0 @@
-ExceptionLogger
-===============
-
-The Exception Logger (forgive the horrible name) logs your Rails exceptions in the database and provides a funky web interface to manage them.
-
-First you need to generate the migration:
-
- ./script/generate exception_migration
-
-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:
-
- render_404(exception) - Shows the 404 template.
-
- render_500(exception) - Shows the 500 template.
-
- log_exception(exception) - Logs the actual exception in the database.
-
- rescue_action_in_public(exception) - Does not log these exceptions: ActiveRecord::RecordNotFound, ActionController::UnknownController, ActionController::UnknownAction
-
-Now add a new route to your routes.rb:
-
- map.connect "logged_exceptions/:action/:id", :controller => "logged_exceptions"
-
-After that, visit /logged_exceptions in your application to manage the exceptions.
-
-Once you have done that, open up the vendor/plugins/init.rb file and choose your pagination,
-supported options are will_paginate, paginating_find, and simple mysql based pagination (Uses LIMIT)
-The current default is none. To use the other options you need to uncomment the $PAGINATION_TYPE line
-and the require for that pagination, you should comment out what you won't use etc...
-
-It's understandable that you may want to require authentication. Add this to your config/environments/production.rb:
-
- # config/environments/production.rb
- config.after_initialize do
- require 'application' unless Object.const_defined?(:ApplicationController)
- LoggedExceptionsController.class_eval do
- # set the same session key as the app
- session :session_key => '_beast_session_id'
-
- # include any custom auth modules you need
- include AuthenticationSystem
-
- before_filter :login_required
-
- # optional, sets the application name for the rss feeds
- self.application_name = "Beast"
-
- protected
- # only allow admins
- # this obviously depends on how your auth system works
- def authorized?
- current_user.is_a?(Admin)
- end
-
- # assume app's login required doesn't use http basic
- def login_required_with_basic
- respond_to do |accepts|
- # alias_method_chain will alias the app's login_required to login_required_without_basic
- accepts.html { login_required_without_basic }
-
- # access_denied_with_basic_auth is defined in LoggedExceptionsController
- # get_auth_data returns back the user/password pair
- accepts.rss do
- access_denied_with_basic_auth unless self.current_user = User.authenticate(*get_auth_data)
- end
- end
- end
-
- alias_method_chain :login_required, :basic
- end
- end
-
-The exact code of course depends on the specific needs of your application.
-
-CREDITS
-
-Jamis Buck - original exception_notification plugin
-Rick Olson - model/controller code
-Josh Goebel - design
-Jason Knight - Pagination support, built on/inspired by Ryanb's willpaginate support.
@@ -1,22 +0,0 @@
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-desc 'Default: run unit tests.'
-task :default => :test
-
-desc 'Test the exception_logger plugin.'
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = true
-end
-
-desc 'Generate documentation for the exception_logger plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'ExceptionLogger'
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include('README')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
@@ -1,48 +0,0 @@
-ExceptionLogger = {
- filters: ['exception_names', 'controller_actions', 'date_ranges'],
- setPage: function(num) {
- $('page').value = num;
- $('query-form').onsubmit();
- },
-
- setFilter: function(context, name) {
- var filterName = context + '_filter'
- $(filterName).value = ($F(filterName) == name) ? '' : name;
- this.deselect(context, filterName);
- $('page').value = '1';
- $('query-form').onsubmit();
- },
-
- deselect: function(context, filterName) {
- $$('#' + context + ' a').each(function(a) {
- var value = $(filterName) ? $F(filterName) : null;
- a.className = (value && (a.getAttribute('title') == value || a.innerHTML == value)) ? 'selected' : '';
- });
- },
-
- deleteAll: function() {
- return Form.serialize('query-form') + '&' + $$('tr.exception').collect(function(tr) { return tr.getAttribute('id').gsub(/^\w+-/, ''); }).toQueryString('ids');
- }
-}
-
-Event.observe(window, 'load', function() {
- ExceptionLogger.filters.each(function(context) {
- $(context + '_filter').value = '';
- });
-});
-
-Object.extend(Array.prototype, {
- toQueryString: function(name) {
- return this.collect(function(item) { return name + "[]=" + encodeURIComponent(item) }).join('&');
- }
-});
-
-Ajax.Responders.register({
- onCreate: function() {
- if($('activity') && Ajax.activeRequestCount > 0) $('activity').visualEffect('appear', {duration:0.25});
- },
-
- onComplete: function() {
- if($('activity') && Ajax.activeRequestCount == 0) $('activity').visualEffect('fade', {duration:0.25});
- }
-});
Oops, something went wrong.

0 comments on commit 081061e

Please sign in to comment.