state_manager 0.3.1 → 0.3.2

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.
@@ -74,7 +74,12 @@ module StateManager
74
74
  def run_after_callbacks(*args)
75
75
  end
76
76
  end
77
- end
77
+ end
78
+
79
+ def initialize(*)
80
+ super
81
+ self.uncommitted_transitions = []
82
+ end
78
83
 
79
84
  def transition_to(*args)
80
85
  raise(DirtyTransition, "Only one state transition may be performed before saving a record. This error could be caused by the record being initialized to a default state.") if pending_transition
@@ -90,7 +95,6 @@ module StateManager
90
95
  return unless pending_transition
91
96
  transition = pending_transition
92
97
 
93
- self.uncommitted_transitions ||= []
94
98
  self.uncommitted_transitions << self.pending_transition
95
99
  self.pending_transition = nil
96
100
 
@@ -1,3 +1,3 @@
1
1
  module StateManager
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: state_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-27 00:00:00.000000000 Z
12
+ date: 2014-06-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -67,7 +67,6 @@ executables: []
67
67
  extensions: []
68
68
  extra_rdoc_files: []
69
69
  files:
70
- - ".document"
71
70
  - ".gitignore"
72
71
  - ".travis.yml"
73
72
  - Gemfile
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt