From 196e4382868644e553735130ade800b3cf7170bc Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sun, 17 May 2015 01:27:39 +0200 Subject: [PATCH 1/4] remove some hardcoded diasporahq hax --- app/workers/notify_local_users.rb | 4 ---- lib/postzord/dispatcher.rb | 11 +---------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/app/workers/notify_local_users.rb b/app/workers/notify_local_users.rb index 1f6200114..39c797a9b 100644 --- a/app/workers/notify_local_users.rb +++ b/app/workers/notify_local_users.rb @@ -10,10 +10,6 @@ module Workers object = object_klass.constantize.find_by_id(object_id) - #hax - return if (object.author.diaspora_handle == 'diasporahq@joindiaspora.com' || (object.respond_to?(:relayable?) && object.parent.author.diaspora_handle == 'diasporahq@joindiaspora.com')) - #end hax - users = User.where(:id => user_ids) person = Person.find_by_id(person_id) diff --git a/lib/postzord/dispatcher.rb b/lib/postzord/dispatcher.rb index ace975752..8225397d3 100644 --- a/lib/postzord/dispatcher.rb +++ b/lib/postzord/dispatcher.rb @@ -66,8 +66,6 @@ class Postzord::Dispatcher @object end - - protected # @return [Object] @@ -170,14 +168,7 @@ class Postzord::Dispatcher def notify_users(users) return unless users.present? && @object.respond_to?(:persisted?) - #temp hax - unless object_is_related_to_diaspora_hq? - Workers::NotifyLocalUsers.perform_async(users.map{|u| u.id}, @object.class.to_s, @object.id, @object.author.id) - end - end - - def object_is_related_to_diaspora_hq? - (@object.author.diaspora_handle == 'diasporahq@joindiaspora.com' || (@object.respond_to?(:relayable?) && @object.parent.author.diaspora_handle == 'diasporahq@joindiaspora.com')) + Workers::NotifyLocalUsers.perform_async(users.map(&:id), @object.class.to_s, @object.id, @object.author.id) end end From 7cccb6594fdddc130f486354fdd0eb21f77ee23e Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sun, 17 May 2015 02:18:23 +0200 Subject: [PATCH 2/4] remove security hax comment --- spec/models/photo_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/models/photo_spec.rb b/spec/models/photo_spec.rb index df2ca276a..72bab80e9 100644 --- a/spec/models/photo_spec.rb +++ b/spec/models/photo_spec.rb @@ -172,7 +172,7 @@ describe Photo, :type => :model do expect(image.exif.length).to eq(0) end end - + describe 'non-image files' do it 'should not store' do file = File.open(@fail_fixture_name) @@ -213,7 +213,6 @@ describe Photo, :type => :model do end it 'should set the remote_photo on marshalling' do - #security hax user2 = FactoryGirl.create(:user) aspect2 = user2.aspects.create(:name => "foobars") connect_users(@user, @aspect, user2, aspect2) From 494c03a3fd9b1addc7aee66cfcde850872fbd4f0 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sun, 17 May 2015 02:33:48 +0200 Subject: [PATCH 3/4] re add user atom feed on profile-page --- app/helpers/layout_helper.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb index f5740f54f..8c2a45011 100644 --- a/app/helpers/layout_helper.rb +++ b/app/helpers/layout_helper.rb @@ -31,8 +31,6 @@ module LayoutHelper end def current_user_atom_tag - return #temp hax - return unless @person.present? content_tag(:link, '', :rel => 'alternate', :href => "#{@person.public_url}.atom", :type => "application/atom+xml", :title => t('.public_feed', :name => @person.name)) end From 85087123f0d726b6172c8aa2ea3272fd6962eef3 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sun, 17 May 2015 02:49:09 +0200 Subject: [PATCH 4/4] remove travis hax ... works on here ... I hope on travis too closes #5964 --- Changelog.md | 1 + features/step_definitions/custom_web_steps.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index d07a01468..1127b8c05 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,6 +7,7 @@ * Drop broken install scripts [#5907](https://github.com/diaspora/diaspora/pull/5907) * Improve invoking mobile site in the testsuite [#5915](https://github.com/diaspora/diaspora/pull/5915) * Do not retry a couple of unrecoverable job failures [#5938](https://github.com/diaspora/diaspora/pull/5938) [#5942](https://github.com/diaspora/diaspora/pull/5943) +* Remove some old temporary workarounds [#5964](https://github.com/diaspora/diaspora/pull/5964) ## Bug fixes * Disable auto follow back on aspect deletion [#5846](https://github.com/diaspora/diaspora/pull/5846) diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index d0e6babfe..0009f8b56 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -103,7 +103,7 @@ end When /^I click to delete the first comment$/ do within("div.comment", match: :first) do find(".control-icons").hover - find(".comment_delete", visible: false).click # TODO: hax to check what's failing on Travis + find(".comment_delete").click end end