Skip to content

Fix sanity check specs warnings #2231

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 10 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
4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ else
gem 'sqlite3', '~> 1.3.6', platforms: [:ruby]
end

if RUBY_VERSION >= '2.4.0'
gem 'json', '>= 2.0.2'
end

gem 'ffi', '~> 1.9.25'

gem 'rake', '~> 12'
Expand Down
4 changes: 0 additions & 4 deletions Gemfile-rails-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ else
gem "puma"
end

if RUBY_VERSION < "2.5"
gem "sprockets", "~> 3.0"
end

if version.gsub(/[^\d\.]/,'').to_f >= 6.0
gem "activerecord-jdbcsqlite3-adapter", "~> 60.0.rc1", platforms: [:jruby]
else
Expand Down
18 changes: 10 additions & 8 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
require 'fileutils'

module ArubaExt
def run_command(cmd, timeout = nil)
def run(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
in_current_directory do
super(exec_cmd, timeout)
super(exec_cmd, timeout)
end
# This method over rides Aruba 0.5.4 implementation so that we can reset Bundler to use the sample app Gemfile
def in_current_dir(&block)
Bundler.with_clean_env do
_mkdir(current_dir)
Dir.chdir(current_dir, &block)
end
end
end

World(ArubaExt)

Aruba.configure do |config|
config.exit_timeout = 30
Before do
@aruba_timeout_seconds = 30
end

unless File.directory?('./tmp/example_app')
Expand Down
4 changes: 2 additions & 2 deletions 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 All @@ -55,6 +55,6 @@ Gem::Specification.new do |s|
end

s.add_development_dependency 'cucumber', '~> 1.3.5'
s.add_development_dependency 'aruba', '~> 0.14.12'
s.add_development_dependency 'aruba', '~> 0.5.4'
s.add_development_dependency 'ammeter', '~> 1.1.2'
end
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I see why that was recommended in the bundler thread, this becomes a question of do we want to keep disabling rubygems on rspec-rails, I mean if rails depends on bundler, and bundler depends on rubygems...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we now need to add require rubygems instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it's required by default unless you set --disable=gems in RUBYOPT.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to keep disabling rubygems on rspec-rails

I don't think we have to. But this is a change we have to address on rspec-dev.
I tried to readd only rubygems as an option but I get warnings. unset seems to be a good option.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only build we have an issue with so it doesn't need to be propagated.

return $?
elif is_jruby; then
bin/rake smoke:app
Expand Down
5 changes: 3 additions & 2 deletions script/update_rubygems_and_install_bundler
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ set -e
source script/functions.sh

if is_ruby_23_plus; then
yes | gem update --system
gem install bundler
yes | gem update --system '3.0.6'
yes | gem install 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