Skip to content

Commit

Permalink
release: 0.7.9 (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb authored Sep 18, 2024
2 parents 389f3c9 + a9817fb commit 50d8ed0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CorsFilter : Filter {
this.addHeader(HttpHeaders.ACCESS_CONTROL_MAX_AGE, "3600")
this.addHeader(
HttpHeaders.ACCESS_CONTROL_ALLOW_HEADERS,
"Origin, X-Requested-With, Content-Type, Accept, Authorization"
"Origin, X-Requested-With, Content-Type, Accept, Authorization, Api-Version"
)
return this
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package org.gitanimals.star.infra

import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Profile
import org.springframework.core.io.ClassPathResource
import org.springframework.http.HttpHeaders
import org.springframework.stereotype.Component
import org.springframework.web.client.RestClient
import java.nio.charset.Charset

@Component
@Profile("!test")
class GithubStargazerApi(
@Value("\${github.token}") private val token: String,
) {
Expand All @@ -34,7 +36,7 @@ class GithubStargazerApi(
)
).exchange { _, response ->
assertIsSuccess(response)

response.bodyTo(GithubStargazerGraphqlResponse::class.java)!!
.data
.repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ package org.gitanimals.star.infra

import org.gitanimals.star.domain.StargazerService
import org.springframework.boot.context.event.ApplicationStartedEvent
import org.springframework.context.annotation.Profile
import org.springframework.context.event.EventListener
import org.springframework.scheduling.annotation.Scheduled
import org.springframework.stereotype.Service

@Service
@Profile("!test")
class StargazerBatchJob(
private val githubStargazerApi: GithubStargazerApi,
private val stargazerService: StargazerService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.gitanimals.Application
import org.gitanimals.render.supports.RedisContainer
import org.gitanimals.render.supports.SagaCapture
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.ActiveProfiles
import org.springframework.test.context.TestPropertySource
import kotlin.time.Duration.Companion.seconds

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ internal class CorsFilterTest(
{
it == Header(
"Access-Control-Allow-Headers",
"Origin, X-Requested-With, Content-Type, Accept, Authorization"
"Origin, X-Requested-With, Content-Type, Accept, Authorization, Api-Version"
)
}
)
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
spring.profiles.active=test
spring.datasource.driver-class-name = org.h2.Driver
spring.datasource.url = jdbc:h2:mem:test;MODE=MySQL;DATABASE_TO_LOWER=TRUE

Expand Down

0 comments on commit 50d8ed0

Please sign in to comment.