Hcard done manually

This commit is contained in:
Raphael 2010-09-09 15:15:37 -07:00
parent 3e9a36e1f1
commit 59006e657f
5 changed files with 18 additions and 18 deletions

View file

@ -29,7 +29,6 @@ gem 'json'
#Standards #Standards
gem 'pubsubhubbub' gem 'pubsubhubbub'
gem 'redfinger', :git => 'git://github.com/rsofaer/redfinger.git' gem 'redfinger', :git => 'git://github.com/rsofaer/redfinger.git'
gem 'prism'
#EventMachine #EventMachine
gem 'em-http-request',:git => 'git://github.com/igrigorik/em-http-request.git', :require => 'em-http' gem 'em-http-request',:git => 'git://github.com/igrigorik/em-http-request.git', :require => 'em-http'

View file

@ -148,12 +148,10 @@ GEM
net-ssh-gateway (1.0.1) net-ssh-gateway (1.0.1)
net-ssh (>= 1.99.1) net-ssh (>= 1.99.1)
nifty-generators (0.4.0) nifty-generators (0.4.0)
nokogiri (1.4.3.1) nokogiri (1.4.1)
plucky (0.3.5) plucky (0.3.5)
mongo (~> 1.0.8) mongo (~> 1.0.8)
polyglot (0.3.1) polyglot (0.3.1)
prism (0.1.0)
nokogiri
pubsubhubbub (0.1.1) pubsubhubbub (0.1.1)
em-http-request (>= 0.1.5) em-http-request (>= 0.1.5)
eventmachine (>= 0.12.9) eventmachine (>= 0.12.9)
@ -244,7 +242,6 @@ DEPENDENCIES
mongo_ext mongo_ext
mongo_mapper (= 0.8.4)! mongo_mapper (= 0.8.4)!
nifty-generators nifty-generators
prism
pubsubhubbub pubsubhubbub
rails (= 3.0.0) rails (= 3.0.0)
redfinger! redfinger!

View file

@ -97,8 +97,9 @@ class Person
puts profile.hcard.first[:href] puts profile.hcard.first[:href]
hcard = Prism.find profile.hcard.first[:href] hcard = Prism.find profile.hcard.first[:href], :hcard
puts hcard.inspect pp hcard.class
debugger
receive_url = profile.links.select{ |l| l.rel == 'http://joindiaspora.com/seed_location'}.first.href receive_url = profile.links.select{ |l| l.rel == 'http://joindiaspora.com/seed_location'}.first.href
new_person.url = receive_url.split('receive').first new_person.url = receive_url.split('receive').first
new_person.profile = Profile.new(:first_name => "Anon", :last_name => "ymous") new_person.profile = Profile.new(:first_name => "Anon", :last_name => "ymous")

View file

@ -9,10 +9,21 @@
<a href="<%=@person.url%>" rel="me" class="nickname url uid"><%= @person.real_name%></a> <a href="<%=@person.url%>" rel="me" class="nickname url uid"><%= @person.real_name%></a>
</dd> </dd>
</dl> </dl>
<dl class="entity_fn"> <dl class="entity_given_name">
<dt>Full name</dt> <dt>Full name</dt>
<dd> <dd>
<span class="fn"><%= @person.real_name %></span> <span class="given_name" ><%= @person.profile.first_name %></span>
</dd>
</dl>
<dl class="entity_family_name">
<dt>Full name</dt>
<dd>
<span class="family_name" ><%= @person.profile.last_name %></span>
</dd>
</dl> <dl class="entity_fn">
<dt>Full name</dt>
<dd>
<span class="fn" ><%= @person.real_name %></span>
</dd> </dd>
</dl> </dl>
<dl class="entity_url"> <dl class="entity_url">

View file

@ -1,13 +1,5 @@
require File.dirname(__FILE__) + '/../spec_helper' require File.dirname(__FILE__) + '/../spec_helper'
require 'lib/salmon/salmon'
include ApplicationHelper
include Salmon
describe Salmon do describe Salmon do
before do before do
@ -34,7 +26,7 @@ describe Salmon do
end end
it 'should push to a url' do it 'should push to a url' do
QUEUE.should_receive(:add_post_request) Salmon::QUEUE.should_receive(:add_post_request)
@sent_salmon.push_to_url("example.com") @sent_salmon.push_to_url("example.com")
end end