lib/poolparty/pool/script.rb in poolparty-0.2.18 vs lib/poolparty/pool/script.rb in poolparty-0.2.69
- old
+ new
@@ -20,17 +20,19 @@
blk.to_ruby(opts)
end
def self.for_save_string
returning Array.new do |out|
- clouds.each do |name, cl|
- with_cloud(cl) do
+ pools.collect {|n,pl| pl}.each do |pl|
+ out << "pool :#{pl.name} do"
+ clouds.each do |n,cl|
out << <<-EOE
-cloud :#{name} do
-#{cl.minimum_runnable_options.map {|o| "\t#{o} \"#{cl.send o}\""}.join("\n")}
-end
+ cloud :#{cl.name} do
+ #{cl.minimum_runnable_options.map {|o| "#{o} #{cl.send(o).respec_string}"}.join("\n")}
+ end
EOE
- end
+ end
+ out << "end"
end
end.join("\n")
end
def self.save!(to_file=true)
\ No newline at end of file