From e0a7e0fec760ba12c8067a37e10c96f1f05876e2 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 24 Jun 2026 04:13:16 +0200 Subject: Stage 1 complete: Rails 2.3.5 to Rails 3.2.22.5 upgrade - Converted plugins to gems (Gemfile) - Updated config structure (application.rb, boot.rb, environment.rb) - Converted routes to Rails 3 DSL - Converted named_scope to scope throughout models - Converted find(:all, :conditions) to where() chains - Fixed has_many :order to use ordering scope - Updated session store and secret token configuration - Fixed exception_notification middleware configuration - Patched Ruby 2.4 / Rails 3.2 incompatibilities: - Integer/Float duration arithmetic (ActiveSupport) - Arel visit_Integer for PostgreSQL adapter - create_database String/Integer coercion - ActionController consider_all_requests_local - Migrated taggings schema for acts-as-taggable-on - Replaced dynamic_form gem with custom form_error_messages helper - Fixed Rails 3 block helper syntax (form_for, form_tag, fields_for) - Fixed admin layout yield - Updated test suite for Rails 3 APIs --- .../lib/exception_notifier_helper.rb | 78 ---------------------- 1 file changed, 78 deletions(-) delete mode 100644 vendor/plugins/exception_notification/lib/exception_notifier_helper.rb (limited to 'vendor/plugins/exception_notification/lib/exception_notifier_helper.rb') diff --git a/vendor/plugins/exception_notification/lib/exception_notifier_helper.rb b/vendor/plugins/exception_notification/lib/exception_notifier_helper.rb deleted file mode 100644 index d3dc63ab..00000000 --- a/vendor/plugins/exception_notification/lib/exception_notifier_helper.rb +++ /dev/null @@ -1,78 +0,0 @@ -require 'pp' - -# Copyright (c) 2005 Jamis Buck -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -module ExceptionNotifierHelper - VIEW_PATH = "views/exception_notifier" - APP_PATH = "#{RAILS_ROOT}/app/#{VIEW_PATH}" - PARAM_FILTER_REPLACEMENT = "[FILTERED]" - - def render_section(section) - RAILS_DEFAULT_LOGGER.info("rendering section #{section.inspect}") - summary = render_overridable(section).strip - unless summary.blank? - title = render_overridable(:title, :locals => { :title => section }).strip - "#{title}\n\n#{summary.gsub(/^/, " ")}\n\n" - end - end - - def render_overridable(partial, options={}) - if File.exist?(path = "#{APP_PATH}/_#{partial}.rhtml") - render(options.merge(:file => path, :use_full_path => false)) - elsif File.exist?(path = "#{File.dirname(__FILE__)}/../#{VIEW_PATH}/_#{partial}.rhtml") - render(options.merge(:file => path, :use_full_path => false)) - else - "" - end - end - - def inspect_model_object(model, locals={}) - render_overridable(:inspect_model, - :locals => { :inspect_model => model, - :show_instance_variables => true, - :show_attributes => true }.merge(locals)) - end - - def inspect_value(value) - len = 512 - result = object_to_yaml(value).gsub(/\n/, "\n ").strip - result = result[0,len] + "... (#{result.length-len} bytes more)" if result.length > len+20 - result - end - - def object_to_yaml(object) - object.to_yaml.sub(/^---\s*/m, "") - end - - def exclude_raw_post_parameters? - @controller && @controller.respond_to?(:filter_parameters) - end - - def filter_sensitive_post_data_parameters(parameters) - exclude_raw_post_parameters? ? @controller.__send__(:filter_parameters, parameters) : parameters - end - - def filter_sensitive_post_data_from_env(env_key, env_value) - return env_value unless exclude_raw_post_parameters? - return PARAM_FILTER_REPLACEMENT if (env_key =~ /RAW_POST_DATA/i) - return @controller.__send__(:filter_parameters, {env_key => env_value}).values[0] - end -end -- cgit v1.3