Project

lackie

0.0
No commit activity in last 3 years
No release in over 3 years
Automates remote applications using an HTTP middleman
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.10.0
~> 1.1.5
~> 2.2.0

Runtime

~> 1.4.6
~> 1.2.1
~> 1.4.2
 Project Readme

Lackie¶ ↑

Why?¶ ↑

I built Lackie to drive the development an application on a JavaScript platform that was so non-standard that other tools freaked out. The code is as platform-independent as I could make it, so if that’s important to you it will be a good fit, but otherwise you will get better performance and support from a functionally equivalent and more robust solution such as socket.io.

About¶ ↑

Lackie enables automation of remote applications using an HTTP middleman:

Ruby Client -> Lackie Service <- Remote App

Lackie automates applications running in environments that are difficult to control remotely. Lackie requires minimal support in target environments: scheduling (e.g. window.setInterval) and HTTP client capabilities (e.g. ajax).

Where it’s difficult to programmatically launch the remote application, it can be started manually before the automation begins. Lackie effectively “attaches” itself to the running “zombie” application.

Lackie uses an HTTP service as a proxy for application automation commands:

1. application surrenders control to automation
2. the surrendered application polls Lackie for commands
3. the automator sends a command to Lackie
4. the application executes the command and sends the result to Lackie
5. the automator polls Lackie and receives the result (or error)

Usage¶ ↑

Lackie is implemented as rack middleware, so:

require 'rack'
require 'lackie'
require 'lackie/rack'

Rack::Builder.app do
  use Lackie::Rack::Middleware
  run MyApp
end

It will intercept all requests where the path starts with /lackie/

Lackie expects remote applications to:

1. poll the middleware for commands expressed as strings
2. execute those commands when they appear
3. send string results back to the middleware

Example¶ ↑

The source code includes an example rack app:

rackup features/support/config.ru

Open this URL in your browser of choice:

http://localhost:9292/example_app/app.html

Now you can execute commands in the remote application:

require 'rubygems'
require 'lackie'
Lackie::RemoteControl.new("localhost", 9292).exec("1 + 2") # => "3"