tasks/development.rake in auser-poolparty-0.2.16 vs tasks/development.rake in auser-poolparty-0.2.20

- old
+ new

@@ -1,9 +1,8 @@ namespace(:dev) do task :initialize do - setup_application - run "mkdir ~/.ec2 >/dev/null 2>/dev/null" unless File.directory?("~/.ec2") + Kernel.system"mkdir ~/.ec2 >/dev/null 2>/dev/null" unless File.directory?("~/.ec2") end # Setup a basic development environment for the user desc "Setup development environment specify the config_file" task :setup => [:initialize, :setup_keypair] do certloc = "#{Base.ec2_dir}/#{Base.keypair}/cert-*.pem 2>/dev/null" @@ -54,25 +53,23 @@ EOR puts "Don't forget to replace your ~/.ec2/#{Base.keypair}/*.pem keys with the real amazon keys" end desc "initialize setup" task :init => [:setup_pemkeys] - - desc "Just an argv test" - task :test => :initialize do - puts "---- Testing ----" - puts PoolParty.options(ARGV.dup) - puts "Using keypair at: #{Base.keypair_path}" - end - desc "Installation listing" - task :list_install => :initialize do - puts "-- packages to install --" - Provider.install_PoolParty(true) - end desc "Authorize base ports for application" task :authorize_ports => :initialize do run <<-EOR ec2-authorize -p 22 default ec2-authorize -p 80 default EOR + end + desc "Turn the gemspec into a yaml file" + task :gemspec_to_yaml => [:initialize, :gemspec] do + filepath = ::File.join(::File.dirname(__FILE__), "..", "poolparty.gemspec") + data = open(filepath).read + spec = eval("$SAFE = 3\n#{data}") + yml = YAML.dump spec + File.open(filepath, "w+") do |f| + f << yml + end end end \ No newline at end of file