From e4545e4fe2a1ce80009206c831d5740360bad6c2 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 1 Sep 2020 09:28:56 +0100 Subject: [PATCH] Updates Bundler.with_clean_dev (deprecated) to with_unbundled_env --- elasticsearch-model/Rakefile | 2 +- elasticsearch-persistence/Rakefile | 6 +++--- elasticsearch-rails/Rakefile | 13 ++++++------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/elasticsearch-model/Rakefile b/elasticsearch-model/Rakefile index 3d1ab402a..c2e5c9912 100644 --- a/elasticsearch-model/Rakefile +++ b/elasticsearch-model/Rakefile @@ -33,7 +33,7 @@ namespace :bundle do gemfiles = ENV['RAILS_VERSIONS'] ? ENV['RAILS_VERSIONS'].split(',').map { |v| "#{v}.gemfile"} : GEMFILES gemfiles.each do |gemfile| puts "GEMFILE: #{gemfile}" - Bundler.with_clean_env do + Bundler.with_unbundled_env do sh "bundle install --gemfile #{File.expand_path('../gemfiles/'+gemfile, __FILE__)}" end puts '-' * 80 diff --git a/elasticsearch-persistence/Rakefile b/elasticsearch-persistence/Rakefile index a49e40051..ec3daf3ca 100644 --- a/elasticsearch-persistence/Rakefile +++ b/elasticsearch-persistence/Rakefile @@ -40,11 +40,11 @@ end namespace :bundle do desc 'Install gem dependencies' task :install do - puts '-'*80 - Bundler.with_clean_env do + puts '-' * 80 + Bundler.with_unbundled_env do sh 'bundle install' end - puts '-'*80 + puts '-' * 80 end end diff --git a/elasticsearch-rails/Rakefile b/elasticsearch-rails/Rakefile index 36cd53074..1a03db185 100644 --- a/elasticsearch-rails/Rakefile +++ b/elasticsearch-rails/Rakefile @@ -18,8 +18,8 @@ require "bundler/gem_tasks" desc "Run unit tests" -task :default => 'test:unit' -task :test => 'test:unit' +task default: 'test:unit' +task test: 'test:unit' # ----- Test tasks ------------------------------------------------------------ @@ -27,24 +27,23 @@ require 'rake/testtask' require 'rspec/core/rake_task' namespace :test do - RSpec::Core::RakeTask.new(:spec) Rake::TestTask.new(:all) do |test| test.verbose = false test.warning = false - test.deps = [ :spec ] unless defined?(JRUBY_VERSION) + test.deps = [:spec] unless defined?(JRUBY_VERSION) end end namespace :bundle do desc 'Install gem dependencies' task :install do - puts '-'*80 - Bundler.with_clean_env do + puts '-' * 80 + Bundler.with_unbundled_env do sh 'bundle install' end - puts '-'*80 + puts '-' * 80 end end