String.undent for prettier HEREDOCs

master
Max Howell 2010-02-27 17:26:27 +00:00
parent 41fbc4636b
commit dabeaddebb
6 changed files with 50 additions and 54 deletions

View File

@ -1,9 +1,6 @@
require 'formula'
class Ack <ScriptFileFormula
# NOTE you don't need to specify the version, usually it is determined
# automatically by examination of the URL, however in this case our auto
# determination magic is inadequete
version '1.92'
url "http://github.com/petdance/ack/raw/f5556c48eb46100e1733f5a21b45a00f6c190061/ack"
md5 '7175438fbcb43405f50d7ffda701eeb3'

View File

@ -25,12 +25,13 @@ class AndroidSdk <Formula
end
end
def caveats; <<-EOS
We agreed to the Android SDK License Agreement for you by downloading the SDK.
If this is unacceptable you should uninstall.
You can read the license at: http://developer.android.com/sdk/terms.html
def caveats; <<-EOS.undent
We agreed to the Android SDK License Agreement for you when we downloaded the
SDK. If this is unacceptable you should uninstall. You can read the license
at: http://developer.android.com/sdk/terms.html
Please add this line to your .bash_profile:
export ANDROID_SDK_ROOT=#{prefix}
EOS
end

View File

@ -55,7 +55,7 @@ class Mysql <Formula
(prefix+'com.mysql.mysqld.plist').write startup_plist
end
def caveats; <<-EOS
def caveats; <<-EOS.undent
Set up databases with:
mysql_install_db
@ -67,8 +67,7 @@ Or start manually with:
EOS
end
def startup_plist
return <<-EOPLIST
def startup_plist; <<-EOPLIST.undent
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

View File

@ -16,7 +16,7 @@ class RubyEnterpriseEdition <Formula
system *args
end
def caveats; <<-EOS
def caveats; <<-EOS.undent
By default we don't compile REE as a shared library. From their documentation:
Please note that enabling --enable-shared will make the Ruby interpreter

View File

@ -15,11 +15,10 @@ class Sip <Formula
system "make install"
end
def caveats; <<-EOS
This formula won't function until you add the following to your PYTHONPATH
environment variable:
def caveats; <<-EOS.undent
This formula won't function until you amend your PYTHONPATH like so:
#{HOMEBREW_PREFIX}/lib/python
export PYTHON_PATH=#{HOMEBREW_PREFIX}/lib/python:$PYTHON_PATH
This is why you would ideally install sip using pip or easy_install. But this
can't work because this package doesn't support Python's disttools.

View File

@ -23,7 +23,7 @@ class Thrift <Formula
system "make install"
end
def caveats; <<-EOS
def caveats; <<-EOS.undent
We didn't install the python bindings, to do that:
easy_install thrift