From d3d66f30c3af297c2e0b314e11920e0dad7398d0 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 01:32:39 +0200 Subject: [PATCH 01/29] Bump ruby versions on travis closes #7616 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e4b310171..966101451 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: ruby rvm: - - 2.4.1 - - 2.3.4 + - 2.4.2 + - 2.3.5 env: - DB=postgresql BUILD_TYPE=cucumber From c7a3d85c83ef93acc64c0be16dcb1c9a7ded8d8c Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sun, 17 Sep 2017 19:48:22 +0200 Subject: [PATCH 02/29] Set TargetRubyVersion in .rubocop.yml [ci skip] closes #7621 --- .rubocop.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 57d22e083..896e50f7a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,5 @@ AllCops: + TargetRubyVersion: 2.3 Exclude: - "bin/**/*" - "db/schema.rb" @@ -167,9 +168,3 @@ Style/NumericPredicate: # Reset some HoundCI changes back to Rubocop defaults Layout/DotPosition: EnforcedStyle: leading - -### backward compatibility - -# only with ruby >= 2.4 -Performance/RegexpMatch: - Enabled: false From f012a1380918b0921bdd43f63bedc35b1ff322d2 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 03:53:46 +0200 Subject: [PATCH 03/29] Bump rails --- Gemfile | 2 +- Gemfile.lock | 74 ++++++++++++++++++++++++++-------------------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/Gemfile b/Gemfile index 59bfb5d91..d4d90e81c 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "rails", "5.1.3" +gem "rails", "5.1.4" # Legacy Rails features, remove me! # responders (class level) diff --git a/Gemfile.lock b/Gemfile.lock index 54c6372cf..65468f9a5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,25 +2,25 @@ GEM remote: https://rubygems.org/ remote: https://rails-assets.org/ specs: - actioncable (5.1.3) - actionpack (= 5.1.3) + actioncable (5.1.4) + actionpack (= 5.1.4) nio4r (~> 2.0) websocket-driver (~> 0.6.1) - actionmailer (5.1.3) - actionpack (= 5.1.3) - actionview (= 5.1.3) - activejob (= 5.1.3) + actionmailer (5.1.4) + actionpack (= 5.1.4) + actionview (= 5.1.4) + activejob (= 5.1.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.1.3) - actionview (= 5.1.3) - activesupport (= 5.1.3) + actionpack (5.1.4) + actionview (= 5.1.4) + activesupport (= 5.1.4) rack (~> 2.0) - rack-test (~> 0.6.3) + rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.1.3) - activesupport (= 5.1.3) + actionview (5.1.4) + activesupport (= 5.1.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -28,18 +28,18 @@ GEM active_model_serializers (0.9.7) activemodel (>= 3.2) concurrent-ruby (~> 1.0) - activejob (5.1.3) - activesupport (= 5.1.3) + activejob (5.1.4) + activesupport (= 5.1.4) globalid (>= 0.3.6) - activemodel (5.1.3) - activesupport (= 5.1.3) - activerecord (5.1.3) - activemodel (= 5.1.3) - activesupport (= 5.1.3) + activemodel (5.1.4) + activesupport (= 5.1.4) + activerecord (5.1.4) + activemodel (= 5.1.4) + activesupport (= 5.1.4) arel (~> 8.0) activerecord-import (0.19.1) activerecord (>= 3.2) - activesupport (5.1.3) + activesupport (5.1.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) @@ -491,19 +491,19 @@ GEM rack-rewrite (1.5.1) rack-ssl (1.4.1) rack - rack-test (0.6.3) - rack (>= 1.0) - rails (5.1.3) - actioncable (= 5.1.3) - actionmailer (= 5.1.3) - actionpack (= 5.1.3) - actionview (= 5.1.3) - activejob (= 5.1.3) - activemodel (= 5.1.3) - activerecord (= 5.1.3) - activesupport (= 5.1.3) + rack-test (0.7.0) + rack (>= 1.0, < 3) + rails (5.1.4) + actioncable (= 5.1.4) + actionmailer (= 5.1.4) + actionpack (= 5.1.4) + actionview (= 5.1.4) + activejob (= 5.1.4) + activemodel (= 5.1.4) + activerecord (= 5.1.4) + activesupport (= 5.1.4) bundler (>= 1.3.0) - railties (= 5.1.3) + railties (= 5.1.4) sprockets-rails (>= 2.0.0) rails-assets-autosize (4.0.0) rails-assets-backbone (1.3.3) @@ -566,16 +566,16 @@ GEM rails-timeago (2.16.0) actionpack (>= 3.1) activesupport (>= 3.1) - railties (5.1.3) - actionpack (= 5.1.3) - activesupport (= 5.1.3) + railties (5.1.4) + actionpack (= 5.1.4) + activesupport (= 5.1.4) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.2.2) rake raindrops (0.19.0) - rake (12.0.0) + rake (12.1.0) rb-fsevent (0.10.2) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) @@ -842,7 +842,7 @@ DEPENDENCIES rack-piwik (= 0.3.0) rack-rewrite (= 1.5.1) rack-ssl (= 1.4.1) - rails (= 5.1.3) + rails (= 5.1.4) rails-assets-autosize (= 4.0.0)! rails-assets-backbone (= 1.3.3)! rails-assets-blueimp-gallery (= 2.25.2)! From 6543e1c20078928956326f11860a978eb71f1d58 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 03:55:36 +0200 Subject: [PATCH 04/29] Bump activerecord-import --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index d4d90e81c..ba00517dd 100644 --- a/Gemfile +++ b/Gemfile @@ -72,7 +72,7 @@ group :postgresql, optional: true do end -gem "activerecord-import", "0.19.1" +gem "activerecord-import", "0.20.1" # File uploading diff --git a/Gemfile.lock b/Gemfile.lock index 65468f9a5..195c18b18 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -37,7 +37,7 @@ GEM activemodel (= 5.1.4) activesupport (= 5.1.4) arel (~> 8.0) - activerecord-import (0.19.1) + activerecord-import (0.20.1) activerecord (>= 3.2) activesupport (5.1.4) concurrent-ruby (~> 1.0, >= 1.0.2) @@ -764,7 +764,7 @@ PLATFORMS DEPENDENCIES active_model_serializers (= 0.9.7) - activerecord-import (= 0.19.1) + activerecord-import (= 0.20.1) acts-as-taggable-on (= 5.0.0) acts_as_api (= 1.0.1) addressable (= 2.5.1) From 8d01a1d3891c98335ddc345dc1274b8d8e96ad2c Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 03:57:33 +0200 Subject: [PATCH 05/29] Bump addressable --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index ba00517dd..2c742af4d 100644 --- a/Gemfile +++ b/Gemfile @@ -177,7 +177,7 @@ gem "acts-as-taggable-on", "5.0.0" # URIs and HTTP -gem "addressable", "2.5.1", require: "addressable/uri" +gem "addressable", "2.5.2", require: "addressable/uri" gem "faraday", "0.11.0" # also update User-Agent in OpenID specs gem "faraday_middleware", "0.11.0.1" gem "faraday-cookie_jar", "0.0.6" diff --git a/Gemfile.lock b/Gemfile.lock index 195c18b18..305c1368e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -50,8 +50,8 @@ GEM activemodel (>= 3.0.0) activesupport (>= 3.0.0) rack (>= 1.1.0) - addressable (2.5.1) - public_suffix (~> 2.0, >= 2.0.2) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) arel (8.0.0) asset_sync (2.2.0) activemodel (>= 4.1.0) @@ -471,7 +471,7 @@ GEM pry-byebug (3.4.2) byebug (~> 9.0) pry (~> 0.10) - public_suffix (2.0.5) + public_suffix (3.0.0) rack (2.0.3) rack-cors (1.0.1) rack-google-analytics (1.2.0) @@ -767,7 +767,7 @@ DEPENDENCIES activerecord-import (= 0.20.1) acts-as-taggable-on (= 5.0.0) acts_as_api (= 1.0.1) - addressable (= 2.5.1) + addressable (= 2.5.2) asset_sync (= 2.2.0) autoprefixer-rails (= 7.1.2.4) bootstrap-sass (= 3.3.7) From 9a3faa89177881926a392bbcd1158c36dbf35447 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 04:00:15 +0200 Subject: [PATCH 06/29] Bump autoprefixer-rails --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 2c742af4d..e2b1bab79 100644 --- a/Gemfile +++ b/Gemfile @@ -55,7 +55,7 @@ gem "rack-cors", "1.0.1", require: "rack/cors" # CSS -gem "autoprefixer-rails", "7.1.2.4" +gem "autoprefixer-rails", "7.1.4.1" gem "bootstrap-sass", "3.3.7" gem "bootstrap-switch-rails", "3.3.3" gem "compass-rails", "3.0.2" diff --git a/Gemfile.lock b/Gemfile.lock index 305c1368e..aaa1225d0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -60,7 +60,7 @@ GEM unf ast (2.3.0) attr_required (1.0.1) - autoprefixer-rails (7.1.2.4) + autoprefixer-rails (7.1.4.1) execjs bcrypt (3.1.11) bindata (2.4.0) @@ -769,7 +769,7 @@ DEPENDENCIES acts_as_api (= 1.0.1) addressable (= 2.5.2) asset_sync (= 2.2.0) - autoprefixer-rails (= 7.1.2.4) + autoprefixer-rails (= 7.1.4.1) bootstrap-sass (= 3.3.7) bootstrap-switch-rails (= 3.3.3) capybara (= 2.15.1) From c8f24dd872f7b52a7b159873d5ed8b5cac446e0c Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 04:03:40 +0200 Subject: [PATCH 07/29] Bump faraday_middleware --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index e2b1bab79..0111e1d27 100644 --- a/Gemfile +++ b/Gemfile @@ -179,7 +179,7 @@ gem "acts-as-taggable-on", "5.0.0" gem "addressable", "2.5.2", require: "addressable/uri" gem "faraday", "0.11.0" # also update User-Agent in OpenID specs -gem "faraday_middleware", "0.11.0.1" +gem "faraday_middleware", "0.12.2" gem "faraday-cookie_jar", "0.0.6" gem "typhoeus", "1.1.2" diff --git a/Gemfile.lock b/Gemfile.lock index aaa1225d0..48fa77609 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -214,7 +214,7 @@ GEM faraday-cookie_jar (0.0.6) faraday (>= 0.7.4) http-cookie (~> 1.0.0) - faraday_middleware (0.11.0.1) + faraday_middleware (0.12.2) faraday (>= 0.7.4, < 1.0) ffi (1.9.18) fixture_builder (0.5.0) @@ -791,7 +791,7 @@ DEPENDENCIES factory_girl_rails (= 4.8.0) faraday (= 0.11.0) faraday-cookie_jar (= 0.0.6) - faraday_middleware (= 0.11.0.1) + faraday_middleware (= 0.12.2) fixture_builder (= 0.5.0) fog-aws (= 1.4.0) fuubar (= 2.2.0) From 769abf6948cdfdfe1eb296fa08bcf38bd4083fe9 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 04:07:07 +0200 Subject: [PATCH 08/29] Bump fog-aws --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 0111e1d27..a42c30e34 100644 --- a/Gemfile +++ b/Gemfile @@ -77,7 +77,7 @@ gem "activerecord-import", "0.20.1" # File uploading gem "carrierwave", "1.1.0" -gem "fog-aws", "1.4.0" +gem "fog-aws", "1.4.1" gem "mini_magick", "4.8.0" # GUID generation diff --git a/Gemfile.lock b/Gemfile.lock index 48fa77609..4832aa819 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -195,7 +195,7 @@ GEM tzinfo ethon (0.10.1) ffi (>= 1.3.0) - excon (0.58.0) + excon (0.59.0) execjs (2.7.0) eye (0.9.2) celluloid (~> 0.17.3) @@ -220,7 +220,7 @@ GEM fixture_builder (0.5.0) activerecord (>= 2) activesupport (>= 2) - fog-aws (1.4.0) + fog-aws (1.4.1) fog-core (~> 1.38) fog-json (~> 1.0) fog-xml (~> 0.1) @@ -379,7 +379,7 @@ GEM mobile-fu (1.4.0) rack-mobile-detect rails - multi_json (1.12.1) + multi_json (1.12.2) multi_test (0.1.2) multi_xml (0.6.0) multipart-post (2.0.0) @@ -793,7 +793,7 @@ DEPENDENCIES faraday-cookie_jar (= 0.0.6) faraday_middleware (= 0.12.2) fixture_builder (= 0.5.0) - fog-aws (= 1.4.0) + fog-aws (= 1.4.1) fuubar (= 2.2.0) gon (= 6.1.0) guard (= 2.14.1) From aac57a926b6319eb97fca8ba2d88075a4b4a69a1 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 04:16:54 +0200 Subject: [PATCH 09/29] Bump js-routes --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index a42c30e34..ad9315c87 100644 --- a/Gemfile +++ b/Gemfile @@ -91,7 +91,7 @@ gem "entypo-rails", "3.0.0" gem "handlebars_assets", "0.23.2" gem "jquery-rails", "4.3.1" -gem "js-routes", "1.3.3" +gem "js-routes", "1.4.1" gem "js_image_paths", "0.1.1" source "https://rails-assets.org" do diff --git a/Gemfile.lock b/Gemfile.lock index 4832aa819..44ea386f3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -324,7 +324,7 @@ GEM rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - js-routes (1.3.3) + js-routes (1.4.1) railties (>= 3.2) sprockets-rails js_image_paths (0.1.1) @@ -808,7 +808,7 @@ DEPENDENCIES jasmine (= 2.7.0) jasmine-jquery-rails (= 2.0.3) jquery-rails (= 4.3.1) - js-routes (= 1.3.3) + js-routes (= 1.4.1) js_image_paths (= 0.1.1) json (= 2.1.0) json-schema (= 2.8.0) From eac9e8fd9755e6e3dc61a64dc57011a03a03d9b3 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 04:25:37 +0200 Subject: [PATCH 10/29] Bump secure_headers --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index ad9315c87..af98eb4ec 100644 --- a/Gemfile +++ b/Gemfile @@ -149,7 +149,7 @@ gem "string-direction", "1.2.0" # Security Headers -gem "secure_headers", "3.6.7" +gem "secure_headers", "3.7.1" # Services diff --git a/Gemfile.lock b/Gemfile.lock index 44ea386f3..26385dbac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -635,7 +635,7 @@ GEM scss_lint (0.54.0) rake (>= 0.9, < 13) sass (~> 3.4.20) - secure_headers (3.6.7) + secure_headers (3.7.1) useragent securecompare (1.0.0) shellany (0.0.1) @@ -878,7 +878,7 @@ DEPENDENCIES ruby-oembed (= 0.12.0) rubyzip (= 1.2.1) sass-rails (= 5.0.6) - secure_headers (= 3.6.7) + secure_headers (= 3.7.1) shoulda-matchers (= 3.1.2) sidekiq (= 5.0.4) sidekiq-cron (= 0.6.3) From e607057138e614caf8093f556d0e4d81bb1f2606 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 04:27:22 +0200 Subject: [PATCH 11/29] Bump sprockets-rails --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index af98eb4ec..22a440067 100644 --- a/Gemfile +++ b/Gemfile @@ -60,7 +60,7 @@ gem "bootstrap-sass", "3.3.7" gem "bootstrap-switch-rails", "3.3.3" gem "compass-rails", "3.0.2" gem "sass-rails", "5.0.6" -gem "sprockets-rails", "3.2.0" +gem "sprockets-rails", "3.2.1" # Database diff --git a/Gemfile.lock b/Gemfile.lock index 26385dbac..1a9c02c24 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -670,7 +670,7 @@ GEM sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.0) + sprockets-rails (3.2.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) @@ -888,7 +888,7 @@ DEPENDENCIES spring (= 2.0.2) spring-commands-cucumber (= 1.0.1) spring-commands-rspec (= 1.0.4) - sprockets-rails (= 3.2.0) + sprockets-rails (= 3.2.1) string-direction (= 1.2.0) timecop (= 0.9.1) turbo_dev_assets (= 0.0.2) From edfab735890d69a1e188f43113c1a0acf84531c4 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 04:29:40 +0200 Subject: [PATCH 12/29] Bump typhoeus --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 22a440067..52c4bdff0 100644 --- a/Gemfile +++ b/Gemfile @@ -181,7 +181,7 @@ gem "addressable", "2.5.2", require: "addressable/uri" gem "faraday", "0.11.0" # also update User-Agent in OpenID specs gem "faraday_middleware", "0.12.2" gem "faraday-cookie_jar", "0.0.6" -gem "typhoeus", "1.1.2" +gem "typhoeus", "1.3.0" # Views diff --git a/Gemfile.lock b/Gemfile.lock index 1a9c02c24..fee7519d9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -710,7 +710,7 @@ GEM simple_oauth (~> 0.3.1) twitter-text (1.14.7) unf (~> 0.1.0) - typhoeus (1.1.2) + typhoeus (1.3.0) ethon (>= 0.9.0) tzinfo (1.2.3) thread_safe (~> 0.1) @@ -894,7 +894,7 @@ DEPENDENCIES turbo_dev_assets (= 0.0.2) twitter (= 6.1.0) twitter-text (= 1.14.7) - typhoeus (= 1.1.2) + typhoeus (= 1.3.0) uglifier (= 3.2.0) unicorn (= 5.3.0) unicorn-worker-killer (= 0.4.4) From 5edbd8f7401b12db5e9fcc371d74cd19d7bdb470 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 04:40:53 +0200 Subject: [PATCH 13/29] Bump jasmine --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 52c4bdff0..ae320928b 100644 --- a/Gemfile +++ b/Gemfile @@ -306,7 +306,7 @@ group :development, :test do gem "cucumber-rails", "1.5.0", require: false # Jasmine (client side application tests (JS)) - gem "jasmine", "2.7.0" + gem "jasmine", "2.8.0" gem "jasmine-jquery-rails", "2.0.3" gem "rails-assets-jasmine-ajax", "3.3.1", source: "https://rails-assets.org" gem "sinon-rails", "1.15.0" diff --git a/Gemfile.lock b/Gemfile.lock index fee7519d9..b993958ec 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -313,12 +313,12 @@ GEM i18n-inflector (~> 2.6) railties (>= 3.0.0) ipaddress (0.8.3) - jasmine (2.7.0) - jasmine-core (>= 2.7.0, < 3.0.0) + jasmine (2.8.0) + jasmine-core (>= 2.8.0, < 3.0.0) phantomjs rack (>= 1.2.1) rake - jasmine-core (2.7.0) + jasmine-core (2.8.0) jasmine-jquery-rails (2.0.3) jquery-rails (4.3.1) rails-dom-testing (>= 1, < 3) @@ -805,7 +805,7 @@ DEPENDENCIES handlebars_assets (= 0.23.2) http_accept_language (= 2.1.1) i18n-inflector-rails (= 1.0.7) - jasmine (= 2.7.0) + jasmine (= 2.8.0) jasmine-jquery-rails (= 2.0.3) jquery-rails (= 4.3.1) js-routes (= 1.4.1) From 34a149f61ac8a73abb09988defe1fdf24018f148 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 04:42:58 +0200 Subject: [PATCH 14/29] Bump pronto --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index ae320928b..64b14656a 100644 --- a/Gemfile +++ b/Gemfile @@ -246,7 +246,7 @@ group :development do # Linters gem "haml_lint", "0.26.0", require: false - gem "pronto", "0.9.4", require: false + gem "pronto", "0.9.5", require: false gem "pronto-eslint", "0.9.1", require: false gem "pronto-haml", "0.9.0", require: false gem "pronto-rubocop", "0.9.0", require: false diff --git a/Gemfile.lock b/Gemfile.lock index b993958ec..b304bfd5f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -302,7 +302,7 @@ GEM http-form_data (1.0.3) http_accept_language (2.1.1) http_parser.rb (0.6.0) - httparty (0.14.0) + httparty (0.15.6) multi_xml (>= 0.5.2) httpclient (2.8.3) i18n (0.8.6) @@ -445,9 +445,9 @@ GEM cliver (~> 0.3.1) websocket-driver (>= 0.2.0) powerpack (0.1.1) - pronto (0.9.4) + pronto (0.9.5) gitlab (~> 4.0, >= 4.0.0) - httparty (>= 0.13.7, < 0.15) + httparty (>= 0.13.7) octokit (~> 4.7, >= 4.7.0) rainbow (~> 2.1) rugged (~> 0.24, >= 0.23.0) @@ -830,7 +830,7 @@ DEPENDENCIES openid_connect (= 1.1.3) pg (= 0.21.0) poltergeist (= 1.16.0) - pronto (= 0.9.4) + pronto (= 0.9.5) pronto-eslint (= 0.9.1) pronto-haml (= 0.9.0) pronto-rubocop (= 0.9.0) From 156c7b8253e104d92ee9c7ae13ee7afec68ef4b0 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 04:44:15 +0200 Subject: [PATCH 15/29] Bump pry-byebug --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b304bfd5f..07e3c33ff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -70,7 +70,7 @@ GEM bootstrap-switch-rails (3.3.3) buftok (0.2.0) builder (3.2.3) - byebug (9.0.6) + byebug (9.1.0) capybara (2.15.1) addressable mini_mime (>= 0.1.3) @@ -105,7 +105,7 @@ GEM timers (>= 4.1.1) chunky_png (1.3.8) cliver (0.3.2) - coderay (1.1.1) + coderay (1.1.2) compass (1.0.3) chunky_png (~> 1.2) compass-core (~> 1.0.2) @@ -468,8 +468,8 @@ GEM coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - pry-byebug (3.4.2) - byebug (~> 9.0) + pry-byebug (3.5.0) + byebug (~> 9.1) pry (~> 0.10) public_suffix (3.0.0) rack (2.0.3) From a9bb673881aaac06e739982d9d3b32438327efdf Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 04:52:18 +0200 Subject: [PATCH 16/29] Bump rubocop --- .rubocop.yml | 2 +- Gemfile | 2 +- Gemfile.lock | 8 ++++---- .../notification_mailers/mentioned_in_comment.rb | 2 +- app/mailers/notification_mailers/started_sharing.rb | 2 +- lib/tasks/generate_session_secret.rake | 12 +++++------- 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 896e50f7a..02fd23ffd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -153,7 +153,7 @@ Style/Documentation: Enabled: false # This is just silly. Calling the argument `other` in all cases makes no sense. -Style/OpMethod: +Naming/BinaryOperatorParameterName: Enabled: false # There are valid cases, for example debugging Cucumber steps, diff --git a/Gemfile b/Gemfile index 64b14656a..8b8166f63 100644 --- a/Gemfile +++ b/Gemfile @@ -251,7 +251,7 @@ group :development do gem "pronto-haml", "0.9.0", require: false gem "pronto-rubocop", "0.9.0", require: false gem "pronto-scss", "0.9.1", require: false - gem "rubocop", "0.49.1", require: false + gem "rubocop", "0.50.0", require: false # Preloading environment diff --git a/Gemfile.lock b/Gemfile.lock index 07e3c33ff..54cf50389 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -607,15 +607,15 @@ GEM rspec-mocks (~> 3.6.0) rspec-support (~> 3.6.0) rspec-support (3.6.0) - rubocop (0.49.1) + rubocop (0.50.0) parallel (~> 1.10) parser (>= 2.3.3.1, < 3.0) powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) + rainbow (>= 2.2.2, < 3.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-oembed (0.12.0) - ruby-progressbar (1.8.1) + ruby-progressbar (1.8.3) ruby_dep (1.5.0) rubyzip (1.2.1) rufus-scheduler (3.4.2) @@ -874,7 +874,7 @@ DEPENDENCIES responders (= 2.4.0) rspec-json_expectations (~> 2.1) rspec-rails (= 3.6.1) - rubocop (= 0.49.1) + rubocop (= 0.50.0) ruby-oembed (= 0.12.0) rubyzip (= 1.2.1) sass-rails (= 5.0.6) diff --git a/app/mailers/notification_mailers/mentioned_in_comment.rb b/app/mailers/notification_mailers/mentioned_in_comment.rb index cdfa74fa1..056226ffd 100644 --- a/app/mailers/notification_mailers/mentioned_in_comment.rb +++ b/app/mailers/notification_mailers/mentioned_in_comment.rb @@ -4,7 +4,7 @@ module NotificationMailers class MentionedInComment < NotificationMailers::Base attr_reader :comment - def set_headers(target_id) # rubocop:disable Style/AccessorMethodName + def set_headers(target_id) # rubocop:disable Naming/AccessorMethodName @comment = Mention.find_by_id(target_id).mentions_container @headers[:in_reply_to] = @headers[:references] = "<#{@comment.parent.guid}@#{AppConfig.pod_uri.host}>" diff --git a/app/mailers/notification_mailers/started_sharing.rb b/app/mailers/notification_mailers/started_sharing.rb index d3d9db164..c66749c9c 100644 --- a/app/mailers/notification_mailers/started_sharing.rb +++ b/app/mailers/notification_mailers/started_sharing.rb @@ -2,7 +2,7 @@ module NotificationMailers class StartedSharing < NotificationMailers::Base - def set_headers(*_args) # rubocop:disable Style/AccessorMethodName + def set_headers(*_args) # rubocop:disable Naming/AccessorMethodName @headers[:subject] = I18n.t("notifier.started_sharing.subject", name: @sender.name) end end diff --git a/lib/tasks/generate_session_secret.rake b/lib/tasks/generate_session_secret.rake index 01e6c2944..28af3ef6e 100644 --- a/lib/tasks/generate_session_secret.rake +++ b/lib/tasks/generate_session_secret.rake @@ -3,11 +3,10 @@ namespace :generate do desc 'Generates a Session Secret Token' task :secret_token do - - path = Rails.root.join('config', 'initializers', 'secret_token.rb') - secret = SecureRandom.hex(40) - File.open(path, 'w') do |f| - f.write <<"EOF" + path = Rails.root.join("config", "initializers", "secret_token.rb") + secret = SecureRandom.hex(40) + File.open(path, "w") do |f| + f.write < Date: Sat, 16 Sep 2017 04:59:13 +0200 Subject: [PATCH 17/29] Bump bindata --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 54cf50389..9fd7d84e6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -63,7 +63,7 @@ GEM autoprefixer-rails (7.1.4.1) execjs bcrypt (3.1.11) - bindata (2.4.0) + bindata (2.4.1) bootstrap-sass (3.3.7) autoprefixer-rails (>= 5.2.1) sass (>= 3.3.4) From f50b28ab7daaf2cc3f488ac1ea3eca9d47f8c1bf Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 05:00:35 +0200 Subject: [PATCH 18/29] Bump fabrication --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9fd7d84e6..20b8d4a33 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -203,7 +203,7 @@ GEM sigar (~> 0.7.3) state_machines thor - fabrication (2.16.2) + fabrication (2.16.3) factory_girl (4.8.0) activesupport (>= 3.0.0) factory_girl_rails (4.8.0) From abeb46aa2d8b29074d0fbbad3d715cf1adf99f5b Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 05:01:46 +0200 Subject: [PATCH 19/29] Bump haml --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 20b8d4a33..e8cb500e9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -272,7 +272,7 @@ GEM guard-rubocop (1.3.0) guard (~> 2.0) rubocop (~> 0.20) - haml (5.0.2) + haml (5.0.3) temple (>= 0.8.0) tilt haml_lint (0.26.0) From 2e19fa6eec80b862ffb22973111232aca22a25dc Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 05:03:50 +0200 Subject: [PATCH 20/29] Bump hashdiff --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index e8cb500e9..d0c459d71 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -289,7 +289,7 @@ GEM execjs (~> 2.0) sprockets (>= 2.0.0) tilt (>= 1.2) - hashdiff (0.3.5) + hashdiff (0.3.6) hashie (3.5.6) hitimes (1.2.6) http (2.2.2) From f35e5d9cd91cad51d30a8755d2c5d8c81e420313 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 05:08:36 +0200 Subject: [PATCH 21/29] Bump simplecov-html --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d0c459d71..59633f327 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -657,7 +657,7 @@ GEM docile (~> 1.1.0) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) - simplecov-html (0.10.1) + simplecov-html (0.10.2) sinon-rails (1.15.0) railties (>= 3.1) slop (3.6.0) From 33c92028f881a66d63281ce99d9e82a771113b75 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 05:15:38 +0200 Subject: [PATCH 22/29] Bump rails-assets-blueimp-gallery --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 8b8166f63..1666837a8 100644 --- a/Gemfile +++ b/Gemfile @@ -115,7 +115,7 @@ source "https://rails-assets.org" do # jQuery plugins gem "rails-assets-autosize", "4.0.0" - gem "rails-assets-blueimp-gallery", "2.25.2" + gem "rails-assets-blueimp-gallery", "2.27.0" gem "rails-assets-jquery.are-you-sure", "1.9.0" gem "rails-assets-jquery-placeholder", "2.3.1" gem "rails-assets-jquery-textchange", "0.2.3" diff --git a/Gemfile.lock b/Gemfile.lock index 59633f327..6c31c4132 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -508,7 +508,7 @@ GEM rails-assets-autosize (4.0.0) rails-assets-backbone (1.3.3) rails-assets-underscore (>= 1.8.3) - rails-assets-blueimp-gallery (2.25.2) + rails-assets-blueimp-gallery (2.27.0) rails-assets-bootstrap (3.3.7) rails-assets-jquery (>= 1.9.1, < 4) rails-assets-bootstrap-markdown (2.10.0) @@ -845,7 +845,7 @@ DEPENDENCIES rails (= 5.1.4) rails-assets-autosize (= 4.0.0)! rails-assets-backbone (= 1.3.3)! - rails-assets-blueimp-gallery (= 2.25.2)! + rails-assets-blueimp-gallery (= 2.27.0)! rails-assets-bootstrap-markdown (= 2.10.0)! rails-assets-corejs-typeahead (= 1.1.1)! rails-assets-diaspora_jsxc (= 0.1.5.develop.7)! From 1e44d9c0a9b419c313ce123d6e0f193c4268d6df Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 05:17:50 +0200 Subject: [PATCH 23/29] Bump rails-assets-jasmine --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6c31c4132..93892c4fe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -526,7 +526,7 @@ GEM rails-assets-favico.js (0.3.10) rails-assets-fine-uploader (5.13.0) rails-assets-highlightjs (9.12.0) - rails-assets-jasmine (2.7.0) + rails-assets-jasmine (2.8.0) rails-assets-jasmine-ajax (3.3.1) rails-assets-jasmine (~> 2) rails-assets-jquery (3.2.1) From bd991276000a16eb1f0a7b19bb03436c812d7d29 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 05:27:39 +0200 Subject: [PATCH 24/29] Bump rails-assets-markdown-it --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 1666837a8..dd5a38acb 100644 --- a/Gemfile +++ b/Gemfile @@ -99,7 +99,7 @@ source "https://rails-assets.org" do gem "rails-assets-jquery.ui", "1.11.4" gem "rails-assets-highlightjs", "9.12.0" - gem "rails-assets-markdown-it", "8.3.2" + gem "rails-assets-markdown-it", "8.4.0" gem "rails-assets-markdown-it-hashtag", "0.4.0" gem "rails-assets-markdown-it-diaspora-mention", "1.2.0" gem "rails-assets-markdown-it-sanitizer", "0.4.3" diff --git a/Gemfile.lock b/Gemfile.lock index 93892c4fe..e3bf4f062 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -543,7 +543,7 @@ GEM rails-assets-jquery.ui (1.11.4) rails-assets-jquery (>= 1.6) rails-assets-markdown-it--markdown-it-for-inline (0.1.1) - rails-assets-markdown-it (8.3.2) + rails-assets-markdown-it (8.4.0) rails-assets-markdown-it-diaspora-mention (1.2.0) rails-assets-markdown-it-hashtag (0.4.0) rails-assets-markdown-it-sanitizer (0.4.3) @@ -857,7 +857,7 @@ DEPENDENCIES rails-assets-jquery-textchange (= 0.2.3)! rails-assets-jquery.are-you-sure (= 1.9.0)! rails-assets-jquery.ui (= 1.11.4)! - rails-assets-markdown-it (= 8.3.2)! + rails-assets-markdown-it (= 8.4.0)! rails-assets-markdown-it--markdown-it-for-inline (= 0.1.1)! rails-assets-markdown-it-diaspora-mention (= 1.2.0)! rails-assets-markdown-it-hashtag (= 0.4.0)! From 5ebbacf444dbf1b6d3df7a870fb33634c8356703 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 20:45:08 +0200 Subject: [PATCH 25/29] Mock call to nominatim for cucumber --- app/assets/javascripts/osmlocator.js | 4 ++-- features/step_definitions/location_steps.rb | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/osmlocator.js b/app/assets/javascripts/osmlocator.js index 157230456..fdc2bf804 100644 --- a/app/assets/javascripts/osmlocator.js +++ b/app/assets/javascripts/osmlocator.js @@ -5,12 +5,12 @@ OSM = {}; OSM.Locator = function(){ var geolocalize = function(callback){ - navigator.geolocation.getCurrentPosition(function(position) { + navigator.geolocation.getCurrentPosition(function(position) { var lat=position.coords.latitude, lon=position.coords.longitude; $.getJSON("https://nominatim.openstreetmap.org/reverse?format=json&lat="+lat+"&lon="+lon+"&addressdetails=3", function(data){ return callback(data.display_name, position.coords); - }); + }); },errorGettingPosition); }; diff --git a/features/step_definitions/location_steps.rb b/features/step_definitions/location_steps.rb index d4dac90ab..268aec049 100644 --- a/features/step_definitions/location_steps.rb +++ b/features/step_definitions/location_steps.rb @@ -9,5 +9,11 @@ When /^I allow geolocation$/ do } } }; + + $.getJSON = function(url, myCallback) { + if (url === "https://nominatim.openstreetmap.org/reverse?format=json&lat=42.42424242&lon=3.14159&addressdetails=3") { + return myCallback({display_name: "locator address"}); + } + }; JS end From ca8a3db5bc5bed1e1420b96c055f017f0c25cfc4 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Tue, 26 Sep 2017 04:19:16 +0200 Subject: [PATCH 26/29] Bump leaflet-rails --- Gemfile | 2 +- Gemfile.lock | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index dd5a38acb..5d55323e2 100644 --- a/Gemfile +++ b/Gemfile @@ -133,7 +133,7 @@ gem "rails-i18n", "5.0.4" gem "markerb", "1.1.0" # Map -gem "leaflet-rails", "1.1.0" +gem "leaflet-rails", "1.2.0" # Parsing diff --git a/Gemfile.lock b/Gemfile.lock index e3bf4f062..16258e581 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -133,6 +133,7 @@ GEM tins (~> 1.6) crack (0.4.3) safe_yaml (~> 1.0.0) + crass (1.0.2) cucumber (2.4.0) builder (>= 2.1.2) cucumber-core (~> 1.5.0) @@ -346,7 +347,7 @@ GEM multi_json jwt (1.5.6) kgio (2.11.0) - leaflet-rails (1.1.0) + leaflet-rails (1.2.0) rails (>= 4.2.0) listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) @@ -358,7 +359,8 @@ GEM multi_json (~> 1.10) logging-rails (0.6.0) logging (>= 1.8) - loofah (2.0.3) + loofah (2.1.1) + crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.0.12) macaddr (1.7.1) @@ -813,7 +815,7 @@ DEPENDENCIES json (= 2.1.0) json-schema (= 2.8.0) json-schema-rspec (= 0.0.4) - leaflet-rails (= 1.1.0) + leaflet-rails (= 1.2.0) logging-rails (= 0.6.0) markerb (= 1.1.0) mini_magick (= 4.8.0) From e4b0b569e271a0f9f2cd9522fd958a493d884ce3 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Tue, 26 Sep 2017 04:22:27 +0200 Subject: [PATCH 27/29] Bump pry closes #7618 --- Gemfile.lock | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 16258e581..7e55f4293 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -466,10 +466,9 @@ GEM pronto-scss (0.9.1) pronto (~> 0.9.0) scss_lint (~> 0.43, >= 0.43.0) - pry (0.10.4) + pry (0.11.0) coderay (~> 1.1.0) method_source (~> 0.8.1) - slop (~> 3.4) pry-byebug (3.5.0) byebug (~> 9.1) pry (~> 0.10) @@ -662,7 +661,6 @@ GEM simplecov-html (0.10.2) sinon-rails (1.15.0) railties (>= 3.1) - slop (3.6.0) spring (2.0.2) activesupport (>= 4.2) spring-commands-cucumber (1.0.1) From ac39e920c8e790f0d7db03a489beb7d0d9bcda38 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 16 Sep 2017 01:58:56 +0200 Subject: [PATCH 28/29] Add camo to NodeInfo closes #7617 --- Changelog.md | 1 + app/presenters/node_info_presenter.rb | 9 +++++++ spec/presenters/node_info_presenter_spec.rb | 30 +++++++++++++++++++-- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 0757be3aa..558895a69 100644 --- a/Changelog.md +++ b/Changelog.md @@ -28,6 +28,7 @@ * Ask for confirmation when leaving a submittable comment field [#7530](https://github.com/diaspora/diaspora/pull/7530) * Show users vote in polls [#7550](https://github.com/diaspora/diaspora/pull/7550) * Add explanation of ignore function to in-app help section [#7585](https://github.com/diaspora/diaspora/pull/7585) +* Add camo information to NodeInfo [#7617](https://github.com/diaspora/diaspora/pull/7617) # 0.7.0.1 diff --git a/app/presenters/node_info_presenter.rb b/app/presenters/node_info_presenter.rb index 7b7dcf0b0..e0c2c579b 100644 --- a/app/presenters/node_info_presenter.rb +++ b/app/presenters/node_info_presenter.rb @@ -24,6 +24,7 @@ class NodeInfoPresenter doc.open_registrations = open_registrations? doc.metadata["nodeName"] = name doc.metadata["xmppChat"] = chat_enabled? + doc.metadata["camo"] = camo_config doc.metadata["adminAccount"] = admin_account end @@ -73,6 +74,14 @@ class NodeInfoPresenter AppConfig.chat.enabled? end + def camo_config + { + markdown: AppConfig.privacy.camo.proxy_markdown_images?, + opengraph: AppConfig.privacy.camo.proxy_opengraph_thumbnails?, + remotePods: AppConfig.privacy.camo.proxy_remote_pod_images? + } + end + def admin_account AppConfig.admins.account if AppConfig.admins.account? end diff --git a/spec/presenters/node_info_presenter_spec.rb b/spec/presenters/node_info_presenter_spec.rb index 958a67df2..8dcc0894b 100644 --- a/spec/presenters/node_info_presenter_spec.rb +++ b/spec/presenters/node_info_presenter_spec.rb @@ -39,7 +39,12 @@ describe NodeInfoPresenter do }, "metadata" => { "nodeName" => AppConfig.settings.pod_name, - "xmppChat" => AppConfig.chat.enabled? + "xmppChat" => AppConfig.chat.enabled?, + "camo" => { + "markdown" => AppConfig.privacy.camo.proxy_markdown_images?, + "opengraph" => AppConfig.privacy.camo.proxy_opengraph_thumbnails?, + "remotePods" => AppConfig.privacy.camo.proxy_remote_pod_images? + } } ) end @@ -131,6 +136,22 @@ describe NodeInfoPresenter do end end + context "when camo is enabled" do + before do + AppConfig.privacy.camo.proxy_markdown_images = true + AppConfig.privacy.camo.proxy_opengraph_thumbnails = true + AppConfig.privacy.camo.proxy_remote_pod_images = true + end + + it "should list enabled camo options in the metadata as true" do + expect(hash).to include "metadata" => include("camo" => { + "markdown" => true, + "opengraph" => true, + "remotePods" => true + }) + end + end + context "when admin account is set" do before do AppConfig.admins.account = "podmin" @@ -160,7 +181,12 @@ describe NodeInfoPresenter do }, "metadata" => { "nodeName" => AppConfig.settings.pod_name, - "xmppChat" => AppConfig.chat.enabled? + "xmppChat" => AppConfig.chat.enabled?, + "camo" => { + "markdown" => AppConfig.privacy.camo.proxy_markdown_images?, + "opengraph" => AppConfig.privacy.camo.proxy_opengraph_thumbnails?, + "remotePods" => AppConfig.privacy.camo.proxy_remote_pod_images? + } } ) end From 95fbd3fc66bd9a01099c4b4777921ac065cc2191 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sun, 17 Sep 2017 21:45:43 +0200 Subject: [PATCH 29/29] Don't change the filename of the export everytime the user is touched closes #7622 --- Changelog.md | 1 + app/uploaders/exported_photos.rb | 4 ---- app/uploaders/exported_user.rb | 2 +- spec/models/user_spec.rb | 11 +++++++++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Changelog.md b/Changelog.md index 558895a69..1b8a2a9db 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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) diff --git a/app/uploaders/exported_photos.rb b/app/uploaders/exported_photos.rb index ed46e0667..b19c4edb1 100644 --- a/app/uploaders/exported_photos.rb +++ b/app/uploaders/exported_photos.rb @@ -5,7 +5,6 @@ # the COPYRIGHT file. class ExportedPhotos < SecureUploader - def store_dir "uploads/users" end @@ -13,7 +12,4 @@ class ExportedPhotos < SecureUploader def filename "#{model.username}_photos_#{secure_token}.zip" if original_filename.present? end - - - end diff --git a/app/uploaders/exported_user.rb b/app/uploaders/exported_user.rb index 116a34110..53201d918 100644 --- a/app/uploaders/exported_user.rb +++ b/app/uploaders/exported_user.rb @@ -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 diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 0304d432d..d399929b1 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -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)