mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
Rubocop fixes
This commit is contained in:
parent
2f31f65af2
commit
81f68ae68d
1 changed files with 21 additions and 20 deletions
|
|
@ -36,26 +36,27 @@ class User < ApplicationRecord
|
|||
current_project_duration = Heartbeat.duration_seconds(current_project_heartbeats)
|
||||
current_project_duration_formatted = Heartbeat.duration_simple(current_project_heartbeats)
|
||||
|
||||
status_emoji = case current_project_duration
|
||||
when 0...30.minutes
|
||||
%w[thinking cat-on-the-laptop loading-tumbleweed rac-yap]
|
||||
when 30.minutes...1.hour
|
||||
%w[working-parrot meow_code]
|
||||
when 1.hour...2.hours
|
||||
%w[working-parrot meow-code]
|
||||
when 2.hours...3.hours
|
||||
%w[working-parrot cat-typing bangbang]
|
||||
when 3.hours...5.hours
|
||||
%w[cat-typing meow-code laptop-fire bangbang]
|
||||
when 5.hours...8.hours
|
||||
%w[cat-typing laptop-fire hole-mantelpiece_clock keyboard-fire bangbang bangbang]
|
||||
when 8.hours...15.hours
|
||||
%w[laptop-fire bangbang bangbang rac_freaking rac_freakinghole-mantelpiece_clock]
|
||||
when 15.hours...20.hours
|
||||
%w[bangbang bangbang rac_freaking hole-mantelpiece_clock]
|
||||
else
|
||||
%w[areyousure time-to-stop]
|
||||
end.sample
|
||||
status_emoji =
|
||||
case current_project_duration
|
||||
when 0...30.minutes
|
||||
%w[thinking cat-on-the-laptop loading-tumbleweed rac-yap]
|
||||
when 30.minutes...1.hour
|
||||
%w[working-parrot meow_code]
|
||||
when 1.hour...2.hours
|
||||
%w[working-parrot meow-code]
|
||||
when 2.hours...3.hours
|
||||
%w[working-parrot cat-typing bangbang]
|
||||
when 3.hours...5.hours
|
||||
%w[cat-typing meow-code laptop-fire bangbang]
|
||||
when 5.hours...8.hours
|
||||
%w[cat-typing laptop-fire hole-mantelpiece_clock keyboard-fire bangbang bangbang]
|
||||
when 8.hours...15.hours
|
||||
%w[laptop-fire bangbang bangbang rac_freaking rac_freakinghole-mantelpiece_clock]
|
||||
when 15.hours...20.hours
|
||||
%w[bangbang bangbang rac_freaking hole-mantelpiece_clock]
|
||||
else
|
||||
%w[areyousure time-to-stop]
|
||||
end.sample
|
||||
|
||||
status_emoji = ":#{status_emoji}:"
|
||||
status_text = "#{current_project_duration_formatted} spent on #{current_project} today"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue