diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 2eec8cf23..76fd30729 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -21,7 +21,7 @@ class ApplicationController < ActionController::Base
protect_from_forgery :except => :receive
- before_filter :set_friends_and_status
+ before_filter :set_friends_and_status, :except => [:create, :update]
before_filter :count_requests
layout :layout_by_resource
diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb
index e8dd82889..e7c07d0ef 100644
--- a/app/controllers/aspects_controller.rb
+++ b/app/controllers/aspects_controller.rb
@@ -31,7 +31,7 @@ class AspectsController < ApplicationController
def create
@aspect = current_user.aspect params[:aspect]
flash[:notice] = "Click on the plus on the left side to tell Diaspora who can see your new aspect."
- respond_with :location => edit_aspect_path(@aspect)
+ respond_with :location => aspects_manage_path
end
def new
diff --git a/app/views/shared/_aspect_friends.haml b/app/views/shared/_aspect_friends.haml
index 137fea38d..71c41ef6a 100644
--- a/app/views/shared/_aspect_friends.haml
+++ b/app/views/shared/_aspect_friends.haml
@@ -21,7 +21,13 @@
- for friend in @friends
= person_image_link(friend)
- - unless @aspect == :all
+ -unless @aspect == :all
= link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button'
+ .yo{:style => 'display:none'}
+ #add_request_pane
+ = render "requests/new_request", :aspect => @aspect
+ -else
+ .clear
+ = link_to "add friends", aspects_manage_path
diff --git a/spec/fixtures/evan_hcard b/spec/fixtures/evan_hcard
new file mode 100644
index 000000000..d34408759
--- /dev/null
+++ b/spec/fixtures/evan_hcard
@@ -0,0 +1,72 @@
+
+
+
+
+
+ - Local views
+
+
+
+
Evan Prodromou
+
+
+
+
User profile
+
+ - Photo
+ -
+
+
+
+
+
+ - Nickname
+ -
+ evan
+
+
+
+ - Full name
+
+ -
+ Evan Prodromou
+
+
+
+ - Location
+ - Montreal, QC, Canada
+
+
+
+ - URL
+ -
+ http://evan.prodromou.name/
+
+
+
+ - Note
+ - Montreal hacker and entrepreneur. Founder of identi.ca, lead developer of StatusNet, CEO of StatusNet Inc.
+
+
+
+
+
+
+
+
+
diff --git a/spec/fixtures/finger_xrd b/spec/fixtures/finger_xrd
new file mode 100644
index 000000000..d897925e5
--- /dev/null
+++ b/spec/fixtures/finger_xrd
@@ -0,0 +1,9 @@
+
+
+ acct:tom@tom.joindiaspora.com
+ "http://tom.joindiaspora.com/"
+
+
+
+
+
diff --git a/spec/fixtures/hcard_response b/spec/fixtures/hcard_response
new file mode 100644
index 000000000..d87957a93
--- /dev/null
+++ b/spec/fixtures/hcard_response
@@ -0,0 +1,44 @@
+
+
Alexander Hamiltom
+
+
+
User profile
+
+ - Nickname
+ -
+ Alexander Hamiltom
+
+
+
+ - Full name
+ -
+ Alexander
+
+
+
+
+ - Full name
+ -
+ Hamiltom
+
+
+
+ - Full name
+ -
+ Alexander Hamiltom
+
+
+
+ - URL
+ -
+ http://tom.joindiaspora.com/
+
+
+
+ - Note
+ - Diaspora is awesome! vi is better than emacs!
+
+
+
+
+
diff --git a/spec/fixtures/host_xrd b/spec/fixtures/host_xrd
new file mode 100644
index 000000000..dcb67d767
--- /dev/null
+++ b/spec/fixtures/host_xrd
@@ -0,0 +1,7 @@
+
+
+
+ Resource Descriptor
+
+
diff --git a/spec/fixtures/nonseed_finger_xrd b/spec/fixtures/nonseed_finger_xrd
new file mode 100644
index 000000000..b26e7d15d
--- /dev/null
+++ b/spec/fixtures/nonseed_finger_xrd
@@ -0,0 +1,15 @@
+
+ acct:evan@status.net
+ acct:evan@evan.status.net
+ http://evan.status.net/user/1
+
+
+
+
+
+
+
+
+
+
+
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 8f0da07a4..3e3cdfe77 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -114,174 +114,21 @@ end
end
def host_xrd
- <<-XML
-
-
-
- Resource Descriptor
-
-
- XML
+ File.open(File.dirname(__FILE__) + '/fixtures/host_xrd').read
end
def finger_xrd
- <<-XML
-
-
- acct:tom@tom.joindiaspora.com
- "http://tom.joindiaspora.com/"
-
-
-
-
-
- XML
+ File.open(File.dirname(__FILE__) + '/fixtures/finger_xrd').read
end
def hcard_response
- <<-FOO
-
-
Alexander Hamiltom
-
-
-
User profile
-
- - Nickname
- -
- Alexander Hamiltom
-
-
-
- - Full name
- -
- Alexander
-
-
-
-
- - Full name
- -
- Hamiltom
-
-
-
- - Full name
- -
- Alexander Hamiltom
-
-
-
- - URL
- -
- http://tom.joindiaspora.com/
-
-
-
- - Note
- - Diaspora is awesome! vi is better than emacs!
-
-
-
-
-
-
- FOO
+ File.open(File.dirname(__FILE__) + '/fixtures/hcard_response').read
end
def nonseed_finger_xrd
- <<-XML
-
- acct:evan@status.net
- acct:evan@evan.status.net
- http://evan.status.net/user/1
-
-
-
-
-
-
-
-
-
-
-
- XML
+ File.open(File.dirname(__FILE__) + '/fixtures/nonseed_finger_xrd').read
end
def evan_hcard
- <<-HCARD
-
-
-
-
-
- - Local views
-
-
-
-
Evan Prodromou
-
-
-
-
User profile
-
- - Photo
- -
-
-
-
-
-
- - Nickname
- -
- evan
-
-
-
- - Full name
-
- -
- Evan Prodromou
-
-
-
- - Location
- - Montreal, QC, Canada
-
-
-
- - URL
- -
- http://evan.prodromou.name/
-
-
-
- - Note
- - Montreal hacker and entrepreneur. Founder of identi.ca, lead developer of StatusNet, CEO of StatusNet Inc.
-
-
-
-
-
-
-
-
-
- HCARD
-
+ File.open(File.dirname(__FILE__) + '/fixtures/evan_hcard').read
end