Merge branch '4264-embed-youtube-on-https' of https://github.com/arlogn/diaspora into arlogn-4264-embed-youtube-on-https
This commit is contained in:
commit
6c9cce7cda
5 changed files with 10 additions and 7 deletions
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
* Improve time agos by updating the plugin [#4280](https://github.com/diaspora/diaspora/issues/4280)
|
* Improve time agos by updating the plugin [#4280](https://github.com/diaspora/diaspora/issues/4280)
|
||||||
|
* Use youtube HTTPS scheme for oEmbed [#4743](https://github.com/diaspora/diaspora/pull/4743)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
* You can report a single post by clicking the correct icon in the controler section [#4517](https://github.com/diaspora/diaspora/pull/4517)
|
* You can report a single post by clicking the correct icon in the controler section [#4517](https://github.com/diaspora/diaspora/pull/4517)
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ oembed_provider_list = [
|
||||||
OEmbed::Providers::Flickr
|
OEmbed::Providers::Flickr
|
||||||
]
|
]
|
||||||
|
|
||||||
|
OEmbed::Providers::Youtube.endpoint += "?scheme=https"
|
||||||
|
|
||||||
oembed_providers = YAML.load_file(Rails.root.join("config", "oembed_providers.yml"))
|
oembed_providers = YAML.load_file(Rails.root.join("config", "oembed_providers.yml"))
|
||||||
|
|
||||||
oembed_providers.each do |provider_name, provider|
|
oembed_providers.each do |provider_name, provider|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ Given /^I have several oEmbed data in cache$/ do
|
||||||
"thumbnail_width" => 480,
|
"thumbnail_width" => 480,
|
||||||
},
|
},
|
||||||
"link_url" => "http://youtube.com/watch?v=M3r2XDceM6A&format=json",
|
"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" => {
|
"unsecure_video" => {
|
||||||
|
|
@ -86,7 +86,7 @@ Given /^I have several oEmbed data in cache$/ do
|
||||||
"thumbnail_width" => 480,
|
"thumbnail_width" => 480,
|
||||||
},
|
},
|
||||||
"link_url" => "http://yourichtube.com/watch?v=M3r2XDceM6A&format=json",
|
"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" => {
|
"unsecure_rich" => {
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ describe StreamsController do
|
||||||
|
|
||||||
stub_request(
|
stub_request(
|
||||||
:get,
|
: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(
|
).with(
|
||||||
:headers => {'Accept'=>'*/*'}
|
:headers => {'Accept'=>'*/*'}
|
||||||
).to_return(
|
).to_return(
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ describe OEmbedHelper do
|
||||||
"type" => "video",
|
"type" => "video",
|
||||||
"width" => 425,
|
"width" => 425,
|
||||||
"height" => 344,
|
"height" => 344,
|
||||||
'trusted_endpoint_url' => ::OEmbed::Providers::Youtube.endpoint,
|
"trusted_endpoint_url" => ::OEmbed::Providers::Youtube.endpoint,
|
||||||
"title" => "Amazing Nintendo Facts",
|
"title" => "Amazing Nintendo Facts",
|
||||||
"html" => "<object width=\"425\" height=\"344\">
|
"html" => "<object width=\"425\" height=\"344\">
|
||||||
<param name=\"movie\" value=\"http://www.youtube.com/v/M3r2XDceM6A&fs=1\"></param>
|
<param name=\"movie\" value=\"http://www.youtube.com/v/M3r2XDceM6A&fs=1\"></param>
|
||||||
|
|
@ -41,7 +41,7 @@ describe OEmbedHelper do
|
||||||
</object>",
|
</object>",
|
||||||
},
|
},
|
||||||
"link_url" => "http://youtube.com/watch?v=M3r2XDceM6A&format=json",
|
"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" => {
|
"unsecure_video" => {
|
||||||
|
|
@ -69,7 +69,7 @@ describe OEmbedHelper do
|
||||||
"type" => "rich",
|
"type" => "rich",
|
||||||
"width" => 425,
|
"width" => 425,
|
||||||
"height" => 344,
|
"height" => 344,
|
||||||
'trusted_endpoint_url' => ::OEmbed::Providers::Youtube.endpoint,
|
"trusted_endpoint_url" => ::OEmbed::Providers::Youtube.endpoint,
|
||||||
"title" => "Amazing Nintendo Facts",
|
"title" => "Amazing Nintendo Facts",
|
||||||
"html" => "<object width=\"425\" height=\"344\">
|
"html" => "<object width=\"425\" height=\"344\">
|
||||||
<param name=\"movie\" value=\"http://www.youtube.com/v/M3r2XDceM6A&fs=1\"></param>
|
<param name=\"movie\" value=\"http://www.youtube.com/v/M3r2XDceM6A&fs=1\"></param>
|
||||||
|
|
@ -81,7 +81,7 @@ describe OEmbedHelper do
|
||||||
</object>",
|
</object>",
|
||||||
},
|
},
|
||||||
"link_url" => "http://youtube.com/watch?v=M3r2XDceM6A&format=json",
|
"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" => {
|
"unsecure_rich" => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue