From abf121f53c6661d778bfeefce36a15f39d9bbcde Mon Sep 17 00:00:00 2001 From: patcito Date: Fri, 17 Sep 2010 06:59:16 +0800 Subject: [PATCH 01/19] added link to diaspora Q&A shapado site --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 89ea0ae19..9ae943073 100644 --- a/README.md +++ b/README.md @@ -201,9 +201,9 @@ Diaspora's test suite uses [rspec](http://rspec.info/), a behavior driven testin We are maintaining a [public tracker project](http://www.pivotaltracker.com/projects/61641) and a [roadmap](https://github.com/diaspora/diaspora/wiki/Roadmap). Also, you can file [bug reports](https://github.com/diaspora/diaspora/issues) right here on github. Ongoing discussion: - - [Diaspora Developer Google Group](http://groups.google.com/group/diaspora-dev) - [Diaspora Discussion Google Group](http://groups.google.com/group/diaspora-discuss) +- [Diaspora Q&A site](http://diaspora.shapado.com/) - [#diaspora-dev](irc://irc.freenode.net/#diaspora-dev) More general info and updates about the project can be found on our [blog](http://joindiaspora.com), [twitter](http://twitter.com/joindiaspora). Also, be sure to join the official [mailing list](http://http://eepurl.com/Vebk). From 0c7ba49e34a4aeec6aa2ade790ffa589f8296e7a Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 16 Sep 2010 16:03:18 -0700 Subject: [PATCH 02/19] DG IZ; aspect deletion --- app/controllers/aspects_controller.rb | 12 +++++-- app/helpers/aspects_helper.rb | 8 +++++ app/models/user.rb | 9 +++++ app/views/aspects/manage.html.haml | 10 +++--- lib/diaspora/user/friending.rb | 2 +- public/stylesheets/application.css | 43 +++++++++++++----------- public/stylesheets/sass/application.sass | 28 +++++++++------ spec/models/user_spec.rb | 27 +++++++++++++++ 8 files changed, 100 insertions(+), 39 deletions(-) diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index 87c41f097..88da5cc88 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -26,9 +26,15 @@ class AspectsController < ApplicationController def destroy @aspect = Aspect.find_by_id params[:id] - @aspect.destroy - flash[:notice] = "You are no longer sharing the aspect called #{@aspect.name}." - respond_with :location => aspects_url + + begin + current_user.drop_aspect @aspect + flash[:notice] = "#{@aspect.name} was successfully removed." + rescue RuntimeError => e + flash[:error] = e.message + end + + respond_with :location => aspects_manage_path end def show diff --git a/app/helpers/aspects_helper.rb b/app/helpers/aspects_helper.rb index adceab8fd..1c8f69b8a 100644 --- a/app/helpers/aspects_helper.rb +++ b/app/helpers/aspects_helper.rb @@ -7,4 +7,12 @@ module AspectsHelper def link_for_aspect( aspect ) link_to aspect.name, aspect end + + def remove_link( aspect ) + if aspect.people.size == 0 + link_to "remove", aspect, :method => :delete + else + "remove" + end + end end diff --git a/app/models/user.rb b/app/models/user.rb index 6a76ce772..216fe210c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -65,6 +65,15 @@ class User Aspect.create(opts) end + def drop_aspect( aspect ) + if aspect.people.size == 0 + aspect.destroy + else + raise "Aspect not empty" + end + end + + def move_friend( opts = {}) return true if opts[:to] == opts[:from] friend = Person.first(:_id => opts[:friend_id]) diff --git a/app/views/aspects/manage.html.haml b/app/views/aspects/manage.html.haml index 8a6ed97ac..9a98b9d06 100644 --- a/app/views/aspects/manage.html.haml +++ b/app/views/aspects/manage.html.haml @@ -36,12 +36,12 @@ .aspect_name %h1{:contenteditable => true}= aspect.name - .tools - = link_to "add a new friend", "#add_request_pane_#{aspect.id}", :class => 'add_request_button' - | - = link_to "show", aspect_path(aspect) + %ul.tools + %li= link_to "add a new friend", "#add_request_pane_#{aspect.id}", :class => 'add_request_button' + %li= link_to "show", aspect_path(aspect) + %li!= remove_link(aspect) - %ul{:id => aspect.id} + %ul.dropzone{:id => aspect.id} -if aspect.people.size < 1 %li.grey Drag to add people diff --git a/lib/diaspora/user/friending.rb b/lib/diaspora/user/friending.rb index cf55a2bf0..e79608381 100644 --- a/lib/diaspora/user/friending.rb +++ b/lib/diaspora/user/friending.rb @@ -62,7 +62,7 @@ module Diaspora def receive_friend_request(friend_request) Rails.logger.info("receiving friend request #{friend_request.to_json}") - if request_from_me?(friend_request) + if request_from_me?(friend_request) && self.aspect_by_id(friend_request.aspect_id) aspect = self.aspect_by_id(friend_request.aspect_id) activate_friend(friend_request.person, aspect) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index fdef9e4b9..f4c40f465 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -513,20 +513,33 @@ h1.big_text { .requests .aspect_name, .remove .aspect_name { position: relative; } - .aspect .aspect_name .tools, - .requests .aspect_name .tools, - .remove .aspect_name .tools { + .aspect .aspect_name ul.tools, + .requests .aspect_name ul.tools, + .remove .aspect_name ul.tools { position: absolute; top: 10px; right: 0; - display: inline; } - .aspect .aspect_name:hover .tools, - .requests .aspect_name:hover .tools, - .remove .aspect_name:hover .tools { - display: inline; } - .aspect ul, - .requests ul, - .remove ul { + display: inline; + padding: 0; + margin: 0; + list-style: none; } + .aspect .aspect_name ul.tools li, + .requests .aspect_name ul.tools li, + .remove .aspect_name ul.tools li { + display: inline; + margin-right: 1em; } + .aspect .aspect_name ul.tools li:last-child, + .requests .aspect_name ul.tools li:last-child, + .remove .aspect_name ul.tools li:last-child { + margin-right: 0; } + .aspect .grey, + .requests .grey, + .remove .grey { + color: #999999; + cursor: default; } + .aspect ul.dropzone, + .requests ul.dropzone, + .remove ul.dropzone { min-height: 20px; margin: 0; margin-bottom: 25px; @@ -574,14 +587,6 @@ h1.big_text { -webkit-box-shadow: 0 1px 3px #333333; -moz-box-shadow: 0 2px 4px #333333; opacity: 0.9; } - .aspect .person .grey, - .aspect .requested_person .grey, - .requests .person .grey, - .requests .requested_person .grey, - .remove .person .grey, - .remove .requested_person .grey { - font-style: italic; - color: #666666; } #notification_badge { position: fixed; diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 3912e1648..85c5f3cdc 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -678,17 +678,29 @@ h1.big_text .aspect_name :position relative - .tools + ul.tools :position absolute :top 10px :right 0 :display inline - - &:hover - .tools + :padding 0 + :margin 0 + :list + :style none + li :display inline + :margin + :right 1em - ul + &:last-child + :margin + :right 0 + + .grey + :color #999 + :cursor default + + ul.dropzone :min-height 20px :margin 0 :bottom 25px @@ -726,12 +738,6 @@ h1.big_text :-moz-box-shadow 0 2px 4px #333 :opacity 0.9 - - .grey - :font - :style italic - :color #666 - #notification_badge :position fixed :bottom 0 diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index a02f5271a..6e8355021 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -22,4 +22,31 @@ describe User do @user.profile.image_url.should == "http://clown.com" end end + + describe 'aspects' do + it 'should delete an empty aspect' do + @user.aspects.include?(@aspect).should == true + @user.drop_aspect(@aspect) + @user.reload + + @user.aspects.include?(@aspect).should == false + end + + it 'should not delete an aspect with friends' do + user2 = Factory.create(:user) + aspect2 = user2.aspect(:name => 'stuff') + user2.reload + aspect2.reload + + friend_users(@user, Aspect.find_by_id(@aspect.id), user2, Aspect.find_by_id(aspect2.id)) + @aspect.reload + + @user.aspects.include?(@aspect).should == true + + proc{@user.drop_aspect(@aspect)}.should raise_error /Aspect not empty/ + + @user.reload + @user.aspects.include?(@aspect).should == true + end + end end From 1e8f10f1af71dc16b57b35178256ad257c16b614 Mon Sep 17 00:00:00 2001 From: maxwell Date: Thu, 16 Sep 2010 16:12:45 -0700 Subject: [PATCH 03/19] MS rake task to fix broken local people.... let me test it first on a server, but then you can run rake db:fix_diaspora_handle --- lib/tasks/db.rake | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index e1c0aac31..56eddb266 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -22,6 +22,7 @@ namespace :db do require 'db/seeds/backer' create end + end desc 'Delete the collections in the current RAILS_ENV database' @@ -53,4 +54,19 @@ namespace :db do Rake::Task['db:seed:dev'].invoke puts "you did it!" end + + task :fix_diaspora_handle do + puts "fixing the people in this seed" + require 'config/environment' + + people = Person.all + + people.each do |person| + if person.diaspora_handle[-1, 1]=='@' && person.owner.nil? == false + person.diaspora_handle = person.owner.diaspora_handle + person.save + end + end + puts "everything should be peachy" + end end From dea0912c283967236374e9828e14a023294f95a8 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 16 Sep 2010 16:41:28 -0700 Subject: [PATCH 04/19] Do a more specific query in the fix rake task --- lib/tasks/db.rake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index 56eddb266..22f995325 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -59,10 +59,13 @@ namespace :db do puts "fixing the people in this seed" require 'config/environment' - people = Person.all + people = Person.all( '$where' => "function(){ + return this.diaspora_handle.charAt(this.diaspora_handle.length-1) == '@' + }") people.each do |person| - if person.diaspora_handle[-1, 1]=='@' && person.owner.nil? == false + if person.owner + puts "Resetting diaspora handle for #{person.owner.username}" person.diaspora_handle = person.owner.diaspora_handle person.save end From 22edec57766356cdc3d73740b65a557d2a6f57bd Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Fri, 17 Sep 2010 06:39:51 +0800 Subject: [PATCH 05/19] Adding Haml html escaping. Haml's HTML escaping option was not on, leaving the site open for xss attacks. This would seem to fix it. --- config/environment.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/environment.rb b/config/environment.rb index dc11087dd..385a96651 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -7,6 +7,7 @@ # Load the rails application require File.expand_path('../application', __FILE__) Haml::Template.options[:format] = :html5 +Haml::Template.options[:escape_html] = true # Initialize the rails application Diaspora::Application.initialize! From c80a79dea5d0cc6b1e60bed82dce12bb18136c3d Mon Sep 17 00:00:00 2001 From: cryptix Date: Thu, 16 Sep 2010 21:13:39 +0800 Subject: [PATCH 06/19] Unified require quotes --- config/application.rb | 6 +++--- config/initializers/socket.rb | 2 +- config/sprinkle/provision.rb | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config/application.rb b/config/application.rb index ef8a567a5..b409f91d3 100644 --- a/config/application.rb +++ b/config/application.rb @@ -6,9 +6,9 @@ require File.expand_path('../boot', __FILE__) -require "action_controller/railtie" -require "action_mailer/railtie" -require "active_resource/railtie" +require 'action_controller/railtie' +require 'action_mailer/railtie' +require 'active_resource/railtie' # If you have a Gemfile, require the gems listed there, including any gems # you've limited to :test, :development, or :production. Bundler.require(:default, Rails.env) if defined?(Bundler) diff --git a/config/initializers/socket.rb b/config/initializers/socket.rb index 1fd09fd93..0b1035001 100644 --- a/config/initializers/socket.rb +++ b/config/initializers/socket.rb @@ -5,7 +5,7 @@ require 'em-websocket' require 'eventmachine' -require "lib/diaspora/websocket" +require 'lib/diaspora/websocket' EM.next_tick { Diaspora::WebSocket.initialize_channels diff --git a/config/sprinkle/provision.rb b/config/sprinkle/provision.rb index 9f983399e..ce0fd7374 100644 --- a/config/sprinkle/provision.rb +++ b/config/sprinkle/provision.rb @@ -7,11 +7,11 @@ -require "#{File.dirname(__FILE__)}/packages/essential" -require "#{File.dirname(__FILE__)}/packages/database" -require "#{File.dirname(__FILE__)}/packages/server" -require "#{File.dirname(__FILE__)}/packages/scm" -require "#{File.dirname(__FILE__)}/packages/ruby" +require '#{File.dirname(__FILE__)}/packages/essential' +require '#{File.dirname(__FILE__)}/packages/database' +require '#{File.dirname(__FILE__)}/packages/server' +require '#{File.dirname(__FILE__)}/packages/scm' +require '#{File.dirname(__FILE__)}/packages/ruby' policy :diaspora, :roles => [:tom,:backer] do # requires :clean_dreamhost From 4d8eb3d53241eec0df5d3dd5c0b372df5f5c3ad2 Mon Sep 17 00:00:00 2001 From: Guido Serra aka Zeph Date: Fri, 17 Sep 2010 05:56:47 +0800 Subject: [PATCH 07/19] issue #9 on github: missing OsX/MongoDB info --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9ae943073..7e1b75153 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,8 @@ If you installed the Ubuntu package, MongoDB should already be running (if not, If you installed the Fedora package, MongoDB will need to be started via `service mongodb start`. If you installed the binary manually, run `sudo mongod` from where mongo is installed to start mongo. +If you installed the OsX package through "brew", MongoDB will need to be started via `sudo launchctl load org.mongodb.mongod.plist`. (before you have to go to /Library/LaunchDaemons and add a symlink to /usr/local/Cellar/mongodb/1.6.2-x86_64/org.mongodb.mongod.plist) + Diaspora will not run unless mongo is running. Mongo will not run by default, and will need to be started every time you wish to use or run the test suite for Diaspora. ### Run the app server From d74c4bd1177fd02760a96ac6d9a189dcd37aa23f Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 16 Sep 2010 16:47:10 -0700 Subject: [PATCH 08/19] DG IZ; use focus instead of click --- public/javascripts/aspect-edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/aspect-edit.js b/public/javascripts/aspect-edit.js index e1d9b6c6c..1fbf355e9 100644 --- a/public/javascripts/aspect-edit.js +++ b/public/javascripts/aspect-edit.js @@ -91,7 +91,7 @@ $(function() { }); }); -$(".aspect h1").live( 'click', function() { +$(".aspect h1").live( 'focus', function() { var $this = $(this); var id = $this.closest("li").children("ul").attr("id"); From 04d55ef35e4acda726ad00ba58a55814cdf22c72 Mon Sep 17 00:00:00 2001 From: "hemanth.hm" Date: Thu, 16 Sep 2010 21:03:46 +0800 Subject: [PATCH 09/19] Added ubuntu setup script --- ubuntu-setup.bash | 96 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 ubuntu-setup.bash diff --git a/ubuntu-setup.bash b/ubuntu-setup.bash new file mode 100644 index 000000000..e197ed367 --- /dev/null +++ b/ubuntu-setup.bash @@ -0,0 +1,96 @@ +#!/bin/bash +# Author : hemanth.hm@gmail.com +# Site : www.h3manth.com +# This script helps to setup diaspora. +# + +# Set extented globbing +shopt -s extglob + +# Check if the user has root privilages +[ "$(whoami)" != "root" ] && echo "Please run this script as root/sudo" && exit 1 + +# Install build tools +echo "Installing build tools.." +sudo apt-get install build-essential libxslt1.1 libxslt1-dev libxml2 +echo "..Done installing build tools" + +# Install Ruby 1.8.7 +echo "Installing ruby-full Ruby 1.8.7.." +sudo apt-get install ruby-full +echo "..Done installing Ruby" + +# Install Rake +echo "Installing rake.." +sudo apt-get install rake +echo "..Done installing rake" + +# Get the current release and install mongodb +lsb=$(lsb_release -rs) +ver=${lsb//.+(0)/.} +repo="deb http://downloads.mongodb.org/distros/ubuntu ${ver} 10gen" +echo "Setting up MongoDB.." +echo "." +echo ${repo} | sudo tee -a /etc/apt/sources.list +echo "." +echo "Fetching keys.." +sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 +echo "." +sudo apt-get update +echo "." +sudo apt-get install mongodb-stable +echo "Done installing monngodb-stable.." + +# Install imagemagick +echo "Installing imagemagick.." +sudo apt-get install imagemagick libmagick9-dev +echo "Installed imagemagick.." + +# Install git-core +echo "Installing git-core.." +sudo apt-get install git-core +echo "Installed git-core.." + +# Setting up ruby gems +echo "Fetching and installing ruby gems.." +( + echo "." + cd /tmp + wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz + echo "." + tar -xf rubygems-1.3.7.tgz + echo "." + cd rubygems-1.3.7 + echo "." + sudo ruby setup.rb + echo "." + sudo ln -s /usr/bin/gem1.8 /usr/bin/gem + echo "." +) +echo "Done installing the gems.." + +# Install blunder +echo "Installing blunder.." +sudo gem install bundler +echo "Installed blunder.." + +# Take a clone of Diaspora +( +echo "Clone diaspora source.." +git clone http://github.com/diaspora/diaspora.git +echo "Cloned the source.." +# Install extra gems +cd diaspora +echo "Installing more gems.." +sudo bundle install +echo "Installed." + +# Install DB setup +echo "Seting up DB.." +rake db:seed:tom +echo "DB ready. Login -> tom and password -> evankorth. More details ./diaspora/db/seeds/tom.rb." + +# Run appserver +echo "Starting server" +bundle exec thin start +) From f76bc6ffc470ef84b34756d3ea64c3c32416136b Mon Sep 17 00:00:00 2001 From: hemanth Date: Thu, 16 Sep 2010 23:23:12 +0800 Subject: [PATCH 10/19] Updated all apt-get installs with apt-get -y to avoid prompts during installation. --- ubuntu-setup.bash | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ubuntu-setup.bash b/ubuntu-setup.bash index e197ed367..47008ab34 100644 --- a/ubuntu-setup.bash +++ b/ubuntu-setup.bash @@ -12,17 +12,17 @@ shopt -s extglob # Install build tools echo "Installing build tools.." -sudo apt-get install build-essential libxslt1.1 libxslt1-dev libxml2 +sudo apt-get -y install build-essential libxslt1.1 libxslt1-dev libxml2 echo "..Done installing build tools" # Install Ruby 1.8.7 echo "Installing ruby-full Ruby 1.8.7.." -sudo apt-get install ruby-full +sudo apt-get -y install ruby-full echo "..Done installing Ruby" # Install Rake echo "Installing rake.." -sudo apt-get install rake +sudo apt-get -y install rake echo "..Done installing rake" # Get the current release and install mongodb @@ -38,17 +38,17 @@ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 echo "." sudo apt-get update echo "." -sudo apt-get install mongodb-stable +sudo apt-get -y install mongodb-stable echo "Done installing monngodb-stable.." # Install imagemagick echo "Installing imagemagick.." -sudo apt-get install imagemagick libmagick9-dev +sudo apt-get -y install imagemagick libmagick9-dev echo "Installed imagemagick.." # Install git-core echo "Installing git-core.." -sudo apt-get install git-core +sudo apt-get -y install git-core echo "Installed git-core.." # Setting up ruby gems From 87feb5bba52ce40c22c6047d56cff35831f0ad8b Mon Sep 17 00:00:00 2001 From: hemanth Date: Fri, 17 Sep 2010 01:50:01 +0800 Subject: [PATCH 11/19] Removed root check and added sudo check. --- ubuntu-setup.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu-setup.bash b/ubuntu-setup.bash index 47008ab34..96c995646 100644 --- a/ubuntu-setup.bash +++ b/ubuntu-setup.bash @@ -8,7 +8,7 @@ shopt -s extglob # Check if the user has root privilages -[ "$(whoami)" != "root" ] && echo "Please run this script as root/sudo" && exit 1 +[[ $( id -u) ]] && echo "$(whoami) has no sudo permissions on this machine" && exit 1 # Install build tools echo "Installing build tools.." From e9df690644a9e82608d113793425496198b2fd1f Mon Sep 17 00:00:00 2001 From: hemanth Date: Fri, 17 Sep 2010 01:55:00 +0800 Subject: [PATCH 12/19] Added --no-install-recommends to apt-get to avoid additional extra packages. --- ubuntu-setup.bash | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ubuntu-setup.bash b/ubuntu-setup.bash index 96c995646..c0bceabeb 100644 --- a/ubuntu-setup.bash +++ b/ubuntu-setup.bash @@ -12,17 +12,17 @@ shopt -s extglob # Install build tools echo "Installing build tools.." -sudo apt-get -y install build-essential libxslt1.1 libxslt1-dev libxml2 +sudo apt-get -y --no-install-recommends install build-essential libxslt1.1 libxslt1-dev libxml2 echo "..Done installing build tools" # Install Ruby 1.8.7 echo "Installing ruby-full Ruby 1.8.7.." -sudo apt-get -y install ruby-full +sudo apt-get -y --no-install-recommends install ruby-full echo "..Done installing Ruby" # Install Rake echo "Installing rake.." -sudo apt-get -y install rake +sudo apt-get -y --no-install-recommends install rake echo "..Done installing rake" # Get the current release and install mongodb @@ -38,17 +38,17 @@ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 echo "." sudo apt-get update echo "." -sudo apt-get -y install mongodb-stable +sudo apt-get -y --no-install-recommends install mongodb-stable echo "Done installing monngodb-stable.." # Install imagemagick echo "Installing imagemagick.." -sudo apt-get -y install imagemagick libmagick9-dev +sudo apt-get -y --no-install-recommends install imagemagick libmagick9-dev echo "Installed imagemagick.." # Install git-core echo "Installing git-core.." -sudo apt-get -y install git-core +sudo apt-get -y --no-install-recommends install git-core echo "Installed git-core.." # Setting up ruby gems From 193deb97670bd55c94da68e86d1a3513ece1dbc9 Mon Sep 17 00:00:00 2001 From: hemanth Date: Fri, 17 Sep 2010 02:04:38 +0800 Subject: [PATCH 13/19] Corrected a comment # Check if the user has sudo privileges. --- ubuntu-setup.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu-setup.bash b/ubuntu-setup.bash index c0bceabeb..67b602abe 100644 --- a/ubuntu-setup.bash +++ b/ubuntu-setup.bash @@ -7,7 +7,7 @@ # Set extented globbing shopt -s extglob -# Check if the user has root privilages +# Check if the user has sudo privileges. [[ $( id -u) ]] && echo "$(whoami) has no sudo permissions on this machine" && exit 1 # Install build tools From 3cf085c3c16a79548ccd828e31403d460ff50d32 Mon Sep 17 00:00:00 2001 From: maco Date: Fri, 17 Sep 2010 07:13:33 +0800 Subject: [PATCH 14/19] README.md: add PPA instructions for rubygems 1.3.7 for Ubuntu 10.04 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7e1b75153..017ce85e6 100644 --- a/README.md +++ b/README.md @@ -147,13 +147,13 @@ To install Git on **Mac OS X**, run the following: ### Rubygems -On **Ubuntu**, run the following: +On **Ubuntu** 10.04, run the following: - wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz - tar -xf rubygems-1.3.7.tgz - cd rubygems-1.3.7 - sudo ruby setup.rb - sudo ln -s /usr/bin/gem1.8 /usr/bin/gem + sudo add-apt-repository ppa:maco.m/ruby + sudo apt-get update + sudo apt-get install rubygems + +This PPA is maintained by an Ubuntu Developer. For Ubuntu 10.10, this version of rubygems is in the repositories. On **Fedora**, run the following: From 1e8834a8d5e8b266632c944cf34e8703c704c8a4 Mon Sep 17 00:00:00 2001 From: maco Date: Fri, 17 Sep 2010 07:25:21 +0800 Subject: [PATCH 15/19] README.md: add note about bundle's location with Ubuntu debs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 017ce85e6..8e3426250 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ On **Mac OS X**, RubyGems comes preinstalled; however, you might need to update ### Bundler -After RubyGems is updated, simply run `sudo gem install bundler` to get Bundler. +After RubyGems is updated, simply run `sudo gem install bundler` to get Bundler. If you're using Ubuntu repository .debs, bundler is found at /var/lib/gems/1.8/bin/bundle ## Getting Diaspora From 2dc0fc9965787d092214d4b54d64d733f3952f67 Mon Sep 17 00:00:00 2001 From: Guido Serra aka Zeph Date: Fri, 17 Sep 2010 06:24:30 +0800 Subject: [PATCH 16/19] wrong! fullpath required --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e3426250..d9ac44c94 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ If you installed the Ubuntu package, MongoDB should already be running (if not, If you installed the Fedora package, MongoDB will need to be started via `service mongodb start`. If you installed the binary manually, run `sudo mongod` from where mongo is installed to start mongo. -If you installed the OsX package through "brew", MongoDB will need to be started via `sudo launchctl load org.mongodb.mongod.plist`. (before you have to go to /Library/LaunchDaemons and add a symlink to /usr/local/Cellar/mongodb/1.6.2-x86_64/org.mongodb.mongod.plist) +If you installed the OsX package through "brew", MongoDB will need to be started via `sudo launchctl load /Library/LaunchDaemons/org.mongodb.mongod.plist`. (before you have to go to /Library/LaunchDaemons and add a symlink to /usr/local/Cellar/mongodb/1.6.2-x86_64/org.mongodb.mongod.plist) Diaspora will not run unless mongo is running. Mongo will not run by default, and will need to be started every time you wish to use or run the test suite for Diaspora. From ae83dae1ca2ca651ef4bad7a968385be8756b5bc Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 16 Sep 2010 17:03:14 -0700 Subject: [PATCH 17/19] added git info (branch,date,author) to debug partial --- app/views/posts/_debug.haml | 4 ++++ config/initializers/git_info.rb | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 config/initializers/git_info.rb diff --git a/app/views/posts/_debug.haml b/app/views/posts/_debug.haml index 27d508cf2..17d7baad8 100644 --- a/app/views/posts/_debug.haml +++ b/app/views/posts/_debug.haml @@ -7,6 +7,9 @@ %h5 DEBUG INFO #debug_more{ :style => "display:none;" } %ul + %li + %b + = GIT_INFO %li %b params = params.inspect @@ -14,3 +17,4 @@ %b websocket status #debug .msg + diff --git a/config/initializers/git_info.rb b/config/initializers/git_info.rb new file mode 100644 index 000000000..a6d767aa4 --- /dev/null +++ b/config/initializers/git_info.rb @@ -0,0 +1,6 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3. See +# the COPYRIGHT file. + + +GIT_INFO = `git show` From 95a4120e57681bb972a3b13e38d915f043c98a1f Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 16 Sep 2010 17:22:42 -0700 Subject: [PATCH 18/19] DG IZ; dropzones on left back on aspect manage page. --- app/views/aspects/manage.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/aspects/manage.html.haml b/app/views/aspects/manage.html.haml index 9a98b9d06..667196b85 100644 --- a/app/views/aspects/manage.html.haml +++ b/app/views/aspects/manage.html.haml @@ -12,7 +12,7 @@ Requests .requests - %ul + %ul.dropzone - for request in @remote_requests %li.requested_person{:id => request.person.id, :request_id => request.id} = person_image_tag(request.person) @@ -22,7 +22,7 @@ Ignore/Remove %li.remove - %ul + %ul.dropzone - content_for :publish do = link_to("add a new aspect", "#add_aspect_pane", :id => "add_aspect_button", :class => "new_aspect button", :title => "Add a new aspect") From 755e2a744cd9f41412d727fe36cd5338700fc491 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 16 Sep 2010 17:30:49 -0700 Subject: [PATCH 19/19] DG IZ; dropzones now light up when dragging on aspect page --- public/javascripts/aspect-edit.js | 2 ++ public/stylesheets/application.css | 4 ++++ public/stylesheets/sass/application.sass | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/public/javascripts/aspect-edit.js b/public/javascripts/aspect-edit.js index 1fbf355e9..86c61ba93 100644 --- a/public/javascripts/aspect-edit.js +++ b/public/javascripts/aspect-edit.js @@ -39,6 +39,7 @@ $(function() { }); $(".aspect ul").droppable({ + hoverClass: 'active', drop: function(event, ui) { if ($(ui.draggable[0]).hasClass('requested_person')){ @@ -69,6 +70,7 @@ $(function() { }); $(".remove ul").droppable({ + hoverClass: 'active', drop: function(event, ui) { if ($(ui.draggable[0]).hasClass('requested_person')){ diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index f4c40f465..be025e2d7 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -547,6 +547,10 @@ h1.big_text { border: 1px solid #cccccc; list-style: none; padding: 15px; } + .aspect ul.dropzone.active, + .requests ul.dropzone.active, + .remove ul.dropzone.active { + background-color: #fafafa; } .aspect .person, .aspect .requested_person, .requests .person, diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 85c5f3cdc..7f7125c49 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -711,6 +711,10 @@ h1.big_text :style none :padding 15px + &.active + :background + :color #fafafa + .person, .requested_person :display inline-block