micromachine 1.0.4 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 707ffde016887ae675ddd25388e8ca9376cb1547
4
+ data.tar.gz: 301bcfd9f251f538dbc5b170660e022f1aa6089c
5
+ SHA512:
6
+ metadata.gz: 2f2c63e4af76fe25a6aa7ecf16d3731f9513745a8fe74fb626961340edb63be2f5ded471194d0334b0c2f0581e7151e961ef98ad858c9b9e43ad37c54e2fc549
7
+ data.tar.gz: 8acbe242c04c4f96b6e981a8ef15275dbf6fdb5297dbb6120d7d55d0432ebe9e2f1a91f2f4bb5b6485bd71bde66ccc2b85b5db03d301e8bab5bc3586e2ffa290
@@ -38,6 +38,10 @@ class MicroMachine
38
38
  transitions_for.keys
39
39
  end
40
40
 
41
+ def states
42
+ events.map { |e| transitions_for[e].to_a }.flatten.uniq
43
+ end
44
+
41
45
  def ==(some_state)
42
46
  state == some_state
43
47
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'micromachine'
3
- s.version = '1.0.4'
3
+ s.version = '1.1.0'
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,35 +1,33 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: micromachine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
5
- prerelease:
4
+ version: 1.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Michel Martens
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-05-15 00:00:00.000000000 Z
11
+ date: 2013-08-08 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: contest
16
- requirement: &2152016720 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
- version_requirements: *2152016720
25
- description: ! 'There are many finite state machine implementations for Ruby, and
26
- they all provide a nice DSL for declaring events, exceptions, callbacks, and all
27
- kinds of niceties in general.
28
-
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: |-
28
+ 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.
29
29
 
30
- But if all you want is a finite state machine, look no further: this has less than
31
- 50 lines of code and provides everything a finite state machine must have, and nothing
32
- more.'
30
+ But 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.
33
31
  email: michel@soveran.com
34
32
  executables: []
35
33
  extensions: []
@@ -42,26 +40,25 @@ files:
42
40
  - micromachine.gemspec
43
41
  homepage: http://github.com/soveran/micromachine
44
42
  licenses: []
43
+ metadata: {}
45
44
  post_install_message:
46
45
  rdoc_options: []
47
46
  require_paths:
48
47
  - lib
49
48
  required_ruby_version: !ruby/object:Gem::Requirement
50
- none: false
51
49
  requirements:
52
- - - ! '>='
50
+ - - '>='
53
51
  - !ruby/object:Gem::Version
54
52
  version: '0'
55
53
  required_rubygems_version: !ruby/object:Gem::Requirement
56
- none: false
57
54
  requirements:
58
- - - ! '>='
55
+ - - '>='
59
56
  - !ruby/object:Gem::Version
60
57
  version: '0'
61
58
  requirements: []
62
59
  rubyforge_project:
63
- rubygems_version: 1.8.11
60
+ rubygems_version: 2.0.3
64
61
  signing_key:
65
- specification_version: 3
62
+ specification_version: 4
66
63
  summary: Minimal Finite State Machine.
67
64
  test_files: []