<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,5 @@
-* [#68] Removed const redefined warnings if mack-l10n is used along with mack-activerecord
+* [#90] Added deprecation system.
 * [#88] Implemented pending SQLite3 tests in mack-activerecord
-* [#68] Transactional support in mack-AR
 * [#87] Refactored out common ORM code from mack-active_record and mack-data_mapper into mack-orm
 * [#86] stylesheet link helper
 * [#85] Refactored out Mack::ViewHelpers::HtmlHelpers into Mack::ViewHelpers::HtmlHelpers, Mack::ViewHelpers::FormHelpers and
@@ -16,7 +15,9 @@
 * [#74] Added optional feature to disable initialization logging.
 * [#73] Tests no longer use the functional/unit directories
 * [#69] Added ViewHelperGenerator and ControllerHelperGenerator
+* [#68] Transactional support in mack-AR
 * [#67] Added test:setup tasks for active_record and data_mapper
+* [#62] Removed const redefined warnings if mack-l10n is used along with mack-activerecord
 * [#39] HAML 2.0.2 support
 * [#28] Refactored out encryption into the mack-encryption gem.
 * [#25] Added ControllerGenerator</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -5,8 +5,22 @@ module Kernel
     yield Mack::Utils::GemManager.instance
   end
   
-  def alias_deprecated_method(deprecated_method, new_method, version_deprecrated = nil, version_to_be_removed = nil) # :nodoc:
-    message = &quot;DEPRECATED: '#{deprecated_method}'. Please use '#{new_method}' instead.&quot;
+  # Aliases the deprecated method to the new method and logs a warning.
+  def alias_deprecated_method(deprecated_method, new_method, version_deprecrated = nil, version_to_be_removed = nil)
+    eval %{
+      def #{deprecated_method}(*args)
+        deprecate_method(:#{deprecated_method}, :#{new_method}, &quot;#{version_deprecrated}&quot;, &quot;#{version_to_be_removed}&quot;)
+        #{new_method}(*args)
+      end
+    }
+  end
+  
+  # Logs a warning that a method has been deprecated. Warnings will only get logged once.
+  def deprecate_method(deprecated_method, new_method = nil, version_deprecrated = nil, version_to_be_removed = nil)
+    message = &quot;DEPRECATED: '#{deprecated_method}'.&quot;
+    if new_method
+      message &lt;&lt; &quot; Please use '#{new_method}' instead.&quot;
+    end
     if version_deprecrated
       message &lt;&lt; &quot; Deprecated in version: '#{version_deprecrated}'.&quot;
       if version_to_be_removed.nil?
@@ -16,12 +30,14 @@ module Kernel
     if version_to_be_removed
       message &lt;&lt; &quot; To be removed in version: '#{version_to_be_removed}'.&quot;
     end
-    eval %{
-      def #{deprecated_method}(*args)
-        Mack.logger.warn(&quot;#{message}&quot;)
-        #{new_method}(*args)
-      end
-    }
+    unless Kernel::DeprecatedRegistryList.registered_items.include?(message)
+      Mack.logger.warn(message)
+      Kernel::DeprecatedRegistryList.add(message)
+    end
+  end
+  
+  private
+  class DeprecatedRegistryList &lt; Mack::Utils::RegistryList # :nodoc:
   end
   
 end
\ No newline at end of file</diff>
      <filename>lib/mack/core_extensions/kernel.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>da506c7eae535567f53b14254a8449e796d956f1</id>
    </parent>
  </parents>
  <author>
    <name>Mark Bates</name>
    <email>mark@markbates.com</email>
  </author>
  <url>http://github.com/markbates/mack/commit/650cf562ef808648221a2029f415c9f0e8329f30</url>
  <id>650cf562ef808648221a2029f415c9f0e8329f30</id>
  <committed-date>2008-08-15T08:18:47-07:00</committed-date>
  <authored-date>2008-08-15T08:18:47-07:00</authored-date>
  <message>Added deprecation system. [#90 state:resolved]</message>
  <tree>484d0fa3b474be4fcd92e3705df6c12fb8c90217</tree>
  <committer>
    <name>Mark Bates</name>
    <email>mark@markbates.com</email>
  </committer>
</commit>
