badboy-jabbot 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -0
- data/Rakefile +43 -0
- data/VERSION.yml +1 -1
- data/lib/jabbot/bot.rb +2 -2
- data/lib/jabbot/config.rb +5 -2
- metadata +17 -14
data/README.rdoc
CHANGED
@@ -53,11 +53,13 @@ atleast:
|
|
53
53
|
password: jabber_password
|
54
54
|
channel: channel_to_join
|
55
55
|
server: server_to_connect_to
|
56
|
+
nick: mybot
|
56
57
|
|
57
58
|
You can also configure with Ruby:
|
58
59
|
|
59
60
|
configure do |conf|
|
60
61
|
conf.login = "my_account"
|
62
|
+
conf.nick = "mybot"
|
61
63
|
do
|
62
64
|
|
63
65
|
If you don't specify login and/or password in any of these ways, Jabbot will fail
|
data/Rakefile
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "jabbot"
|
8
|
+
gem.summary = %Q{Simple framework for creating Jabber/MUC bots, inspired by Sinatra and Twibot}
|
9
|
+
gem.email = "badboy@archlinux.us"
|
10
|
+
gem.homepage = "http://github.com/badboy/jabbot"
|
11
|
+
gem.authors = ["BadBoy_"]
|
12
|
+
gem.add_dependency('xmpp4r', '>=0.4')
|
13
|
+
gem.add_development_dependency('thoughtbot-shoulda', '>=2.10.1')
|
14
|
+
gem.add_development_dependency('jeweler', '>=0.10.2')
|
15
|
+
end
|
16
|
+
rescue LoadError
|
17
|
+
puts "Jeweler not available. Install it with: sudo gem install jeweler"
|
18
|
+
end
|
19
|
+
|
20
|
+
require 'rake/testtask'
|
21
|
+
Rake::TestTask.new(:test) do |test|
|
22
|
+
test.libs << 'lib' << 'test'
|
23
|
+
test.pattern = 'test/**/test_*.rb'
|
24
|
+
test.verbose = false
|
25
|
+
end
|
26
|
+
|
27
|
+
task :default => :test
|
28
|
+
|
29
|
+
require 'rake/rdoctask'
|
30
|
+
Rake::RDocTask.new do |rdoc|
|
31
|
+
if File.exist?('VERSION.yml')
|
32
|
+
config = YAML.load(File.read('VERSION.yml'))
|
33
|
+
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
|
34
|
+
else
|
35
|
+
version = ""
|
36
|
+
end
|
37
|
+
|
38
|
+
rdoc.rdoc_dir = 'rdoc'
|
39
|
+
rdoc.title = "jabbot #{version}"
|
40
|
+
rdoc.rdoc_files.include('README*')
|
41
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
42
|
+
end
|
43
|
+
|
data/VERSION.yml
CHANGED
data/lib/jabbot/bot.rb
CHANGED
@@ -44,8 +44,8 @@ module Jabbot
|
|
44
44
|
elsif @mucjid.resource
|
45
45
|
raise "The MUC room must not contain a resource. Remove the slash!"
|
46
46
|
else
|
47
|
-
@jid.resource = "
|
48
|
-
@mucjid.resource =
|
47
|
+
@jid.resource = config[:resource] || "jabbot"
|
48
|
+
@mucjid.resource = config[:nick] || "jabbot"
|
49
49
|
@user << config[:nick]
|
50
50
|
end
|
51
51
|
|
data/lib/jabbot/config.rb
CHANGED
@@ -20,11 +20,14 @@ module Jabbot
|
|
20
20
|
attr_reader :settings
|
21
21
|
|
22
22
|
DEFAULT = {
|
23
|
-
:log_level =>
|
23
|
+
:log_level => 'info',
|
24
24
|
:log_file => nil,
|
25
25
|
:login => nil,
|
26
26
|
:password => nil,
|
27
|
-
:
|
27
|
+
:nick => 'jabbot',
|
28
|
+
:channel => nil,
|
29
|
+
:server => nil,
|
30
|
+
:resource => nil
|
28
31
|
}
|
29
32
|
|
30
33
|
def initialize(settings = {})
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: badboy-jabbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BadBoy_
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-04-19 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 2.10.1
|
34
34
|
version:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
36
|
+
name: jeweler
|
37
37
|
type: :development
|
38
38
|
version_requirement:
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -52,25 +52,24 @@ extra_rdoc_files:
|
|
52
52
|
- README.rdoc
|
53
53
|
files:
|
54
54
|
- README.rdoc
|
55
|
+
- Rakefile
|
55
56
|
- VERSION.yml
|
56
|
-
- lib/
|
57
|
+
- lib/hash.rb
|
58
|
+
- lib/jabbot.rb
|
59
|
+
- lib/jabbot/bot.rb
|
57
60
|
- lib/jabbot/config.rb
|
58
61
|
- lib/jabbot/handlers.rb
|
59
|
-
- lib/jabbot/message.rb
|
60
62
|
- lib/jabbot/macros.rb
|
61
|
-
- lib/jabbot/
|
62
|
-
- lib/jabbot.rb
|
63
|
-
- lib/hash.rb
|
64
|
-
- test/test_helper.rb
|
63
|
+
- lib/jabbot/message.rb
|
65
64
|
- test/test_bot.rb
|
66
|
-
- test/test_hash.rb
|
67
65
|
- test/test_config.rb
|
68
66
|
- test/test_handler.rb
|
67
|
+
- test/test_hash.rb
|
68
|
+
- test/test_helper.rb
|
69
69
|
has_rdoc: true
|
70
70
|
homepage: http://github.com/badboy/jabbot
|
71
71
|
post_install_message:
|
72
72
|
rdoc_options:
|
73
|
-
- --inline-source
|
74
73
|
- --charset=UTF-8
|
75
74
|
require_paths:
|
76
75
|
- lib
|
@@ -91,7 +90,11 @@ requirements: []
|
|
91
90
|
rubyforge_project:
|
92
91
|
rubygems_version: 1.2.0
|
93
92
|
signing_key:
|
94
|
-
specification_version:
|
93
|
+
specification_version: 3
|
95
94
|
summary: Simple framework for creating Jabber/MUC bots, inspired by Sinatra and Twibot
|
96
|
-
test_files:
|
97
|
-
|
95
|
+
test_files:
|
96
|
+
- test/test_helper.rb
|
97
|
+
- test/test_bot.rb
|
98
|
+
- test/test_hash.rb
|
99
|
+
- test/test_config.rb
|
100
|
+
- test/test_handler.rb
|