slack-smart-bot 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/slack-smart-bot.rb +4 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46bf9787eb4c8793c05d6bb1fe2048700c34d8aa9115db23c6ceb16f1807db3d
4
- data.tar.gz: 29d6b1c59d773a336e547946f7e7df2f07b3e00c6cb4587840903978bcd4b481
3
+ metadata.gz: 3c4cad085b7771ff84ae60072108883b4fbde15f5a5584418789e7984936fdde
4
+ data.tar.gz: 47d65333516b1dcd87c6ac8afdfe5dcf4f1bdbdf8df694b6b452b0a8e1a0841d
5
5
  SHA512:
6
- metadata.gz: 073b8fcaa53dfc9065f7e9fb9bd135dfed9b165ed108a2cd6cab708a79225e7176b03f8772ca3bbcf1e1bef149095efef706910b2db73326a317aa7c6d26a17c
7
- data.tar.gz: 9ef5b5452f3a12ca1cf5b3975359e900047c8e95399152b19e81d0824c015998cf71176e6b9eacacefd51bd7756009dc4875e8b0e45938274d606961f06f519f
6
+ metadata.gz: cb0b438bece6997bd8c554b3ad4bea1f584cae6b37e927ea8f960040604720edca6f01a645ee18b0405ee1130580724218947adf561ecb98f9591da738bbc83c
7
+ data.tar.gz: 41a36c012dde42dd32c59a2070504919f9adfed530ec227df08efc571d3088c2e21f7e266662eb001235f5b144d36d9be009a46dcd0fa3ca861671ba91901100
@@ -6,6 +6,7 @@ require "logger"
6
6
  require "fileutils"
7
7
  require "open3"
8
8
 
9
+
9
10
  if ARGV.size == 0
10
11
  CHANNEL = MASTER_CHANNEL
11
12
  ON_MASTER_BOT = true
@@ -28,7 +29,7 @@ SHORTCUTS_FILE = "slack-smart-bot_shortcuts_#{CHANNEL}.rb".gsub(" ", "_")
28
29
 
29
30
  class SlackSmartBot
30
31
  attr_accessor :config, :client, :wclient
31
-
32
+ VERSION = Gem.loaded_specs.values.select {|x| x.name=='slack-smart-bot'}[0].version
32
33
  def initialize(config)
33
34
  Dir.mkdir("./logs") unless Dir.exist?("./logs")
34
35
  Dir.mkdir("./shortcuts") unless Dir.exist?("./shortcuts")
@@ -98,7 +99,7 @@ class SlackSmartBot
98
99
  m = "Successfully connected, welcome '#{client.self.name}' to the '#{client.team.name}' team at https://#{client.team.domain}.slack.com."
99
100
  puts m
100
101
  @logger.info m
101
- respond "Smart Bot started\nIf you want to know what I can do for you: `bot help`.\n`bot rules` if you want to display just the specific rules of this channel.\nYou can talk to me privately if you prefer it."
102
+ respond "Smart Bot started v#{VERSION}\nIf you want to know what I can do for you: `bot help`.\n`bot rules` if you want to display just the specific rules of this channel.\nYou can talk to me privately if you prefer it."
102
103
  end
103
104
 
104
105
  @status = STATUS_INIT
@@ -428,7 +429,7 @@ class SlackSmartBot
428
429
  #helpadmin: If on master channel and admin user also it will display info about bots created
429
430
  #helpadmin:
430
431
  when /^bot\sstatus/i
431
- respond "Status: #{@status}. Rules file: #{File.basename RULES_FILE} ", id_user
432
+ respond "Status: #{@status}. Version: #{VERSION}. Rules file: #{File.basename RULES_FILE} ", id_user
432
433
  if @status == :on
433
434
  respond "I'm listening to [#{@listening.join(", ")}]", id_user
434
435
  if ON_MASTER_BOT and ADMIN_USERS.include?(from)
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: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-27 00:00:00.000000000 Z
11
+ date: 2019-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slack-ruby-client