eyes_images 3.0.8 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/applitools/images/eyes.rb +11 -9
- data/lib/applitools/images/eyes_images_screenshot.rb +5 -2
- data/lib/applitools/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0012cc97395cf1304486ecb67c9b78b2d82da42a
|
4
|
+
data.tar.gz: c13420a9d8a73fea52fc998111474999516a79c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82cc3d28c1da33d73364e2af689066bf703c23270aaf619bf898d7526983950b989d93933106a59a064c37d5922f724e978b8847dd993c32957fd11f06a7c47c
|
7
|
+
data.tar.gz: 907d558ce9e9b9ce372b0a8b0ab9f6d084565c14a4972db0b6e7ca55e710e46e759786dd057a2d8a5441528f966e3c7b3bc1ae20fb2da88ffd3d12afa8fbe736
|
@@ -186,15 +186,17 @@ module Applitools::Images
|
|
186
186
|
alias set_viewport_size vp_size=
|
187
187
|
|
188
188
|
def get_image_from_options(options)
|
189
|
-
if options[:image].nil? || !options[:image].is_a?(Applitools::Screenshot)
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
189
|
+
image = if options[:image].nil? || !options[:image].is_a?(Applitools::Screenshot)
|
190
|
+
if options[:image].is_a? ChunkyPNG::Image
|
191
|
+
Applitools::Screenshot.from_image options[:image]
|
192
|
+
elsif !options[:image_path].nil? && !options[:image_path].empty?
|
193
|
+
Applitools::Screenshot.from_datastream ChunkyPNG::Datastream.from_file(options[:image_path]).to_s
|
194
|
+
elsif !options[:image_bytes].nil? && !options[:image_bytes].empty?
|
195
|
+
Applitools::Screenshot.from_datastream options[:image_bytes]
|
196
|
+
end
|
197
|
+
else
|
198
|
+
options[:image]
|
199
|
+
end
|
198
200
|
|
199
201
|
Applitools::ArgumentGuard.not_nil image, 'options[:image] can\'t be nil!'
|
200
202
|
|
@@ -84,8 +84,11 @@ module Applitools::Images
|
|
84
84
|
" screenshot bounds #{bounds}"
|
85
85
|
end
|
86
86
|
|
87
|
-
sub_screenshot_image = Applitools::Screenshot.
|
88
|
-
|
87
|
+
sub_screenshot_image = Applitools::Screenshot.from_any_image(
|
88
|
+
image.crop(
|
89
|
+
sub_screen_region.left, sub_screen_region.top, sub_screen_region.width, sub_screen_region.height
|
90
|
+
).to_datastream.to_blob
|
91
|
+
)
|
89
92
|
|
90
93
|
relative_sub_screenshot_region = convert_region_location(sub_screen_region, SCREENSHOT_AS_IS, CONTEXT_RELATIVE)
|
91
94
|
|
data/lib/applitools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eyes_images
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Applitools Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eyes_core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.
|
19
|
+
version: 3.1.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.
|
26
|
+
version: 3.1.1
|
27
27
|
description: Applitools Ruby Images SDK
|
28
28
|
email:
|
29
29
|
- team@applitools.com
|