Skip to content

Commit c91b132

Browse files
fix code architecture and main class
1 parent f2996ce commit c91b132

5 files changed

Lines changed: 10 additions & 228 deletions

File tree

src/main/java/com/francescodisalesdev/gitcli/GitCli.java

Lines changed: 0 additions & 202 deletions
This file was deleted.

src/main/java/com/francescodisalesdev/gitcli/GithubterminalApplication.java renamed to src/main/java/com/francescodisalesdev/gitcli/GitCliShell.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222

2323

2424
@SpringBootApplication
25-
public class GithubterminalApplication {
25+
public class GitCliShell {
2626

2727
public static void main(String[] args) {
28-
SpringApplication.run(GithubterminalApplication.class, args);
28+
SpringApplication.run(GitCliShell.class, args);
2929
}
3030

3131
}

src/main/java/com/francescodisalesdev/gitcli/service/GitService.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,6 @@ public int getPages(String param) throws IOException
7878

7979
}
8080

81-
82-
public void cloneRepository(String repository,String localPath) throws IOException, InterruptedException
83-
{
84-
String gitRepository = repository+".git";
85-
86-
ProcessBuilder processBuilder = new ProcessBuilder("git","clone",gitRepository);
87-
processBuilder.directory(new File(localPath));
88-
Process process = processBuilder.start();
89-
90-
System.out.println(SystemMessages.CLONING_PROCESS);
91-
process.waitFor();
92-
93-
System.out.println(SystemMessages.CLONING_DONE);
94-
95-
}
96-
9781
public void cloneRepositoryBranch(String repository,String localPath,String branch) throws IOException,InterruptedException
9882
{
9983
String gitRepository = repository+".git";

src/main/resources/banner.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

2-
============================================================
3-
/ ____(_) | / ____| (_)/ ____| | | | |
4-
| | __ _| |_| | | |_| (___ | |__ ___| | |
5-
| | |_ | | __| | | | |\___ \| '_ \ / _ \ | |
6-
| |__| | | |_| |____| | |____) | | | | __/ | |
7-
\_____|_|\__|\_____|_|_|_____/|_| |_|\___|_|_|
8-
============================================================
2+
${AnsiColor.RED} ============================================================
3+
${AnsiColor.WHITE} / ____(_) | / ____| (_)/ ____| | | | |
4+
${AnsiColor.WHITE} | | __ _| |_| | | |_| (___ | |__ ___| | |
5+
${AnsiColor.WHITE} | | |_ | | __| | | | |\___ \| '_ \ / _ \ | |
6+
${AnsiColor.WHITE} | |__| | | |_| |____| | |____) | | | | __/ | |
7+
${AnsiColor.WHITE} \_____|_|\__|\_____|_|_|_____/|_| |_|\___|_|_|
8+
${AnsiColor.RED} ============================================================

src/test/java/com/francescodisalesdev/gitcli/GithubterminalApplicationTests.java renamed to src/test/java/com/francescodisalesdev/gitcli/GitCliShellTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import org.springframework.boot.test.context.SpringBootTest;
55

66
@SpringBootTest
7-
class GithubterminalApplicationTests {
7+
class GitCliShellTests {
88

99
@Test
1010
void contextLoads() {

0 commit comments

Comments
 (0)