<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/state_machine/integrations/sequel.rb</filename>
    </added>
    <added>
      <filename>test/unit/integrations/sequel_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,3 +3,4 @@ pkg
 rdoc
 test/active_record.log
 test/data_mapper.log
+test/sequel.log</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 == master
 
+* Add Sequel support
 * Fix aliasing :initialize on ActiveRecord models causing warnings when the environment is reloaded
 * Fix ActiveRecord state machines trying to query the database on unmigrated models
 * Fix initial states not getting set when the current value is an empty string [Aaron Gibralter]</diff>
      <filename>CHANGELOG.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -29,9 +29,22 @@ deciding how to behave based on the values.  This can become cumbersome and
 difficult to maintain when the complexity of your class starts to increase.
 
 +state_machine+ simplifies this design by introducing the various parts of a real
-state machine, including states, events and transitions.  However, the api is
-designed to be similar to ActiveRecord in terms of validations and callbacks,
-making it so simple you don't even need to know what a state machine is :)
+state machine, including states, events, transitions, and callbacks.  However,
+the api is designed to be so simple you don't even need to know what a
+state machine is :)
+
+Some brief, high-level features include:
+* Defining state machines on any Ruby class
+* Multiple state machines on a single class
+* before/after transition hooks with explicit transition requirements
+* ActiveRecord integration
+* DataMapper integration
+* Sequel integration
+* States of any data type
+* GraphViz visualization creator
+
+Examples of the usage patterns for some of the above features are shown below.
+You can find more detailed documentation in the actual API.
 
 == Usage
 
@@ -110,13 +123,15 @@ Below is an example of many of the features offered by this plugin, including
 Using the above class as an example, you can interact with the state machine
 like so:
 
-  vehicle = Vehicle.new     # =&gt; #&lt;Vehicle:0xb7cf4eac @state=&quot;parked&quot;, @seatbelt_on=false&gt;
-  vehicle.ignite            # =&gt; true
-  vehicle                   # =&gt; #&lt;Vehicle:0xb7cf4eac @state=&quot;idling&quot;, @seatbelt_on=true&gt;
-  vehicle.shift_up          # =&gt; true
-  vehicle                   # =&gt; #&lt;Vehicle:0xb7cf4eac @state=&quot;first_gear&quot;, @seatbelt_on=true&gt;
-  vehicle.shift_up          # =&gt; true
-  vehicle                   # =&gt; #&lt;Vehicle:0xb7cf4eac @state=&quot;second_gear&quot;, @seatbelt_on=true&gt;
+  vehicle = Vehicle.new           # =&gt; #&lt;Vehicle:0xb7cf4eac @state=&quot;parked&quot;, @seatbelt_on=false&gt;
+  vehicle.can_ignite?             # =&gt; true
+  vehicle.next_ignite_transition  # =&gt; #&lt;PluginAWeek::StateMachine::Transitionn:0xb7c34cec ...&gt;
+  vehicle.ignite                  # =&gt; true
+  vehicle                         # =&gt; #&lt;Vehicle:0xb7cf4eac @state=&quot;idling&quot;, @seatbelt_on=true&gt;
+  vehicle.shift_up                # =&gt; true
+  vehicle                         # =&gt; #&lt;Vehicle:0xb7cf4eac @state=&quot;first_gear&quot;, @seatbelt_on=true&gt;
+  vehicle.shift_up                # =&gt; true
+  vehicle                         # =&gt; #&lt;Vehicle:0xb7cf4eac @state=&quot;second_gear&quot;, @seatbelt_on=true&gt;
   
   # The bang (!) operator can raise exceptions if the event fails
   vehicle.park!             # =&gt; PluginAWeek::StateMachine::InvalidTransition: Cannot transition via :park from &quot;second_gear&quot;
@@ -131,6 +146,7 @@ machines to work more tightly with the conventions defined by those libraries.
 The integrations currently available include:
 * ActiveRecord models
 * DataMapper resources
+* Sequel models
 
 A brief overview of these integrations is described below.
 
@@ -257,6 +273,32 @@ callbacks, and observers.  For example,
 For more information about the various behaviors added for DataMapper state
 machines, see PluginAWeek::StateMachine::Integrations::DataMapper.
 
+=== Sequel
+
+Like the ActiveRecord integration, the Sequel integration adds support for
+database transactions, automatically saving the record, named scopes, and
+callbacks.  For example,
+
+  class Vehicle &lt; Sequel::Model
+    state_machine :initial =&gt; 'parked' do
+      before_transition :to =&gt; 'idling', :do =&gt; :put_on_seatbelt
+      after_transition :to =&gt; 'parked' do |transition|
+        self.seatbelt = 'off' # self is the record
+      end
+      
+      event :ignite do
+        transition :to =&gt; 'idling', :from =&gt; 'parked'
+      end
+    end
+    
+    def put_on_seatbelt
+      ...
+    end
+  end
+
+For more information about the various behaviors added for Sequel state
+machines, see PluginAWeek::StateMachine::Integrations::Sequel.
+
 == Tools
 
 === Generating graphs
@@ -320,7 +362,8 @@ events for your models.  It is cross-platform, written in Java.
 
 == Testing
 
-To run the entire test suite (will test ActiveRecord and DataMapper integrations if available):
+To run the entire test suite (will test ActiveRecord DataMapper, and Sequel
+integrations if available):
 
   rake test
 
@@ -331,6 +374,7 @@ dependencies are listed below.
 
 * ActiveRecord[http://rubyonrails.org] integration: 2.1.0 or later
 * DataMapper[http://datamapper.org] integration: 0.9.0 or later
+* Sequel[http://sequel.rubyforge.org] integration: 2.8.0 or later
 
 == References
 </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -18,9 +18,9 @@ module PluginAWeek #:nodoc:
         # setting this configuration to +true+ or +false+.  The default value
         # is +false+.
         # 
-        # *Note* that the DataMapper integration automatically configures this
-        # value on a per-callback basis, so it does not have to be enabled
-        # application-wide.
+        # *Note* that the DataMapper and Sequel integrations automatically
+        # configure this value on a per-callback basis, so it does not have to
+        # be enabled application-wide.
         # 
         # == Examples
         # </diff>
      <filename>lib/state_machine/callback.rb</filename>
    </modified>
    <modified>
      <diff>@@ -136,9 +136,9 @@ module PluginAWeek #:nodoc:
     # 
     # When a state machine is defined for classes using any of the above libraries,
     # it will try to automatically determine the integration to use (Agnostic,
-    # ActiveRecord, or DataMapper) based on the class definition.  To see how
-    # each integration affects the machine's behavior, refer to all constants
-    # defined under the PluginAWeek::StateMachine::Integrations namespace.
+    # ActiveRecord, DataMapper, or Sequel) based on the class definition.  To
+    # see how each integration affects the machine's behavior, refer to all
+    # constants defined under the PluginAWeek::StateMachine::Integrations namespace.
     class Machine
       include Assertions
       </diff>
      <filename>lib/state_machine/machine.rb</filename>
    </modified>
    <modified>
      <diff>@@ -47,6 +47,10 @@ class MachineByDefaultTest &lt; Test::Unit::TestCase
     assert !(class &lt;&lt; @machine; ancestors; end).include?(PluginAWeek::StateMachine::Integrations::DataMapper)
   end
   
+  def test_should_not_be_extended_by_the_sequel_integration
+    assert !(class &lt;&lt; @machine; ancestors; end).include?(PluginAWeek::StateMachine::Integrations::Sequel)
+  end
+  
   def test_should_define_a_reader_attribute_for_the_attribute
     assert @object.respond_to?(:state)
   end</diff>
      <filename>test/unit/machine_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>eb75012aecc795f3e4a0c76525dfd60b739b40e9</id>
    </parent>
  </parents>
  <author>
    <name>Aaron Pfeifer</name>
    <email>aaron.pfeifer@gmail.com</email>
  </author>
  <url>http://github.com/pluginaweek/state_machine/commit/b68d4bda69eb177dcbf0a17a4a8b1c302957ce4d</url>
  <id>b68d4bda69eb177dcbf0a17a4a8b1c302957ce4d</id>
  <committed-date>2008-12-14T00:26:47-08:00</committed-date>
  <authored-date>2008-12-14T00:26:47-08:00</authored-date>
  <message>Add Sequel support</message>
  <tree>1ae42eea77406d18984eb619ee5917c06d56f09b</tree>
  <committer>
    <name>Aaron Pfeifer</name>
    <email>aaron.pfeifer@gmail.com</email>
  </committer>
</commit>
