Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
# Apple Binary Property List serializer for Ruby 1.8. | |
require 'iconv' | |
module AppleBinaryPropertyList | |
MIME_TYPE = 'application/octet-stream' # Don't know what to use, so use a very generic type for now | |
CFData = Struct.new(:data) # For marking strings as binary data which will be decoded as a CFData object | |
vhost { 'dashboard': ensure => present } | |
Package <| name == 'passenger' |> -> Vhost['dashboard'] |
#!/usr/bin/ruby | |
require 'parser-emit' | |
class Puppet::Parser::AST::Definition | |
attr_accessor :name | |
end | |
class Manifest | |
class << self | |
#include Enumerable |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'digest/sha2' | |
require 'cfpropertylist' | |
def salted_sha512(password) | |
seedint = rand(((2**31 - 1)-1+1)) | |
seedhex = ("%x" % seedint).upcase.rjust(8, '0') | |
seedstring = seedint.to_a.pack("L") |
Facter.add(:noop) do | |
confine :kernel => :linux | |
result = false | |
setcode do | |
unless Facter.value(:environment).match(/^(test|dev|qa)$/) | |
result = true unless Time.now.utc.hour.between?(1, 10) | |
end |
#!/usr/local/bin/macruby | |
# Copyright (c) 2009 Matt Aimonetti | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
define rvm::install() { | |
exec { | |
"download rvm for ${name}" : | |
creates => "/home/${name}/.rvm/scripts/rvm", | |
cwd => "/home/${name}", | |
command => 'curl -L get.rvm.io -o install-rvm.sh', | |
user => $name, | |
path => ['/bin', '/usr/bin'], | |
notify => Exec["install rvm for ${name}"], |
The intention is to get a clean build of MRI 1.8.7 and 1.9.3.
MRI 1.8.7 doesn't play nicely with LLVM based GCC compilers. In Mountain Lion, the only way to get a non-LLVM gcc is to build one yourself. The command line tools package in Xcode 4.4 does not contain a non-llvm based GCC.