From 48dd4be85141bddf93cd93321097a6a1d685e3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 2 Jul 2019 13:44:20 +0200 Subject: [PATCH] Use `.ruby-version` to detect our Ruby version Travis and Rubocop and rmv1-capistrano3 automatically detect the version based on the `.ruby-version` file. --- .rubocop_basic.yml | 1 - .travis.yml | 2 -- config/deploy.rb | 5 +++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml index ba3b32daa..42dfb1b20 100644 --- a/.rubocop_basic.yml +++ b/.rubocop_basic.yml @@ -9,7 +9,6 @@ AllCops: Exclude: - "db/migrate/**/*" - "db/schema.rb" - TargetRubyVersion: 2.3 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true diff --git a/.travis.yml b/.travis.yml index faf764341..a6741da68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,6 @@ language: ruby addons: postgresql: "9.4" chrome: stable -rvm: -- 2.3.2 cache: bundler bundler_args: --without development before_script: diff --git a/config/deploy.rb b/config/deploy.rb index 7f8cd2568..1a558eacb 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -7,7 +7,6 @@ def deploysecret(key) end set :rails_env, fetch(:stage) -set :rvm1_ruby_version, "2.3.2" set :rvm1_map_bins, -> { fetch(:rvm_map_bins).to_a.concat(%w[rake gem bundle ruby]).uniq } set :application, "consul" @@ -63,7 +62,9 @@ end task :install_bundler_gem do on roles(:app) do - execute "rvm use #{fetch(:rvm1_ruby_version)}; gem install bundler" + within release_path do + execute "rvm use #{fetch(:rvm1_ruby_version)}; gem install bundler" + end end end