Merge branch 'master' of github.com:diaspora/diaspora

This commit is contained in:
maxwell 2010-08-24 14:40:50 -07:00
commit 13253d3591
2 changed files with 16 additions and 1 deletions

View file

@ -37,6 +37,8 @@ def warzombie
def zombiefriendaccept
render :nothing => true
set_profile_photo
Request.all.each{|r|
current_user.accept_and_respond(r.id, current_user.groups.first.id)
}
@ -54,4 +56,15 @@ def warzombie
file.write(seed_num_hash.to_yaml)
file.close
end
def set_profile_photo
album = current_user.post(:album, :name => "Profile Photos")
backer_number = YAML.load_file(Rails.root.join('config','backer_number.yml'))[:seed_number].to_i
username = backer_info[backer_number]['username'].gsub(/ /,'').downcase
photo = current_user.post(:photo, :album_id => album.id,
:user_file => "public/images/users/#{username}.jpg")
current_user.update_profile(:image_url => photo.url)
end
end

View file

@ -19,10 +19,12 @@ def create
:password => "#{username+backer_info[backer_number]['pin'].to_s}",
:person => Person.new(
:email => "#{username}@#{username}.joindiaspora.com",
:profile => Profile.new( :first_name => backer_info[backer_number]['given_name'], :last_name => backer_info[backer_number]['family_name'] ),
:profile => Profile.new( :first_name => backer_info[backer_number]['given_name'], :last_name => backer_info[backer_number]['family_name'],
:image_url => "http://#{username}.joindiaspora.com/images/users/#{username}.jpg"),
:url=> "http://#{username}.joindiaspora.com/")
)
user.person.save
user.group(:name => "Presidents")
end