right_data 0.7.5 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/main.rb +6 -2
  2. metadata +4 -4
data/lib/main.rb CHANGED
@@ -30,9 +30,13 @@ module RightData
30
30
  return false unless self.is_visual_media?(a) && self.is_visual_media?(b)
31
31
  # rmagick1.signature <=> rmagick2.signature
32
32
  # rmagick1.compare_channel(rmagick2, MeanAbsoluteErrorMetric).last == 0
33
- cmd = "compare -metric AE \"#{a.gsub(/\"/,'\"')}\" \"#{b.gsub(/\"/,'\"')}\" /dev/null"
33
+ cmd = "compare -metric AE \"#{a.gsub(/\"/,'\"')}\" \"#{b.gsub(/\"/,'\"')}\" /dev/null 2>&1"
34
34
  puts "Executing comparison: #{cmd}"
35
- "0" == `#{cmd}`
35
+ # >> a = `compare -metric ae a.png b.png /dev/null 2>&1`
36
+ # => "0\n"
37
+ "0" == `#{cmd}`.chomp
38
+
39
+ # TODO Consider checking rotated 90,180,270 degrees and scaled to other image...
36
40
  end
37
41
 
38
42
  def self.each_set_of_duplicates(*paths, &block)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_data
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 5
10
- version: 0.7.5
9
+ - 7
10
+ version: 0.7.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jonathan Siegel
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-08 00:00:00 +01:00
18
+ date: 2010-10-09 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency