Skip to content

Commit

Permalink
Separator defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
winton committed Oct 11, 2011
1 parent 66fd5ed commit ddb449c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/execache.rb
Expand Up @@ -65,7 +65,9 @@ def initialize(yaml)
hash[cmd_type] = []

if cmd_options['cmd']
separators = options[cmd_type]['separators']
separators = options[cmd_type]['separators'] || {}
separators['group'] ||= "[END]"
separators['result'] ||= "\n"
output = `#{cmd_options['cmd']}`
output = output.split(separators['group'] + separators['result'])
output = output.collect { |r| r.split(separators['result']) }
Expand Down

0 comments on commit ddb449c

Please sign in to comment.