fix jsxc_helper_spec and use new url_to in jsxc_helper

closes #6151
This commit is contained in:
Benjamin Neff 2015-07-11 03:14:12 +02:00 committed by Dennis Schubert
parent edc3ac6908
commit e4ca9f01e2
3 changed files with 3 additions and 2 deletions

View file

@ -5,6 +5,7 @@
* Remove top margin for first heading in a post [#6110](https://github.com/diaspora/diaspora/pull/6110) * Remove top margin for first heading in a post [#6110](https://github.com/diaspora/diaspora/pull/6110)
* Add link to pod statistics in right navigation [#6117](https://github.com/diaspora/diaspora/pull/6117) * Add link to pod statistics in right navigation [#6117](https://github.com/diaspora/diaspora/pull/6117)
* Refactor person related URL generation [#6168](https://github.com/diaspora/diaspora/pull/6168) * Refactor person related URL generation [#6168](https://github.com/diaspora/diaspora/pull/6168)
* Move webfinger and HCard generation out of the core and embed the `diaspora_federation-rails` gem [#6151](https://github.com/diaspora/diaspora/pull/6151/)
## Bug fixes ## Bug fixes
* Precompile facebox images [#6105](https://github.com/diaspora/diaspora/pull/6105) * Precompile facebox images [#6105](https://github.com/diaspora/diaspora/pull/6105)

View file

@ -3,11 +3,10 @@ module JsxcHelper
port = AppConfig.chat.server.bosh.port port = AppConfig.chat.server.bosh.port
bind = AppConfig.chat.server.bosh.bind bind = AppConfig.chat.server.bosh.bind
host = AppConfig.pod_uri.host host = AppConfig.pod_uri.host
scheme = AppConfig.pod_uri.scheme
unless AppConfig.chat.server.bosh.proxy? unless AppConfig.chat.server.bosh.proxy?
return "http://#{host}:#{port}#{bind}" return "http://#{host}:#{port}#{bind}"
end end
return "#{scheme}://#{host}#{bind}" AppConfig.url_to bind
end end
end end

View file

@ -6,6 +6,7 @@ describe JsxcHelper, :type => :helper do
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.environment.url = "https://localhost/"
AppConfig.instance_variable_set(:@pod_uri, nil)
end end
describe "#get_bosh_endpoint" do describe "#get_bosh_endpoint" do