Skip to content

Instantly share code, notes, and snippets.

View gauravsaini23's full-sized avatar

Gaurav Saini gauravsaini23

  • Trantor
  • Chandigarh
View GitHub Profile
set :max_asset_age, 2 ## Set asset age in minutes to test modified date against.
after "deploy:finalize_update", "deploy:assets:determine_modified_assets", "deploy:assets:conditionally_precompile"
namespace :deploy do
namespace :assets do
desc "Figure out modified assets."
task :determine_modified_assets, :roles => assets_role, :except => { :no_release => true } do
set :updated_assets, capture("find #{latest_release}/app/assets -type d -name .git -prune -o -mmin -#{max_asset_age} -type f -print", :except => { :no_release => true }).split
gauravsaini23 / web_steps.rb
Created December 15, 2011 11:31 — forked from richardlawrence/gist:1299371
Convert a Capybara table to something you can diff with a Cucumber table
# add this method to enable method tableish in a different way
module WithinHelpers
def tableish(id)
find('table' + '#' + id).all('tr').map { |row| row.all('th, td').map { |cell| cell.text.strip } }