From a44419884331c624e8bbf36655e06545579bd991 Mon Sep 17 00:00:00 2001 From: Raphael Date: Wed, 19 Jan 2011 15:39:09 -0800 Subject: [PATCH 1/3] Remove mongo from chef --- chef/cookbooks/centos/files/default/10gen.repo | 5 ----- chef/cookbooks/centos/recipes/main.rb | 1 - chef/cookbooks/centos/recipes/mongo_db.rb | 15 --------------- 3 files changed, 21 deletions(-) delete mode 100644 chef/cookbooks/centos/files/default/10gen.repo delete mode 100644 chef/cookbooks/centos/recipes/mongo_db.rb diff --git a/chef/cookbooks/centos/files/default/10gen.repo b/chef/cookbooks/centos/files/default/10gen.repo deleted file mode 100644 index 347aaa9a0..000000000 --- a/chef/cookbooks/centos/files/default/10gen.repo +++ /dev/null @@ -1,5 +0,0 @@ -[10gen] -name=10gen Repository -baseurl=http://downloads.mongodb.org/distros/centos/5.4/os/x86_64/ -gpgcheck=0 - diff --git a/chef/cookbooks/centos/recipes/main.rb b/chef/cookbooks/centos/recipes/main.rb index 6afcb43b2..f23ed9ac6 100644 --- a/chef/cookbooks/centos/recipes/main.rb +++ b/chef/cookbooks/centos/recipes/main.rb @@ -15,7 +15,6 @@ end harden_ruby("ree-1.8.7-2010.02") include_recipe "centos::image_magick" -include_recipe "centos::mongo_db" include_recipe "common::main" include_recipe "centos::nginx" include_recipe "centos::redis" diff --git a/chef/cookbooks/centos/recipes/mongo_db.rb b/chef/cookbooks/centos/recipes/mongo_db.rb deleted file mode 100644 index 25ab1a396..000000000 --- a/chef/cookbooks/centos/recipes/mongo_db.rb +++ /dev/null @@ -1,15 +0,0 @@ -cookbook_file "/etc/yum.repos.d/10gen.repo" do - source "10gen.repo" -end - -execute "refresh yum" do - command "yum update -y" -end - -execute "install mongo" do - command "yum install -y mongo-stable-server" -end - -execute "make the data directory" do - command "mkdir -p /data/db" -end From 122f182a4cafc030a0fb5e2a6f507839cab2090d Mon Sep 17 00:00:00 2001 From: zhitomirskiyi Date: Wed, 19 Jan 2011 15:45:02 -0800 Subject: [PATCH 2/3] limit to 16 in the view --- app/views/aspects/_aspect.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/aspects/_aspect.haml b/app/views/aspects/_aspect.haml index 3ce6292ce..78d649020 100644 --- a/app/views/aspects/_aspect.haml +++ b/app/views/aspects/_aspect.haml @@ -8,5 +8,5 @@ - if aspect.contacts.length > 0 .contacts - - for contact in aspect.contacts + - for contact in aspect.contacts[0..16] = person_image_link(contact.person) From f35f0212ddc82473de820ffa2d7479cf6e525a49 Mon Sep 17 00:00:00 2001 From: Raphael Date: Wed, 19 Jan 2011 15:54:49 -0800 Subject: [PATCH 3/3] Show the right contacts --- app/views/aspects/_aspect.haml | 4 ++-- app/views/aspects/_aspect_listings.haml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/aspects/_aspect.haml b/app/views/aspects/_aspect.haml index 78d649020..5ef7c039d 100644 --- a/app/views/aspects/_aspect.haml +++ b/app/views/aspects/_aspect.haml @@ -1,12 +1,12 @@ %li{:data=>{:guid=>aspect.id}, :class => ("dull" if contacts.length == 0)} .right %b - = link_to t('contacts', :count => aspect.contacts.count), edit_aspect_path(aspect), :rel => 'facebox' + = link_to t('contacts', :count => contacts.count), edit_aspect_path(aspect), :rel => 'facebox' %b = aspect.name %br - if aspect.contacts.length > 0 .contacts - - for contact in aspect.contacts[0..16] + - for contact in contacts[0..16] = person_image_link(contact.person) diff --git a/app/views/aspects/_aspect_listings.haml b/app/views/aspects/_aspect_listings.haml index 3a9fb2735..cee8dd402 100644 --- a/app/views/aspects/_aspect_listings.haml +++ b/app/views/aspects/_aspect_listings.haml @@ -15,4 +15,4 @@ %ul - for aspect in aspects - = render 'aspects/aspect', :aspect => aspect, :contacts => aspect.contacts + = render 'aspects/aspect', :aspect => aspect, :contacts => aspect.contacts.where(:pending => false)