From 6f7401a2e11d2bf5eb8fa3a66afcf98a10f68bea Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Mon, 20 Jan 2020 16:21:19 +0300 Subject: [PATCH 1/3] update gem to latest --- images/linux/scripts/installers/ruby.sh | 2 ++ images/win/scripts/Installers/Install-Ruby.ps1 | 1 + 2 files changed, 3 insertions(+) diff --git a/images/linux/scripts/installers/ruby.sh b/images/linux/scripts/installers/ruby.sh index aa2933ff..f0990484 100644 --- a/images/linux/scripts/installers/ruby.sh +++ b/images/linux/scripts/installers/ruby.sh @@ -9,3 +9,5 @@ source $HELPER_SCRIPTS/document.sh # Install Ruby requirements apt-get install -y libz-dev openssl libssl-dev +sudo apt-get install ruby-full +sudo gem update --system \ No newline at end of file diff --git a/images/win/scripts/Installers/Install-Ruby.ps1 b/images/win/scripts/Installers/Install-Ruby.ps1 index 72ad0430..be64e0b9 100644 --- a/images/win/scripts/Installers/Install-Ruby.ps1 +++ b/images/win/scripts/Installers/Install-Ruby.ps1 @@ -17,4 +17,5 @@ $latestRubyBinPath2_5 = Get-ChildItem -Path $toolcacheRubyPath | Sort-Object {[S Add-MachinePathItem $latestRubyBinPath2_5 $env:Path = Get-MachinePath +gem update --system exit 0 From 430d0f853e7c7b0c5768926577000e27db97d4a7 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Mon, 20 Jan 2020 16:39:06 +0300 Subject: [PATCH 2/3] add comments and change order --- images/linux/scripts/installers/ruby.sh | 7 ++++--- images/win/scripts/Installers/Install-Ruby.ps1 | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/images/linux/scripts/installers/ruby.sh b/images/linux/scripts/installers/ruby.sh index f0990484..b1a27bc3 100644 --- a/images/linux/scripts/installers/ruby.sh +++ b/images/linux/scripts/installers/ruby.sh @@ -7,7 +7,8 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh -# Install Ruby requirements -apt-get install -y libz-dev openssl libssl-dev sudo apt-get install ruby-full -sudo gem update --system \ No newline at end of file +sudo gem update --system + +# Install Ruby requirements +apt-get install -y libz-dev openssl libssl-dev \ No newline at end of file diff --git a/images/win/scripts/Installers/Install-Ruby.ps1 b/images/win/scripts/Installers/Install-Ruby.ps1 index be64e0b9..546a4591 100644 --- a/images/win/scripts/Installers/Install-Ruby.ps1 +++ b/images/win/scripts/Installers/Install-Ruby.ps1 @@ -17,5 +17,8 @@ $latestRubyBinPath2_5 = Get-ChildItem -Path $toolcacheRubyPath | Sort-Object {[S Add-MachinePathItem $latestRubyBinPath2_5 $env:Path = Get-MachinePath + +# Update ruby gem to latest version gem update --system + exit 0 From 6e5f1bff20f2d7e5078169ad3015613ac88d82dc Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Tue, 21 Jan 2020 14:31:42 +0300 Subject: [PATCH 3/3] add docs --- images/linux/scripts/installers/ruby.sh | 5 ++++- images/win/scripts/Installers/Validate-Ruby.ps1 | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/images/linux/scripts/installers/ruby.sh b/images/linux/scripts/installers/ruby.sh index b1a27bc3..f0b6ffec 100644 --- a/images/linux/scripts/installers/ruby.sh +++ b/images/linux/scripts/installers/ruby.sh @@ -11,4 +11,7 @@ sudo apt-get install ruby-full sudo gem update --system # Install Ruby requirements -apt-get install -y libz-dev openssl libssl-dev \ No newline at end of file +apt-get install -y libz-dev openssl libssl-dev + +DocumentInstalledItem "ruby ($(ruby --version 2>&1 | cut -d ' ' -f 2))" +DocumentInstalledItem "gem ($(gem -v 2>&1 | tail -n 1))" \ No newline at end of file diff --git a/images/win/scripts/Installers/Validate-Ruby.ps1 b/images/win/scripts/Installers/Validate-Ruby.ps1 index 73e11a08..88347ee1 100644 --- a/images/win/scripts/Installers/Validate-Ruby.ps1 +++ b/images/win/scripts/Installers/Validate-Ruby.ps1 @@ -40,6 +40,7 @@ else $rubyExeOnPath = (Get-Command -Name 'ruby').Path $rubyBinOnPath = Split-Path -Path $rubyExeOnPath $rubyVersionOnPath = Get-RubyVersion -rubyRootPath $rubyBinOnPath +$gemVersion = & gem -v # Add details of available versions in Markdown $SoftwareName = "Ruby (x64)" @@ -48,6 +49,7 @@ $Description = @" _Environment:_ * Location: $rubyBinOnPath * PATH: contains the location of ruby.exe version $rubyVersionOnPath +* Gem Version: $gemVersion "@ Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description