Permalink
Browse files

Javascript Tweak

  • Loading branch information...
1 parent 4cd1f6a commit ed782015248a0ced209e27f10240274537792b20 @jcnetdev committed Aug 8, 2008
Showing with 14 additions and 2 deletions.
  1. +13 −1 config/deploy.rb
  2. +1 −1 public/javascripts/jquery.ext/jquery.onPage.js
View
@@ -134,6 +134,7 @@
after "deploy:update_code", "localize:install_gems"
after "deploy:update_code", "localize:copy_shared_configurations"
+after "deploy:update_code", "localize:merge_assets"
namespace :localize do
desc "copy shared configurations to current"
@@ -145,10 +146,21 @@
desc "installs / upgrades gem dependencies "
task :install_gems, :roles => [:app] do
- sudo "date" # fuck you capistrano
+ sudo "date"
run "cd #{release_path} && sudo rake RAILS_ENV=production gems:install"
end
+ desc "merge asset files"
+ task :merge_assets, :roles => [:app] do
+ sudo "date"
+ run "cd #{release_path} && sudo script/merge_assets"
+ end
+
+ task :merge_current_assets, :roles => [:app] do
+ sudo "date"
+ run "cd #{current_path} && sudo script/merge_assets"
+ end
+
end
namespace :live do
@@ -5,5 +5,5 @@ jQuery.fn.onPage = function() {
}
jQuery.fn.notOnPage = function() {
- return !this.onPage();
+ return this.size() == 0;
}

0 comments on commit ed78201

Please sign in to comment.