Merge branch 'master' of github.com:diaspora/diaspora into production
This commit is contained in:
commit
8647220328
17 changed files with 403 additions and 257 deletions
146
README.md
146
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
/
|
||||
-# 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 <http://www.gnu.org/licenses/>.
|
||||
-#
|
||||
|
||||
|
||||
!!!
|
||||
|
|
|
|||
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
/
|
||||
-# 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 <http://www.gnu.org/licenses/>.
|
||||
-#
|
||||
|
||||
|
||||
!!!
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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)), "#"
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
72
spec/fixtures/evan_hcard
vendored
Normal file
72
spec/fixtures/evan_hcard
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
<body id="hcard">
|
||||
|
||||
<div id="wrap">
|
||||
<div id="core">
|
||||
<dl id="site_nav_local_views">
|
||||
<dt>Local views</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
<div id="content">
|
||||
<h1>Evan Prodromou</h1>
|
||||
|
||||
<div id="content_inner">
|
||||
<div id="i" class="entity_profile vcard author">
|
||||
<h2>User profile</h2>
|
||||
<dl class="entity_depiction">
|
||||
<dt>Photo</dt>
|
||||
<dd>
|
||||
<img src="http://avatar.status.net/evan/1-96-20100726204409.jpeg" class="photo avatar" width="96" height="96" alt="evan"/>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
<dl class="entity_nickname">
|
||||
<dt>Nickname</dt>
|
||||
<dd>
|
||||
<a href="http://evan.status.net/" rel="me" class="nickname url uid">evan</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_fn">
|
||||
<dt>Full name</dt>
|
||||
|
||||
<dd>
|
||||
<span class="fn">Evan Prodromou</span>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_location">
|
||||
<dt>Location</dt>
|
||||
<dd class="label">Montreal, QC, Canada</dd>
|
||||
</dl>
|
||||
<dl class="entity_url">
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>
|
||||
<a href="http://evan.prodromou.name/" rel="me" class="url">http://evan.prodromou.name/</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_note">
|
||||
<dt>Note</dt>
|
||||
<dd class="note">Montreal hacker and entrepreneur. Founder of identi.ca, lead developer of StatusNet, CEO of StatusNet Inc.</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<dl id="licenses">
|
||||
<dt id="site_statusnet_license">StatusNet software license</dt>
|
||||
<dd><p><strong>Evan Prodromou</strong> is a microblogging service brought to you by <a href="http://status.net/">Status.net</a>. It runs the <a href="http://status.net/">StatusNet</a> microblogging software, version 0.9.5, available under the <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">GNU Affero General Public License</a>.</p>
|
||||
|
||||
</dd>
|
||||
<dt id="site_content_license">Site content license</dt>
|
||||
<dd id="site_content_license_cc">
|
||||
<p>
|
||||
<img id="license_cc" src="http://i.creativecommons.org/l/by/3.0/80x15.png" alt="Creative Commons Attribution 3.0" width="80" height="15"/>:w
|
||||
|
||||
All Evan Prodromou content and data are available under the <a class="license" rel="external license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.</p>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
9
spec/fixtures/finger_xrd
vendored
Normal file
9
spec/fixtures/finger_xrd
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version='1.0'?>
|
||||
<XRD>
|
||||
<Subject>acct:tom@tom.joindiaspora.com</Subject>
|
||||
<Alias>"http://tom.joindiaspora.com/"</Alias>
|
||||
<Link rel="http://microformats.org/profile/hcard" type="text/html" href="http://tom.joindiaspora.com/hcard/users/4c8eccce34b7da59ff000002"/>
|
||||
<Link rel="http://joindiaspora.com/seed_location" type="text/html" href="http://tom.joindiaspora.com/"/>
|
||||
<Link rel="http://joindiaspora.com/guid" type="text/html" href="4c8eccce34b7da59ff000002"/>
|
||||
<Link rel="diaspora-public-key" type="RSA" href="LS0tLS1CRUdJTiBSU0EgUFVCTElDIEtFWS0tLS0tCk1JSUNDZ0tDQWdFQXlt dHpUdWQ3SytXQklPVVYwMmxZN2Z1NjdnNWQrbTBra1ZIQlgzTk1uYXB5bnZL a0VSemoKbkxma2JrTVpEVGdPNG1UaThmWFI3Q1ZSK3Q1SFN4b2Vub0JWazVX eUFabkEzWmpTRjBPcC9RakhlYzhvK0dVSApDOFluNFJ5N01hQ0R1cUNpNnJv c2RlbUlLTm1Fa2dsVVY1VzZ4WFd4Vmtrb21oL2VCQ2FmaVdMTXFRMG82NGox Ckw3aXNjQjVOM3ZkbnBrUmU3SkFxLzNDUTI3dWhDS0ZIWG1JYm1iVmhJQTNC R0J6YStPV3NjK1Z5cjV0Mm1wSlIKU1RXMk9UL20rS0NPK21kdnpmenQ0TzEr UHc1M1pJMjRpMlc2cW1XdThFZ1Z6QVcyMStuRGJManZiNHpzVHlrNQppN1JM cG8rUFl2VUJlLy8wM1lkQUJoRlJhVXpTL0RtcWRubEVvb0VvK0VmYzRkQ1NF bWVkMUgrek01c2xqQm1rCks5amsvOHNQZDB0SVZmMWZXdW9BcWZTSmErSXdr OHNybkdZbEVlaFV1dVhIY0x2b2JlUXJKYWdiRGc1Qll5TnIKeTAzcHpKTHlS ZU9UcC9RK1p0TXpMOFJMZWJsUzlWYXdNQzNDVzc5K0RGditTWGZ0eTl3NC8w d2NpUHpKejg2bgp2VzJ5K3crTThOWG52enBWNU81dGI4azZxZ2N0WjBmRzFu eXQ0RklsSHNVaUVoNnZLZmNLSmFPeWFRSGNGcWVxCjkwUkpoMm9TMDJBdFJx TFRSWDJJQjFnYXZnWEFXN1NYanJNbUNlVzlCdVBKYU5nZkp3WFFaelVoa0tC V1k0VnMKZTRFVWRob3R5RWkvUmE0RXVZU01ZcnZEeUFRUHJsY0wveDliaU1p bHVPcU9OMEpJZ1VodEZQRUNBd0VBQVE9PQotLS0tLUVORCBSU0EgUFVCTElD IEtFWS0tLS0tCg== "/>
|
||||
</XRD>
|
||||
44
spec/fixtures/hcard_response
vendored
Normal file
44
spec/fixtures/hcard_response
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<div id="content">
|
||||
<h1>Alexander Hamiltom</h1>
|
||||
<div id="content_inner">
|
||||
<div id="i" class="entity_profile vcard author">
|
||||
<h2>User profile</h2>
|
||||
<dl class="entity_nickname">
|
||||
<dt>Nickname</dt>
|
||||
<dd>
|
||||
<a href="http://tom.joindiaspora.com/" rel="me" class="nickname url uid">Alexander Hamiltom</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_given_name">
|
||||
<dt>Full name</dt>
|
||||
<dd>
|
||||
<span class="given_name" >Alexander</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="entity_family_name">
|
||||
<dt>Full name</dt>
|
||||
<dd>
|
||||
<span class="family_name" >Hamiltom</span>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_fn">
|
||||
<dt>Full name</dt>
|
||||
<dd>
|
||||
<span class="fn" >Alexander Hamiltom</span>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_url">
|
||||
<dt>URL</dt>
|
||||
<dd>
|
||||
<a href="http://tom.joindiaspora.com/" rel="me" id="pod_location" class="url">http://tom.joindiaspora.com/</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_note">
|
||||
<dt>Note</dt>
|
||||
<dd class="note">Diaspora is awesome! vi is better than emacs!</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
7
spec/fixtures/host_xrd
vendored
Normal file
7
spec/fixtures/host_xrd
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'>
|
||||
<Link rel='lrdd'
|
||||
template='http://example.com/webfinger/?q={uri}'>
|
||||
<Title>Resource Descriptor</Title>
|
||||
</Link>
|
||||
</XRD>
|
||||
15
spec/fixtures/nonseed_finger_xrd
vendored
Normal file
15
spec/fixtures/nonseed_finger_xrd
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<XRD>
|
||||
<Subject>acct:evan@status.net</Subject>
|
||||
<Alias>acct:evan@evan.status.net</Alias>
|
||||
<Alias>http://evan.status.net/user/1</Alias>
|
||||
<Link rel="http://webfinger.net/rel/profile-page" type="text/html" href="http://evan.status.net/user/1"/>
|
||||
<Link rel="http://schemas.google.com/g/2010#updates-from" href="http://evan.status.net/api/statuses/user_timeline/1.atom" type="application/atom+xml"/>
|
||||
<Link rel="http://microformats.org/profile/hcard" type="text/html" href="http://evan.status.net/hcard"/>
|
||||
<Link rel="http://gmpg.org/xfn/11" type="text/html" href="http://evan.status.net/user/1"/>
|
||||
<Link rel="describedby" type="application/rdf+xml" href="http://evan.status.net/foaf"/>
|
||||
<Link rel="salmon" href="http://evan.status.net/main/salmon/user/1"/>
|
||||
<Link rel="http://salmon-protocol.org/ns/salmon-replies" href="http://evan.status.net/main/salmon/user/1"/>
|
||||
<Link rel="http://salmon-protocol.org/ns/salmon-mention" href="http://evan.status.net/main/salmon/user/1"/>
|
||||
<Link rel="magic-public-key" href="data:application/magic-public-key,RSA.vyohOlwX03oJUg6R8BQP4V-6QQUfPg9gzOwk3ENQjqeGorHN8RNI4rhCQp7tACe9DEdEKtzZHbSvQC2zRICQ9JG_SIcpiU9jcT2imN5cPLZZQuPFZWwG4xPu_8LKRHuXeLGkzQMjvg6jFBl7qdo_iPnlbtIBb-mEuAnfRMcdUPE=.AQAB"/>
|
||||
<Link rel="http://ostatus.org/schema/1.0/subscribe" template="http://evan.status.net/main/ostatussub?profile={uri}"/>
|
||||
</XRD>
|
||||
|
|
@ -114,174 +114,21 @@ end
|
|||
end
|
||||
|
||||
def host_xrd
|
||||
<<-XML
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'>
|
||||
<Link rel='lrdd'
|
||||
template='http://example.com/webfinger/?q={uri}'>
|
||||
<Title>Resource Descriptor</Title>
|
||||
</Link>
|
||||
</XRD>
|
||||
XML
|
||||
File.open(File.dirname(__FILE__) + '/fixtures/host_xrd').read
|
||||
end
|
||||
|
||||
def finger_xrd
|
||||
<<-XML
|
||||
<?xml version='1.0'?>
|
||||
<XRD>
|
||||
<Subject>acct:tom@tom.joindiaspora.com</Subject>
|
||||
<Alias>"http://tom.joindiaspora.com/"</Alias>
|
||||
<Link rel="http://microformats.org/profile/hcard" type="text/html" href="http://tom.joindiaspora.com/hcard/users/4c8eccce34b7da59ff000002"/>
|
||||
<Link rel="http://joindiaspora.com/seed_location" type="text/html" href="http://tom.joindiaspora.com/"/>
|
||||
<Link rel="http://joindiaspora.com/guid" type="text/html" href="4c8eccce34b7da59ff000002"/>
|
||||
<Link rel="diaspora-public-key" type="RSA" href="LS0tLS1CRUdJTiBSU0EgUFVCTElDIEtFWS0tLS0tCk1JSUNDZ0tDQWdFQXlt dHpUdWQ3SytXQklPVVYwMmxZN2Z1NjdnNWQrbTBra1ZIQlgzTk1uYXB5bnZL a0VSemoKbkxma2JrTVpEVGdPNG1UaThmWFI3Q1ZSK3Q1SFN4b2Vub0JWazVX eUFabkEzWmpTRjBPcC9RakhlYzhvK0dVSApDOFluNFJ5N01hQ0R1cUNpNnJv c2RlbUlLTm1Fa2dsVVY1VzZ4WFd4Vmtrb21oL2VCQ2FmaVdMTXFRMG82NGox Ckw3aXNjQjVOM3ZkbnBrUmU3SkFxLzNDUTI3dWhDS0ZIWG1JYm1iVmhJQTNC R0J6YStPV3NjK1Z5cjV0Mm1wSlIKU1RXMk9UL20rS0NPK21kdnpmenQ0TzEr UHc1M1pJMjRpMlc2cW1XdThFZ1Z6QVcyMStuRGJManZiNHpzVHlrNQppN1JM cG8rUFl2VUJlLy8wM1lkQUJoRlJhVXpTL0RtcWRubEVvb0VvK0VmYzRkQ1NF bWVkMUgrek01c2xqQm1rCks5amsvOHNQZDB0SVZmMWZXdW9BcWZTSmErSXdr OHNybkdZbEVlaFV1dVhIY0x2b2JlUXJKYWdiRGc1Qll5TnIKeTAzcHpKTHlS ZU9UcC9RK1p0TXpMOFJMZWJsUzlWYXdNQzNDVzc5K0RGditTWGZ0eTl3NC8w d2NpUHpKejg2bgp2VzJ5K3crTThOWG52enBWNU81dGI4azZxZ2N0WjBmRzFu eXQ0RklsSHNVaUVoNnZLZmNLSmFPeWFRSGNGcWVxCjkwUkpoMm9TMDJBdFJx TFRSWDJJQjFnYXZnWEFXN1NYanJNbUNlVzlCdVBKYU5nZkp3WFFaelVoa0tC V1k0VnMKZTRFVWRob3R5RWkvUmE0RXVZU01ZcnZEeUFRUHJsY0wveDliaU1p bHVPcU9OMEpJZ1VodEZQRUNBd0VBQVE9PQotLS0tLUVORCBSU0EgUFVCTElD IEtFWS0tLS0tCg== "/>
|
||||
</XRD>
|
||||
XML
|
||||
File.open(File.dirname(__FILE__) + '/fixtures/finger_xrd').read
|
||||
end
|
||||
|
||||
def hcard_response
|
||||
<<-FOO
|
||||
<div id="content">
|
||||
<h1>Alexander Hamiltom</h1>
|
||||
<div id="content_inner">
|
||||
<div id="i" class="entity_profile vcard author">
|
||||
<h2>User profile</h2>
|
||||
<dl class="entity_nickname">
|
||||
<dt>Nickname</dt>
|
||||
<dd>
|
||||
<a href="http://tom.joindiaspora.com/" rel="me" class="nickname url uid">Alexander Hamiltom</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_given_name">
|
||||
<dt>Full name</dt>
|
||||
<dd>
|
||||
<span class="given_name" >Alexander</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="entity_family_name">
|
||||
<dt>Full name</dt>
|
||||
<dd>
|
||||
<span class="family_name" >Hamiltom</span>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_fn">
|
||||
<dt>Full name</dt>
|
||||
<dd>
|
||||
<span class="fn" >Alexander Hamiltom</span>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_url">
|
||||
<dt>URL</dt>
|
||||
<dd>
|
||||
<a href="http://tom.joindiaspora.com/" rel="me" id="pod_location" class="url">http://tom.joindiaspora.com/</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_note">
|
||||
<dt>Note</dt>
|
||||
<dd class="note">Diaspora is awesome! vi is better than emacs!</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
FOO
|
||||
File.open(File.dirname(__FILE__) + '/fixtures/hcard_response').read
|
||||
end
|
||||
|
||||
def nonseed_finger_xrd
|
||||
<<-XML
|
||||
<XRD>
|
||||
<Subject>acct:evan@status.net</Subject>
|
||||
<Alias>acct:evan@evan.status.net</Alias>
|
||||
<Alias>http://evan.status.net/user/1</Alias>
|
||||
<Link rel="http://webfinger.net/rel/profile-page" type="text/html" href="http://evan.status.net/user/1"/>
|
||||
<Link rel="http://schemas.google.com/g/2010#updates-from" href="http://evan.status.net/api/statuses/user_timeline/1.atom" type="application/atom+xml"/>
|
||||
<Link rel="http://microformats.org/profile/hcard" type="text/html" href="http://evan.status.net/hcard"/>
|
||||
<Link rel="http://gmpg.org/xfn/11" type="text/html" href="http://evan.status.net/user/1"/>
|
||||
<Link rel="describedby" type="application/rdf+xml" href="http://evan.status.net/foaf"/>
|
||||
<Link rel="salmon" href="http://evan.status.net/main/salmon/user/1"/>
|
||||
<Link rel="http://salmon-protocol.org/ns/salmon-replies" href="http://evan.status.net/main/salmon/user/1"/>
|
||||
<Link rel="http://salmon-protocol.org/ns/salmon-mention" href="http://evan.status.net/main/salmon/user/1"/>
|
||||
<Link rel="magic-public-key" href="data:application/magic-public-key,RSA.vyohOlwX03oJUg6R8BQP4V-6QQUfPg9gzOwk3ENQjqeGorHN8RNI4rhCQp7tACe9DEdEKtzZHbSvQC2zRICQ9JG_SIcpiU9jcT2imN5cPLZZQuPFZWwG4xPu_8LKRHuXeLGkzQMjvg6jFBl7qdo_iPnlbtIBb-mEuAnfRMcdUPE=.AQAB"/>
|
||||
<Link rel="http://ostatus.org/schema/1.0/subscribe" template="http://evan.status.net/main/ostatussub?profile={uri}"/>
|
||||
</XRD>
|
||||
XML
|
||||
File.open(File.dirname(__FILE__) + '/fixtures/nonseed_finger_xrd').read
|
||||
end
|
||||
|
||||
def evan_hcard
|
||||
<<-HCARD
|
||||
<body id="hcard">
|
||||
|
||||
<div id="wrap">
|
||||
<div id="core">
|
||||
<dl id="site_nav_local_views">
|
||||
<dt>Local views</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
<div id="content">
|
||||
<h1>Evan Prodromou</h1>
|
||||
|
||||
<div id="content_inner">
|
||||
<div id="i" class="entity_profile vcard author">
|
||||
<h2>User profile</h2>
|
||||
<dl class="entity_depiction">
|
||||
<dt>Photo</dt>
|
||||
<dd>
|
||||
<img src="http://avatar.status.net/evan/1-96-20100726204409.jpeg" class="photo avatar" width="96" height="96" alt="evan"/>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
<dl class="entity_nickname">
|
||||
<dt>Nickname</dt>
|
||||
<dd>
|
||||
<a href="http://evan.status.net/" rel="me" class="nickname url uid">evan</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_fn">
|
||||
<dt>Full name</dt>
|
||||
|
||||
<dd>
|
||||
<span class="fn">Evan Prodromou</span>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_location">
|
||||
<dt>Location</dt>
|
||||
<dd class="label">Montreal, QC, Canada</dd>
|
||||
</dl>
|
||||
<dl class="entity_url">
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>
|
||||
<a href="http://evan.prodromou.name/" rel="me" class="url">http://evan.prodromou.name/</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_note">
|
||||
<dt>Note</dt>
|
||||
<dd class="note">Montreal hacker and entrepreneur. Founder of identi.ca, lead developer of StatusNet, CEO of StatusNet Inc.</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<dl id="licenses">
|
||||
<dt id="site_statusnet_license">StatusNet software license</dt>
|
||||
<dd><p><strong>Evan Prodromou</strong> is a microblogging service brought to you by <a href="http://status.net/">Status.net</a>. It runs the <a href="http://status.net/">StatusNet</a> microblogging software, version 0.9.5, available under the <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">GNU Affero General Public License</a>.</p>
|
||||
|
||||
</dd>
|
||||
<dt id="site_content_license">Site content license</dt>
|
||||
<dd id="site_content_license_cc">
|
||||
<p>
|
||||
<img id="license_cc" src="http://i.creativecommons.org/l/by/3.0/80x15.png" alt="Creative Commons Attribution 3.0" width="80" height="15"/>
|
||||
All Evan Prodromou content and data are available under the <a class="license" rel="external license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.</p>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
HCARD
|
||||
|
||||
File.open(File.dirname(__FILE__) + '/fixtures/evan_hcard').read
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue