namespace :firebase do
  desc "TODO"
  task :sync => :environment do
    FirebaseClient.delete("/")
    Annotation.root_annotations.each{|a| a.push_to_firebase}
  end
end

namespace :firebase do

  desc 'Update objects in Firebase (without removing old data)'
  task :update => :environment do
    Annotation.root_annotations.each{|a| a.push_to_firebase}
  end

  desc 'Clear objects in Firebase (this includes (dev, test & prod data)'
  task :clear => :environment do
    FirebaseClient.delete("/")
  end

  desc 'Clear and then update Firebase data'
  task :sync => [:update, :clear]

end

Make the Firebase rake tasks a bit more flexible
Make the Firebase rake tasks a bit more flexible
