aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2013-05-14 20:14:28 -0500
committerJack Nagel2013-05-14 20:17:01 -0500
commit924ccc973c23ae824bd48988aeb4c87b6f8a33c3 (patch)
tree8d1e5a5fd853a51172a16f8e42a6f3f21f08758d /Library/Formula
parent4bcb452d72480c08c69a2d71f787faf386060ab8 (diff)
downloadhomebrew-924ccc973c23ae824bd48988aeb4c87b6f8a33c3.tar.bz2
scantailor: use custom Version subclass
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/scantailor.rb22
1 files changed, 21 insertions, 1 deletions
diff --git a/Library/Formula/scantailor.rb b/Library/Formula/scantailor.rb
index dac254eca..3dd1230d1 100644
--- a/Library/Formula/scantailor.rb
+++ b/Library/Formula/scantailor.rb
@@ -1,13 +1,33 @@
require 'formula'
class Scantailor < Formula
+ class Version < ::Version
+ def enhanced?
+ to_a[0].to_s == "enhanced"
+ end
+
+ def <=>(other)
+ other = self.class.new(other)
+ if enhanced? && other.enhanced?
+ super
+ elsif enhanced?
+ 1
+ elsif other.enhanced?
+ -1
+ else
+ super
+ end
+ end
+ end
+
homepage 'http://scantailor.sourceforge.net/'
url 'http://downloads.sourceforge.net/project/scantailor/scantailor/0.9.11/scantailor-0.9.11.tar.gz'
+ version '0.9.11' => Version
sha1 '21ec03317ca2b278179693237eaecd962ee0263b'
devel do
url 'http://downloads.sourceforge.net/project/scantailor/scantailor-devel/enhanced/scantailor-enhanced-20120812.tar.bz2'
- version 'enhanced-20120812'
+ version 'enhanced-20120812' => Version
sha1 'e3535d6e21a1844cf83eb2b23469fb6d90c070a9'
end