From 46d2efd80a8a581aa79526d87d1e3c2ab17304e0 Mon Sep 17 00:00:00 2001 From: MrZYX Date: Thu, 21 Apr 2011 12:59:43 +0200 Subject: [PATCH 1/4] update sod --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3fd479307..8a37bad0c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ GIT GIT remote: git://github.com/MikeSofaer/sod.git - revision: f1084f181c9ae469f03e9217d8ed1c7800ccb971 + revision: 08e990601bfa6ffd3224a2e4c792df9eae712693 specs: sod (0.0.1) net-scp From 89c3e30663e026f8cbac05a50fa8e33b7e4ac9eb Mon Sep 17 00:00:00 2001 From: MrZYX Date: Thu, 21 Apr 2011 13:31:30 +0200 Subject: [PATCH 2/4] apply suggested fix in/for #1026 --- public/javascripts/keycodes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/keycodes.js b/public/javascripts/keycodes.js index ca275d1ce..f0966a8a4 100644 --- a/public/javascripts/keycodes.js +++ b/public/javascripts/keycodes.js @@ -113,4 +113,4 @@ isInsertion : function(keyCode){ return true; } }, -} +}; From b29764807221de346bf9a8b351dc35cac67a307b Mon Sep 17 00:00:00 2001 From: MrZYX Date: Thu, 21 Apr 2011 14:24:28 +0200 Subject: [PATCH 3/4] Added migration that downcases all usernames. This should solve the "Can only login via password reset" problems --- db/migrate/20110421120744_downcase_usernames.rb | 13 +++++++++++++ db/schema.rb | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20110421120744_downcase_usernames.rb diff --git a/db/migrate/20110421120744_downcase_usernames.rb b/db/migrate/20110421120744_downcase_usernames.rb new file mode 100644 index 000000000..a4d24d1ab --- /dev/null +++ b/db/migrate/20110421120744_downcase_usernames.rb @@ -0,0 +1,13 @@ +class DowncaseUsernames < ActiveRecord::Migration + def self.up + execute < 20110406203720) do +ActiveRecord::Schema.define(:version => 20110421120744) do create_table "aspect_memberships", :force => true do |t| t.integer "aspect_id", :null => false From 45d621a9e64ba9334ea5a779ab45f4f9bf49bffc Mon Sep 17 00:00:00 2001 From: MrZYX Date: Thu, 21 Apr 2011 15:42:28 +0200 Subject: [PATCH 4/4] fixed embedder the hacky way (?) and added cucumber feature for youtube feature so you'll notice if you breakt it again the next time --- features/embedder.feature | 19 +++++++++++++++++++ public/javascripts/diaspora.js | 5 +++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 features/embedder.feature diff --git a/features/embedder.feature b/features/embedder.feature new file mode 100644 index 000000000..9db04a389 --- /dev/null +++ b/features/embedder.feature @@ -0,0 +1,19 @@ +@javascript +Feature: embedding + Get sure that embedding stuff actually works + + Background: + Given a user with username "bob" + When I sign in as "bob@bob.bob" + And I have no open aspects saved + And I am on the home page + + Scenario: Youtube is fully embedded + Given I expand the publisher + When I fill in "status_message_fake_text" with "Look at this awesome video: https://www.youtube.com/watch?v=53tq9g35kwk" + And I press "Share" + And I follow "All Aspects" + Then I should see "Look at this awesome video: Youtube: Leekspin" within ".stream_element" + When I follow "Youtube: Leekspin" + And I wait for the ajax to finish + Then I should see "Watch this video on YouTube" within ".video-container" diff --git a/public/javascripts/diaspora.js b/public/javascripts/diaspora.js index 9b8080dd7..389f461e3 100644 --- a/public/javascripts/diaspora.js +++ b/public/javascripts/diaspora.js @@ -31,7 +31,8 @@ this.initialized = true; for(var widgetId in this.collection) { - if(this.collection[widgetId].hasOwnProperty("start")) { + if(this.collection[widgetId].hasOwnProperty("start") + || this.collection[widgetId].__proto__.hasOwnProperty("start")) { this.collection[widgetId].start(); } } @@ -51,5 +52,5 @@ })(); -$(document).ready(Diaspora.widgets.init); +$(document).ready(function() { Diaspora.widgets.init(); });