Fix deprecation warnings
DeeDeeG opened this issue · 4 comments
We have the following deprecation warnings in Travis CI:
/usr/local/bundle/gems/simplecov-0.7.1/lib/simplecov/configuration.rb:168: warning: constant ::Fixnum is deprecated
/usr/local/bundle/gems/simplecov-0.7.1/lib/simplecov/source_file.rb:29: warning: constant ::Fixnum is deprecated
/usr/local/bundle/gems/simplecov-0.7.1/lib/simplecov/source_file.rb:30: warning: constant ::Fixnum is deprecated
- Solution: Update the
simplecov
gem to a version that doesn't useFixnum
in this way.- Done in #609
DEPRECATION WARNING: The success? predicate is deprecated and will be removed in Rails 6.0. Please use successful? as provided by Rack::Response::Helpers. (called from block (2 levels) in <top (required)> at /refugerestrooms/spec/api/v1/restrooms_spec.rb:27)
- Solution: Update
spec/api/v1/restrooms_spec.rb
line 27 to use RSpecbe_successful
rather than RSpecbe_success
.- Done in #609.
EPRECATION WARNING: Delegating missing near_scope_options method to Restroom. Accessibility of private/protected class methods in :scope is deprecated and will be removed in Rails 6.0. (called from list_restrooms at /refugerestrooms/app/controllers/restrooms_controller.rb:69)
- Solution:
Updateapp/controllers/restrooms_controller.rb
(line 69?) to properly scope the methods and options in question.- See: https://www.rubydoc.info/gems/geocoder/Geocoder/Store/ActiveRecord/ClassMethods#near_scope_options-instance_method
- This appears to have been fixed in #629 with the Geocoder update (from 1.2.1 to Geocoder 1.6.1). Possibly fixed in Geocoder version 1.3.0. Thank you @Joranhezon for volunteering to take this on, and noticing that the warnings are already fixed!
DEPRECATION WARNING: Directly including `PgSearch` into an Active Record model is deprecated and will be removed in pg_search 3.0.
Please replace `include PgSearch` with `include PgSearch::Model`.
(called from include at /refugerestrooms/app/models/restroom.rb:7)
Hi! I would like to work on this issue, if possible.
I also noticed that the slack link in the wiki and readme file is no longer active, do you guys still use slack?
@Joranhezon thanks so much for volunteering, we'd appreciate that!
The Slack is pretty quiet these days. (Truth be told, I haven't seen anything posted in over a month! Yep, things are pretty quiet around here in general, but this project is definitely still alive and kicking.)
I just generated this invite link for the Slack, so it should work: https://join.slack.com/t/refugelgbt/shared_invite/zt-3zaagpad-DvyfAPcepuRzFBJix1uYkg
Okay, the Slack invite links around the Wiki should be updated. The link in README.md
will be updated in pull request #631. Edit: done.
Well, this can be closed now, I think! Thank you @Joranhezon for pointing out that the last warnings from this Pull Request are gone... Maybe we can try to upgrade to Rails 6 some time soon!