win32screenshot 4.1.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20fb85f0a8a6db55a03ef208225cb7a0f081b704f41abf405b39e63283c2c7ea
4
- data.tar.gz: bfeb14a87af3452d3bd39b37edfd13733a940657e671e4e038a1ec06775aa858
3
+ metadata.gz: cfaefd42ed419ebf47ddbc1f191f68466dc30685c3cfd812474bec028e1bab0c
4
+ data.tar.gz: e4c3fbedae082e998a8df7991eeecd54915123f0dff4006605c57c5c31b6af28
5
5
  SHA512:
6
- metadata.gz: 75b4b936b11909e01426ee6ae23a8885106c594a8585372e9e8d7cef59c739d0ce5b7369173b1ae28484559637466f2d22774b0d29a487df13dca8011ed1464d
7
- data.tar.gz: e428a2fdcaa46dd961f351000af951d4c4ffa8f556e1b8b9befb7e09dd99eb7c3412d950f9e4122301d6ebc99009cda805eb7343c0772bb14ac0b152fcd4163c
6
+ metadata.gz: 74f3b311f74ab58d0aa481f2d7212fa8d258e124b53acaa1f4b6adb3dbd3ef2e0e16c83aa0434aacf35bb74ebce853755e95a0e366a72fb319cc5c2cb924122d
7
+ data.tar.gz: 417262ff0d00e1c6223fe42259a6139d0bbc0f794ccbb2670aef16ce38b4bfddff934a906cb340f3e7df08407cba0bd816e8600532b0ed5a49e0b5de8cb6b309
data/CHANGES.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 5.0.0 2023-07-20
2
+ * Add support for 64-bit Ruby (by @bensandland via PR #37)
3
+
1
4
  # 4.1.0 2023-02-05
2
5
  * Add support for Ruby 3.2 (by @kaiwaredaikon009 via PR #36)
3
6
 
data/Gemfile.lock CHANGED
@@ -1,19 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- win32screenshot (4.1.0)
4
+ win32screenshot (5.0.0)
5
5
  ffi (~> 1.15.0)
6
6
  mini_magick (~> 4.9)
7
- rautomation (~> 1.1.0)
7
+ rautomation (~> 2.0)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
12
  diff-lcs (1.5.0)
13
- ffi (1.15.5-x86-mingw32)
13
+ ffi (1.15.5-x64-mingw32)
14
14
  mini_magick (4.11.0)
15
15
  rake (13.0.6)
16
- rautomation (1.1.0)
16
+ rautomation (2.0.1-x64-mingw32)
17
17
  ffi (~> 1.15.0)
18
18
  rspec (3.10.0)
19
19
  rspec-core (~> 3.10.0)
@@ -33,6 +33,7 @@ GEM
33
33
  webrick (~> 1.7.0)
34
34
 
35
35
  PLATFORMS
36
+ x64-mingw32
36
37
  x86-mingw32
37
38
 
38
39
  DEPENDENCIES
@@ -1,5 +1,5 @@
1
1
  module Win32
2
2
  module Screenshot
3
- VERSION = "4.1.0"
3
+ VERSION = "5.0.0"
4
4
  end
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -5,20 +5,6 @@ require 'rspec'
5
5
  require 'fileutils'
6
6
 
7
7
  module SpecHelper
8
- HWND_TOPMOST = -1
9
- HWND_NOTOPMOST = -2
10
- SWP_NOSIZE = 1
11
- SWP_NOMOVE = 2
12
- SWP_SHOWWINDOW = 40
13
-
14
- extend FFI::Library
15
- ffi_lib 'user32'
16
- ffi_convention :stdcall
17
-
18
- # user32.dll
19
- attach_function :set_window_pos, :SetWindowPos,
20
- [:long, :long, :int, :int, :int, :int, :int], :bool
21
-
22
8
  def save_and_verify_image(img, file=nil)
23
9
  FileUtils.mkdir @temp_dir unless File.exist?(@temp_dir)
24
10
  file_name = File.join @temp_dir, "#{file}.bmp"
@@ -27,16 +13,8 @@ module SpecHelper
27
13
  end
28
14
 
29
15
  def resize title
30
- hwnd = RAutomation::Window.new(:title => title).hwnd
31
- set_window_pos(hwnd,
32
- HWND_TOPMOST,
33
- 0, 0, 150, 238,
34
- SWP_NOMOVE)
35
- set_window_pos(hwnd,
36
- HWND_NOTOPMOST,
37
- 0, 0, 0, 0,
38
- SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE)
39
- sleep 1
16
+ window = RAutomation::Window.new(title: title)
17
+ window.move(left: 0, top: 0, width: 150, height: 238)
40
18
  end
41
19
  end
42
20
 
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
 
18
18
  s.add_dependency("ffi", "~> 1.15.0")
19
19
  s.add_dependency("mini_magick", "~> 4.9")
20
- s.add_dependency("rautomation", "~> 1.1.0")
20
+ s.add_dependency("rautomation", "~> 2.0")
21
21
 
22
22
  s.add_development_dependency("rspec", "~> 3.10")
23
23
  s.add_development_dependency("yard")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32screenshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarmo Pertman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-02-05 00:00:00.000000000 Z
12
+ date: 2023-07-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 1.1.0
48
+ version: '2.0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 1.1.0
55
+ version: '2.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rspec
58
58
  requirement: !ruby/object:Gem::Requirement