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 +4 -4
- data/CHANGES.md +3 -0
- data/Gemfile.lock +5 -4
- data/lib/win32/screenshot/version.rb +1 -1
- data/spec/spec_helper.rb +2 -24
- data/win32screenshot.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfaefd42ed419ebf47ddbc1f191f68466dc30685c3cfd812474bec028e1bab0c
|
4
|
+
data.tar.gz: e4c3fbedae082e998a8df7991eeecd54915123f0dff4006605c57c5c31b6af28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74f3b311f74ab58d0aa481f2d7212fa8d258e124b53acaa1f4b6adb3dbd3ef2e0e16c83aa0434aacf35bb74ebce853755e95a0e366a72fb319cc5c2cb924122d
|
7
|
+
data.tar.gz: 417262ff0d00e1c6223fe42259a6139d0bbc0f794ccbb2670aef16ce38b4bfddff934a906cb340f3e7df08407cba0bd816e8600532b0ed5a49e0b5de8cb6b309
|
data/CHANGES.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
win32screenshot (
|
4
|
+
win32screenshot (5.0.0)
|
5
5
|
ffi (~> 1.15.0)
|
6
6
|
mini_magick (~> 4.9)
|
7
|
-
rautomation (~>
|
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-
|
13
|
+
ffi (1.15.5-x64-mingw32)
|
14
14
|
mini_magick (4.11.0)
|
15
15
|
rake (13.0.6)
|
16
|
-
rautomation (
|
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
|
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
|
-
|
31
|
-
|
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
|
|
data/win32screenshot.gemspec
CHANGED
@@ -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", "~>
|
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
|
+
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-
|
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:
|
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:
|
55
|
+
version: '2.0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rspec
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|