Loading Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ * Display likes and reshares without login [#7583](https://github.com/diaspora/diaspora/pull/7583) * Fix invalid data in the database for user data export [#7614](https://github.com/diaspora/diaspora/pull/7614) * Fix local migration run without old private key [#7558](https://github.com/diaspora/diaspora/pull/7558) * Fix export not downloadable because the filename was resetted on access [#7622](https://github.com/diaspora/diaspora/pull/7622) ## Features * Ask for confirmation when leaving a submittable comment field [#7530](https://github.com/diaspora/diaspora/pull/7530) Loading app/uploaders/exported_photos.rb +0 −4 Original line number Diff line number Diff line Loading @@ -5,7 +5,6 @@ # the COPYRIGHT file. class ExportedPhotos < SecureUploader def store_dir "uploads/users" end Loading @@ -13,7 +12,4 @@ class ExportedPhotos < SecureUploader def filename "#{model.username}_photos_#{secure_token}.zip" if original_filename.present? end end app/uploaders/exported_user.rb +1 −1 Original line number Diff line number Diff line Loading @@ -14,6 +14,6 @@ class ExportedUser < SecureUploader end def filename "#{model.username}_diaspora_data_#{secure_token}.json.gz" "#{model.username}_diaspora_data_#{secure_token}.json.gz" if original_filename.present? end end spec/models/user_spec.rb +11 −0 Original line number Diff line number Diff line Loading @@ -981,6 +981,17 @@ describe User, :type => :model do end end describe "#export" do it "doesn't change the filename when the user is saved" do user = FactoryGirl.create(:user) filename = user.export.filename user.save! expect(User.find(user.id).export.filename).to eq(filename) end end describe "queue_export" do it "queues up a job to perform the export" do user = FactoryGirl.create(:user) Loading Loading
Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ * Display likes and reshares without login [#7583](https://github.com/diaspora/diaspora/pull/7583) * Fix invalid data in the database for user data export [#7614](https://github.com/diaspora/diaspora/pull/7614) * Fix local migration run without old private key [#7558](https://github.com/diaspora/diaspora/pull/7558) * Fix export not downloadable because the filename was resetted on access [#7622](https://github.com/diaspora/diaspora/pull/7622) ## Features * Ask for confirmation when leaving a submittable comment field [#7530](https://github.com/diaspora/diaspora/pull/7530) Loading
app/uploaders/exported_photos.rb +0 −4 Original line number Diff line number Diff line Loading @@ -5,7 +5,6 @@ # the COPYRIGHT file. class ExportedPhotos < SecureUploader def store_dir "uploads/users" end Loading @@ -13,7 +12,4 @@ class ExportedPhotos < SecureUploader def filename "#{model.username}_photos_#{secure_token}.zip" if original_filename.present? end end
app/uploaders/exported_user.rb +1 −1 Original line number Diff line number Diff line Loading @@ -14,6 +14,6 @@ class ExportedUser < SecureUploader end def filename "#{model.username}_diaspora_data_#{secure_token}.json.gz" "#{model.username}_diaspora_data_#{secure_token}.json.gz" if original_filename.present? end end
spec/models/user_spec.rb +11 −0 Original line number Diff line number Diff line Loading @@ -981,6 +981,17 @@ describe User, :type => :model do end end describe "#export" do it "doesn't change the filename when the user is saved" do user = FactoryGirl.create(:user) filename = user.export.filename user.save! expect(User.find(user.id).export.filename).to eq(filename) end end describe "queue_export" do it "queues up a job to perform the export" do user = FactoryGirl.create(:user) Loading