Skip to content

Commit

Permalink
Merge pull request #177 from VirtusLab/file-format-renames
Browse files Browse the repository at this point in the history
Rename inkuire file formats
  • Loading branch information
BarkingBad authored Feb 3, 2021
2 parents ff7924b + 5c17c65 commit 0a1c090
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: java -jar engineHttp/target/scala-2.13/engineHttp-assembly-0.1.0-SNAPSHOT.jar --address 0.0.0.0 -p $PORT -d $DB_PATH/kotlin-stdlib-common/kotlin-stdlib.inkuire.fdb -d $DB_PATH/kotlin-stdlib-java-common/kotlin-stdlib.inkuire.fdb -d $DB_PATH/kotlin-stdlib-jdk8/kotlin-stdlib.inkuire.fdb -a $DB_PATH/kotlin-stdlib-common/kotlin-stdlib.inkuire.adb -a $DB_PATH/kotlin-stdlib-java-common/kotlin-stdlib.inkuire.adb -a $DB_PATH/kotlin-stdlib-jdk8/kotlin-stdlib.inkuire.adb
web: java -jar engineHttp/target/scala-2.13/engineHttp-assembly-0.1.0-SNAPSHOT.jar --address 0.0.0.0 -p $PORT -d $DB_PATH/kotlin-stdlib-common/kotlin-stdlib.fdb.inkuire -d $DB_PATH/kotlin-stdlib-java-common/kotlin-stdlib.fdb.inkuire -d $DB_PATH/kotlin-stdlib-jdk8/kotlin-stdlib.fdb.inkuire -a $DB_PATH/kotlin-stdlib-common/kotlin-stdlib.adb.inkuire -a $DB_PATH/kotlin-stdlib-java-common/kotlin-stdlib.adb.inkuire -a $DB_PATH/kotlin-stdlib-jdk8/kotlin-stdlib.adb.inkuire
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ We hope that in future release Inkuire will support multiplatform and autoconfig
* Function database paths - `{ --database | -d }` - Arguments that define URLs to function database JSONs

Don't forget that URLs need to have protocol prefix, so if you want to provide path to a local file, it needs to be in `file://(path)` format.
Also if the paths point to directories, all files with extensions `.inkuire.adb` and `.inkuire.fdb` respectively for ancestry graph and database will be loaded.
Also if the paths point to directories, all files with extensions `.adb.inkuire` and `.fdb.inkuire` respectively for ancestry graph and database will be loaded.

##### API Endpoints

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class InkuireDocumentableToPageTranslator(val renderingStrategy: (callback: (Dri
private fun List<AncestryGraph>.toAncestryGraphJson(): String = CustomGson.instance.toJson(this)

private fun pathOfFdb(module: DModule, sourceSet: DokkaConfiguration.DokkaSourceSet): String =
"inkuiredb/${sourceSet.sourceSetID.sourceSetName}/${module.name}.inkuire.fdb"
"inkuiredb/${sourceSet.sourceSetID.sourceSetName}/${module.name}.fdb.inkuire"
private fun pathOfAdb(module: DModule, sourceSet: DokkaConfiguration.DokkaSourceSet): String =
"inkuiredb/${sourceSet.sourceSetID.sourceSetName}/${module.name}.inkuire.adb"
"inkuiredb/${sourceSet.sourceSetID.sourceSetName}/${module.name}.adb.inkuire"
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ class Cli extends InputHandler with OutputHandler with ConfigReader with IOHelpe
override def readInput(appConfig: AppConfig): EitherT[IO, String, InkuireDb] = {
InkuireDb
.read(
appConfig.dbPaths.toList.flatMap(path => getURLs(new URL(path.path), ".inkuire.fdb")).map(getURLContent),
appConfig.dbPaths.toList.flatMap(path => getURLs(new URL(path.path), ".fdb.inkuire")).map(getURLContent),
appConfig.ancestryGraphPaths.toList
.flatMap(path => getURLs(new URL(path.path), ".inkuire.adb"))
.flatMap(path => getURLs(new URL(path.path), ".adb.inkuire"))
.map(getURLContent)
)
.traverse(value => IO { value })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class SerializationIntegrationTest : AbstractCoreTest() {
@Test
fun `serialize and deserialize`() {
parent.walkTopDown().filter { it.name in listOf("common", "js", "jvm") }.forEach {
assertEquals(listOf("example.inkuire.adb", "example.inkuire.fdb").sorted(), it.listFiles().map { it.name }.sorted())
assertEquals(listOf("example.adb.inkuire", "example.fdb.inkuire").sorted(), it.listFiles().map { it.name }.sorted())
}
assertTrue(inkuireDb.functions().size() > 0)
assertTrue(inkuireDb.functions().findSignature("jsSpecificFun").isEmpty())
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0a1c090

Please sign in to comment.