Skip to content

Commit

Permalink
Fix rubocop warning
Browse files Browse the repository at this point in the history
  • Loading branch information
FelipeGuzmanSierra committed Aug 8, 2024
1 parent e0ca9e4 commit 1361241
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions lib/bas/bot/format_do_bill_alert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,9 @@ def message
balance = read_response.data["billing"]["month_to_date_balance"]
threshold = process_options[:threshold]

""":warning: The **DigitalOcean** daily usage was exceeded.
Current balance: #{balance}
Threshold: #{threshold}
Current daily usage: #{daily_usage.round(3)}
"""
":warning: The **DigitalOcean** daily usage was exceeded. \
Current balance: #{balance}, Threshold: #{threshold}, \
Current daily usage: #{daily_usage.round(3)}"
end
end
end
2 changes: 1 addition & 1 deletion spec/bas/bot/format_do_bill_alert_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
let(:formatted_alert) do
daily_usage = 800.0 / Time.now.utc.mday

":warning: The **DigitalOcean** daily usage was exceeded.\n Current balance: 800\n Threshold: 7\n Current daily usage: #{daily_usage.round(3)}\n " # rubocop:disable Layout/LineLength
":warning: The **DigitalOcean** daily usage was exceeded. Current balance: 800, Threshold: 7, Current daily usage: #{daily_usage.round(3)}" # rubocop:disable Layout/LineLength
end

it "returns an empty success hash when the billing list is empty" do
Expand Down

0 comments on commit 1361241

Please sign in to comment.