<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>generators/forgery/USAGE</filename>
    </added>
    <added>
      <filename>generators/forgery/forgery_generator.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1 +1,11 @@
-require File.dirname(__FILE__) + '/lib/forgery'
\ No newline at end of file
+require File.dirname(__FILE__) + '/lib/forgery'
+
+Dir[File.expand_path(File.dirname(__FILE__) + '/lib/**/*.rb')].uniq.each do |file|
+  require file
+end
+
+if defined?(RAILS_ROOT)
+  Dir[File.expand_path(RAILS_ROOT + '/lib/forgery/**/*.rb')].uniq.each do |file|
+    require file
+  end
+end
\ No newline at end of file</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -30,15 +30,34 @@ protected
   end
 
   def self.path_to_format(format)
+    if external_path_to_format(format) &amp;&amp; File.exists?(external_path_to_format(format))
+      external_path_to_format(format)
+    else
+      internal_path_to_format(format)
+    end
+  end
+
+  def self.external_path_to_format(format)
+    RAILS_ROOT + '/lib/forgery/formats/' + format.to_s if defined?(RAILS_ROOT)
+  end
+
+  def self.internal_path_to_format(format)
     File.dirname(__FILE__) + '/formats/' + format.to_s
   end
 
   def self.path_to_dictionary(dictionary)
-    File.dirname(__FILE__) + '/dictionaries/' + dictionary.to_s
+    if external_path_to_dictionary(dictionary) &amp;&amp; File.exists?(external_path_to_dictionary(dictionary))
+      external_path_to_dictionary(dictionary)
+    else
+      internal_path_to_dictionary(dictionary)
+    end
   end
 
-end
+  def self.external_path_to_dictionary(dictionary)
+    RAILS_ROOT + '/lib/forgery/dictionaries/' + dictionary.to_s if defined?(RAILS_ROOT)
+  end
 
-Dir[File.expand_path(File.dirname(__FILE__) + '/**/*.rb')].uniq.each do |file|
-  require file
+  def self.internal_path_to_dictionary(dictionary)
+    File.dirname(__FILE__) + '/dictionaries/' + dictionary.to_s
+  end
 end
\ No newline at end of file</diff>
      <filename>lib/forgery.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7ab4969d02c869e9eac080e51a7b6ffb77bd4c14</id>
    </parent>
  </parents>
  <author>
    <name>Nathan Sutton</name>
    <email>nate@sevenwire.com</email>
  </author>
  <url>http://github.com/sevenwire/forgery/commit/ad32076e33a6f6954456ddd4f98ae5527f3c799b</url>
  <id>ad32076e33a6f6954456ddd4f98ae5527f3c799b</id>
  <committed-date>2008-04-03T18:19:30-07:00</committed-date>
  <authored-date>2008-04-03T18:19:30-07:00</authored-date>
  <message>Adding rails support.</message>
  <tree>047fe510c0407970b1937b66815c2784ddee76e5</tree>
  <committer>
    <name>Nathan Sutton</name>
    <email>nate@sevenwire.com</email>
  </committer>
</commit>
