micromachine 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,9 +30,8 @@ class MicroMachine
30
30
  end
31
31
 
32
32
  def trigger?(event)
33
+ raise InvalidEvent unless transitions_for.has_key?(event)
33
34
  transitions_for[event][state] ? true : false
34
- rescue NoMethodError
35
- raise InvalidEvent
36
35
  end
37
36
 
38
37
  def events
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'micromachine'
3
- s.version = '1.0.3'
3
+ s.version = '1.0.4'
4
4
  s.summary = %{Minimal Finite State Machine.}
5
5
  s.description = %Q{There are many finite state machine implementations for Ruby, and they all provide a nice DSL for declaring events, exceptions, callbacks, and all kinds of niceties in general.\n\nBut if all you want is a finite state machine, look no further: this has less than 50 lines of code and provides everything a finite state machine must have, and nothing more.}
6
6
  s.author = "Michel Martens"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: micromachine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-16 00:00:00.000000000 Z
12
+ date: 2012-05-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: contest
16
- requirement: &2156010040 !ruby/object:Gem::Requirement
16
+ requirement: &2152016720 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2156010040
24
+ version_requirements: *2152016720
25
25
  description: ! 'There are many finite state machine implementations for Ruby, and
26
26
  they all provide a nice DSL for declaring events, exceptions, callbacks, and all
27
27
  kinds of niceties in general.