<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/tasks/state_fu.rake</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -5,6 +5,8 @@ require &quot;date&quot;
 require &quot;fileutils&quot;
 require &quot;rubygems&quot;
 
+load File.join( File.dirname(__FILE__),&quot;/lib/tasks/state_fu.rake&quot; )
+
 module Rakefile
   def self.windows?
     /djgpp|(cyg|ms|bcc)win|mingw/ =~ RUBY_PLATFORM
@@ -69,7 +71,7 @@ namespace :spec do
     exec 'autospec'
   end
 
-    def find_last_modified_spec
+  def find_last_modified_spec
     require 'find'
     specs = []
     Find.find( File.expand_path(File.join(File.dirname(__FILE__),'spec'))) do |f|</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -41,6 +41,19 @@ module StateFu
     alias_method :workflow,      :machine
     alias_method :state_machine, :machine
 
+    def object=( reference )
+      raise ArgumentError.new( reference ) unless object == reference
+      @object = reference
+    end
+
+    def reload()
+      if persister.is_a?( Persistence::ActiveRecord )
+        object.reload
+      end
+      persister.reload
+      self
+    end
+
     # the perister's field_name (a symbol)
     def field_name
       persister.field_name</diff>
      <filename>lib/state_fu/binding.rb</filename>
    </modified>
    <modified>
      <diff>@@ -52,6 +52,11 @@ module StateFu
         end
       end
 
+       
+      def reload
+        @current_state = find_current_state()
+      end
+    
       def machine
         binding.machine
       end
@@ -64,10 +69,6 @@ module StateFu
         object.class
       end
 
-#      def method_name
-#        binding.method_name
-#      end
-
       def current_state=( state )
         raise(ArgumentError, state.inspect) unless state.is_a?(StateFu::State)
         @current_state = state</diff>
      <filename>lib/state_fu/persistence/base.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5992d20bf50b1ae460343e0a1b8ce4a152c1a97c</id>
    </parent>
  </parents>
  <author>
    <name>davidlee</name>
    <email>david@davelee.com.au</email>
  </author>
  <url>http://github.com/davidlee/state-fu/commit/08d33b988d35ceef344fa9bc37b40c1ad392bf7a</url>
  <id>08d33b988d35ceef344fa9bc37b40c1ad392bf7a</id>
  <committed-date>2009-06-26T00:09:16-07:00</committed-date>
  <authored-date>2009-06-26T00:09:16-07:00</authored-date>
  <message>SPECME adding undocumented features for reloading current_state from persister and for updating the reference that a binding uses</message>
  <tree>f604fb76bbd2f961898bb62874b2b9754f6e16bf</tree>
  <committer>
    <name>davidlee</name>
    <email>david@davelee.com.au</email>
  </committer>
</commit>
