Skip to content

Commit

Permalink
Merge pull request #28
Browse files Browse the repository at this point in the history
Migration to Next.js
  • Loading branch information
untalsanders authored Jun 28, 2024
2 parents d76727f + be954e5 commit 5ac4a75
Show file tree
Hide file tree
Showing 121 changed files with 2,490 additions and 3,202 deletions.
Empty file modified .editorconfig
100644 → 100755
Empty file.
Empty file modified .env.production
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion .eslintrc.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": ["next/core-web-vitals", "prettier"]
"extends": ["next/core-web-vitals"]
}
Empty file modified .github/workflows/deploy.yml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .npmrc
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion .nvmrc
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.11.0
v20.13.1
1 change: 1 addition & 0 deletions .prettierignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.next/
node_modules/
package-lock.json
src/pagess/
Empty file modified .prettierrc.json
100644 → 100755
Empty file.
7 changes: 3 additions & 4 deletions .vscode/launch.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
{
"name": "Run Dev",
"request": "launch",
"type": "node",
"runtimeVersion": "20.13.1",
"runtimeArgs": ["run-script", "dev"],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
"skipFiles": ["<node_internals>/**"]
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
Empty file modified LICENSE
100644 → 100755
Empty file.
5 changes: 4 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,25 @@
<h3> :zap: Personal Website :zap:️ </h3>
</div>

![Screenshot untalsanders-site](screenshot.png "screenshot-site")
![Screenshot untalsanders-site](screenshot.png 'screenshot-site')
<br>

## :checkered_flag: How to start

1. Install Node.js 20, go to [NVM](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating) for install NVM

```shell
nvm install 20 --lts
```

2. Set up as your default Node.js

```shell
nvm alias default 20
```

3. Clone this repository:

```shell
git clone https://github.com/untalsanders/untalsanders.github.io.git
```
Expand Down
2 changes: 1 addition & 1 deletion content/2023-02-25-arrays-in-java.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ date: '2023-02-25'
author: 'Sanders Gutiérrez'
cover: '/images/cover-arrays-in-java.webp'
tags:
- 'Java'
- 'Java'
---

![Arrays in Java](/images/cover-arrays-in-java.webp)
Expand Down
4 changes: 2 additions & 2 deletions content/2023-03-04-interfaces-funcionales-en-java.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ date: '2023-03-04'
author: 'Sanders Gutiérrez'
cover: '/images/cover-interfaces-funcionales-en-java.webp'
tags:
- 'Java'
- 'Programming'
- 'Java'
- 'Programming'
---

![Interfaces Funcionales en Java](/images/cover-interfaces-funcionales-en-java.webp)
Expand Down
55 changes: 27 additions & 28 deletions content/2023-05-28-cherry-pick-for dummies.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,49 +15,48 @@ Aquí te dejo algunos pasos a seguir:

1. Identifica el hash del commit que quieres aplicar en tu rama actual. Puedes encontrarlo en el historial de commits o en la rama de desarrollo.

```bash
❯ git log --graph --oneline --decorate
```
```bash
❯ git log --graph --oneline --decorate
```

2. Cambia a la rama en la que quieres aplicar los cambios.

```bash
❯ git switch <nombre-de-rama>
```
```bash
❯ git switch <nombre-de-rama>
```

3. Realiza el cherry-pick con el hash del commit que quieres aplicar.

```bash
❯ git cherry-pick <hash-del-commit>
```
```bash
❯ git cherry-pick <hash-del-commit>
```

4. Resuelve los conflictos, si es que los hay. En algunos casos, Git puede resolver los conflictos automáticamente, pero en otros, necesitarás hacerlo manualmente. Lo siguiente es un ejemplo:

```bash
❯ git cherry-pick d19e920
Auto-merging openapi.yml
CONFLICT (content): Merge conflict in openapi.yml
error: could not apply d19e920... chore: Agrego CategoryId al esquema de la API.
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
```
```bash
❯ git cherry-pick d19e920
Auto-merging openapi.yml
CONFLICT (content): Merge conflict in openapi.yml
error: could not apply d19e920... chore: Agrego CategoryId al esquema de la API.
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
```

5. Verifica que los cambios se hayan aplicado correctamente.

```bash
git log
```
```bash
git log
```

6. Si todo se ve bien, haz commit de los cambios.

```bash
git commit -m "Mensaje de commit"
```

```bash
git commit -m "Mensaje de commit"
```

Es importante tener en cuenta que el cherry-pick puede generar conflictos si el cambio que queremos aplicar depende de otros cambios que no están presentes en nuestra rama actual. También es importante hacer un seguimiento cuidadoso de los cambios que estamos aplicando para evitar errores y mantener una buena gestión del historial de commits.

Expand Down
26 changes: 13 additions & 13 deletions content/2023-06-07-junit-5-parameterized-tests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ date: '2023-06-07'
author: 'Sanders Gutiérrez'
cover: '/images/cover-junit-5-parameterized-tests.webp'
tags:
- 'Java'
- 'Java'
---

![JUnit 5 Parameterized Tests](/images/cover-junit-5-parameterized-tests.webp)
Expand All @@ -17,9 +17,9 @@ Let me give you a summary of JUnit - In software development, we developers writ

Now that we know about JUnit. Let’s now focus on the topic of parameterized tests in JUnit 5. The parameterized tests solve the most common problems while developing a test framework for any old/new functionalities.

- Writing a test case for every possible input becomes easy.
- A single test case can accept multiple inputs to test the source code, helping to reduce code duplication.
- By running a single test case with multiple inputs, we can be confident that all possible scenarios have been covered and maintain better code coverage.
- Writing a test case for every possible input becomes easy.
- A single test case can accept multiple inputs to test the source code, helping to reduce code duplication.
- By running a single test case with multiple inputs, we can be confident that all possible scenarios have been covered and maintain better code coverage.

Development teams aim to create source code that is both reusable and loosely coupled by utilizing methods and classes. The way the code functions is affected by the parameters passed to it. For example, the `sum` method in a Calculator class is able to process both integer and float values. `JUnit 5` has introduced the ability to perform parameterized tests, which enables testing the source code using a single test case that can accept different inputs. This allows for more efficient testing, as previously in older versions of JUnit, separate test cases had to be created for each input type, leading to a lot of code repetition.

Expand Down Expand Up @@ -109,7 +109,7 @@ void checkEmpty(String value) {
}
```

- We can also combine the passing of null and empty inputs using @NullAndEmptySource.
- We can also combine the passing of null and empty inputs using @NullAndEmptySource.

```java
@ParameterizedTest
Expand All @@ -119,7 +119,7 @@ void checkNullAndEmpty(String value) {
}
```

- Another trick to pass null, empty and blank input values is to combine the @NullAndEmptySource and @ValueSource(strings = { " ", " " }) to cover all possible negative scenarios.
- Another trick to pass null, empty and blank input values is to combine the @NullAndEmptySource and @ValueSource(strings = { " ", " " }) to cover all possible negative scenarios.

```java
@ParameterizedTest
Expand All @@ -134,7 +134,7 @@ void checkNullEmptyAndBlank(String value) {

This annotation allows us to load the inputs from one or more factory methods of the test class or external classes. Each factory method must generate a stream of arguments.

- Explicit method source - The test will try to load the supplied method.
- Explicit method source - The test will try to load the supplied method.

```java
// Note: The test will try to load the supplied method
Expand All @@ -149,7 +149,7 @@ static Stream<String> checkExplicitMethodSourceArgs() {
}
```

- Implicit method source - The test will search for the source method that matches the test-case method name..
- Implicit method source - The test will search for the source method that matches the test-case method name..

```java
// Note: The test will search for the source method
Expand All @@ -165,7 +165,7 @@ static Stream<String> checkImplicitMethodSource() {
}
```

- Multi-argument method source - We must pass the inputs as a Stream of Arguments. The test will automatically map arguments based on the index.
- Multi-argument method source - We must pass the inputs as a Stream of Arguments. The test will automatically map arguments based on the index.

```java
// Note: The test will automatically map arguments based on the index
Expand All @@ -180,7 +180,7 @@ static Stream<Arguments> checkMultiArgumentsMethodSource() {
}
```

- External method source - The test will try to load the external method.
- External method source - The test will try to load the external method.

```java
// Note: The test will try to load the external method
Expand Down Expand Up @@ -260,8 +260,8 @@ void checkCsvFileSourceAttributes(int number, String expected) {
**src/test/resources/csv-file-source_attributes.csv**

|| NUMBER | ODD_EVEN ||
|| 2 | even ||
|| 3 | odd ||
|| 2 | even ||
|| 3 | odd ||

## @EnumSource

Expand Down Expand Up @@ -293,7 +293,7 @@ void checkEnumSourceValue(ChronoUnit unit) {

`@EnumSource` will pass all 16 ChronoUnit enums as an argument in this example.

- names - The names of enum constants to provide, or regular expression to select the names, example - DAYS or ^.*DAYS$
- names - The names of enum constants to provide, or regular expression to select the names, example - DAYS or ^.\*DAYS$

```java
@ParameterizedTest
Expand Down
14 changes: 0 additions & 14 deletions index.html

This file was deleted.

9 changes: 0 additions & 9 deletions jsconfig.json

This file was deleted.

5 changes: 5 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
18 changes: 0 additions & 18 deletions next.config.js

This file was deleted.

4 changes: 4 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}

export default nextConfig
Loading

0 comments on commit 5ac4a75

Please sign in to comment.