win32screenshot 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +3 -0
- data/Rakefile +4 -4
- data/VERSION +1 -1
- data/lib/win32/screenshot.rb +0 -1
- data/lib/win32/screenshot/take.rb +5 -2
- data/win32screenshot.gemspec +14 -14
- metadata +16 -16
data/History.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -15,11 +15,11 @@ begin
|
|
15
15
|
|
16
16
|
gem.rdoc_options = ["--main", "README.rdoc"]
|
17
17
|
|
18
|
-
gem.add_dependency "ffi", "~>
|
19
|
-
gem.add_dependency "mini_magick", "~>3.
|
20
|
-
gem.add_dependency "rautomation", "~>0.
|
18
|
+
gem.add_dependency "ffi", "~>1"
|
19
|
+
gem.add_dependency "mini_magick", "~>3.2"
|
20
|
+
gem.add_dependency "rautomation", "~>0.5"
|
21
21
|
|
22
|
-
gem.add_development_dependency "rspec", "~>2.
|
22
|
+
gem.add_development_dependency "rspec", "~>2.5"
|
23
23
|
end
|
24
24
|
Jeweler::GemcutterTasks.new
|
25
25
|
rescue LoadError
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
data/lib/win32/screenshot.rb
CHANGED
@@ -63,9 +63,12 @@ module Win32
|
|
63
63
|
def window(opts)
|
64
64
|
area = {:area => opts.delete(:area)}
|
65
65
|
win = opts[:rautomation] || RAutomation::Window.new(opts)
|
66
|
-
timeout = Time.now +
|
66
|
+
timeout = Time.now + 10
|
67
67
|
until win.active?
|
68
|
-
|
68
|
+
if Time.now >= timeout
|
69
|
+
Kernel.warn "Failed to set window '#{win.locators}' into focus!"
|
70
|
+
break
|
71
|
+
end
|
69
72
|
win.activate
|
70
73
|
end
|
71
74
|
take_screenshot(win.hwnd, opts.merge(area || {}))
|
data/win32screenshot.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{win32screenshot}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jarmo Pertman", "Aslak Helles\303\270y"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-04-17}
|
13
13
|
s.description = %q{Capture Screenshots on Windows with Ruby to bmp, gif, jpg or png formats!}
|
14
14
|
s.email = ["jarmo.p@gmail.com", "aslak.hellesoy@gmail.com"]
|
15
15
|
s.extra_rdoc_files = [
|
@@ -69,21 +69,21 @@ Gem::Specification.new do |s|
|
|
69
69
|
s.specification_version = 3
|
70
70
|
|
71
71
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
72
|
-
s.add_runtime_dependency(%q<ffi>, ["~>
|
73
|
-
s.add_runtime_dependency(%q<mini_magick>, ["~> 3.
|
74
|
-
s.add_runtime_dependency(%q<rautomation>, ["~> 0.
|
75
|
-
s.add_development_dependency(%q<rspec>, ["~> 2.
|
72
|
+
s.add_runtime_dependency(%q<ffi>, ["~> 1"])
|
73
|
+
s.add_runtime_dependency(%q<mini_magick>, ["~> 3.2"])
|
74
|
+
s.add_runtime_dependency(%q<rautomation>, ["~> 0.5"])
|
75
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.5"])
|
76
76
|
else
|
77
|
-
s.add_dependency(%q<ffi>, ["~>
|
78
|
-
s.add_dependency(%q<mini_magick>, ["~> 3.
|
79
|
-
s.add_dependency(%q<rautomation>, ["~> 0.
|
80
|
-
s.add_dependency(%q<rspec>, ["~> 2.
|
77
|
+
s.add_dependency(%q<ffi>, ["~> 1"])
|
78
|
+
s.add_dependency(%q<mini_magick>, ["~> 3.2"])
|
79
|
+
s.add_dependency(%q<rautomation>, ["~> 0.5"])
|
80
|
+
s.add_dependency(%q<rspec>, ["~> 2.5"])
|
81
81
|
end
|
82
82
|
else
|
83
|
-
s.add_dependency(%q<ffi>, ["~>
|
84
|
-
s.add_dependency(%q<mini_magick>, ["~> 3.
|
85
|
-
s.add_dependency(%q<rautomation>, ["~> 0.
|
86
|
-
s.add_dependency(%q<rspec>, ["~> 2.
|
83
|
+
s.add_dependency(%q<ffi>, ["~> 1"])
|
84
|
+
s.add_dependency(%q<mini_magick>, ["~> 3.2"])
|
85
|
+
s.add_dependency(%q<rautomation>, ["~> 0.5"])
|
86
|
+
s.add_dependency(%q<rspec>, ["~> 2.5"])
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32screenshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 3
|
10
|
+
version: 1.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jarmo Pertman
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-04-17 00:00:00 +03:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -27,10 +27,10 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ~>
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
30
|
+
hash: 1
|
31
31
|
segments:
|
32
|
-
-
|
33
|
-
version: "
|
32
|
+
- 1
|
33
|
+
version: "1"
|
34
34
|
type: :runtime
|
35
35
|
version_requirements: *id001
|
36
36
|
- !ruby/object:Gem::Dependency
|
@@ -41,11 +41,11 @@ dependencies:
|
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
hash:
|
44
|
+
hash: 3
|
45
45
|
segments:
|
46
46
|
- 3
|
47
|
-
-
|
48
|
-
version: "3.
|
47
|
+
- 2
|
48
|
+
version: "3.2"
|
49
49
|
type: :runtime
|
50
50
|
version_requirements: *id002
|
51
51
|
- !ruby/object:Gem::Dependency
|
@@ -56,11 +56,11 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - ~>
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
hash:
|
59
|
+
hash: 1
|
60
60
|
segments:
|
61
61
|
- 0
|
62
|
-
-
|
63
|
-
version: "0.
|
62
|
+
- 5
|
63
|
+
version: "0.5"
|
64
64
|
type: :runtime
|
65
65
|
version_requirements: *id003
|
66
66
|
- !ruby/object:Gem::Dependency
|
@@ -71,11 +71,11 @@ dependencies:
|
|
71
71
|
requirements:
|
72
72
|
- - ~>
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
hash:
|
74
|
+
hash: 9
|
75
75
|
segments:
|
76
76
|
- 2
|
77
|
-
-
|
78
|
-
version: "2.
|
77
|
+
- 5
|
78
|
+
version: "2.5"
|
79
79
|
type: :development
|
80
80
|
version_requirements: *id004
|
81
81
|
description: Capture Screenshots on Windows with Ruby to bmp, gif, jpg or png formats!
|