Skip to content

Commit

Permalink
Update dependencies (#519)
Browse files Browse the repository at this point in the history
- Armeria 0.99.6 -> 0.99.7
- jGit 5.7.0 -> 5.8.0
- Spring Boot 2.3.0 -> 2.3.1
- Build:
  - Gradle 6.4.1 -> 6.5
  - Shadow 5.2.0 -> 6.0.0
  - Checkstyle 8.32 -> 8.33
  - json-unit 2.17.0 -> 2.18.1

Co-authored-by: Ikhun Um <[email protected]>
  • Loading branch information
trustin and ikhoon authored Jun 22, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent dd74094 commit 9030505
Showing 27 changed files with 275 additions and 220 deletions.
13 changes: 7 additions & 6 deletions dependencies.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
#
boms:
- com.fasterxml.jackson:jackson-bom:2.11.0
- com.linecorp.armeria:armeria-bom:0.99.6
- com.linecorp.armeria:armeria-bom:0.99.7
- io.micrometer:micrometer-bom:1.5.1
- org.junit:junit-bom:5.6.2

@@ -53,7 +53,7 @@ com.github.ben-manes.caffeine:
- https://www.javadoc.io/doc/com.github.ben-manes.caffeine/caffeine/2.8.1/

com.github.jengelman.gradle.plugins:
shadow: { version: '5.2.0' }
shadow: { version: '6.0.0' }

com.github.node-gradle:
gradle-node-plugin: { version: '2.2.4' }
@@ -112,7 +112,7 @@ com.linecorp.armeria:
- https://www.javadoc.io/doc/com.linecorp.armeria/armeria-javadoc/0.99.6/

com.puppycrawl.tools:
checkstyle: { version: '8.32' }
checkstyle: { version: '8.33' }

com.spotify:
completable-futures:
@@ -163,7 +163,7 @@ me.champeau.gradle:
jmh-gradle-plugin: { version: '0.5.0' }

net.javacrumbs.json-unit:
json-unit: { version: &JSON_UNIT_VERSION '2.17.0' }
json-unit: { version: &JSON_UNIT_VERSION '2.18.1' }
json-unit-fluent: { version: *JSON_UNIT_VERSION }

net.sf.proguard:
@@ -213,7 +213,8 @@ org.eclipse.jetty.alpn:
alpn-api: { version: '1.1.3.v20160715' }

org.eclipse.jgit:
org.eclipse.jgit: { version: '5.7.0.202003110725-r' }
org.eclipse.jgit: { version: &JGIT_VERSION '5.8.0.202006091008-r' }
org.eclipse.jgit.ssh.jsch: { version: *JGIT_VERSION }

org.hibernate.validator:
hibernate-validator: { version: '6.1.5.Final' }
@@ -243,7 +244,7 @@ org.slf4j:

org.springframework.boot:
spring-boot-starter:
version: &SPRING_BOOT_VERSION '2.3.0.RELEASE'
version: &SPRING_BOOT_VERSION '2.3.1.RELEASE'
javadocs:
- https://docs.spring.io/spring/docs/current/javadoc-api/
spring-boot-starter-test: { version: *SPRING_BOOT_VERSION }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions server/build.gradle
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ dependencies {

// jGit
implementation 'org.eclipse.jgit:org.eclipse.jgit'
implementation 'org.eclipse.jgit:org.eclipse.jgit.ssh.jsch'

// Micrometer
implementation 'io.micrometer:micrometer-core'
Original file line number Diff line number Diff line change
@@ -23,7 +23,6 @@
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;

@@ -37,6 +36,7 @@
import com.linecorp.armeria.common.HttpResponse;
import com.linecorp.armeria.common.HttpStatus;
import com.linecorp.armeria.server.ServiceRequestContext;
import com.linecorp.armeria.server.annotation.Default;
import com.linecorp.armeria.server.annotation.ExceptionHandler;
import com.linecorp.armeria.server.annotation.Get;
import com.linecorp.armeria.server.annotation.Param;
@@ -85,9 +85,9 @@ public RepositoryService(ProjectManager projectManager, CommandExecutor executor
* Normalizes the revision into an absolute revision.
*/
@Get("/projects/{projectName}/repositories/{repoName}/revision/{revision}")
public RevisionDto normalizeRevision(@Param("projectName") String projectName,
@Param("repoName") String repoName,
@Param("revision") String revision) {
public RevisionDto normalizeRevision(@Param String projectName,
@Param String repoName,
@Param String revision) {
return DtoConverter.convert(projectManager().get(projectName).repos().get(repoName)
.normalizeNow(new Revision(revision)));
}
@@ -98,15 +98,14 @@ public RevisionDto normalizeRevision(@Param("projectName") String projectName,
*/
@Get("regex:/projects/(?<projectName>[^/]+)/repositories/(?<repoName>[^/]+)" +
"/files/revisions/(?<revision>[^/]+)(?<path>/.*$)")
public CompletionStage<EntryDto> getFile(@Param("projectName") String projectName,
@Param("repoName") String repoName,
@Param("revision") String revision,
@Param("path") String path,
@Param("queryType") Optional<String> queryType,
@Param("expression") Optional<String> expressions) {
public CompletionStage<EntryDto> getFile(@Param String projectName,
@Param String repoName,
@Param String revision,
@Param String path,
@Param @Default("IDENTITY") QueryType queryType,
@Param @Default("") String expression) {

final Query<?> query = Query.of(QueryType.valueOf(queryType.orElse("IDENTITY")),
path, expressions.orElse(""));
final Query<?> query = Query.of(queryType,path, expression);
final Repository repo = projectManager().get(projectName).repos().get(repoName);
return repo.get(repo.normalizeNow(new Revision(revision)), query)
.thenApply(DtoConverter::convert);
@@ -120,9 +119,9 @@ public CompletionStage<EntryDto> getFile(@Param("projectName") String projectNam
@Put
@Path("/projects/{projectName}/repositories/{repoName}/files/revisions/{revision}")
@RequiresWritePermission
public CompletionStage<Object> addOrEditFile(@Param("projectName") String projectName,
@Param("repoName") String repoName,
@Param("revision") String revision,
public CompletionStage<Object> addOrEditFile(@Param String projectName,
@Param String repoName,
@Param String revision,
AggregatedHttpRequest request,
ServiceRequestContext ctx) {
final Entry<CommitMessageDto, Change<?>> p = commitMessageAndChange(request);
@@ -143,10 +142,10 @@ public CompletionStage<Object> addOrEditFile(@Param("projectName") String projec
@Post("regex:/projects/(?<projectName>[^/]+)/repositories/(?<repoName>[^/]+)" +
"/delete/revisions/(?<revision>[^/]+)(?<path>/.*$)")
@RequiresWritePermission
public HttpResponse deleteFile(@Param("projectName") String projectName,
@Param("repoName") String repoName,
@Param("revision") String revision,
@Param("path") String path,
public HttpResponse deleteFile(@Param String projectName,
@Param String repoName,
@Param String revision,
@Param String path,
AggregatedHttpRequest request,
ServiceRequestContext ctx) {
final CommitMessageDto commitMessage;
@@ -171,14 +170,14 @@ public HttpResponse deleteFile(@Param("projectName") String projectName,
*/
@Get("regex:/projects/(?<projectName>[^/]+)/repositories/(?<repoName>[^/]+)" +
"/history(?<path>/.*$)")
public CompletionStage<List<CommitDto>> getHistory(@Param("projectName") String projectName,
@Param("repoName") String repoName,
@Param("path") String path,
@Param("from") Optional<String> from,
@Param("to") Optional<String> to) {
public CompletionStage<List<CommitDto>> getHistory(@Param String projectName,
@Param String repoName,
@Param String path,
@Param @Default("-1") String from,
@Param @Default("1") String to) {
return projectManager().get(projectName).repos().get(repoName)
.history(new Revision(from.orElse("-1")),
new Revision(to.orElse("1")),
.history(new Revision(from),
new Revision(to),
path + "**")
.thenApply(commits -> commits.stream()
.map(DtoConverter::convert)
@@ -190,10 +189,10 @@ public CompletionStage<List<CommitDto>> getHistory(@Param("projectName") String
* Finds the files matched by {@code term}.
*/
@Get("/projects/{projectName}/repositories/{repoName}/search/revisions/{revision}")
public CompletionStage<List<EntryDto>> search(@Param("projectName") String projectName,
@Param("repoName") String repoName,
@Param("revision") String revision,
@Param("term") String term) {
public CompletionStage<List<EntryDto>> search(@Param String projectName,
@Param String repoName,
@Param String revision,
@Param String term) {
return projectManager().get(projectName).repos().get(repoName)
.find(new Revision(revision), normalizeSearchTerm(term), FIND_ALL_WITH_CONTENT)
.thenApply(entries -> entries.values().stream()
@@ -207,11 +206,11 @@ public CompletionStage<List<EntryDto>> search(@Param("projectName") String proje
*/
@Get("regex:/projects/(?<projectName>[^/]+)/repositories/(?<repoName>[^/]+)" +
"/diff(?<path>/.*$)")
public CompletionStage<List<ChangeDto>> getDiff(@Param("projectName") String projectName,
@Param("repoName") String repoName,
@Param("path") String path,
@Param("from") String from,
@Param("to") String to) {
public CompletionStage<List<ChangeDto>> getDiff(@Param String projectName,
@Param String repoName,
@Param String path,
@Param String from,
@Param String to) {
return projectManager().get(projectName).repos().get(repoName)
.diff(new Revision(from), new Revision(to), path)
.thenApply(changeMap -> changeMap.values().stream()
Loading

0 comments on commit 9030505

Please sign in to comment.