Hcard done manually
This commit is contained in:
parent
3e9a36e1f1
commit
59006e657f
5 changed files with 18 additions and 18 deletions
1
Gemfile
1
Gemfile
|
|
@ -29,7 +29,6 @@ gem 'json'
|
|||
#Standards
|
||||
gem 'pubsubhubbub'
|
||||
gem 'redfinger', :git => 'git://github.com/rsofaer/redfinger.git'
|
||||
gem 'prism'
|
||||
|
||||
#EventMachine
|
||||
gem 'em-http-request',:git => 'git://github.com/igrigorik/em-http-request.git', :require => 'em-http'
|
||||
|
|
|
|||
|
|
@ -148,12 +148,10 @@ GEM
|
|||
net-ssh-gateway (1.0.1)
|
||||
net-ssh (>= 1.99.1)
|
||||
nifty-generators (0.4.0)
|
||||
nokogiri (1.4.3.1)
|
||||
nokogiri (1.4.1)
|
||||
plucky (0.3.5)
|
||||
mongo (~> 1.0.8)
|
||||
polyglot (0.3.1)
|
||||
prism (0.1.0)
|
||||
nokogiri
|
||||
pubsubhubbub (0.1.1)
|
||||
em-http-request (>= 0.1.5)
|
||||
eventmachine (>= 0.12.9)
|
||||
|
|
@ -244,7 +242,6 @@ DEPENDENCIES
|
|||
mongo_ext
|
||||
mongo_mapper (= 0.8.4)!
|
||||
nifty-generators
|
||||
prism
|
||||
pubsubhubbub
|
||||
rails (= 3.0.0)
|
||||
redfinger!
|
||||
|
|
|
|||
|
|
@ -97,8 +97,9 @@ class Person
|
|||
|
||||
puts profile.hcard.first[:href]
|
||||
|
||||
hcard = Prism.find profile.hcard.first[:href]
|
||||
puts hcard.inspect
|
||||
hcard = Prism.find profile.hcard.first[:href], :hcard
|
||||
pp hcard.class
|
||||
debugger
|
||||
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.profile = Profile.new(:first_name => "Anon", :last_name => "ymous")
|
||||
|
|
|
|||
|
|
@ -9,10 +9,21 @@
|
|||
<a href="<%=@person.url%>" rel="me" class="nickname url uid"><%= @person.real_name%></a>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_fn">
|
||||
<dl class="entity_given_name">
|
||||
<dt>Full name</dt>
|
||||
<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>
|
||||
</dl>
|
||||
<dl class="entity_url">
|
||||
|
|
|
|||
|
|
@ -1,13 +1,5 @@
|
|||
require File.dirname(__FILE__) + '/../spec_helper'
|
||||
|
||||
|
||||
|
||||
require 'lib/salmon/salmon'
|
||||
include ApplicationHelper
|
||||
include Salmon
|
||||
|
||||
|
||||
|
||||
describe Salmon do
|
||||
before do
|
||||
|
||||
|
|
@ -34,7 +26,7 @@ describe Salmon do
|
|||
end
|
||||
|
||||
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")
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue