wraith 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wraith/compare_images.rb +7 -3
- data/lib/wraith/gallery_template/gallery_template.erb +1 -1
- data/lib/wraith/version.rb +1 -1
- data/wraith.gemspec +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69e2afef8a9bfe10381ce28af28978d563d2beaf
|
4
|
+
data.tar.gz: 0f693b221e9a91d53580280b0fdbd7b67675ebf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c13ba3140a2f16fac7a34e545361b9594c5c00c67486d121ff0774dfb2abd3f878f8f043684188c2a7251a5289c445e8e327ce6089e3155cfe374880c9ec2790
|
7
|
+
data.tar.gz: dbe796b62c075b7455b193026be496fc5d1786ba79fd3a575f2cf0c7a198b550ff32f519510b03ca7ac349b660f1929ab52eeee36b37b1284221996d8c70a747
|
@@ -28,9 +28,13 @@ class Wraith::CompareImages
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def compare_task(base, compare, output, info)
|
31
|
-
cmdline = "compare -fuzz #{wraith.fuzz} -metric AE -highlight-color blue #{base} #{compare} #{output}"
|
31
|
+
cmdline = "compare -dissimilarity-threshold 1 -fuzz #{wraith.fuzz} -metric AE -highlight-color blue #{base} #{compare} #{output}"
|
32
32
|
px_value = Open3.popen3(cmdline) { |stdin, stdout, stderr, wait_thr| stderr.read }.to_f
|
33
|
-
|
34
|
-
|
33
|
+
begin
|
34
|
+
img_size = ImageSize.path(output).size.inject(:*)
|
35
|
+
percentage(img_size, px_value, info)
|
36
|
+
rescue
|
37
|
+
File.open(info, 'w') { |file| file.write("invalid") } unless File.exists?(output)
|
38
|
+
end
|
35
39
|
end
|
36
40
|
end
|
data/lib/wraith/version.rb
CHANGED
data/wraith.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["david.blooman@gmail.com", "simon+github@thulbourn.com"]
|
11
11
|
spec.summary = 'Wraith is a screenshot comparison tool, created by developers at BBC News.'
|
12
12
|
spec.description = 'Wraith is a screenshot comparison tool, created by developers at BBC News.'
|
13
|
-
spec.homepage = "
|
13
|
+
spec.homepage = "https://github.com/BBC-News/wraith"
|
14
14
|
spec.license = "Apache 2"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wraith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Blooman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-06-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pry
|
@@ -195,7 +195,7 @@ files:
|
|
195
195
|
- templates/configs/config.yaml
|
196
196
|
- templates/javascript/snap.js
|
197
197
|
- wraith.gemspec
|
198
|
-
homepage:
|
198
|
+
homepage: https://github.com/BBC-News/wraith
|
199
199
|
licenses:
|
200
200
|
- Apache 2
|
201
201
|
metadata: {}
|
@@ -221,4 +221,3 @@ specification_version: 4
|
|
221
221
|
summary: Wraith is a screenshot comparison tool, created by developers at BBC News.
|
222
222
|
test_files:
|
223
223
|
- spec/wraith_spec.rb
|
224
|
-
has_rdoc:
|