Skip to content

Commit a809f9a

Browse files
committed
Constantize desired rubygems version for windows
1 parent cc53d69 commit a809f9a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lib/site_extensions/installfest.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ def version_string(name)
88
'2.3'
99
when :windows_ruby_short
1010
'2.2'
11+
when :windows_rubygems
12+
'2.6.8'
1113
else
1214
raise StandardError, "No version string exists for '#{name}'"
1315
end

sites/en/installfest/windows.step

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,26 +90,26 @@ step "Update RubyGems" do
9090

9191
message "If the output is **2.6.6** or earlier, keep following the instructions."
9292

93-
message "If the output is **2.6.7** or later, <a href='#install-node'>skip to the next step!</a>"
93+
message "If the output is **#{version_string(:windows_rubygems)}** or later, <a href='#install-node'>skip to the next step!</a>"
9494
end
9595

9696
step "Download the update" do
97-
message "Visit https://rubygems.org/downloads/rubygems-update-2.6.7.gem"
97+
message "Visit https://rubygems.org/downloads/rubygems-update-#{version_string(:windows_rubygems)}.gem"
9898

99-
message "**Right click -> Save target as...** the file **rubygems-update-2.6.7.gem** to your **C:\\Sites** directory"
99+
message "**Right click -> Save target as...** the file **rubygems-update-#{version_string(:windows_rubygems)}.gem** to your **C:\\Sites** directory"
100100
end
101101

102102
step "Install the update" do
103103
message "Back at the command prompt, run the following commands:"
104104

105-
console_without_message "gem install --local C:\\Sites\\rubygems-update-2.6.7.gem"
105+
console_without_message "gem install --local C:\\Sites\\rubygems-update-#{version_string(:windows_rubygems)}.gem"
106106

107107
console_without_message "update_rubygems --no-document"
108108

109109
message "**Close and reopen your command prompt**, then verify you have the upgraded RubyGems by typing this in the terminal:"
110110

111111
console_without_message "gem -v"
112-
result "2.6.7"
112+
result version_string(:windows_rubygems)
113113

114114
message "Finally, you can clean up by running the following command:"
115115
console_without_message "gem uninstall rubygems-update -x"

0 commit comments

Comments
 (0)