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

Use RuboCop default hash syntax. #431

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/formula-analytics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def influx_analytics(args)
api_result = JSON.parse(api_result_text)

json = {
category: category,
category:,
total_items: 0,
start_date: Date.today - days_ago.to_i,
end_date: Date.today,
Expand Down Expand Up @@ -237,7 +237,7 @@ def influx_analytics(args)
json[:items] << {
number: nil,
dimension_key => dimension,
count: count,
count:,
}
end

Expand Down Expand Up @@ -299,7 +299,7 @@ def format_count(count)
end

def format_percent(percent)
format("%<percent>.2f", percent: percent).gsub(/\.00$/, "")
format("%<percent>.2f", percent:).gsub(/\.00$/, "")
end

def format_os_version_dimension(dimension)
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate-analytics-api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def generate_analytics_api
threads << Thread.new do
args = %W[--days-ago=#{days}]
(analytics_data_path/"#{days}d.json").write run_formula_analytics(*formula_analytics_args, *args)
(analytics_api_path/"#{days}d.json").write analytics_json_template(category_name, data_source: data_source)
(analytics_api_path/"#{days}d.json").write analytics_json_template(category_name, data_source:)
end
end
end
Expand Down