From bb5d5fc2c0ff66457e439e28ae196485feb9e4ed Mon Sep 17 00:00:00 2001 From: maxwell Date: Tue, 7 Dec 2010 18:05:15 -0800 Subject: [PATCH] typhoeus fixes and a few changes to the chef scripts --- app/models/jobs/http_multi.rb | 2 +- chef/cookbooks/centos/recipes/bootstrap.rb | 4 ---- chef/cookbooks/centos/recipes/curl.rb | 15 +++++++++++++++ chef/cookbooks/centos/recipes/main.rb | 1 + 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 chef/cookbooks/centos/recipes/curl.rb diff --git a/app/models/jobs/http_multi.rb b/app/models/jobs/http_multi.rb index 15dc3c171..f30329d3b 100644 --- a/app/models/jobs/http_multi.rb +++ b/app/models/jobs/http_multi.rb @@ -20,7 +20,7 @@ module Jobs url = person.receive_url xml = salmon.xml_for(person) - request = Typhoeus::Request.new(url, OPTS.merge(:xml => xml)) + request = Typhoeus::Request.new(url, OPTS.merge(:params => {:xml => xml})) request.on_complete do |response| unless response.success? diff --git a/chef/cookbooks/centos/recipes/bootstrap.rb b/chef/cookbooks/centos/recipes/bootstrap.rb index b992a8f01..b5c860876 100644 --- a/chef/cookbooks/centos/recipes/bootstrap.rb +++ b/chef/cookbooks/centos/recipes/bootstrap.rb @@ -18,10 +18,6 @@ execute "rvm deps" do command "yum install -y bzip2" end -execute "curl deps for Typheous" do - command "yum install -y curl.x86_64 curl-devel.x86_64" -end - def harden_ruby(ruby_string) Dir.glob("/usr/local/rvm/wrappers/#{ruby_string}/*").each do |file| link "/usr/local/bin/#{file.split('/').last}" do diff --git a/chef/cookbooks/centos/recipes/curl.rb b/chef/cookbooks/centos/recipes/curl.rb new file mode 100644 index 000000000..d9e18565f --- /dev/null +++ b/chef/cookbooks/centos/recipes/curl.rb @@ -0,0 +1,15 @@ +execute "download curl into usr/local" do + command "mkdir -p /usr/local && wget http://curl.haxx.se/download/curl-7.19.7.tar.gz" +end + +execute "configure, make, and install curl" do + command "cd /usr/local/curl-7.19.7 && tar -xvzf curl-7.19.7.tar.gz && ./configure && make && make install" +end + +execute 'add bundler line' do + command 'cd /usr/local/app/diaspora/ && bundle config build.typhoeus --with-curl=/usr/local/curl-7.19.7/' +end + +execute 'rebundle' do + command 'bundle install' +end diff --git a/chef/cookbooks/centos/recipes/main.rb b/chef/cookbooks/centos/recipes/main.rb index c7688a7e4..476b47471 100644 --- a/chef/cookbooks/centos/recipes/main.rb +++ b/chef/cookbooks/centos/recipes/main.rb @@ -3,3 +3,4 @@ include_recipe "centos::mysql" include_recipe "common::main" include_recipe "centos::nginx" include_recipe "centos::redis" +include_recipe "centos::curl"