Merge branch 'hotfix/0.3.0.2'
This commit is contained in:
commit
a8431430f0
11 changed files with 59 additions and 19 deletions
|
|
@ -1,3 +1,11 @@
|
|||
# 0.3.0.2
|
||||
|
||||
## Bug fixes
|
||||
* Use youtube HTTPS scheme for oEmbed [#4743](https://github.com/diaspora/diaspora/pull/4743)
|
||||
* Fix infinite scroll on aspect streams [#4729](https://github.com/diaspora/diaspora/issues/4729)
|
||||
* Fix hovercards [#4782](https://github.com/diaspora/diaspora/pull/4782)
|
||||
* Bump kaminari to fix admin panel [#4714](https://github.com/diaspora/diaspora/issues/4714)
|
||||
|
||||
# 0.3.0.1
|
||||
|
||||
## Bug fixes
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ GEM
|
|||
json (1.8.1)
|
||||
jwt (0.1.10)
|
||||
multi_json (>= 1.5)
|
||||
kaminari (0.15.0)
|
||||
kaminari (0.15.1)
|
||||
actionpack (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
kgio (2.8.1)
|
||||
|
|
|
|||
|
|
@ -15,13 +15,18 @@ app.models.Stream = Backbone.Collection.extend({
|
|||
return _.any(this.items.models) ? this.timeFilteredPath() : this.basePath()
|
||||
},
|
||||
|
||||
_fetchOpts: function(opts) {
|
||||
var defaultOpts = {
|
||||
remove: false // tell backbone to keep existing items in the collection
|
||||
};
|
||||
return _.extend({}, defaultOpts, opts);
|
||||
},
|
||||
|
||||
fetch: function() {
|
||||
if( this.isFetching() ) return false;
|
||||
var url = this.url();
|
||||
this.deferred = this.items.fetch({
|
||||
remove : false,
|
||||
url : url
|
||||
}).done(_.bind(this.triggerFetchedEvents, this))
|
||||
this.deferred = this.items.fetch(this._fetchOpts({url : url}))
|
||||
.done(_.bind(this.triggerFetchedEvents, this));
|
||||
},
|
||||
|
||||
isFetching : function() {
|
||||
|
|
|
|||
|
|
@ -18,10 +18,7 @@ app.models.StreamAspects = app.models.Stream.extend({
|
|||
if(this.isFetching()){ return false }
|
||||
var url = this.url();
|
||||
var ids = this.aspects_ids;
|
||||
this.deferred = this.items.fetch({
|
||||
add : true,
|
||||
url : url,
|
||||
data : { 'a_ids': ids }
|
||||
}).done(_.bind(this.triggerFetchedEvents, this))
|
||||
this.deferred = this.items.fetch(this._fetchOpts({url : url, data : { 'a_ids': ids }}))
|
||||
.done(_.bind(this.triggerFetchedEvents, this));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ app.views.Hovercard = Backbone.View.extend({
|
|||
hc.prependTo(el);
|
||||
this._positionHovercard();
|
||||
this._populateHovercard();
|
||||
}, 500, true),
|
||||
}, 500),
|
||||
|
||||
_populateHovercard: function() {
|
||||
var href = this.href();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
defaults:
|
||||
version:
|
||||
number: "0.3.0.1" # Do not touch unless doing a release, do not backport the version number that's in master but keep develop to always say "head"
|
||||
number: "0.3.0.2" # Do not touch unless doing a release, do not backport the version number that's in master but keep develop to always say "head"
|
||||
heroku: false
|
||||
environment:
|
||||
url: "http://localhost:3000/"
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ oembed_provider_list = [
|
|||
OEmbed::Providers::Flickr
|
||||
]
|
||||
|
||||
OEmbed::Providers::Youtube.endpoint += "?scheme=https"
|
||||
|
||||
oembed_providers = YAML.load_file(Rails.root.join("config", "oembed_providers.yml"))
|
||||
|
||||
oembed_providers.each do |provider_name, provider|
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ Given /^I have several oEmbed data in cache$/ do
|
|||
"thumbnail_width" => 480,
|
||||
},
|
||||
"link_url" => "http://youtube.com/watch?v=M3r2XDceM6A&format=json",
|
||||
"oembed_get_request" => "http://www.youtube.com/oembed?format=json&frame=1&iframe=1&maxheight=420&maxwidth=420&url=http://youtube.com/watch?v=M3r2XDceM6A",
|
||||
"oembed_get_request" => "http://www.youtube.com/oembed?scheme=https&format=json&frame=1&iframe=1&maxheight=420&maxwidth=420&url=http://youtube.com/watch?v=M3r2XDceM6A",
|
||||
},
|
||||
|
||||
"unsecure_video" => {
|
||||
|
|
@ -86,7 +86,7 @@ Given /^I have several oEmbed data in cache$/ do
|
|||
"thumbnail_width" => 480,
|
||||
},
|
||||
"link_url" => "http://yourichtube.com/watch?v=M3r2XDceM6A&format=json",
|
||||
"oembed_get_request" => "http://www.youtube.com/oembed?format=json&frame=1&iframe=1&maxheight=420&maxwidth=420&url=http://youtube.com/watch?v=M3r2XDceM6A",
|
||||
"oembed_get_request" => "http://www.youtube.com/oembed?scheme=https&format=json&frame=1&iframe=1&maxheight=420&maxwidth=420&url=http://youtube.com/watch?v=M3r2XDceM6A",
|
||||
},
|
||||
|
||||
"unsecure_rich" => {
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ describe StreamsController do
|
|||
|
||||
stub_request(
|
||||
:get,
|
||||
"http://www.youtube.com/oembed?format=json&frame=1&iframe=1&maxheight=420&maxwidth=420&url=http://www.youtube.com/watch?v=UYrkQL1bX4A"
|
||||
"http://www.youtube.com/oembed?scheme=https&format=json&frame=1&iframe=1&maxheight=420&maxwidth=420&url=http://www.youtube.com/watch?v=UYrkQL1bX4A"
|
||||
).with(
|
||||
:headers => {'Accept'=>'*/*'}
|
||||
).to_return(
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ describe OEmbedHelper do
|
|||
"type" => "video",
|
||||
"width" => 425,
|
||||
"height" => 344,
|
||||
'trusted_endpoint_url' => ::OEmbed::Providers::Youtube.endpoint,
|
||||
"trusted_endpoint_url" => ::OEmbed::Providers::Youtube.endpoint,
|
||||
"title" => "Amazing Nintendo Facts",
|
||||
"html" => "<object width=\"425\" height=\"344\">
|
||||
<param name=\"movie\" value=\"http://www.youtube.com/v/M3r2XDceM6A&fs=1\"></param>
|
||||
|
|
@ -41,7 +41,7 @@ describe OEmbedHelper do
|
|||
</object>",
|
||||
},
|
||||
"link_url" => "http://youtube.com/watch?v=M3r2XDceM6A&format=json",
|
||||
"oembed_get_request" => "http://www.youtube.com/oembed?format=json&frame=1&iframe=1&maxheight=420&maxwidth=420&url=http://youtube.com/watch?v=M3r2XDceM6A",
|
||||
"oembed_get_request" => "http://www.youtube.com/oembed?scheme=https&format=json&frame=1&iframe=1&maxheight=420&maxwidth=420&url=http://youtube.com/watch?v=M3r2XDceM6A",
|
||||
},
|
||||
|
||||
"unsecure_video" => {
|
||||
|
|
@ -69,7 +69,7 @@ describe OEmbedHelper do
|
|||
"type" => "rich",
|
||||
"width" => 425,
|
||||
"height" => 344,
|
||||
'trusted_endpoint_url' => ::OEmbed::Providers::Youtube.endpoint,
|
||||
"trusted_endpoint_url" => ::OEmbed::Providers::Youtube.endpoint,
|
||||
"title" => "Amazing Nintendo Facts",
|
||||
"html" => "<object width=\"425\" height=\"344\">
|
||||
<param name=\"movie\" value=\"http://www.youtube.com/v/M3r2XDceM6A&fs=1\"></param>
|
||||
|
|
@ -81,7 +81,7 @@ describe OEmbedHelper do
|
|||
</object>",
|
||||
},
|
||||
"link_url" => "http://youtube.com/watch?v=M3r2XDceM6A&format=json",
|
||||
"oembed_get_request" => "http://www.youtube.com/oembed?format=json&frame=1&iframe=1&maxheight=420&maxwidth=420&url=http://youtube.com/watch?v=M3r2XDceM6A",
|
||||
"oembed_get_request" => "http://www.youtube.com/oembed?scheme=https&format=json&frame=1&iframe=1&maxheight=420&maxwidth=420&url=http://youtube.com/watch?v=M3r2XDceM6A",
|
||||
},
|
||||
|
||||
"unsecure_rich" => {
|
||||
|
|
|
|||
28
spec/javascripts/app/models/stream_aspects_spec.js
Normal file
28
spec/javascripts/app/models/stream_aspects_spec.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
describe("app.models.StreamAspects", function() {
|
||||
describe("#fetch", function(){
|
||||
var fetch,
|
||||
stream;
|
||||
|
||||
beforeEach(function(){
|
||||
fetch = new $.Deferred();
|
||||
stream = new app.models.StreamAspects([], {aspects_ids: [1,2]});
|
||||
spyOn(stream.items, "fetch").andCallFake(function(options){
|
||||
stream.items.set([{name: 'a'}, {name: 'b'}, {name: 'c'}], options);
|
||||
fetch.resolve();
|
||||
return fetch;
|
||||
});
|
||||
});
|
||||
|
||||
it("fetches some posts", function(){
|
||||
stream.fetch();
|
||||
expect(stream.items.length).toEqual(3);
|
||||
});
|
||||
|
||||
it("fetches more posts", function(){
|
||||
stream.fetch();
|
||||
expect(stream.items.length).toEqual(3);
|
||||
stream.fetch();
|
||||
expect(stream.items.length).toEqual(6);
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue