On 10/26/2011 08:40 PM, Jason Guiditta wrote:
On 25/10/11 17:08 -0400, Matt Wagner wrote:
> ---
> src/lib/tasks/dev.rake | 33 +++++++++++++++++++++++++++++++++
> 1 files changed, 33 insertions(+), 0 deletions(-)
> create mode 100644 src/lib/tasks/dev.rake
>
Agree with Chris' sentiments, thanks for sharing this. I think
though, that the stylesheets shoudl really be 'compiled' dynamically
for dev environments, and we have a task to do that on the infra
backlog. I keep pushing it into sprints, and it keeps getting pulled
out ;) This could be a good interim step until we get to it though,
so I am not opposed if you want to push it. I did not do a build with
this applied but it probably shoudl not make it into the rpm, so you
may want to verify that before you push anything.
That would be really great.
Another interim solution is to run:
sass --watch app/stylesheets:public/stylesheets/compiled
from Conductor's `src` directory. It watches the *.scss files and
recompiles them on the fly whenever it detects a change.
-j
> diff --git a/src/lib/tasks/dev.rake b/src/lib/tasks/dev.rake
> new file mode 100644
> index 0000000..87febab
> --- /dev/null
> +++ b/src/lib/tasks/dev.rake
> @@ -0,0 +1,33 @@
> +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
> --
> 1.7.6.4
>
> _______________________________________________
> aeolus-devel mailing list
> aeolus-devel(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/aeolus-devel
_______________________________________________
aeolus-devel mailing list
aeolus-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/aeolus-devel
--
No trees were killed to send this message, but a large number of
electrons were terribly inconvenienced.