public
Description: Expose Smoke sources and transcode them into JSON, XML or YAML
Homepage:
Clone URL: git://github.com/benschwarz/smoke-rack.git
benschwarz (author)
Wed Oct 28 07:41:45 -0700 2009
commit  54b324f5cac5084995d0433b79077909b1f3259d
tree    1fc27f3e87661339d47e7a12dac969c120153cc1
parent  18c3f0101646c5f556aded52db46722cd72d5992
name age message
file .document Mon Sep 28 02:06:46 -0700 2009 Initial commit to smoke-rack. [benschwarz]
file .gitignore Mon Sep 28 02:06:46 -0700 2009 Initial commit to smoke-rack. [benschwarz]
file LICENSE Mon Sep 28 02:06:46 -0700 2009 Initial commit to smoke-rack. [benschwarz]
file README.md Wed Oct 21 04:47:50 -0700 2009 Added installation notes [benschwarz]
file Rakefile Wed Oct 28 07:40:28 -0700 2009 Upped dependency for new exposed_sources method [benschwarz]
file VERSION Wed Oct 28 07:39:55 -0700 2009 Version bump to 0.0.4 [benschwarz]
file config.ru Wed Oct 28 07:40:43 -0700 2009 Use new namespace and rack-like paths [benschwarz]
directory examples/ Wed Oct 28 07:40:55 -0700 2009 Have a hidden source for good test data [benschwarz]
directory lib/ Wed Oct 28 07:41:20 -0700 2009 Only show exposed sources [benschwarz]
directory public/ Mon Sep 28 02:21:00 -0700 2009 Added files created to date [benschwarz]
file smoke-rack.gemspec Wed Oct 28 07:41:45 -0700 2009 Updated gemspec [benschwarz]
directory spec/ Wed Oct 28 07:41:12 -0700 2009 Add etag support spec [benschwarz]
directory views/ Tue Sep 29 04:16:09 -0700 2009 Added requirements to usage pages [benschwarz]
README.md

smoke-rack

Smoke::Rack allows you to expose Smoke sources and transcode them into JSON, XML or YAML.

What are the benefits?

  • Pluggable caching, cache remote web services and rely on your own infrastructure
  • Join Smoke sources together, reinterpret them, then offer them as a simple web service

Smoke::Rack gives you a bunch of HTML screens (found at /smoke) that outline the Smoke sources that are found within your current environment. Smoke-rack home screen

From there, you'll be able to see the formats that you can get the stream in, or if they require any additional query strings. Twitter source details

Smoke?

Smoke allows you to take single serve sources from around the web. Then it does a bunch of smart stuff like automagically transferring as gzip, request caching and understands the content that it gets back. YQL, Atom / RSS feeds, json and xml are all converted to ruby arrays.

Smoke-rack allows you to transcode that information and provide an API like layer of your own.

How do I include it in my project?

# config.ru
require 'rubygems'

# Ensure your app has some Smoke sources
require 'your-app'

require 'smoke-rack'
use Smoke::Rack

run Sinatra::Application

Installation

gem install smoke-rack -s http://gemcutter.org

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2009 Ben Schwarz. See LICENSE for details.