Merge branch 'master' of github.com:diaspora/diaspora
Conflicts: spec/lib/message_handler_spec.rb spec/spec_helper.rb
This commit is contained in:
commit
15bd24a64f
48 changed files with 1173 additions and 123 deletions
|
|
@ -16,15 +16,24 @@ class PeopleController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@aspect = :profile
|
@aspect = :profile
|
||||||
@person = current_user.visible_person_by_id(params[:id])
|
|
||||||
unless @person
|
@person = Person.find(params[:id].to_id)
|
||||||
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404
|
|
||||||
else
|
if @person
|
||||||
@profile = @person.profile
|
@profile = @person.profile
|
||||||
@contact = current_user.contact_for(@person)
|
@contact = current_user.contact_for(@person)
|
||||||
@aspects_with_person = @contact.aspects if @contact
|
|
||||||
|
if @contact
|
||||||
|
@aspects_with_person = @contact.aspects
|
||||||
|
else
|
||||||
|
@pending_request = current_user.pending_requests.find_by_person_id(@person.id)
|
||||||
|
end
|
||||||
|
|
||||||
@posts = current_user.visible_posts(:person_id => @person.id).paginate :page => params[:page], :order => 'created_at DESC'
|
@posts = current_user.visible_posts(:person_id => @person.id).paginate :page => params[:page], :order => 'created_at DESC'
|
||||||
respond_with @person
|
respond_with @person
|
||||||
|
else
|
||||||
|
flash[:error] = "Person does not exist!"
|
||||||
|
redirect_to people_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -435,7 +435,7 @@ class User
|
||||||
end
|
end
|
||||||
|
|
||||||
def diaspora_handle
|
def diaspora_handle
|
||||||
"#{self.username}@#{APP_CONFIG[:terse_pod_url]}"
|
person.diaspora_handle
|
||||||
end
|
end
|
||||||
|
|
||||||
def as_json(opts={})
|
def as_json(opts={})
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
- for aspect in @aspects_with_person
|
- for aspect in @aspects_with_person
|
||||||
%li= link_to aspect.name, aspect
|
%li= link_to aspect.name, aspect
|
||||||
|
|
||||||
- if @person != current_user.person && current_user.friends.include?(@person)
|
- if @person != current_user.person && @contact
|
||||||
= link_to t('.remove_friend'), @person, :confirm => t('.are_you_sure'), :method => :delete, :class => "button"
|
= link_to t('.remove_friend'), @person, :confirm => t('.are_you_sure'), :method => :delete, :class => "button"
|
||||||
|
|
||||||
- if @person == current_user.person
|
- if @person == current_user.person
|
||||||
|
|
@ -36,12 +36,16 @@
|
||||||
|
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
|
- if @person != current_user.person && @contact
|
||||||
%ul
|
%ul
|
||||||
%li= link_to 'stream', person_path(@person)
|
%li= link_to 'stream', person_path(@person)
|
||||||
%li= link_to 'photos', person_photos_path(@person)
|
%li= link_to 'photos', person_photos_path(@person)
|
||||||
|
|
||||||
|
|
||||||
.span-15.last
|
.span-15.last
|
||||||
|
|
||||||
|
- if @contact || current_user.person == @person
|
||||||
|
|
||||||
- if @posts.count > 0
|
- if @posts.count > 0
|
||||||
%ul#stream
|
%ul#stream
|
||||||
- for post in @posts
|
- for post in @posts
|
||||||
|
|
@ -50,3 +54,25 @@
|
||||||
- else
|
- else
|
||||||
%h3= t('.no_posts')
|
%h3= t('.no_posts')
|
||||||
|
|
||||||
|
- else
|
||||||
|
|
||||||
|
.floating
|
||||||
|
%h3
|
||||||
|
= "You're currently not friends with #{@person.real_name}"
|
||||||
|
|
||||||
|
|
||||||
|
- unless @pending_request
|
||||||
|
%h3
|
||||||
|
.description
|
||||||
|
If you'd like, you can request to place him/her in one of your aspects.
|
||||||
|
|
||||||
|
= form_for Request.new do |f|
|
||||||
|
= f.select(:aspect_id, @aspects_dropdown_array)
|
||||||
|
= f.hidden_field :destination_url, :value => @person.diaspora_handle
|
||||||
|
= f.submit t('.add_friend')
|
||||||
|
|
||||||
|
- else
|
||||||
|
%h3
|
||||||
|
.description
|
||||||
|
= "You have already sent a request to #{@person.real_name}."
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -216,6 +216,7 @@ en:
|
||||||
are_you_sure: "Are you sure?"
|
are_you_sure: "Are you sure?"
|
||||||
remove_friend: "remove friend"
|
remove_friend: "remove friend"
|
||||||
no_posts: "no posts to display!"
|
no_posts: "no posts to display!"
|
||||||
|
add_friend: "add friend"
|
||||||
edit:
|
edit:
|
||||||
cancel: "Cancel"
|
cancel: "Cancel"
|
||||||
update_profile: "Update Profile"
|
update_profile: "Update Profile"
|
||||||
|
|
|
||||||
12
lib/tasks/fixtures.rake
Normal file
12
lib/tasks/fixtures.rake
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
namespace :fixtures do
|
||||||
|
desc 'Regenerates user fixtures'
|
||||||
|
task :users do
|
||||||
|
puts "Regenerating fixtures for users."
|
||||||
|
require File.join(Rails.root,"config/environment")
|
||||||
|
require File.join(Rails.root,"spec/helper_methods")
|
||||||
|
require File.join(Rails.root,"spec/factories")
|
||||||
|
include HelperMethods
|
||||||
|
UserFixer.regenerate_user_fixtures
|
||||||
|
puts "Fixture regeneration complete."
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -7,7 +7,7 @@ require 'spec_helper'
|
||||||
describe AlbumsController do
|
describe AlbumsController do
|
||||||
render_views
|
render_views
|
||||||
before do
|
before do
|
||||||
@user = Factory.create(:user)
|
@user = make_user
|
||||||
@aspect = @user.aspect(:name => "lame-os")
|
@aspect = @user.aspect(:name => "lame-os")
|
||||||
@album = @user.post :album, :to => @aspect.id, :name => 'things on fire'
|
@album = @user.post :album, :to => @aspect.id, :name => 'things on fire'
|
||||||
sign_in :user, @user
|
sign_in :user, @user
|
||||||
|
|
@ -31,7 +31,7 @@ describe AlbumsController do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "doesn't overwrite random attributes" do
|
it "doesn't overwrite random attributes" do
|
||||||
new_user = Factory.create :user
|
new_user = make_user
|
||||||
params = {:name => "Bruisers", :person_id => new_user.person.id}
|
params = {:name => "Bruisers", :person_id => new_user.person.id}
|
||||||
put('update', :id => @album.id, "album" => params)
|
put('update', :id => @album.id, "album" => params)
|
||||||
@album.reload.person_id.should == @user.person.id
|
@album.reload.person_id.should == @user.person.id
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ describe AspectsController do
|
||||||
render_views
|
render_views
|
||||||
|
|
||||||
before do
|
before do
|
||||||
@user = Factory.create(:user)
|
@user = make_user
|
||||||
@aspect = @user.aspect(:name => "lame-os")
|
@aspect = @user.aspect(:name => "lame-os")
|
||||||
@aspect1 = @user.aspect(:name => "another aspect")
|
@aspect1 = @user.aspect(:name => "another aspect")
|
||||||
@user2 = Factory.create(:user)
|
@user2 = make_user
|
||||||
@aspect2 = @user2.aspect(:name => "party people")
|
@aspect2 = @user2.aspect(:name => "party people")
|
||||||
friend_users(@user,@aspect, @user2, @aspect2)
|
friend_users(@user,@aspect, @user2, @aspect2)
|
||||||
@contact = @user.contact_for(@user2.person)
|
@contact = @user.contact_for(@user2.person)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ require 'spec_helper'
|
||||||
describe PhotosController do
|
describe PhotosController do
|
||||||
render_views
|
render_views
|
||||||
before do
|
before do
|
||||||
@user = Factory.create(:user)
|
@user = make_user
|
||||||
@aspect = @user.aspect(:name => "lame-os")
|
@aspect = @user.aspect(:name => "lame-os")
|
||||||
@album = @user.post :album, :to => @aspect.id, :name => 'things on fire'
|
@album = @user.post :album, :to => @aspect.id, :name => 'things on fire'
|
||||||
@fixture_filename = 'button.png'
|
@fixture_filename = 'button.png'
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe PublicsController do
|
describe PublicsController do
|
||||||
render_views
|
render_views
|
||||||
let!(:user) { Factory.create :user }
|
let!(:user) { make_user }
|
||||||
let!(:user2) { Factory.create :user }
|
let!(:user2) { make_user }
|
||||||
let!(:aspect1) { user.aspect(:name => "foo") }
|
let!(:aspect1) { user.aspect(:name => "foo") }
|
||||||
let!(:aspect2) { user2.aspect(:name => "far") }
|
let!(:aspect2) { user2.aspect(:name => "far") }
|
||||||
let!(:aspect2) { user2.aspect(:name => 'disciples') }
|
let!(:aspect2) { user2.aspect(:name => 'disciples') }
|
||||||
|
|
@ -105,7 +105,7 @@ describe PublicsController do
|
||||||
|
|
||||||
describe '#webfinger' do
|
describe '#webfinger' do
|
||||||
it "succeeds when the person and user exist locally" do
|
it "succeeds when the person and user exist locally" do
|
||||||
user = Factory(:user)
|
user = make_user
|
||||||
post :webfinger, 'q' => user.person.diaspora_handle
|
post :webfinger, 'q' => user.person.diaspora_handle
|
||||||
response.should be_success
|
response.should be_success
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ require 'spec_helper'
|
||||||
describe RequestsController do
|
describe RequestsController do
|
||||||
render_views
|
render_views
|
||||||
before do
|
before do
|
||||||
@user = Factory.create(:user)
|
@user = make_user
|
||||||
|
|
||||||
sign_in :user, @user
|
sign_in :user, @user
|
||||||
@user.aspect(:name => "lame-os")
|
@user.aspect(:name => "lame-os")
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe ServicesController do
|
describe ServicesController do
|
||||||
render_views
|
render_views
|
||||||
let(:user) { Factory(:user) }
|
let(:user) { make_user }
|
||||||
let!(:aspect) { user.aspect(:name => "lame-os") }
|
let!(:aspect) { user.aspect(:name => "lame-os") }
|
||||||
|
|
||||||
let!(:service1) {a = Factory(:service); user.services << a; a}
|
let!(:service1) {a = Factory(:service); user.services << a; a}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ EOT
|
||||||
describe SocketsController do
|
describe SocketsController do
|
||||||
render_views
|
render_views
|
||||||
before do
|
before do
|
||||||
@user = Factory.create(:user)
|
@user = make_user
|
||||||
@controller = SocketsController.new
|
@controller = SocketsController.new
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ require 'spec_helper'
|
||||||
describe StatusMessagesController do
|
describe StatusMessagesController do
|
||||||
render_views
|
render_views
|
||||||
|
|
||||||
let!(:user) { Factory(:user) }
|
let!(:user) { make_user }
|
||||||
let!(:aspect) { user.aspect(:name => "lame-os") }
|
let!(:aspect) { user.aspect(:name => "lame-os") }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe UsersController do
|
describe UsersController do
|
||||||
|
|
||||||
let(:user) { Factory(:user) }
|
let(:user) { make_user }
|
||||||
let!(:aspect) { user.aspect(:name => "lame-os") }
|
let!(:aspect) { user.aspect(:name => "lame-os") }
|
||||||
|
|
||||||
let!(:old_password) { user.encrypted_password }
|
let!(:old_password) { user.encrypted_password }
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,19 @@
|
||||||
# http://railscasts.com/episodes/158-factories-not-fixtures
|
# http://railscasts.com/episodes/158-factories-not-fixtures
|
||||||
#This inclsion, because gpg-agent(not needed) is never run and hence never sets any env. variables on a MAC
|
#This inclsion, because gpg-agent(not needed) is never run and hence never sets any env. variables on a MAC
|
||||||
|
|
||||||
|
def r_str
|
||||||
|
ActiveSupport::SecureRandom.hex(3)
|
||||||
|
end
|
||||||
|
|
||||||
Factory.define :profile do |p|
|
Factory.define :profile do |p|
|
||||||
p.sequence(:first_name){|n| "Robert#{n}"}
|
p.sequence(:first_name){|n| "Robert#{n}#{r_str}"}
|
||||||
p.sequence(:last_name){|n| "Grimm#{n}"}
|
p.sequence(:last_name){|n| "Grimm#{n}#{r_str}"}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
Factory.define :person do |p|
|
Factory.define :person do |p|
|
||||||
p.sequence(:diaspora_handle) {|n| "bob-person-#{n}@aol.com"}
|
p.sequence(:diaspora_handle) {|n| "bob-person-#{n}#{r_str}@aol.com"}
|
||||||
p.sequence(:url) {|n| "http://google-#{n}.com/"}
|
p.sequence(:url) {|n| "http://google-#{n}#{r_str}.com/"}
|
||||||
p.profile Factory.create(:profile, :first_name => "eugene", :last_name => "weinstien")
|
p.profile Factory.create(:profile, :first_name => "eugene", :last_name => "weinstien")
|
||||||
|
|
||||||
p.serialized_public_key OpenSSL::PKey::RSA.generate(1024).public_key.export
|
p.serialized_public_key OpenSSL::PKey::RSA.generate(1024).public_key.export
|
||||||
|
|
@ -27,8 +31,8 @@ Factory.define :album do |p|
|
||||||
end
|
end
|
||||||
|
|
||||||
Factory.define :user do |u|
|
Factory.define :user do |u|
|
||||||
u.sequence(:username) {|n| "bob#{n}"}
|
u.sequence(:username) {|n| "bob#{n}#{r_str}"}
|
||||||
u.sequence(:email) {|n| "bob#{n}@pivotallabs.com"}
|
u.sequence(:email) {|n| "bob#{n}#{r_str}@pivotallabs.com"}
|
||||||
u.password "bluepin7"
|
u.password "bluepin7"
|
||||||
u.password_confirmation "bluepin7"
|
u.password_confirmation "bluepin7"
|
||||||
u.serialized_private_key OpenSSL::PKey::RSA.generate(1024).export
|
u.serialized_private_key OpenSSL::PKey::RSA.generate(1024).export
|
||||||
|
|
|
||||||
948
spec/fixtures/users.yaml
vendored
Normal file
948
spec/fixtures/users.yaml
vendored
Normal file
|
|
@ -0,0 +1,948 @@
|
||||||
|
---
|
||||||
|
:users:
|
||||||
|
- :user: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
encrypted_password: $2a$10$yl5042/m1NmG58eXtYKb7uiHUuBYq0xPRm7xK.Xdi/a9ypP0UyNFe
|
||||||
|
serialized_private_key: &id002 |
|
||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIICXAIBAAKBgQDFEFYV6qVJwk1qHQio2QLBx5D8qkMnFPTg8hq0X9qk8Ft4A1Fu
|
||||||
|
bPdk9tpSp+FhtL3PqQiVo/ELzv7/Vg+qD6HnWtUytmpSkVdBsseIabyQcL7rzMpK
|
||||||
|
Jv8eW8+kSakvgQVJSDIFBf67VGHcm3vXSlh3NbU0V/Od2IRBKKbPaTJU6QIDAQAB
|
||||||
|
AoGAU+SMgXAPRcNOKaqKkTcxkUVgV/Az/mNRjKIE9F0KO8WHayQeeqAxAe6FK0MF
|
||||||
|
FA9Z7xnK6cmNSLWqoREGQiO9jH00qQM2lBTJHDQnfTifV21LyU28UIj+46LOUO72
|
||||||
|
x5BhiDAq3ncl+wh3THlvvYBKEYkH9V5E3Qv190oGqeG/8LECQQDmlYJHuaeKUr8r
|
||||||
|
nKe3AbZs2gSJb88LR28L3l7MJiRiYd2j+0XDPrqj6BsxB33dIIU5rA3i272zxziw
|
||||||
|
TwrcYYpfAkEA2sj5EVwAeghH+dQ14je/81k5+gHJa14DyTCMiNsIaVFimNhALZrz
|
||||||
|
KQ8EGPkTSbHH5R6iyPmHY6fTb16YZKV1twJBANJIcMpmhmNAOTVVpSHhfvNgFBke
|
||||||
|
jUv09lF1lzBIbJAIPjAIvENllqJZz0p0UZVyzeydewBzc1pbidhIDViT37MCQADG
|
||||||
|
RVtyX+4OqXKQ9b/fQqax4iqoZvYiVxEXQugZHmaBC0BPQ6rlqYazrugHubHBF1wQ
|
||||||
|
R7M+buRDa9QxGYkBrPECQBec55rbSGJRomlHRVhKyAfPewcbCO9wurIuWvkTDlac
|
||||||
|
Ju0kWn4frTvRJnEgPxHsRlQLBiyAMZsQ5UvWmy6rNxs=
|
||||||
|
-----END RSA PRIVATE KEY-----
|
||||||
|
|
||||||
|
pending_request_ids: []
|
||||||
|
|
||||||
|
invite_messages: !map:ActiveSupport::HashWithIndifferentAccess {}
|
||||||
|
|
||||||
|
last_sign_in_ip:
|
||||||
|
invites: 5
|
||||||
|
friend_ids: []
|
||||||
|
|
||||||
|
_id: &id001 !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 37
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 2
|
||||||
|
last_sign_in_at:
|
||||||
|
username: bob1b1de83
|
||||||
|
language: en
|
||||||
|
sign_in_count: 0
|
||||||
|
visible_person_ids: []
|
||||||
|
|
||||||
|
password_salt: $2a$10$yl5042/m1NmG58eXtYKb7u
|
||||||
|
inviter_ids: []
|
||||||
|
|
||||||
|
remember_token:
|
||||||
|
reset_password_token:
|
||||||
|
current_sign_in_ip:
|
||||||
|
remember_created_at:
|
||||||
|
current_sign_in_at:
|
||||||
|
invitation_sent_at:
|
||||||
|
email: bob16accc0@pivotallabs.com
|
||||||
|
invitation_token:
|
||||||
|
visible_post_ids: []
|
||||||
|
|
||||||
|
getting_started: true
|
||||||
|
:person: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
created_at: 2010-10-29 22:43:50 Z
|
||||||
|
profile: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
image_url:
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 38
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 3
|
||||||
|
gender:
|
||||||
|
birthday:
|
||||||
|
last_name: Grimm1c1b679
|
||||||
|
bio:
|
||||||
|
first_name: Robert15cfdfb
|
||||||
|
updated_at: 2010-10-29 22:43:50 Z
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 38
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 4
|
||||||
|
url: http://google-11ed884.com/
|
||||||
|
serialized_public_key: |
|
||||||
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2
|
||||||
|
2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b
|
||||||
|
z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE=
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
|
||||||
|
owner_id: *id001
|
||||||
|
diaspora_handle: bob1b1de83@tom.joindiaspora.co
|
||||||
|
- :user: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
encrypted_password: $2a$10$MQH.CJUkEbAA0aMlhs3yVOV0W8obzclj24JLMzlbsLblW58P/2WDu
|
||||||
|
serialized_private_key: *id002
|
||||||
|
pending_request_ids: []
|
||||||
|
|
||||||
|
invite_messages: !map:ActiveSupport::HashWithIndifferentAccess {}
|
||||||
|
|
||||||
|
last_sign_in_ip:
|
||||||
|
invites: 5
|
||||||
|
friend_ids: []
|
||||||
|
|
||||||
|
_id: &id003 !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 38
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 5
|
||||||
|
last_sign_in_at:
|
||||||
|
username: bob2271e40
|
||||||
|
language: en
|
||||||
|
sign_in_count: 0
|
||||||
|
visible_person_ids: []
|
||||||
|
|
||||||
|
password_salt: $2a$10$MQH.CJUkEbAA0aMlhs3yVO
|
||||||
|
inviter_ids: []
|
||||||
|
|
||||||
|
remember_token:
|
||||||
|
reset_password_token:
|
||||||
|
current_sign_in_ip:
|
||||||
|
remember_created_at:
|
||||||
|
current_sign_in_at:
|
||||||
|
invitation_sent_at:
|
||||||
|
email: bob2573b5a@pivotallabs.com
|
||||||
|
invitation_token:
|
||||||
|
visible_post_ids: []
|
||||||
|
|
||||||
|
getting_started: true
|
||||||
|
:person: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
created_at: 2010-10-29 22:43:50 Z
|
||||||
|
profile: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
image_url:
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 38
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 6
|
||||||
|
gender:
|
||||||
|
birthday:
|
||||||
|
last_name: Grimm20d70fb
|
||||||
|
bio:
|
||||||
|
first_name: Robert2720656
|
||||||
|
updated_at: 2010-10-29 22:43:50 Z
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 38
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 7
|
||||||
|
url: http://google-2a66ee6.com/
|
||||||
|
serialized_public_key: |
|
||||||
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2
|
||||||
|
2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b
|
||||||
|
z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE=
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
|
||||||
|
owner_id: *id003
|
||||||
|
diaspora_handle: bob2271e40@tom.joindiaspora.co
|
||||||
|
- :user: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
encrypted_password: $2a$10$ngoa90jBWjnsEmd63uM8CehEbGR10eDk5CavVC56K2DFGqospeVPm
|
||||||
|
serialized_private_key: *id002
|
||||||
|
pending_request_ids: []
|
||||||
|
|
||||||
|
invite_messages: !map:ActiveSupport::HashWithIndifferentAccess {}
|
||||||
|
|
||||||
|
last_sign_in_ip:
|
||||||
|
invites: 5
|
||||||
|
friend_ids: []
|
||||||
|
|
||||||
|
_id: &id004 !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 38
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 8
|
||||||
|
last_sign_in_at:
|
||||||
|
username: bob35b8a98
|
||||||
|
language: en
|
||||||
|
sign_in_count: 0
|
||||||
|
visible_person_ids: []
|
||||||
|
|
||||||
|
password_salt: $2a$10$ngoa90jBWjnsEmd63uM8Ce
|
||||||
|
inviter_ids: []
|
||||||
|
|
||||||
|
remember_token:
|
||||||
|
reset_password_token:
|
||||||
|
current_sign_in_ip:
|
||||||
|
remember_created_at:
|
||||||
|
current_sign_in_at:
|
||||||
|
invitation_sent_at:
|
||||||
|
email: bob312d7a3@pivotallabs.com
|
||||||
|
invitation_token:
|
||||||
|
visible_post_ids: []
|
||||||
|
|
||||||
|
getting_started: true
|
||||||
|
:person: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
created_at: 2010-10-29 22:43:50 Z
|
||||||
|
profile: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
image_url:
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 38
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 9
|
||||||
|
gender:
|
||||||
|
birthday:
|
||||||
|
last_name: Grimm309eb5b
|
||||||
|
bio:
|
||||||
|
first_name: Robert3ef0451
|
||||||
|
updated_at: 2010-10-29 22:43:50 Z
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 38
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 10
|
||||||
|
url: http://google-32f8058.com/
|
||||||
|
serialized_public_key: |
|
||||||
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2
|
||||||
|
2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b
|
||||||
|
z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE=
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
|
||||||
|
owner_id: *id004
|
||||||
|
diaspora_handle: bob35b8a98@tom.joindiaspora.co
|
||||||
|
- :user: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
encrypted_password: $2a$10$PQxJ9RTpc9Uc72hKckPKbeNLKYNmDSUJvwqaziC4a62WA7vUF3ibm
|
||||||
|
serialized_private_key: *id002
|
||||||
|
pending_request_ids: []
|
||||||
|
|
||||||
|
invite_messages: !map:ActiveSupport::HashWithIndifferentAccess {}
|
||||||
|
|
||||||
|
last_sign_in_ip:
|
||||||
|
invites: 5
|
||||||
|
friend_ids: []
|
||||||
|
|
||||||
|
_id: &id005 !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 38
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 11
|
||||||
|
last_sign_in_at:
|
||||||
|
username: bob458f3d8
|
||||||
|
language: en
|
||||||
|
sign_in_count: 0
|
||||||
|
visible_person_ids: []
|
||||||
|
|
||||||
|
password_salt: $2a$10$PQxJ9RTpc9Uc72hKckPKbe
|
||||||
|
inviter_ids: []
|
||||||
|
|
||||||
|
remember_token:
|
||||||
|
reset_password_token:
|
||||||
|
current_sign_in_ip:
|
||||||
|
remember_created_at:
|
||||||
|
current_sign_in_at:
|
||||||
|
invitation_sent_at:
|
||||||
|
email: bob44fbaa5@pivotallabs.com
|
||||||
|
invitation_token:
|
||||||
|
visible_post_ids: []
|
||||||
|
|
||||||
|
getting_started: true
|
||||||
|
:person: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
created_at: 2010-10-29 22:43:51 Z
|
||||||
|
profile: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
image_url:
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 12
|
||||||
|
gender:
|
||||||
|
birthday:
|
||||||
|
last_name: Grimm4c2f0d0
|
||||||
|
bio:
|
||||||
|
first_name: Robert42453f9
|
||||||
|
updated_at: 2010-10-29 22:43:51 Z
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 13
|
||||||
|
url: http://google-4e5029d.com/
|
||||||
|
serialized_public_key: |
|
||||||
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2
|
||||||
|
2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b
|
||||||
|
z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE=
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
|
||||||
|
owner_id: *id005
|
||||||
|
diaspora_handle: bob458f3d8@tom.joindiaspora.co
|
||||||
|
- :user: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
encrypted_password: $2a$10$XSjtdsL9Yz2GS9By/4hQZeXnXZWPd0uuJtUWeN.VXFtUk/NEkZhOq
|
||||||
|
serialized_private_key: *id002
|
||||||
|
pending_request_ids: []
|
||||||
|
|
||||||
|
invite_messages: !map:ActiveSupport::HashWithIndifferentAccess {}
|
||||||
|
|
||||||
|
last_sign_in_ip:
|
||||||
|
invites: 5
|
||||||
|
friend_ids: []
|
||||||
|
|
||||||
|
_id: &id006 !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 14
|
||||||
|
last_sign_in_at:
|
||||||
|
username: bob57d55fd
|
||||||
|
language: en
|
||||||
|
sign_in_count: 0
|
||||||
|
visible_person_ids: []
|
||||||
|
|
||||||
|
password_salt: $2a$10$XSjtdsL9Yz2GS9By/4hQZe
|
||||||
|
inviter_ids: []
|
||||||
|
|
||||||
|
remember_token:
|
||||||
|
reset_password_token:
|
||||||
|
current_sign_in_ip:
|
||||||
|
remember_created_at:
|
||||||
|
current_sign_in_at:
|
||||||
|
invitation_sent_at:
|
||||||
|
email: bob55c87c3@pivotallabs.com
|
||||||
|
invitation_token:
|
||||||
|
visible_post_ids: []
|
||||||
|
|
||||||
|
getting_started: true
|
||||||
|
:person: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
created_at: 2010-10-29 22:43:51 Z
|
||||||
|
profile: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
image_url:
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 15
|
||||||
|
gender:
|
||||||
|
birthday:
|
||||||
|
last_name: Grimm54c2742
|
||||||
|
bio:
|
||||||
|
first_name: Robert5ca48e4
|
||||||
|
updated_at: 2010-10-29 22:43:51 Z
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 16
|
||||||
|
url: http://google-5ecb435.com/
|
||||||
|
serialized_public_key: |
|
||||||
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2
|
||||||
|
2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b
|
||||||
|
z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE=
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
|
||||||
|
owner_id: *id006
|
||||||
|
diaspora_handle: bob57d55fd@tom.joindiaspora.co
|
||||||
|
- :user: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
encrypted_password: $2a$10$GD1Ox5LmmOLOVycvOkuHtu/gwINhkkIVxKAuksw1z/If9HdKOZj4q
|
||||||
|
serialized_private_key: *id002
|
||||||
|
pending_request_ids: []
|
||||||
|
|
||||||
|
invite_messages: !map:ActiveSupport::HashWithIndifferentAccess {}
|
||||||
|
|
||||||
|
last_sign_in_ip:
|
||||||
|
invites: 5
|
||||||
|
friend_ids: []
|
||||||
|
|
||||||
|
_id: &id007 !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 17
|
||||||
|
last_sign_in_at:
|
||||||
|
username: bob6e6db8b
|
||||||
|
language: en
|
||||||
|
sign_in_count: 0
|
||||||
|
visible_person_ids: []
|
||||||
|
|
||||||
|
password_salt: $2a$10$GD1Ox5LmmOLOVycvOkuHtu
|
||||||
|
inviter_ids: []
|
||||||
|
|
||||||
|
remember_token:
|
||||||
|
reset_password_token:
|
||||||
|
current_sign_in_ip:
|
||||||
|
remember_created_at:
|
||||||
|
current_sign_in_at:
|
||||||
|
invitation_sent_at:
|
||||||
|
email: bob6e9568f@pivotallabs.com
|
||||||
|
invitation_token:
|
||||||
|
visible_post_ids: []
|
||||||
|
|
||||||
|
getting_started: true
|
||||||
|
:person: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
created_at: 2010-10-29 22:43:51 Z
|
||||||
|
profile: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
image_url:
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 18
|
||||||
|
gender:
|
||||||
|
birthday:
|
||||||
|
last_name: Grimm66fb47f
|
||||||
|
bio:
|
||||||
|
first_name: Robert6bf1362
|
||||||
|
updated_at: 2010-10-29 22:43:51 Z
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 19
|
||||||
|
url: http://google-637c337.com/
|
||||||
|
serialized_public_key: |
|
||||||
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2
|
||||||
|
2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b
|
||||||
|
z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE=
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
|
||||||
|
owner_id: *id007
|
||||||
|
diaspora_handle: bob6e6db8b@tom.joindiaspora.co
|
||||||
|
- :user: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
encrypted_password: $2a$10$dBJTo2az.3WVZqyb4vNOkuh/ld3TqKmF/Pn2QnWBvSFueD/lOhr.S
|
||||||
|
serialized_private_key: *id002
|
||||||
|
pending_request_ids: []
|
||||||
|
|
||||||
|
invite_messages: !map:ActiveSupport::HashWithIndifferentAccess {}
|
||||||
|
|
||||||
|
last_sign_in_ip:
|
||||||
|
invites: 5
|
||||||
|
friend_ids: []
|
||||||
|
|
||||||
|
_id: &id008 !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 20
|
||||||
|
last_sign_in_at:
|
||||||
|
username: bob72cdc62
|
||||||
|
language: en
|
||||||
|
sign_in_count: 0
|
||||||
|
visible_person_ids: []
|
||||||
|
|
||||||
|
password_salt: $2a$10$dBJTo2az.3WVZqyb4vNOku
|
||||||
|
inviter_ids: []
|
||||||
|
|
||||||
|
remember_token:
|
||||||
|
reset_password_token:
|
||||||
|
current_sign_in_ip:
|
||||||
|
remember_created_at:
|
||||||
|
current_sign_in_at:
|
||||||
|
invitation_sent_at:
|
||||||
|
email: bob7ef7e9b@pivotallabs.com
|
||||||
|
invitation_token:
|
||||||
|
visible_post_ids: []
|
||||||
|
|
||||||
|
getting_started: true
|
||||||
|
:person: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
created_at: 2010-10-29 22:43:51 Z
|
||||||
|
profile: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
image_url:
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 21
|
||||||
|
gender:
|
||||||
|
birthday:
|
||||||
|
last_name: Grimm772f10b
|
||||||
|
bio:
|
||||||
|
first_name: Robert71c70ee
|
||||||
|
updated_at: 2010-10-29 22:43:51 Z
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 22
|
||||||
|
url: http://google-72202b0.com/
|
||||||
|
serialized_public_key: |
|
||||||
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2
|
||||||
|
2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b
|
||||||
|
z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE=
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
|
||||||
|
owner_id: *id008
|
||||||
|
diaspora_handle: bob72cdc62@tom.joindiaspora.co
|
||||||
|
- :user: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
encrypted_password: $2a$10$xCE8yLMxbcXRh5gLuALK6.FNVtPEZmFd1RBaDLPeWgjc8qIlpwVhe
|
||||||
|
serialized_private_key: *id002
|
||||||
|
pending_request_ids: []
|
||||||
|
|
||||||
|
invite_messages: !map:ActiveSupport::HashWithIndifferentAccess {}
|
||||||
|
|
||||||
|
last_sign_in_ip:
|
||||||
|
invites: 5
|
||||||
|
friend_ids: []
|
||||||
|
|
||||||
|
_id: &id009 !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 23
|
||||||
|
last_sign_in_at:
|
||||||
|
username: bob8678b45
|
||||||
|
language: en
|
||||||
|
sign_in_count: 0
|
||||||
|
visible_person_ids: []
|
||||||
|
|
||||||
|
password_salt: $2a$10$xCE8yLMxbcXRh5gLuALK6.
|
||||||
|
inviter_ids: []
|
||||||
|
|
||||||
|
remember_token:
|
||||||
|
reset_password_token:
|
||||||
|
current_sign_in_ip:
|
||||||
|
remember_created_at:
|
||||||
|
current_sign_in_at:
|
||||||
|
invitation_sent_at:
|
||||||
|
email: bob819d189@pivotallabs.com
|
||||||
|
invitation_token:
|
||||||
|
visible_post_ids: []
|
||||||
|
|
||||||
|
getting_started: true
|
||||||
|
:person: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
created_at: 2010-10-29 22:43:51 Z
|
||||||
|
profile: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
image_url:
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 24
|
||||||
|
gender:
|
||||||
|
birthday:
|
||||||
|
last_name: Grimm864aeca
|
||||||
|
bio:
|
||||||
|
first_name: Robert81ad1c8
|
||||||
|
updated_at: 2010-10-29 22:43:51 Z
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 25
|
||||||
|
url: http://google-81b2a1e.com/
|
||||||
|
serialized_public_key: |
|
||||||
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2
|
||||||
|
2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b
|
||||||
|
z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE=
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
|
||||||
|
owner_id: *id009
|
||||||
|
diaspora_handle: bob8678b45@tom.joindiaspora.co
|
||||||
|
- :user: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
encrypted_password: $2a$10$HtD4sIEWTLkRkFBVqQlhseNUnbDnp0lY6SVe3h0r1mIn5iwZ2YeXe
|
||||||
|
serialized_private_key: *id002
|
||||||
|
pending_request_ids: []
|
||||||
|
|
||||||
|
invite_messages: !map:ActiveSupport::HashWithIndifferentAccess {}
|
||||||
|
|
||||||
|
last_sign_in_ip:
|
||||||
|
invites: 5
|
||||||
|
friend_ids: []
|
||||||
|
|
||||||
|
_id: &id010 !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 26
|
||||||
|
last_sign_in_at:
|
||||||
|
username: bob927c7ca
|
||||||
|
language: en
|
||||||
|
sign_in_count: 0
|
||||||
|
visible_person_ids: []
|
||||||
|
|
||||||
|
password_salt: $2a$10$HtD4sIEWTLkRkFBVqQlhse
|
||||||
|
inviter_ids: []
|
||||||
|
|
||||||
|
remember_token:
|
||||||
|
reset_password_token:
|
||||||
|
current_sign_in_ip:
|
||||||
|
remember_created_at:
|
||||||
|
current_sign_in_at:
|
||||||
|
invitation_sent_at:
|
||||||
|
email: bob97eca7c@pivotallabs.com
|
||||||
|
invitation_token:
|
||||||
|
visible_post_ids: []
|
||||||
|
|
||||||
|
getting_started: true
|
||||||
|
:person: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
created_at: 2010-10-29 22:43:51 Z
|
||||||
|
profile: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
image_url:
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 27
|
||||||
|
gender:
|
||||||
|
birthday:
|
||||||
|
last_name: Grimm9a36026
|
||||||
|
bio:
|
||||||
|
first_name: Robert997cd3d
|
||||||
|
updated_at: 2010-10-29 22:43:51 Z
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 28
|
||||||
|
url: http://google-9369b50.com/
|
||||||
|
serialized_public_key: |
|
||||||
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2
|
||||||
|
2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b
|
||||||
|
z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE=
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
|
||||||
|
owner_id: *id010
|
||||||
|
diaspora_handle: bob927c7ca@tom.joindiaspora.co
|
||||||
|
- :user: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
encrypted_password: $2a$10$XYFOUzQfR5O68OwTE2wW7eA4I5ScghKIQsRZWLDC.pKXptmm69MUm
|
||||||
|
serialized_private_key: *id002
|
||||||
|
pending_request_ids: []
|
||||||
|
|
||||||
|
invite_messages: !map:ActiveSupport::HashWithIndifferentAccess {}
|
||||||
|
|
||||||
|
last_sign_in_ip:
|
||||||
|
invites: 5
|
||||||
|
friend_ids: []
|
||||||
|
|
||||||
|
_id: &id011 !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 39
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 29
|
||||||
|
last_sign_in_at:
|
||||||
|
username: bob10b011c4
|
||||||
|
language: en
|
||||||
|
sign_in_count: 0
|
||||||
|
visible_person_ids: []
|
||||||
|
|
||||||
|
password_salt: $2a$10$XYFOUzQfR5O68OwTE2wW7e
|
||||||
|
inviter_ids: []
|
||||||
|
|
||||||
|
remember_token:
|
||||||
|
reset_password_token:
|
||||||
|
current_sign_in_ip:
|
||||||
|
remember_created_at:
|
||||||
|
current_sign_in_at:
|
||||||
|
invitation_sent_at:
|
||||||
|
email: bob1070f7a1@pivotallabs.com
|
||||||
|
invitation_token:
|
||||||
|
visible_post_ids: []
|
||||||
|
|
||||||
|
getting_started: true
|
||||||
|
:person: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
created_at: 2010-10-29 22:43:52 Z
|
||||||
|
profile: !map:ActiveSupport::HashWithIndifferentAccess
|
||||||
|
image_url:
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 40
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 30
|
||||||
|
gender:
|
||||||
|
birthday:
|
||||||
|
last_name: Grimm10e7204d
|
||||||
|
bio:
|
||||||
|
first_name: Robert103bb226
|
||||||
|
updated_at: 2010-10-29 22:43:52 Z
|
||||||
|
_id: !ruby/object:BSON::ObjectId
|
||||||
|
data:
|
||||||
|
- 76
|
||||||
|
- 203
|
||||||
|
- 78
|
||||||
|
- 40
|
||||||
|
- 204
|
||||||
|
- 140
|
||||||
|
- 180
|
||||||
|
- 3
|
||||||
|
- 40
|
||||||
|
- 0
|
||||||
|
- 0
|
||||||
|
- 31
|
||||||
|
url: http://google-10a3985b.com/
|
||||||
|
serialized_public_key: |
|
||||||
|
-----BEGIN RSA PUBLIC KEY-----
|
||||||
|
MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2
|
||||||
|
2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b
|
||||||
|
z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE=
|
||||||
|
-----END RSA PUBLIC KEY-----
|
||||||
|
|
||||||
|
owner_id: *id011
|
||||||
|
diaspora_handle: bob10b011c4@tom.joindiaspora.co
|
||||||
|
|
@ -1,15 +1,4 @@
|
||||||
module HelperMethods
|
module HelperMethods
|
||||||
def stub_sockets
|
|
||||||
Diaspora::WebSocket.stub!(:queue_to_user).and_return(true)
|
|
||||||
Diaspora::WebSocket.stub!(:subscribe).and_return(true)
|
|
||||||
Diaspora::WebSocket.stub!(:unsubscribe).and_return(true)
|
|
||||||
end
|
|
||||||
|
|
||||||
def unstub_sockets
|
|
||||||
Diaspora::WebSocket.unstub!(:queue_to_user)
|
|
||||||
Diaspora::WebSocket.unstub!(:subscribe)
|
|
||||||
Diaspora::WebSocket.unstub!(:unsubscribe)
|
|
||||||
end
|
|
||||||
|
|
||||||
def stub_comment_signature_verification
|
def stub_comment_signature_verification
|
||||||
Comment.any_instance.stubs(:verify_signature).returns(true)
|
Comment.any_instance.stubs(:verify_signature).returns(true)
|
||||||
|
|
@ -88,4 +77,50 @@ module HelperMethods
|
||||||
def evan_hcard
|
def evan_hcard
|
||||||
File.open(File.dirname(__FILE__) + '/fixtures/evan_hcard').read
|
File.open(File.dirname(__FILE__) + '/fixtures/evan_hcard').read
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def make_user
|
||||||
|
UserFixer.fixed_user
|
||||||
|
end
|
||||||
|
|
||||||
|
class UserFixer
|
||||||
|
def self.regenerate_user_fixtures
|
||||||
|
users = {:users => build_user_fixtures}
|
||||||
|
File.open(File.join(Rails.root,"spec/fixtures/users.yaml"),'w') do |file|
|
||||||
|
file.write(users.to_yaml)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.build_user_fixtures
|
||||||
|
arr = []
|
||||||
|
10.times do
|
||||||
|
user = Factory :user
|
||||||
|
person = user.person
|
||||||
|
arr << { :user => user.to_mongo, :person => person.to_mongo}
|
||||||
|
end
|
||||||
|
arr
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.load_user_fixtures
|
||||||
|
yaml_users = YAML.load_file(File.join(Rails.root,"spec/fixtures/users.yaml"))
|
||||||
|
@@user_hashes = []
|
||||||
|
@@user_number = 0
|
||||||
|
yaml_users[:users].each do |yaml_user|
|
||||||
|
user_id = yaml_user[:user]["_id"].to_id
|
||||||
|
@@user_hashes << {:id => user_id, :data => yaml_user}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.fixed_user
|
||||||
|
db = MongoMapper.database
|
||||||
|
people = db.collection("people")
|
||||||
|
users = db.collection("users")
|
||||||
|
user_hash = @@user_hashes[@@user_number]
|
||||||
|
@@user_number += 1
|
||||||
|
@@user_number = 0 if @@user_number >= @@user_hashes.length
|
||||||
|
users.insert(user_hash[:data][:user])
|
||||||
|
people.insert(user_hash[:data][:person])
|
||||||
|
|
||||||
|
User.find(user_hash[:id])
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe ApplicationHelper do
|
describe ApplicationHelper do
|
||||||
before do
|
before do
|
||||||
@user = Factory.create(:user)
|
@user = make_user
|
||||||
@person = Factory.create(:person)
|
@person = Factory.create(:person)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe PublicsHelper do
|
describe PublicsHelper do
|
||||||
before do
|
before do
|
||||||
@user = Factory.create(:user)
|
@user = make_user
|
||||||
@person = Factory.create(:person)
|
@person = Factory.create(:person)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ require File.join(Rails.root, 'lib/diaspora/exporter')
|
||||||
|
|
||||||
describe Diaspora::Exporter do
|
describe Diaspora::Exporter do
|
||||||
|
|
||||||
let!(:user1) { Factory(:user) }
|
let!(:user1) { make_user }
|
||||||
let!(:user2) { Factory(:user) }
|
let!(:user2) { make_user }
|
||||||
let!(:user3) { Factory(:user) }
|
let!(:user3) { make_user }
|
||||||
|
|
||||||
let!(:aspect) { user1.aspect(:name => "Old Work") }
|
let!(:aspect) { user1.aspect(:name => "Old Work") }
|
||||||
let(:aspect1) { user1.aspect(:name => "Work") }
|
let(:aspect1) { user1.aspect(:name => "Work") }
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,11 @@ describe Diaspora::Importer do
|
||||||
|
|
||||||
before(:each) do
|
before(:each) do
|
||||||
# Five users on pod
|
# Five users on pod
|
||||||
@user1 = Factory(:user)
|
@user1 = make_user
|
||||||
@user2 = Factory(:user)
|
@user2 = make_user
|
||||||
@user3 = Factory(:user)
|
@user3 = make_user
|
||||||
@user4 = Factory(:user)
|
@user4 = make_user
|
||||||
@user5 = Factory(:user)
|
@user5 = make_user
|
||||||
|
|
||||||
# Two external people referenced on pod
|
# Two external people referenced on pod
|
||||||
@person1 = Factory(:person)
|
@person1 = Factory(:person)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ require File.join(Rails.root, 'lib/diaspora/ostatus_builder')
|
||||||
|
|
||||||
describe Diaspora::OstatusBuilder do
|
describe Diaspora::OstatusBuilder do
|
||||||
|
|
||||||
let!(:user) { Factory(:user) }
|
let!(:user) { make_user }
|
||||||
let(:aspect) { user.aspect(:name => "Public People") }
|
let(:aspect) { user.aspect(:name => "Public People") }
|
||||||
let!(:status_message1) { user.post(:status_message, :message => "One", :public => true, :to => aspect.id) }
|
let!(:status_message1) { user.post(:status_message, :message => "One", :public => true, :to => aspect.id) }
|
||||||
let!(:status_message2) { user.post(:status_message, :message => "Two", :public => true, :to => aspect.id) }
|
let!(:status_message2) { user.post(:status_message, :message => "Two", :public => true, :to => aspect.id) }
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe Diaspora::Parser do
|
describe Diaspora::Parser do
|
||||||
let(:user) { Factory.create(:user) }
|
let(:user) { make_user }
|
||||||
let(:aspect) { user.aspect(:name => 'spies') }
|
let(:aspect) { user.aspect(:name => 'spies') }
|
||||||
let(:user2) { Factory.create(:user) }
|
let(:user2) { make_user }
|
||||||
let(:aspect2) { user2.aspect(:name => "pandas") }
|
let(:aspect2) { user2.aspect(:name => "pandas") }
|
||||||
let(:user3) { Factory.create :user }
|
let(:user3) { make_user }
|
||||||
let(:person) { user3.person }
|
let(:person) { user3.person }
|
||||||
|
|
||||||
describe "parsing compliant XML object" do
|
describe "parsing compliant XML object" do
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ require 'spec_helper'
|
||||||
require File.join(Rails.root, 'lib/em-webfinger')
|
require File.join(Rails.root, 'lib/em-webfinger')
|
||||||
|
|
||||||
describe EMWebfinger do
|
describe EMWebfinger do
|
||||||
let(:user1) { Factory(:user) }
|
let(:user1) { make_user }
|
||||||
let(:user2) { Factory(:user) }
|
let(:user2) { make_user }
|
||||||
|
|
||||||
let(:account) {"foo@tom.joindiaspora.com"}
|
let(:account) {"foo@tom.joindiaspora.com"}
|
||||||
let(:person){ Factory(:person, :diaspora_handle => account)}
|
let(:person){ Factory(:person, :diaspora_handle => account)}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe 'user encryption' do
|
describe 'user encryption' do
|
||||||
before do
|
before do
|
||||||
@user = Factory.create(:user)
|
@user = make_user
|
||||||
@aspect = @user.aspect(:name => 'dudes')
|
@aspect = @user.aspect(:name => 'dudes')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe MessageHandler do
|
describe MessageHandler do
|
||||||
|
|
||||||
let(:handler) {MessageHandler.new()}
|
let(:handler) {MessageHandler.new()}
|
||||||
let(:message_body) {"I want to pump you up"}
|
let(:message_body) {"I want to pump you up"}
|
||||||
let(:message_urls) {["http://www.google.com/", "http://yahoo.com/", "http://foo.com/"]}
|
let(:message_urls) {["http://www.google.com/", "http://yahoo.com/", "http://foo.com/"]}
|
||||||
|
|
@ -159,4 +160,3 @@ describe MessageHandler do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe Salmon do
|
describe Salmon do
|
||||||
let(:user){Factory.create :user}
|
let(:user){make_user}
|
||||||
let(:user2) {Factory.create :user}
|
let(:user2) {make_user}
|
||||||
let(:user3) {Factory.create :user}
|
let(:user3) {make_user}
|
||||||
let(:post){ user.post :status_message, :message => "hi", :to => user.aspect(:name => "sdg").id }
|
let(:post){ user.post :status_message, :message => "hi", :to => user.aspect(:name => "sdg").id }
|
||||||
|
|
||||||
let!(:created_salmon) {Salmon::SalmonSlap.create(user, post.to_diaspora_xml)}
|
let!(:created_salmon) {Salmon::SalmonSlap.create(user, post.to_diaspora_xml)}
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ require File.join(Rails.root, 'lib/diaspora/importer')
|
||||||
|
|
||||||
describe Diaspora::Importer do
|
describe Diaspora::Importer do
|
||||||
|
|
||||||
let!(:user1) { Factory(:user) }
|
let!(:user1) { make_user }
|
||||||
let!(:user2) { Factory(:user) }
|
let!(:user2) { make_user }
|
||||||
let!(:user3) { Factory(:user) }
|
let!(:user3) { make_user }
|
||||||
|
|
||||||
let(:aspect1) { user1.aspect(:name => "Work") }
|
let(:aspect1) { user1.aspect(:name => "Work") }
|
||||||
let(:aspect2) { user2.aspect(:name => "Family") }
|
let(:aspect2) { user2.aspect(:name => "Family") }
|
||||||
|
|
@ -24,7 +24,7 @@ describe Diaspora::Importer do
|
||||||
context 'serialized user' do
|
context 'serialized user' do
|
||||||
describe '#verify_user' do
|
describe '#verify_user' do
|
||||||
it 'should return true for a new valid user' do
|
it 'should return true for a new valid user' do
|
||||||
new_user = Factory(:user)
|
new_user = make_user
|
||||||
new_user.delete
|
new_user.delete
|
||||||
importer.verify_user(new_user).should be true
|
importer.verify_user(new_user).should be true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,9 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe Diaspora::WebSocket do
|
describe Diaspora::WebSocket do
|
||||||
before do
|
before do
|
||||||
@user = Factory.create(:user)
|
@user = make_user
|
||||||
@aspect = @user.aspect(:name => "losers")
|
@aspect = @user.aspect(:name => "losers")
|
||||||
@post = @user.build_post(:status_message, :message => "hey", :to => @aspect.id)
|
@post = @user.build_post(:status_message, :message => "hey", :to => @aspect.id)
|
||||||
unstub_sockets
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should queue a job' do
|
it 'should queue a job' do
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe Notifier do
|
describe Notifier do
|
||||||
|
|
||||||
let!(:user) {Factory.create :user}
|
let!(:user) {make_user}
|
||||||
let!(:aspect) {user.aspect(:name => "science")}
|
let!(:aspect) {user.aspect(:name => "science")}
|
||||||
let!(:person) {Factory.create :person}
|
let!(:person) {Factory.create :person}
|
||||||
let!(:request_mail) {Notifier.new_request(user, person)}
|
let!(:request_mail) {Notifier.new_request(user, person)}
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,36 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe 'making sure the spec runner works' do
|
describe 'making sure the spec runner works' do
|
||||||
it 'should factory create a user with a person saved' do
|
it 'should factory create a user with a person saved' do
|
||||||
user = Factory.create(:user)
|
user = make_user
|
||||||
loaded_user = User.first(:id => user.id)
|
loaded_user = User.first(:id => user.id)
|
||||||
loaded_user.person.owner_id.should == user.id
|
loaded_user.person.owner_id.should == user.id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'fixtures' do
|
||||||
|
it 'does not save the fixtures without prompting' do
|
||||||
|
User.count.should == 0
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'returns a user on fixed_user' do
|
||||||
|
new_user = make_user
|
||||||
|
new_user.is_a?(User).should be_true
|
||||||
|
User.count.should == 1
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'returns a different user on the second fixed_user' do
|
||||||
|
new_user = make_user
|
||||||
|
second_user = make_user
|
||||||
|
|
||||||
|
User.count.should == 2
|
||||||
|
new_user.id.should_not == second_user.id
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
describe 'factories' do
|
describe 'factories' do
|
||||||
describe 'build' do
|
describe 'build' do
|
||||||
it 'does not save a built user' do
|
it 'does not save a built user' do
|
||||||
pending "This problem is bizarre and needs fixing"
|
pending 'Why does this happen?'
|
||||||
Factory.build(:user).persisted?.should be_false
|
Factory.build(:user).persisted?.should be_false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -22,9 +43,9 @@ describe 'making sure the spec runner works' do
|
||||||
|
|
||||||
describe '#friend_users' do
|
describe '#friend_users' do
|
||||||
before do
|
before do
|
||||||
@user1 = Factory.create(:user)
|
@user1 = make_user
|
||||||
@aspect1 = @user1.aspect(:name => "losers")
|
@aspect1 = @user1.aspect(:name => "losers")
|
||||||
@user2 = Factory.create(:user)
|
@user2 = make_user
|
||||||
@aspect2 = @user2.aspect(:name => "bruisers")
|
@aspect2 = @user2.aspect(:name => "bruisers")
|
||||||
friend_users(@user1, @aspect1, @user2, @aspect2)
|
friend_users(@user1, @aspect1, @user2, @aspect2)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe Album do
|
describe Album do
|
||||||
let(:user) { Factory.create(:user) }
|
let(:user) { make_user }
|
||||||
let(:person) { user.person }
|
let(:person) { user.person }
|
||||||
let(:aspect) { user.aspect(:name => "Foo") }
|
let(:aspect) { user.aspect(:name => "Foo") }
|
||||||
let(:album) { user.post(:album, :name => "test collection", :to => aspect.id) }
|
let(:album) { user.post(:album, :name => "test collection", :to => aspect.id) }
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,16 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe Aspect do
|
describe Aspect do
|
||||||
let(:user ) { Factory.create(:user) }
|
let(:user ) { make_user }
|
||||||
let(:friend) { Factory.create(:person) }
|
let(:friend) { Factory.create(:person) }
|
||||||
let(:user2) { Factory.create(:user) }
|
let(:user2) { make_user }
|
||||||
let(:friend_2) { Factory.create(:person) }
|
let(:friend_2) { Factory.create(:person) }
|
||||||
|
|
||||||
let(:aspect) {user.aspect(:name => 'losers')}
|
let(:aspect) {user.aspect(:name => 'losers')}
|
||||||
let(:aspect2) {user2.aspect(:name => 'failures')}
|
let(:aspect2) {user2.aspect(:name => 'failures')}
|
||||||
let(:aspect1) {user.aspect(:name => 'cats')}
|
let(:aspect1) {user.aspect(:name => 'cats')}
|
||||||
let(:not_friend) { Factory(:person, :diaspora_handle => "not@person.com")}
|
let(:not_friend) { Factory(:person, :diaspora_handle => "not@person.com")}
|
||||||
let(:user3) {Factory(:user)}
|
let(:user3) {make_user}
|
||||||
let(:aspect3) {user3.aspect(:name => "lala")}
|
let(:aspect3) {user3.aspect(:name => "lala")}
|
||||||
|
|
||||||
describe 'creation' do
|
describe 'creation' do
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe Comment do
|
describe Comment do
|
||||||
let(:user) {Factory.create :user}
|
let(:user) {make_user}
|
||||||
let(:aspect) {user.aspect(:name => "Doofuses")}
|
let(:aspect) {user.aspect(:name => "Doofuses")}
|
||||||
|
|
||||||
let(:user2) {Factory.create(:user)}
|
let(:user2) {make_user}
|
||||||
let(:aspect2) {user2.aspect(:name => "Lame-faces")}
|
let(:aspect2) {user2.aspect(:name => "Lame-faces")}
|
||||||
|
|
||||||
it 'validates that the handle belongs to the person' do
|
it 'validates that the handle belongs to the person' do
|
||||||
|
|
@ -114,7 +114,7 @@ describe Comment do
|
||||||
end
|
end
|
||||||
describe 'serialization' do
|
describe 'serialization' do
|
||||||
it 'should serialize the handle and not the sender' do
|
it 'should serialize the handle and not the sender' do
|
||||||
commenter = Factory.create(:user)
|
commenter = make_user
|
||||||
commenter_aspect = commenter.aspect :name => "bruisers"
|
commenter_aspect = commenter.aspect :name => "bruisers"
|
||||||
friend_users(user, aspect, commenter, commenter_aspect)
|
friend_users(user, aspect, commenter, commenter_aspect)
|
||||||
post = user.post :status_message, :message => "hello", :to => aspect.id
|
post = user.post :status_message, :message => "hello", :to => aspect.id
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe Person do
|
describe Person do
|
||||||
before do
|
before do
|
||||||
@user = Factory.create(:user)
|
@user = make_user
|
||||||
@user2 = Factory.create(:user)
|
@user2 = make_user
|
||||||
@person = Factory.create(:person)
|
@person = Factory.create(:person)
|
||||||
@aspect = @user.aspect(:name => "Dudes")
|
@aspect = @user.aspect(:name => "Dudes")
|
||||||
@aspect2 = @user2.aspect(:name => "Abscence of Babes")
|
@aspect2 = @user2.aspect(:name => "Abscence of Babes")
|
||||||
|
|
@ -24,7 +24,8 @@ describe Person do
|
||||||
describe '#diaspora_handle' do
|
describe '#diaspora_handle' do
|
||||||
context 'local people' do
|
context 'local people' do
|
||||||
it 'uses the pod config url to set the diaspora_handle' do
|
it 'uses the pod config url to set the diaspora_handle' do
|
||||||
@user.person.diaspora_handle.should == @user.username + "@" + APP_CONFIG[:terse_pod_url]
|
new_user = Factory.create(:user)
|
||||||
|
new_user.person.diaspora_handle.should == new_user.username + "@" + APP_CONFIG[:terse_pod_url]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -47,7 +48,7 @@ describe Person do
|
||||||
end
|
end
|
||||||
|
|
||||||
context '#real_name' do
|
context '#real_name' do
|
||||||
let!(:user) { Factory(:user) }
|
let!(:user) { make_user }
|
||||||
let!(:person) { user.person }
|
let!(:person) { user.person }
|
||||||
let!(:profile) { person.profile }
|
let!(:profile) { person.profile }
|
||||||
|
|
||||||
|
|
@ -176,7 +177,7 @@ describe Person do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'people finders for webfinger' do
|
context 'people finders for webfinger' do
|
||||||
let(:user) {Factory(:user)}
|
let(:user) {make_user}
|
||||||
let(:person) {Factory(:person)}
|
let(:person) {Factory(:person)}
|
||||||
|
|
||||||
describe '.by_account_identifier' do
|
describe '.by_account_identifier' do
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe Photo do
|
describe Photo do
|
||||||
before do
|
before do
|
||||||
@user = Factory.create(:user)
|
@user = make_user
|
||||||
@aspect = @user.aspect(:name => "losers")
|
@aspect = @user.aspect(:name => "losers")
|
||||||
@album = @user.post :album, :name => "foo", :to => @aspect.id
|
@album = @user.post :album, :name => "foo", :to => @aspect.id
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe Post do
|
describe Post do
|
||||||
before do
|
before do
|
||||||
@user = Factory.create(:user)
|
@user = make_user
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'xml' do
|
describe 'xml' do
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe Request do
|
describe Request do
|
||||||
let(:user) { Factory(:user) }
|
let(:user) { make_user }
|
||||||
let(:user2) { Factory :user}
|
let(:user2) { make_user}
|
||||||
let(:person) {Factory :person}
|
let(:person) {Factory :person}
|
||||||
let(:aspect) { user.aspect(:name => "dudes") }
|
let(:aspect) { user.aspect(:name => "dudes") }
|
||||||
let(:request){ user.send_friend_request_to user2.person, aspect }
|
let(:request){ user.send_friend_request_to user2.person, aspect }
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe Retraction do
|
describe Retraction do
|
||||||
|
|
||||||
let(:user) { Factory(:user) }
|
let(:user) { make_user }
|
||||||
let(:person) { Factory(:person) }
|
let(:person) { Factory(:person) }
|
||||||
let(:aspect) { user.aspect(:name => "Bruisers") }
|
let(:aspect) { user.aspect(:name => "Bruisers") }
|
||||||
let!(:activation) { user.activate_friend(person, aspect) }
|
let!(:activation) { user.activate_friend(person, aspect) }
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe StatusMessage do
|
describe StatusMessage do
|
||||||
before do
|
before do
|
||||||
@user = Factory.create(:user)
|
@user = make_user
|
||||||
@aspect = @user.aspect(:name => "losers")
|
@aspect = @user.aspect(:name => "losers")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,15 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe "attack vectors" do
|
describe "attack vectors" do
|
||||||
|
|
||||||
let(:user) { Factory(:user) }
|
let(:user) { make_user }
|
||||||
let(:aspect) { user.aspect(:name => 'heroes') }
|
let(:aspect) { user.aspect(:name => 'heroes') }
|
||||||
|
|
||||||
let(:bad_user) { Factory(:user)}
|
let(:bad_user) { make_user}
|
||||||
|
|
||||||
let(:user2) { Factory(:user) }
|
let(:user2) { make_user }
|
||||||
let(:aspect2) { user2.aspect(:name => 'losers') }
|
let(:aspect2) { user2.aspect(:name => 'losers') }
|
||||||
|
|
||||||
let(:user3) { Factory(:user) }
|
let(:user3) { make_user }
|
||||||
let(:aspect3) { user3.aspect(:name => 'heroes') }
|
let(:aspect3) { user3.aspect(:name => 'heroes') }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe User do
|
describe User do
|
||||||
let(:inviter) {Factory.create :user}
|
let(:inviter) {make_user}
|
||||||
let(:aspect) {inviter.aspect(:name => "awesome")}
|
let(:aspect) {inviter.aspect(:name => "awesome")}
|
||||||
let(:another_user) {Factory.create :user}
|
let(:another_user) {make_user}
|
||||||
let(:wrong_aspect) {another_user.aspect(:name => "super")}
|
let(:wrong_aspect) {another_user.aspect(:name => "super")}
|
||||||
let(:inviter_with_3_invites) {Factory.create :user, :invites => 3}
|
let(:inviter_with_3_invites) {Factory.create :user, :invites => 3}
|
||||||
let(:aspect2) {inviter_with_3_invites.aspect(:name => "Jersey Girls")}
|
let(:aspect2) {inviter_with_3_invites.aspect(:name => "Jersey Girls")}
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe User do
|
describe User do
|
||||||
|
|
||||||
let!(:user) { Factory(:user) }
|
let!(:user) { make_user }
|
||||||
let!(:user2) { Factory(:user) }
|
let!(:user2) { make_user }
|
||||||
|
|
||||||
let!(:aspect) { user.aspect(:name => 'heroes') }
|
let!(:aspect) { user.aspect(:name => 'heroes') }
|
||||||
let!(:aspect1) { user.aspect(:name => 'other') }
|
let!(:aspect1) { user.aspect(:name => 'other') }
|
||||||
|
|
@ -80,9 +80,9 @@ describe User do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'dispatching' do
|
context 'dispatching' do
|
||||||
let!(:user3) { Factory(:user) }
|
let!(:user3) { make_user }
|
||||||
let!(:aspect3) { user3.aspect(:name => 'heroes') }
|
let!(:aspect3) { user3.aspect(:name => 'heroes') }
|
||||||
let!(:user4) { Factory(:user) }
|
let!(:user4) { make_user }
|
||||||
let!(:aspect4) { user4.aspect(:name => 'heroes') }
|
let!(:aspect4) { user4.aspect(:name => 'heroes') }
|
||||||
|
|
||||||
let!(:post) { user.build_post :status_message, :message => "hey" }
|
let!(:post) { user.build_post :status_message, :message => "hey" }
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ describe User do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with two users' do
|
context 'with two users' do
|
||||||
let!(:user) {Factory :user}
|
let!(:user) {make_user}
|
||||||
let!(:first_aspect) {user.aspect(:name => 'bruisers')}
|
let!(:first_aspect) {user.aspect(:name => 'bruisers')}
|
||||||
let!(:second_aspect) {user.aspect(:name => 'losers')}
|
let!(:second_aspect) {user.aspect(:name => 'losers')}
|
||||||
|
|
||||||
|
|
@ -58,7 +58,7 @@ describe User do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with two users' do
|
context 'with two users' do
|
||||||
let!(:user) {Factory :user}
|
let!(:user) {make_user}
|
||||||
let!(:first_aspect) {user.aspect(:name => 'bruisers')}
|
let!(:first_aspect) {user.aspect(:name => 'bruisers')}
|
||||||
let!(:second_aspect) {user.aspect(:name => 'losers')}
|
let!(:second_aspect) {user.aspect(:name => 'losers')}
|
||||||
let!(:user4) { Factory.create(:user_with_aspect)}
|
let!(:user4) { Factory.create(:user_with_aspect)}
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,13 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe User do
|
describe User do
|
||||||
|
|
||||||
let(:user) { Factory(:user) }
|
let(:user) { make_user }
|
||||||
let(:aspect) { user.aspect(:name => 'heroes') }
|
let(:aspect) { user.aspect(:name => 'heroes') }
|
||||||
|
|
||||||
let(:user2) { Factory(:user) }
|
let(:user2) { make_user }
|
||||||
let(:aspect2) { user2.aspect(:name => 'losers') }
|
let(:aspect2) { user2.aspect(:name => 'losers') }
|
||||||
|
|
||||||
let(:user3) { Factory(:user) }
|
let(:user3) { make_user }
|
||||||
let(:aspect3) { user3.aspect(:name => 'heroes') }
|
let(:aspect3) { user3.aspect(:name => 'heroes') }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe Diaspora::UserModules::Friending do
|
describe Diaspora::UserModules::Friending do
|
||||||
let(:user) { Factory.create :user }
|
let(:user) { make_user }
|
||||||
let(:aspect) { user.aspect(:name => 'heroes') }
|
let(:aspect) { user.aspect(:name => 'heroes') }
|
||||||
let(:aspect1) { user.aspect(:name => 'other') }
|
let(:aspect1) { user.aspect(:name => 'other') }
|
||||||
let(:friend) { Factory.create(:person) }
|
let(:friend) { Factory.create(:person) }
|
||||||
|
|
@ -15,7 +15,7 @@ describe Diaspora::UserModules::Friending do
|
||||||
let(:person_two) { Factory.create :person }
|
let(:person_two) { Factory.create :person }
|
||||||
let(:person_three) { Factory.create :person }
|
let(:person_three) { Factory.create :person }
|
||||||
|
|
||||||
let(:user2) { Factory.create :user }
|
let(:user2) { make_user }
|
||||||
let(:aspect2) { user2.aspect(:name => "aspect two") }
|
let(:aspect2) { user2.aspect(:name => "aspect two") }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe User do
|
describe User do
|
||||||
let(:user) { Factory(:user) }
|
let(:user) { make_user }
|
||||||
let(:aspect) { user.aspect(:name => 'heroes') }
|
let(:aspect) { user.aspect(:name => 'heroes') }
|
||||||
let(:user2) { Factory(:user) }
|
let(:user2) { make_user }
|
||||||
let(:aspect2) { user2.aspect(:name => 'stuff') }
|
let(:aspect2) { user2.aspect(:name => 'stuff') }
|
||||||
|
|
||||||
it 'should have a key' do
|
it 'should have a key' do
|
||||||
|
|
@ -188,12 +188,6 @@ describe User do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#diaspora_handle' do
|
|
||||||
it 'uses the pod config url to set the diaspora_handle' do
|
|
||||||
user.diaspora_handle.should == user.username + "@" + APP_CONFIG[:terse_pod_url]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'profiles' do
|
context 'profiles' do
|
||||||
it 'should be able to update their profile and send it to their friends' do
|
it 'should be able to update their profile and send it to their friends' do
|
||||||
updated_profile = {
|
updated_profile = {
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,11 @@ RSpec.configure do |config|
|
||||||
DatabaseCleaner.orm = "mongo_mapper"
|
DatabaseCleaner.orm = "mongo_mapper"
|
||||||
|
|
||||||
config.before(:each) do
|
config.before(:each) do
|
||||||
stub_sockets
|
|
||||||
EventMachine::HttpRequest.stub!(:new).and_return(FakeHttpRequest.new(:success))
|
EventMachine::HttpRequest.stub!(:new).and_return(FakeHttpRequest.new(:success))
|
||||||
EventMachine::HttpRequest.any_instance.stubs(:post)
|
EventMachine::HttpRequest.any_instance.stubs(:post)
|
||||||
EventMachine::HttpRequest.any_instance.stubs(:get)
|
EventMachine::HttpRequest.any_instance.stubs(:get)
|
||||||
DatabaseCleaner.clean
|
DatabaseCleaner.clean
|
||||||
|
UserFixer.load_user_fixtures
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue