slack-smart-bot 1.12.4 → 1.12.6

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: 27a01c9632e3e892e2c21142658a3c77e8a11ab0d6a025abc6b9ccaf189b9af5
4
- data.tar.gz: 916f5a09a3e121f768ca5a07e4721c5b33ee9c475a6697047ab83c9026e9b27d
3
+ metadata.gz: 5596e8869ae4c53cddb593dadcbde5aa6dc5e4a024d7301e7d2d45e1b03882d9
4
+ data.tar.gz: 2f4e295bd3881c7f2172b1abd39e40163f3cd244a8ee9f250b8c2e606e8137c5
5
5
  SHA512:
6
- metadata.gz: 002ecefc0542c4240f011930fd92d6330ff6d67bab530f7988b453696ff9936767ca88fc9d15e101d906744a27fc6921546e35f2a0e9e5856bed62848c827166
7
- data.tar.gz: dbabcdb3e6f40da61085cad5ebbbe24a260c9f9a952dc7782f380ed58133fab811985546051636c69788c407d6c39664d419e1ea610a9b7d9019bf81bb619481
6
+ metadata.gz: 24c6dc230c11db7075dee20b7a9f04202417ae443b3abe6b290668a965ef8778b3d211deb8c660bb869dbf54c7e2912b98a8e6b3b86722e8e88e5a832556596d
7
+ data.tar.gz: b075c60bbc5b632374328c8b8c65a1857454cba5b92ef4d8d0e168a4aefdc0b25e6ba5afdc04c6014c53cf5b35d24dceba5015df1c28491f8fd2d4a5604f56ef
data/README.md CHANGED
@@ -307,7 +307,7 @@ To display a general message after every command use: `set general message MESSA
307
307
 
308
308
  To close the Master Bot, run on MASTER CHANNEL: **_`exit bot`_**
309
309
 
310
- If you are a Master Admin on a Direct Message with the Smart Bot you can call the **_`bot stats`_** and get use stats of the users. You need to set to `true` the `stats` settings when initializing the Smart Bot. As a normal user you will get your own stats when calling **_`bot stats`_**. Take a look at `bot help bot stats` for more info. Also you can call **_`leaderboard`_** to get some useful information about the use of the SmartBot.
310
+ If you are a Master Admin on a Direct Message with the Smart Bot you can call the **_`bot stats`_** and get use stats of the users. You need to set to `true` the `stats` settings when initializing the Smart Bot. As a normal user you will get your own stats when calling **_`bot stats`_**. Take a look at `bot help bot stats` for more info. If you are a member of #smartbot-stats you can use the bot stats command on that channel. You can set a different channel by supplying it on the config key stats_channel. Also you can call **_`leaderboard`_** to get some useful information about the use of the SmartBot.
311
311
 
312
312
  You can also get the bot logs of the bot channel you are using by calling `get bot logs`. You need to be a Master Admin user on a DM with the Smart Bot.
313
313
 
@@ -582,6 +582,8 @@ def general_bot_commands(user, command, dest, files = [])
582
582
  # help: `add sick from YYYY/MM/DD to YYYY/MM/DD`
583
583
  # help: `add sick YYYY/MM/DD`
584
584
  # help: `add sick child YYYY/MM/DD`
585
+ # help: `I'm sick today`
586
+ # help: `I'm on vacation today`
585
587
  # help: It will add the supplied period to your plan.
586
588
  # help: Instead of YYYY/MM/DD you can use 'today' or 'tomorrow' or 'next week'
587
589
  # help: To see your plan call `see my time off`
@@ -592,18 +594,21 @@ def general_bot_commands(user, command, dest, files = [])
592
594
  # help: _add vacation from 2022/10/01 to 2022/10/22_
593
595
  # help: _add sick 2022/08/22_
594
596
  # help: _add vacation tomorrow_
597
+ # help: _I'll be on vacation next week_
595
598
  # help: _add sick baby today_
596
599
  # help: <https://github.com/MarioRuiz/slack-smart-bot#time-off-management|more info>
597
600
  # help: command_id: :add_vacation
598
601
  # help:
599
- when /\A\s*add\s+(sick|vacation|sick\s+baby|sick\s+child)\s+from\s+(\d\d\d\d\/\d\d\/\d\d)\s+to\s+(\d\d\d\d\/\d\d\/\d\d)\s*\z/i,
600
- /\A\s*add\s+(sick|vacation|sick\s+baby|sick\s+child)\s+from\s+(\d\d\d\d-\d\d-\d\d)\s+to\s+(\d\d\d\d-\d\d-\d\d)\s*\z/i,
601
- /\A\s*add\s+(sick|vacation|sick\s+baby|sick\s+child)\s+(\d\d\d\d-\d\d-\d\d)()\s*\z/i,
602
- /\A\s*add\s+(sick|vacation|sick\s+baby|sick\s+child)\s+(\d\d\d\d\/\d\d\/\d\d)()\s*\z/i,
603
- /\A\s*add\s+(sick|vacation|sick\s+baby|sick\s+child)\s+(today|tomorrow|next\sweek)()\s*\z/i
604
- type = $1
605
- from = $2.downcase
606
- to = $3
602
+ when /\A\s*(add)\s+(sick|vacation|sick\s+baby|sick\s+child)\s+from\s+(\d\d\d\d\/\d\d\/\d\d)\s+to\s+(\d\d\d\d\/\d\d\/\d\d)\s*\z/i,
603
+ /\A\s*(add)\s+(sick|vacation|sick\s+baby|sick\s+child)\s+from\s+(\d\d\d\d-\d\d-\d\d)\s+to\s+(\d\d\d\d-\d\d-\d\d)\s*\z/i,
604
+ /\A\s*(add)\s+(sick|vacation|sick\s+baby|sick\s+child)\s+(\d\d\d\d-\d\d-\d\d)()\s*\z/i,
605
+ /\A\s*(add)\s+(sick|vacation|sick\s+baby|sick\s+child)\s+(\d\d\d\d\/\d\d\/\d\d)()\s*\z/i,
606
+ /\A\s*(add)\s+(sick|vacation|sick\s+baby|sick\s+child)\s+(today|tomorrow|next\sweek)()\s*\z/i,
607
+ /\A\s*(I'm|I\s+am|I'll\s+be|I\s+will\s+be)\s+(sick|on\s+vacation)\s+(today|tomorrow|next\sweek)()\s*\z/i
608
+ type = $2
609
+ from = $3.downcase
610
+ to = $4
611
+ type = 'vacation' if type.match?(/vacation/)
607
612
  add_vacation(user, type, from, to)
608
613
 
609
614
  # help: ----------------------------------------------
@@ -16,11 +16,16 @@ class SlackSmartBot
16
16
  # help: `bot stats members #CHANNEL`
17
17
  # help: `bot stats exclude members #CHANNEL`
18
18
  # help: `bot stats today`
19
+ # help: `bot stats yesterday`
20
+ # help: `bot stats last month`
21
+ # help: `bot stats this month`
22
+ # help: `bot stats last week`
23
+ # help: `bot stats this week`
19
24
  # help: `bot stats exclude COMMAND_ID`
20
25
  # help: `bot stats monthly`
21
26
  # help: `bot stats alldata`
22
27
  # help: To see the bot stats
23
- # helpmaster: You can use this command only if you are a Master admin user and if you are in a private conversation with the bot
28
+ # helpmaster: You can use this command only if you are a Master admin user and if you are in a private conversation with the bot, or you are on the Smartbot-stats channel
24
29
  # helpmaster: You need to set stats to true to generate the stats when running the bot instance.
25
30
  # help: members #CHANNEL will return stats for only members of the channel supplied
26
31
  # help: exclude members #CHANNEL will return stats for only members that are not members of the channel supplied
@@ -44,7 +49,15 @@ class SlackSmartBot
44
49
  message = ["You need to set stats to true to generate the stats when running the bot instance."]
45
50
  end
46
51
  save_stats(__method__)
47
- if (from_user.id != user and (config.masters.include?(from_user.name) or @master_admin_users_id.include?(from_user.id)) and (typem==:on_dm or dest[0]=='D'))
52
+ get_channels_name_and_id() unless @channels_name.keys.include?(dest)
53
+ master_admin_users_id = @master_admin_users_id.dup
54
+ if dest == @channels_id[config.stats_channel]
55
+ #master_admin_users_id << user
56
+ user = '' # for the case we are on the stats channel
57
+ end
58
+ if (from_user.id != user and
59
+ (config.masters.include?(from_user.name) or master_admin_users_id.include?(from_user.id) or dest == @channels_id[config.stats_channel]) and #Jal
60
+ (typem==:on_dm or dest[0]=='D' or dest == @channels_id[config.stats_channel] ))
48
61
  on_dm_master = true #master admin user
49
62
  else
50
63
  on_dm_master = false
@@ -76,6 +89,7 @@ class SlackSmartBot
76
89
  end
77
90
  tzone_users = {}
78
91
  job_title_users = {}
92
+ users_by_job_title = {}
79
93
 
80
94
  unless wrong
81
95
  if on_dm_master or (from_user.id == user) # normal user can only see own stats
@@ -163,7 +177,7 @@ class SlackSmartBot
163
177
  end
164
178
  if !exclude_masters or (exclude_masters and !master_admins.include?(row[:user_name]) and
165
179
  !master_admins.include?(row[:user_id]) and
166
- !@master_admin_users_id.include?(row[:user_id]))
180
+ !master_admin_users_id.include?(row[:user_id]))
167
181
  if !exclude_routines or (exclude_routines and !row[:user_name].match?(/^routine\//) )
168
182
  if exclude_command == '' or (exclude_command!='' and row[:command]!=exclude_command)
169
183
  if st_command == '' or (st_command != '' and row[:command] == st_command)
@@ -320,29 +334,38 @@ class SlackSmartBot
320
334
  end
321
335
  end
322
336
  if rows[0].key?(:job_title) #then save_stats is saving the job title already
323
- rows.job_title.each do |job_title|
324
- unless job_title == ''
325
- job_title_users[job_title] ||= 0
326
- job_title_users[job_title] += 1
327
- end
337
+ rows.job_title.each_with_index do |job_title, idx|
338
+ job_title = job_title.to_s.split.map(&:capitalize).join(' ')
339
+ job_title_users[job_title] ||= 0
340
+ job_title_users[job_title] += 1
341
+ users_by_job_title[job_title] ||= []
342
+ users_by_job_title[job_title] << rows.user_name[idx]
328
343
  end
329
344
  else
330
345
  rows.user_id.each_with_index do |usr, i|
331
346
  if rows[i].values.size >= 13 #then save_stats is saving the job_title already but not all the data
332
- unless rows[i].values[12] == ''
333
- job_title_users[rows[i].values[12]] ||= 0
334
- job_title_users[rows[i].values[12]] += 1
335
- end
347
+ job_title = rows[i].values[12].to_s.split.map(&:capitalize).join(' ')
348
+ job_title_users[job_title] ||= 0
349
+ job_title_users[job_title] += 1
350
+ users_by_job_title[job_title] ||= []
351
+ users_by_job_title[job_title] << rows.user_name[i]
336
352
  else
337
353
  user_info = @users.select { |u| u.id == usr or (u.key?(:enterprise_user) and u.enterprise_user.id == usr) }[-1]
338
354
  unless user_info.nil? or user_info.is_app_user or user_info.is_bot
339
- job_title_users[user_info.profile.title] ||= 0
340
- job_title_users[user_info.profile.title] += 1
355
+ job_title = user_info.profile.title.split.map(&:capitalize).join(' ')
356
+ job_title_users[job_title] ||= 0
357
+ job_title_users[job_title] += 1
358
+ users_by_job_title[job_title] ||= []
359
+ users_by_job_title[job_title] << rows.user_name[i]
341
360
  end
342
361
  end
343
362
  end
344
363
  end
345
-
364
+ total_users_by_job_title = 0
365
+ users_by_job_title.each do |job_title, users|
366
+ users.uniq!
367
+ total_users_by_job_title += users.size
368
+ end
346
369
  if users.size > 10
347
370
  message << "*Users* - #{users.size} (Top 10)"
348
371
  else
@@ -404,7 +427,21 @@ class SlackSmartBot
404
427
  total_unknown = total_without_routines - total_known
405
428
  message << "\tUnknown: #{total_unknown} (#{(total_unknown.to_f*100/total_without_routines).round(2)}%)" if total_unknown > 0
406
429
  end
407
-
430
+ if users_by_job_title.size > 0
431
+ if users_by_job_title.size > 10
432
+ message << "*Num Users by Job Title* (Top 10)"
433
+ else
434
+ message << "*Num Users by Job Title*"
435
+ end
436
+ i = 0
437
+ users_by_job_title.sort_by {|k,v| -v.size}.each do |jtitle, users|
438
+ i += 1
439
+ if i <= 10
440
+ jtitle = 'Unknown' if jtitle.to_s == ''
441
+ message << "\t#{jtitle}: #{users.size} (#{(users.size.to_f*100/total_users_by_job_title).round(2)}%)"
442
+ end
443
+ end
444
+ end
408
445
  end
409
446
  commands_attachment = []
410
447
 
@@ -37,7 +37,8 @@ class SlackSmartBot
37
37
  end
38
38
  if !config.on_maintenance or (config.on_maintenance and command.match?(/\A(set|turn)\s+maintenance\s+off\s*\z/))
39
39
  #todo: check :on_pg in this case
40
- if typem == :on_master or typem == :on_bot or typem == :on_pg or typem == :on_dm
40
+ if typem == :on_master or typem == :on_bot or typem == :on_pg or typem == :on_dm or
41
+ (command.match?(/\A\s*bot\s+stats\s*(.*)\s*$/i) and dest==@channels_id[config.stats_channel])
41
42
 
42
43
  case command
43
44
 
@@ -102,14 +103,11 @@ class SlackSmartBot
102
103
  when /\A\s*(where\s+is|which\s+channels|where\s+is\s+a\s+member)\s+(#{@salutations.join("|")})\??\s*$/i
103
104
  where_smartbot(user)
104
105
  when /\A\s*(add|create)\s+(silent\s+)?(bgroutine|routine)\s+([\w\.]+)\s+(every)\s+(\d+)\s*(days|hours|minutes|seconds|mins|min|secs|sec|d|h|m|s)\s*(\s#(\w+)\s*)(\s.+)?\s*\z/im,
105
- /\A\s*(add|create)\s+(silent\s+)?(bgroutine|routine)\s+([\w\.]+)\s+(every)\s+(\d+)\s*(days|hours|minutes|seconds|mins|min|secs|sec|d|h|m|s)\s*(\s<#(C\w+)\|.+>\s*)?(\s.+)?\s*\z/im,
106
- /\A\s*(add|create)\s+(silent\s+)?(bgroutine|routine)\s+([\w\.]+)\s+(every)\s+(\d+)\s*(days|hours|minutes|seconds|mins|min|secs|sec|d|h|m|s)\s*(\s<#(\w+)\|>\s*)?(\s.+)?\s*\z/im,
106
+ /\A\s*(add|create)\s+(silent\s+)?(bgroutine|routine)\s+([\w\.]+)\s+(every)\s+(\d+)\s*(days|hours|minutes|seconds|mins|min|secs|sec|d|h|m|s)\s*(\s<#(C\w+)\|.*>\s*)?(\s.+)?\s*\z/im,
107
107
  /\A\s*(add|create)\s+(silent\s+)?(bgroutine|routine)\s+([\w\.]+)\s+on\s+(monday|tuesday|wednesday|thursday|friday|saturday|sunday|weekend|weekday)s?\s+at\s+(\d+:\d+:?\d+?)\s*()(\s#(\w+)\s*)(\s.+)?\s*\z/im,
108
- /\A\s*(add|create)\s+(silent\s+)?(bgroutine|routine)\s+([\w\.]+)\s+on\s+(monday|tuesday|wednesday|thursday|friday|saturday|sunday|weekend|weekday)s?\s+at\s+(\d+:\d+:?\d+?)\s*()(\s<#(C\w+)\|.+>\s*)?(\s.+)?\s*\z/im,
109
- /\A\s*(add|create)\s+(silent\s+)?(bgroutine|routine)\s+([\w\.]+)\s+on\s+(monday|tuesday|wednesday|thursday|friday|saturday|sunday|weekend|weekday)s?\s+at\s+(\d+:\d+:?\d+?)\s*()(\s<#(\w+)\|>\s*)?(\s.+)?\s*\z/im,
108
+ /\A\s*(add|create)\s+(silent\s+)?(bgroutine|routine)\s+([\w\.]+)\s+on\s+(monday|tuesday|wednesday|thursday|friday|saturday|sunday|weekend|weekday)s?\s+at\s+(\d+:\d+:?\d+?)\s*()(\s<#(C\w+)\|.*>\s*)?(\s.+)?\s*\z/im,
110
109
  /\A\s*(add|create)\s+(silent\s+)?(bgroutine|routine)\s+([\w\.]+)\s+(at)\s+(\d+:\d+:?\d+?)\s*()(\s#(\w+)\s*)(\s.+)?\s*\z/im,
111
- /\A\s*(add|create)\s+(silent\s+)?(bgroutine|routine)\s+([\w\.]+)\s+(at)\s+(\d+:\d+:?\d+?)\s*()(\s<#(C\w+)\|.+>\s*)?(\s.+)?\s*\z/im,
112
- /\A\s*(add|create)\s+(silent\s+)?(bgroutine|routine)\s+([\w\.]+)\s+(at)\s+(\d+:\d+:?\d+?)\s*()(\s<#(\w+)\|>\s*)?(\s.+)?\s*\z/im
110
+ /\A\s*(add|create)\s+(silent\s+)?(bgroutine|routine)\s+([\w\.]+)\s+(at)\s+(\d+:\d+:?\d+?)\s*()(\s<#(C\w+)\|.*>\s*)?(\s.+)?\s*\z/im
113
111
  silent = $2.to_s!=''
114
112
  routine_type = $3.downcase
115
113
  name = $4.downcase
@@ -272,6 +270,12 @@ class SlackSmartBot
272
270
  opts.gsub!(/exclude\s+members\s+<#\w+\|.*>/,'')
273
271
  members_channel = opts.scan(/members\s+<#(\w+)\|.*>/i).join #todo: add test
274
272
  opts.gsub!(/members\s+<#\w+\|.*>/,'')
273
+ this_month = opts.match?(/this\s+month/i)
274
+ last_month = opts.match?(/last\s+month/i)
275
+ this_year = opts.match?(/this\s+year/i)
276
+ last_year = opts.match?(/last\s+year/i)
277
+ this_week = opts.match?(/this\s+week/i)
278
+ last_week = opts.match?(/last\s+week/i)
275
279
  all_opts = opts.downcase.split(' ')
276
280
  all_data = all_opts.include?('alldata')
277
281
  st_channel = opts.scan(/<#(\w+)\|.*>/).join
@@ -296,14 +300,46 @@ class SlackSmartBot
296
300
  monthly = false
297
301
  if all_opts.include?('today')
298
302
  st_from = st_to = "#{Time.now.strftime("%Y-%m-%d")}"
303
+ elsif all_opts.include?('yesterday')
304
+ st_from = st_to = "#{(Time.now-86400).strftime("%Y-%m-%d")}"
299
305
  elsif all_opts.include?('monthly')
300
306
  monthly = true
301
307
  end
308
+ if this_month
309
+ st_from = "#{Date.today.strftime("%Y-%m-01")}"
310
+ st_to = "#{Date.today.strftime("%Y-%m-%d")}"
311
+ elsif last_month
312
+ date = Date.today<<1
313
+ st_from = "#{date.strftime("%Y-%m-01")}"
314
+ st_to = "#{(Date.new(date.year, date.month, -1)).strftime("%Y-%m-%d")}"
315
+ elsif this_year
316
+ st_from = "#{Date.today.strftime("%Y-01-01")}"
317
+ st_to = "#{Date.today.strftime("%Y-%m-%d")}"
318
+ elsif last_year
319
+ date = Date.today.prev_year
320
+ st_from = "#{date.strftime("%Y-01-01")}"
321
+ st_to = "#{(Date.new(date.year, 12, 31)).strftime("%Y-%m-%d")}"
322
+ elsif this_week
323
+ date = Date.today
324
+ wday = date.wday
325
+ wday = 7 if wday==0
326
+ wday-=1
327
+ st_from = "#{(date-wday).strftime("%Y-%m-%d")}"
328
+ st_to = "#{date.strftime("%Y-%m-%d")}"
329
+ elsif last_week
330
+ date = Date.today
331
+ wday = date.wday
332
+ wday = 7 if wday==0
333
+ wday-=1
334
+ st_from = "#{(date-wday-7).strftime("%Y-%m-%d")}"
335
+ st_to = "#{(date-wday-1).strftime("%Y-%m-%d")}"
336
+ end
337
+
302
338
  exclude_command = opts.scan(/exclude\s+([^\s]+)/i).join
303
339
  unless @master_admin_users_id.include?(user.id)
304
340
  st_user = user.id
305
341
  end
306
- if (typem == :on_master or typem == :on_bot) and dest[0]!='D' #routine bot stats to be published on DM
342
+ if (typem == :on_master or typem == :on_bot) and dest[0]!='D' and dest!=@channels_id[config.stats_channel] #routine bot stats to be published on DM
307
343
  st_channel = dchannel
308
344
  end
309
345
  bot_stats(dest, user, typem, st_channel, st_from, st_to, st_user, st_command, exclude_masters, exclude_routines, exclude_command, monthly, all_data, members_channel, exclude_members_channel)
@@ -212,12 +212,11 @@ class SlackSmartBot
212
212
  else
213
213
  Thread.current[:using_channel] = ''
214
214
  end
215
- if typem == :on_pub or typem == :on_pg
215
+ if (typem == :on_pub or typem == :on_pg) and (!command.match?(/\A\s*bot\s+stats\s*(.*)\s*$/i) or dest!=@channels_id[config.stats_channel])
216
216
  processed = false
217
217
  else
218
218
  processed = process(user, command, dest, dchannel, rules_file, typem, files, Thread.current[:thread_ts])
219
219
  end
220
- @logger.info "command: #{nick}> #{command}" if processed
221
220
  on_demand = false
222
221
  if command.match(/\A@?(#{config[:nick]}):*\s+(.+)/im) or
223
222
  command.match(/\A()!!(.+)/im) or
@@ -250,6 +250,7 @@ class SlackSmartBot
250
250
  command += " ruby" if command != "ruby"
251
251
  command = "#{command} #{res.body.to_s.force_encoding("UTF-8")}"
252
252
  end
253
+
253
254
  if typem == :on_call
254
255
  command = "!" + command unless command[0] == "!" or command.match?(/^\s*$/) or command[0] == "^"
255
256
 
@@ -283,6 +284,7 @@ class SlackSmartBot
283
284
  elsif typem == :on_pub or typem == :on_pg
284
285
  process_first(user_info, command, dest, channel_rules, typem, data.files, data.ts, data.thread_ts, data.routine, data.routine_name, data.routine_type, command_orig)
285
286
  end
287
+
286
288
  rescue Exception => stack
287
289
  @logger.fatal stack
288
290
  end
@@ -47,6 +47,8 @@ class SlackSmartBot
47
47
  config[:general_message] = "" unless config.key?(:general_message)
48
48
  config[:logrtm] = false unless config.key?(:logrtm)
49
49
  config[:status_channel] = 'smartbot-status' unless config.key?(:status_channel)
50
+ config[:stats_channel] = 'smartbot-stats' unless config.key?(:stats_channel)
51
+
50
52
  config[:jira] = { host: '', user: '', password: '' } unless config.key?(:jira) and config[:jira].key?(:host) and config[:jira].key?(:user) and config[:jira].key?(:password)
51
53
  config[:jira][:host] = "https://#{config[:jira][:host]}" unless config[:jira][:host] == '' or config[:jira][:host].match?(/^http/)
52
54
  config[:github] = {token: '' } unless config.key?(:github) and config[:github].key?(:token)
data/whats_new.txt CHANGED
@@ -1,4 +1,4 @@
1
- *Version 1.12.4* Released 2022-Nov-01
1
+ *Version 1.12.6* Released 2022-Nov-08
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>).
@@ -9,11 +9,14 @@
9
9
  - Now you can add a GitHub url to the issues you want to add as memos for teams. (<https://github.com/MarioRuiz/slack-smart-bot/issues/71|#71>)
10
10
  - It is possible to add the status of a memo on teams feature. (<https://github.com/MarioRuiz/slack-smart-bot/issues/72|#72>)
11
11
  - Added 'Time off' (Vacation/Sick/Sick Child) management. The SmartBot will automatically set your status on the periods specified. It will be possible to see the 'Time off' plan for a specific team and period. (<https://github.com/MarioRuiz/slack-smart-bot/issues/73|#73>)
12
+ - More natural language for 'Time off' command: (<https://github.com/MarioRuiz/slack-smart-bot/issues/80|#80>)
12
13
 
13
14
  *For Admin users*
14
15
  - Bot Stats is now saving the time_zone of the user (<https://github.com/MarioRuiz/slack-smart-bot/issues/66|#66>)
15
16
  - Announcements won't be published if no activity on channel. (<https://github.com/MarioRuiz/slack-smart-bot/issues/74|#74>)
16
17
  - Bot Stats is now saving the job title of the user (<https://github.com/MarioRuiz/slack-smart-bot/issues/77|#77>)
18
+ - Any member of smartbot-stats channel can use the `bot stats` command on the channel (<https://github.com/MarioRuiz/slack-smart-bot/issues/78|#78>)
19
+ - Added options for `bot stats` command: today, yesterday, this week, last week, this year, last year (<https://github.com/MarioRuiz/slack-smart-bot/issues/79|#79>)
17
20
  ------------------------------
18
21
 
19
22
  *Previous*: <https://github.com/MarioRuiz/slack-smart-bot/blob/b1a368c3342094e886f53d96dc4d12ecd81ab04b/whats_new.txt|1.11.0>
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.4
4
+ version: 1.12.6
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-02 00:00:00.000000000 Z
11
+ date: 2022-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slack-ruby-client
@@ -126,20 +126,6 @@ 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
143
129
  description: "Create a Slack bot that is smart and so easy to expand, create new bots
144
130
  on demand, run ruby code on chat, create shortcuts... \n The main scope of this
145
131
  gem is to be used internally in the company so teams can create team channels with
@@ -304,15 +290,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
304
290
  requirements:
305
291
  - - ">="
306
292
  - !ruby/object:Gem::Version
307
- version: '2.7'
293
+ version: 2.7.3
308
294
  required_rubygems_version: !ruby/object:Gem::Requirement
309
295
  requirements:
310
296
  - - ">="
311
297
  - !ruby/object:Gem::Version
312
298
  version: '0'
313
299
  requirements: []
314
- rubygems_version: 3.1.2
315
- signing_key:
300
+ rubygems_version: 3.2.15
301
+ signing_key:
316
302
  specification_version: 4
317
303
  summary: Create a Slack bot that is smart and so easy to expand, create new bots on
318
304
  demand, run ruby code on chat, create shortcuts...