mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00
Use bundler v2 in development (#1463)
Prior to this commit, the `Gemfile.lock` enforced the use of Bundler v1.17.3 which was released in 2014. On Ruby 3, this triggers the following deprecation warning: ``` /home/user/.rvm/gems/ruby-3.0.2@shoulda-matchers/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2. ``` Since the gem itself in v5.0.0 requires at least Ruby v2.6, it seems fair to require a recent version of Bundler v2, which in turn runs of every Ruby v2.3 or later.
This commit is contained in:
parent
3e9d69ba7b
commit
05a6c37c06
9 changed files with 13 additions and 21 deletions
10
bin/setup
10
bin/setup
|
|
@ -8,8 +8,6 @@ set -euo pipefail
|
|||
# section. You may also delete this section altogether if your project doesn't
|
||||
# need a custom setup.
|
||||
|
||||
USE_BUNDLER_1=1
|
||||
|
||||
provision-project() {
|
||||
banner "Installing Appraisals"
|
||||
bundle exec appraisal install
|
||||
|
|
@ -187,8 +185,6 @@ setup() {
|
|||
# --- RUBY ---------------------------------------------------------------------
|
||||
|
||||
provision-ruby() {
|
||||
USE_BUNDLER_1=0
|
||||
|
||||
if [[ -f .tool-versions ]]; then
|
||||
REQUIRED_RUBY_VERSION=$(cat .tool-versions | grep '^ruby ' | head -n 1 | sed -Ee 's/^ruby (.+)$/\1/')
|
||||
elif [[ -f .ruby-version ]]; then
|
||||
|
|
@ -265,11 +261,7 @@ has-bundler() {
|
|||
ensure-project-ruby-dependencies-installed() {
|
||||
banner 'Installing Ruby dependencies'
|
||||
|
||||
if [[ $USE_BUNDLER_1 -eq 1 ]] && (! has-bundler || ! [[ $(bundle -v) =~ '^Bundler version 1\.' ]]); then
|
||||
gem install bundler:'~> 1.0'
|
||||
elif ! has-bundler; then
|
||||
gem install bundler
|
||||
fi
|
||||
gem install bundler
|
||||
|
||||
bundle check || bundle install
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue