From 52e318b4635631c2b57327ef98e8b30f37e69525 Mon Sep 17 00:00:00 2001 From: Manuel Rego Casasnovas Date: Sun, 19 Jun 2011 15:27:54 +0200 Subject: [PATCH] Remove needed to use Ruby for REST example scripts. FEA: ItEr74S04BugFixing --- scripts/rest-clients/base64.sh | 4 ---- scripts/rest-clients/export-resources-hours.sh | 2 +- scripts/rest-clients/export.sh | 2 +- scripts/rest-clients/get-xml-schema.sh | 3 +-- scripts/rest-clients/import.sh | 2 +- 5 files changed, 4 insertions(+), 9 deletions(-) delete mode 100755 scripts/rest-clients/base64.sh diff --git a/scripts/rest-clients/base64.sh b/scripts/rest-clients/base64.sh deleted file mode 100755 index a40993e4e..000000000 --- a/scripts/rest-clients/base64.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/ruby - -require 'base64' -puts Base64.encode64("#{ARGV[0]}"); diff --git a/scripts/rest-clients/export-resources-hours.sh b/scripts/rest-clients/export-resources-hours.sh index e6be9ccb9..1ce0932be 100755 --- a/scripts/rest-clients/export-resources-hours.sh +++ b/scripts/rest-clients/export-resources-hours.sh @@ -53,7 +53,7 @@ if [ "$endDate" = "" ]; then exit 1 fi -authorization=`./base64.sh $loginName:$password` +authorization=`echo -n "$loginName:$password" | base64` if [ "$resourceCode" = "" ]; then serviceURIWithParams="$baseServiceURL/resourceshours/$startDate/$endDate/" diff --git a/scripts/rest-clients/export.sh b/scripts/rest-clients/export.sh index 6747ce5f1..7b433c835 100755 --- a/scripts/rest-clients/export.sh +++ b/scripts/rest-clients/export.sh @@ -18,7 +18,7 @@ else certificate=$DEMO_CERTIFICATE fi -authorization=`./base64.sh $loginName:$password` +authorization=`echo -n "$loginName:$password" | base64` curl -sv -X GET $certificate --header "Authorization: Basic $authorization" \ $baseServiceURL/$1 | tidy -xml -i -q -utf8 diff --git a/scripts/rest-clients/get-xml-schema.sh b/scripts/rest-clients/get-xml-schema.sh index 9bcf90d32..cb8069508 100755 --- a/scripts/rest-clients/get-xml-schema.sh +++ b/scripts/rest-clients/get-xml-schema.sh @@ -25,8 +25,7 @@ if [ "$service" = "" ]; then exit 1 fi -authorization=`./base64.sh $loginName:$password` - +authorization=`echo -n "$loginName:$password" | base64` wget --no-check-certificate \ --header "Authorization: Basic $authorization" \ diff --git a/scripts/rest-clients/import.sh b/scripts/rest-clients/import.sh index 912fa2297..e8facdf4a 100644 --- a/scripts/rest-clients/import.sh +++ b/scripts/rest-clients/import.sh @@ -25,7 +25,7 @@ if [ "$file" = "" ]; then exit 1 fi -authorization=`./base64.sh $loginName:$password` +authorization=`echo -n "$loginName:$password" | base64` curl -sv -X POST $certificate -d @$file \ --header "Content-type: application/xml" \