This file contains 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
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 |
This file contains 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
# 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 } } | |
end | |
end | |
World(WithinHelpers) |