Merge branch 'master' of github.com:diaspora/diaspora_rails

This commit is contained in:
Raphael 2010-07-15 18:41:01 -07:00
commit cae5700222
12 changed files with 60 additions and 13 deletions

View file

@ -3,5 +3,6 @@
require File.expand_path('../config/application', __FILE__)
require 'rake'
ENV['GNUPGHOME'] = File.expand_path("../../gpg/diaspora-#{Rails.env}/", __FILE__)
GPGME::check_version({})
Rails::Application.load_tasks

View file

@ -3,6 +3,8 @@ class PublicsController < ApplicationController
include PublicsHelper
def hcard
@user = User.owner
render 'hcard'
end
def host_meta

View file

@ -0,0 +1,39 @@
<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><%=@user.real_name%></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="<%=@user.url%>" rel="me" class="nickname url uid"><%= @user.real_name%></a>
</dd>
</dl>
<dl class="entity_fn">
<dt>Full name</dt>
<dd>
<span class="fn"><%= @user.real_name %></span>
</dd>
</dl>
<dl class="entity_url">
<dt>URL</dt>
<dd>
<a href="<%= @user.url%>" rel="me" class="url"><%= @user.url%></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>
</div>

View file

@ -3,7 +3,7 @@
xmlns:hm='http://host-meta.net/xrd/1.0'>
<hm:Host xmlns='http://host-meta.net/xrd/1.0'><%=@user.url%></hm:Host>
<Link rel='lrdd'
template='<%=@user.url%>webfinger/tom'>
template='<%=@user.url%>webfinger/?q={uri}'>
<Title>Resource Descriptor</Title>
</Link>
</XRD>

View file

@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
<Subject>acct:<%=@user.email%></Subject>
<Alias><%=@user.url%></Alias>
<Link rel="http://webfinger.net/rel/profile-page" type="text/html" href="<%=@user.url%>public/profile"/>
<Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="<%=@user.url%>status_messages.atom"/>
<Alias>http://www.identi.ca/user/169966</Alias>
<Link rel="http://webfinger.net/rel/profile-page" type="text/html" href="http://identi.ca/user/169966"/>
<Link rel="http://microformats.org/profile/hcard" type="text/html" href="<%@user.url%>hcard"/>
<!--<Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="<%=@user.url%>status_messages.atom"/>
<Link rel="http://microformats.org/profile/hcard" type="text/html" href="<%@user.url%>public/hcard"/>
//<Link rel="http://salmon-protocol.org/ns/salmon-replies" href="http://identi.ca/main/salmon/user/169966"/>
//<Link rel="http://salmon-protocol.org/ns/salmon-mention" href="http://identi.ca/main/salmon/user/169966"/>
//<Link rel="magic-public-key" href="data:application/magic-public-key,RSA.mGJbO8SYr9CSzfpI0TDLTvn7mnYWmTYcg4uP80rVh_lHJI-IGs7k9nb5XzGzyr4Ah8wHaxLVvmgdChw1eOd6VPDm58Bkpx9iwd9oMXwrrSBvlmE8grlzlb15GuvywPQJ7tCerNYGFNhtqBk1iUB5mue6UZAE0Y3ZaAgYfYNwITE=.AQAB"/>
--!>
<Link rel="http://ostatus.org/schema/1.0/subscribe" template="http://identi.ca/main/ostatussub?profile={uri}"/>
</XRD>
</XRD>

View file

@ -22,6 +22,7 @@ Diaspora::Application.routes.draw do |map|
match 'hubbub', :to => 'publics#hubbub'
match '.well-known/host-meta', :to => 'publics#host_meta'
match 'webfinger', :to => 'publics#webfinger'
match 'hcard', :to => 'publics#hcard'
root :to => 'dashboards#index'
end

View file

@ -7,7 +7,8 @@
# Mayor.create(:name => 'Daley', :city => citie
require 'config/environment'
ENV['GNUPGHOME'] = File.expand_path("../../../gpg/diaspora-#{Rails.env}/", __FILE__)
GPGME::check_version({})
def create(backer_number)

View file

@ -7,9 +7,10 @@
# Mayor.create(:name => 'Daley', :city => citie
require 'config/environment'
ENV['GNUPGHOME'] = File.expand_path("../../../gpg/diaspora-#{Rails.env}/", __FILE__)
GPGME::check_version({})
# Create seed user
user = User.create( :email => "robert@joindiaspora.com", :password => "monkey", :profile => Profile.new( :first_name => "bobert", :last_name => "brin" ))
user = User.create( :email => "robert@joindiaspora.com", :password => "evankorth", :profile => Profile.new( :first_name => "bobert", :last_name => "brin" ))
names = [ ["George", "Washington"],
["John", "Adams"],

View file

@ -7,7 +7,8 @@
# Mayor.create(:name => 'Daley', :city => citie
require 'config/environment'
ENV['GNUPGHOME'] = File.expand_path("../../../gpg/diaspora-#{Rails.env}/", __FILE__)
GPGME::check_version({})
# Create seed user
user = User.create( :email => "tom@tom.joindiaspora.com", :password => "evankorth", :url => "http://tom.joindiaspora.com/", :profile => Profile.new( :first_name => "Alexander", :last_name => "Hamiltom" ))

View file

View file

0
gpg/diaspora-test/EMPTY Normal file
View file