Skip to content

Instantly share code, notes, and snippets.

@jappievw
Created May 15, 2012 11:34
Show Gist options
  • Save jappievw/2701034 to your computer and use it in GitHub Desktop.
Save jappievw/2701034 to your computer and use it in GitHub Desktop.
homebrew formula for composer.phar (http://packagist.org/about-composer)
require 'formula'
class Composer < Formula
head 'http://getcomposer.org/composer.phar'
homepage 'http://getcomposer.org'
def install
system "chmod a+x composer.phar"
system "mkdir -p #{prefix}/bin"
system "cp composer.phar #{prefix}/bin/composer"
end
def test
system 'composer --version'
end
def caveats; <<-EOS.undent
Please ignore the warning above as it is expected but harmless.
You can always verify your installation by running:
"composer --version".
When you get an unexpected response, check whether the php setting "detect_unicode"
is turned off:
"php --info | grep detect_unicode".
You may also read more about composer and packagist by running:
"brew home composer".
EOS
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment