Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Can skip compass compile #35

Closed
wants to merge 2 commits into from

2 participants

@dukex

Now I can skip compass compile,

I use compass with rails 3 and asset pipeline, then I don't need compass compile in my server

@dcrec1
Owner

Would be cool to skip this automatically when using the asset pipeline, maybe by looking for app/assets/stylesheets/* files. What do you think?

@dukex dukex closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 28, 2011
  1. @dukex
  2. @dukex

    updated README

    dukex authored
This page is out of date. Refresh to see the latest.
View
1  README.textile
@@ -147,6 +147,7 @@ Currently the steps available to skip are:
- migrate_database: skip rake db:migrate
- clear_cache: skip removing cache directories
- update_crontab: skip updating the crontab with Whenever
+- compass_compile: skip compass compile
* Usage (params are comma separated):
View
2  lib/inploy/deploy.rb
@@ -97,7 +97,7 @@ def after_update_code
run "rm -R -f public/assets" if jammit_is_installed?
run "RAILS_ENV=#{environment} script/delayed_job restart" if file_exists?("script/delayed_job")
rake_if_included "more:parse"
- run "compass compile" if file_exists?("config/compass.rb")
+ run "compass compile" if compass_compile?
rake_if_included "barista:brew"
rake_if_included "asset:packager:build_all"
rake_if_included "hoptoad:deploy RAILS_ENV=#{environment} TO=#{environment} REPO=#{repository} REVISION=#{`git log | head -1 | cut -d ' ' -f 2`}"
View
6 lib/inploy/helper.rb
@@ -79,11 +79,15 @@ def update_crontab
end
def notify_new_relic
- if file_exists? "vendor/plugins/newrelic_rpm/bin/newrelic_cmd"
+ if file_exists? "vendor/plugins/newrelic_rpm/bin/newrelic_cmd"
run "ruby vendor/plugins/newrelic_rpm/bin/newrelic_cmd deployments"
elsif file_exists? "config/newrelic.yml"
run "newrelic_cmd deployments"
end
end
+
+ def compass_compile?
+ file_exists?("config/compass.rb") and !skip_step?('compass_compile')
+ end
end
end
View
7 spec/shared_examples.rb
@@ -386,6 +386,13 @@
subject.local_update
end
+ it "should not compile compass files if compass_compile is in the skip steps" do
+ file_exists "config/compass.rb"
+ subject.skip_steps = %w(compass_compile)
+ dont_accept_command "compass compile"
+ subject.local_update
+ end
+
it "should restart the delayed job worker if script/delayed_job exist" do
subject.environment = "env9"
file_exists "script/delayed_job"
Something went wrong with that request. Please try again.