Merge branch 'stable' into develop
This commit is contained in:
commit
351f54d74f
5 changed files with 8 additions and 9 deletions
|
|
@ -34,6 +34,7 @@ Ruby 2.0 is no longer officially supported.
|
||||||
* Improve the logging messages of Sidekiq messages [#5988](https://github.com/diaspora/diaspora/pull/5988)
|
* Improve the logging messages of Sidekiq messages [#5988](https://github.com/diaspora/diaspora/pull/5988)
|
||||||
* Improve the logging of Eyes output [#5989](https://github.com/diaspora/diaspora/pull/5989)
|
* Improve the logging of Eyes output [#5989](https://github.com/diaspora/diaspora/pull/5989)
|
||||||
* Gracefully handle XML parse errors within federation [#5991](https://github.com/diaspora/diaspora/pull/5991)
|
* Gracefully handle XML parse errors within federation [#5991](https://github.com/diaspora/diaspora/pull/5991)
|
||||||
|
* Remove zip-zip workaround gem [#6001](https://github.com/diaspora/diaspora/pull/6001)
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
* Disable auto follow back on aspect deletion [#5846](https://github.com/diaspora/diaspora/pull/5846)
|
* Disable auto follow back on aspect deletion [#5846](https://github.com/diaspora/diaspora/pull/5846)
|
||||||
|
|
|
||||||
6
Gemfile
6
Gemfile
|
|
@ -173,9 +173,9 @@ gem "rails-timeago", "2.11.0"
|
||||||
|
|
||||||
gem "logging-rails", "0.5.0", require: "logging/rails"
|
gem "logging-rails", "0.5.0", require: "logging/rails"
|
||||||
|
|
||||||
# Workarounds
|
# Reading and writing zip files
|
||||||
# https://github.com/rubyzip/rubyzip#important-note
|
|
||||||
gem "zip-zip"
|
gem "rubyzip", "1.1.7"
|
||||||
|
|
||||||
# Prevent occasions where minitest is not bundled in
|
# Prevent occasions where minitest is not bundled in
|
||||||
# packaged versions of ruby. See following issues/prs:
|
# packaged versions of ruby. See following issues/prs:
|
||||||
|
|
|
||||||
|
|
@ -718,8 +718,6 @@ GEM
|
||||||
will_paginate (3.0.7)
|
will_paginate (3.0.7)
|
||||||
xpath (2.0.0)
|
xpath (2.0.0)
|
||||||
nokogiri (~> 1.3)
|
nokogiri (~> 1.3)
|
||||||
zip-zip (0.3)
|
|
||||||
rubyzip (>= 1.0.0)
|
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
@ -830,6 +828,7 @@ DEPENDENCIES
|
||||||
rspec-rails (= 3.2.1)
|
rspec-rails (= 3.2.1)
|
||||||
rubocop (= 0.31.0)
|
rubocop (= 0.31.0)
|
||||||
ruby-oembed (= 0.8.14)
|
ruby-oembed (= 0.8.14)
|
||||||
|
rubyzip (= 1.1.7)
|
||||||
sass-rails (= 5.0.1)
|
sass-rails (= 5.0.1)
|
||||||
selenium-webdriver (= 2.45.0)
|
selenium-webdriver (= 2.45.0)
|
||||||
shoulda-matchers (= 2.8.0)
|
shoulda-matchers (= 2.8.0)
|
||||||
|
|
@ -851,4 +850,3 @@ DEPENDENCIES
|
||||||
uuid (= 2.3.7)
|
uuid (= 2.3.7)
|
||||||
webmock (= 1.21.0)
|
webmock (= 1.21.0)
|
||||||
will_paginate (= 3.0.7)
|
will_paginate (= 3.0.7)
|
||||||
zip-zip
|
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,7 @@ class User < ActiveRecord::Base
|
||||||
def perform_export_photos!
|
def perform_export_photos!
|
||||||
temp_zip = Tempfile.new([username, '_photos.zip'])
|
temp_zip = Tempfile.new([username, '_photos.zip'])
|
||||||
begin
|
begin
|
||||||
Zip::ZipOutputStream.open(temp_zip.path) do |zos|
|
Zip::OutputStream.open(temp_zip.path) do |zos|
|
||||||
photos.each do |photo|
|
photos.each do |photo|
|
||||||
begin
|
begin
|
||||||
photo_file = photo.unprocessed_image.file
|
photo_file = photo.unprocessed_image.file
|
||||||
|
|
|
||||||
|
|
@ -1065,14 +1065,14 @@ describe User, :type => :model do
|
||||||
expect(@user.exported_photos_at).to be_present
|
expect(@user.exported_photos_at).to be_present
|
||||||
expect(@user.exporting_photos).to be_falsey
|
expect(@user.exporting_photos).to be_falsey
|
||||||
expect(@user.exported_photos_file.filename).to match /.zip/
|
expect(@user.exported_photos_file.filename).to match /.zip/
|
||||||
expect(Zip::ZipFile.open(@user.exported_photos_file.path).entries.count).to eq(1)
|
expect(Zip::File.open(@user.exported_photos_file.path).entries.count).to eq(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not add empty entries when photo not found" do
|
it "does not add empty entries when photo not found" do
|
||||||
File.unlink @user.photos.first.unprocessed_image.path
|
File.unlink @user.photos.first.unprocessed_image.path
|
||||||
@user.perform_export_photos!
|
@user.perform_export_photos!
|
||||||
expect(@user.exported_photos_file.filename).to match /.zip/
|
expect(@user.exported_photos_file.filename).to match /.zip/
|
||||||
expect(Zip::ZipFile.open(@user.exported_photos_file.path).entries.count).to eq(0)
|
expect(Zip::File.open(@user.exported_photos_file.path).entries.count).to eq(0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue