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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad34e154a31f1f604bd6254c51272dc90f99b54e
4
- data.tar.gz: d981692a40143a35cf38a5dfb688ff2302085661
3
+ metadata.gz: 69e2afef8a9bfe10381ce28af28978d563d2beaf
4
+ data.tar.gz: 0f693b221e9a91d53580280b0fdbd7b67675ebf2
5
5
  SHA512:
6
- metadata.gz: a9e219db7678d8e51d2c3190d48a9105b88e0326ebc6a90a208a046b6f7ebc5da76164ed72b53f8b9eefcfc61e6548875052f17d060b280268f60998962ad0f5
7
- data.tar.gz: ca393aff8ab9c00a5887b1b786c4a5a1a95fab4d1fe17dad89305dedcd50c50efc8e98edb77fc11cf8946a9c344b76f25fbd4737ce828296413b815766d47da6
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
- img_size = ImageSize.path(output).size.inject(:*)
34
- percentage(img_size, px_value, info)
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
@@ -50,7 +50,7 @@
50
50
  </a>
51
51
  <% end %>
52
52
  <p class="text-center">diff</p>
53
- <p class="text-center text-muted"><%=files[:data]%> percent different</p>
53
+ <p class="text-center text-muted"><%=files[:data]%> % different</p>
54
54
 
55
55
  </div>
56
56
  </div>
@@ -1,3 +1,3 @@
1
1
  module Wraith
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
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 = "http://responsivenews.co.uk"
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.0
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-05-14 00:00:00.000000000 Z
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: http://responsivenews.co.uk
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: