diff --git a/Gemfile b/Gemfile index b145c64dc..df245a480 100644 --- a/Gemfile +++ b/Gemfile @@ -49,16 +49,10 @@ group :test do gem 'rspec', '>= 2.0.0.beta.17' gem 'rspec-rails', '2.0.0.beta.17' gem 'mocha' - gem 'redgreen' if RUBY_VERSION.include? "1.8" - gem 'autotest' gem 'database_cleaner' gem 'webmock' end -group :development do - gem 'nifty-generators' -end - group :deployment do gem 'sprinkle', :git => 'git://github.com/rsofaer/sprinkle.git' end diff --git a/Gemfile.lock b/Gemfile.lock index d56eddfee..f7f234783 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -98,7 +98,6 @@ GEM addressable (2.2.1) arel (1.0.1) activesupport (~> 3.0.0) - autotest (4.3.2) aws (2.3.21) http_connection uuidtools @@ -179,7 +178,6 @@ GEM net-ssh (2.0.23) net-ssh-gateway (1.0.1) net-ssh (>= 1.99.1) - nifty-generators (0.4.0) nokogiri (1.4.3.1) plucky (0.3.5) mongo (~> 1.0.8) @@ -206,7 +204,6 @@ GEM rake (>= 0.8.4) thor (~> 0.14.0) rake (0.8.7) - redgreen (1.2.2) rest-client (1.6.1) mime-types (>= 1.16) rspec (2.0.0.beta.22) @@ -261,7 +258,6 @@ PLATFORMS DEPENDENCIES addressable - autotest aws bson (= 1.0.7) bson_ext (= 1.0.7) @@ -281,11 +277,9 @@ DEPENDENCIES mini_magick mocha mongo_mapper! - nifty-generators pubsubhubbub rails (= 3.0.0) redfinger! - redgreen roxml! rspec (>= 2.0.0.beta.17) rspec-rails (= 2.0.0.beta.17) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 0ee354dfb..ac22a32b7 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -59,7 +59,7 @@ class UsersController < ApplicationController def export exporter = Diaspora::Exporter.new(Diaspora::Exporters::XML) - render :xml => exporter.execute(current_user) + send_data exporter.execute(current_user), :filename => "#{current_user.username}_diaspora_data.xml", :type => :xml end private diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index 81fc639e7..e3fdca4ff 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -19,11 +19,15 @@ - content_for :left_pane do %ul#settings_nav %li=link_to 'Profile', '#', :class => 'profile' + %li=link_to 'Account', '#', :class => 'account' %li=link_to 'Services', '#', :class => 'services' #profile.settings_pane{:style=>"display:block;"} = render 'users/profile' +#account.settings_pane + = link_to "download my stuff", users_export_path, :class => "button" + #services.settings_pane = render 'users/services' diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index 0352d2bf2..69c4b6df3 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -11,6 +11,14 @@ describe UsersController do @user.aspect(:name => "lame-os") end + describe '#export' do + it 'should return an xml file' do + get :export + response.header["Content-Type"].should include "application/xml" + end + end + + describe '#update' do context 'with a profile photo set' do before do