From 0efc0248716a6614bfa68d7b348ffc00f1e08f39 Mon Sep 17 00:00:00 2001 From: Tim Birkett Date: Thu, 28 Jan 2021 14:51:30 +0000 Subject: [PATCH] fix: readJSON not readJson... --- test/unit/groovy/helpers/PipelineTestHelper.groovy | 2 +- vars/getLibraryVersion.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/groovy/helpers/PipelineTestHelper.groovy b/test/unit/groovy/helpers/PipelineTestHelper.groovy index 8b44f0c..1d37f05 100644 --- a/test/unit/groovy/helpers/PipelineTestHelper.groovy +++ b/test/unit/groovy/helpers/PipelineTestHelper.groovy @@ -277,7 +277,7 @@ class PipelineTestHelper extends BasePipelineTest { helper.registerAllowedMethod('fileExists', [Map.class], { args -> fileExists(args) }) helper.registerAllowedMethod('fileExists', [String.class], { args -> fileExists(args) }) - helper.registerAllowedMethod('readJson', [Map.class], {args -> readJSON(args)}) + helper.registerAllowedMethod('readJSON', [Map.class], {args -> readJSON(args)}) } /** diff --git a/vars/getLibraryVersion.groovy b/vars/getLibraryVersion.groovy index e4a0c9b..048dc56 100644 --- a/vars/getLibraryVersion.groovy +++ b/vars/getLibraryVersion.groovy @@ -43,7 +43,7 @@ String call(Map conf = [:]) { } def response = httpRequest(requestConfig) - return readJson(text: response.content).tag_name + return readJSON(text: response.content).tag_name } } // All others get the "stable" tag