<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>config/initializers/tag_list_delimiter.rb</filename>
    </added>
    <added>
      <filename>generators/plugin_migration/plugin_migration_generator.rb</filename>
    </added>
    <added>
      <filename>generators/plugin_migration/templates/plugin_migration.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -140,7 +140,7 @@ module BaseHelper
             title += params[:type] ? params[:type].pluralize : :posts_photos_and_bookmarks.l
             title += ' (Related: ' + @related_tags.join(', ') + ')' if @related_tags
             title += ' | ' + app_base    
-            @canonical_url = tag_url(URI::encode(@tags_raw, /[\/.?#]/)) if @tags_raw
+            @canonical_url = tag_url(URI.escape(@tags_raw, /[\/.?#]/)) if @tags_raw
           else
           title = 'Showing tags &amp;raquo; ' + app_base + tagline            
 			  end</diff>
      <filename>app/helpers/base_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ require_dependency File.dirname(__FILE__) + '/../../plugins/acts_as_taggable_on_
 class Tag &lt; ActiveRecord::Base
   
   def to_param
-    URI::encode(self.name, /[\/.?#]/)    
+    URI.escape(self.name, /[\/.?#]/)    
   end
 
   def related_tags</diff>
      <filename>app/models/tag.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,6 @@
     .box
       %h3=&quot;Tags&quot;.l
       - tag_cloud @popular_tags, %w(nube1 nube2 nube3 nube4 nube5) do |name, css_class|
-        = link_to name, tag_path(URI::encode(name, /[\/.?#]/)), :class =&gt; css_class
+        = link_to name, tag_path(URI.escape(name, /[\/.?#]/)), :class =&gt; css_class
       %h6.all=link_to :all_tags.l, tags_path
 </diff>
      <filename>app/views/activities/index.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -8,5 +8,5 @@
   .box
     %h3=:tags.l
     - tag_cloud @popular_tags, %w(nube1 nube2 nube3 nube4 nube5) do |name, css_class|
-      = link_to name, tag_path(URI::encode(name, /[\/.?#]/)), :class =&gt; css_class
+      = link_to name, tag_path(URI.escape(name, /[\/.?#]/)), :class =&gt; css_class
     %h6.all=link_to :all_tags.l, tags_path
\ No newline at end of file</diff>
      <filename>app/views/shared/_footer_content.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -25,4 +25,4 @@
   .yui-b.box
     %h3= :browse_content_by_tags.l
     - tag_cloud @tags, %w(nube1 nube2 nube3 nube4 nube5) do |name, css_class|
-      = link_to name, tag_url(URI::encode(name, /[\/.?#]/)), :class =&gt; css_class
+      = link_to name, tag_url(name), :class =&gt; css_class</diff>
      <filename>app/views/tags/index.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,7 @@
       %ul
         - tag_cloud @related_tags, %w(nube1 nube2 nube3 nube4 nube5) do |name, css_class|
           - css_class = css_class + (name.eql?(params[:id]) ? &quot; selected&quot;: &quot;&quot;)
-          %li= link_to h(name), tag_path(URI::encode(name, /[\/.?#]/)), :class =&gt; css_class
+          %li= link_to h(name), tag_path(name), :class =&gt; css_class
       
       %h6.all= link_to :all_tags.l, tags_path
 
@@ -28,7 +28,7 @@
               %li
                 = link_to( truncate(post.display_title, :length =&gt; 75), user_post_path(post.user, post), :title =&gt; :by.l+&quot; #{post.user.login}&quot; )
                 %p.post_excerpt= truncate_words(post.post, 35, '...' )
-          %h6.all= link_to :all_posts_tagged.l(:tag_name =&gt; URI::encode(@tags_raw, /[\/.?#]/)), show_tag_type_path(:id =&gt; URI::encode(@tags_raw, /[\/.?#]/), :type =&gt; 'Post') unless params[:type]
+          %h6.all= link_to :all_posts_tagged.l(:tag_name =&gt; @tags_raw), show_tag_type_path(:id =&gt; @tags_raw, :type =&gt; 'Post') unless params[:type]
         -else 
           .box.first_alt.hfeed= render :partial =&gt; 'posts/post', :collection =&gt; @posts      
       
@@ -39,7 +39,7 @@
       %h3=:photos.l
       - @photos.each do |photo|
         = link_to image_tag(photo.public_filename(:thumb), :title =&gt; &quot;#{photo.description} (&quot;+:uploaded_by.l+&quot; #{photo.user.login})&quot;, :class =&gt; &quot;polaroid&quot;), user_photo_path(photo.user, photo)
-      %h6.all= link_to :all_photos_tagged.l(:tag_name =&gt; URI::encode(@tags_raw, /[\/.?#]/)), show_tag_type_path(:id =&gt; URI::encode(@tags_raw, /[\/.?#]/), :type =&gt; 'Photo') unless params[:type]
+      %h6.all= link_to :all_photos_tagged.l(:tag_name =&gt; @tags_raw), show_tag_type_path(:id =&gt; @tags_raw, :type =&gt; 'Photo') unless params[:type]
       
       
     - if @users.any?
@@ -47,7 +47,7 @@
         %h3=:users.l
         - @users.each do |user|
           = link_to image_tag(user.avatar_photo_url(:thumb), :class =&gt; &quot;polaroid&quot;), user_path(user), :title =&gt; user.login
-        %h6.all= link_to :all_users_tagged.l(:tag_name =&gt; URI::encode(@tags_raw, /[\/.?#]/)), show_tag_type_path(:id =&gt; URI::encode(@tags_raw, /[\/.?#]/), :type =&gt; 'User') unless params[:type]
+        %h6.all= link_to :all_users_tagged.l(:tag_name =&gt; @tags_raw), show_tag_type_path(:id =&gt; @tags_raw, :type =&gt; 'User') unless params[:type]
 
 
     - unless @clippings.empty?
@@ -56,7 +56,7 @@
         - @clippings.each do |clipping|
           %a{&quot;href&quot;=&gt;&quot;#{h user_clipping_url(clipping.user, clipping) }&quot;}
             %img.polaroid.clipping{&quot;src&quot;=&gt;&quot;#{h clipping.image_uri}&quot;, &quot;style&quot;=&gt;&quot;width:108px&quot;}
-        %h6.all= link_to :all_clippings_tagged.l(:tag_name =&gt; URI::encode(@tags_raw, /[\/.?#]/)), show_tag_type_path(:id =&gt; URI::encode(@tags_raw, /[\/.?#]/), :type =&gt; 'Clipping') unless params[:type]
+        %h6.all= link_to :all_clippings_tagged.l(:tag_name =&gt; @tags_raw), show_tag_type_path(:id =&gt; @tags_raw, :type =&gt; 'Clipping') unless params[:type]
 
     - if @pages
       .pagination= paginating_links @pages, :params =&gt; params if @pages.page_count &gt; 1</diff>
      <filename>app/views/tags/show.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -38,4 +38,33 @@ module ApplicationConfiguration
     
     AppConfig = OpenStruct.new merged_hash
   end
-end
\ No newline at end of file
+end
+
+
+#hack the desert plugin to allow generating plugin migrations
+Desert::Plugin.class_eval do
+  def latest_migration
+    migrations.last
+  end
+  
+  # Returns the version numbers of all migrations for this plugin.
+  def migrations
+    migrations = Dir[migration_path+&quot;/*.rb&quot;]
+    migrations.map { |p| File.basename(p).match(/0*(\d+)\_/)[1].to_i }.sort
+  end    
+end
+# Fix Desert's 'current_version' which tries to order by version desc, but version is a string type column, so it breaks
+# sort the rows in ruby instead to make sure we get the highest numbered version
+Desert::PluginMigrations::Migrator.class_eval do
+  class &lt;&lt; self
+    def current_version #:nodoc:
+      result = ActiveRecord::Base.connection.select_values(&quot;SELECT version FROM #{schema_migrations_table_name} WHERE plugin_name = '#{current_plugin.name}'&quot;).map(&amp;:to_i).sort.reverse[0]
+      if result
+        result
+      else
+        # There probably isn't an entry for this plugin in the migration info table.
+        0
+      end
+    end
+  end
+end</diff>
      <filename>init.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>config/initializers/taglist.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>72a9c69c6df8057836abf46914f812dd030f45ea</id>
    </parent>
  </parents>
  <author>
    <name>bborn</name>
    <email>bruno.bornsztein@gmail.com</email>
  </author>
  <url>http://github.com/bborn/communityengine/commit/7d76fe0b190eca7e4a69cfe9d0646ca97741f9d2</url>
  <id>7d76fe0b190eca7e4a69cfe9d0646ca97741f9d2</id>
  <committed-date>2009-04-18T11:33:45-07:00</committed-date>
  <authored-date>2009-04-18T11:33:45-07:00</authored-date>
  <message>add back some of Engines' plugin migration stuff</message>
  <tree>dd8f3af3505c31e7b4363d4f84624e51fe17ab63</tree>
  <committer>
    <name>bborn</name>
    <email>bruno.bornsztein@gmail.com</email>
  </committer>
</commit>
