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 +4 -0
- data/VERSION +1 -1
- data/lib/win_gui/application.rb +8 -3
- data/lib/win_gui/convenience.rb +1 -1
- data/spec/win_gui/application_spec.rb +1 -1
- metadata +3 -3
data/HISTORY
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.14
|
data/lib/win_gui/application.rb
CHANGED
@@ -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(
|
21
|
+
def close(wait_timeout=nil)
|
22
22
|
@main_window.close
|
23
|
-
|
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
|
data/lib/win_gui/convenience.rb
CHANGED
@@ -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
|
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
|
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:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 14
|
10
|
+
version: 0.2.14
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- arvicco
|