botolo 0.21.0 → 0.30.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/botolo +16 -5
- data/lib/botolo/bot/engine.rb +1 -1
- data/lib/botolo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e9f55e2e112a1c105586fb0294f998d7077b49e
|
4
|
+
data.tar.gz: 94d95d0c5cf8338cff05657c2d3f120c93ed12b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d15ec2ef12ca3272e993dfd332d483ca6cbf6027a8de1f5a532df0cec6c21eb684534aab1875d1d1441cd00649f4e3ad96859c2aba55cad31dab1d25c7fb1ce2
|
7
|
+
data.tar.gz: deca604042f8f5087deae6d8cbe302e5cf4666cbe03a81e2ebd64f49c2aef8eaf73072165beede72a096c27cdb1dd7fdf98fd09e35e14b901b9a94197d20e0c3
|
data/bin/botolo
CHANGED
@@ -5,6 +5,7 @@ require 'openssl'
|
|
5
5
|
require 'codesake_commons'
|
6
6
|
|
7
7
|
DEFAULT_BEHAVIOUR = "./lib/botolo/bot/behaviour.rb"
|
8
|
+
BOTOLO_PID = File.join(".", "botolo.pid")
|
8
9
|
|
9
10
|
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
|
10
11
|
|
@@ -17,10 +18,20 @@ config_file = ARGV[0] if ARGV.count == 1
|
|
17
18
|
|
18
19
|
$logger.die "usage: botolo bot_configuration_file" if config_file.nil?
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
$logger.
|
23
|
-
|
24
|
-
|
21
|
+
$logger.log Process.pid
|
22
|
+
son = Process.fork {
|
23
|
+
$logger.helo "booting botolo v#{Botolo::VERSION} (C) 2013 paolo@armoredcode.com", BOTOLO_PID
|
24
|
+
$logger.log "daemonizing (pid=#{Process.pid}). PID file is #{BOTOLO_PID}"
|
25
|
+
|
26
|
+
|
27
|
+
@bot = Botolo::Bot::Engine.new({:config=>config_file})
|
28
|
+
$logger.log "#{@bot.name} is online" if @bot.online?
|
29
|
+
$logger.log "#{@bot.name} is offline" unless @bot.online?
|
30
|
+
@bot.run if @bot.online?
|
31
|
+
@bot.infinite_loop
|
32
|
+
}
|
33
|
+
|
34
|
+
Process.detach(son)
|
35
|
+
sleep 5
|
25
36
|
|
26
37
|
|
data/lib/botolo/bot/engine.rb
CHANGED
data/lib/botolo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: botolo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.30.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paolo Perego
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|