Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formally deprecate #use_clean_gemset #597

Merged
merged 1 commit into from
Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/aruba/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
require 'aruba/api/filesystem'
require 'aruba/api/text'
require 'aruba/api/bundler'
require 'aruba/api/rvm'

Aruba.platform.require_matching_files('../matchers/**/*.rb', __FILE__)

Expand All @@ -29,7 +28,6 @@ module Api
include Aruba::Api::Environment
include Aruba::Api::Filesystem
include Aruba::Api::Bundler
include Aruba::Api::Rvm
include Aruba::Api::Deprecated
include Aruba::Api::Text
end
Expand Down
26 changes: 26 additions & 0 deletions lib/aruba/api/deprecated.rb
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,32 @@ def announcer
@announcer
end

# @deprecated
# Use a clean rvm gemset
#
# Please make sure that you've got [rvm](http://rvm.io/) installed.
#
# @param [String] gemset
# The name of the gemset to be used
def use_clean_gemset(gemset)
Aruba.platform.deprecated('The use of "#use_clean_gemset" is deprecated.')
run_simple(%{rvm gemset create "#{gemset}"}, true)
if all_stdout =~ /'#{gemset}' gemset created \((.*)\)\./
gem_home = Regexp.last_match[1]
set_environment_variable('GEM_HOME', gem_home)
set_environment_variable('GEM_PATH', gem_home)
set_environment_variable('BUNDLE_PATH', gem_home)

paths = (ENV['PATH'] || "").split(File::PATH_SEPARATOR)
paths.unshift(File.join(gem_home, 'bin'))
set_environment_variable('PATH', paths.uniq.join(File::PATH_SEPARATOR))

run_simple("gem install bundler", true)
else
raise "I didn't understand rvm's output: #{all_stdout}"
end
end

# @private
# @deprecated
def process_monitor
Expand Down
37 changes: 0 additions & 37 deletions lib/aruba/api/rvm.rb

This file was deleted.