<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>tasks/state_machine.rake</filename>
    </added>
    <added>
      <filename>tasks/state_machine.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,6 @@
 == master
 
+* Fix rake tasks not being registered in Rails/Merb applications
 * Never automatically define machine attribute accessors when using an integration
 
 == 0.5.0 / 2009-01-11</diff>
      <filename>CHANGELOG.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -87,28 +87,4 @@ task :release =&gt; [:gem, :package] do
   end
 end
 
-namespace :state_machine do
-  desc 'Draws a set of state machines using GraphViz. Target files to load with FILE=x,y,z; Machine class with CLASS=x,y,z; Font name with FONT=x; Image format with FORMAT=x'
-  task :draw do
-    # Load the library
-    $:.unshift(File.dirname(__FILE__) + '/lib')
-    require 'state_machine'
-    
-    # Build drawing options
-    options = {}
-    options[:file] = ENV['FILE'] if ENV['FILE']
-    options[:path] = ENV['TARGET'] if ENV['TARGET']
-    options[:format] = ENV['FORMAT'] if ENV['FORMAT']
-    options[:font] = ENV['FONT'] if ENV['FONT']
-    
-    StateMachine::Machine.draw(ENV['CLASS'], options)
-  end
-  
-  namespace :draw do
-    desc 'Draws a set of state machines using GraphViz for a Ruby on Rails application.  Target class with CLASS=x,y,z; Font name with FONT=x; Image format with FORMAT=x'
-    task :rails =&gt; [:environment, 'state_machine:draw']
-    
-    desc 'Draws a set of state machines using GraphViz for a Merb application.  Target class with CLASS=x,y,z; Font name with FONT=x; Image format with FORMAT=x'
-    task :merb =&gt; [:merb_env, 'state_machine:draw']
-  end
-end
+Dir['tasks/**/*.rake'].each {|rake| load rake}</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -314,3 +314,6 @@ end
 Class.class_eval do
   include StateMachine::MacroMethods
 end
+
+# Register rake tasks for supported libraries
+Merb::Plugins.add_rakefiles(&quot;#{File.dirname(__FILE__)}/../tasks/state_machine&quot;) if defined?(Merb::Plugins)</diff>
      <filename>lib/state_machine.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1475acf878aa697c1ed9dbab792e14d782a0fc2e</id>
    </parent>
  </parents>
  <author>
    <name>Aaron Pfeifer</name>
    <email>aaron.pfeifer@gmail.com</email>
  </author>
  <url>http://github.com/pluginaweek/state_machine/commit/a75a28207e7cf33a48cc948cab1b5688408b660a</url>
  <id>a75a28207e7cf33a48cc948cab1b5688408b660a</id>
  <committed-date>2009-02-09T20:06:17-08:00</committed-date>
  <authored-date>2009-02-09T20:06:17-08:00</authored-date>
  <message>Fix rake tasks not being registered in Rails/Merb applications [#11 state:resolved]</message>
  <tree>2361e50621c50614e7e356dd746ca21081a6674a</tree>
  <committer>
    <name>Aaron Pfeifer</name>
    <email>aaron.pfeifer@gmail.com</email>
  </committer>
</commit>
