README.md in docker-api-1.18.0 vs README.md in docker-api-1.19.0

- old
+ new

@@ -331,34 +331,34 @@ # Commit the Container and run a new command. The second argument is the number # of seconds the Container should wait before stopping its current command. container.run('pwd', 10) # => Docker::Image { :id => 4427be4199ac, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } } -# Run an Exec instance inside the container and capture its output +# Run an Exec instance inside the container and capture its output and exit status container.exec('date') -# => [["Wed Nov 26 11:10:30 CST 2014\n"], []] +# => [["Wed Nov 26 11:10:30 CST 2014\n"], [], 0] -# Launch an Exec instance without capturing its output +# Launch an Exec instance without capturing its output or status container.exec('./my_service', detach: true) # => Docker::Exec { :id => be4eaeb8d28a, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } } # Parse the output of an Exec instance container.exec('find / -name *') { |stream, chunk| puts "#{stream}: #{chunk}" } stderr: 2013/10/30 17:16:24 Unable to locate find / -name * -# => [[], ["2013/10/30 17:16:24 Unable to locate find / -name *\n"]] +# => [[], ["2013/10/30 17:16:24 Unable to locate find / -name *\n"], 1] # Run an Exec instance by grab only the STDOUT output container.exec('date', stderr: false) -# => [["Wed Nov 26 11:10:30 CST 2014\n"], []] +# => [["Wed Nov 26 11:10:30 CST 2014\n"], [], 0] # Pass input to an Exec instance command via Stdin container.exec('cat', stdin: StringIO.new("foo\nbar\n")) -# => [["foo\nbar\n"], []] +# => [["foo\nbar\n"], [], 0] # Get the raw stream of data from an Exec instance command = ["bash", "-c", "if [ -t 1 ]; then echo -n \"I'm a TTY!\"; fi"] container.exec(command, tty: true) -# => [["I'm a TTY!"], []] +# => [["I'm a TTY!"], [], 0] # Delete a Container. container.delete(:force => true) # => nil