Skip to content

fix resources url in generated HTML docs #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 22, 2016

Conversation

yshnb
Copy link
Contributor

@yshnb yshnb commented Nov 16, 2015

HTML documents generated in ScoverageHtmlWriter require CSS and JavaScript resources.
But urls of the resources are not unified into HTTP or HTTPS.

I have fixed them by omitting protocol in the absolute url, and they are available both via HTTP and HTTPS.

@sksamuel
Copy link
Member

The only issue is for people for whom cannot access outside urls. For instance at my bank we are locked down (although those might be open).

@yshnb
Copy link
Contributor Author

yshnb commented Nov 16, 2015

I know it. but there are other problems.

I have CircleCI generate HTML coverage reports.
In fact, CircleCI artifacts are provided in HTTPS, so browsers cannot load resources in HTTP
(because resources in HTTP are insecure).

@yshnb
Copy link
Contributor Author

yshnb commented Nov 16, 2015

using protocol relative urls for resources are recommended.

cf. https://support.google.com/webmasters/answer/6073543?hl=en

@gslowikowski
Copy link
Member

It doesn't work when the page is opened from local filesystem (file://.... URL).
Maybe just use https everywhere, where it's available.

@yshnb
Copy link
Contributor Author

yshnb commented Nov 17, 2015

Certainly..., I will fix it.

@yshnb
Copy link
Contributor Author

yshnb commented Nov 17, 2015

oh, i have missed.

@rmmeans
Copy link

rmmeans commented Jan 22, 2016

+1
I was about to fix this myself and submit a PR, checked existing PR's first and found it has been done just not merged.

I would love to see this merged and get the sbt-scoverage plugin updated to include it! I know circle CI was mentioned here, but more enterprises now are starting to run their internal build tools on https now in addition to the cloud based ones. The Scoverage report looks quite awful as the browser won't load any of the resources.

screen shot 2016-01-22 at 11 00 45 am

sksamuel added a commit that referenced this pull request Jan 22, 2016
fix resources url in generated HTML docs
@sksamuel sksamuel merged commit 9ff7e25 into scoverage:master Jan 22, 2016
@yshnb yshnb deleted the fix_html_resources branch February 9, 2016 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants