Created
September 13, 2015 04:20
-
-
Save mwilliammyers/a4d3eaf5247d87c81f67 to your computer and use it in GitHub Desktop.
eclim Homebrew formula
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Eclim < Formula | |
desc "Eclim provides the ability to access Eclipse code editing features via the command line or favorite editor (eg. VIM)" | |
homepage "http://eclim.org/index.html" | |
url "http://sourceforge.net/projects/eclim/files/eclim/2.4.1/eclim_2.4.1.jar", :using => :nounzip | |
sha256 "289ba3643a1193edfc68bf042043f4847995733eecb23e2077f49f39c51a1527" | |
head "git://github.com/ervandew/eclim.git" | |
#keg_only "..." | |
head do | |
depends_on "ant" | |
end | |
depends_on :java | |
def install | |
odie "You must set the environment variable ECLIPSE_HOME" if ENV['ECLIPSE_HOME'].empty? | |
if build.head? | |
system "ant", | |
"-Declipse.home=#{ENV['ECLIPSE_HOME']}", | |
"-Dvim.files=#{ENV['HOME']}/.vim" # TODO!: what if this is in a non-default location? | |
else | |
system "java", | |
"-Declipse.home=#{ENV['ECLIPSE_HOME']}", | |
"-Dvim.files=#{ENV['HOME']}/.vim", | |
"-jar", "eclim_#{version}.jar", | |
"install" | |
end | |
end | |
def run_uninstaller | |
odie "You must set the environment variable ECLIPSE_HOME" if ENV['ECLIPSE_HOME'].empty? | |
quiet_system "brew", "fetch", "#{name}" unless File.file?("#{cached_download}") | |
system "java", | |
"-Declipse.home=#{ENV['ECLIPSE_HOME']}", | |
"-Dvim.files=~/.vim", # TODO!: $HOME is replaced by the testing environment... | |
"-jar", "#{cached_download}", | |
"uninstall" | |
quiet_system "brew", "uninstall", "#{name}" # TODO!: I would rather not call this directly... | |
end | |
test do | |
run_uninstaller if ARGV.include? "--uninstall" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sir! Where did you get the
Formula
Class.. :)I ran
ruby eclim.rb
and this what I got:eclim.rb:1:in `<main>': uninitialized constant Formula (NameError)
is it in rails?