slackbot_frd 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/slackbot-frd +10 -8
- data/lib/slackbot_frd/slack_methods/channels_info.rb +5 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd42f15c6b386a233d064d8dd584806014af4435
|
4
|
+
data.tar.gz: 0d7fa366f7141f126df3aa80316dabea78f1ae1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da8f260a9cb49e4506e14a7f3eca4ac994fbb1c24a7312427a65f61d80424a13cb8f1a9df45d645e3b13a2ca965dd803be19a615670fe02e96c9ceba0e6c17da
|
7
|
+
data.tar.gz: 82d2a87547f7ef172814b67b5b694ec88b14aa438395cf5e396f81601aa6998c22c70b5a98a2bc1aa5c2b554aa245b3f58e39537282216c7fa6f88250bcb5c93
|
data/bin/slackbot-frd
CHANGED
@@ -85,7 +85,8 @@ class SlackbotFrdBin < Thor
|
|
85
85
|
"token" : "<put-token-here>",
|
86
86
|
"botdir" : ".",
|
87
87
|
"daemonize" : false,
|
88
|
-
"bots" : []
|
88
|
+
"bots" : [],
|
89
|
+
"my_bots_config_option" : "<bot-specific-option>"
|
89
90
|
}
|
90
91
|
CONFIG_FILE_SKELETON
|
91
92
|
end
|
@@ -117,27 +118,28 @@ class SlackbotFrdBin < Thor
|
|
117
118
|
|
118
119
|
config_file = options['config-file']
|
119
120
|
config_file = config_file_location unless config_file
|
120
|
-
|
121
|
-
|
121
|
+
$slackbotfrd_conf = config_file_json(config_file) if config_file
|
122
|
+
$slackbotfrd_conf ||= {}
|
123
|
+
$slackbotfrd_conf.freeze
|
122
124
|
|
123
125
|
daemonize = false
|
124
|
-
daemonize =
|
126
|
+
daemonize = $slackbotfrd_conf["daemonize"] if $slackbotfrd_conf["daemonize"]
|
125
127
|
daemonize = ENV["SLACKBOT_FRD_DAEMONIZE"] if ENV["SLACKBOT_FRD_DAEMONIZE"]
|
126
128
|
daemonize = options[:daemonize] if options[:daemonize]
|
127
129
|
|
128
130
|
botdir = Dir.pwd
|
129
|
-
botdir =
|
131
|
+
botdir = $slackbotfrd_conf["botdir"] if $slackbotfrd_conf["botdir"]
|
130
132
|
botdir = ENV["SLACKBOT_FRD_BOTDIR"] if ENV["SLACKBOT_FRD_BOTDIR"]
|
131
133
|
botdir = options[:botdir] if options[:botdir]
|
132
134
|
botdir = File.expand_path(botdir)
|
133
135
|
|
134
136
|
SlackbotFrd::Log.logfile = "#{botdir}/#{LOG_FILE}"
|
135
|
-
SlackbotFrd::Log.logfile =
|
137
|
+
SlackbotFrd::Log.logfile = $slackbotfrd_conf["log_file"] if $slackbotfrd_conf["log_file"]
|
136
138
|
SlackbotFrd::Log.logfile = ENV["SLACKBOT_FRD_LOG_FILE"] if ENV["SLACKBOT_FRD_LOG_FILE"]
|
137
139
|
SlackbotFrd::Log.logfile = options["log-file"] if options['log-file']
|
138
140
|
|
139
141
|
SlackbotFrd::Log.level = :info
|
140
|
-
SlackbotFrd::Log.level =
|
142
|
+
SlackbotFrd::Log.level = $slackbotfrd_conf["log_level"] if $slackbotfrd_conf["log_level"]
|
141
143
|
SlackbotFrd::Log.level = ENV["SLACKBOT_FRD_LOG_LEVEL"] if ENV["SLACKBOT_FRD_LOG_LEVEL"]
|
142
144
|
SlackbotFrd::Log.level = options["log-level"] if options['log-level']
|
143
145
|
|
@@ -161,7 +163,7 @@ class SlackbotFrdBin < Thor
|
|
161
163
|
SlackbotFrd::Log.warn("Logging to file '#{SlackbotFrd::Log.logfile}'")
|
162
164
|
SlackbotFrd::Log.warn("Logging level set to '#{SlackbotFrd::Log.level}'")
|
163
165
|
|
164
|
-
token =
|
166
|
+
token = $slackbotfrd_conf["token"]
|
165
167
|
token = ENV["SLACKBOT_FRD_TOKEN"] if ENV["SLACKBOT_FRD_TOKEN"]
|
166
168
|
token = options[:token] if options[:token]
|
167
169
|
unless token
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slackbot_frd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Porter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: httparty
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.13.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.13.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: faye-websocket
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|