alter-ego-activerecord 0.1.1 → 0.1.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.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('alter-ego-activerecord', '0.1.1') do |p|
5
+ Echoe.new('alter-ego-activerecord', '0.1.2') do |p|
6
6
  p.description = "Adapter to allow ActiveRecord to persist and restore state of objects using the AlterEgo state machine"
7
7
  p.author = "Paul Hieromnimon"
8
8
  p.email = "paul.hieromnimon@gmail.com"
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{alter-ego-activerecord}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Paul Hieromnimon"]
9
- s.date = %q{2010-08-14}
9
+ s.date = %q{2010-09-30}
10
10
  s.description = %q{Adapter to allow ActiveRecord to persist and restore state of objects using the AlterEgo state machine}
11
11
  s.email = %q{paul.hieromnimon@gmail.com}
12
12
  s.extra_rdoc_files = ["README.rdoc", "lib/alter_ego/active_record_adapter.rb"]
@@ -16,11 +16,11 @@ module AlterEgo
16
16
  # in @attributes["state"] instead of @state
17
17
  def state=(identifier)
18
18
  # state needs to always be stored as a string - symbol serialization is strange
19
- @attributes["state"] = identifier.to_s unless identifier.nil?
19
+ write_attribute("state", identifier.to_s) unless identifier.nil?
20
20
  end
21
21
 
22
22
  def state
23
- result = ( @attributes["state"] || self.class.default_state)
23
+ result = ( read_attribute("state") || self.class.default_state)
24
24
  result = result.to_sym unless result.nil?
25
25
  assert(result.nil? || self.class.states.keys.include?(result))
26
26
  result
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alter-ego-activerecord
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paul Hieromnimon
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-14 00:00:00 -07:00
18
+ date: 2010-09-30 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency