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

Fix warnings and errors for ruby 2.7 #11437

Closed
wants to merge 1 commit into from

Conversation

Nautigsam
Copy link

Ruby 2.7 causes many depreciation warnings. I tried to remove the majority of them.

I still get some tests failing in test/unit/plugins/providers/docker/driver_compose_test.rb. One example of a test failing:

$ bundle exec rspec test/unit/plugins/providers/docker/driver_compose_test.rb -e "sets container name"
Run options:
  include {:full_description=>/sets\ container\ name/}
  exclude {:windows=>true}

VagrantPlugins::DockerProvider::Driver::Compose
  #create
    sets container name (FAILED - 1)

Failures:

  1) VagrantPlugins::DockerProvider::Driver::Compose#create sets container name
     Failure/Error: before { expect(subject).to receive(:execute).with(*compose_execute_up) }

       #<VagrantPlugins::DockerProvider::Driver::Compose:0x000056416b3e4ba0 @logger=#<Log4r::Logger:0x000056416b2dd748 @fullname="vagrant::docker::driver::compose", @outputters=[], @additive=true, @name="compose", @path="vagrant::docker::driver", @parent=#<Log4r::Logger:0x000056416b3d2658 @fullname="vagrant::docker::driver", @outputters=[], @additive=true, @name="driver", @path="vagrant::docker", @parent=#<Log4r::RootLogger:0x000056416a3297c0 @level=0, @outputters=[]>, @level=0, @trace=false>, @level=0, @trace=false>, @executor=#<VagrantPlugins::DockerProvider::Executor::Local:0x000056416b325598>, @machine=#<Double "machine">, @data_directory=#<Double "data-directory">, @compose_lock=#<Thread::Mutex:0x000056416b2396c0>> received :execute with unexpected arguments
         expected: ("docker-compose", "-f", "docker-compose.yml", "-p", "cwd", "up", "--remove-orphans", "-d", {})
              got: ("docker-compose", "-f", "docker-compose.yml", "-p", "cwd", "up", "--remove-orphans", "-d") (1 time)
                   ("docker-compose", "-f", "docker-compose.yml", "-p", "cwd", "ps", "-q", "docker_1") (1 time)
     # ./test/unit/plugins/providers/docker/driver_compose_test.rb:88:in `block (3 levels) in <top (required)>'

Finished in 2.02 seconds (files took 0.47252 seconds to load)
1 example, 1 failure

I do not know how to fix this. Does someone who is more fluent in Ruby could help?

@hashicorp-cla
Copy link

hashicorp-cla commented Mar 8, 2020

CLA assistant check
All committers have signed the CLA.

badpass
badpass previously approved these changes May 13, 2020
@chrisroberts
Copy link
Member

Hi there,

Thank you for this PR. Unfortunately, just swapping out CGI for URI does not always result in the same values being generated. This can result in a change in the path to a locally installed box causing Vagrant to "lose" it and not be able to detect it. #11814 includes an update for this to continue using the existing escaping implementation, just via a non-obsolete method.

Cheers!

@ghost
Copy link

ghost commented Sep 12, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Sep 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants