Skip to content

Commit

Permalink
Use RuboCop default hash syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Mar 7, 2024
1 parent 7075a6c commit c2952ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit c2952ec

Please sign in to comment.