Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 12 commits
  • 7 files changed
  • 0 commit comments
  • 4 contributors
Showing with 31 additions and 7 deletions.
  1. +6 −0 History.txt
  2. +5 −0 README.rdoc
  3. +4 −4 aruba.gemspec
  4. +8 −0 features/output.feature
  5. +4 −0 features/step_definitions/aruba_dev_steps.rb
  6. +3 −3 lib/aruba/api.rb
  7. +1 −0 lib/aruba/process.rb
View
6 History.txt
@@ -1,3 +1,9 @@
+== 0.3.7
+
+* Make Aruba::Api#get_process return the last executed process with passed cmd (Potapov Sergey)
+* Replace announce with puts to comply with cucumber 0.10.6 (Aslak Hellesøy)
+* Fix childprocess STDIN to be synchronous (#40, #71 Tim Ekl)
+
== 0.3.6
* Changed default value of @aruba_timeout_seconds from 1 to 3. (Aslak Hellesøy)
View
5 README.rdoc
@@ -41,6 +41,11 @@ If you want to change this behaviour put this into your <tt>features/support/env
@dirs = ["somewhere/else"]
end
+If testing an executable in your project's `bin` directory, it might not be in the path Aruba
+uses. An easy way to set it is to put the following in <tt>features/support/env.rb</tt>:
+
+ ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
+
Set <tt>@aruba_timeout_seconds</tt> to control the amount of time Aruba will wait for a process to
finish running before terminating it:
View
8 aruba.gemspec
@@ -2,16 +2,16 @@
Gem::Specification.new do |s|
s.name = 'aruba'
- s.version = '0.3.6'
+ s.version = '0.3.7'
s.authors = ["Aslak Hellesøy", "David Chelimsky", "Mike Sassak"]
s.description = 'CLI Steps for Cucumber, hand-crafted for you in Aruba'
s.summary = "aruba-#{s.version}"
s.email = 'cukes@googlegroups.com'
s.homepage = 'http://github.com/aslakhellesoy/aruba'
- s.add_dependency 'cucumber', '>= 0.10.0'
- s.add_dependency 'childprocess', '>= 0.1.7'
- s.add_dependency 'rspec', '>= 2.5.0'
+ s.add_dependency 'cucumber', '>= 0.10.5'
+ s.add_dependency 'childprocess', '>= 0.1.9'
+ s.add_dependency 'rspec', '>= 2.6.0'
s.rubygems_version = ">= 1.6.1"
s.files = `git ls-files`.split("\n")
View
8 features/output.feature
@@ -203,3 +203,11 @@ Feature: Output
@wip
Scenario: Detect output from named source with custom name
+
+ Scenario: Detect second output from named source with custom name
+ When I set env varibable "ARUBA_TEST_VAR" to "first"
+ And I run `ruby -e 'puts ENV[%q(ARUBA_TEST_VAR)]'`
+ Then the output from "ruby -e 'puts ENV[%q(ARUBA_TEST_VAR)]'" should contain "first"
+ When I set env varibable "ARUBA_TEST_VAR" to "second"
+ And I run `ruby -e 'puts ENV[%q(ARUBA_TEST_VAR)]'`
+ Then the output from "ruby -e 'puts ENV[%q(ARUBA_TEST_VAR)]'" should contain "second"
View
4 features/step_definitions/aruba_dev_steps.rb
@@ -11,6 +11,10 @@
sleep time.to_i
end
+When /^I set env varibable "(\w+)" to "([^"]*)"$/ do |var, value|
+ ENV[var] = value
+end
+
Then /^aruba should fail with "([^"]*)"$/ do |error_message|
@aruba_exception.message.should include(unescape(error_message))
end
View
6 lib/aruba/api.rb
@@ -193,7 +193,7 @@ def register_process(name, process)
end
def get_process(wanted)
- processes.find{ |name, _| name == wanted }[-1]
+ processes.reverse.find{ |name, _| name == wanted }[-1]
end
def only_processes
@@ -260,9 +260,9 @@ def _ensure_newline(str)
def announce_or_puts(msg)
if(@puts)
- puts(msg)
+ Kernel.puts(msg)
else
- announce(msg)
+ puts(msg)
end
end
View
1 lib/aruba/process.rb
@@ -25,6 +25,7 @@ def run!(&block)
def stdin
wait_for_io do
+ @process.io.stdin.sync = true
@process.io.stdin
end
end

No commit comments for this range

Something went wrong with that request. Please try again.