aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/redcar.rb
blob: cbe9cf4c9925d1665eae355465940c1e5f12fcea (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
require 'formula'

class Redcar <Formula
  head 'git://github.com/danlucraft/redcar.git'
  homepage 'http://github.com/danlucraft/redcar'

  depends_on 'jruby'

  # rspec doesn't provide an 'rspec' module, so our test fails.
  # depends_on 'rspec' => :jruby
  depends_on 'cucumber' => :jruby

  def install
    puts "You need the RSpec gem installed under JRuby or this will not work."

    system "jruby bin/redcar install"
    system "jruby -S rake build"
    libexec.install ['bin', 'lib', 'plugins', 'textmate', 'vendor']

    (bin+'redcar').write <<-EOS
#!/bin/bash
jruby -J-XstartOnFirstThread \"#{libexec}/bin/redcar\"
EOS
    chmod 0555, (bin+'redcar')
  end
end