lib/backticks/runner.rb in backticks-0.5.0 vs lib/backticks/runner.rb in backticks-1.0.0rc1
- old
+ new
@@ -13,26 +13,25 @@
# If true, commands will have their stdio streams tied to the parent
# process so the user can view their output and send input to them.
# Commands' output is still captured normally when they are interactive.
#
- # Note that interactivity doesn't work very well with unbuffered commands;
- # we use pipes to connect to the command's stdio, and the OS forcibly
- # buffers pipe I/O. If you want to send some input to your command, you
- # may need to send a LOT of input before it receives any; the same problem
- # applies to reading your command's output. If you set interactive to
- # true, you usually want to set buffered to false!
+ # Note: if you set `interactive` to true, then stdin and stdout will be
+ # unbuffered regardless of how you have set `buffered`!
#
# @return [Boolean]
attr_accessor :interactive
# List of I/O streams that should be captured using a pipe instead of
# a pseudoterminal.
#
# This may be a Boolean, or it may be an Array of stream names from the
- # set [:stdin, stdout, stderr].
+ # set [:stdin, :stdout, :stderr].
#
+ # Note: if you set `interactive` to true, then stdin and stdout will be
+ # unbuffered regardless of how you have set `buffered`!
+ #
# @return [Array] list of symbolic stream names
attr_reader :buffered
# @return [#parameters] the CLI-translation object used by this runner
attr_reader :cli
@@ -62,15 +61,9 @@
when true then BUFFERED
when false, nil then []
else
b
end
- end
-
- # @deprecated
- def command(*sugar)
- warn 'Backticks::Runner#command is deprecated; please call #run instead'
- run(*sugar)
end
# Run a command whose parameters are expressed using some Rubyish sugar.
# This method accepts an arbitrary number of positional parameters; each
# parameter can be a Hash, an array, or a simple Object. Arrays and simple