Skip to content

Commit

Permalink
Don't expose verbose? helper method
Browse files Browse the repository at this point in the history
Follow up of b988ecb.

This was added for internal usage, it doesn't need to be public.
  • Loading branch information
kamipo committed Mar 1, 2018
1 parent cf2492b commit 97742f3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions activerecord/lib/active_record/tasks/database_tasks.rb
Expand Up @@ -163,16 +163,11 @@ def drop_current(environment = env)
}
end

def verbose?
ENV["VERBOSE"] ? ENV["VERBOSE"] != "false" : true
end

def migrate
check_target_version

verbose = verbose?
scope = ENV["SCOPE"]
verbose_was, Migration.verbose = Migration.verbose, verbose
verbose_was, Migration.verbose = Migration.verbose, verbose?
Base.connection.migration_context.migrate(target_version) do |migration|
scope.blank? || scope == migration.scope
end
Expand Down Expand Up @@ -301,6 +296,9 @@ def dump_schema_cache(conn, filename)
end

private
def verbose?
ENV["VERBOSE"] ? ENV["VERBOSE"] != "false" : true
end

def class_for_adapter(adapter)
_key, task = @tasks.each_pair.detect { |pattern, _task| adapter[pattern] }
Expand Down

0 comments on commit 97742f3

Please sign in to comment.