<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -23,9 +23,7 @@ class Storify
   def self.run!
     rails_root = ARGV[0] || '.'
     puts &quot;rails_root: #{rails_root}&quot;
-    config_base = File.join(rails_root, 'config')
-    old_env_dir = File.join(config_base, 'environments')
-
+    
     # lib/story_helper.rb
     story_helper_rb = File.join(rails_root, 'lib', 'story_helper.rb')
     gem_story_helper_rb = File.dirname(__FILE__) + '/../lib/story-helper/conf/story_helper.rb'
@@ -42,6 +40,23 @@ class Storify
     copy_if_missing(gem_story_helper_rake, story_helper_rake)
   end
   
+  def self.cleanup!
+    rails_root = ARGV[0] || '.'
+    puts &quot;rails_root: #{rails_root}&quot;
+    
+    # lib/story_helper.rb
+    story_helper_rb = File.join(rails_root, 'lib', 'story_helper.rb')
+    delete_unless_missing(story_helper_rb)
+
+    # lib/story_accessors.rb
+    story_accessors_rb = File.join(rails_root, 'lib', 'story_accessors.rb')
+    delete_unless_missing(story_accessors_rb)
+
+    # lib/tasks/story_helper.rake
+    story_helper_rake = File.join(rails_root, 'lib', 'tasks', 'story_helper.rake')
+    delete_unless_missing(story_helper_rake)
+  end
+  
   private
     def self.copy_if_missing(from, to)
       if !File.exists?(to)
@@ -52,7 +67,21 @@ class Storify
       end
     end
     
+    def self.delete_unless_missing(file)
+      if File.exists?(file)
+        cmd = &quot;rm #{file}&quot;
+        puts cmd
+        rm_f(file)
+      else
+        puts &quot;Deleting #{file}....doesn't exist.&quot;
+      end
+    end
+    
 end
 
-Storify.run!
-puts &quot;Don't forget to include StoryAccessors::Methods into your test_helper.&quot;
\ No newline at end of file
+if ARGV.size &gt; 1 &amp;&amp; ARGV[1] == &quot;cleanup&quot;
+  Storify.cleanup!
+else
+  Storify.run!
+  puts &quot;Don't forget to include StoryAccessors::Methods into your test_helper.&quot;
+end</diff>
      <filename>bin/storify</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1ba7aba0903afe2186daa92377f825f1654e379f</id>
    </parent>
  </parents>
  <author>
    <name>John Trupiano</name>
    <email>john@john-trupianos-macbook-pro.local</email>
  </author>
  <url>http://github.com/jtrupiano/story-helper/commit/196e9ddd33eb7b494f3e58027e7cad51862acb42</url>
  <id>196e9ddd33eb7b494f3e58027e7cad51862acb42</id>
  <committed-date>2008-09-20T16:36:36-07:00</committed-date>
  <authored-date>2008-09-20T16:36:36-07:00</authored-date>
  <message>Added a cleanup cl option (storify . cleanup) that will un-storify an app.  Mostly useful for testing.</message>
  <tree>52597b3065389b62cb04055b0e73023343d02e7d</tree>
  <committer>
    <name>John Trupiano</name>
    <email>john@john-trupianos-macbook-pro.local</email>
  </committer>
</commit>
