rdp-win32screenshot 0.0.6.1 → 0.0.6.2

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6.1
1
+ 0.0.6.2
@@ -86,6 +86,9 @@ module Win32
86
86
 
87
87
  def hwnd(window_title)
88
88
  window = WindowStruct.new
89
+ unless window_title.is_a? Regexp
90
+ window_title = Regexp.escape(window_title.to_s)
91
+ end
89
92
  window_title = FFI::MemoryPointer.from_string(window_title.to_s)
90
93
  window[:title] = window_title
91
94
  enum_windows(EnumWindowCallback, window.to_ptr)
@@ -183,6 +183,10 @@ describe "win32-screenshot" do
183
183
  got.length.should be > 1
184
184
  got[0].should be_a String
185
185
  end
186
+
187
+ it "allow for parentheses in window names" do
188
+ Win32::Screenshot::BitmapMaker.hwnd("VLC (Direct")
189
+ end
186
190
 
187
191
  after :all do
188
192
  Process.kill 9, @notepad
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdp-win32screenshot
3
3
  version: !ruby/object:Gem::Version
4
- hash: 85
4
+ hash: 83
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
9
  - 6
10
- - 1
11
- version: 0.0.6.1
10
+ - 2
11
+ version: 0.0.6.2
12
12
  platform: ruby
13
13
  authors:
14
14
  - Jarmo Pertman