From 6e16196f20d25a4575ecd90883825cdd157eef6a Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Fri, 27 Feb 2009 17:41:46 -0600 Subject: [PATCH] Added array option for new callbacks --- Rakefile | 6 +++--- aasm.gemspec | 2 +- lib/aasm.rb | 2 +- lib/event.rb | 2 ++ lib/state.rb | 2 ++ 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index dc21a58..b4bd5f2 100644 --- a/Rakefile +++ b/Rakefile @@ -53,9 +53,9 @@ else s.extra_rdoc_files = rd.rdoc_files.reject {|fn| fn =~ /\.rb$/}.to_a s.rdoc_options = rd.options - s.author = 'Scott Barron' - s.email = 'scott@elitists.net' - s.homepage = 'http://rubyi.st/aasm' + s.authors = ['Scott Barron', 'Scott Petersen'] + s.email = 'petersen@dunedain289.com' + s.homepage = 'http://github.com/dunedain289/aasm' end package_task = Rake::GemPackageTask.new(spec) do |pkg| diff --git a/aasm.gemspec b/aasm.gemspec index 0cbbc5d..993c5a8 100644 --- a/aasm.gemspec +++ b/aasm.gemspec @@ -2,7 +2,7 @@ PKG_FILES = ["CHANGELOG", "MIT-LICENSE", "Rakefile", "README.rdoc", "TODO", "lib Gem::Specification.new do |s| s.name = 'aasm' - s.version = "2.1" + s.version = "2.1.1" s.summary = 'State machine mixin for Ruby objects' s.description = <<-EOF AASM is a continuation of the acts as state machine rails plugin, built for plain Ruby objects. diff --git a/lib/aasm.rb b/lib/aasm.rb index fa59815..5e0fe00 100644 --- a/lib/aasm.rb +++ b/lib/aasm.rb @@ -5,7 +5,7 @@ require File.join(File.dirname(__FILE__), 'persistence') module AASM def self.Version - '2.0.5' + '2.1.1' end class InvalidTransition < RuntimeError diff --git a/lib/event.rb b/lib/event.rb index a842c6c..2c7bed3 100644 --- a/lib/event.rb +++ b/lib/event.rb @@ -51,6 +51,8 @@ module AASM record.send(action) when Proc action.call(record) + when Array + action.each { |a| record.send(a) } end end diff --git a/lib/state.rb b/lib/state.rb index af74d74..477f701 100644 --- a/lib/state.rb +++ b/lib/state.rb @@ -22,6 +22,8 @@ module AASM record.send(action) when Proc action.call(record) + when Array + action.each { |a| record.send(a) } end end