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

Suppress deprecation warnings and errors on CI #393

Merged
merged 3 commits into from
Jun 4, 2022

Conversation

mishina2228
Copy link
Contributor

This PR suppresses some deprecation warnings and errors on CI.
Here are the details:

  • Suppress deprecation warnings from rspec-mocks' stub
    Using `stub` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /home/runner/work/rails_best_practices/rails_best_practices/spec/rails_best_practices/analyzer_spec.rb:80:in `block (3 levels) in <module:RailsBestPractices>'.
    
  • Replace coveralls with coveralls_reborn
    • This suppresses the following error:
      [Coveralls] Submitting to https://coveralls.io/api/v1
      Coveralls encountered an exception:
      OpenSSL::SSL::SSLError
      SSL_connect returned=1 errno=0 state=error: no protocols available
      /opt/hostedtoolcache/Ruby/2.6.10/x64/lib/ruby/2.6.0/net/protocol.rb:44:in `connect_nonblock'
      /opt/hostedtoolcache/Ruby/2.6.10/x64/lib/ruby/2.6.0/net/protocol.rb:44:in `ssl_socket_connect'
      /opt/hostedtoolcache/Ruby/2.6.10/x64/lib/ruby/2.6.0/net/http.rb:996:in `connect'
      /opt/hostedtoolcache/Ruby/2.6.10/x64/lib/ruby/2.6.0/net/http.rb:930:in `do_start'
      /opt/hostedtoolcache/Ruby/2.6.10/x64/lib/ruby/2.6.0/net/http.rb:919:in `start'
      /opt/hostedtoolcache/Ruby/2.6.10/x64/lib/ruby/2.6.0/net/http.rb:1470:in `request'
      /home/runner/work/rails_best_practices/rails_best_practices/vendor/bundle/ruby/2.6.0/gems/coveralls-0.8.23/lib/coveralls/api.rb:29:in `post_json'
      /home/runner/work/rails_best_practices/rails_best_practices/vendor/bundle/ruby/2.6.0/gems/coveralls-0.8.23/lib/coveralls/simplecov.rb:64:in `format'
      /home/runner/work/rails_best_practices/rails_best_practices/vendor/bundle/ruby/2.6.0/gems/simplecov-0.16.1/lib/simplecov/result.rb:48:in `format!'
      /home/runner/work/rails_best_practices/rails_best_practices/vendor/bundle/ruby/2.6.0/gems/simplecov-0.16.1/lib/simplecov/configuration.rb:182:in `block in at_exit'
      /home/runner/work/rails_best_practices/rails_best_practices/vendor/bundle/ruby/2.6.0/gems/simplecov-0.16.1/lib/simplecov.rb:200:in `run_exit_tasks!'
      /home/runner/work/rails_best_practices/rails_best_practices/vendor/bundle/ruby/2.6.0/gems/simplecov-0.16.1/lib/simplecov/defaults.rb:27:in `block in <top (required)>'
      
    • Please see OpenSSL::SSL::SSLError when using dist focal in Travis CI lemurheavy/coveralls-ruby#163 for more details.
  • Update bundler from 2.2.22 to 2.3.15
    • This suppresses the following deprecation warning with Ruby 3.1:
      Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
      

```
Using `stub` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /home/runner/work/rails_best_practices/rails_best_practices/spec/rails_best_practices/analyzer_spec.rb:80:in `block (3 levels) in <module:RailsBestPractices>'.
```
To suppress the following error:
```
[Coveralls] Submitting to https://coveralls.io/api/v1
Coveralls encountered an exception:
OpenSSL::SSL::SSLError
SSL_connect returned=1 errno=0 state=error: no protocols available
/opt/hostedtoolcache/Ruby/2.6.10/x64/lib/ruby/2.6.0/net/protocol.rb:44:in `connect_nonblock'
/opt/hostedtoolcache/Ruby/2.6.10/x64/lib/ruby/2.6.0/net/protocol.rb:44:in `ssl_socket_connect'
/opt/hostedtoolcache/Ruby/2.6.10/x64/lib/ruby/2.6.0/net/http.rb:996:in `connect'
/opt/hostedtoolcache/Ruby/2.6.10/x64/lib/ruby/2.6.0/net/http.rb:930:in `do_start'
/opt/hostedtoolcache/Ruby/2.6.10/x64/lib/ruby/2.6.0/net/http.rb:919:in `start'
/opt/hostedtoolcache/Ruby/2.6.10/x64/lib/ruby/2.6.0/net/http.rb:1470:in `request'
/home/runner/work/rails_best_practices/rails_best_practices/vendor/bundle/ruby/2.6.0/gems/coveralls-0.8.23/lib/coveralls/api.rb:29:in `post_json'
/home/runner/work/rails_best_practices/rails_best_practices/vendor/bundle/ruby/2.6.0/gems/coveralls-0.8.23/lib/coveralls/simplecov.rb:64:in `format'
/home/runner/work/rails_best_practices/rails_best_practices/vendor/bundle/ruby/2.6.0/gems/simplecov-0.16.1/lib/simplecov/result.rb:48:in `format!'
/home/runner/work/rails_best_practices/rails_best_practices/vendor/bundle/ruby/2.6.0/gems/simplecov-0.16.1/lib/simplecov/configuration.rb:182:in `block in at_exit'
/home/runner/work/rails_best_practices/rails_best_practices/vendor/bundle/ruby/2.6.0/gems/simplecov-0.16.1/lib/simplecov.rb:200:in `run_exit_tasks!'
/home/runner/work/rails_best_practices/rails_best_practices/vendor/bundle/ruby/2.6.0/gems/simplecov-0.16.1/lib/simplecov/defaults.rb:27:in `block in <top (required)>'
```
To suppress the following warning:
```
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
```
@flyerhzm flyerhzm merged commit 23f10c6 into flyerhzm:master Jun 4, 2022
@mishina2228 mishina2228 deleted the fix-warnings branch June 4, 2022 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants