aboutsummaryrefslogtreecommitdiffstats
path: root/lib/alaveteli_external_command.rb
Commit message (Collapse)AuthorAgeLines
* Handle a child that cannot be terminated.Louise Crow2015-03-23-1/+9
| | | | | | | | | | | | | | | | | Basic handling that is the same as for other process errors - just write to stderr. Add TODO for allowing the calling code to specify an error stream to allow other handling. In different circumstances, the calling code might want to raise an exception, write to the log, or do something else. At the moment this code assumes a cron context and writes to stderr, which will cause an email to be sent from the cron process, but that's not always the context the calling code is being run in. So we may be missing errors that are, for example, being written to stderr during the request cycle. In fact, this code may be called from the same place with different contexts (i.e. as part of a cron reindexing task and in the request cycle), so at the moment some substantial refactoring of the calling code would be required to make sure calls to this code handle errors appropriately for each context.
* Give messages standard start text.Louise Crow2015-03-23-3/+3
| | | | To make it easier to find them in other output.
* Set options via options hash only.Louise Crow2015-03-23-16/+3
|
* Give a forced timeout its own error message.Louise Crow2015-03-23-2/+11
| | | | Clarify grouping of command and arguments with quotes.
* Separate flags for binary input and outputLouise Crow2015-03-23-3/+8
| | | | | There may be cases where the input is binary but the output is encoded text.
* Allow options hash to be passed to ExternalCommand.Louise Crow2015-03-23-2/+3
| | | | Document :timeout as a possible option key.
* Factor out find_program method.Louise Crow2015-01-27-13/+14
|
* Make sure to detect abnormal exits before looking at exit codeIan Chard2014-01-14-5/+5
|
* Trap and report abnormal exits by external processesIan Chard2014-01-08-0/+4
|
* Merge remote-tracking branch 'origin/hotfix/0.9.0.3' into rails-3-developLouise Crow2013-05-16-0/+4
|\ | | | | | | | | | | | | Conflicts: Rakefile app/models/contact_mailer.rb spec/models/contact_mailer_spec.rb
| * Add option to limit memory available to external commandsIan Chard2013-05-15-0/+4
| |
* | Rename Configuration class to avoid conflict with ActiveSupport::ConfigurableHenare Degan2013-03-03-2/+2
|/
* Add some comments documenting the option params for the run method, pass in ↵Louise Crow2012-12-04-2/+12
| | | | the binary_output flag if set.
* Extract configuration with defaults into one moduleMatthew Landauer2012-09-25-3/+2
|
* Always provide a string for stdin (passing nil exposed an apparent bug in ↵Seb Bacon2012-07-17-1/+1
| | | | `uudecode` in Ubuntu 11.10)
* Force the 'C' locale for elinksRobin Houston2012-01-17-1/+1
| | | | | The behaviour of elinks is locale-dependent. This patch forces LANG=C which makes the behaviour consistent across platforms.
* Replace all `which command` callsRobin Houston2012-01-17-2/+2
| | | | | | | | | | The trouble with `which command` is twofold: - It spawns a whole shell just to find out the path to a binary, every time; - The results are environment-dependent, since they depend on $PATH. It would be better to specify the search path in the configuration file where everything else is specified rather than in the environment. This commit replaces it with the new mechanism from AlaveteliExternalCommand.
* Paths for external commandsRobin Houston2012-01-17-1/+16
| | | | | | Look for external commands in a config-defined path (defaulting to /usr/bin:/usr/local/bin), rather than requiring the path to be hard-coded or the caller to resolve it.
* Provide ability to download zip file containing complete request. Closes #11Seb Bacon2011-09-13-0/+33