0
# Warning: This file is clobbered when you update your
0
# application with the waves script. Accordingly, you may
0
# wish to keep your tasks in .rb or .rake files in lib/tasks
0
-Waves::Console.load(:mode => ENV['mode'])
0
-# load tasks from waves framework
0
-%w( cluster generate gem ).each { |task| require "tasks/#{task}.rb" }
0
+ Waves::Console.load(:mode => ENV['mode'])
0
-# load tasks from this app's lib/tasks
0
-Dir["lib/tasks/*.{rb,rake}"].each { |task| require task }
0
+ # load tasks from waves framework
0
+ %w( cluster generate gem ).each { |task| require "tasks/#{task}.rb" }
0
+ # load tasks from this app's lib/tasks
0
+ Dir["lib/tasks/*.{rb,rake}"].each { |task| require task }
0
+ if e.message == 'no such file to load -- waves'
0
+ puts "Can't find Waves source. Install gem, freeze Waves, or define WAVES in startup.rb"
0
+ desc "freeze src=<wherever> to ./waves"
0
+ target = "#{Dir.pwd}/waves"
0
+ raise "Please specify the location of waves using src=wherever" unless src
0
+ raise "No directory found at '#{src}'" unless File.directory?(src)
0
+ items = FileList["#{src}/*"]
0
+ puts "Freezing from: #{src}"
0
+ puts "copying #{item}"
0
+ desc "unfreeze (i.e. delete) the waves source at ./waves"
0
+ frozen = "#{Dir.pwd}/waves"
0
+ rm_r frozen if File.exist?(frozen)
0
+ # Convenience task to allow you to freeze the current Waves
0
+ # source without knowing where it is. This task only gets
0
+ # defined when the Rakefile successfully loaded Waves and if
0
+ # there's nothing in the way at ./waves
0
+ if defined?(WAVES) && !File.exist?("#{Dir.pwd}/waves")
0
+ desc "freeze current Waves source to ./waves"
0
+ target = "#{Dir.pwd}/waves"
0
+ current = File.expand_path( WAVES )
0
+ items = FileList["#{current}/*"]
0
+ puts "Freezing from: #{current}"
0
+ puts "copying #{item}"
0
\ No newline at end of file
Comments
No one has commented yet.