win_gui 0.2.13 → 0.2.14

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/HISTORY CHANGED
@@ -57,3 +57,7 @@
57
57
  == 0.2.13 / 2010-10-04
58
58
 
59
59
  * App#exit now accepts optional wait timeout
60
+
61
+ == 0.2.14 / 2010-10-04
62
+
63
+ * Reimplemented App#close with timeout
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.13
1
+ 0.2.14
@@ -18,9 +18,14 @@ module WinGui
18
18
  end
19
19
 
20
20
  # Exits application (optionally waiting _timeout_ seconds for main window to close)
21
- def close(timeout=nil)
21
+ def close(wait_timeout=nil)
22
22
  @main_window.close
23
- @main_window.wait_for_close(timeout) if timeout
23
+ if wait_timeout
24
+ timeout(wait_timeout) do
25
+ sleep SLEEP_DELAY while @main_window.window?
26
+ end
27
+ end
28
+ # @main_window.wait_for_close(timeout) if timeout
24
29
  end
25
30
  alias_method :exit, :close
26
31
 
@@ -60,7 +65,7 @@ module WinGui
60
65
  end
61
66
 
62
67
  private
63
-
68
+
64
69
  def cygwin?
65
70
  RUBY_PLATFORM =~ /cygwin/
66
71
  end
@@ -3,7 +3,7 @@ require 'win/gui'
3
3
  # Module contains Win32 API gui-related functions as both module and instance methods.
4
4
  # See documentation of Win::Gui module of *win* gem for a full scope of available functions.
5
5
  # In addition, module defines several higher-level convenience methods that can be useful
6
- # when dealing with GUI-related tasks under windows (such as testing automation).
6
+ # when dealing with GUI-related tasks on Windows platform (such as testing automation).
7
7
  #
8
8
  module WinGui
9
9
  include Win::Gui
@@ -5,7 +5,7 @@ module WinGuiTest
5
5
  describe App do
6
6
  after(:each) do # Reliably closes launched app window (without calling close_test_app)
7
7
  app = App.find(title: WIN_TITLE)
8
- app.exit if app
8
+ app.exit(timeout=10) if app
9
9
  end
10
10
 
11
11
  context 'initializing' do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win_gui
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 13
10
- version: 0.2.13
9
+ - 14
10
+ version: 0.2.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - arvicco