Skip to content

Commit

Permalink
Name change on classes and added main.java to git, related to #18 & #16
Browse files Browse the repository at this point in the history
  • Loading branch information
my name committed Oct 18, 2018
1 parent 52cceb0 commit 869881a
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* @author florenthaxha
*/
public class CreateStatistics implements CreateStatisticsIF {
public class CreateReport implements CreateReportIF {
/**
*
* @param json JSON String made using createReportJson()
Expand All @@ -37,7 +37,7 @@ public void saveJSONReport(String json, String targetPath) {
writer.append(json);
}
} catch (IOException ex) {
Logger.getLogger(CreateStatistics.class.getName()).log(Level.SEVERE, null, ex);
Logger.getLogger(CreateReport.class.getName()).log(Level.SEVERE, null, ex);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @author florenthaxha
*/
public interface CreateStatisticsIF {
public interface CreateReportIF {

// Takes a JSON String and a Path String and saves them in that location, If no target path is given the currentDIR is used.
void saveJSONReport(String json, String targetPath);
Expand Down
33 changes: 33 additions & 0 deletions src/main/java/com/praqma/gitrepodoctor/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.praqma.gitrepodoctor;

import java.nio.file.Files;
import java.nio.file.Paths;

/**
*
* @author florenthaxha
*/
public class Main {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// CreateStatistics cs = new CreateStatistics();
// String json = RepositoryInformation.build("/Users/florenthaxha/Work/GitRepoDoctor").toJson();
// System.out.println(json);
// cs.createAndSaveReport("/Users/florenthaxha/Work/GitRepoDoctor", "/Users/florenthaxha/School");
// RepositoryInformation rii = new RepositoryInformation().fromJson(json);
// System.out.println(rii);

assert args.length == 1;
assert Files.exists(Paths.get(args[0]));
System.out.println(RepositoryInformation.build(args[0]).toJson());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private static List<File> getRepoFiles(Path pathtoRepository) {
.forEach(file -> files.add(file.toFile()));
fileStream.close();
} catch (IOException ex) {
Logger.getLogger(CreateStatistics.class.getName()).log(Level.SEVERE, null, ex);
Logger.getLogger(CreateReport.class.getName()).log(Level.SEVERE, null, ex);
}

return files;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* and open the template in the editor.
*/

import com.praqma.gitrepodoctor.CreateStatistics;
import com.praqma.gitrepodoctor.CreateReport;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
Expand All @@ -21,13 +21,13 @@
*
* @author florenthaxha
*/
public class CreateStaticticsTest {
public class CreateReportTest {
public ArrayList<File> files = new ArrayList<>();
public CreateStatistics cs = new CreateStatistics();
public CreateReport cs = new CreateReport();
@Rule
public TemporaryFolder folder = new TemporaryFolder();

public CreateStaticticsTest() {
public CreateReportTest() {

}

Expand Down

0 comments on commit 869881a

Please sign in to comment.