dm-is-persistent_state_machine 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dm-is-persistent_state_machine}
8
- s.version = "0.1.6"
8
+ s.version = "0.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["michael"]
12
- s.date = %q{2010-02-04}
12
+ s.date = %q{2010-02-05}
13
13
  s.description = %q{A persistent State Machine for DataMapper}
14
14
  s.email = %q{ma@zive.at}
15
15
  s.extra_rdoc_files = [
@@ -123,7 +123,7 @@ module DataMapper
123
123
 
124
124
  after :save do
125
125
  if (@prev_state && @prev_state != state)
126
- @state_change = state_change_model.create(:from => @prev_state, :to => state, :created_at => DateTime.now, :user => @user, Extlib::Inflection.foreign_key(target_model_name).to_sym => self.id)
126
+ @state_change = state_change_model.create(:from => @prev_state, :to => state, :created_at => DateTime.now, :user => @updating_user, Extlib::Inflection.foreign_key(target_model_name).to_sym => self.id)
127
127
  @prev_state = nil # clean up cache
128
128
  @user = nil
129
129
  end
@@ -144,7 +144,7 @@ module DataMapper
144
144
  def trigger_event!(event_code, user)
145
145
  # cache prev_state and the user that is triggering the event
146
146
  @prev_state = self.state
147
- @user = user
147
+ @updating_user = user
148
148
 
149
149
  # delegate to State#trigger!
150
150
  self.state.trigger_event!(self, event_code)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-is-persistent_state_machine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - michael
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-04 00:00:00 +01:00
12
+ date: 2010-02-05 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency