It's All Text! Editor Daemon

This gem is the core of the It's All Text! Editor Daemon.

The IAT Editor Daemon is a restful web server that allows you to open text data in the editor of your choice.

Bugs and Issues

See the github Issue tracker

Developer Quickstart

  1. bundle install
  2. rake spec

Requirements

  • Ruby (preferrably 1.9.2+, but 1.8.7 should work)

API

The API is documented in the features/extension_*.feature files. You can run cucumber to read them.

Open preferences

GET /preferences requires "token".

Opens a web-page displaying the preferences. Note, there are other URLs that Iated supports for modifying the preferences.

GET /preferences/set-editor require "token".

This opens a dialog on the system running Iated to choose the editor.

Example sessions.

The letter b: is the browser's requests. s: is the server's response. Side-effects are in square braces ([]).

Initial authentication

b: GET /hello
s: ok [a popup with the secret is shown]
b: POST /hello with data: secret=NNNN
s: token=<MMMMMMMMMMMMMMMMM>

Editing session

b: POST /edit text=<textarea data> url=<someurl> id=<textarea-id>
s: <sid>
b: GET /edit/<sid>
s: nochange
b: GET /edit/<sid>
s: <next textarea data>

Iated Dialogs

This is a list of dialogs that Iated needs to be able to generate:

  • Set Editor -- The dialog to select an editor.
  • Auth Code -- A dialog to show the auth-code for entering in the browser.
  • Select Port -- A dialog to select the port to run on for the first time or if changing.

Future notes

At some point I'm going to need concurrancy. I'm thinking jetlang (a java library) is the right way to go. It's Erlang style concurrancy, so it'll scale well and should be safe without having to worry about joins, etc. There is a ruby gem called jretlang

Some info here:

License

Iated is licensed under the MIT License. A LICENSE file should have been included with this code.