eyes_selenium 3.6.5 → 3.6.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e96350aecd002dd2bdfcd5ecf75b26cf9c078e7
4
- data.tar.gz: e92f09cfcee3ce929af818fc4e93ee30550d71f9
3
+ metadata.gz: 4c77b0cba95c46cfe2478c25dcd6bbb313807d49
4
+ data.tar.gz: 944f64e5cbb727d66d75a148c29a6ea3215c4136
5
5
  SHA512:
6
- metadata.gz: d6558852c2d19dd6a4f2a5c2e11de04ef34990d42423c990cc8a68e044637ccf2922c90f8c3690f50074b6a383adb2c20847fcc49e4d9084724695e5b1a17b3c
7
- data.tar.gz: 5eb7fc0a9f4723203d4acd56dff9834d09135fda3e6c164a6462be46541528145e9fed98a54e63dcbabda47210af8918d954f443f71dc18341353feb346f242d
6
+ metadata.gz: 97ed06ddfc1512f3c60b39880f0c8ae62e5d8107f0b1c3572ac72f48c5b851c7581702f4520217a1183e825998bbd509f704a474cca5965fbaf862e58ebbcd4b
7
+ data.tar.gz: e2778b7e96f96a30cee5eb1196565cbfc53df261678e0f64509e79153c16e26c9b04781b79b97ccdf828f798d9162b57ec94ca58a1665d99a98dbca0eed59db5
@@ -1066,10 +1066,10 @@ module Applitools::Selenium
1066
1066
  )
1067
1067
  end
1068
1068
 
1069
- match_data = Applitools::MatchWindowData.new.tap do |d|
1070
- d.tag = tag
1071
- d.ignore_mismatch = false
1072
- d.match_level = default_match_settings[:match_level]
1069
+ match_data = Applitools::MatchWindowData.new.tap do |data|
1070
+ data.tag = tag
1071
+ data.ignore_mismatch = false
1072
+ data.match_level = default_match_settings[:match_level]
1073
1073
  end
1074
1074
 
1075
1075
  check_window_base(
@@ -1111,8 +1111,11 @@ module Applitools::Selenium
1111
1111
  end
1112
1112
 
1113
1113
  class << self
1114
- def position_provider(stitch_mode, driver, disable_horizontal=false, disable_vertical=false, explicit_entire_size=nil)
1115
- max_width, max_height = nil, nil
1114
+ def position_provider(stitch_mode, driver, disable_horizontal = false, disable_vertical = false,
1115
+ explicit_entire_size = nil)
1116
+
1117
+ max_width = nil
1118
+ max_height = nil
1116
1119
  unless explicit_entire_size.nil?
1117
1120
  max_width = explicit_entire_size.width
1118
1121
  max_height = explicit_entire_size.height
@@ -1120,10 +1123,10 @@ module Applitools::Selenium
1120
1123
  case stitch_mode
1121
1124
  when :SCROLL
1122
1125
  Applitools::Selenium::ScrollPositionProvider.new(driver, disable_horizontal, disable_vertical,
1123
- max_width: max_width, max_height: max_height)
1126
+ max_width: max_width, max_height: max_height)
1124
1127
  when :CSS
1125
1128
  Applitools::Selenium::CssTranslatePositionProvider.new(driver, disable_horizontal, disable_vertical,
1126
- max_width: max_width, max_height: max_height)
1129
+ max_width: max_width, max_height: max_height)
1127
1130
  end
1128
1131
  end
1129
1132
  end
@@ -235,7 +235,7 @@ module Applitools::Selenium
235
235
  location
236
236
  end
237
237
 
238
- def sub_screenshot(region, coordinate_type, throw_if_clipped = false)
238
+ def sub_screenshot(region, coordinate_type, throw_if_clipped = false, force_nil_if_clipped = false)
239
239
  logger.info "get_subscreenshot(#{region}, #{coordinate_type}, #{throw_if_clipped})"
240
240
  Applitools::ArgumentGuard.not_nil region, 'region'
241
241
  Applitools::ArgumentGuard.not_nil coordinate_type, 'coordinate_type'
@@ -248,6 +248,7 @@ module Applitools::Selenium
248
248
  Applitools::EyesScreenshot::COORDINATE_TYPES[:screenshot_as_is]
249
249
 
250
250
  if as_is_subscreenshot_region.empty? || (throw_if_clipped && !as_is_subscreenshot_region.size == region.size)
251
+ return nil if force_nil_if_clipped
251
252
  raise Applitools::OutOfBoundsException.new "Region #{region} (#{coordinate_type}) is out" \
252
253
  " of screenshot bounds [#{frame_window}]"
253
254
  end
@@ -154,8 +154,8 @@ module Applitools::Selenium
154
154
  if actual_image_width < stitched_image.width || actual_image_height < stitched_image.height
155
155
  logger.info 'Trimming unnecessary margins...'
156
156
  stitched_image.crop!(0, 0,
157
- [actual_image_width, stitched_image.width].min,
158
- [actual_image_height, stitched_image.height].min)
157
+ [actual_image_width, stitched_image.width].min,
158
+ [actual_image_height, stitched_image.height].min)
159
159
  logger.info 'Done!'
160
160
  end
161
161
 
@@ -1,3 +1,3 @@
1
1
  module Applitools
2
- VERSION = '3.6.5'.freeze
2
+ VERSION = '3.6.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eyes_selenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.5
4
+ version: 3.6.6
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-05-09 00:00:00.000000000 Z
11
+ date: 2017-05-12 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.6.5
19
+ version: 3.6.6
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.6.5
26
+ version: 3.6.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: selenium-webdriver
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  version: '0'
123
123
  requirements: []
124
124
  rubyforge_project:
125
- rubygems_version: 2.6.8
125
+ rubygems_version: 2.5.1
126
126
  signing_key:
127
127
  specification_version: 4
128
128
  summary: Applitools Ruby Images SDK