Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Execute a Gist directly from Github via IronWorker

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION.yml
Octocat-spinner-32 gist_worker.gemspec
README.md

Execute a Gist on IronWorker

An IronWorker that runs any gist.

Getting Started

You'll need an Iron.io account first, get one for free at www.iron.io.

Install Gem

sudo gem install gist_worker

Create a gist

Here's an example one: https://gist.github.com/1989106

Queue it up!

# Configure IronWorker first
IronWorker.configure do |config|
  config.token = 'MY_IRON_TOKEN'
  config.project_id = 'MY_IRON_PROJECT_ID'
end
# Now we just create our GistWorker and queue it up
require 'gist_worker'
worker = GistWorker::Worker.new
worker.gist_id = "1989106"
worker.gist_file = "tester.rb"
worker.params = {'key1'=>'value', 'key2'=>3}
worker.queue

Either look in HUD to see if it worked or:

Optional: Wait for it to complete

status = worker.wait_until_complete
p status
puts worker.get_log
Something went wrong with that request. Please try again.