Skip to content

Instantly share code, notes, and snippets.

@dblooman
Created September 8, 2014 14:15
Show Gist options
  • Select an option

  • Save dblooman/df0a7bd0feda5c283f33 to your computer and use it in GitHub Desktop.

Select an option

Save dblooman/df0a7bd0feda5c283f33 to your computer and use it in GitHub Desktop.
require 'wraith'
@config = 'configs/new.yaml'
@config2 = 'configs/old.yaml'
@wraith = Wraith::CLI.new
def history(config)
@wraith.reset_shots(config)
@wraith.setup_folders(config)
@wraith.save_images(config)
end
def latest(config)
@wraith.save_images(config)
@wraith.crop_images(config)
@wraith.compare_images(config)
@wraith.generate_thumbnails(config)
@wraith.generate_gallery(config)
end
# Capture historical shots from new release, e.g Live
desc 'Capture old'
task :old do
history(@config2)
end
# Capture the latest copy after code changes and compare after each push/commit
desc 'Capture new'
task :new do
latest(@config)
end
# Default
desc 'Capture new'
task :default do
latest(@config)
end
# Setup
desc 'Capture new'
task :setup do
history(@config2)
latest(@config)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment