lib/awestruct/commands/generate.rb in awestruct-0.0.4 vs lib/awestruct/commands/generate.rb in awestruct-0.0.5

- old
+ new

@@ -2,19 +2,21 @@ module Awestruct module Commands class Generate - def initialize(dir=Dir.pwd, base_url=nil, force=false) - @dir = dir - @base_url = base_url - @force = force - @engine = Awestruct::Engine.new( @dir ) + def initialize(dir=Dir.pwd, profile=nil, base_url=nil, default_base_url='http://localhost:4242', force=false) + @dir = dir + @profile = profile + @base_url = base_url + @default_base_url = default_base_url + @force = force + @engine = Awestruct::Engine.new( @dir ) end def run() begin - @engine.generate( @base_url, @force ) + @engine.generate( @profile, @base_url, @default_base_url, @force ) rescue =>e puts e puts e.backtrace end end