dg rs; seed bob with facebook friends & fixed invitation view

This commit is contained in:
danielgrippi 2011-08-12 15:05:58 -07:00
parent 38a8962945
commit 7b85dcec9c
4 changed files with 19 additions and 17 deletions

View file

@ -1,10 +1,7 @@
-if AppConfig[:open_invitations] - if AppConfig.configured_services.include?('facebook')
- if AppConfig.configured_services.include?('facebook') - if defined? remote
- if defined? remote = link_to t('.from_facebook'), friend_finder_path('facebook', :remote => remote), :rel => 'facebox'
= link_to t('.from_facebook'), friend_finder_path('facebook', :remote => remote), :rel => 'facebox' -else
-else = link_to t('.from_facebook'), friend_finder_path('facebook'), :rel => 'facebox'
= link_to t('.from_facebook'), friend_finder_path('facebook'), :rel => 'facebox' %br
%br = link_to t('.by_email'), new_user_invitation_path, :title => t('.invite_someone'), :rel => 'facebox'
= link_to t('.by_email'), new_user_invitation_path, :title => t('.invite_someone'), :rel => 'facebox'
- else
= t('.dont_have_now')

View file

@ -3,7 +3,7 @@
-# the COPYRIGHT file. -# the COPYRIGHT file.
- unless AppConfig[:invites_off] - if AppConfig[:open_invitations]
.section .section
.title .title
= image_tag('/images/icons/plus.png') = image_tag('/images/icons/plus.png')

View file

@ -39,12 +39,10 @@ connect_users(bob, bob.aspects.first, alice, alice.aspects.first)
connect_users(bob, bob.aspects.first, eve, eve.aspects.first) connect_users(bob, bob.aspects.first, eve, eve.aspects.first)
puts "done!" puts "done!"
# Uncomment these and return out of Service::Facebook#save_friends print "Adding Facebook contacts... "
#service = Service.new(:user_id => bob.id) facebook = Factory(:service, :type => 'Services::Facebook', :user_id => bob.id)
#service.type = "Services::Facebook" ServiceUser.import((1..10).map{|n| Factory.build(:service_user, :service => facebook) })
#service.access_token = "abc123" puts "done!"
#service.save!
#su = ServiceUser.create!(:service_id => service.id, :photo_url => "/images/user/angela.jpg", :uid => "abc123", :name => "Angelica")
require 'spec/support/fake_resque' require 'spec/support/fake_resque'
require 'spec/support/fake_redis' require 'spec/support/fake_redis'

View file

@ -105,6 +105,13 @@ Factory.define :service do |service|
service.sequence(:access_secret) { |token| "98765#{token}" } service.sequence(:access_secret) { |token| "98765#{token}" }
end end
Factory.define :service_user do |s_user|
s_user.sequence(:uid) { |id| "a#{id}"}
s_user.sequence(:name) { |num| "Rob Fergus the #{num.ordinalize}" }
s_user.association :service
s_user.photo_url "/images/user/adams.jpg"
end
Factory.define(:comment) do |comment| Factory.define(:comment) do |comment|
comment.sequence(:text) {|n| "#{n} cats"} comment.sequence(:text) {|n| "#{n} cats"}
comment.association(:author, :factory => :person) comment.association(:author, :factory => :person)