diff --git a/Gemfile b/Gemfile index 35958edae..c3d8c3477 100644 --- a/Gemfile +++ b/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' diff --git a/Gemfile.lock b/Gemfile.lock index 33e78e39b..673818fbe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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! diff --git a/app/models/person.rb b/app/models/person.rb index 541dd03eb..883db68bc 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -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") diff --git a/app/views/publics/hcard.erb b/app/views/publics/hcard.erb index 7cfbe5604..773aa1cc7 100644 --- a/app/views/publics/hcard.erb +++ b/app/views/publics/hcard.erb @@ -9,10 +9,21 @@ <%= @person.real_name%> -
+
Full name
- <%= @person.real_name %> + <%= @person.profile.first_name %> +
+
+
+
Full name
+
+ <%= @person.profile.last_name %> +
+
+
Full name
+
+ <%= @person.real_name %>
diff --git a/spec/lib/salmon_salmon_spec.rb b/spec/lib/salmon_salmon_spec.rb index f22186cb9..f53c9d228 100644 --- a/spec/lib/salmon_salmon_spec.rb +++ b/spec/lib/salmon_salmon_spec.rb @@ -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