<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,6 +10,5 @@ Echoe.new 'clientperf' do |p|
   p.project = 'clientperf'
   p.summary = &quot;Instrumentation for the FiveRuns TuneUp product.&quot;
   p.url = &quot;http://github.com/efalcao/clientperf&quot;
-  p.dependencies = %w(activesupport)
   p.include_rakefile = true
 end
\ No newline at end of file</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,20 @@
 #!/usr/bin/env ruby
+
+# USAGE: clientperf [RAILS_ROOT]
+rails_dir = ARGV[0] || Dir.pwd
+
 require 'fileutils'
+
+require rails_dir + '/config/boot'
+require &quot;#{RAILS_ROOT}/config/environment&quot;
+require 'rails_generator'
+require 'rails_generator/scripts/generate'
+
 require File.dirname(__FILE__) &lt;&lt; &quot;/../lib/clientperf&quot;
 require File.dirname(__FILE__) &lt;&lt; &quot;/../lib/clientperf_config&quot;
 require File.dirname(__FILE__) &lt;&lt; &quot;/../lib/clientperf_migrations&quot;
 
-# For older Rails versions
-# USAGE: clientperf [RAILS_ROOT]
-rails_dir = ARGV[0] || Dir.pwd
+
 plugin_dir = File.join(rails_dir, 'vendor/plugins')
 unless File.directory?(plugin_dir)
   abort &quot;clientperf: #{plugin_dir} does not exist; cannot install plugin&quot;
@@ -25,7 +33,7 @@ File.readlines(File.dirname(__FILE__) &lt;&lt; &quot;/../Manifest&quot;).each do |line|
   end
 end
 
-ClientperfMigrations.new(rails_dir).install_new
+ClientperfMigrations.install_new
 ClientperfConfig.create_unless_exists(rails_dir)
 
 STDERR.puts &quot;Installed clientperf (v#{Clientperf.version}) in vendor/plugins/clientperf&quot;
\ No newline at end of file</diff>
      <filename>bin/clientperf</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@ module Clientperf
     end
     
     def version
-      &quot;0.0.2&quot;
+      &quot;0.0.3&quot;
     end
     
     private</diff>
      <filename>lib/clientperf.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,3 @@
-require 'yaml'
-require 'rubygems'
-require 'active_support'
-
 class ClientperfConfig
   
   delegate :[], :[]=, :each, :update, :to =&gt; :data</diff>
      <filename>lib/clientperf_config.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,33 +23,28 @@ class AddClientperfTables &lt; ActiveRecord::Migration
 end)
   }
   
-  attr_accessor :rails_dir
-      
-  def initialize(rails_dir)
-    @rails_dir = rails_dir
-  end
-  
-  def install_new
-    MIGRATION_NAMES.reject {|name| exists?(name) }.each do |migration|
-      generate(migration)
-      install(migration)
+  class &lt;&lt; self
+    def install_new
+      to_migrate = MIGRATION_NAMES.reject {|name| exists?(name) }
+      to_migrate.each do |migration|
+        generate(migration)
+        install(migration)
+      end
     end
-  end
-  
-  private
-  
-  def generate(migration_name)
-    `#{File.join(rails_dir, 'script', 'generate')} migration #{migration_name}`
-  end
-  
-  def migration_path(migration_name)
-    Dir[File.join(rails_dir, 'db', 'migrate', &quot;*_#{migration_name}.rb&quot;)].first
-  end
-  alias_method :exists?, :migration_path
-  
-  def install(migration)
-    File.open(migration_path(migration), 'w') do |file|
-      file &lt;&lt; MIGRATION_CONTENTS[migration.to_sym]
+
+    def generate(migration_name)
+      Rails::Generator::Scripts::Generate.new.run(['migration', migration_name])
+    end
+
+    def migration_path(migration_name)
+      Dir[File.join(RAILS_ROOT, 'db', 'migrate', &quot;*_#{migration_name}.rb&quot;)].first
+    end
+    alias_method :exists?, :migration_path
+
+    def install(migration)
+      File.open(migration_path(migration), 'w') do |file|
+        file &lt;&lt; MIGRATION_CONTENTS[migration.to_sym]
+      end
     end
   end
 end
\ No newline at end of file</diff>
      <filename>lib/clientperf_migrations.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3e3b3d24466ec6fd541b8afd547780e8eb754b7e</id>
    </parent>
  </parents>
  <author>
    <name>Eric Falcao</name>
    <email>efalcao@gmail.com</email>
  </author>
  <url>http://github.com/efalcao/clientperf/commit/7b4dc84ea9d9ac3202ece74b883acff54d3fd87a</url>
  <id>7b4dc84ea9d9ac3202ece74b883acff54d3fd87a</id>
  <committed-date>2008-06-20T13:16:20-07:00</committed-date>
  <authored-date>2008-06-20T13:16:20-07:00</authored-date>
  <message>using script/generate programmatically rather than shelling out</message>
  <tree>90beeec52794d773caed1700f7190c4cf64d70ef</tree>
  <committer>
    <name>Eric Falcao</name>
    <email>efalcao@gmail.com</email>
  </committer>
</commit>
