Use .ruby-version to detect our Ruby version

Travis and Rubocop and rmv1-capistrano3 automatically detect the version
based on the `.ruby-version` file.
This commit is contained in:
Javi Martín
2019-07-02 13:44:20 +02:00
parent 19f8e3ac8e
commit 48dd4be851
3 changed files with 3 additions and 5 deletions

View File

@@ -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

View File

@@ -2,8 +2,6 @@ language: ruby
addons:
postgresql: "9.4"
chrome: stable
rvm:
- 2.3.2
cache: bundler
bundler_args: --without development
before_script:

View File

@@ -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