Closed faultyserver closed 8 years ago
FWIW, this is done. The REPL is automatically started when Shark is run in the test
environment.
Example:
$ bin/shark -c config/citybus.rb -e test
| Loading configuration
| Loading agency
| Preparing environment
| Ready
>> fetch 'vehicles.4008'
=> #<Shark::Vehicle:0x007ffed30aaaa8 @associated_objects={}, @name="4008", @latitude=40.4191925, @longitude=-86.894239666667, @route="routes.1B", @last_station="stations.BUS215">
>>
With that, I'm going to close this issue. It doesn't mean that the REPL is finished, just that there is a working REPL with helpers.
There should be a system that allows developers to run an instance of Shark that exposes a REPL, allowing them to interact with and inspect Events as the pass through the system. Ideally, the REPL could be inserted anywhere above
Agency
in the Middleware stack, but will default to the end of the stack.Running the REPL should be simple, something akin to
An example of a session with the REPL:
Essentially, the REPL should be an instance of IRB (or rather, Ripl) with a few helpers defined to make interacting with events simpler.