File: update_rubygems_and_install_bundler

package info (click to toggle)
ruby-rspec-its 1.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 148 kB
  • sloc: ruby: 436; sh: 28; makefile: 2
file content (22 lines) | stat: -rwxr-xr-x 515 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# This file was generated on 2019-01-03T20:34:23+00:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e

function is_ruby_23_plus {
  if ruby -e "exit(RUBY_VERSION.to_f >= 2.3)"; then
    return 0
  else
    return 1
  fi
}

if is_ruby_23_plus; then
  gem update --system
  gem install bundler
else
  echo "Warning installing older versions of Rubygems / Bundler"
  gem update --system '2.7.8'
  gem install bundler -v '1.17.3'
fi