-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66cd719
commit 18772f0
Showing
17 changed files
with
590 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 0 additions & 49 deletions
49
src/main/java/reposense/model/reportconfig/ReportGroupDetails.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package reposense.parser; | ||
|
||
import java.io.IOException; | ||
import java.lang.reflect.Type; | ||
import java.nio.file.Path; | ||
import java.util.logging.Logger; | ||
|
||
import reposense.system.LogsManager; | ||
|
||
/** | ||
* Represents a YAML parser that is able to parse a YAML file from a {@link Path} into an object of | ||
* type {@code T}. | ||
* | ||
* @param <T> Type {@code T} that this parser can parse and return as an object | ||
*/ | ||
public abstract class YamlParser<T> { | ||
protected static final Logger logger = LogsManager.getLogger(YamlParser.class); | ||
|
||
/** | ||
* Returns the type of {@code T} for YAML file conversion. | ||
*/ | ||
public abstract Type getType(); | ||
|
||
/** | ||
* Converts the YAML file from the given {@code path} into object of type {@code T} and return it. | ||
* | ||
* @param path Path to the YAML file | ||
* @return Parsed object of type {@code T} | ||
* @throws IOException if the {@code path} is invalid | ||
*/ | ||
public abstract T parse(Path path) throws IOException; | ||
} |
83 changes: 82 additions & 1 deletion
83
src/systemtest/resources/ConfigSystemTest/30daysFromUntilDate/expected/summary.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,82 @@ | ||
{"reportGeneratedTime":"Tue Jul 24 17:45:15 SGT 2018","reportGenerationTime":"15 second(s)","zoneId":"Asia/Singapore","reportTitle":"RepoSense Report Test Title","repos":[{"location":{"location":"https://github.com/reposense/testrepo-Alpha.git","repoName":"testrepo-Alpha","organization":"reposense","domainName":"github"},"branch":"master","displayName":"reposense/testrepo-Alpha[master]","outputFolderName":"reposense_testrepo-Alpha_master"},{"location":{"location":"https://github.com/reposense/testrepo-Beta.git","repoName":"testrepo-Beta","organization":"reposense","domainName":"github"},"branch":"master","displayName":"reposense/testrepo-Beta[master]","outputFolderName":"reposense_testrepo-Beta_master"},{"location":{"location":"https://github.com/reposense/testrepo-Charlie.git","repoName":"testrepo-Charlie","organization":"reposense","domainName":"github"},"branch":"master","displayName":"reposense/testrepo-Charlie[master]","outputFolderName":"reposense_testrepo-Charlie_master"},{"location":{"location":"https://github.com/reposense/testrepo-Delta.git","repoName":"testrepo-Delta","organization":"reposense","domainName":"github"},"branch":"master","displayName":"reposense/testrepo-Delta[master]","outputFolderName":"reposense_testrepo-Delta_master"}],"errorSet":[{"repoName":"ttps://github.com/reposense/testrepo-Beta.git","errorMessage":"ttps://github.com/reposense/testrepo-Beta.git is an invalid remote URL."},{"repoName":"reposense/testrepo-Delta[nonExistentBranch]","errorMessage":"Branch \"nonExistentBranch\" does not exist."}],"sinceDate":"2017-10-01","untilDate":"2017-11-01","isSinceDateProvided":false,"isUntilDateProvided":true,"supportedDomainUrlMap":{"NOT_RECOGNIZED":{"BRANCH":"","REPO_URL":"UNSUPPORTED","BASE_URL":"UNSUPPORTED","HISTORY_PATH":"","COMMIT_PATH":"","BLAME_PATH":""},"github":{"BRANCH":"tree/$BRANCH","REPO_URL":"https://github.com/$ORGANIZATION/$REPO_NAME/","BASE_URL":"https://github.com/","HISTORY_PATH":"commits/$BRANCH/$FILE_PATH","COMMIT_PATH":"commit/$COMMIT_HASH","BLAME_PATH":"blame/$BRANCH/$FILE_PATH"}}} | ||
{ | ||
"zoneId": "Asia/Singapore", | ||
"reportTitle": "RepoSense Report", | ||
"repos": [ | ||
{ | ||
"location": { | ||
"location": "https://github.com/reposense/testrepo-Alpha.git", | ||
"repoName": "testrepo-Alpha", | ||
"organization": "reposense", | ||
"domainName": "github" | ||
}, | ||
"branch": "master", | ||
"displayName": "reposense/testrepo-Alpha[master]", | ||
"outputFolderName": "reposense_testrepo-Alpha_master" | ||
}, | ||
{ | ||
"location": { | ||
"location": "https://github.com/reposense/testrepo-Beta.git", | ||
"repoName": "testrepo-Beta", | ||
"organization": "reposense", | ||
"domainName": "github" | ||
}, | ||
"branch": "master", | ||
"displayName": "reposense/testrepo-Beta[master]", | ||
"outputFolderName": "reposense_testrepo-Beta_master" | ||
}, | ||
{ | ||
"location": { | ||
"location": "https://github.com/reposense/testrepo-Charlie.git", | ||
"repoName": "testrepo-Charlie", | ||
"organization": "reposense", | ||
"domainName": "github" | ||
}, | ||
"branch": "master", | ||
"displayName": "reposense/testrepo-Charlie[master]", | ||
"outputFolderName": "reposense_testrepo-Charlie_master" | ||
}, | ||
{ | ||
"location": { | ||
"location": "https://github.com/reposense/testrepo-Delta.git", | ||
"repoName": "testrepo-Delta", | ||
"organization": "reposense", | ||
"domainName": "github" | ||
}, | ||
"branch": "master", | ||
"displayName": "reposense/testrepo-Delta[master]", | ||
"outputFolderName": "reposense_testrepo-Delta_master" | ||
} | ||
], | ||
"errorSet": [ | ||
{ | ||
"repoName": "ttps://github.com/reposense/testrepo-Beta.git", | ||
"errorMessage": "ttps://github.com/reposense/testrepo-Beta.git is an invalid remote URL." | ||
}, | ||
{ | ||
"repoName": "reposense/testrepo-Delta[nonExistentBranch]", | ||
"errorMessage": "Branch \"nonExistentBranch\" does not exist." | ||
} | ||
], | ||
"sinceDate": "2017-10-01", | ||
"untilDate": "2017-11-01", | ||
"isSinceDateProvided": false, | ||
"isUntilDateProvided": true, | ||
"supportedDomainUrlMap": { | ||
"NOT_RECOGNIZED": { | ||
"BRANCH": "", | ||
"REPO_URL": "UNSUPPORTED", | ||
"BASE_URL": "UNSUPPORTED", | ||
"HISTORY_PATH": "", | ||
"COMMIT_PATH": "", | ||
"BLAME_PATH": "" | ||
}, | ||
"github": { | ||
"BRANCH": "tree/$BRANCH", | ||
"REPO_URL": "https://github.com/$ORGANIZATION/$REPO_NAME/", | ||
"BASE_URL": "https://github.com/", | ||
"HISTORY_PATH": "commits/$BRANCH/$FILE_PATH", | ||
"COMMIT_PATH": "commit/$COMMIT_HASH", | ||
"BLAME_PATH": "blame/$BRANCH/$FILE_PATH" | ||
} | ||
} | ||
} |
Oops, something went wrong.