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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ca72cea646786ecef45351b9572383eaf24ac21c0536d69f589ec05975a8bc0
4
- data.tar.gz: 0a67ca50fe73a664368912ed37f8a0edf30744ae1d30e981873de68599ad7e2d
3
+ metadata.gz: ad123f03be6f0089506c0922817758ea95c049408fb0fcaf0a32b60a813d3c69
4
+ data.tar.gz: 830795a923d755e6b3d92b6a3edf328438f68e855fe3eaaa6ee3a59a43351b3c
5
5
  SHA512:
6
- metadata.gz: ca0195b49029b878b1d91b2ee361af405e862ef7f93e8a7fed3e982b61c6ce46946f882b22798d190c8a36241b772301c62ad85cffba2773a7705e7a8147537e
7
- data.tar.gz: e34528eb142a56fae2d4a61bbc9455ac8aa3f72185085ea8eadb61468756365e29ae1689067a3b59478805d066ec7916db351e337010707130fa75772193c5b7
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
- message << "*Job Titles*"
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
- job_title_users.each do |jtitle, num|
389
- message << "\t#{jtitle}: #{num} (#{(num.to_f*100/total_without_routines).round(2)}%)"
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
@@ -1,4 +1,4 @@
1
- *Version 1.12.2* Released 2022-Nov-01
1
+ *Version 1.12.3* Released 2022-Nov-01
2
2
 
3
3
  *For General users*
4
4
  - `run repl` accepts local parameters and precode to be supplied (<https://github.com/MarioRuiz/slack-smart-bot/issues/60|#60>).
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-smart-bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.2
4
+ version: 1.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Ruiz