<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -46,10 +46,14 @@ class BundleFu::FileList
   
   def add_files(filenames=[])
     filenames.each{|filename|
-      self.filelist &lt;&lt; [ filename, (File.mtime(abs_location(filename)).to_i rescue 0) ]
+      self.filelist &lt;&lt; [ extract_filename_from_url(filename), (File.mtime(abs_location(filename)).to_i rescue 0) ]
     }
   end
   
+  def extract_filename_from_url(url)
+    url.gsub(/^https?:\/\/[^\/]+/i, '')
+  end
+  
   def save_as(filename)
     File.open(filename, &quot;wb&quot;) {|f| f.puts Marshal.dump(self.filelist)}
   end</diff>
      <filename>lib/bundle_fu/file_list.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,223 +1,228 @@
-require File.join(File.dirname(__FILE__), '../test_helper.rb')
-
-require &quot;test/unit&quot;
-
-# require &quot;library_file_name&quot;
-
-class BundleFuTest &lt; Test::Unit::TestCase
-  def setup
-    @mock_view = MockView.new
-    BundleFu.init # resets BundleFu
-  end
-  
-  def teardown
-    purge_cache
-  end
-  
-  def test__bundle_js_files__should_include_js_content
-    @mock_view.bundle { @@content_include_all }
-    
-    assert_public_files_match(&quot;/javascripts/cache/bundle.js&quot;, &quot;function js_1()&quot;)
-  end
-  
-  def test__bundle_js_files__should_use_packr
-    Object.send :class_eval, &lt;&lt;EOF
-    class ::Object::Packr
-      def initialize
-      end
-      
-      def pack(content, options={})
-        &quot;PACKR!&quot; + options.inspect
-      end
-      
-    end
-EOF
-    
-    @mock_view.bundle() { @@content_include_all }
-    assert_public_files_match(&quot;/javascripts/cache/bundle.js&quot;, &quot;PACKR&quot;)
-    purge_cache
-    
-    @mock_view.bundle(:packr_options =&gt; {:packr_options_here =&gt; &quot;hi_packr&quot;}) { @@content_include_all }
-    assert_public_files_match(&quot;/javascripts/cache/bundle.js&quot;, &quot;packr_options_here&quot;, &quot;Should include packr_options&quot;)
-    
-    
-    Object.send :remove_const, &quot;Packr&quot;
-    
-  end
-  
-  def test__bundle_js_files__should_default_to_not_compressed_and_include_override_option
-    @mock_view.bundle() { @@content_include_all }
-    default_content = File.read(public_file(&quot;/javascripts/cache/bundle.js&quot;))
-    purge_cache
-    
-    @mock_view.bundle(:compress =&gt; false) { @@content_include_all }
-    uncompressed_content = File.read(public_file(&quot;/javascripts/cache/bundle.js&quot;))
-    purge_cache
-    
-    @mock_view.bundle(:compress =&gt; true) { @@content_include_all }
-    compressed_content = File.read(public_file(&quot;/javascripts/cache/bundle.js&quot;))
-    purge_cache
-    
-    assert default_content.length == compressed_content.length, &quot;Should default to compressed&quot;
-    assert uncompressed_content.length &gt; compressed_content.length, &quot;Didn't compress the content. (:compress =&gt; true) #{compressed_content.length}.  (:compress =&gt; false) #{uncompressed_content.length}&quot;
-  end
-  
-  def test__content_remains_same__shouldnt_refresh_cache
-    @mock_view.bundle { @@content_include_some }
-    
-    # check to see each bundle file exists and append some text to the bottom of each file
-    append_to_public_files(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
-    
-    assert_public_files_match(&quot;/javascripts/cache/bundle.js&quot;, &quot;BOGUS&quot;)
-    assert_public_files_match(&quot;/stylesheets/cache/bundle.css&quot;, &quot;BOGUS&quot;)
-    
-    @mock_view.bundle { @@content_include_some }
-    
-    assert_public_files_match(&quot;/javascripts/cache/bundle.js&quot;, &quot;BOGUS&quot;)
-    assert_public_files_match(&quot;/stylesheets/cache/bundle.css&quot;, &quot;BOGUS&quot;)
-  end
-  
-  def test__content_changes__should_refresh_cache
-    @mock_view.bundle { @@content_include_some }
-    
-    # check to see each bundle file exists and append some text to the bottom of each file
-    append_to_public_files(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
-    assert_public_files_match(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
-    
-    # now, pass in some new content.  Make sure that the css/js files are regenerated
-    @mock_view.bundle { @@content_include_all }
-    assert_public_files_no_match(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
-    assert_public_files_no_match(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
-  end
-  
-  def test__modified_time_differs_from_file__should_refresh_cache
-    @mock_view.bundle { @@content_include_some }
-    # we're gonna hack each of them and set all the modified times to 0
-    cache_files(&quot;bundle&quot;).each{|filename|
-      abs_filelist_path = public_file(filename + &quot;.filelist&quot;)
-      b = BundleFu::FileList.open(abs_filelist_path)
-      b.filelist.each{|entry| entry[1] = entry[1] - 100 }
-      b.save_as(abs_filelist_path)
-    }
-    
-    append_to_public_files(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
-  end
-  
-  def test__content_remains_same_but_cache_files_dont_match_whats_in_content__shouldnt_refresh_cache
-    # it shouldnt parse the content unless if it differed from the last request.  This scenario should never exist, and if it did it would be fixed when the server reboots.
-    @mock_view.bundle { @@content_include_some }
-    abs_filelist_path = public_file(&quot;/stylesheets/cache/bundle.css.filelist&quot;)
-    b = BundleFu::FileList.open(abs_filelist_path)
-    
-    @mock_view.bundle { @@content_include_all }
-    b.save_as(abs_filelist_path)
-    append_to_public_files(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
-    
-    @mock_view.bundle { @@content_include_all }
-    assert_public_files_match(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
-    
-  end
-  
-  def test__content_differs_slightly_but_cache_files_match__shouldnt_refresh_cache
-    @mock_view.bundle { @@content_include_all }
-    append_to_public_files(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
-    @mock_view.bundle { @@content_include_all + &quot;  &quot; }
-    assert_public_files_match(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
-  end
-  
-  def test__bundle__js_only__should_output_js_include_statement
-    @mock_view.bundle { @@content_include_some.split(&quot;\n&quot;).first }
-    lines = @mock_view.output.split(&quot;\n&quot;)
-    assert_equal(1, lines.length)
-    assert_match(/javascripts/, lines.first)
-  end
-  
-  def test__bundle__css_only__should_output_css_include_statement
-    @mock_view.bundle { @@content_include_some.split(&quot;\n&quot;)[2] }
-    lines = @mock_view.output.split(&quot;\n&quot;)
-    
-    assert_equal(1, lines.length)
-    assert_match(/stylesheets/, lines.first)
-    
-  end
-  
-  def test__nonexisting_file__should_use_blank_file_created_at_0_mtime
-#    dbg
-    @mock_view.bundle { %q{&lt;script src=&quot;/javascripts/non_existing_file.js?1000&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;} } 
-    
-    assert_public_files_match(cache_files(&quot;bundle&quot;).grep(/javascripts/), &quot;FILE READ ERROR&quot;)
-    
-    filelist = BundleFu::FileList.open(public_file(&quot;/javascripts/cache/bundle.js.filelist&quot;))
-    assert_equal(0, filelist.filelist[0][1], &quot;mtime for first file should be 0&quot;)
-  end
-  
-  def test__missing_cache_filelist__should_regenerate
-    @mock_view.bundle { @@content_include_some }
-    append_to_public_files(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
-    
-    # now delete the cache files
-    Dir[ public_file(&quot;**/*.filelist&quot;)].each{|filename| FileUtils.rm_f filename }
-    @mock_view.bundle { @@content_include_some }
-    assert_public_files_no_match(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;, &quot;Should have regenerated the file, but it didn't&quot;)
-  end
-  
-  def test__bypass__should_generate_files_but_render_normal_output
-    @mock_view.bundle(:bypass =&gt; true) { @@content_include_some }
-    assert_public_file_exists(&quot;/stylesheets/cache/bundle.css&quot;)
-    assert_public_file_exists(&quot;/stylesheets/cache/bundle.css.filelist&quot;)
-    
-    assert_equal(@@content_include_some, @mock_view.output)
-  end
-  
-  def test__bypass_param_set__should_honor_and_store_in_session
-    @mock_view.params[:bundle_fu] = &quot;false&quot;
-    @mock_view.bundle { @@content_include_some }
-    assert_equal(@@content_include_some, @mock_view.output)
-    
-    @mock_view.params.delete(:bundle_bypass)
-    @mock_view.bundle { @@content_include_some }
-    assert_equal(@@content_include_some*2, @mock_view.output)
-  end
-  
-private
-  
-  def purge_cache
-    # remove all fixtures named &quot;bundle*&quot;
-    Dir[ public_file(&quot;**/cache&quot;) ].each{|filename| FileUtils.rm_rf filename }
-  end
-  
-  def assert_public_file_exists(filename, message=nil)
-    assert_file_exists(public_file(filename), message)
-  end
-  
-  def assert_file_exists(filename, message=nil)
-    assert(File.exists?(filename), message || &quot;File #{filename} expected to exist, but didnt.&quot;)
-  end
-  
-  def assert_public_files_match(filenames, needle, message=nil)
-    filenames.each{|filename|
-      assert_public_file_exists(filename)
-      assert_match(needle.to_regexp, File.read(public_file(filename)), message || &quot;expected #{filename} to match #{needle}, but doesn't.&quot;)
-    }
-  end
-  
-  def assert_public_files_no_match(filenames, needle, message=nil)
-    filenames.each{ |filename|
-      assert_public_file_exists(filename)
-      assert_no_match(needle.to_regexp, File.read(public_file(filename)), message || &quot;expected #{filename} to not match #{needle}, but does.&quot;)
-    }
-  end
-  
-  def cache_files(name)
-    [&quot;/javascripts/cache/#{name}.js&quot;, &quot;/stylesheets/cache/#{name}.css&quot;]
-  end
-
-  def append_to_public_files(filenames, content)
-    for filename in filenames
-      assert_public_file_exists(filename)
-      File.open(public_file(filename), &quot;a&quot;) {|f|
-        f.puts(content)
-      }
-    end
-  end  
+require File.join(File.dirname(__FILE__), '../test_helper.rb')
+
+require &quot;test/unit&quot;
+
+# require &quot;library_file_name&quot;
+
+class BundleFuTest &lt; Test::Unit::TestCase
+  def setup
+    @mock_view = MockView.new
+    BundleFu.init # resets BundleFu
+  end
+  
+  def teardown
+    purge_cache
+  end
+  
+  def test__bundle_js_files__should_include_js_content
+    @mock_view.bundle { @@content_include_all }
+    
+    assert_public_files_match(&quot;/javascripts/cache/bundle.js&quot;, &quot;function js_1()&quot;)
+  end
+  
+  def test__bundle_js_files_with_asset_server_url
+    @mock_view.bundle { %(&lt;script src=&quot;https://assets.server.com/javascripts/js_1.js?1000&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;) }
+    assert_public_files_match(&quot;/javascripts/cache/bundle.js&quot;, &quot;function js_1()&quot;)
+  end
+  
+  def test__bundle_js_files__should_use_packr
+    Object.send :class_eval, &lt;&lt;EOF
+    class ::Object::Packr
+      def initialize
+      end
+      
+      def pack(content, options={})
+        &quot;PACKR!&quot; + options.inspect
+      end
+      
+    end
+EOF
+    
+    @mock_view.bundle() { @@content_include_all }
+    assert_public_files_match(&quot;/javascripts/cache/bundle.js&quot;, &quot;PACKR&quot;)
+    purge_cache
+    
+    @mock_view.bundle(:packr_options =&gt; {:packr_options_here =&gt; &quot;hi_packr&quot;}) { @@content_include_all }
+    assert_public_files_match(&quot;/javascripts/cache/bundle.js&quot;, &quot;packr_options_here&quot;, &quot;Should include packr_options&quot;)
+    
+    
+    Object.send :remove_const, &quot;Packr&quot;
+    
+  end
+  
+  def test__bundle_js_files__should_default_to_not_compressed_and_include_override_option
+    @mock_view.bundle() { @@content_include_all }
+    default_content = File.read(public_file(&quot;/javascripts/cache/bundle.js&quot;))
+    purge_cache
+    
+    @mock_view.bundle(:compress =&gt; false) { @@content_include_all }
+    uncompressed_content = File.read(public_file(&quot;/javascripts/cache/bundle.js&quot;))
+    purge_cache
+    
+    @mock_view.bundle(:compress =&gt; true) { @@content_include_all }
+    compressed_content = File.read(public_file(&quot;/javascripts/cache/bundle.js&quot;))
+    purge_cache
+    
+    assert default_content.length == compressed_content.length, &quot;Should default to compressed&quot;
+    assert uncompressed_content.length &gt; compressed_content.length, &quot;Didn't compress the content. (:compress =&gt; true) #{compressed_content.length}.  (:compress =&gt; false) #{uncompressed_content.length}&quot;
+  end
+  
+  def test__content_remains_same__shouldnt_refresh_cache
+    @mock_view.bundle { @@content_include_some }
+    
+    # check to see each bundle file exists and append some text to the bottom of each file
+    append_to_public_files(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
+    
+    assert_public_files_match(&quot;/javascripts/cache/bundle.js&quot;, &quot;BOGUS&quot;)
+    assert_public_files_match(&quot;/stylesheets/cache/bundle.css&quot;, &quot;BOGUS&quot;)
+    
+    @mock_view.bundle { @@content_include_some }
+    
+    assert_public_files_match(&quot;/javascripts/cache/bundle.js&quot;, &quot;BOGUS&quot;)
+    assert_public_files_match(&quot;/stylesheets/cache/bundle.css&quot;, &quot;BOGUS&quot;)
+  end
+  
+  def test__content_changes__should_refresh_cache
+    @mock_view.bundle { @@content_include_some }
+    
+    # check to see each bundle file exists and append some text to the bottom of each file
+    append_to_public_files(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
+    assert_public_files_match(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
+    
+    # now, pass in some new content.  Make sure that the css/js files are regenerated
+    @mock_view.bundle { @@content_include_all }
+    assert_public_files_no_match(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
+    assert_public_files_no_match(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
+  end
+  
+  def test__modified_time_differs_from_file__should_refresh_cache
+    @mock_view.bundle { @@content_include_some }
+    # we're gonna hack each of them and set all the modified times to 0
+    cache_files(&quot;bundle&quot;).each{|filename|
+      abs_filelist_path = public_file(filename + &quot;.filelist&quot;)
+      b = BundleFu::FileList.open(abs_filelist_path)
+      b.filelist.each{|entry| entry[1] = entry[1] - 100 }
+      b.save_as(abs_filelist_path)
+    }
+    
+    append_to_public_files(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
+  end
+  
+  def test__content_remains_same_but_cache_files_dont_match_whats_in_content__shouldnt_refresh_cache
+    # it shouldnt parse the content unless if it differed from the last request.  This scenario should never exist, and if it did it would be fixed when the server reboots.
+    @mock_view.bundle { @@content_include_some }
+    abs_filelist_path = public_file(&quot;/stylesheets/cache/bundle.css.filelist&quot;)
+    b = BundleFu::FileList.open(abs_filelist_path)
+    
+    @mock_view.bundle { @@content_include_all }
+    b.save_as(abs_filelist_path)
+    append_to_public_files(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
+    
+    @mock_view.bundle { @@content_include_all }
+    assert_public_files_match(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
+    
+  end
+  
+  def test__content_differs_slightly_but_cache_files_match__shouldnt_refresh_cache
+    @mock_view.bundle { @@content_include_all }
+    append_to_public_files(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
+    @mock_view.bundle { @@content_include_all + &quot;  &quot; }
+    assert_public_files_match(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
+  end
+  
+  def test__bundle__js_only__should_output_js_include_statement
+    @mock_view.bundle { @@content_include_some.split(&quot;\n&quot;).first }
+    lines = @mock_view.output.split(&quot;\n&quot;)
+    assert_equal(1, lines.length)
+    assert_match(/javascripts/, lines.first)
+  end
+  
+  def test__bundle__css_only__should_output_css_include_statement
+    @mock_view.bundle { @@content_include_some.split(&quot;\n&quot;)[2] }
+    lines = @mock_view.output.split(&quot;\n&quot;)
+    
+    assert_equal(1, lines.length)
+    assert_match(/stylesheets/, lines.first)
+    
+  end
+  
+  def test__nonexisting_file__should_use_blank_file_created_at_0_mtime
+#    dbg
+    @mock_view.bundle { %q{&lt;script src=&quot;/javascripts/non_existing_file.js?1000&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;} } 
+    
+    assert_public_files_match(cache_files(&quot;bundle&quot;).grep(/javascripts/), &quot;FILE READ ERROR&quot;)
+    
+    filelist = BundleFu::FileList.open(public_file(&quot;/javascripts/cache/bundle.js.filelist&quot;))
+    assert_equal(0, filelist.filelist[0][1], &quot;mtime for first file should be 0&quot;)
+  end
+  
+  def test__missing_cache_filelist__should_regenerate
+    @mock_view.bundle { @@content_include_some }
+    append_to_public_files(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;)
+    
+    # now delete the cache files
+    Dir[ public_file(&quot;**/*.filelist&quot;)].each{|filename| FileUtils.rm_f filename }
+    @mock_view.bundle { @@content_include_some }
+    assert_public_files_no_match(cache_files(&quot;bundle&quot;), &quot;BOGUS&quot;, &quot;Should have regenerated the file, but it didn't&quot;)
+  end
+  
+  def test__bypass__should_generate_files_but_render_normal_output
+    @mock_view.bundle(:bypass =&gt; true) { @@content_include_some }
+    assert_public_file_exists(&quot;/stylesheets/cache/bundle.css&quot;)
+    assert_public_file_exists(&quot;/stylesheets/cache/bundle.css.filelist&quot;)
+    
+    assert_equal(@@content_include_some, @mock_view.output)
+  end
+  
+  def test__bypass_param_set__should_honor_and_store_in_session
+    @mock_view.params[:bundle_fu] = &quot;false&quot;
+    @mock_view.bundle { @@content_include_some }
+    assert_equal(@@content_include_some, @mock_view.output)
+    
+    @mock_view.params.delete(:bundle_bypass)
+    @mock_view.bundle { @@content_include_some }
+    assert_equal(@@content_include_some*2, @mock_view.output)
+  end
+  
+private
+  
+  def purge_cache
+    # remove all fixtures named &quot;bundle*&quot;
+    Dir[ public_file(&quot;**/cache&quot;) ].each{|filename| FileUtils.rm_rf filename }
+  end
+  
+  def assert_public_file_exists(filename, message=nil)
+    assert_file_exists(public_file(filename), message)
+  end
+  
+  def assert_file_exists(filename, message=nil)
+    assert(File.exists?(filename), message || &quot;File #{filename} expected to exist, but didnt.&quot;)
+  end
+  
+  def assert_public_files_match(filenames, needle, message=nil)
+    filenames.each{|filename|
+      assert_public_file_exists(filename)
+      assert_match(needle.to_regexp, File.read(public_file(filename)), message || &quot;expected #{filename} to match #{needle}, but doesn't.&quot;)
+    }
+  end
+  
+  def assert_public_files_no_match(filenames, needle, message=nil)
+    filenames.each{ |filename|
+      assert_public_file_exists(filename)
+      assert_no_match(needle.to_regexp, File.read(public_file(filename)), message || &quot;expected #{filename} to not match #{needle}, but does.&quot;)
+    }
+  end
+  
+  def cache_files(name)
+    [&quot;/javascripts/cache/#{name}.js&quot;, &quot;/stylesheets/cache/#{name}.css&quot;]
+  end
+
+  def append_to_public_files(filenames, content)
+    for filename in filenames
+      assert_public_file_exists(filename)
+      File.open(public_file(filename), &quot;a&quot;) {|f|
+        f.puts(content)
+      }
+    end
+  end  
 end
\ No newline at end of file</diff>
      <filename>test/functional/bundle_fu_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>01795c74ccfffcc138c726d2c8a0b62d7c4a68f3</id>
    </parent>
  </parents>
  <author>
    <name>Tim Harper</name>
    <email>timcharper@gmail.com</email>
  </author>
  <url>http://github.com/timcharper/bundle-fu/commit/896d84bdda764281095f5dfd98a9d91d2ceb8a38</url>
  <id>896d84bdda764281095f5dfd98a9d91d2ceb8a38</id>
  <committed-date>2008-05-18T22:20:13-07:00</committed-date>
  <authored-date>2008-05-18T22:19:52-07:00</authored-date>
  <message>don't blow up on external asset urls https:// (Thanks, James Coglan!)</message>
  <tree>92a326d2de46ea1f3a9e69ee3d6335a9b69918b1</tree>
  <committer>
    <name>Tim Harper</name>
    <email>timcharper@gmail.com</email>
  </committer>
</commit>
