watir_visual_diff 0.0.1 → 0.0.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: 4b59144d0fc2d9d5c3267367ab8c212e10cc2a57
4
- data.tar.gz: f8b9b36c9bef41891938a8084d71c1d6bd3e8ce8
3
+ metadata.gz: c0d4e14db32cd63753957825e09c4878cbb6379b
4
+ data.tar.gz: 9891cdde974b586eebe7e09856db92193531f7c0
5
5
  SHA512:
6
- metadata.gz: 60d535c8e4e962fc48846c9b0212059bd2dc73a5eb7ae312ed6969a7f17bc4537a686360ffccbe47535c0fb5d733d13529f21c2c7c28768fecfad14e65d905cf
7
- data.tar.gz: af3dc2a60f7db4226af17676620595f3b31d9b2f4c911b141fd2d94c4369484fa6e088784e40a782fe7ef7078449f5db1e8095f0f8f61f06ff728991eccfab6c
6
+ metadata.gz: e0a841900d13f8981982ec246a3a836d8eedb8d0f551d3dc776623075dda7917c7392924adb116ff505c3100a5c844f6ed9eead850542a696a8e2d83fc03a0eb
7
+ data.tar.gz: 1dc2f71f9a95a6e13737890f5900b0471ca6c2f217235285cd8b2f4bee47302fd2231a86e86f1b96ed6fba9366ea9217761e55418005374a0265fa35cc5205dd
@@ -7,6 +7,7 @@ module WatirVisualDiff
7
7
 
8
8
  require 'watir_visual_diff/matcher'
9
9
  require 'watir_visual_diff/color_methods'
10
+ require 'watir_visual_diff/screenshot'
10
11
 
11
12
  def self.compare(path_a, path_b, options = {})
12
13
  Matcher.new(options).compare(path_a, path_b)
@@ -0,0 +1,9 @@
1
+ require 'oily_png'
2
+
3
+ module Watir
4
+ class Element
5
+ def screenshot
6
+ ChunkyPNG::Image.from_blob(browser.screenshot.png).crop!(wd.location.x.to_i + 1, wd.location.y.to_i + 1, wd.size.width, wd.size.height)
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module WatirVisualDiff # :nodoc:
2
- VERSION = "0.0.1".freeze
2
+ VERSION = "0.0.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir_visual_diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Commu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-10 00:00:00.000000000 Z
11
+ date: 2017-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oily_png
@@ -81,6 +81,7 @@ files:
81
81
  - lib/watir_visual_diff/modes/rgb.rb
82
82
  - lib/watir_visual_diff/rectangle.rb
83
83
  - lib/watir_visual_diff/result.rb
84
+ - lib/watir_visual_diff/screenshot.rb
84
85
  - lib/watir_visual_diff/version.rb
85
86
  - spec/fixtures/a.png
86
87
  - spec/fixtures/a1.png
@@ -122,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
123
  version: '0'
123
124
  requirements: []
124
125
  rubyforge_project:
125
- rubygems_version: 2.6.7
126
+ rubygems_version: 2.5.1
126
127
  signing_key:
127
128
  specification_version: 4
128
129
  summary: Image comparison library for Watir