Skip to content

Commit

Permalink
Merge pull request #101 from TNG/remove-static-html-report
Browse files Browse the repository at this point in the history
Remove static html report
  • Loading branch information
janschaefer committed Aug 2, 2015
2 parents e7cadcd + bb08c12 commit 1c029d4
Show file tree
Hide file tree
Showing 30 changed files with 9 additions and 2,755 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public @interface FeatureHtml5Report { }

* Classes are shown now in hierarchical navigation tree and scenarios can be listed by package [#91](https://github.com/TNG/JGiven/pull/91)

## Removed Features

### Removed the old static HTML report generator
* As the HTML5 report supports all the features of the static HTML report, the static HTML report has been completely removed to avoid duplicate efforts when implementing new features.

## Fixed Issues

* HTML5 Report: tables with duplicate entries cannot be used as step parameters [#89](https://github.com/TNG/JGiven/issues/89)
Expand Down
10 changes: 0 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,6 @@ subprojects {
ignoreFailures = true
}

task jgivenReport(type: JavaExec) {
main = 'com.tngtech.jgiven.report.ReportGenerator'
args '--sourceDir=build/reports/jgiven/json',
'--targetDir=build/reports/jgiven/html',
'--format=html',
'--customcss=build/resources/test/jgiven/custom.css'

classpath = configurations.testCompile
}

task jgivenHtml5Report(type: JavaExec) {
main = 'com.tngtech.jgiven.report.ReportGenerator'
args '--sourceDir=build/reports/jgiven/json',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.tngtech.jgiven.exception.JGivenInstallationException;
import com.tngtech.jgiven.exception.JGivenInternalDefectException;
import com.tngtech.jgiven.report.asciidoc.AsciiDocReportGenerator;
import com.tngtech.jgiven.report.html.StaticHtmlReportGenerator;
import com.tngtech.jgiven.report.json.ReportModelReader;
import com.tngtech.jgiven.report.model.CompleteReportModel;
import com.tngtech.jgiven.report.text.PlainTextReportGenerator;
Expand Down Expand Up @@ -96,9 +95,7 @@ public void generate() throws Exception {

CompleteReportModel reportModel = new ReportModelReader().readDirectory( getSourceDirectory() );

if( format == HTML ) {
generateStaticHtmlReport( reportModel );
} else if( format == HTML5 ) {
if( format == HTML5 || format == HTML ) {
generateHtml5Report( reportModel );
} else if( format == TEXT ) {
new PlainTextReportGenerator().generate( reportModel, getTargetDirectory() );
Expand All @@ -108,11 +105,6 @@ public void generate() throws Exception {

}

private void generateStaticHtmlReport( CompleteReportModel reportModel ) throws IOException {
new StaticHtmlReportGenerator().generate( reportModel, getTargetDirectory() );
copyCustomCssFile( getTargetDirectory() );
}

private void copyCustomCssFile( File targetDirectory ) throws IOException {
if( getCustomCssFile() != null ) {
if( !getCustomCssFile().canRead() ) {
Expand Down Expand Up @@ -141,7 +133,7 @@ private void generateHtml5Report( CompleteReportModel reportModel ) throws IOExc

private static void printUsageAndExit() {
System.err.println( "Options: [--format=<format>] [--sourceDir=<dir>] [--targetDir=<dir>] [--customcss=<cssfile>]" ); // NOSONAR
System.err.println( " <format> = html, html5, or text, default is html" );
System.err.println( " <format> = html or text, default is html" );
System.exit( 1 );
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1c029d4

Please sign in to comment.