statesman 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 22c81c0ffbcf71e649de15abe178a5e954a043c2
4
- data.tar.gz: ed4c1908ff56199b4c159080ae0cc0ff400674c2
3
+ metadata.gz: caf6d74f912f306c3431c382639a68d14eb70023
4
+ data.tar.gz: 9e551630b7eaff3ba8b045394c0269d9a9536349
5
5
  SHA512:
6
- metadata.gz: 9c37c29ceb18f26fa34e355bfc61728f641a0364380a4ada7202940a6b09e665bff2a14b57a4238886a0cff49dd1abf5cb3d78ff72d07117f03e60373f6d359a
7
- data.tar.gz: f272350cc56eba5975a70e10468fa7a4d4a22661b758f7d1118ae15f7c53dcca93e94352137ddd2af412e6f97c837975a792c5d2c9e7eba83acad4320ca92e91
6
+ metadata.gz: 2eb9f50f24c02c9932c58551d164fda32ec47a844f40291064854dcc0239bfbb058a1fb83e44e8f03c640f6ad77e42725830e4295dc8f0ebf42d24b1775c9b0a
7
+ data.tar.gz: e62600a9070ef38c87677952506c96cda36009a53ac9c9a65997050586f6fcefb293b23f5f679604dbbf46f0da08832e5348581204e7f09e1e42937c40e23cb1
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
- ## v0.8.2 19 August 2014
1
+ ## v0.8.3 2 September 2014
2
+ *Fixes*
3
+
4
+ - Optimisation for Machine#available_events (patch by [@pacso](https://github.com/pacso))
5
+
6
+ ## v0.8.2 2 September 2014
2
7
  *Fixes*
3
8
 
4
9
  - Stop generating a default value for the metadata column if using MySQL.
@@ -251,8 +251,9 @@ module Statesman
251
251
  end
252
252
 
253
253
  def available_events
254
+ state = current_state
254
255
  self.class.events.select do |_, transitions|
255
- transitions.key?(current_state)
256
+ transitions.key?(state)
256
257
  end.map(&:first)
257
258
  end
258
259
 
@@ -1,3 +1,3 @@
1
1
  module Statesman
2
- VERSION = "0.8.2"
2
+ VERSION = "0.8.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statesman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Marr