Skip to content

Commit

Permalink
Remove deprecated arguments from #verify!
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Oct 23, 2017
1 parent d6b779e commit 9c6ee1b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
4 changes: 4 additions & 0 deletions activerecord/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* Remove deprecated arguments from `#verify!`.

*Rafael Mendonça França*

* Remove deprecated argument `name` from `#indexes`.

*Rafael Mendonça França*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,7 @@ def requires_reloading?
# Checks whether the connection to the database is still active (i.e. not stale).
# This is done under the hood by calling #active?. If the connection
# is no longer active, then this method will reconnect to the database.
def verify!(*ignored)
if ignored.size > 0
ActiveSupport::Deprecation.warn("Passing arguments to #verify method of the connection has no effect and has been deprecated. Please remove all arguments from the #verify method call.")
end
def verify!
reconnect! unless active?
end

Expand Down
12 changes: 0 additions & 12 deletions activerecord/test/cases/adapters/mysql2/connection_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,6 @@ def test_successful_reconnection_after_timeout_with_verify
assert @connection.active?
end

def test_verify_with_args_is_deprecated
assert_deprecated do
@connection.verify!(option: true)
end
assert_deprecated do
@connection.verify!([])
end
assert_deprecated do
@connection.verify!({})
end
end

def test_execute_after_disconnect
@connection.disconnect!

Expand Down

0 comments on commit 9c6ee1b

Please sign in to comment.