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
1) | |
Ar#replace adds a file FAILED | |
Expected ["d", Tue Feb 19 23:00:40 UTC 2008, 170329, 695410, 2693, " `\ndog\n"] | |
to equal ["d", Tue Feb 19 18:00:40 -0500 2008, 1703296954, 1052059314, 420, "dog\n"] | |
main.__script__ {} at spec/core/ar/replace_spec.rb:29 | |
Kernel(Object)#instance_eval at kernel/common/eval.rb:158 | |
Enumerable(Array)#all? {} at kernel/common/enumerable.rb:267 | |
Array#each at kernel/bootstrap/array.rb:156 | |
Enumerable(Array)#all? at kernel/common/enumerable.rb:267 |
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
require "jruby" | |
module GC | |
import "java.lang.management.ManagementFactory" | |
def self.time | |
mbeans.map(&:collection_time).inject { |sum, element| sum + element } * 1_000 # convert to usec | |
end | |
def self.collections |
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
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by git-commit with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, make this file executable. | |
# This is slightly modified from Andrew Morton's Perfect Patch. |
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
sudo apt-get update | |
sudo env DEBIAN_FRONTEND=noninteractive apt-get upgrade -y | |
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 | |
echo "gem: --no-rdoc --no-ri" >> ~/.gemrc | |
cd /tmp && wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz | |
tar zxf rubygems-1.3.5.tgz && cd rubygems-1.3.5 | |
sudo ruby setup.rb --no-ri --no-rdoc | |
sudo ln -sfv /usr/bin/gem1.8 /usr/bin/gem | |
sudo gem install rake rspec | |
cd && mkdir src && cd src |
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
log_level :info | |
log_location "/var/log/chef/client.log" | |
ssl_verify_mode :verify_none | |
registration_url "http://localhost:4000" | |
template_url "http://localhost:4000" | |
remotefile_url "http://localhost:4000" | |
search_url "http://localhost:4000" | |
role_url "http://localhost:4000" | |
client_url "http://localhost:4000" |
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
# Chef Client Config File | |
# Automatically grabs configuration from ohai ec2 metadata. | |
require 'ohai' | |
require 'json' | |
o = Ohai::System.new | |
o.all_plugins | |
chef_config = JSON.parse(o[:ec2][:userdata]) | |
if chef_config.kind_of?(Array) |
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
root@domU-12-31-39-0A-95-71:~/src/chef/chef-solr# rake install | |
(in /root/src/chef/chef-solr) | |
Generated: chef-solr.gemspec | |
chef-solr.gemspec is valid. | |
WARNING: no description specified | |
WARNING: no rubyforge_project specified | |
Successfully built RubyGem | |
Name: chef-solr | |
Version: 0.8.0 | |
File: chef-solr-0.8.0.gem |
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 | |
sudo gem sources -a http://gems.opscode.com | |
sudo gem sources -a http://gemcutter.org # for nanite | |
sudo gem install cucumber merb-core nanite jeweler uuidtools json --no-ri --no-rdoc | |
mkdir ~/src | |
cd ~/src | |
git clone git://github.com/opscode/chef.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
Executing "gem1.8 install ./pkg/chef-solr-0.8.0.gem": | |
gem1.8 install ./pkg/chef-solr-0.8.0.gem | |
Building native extensions. This could take a while... | |
ERROR: Error installing ./pkg/chef-solr-0.8.0.gem: | |
ERROR: Failed to build gem native extension. | |
/usr/bin/ruby1.8 extconf.rb | |
checking for socket() in -lsocket... no | |
checking for gethostbyname() in -lnsl... yes | |
checking for atan() in -lm... no |