Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Saimon Moore http://saimonmoore.net

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Rake task to update (scriptaculous) javascripts directly from svn trunk

Replaces default rails update_javascripts task to update all your scriptaculous javascripts directly from the svn trunk

   1  
   2  
   3  desc "Update your scriptaculous javascripts directly from svn trunk."
   4  task :update_javascripts do
   5    SCRIPTACULOUS_HEAD='/tmp/sciptaculous_head'
   6    rm_rf SCRIPTACULOUS_HEAD
   7    system "svn co http://dev.rubyonrails.org/svn/rails/spinoffs/scriptaculous #{SCRIPTACULOUS_HEAD}" rescue nil
   8    unless !$?.nil? && $?.success?
   9      $stderr.puts "ERROR: Must have subversion (svn) available in the PATH to update to scriptaculous trunk"
  10      exit 1
  11    end
  12    FileUtils.cp(Dir[SCRIPTACULOUS_HEAD + '/lib/*.js'], RAILS_ROOT + '/public/javascripts/')
  13    FileUtils.cp(Dir[SCRIPTACULOUS_HEAD + '/src/*.js'], RAILS_ROOT + '/public/javascripts/')
  14  end
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS