Skip to content

Commit

Permalink
reporter-web-app/yarn.lock: Bump a couple of dependencies
Browse files Browse the repository at this point in the history
The `reporter-web-app` build failed locally and this change fixes it for
unkown reason.

Signed-off-by: Frank Viernau <frank.viernau@here.com>
  • Loading branch information
fviernau committed Jun 17, 2021
1 parent 77646be commit b96ba35
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ project:
scopes: []
packages: []
issues:
- timestamp: "<REPLACE_TIMESTAMP>"
- timestamp: "1970-01-01T00:00:00Z"
source: "CocoaPods"
message: "Missing lockfile 'src/funTest/assets/projects/synthetic/cocoapods/no-lockfile/Podfile.lock'\
\ for definition file 'src/funTest/assets/projects/synthetic/cocoapods/no-lockfile/Podfile'.\
Expand Down
19 changes: 12 additions & 7 deletions analyzer/src/funTest/kotlin/managers/CocoaPodsFunTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ import io.kotest.core.spec.style.WordSpec
import io.kotest.matchers.shouldBe

import java.io.File
import java.time.Instant

import org.ossreviewtoolkit.downloader.VersionControlSystem
import org.ossreviewtoolkit.model.ProjectAnalyzerResult
import org.ossreviewtoolkit.utils.normalizeVcsUrl
import org.ossreviewtoolkit.utils.test.DEFAULT_ANALYZER_CONFIGURATION
import org.ossreviewtoolkit.utils.test.DEFAULT_REPOSITORY_CONFIGURATION
Expand Down Expand Up @@ -68,11 +70,18 @@ class CocoaPodsFunTest : WordSpec({

val result = createCocoaPods().resolveSingleProject(definitionFile)

result.toYaml() shouldBe expectedResult
result.replaceIssueTimestamps().toYaml() shouldBe expectedResult
}
}
})

private fun createCocoaPods(): CocoaPods =
CocoaPods.Factory().create(
analysisRoot = USER_DIR,
analyzerConfig = DEFAULT_ANALYZER_CONFIGURATION,
repoConfig = DEFAULT_REPOSITORY_CONFIGURATION
)

private fun getExpectedResult(definitionFile: File, expectedResultFile: File): String {
val projectDir = definitionFile.parentFile
val vcsDir = VersionControlSystem.forDirectory(projectDir)!!
Expand All @@ -89,9 +98,5 @@ private fun getExpectedResult(definitionFile: File, expectedResultFile: File): S
)
}

private fun createCocoaPods(): CocoaPods =
CocoaPods.Factory().create(
analysisRoot = USER_DIR,
analyzerConfig = DEFAULT_ANALYZER_CONFIGURATION,
repoConfig = DEFAULT_REPOSITORY_CONFIGURATION
)
private fun ProjectAnalyzerResult.replaceIssueTimestamps(): ProjectAnalyzerResult =
copy(issues = issues.map { it.copy(timestamp = Instant.EPOCH) })
7 changes: 7 additions & 0 deletions analyzer/src/main/kotlin/managers/CocoaPods.kt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ import org.ossreviewtoolkit.utils.textValueOrEmpty
* The only interactions with the 'pod' command happen in order to obtain meta-data for dependencies. Therefore
* 'pod repo update' and 'pod spec which' get executed, which works also under Linux.
*
* Limitations:
*
* - A Podfile may specify (multiple) Specs repository via the `source` property. This implementation currently
* always assumes the default associated with absent `source` properties, see also
* https://stackoverflow.com/questions/46780420/how-do-i-use-source-in-podfile.
* -
*
* Note: This class depends on https://github.com/CocoaPods/CocoaPods/pull/10609 which is not yet released, so a build
* of the master branch is needed.
*/
Expand Down
Loading

0 comments on commit b96ba35

Please sign in to comment.