Skip to content

Commit 592dc51

Browse files
Refactor gem installation check to use built-in bundler instead of external gem
1 parent b94a895 commit 592dc51

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

test/ruby-rails-postgres/test.sh

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,8 @@ check "rails installation path" gem which rails
1717
check "user has write permission to rvm gems" [ -w /usr/local/rvm/gems ]
1818
check "user has write permission to rvm gems default" [ -w /usr/local/rvm/gems/default ]
1919

20-
# This section verifies connectivity to rubygems.org and attempts to install a gem if reachable.
21-
can_reach_rubygems=false
22-
for i in 1 2 3 4 5; do
23-
if curl -fsSL --connect-timeout 10 --max-time 20 https://rubygems.org/ >/dev/null; then
24-
can_reach_rubygems=true
25-
break
26-
fi
27-
sleep $((i * 2))
28-
done
29-
30-
if [ "${can_reach_rubygems}" = "true" ]; then
31-
check "user can install gems" gem install --no-document github-markup
32-
else
33-
echo "WARN: Could not reach rubygems.org after retries; skipping gem install check."
34-
fi
20+
# This section verifies that gem installation works by using a built-in gem
21+
check "user can install gems" gem install --no-document bundler
3522

3623
# Report result
3724
reportResults

0 commit comments

Comments
 (0)