Merge branch 'stable' into develop
This commit is contained in:
commit
446201b584
4 changed files with 7 additions and 7 deletions
|
|
@ -143,6 +143,7 @@ Contributions are very welcome, the hard work is done!
|
||||||
* Fix empty name field when editing aspect names [#6706](https://github.com/diaspora/diaspora/pull/6706)
|
* Fix empty name field when editing aspect names [#6706](https://github.com/diaspora/diaspora/pull/6706)
|
||||||
* Fix internal server error when trying to log out of an expired session [#6707](https://github.com/diaspora/diaspora/pull/6707)
|
* Fix internal server error when trying to log out of an expired session [#6707](https://github.com/diaspora/diaspora/pull/6707)
|
||||||
* Only mark unread notifications as read [#6711](https://github.com/diaspora/diaspora/pull/6711)
|
* Only mark unread notifications as read [#6711](https://github.com/diaspora/diaspora/pull/6711)
|
||||||
|
* Use https for OEmbeds [#6748](https://github.com/diaspora/diaspora/pull/6748)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
* Added the footer to conversation pages [#6710](https://github.com/diaspora/diaspora/pull/6710)
|
* Added the footer to conversation pages [#6710](https://github.com/diaspora/diaspora/pull/6710)
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ module PostsHelper
|
||||||
def post_iframe_url(post_id, opts={})
|
def post_iframe_url(post_id, opts={})
|
||||||
opts[:width] ||= 516
|
opts[:width] ||= 516
|
||||||
opts[:height] ||= 315
|
opts[:height] ||= 315
|
||||||
host = AppConfig.pod_uri.authority
|
"<iframe src='#{AppConfig.url_to(Rails.application.routes.url_helpers.post_path(post_id))}' " \
|
||||||
"<iframe src='#{Rails.application.routes.url_helpers.post_url(post_id, :host => host)}' width='#{opts[:width]}px' height='#{opts[:height]}px' frameBorder='0'></iframe>".html_safe
|
"width='#{opts[:width]}px' height='#{opts[:height]}px' frameBorder='0'></iframe>".html_safe
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class OEmbedPresenter
|
||||||
end
|
end
|
||||||
|
|
||||||
def post_author_url
|
def post_author_url
|
||||||
Rails.application.routes.url_helpers.person_url(@post.author, :host => AppConfig.pod_uri.host)
|
AppConfig.url_to(Rails.application.routes.url_helpers.person_path(@post.author))
|
||||||
end
|
end
|
||||||
|
|
||||||
def iframe_html
|
def iframe_html
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,19 @@ require 'spec_helper'
|
||||||
|
|
||||||
describe JsxcHelper, :type => :helper do
|
describe JsxcHelper, :type => :helper do
|
||||||
before do
|
before do
|
||||||
AppConfig.chat.server.bosh.proxy = false
|
|
||||||
AppConfig.chat.server.bosh.port = 1234
|
AppConfig.chat.server.bosh.port = 1234
|
||||||
AppConfig.chat.server.bosh.bind = '/bind'
|
AppConfig.chat.server.bosh.bind = "/bind"
|
||||||
AppConfig.environment.url = "https://localhost/"
|
|
||||||
AppConfig.instance_variable_set(:@pod_uri, nil)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#get_bosh_endpoint" do
|
describe "#get_bosh_endpoint" do
|
||||||
it "using http scheme and default values" do
|
it "using http scheme and default values" do
|
||||||
|
AppConfig.chat.server.bosh.proxy = false
|
||||||
expect(helper.get_bosh_endpoint).to include %Q(http://localhost:1234/bind)
|
expect(helper.get_bosh_endpoint).to include %Q(http://localhost:1234/bind)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "using https scheme and no port" do
|
it "using https scheme and no port" do
|
||||||
AppConfig.chat.server.bosh.proxy = true
|
AppConfig.chat.server.bosh.proxy = true
|
||||||
|
allow(AppConfig).to receive(:pod_uri).and_return(Addressable::URI.parse("https://localhost/"))
|
||||||
expect(helper.get_bosh_endpoint).to include %Q(https://localhost/bind)
|
expect(helper.get_bosh_endpoint).to include %Q(https://localhost/bind)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue