lib/kuzushi.rb in kuzushi-0.0.27 vs lib/kuzushi.rb in kuzushi-0.0.28
- old
+ new
@@ -14,20 +14,29 @@
class Kuzushi
attr_accessor :config, :config_names
def initialize(url)
+ @url = url
@base_url = File.dirname(url)
- @name = File.basename(url)
+ if @url =~ /s3.amazonaws.com.*\/([^\/]*).tar.gz/
+ @name = $1
+ end
@config_names = []
@configs = []
@packages = []
@tasks = []
end
def init
@init = true
start
+ end
+
+ def boot
+ "mkdir -p /tmp/kuzushi/"
+ "cd /tmp/kuzushi/ ; curl '#{@url}' | tar xzvf"
+ @config = JSON.parse(File.read("/tmp/kuzushi/#{@name}/config.json"))
end
def start
load_config_stack(@name)
process_stack