aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/selecta.rb
blob: 00b146ec0c6688b2b001903b56ca6dd852ffb621 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class Ruby19Dependency < Requirement
  fatal true

  satisfy do
    ruby = which("ruby")
    `#{ruby} --version` =~ /ruby (\d\.\d).\d/
    $1.to_f >= 1.9
  end

  def message
    "Selecta requires Ruby 1.9 or greater."
  end
end

class Selecta < Formula
  homepage "https://github.com/garybernhardt/selecta"
  url "https://github.com/garybernhardt/selecta/archive/v0.0.6.tar.gz"
  sha1 "bf8881b2d545847921b1a05d23b88e2037c358e4"

  depends_on Ruby19Dependency

  def install
    bin.install "selecta"
  end

  test do
    system "#{bin}/selecta", "--version"
  end
end