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
index 95b48a0..7dd897c 100644 | |
--- a/chef/lib/chef/provider/subversion.rb | |
+++ b/chef/lib/chef/provider/subversion.rb | |
@@ -122,7 +122,7 @@ class Chef | |
# YAML doesn't appreciate input like "svn: '/tmp/deploydir' is not a working copy\n" | |
return nil | |
end | |
- raise "tried to run `#{command}' and got unexpected result #{result.inspect}" unless repo_attrs.kind_of?(Hash) | |
+ raise "Attempted to parse SVN info but could not. SVN info was:\n#{svn_info}" unless repo_attrs.kind_of?(Hash) | |
rev = (repo_attrs['Last Changed Rev'] || repo_attrs['Revision']).to_s |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'thor' | |
require 'chef' | |
require 'chef/node' | |
require 'chef/rest' | |
# Please see the readme for overview documentation. | |
# |
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
this is the error I get. | |
/srv/chef/cookbooks/system/libraries/add_env_var.rb:1:in `system': wrong number of arguments (ArgumentError) | |
Module system | |
def add_env_var(variable, path) | |
envfile = "/etc/profile.d/99generic.sh" | |
foundvar = false | |
arr = IO.readlines( envfile ) if File::exists?( envfile ) |
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
# This is how Queue#subscribe will work in the next version of Bunny (v0.5.4). | |
# It's in the 'experimental' branch now. | |
# | |
# In order for subscription to work smoothly you need to use a combination of | |
# Queue#subscribe, Queue#unsubscribe, Queue#ack and Client#qos prefetch. The | |
# prefetch will allow a controlled number of messages to be released to a | |
# consumer, which means that Queue#unsubscribe and other methods can be run | |
# without errors due to out of sequence messages. | |
# |
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
# geoip-c-0.5.5.gem is in cookbooks/geoip/files/default | |
remote_file "/tmp/geoip-c-0.5.5.gem" do | |
source 'geoip-c-0.5.5.gem' | |
end | |
gem_package "/tmp/geoip-c-0.5.5.gem" do | |
action :install | |
end |
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
# ec2-run-instances -k <key_name> ami-1515f67c | |
# Needed to be able to get Java packages later | |
sudo sed -i 's/universe/multiverse universe/' /etc/apt/sources.list | |
sudo apt-get update | |
sudo env DEBIAN_FRONTEND=noninteractive apt-get upgrade -y | |
# Accept the Sun Java license | |
echo 'sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true' | sudo debconf-set-selections | |
sudo apt-get install -y ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential zlib1g-dev libxml2-dev wget ssl-cert git-core couchdb rabbitmq-server sun-java6-jdk sun-java6-jre |
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
# ec2 ami-1515f67c | |
sudo sed -i 's/universe/multiverse universe/' /etc/apt/sources.list | |
sudo apt-get update | |
sudo apt-get install -y ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert rubygems git-core rake librspec-ruby libxml-ruby thin couchdb zlib1g-dev libxml2-dev | |
sudo gem sources -a http://gems.opscode.com | |
sudo gem install cucumber merb-core jeweler uuidtools json libxml-ruby --no-ri --no-rdoc | |
mkdir ~/src | |
cd ~/src | |
git clone git://github.com/opscode/chef.git | |
git clone git://github.com/opscode/ohai.git |
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
#!/usr/bin/env ruby | |
# Usage: gemspec [-s] GEMNAME | |
# | |
# Prints a basic gemspec for GEMNAME based on your git-config info. | |
# If -s is passed, saves it as a GEMNAME.gemspec in the current | |
# directory. Otherwise prints to standard output. | |
# | |
# Once you check this gemspec into your project, releasing a new gem | |
# is dead simple: | |
# |
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
-module(test_helper). | |
-export([riak_test/1]). | |
riak_test(Fun) -> | |
start_riak(), | |
{ok, Riak} = riak:local_client(), | |
Ret = (catch Fun(Riak)), | |
stop_riak(), | |
case Ret of |
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 Chef | |
class Provider | |
class Package | |
class Rubygems | |
Chef::Log.info "Patch rubygems provider" | |
@@GEM_CACHE = {} | |
@@GEM_CACHE_TIMESTAMP = nil |
OlderNewer