<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/codex/rake/codextask.rb</filename>
    </added>
    <added>
      <filename>test/codex/rake/test_codextask.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,2 +1,3 @@
 html/*.html
 pkg/*
+test/tmp
\ No newline at end of file</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -87,6 +87,7 @@ lib/codex/filters/code_filter.rb
 lib/codex/filters/graphviz_filter.rb
 lib/codex/filters/ritex_filter.rb
 lib/codex/pressie.rb
+lib/codex/rake/codextask.rb
 lib/codex/version.rb
 lib/stylesheets/pressie.css
 lib/stylesheets/print.css
@@ -98,8 +99,7 @@ setup.rb
 tasks/deployment.rake
 tasks/environment.rake
 tasks/website.rake
-test/test_codex.rb
+test/codex/rake/test_codextask.rb
 test/test_codex_generator.rb
 test/test_filter.rb
-test/test_generator_helper.rb
 test/test_helper.rb</diff>
      <filename>Manifest.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,59 +1,9 @@
-CONTENT_DIR = 'content/'
-HTML_DIR   = 'html/'
-IMG_DIR    = 'html/images/'
-ALL_HTML   = File.join(HTML_DIR, &quot;all.html&quot;)
-
-METADATA = File.join(CONTENT_DIR, &quot;metadata.yml&quot;)
-
-Dir.chdir(CONTENT_DIR) { SRC = FileList['*.textile']; SRC.resolve }
-
-OUTPUT = []
-
-SRC.each do |file_name|
-  content_file = File.join(CONTENT_DIR, file_name)
-  html_file = File.join(HTML_DIR, file_name.ext('.html'))
-  OUTPUT &lt;&lt; html_file
-  desc &quot;Build #{html_file} from #{content_file}&quot;
-  file html_file =&gt; [HTML_DIR, content_file] do
-    sh &quot;ruby bin/pressie.rb #{METADATA} #{content_file} &gt; #{html_file}&quot;
-  end
-end
-
-desc &quot;Build the HTML output&quot;
-task :default =&gt; OUTPUT
-
-desc &quot;Build all based on the contents of content/table_of_contents.textile&quot;
-task :all =&gt; [ 'tmp/', HTML_DIR, IMG_DIR, ALL_HTML, :remove_tmp ]
-
-task ALL_HTML =&gt; 'tmp/almost_all.html' do
-  sh &quot;ruby bin/postprocess_all.rb tmp/almost_all.html &gt;#{ALL_HTML}&quot;
-end
-
-task 'tmp/almost_all.html' =&gt; 'tmp/almost_all.textile' do
-  sh &quot;ruby bin/pressie.rb #{METADATA} tmp/almost_all.textile &gt;tmp/almost_all.html&quot;
-end
-
-task 'tmp/almost_all.textile' =&gt; OUTPUT do
-  sh &quot;ruby bin/build_all.rb #{METADATA} content/table_of_contents.textile tmp/almost_all.textile&quot;
-end
-
-file &quot;tmp/&quot; do
-  mkdir &quot;tmp&quot;
-end
-
-file &quot;html/&quot; do
-  mkdir &quot;html&quot;
-end
-
-file &quot;html/&quot; do
-  mkdir &quot;html/images&quot;
-end
-
-task :remove_tmp do
-  FileUtils.rm_rf(&quot;tmp&quot;)
-end
-
-desc &quot;Remove all work products&#8212;slides and temporary files&quot;
-task :clean =&gt; :remove_tmp do
-  FileUtils.rm_rf HTML_DIR
+require 'rubygems'
+require 'codex'
+require 'codex/rake/codextask'
+
+Codex::Rake::CodexTask.new do |c|
+  # c.content_dir = 'content'
+  # c.output_dir  = 'html'
+  # c.metadata    = &quot;#{c.content_dir}/metadata.yml&quot;
 end
\ No newline at end of file</diff>
      <filename>app_generators/codex/templates/Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,11 @@ base_dir = File.dirname(__FILE__)
 $:.unshift(base_dir) unless
   $:.include?(base_dir) || $:.include?(File.expand_path(base_dir))
 
-module Codex; end
+module Codex
+  class &lt;&lt; self
+    attr_accessor :root
+  end
+end
 
 require 'codex/content'
 require 'codex/pressie'</diff>
      <filename>lib/codex.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,6 @@
-require File.join(File.dirname(__FILE__), &quot;test_generator_helper.rb&quot;)
+require File.expand_path(File.dirname(__FILE__) + &quot;/test_helper.rb&quot;)
 
 class TestCodexGenerator &lt; Test::Unit::TestCase
-  include RubiGen::GeneratorTestHelper
 
   def setup
     bare_setup
@@ -26,7 +25,7 @@ class TestCodexGenerator &lt; Test::Unit::TestCase
   #   bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
 
   def test_generator_without_options
-    run_generator('codex', [APP_ROOT], sources)
+    generate
     assert_directory_exists &quot;bin&quot;
     assert_directory_exists &quot;code/control&quot;
     assert_directory_exists &quot;html&quot;
@@ -66,13 +65,4 @@ class TestCodexGenerator &lt; Test::Unit::TestCase
       end
   end
 
-  private
-  def sources
-    [RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),&quot;..&quot;, generator_path))
-    ]
-  end
-
-  def generator_path
-    &quot;app_generators&quot;
-  end
 end</diff>
      <filename>test/test_codex_generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/test_helper.rb'
+require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
 
 class TestFilters &lt; Test::Unit::TestCase
   def setup</diff>
      <filename>test/test_filter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,34 @@
 require 'rubygems'
 require 'test/unit'
-require File.dirname(__FILE__) + '/../lib/codex'
+require File.expand_path(File.dirname(__FILE__) + '/../lib/codex')
+
+# Must set before requiring generator libs.
+TMP_ROOT = File.dirname(__FILE__) + &quot;/tmp&quot; unless defined?(TMP_ROOT)
+PROJECT_NAME = &quot;myproject&quot; unless defined?(PROJECT_NAME)
+app_root = File.join(TMP_ROOT, PROJECT_NAME)
+if defined?(APP_ROOT)
+  APP_ROOT.replace(app_root)
+else
+  APP_ROOT = app_root
+end
+
+require 'rubigen'
+require 'rubigen/helpers/generator_test_helper'
+
+Codex.root = APP_ROOT
+
+class Test::Unit::TestCase
+  include RubiGen::GeneratorTestHelper
+  
+private
+  
+  def generate
+    run_generator('codex', [Codex.root], sources)
+  end
+  
+  def sources
+    [RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),&quot;..&quot;, 'app_generators'))
+    ]
+  end
+
+end</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>test/test_codex.rb</filename>
    </removed>
    <removed>
      <filename>test/test_generator_helper.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>ffddea225fa05307e73632287a3ec8acb6d22be3</id>
    </parent>
  </parents>
  <author>
    <name>Brandon Keepers</name>
    <email>brandon@collectiveidea.com</email>
  </author>
  <url>http://github.com/pragdave/codex/commit/7899b12ebc6f9c32e8d30267471ae86876aa9b37</url>
  <id>7899b12ebc6f9c32e8d30267471ae86876aa9b37</id>
  <committed-date>2008-07-22T09:10:53-07:00</committed-date>
  <authored-date>2008-07-22T09:03:45-07:00</authored-date>
  <message>Refactored Rakefile into a custom Rake task</message>
  <tree>c6fd7b96da442792e3c9fa4c7dc547a7b300f8d0</tree>
  <committer>
    <name>Brandon Keepers</name>
    <email>brandon@collectiveidea.com</email>
  </committer>
</commit>
