wraith 2.3.4 → 2.4.0

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: 525af1d831af1e48c7369104056f2eb40c78e838
4
- data.tar.gz: 21ec27716ca9acf38768b598c18addca53611c8f
3
+ metadata.gz: e68eaaa29da4fa44372bd568498e9fc5e5f93982
4
+ data.tar.gz: dbac3ca706b5dea122d4518d639999d7c3ff9bcb
5
5
  SHA512:
6
- metadata.gz: d5e863f5b8f1c5b169cc1aa5e19a9494af2f06d7862c7db1864372b1bb323dc03c5db2957f8aacd57a43386414ad801bc1381629a5c388b0175dd67c51da7c17
7
- data.tar.gz: e4e7e9d682b607a69982b4c2d4e7b92e692fa66e601dd89957dd5df931f24ae3b6f04a7f64315e166926215092e70c6994b0596f7cc97e09ed4f626029daac48
6
+ metadata.gz: ec1245b1fc997af5ab86b2cc11111677552ee04eabcb50b5c31abb09760dca4b0237c93154c7fad2b4dad156a88e98270336b70049c96c214e5e8a259ddb4d48
7
+ data.tar.gz: a677cafcbc001ac9ac8063cc26889539ba8a49e65f6430eb6714556292979312342ffccc5ed098da839802f4a73da9499e00cab400016291ad1264f7212a6f41
@@ -27,7 +27,7 @@ class Wraith::CompareImages
27
27
  end
28
28
 
29
29
  def compare_task(base, compare, output, info)
30
- cmdline = "compare -dissimilarity-threshold 1 -fuzz #{wraith.fuzz} -metric AE -highlight-color blue #{base} #{compare} #{output}"
30
+ cmdline = "compare -dissimilarity-threshold 1 -fuzz #{wraith.fuzz} -metric AE -highlight-color #{wraith.highlight_color} #{base} #{compare} #{output}"
31
31
  px_value = Open3.popen3(cmdline) { |_stdin, _stdout, stderr, _wait_thr| stderr.read }.to_f
32
32
  begin
33
33
  img_size = ImageSize.path(output).size.inject(:*)
@@ -36,7 +36,7 @@ class Wraith::SaveImages
36
36
  end
37
37
 
38
38
  def capture_page_image(browser, url, width, file_name, selector)
39
- puts `"#{browser}" "#{wraith.phantomjs_options}" "#{wraith.snap_file}" "#{url}" "#{width}" "#{file_name}" "#{selector}"`
39
+ puts `"#{browser}" #{wraith.phantomjs_options} "#{wraith.snap_file}" "#{url}" "#{width}" "#{file_name}" "#{selector}"`
40
40
  end
41
41
 
42
42
  private
@@ -1,3 +1,3 @@
1
1
  module Wraith
2
- VERSION = "2.3.4"
2
+ VERSION = "2.4.0"
3
3
  end
data/lib/wraith/wraith.rb CHANGED
@@ -79,6 +79,10 @@ class Wraith::Wraith
79
79
  @config["fuzz"]
80
80
  end
81
81
 
82
+ def highlight_color
83
+ @config['highlight_color'] ? @config['highlight_color'] : 'blue'
84
+ end
85
+
82
86
  def mode
83
87
  if %w(diffs_only diffs_first alphanumeric).include?(@config["mode"])
84
88
  @config["mode"]
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: 2.3.4
4
+ version: 2.4.0
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: 2015-04-09 00:00:00.000000000 Z
12
+ date: 2015-05-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pry