diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..5712cf2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "ballerina/tests/resources"] + path = ballerina/tests/resources + url = https://github.com/nipunayf/toml-test + branch = resources diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 49b25dd..b946506 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "toml" -version = "0.5.0" +version = "0.5.1" authors = ["Ballerina"] keywords = ["toml"] repository = "https://github.com/ballerina-platform/module-ballerina-toml" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 7115982..b47783c 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -91,7 +91,7 @@ modules = [ [[package]] org = "ballerina" name = "toml" -version = "0.5.0" +version = "0.5.1" dependencies = [ {org = "ballerina", name = "file"}, {org = "ballerina", name = "io"}, diff --git a/ballerina/build.gradle b/ballerina/build.gradle index cd6cc8e..fa14c06 100644 --- a/ballerina/build.gradle +++ b/ballerina/build.gradle @@ -104,6 +104,15 @@ publishing { } } +task checkAndUpdateSubmodule { + doLast { + def initCommand = ['git', 'submodule', 'update', '--init', '--recursive'] + initCommand.execute(null, projectDir).waitFor() + println "Submodule initialized successfully." + } +} + +test.dependsOn checkAndUpdateSubmodule updateTomlFiles.dependsOn copyStdlibs build.dependsOn "generatePomFileForMavenPublication" diff --git a/ballerina/tests/it.bal b/ballerina/tests/it.bal index 179341a..2bb1cbc 100644 --- a/ballerina/tests/it.bal +++ b/ballerina/tests/it.bal @@ -15,8 +15,7 @@ import ballerina/test; @test:Config { - dataProvider: validTomlDataGen, - enable: false + dataProvider: validTomlDataGen } function testValidTOML(string inputPath, json expectedOutput) returns error? { map output = check readFile(inputPath, {parseOffsetDateTime: false}); @@ -24,8 +23,7 @@ function testValidTOML(string inputPath, json expectedOutput) returns error? { } @test:Config { - dataProvider: invalidTomlDataGen, - enable: false + dataProvider: invalidTomlDataGen } function testInvalidTOML(string inputPath) { map|error output = readFile(inputPath); diff --git a/ballerina/tests/resources b/ballerina/tests/resources new file mode 160000 index 0000000..eae1ebf --- /dev/null +++ b/ballerina/tests/resources @@ -0,0 +1 @@ +Subproject commit eae1ebf0b95f4bd63a5c647c3c1eb47f47cbdf57