| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
You can now specify hold provisions which read "One of (a,b,c)"
|
| |
|
| |
|
|
|
|
|
| |
Don't truss ruby to return the correct name for SomeState.class.name when
SomeState might be passed around in other constants.
|
|
|
|
| |
States which are up should never fork.
|
|
|
|
|
| |
Several locations which through TypeError on invalid argument now further
explain the error.
|
|
|
|
|
| |
Its nearly impossible to get this one working. We should use a declarative
language if we want to be this anal about making things disappear.
|
|
|
|
| |
The dependent now provides information for dep holds
|
|
|
|
| |
No point in having this little two-liner called in one place only.
|
|
|
|
|
| |
State#release will now release all holds which match (should be rare) and
matches holds more correctly.
|
|
|
|
|
| |
State#check_deps used to throw an exception if called for a dropping receiver.
Now check_deps is a no-op on dropping states.
|
|
|
|
|
| |
State::process_event was only checking states that were up, when it should do
the opposite, and wasn't forwarding parameters from the event.
|
|
|
|
|
| |
State#react_to? was looking for an instance variable that was really a class
attribute.
|
|
|
|
|
| |
State::get_all gets all states. When the receiver is a subclass of State it
returns all states of that type.
|
|
|
|
| |
Event matching should now be deterministic
|
|
|
|
| |
Its not a very good solution anyway, so we'll just pop it out.
|
|
|
|
|
| |
State#hash now gives consistent results (finally) and takes deps into account
(again)
|
|
|
|
|
|
| |
States can now receive parameters from the holds placed on them out of a
specific set of parameters marked for this kind of retrieval, /and/ multiple
states can be differentiated based on this mechanism.
|
|
|
|
| |
Capitalization irks me
|
|
|
|
| |
Minor clarification
|
|
|
|
| |
You may now hold with parameters.
|
|
|
|
|
| |
State dependencies are now pairings of Dependency objects and the States which
resolve them
|
|
|
|
| |
StatePattern is now called Dependency
|
|
|
|
|
|
|
| |
The State#to_s method has been modified to only display the direct class name
and not the full module name, and to display parameters. Also, to_s_color has
been added which uses tty color escapes to color its output according to the
state's status.
|
|
|
|
|
|
| |
The State#active attribute, which could be either true or false, is now the
State#status attribute, which can be any of up, down, rising, or dropping. This
added specificity has allowed some consistency fixes.
|
|
|
|
| |
A few tweaks to debug output
|
|
|
|
|
| |
A dropping state now holds its dependencies until after running the falling
edge, but shuts down its dependents before.
|
|
|
|
|
| |
State::release can be called to release all states of a type. Also State::hold
and State::release both now return a list of states they attempted to act on.
|
|
|
|
|
| |
referral to self.class.depends left over from when actual deps were stored
there.
|
|
|
|
|
| |
Array#inject had no argument in State#params, again leading to problems when
running against a single-element array.
|
|
|
|
| |
For synchronization, delay dropping the class until after the state has changed.
|
|
|
|
|
| |
State#hold and State#release now return the receiver. Also, State#release no
longer calls a nonexistent method on the hold set.
|
|
|
|
|
|
| |
State#check_deps now returns as soon as it has found a missing dep. The raised
ConsistencyFault now has a message, and the self-stripping of methods that dead
states perform no longer throws exceptions.
|
|
|
|
| |
Classes now have to_s methods and eql? methods which are identical to ==
|
|
|
|
| |
Added a new trace method to output debuginfo
|
|
|
|
| |
Code had assumed State had a deps attribute. It now does.
|
|
|
|
| |
State::hold now holds all states of the given type
|
|
|
|
| |
The check for inheritance was in the wrong direction
|
|
|
|
| |
The params argument to Hold#initialize now has a default value
|
|
|
|
|
| |
State#rise was looking at class-level deps, which is incorrect and which caused
an error since class-level deps aren't State objects.
|
|
|
|
|
| |
Injecting with no prepend argument can cause nil to be returned where not
expected.
|
|
|
|
| |
respond_to? is an API method in ruby
|
|
|
|
| |
Services with no dependencies no longer cause failure
|
|
|
|
| |
As soon as a type exists, try to bring it up
|
|
|
|
| |
Ruby 1.8.6 doesn't have Array#product, so add it
|
|
|
|
|
|
| |
Make sure state isn't using @params anywhere.
Also a minor format fix in the params method
|
|
|
|
| |
The params attribute is now a method that aggregates parameters on demand
|
|
|
|
| |
State hash function now will match for states that should be equivalent
|
|
|
|
| |
Fix comment for release method
|
|
|
|
| |
A state rising or falling now causes dep resolution
|