Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

using timecop for interactions + whitespaces removed

  • Loading branch information...
commit d9d7bbb74b8017894ae6d33258862601d9c2de77 1 parent d328cda
Florian Staudacher Raven24 authored
14 app/views/users/public.atom.builder
View
@@ -1,9 +1,9 @@
atom_feed({'xmlns:thr' => 'http://purl.org/syndication/thread/1.0',
- 'xmlns:georss' => 'http://www.georss.org/georss',
- 'xmlns:activity' => 'http://activitystrea.ms/spec/1.0/',
+ 'xmlns:georss' => 'http://www.georss.org/georss',
+ 'xmlns:activity' => 'http://activitystrea.ms/spec/1.0/',
'xmlns:media' => 'http://purl.org/syndication/atommedia',
- 'xmlns:poco' => 'http://portablecontacts.net/spec/1.0',
- 'xmlns:ostatus' => 'http://ostatus.org/schema/1.0',
+ 'xmlns:poco' => 'http://portablecontacts.net/spec/1.0',
+ 'xmlns:ostatus' => 'http://ostatus.org/schema/1.0',
'xmlns:statusnet' => 'http://status.net/schema/api/1/',
:id => "#{@user.public_url}.atom",
:root_url => "#{@user.public_url}"}) do |feed|
@@ -14,13 +14,13 @@ atom_feed({'xmlns:thr' => 'http://purl.org/syndication/thread/1.0',
feed.logo "#{@user.person.profile.image_url(:thumb_small)}"
feed.updated @posts[0].created_at if @posts.length > 0
feed.tag! :link, :rel => 'avatar', :type => 'image/jpeg', 'media:width' => '100',
- 'media:height' => '100', :href => "#{@user.profile.image_url}"
+ 'media:height' => '100', :href => "#{@user.profile.image_url}"
feed.tag! :link, :href => "#{AppConfig[:pubsub_server]}", :rel => 'hub'
feed.author do |author|
author.name @user.name
author.uri local_or_remote_person_path(@user.person, :absolute => true)
-
+
author.tag! 'activity:object-type', 'http://activitystrea.ms/schema/1.0/person'
author.tag! 'poco:preferredUsername', @user.username
author.tag! 'poco:displayName', @user.person.name
@@ -36,5 +36,5 @@ atom_feed({'xmlns:thr' => 'http://purl.org/syndication/thread/1.0',
entry.tag! 'activity:verb', 'http://activitystrea.ms/schema/1.0/post'
entry.tag! 'activity:object-type', 'http://activitystrea.ms/schema/1.0/note'
end
- end
+ end
end
4 spec/controllers/users_controller_spec.rb
View
@@ -36,7 +36,7 @@
it 'should 404 if no user is found' do
get :user_photo, :username => 'none'
response.should_not be_success
- end
+ end
end
describe '#public' do
@@ -45,7 +45,7 @@
get :public, :username => @user.username, :format => :atom
response.body.should include(sm.text)
end
-
+
it 'renders xml if atom is requested with clickalbe urls' do
sm = Factory(:status_message, :public => true, :author => @user.person)
@user.person.posts.each do |p|
10 spec/shared_behaviors/relayable.rb
View
@@ -9,10 +9,12 @@
describe 'interacted_at' do
it 'sets the interacted at of the parent to the created at of the relayable post' do
- relayable = build_object
- relayable.save
- if relayable.parent.respond_to?(:interacted_at) #I'm sorry.
- relayable.parent.interacted_at.to_i.should == relayable.created_at.to_i
+ Timecop.freeze do
+ relayable = build_object
+ relayable.save
+ if relayable.parent.respond_to?(:interacted_at) #I'm sorry.
+ relayable.parent.interacted_at.to_i.should == relayable.created_at.to_i
+ end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.