slack-smart-bot 0.4.1 → 0.4.2
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.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c4cad085b7771ff84ae60072108883b4fbde15f5a5584418789e7984936fdde
|
4
|
+
data.tar.gz: 47d65333516b1dcd87c6ac8afdfe5dcf4f1bdbdf8df694b6b452b0a8e1a0841d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb0b438bece6997bd8c554b3ad4bea1f584cae6b37e927ea8f960040604720edca6f01a645ee18b0405ee1130580724218947adf561ecb98f9591da738bbc83c
|
7
|
+
data.tar.gz: 41a36c012dde42dd32c59a2070504919f9adfed530ec227df08efc571d3088c2e21f7e266662eb001235f5b144d36d9be009a46dcd0fa3ca861671ba91901100
|
data/lib/slack-smart-bot.rb
CHANGED
@@ -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.
|
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-
|
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
|