<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -66,7 +66,7 @@ module Synthesis
 
       def delete_all
         @@asset_packages_yml.keys.each do |asset_type|
-          @@asset_packages_yml[asset_type].each { |p| self.new(asset_type, p).delete_all_builds }
+          @@asset_packages_yml[asset_type].each { |p| self.new(asset_type, p).delete_previous_build }
         end
       end
 
@@ -102,7 +102,7 @@ module Synthesis
       @asset_path = ($asset_base_path ? &quot;#{$asset_base_path}/&quot; : &quot;#{RAILS_ROOT}/public/&quot;) +
           &quot;#{@asset_type}#{@target_dir.gsub(/^(.+)$/, '/\1')}&quot;
       @extension = get_extension
-      @match_regex = Regexp.new(&quot;\\A#{@target}_\\d+.#{@extension}\\z&quot;)
+      @match_regex = Regexp.new(&quot;\\A#{@target}_packaged.#{@extension}\\z&quot;)
     end
   
     def current_file
@@ -111,52 +111,24 @@ module Synthesis
     end
 
     def build
-      delete_old_builds
+      delete_previous_build
       create_new_build
     end
-  
-    def delete_old_builds
-      Dir.new(@asset_path).entries.delete_if { |x| ! (x =~ @match_regex) }.each do |x|
-        File.delete(&quot;#{@asset_path}/#{x}&quot;) unless x.index(revision.to_s)
-      end
-    end
 
-    def delete_all_builds
+    def delete_previous_build
       Dir.new(@asset_path).entries.delete_if { |x| ! (x =~ @match_regex) }.each do |x|
         File.delete(&quot;#{@asset_path}/#{x}&quot;)
       end
     end
 
     private
-      def revision
-        unless @revision
-          revisions = [1]
-          @sources.each do |source|
-            revisions &lt;&lt; get_file_revision(&quot;#{@asset_path}/#{source}.#{@extension}&quot;)
-          end
-          @revision = revisions.max
-        end
-        @revision
-      end
-  
-      def get_file_revision(path)
-        if File.exists?(path)
-          begin
-            `svn info #{path} 2&gt; /dev/null`[/Last Changed Rev: (.*?)\n/][/(\d+)/].to_i
-          rescue # use filename timestamp if not in subversion
-            File.mtime(path).to_i
-          end
-        else
-          0
-        end
-      end
-
       def create_new_build
-        if File.exists?(&quot;#{@asset_path}/#{@target}_#{revision}.#{@extension}&quot;)
-          log &quot;Latest version already exists: #{@asset_path}/#{@target}_#{revision}.#{@extension}&quot;
+        new_build_path = &quot;#{@asset_path}/#{@target}_packaged.#{@extension}&quot;
+        if File.exists?(new_build_path)
+          log &quot;Latest version already exists: #{new_build_path}&quot;
         else
-          File.open(&quot;#{@asset_path}/#{@target}_#{revision}.#{@extension}&quot;, &quot;w&quot;) {|f| f.write(compressed_file) }
-          log &quot;Created #{@asset_path}/#{@target}_#{revision}.#{@extension}&quot;
+          File.open(new_build_path, &quot;w&quot;) {|f| f.write(compressed_file) }
+          log &quot;Created #{new_build_path}&quot;
         end
       end
 
@@ -179,7 +151,7 @@ module Synthesis
 
       def compress_js(source)
         jsmin_path = &quot;#{RAILS_ROOT}/vendor/plugins/asset_packager/lib&quot;
-        tmp_path = &quot;#{RAILS_ROOT}/tmp/#{@target}_#{revision}&quot;
+        tmp_path = &quot;#{RAILS_ROOT}/tmp/#{@target}_packaged&quot;
       
         # write out to a temp file
         File.open(&quot;#{tmp_path}_uncompressed.js&quot;, &quot;w&quot;) {|f| f.write(source) }</diff>
      <filename>lib/synthesis/asset_package.rb</filename>
    </modified>
    <modified>
      <diff>@@ -38,44 +38,44 @@ class AssetPackagerTest &lt; Test::Unit::TestCase
   
   def test_delete_and_build
     Synthesis::AssetPackage.delete_all
-    js_package_names = Dir.new(&quot;#{$asset_base_path}/javascripts&quot;).entries.delete_if { |x| ! (x =~ /\A\w+_\d+.js/) }
-    css_package_names = Dir.new(&quot;#{$asset_base_path}/stylesheets&quot;).entries.delete_if { |x| ! (x =~ /\A\w+_\d+.css/) }
-    css_subdir_package_names = Dir.new(&quot;#{$asset_base_path}/stylesheets/subdir&quot;).entries.delete_if { |x| ! (x =~ /\A\w+_\d+.css/) }
+    js_package_names = Dir.new(&quot;#{$asset_base_path}/javascripts&quot;).entries.delete_if { |x| ! (x =~ /\A\w+_packaged.js/) }
+    css_package_names = Dir.new(&quot;#{$asset_base_path}/stylesheets&quot;).entries.delete_if { |x| ! (x =~ /\A\w+_packaged.css/) }
+    css_subdir_package_names = Dir.new(&quot;#{$asset_base_path}/stylesheets/subdir&quot;).entries.delete_if { |x| ! (x =~ /\A\w+_packaged.css/) }
     
     assert_equal 0, js_package_names.length
     assert_equal 0, css_package_names.length
     assert_equal 0, css_subdir_package_names.length
 
     Synthesis::AssetPackage.build_all
-    js_package_names = Dir.new(&quot;#{$asset_base_path}/javascripts&quot;).entries.delete_if { |x| ! (x =~ /\A\w+_\d+.js/) }.sort
-    css_package_names = Dir.new(&quot;#{$asset_base_path}/stylesheets&quot;).entries.delete_if { |x| ! (x =~ /\A\w+_\d+.css/) }.sort
-    css_subdir_package_names = Dir.new(&quot;#{$asset_base_path}/stylesheets/subdir&quot;).entries.delete_if { |x| ! (x =~ /\A\w+_\d+.css/) }.sort
+    js_package_names = Dir.new(&quot;#{$asset_base_path}/javascripts&quot;).entries.delete_if { |x| ! (x =~ /\A\w+_packaged.js/) }.sort
+    css_package_names = Dir.new(&quot;#{$asset_base_path}/stylesheets&quot;).entries.delete_if { |x| ! (x =~ /\A\w+_packaged.css/) }.sort
+    css_subdir_package_names = Dir.new(&quot;#{$asset_base_path}/stylesheets/subdir&quot;).entries.delete_if { |x| ! (x =~ /\A\w+_packaged.css/) }.sort
     
     assert_equal 2, js_package_names.length
     assert_equal 2, css_package_names.length
     assert_equal 1, css_subdir_package_names.length
-    assert js_package_names[0].match(/\Abase_\d+.js\z/)
-    assert js_package_names[1].match(/\Asecondary_\d+.js\z/)
-    assert css_package_names[0].match(/\Abase_\d+.css\z/)
-    assert css_package_names[1].match(/\Asecondary_\d+.css\z/)
-    assert css_subdir_package_names[0].match(/\Astyles_\d+.css\z/)
+    assert js_package_names[0].match(/\Abase_packaged.js\z/)
+    assert js_package_names[1].match(/\Asecondary_packaged.js\z/)
+    assert css_package_names[0].match(/\Abase_packaged.css\z/)
+    assert css_package_names[1].match(/\Asecondary_packaged.css\z/)
+    assert css_subdir_package_names[0].match(/\Astyles_packaged.css\z/)
   end
   
   def test_js_names_from_sources
     package_names = Synthesis::AssetPackage.targets_from_sources(&quot;javascripts&quot;, [&quot;prototype&quot;, &quot;effects&quot;, &quot;noexist1&quot;, &quot;controls&quot;, &quot;foo&quot;, &quot;noexist2&quot;])
     assert_equal 4, package_names.length
-    assert package_names[0].match(/\Abase_\d+\z/)
+    assert package_names[0].match(/\Abase_packaged\z/)
     assert_equal package_names[1], &quot;noexist1&quot;
-    assert package_names[2].match(/\Asecondary_\d+\z/)
+    assert package_names[2].match(/\Asecondary_packaged\z/)
     assert_equal package_names[3], &quot;noexist2&quot;
   end
   
   def test_css_names_from_sources
     package_names = Synthesis::AssetPackage.targets_from_sources(&quot;stylesheets&quot;, [&quot;header&quot;, &quot;screen&quot;, &quot;noexist1&quot;, &quot;foo&quot;, &quot;noexist2&quot;])
     assert_equal 4, package_names.length
-    assert package_names[0].match(/\Abase_\d+\z/)
+    assert package_names[0].match(/\Abase_packaged\z/)
     assert_equal package_names[1], &quot;noexist1&quot;
-    assert package_names[2].match(/\Asecondary_\d+\z/)
+    assert package_names[2].match(/\Asecondary_packaged\z/)
     assert_equal package_names[3], &quot;noexist2&quot;
   end
   </diff>
      <filename>test/asset_packager_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4cc35c875b292e6e20aaaea9cf9215aee64875af</id>
    </parent>
  </parents>
  <author>
    <name>Scott Becker</name>
    <email>becker.scott@gmail.com</email>
  </author>
  <url>http://github.com/sbecker/asset_packager/commit/e4a45e4134998ee871852f675dc54fb807fd15ee</url>
  <id>e4a45e4134998ee871852f675dc54fb807fd15ee</id>
  <committed-date>2008-11-30T00:00:27-08:00</committed-date>
  <authored-date>2008-11-30T00:00:27-08:00</authored-date>
  <message>remove svn revision muck. just name packages &quot;&lt;name&gt;_packaged.js&quot; (or css) since we have gone back to using rails query-string based timestamping. Bonus: compatible with git, and every other source control system!</message>
  <tree>fb872554e4ef778d435841a2a048fcc69d385812</tree>
  <committer>
    <name>Scott Becker</name>
    <email>becker.scott@gmail.com</email>
  </committer>
</commit>
