<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.gitignore</filename>
    </added>
    <added>
      <filename>lib/java/bin/Xhtml2Pdf.class</filename>
    </added>
    <added>
      <filename>lib/java/jar/core-renderer.jar</filename>
    </added>
    <added>
      <filename>lib/java/jar/itext-paulo-155.jar</filename>
    </added>
    <added>
      <filename>lib/java/jar/java-getopt-1.0.13.jar</filename>
    </added>
    <added>
      <filename>lib/java/jar/minium.jar</filename>
    </added>
    <added>
      <filename>lib/java/src/Xhtml2Pdf.java</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -10,4 +10,4 @@ Example
 Example goes here.
 
 
-Copyright (c) 2008 [name of plugin creator], released under the MIT license
+Copyright (c) 2008 Borja Mart&#237;n &lt;borjam@dagi3d.net&gt;, released under the MIT license</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,54 @@
 # ActsAsFlyingSaucer
 module ActsAsFlyingSaucer
   
+  # Config
+  #
+  class Config
+    cattr_accessor :options
+  end
+  
   def self.included(base)
     base.extend(ClassMethods)
   end
   
+  
   private
+  
+  # Xhtml2Pdf
+  #
+  class Xhtml2Pdf
+    def self.write_pdf
+      puts File.expand_path(File.dirname(__FILE__))
+    end
+  end
+  
+  # ClassMethods
+  #
   module ClassMethods
     
     def acts_as_flying_saucer
-      puts &quot;hola&quot;
+      self.send(:include, ActsAsFlyingSaucer::InstanceMethods)
+      class_eval do 
+        alias_method_chain :render, :pdf
+      end
+    end
+    
+  end
+  
+  # InstanceMethods
+  #
+  module InstanceMethods
+=begin
+    def render_pdf(options = {})
+      html = render_to_string options
+      # saving the file
+      ActsAsFlyingSaucer::Xhtml2Pdf.write_pdf
+    end
+=end
+    
+    def render_with_pdf(options = nil, extra_options = {}, &amp;block)
+      
+      render_without_pdf(options, extra_options, &amp;block)
     end
     
   end</diff>
      <filename>lib/acts_as_flying_saucer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,34 @@
 require 'test_helper'
 
 
-class Foo &lt; ActionController::Base
+ActsAsFlyingSaucer::Config.options = {
+  :java_bin =&gt; &quot;java&quot;,
+  :classpath_separator =&gt; ':',
+  :tmp_path =&gt; &quot;/tmp&quot;,
+  :run_mode =&gt; :once
+}
+
+class FooController &lt; ActionController::Base
   
   acts_as_flying_saucer
   
+  def show
+    render :pdf_template =&gt; 'foo'
+  end
+  
 end
 
 class ActsAsFlyingSaucerTest &lt; ActiveSupport::TestCase
-  # Replace this with your real tests.
-  test &quot;the truth&quot; do
-    assert true
+  
+  def setup
+    @controller = FooController.new
+    @request = ActionController::TestRequest.new
+    @response = ActionController::TestResponse.new 
   end
+  
+  def test_show
+    get :show
+    assert_response :success
+  end
+  
 end</diff>
      <filename>test/acts_as_flying_saucer_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3cf66b1f97033f4bc7756c5d4421dabcbf4d0674</id>
    </parent>
  </parents>
  <author>
    <name>dagi3d</name>
    <email>borjam@dagi3d.net</email>
  </author>
  <url>http://github.com/dagi3d/acts_as_flying_saucer/commit/f662729bcaf677260135bc83156cb3b32e2efbdb</url>
  <id>f662729bcaf677260135bc83156cb3b32e2efbdb</id>
  <committed-date>2008-12-06T04:35:43-08:00</committed-date>
  <authored-date>2008-12-06T04:35:43-08:00</authored-date>
  <message>added the flying saucer jar libraries</message>
  <tree>84685c608f7f464a9a81ae95381bd5c5200e08aa</tree>
  <committer>
    <name>dagi3d</name>
    <email>borjam@dagi3d.net</email>
  </committer>
</commit>
