Created
January 15, 2012 00:00
-
-
Save rubiety/1613478 to your computer and use it in GitHub Desktop.
Background PNG Generation for Jazzity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "capybara/rails" | |
Capybara.javascript_driver = :webkit | |
class StaffToPng | |
@queue = :staff_to_png | |
def self.perform(chord) | |
visit "/chords/#{chord}" | |
page.driver.render "generations/#{chord}.png" | |
end | |
end | |
# Generate on-the-fly: | |
Resque.enqueue(chord) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment