From 8ec49e685b7ba3d73c39a8edf1d91345e3095161 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Fri, 29 Oct 2010 15:43:44 -0700 Subject: [PATCH 1/6] going to a non-friend's page contains a way to add them. --- app/controllers/people_controller.rb | 19 ++++++++--- app/views/people/show.html.haml | 48 +++++++++++++++++++++------- config/locales/diaspora/en.yml | 1 + 3 files changed, 52 insertions(+), 16 deletions(-) diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index e8af2f337..89ed4bc9a 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -16,15 +16,24 @@ class PeopleController < ApplicationController def show @aspect = :profile - @person = current_user.visible_person_by_id(params[:id]) - unless @person - render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404 - else + + @person = Person.find(params[:id].to_id) + + if @person @profile = @person.profile @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' respond_with @person + else + flash[:error] = "Person does not exist!" + redirect_to people_path end end diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index 4ec8789f3..022955032 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -27,7 +27,7 @@ - for aspect in @aspects_with_person %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" - if @person == current_user.person @@ -36,17 +36,43 @@ %br %br - %ul - %li= link_to 'stream', person_path(@person) - %li= link_to 'photos', person_photos_path(@person) + - if @person != current_user.person && @contact + %ul + %li= link_to 'stream', person_path(@person) + %li= link_to 'photos', person_photos_path(@person) .span-15.last - - if @posts.count > 0 - %ul#stream - - for post in @posts - = render type_partial(post), :post => post unless post.class == Album - = will_paginate @posts - - else - %h3= t('.no_posts') + + - if @contact || current_user.person == @person + + - if @posts.count > 0 + %ul#stream + - for post in @posts + = render type_partial(post), :post => post unless post.class == Album + = will_paginate @posts + - else + %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}." diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 7071d13d4..2702ff074 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -216,6 +216,7 @@ en: are_you_sure: "Are you sure?" remove_friend: "remove friend" no_posts: "no posts to display!" + add_friend: "add friend" edit: cancel: "Cancel" update_profile: "Update Profile" From 3d2dd073ea912d1f5c39d79f4859be2ef9bf21a5 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 29 Oct 2010 15:52:54 -0700 Subject: [PATCH 2/6] Take diaspora_handle out of user --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 0e16880f1..27dab1e54 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -435,7 +435,7 @@ class User end def diaspora_handle - "#{self.username}@#{APP_CONFIG[:terse_pod_url]}" + person.diaspora_handle end def as_json(opts={}) From 0c434ff66acd1f1351901e2b631ad1492749379d Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 29 Oct 2010 14:29:02 -0700 Subject: [PATCH 3/6] rake task to generate user fixtures, helper method which saves them --- spec/factories.rb | 16 ++++++++++------ spec/helper_methods.rb | 30 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/spec/factories.rb b/spec/factories.rb index 32d747937..948f8dc93 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -7,15 +7,19 @@ # 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 +def r_str + ActiveSupport::SecureRandom.hex(3) +end + Factory.define :profile do |p| - p.sequence(:first_name){|n| "Robert#{n}"} - p.sequence(:last_name){|n| "Grimm#{n}"} + p.sequence(:first_name){|n| "Robert#{n}#{r_str}"} + p.sequence(:last_name){|n| "Grimm#{n}#{r_str}"} end Factory.define :person do |p| - p.sequence(:diaspora_handle) {|n| "bob-person-#{n}@aol.com"} - p.sequence(:url) {|n| "http://google-#{n}.com/"} + p.sequence(:diaspora_handle) {|n| "bob-person-#{n}#{r_str}@aol.com"} + p.sequence(:url) {|n| "http://google-#{n}#{r_str}.com/"} p.profile Factory.create(:profile, :first_name => "eugene", :last_name => "weinstien") p.serialized_public_key OpenSSL::PKey::RSA.generate(1024).public_key.export @@ -27,8 +31,8 @@ Factory.define :album do |p| end Factory.define :user do |u| - u.sequence(:username) {|n| "bob#{n}"} - u.sequence(:email) {|n| "bob#{n}@pivotallabs.com"} + u.sequence(:username) {|n| "bob#{n}#{r_str}"} + u.sequence(:email) {|n| "bob#{n}#{r_str}@pivotallabs.com"} u.password "bluepin7" u.password_confirmation "bluepin7" u.serialized_private_key OpenSSL::PKey::RSA.generate(1024).export diff --git a/spec/helper_methods.rb b/spec/helper_methods.rb index cc8689924..116f54bb4 100644 --- a/spec/helper_methods.rb +++ b/spec/helper_methods.rb @@ -82,4 +82,34 @@ module HelperMethods def evan_hcard File.open(File.dirname(__FILE__) + '/fixtures/evan_hcard').read end + + def 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 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 save_user_fixtures + yaml_users = YAML.load_file(File.join(Rails.root,"spec/fixtures/users.yaml")) + db = MongoMapper.database + people = db.collection("people") + users = db.collection("users") + yaml_users[:users].each do |yaml_user| + user = yaml_user[:user] + person = yaml_user[:person] + users.insert(user) + people.insert(person) + end + end end From 5b78a31d29c4c5575891dc18b2485bb1ec8660e9 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 29 Oct 2010 15:15:56 -0700 Subject: [PATCH 4/6] make_user now makes a user from fixtures --- lib/tasks/fixtures.rake | 12 + spec/fixtures/users.yaml | 948 +++++++++++++++++++++++++++++++++++++++ spec/helper_methods.rb | 62 ++- spec/misc_spec.rb | 27 +- spec/spec_helper.rb | 1 + 5 files changed, 1024 insertions(+), 26 deletions(-) create mode 100644 lib/tasks/fixtures.rake create mode 100644 spec/fixtures/users.yaml diff --git a/lib/tasks/fixtures.rake b/lib/tasks/fixtures.rake new file mode 100644 index 000000000..e10882cf5 --- /dev/null +++ b/lib/tasks/fixtures.rake @@ -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 diff --git a/spec/fixtures/users.yaml b/spec/fixtures/users.yaml new file mode 100644 index 000000000..535fd8c52 --- /dev/null +++ b/spec/fixtures/users.yaml @@ -0,0 +1,948 @@ +--- +:users: +- :user: !map:ActiveSupport::HashWithIndifferentAccess + encrypted_password: $2a$10$iMNkTJNE1.apaW4/LBcn/ObvDyfksByDU4Rz/H7iNdnY5E/HcwNG. + serialized_private_key: &id002 | + -----BEGIN RSA PRIVATE KEY----- + MIICXAIBAAKBgQDDlBILfgBL1ztMVy6NtCkNYGuTBPGbRM1SU34/4khR3aJ9vJid + 9JA3QNQEpJmYioE7R0y1UJWAVC5Gz8X+e6StAnGfxR/FNFeeEOwL4nL8PkLRKBXq + 2hOCJ3anlzbw91ZfclS5A4mznae3F+kMN0hPExv3rmxJBGywwP+zQSfd0wIDAQAB + AoGALsKXMeI1Rey2w8DQY5bgfc9AyQzUiy/++yD1PWbnrZMVB4Tw5EsVs/AvANEt + 2/e5gCfC4lLa+6ykx89jYj3DmCLPMvzuysby661zbMLjR5oudWkVc+53QufQ5fOb + 5uIAi7G7IXmdXgLXV6r8tRUbCRpTTwcpmuiASKu6IjjzBbECQQDf2oOCKfwRaUuQ + z8een5r/J/ptEUnHALK6XdWMu8FZaw+PRxOQAH/o2xWSECs8+SRn9D0IoaiSXcdb + AIy0dv/LAkEA36oVBYyXEJJtWqEfrdeep0qNacFRANp8tKTsLGa5CYwATM/edW8I + 3Vguh9nCiwuryCX90l4XoSQl9pMkFMhJGQJAOX/le8/RAZ/sWxwkCGiy5YudVdq0 + +rsBLcHgkq+/sHpBmuoE6l5WfLeZyNUCZj0Qzur7qnXr2Pzhskxn2AshFQJAfbM4 + 3UWGIOoqSyUCiNEFeT+M+kKLI8+nBl8p3Epe896azJCGlbkxYjSM8gyQKVUF1haD + 8BaxcP6/1zQasxNdAQJBAJPtFO9JtPjZQjn6SBcis9BJhyXXoqS4IJjuWFRGPxZ1 + i/Qfzbqqmq8VuH+V+ImlYauTWKYVkDOOxde/oiKSALs= + -----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 + - 58 + - 23 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 2 + last_sign_in_at: + username: bob13f8c74 + language: en + sign_in_count: 0 + visible_person_ids: [] + + password_salt: $2a$10$iMNkTJNE1.apaW4/LBcn/O + inviter_ids: [] + + remember_token: + reset_password_token: + current_sign_in_ip: + remember_created_at: + current_sign_in_at: + invitation_sent_at: + email: bob1777562@pivotallabs.com + invitation_token: + visible_post_ids: [] + + getting_started: true + :person: !map:ActiveSupport::HashWithIndifferentAccess + created_at: 2010-10-29 21:18:16 Z + profile: !map:ActiveSupport::HashWithIndifferentAccess + image_url: + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 3 + gender: + birthday: + last_name: Grimm11ffa33 + bio: + first_name: Robert111667a + updated_at: 2010-10-29 21:18:16 Z + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 4 + url: http://google-16e5a04.com/ + serialized_public_key: | + -----BEGIN RSA PUBLIC KEY----- + MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA + 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In + dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + -----END RSA PUBLIC KEY----- + + owner_id: *id001 + diaspora_handle: bob13f8c74@tom.joindiaspora.co +- :user: !map:ActiveSupport::HashWithIndifferentAccess + encrypted_password: $2a$10$wqon2hNz9zzRbUyt8Se9duE3nn/9Ze541lP9aDKlYCzICA.tEmrWG + 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 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 5 + last_sign_in_at: + username: bob2afae38 + language: en + sign_in_count: 0 + visible_person_ids: [] + + password_salt: $2a$10$wqon2hNz9zzRbUyt8Se9du + inviter_ids: [] + + remember_token: + reset_password_token: + current_sign_in_ip: + remember_created_at: + current_sign_in_at: + invitation_sent_at: + email: bob2cb8179@pivotallabs.com + invitation_token: + visible_post_ids: [] + + getting_started: true + :person: !map:ActiveSupport::HashWithIndifferentAccess + created_at: 2010-10-29 21:18:16 Z + profile: !map:ActiveSupport::HashWithIndifferentAccess + image_url: + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 6 + gender: + birthday: + last_name: Grimm20278b6 + bio: + first_name: Robert28c1f8b + updated_at: 2010-10-29 21:18:16 Z + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 7 + url: http://google-2997035.com/ + serialized_public_key: | + -----BEGIN RSA PUBLIC KEY----- + MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA + 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In + dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + -----END RSA PUBLIC KEY----- + + owner_id: *id003 + diaspora_handle: bob2afae38@tom.joindiaspora.co +- :user: !map:ActiveSupport::HashWithIndifferentAccess + encrypted_password: $2a$10$2sCq2se3hLo3ShENDsExD.gMJoPMK6vZGmPcQQartvleuM1N5fNm. + 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 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 8 + last_sign_in_at: + username: bob31ce4ec + language: en + sign_in_count: 0 + visible_person_ids: [] + + password_salt: $2a$10$2sCq2se3hLo3ShENDsExD. + inviter_ids: [] + + remember_token: + reset_password_token: + current_sign_in_ip: + remember_created_at: + current_sign_in_at: + invitation_sent_at: + email: bob31a91aa@pivotallabs.com + invitation_token: + visible_post_ids: [] + + getting_started: true + :person: !map:ActiveSupport::HashWithIndifferentAccess + created_at: 2010-10-29 21:18:16 Z + profile: !map:ActiveSupport::HashWithIndifferentAccess + image_url: + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 9 + gender: + birthday: + last_name: Grimm3956abb + bio: + first_name: Robert3ca9e63 + updated_at: 2010-10-29 21:18:16 Z + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 10 + url: http://google-3d0cf70.com/ + serialized_public_key: | + -----BEGIN RSA PUBLIC KEY----- + MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA + 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In + dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + -----END RSA PUBLIC KEY----- + + owner_id: *id004 + diaspora_handle: bob31ce4ec@tom.joindiaspora.co +- :user: !map:ActiveSupport::HashWithIndifferentAccess + encrypted_password: $2a$10$Oamv73XVbe8E8hpVVtIJ6u2cpHLSeWcoRhVjLhMhgu3lWrrBuRy5S + 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 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 11 + last_sign_in_at: + username: bob422f5da + language: en + sign_in_count: 0 + visible_person_ids: [] + + password_salt: $2a$10$Oamv73XVbe8E8hpVVtIJ6u + inviter_ids: [] + + remember_token: + reset_password_token: + current_sign_in_ip: + remember_created_at: + current_sign_in_at: + invitation_sent_at: + email: bob4a1f665@pivotallabs.com + invitation_token: + visible_post_ids: [] + + getting_started: true + :person: !map:ActiveSupport::HashWithIndifferentAccess + created_at: 2010-10-29 21:18:16 Z + profile: !map:ActiveSupport::HashWithIndifferentAccess + image_url: + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 12 + gender: + birthday: + last_name: Grimm4d165e7 + bio: + first_name: Robert4fbfb80 + updated_at: 2010-10-29 21:18:16 Z + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 13 + url: http://google-41ea11d.com/ + serialized_public_key: | + -----BEGIN RSA PUBLIC KEY----- + MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA + 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In + dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + -----END RSA PUBLIC KEY----- + + owner_id: *id005 + diaspora_handle: bob422f5da@tom.joindiaspora.co +- :user: !map:ActiveSupport::HashWithIndifferentAccess + encrypted_password: $2a$10$qALVVchk0QrlvFQ11etGqezsppKURczrPY2Q4QyQQUN5zt1FCiFBO + 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 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 14 + last_sign_in_at: + username: bob573a6f6 + language: en + sign_in_count: 0 + visible_person_ids: [] + + password_salt: $2a$10$qALVVchk0QrlvFQ11etGqe + inviter_ids: [] + + remember_token: + reset_password_token: + current_sign_in_ip: + remember_created_at: + current_sign_in_at: + invitation_sent_at: + email: bob5af592b@pivotallabs.com + invitation_token: + visible_post_ids: [] + + getting_started: true + :person: !map:ActiveSupport::HashWithIndifferentAccess + created_at: 2010-10-29 21:18:16 Z + profile: !map:ActiveSupport::HashWithIndifferentAccess + image_url: + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 15 + gender: + birthday: + last_name: Grimm5be9b7d + bio: + first_name: Robert58217d8 + updated_at: 2010-10-29 21:18:16 Z + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 16 + url: http://google-5cfea85.com/ + serialized_public_key: | + -----BEGIN RSA PUBLIC KEY----- + MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA + 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In + dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + -----END RSA PUBLIC KEY----- + + owner_id: *id006 + diaspora_handle: bob573a6f6@tom.joindiaspora.co +- :user: !map:ActiveSupport::HashWithIndifferentAccess + encrypted_password: $2a$10$Wm2/q/FWTSpbxZnxmykQquyzYQGi4unJXuH.MZOdZ6mxvxMUfhYs6 + 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 + - 58 + - 24 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 17 + last_sign_in_at: + username: bob652d531 + language: en + sign_in_count: 0 + visible_person_ids: [] + + password_salt: $2a$10$Wm2/q/FWTSpbxZnxmykQqu + inviter_ids: [] + + remember_token: + reset_password_token: + current_sign_in_ip: + remember_created_at: + current_sign_in_at: + invitation_sent_at: + email: bob6427dc8@pivotallabs.com + invitation_token: + visible_post_ids: [] + + getting_started: true + :person: !map:ActiveSupport::HashWithIndifferentAccess + created_at: 2010-10-29 21:18:17 Z + profile: !map:ActiveSupport::HashWithIndifferentAccess + image_url: + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 18 + gender: + birthday: + last_name: Grimm64838de + bio: + first_name: Robert6f4b781 + updated_at: 2010-10-29 21:18:17 Z + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 19 + url: http://google-6606fae.com/ + serialized_public_key: | + -----BEGIN RSA PUBLIC KEY----- + MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA + 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In + dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + -----END RSA PUBLIC KEY----- + + owner_id: *id007 + diaspora_handle: bob652d531@tom.joindiaspora.co +- :user: !map:ActiveSupport::HashWithIndifferentAccess + encrypted_password: $2a$10$9Is8xR4zS4JfFzIa2ZKGwOYxKNtVAfCLL8JPfcKuzWqyjRxDc2Cja + 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 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 20 + last_sign_in_at: + username: bob75d9eb2 + language: en + sign_in_count: 0 + visible_person_ids: [] + + password_salt: $2a$10$9Is8xR4zS4JfFzIa2ZKGwO + inviter_ids: [] + + remember_token: + reset_password_token: + current_sign_in_ip: + remember_created_at: + current_sign_in_at: + invitation_sent_at: + email: bob770f4ee@pivotallabs.com + invitation_token: + visible_post_ids: [] + + getting_started: true + :person: !map:ActiveSupport::HashWithIndifferentAccess + created_at: 2010-10-29 21:18:17 Z + profile: !map:ActiveSupport::HashWithIndifferentAccess + image_url: + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 21 + gender: + birthday: + last_name: Grimm7f9cd69 + bio: + first_name: Robert72cc1ab + updated_at: 2010-10-29 21:18:17 Z + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 22 + url: http://google-72902bf.com/ + serialized_public_key: | + -----BEGIN RSA PUBLIC KEY----- + MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA + 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In + dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + -----END RSA PUBLIC KEY----- + + owner_id: *id008 + diaspora_handle: bob75d9eb2@tom.joindiaspora.co +- :user: !map:ActiveSupport::HashWithIndifferentAccess + encrypted_password: $2a$10$5KR10.gZ9tzkIWh/tJY20u7mYFtZGcvnCSUteL89PWuEnO/8ZHtZm + 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 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 23 + last_sign_in_at: + username: bob83a6b8b + language: en + sign_in_count: 0 + visible_person_ids: [] + + password_salt: $2a$10$5KR10.gZ9tzkIWh/tJY20u + inviter_ids: [] + + remember_token: + reset_password_token: + current_sign_in_ip: + remember_created_at: + current_sign_in_at: + invitation_sent_at: + email: bob80ab02a@pivotallabs.com + invitation_token: + visible_post_ids: [] + + getting_started: true + :person: !map:ActiveSupport::HashWithIndifferentAccess + created_at: 2010-10-29 21:18:17 Z + profile: !map:ActiveSupport::HashWithIndifferentAccess + image_url: + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 24 + gender: + birthday: + last_name: Grimm8dc43de + bio: + first_name: Robert82e1ae4 + updated_at: 2010-10-29 21:18:17 Z + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 25 + url: http://google-88197af.com/ + serialized_public_key: | + -----BEGIN RSA PUBLIC KEY----- + MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA + 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In + dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + -----END RSA PUBLIC KEY----- + + owner_id: *id009 + diaspora_handle: bob83a6b8b@tom.joindiaspora.co +- :user: !map:ActiveSupport::HashWithIndifferentAccess + encrypted_password: $2a$10$HnL2k5SCQ6FQBmUjyeYF5.tQzVYg9UKynHxi2/ZQ2AMDv0mduPCMO + 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 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 26 + last_sign_in_at: + username: bob9c7545f + language: en + sign_in_count: 0 + visible_person_ids: [] + + password_salt: $2a$10$HnL2k5SCQ6FQBmUjyeYF5. + inviter_ids: [] + + remember_token: + reset_password_token: + current_sign_in_ip: + remember_created_at: + current_sign_in_at: + invitation_sent_at: + email: bob9fd6956@pivotallabs.com + invitation_token: + visible_post_ids: [] + + getting_started: true + :person: !map:ActiveSupport::HashWithIndifferentAccess + created_at: 2010-10-29 21:18:17 Z + profile: !map:ActiveSupport::HashWithIndifferentAccess + image_url: + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 27 + gender: + birthday: + last_name: Grimm90ef595 + bio: + first_name: Robert923d4f5 + updated_at: 2010-10-29 21:18:17 Z + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 28 + url: http://google-9689d81.com/ + serialized_public_key: | + -----BEGIN RSA PUBLIC KEY----- + MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA + 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In + dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + -----END RSA PUBLIC KEY----- + + owner_id: *id010 + diaspora_handle: bob9c7545f@tom.joindiaspora.co +- :user: !map:ActiveSupport::HashWithIndifferentAccess + encrypted_password: $2a$10$h5lCjtq9rhreFgST8Oy0b.PUyM.zbX6Tci51Fst3IoNQHe7DPyd46 + 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 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 29 + last_sign_in_at: + username: bob10d340be + language: en + sign_in_count: 0 + visible_person_ids: [] + + password_salt: $2a$10$h5lCjtq9rhreFgST8Oy0b. + inviter_ids: [] + + remember_token: + reset_password_token: + current_sign_in_ip: + remember_created_at: + current_sign_in_at: + invitation_sent_at: + email: bob10dcaa07@pivotallabs.com + invitation_token: + visible_post_ids: [] + + getting_started: true + :person: !map:ActiveSupport::HashWithIndifferentAccess + created_at: 2010-10-29 21:18:17 Z + profile: !map:ActiveSupport::HashWithIndifferentAccess + image_url: + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 30 + gender: + birthday: + last_name: Grimm106c4fed + bio: + first_name: Robert10349f66 + updated_at: 2010-10-29 21:18:17 Z + _id: !ruby/object:BSON::ObjectId + data: + - 76 + - 203 + - 58 + - 25 + - 204 + - 140 + - 180 + - 111 + - 255 + - 0 + - 0 + - 31 + url: http://google-103ee4c2.com/ + serialized_public_key: | + -----BEGIN RSA PUBLIC KEY----- + MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA + 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In + dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + -----END RSA PUBLIC KEY----- + + owner_id: *id011 + diaspora_handle: bob10d340be@tom.joindiaspora.co diff --git a/spec/helper_methods.rb b/spec/helper_methods.rb index 116f54bb4..b33b59e34 100644 --- a/spec/helper_methods.rb +++ b/spec/helper_methods.rb @@ -83,33 +83,49 @@ module HelperMethods File.open(File.dirname(__FILE__) + '/fixtures/evan_hcard').read end - def build_user_fixtures - arr = [] - 10.times do - user = Factory :user - person = user.person - arr << { :user => user.to_mongo, :person => person.to_mongo} - end - arr + def make_user + UserFixer.fixed_user end - def 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) + 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 - end - def save_user_fixtures - yaml_users = YAML.load_file(File.join(Rails.root,"spec/fixtures/users.yaml")) - db = MongoMapper.database - people = db.collection("people") - users = db.collection("users") - yaml_users[:users].each do |yaml_user| - user = yaml_user[:user] - person = yaml_user[:person] - users.insert(user) - people.insert(person) + 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 diff --git a/spec/misc_spec.rb b/spec/misc_spec.rb index 61b64d25b..67f015d76 100644 --- a/spec/misc_spec.rb +++ b/spec/misc_spec.rb @@ -11,10 +11,31 @@ describe 'making sure the spec runner works' do loaded_user.person.owner_id.should == user.id 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 'build' 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 end end @@ -22,9 +43,9 @@ describe 'making sure the spec runner works' do describe '#friend_users' do before do - @user1 = Factory.create(:user) + @user1 = make_user @aspect1 = @user1.aspect(:name => "losers") - @user2 = Factory.create(:user) + @user2 = make_user @aspect2 = @user2.aspect(:name => "bruisers") friend_users(@user1, @aspect1, @user2, @aspect2) end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3f6710bdc..b8b78c002 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -31,6 +31,7 @@ RSpec.configure do |config| stub_sockets MessageHandler.any_instance.stubs(:add_post_request) DatabaseCleaner.clean + UserFixer.load_user_fixtures end end From 99eb25762d5671c519e1e229ca5110c9572e7727 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 29 Oct 2010 15:51:05 -0700 Subject: [PATCH 5/6] Moving to make_user, a few specs broken --- spec/controllers/albums_controller_spec.rb | 4 +- spec/controllers/aspects_controller_spec.rb | 4 +- spec/controllers/photos_controller_spec.rb | 2 +- spec/controllers/publics_controller_spec.rb | 6 +- spec/controllers/requests_controller_spec.rb | 2 +- spec/controllers/services_controller_spec.rb | 2 +- spec/controllers/sockets_controller_spec.rb | 2 +- .../status_message_controller_spec.rb | 2 +- spec/controllers/users_controller_spec.rb | 2 +- spec/fixtures/users.yaml | 526 +++++++++--------- spec/helper_methods.rb | 11 - spec/helpers/application_helper_spec.rb | 2 +- spec/helpers/publics_helper_spec.rb | 2 +- spec/lib/diaspora/exporter_spec.rb | 6 +- spec/lib/diaspora/importer_spec.rb | 10 +- spec/lib/diaspora/ostatus_builder.rb | 2 +- spec/lib/diaspora/parser_spec.rb | 6 +- spec/lib/em-webfinger_spec.rb | 4 +- spec/lib/encryptor_spec.rb | 2 +- spec/lib/message_handler_spec.rb | 1 - spec/lib/salmon_salmon_spec.rb | 6 +- spec/lib/verify_spec.rb | 8 +- spec/lib/websocket_spec.rb | 3 +- spec/mailers/notifier_spec.rb | 2 +- spec/misc_spec.rb | 2 +- spec/models/album_spec.rb | 2 +- spec/models/aspect_spec.rb | 6 +- spec/models/comment_spec.rb | 6 +- spec/models/person_spec.rb | 11 +- spec/models/photo_spec.rb | 2 +- spec/models/post_spec.rb | 2 +- spec/models/request_spec.rb | 4 +- spec/models/retraction_spec.rb | 2 +- spec/models/status_message_spec.rb | 2 +- spec/models/user/attack_vectors_spec.rb | 8 +- spec/models/user/invite_spec.rb | 4 +- spec/models/user/posting_spec.rb | 8 +- spec/models/user/querying_spec.rb | 4 +- spec/models/user/receive_spec.rb | 6 +- spec/models/user/user_friending_spec.rb | 4 +- spec/models/user_spec.rb | 4 +- spec/spec_helper.rb | 1 - 42 files changed, 341 insertions(+), 354 deletions(-) diff --git a/spec/controllers/albums_controller_spec.rb b/spec/controllers/albums_controller_spec.rb index 8bfcf61e5..d1db2c3e2 100644 --- a/spec/controllers/albums_controller_spec.rb +++ b/spec/controllers/albums_controller_spec.rb @@ -7,7 +7,7 @@ require 'spec_helper' describe AlbumsController do render_views before do - @user = Factory.create(:user) + @user = make_user @aspect = @user.aspect(:name => "lame-os") @album = @user.post :album, :to => @aspect.id, :name => 'things on fire' sign_in :user, @user @@ -31,7 +31,7 @@ describe AlbumsController do end 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} put('update', :id => @album.id, "album" => params) @album.reload.person_id.should == @user.person.id diff --git a/spec/controllers/aspects_controller_spec.rb b/spec/controllers/aspects_controller_spec.rb index 7635bbfc1..54a914eaa 100644 --- a/spec/controllers/aspects_controller_spec.rb +++ b/spec/controllers/aspects_controller_spec.rb @@ -8,10 +8,10 @@ describe AspectsController do render_views before do - @user = Factory.create(:user) + @user = make_user @aspect = @user.aspect(:name => "lame-os") @aspect1 = @user.aspect(:name => "another aspect") - @user2 = Factory.create(:user) + @user2 = make_user @aspect2 = @user2.aspect(:name => "party people") friend_users(@user,@aspect, @user2, @aspect2) @contact = @user.contact_for(@user2.person) diff --git a/spec/controllers/photos_controller_spec.rb b/spec/controllers/photos_controller_spec.rb index 86d8d448c..f435ca568 100644 --- a/spec/controllers/photos_controller_spec.rb +++ b/spec/controllers/photos_controller_spec.rb @@ -7,7 +7,7 @@ require 'spec_helper' describe PhotosController do render_views before do - @user = Factory.create(:user) + @user = make_user @aspect = @user.aspect(:name => "lame-os") @album = @user.post :album, :to => @aspect.id, :name => 'things on fire' @fixture_filename = 'button.png' diff --git a/spec/controllers/publics_controller_spec.rb b/spec/controllers/publics_controller_spec.rb index 8f3aa6d68..4255cd884 100644 --- a/spec/controllers/publics_controller_spec.rb +++ b/spec/controllers/publics_controller_spec.rb @@ -7,8 +7,8 @@ require 'spec_helper' describe PublicsController do render_views - let!(:user) { Factory.create :user } - let!(:user2) { Factory.create :user } + let!(:user) { make_user } + let!(:user2) { make_user } let!(:aspect1) { user.aspect(:name => "foo") } let!(:aspect2) { user2.aspect(:name => "far") } let!(:aspect2) { user2.aspect(:name => 'disciples') } @@ -101,7 +101,7 @@ describe PublicsController do describe '#webfinger' do it "succeeds when the person and user exist locally" do - user = Factory(:user) + user = make_user post :webfinger, 'q' => user.person.diaspora_handle response.should be_success end diff --git a/spec/controllers/requests_controller_spec.rb b/spec/controllers/requests_controller_spec.rb index d75b93f05..8b276dfc8 100644 --- a/spec/controllers/requests_controller_spec.rb +++ b/spec/controllers/requests_controller_spec.rb @@ -7,7 +7,7 @@ require 'spec_helper' describe RequestsController do render_views before do - @user = Factory.create(:user) + @user = make_user sign_in :user, @user @user.aspect(:name => "lame-os") diff --git a/spec/controllers/services_controller_spec.rb b/spec/controllers/services_controller_spec.rb index 0c19c1e23..71c7317b4 100644 --- a/spec/controllers/services_controller_spec.rb +++ b/spec/controllers/services_controller_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' describe ServicesController do render_views - let(:user) { Factory(:user) } + let(:user) { make_user } let!(:aspect) { user.aspect(:name => "lame-os") } let!(:service1) {a = Factory(:service); user.services << a; a} diff --git a/spec/controllers/sockets_controller_spec.rb b/spec/controllers/sockets_controller_spec.rb index b7d7c037b..0b7e6ab1a 100644 --- a/spec/controllers/sockets_controller_spec.rb +++ b/spec/controllers/sockets_controller_spec.rb @@ -13,7 +13,7 @@ EOT describe SocketsController do render_views before do - @user = Factory.create(:user) + @user = make_user @controller = SocketsController.new end diff --git a/spec/controllers/status_message_controller_spec.rb b/spec/controllers/status_message_controller_spec.rb index 0869972b3..8b96e49cb 100644 --- a/spec/controllers/status_message_controller_spec.rb +++ b/spec/controllers/status_message_controller_spec.rb @@ -7,7 +7,7 @@ require 'spec_helper' describe StatusMessagesController do render_views - let!(:user) { Factory(:user) } + let!(:user) { make_user } let!(:aspect) { user.aspect(:name => "lame-os") } before do diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index ae12caf18..b48115f08 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' describe UsersController do - let(:user) { Factory(:user) } + let(:user) { make_user } let!(:aspect) { user.aspect(:name => "lame-os") } let!(:old_password) { user.encrypted_password } diff --git a/spec/fixtures/users.yaml b/spec/fixtures/users.yaml index 535fd8c52..5c90e0040 100644 --- a/spec/fixtures/users.yaml +++ b/spec/fixtures/users.yaml @@ -1,22 +1,22 @@ --- :users: - :user: !map:ActiveSupport::HashWithIndifferentAccess - encrypted_password: $2a$10$iMNkTJNE1.apaW4/LBcn/ObvDyfksByDU4Rz/H7iNdnY5E/HcwNG. + encrypted_password: $2a$10$yl5042/m1NmG58eXtYKb7uiHUuBYq0xPRm7xK.Xdi/a9ypP0UyNFe serialized_private_key: &id002 | -----BEGIN RSA PRIVATE KEY----- - MIICXAIBAAKBgQDDlBILfgBL1ztMVy6NtCkNYGuTBPGbRM1SU34/4khR3aJ9vJid - 9JA3QNQEpJmYioE7R0y1UJWAVC5Gz8X+e6StAnGfxR/FNFeeEOwL4nL8PkLRKBXq - 2hOCJ3anlzbw91ZfclS5A4mznae3F+kMN0hPExv3rmxJBGywwP+zQSfd0wIDAQAB - AoGALsKXMeI1Rey2w8DQY5bgfc9AyQzUiy/++yD1PWbnrZMVB4Tw5EsVs/AvANEt - 2/e5gCfC4lLa+6ykx89jYj3DmCLPMvzuysby661zbMLjR5oudWkVc+53QufQ5fOb - 5uIAi7G7IXmdXgLXV6r8tRUbCRpTTwcpmuiASKu6IjjzBbECQQDf2oOCKfwRaUuQ - z8een5r/J/ptEUnHALK6XdWMu8FZaw+PRxOQAH/o2xWSECs8+SRn9D0IoaiSXcdb - AIy0dv/LAkEA36oVBYyXEJJtWqEfrdeep0qNacFRANp8tKTsLGa5CYwATM/edW8I - 3Vguh9nCiwuryCX90l4XoSQl9pMkFMhJGQJAOX/le8/RAZ/sWxwkCGiy5YudVdq0 - +rsBLcHgkq+/sHpBmuoE6l5WfLeZyNUCZj0Qzur7qnXr2Pzhskxn2AshFQJAfbM4 - 3UWGIOoqSyUCiNEFeT+M+kKLI8+nBl8p3Epe896azJCGlbkxYjSM8gyQKVUF1haD - 8BaxcP6/1zQasxNdAQJBAJPtFO9JtPjZQjn6SBcis9BJhyXXoqS4IJjuWFRGPxZ1 - i/Qfzbqqmq8VuH+V+ImlYauTWKYVkDOOxde/oiKSALs= + 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: [] @@ -31,23 +31,23 @@ data: - 76 - 203 - - 58 - - 23 + - 78 + - 37 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 2 last_sign_in_at: - username: bob13f8c74 + username: bob1b1de83 language: en sign_in_count: 0 visible_person_ids: [] - password_salt: $2a$10$iMNkTJNE1.apaW4/LBcn/O + password_salt: $2a$10$yl5042/m1NmG58eXtYKb7u inviter_ids: [] remember_token: @@ -56,61 +56,61 @@ remember_created_at: current_sign_in_at: invitation_sent_at: - email: bob1777562@pivotallabs.com + email: bob16accc0@pivotallabs.com invitation_token: visible_post_ids: [] getting_started: true :person: !map:ActiveSupport::HashWithIndifferentAccess - created_at: 2010-10-29 21:18:16 Z + created_at: 2010-10-29 22:43:50 Z profile: !map:ActiveSupport::HashWithIndifferentAccess image_url: _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 24 + - 78 + - 38 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 3 gender: birthday: - last_name: Grimm11ffa33 + last_name: Grimm1c1b679 bio: - first_name: Robert111667a - updated_at: 2010-10-29 21:18:16 Z + first_name: Robert15cfdfb + updated_at: 2010-10-29 22:43:50 Z _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 24 + - 78 + - 38 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 4 - url: http://google-16e5a04.com/ + url: http://google-11ed884.com/ serialized_public_key: | -----BEGIN RSA PUBLIC KEY----- - MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA - 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In - dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2 + 2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b + z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE= -----END RSA PUBLIC KEY----- owner_id: *id001 - diaspora_handle: bob13f8c74@tom.joindiaspora.co + diaspora_handle: bob1b1de83@tom.joindiaspora.co - :user: !map:ActiveSupport::HashWithIndifferentAccess - encrypted_password: $2a$10$wqon2hNz9zzRbUyt8Se9duE3nn/9Ze541lP9aDKlYCzICA.tEmrWG + encrypted_password: $2a$10$MQH.CJUkEbAA0aMlhs3yVOV0W8obzclj24JLMzlbsLblW58P/2WDu serialized_private_key: *id002 pending_request_ids: [] @@ -124,23 +124,23 @@ data: - 76 - 203 - - 58 - - 24 + - 78 + - 38 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 5 last_sign_in_at: - username: bob2afae38 + username: bob2271e40 language: en sign_in_count: 0 visible_person_ids: [] - password_salt: $2a$10$wqon2hNz9zzRbUyt8Se9du + password_salt: $2a$10$MQH.CJUkEbAA0aMlhs3yVO inviter_ids: [] remember_token: @@ -149,61 +149,61 @@ remember_created_at: current_sign_in_at: invitation_sent_at: - email: bob2cb8179@pivotallabs.com + email: bob2573b5a@pivotallabs.com invitation_token: visible_post_ids: [] getting_started: true :person: !map:ActiveSupport::HashWithIndifferentAccess - created_at: 2010-10-29 21:18:16 Z + created_at: 2010-10-29 22:43:50 Z profile: !map:ActiveSupport::HashWithIndifferentAccess image_url: _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 24 + - 78 + - 38 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 6 gender: birthday: - last_name: Grimm20278b6 + last_name: Grimm20d70fb bio: - first_name: Robert28c1f8b - updated_at: 2010-10-29 21:18:16 Z + first_name: Robert2720656 + updated_at: 2010-10-29 22:43:50 Z _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 24 + - 78 + - 38 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 7 - url: http://google-2997035.com/ + url: http://google-2a66ee6.com/ serialized_public_key: | -----BEGIN RSA PUBLIC KEY----- - MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA - 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In - dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2 + 2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b + z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE= -----END RSA PUBLIC KEY----- owner_id: *id003 - diaspora_handle: bob2afae38@tom.joindiaspora.co + diaspora_handle: bob2271e40@tom.joindiaspora.co - :user: !map:ActiveSupport::HashWithIndifferentAccess - encrypted_password: $2a$10$2sCq2se3hLo3ShENDsExD.gMJoPMK6vZGmPcQQartvleuM1N5fNm. + encrypted_password: $2a$10$ngoa90jBWjnsEmd63uM8CehEbGR10eDk5CavVC56K2DFGqospeVPm serialized_private_key: *id002 pending_request_ids: [] @@ -217,23 +217,23 @@ data: - 76 - 203 - - 58 - - 24 + - 78 + - 38 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 8 last_sign_in_at: - username: bob31ce4ec + username: bob35b8a98 language: en sign_in_count: 0 visible_person_ids: [] - password_salt: $2a$10$2sCq2se3hLo3ShENDsExD. + password_salt: $2a$10$ngoa90jBWjnsEmd63uM8Ce inviter_ids: [] remember_token: @@ -242,61 +242,61 @@ remember_created_at: current_sign_in_at: invitation_sent_at: - email: bob31a91aa@pivotallabs.com + email: bob312d7a3@pivotallabs.com invitation_token: visible_post_ids: [] getting_started: true :person: !map:ActiveSupport::HashWithIndifferentAccess - created_at: 2010-10-29 21:18:16 Z + created_at: 2010-10-29 22:43:50 Z profile: !map:ActiveSupport::HashWithIndifferentAccess image_url: _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 24 + - 78 + - 38 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 9 gender: birthday: - last_name: Grimm3956abb + last_name: Grimm309eb5b bio: - first_name: Robert3ca9e63 - updated_at: 2010-10-29 21:18:16 Z + first_name: Robert3ef0451 + updated_at: 2010-10-29 22:43:50 Z _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 24 + - 78 + - 38 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 10 - url: http://google-3d0cf70.com/ + url: http://google-32f8058.com/ serialized_public_key: | -----BEGIN RSA PUBLIC KEY----- - MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA - 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In - dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2 + 2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b + z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE= -----END RSA PUBLIC KEY----- owner_id: *id004 - diaspora_handle: bob31ce4ec@tom.joindiaspora.co + diaspora_handle: bob35b8a98@tom.joindiaspora.co - :user: !map:ActiveSupport::HashWithIndifferentAccess - encrypted_password: $2a$10$Oamv73XVbe8E8hpVVtIJ6u2cpHLSeWcoRhVjLhMhgu3lWrrBuRy5S + encrypted_password: $2a$10$PQxJ9RTpc9Uc72hKckPKbeNLKYNmDSUJvwqaziC4a62WA7vUF3ibm serialized_private_key: *id002 pending_request_ids: [] @@ -310,23 +310,23 @@ data: - 76 - 203 - - 58 - - 24 + - 78 + - 38 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 11 last_sign_in_at: - username: bob422f5da + username: bob458f3d8 language: en sign_in_count: 0 visible_person_ids: [] - password_salt: $2a$10$Oamv73XVbe8E8hpVVtIJ6u + password_salt: $2a$10$PQxJ9RTpc9Uc72hKckPKbe inviter_ids: [] remember_token: @@ -335,61 +335,61 @@ remember_created_at: current_sign_in_at: invitation_sent_at: - email: bob4a1f665@pivotallabs.com + email: bob44fbaa5@pivotallabs.com invitation_token: visible_post_ids: [] getting_started: true :person: !map:ActiveSupport::HashWithIndifferentAccess - created_at: 2010-10-29 21:18:16 Z + created_at: 2010-10-29 22:43:51 Z profile: !map:ActiveSupport::HashWithIndifferentAccess image_url: _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 24 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 12 gender: birthday: - last_name: Grimm4d165e7 + last_name: Grimm4c2f0d0 bio: - first_name: Robert4fbfb80 - updated_at: 2010-10-29 21:18:16 Z + first_name: Robert42453f9 + updated_at: 2010-10-29 22:43:51 Z _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 24 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 13 - url: http://google-41ea11d.com/ + url: http://google-4e5029d.com/ serialized_public_key: | -----BEGIN RSA PUBLIC KEY----- - MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA - 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In - dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2 + 2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b + z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE= -----END RSA PUBLIC KEY----- owner_id: *id005 - diaspora_handle: bob422f5da@tom.joindiaspora.co + diaspora_handle: bob458f3d8@tom.joindiaspora.co - :user: !map:ActiveSupport::HashWithIndifferentAccess - encrypted_password: $2a$10$qALVVchk0QrlvFQ11etGqezsppKURczrPY2Q4QyQQUN5zt1FCiFBO + encrypted_password: $2a$10$XSjtdsL9Yz2GS9By/4hQZeXnXZWPd0uuJtUWeN.VXFtUk/NEkZhOq serialized_private_key: *id002 pending_request_ids: [] @@ -403,23 +403,23 @@ data: - 76 - 203 - - 58 - - 24 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 14 last_sign_in_at: - username: bob573a6f6 + username: bob57d55fd language: en sign_in_count: 0 visible_person_ids: [] - password_salt: $2a$10$qALVVchk0QrlvFQ11etGqe + password_salt: $2a$10$XSjtdsL9Yz2GS9By/4hQZe inviter_ids: [] remember_token: @@ -428,61 +428,61 @@ remember_created_at: current_sign_in_at: invitation_sent_at: - email: bob5af592b@pivotallabs.com + email: bob55c87c3@pivotallabs.com invitation_token: visible_post_ids: [] getting_started: true :person: !map:ActiveSupport::HashWithIndifferentAccess - created_at: 2010-10-29 21:18:16 Z + created_at: 2010-10-29 22:43:51 Z profile: !map:ActiveSupport::HashWithIndifferentAccess image_url: _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 24 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 15 gender: birthday: - last_name: Grimm5be9b7d + last_name: Grimm54c2742 bio: - first_name: Robert58217d8 - updated_at: 2010-10-29 21:18:16 Z + first_name: Robert5ca48e4 + updated_at: 2010-10-29 22:43:51 Z _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 24 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 16 - url: http://google-5cfea85.com/ + url: http://google-5ecb435.com/ serialized_public_key: | -----BEGIN RSA PUBLIC KEY----- - MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA - 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In - dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2 + 2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b + z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE= -----END RSA PUBLIC KEY----- owner_id: *id006 - diaspora_handle: bob573a6f6@tom.joindiaspora.co + diaspora_handle: bob57d55fd@tom.joindiaspora.co - :user: !map:ActiveSupport::HashWithIndifferentAccess - encrypted_password: $2a$10$Wm2/q/FWTSpbxZnxmykQquyzYQGi4unJXuH.MZOdZ6mxvxMUfhYs6 + encrypted_password: $2a$10$GD1Ox5LmmOLOVycvOkuHtu/gwINhkkIVxKAuksw1z/If9HdKOZj4q serialized_private_key: *id002 pending_request_ids: [] @@ -496,23 +496,23 @@ data: - 76 - 203 - - 58 - - 24 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 17 last_sign_in_at: - username: bob652d531 + username: bob6e6db8b language: en sign_in_count: 0 visible_person_ids: [] - password_salt: $2a$10$Wm2/q/FWTSpbxZnxmykQqu + password_salt: $2a$10$GD1Ox5LmmOLOVycvOkuHtu inviter_ids: [] remember_token: @@ -521,61 +521,61 @@ remember_created_at: current_sign_in_at: invitation_sent_at: - email: bob6427dc8@pivotallabs.com + email: bob6e9568f@pivotallabs.com invitation_token: visible_post_ids: [] getting_started: true :person: !map:ActiveSupport::HashWithIndifferentAccess - created_at: 2010-10-29 21:18:17 Z + created_at: 2010-10-29 22:43:51 Z profile: !map:ActiveSupport::HashWithIndifferentAccess image_url: _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 25 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 18 gender: birthday: - last_name: Grimm64838de + last_name: Grimm66fb47f bio: - first_name: Robert6f4b781 - updated_at: 2010-10-29 21:18:17 Z + first_name: Robert6bf1362 + updated_at: 2010-10-29 22:43:51 Z _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 25 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 19 - url: http://google-6606fae.com/ + url: http://google-637c337.com/ serialized_public_key: | -----BEGIN RSA PUBLIC KEY----- - MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA - 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In - dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2 + 2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b + z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE= -----END RSA PUBLIC KEY----- owner_id: *id007 - diaspora_handle: bob652d531@tom.joindiaspora.co + diaspora_handle: bob6e6db8b@tom.joindiaspora.co - :user: !map:ActiveSupport::HashWithIndifferentAccess - encrypted_password: $2a$10$9Is8xR4zS4JfFzIa2ZKGwOYxKNtVAfCLL8JPfcKuzWqyjRxDc2Cja + encrypted_password: $2a$10$dBJTo2az.3WVZqyb4vNOkuh/ld3TqKmF/Pn2QnWBvSFueD/lOhr.S serialized_private_key: *id002 pending_request_ids: [] @@ -589,23 +589,23 @@ data: - 76 - 203 - - 58 - - 25 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 20 last_sign_in_at: - username: bob75d9eb2 + username: bob72cdc62 language: en sign_in_count: 0 visible_person_ids: [] - password_salt: $2a$10$9Is8xR4zS4JfFzIa2ZKGwO + password_salt: $2a$10$dBJTo2az.3WVZqyb4vNOku inviter_ids: [] remember_token: @@ -614,61 +614,61 @@ remember_created_at: current_sign_in_at: invitation_sent_at: - email: bob770f4ee@pivotallabs.com + email: bob7ef7e9b@pivotallabs.com invitation_token: visible_post_ids: [] getting_started: true :person: !map:ActiveSupport::HashWithIndifferentAccess - created_at: 2010-10-29 21:18:17 Z + created_at: 2010-10-29 22:43:51 Z profile: !map:ActiveSupport::HashWithIndifferentAccess image_url: _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 25 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 21 gender: birthday: - last_name: Grimm7f9cd69 + last_name: Grimm772f10b bio: - first_name: Robert72cc1ab - updated_at: 2010-10-29 21:18:17 Z + first_name: Robert71c70ee + updated_at: 2010-10-29 22:43:51 Z _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 25 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 22 - url: http://google-72902bf.com/ + url: http://google-72202b0.com/ serialized_public_key: | -----BEGIN RSA PUBLIC KEY----- - MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA - 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In - dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2 + 2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b + z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE= -----END RSA PUBLIC KEY----- owner_id: *id008 - diaspora_handle: bob75d9eb2@tom.joindiaspora.co + diaspora_handle: bob72cdc62@tom.joindiaspora.co - :user: !map:ActiveSupport::HashWithIndifferentAccess - encrypted_password: $2a$10$5KR10.gZ9tzkIWh/tJY20u7mYFtZGcvnCSUteL89PWuEnO/8ZHtZm + encrypted_password: $2a$10$xCE8yLMxbcXRh5gLuALK6.FNVtPEZmFd1RBaDLPeWgjc8qIlpwVhe serialized_private_key: *id002 pending_request_ids: [] @@ -682,23 +682,23 @@ data: - 76 - 203 - - 58 - - 25 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 23 last_sign_in_at: - username: bob83a6b8b + username: bob8678b45 language: en sign_in_count: 0 visible_person_ids: [] - password_salt: $2a$10$5KR10.gZ9tzkIWh/tJY20u + password_salt: $2a$10$xCE8yLMxbcXRh5gLuALK6. inviter_ids: [] remember_token: @@ -707,61 +707,61 @@ remember_created_at: current_sign_in_at: invitation_sent_at: - email: bob80ab02a@pivotallabs.com + email: bob819d189@pivotallabs.com invitation_token: visible_post_ids: [] getting_started: true :person: !map:ActiveSupport::HashWithIndifferentAccess - created_at: 2010-10-29 21:18:17 Z + created_at: 2010-10-29 22:43:51 Z profile: !map:ActiveSupport::HashWithIndifferentAccess image_url: _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 25 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 24 gender: birthday: - last_name: Grimm8dc43de + last_name: Grimm864aeca bio: - first_name: Robert82e1ae4 - updated_at: 2010-10-29 21:18:17 Z + first_name: Robert81ad1c8 + updated_at: 2010-10-29 22:43:51 Z _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 25 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 25 - url: http://google-88197af.com/ + url: http://google-81b2a1e.com/ serialized_public_key: | -----BEGIN RSA PUBLIC KEY----- - MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA - 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In - dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2 + 2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b + z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE= -----END RSA PUBLIC KEY----- owner_id: *id009 - diaspora_handle: bob83a6b8b@tom.joindiaspora.co + diaspora_handle: bob8678b45@tom.joindiaspora.co - :user: !map:ActiveSupport::HashWithIndifferentAccess - encrypted_password: $2a$10$HnL2k5SCQ6FQBmUjyeYF5.tQzVYg9UKynHxi2/ZQ2AMDv0mduPCMO + encrypted_password: $2a$10$HtD4sIEWTLkRkFBVqQlhseNUnbDnp0lY6SVe3h0r1mIn5iwZ2YeXe serialized_private_key: *id002 pending_request_ids: [] @@ -775,23 +775,23 @@ data: - 76 - 203 - - 58 - - 25 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 26 last_sign_in_at: - username: bob9c7545f + username: bob927c7ca language: en sign_in_count: 0 visible_person_ids: [] - password_salt: $2a$10$HnL2k5SCQ6FQBmUjyeYF5. + password_salt: $2a$10$HtD4sIEWTLkRkFBVqQlhse inviter_ids: [] remember_token: @@ -800,61 +800,61 @@ remember_created_at: current_sign_in_at: invitation_sent_at: - email: bob9fd6956@pivotallabs.com + email: bob97eca7c@pivotallabs.com invitation_token: visible_post_ids: [] getting_started: true :person: !map:ActiveSupport::HashWithIndifferentAccess - created_at: 2010-10-29 21:18:17 Z + created_at: 2010-10-29 22:43:51 Z profile: !map:ActiveSupport::HashWithIndifferentAccess image_url: _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 25 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 27 gender: birthday: - last_name: Grimm90ef595 + last_name: Grimm9a36026 bio: - first_name: Robert923d4f5 - updated_at: 2010-10-29 21:18:17 Z + first_name: Robert997cd3d + updated_at: 2010-10-29 22:43:51 Z _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 25 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 28 - url: http://google-9689d81.com/ + url: http://google-9369b50.com/ serialized_public_key: | -----BEGIN RSA PUBLIC KEY----- - MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA - 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In - dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2 + 2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b + z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE= -----END RSA PUBLIC KEY----- owner_id: *id010 - diaspora_handle: bob9c7545f@tom.joindiaspora.co + diaspora_handle: bob927c7ca@tom.joindiaspora.co - :user: !map:ActiveSupport::HashWithIndifferentAccess - encrypted_password: $2a$10$h5lCjtq9rhreFgST8Oy0b.PUyM.zbX6Tci51Fst3IoNQHe7DPyd46 + encrypted_password: $2a$10$XYFOUzQfR5O68OwTE2wW7eA4I5ScghKIQsRZWLDC.pKXptmm69MUm serialized_private_key: *id002 pending_request_ids: [] @@ -868,23 +868,23 @@ data: - 76 - 203 - - 58 - - 25 + - 78 + - 39 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 29 last_sign_in_at: - username: bob10d340be + username: bob10b011c4 language: en sign_in_count: 0 visible_person_ids: [] - password_salt: $2a$10$h5lCjtq9rhreFgST8Oy0b. + password_salt: $2a$10$XYFOUzQfR5O68OwTE2wW7e inviter_ids: [] remember_token: @@ -893,56 +893,56 @@ remember_created_at: current_sign_in_at: invitation_sent_at: - email: bob10dcaa07@pivotallabs.com + email: bob1070f7a1@pivotallabs.com invitation_token: visible_post_ids: [] getting_started: true :person: !map:ActiveSupport::HashWithIndifferentAccess - created_at: 2010-10-29 21:18:17 Z + created_at: 2010-10-29 22:43:52 Z profile: !map:ActiveSupport::HashWithIndifferentAccess image_url: _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 25 + - 78 + - 40 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 30 gender: birthday: - last_name: Grimm106c4fed + last_name: Grimm10e7204d bio: - first_name: Robert10349f66 - updated_at: 2010-10-29 21:18:17 Z + first_name: Robert103bb226 + updated_at: 2010-10-29 22:43:52 Z _id: !ruby/object:BSON::ObjectId data: - 76 - 203 - - 58 - - 25 + - 78 + - 40 - 204 - 140 - 180 - - 111 - - 255 + - 3 + - 40 - 0 - 0 - 31 - url: http://google-103ee4c2.com/ + url: http://google-10a3985b.com/ serialized_public_key: | -----BEGIN RSA PUBLIC KEY----- - MIGJAoGBAMOUEgt+AEvXO0xXLo20KQ1ga5ME8ZtEzVJTfj/iSFHdon28mJ30kDdA - 1ASkmZiKgTtHTLVQlYBULkbPxf57pK0CcZ/FH8U0V54Q7Avicvw+QtEoFeraE4In - dqeXNvD3Vl9yVLkDibOdp7cX6Qw3SE8TG/eubEkEbLDA/7NBJ93TAgMBAAE= + MIGJAoGBAMUQVhXqpUnCTWodCKjZAsHHkPyqQycU9ODyGrRf2qTwW3gDUW5s92T2 + 2lKn4WG0vc+pCJWj8QvO/v9WD6oPoeda1TK2alKRV0Gyx4hpvJBwvuvMykom/x5b + z6RJqS+BBUlIMgUF/rtUYdybe9dKWHc1tTRX853YhEEops9pMlTpAgMBAAE= -----END RSA PUBLIC KEY----- owner_id: *id011 - diaspora_handle: bob10d340be@tom.joindiaspora.co + diaspora_handle: bob10b011c4@tom.joindiaspora.co diff --git a/spec/helper_methods.rb b/spec/helper_methods.rb index b33b59e34..6c159d0b0 100644 --- a/spec/helper_methods.rb +++ b/spec/helper_methods.rb @@ -1,15 +1,4 @@ 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 Comment.any_instance.stubs(:verify_signature).returns(true) diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index f64ca0b97..0ba2bb28a 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' describe ApplicationHelper do before do - @user = Factory.create(:user) + @user = make_user @person = Factory.create(:person) end diff --git a/spec/helpers/publics_helper_spec.rb b/spec/helpers/publics_helper_spec.rb index 9b52c30a4..05322f099 100644 --- a/spec/helpers/publics_helper_spec.rb +++ b/spec/helpers/publics_helper_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' describe PublicsHelper do before do - @user = Factory.create(:user) + @user = make_user @person = Factory.create(:person) end diff --git a/spec/lib/diaspora/exporter_spec.rb b/spec/lib/diaspora/exporter_spec.rb index e2db3b5eb..6e9e6e1f9 100644 --- a/spec/lib/diaspora/exporter_spec.rb +++ b/spec/lib/diaspora/exporter_spec.rb @@ -7,9 +7,9 @@ require File.join(Rails.root, 'lib/diaspora/exporter') describe Diaspora::Exporter do - let!(:user1) { Factory(:user) } - let!(:user2) { Factory(:user) } - let!(:user3) { Factory(:user) } + let!(:user1) { make_user } + let!(:user2) { make_user } + let!(:user3) { make_user } let!(:aspect) { user1.aspect(:name => "Old Work") } let(:aspect1) { user1.aspect(:name => "Work") } diff --git a/spec/lib/diaspora/importer_spec.rb b/spec/lib/diaspora/importer_spec.rb index 9d3197698..d79f8b089 100644 --- a/spec/lib/diaspora/importer_spec.rb +++ b/spec/lib/diaspora/importer_spec.rb @@ -10,11 +10,11 @@ describe Diaspora::Importer do before(:each) do # Five users on pod - @user1 = Factory(:user) - @user2 = Factory(:user) - @user3 = Factory(:user) - @user4 = Factory(:user) - @user5 = Factory(:user) + @user1 = make_user + @user2 = make_user + @user3 = make_user + @user4 = make_user + @user5 = make_user # Two external people referenced on pod @person1 = Factory(:person) diff --git a/spec/lib/diaspora/ostatus_builder.rb b/spec/lib/diaspora/ostatus_builder.rb index fd6131f6a..6c75348cb 100644 --- a/spec/lib/diaspora/ostatus_builder.rb +++ b/spec/lib/diaspora/ostatus_builder.rb @@ -8,7 +8,7 @@ require File.join(Rails.root, 'lib/diaspora/ostatus_builder') describe Diaspora::OstatusBuilder do - let!(:user) { Factory(:user) } + let!(:user) { make_user } let(:aspect) { user.aspect(:name => "Public People") } 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) } diff --git a/spec/lib/diaspora/parser_spec.rb b/spec/lib/diaspora/parser_spec.rb index dc1badc21..4be621c23 100644 --- a/spec/lib/diaspora/parser_spec.rb +++ b/spec/lib/diaspora/parser_spec.rb @@ -5,11 +5,11 @@ require 'spec_helper' describe Diaspora::Parser do - let(:user) { Factory.create(:user) } + let(:user) { make_user } let(:aspect) { user.aspect(:name => 'spies') } - let(:user2) { Factory.create(:user) } + let(:user2) { make_user } let(:aspect2) { user2.aspect(:name => "pandas") } - let(:user3) { Factory.create :user } + let(:user3) { make_user } let(:person) { user3.person } describe "parsing compliant XML object" do diff --git a/spec/lib/em-webfinger_spec.rb b/spec/lib/em-webfinger_spec.rb index bb6cdfecf..da60dabc2 100644 --- a/spec/lib/em-webfinger_spec.rb +++ b/spec/lib/em-webfinger_spec.rb @@ -7,8 +7,8 @@ require 'spec_helper' require File.join(Rails.root, 'lib/em-webfinger') describe EMWebfinger do - let(:user1) { Factory(:user) } - let(:user2) { Factory(:user) } + let(:user1) { make_user } + let(:user2) { make_user } let(:account) {"foo@tom.joindiaspora.com"} let(:person){ Factory(:person, :diaspora_handle => account)} diff --git a/spec/lib/encryptor_spec.rb b/spec/lib/encryptor_spec.rb index 277062c01..c277eb576 100644 --- a/spec/lib/encryptor_spec.rb +++ b/spec/lib/encryptor_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' describe 'user encryption' do before do - @user = Factory.create(:user) + @user = make_user @aspect = @user.aspect(:name => 'dudes') end diff --git a/spec/lib/message_handler_spec.rb b/spec/lib/message_handler_spec.rb index ab774b9e4..7be38567f 100644 --- a/spec/lib/message_handler_spec.rb +++ b/spec/lib/message_handler_spec.rb @@ -9,7 +9,6 @@ describe MessageHandler do unstub_mocha_stubs end after do - stub_sockets MessageHandler.any_instance.stubs(:add_post_request) end diff --git a/spec/lib/salmon_salmon_spec.rb b/spec/lib/salmon_salmon_spec.rb index 076e97c28..fbf64673d 100644 --- a/spec/lib/salmon_salmon_spec.rb +++ b/spec/lib/salmon_salmon_spec.rb @@ -5,9 +5,9 @@ require 'spec_helper' describe Salmon do - let(:user){Factory.create :user} - let(:user2) {Factory.create :user} - let(:user3) {Factory.create :user} + let(:user){make_user} + let(:user2) {make_user} + let(:user3) {make_user} 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)} diff --git a/spec/lib/verify_spec.rb b/spec/lib/verify_spec.rb index 03df9d026..515cd11af 100644 --- a/spec/lib/verify_spec.rb +++ b/spec/lib/verify_spec.rb @@ -7,9 +7,9 @@ require File.join(Rails.root, 'lib/diaspora/importer') describe Diaspora::Importer do - let!(:user1) { Factory(:user) } - let!(:user2) { Factory(:user) } - let!(:user3) { Factory(:user) } + let!(:user1) { make_user } + let!(:user2) { make_user } + let!(:user3) { make_user } let(:aspect1) { user1.aspect(:name => "Work") } let(:aspect2) { user2.aspect(:name => "Family") } @@ -24,7 +24,7 @@ describe Diaspora::Importer do context 'serialized user' do describe '#verify_user' do it 'should return true for a new valid user' do - new_user = Factory(:user) + new_user = make_user new_user.delete importer.verify_user(new_user).should be true end diff --git a/spec/lib/websocket_spec.rb b/spec/lib/websocket_spec.rb index 84001fc9f..92ecd1035 100644 --- a/spec/lib/websocket_spec.rb +++ b/spec/lib/websocket_spec.rb @@ -6,10 +6,9 @@ require 'spec_helper' describe Diaspora::WebSocket do before do - @user = Factory.create(:user) + @user = make_user @aspect = @user.aspect(:name => "losers") @post = @user.build_post(:status_message, :message => "hey", :to => @aspect.id) - unstub_sockets end it 'should queue a job' do diff --git a/spec/mailers/notifier_spec.rb b/spec/mailers/notifier_spec.rb index 88550680f..2fd26c4cc 100644 --- a/spec/mailers/notifier_spec.rb +++ b/spec/mailers/notifier_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe Notifier do - let!(:user) {Factory.create :user} + let!(:user) {make_user} let!(:aspect) {user.aspect(:name => "science")} let!(:person) {Factory.create :person} let!(:request_mail) {Notifier.new_request(user, person)} diff --git a/spec/misc_spec.rb b/spec/misc_spec.rb index 67f015d76..c62920588 100644 --- a/spec/misc_spec.rb +++ b/spec/misc_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' describe 'making sure the spec runner works' 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.person.owner_id.should == user.id end diff --git a/spec/models/album_spec.rb b/spec/models/album_spec.rb index e5b93593a..9bd0e86f8 100644 --- a/spec/models/album_spec.rb +++ b/spec/models/album_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' describe Album do - let(:user) { Factory.create(:user) } + let(:user) { make_user } let(:person) { user.person } let(:aspect) { user.aspect(:name => "Foo") } let(:album) { user.post(:album, :name => "test collection", :to => aspect.id) } diff --git a/spec/models/aspect_spec.rb b/spec/models/aspect_spec.rb index 5a179cce1..4c7eb2a87 100644 --- a/spec/models/aspect_spec.rb +++ b/spec/models/aspect_spec.rb @@ -5,16 +5,16 @@ require 'spec_helper' describe Aspect do - let(:user ) { Factory.create(:user) } + let(:user ) { make_user } let(:friend) { Factory.create(:person) } - let(:user2) { Factory.create(:user) } + let(:user2) { make_user } let(:friend_2) { Factory.create(:person) } let(:aspect) {user.aspect(:name => 'losers')} let(:aspect2) {user2.aspect(:name => 'failures')} let(:aspect1) {user.aspect(:name => 'cats')} let(:not_friend) { Factory(:person, :diaspora_handle => "not@person.com")} - let(:user3) {Factory(:user)} + let(:user3) {make_user} let(:aspect3) {user3.aspect(:name => "lala")} describe 'creation' do diff --git a/spec/models/comment_spec.rb b/spec/models/comment_spec.rb index b7eafb8d3..19f7fdd5e 100644 --- a/spec/models/comment_spec.rb +++ b/spec/models/comment_spec.rb @@ -5,10 +5,10 @@ require 'spec_helper' describe Comment do - let(:user) {Factory.create :user} + let(:user) {make_user} let(:aspect) {user.aspect(:name => "Doofuses")} - let(:user2) {Factory.create(:user)} + let(:user2) {make_user} let(:aspect2) {user2.aspect(:name => "Lame-faces")} it 'validates that the handle belongs to the person' do @@ -114,7 +114,7 @@ describe Comment do end describe 'serialization' do it 'should serialize the handle and not the sender' do - commenter = Factory.create(:user) + commenter = make_user commenter_aspect = commenter.aspect :name => "bruisers" friend_users(user, aspect, commenter, commenter_aspect) post = user.post :status_message, :message => "hello", :to => aspect.id diff --git a/spec/models/person_spec.rb b/spec/models/person_spec.rb index 7abf977cd..df871cba3 100644 --- a/spec/models/person_spec.rb +++ b/spec/models/person_spec.rb @@ -6,8 +6,8 @@ require 'spec_helper' describe Person do before do - @user = Factory.create(:user) - @user2 = Factory.create(:user) + @user = make_user + @user2 = make_user @person = Factory.create(:person) @aspect = @user.aspect(:name => "Dudes") @aspect2 = @user2.aspect(:name => "Abscence of Babes") @@ -24,7 +24,8 @@ describe Person do describe '#diaspora_handle' do context 'local people' 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 @@ -47,7 +48,7 @@ describe Person do end context '#real_name' do - let!(:user) { Factory(:user) } + let!(:user) { make_user } let!(:person) { user.person } let!(:profile) { person.profile } @@ -176,7 +177,7 @@ describe Person do end context 'people finders for webfinger' do - let(:user) {Factory(:user)} + let(:user) {make_user} let(:person) {Factory(:person)} describe '.by_account_identifier' do diff --git a/spec/models/photo_spec.rb b/spec/models/photo_spec.rb index 17fac6be2..86adb1c89 100644 --- a/spec/models/photo_spec.rb +++ b/spec/models/photo_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' describe Photo do before do - @user = Factory.create(:user) + @user = make_user @aspect = @user.aspect(:name => "losers") @album = @user.post :album, :name => "foo", :to => @aspect.id diff --git a/spec/models/post_spec.rb b/spec/models/post_spec.rb index 4c3daf4b6..a7e42ede4 100644 --- a/spec/models/post_spec.rb +++ b/spec/models/post_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' describe Post do before do - @user = Factory.create(:user) + @user = make_user end describe 'xml' do diff --git a/spec/models/request_spec.rb b/spec/models/request_spec.rb index 6e5dfbf57..a40ef1863 100644 --- a/spec/models/request_spec.rb +++ b/spec/models/request_spec.rb @@ -5,8 +5,8 @@ require 'spec_helper' describe Request do - let(:user) { Factory(:user) } - let(:user2) { Factory :user} + let(:user) { make_user } + let(:user2) { make_user} let(:person) {Factory :person} let(:aspect) { user.aspect(:name => "dudes") } let(:request){ user.send_friend_request_to user2.person, aspect } diff --git a/spec/models/retraction_spec.rb b/spec/models/retraction_spec.rb index 4cbb14e9e..cc34647f6 100644 --- a/spec/models/retraction_spec.rb +++ b/spec/models/retraction_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' describe Retraction do - let(:user) { Factory(:user) } + let(:user) { make_user } let(:person) { Factory(:person) } let(:aspect) { user.aspect(:name => "Bruisers") } let!(:activation) { user.activate_friend(person, aspect) } diff --git a/spec/models/status_message_spec.rb b/spec/models/status_message_spec.rb index 086d66e80..06f346e69 100644 --- a/spec/models/status_message_spec.rb +++ b/spec/models/status_message_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' describe StatusMessage do before do - @user = Factory.create(:user) + @user = make_user @aspect = @user.aspect(:name => "losers") end diff --git a/spec/models/user/attack_vectors_spec.rb b/spec/models/user/attack_vectors_spec.rb index f4ba9a104..0f7ecee5a 100644 --- a/spec/models/user/attack_vectors_spec.rb +++ b/spec/models/user/attack_vectors_spec.rb @@ -6,15 +6,15 @@ require 'spec_helper' describe "attack vectors" do - let(:user) { Factory(:user) } + let(:user) { make_user } 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(:user3) { Factory(:user) } + let(:user3) { make_user } let(:aspect3) { user3.aspect(:name => 'heroes') } before do diff --git a/spec/models/user/invite_spec.rb b/spec/models/user/invite_spec.rb index 21f4670a7..202f5f395 100644 --- a/spec/models/user/invite_spec.rb +++ b/spec/models/user/invite_spec.rb @@ -5,9 +5,9 @@ require 'spec_helper' describe User do - let(:inviter) {Factory.create :user} + let(:inviter) {make_user} 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(:inviter_with_3_invites) {Factory.create :user, :invites => 3} let(:aspect2) {inviter_with_3_invites.aspect(:name => "Jersey Girls")} diff --git a/spec/models/user/posting_spec.rb b/spec/models/user/posting_spec.rb index 5e1b115ae..24408e4c7 100644 --- a/spec/models/user/posting_spec.rb +++ b/spec/models/user/posting_spec.rb @@ -6,8 +6,8 @@ require 'spec_helper' describe User do - let!(:user) { Factory(:user) } - let!(:user2) { Factory(:user) } + let!(:user) { make_user } + let!(:user2) { make_user } let!(:aspect) { user.aspect(:name => 'heroes') } let!(:aspect1) { user.aspect(:name => 'other') } @@ -80,9 +80,9 @@ describe User do end context 'dispatching' do - let!(:user3) { Factory(:user) } + let!(:user3) { make_user } let!(:aspect3) { user3.aspect(:name => 'heroes') } - let!(:user4) { Factory(:user) } + let!(:user4) { make_user } let!(:aspect4) { user4.aspect(:name => 'heroes') } let!(:post) { user.build_post :status_message, :message => "hey" } diff --git a/spec/models/user/querying_spec.rb b/spec/models/user/querying_spec.rb index ad18eb89d..c21f88c4d 100644 --- a/spec/models/user/querying_spec.rb +++ b/spec/models/user/querying_spec.rb @@ -38,7 +38,7 @@ describe User do end context 'with two users' do - let!(:user) {Factory :user} + let!(:user) {make_user} let!(:first_aspect) {user.aspect(:name => 'bruisers')} let!(:second_aspect) {user.aspect(:name => 'losers')} @@ -58,7 +58,7 @@ describe User do end context 'with two users' do - let!(:user) {Factory :user} + let!(:user) {make_user} let!(:first_aspect) {user.aspect(:name => 'bruisers')} let!(:second_aspect) {user.aspect(:name => 'losers')} let!(:user4) { Factory.create(:user_with_aspect)} diff --git a/spec/models/user/receive_spec.rb b/spec/models/user/receive_spec.rb index f0068a32c..04500d40d 100644 --- a/spec/models/user/receive_spec.rb +++ b/spec/models/user/receive_spec.rb @@ -6,13 +6,13 @@ require 'spec_helper' describe User do - let(:user) { Factory(:user) } + let(:user) { make_user } let(:aspect) { user.aspect(:name => 'heroes') } - let(:user2) { Factory(:user) } + let(:user2) { make_user } let(:aspect2) { user2.aspect(:name => 'losers') } - let(:user3) { Factory(:user) } + let(:user3) { make_user } let(:aspect3) { user3.aspect(:name => 'heroes') } before do diff --git a/spec/models/user/user_friending_spec.rb b/spec/models/user/user_friending_spec.rb index 816e3c36b..1edd73993 100644 --- a/spec/models/user/user_friending_spec.rb +++ b/spec/models/user/user_friending_spec.rb @@ -6,7 +6,7 @@ require 'spec_helper' describe Diaspora::UserModules::Friending do - let(:user) { Factory.create :user } + let(:user) { make_user } let(:aspect) { user.aspect(:name => 'heroes') } let(:aspect1) { user.aspect(:name => 'other') } let(:friend) { Factory.create(:person) } @@ -15,7 +15,7 @@ describe Diaspora::UserModules::Friending do let(:person_two) { 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") } before do diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index e86b89e52..e9d31b59c 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -5,9 +5,9 @@ require 'spec_helper' describe User do - let(:user) { Factory(:user) } + let(:user) { make_user } let(:aspect) { user.aspect(:name => 'heroes') } - let(:user2) { Factory(:user) } + let(:user2) { make_user } let(:aspect2) { user2.aspect(:name => 'stuff') } it 'should have a key' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b8b78c002..37bde3f92 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -28,7 +28,6 @@ RSpec.configure do |config| DatabaseCleaner.orm = "mongo_mapper" config.before(:each) do - stub_sockets MessageHandler.any_instance.stubs(:add_post_request) DatabaseCleaner.clean UserFixer.load_user_fixtures From 581985990c80fa3800af796cf4e10e014929e7e9 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 29 Oct 2010 15:59:42 -0700 Subject: [PATCH 6/6] Delete no-longer-relevant spec, now down to master branch failures --- spec/models/user_spec.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index e9d31b59c..315484ab9 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -188,12 +188,6 @@ describe User do 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 it 'should be able to update their profile and send it to their friends' do updated_profile = {