Fix ruby warnings about deprecated keyword arguments.

This commit is contained in:
evazion
2021-01-11 05:06:38 -06:00
parent 95f39afcd9
commit 1e7a5ba49d
12 changed files with 22 additions and 23 deletions

View File

@@ -996,5 +996,5 @@ class PostQueryBuilder
end
end
memoize :split_query, :normalized_query
memoize :split_query
end

View File

@@ -3,11 +3,11 @@ module PostSets
MAX_PER_PAGE = 200
MAX_SIDEBAR_TAGS = 25
attr_reader :page, :random, :post_count, :format, :tag_string, :query
delegate :normalized_query, to: :query
attr_reader :page, :random, :post_count, :format, :tag_string, :query, :normalized_query
def initialize(tags, page = 1, per_page = nil, user: CurrentUser.user, random: false, format: "html")
@query = PostQueryBuilder.new(tags, user, safe_mode: CurrentUser.safe_mode?, hide_deleted_posts: user.hide_deleted_posts?)
@normalized_query = query.normalized_query
@tag_string = tags
@page = page
@per_page = per_page
@@ -180,7 +180,7 @@ module PostSets
end
def similar_tags
RelatedTagCalculator.cached_similar_tags_for_search(normalized_query(implicit: false), MAX_SIDEBAR_TAGS)
RelatedTagCalculator.cached_similar_tags_for_search(query.normalized_query(implicit: false), MAX_SIDEBAR_TAGS)
end
def frequent_tags

View File

@@ -101,7 +101,7 @@ class RelatedTagQuery
other_wikis
end
def serializable_hash(**options)
def serializable_hash(options = {})
{
query: query,
category: category,

View File

@@ -3,7 +3,7 @@ class ServerStatus
include ActiveModel::Serializers::JSON
include ActiveModel::Serializers::Xml
def serializable_hash(*options)
def serializable_hash(options = {})
{
status: {
hostname: hostname,