looks_good 1.1.4 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/looks_good/configuration.rb +6 -1
- data/lib/looks_good/version.rb +1 -1
- data/lib/looks_good.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf8d8a4e6d3c28e9727d7a4e8001577e31292f14bbd9f744ea3a85d917bf4f76
|
4
|
+
data.tar.gz: 78de2009148d3a2644b7ef176582c992f0b12139905c4051987947950144304f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c8ab043d5fde78bd60b6b898f66ac1ebe169f0d8d9cdea11c4991bdb2e777e62b7c00ffda1a9ae2fd3180d2c36ed6bc14c61be251edb895adbd058c99e0c930
|
7
|
+
data.tar.gz: d8498ed331bc9c95af2983f5acda2518bd48e2f9bce50c80c81aeecf48fca307e8832f5c94b422022aa035f735256daa2b99ddd86b6a35056551935a4c0786ec
|
data/README.md
CHANGED
@@ -93,6 +93,8 @@ Also created are subfolders:
|
|
93
93
|
#### disable_scaling
|
94
94
|
set to true to disable the scaling behavior
|
95
95
|
|
96
|
+
#### custom_error_message
|
97
|
+
When the spec fails, this message will be appended to the failure.
|
96
98
|
|
97
99
|
#### Sleep_between_tries
|
98
100
|
- sets the sleep time (in seconds) between match tries (requires max_no_tries > 1). Defaults to 0.5
|
@@ -6,7 +6,8 @@ module LooksGood
|
|
6
6
|
class << self
|
7
7
|
|
8
8
|
attr_accessor :fuzz, :reference_image_path, :max_no_tries, :sleep_between_tries,
|
9
|
-
:browser_folders, :default_within, :scale_amount, :disable_scaling
|
9
|
+
:browser_folders, :default_within, :scale_amount, :disable_scaling,
|
10
|
+
:custom_failure_message
|
10
11
|
|
11
12
|
attr_reader :paths
|
12
13
|
|
@@ -32,6 +33,10 @@ module LooksGood
|
|
32
33
|
@disable_scaling ||= false
|
33
34
|
end
|
34
35
|
|
36
|
+
def custom_failure_message
|
37
|
+
@custom_failure_message ||= ""
|
38
|
+
end
|
39
|
+
|
35
40
|
def fuzz
|
36
41
|
@fuzz ||= "10%"
|
37
42
|
end
|
data/lib/looks_good/version.rb
CHANGED
data/lib/looks_good.rb
CHANGED
@@ -39,7 +39,9 @@ module LooksGood
|
|
39
39
|
HOW TO FIX:\n
|
40
40
|
- cp #{comparison.diff_image.path(:candidate)} #{@expected_reference_file}
|
41
41
|
or
|
42
|
-
- LOOKS_GOOD=true rspec ...
|
42
|
+
- LOOKS_GOOD=true rspec ...
|
43
|
+
--
|
44
|
+
#{LooksGood::Configuration.custom_failure_message}]
|
43
45
|
result_hash[:result] = false
|
44
46
|
result_hash
|
45
47
|
else
|