Permalink
Browse files

Use rake tasks from metaforce gem

  • Loading branch information...
1 parent bf01ee1 commit d734dc9e23ecc5634f46da5b0c707bae4b44d29f @ejholmes committed Feb 10, 2012
View
@@ -1,32 +1,8 @@
-require 'metaforce'
-require 'metaforce/dsl'
-include Metaforce::DSL::Metadata
-
-Savon.log = false
-HTTPI.log = false
-
-# Get SFDC credentials for :deploy and :retrieve
-task :login do
- print "username: "; @username = STDIN.gets.chomp
- print "password: "; @password = STDIN.gets.chomp
- print "security token: "; @security_token = STDIN.gets.chomp
- login :username => @username, :password => @password, :security_token => @security_token
-end
-
-
-desc "Deploy 'codepkg' to the target organization"
-task :deploy => :login do
- puts "Deploying 'codepkg' to the organization..."
- deploy File.dirname(__FILE__) do
- puts "'codepkg' deployed successfully"
- end
-end
-
-desc "Retrieve files from the target organization"
-task :retrieve => :login do
- sh "rm -rf retrieved"
- puts "Retrieving content from the organization..."
- retrieve File.expand_path("../codepkg/package.xml", __FILE__), :to => "retrieved" do
- puts "Retrieve successfull. Code unziped to 'retrieved'"
+begin
+ require 'metaforce'
+ load 'metaforce/tasks/metaforce.rake'
+rescue LoadError
+ task :metaforce do
+ puts "Couldn't load metaforce tasks"
end
end
File renamed without changes.

0 comments on commit d734dc9

Please sign in to comment.