diff --git a/README.md b/README.md
index bd9be556f..b9f1eafb3 100644
--- a/README.md
+++ b/README.md
@@ -1,41 +1,135 @@
-Diaspora
-========
+# Diaspora
The privacy aware, personally controlled, do-it-all, open source social network.
+**DISCLAIMER: THIS IS PRE-ALPHA SOFTWARE AND SHOULD BE TREATED ACCORDINGLY.**
+These instructions are for machines running [Ubuntu](http://www.ubuntu.com/) or Mac OS X.
-Getting started
----------------
+## Preparing your system
+In order to run Diaspora, you will need to download the following dependencies (specific instructions follow):
-In order to run Diaspora for development, there are a few external dependencies in getting your environment set up:
+- Build Tools - Packages needed to compile the components that follow.
+- [Ruby](http://www.ruby-lang.org) - The Ruby programming language. (We're using **1.8.7**. It comes preinstalled on Mac OS X.)
+- [MongoDB](http://www.mongodb.org) - A snappy noSQL database.
+- [OpenSSL](http://www.openssl.org/) - An encryption library. (It comes preinstalled on Mac OS X and Ubuntu.)
+- [ImageMagick](http://www.imagemagick.org/) - An Image processing library used to resize uploaded photos.
+- [Git](http://git-scm.com/) - The fast version control system.
-- [MongoDB](http://www.mongodb.org/downloads) - noSQL data layer.
-- [OpenSSL](http://www.openssl.org/source/) - Used in the current encryption implementation.
-- [ImageMagick](http://www.imagemagick.org/script/binary-releases.php?ImageMagick=0nfesabhe916b9afjc4qiikv03) - Image processing library used to resize uploaded photos.
+After you have Ruby installed on your system, you will need to get RubyGems, then install Bundler:
+
+- [RubyGems](http://rubygems.org/) - Source for Ruby gems.
- [Bundler](http://gembundler.com/) - Gem management tool for Ruby projects.
+**We suggest using a package management system to download these dependencies. Trust us, it's going to make your life a lot easier. If you're using Mac OS X, you can use [homebrew](http://mxcl.github.com/homebrew/); and if you're using Ubuntu, just use [Synaptic](http://www.nongnu.org/synaptic/) (it comes pre-installed). The instructions below assume you have these installed.**
-After installing the above, run the following command from where mongo is installed to start mongo.
- sudo bin/mongod
-Diaspora will **not run** until 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. It is highly recommended you alias the command to start the database in your .bashrc file.
+### Build Tools
-In order to start the app server for the first time, bundler needs to grab Diaspora's gem depencencies. To allow this, run the following command from Diaspora's root directory.
- bundle install
+To install build tools on **Ubuntu**, run the following (includes the gcc and xml parsing dependencies):
+
+ sudo apt-get install build-essential libxslt1.1 libxslt1-dev libxml2
+
+To install build tools on **Mac OS X**, you need to download and install [Xcode](http://developer.apple.com/technologies/tools/xcode.html).
+
+### Ruby
+
+To install Ruby 1.8.7 on **Ubuntu**, run the following command:
+
+ sudo apt-get install ruby-full
+
+If you're on **Mac OS X**, you already have Ruby on your system. Yay!
+
+### MongoDB
+
+To install MongoDB on **Ubuntu**, run the following commands:
+
+
+If you're running a 32-bit system, run `wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz`. If you're running a 64-bit system, run `wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.6.2.tgz`.
+
+ # extract
+ tar xzf mongodb-linux-i686-1.4.0.tgz
+ # create the required data directory
+ sudo mkdir -p /data/db
+ sudo chmod -Rv 777 /data/
+
+
+To install MongoDB on **Mac OS X**, run the following:
+
+ brew install mongo
+
+### OpenSSL
+
+If you're running either **Ubuntu** or **Mac OS X** you already have OpenSSL installed!
+
+### ImageMagick
+
+To install ImageMagick on **Ubuntu**, run the following:
+
+ sudo apt-get install imagemagick libmagick9-dev
+
+To install ImageMagick on **Mac OS X**, run the following:
+
+ brew install imagemagick
+
+### Git
+
+To install Git on **Ubuntu**, run the following:
+
+ sudo apt-get install git-core
+
+To install Git on **Mac OS X**, run the following:
+
+ brew install git
+
+
+### Rubygems
+
+On **Ubuntu**, 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
+
+On **Mac OS X**, RubyGems comes preinstalled; however, you might need to update it for use with the latest Bundler. To update RubyGems, run `gem update --system`.
+
+
+### Bundler
+
+After RubyGems is updated, simply run `gem install bundler` to get Bundler.
+
+
+## Getting Diaspora
+
+ git clone git@github.com:diaspora/diaspora.git
+
+If you have never used github before, their [help desk](http://help.github.com/) has a pretty awesome guide on getting setup.
+
+
+## Running Diaspora
+
+### Install required gems
+To start the app server for the **first time**, Bundler needs to grab Diaspora's gem depencencies. To allow this, run `bundle install` from Diaspora's root directory.
It is important to run a bundle install every so often, in the event of a new gem dependency. We will make sure to make an announcement in the event of a gem change.
-Once mongo is running and bundler has finished, run:
- bundle exec thin start
-This will start the app server in development mode.
+### Start Mongo
+After installing the above, run `sudo mongod` from where mongo is installed to start mongo.
+
+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.
-Diaspora's test suite uses [rspec](http://rspec.info/), a behavior driven testing framework. In order to run the tests, run the following command:
- bundle exec rspec spec
+### Run the app server
+Once mongo is running and bundler has finished, run `bundle exec thin start` from the root Diaspora directory. This will start the app server in development mode[.](http://bit.ly/9mwtUw)
+
+### Testing
+Diaspora's test suite uses [rspec](http://rspec.info/), a behavior driven testing framework. In order to run the tests, run `bundle exec rspec spec`.
-Getting Help
-------------
+## Resources
-There are multiple outlets of ongoing discussion on the development of Diaspora.
+We are maintaining a [public tracker project](http://www.pivotaltracker.com/projects/61641) and a [wishlist](#).
+
+Ongoing discussion:
- [Diaspora Developer Google Group](http://groups.google.com/group/diaspora-dev)
- [Diaspora Discussion Google Group](http://groups.google.com/group/diaspora-discuss)
@@ -43,3 +137,13 @@ There are multiple outlets of ongoing discussion on the development of Diaspora.
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).
+
+## License
+Copyright 2010 Diaspora Inc.
+
+Diaspora is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+
+Diaspora is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License along with Diaspora. If not, see .
+
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 2eec8cf23..76fd30729 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -21,7 +21,7 @@ class ApplicationController < ActionController::Base
protect_from_forgery :except => :receive
- before_filter :set_friends_and_status
+ before_filter :set_friends_and_status, :except => [:create, :update]
before_filter :count_requests
layout :layout_by_resource
diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb
index e8dd82889..e7c07d0ef 100644
--- a/app/controllers/aspects_controller.rb
+++ b/app/controllers/aspects_controller.rb
@@ -31,7 +31,7 @@ class AspectsController < ApplicationController
def create
@aspect = current_user.aspect params[:aspect]
flash[:notice] = "Click on the plus on the left side to tell Diaspora who can see your new aspect."
- respond_with :location => edit_aspect_path(@aspect)
+ respond_with :location => aspects_manage_path
end
def new
diff --git a/app/views/aspects/manage.html.haml b/app/views/aspects/manage.html.haml
index a4a363513..640c545ca 100644
--- a/app/views/aspects/manage.html.haml
+++ b/app/views/aspects/manage.html.haml
@@ -22,7 +22,7 @@
= javascript_include_tag 'aspect-edit.js'
- content_for :left_pane do
- %h3
+ %h1
Requests
.requests
@@ -46,7 +46,14 @@
%ul#aspect_list
- for aspect in @aspects
%li.aspect
- %h1{:contenteditable => true}= aspect.name
+
+ .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{:id => aspect.id}
@@ -60,7 +67,6 @@
= person_image_tag(person)
.name
= person.real_name
- = link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane_#{aspect.id}", :class => 'add_request_button'
.yo{:style => 'display:none'}
%div{:id => "add_request_pane_#{aspect.id}"}
= render "requests/new_request", :aspect => aspect
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 9e24a380a..62a655091 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -1,20 +1,20 @@
-/ Copyright 2010 Diaspora Inc.
-/
-/ This file is part of Diaspora.
-/
-/ Diaspora is free software: you can redistribute it and/or modify
-/ it under the terms of the GNU Affero General Public License as published by
-/ the Free Software Foundation, either version 3 of the License, or
-/ (at your option) any later version.
-/
-/ Diaspora is distributed in the hope that it will be useful,
-/ but WITHOUT ANY WARRANTY; without even the implied warranty of
-/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/ GNU Affero General Public License for more details.
-/
-/ You should have received a copy of the GNU Affero General Public License
-/ along with Diaspora. If not, see .
-/
+-# Copyright 2010 Diaspora Inc.
+-#
+-# This file is part of Diaspora.
+-#
+-# Diaspora is free software: you can redistribute it and/or modify
+-# it under the terms of the GNU Affero General Public License as published by
+-# the Free Software Foundation, either version 3 of the License, or
+-# (at your option) any later version.
+-#
+-# Diaspora is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU Affero General Public License for more details.
+-#
+-# You should have received a copy of the GNU Affero General Public License
+-# along with Diaspora. If not, see .
+-#
!!!
diff --git a/app/views/layouts/session_wall.html.haml b/app/views/layouts/session_wall.html.haml
index 56ef4646b..f31226102 100644
--- a/app/views/layouts/session_wall.html.haml
+++ b/app/views/layouts/session_wall.html.haml
@@ -1,20 +1,20 @@
-/ Copyright 2010 Diaspora Inc.
-/
-/ This file is part of Diaspora.
-/
-/ Diaspora is free software: you can redistribute it and/or modify
-/ it under the terms of the GNU Affero General Public License as published by
-/ the Free Software Foundation, either version 3 of the License, or
-/ (at your option) any later version.
-/
-/ Diaspora is distributed in the hope that it will be useful,
-/ but WITHOUT ANY WARRANTY; without even the implied warranty of
-/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-/ GNU Affero General Public License for more details.
-/
-/ You should have received a copy of the GNU Affero General Public License
-/ along with Diaspora. If not, see .
-/
+-# Copyright 2010 Diaspora Inc.
+-#
+-# This file is part of Diaspora.
+-#
+-# Diaspora is free software: you can redistribute it and/or modify
+-# it under the terms of the GNU Affero General Public License as published by
+-# the Free Software Foundation, either version 3 of the License, or
+-# (at your option) any later version.
+-#
+-# Diaspora is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU Affero General Public License for more details.
+-#
+-# You should have received a copy of the GNU Affero General Public License
+-# along with Diaspora. If not, see .
+-#
!!!
diff --git a/app/views/shared/_aspect_friends.haml b/app/views/shared/_aspect_friends.haml
index 137fea38d..71c41ef6a 100644
--- a/app/views/shared/_aspect_friends.haml
+++ b/app/views/shared/_aspect_friends.haml
@@ -21,7 +21,13 @@
- for friend in @friends
= person_image_link(friend)
- - unless @aspect == :all
+ -unless @aspect == :all
= link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button'
+ .yo{:style => 'display:none'}
+ #add_request_pane
+ = render "requests/new_request", :aspect => @aspect
+ -else
+ .clear
+ = link_to "add friends", aspects_manage_path
diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml
index 20c30ea11..08a89abbb 100644
--- a/app/views/users/edit.html.haml
+++ b/app/views/users/edit.html.haml
@@ -32,9 +32,9 @@
%h3 Picture
%div#image_picker
- = p.hidden_field :image_url, :value => @profile.image_url, :id => 'image_url_field'
+ = p.hidden_field :image_url, :value => @profile.image_url.sub(@user.url,'/'), :id => 'image_url_field'
- for photo in @photos
- - if photo.url(:thumb_medium) == @profile.image_url
+ - if photo.url(:thumb_medium) == @profile.image_url.sub(@user.url,'/')
%div.small_photo{:id => photo.url(:thumb_medium), :class=>'selected'}
= check_box_tag 'checked_photo', true, true
= link_to image_tag(photo.url(:thumb_medium)), "#"
diff --git a/public/javascripts/aspect-edit.js b/public/javascripts/aspect-edit.js
index 18eafd34b..b21a9dd9f 100644
--- a/public/javascripts/aspect-edit.js
+++ b/public/javascripts/aspect-edit.js
@@ -22,7 +22,7 @@ $('#move_friends_link').live( 'click', function(){
{ 'moves' : $('#aspect_list').data() },
function(){ $('#aspect_title').html("Groups edited successfully!");});
- $(".person").css('background-color','white');
+ $(".person").css('background-color','none');
$('#aspect_list').removeData();
$(".person").attr('from_aspect_id', function(){return $(this).parent().attr('id')})
@@ -46,7 +46,7 @@ $(function() {
url: "/requests/" + ui.draggable[0].getAttribute('request_id') ,
data: {"accept" : true , "aspect_id" : $(this)[0].id }
});
- alert("Sent the ajax, check it out!")
+
}else {
var move = {};
move[ 'friend_id' ] = ui.draggable[0].id
@@ -54,7 +54,7 @@ $(function() {
move[ 'from' ] = ui.draggable[0].getAttribute('from_aspect_id');
if (move['to'] == move['from']){
$('#aspect_list').data( ui.draggable[0].id, []);
- ui.draggable.css('background-color','white');
+ ui.draggable.css('background-color','#eee');
} else {
$('#aspect_list').data( ui.draggable[0].id, move);
ui.draggable.css('background-color','orange');
@@ -87,7 +87,7 @@ $(function() {
});
});
-$(".aspect h3").live( 'click', function() {
+$(".aspect h1").live( 'click', function() {
var $this = $(this);
var id = $this.closest("li").children("ul").attr("id");
@@ -107,7 +107,7 @@ $(".aspect h3").live( 'click', function() {
}
//update all other aspect links
$this.keyup(function(e) {
- $("a[href='"+link+"']").text($this.text());
+ $("#aspect_nav a[href='"+link+"']").text($this.text());
});
});
});
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 2b4494e09..dc43acdfa 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -507,20 +507,33 @@ h1.big_text {
.requests,
.remove {
list-style: none; }
- .aspect h3,
- .requests h3,
- .remove h3 {
+ .aspect h1,
+ .requests h1,
+ .remove h1 {
display: inline-block; }
+ .aspect .aspect_name,
+ .requests .aspect_name,
+ .remove .aspect_name {
+ position: relative; }
+ .aspect .aspect_name .tools,
+ .requests .aspect_name .tools,
+ .remove .aspect_name .tools {
+ position: absolute;
+ top: 10px;
+ right: 0;
+ display: none; }
+ .aspect .aspect_name:hover .tools,
+ .requests .aspect_name:hover .tools,
+ .remove .aspect_name:hover .tools {
+ display: inline; }
.aspect ul,
.requests ul,
.remove ul {
min-height: 20px;
margin: 0;
- margin-left: 1em;
margin-bottom: 25px;
background-color: #efefef;
border: 1px solid #cccccc;
- border-radius: 3px;
list-style: none;
padding: 15px; }
.aspect .person,
@@ -530,26 +543,39 @@ h1.big_text {
.remove .person,
.remove .requested_person {
display: inline-block;
- margin-left: 0;
padding: 5px;
cursor: move;
margin: 5px;
- background-color: #cccccc;
- -webkit-border-radius: 3px;
+ z-index: 10;
text-align: center;
- width: 75px;
- height: 75px;
- padding: 5px;
- border: 1px solid #999999; }
+ width: 125px;
+ height: 120px; }
.aspect .person img,
.aspect .requested_person img,
.requests .person img,
.requests .requested_person img,
.remove .person img,
.remove .requested_person img {
- height: 50px;
- width: 50px;
+ height: 100px;
+ width: 100px;
display: inline-block; }
+ .aspect .person:active,
+ .aspect .requested_person:active,
+ .requests .person:active,
+ .requests .requested_person:active,
+ .remove .person:active,
+ .remove .requested_person:active {
+ z-index: 20;
+ color: #666666; }
+ .aspect .person:active img,
+ .aspect .requested_person:active img,
+ .requests .person:active img,
+ .requests .requested_person:active img,
+ .remove .person:active img,
+ .remove .requested_person:active img {
+ -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,
diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass
index 83c218a40..45413512f 100644
--- a/public/stylesheets/sass/application.sass
+++ b/public/stylesheets/sass/application.sass
@@ -688,19 +688,29 @@ h1.big_text
:list
:style none
- h3
+ h1
:display inline-block
+ .aspect_name
+ :position relative
+
+ .tools
+ :position absolute
+ :top 10px
+ :right 0
+ :display none
+
+ &:hover
+ .tools
+ :display inline
+
ul
:min-height 20px
:margin 0
- :left 1em
:bottom 25px
:background
:color #efefef
:border 1px solid #ccc
- :border
- :radius 3px
:list
:style none
:padding 15px
@@ -708,30 +718,30 @@ h1.big_text
.person,
.requested_person
:display inline-block
- :margin
- :left 0
:padding 5px
:cursor move
:margin 5px
-
- :background
- :color #ccc
- :-webkit-border-radius 3px
+ :z-index 10
:text
:align center
- :width 75px
- :height 75px
- :padding 5px
-
- :border 1px solid #999
+ :width 125px
+ :height 120px
img
- :height 50px
- :width 50px
+ :height 100px
+ :width 100px
:display inline-block
+ &:active
+ :z-index 20
+ :color #666
+ img
+ :-webkit-box-shadow 0 1px 3px #333
+ :-moz-box-shadow 0 2px 4px #333
+ :opacity 0.9
+
.grey
:font
diff --git a/spec/fixtures/evan_hcard b/spec/fixtures/evan_hcard
new file mode 100644
index 000000000..d34408759
--- /dev/null
+++ b/spec/fixtures/evan_hcard
@@ -0,0 +1,72 @@
+