slack-smart-bot 1.12.2 → 1.12.4

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: 27a01c9632e3e892e2c21142658a3c77e8a11ab0d6a025abc6b9ccaf189b9af5
4
+ data.tar.gz: 916f5a09a3e121f768ca5a07e4721c5b33ee9c475a6697047ab83c9026e9b27d
5
5
  SHA512:
6
- metadata.gz: ca0195b49029b878b1d91b2ee361af405e862ef7f93e8a7fed3e982b61c6ce46946f882b22798d190c8a36241b772301c62ad85cffba2773a7705e7a8147537e
7
- data.tar.gz: e34528eb142a56fae2d4a61bbc9455ac8aa3f72185085ea8eadb61468756365e29ae1689067a3b59478805d066ec7916db351e337010707130fa75772193c5b7
6
+ metadata.gz: 002ecefc0542c4240f011930fd92d6330ff6d67bab530f7988b453696ff9936767ca88fc9d15e101d906744a27fc6921546e35f2a0e9e5856bed62848c827166
7
+ data.tar.gz: dbabcdb3e6f40da61085cad5ebbbe24a260c9f9a952dc7782f380ed58133fab811985546051636c69788c407d6c39664d419e1ea610a9b7d9019bf81bb619481
@@ -375,19 +375,31 @@ class SlackSmartBot
375
375
  message << "*Time Zones*"
376
376
  total_known = 0
377
377
  tzone_users.each do |tzone, num|
378
- message << "\t#{tzone}: #{num} (#{(num.to_f*100/total_without_routines).round(2)}%)"
379
- total_known+=num
378
+ unless tzone.to_s == ''
379
+ message << "\t#{tzone}: #{num} (#{(num.to_f*100/total_without_routines).round(2)}%)"
380
+ total_known+=num
381
+ end
380
382
  end
381
383
  total_unknown = total_without_routines - total_known
382
384
  message << "\tUnknown: #{total_unknown} (#{(total_unknown.to_f*100/total_without_routines).round(2)}%)" if total_unknown > 0
383
385
  end
384
-
386
+
385
387
  if job_title_users.size > 0
386
- message << "*Job Titles*"
388
+ if job_title_users.size > 10
389
+ message << "*Job Titles* - #{job_title_users.size} (Top 10)"
390
+ else
391
+ message << "*Job Titles* - #{job_title_users.size}"
392
+ end
387
393
  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)}%)"
390
- total_known+=num
394
+ i = 0
395
+ job_title_users.sort_by {|k,v| -v}.each do |jtitle, num|
396
+ unless jtitle.to_s == ''
397
+ i += 1
398
+ if i <= 10
399
+ message << "\t#{jtitle}: #{num} (#{(num.to_f*100/total_without_routines).round(2)}%)"
400
+ end
401
+ total_known+=num
402
+ end
391
403
  end
392
404
  total_unknown = total_without_routines - total_known
393
405
  message << "\tUnknown: #{total_unknown} (#{(total_unknown.to_f*100/total_without_routines).round(2)}%)" if total_unknown > 0
data/whats_new.txt CHANGED
@@ -1,4 +1,4 @@
1
- *Version 1.12.2* Released 2022-Nov-01
1
+ *Version 1.12.4* 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,14 +1,14 @@
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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Ruiz
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-01 00:00:00.000000000 Z
11
+ date: 2022-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slack-ruby-client
@@ -126,6 +126,20 @@ dependencies:
126
126
  - - "~>"
127
127
  - !ruby/object:Gem::Version
128
128
  version: '3.9'
129
+ - !ruby/object:Gem::Dependency
130
+ name: console
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: 1.15.0
136
+ type: :runtime
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - "~>"
141
+ - !ruby/object:Gem::Version
142
+ version: 1.15.0
129
143
  description: "Create a Slack bot that is smart and so easy to expand, create new bots
130
144
  on demand, run ruby code on chat, create shortcuts... \n The main scope of this
131
145
  gem is to be used internally in the company so teams can create team channels with
@@ -297,8 +311,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
297
311
  - !ruby/object:Gem::Version
298
312
  version: '0'
299
313
  requirements: []
300
- rubygems_version: 3.2.15
301
- signing_key:
314
+ rubygems_version: 3.1.2
315
+ signing_key:
302
316
  specification_version: 4
303
317
  summary: Create a Slack bot that is smart and so easy to expand, create new bots on
304
318
  demand, run ruby code on chat, create shortcuts...