symilaa 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,6 @@ module Symilaa
22
22
  similiarity_factor = this_one.compare_channel(that_one, Magick::MeanAbsoluteErrorMetric)[1]
23
23
 
24
24
  similiarity_factor <= SIMILARITY_THRESHOLD
25
- end
25
+ rescue Magick::ImageMagickError; end
26
26
  end
27
27
  end
@@ -1,3 +1,3 @@
1
1
  module Symilaa
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
Binary file
@@ -7,6 +7,7 @@ module Symilaa
7
7
  GRYLLS = File.expand_path '../fixtures/bear_grylls.png', File.dirname(__FILE__)
8
8
  GRYLLS_SLIGHT_DIFF = File.expand_path '../fixtures/bear_grylls_slightly_different.png', File.dirname(__FILE__)
9
9
  GRYLLS_DIFF = File.expand_path '../fixtures/bear_grylls_different.png', File.dirname(__FILE__)
10
+ QUEENY_POPS = File.expand_path '../fixtures/farewells.jpg', File.dirname(__FILE__)
10
11
 
11
12
  def test_equality_when_images_altered
12
13
  one = Screenshot.new GRYLLS
@@ -49,6 +50,14 @@ module Symilaa
49
50
 
50
51
  refute one.similar_to? two
51
52
  end
53
+
54
+ def test_different_sized_images_are_different
55
+ one = Screenshot.new GRYLLS
56
+ two = Screenshot.new QUEENY_POPS
57
+
58
+ refute one.similar_to? two
59
+ refute one == two
60
+ end
52
61
  end
53
62
  end
54
63
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: symilaa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-11-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
16
- requirement: &16724680 !ruby/object:Gem::Requirement
16
+ requirement: &7660100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *16724680
24
+ version_requirements: *7660100
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rmagick
27
- requirement: &16723940 !ruby/object:Gem::Requirement
27
+ requirement: &7659400 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *16723940
35
+ version_requirements: *7659400
36
36
  description: ! "Using the wonders of RMagick, this wonderful gem will produce a boolean
37
37
  result based on the computed similarity\n of the two images passed."
38
38
  email:
@@ -52,6 +52,7 @@ files:
52
52
  - test/fixtures/bear_grylls.png
53
53
  - test/fixtures/bear_grylls_different.png
54
54
  - test/fixtures/bear_grylls_slightly_different.png
55
+ - test/fixtures/farewells.jpg
55
56
  - test/symilaa/test_screenshot.rb
56
57
  homepage: https://github.com/bskyb-commerce-helpcentre/symilaa
57
58
  licenses: []