eyes_core 3.11.1 → 3.11.2

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
  SHA1:
3
- metadata.gz: 9906aa5b4a280c6793e18f3c5fa456cf360509a1
4
- data.tar.gz: 26b605fce3cef9a2d82cdd59d41673d3c0de012f
3
+ metadata.gz: 0c31e4bb154d96ec0e95c99d06aee001aa38e9f8
4
+ data.tar.gz: 119a3a2555f1b731939eb4b7e4dfa015288c222e
5
5
  SHA512:
6
- metadata.gz: 1e533a09fa3d4fba3ca4175edce52127a35957c4893a37ce0678961b179aee9ac17bee0ceb3270d6ace1c0ac10561016580e32a42482523dd66227e0ac8c5553
7
- data.tar.gz: c193f548c564c09ac08b6465c260ee3c07ce6459731630e307f012b5518f458163bfe8b9e501f77532df5d7b982b45063f50e623469475d84c73f39732fe76e8
6
+ metadata.gz: 49b505655c65f25b6601cb8dae90819e421d11392be91b5d8de76f621a2bca878c589c59d4cbbcb925079828cbc67d7bc0fd4fb5e0ed98fa8d0d642fd181a868
7
+ data.tar.gz: 9f8a23713075f767289f5ed04b07aec9abfc9cf12aca5c854f2a0d10a5c4215897e38f7f704205b411188d8cc6086aada1a69d441dc02616a8d967db36bad1a4
@@ -74,13 +74,12 @@ module Applitools
74
74
  self.match_level = Applitools::MATCH_LEVEL[:strict]
75
75
  self.server_scale = 0
76
76
  self.server_remainder = 0
77
+ end
77
78
 
78
- @default_match_settings = {
79
- match_level: match_level,
80
- exact: exact,
81
- scale: server_scale,
82
- remainder: server_remainder
83
- }
79
+ def match_level=(value)
80
+ return @match_level = value if Applitools::MATCH_LEVEL.values.include?(value)
81
+ return @match_level = Applitools::MATCH_LEVEL[value.to_sym] if Applitools::MATCH_LEVEL.keys.include?(value.to_sym)
82
+ raise Applitools::EyesError, "Unknown match level #{value}"
84
83
  end
85
84
 
86
85
  # Sets default match_level which will be applied to any test, unless match_level is set for a test explicitly
@@ -92,13 +91,8 @@ module Applitools
92
91
  # @option exact_options [Integer] :match_threshold
93
92
  # @return [Target] Applitools::Selenium::Target or Applitools::Images::target
94
93
 
95
- def default_match_level(value, exact_options = {})
96
- result = match_level_with_exact(value, exact_options)
97
- default_match_settings[:match_level] = result.first
98
- self.match_level = result.first
99
- default_match_settings[:exact] = result.last
100
- self.exact = result.last
101
- result
94
+ def set_default_match_settings(value, exact_options = {})
95
+ (self.match_level, self.exact) = match_level_with_exact(value, exact_options)
102
96
  end
103
97
 
104
98
  # Sets default match settings
@@ -116,7 +110,21 @@ module Applitools
116
110
  "Pasiing extra keys is prohibited! Passed extra keys: #{extra_keys}"
117
111
  )
118
112
  end
119
- default_match_settings.merge! value
113
+ result = default_match_settings.merge!(value)
114
+ self.match_level = result[:match_level]
115
+ self.exact = result[:exact]
116
+ self.server_scale = result[:scale]
117
+ self.server_remainder = result[:remainder]
118
+ result
119
+ end
120
+
121
+ def default_match_settings
122
+ {
123
+ match_level: match_level,
124
+ exact: exact,
125
+ scale: server_scale,
126
+ remainder: server_remainder
127
+ }
120
128
  end
121
129
 
122
130
  def batch
@@ -1,3 +1,3 @@
1
1
  module Applitools
2
- VERSION = '3.11.1'.freeze
2
+ VERSION = '3.11.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eyes_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.1
4
+ version: 3.11.2
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-07-31 00:00:00.000000000 Z
11
+ date: 2017-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oily_png