<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/ahocorasick.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,6 +3,6 @@
 *.o
 *.bundle
 pkg
-ext/Makefile
+ext/ahocorasick/Makefile
 spec/data/en.words
 spec/data/melville-moby_dick.txt</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -19,18 +19,22 @@ task :default do
 end
 
 desc &quot;Runs ruby extconf.rb&quot;
-task :extconf do
-  `cd ext &amp;&amp; ruby extconf.rb &amp;&amp; cd ../`
+task :extconf =&gt; :clean do
+  Dir.chdir('ext/ahocorasick') do
+    ruby &quot;extconf.rb&quot;
+  end
 end
 
 desc &quot;Makes the extension&quot;
 task :ext =&gt; :extconf do
-  `cd ext/ &amp;&amp; make &amp;&amp; cd ../`
+  Dir.chdir('ext/ahocorasick') do
+    sh &quot;make&quot;
+  end
 end
 
 desc &quot;Cleans the workspace&quot;
 task :clean do
-  `rm -rf ext/*.o ext/*.so ext/Makefile ext/*.bundle`
+  sh &quot;rm -rf ext/ahocorasick/*.o ext/ahocorasick/*.so ext/ahocorasick/Makefile ext/ahocorasick/*.bundle&quot;
 end
 
 desc &quot;Run rspec&quot;</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,8 @@
 require &quot;mkmf&quot;
 
-# $CFLAGS &lt;&lt; &quot; -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline&quot;
+$CFLAGS &lt;&lt; &quot; -O3 -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline&quot;
 
 dir_config(&quot;ahocorasick&quot;)
 
-create_makefile(&quot;ahocorasick&quot;)
+create_makefile(&quot;ahocorasick/native&quot;)
 </diff>
      <filename>ext/ahocorasick/extconf.rb</filename>
    </modified>
    <modified>
      <diff>@@ -314,7 +314,7 @@ rb_kwt_struct_alloc(VALUE klass)
 /*
  * Blump.
  */
-void Init_ahocorasick() {
+void Init_native() {
   rb_mAhoCorasick = rb_define_module(&quot;AhoCorasick&quot;);
   rb_cKeywordTree = rb_define_class_under(rb_mAhoCorasick, &quot;KeywordTree&quot;, rb_cObject);
   </diff>
      <filename>ext/ahocorasick/ruby-ahocorasick.c</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,12 @@
 GEM_NAME= 'ruby-ahocorasick'
-GEM_VERSION= '0.4.5'
+GEM_VERSION= '0.5.0'
 
 PKG_FILES = [
-  'ext/extconf.rb',
-  'ext/ruby-ahocorasick.c',
-  'ext/ac.h',
-  'ext/ac.c',
+  'ext/ahocorasick/extconf.rb',
+  'ext/ahocorasick/ruby-ahocorasick.c',
+  'ext/ahocorasick/ac.h',
+  'ext/ahocorasick/ac.c',
+  'lib/ahocorasick.rb',
   'examples/dict.rb',
   'examples/test.rb',
   'examples/elev.rb',
@@ -26,10 +27,10 @@ GEMSPEC = Gem::Specification.new do | s |
   EOF
 
   s.files = PKG_FILES
-  s.extensions &lt;&lt; &quot;ext/extconf.rb&quot;
+  s.extensions &lt;&lt; &quot;ext/ahocorasick/extconf.rb&quot;
   s.has_rdoc = true
   s.rdoc_options &lt;&lt; '--title' &lt;&lt;  'Ruby-AhoCorasick' &lt;&lt; 
-    '--inline-source' &lt;&lt; 'ext/ruby-ahocorasick.c' &lt;&lt; 'README.textile' &lt;&lt; '--main' &lt;&lt; 'README.textile'
+    '--inline-source' &lt;&lt; 'ext/ahocorasick/ruby-ahocorasick.c' &lt;&lt; 'README.textile' &lt;&lt; '--main' &lt;&lt; 'README.textile'
   s.author = &quot;Aurelian Oancea&quot;
   s.email = &quot;oancea at gmail dot com&quot;
   s.homepage = &quot;http://www.locknet.ro&quot;</diff>
      <filename>ruby-ahocorasick.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,8 @@
-require 'ext/ahocorasick'
+%w(../lib ../ext).each do |path|
+  $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), path)))
+end
 
+require 'ahocorasick'
 include AhoCorasick
 
 describe KeywordTree do
@@ -237,20 +240,28 @@ describe KeywordTree do
 
   describe &quot;Benchmarks. Loading from a file&quot; do
 
+    before(:each) do
+      @start= Time.now
+    end
+
+    after(:each) do
+      @start=nil
+    end
+
     it &quot;should be fast to load a bunch of english words&quot; do
-      start= Time.now
       k= KeywordTree.from_file File.dirname(__FILE__) + &quot;/data/en.words&quot;
-      puts &quot;\n%d words loaded in %s seconds&quot; % [k.size, (Time.now - start)]
-      (Time.now-start).should &lt; 0.2
+      puts &quot;\n%d words loaded in %s seconds&quot; % [k.size, (Time.now - @start)]
+      (Time.now-@start).should &lt; 0.2
     end
 
     it &quot;should be fast to find&quot; do
-      start= Time.now
+      # start= Time.now
       k= KeywordTree.from_file File.dirname(__FILE__) + &quot;/data/en.words&quot;
       load_time= Time.now
       results= k.find_all( File.read( File.dirname(__FILE__) + &quot;/data/melville-moby_dick.txt&quot; ) )
-      puts &quot;\n%d words re-loaded in %s seconds.\nGot %d results in %s seconds&quot; % [k.size, (load_time - start), results.size, (Time.now-load_time)]
+      puts &quot;\n%d words re-loaded in %s seconds.\nGot %d results in %s seconds&quot; % [k.size, (load_time - @start), results.size, (Time.now-load_time)]
       (Time.now-load_time).should &lt; 1.3
+      puts results.last.inspect
     end
   end
 </diff>
      <filename>spec/ahocorasick_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0fdf77d0040104c48b3a9dd5b6c0d78ad3a30ceb</id>
    </parent>
  </parents>
  <author>
    <name>aurelian</name>
    <email>aurelian@locknet.ro</email>
  </author>
  <url>http://github.com/aurelian/ruby-ahocorasick/commit/3b02cee6ef5a363c6dfda8a781ee381c89070705</url>
  <id>3b02cee6ef5a363c6dfda8a781ee381c89070705</id>
  <committed-date>2008-11-28T09:21:52-08:00</committed-date>
  <authored-date>2008-11-28T09:21:52-08:00</authored-date>
  <message> * 0.5 should be ready</message>
  <tree>b1acd2a50c2776fc91c059b344d8569b579ba4a0</tree>
  <committer>
    <name>aurelian</name>
    <email>aurelian@locknet.ro</email>
  </committer>
</commit>
