Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add --with-wrapper option to template wrapper biogems
- Loading branch information
Showing
4 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
module <%= constant_name %> | ||
<% if options[:wrapper] %>require 'systemu' | ||
<% end %> | ||
module <%= constant_name %> | ||
<% if options[:wrapper] %> | ||
class Wrapper | ||
def run | ||
command = "some_application arguments" | ||
status, stdout, stderr = systemu command, 0 => 'dummy stdin' | ||
if status.exitstatus != 0 | ||
$stderr.puts "Failed to run wrapping command correctly, as non-zero exit status "+ | ||
"#{status.exitstatus} detected. Command run was `#{command}'" | ||
else | ||
# All good. Now to something useful with the stdout.. | ||
end | ||
end | ||
end | ||
<% end %> | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters