state_machines-activemodel 0.100.0 → 0.101.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/lib/state_machines/integrations/active_model/version.rb +1 -1
 - data/test/integration_test.rb +1 -1
 - data/test/machine_initialization_compatibility_test.rb +1 -4
 - data/test/machine_multiple_test.rb +1 -1
 - data/test/machine_with_dirty_attribute_and_custom_attributes_during_loopback_test.rb +5 -4
 - data/test/machine_with_dirty_attribute_and_state_events_test.rb +4 -4
 - data/test/machine_with_dirty_attributes_and_custom_attribute_test.rb +8 -7
 - data/test/machine_with_dirty_attributes_during_loopback_test.rb +4 -4
 - data/test/machine_with_dirty_attributes_test.rb +7 -7
 - data/test/machine_with_initialized_aliased_attribute_test.rb +11 -2
 - data/test/machine_with_non_model_state_attribute_undefined_test.rb +2 -3
 - data/test/test_helper.rb +22 -27
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: ca8150306fc5ce879e2c381e4689b049b5208189f4e15efb4f6a0d378647cbb5
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 1bad79de7e3337208c134dcea4fbaa90eee5677182dca38f6bfd4b9b943546b9
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 1d8cca8f00006c4a43b9c82fade3babc662027b7d5971c5d009c9b6da087cc3d93a4ed60a2f8656cb59346c1dfab115405f23db2237b25e185ac718ca09f8e1f
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 8a39da61112b9c6e7869e1d4779381062857ea36ffd1e026031c04852f30561d3cacc60e8a0a98daa112576924009d109f02fb1f738672996a7ec5a89b2ef6bc
         
     | 
    
        data/test/integration_test.rb
    CHANGED
    
    | 
         @@ -20,7 +20,7 @@ class IntegrationTest < BaseTestCase 
     | 
|
| 
       20 
20 
     | 
    
         
             
              end
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
              def test_should_not_match_if_class_does_not_include_active_model_features
         
     | 
| 
       23 
     | 
    
         
            -
                refute StateMachines::Integrations::ActiveModel.matches?( 
     | 
| 
      
 23 
     | 
    
         
            +
                refute StateMachines::Integrations::ActiveModel.matches?(new_plain_model)
         
     | 
| 
       24 
24 
     | 
    
         
             
              end
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
       26 
26 
     | 
    
         
             
              def test_should_have_no_defaults
         
     | 
| 
         @@ -6,7 +6,6 @@ class MachineInitializationCompatibilityTest < BaseTestCase 
     | 
|
| 
       6 
6 
     | 
    
         
             
              def setup
         
     | 
| 
       7 
7 
     | 
    
         
             
                @model = new_model do
         
     | 
| 
       8 
8 
     | 
    
         
             
                  include ActiveModel::Validations
         
     | 
| 
       9 
     | 
    
         
            -
                  attr_accessor :state
         
     | 
| 
       10 
9 
     | 
    
         
             
                end
         
     | 
| 
       11 
10 
     | 
    
         | 
| 
       12 
11 
     | 
    
         
             
                @machine = StateMachines::Machine.new(@model, initial: :parked)
         
     | 
| 
         @@ -31,9 +30,7 @@ class MachineInitializationCompatibilityTest < BaseTestCase 
     | 
|
| 
       31 
30 
     | 
    
         | 
| 
       32 
31 
     | 
    
         
             
              def test_should_handle_attribute_aliases
         
     | 
| 
       33 
32 
     | 
    
         
             
                @model.class_eval do
         
     | 
| 
       34 
     | 
    
         
            -
                   
     | 
| 
       35 
     | 
    
         
            -
                    { 'status' => 'state' }
         
     | 
| 
       36 
     | 
    
         
            -
                  end
         
     | 
| 
      
 33 
     | 
    
         
            +
                  alias_attribute :status, :state
         
     | 
| 
       37 
34 
     | 
    
         
             
                end
         
     | 
| 
       38 
35 
     | 
    
         | 
| 
       39 
36 
     | 
    
         
             
                record = @model.new(status: 'idling')
         
     | 
| 
         @@ -5,13 +5,14 @@ require 'test_helper' 
     | 
|
| 
       5 
5 
     | 
    
         
             
            class MachineWithDirtyAttributeAndCustomAttributesDuringLoopbackTest < BaseTestCase
         
     | 
| 
       6 
6 
     | 
    
         
             
              def setup
         
     | 
| 
       7 
7 
     | 
    
         
             
                @model = new_model do
         
     | 
| 
       8 
     | 
    
         
            -
                   
     | 
| 
       9 
     | 
    
         
            -
                  model_attribute :status
         
     | 
| 
       10 
     | 
    
         
            -
                  define_attribute_methods [:status]
         
     | 
| 
      
 8 
     | 
    
         
            +
                  attribute :status, :string
         
     | 
| 
       11 
9 
     | 
    
         | 
| 
       12 
10 
     | 
    
         
             
                  def save
         
     | 
| 
       13 
     | 
    
         
            -
                     
     | 
| 
      
 11 
     | 
    
         
            +
                    if valid?
         
     | 
| 
       14 
12 
     | 
    
         
             
                      changes_applied
         
     | 
| 
      
 13 
     | 
    
         
            +
                      true
         
     | 
| 
      
 14 
     | 
    
         
            +
                    else
         
     | 
| 
      
 15 
     | 
    
         
            +
                      false
         
     | 
| 
       15 
16 
     | 
    
         
             
                    end
         
     | 
| 
       16 
17 
     | 
    
         
             
                  end
         
     | 
| 
       17 
18 
     | 
    
         
             
                end
         
     | 
| 
         @@ -5,12 +5,12 @@ require 'test_helper' 
     | 
|
| 
       5 
5 
     | 
    
         
             
            class MachineWithDirtyAttributeAndStateEventsTest < BaseTestCase
         
     | 
| 
       6 
6 
     | 
    
         
             
              def setup
         
     | 
| 
       7 
7 
     | 
    
         
             
                @model = new_model do
         
     | 
| 
       8 
     | 
    
         
            -
                  include ActiveModel::Dirty
         
     | 
| 
       9 
     | 
    
         
            -
                  define_attribute_methods [:state]
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
8 
     | 
    
         
             
                  def save
         
     | 
| 
       12 
     | 
    
         
            -
                     
     | 
| 
      
 9 
     | 
    
         
            +
                    if valid?
         
     | 
| 
       13 
10 
     | 
    
         
             
                      changes_applied
         
     | 
| 
      
 11 
     | 
    
         
            +
                      true
         
     | 
| 
      
 12 
     | 
    
         
            +
                    else
         
     | 
| 
      
 13 
     | 
    
         
            +
                      false
         
     | 
| 
       14 
14 
     | 
    
         
             
                    end
         
     | 
| 
       15 
15 
     | 
    
         
             
                  end
         
     | 
| 
       16 
16 
     | 
    
         
             
                end
         
     | 
| 
         @@ -5,13 +5,14 @@ require 'test_helper' 
     | 
|
| 
       5 
5 
     | 
    
         
             
            class MachineWithDirtyAttributesAndCustomAttributeTest < BaseTestCase
         
     | 
| 
       6 
6 
     | 
    
         
             
              def setup
         
     | 
| 
       7 
7 
     | 
    
         
             
                @model = new_model do
         
     | 
| 
       8 
     | 
    
         
            -
                   
     | 
| 
       9 
     | 
    
         
            -
                  model_attribute :status
         
     | 
| 
       10 
     | 
    
         
            -
                  define_attribute_methods [:status]
         
     | 
| 
      
 8 
     | 
    
         
            +
                  attribute :status, :string
         
     | 
| 
       11 
9 
     | 
    
         | 
| 
       12 
10 
     | 
    
         
             
                  def save
         
     | 
| 
       13 
     | 
    
         
            -
                     
     | 
| 
      
 11 
     | 
    
         
            +
                    if valid?
         
     | 
| 
       14 
12 
     | 
    
         
             
                      changes_applied
         
     | 
| 
      
 13 
     | 
    
         
            +
                      true
         
     | 
| 
      
 14 
     | 
    
         
            +
                    else
         
     | 
| 
      
 15 
     | 
    
         
            +
                      false
         
     | 
| 
       15 
16 
     | 
    
         
             
                    end
         
     | 
| 
       16 
17 
     | 
    
         
             
                  end
         
     | 
| 
       17 
18 
     | 
    
         
             
                end
         
     | 
| 
         @@ -26,17 +27,17 @@ class MachineWithDirtyAttributesAndCustomAttributeTest < BaseTestCase 
     | 
|
| 
       26 
27 
     | 
    
         
             
              end
         
     | 
| 
       27 
28 
     | 
    
         | 
| 
       28 
29 
     | 
    
         
             
              def test_should_include_state_in_changed_attributes
         
     | 
| 
       29 
     | 
    
         
            -
                assert_equal %w 
     | 
| 
      
 30 
     | 
    
         
            +
                assert_equal %w[status], @record.changed
         
     | 
| 
       30 
31 
     | 
    
         
             
              end
         
     | 
| 
       31 
32 
     | 
    
         | 
| 
       32 
33 
     | 
    
         
             
              def test_should_track_attribute_change
         
     | 
| 
       33 
     | 
    
         
            -
                assert_equal %w 
     | 
| 
      
 34 
     | 
    
         
            +
                assert_equal %w[parked idling], @record.changes['status']
         
     | 
| 
       34 
35 
     | 
    
         
             
              end
         
     | 
| 
       35 
36 
     | 
    
         | 
| 
       36 
37 
     | 
    
         
             
              def test_should_not_reset_changes_on_multiple_transitions
         
     | 
| 
       37 
38 
     | 
    
         
             
                transition = StateMachines::Transition.new(@record, @machine, :ignite, :idling, :idling)
         
     | 
| 
       38 
39 
     | 
    
         
             
                transition.perform
         
     | 
| 
       39 
40 
     | 
    
         | 
| 
       40 
     | 
    
         
            -
                assert_equal %w 
     | 
| 
      
 41 
     | 
    
         
            +
                assert_equal %w[parked idling], @record.changes['status']
         
     | 
| 
       41 
42 
     | 
    
         
             
              end
         
     | 
| 
       42 
43 
     | 
    
         
             
            end
         
     | 
| 
         @@ -5,12 +5,12 @@ require 'test_helper' 
     | 
|
| 
       5 
5 
     | 
    
         
             
            class MachineWithDirtyAttributesDuringLoopbackTest < BaseTestCase
         
     | 
| 
       6 
6 
     | 
    
         
             
              def setup
         
     | 
| 
       7 
7 
     | 
    
         
             
                @model = new_model do
         
     | 
| 
       8 
     | 
    
         
            -
                  include ActiveModel::Dirty
         
     | 
| 
       9 
     | 
    
         
            -
                  define_attribute_methods [:state]
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
8 
     | 
    
         
             
                  def save
         
     | 
| 
       12 
     | 
    
         
            -
                     
     | 
| 
      
 9 
     | 
    
         
            +
                    if valid?
         
     | 
| 
       13 
10 
     | 
    
         
             
                      changes_applied
         
     | 
| 
      
 11 
     | 
    
         
            +
                      true
         
     | 
| 
      
 12 
     | 
    
         
            +
                    else
         
     | 
| 
      
 13 
     | 
    
         
            +
                      false
         
     | 
| 
       14 
14 
     | 
    
         
             
                    end
         
     | 
| 
       15 
15 
     | 
    
         
             
                  end
         
     | 
| 
       16 
16 
     | 
    
         
             
                end
         
     | 
| 
         @@ -5,12 +5,12 @@ require 'test_helper' 
     | 
|
| 
       5 
5 
     | 
    
         
             
            class MachineWithDirtyAttributesTest < BaseTestCase
         
     | 
| 
       6 
6 
     | 
    
         
             
              def setup
         
     | 
| 
       7 
7 
     | 
    
         
             
                @model = new_model do
         
     | 
| 
       8 
     | 
    
         
            -
                  include ActiveModel::Dirty
         
     | 
| 
       9 
     | 
    
         
            -
                  define_attribute_methods [:state]
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
8 
     | 
    
         
             
                  def save
         
     | 
| 
       12 
     | 
    
         
            -
                     
     | 
| 
      
 9 
     | 
    
         
            +
                    if valid?
         
     | 
| 
       13 
10 
     | 
    
         
             
                      changes_applied
         
     | 
| 
      
 11 
     | 
    
         
            +
                      true
         
     | 
| 
      
 12 
     | 
    
         
            +
                    else
         
     | 
| 
      
 13 
     | 
    
         
            +
                      false
         
     | 
| 
       14 
14 
     | 
    
         
             
                    end
         
     | 
| 
       15 
15 
     | 
    
         
             
                  end
         
     | 
| 
       16 
16 
     | 
    
         
             
                end
         
     | 
| 
         @@ -25,17 +25,17 @@ class MachineWithDirtyAttributesTest < BaseTestCase 
     | 
|
| 
       25 
25 
     | 
    
         
             
              end
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
27 
     | 
    
         
             
              def test_should_include_state_in_changed_attributes
         
     | 
| 
       28 
     | 
    
         
            -
                assert_equal %w 
     | 
| 
      
 28 
     | 
    
         
            +
                assert_equal %w[state], @record.changed
         
     | 
| 
       29 
29 
     | 
    
         
             
              end
         
     | 
| 
       30 
30 
     | 
    
         | 
| 
       31 
31 
     | 
    
         
             
              def test_should_track_attribute_change
         
     | 
| 
       32 
     | 
    
         
            -
                assert_equal %w 
     | 
| 
      
 32 
     | 
    
         
            +
                assert_equal %w[parked idling], @record.changes['state']
         
     | 
| 
       33 
33 
     | 
    
         
             
              end
         
     | 
| 
       34 
34 
     | 
    
         | 
| 
       35 
35 
     | 
    
         
             
              def test_should_not_reset_changes_on_multiple_transitions
         
     | 
| 
       36 
36 
     | 
    
         
             
                transition = StateMachines::Transition.new(@record, @machine, :ignite, :idling, :idling)
         
     | 
| 
       37 
37 
     | 
    
         
             
                transition.perform
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
     | 
    
         
            -
                assert_equal %w 
     | 
| 
      
 39 
     | 
    
         
            +
                assert_equal %w[parked idling], @record.changes['state']
         
     | 
| 
       40 
40 
     | 
    
         
             
              end
         
     | 
| 
       41 
41 
     | 
    
         
             
            end
         
     | 
| 
         @@ -6,6 +6,7 @@ class MachineWithInitializedAliasedAttributeTest < BaseTestCase 
     | 
|
| 
       6 
6 
     | 
    
         
             
              def test_should_match_original_attribute_value_with_attribute_methods
         
     | 
| 
       7 
7 
     | 
    
         
             
                model = new_model do
         
     | 
| 
       8 
8 
     | 
    
         
             
                  include ActiveModel::AttributeMethods
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
       9 
10 
     | 
    
         
             
                  alias_attribute :custom_status, :state
         
     | 
| 
       10 
11 
     | 
    
         
             
                end
         
     | 
| 
       11 
12 
     | 
    
         | 
| 
         @@ -19,7 +20,16 @@ class MachineWithInitializedAliasedAttributeTest < BaseTestCase 
     | 
|
| 
       19 
20 
     | 
    
         
             
              end
         
     | 
| 
       20 
21 
     | 
    
         | 
| 
       21 
22 
     | 
    
         
             
              def test_should_not_match_original_attribute_value_without_attribute_methods
         
     | 
| 
       22 
     | 
    
         
            -
                model =  
     | 
| 
      
 23 
     | 
    
         
            +
                model = new_plain_model do
         
     | 
| 
      
 24 
     | 
    
         
            +
                  include ActiveModel::Model
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                  attr_accessor :state
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                  def self.alias_attribute(new_name, old_name)
         
     | 
| 
      
 29 
     | 
    
         
            +
                    alias_method new_name, old_name
         
     | 
| 
      
 30 
     | 
    
         
            +
                    alias_method "#{new_name}=", "#{old_name}="
         
     | 
| 
      
 31 
     | 
    
         
            +
                  end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
       23 
33 
     | 
    
         
             
                  alias_attribute :custom_status, :state
         
     | 
| 
       24 
34 
     | 
    
         
             
                end
         
     | 
| 
       25 
35 
     | 
    
         | 
| 
         @@ -32,4 +42,3 @@ class MachineWithInitializedAliasedAttributeTest < BaseTestCase 
     | 
|
| 
       32 
42 
     | 
    
         
             
                refute record.state?(:started)
         
     | 
| 
       33 
43 
     | 
    
         
             
              end
         
     | 
| 
       34 
44 
     | 
    
         
             
            end
         
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
         @@ -4,9 +4,8 @@ require 'test_helper' 
     | 
|
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            class MachineWithNonModelStateAttributeUndefinedTest < BaseTestCase
         
     | 
| 
       6 
6 
     | 
    
         
             
              def setup
         
     | 
| 
       7 
     | 
    
         
            -
                @model =  
     | 
| 
       8 
     | 
    
         
            -
                  def initialize
         
     | 
| 
       9 
     | 
    
         
            -
                  end
         
     | 
| 
      
 7 
     | 
    
         
            +
                @model = new_plain_model do
         
     | 
| 
      
 8 
     | 
    
         
            +
                  def initialize; end
         
     | 
| 
       10 
9 
     | 
    
         
             
                end
         
     | 
| 
       11 
10 
     | 
    
         | 
| 
       12 
11 
     | 
    
         
             
                @machine = StateMachines::Machine.new(@model, :status, initial: :parked, integration: :active_model)
         
     | 
    
        data/test/test_helper.rb
    CHANGED
    
    | 
         @@ -11,45 +11,40 @@ I18n.enforce_available_locales = true 
     | 
|
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
            class BaseTestCase < ActiveSupport::TestCase
         
     | 
| 
       13 
13 
     | 
    
         
             
              protected
         
     | 
| 
       14 
     | 
    
         
            -
              # Creates a new ActiveModel model (and the associated table)
         
     | 
| 
       15 
     | 
    
         
            -
              def new_model(&block)
         
     | 
| 
       16 
     | 
    
         
            -
                # Simple ActiveModel superclass
         
     | 
| 
       17 
     | 
    
         
            -
                parent = Class.new do
         
     | 
| 
       18 
     | 
    
         
            -
                  def self.model_attribute(name)
         
     | 
| 
       19 
     | 
    
         
            -
                    define_method(name) { instance_variable_defined?(:"@#{name}") ? instance_variable_get(:"@#{name}") : nil }
         
     | 
| 
       20 
     | 
    
         
            -
                    define_method("#{name}=") do |value|
         
     | 
| 
       21 
     | 
    
         
            -
                      send(:"#{name}_will_change!") if self.class <= ActiveModel::Dirty && value != send(name)
         
     | 
| 
       22 
     | 
    
         
            -
                      instance_variable_set("@#{name}", value)
         
     | 
| 
       23 
     | 
    
         
            -
                    end
         
     | 
| 
       24 
     | 
    
         
            -
                  end
         
     | 
| 
       25 
14 
     | 
    
         | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
      
 15 
     | 
    
         
            +
              # Creates a plain model without ActiveModel features
         
     | 
| 
      
 16 
     | 
    
         
            +
              def new_plain_model(&block)
         
     | 
| 
      
 17 
     | 
    
         
            +
                model = Class.new do
         
     | 
| 
      
 18 
     | 
    
         
            +
                  def self.name
         
     | 
| 
      
 19 
     | 
    
         
            +
                    'Foo'
         
     | 
| 
       30 
20 
     | 
    
         
             
                  end
         
     | 
| 
      
 21 
     | 
    
         
            +
                end
         
     | 
| 
       31 
22 
     | 
    
         | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
                    attrs.each { |attr, value| send("#{attr}=", value) }
         
     | 
| 
       34 
     | 
    
         
            -
                  end
         
     | 
| 
      
 23 
     | 
    
         
            +
                model.class_eval(&block) if block_given?
         
     | 
| 
       35 
24 
     | 
    
         | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
                  end
         
     | 
| 
      
 25 
     | 
    
         
            +
                model
         
     | 
| 
      
 26 
     | 
    
         
            +
              end
         
     | 
| 
       39 
27 
     | 
    
         | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
      
 28 
     | 
    
         
            +
              # Creates a new ActiveModel model (and the associated table)
         
     | 
| 
      
 29 
     | 
    
         
            +
              def new_model(&block)
         
     | 
| 
      
 30 
     | 
    
         
            +
                model = Class.new do
         
     | 
| 
      
 31 
     | 
    
         
            +
                  include ActiveModel::Model
         
     | 
| 
      
 32 
     | 
    
         
            +
                  include ActiveModel::Attributes
         
     | 
| 
      
 33 
     | 
    
         
            +
                  include ActiveModel::Dirty
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                  attribute :state, :string
         
     | 
| 
       44 
36 
     | 
    
         | 
| 
       45 
     | 
    
         
            -
                model = Class.new(parent) do
         
     | 
| 
       46 
37 
     | 
    
         
             
                  def self.name
         
     | 
| 
       47 
38 
     | 
    
         
             
                    'Foo'
         
     | 
| 
       48 
39 
     | 
    
         
             
                  end
         
     | 
| 
       49 
40 
     | 
    
         | 
| 
       50 
     | 
    
         
            -
                   
     | 
| 
      
 41 
     | 
    
         
            +
                  def self.create
         
     | 
| 
      
 42 
     | 
    
         
            +
                    new.tap { |instance| instance.save if instance.respond_to?(:save) }
         
     | 
| 
      
 43 
     | 
    
         
            +
                  end
         
     | 
| 
       51 
44 
     | 
    
         
             
                end
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
       52 
46 
     | 
    
         
             
                model.class_eval(&block) if block_given?
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
       53 
48 
     | 
    
         
             
                model
         
     | 
| 
       54 
49 
     | 
    
         
             
              end
         
     | 
| 
       55 
50 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: state_machines-activemodel
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.101.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Abdelkader Boudih
         
     | 
| 
         @@ -16,14 +16,14 @@ dependencies: 
     | 
|
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
17 
     | 
    
         
             
                - - ">="
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version: 0.100. 
     | 
| 
      
 19 
     | 
    
         
            +
                    version: 0.100.4
         
     | 
| 
       20 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       21 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       23 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       24 
24 
     | 
    
         
             
                - - ">="
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
     | 
    
         
            -
                    version: 0.100. 
     | 
| 
      
 26 
     | 
    
         
            +
                    version: 0.100.4
         
     | 
| 
       27 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
28 
     | 
    
         
             
              name: activemodel
         
     | 
| 
       29 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     |