Skip to content

Fix sanity check dep mvz #2241

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

Closed
wants to merge 13 commits into from
Closed
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
26 changes: 23 additions & 3 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,31 @@
module ArubaExt
def run_command(cmd, timeout = nil)
exec_cmd = cmd =~ /^rspec/ ? "bin/#{cmd}" : cmd
# Ensure bundler env vars are unset
unset_bundler_env_vars
# Ensure the correct Gemfile is found
# Ensure the correct Gemfile and binstubs are found
in_current_directory do
super(exec_cmd, timeout)
with_unbundled_env do
super(exec_cmd, timeout)
end
end
end

def unset_bundler_env_vars
empty_env = with_environment { with_unbundled_env { ENV.to_h } }
aruba_env = aruba.environment.to_h
(aruba_env.keys - empty_env.keys).each do |key|
delete_environment_variable key
end
empty_env.each do |k, v|
set_environment_variable k, v
end
end

def with_unbundled_env
if Bundler.respond_to?(:with_unbundled_env)
Bundler.with_unbundled_env { yield }
else
Bundler.with_clean_env { yield }
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion rspec-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Gem::Specification.new do |s|
s.cert_chain = [File.expand_path('~/.gem/rspec-gem-public_cert.pem')]
end

version_string = ['>= 4.2']
version_string = ['>= 4.2', '< 7.0']

s.add_runtime_dependency %q<activesupport>, version_string
s.add_runtime_dependency %q<actionpack>, version_string
Expand Down
2 changes: 1 addition & 1 deletion script/custom_build_functions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function run_cukes {
if is_mri_192_plus; then
bin/rake acceptance --trace
(unset RUBYOPT; bin/rake acceptance --trace)
return $?
elif is_jruby; then
bin/rake smoke:app
Expand Down
6 changes: 5 additions & 1 deletion script/update_rubygems_and_install_bundler
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ source script/functions.sh

if is_ruby_23_plus; then
yes | gem update --system
gem install bundler
echo "Current bundler versions installed: `gem list | grep '^bundler ('`"
gem uninstall -aIx bundler || echo "Warning error occured removing bundler via gem"
rvm @global do gem uninstall -aIx bundler || echo "Warning error occured removing bundler via rvm"
yes | gem install --force bundler
echo "Current bundler versions installed after 'gem install bundler': `gem list | grep '^bundler ('`"
else
echo "Warning installing older versions of Rubygems / Bundler"
gem update --system '2.7.8'
Expand Down