slack-smart-bot 1.12.2 → 1.12.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/slack/smart-bot/commands/on_bot/general/bot_stats.rb +12 -4
- data/whats_new.txt +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad123f03be6f0089506c0922817758ea95c049408fb0fcaf0a32b60a813d3c69
|
4
|
+
data.tar.gz: 830795a923d755e6b3d92b6a3edf328438f68e855fe3eaaa6ee3a59a43351b3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37a4da4e6d66617fe11095d932b4cdc34ef6df6cfa1e15aac45b46d28867f69226cd07908d682fee8d4dd5b6133fa57f701d14b591cec911250956592f14124c
|
7
|
+
data.tar.gz: 6481d7e7e66d4877454d44112e72fb5e41c041951f2627fc5b021631340e85efce4871d7c82304cb4968b063721bcd1b32a41c085070451afd24c583e7618cb6
|
@@ -381,12 +381,20 @@ class SlackSmartBot
|
|
381
381
|
total_unknown = total_without_routines - total_known
|
382
382
|
message << "\tUnknown: #{total_unknown} (#{(total_unknown.to_f*100/total_without_routines).round(2)}%)" if total_unknown > 0
|
383
383
|
end
|
384
|
-
|
384
|
+
|
385
385
|
if job_title_users.size > 0
|
386
|
-
|
386
|
+
if job_title_users.size > 10
|
387
|
+
message << "*Job Titles* - #{job_title_users.size} (Top 10)"
|
388
|
+
else
|
389
|
+
message << "*Job Titles* - #{job_title_users.size}"
|
390
|
+
end
|
387
391
|
total_known = 0
|
388
|
-
|
389
|
-
|
392
|
+
i = 0
|
393
|
+
job_title_users.sort_by {|k,v| -v}.each do |jtitle, num|
|
394
|
+
i += 1
|
395
|
+
if i <= 10
|
396
|
+
message << "\t#{jtitle}: #{num} (#{(num.to_f*100/total_without_routines).round(2)}%)"
|
397
|
+
end
|
390
398
|
total_known+=num
|
391
399
|
end
|
392
400
|
total_unknown = total_without_routines - total_known
|
data/whats_new.txt
CHANGED