calabash-cucumber 0.9.84 → 0.9.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- calabash-cucumber (0.9.84)
4
+ calabash-cucumber (0.9.85)
5
5
  CFPropertyList
6
6
  cucumber
7
7
  json
@@ -1,4 +1,4 @@
1
- WAIT_TIMEOUT = ENV['WAIT_TIMEOUT'] || 30
1
+ WAIT_TIMEOUT = (ENV['WAIT_TIMEOUT'] || 30).to_f
2
2
  STEP_PAUSE = (ENV['STEP_PAUSE'] || 0.5).to_f
3
3
 
4
4
  Given /^(my|the) app is running$/ do |_|
@@ -34,7 +34,7 @@ Then /^I (?:press|touch) the "([^\"]*)" button$/ do |name|
34
34
  end
35
35
 
36
36
  Then /^I (?:press|touch) the "([^\"]*)" (?:input|text) field$/ do |name|
37
- touch("textField placeholdwer:'#{name}'")
37
+ touch("textField placeholder:'#{name}'")
38
38
  sleep(STEP_PAUSE)
39
39
  end
40
40
 
@@ -351,23 +351,23 @@ module Calabash
351
351
 
352
352
  def make_http_request(url, req)
353
353
  body = nil
354
- CAL_HTTP_RETRY_COUNT.times do |count|
355
- begin
356
- if not (@http) or not (@http.started?)
354
+ #CAL_HTTP_RETRY_COUNT.times do |count|
355
+ # begin
356
+ if not (@http) or not (@http.started?)
357
357
  @http = init_request(url)
358
358
  @http.start
359
- end
360
- body = @http.request(req).body
361
- break
362
- rescue Exception => e
363
- if count < CAL_HTTP_RETRY_COUNT-1
364
- puts "Retrying.."
365
- else
366
- puts "Failing..."
367
- raise e
368
- end
369
- end
370
359
  end
360
+ body = @http.request(req).body
361
+ # break
362
+ # rescue Exception => e
363
+ # if count < CAL_HTTP_RETRY_COUNT-1
364
+ # puts "Retrying.."
365
+ # else
366
+ # puts "Failing..."
367
+ # raise e
368
+ # end
369
+ # end
370
+ #end
371
371
 
372
372
  body
373
373
  end
@@ -1,6 +1,6 @@
1
1
  module Calabash
2
2
  module Cucumber
3
- VERSION = "0.9.84"
3
+ VERSION = "0.9.85"
4
4
  FRAMEWORK_VERSION = "0.9.84"
5
5
  end
6
6
  end
@@ -7,6 +7,9 @@ module Calabash
7
7
  include Calabash::Cucumber::Core
8
8
  include Calabash::Cucumber::TestsHelpers
9
9
 
10
+
11
+ class WaitError < RuntimeError
12
+ end
10
13
  CALABASH_CONDITIONS = {:none_animating => "NONE_ANIMATING"}
11
14
 
12
15
 
@@ -32,13 +35,13 @@ module Calabash
32
35
  end
33
36
 
34
37
  begin
35
- Timeout::timeout(timeout) do
38
+ Timeout::timeout(timeout,WaitError) do
36
39
  until block.call
37
40
  sleep(retry_frequency)
38
41
  end
39
42
  end
40
43
  sleep(post_timeout) if post_timeout > 0
41
- rescue Timeout::Error => e
44
+ rescue WaitError => e
42
45
  handle_error_with_options(e,timeout_message, screenshot_on_error)
43
46
  rescue Exception => e
44
47
  handle_error_with_options(e, nil, screenshot_on_error)
@@ -65,7 +68,7 @@ module Calabash
65
68
  options[:screenshot_on_error] = options[:screenshot_on_error] || true
66
69
 
67
70
  begin
68
- Timeout::timeout(options[:timeout]) do
71
+ Timeout::timeout(options[:timeout],WaitError) do
69
72
  loop do
70
73
  res = http({:method => :post, :path => 'condition'},
71
74
  options)
@@ -75,7 +78,7 @@ module Calabash
75
78
  end
76
79
  sleep(options[:post_timeout]) if options[:post_timeout] > 0
77
80
  end
78
- rescue Timeout::Error => e
81
+ rescue WaitError => e
79
82
  handle_error_with_options(e,options[:timeout_message], options[:screenshot_on_error])
80
83
  rescue Exception => e
81
84
  handle_error_with_options(e,nil, options[:screenshot_on_error])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.84
4
+ version: 0.9.85
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-13 00:00:00.000000000 Z
12
+ date: 2012-08-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber