| Class | Uttk::Strategies::Jump |
| In: |
lib/uttk/strategies/Jump.rb
|
| Parent: | Strategy |
# File lib/uttk/strategies/Jump.rb, line 63 def to= ( anObject ) @to = anObject @url = anObject.to_url end
# File lib/uttk/strategies/Jump.rb, line 38 def mk_input dumpable_symtbl = SymTbl.new dumpable_symtbl.merge!(@symtbl) dumpable_symtbl.local.delete :log dumpable_symtbl[:master_pwd] = @symtbl[:pwd] marshaled_input = Marshal.dump([@test, dumpable_symtbl]).dump input = " # require 'rubygems' # gem 'uttk' # require 'uttk' uttk_dir = '#{Uttk.dir.expand_path}' require \"\#{uttk_dir}\" # FIXME Move the getopts in lib and make it lazy loaded require \"\#{uttk_dir.to_path.parent.parent/'bin'/'getopts'/'uttk'}\" test, root_symtbl = Marshal.load #{marshaled_input} opts = Uttk::Getopts::Uttk.parse(['-F', 'Notif']) root_symtbl.merge! opts symtbl = Uttk.default_symtbl(root_symtbl).new_child test.uttk_testify(symtbl).run " end
Methods
# File lib/uttk/strategies/Jump.rb, line 19 def run_impl super @status = @to.jump_and_eval mk_input do |output| @log.new_node 'Remote execution' do YAML.load_from_io(output.open) do |notif| @log.send(*notif) end end # @log.up end if @status.is_a? Status raise @status else raise_error "Bad status: `#{@status.inspect}'" end end