Skip to content

Instantly share code, notes, and snippets.

@n1zyy
Created February 14, 2012 15:25
Show Gist options
  • Save n1zyy/1827545 to your computer and use it in GitHub Desktop.
Save n1zyy/1827545 to your computer and use it in GitHub Desktop.
Aeolus dev: tasks
namespace :dev do
desc "Setup and run cucumber and rspec"
task :tests => ["db:migrate", :cucumber, :spec] do |t|
end
desc "Generate PDF of models"
# This requires the railroad gem and graphviz (dot)
task :model_pdf do |t|
system "railroad -a --hide-magic -ij -o project.dot -M"
system "dot -Tpdf project.dot -o project.pdf"
end
desc "Print a list of roles"
task :roles => :environment do |t|
Role.all(:include => :privileges, :order => 'name asc').each do |role|
puts "#{role.name} #{role.assign_to_owner? ? '(assign_to_owner)' : ''}"
role.privileges.each do |priv|
puts " #{priv.action.ljust(12)} #{priv.target_type}"
end
puts "\n"
end
end
desc "Regenerate the stylesheets"
task :compile_styles do |t|
#`sass --style compact "#{Rails.root}/app/stylesheets/application.scss" "#{Rails.root}/public/stylesheets/compiled/application.css"`
`sass --style compact "#{Rails.root}/app/stylesheets/custom.scss" "#{Rails.root}/public/stylesheets/compiled/custom.css"`
`sass --style compact "#{Rails.root}/app/stylesheets/layout.scss" "#{Rails.root}/public/stylesheets/compiled/layout.css"`
`sass --style compact "#{Rails.root}/app/stylesheets/login.scss" "#{Rails.root}/public/stylesheets/compiled/login.css"`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment