bin/pave in pave-0.5.0 vs bin/pave in pave-0.6.0

- old
+ new

@@ -130,23 +130,71 @@ Pave::Database.new(name).dump end end alias_command :"db:backup", :"db:dump" +command :"db:remote:dump" do |c| + c.syntax = "pave db:remote:dump DATABASE" + c.description = "Create SQL dump of the project's live database." + c.action do |args| + name = args.first || "#{File.basename(Dir.pwd)}" + Pave::Database.new(name).dump_remote + end +end +alias_command :"db:remote:backup", :"db:remote:dump" + +command :"db:execute" do |c| + c.syntax = "pave db:execute DATABASE" + c.description = "Execute SQL dump on the project's database." + c.action do |args| + name = args.first || "#{File.basename(Dir.pwd)}" + Pave::Database.new(name).execute + end +end + +command :"db:remote:execute" do |c| + c.syntax = "pave db:remote:execute DATABASE" + c.description = "Execute SQL dump on the project's live database." + c.action do |args| + name = args.first || "#{File.basename(Dir.pwd)}" + Pave::Database.new(name).execute_remote + end +end + +command :"db:download" do |c| + c.syntax = "pave db:download DATABASE" + c.description = "Download SQL dump of the project's live database." + c.action do |args| + name = args.first || "#{File.basename(Dir.pwd)}" + Pave::Database.new(name).download + end +end + +command :"db:upload" do |c| + c.syntax = "pave db:upload DATABASE" + c.description = "Upload SQL dump of the project's database." + c.action do |args| + name = args.first || "#{File.basename(Dir.pwd)}" + Pave::Database.new(name).upload + end +end + command :"db:pull" do |c| c.syntax = "pave db:pull" c.description = "Download the project's live database and replace local database." c.action do |args| - say "`db:pull` command not implemented yet." + name = args.first || "#{File.basename(Dir.pwd)}" + Pave::Database.new(name).pull end end command :"db:push" do |c| c.syntax = "pave db:push" c.description = "Upload the project's local database and replace the live database." c.action do |args| - say "`db:push` command not implemented yet." + name = args.first || "#{File.basename(Dir.pwd)}" + Pave::Database.new(name).push end end command :"generate:theme" do |c| c.syntax = "pave generate:theme THEME_NAME" @@ -170,16 +218,16 @@ c.syntax = "pave deploy" c.description = "Deploy project to web server." c.action do |args| remote = args[0] || "live" branch = args[1] || "master" - Pave::Deploy.new.deploy(remote, branch) + Pave::Remote.deploy(remote, branch) end end command :"deploy:setup" do |c| c.syntax = "pave deploy:setup" c.description = "Setup deployment via git to web server." c.action do - Pave::Deploy.new.setup + Pave::Remote.setup end end