twssbot 0.0.1
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.
- data/.gitignore +2 -0
- data/README.markdown +25 -0
- data/Rakefile +40 -0
- data/bin/twssbot +46 -0
- data/twssbot.gemspec +53 -0
- metadata +118 -0
data/.gitignore
ADDED
data/README.markdown
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
twssbot
|
2
|
+
=======
|
3
|
+
|
4
|
+
A "That's what she said" IRCbot powered by the [twss gem][0].
|
5
|
+
|
6
|
+
|
7
|
+
Installation
|
8
|
+
------------
|
9
|
+
|
10
|
+
gem install twssbot
|
11
|
+
|
12
|
+
|
13
|
+
Usage
|
14
|
+
-----
|
15
|
+
|
16
|
+
twssbot server:port #channel [twss threshold]
|
17
|
+
|
18
|
+
|
19
|
+
You can read about what the "twss threshold" is on thw [twss][0] page.
|
20
|
+
|
21
|
+
That's pretty much it.
|
22
|
+
|
23
|
+
Have fun!
|
24
|
+
|
25
|
+
[0]: http://github.com/bvandenbos/twss
|
data/Rakefile
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
|
2
|
+
desc "Build a gem"
|
3
|
+
task :gem => [ :gemspec, :build ]
|
4
|
+
|
5
|
+
Version = '0.0.1'
|
6
|
+
|
7
|
+
begin
|
8
|
+
begin
|
9
|
+
require 'jeweler'
|
10
|
+
rescue LoadError
|
11
|
+
puts "Jeweler not available. Install it with: "
|
12
|
+
puts "gem install jeweler"
|
13
|
+
end
|
14
|
+
|
15
|
+
Jeweler::Tasks.new do |gemspec|
|
16
|
+
gemspec.name = "twssbot"
|
17
|
+
gemspec.summary = "A that's-what-she-said IRCbot"
|
18
|
+
gemspec.description = %{An IRCbot that makes "That's what she said jokes".
|
19
|
+
Powered by the twss gem.}
|
20
|
+
gemspec.email = "bvandenbos@gmail.com"
|
21
|
+
gemspec.homepage = "http://github.com/bvandenbos/twssbot"
|
22
|
+
gemspec.authors = ["Ben VandenBos"]
|
23
|
+
gemspec.version = Version
|
24
|
+
|
25
|
+
gemspec.add_dependency "twss", ">= 0.0.1"
|
26
|
+
gemspec.add_dependency "isaac", ">= 0.2.6"
|
27
|
+
|
28
|
+
gemspec.add_development_dependency "jeweler"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
desc "Push a new version to Gemcutter"
|
34
|
+
task :publish => [ :gemspec, :build ] do
|
35
|
+
system "git tag v#{Version}"
|
36
|
+
system "git push origin v#{Version}"
|
37
|
+
system "git push origin master"
|
38
|
+
system "gem push pkg/twssbot-#{Version}.gem"
|
39
|
+
system "git clean -fd"
|
40
|
+
end
|
data/bin/twssbot
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
if ARGV.empty?
|
4
|
+
puts %{
|
5
|
+
Useage:
|
6
|
+
|
7
|
+
twssbot server:port #channel [twss threshold]
|
8
|
+
|
9
|
+
Note: You might have to quote the channel like so: "#somechannel"
|
10
|
+
}
|
11
|
+
exit 1
|
12
|
+
end
|
13
|
+
|
14
|
+
require 'rubygems'
|
15
|
+
require 'isaac/bot'
|
16
|
+
require 'twss'
|
17
|
+
|
18
|
+
host = ARGV[0]
|
19
|
+
channel_to_join = ARGV[1]
|
20
|
+
threshold = ARGV[2]
|
21
|
+
|
22
|
+
TWSS.threshold = threshold.to_f if threshold
|
23
|
+
puts "TWSS Threshold: #{TWSS.threshold}"
|
24
|
+
|
25
|
+
twssbot = Isaac::Bot.new do
|
26
|
+
|
27
|
+
configure do |c|
|
28
|
+
c.nick = "twssbot"
|
29
|
+
c.server = host.split(':')[0]
|
30
|
+
c.port = (host.split(':')[1] || '6667').to_i
|
31
|
+
end
|
32
|
+
|
33
|
+
on :connect do
|
34
|
+
puts "joining #{channel_to_join}"
|
35
|
+
join channel_to_join
|
36
|
+
end
|
37
|
+
|
38
|
+
on :channel do
|
39
|
+
if TWSS(message)
|
40
|
+
msg channel, "That's what she said!"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
twssbot.start
|
data/twssbot.gemspec
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{twssbot}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Ben VandenBos"]
|
12
|
+
s.date = %q{2010-08-07}
|
13
|
+
s.default_executable = %q{twssbot}
|
14
|
+
s.description = %q{An IRCbot that makes "That's what she said jokes".
|
15
|
+
Powered by the twss gem.}
|
16
|
+
s.email = %q{bvandenbos@gmail.com}
|
17
|
+
s.executables = ["twssbot"]
|
18
|
+
s.extra_rdoc_files = [
|
19
|
+
"README.markdown"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".gitignore",
|
23
|
+
"README.markdown",
|
24
|
+
"Rakefile",
|
25
|
+
"bin/twssbot",
|
26
|
+
"twssbot.gemspec"
|
27
|
+
]
|
28
|
+
s.homepage = %q{http://github.com/bvandenbos/twssbot}
|
29
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
30
|
+
s.require_paths = ["lib"]
|
31
|
+
s.rubygems_version = %q{1.3.7}
|
32
|
+
s.summary = %q{A that's-what-she-said IRCbot}
|
33
|
+
|
34
|
+
if s.respond_to? :specification_version then
|
35
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
36
|
+
s.specification_version = 3
|
37
|
+
|
38
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
39
|
+
s.add_runtime_dependency(%q<twss>, [">= 0.0.1"])
|
40
|
+
s.add_runtime_dependency(%q<isaac>, [">= 0.2.6"])
|
41
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
42
|
+
else
|
43
|
+
s.add_dependency(%q<twss>, [">= 0.0.1"])
|
44
|
+
s.add_dependency(%q<isaac>, [">= 0.2.6"])
|
45
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
46
|
+
end
|
47
|
+
else
|
48
|
+
s.add_dependency(%q<twss>, [">= 0.0.1"])
|
49
|
+
s.add_dependency(%q<isaac>, [">= 0.2.6"])
|
50
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
metadata
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: twssbot
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Ben VandenBos
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-08-07 00:00:00 -07:00
|
19
|
+
default_executable: twssbot
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: twss
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 29
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 0
|
33
|
+
- 1
|
34
|
+
version: 0.0.1
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: isaac
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 27
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
- 2
|
49
|
+
- 6
|
50
|
+
version: 0.2.6
|
51
|
+
type: :runtime
|
52
|
+
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: jeweler
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 3
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
version: "0"
|
65
|
+
type: :development
|
66
|
+
version_requirements: *id003
|
67
|
+
description: |-
|
68
|
+
An IRCbot that makes "That's what she said jokes".
|
69
|
+
Powered by the twss gem.
|
70
|
+
email: bvandenbos@gmail.com
|
71
|
+
executables:
|
72
|
+
- twssbot
|
73
|
+
extensions: []
|
74
|
+
|
75
|
+
extra_rdoc_files:
|
76
|
+
- README.markdown
|
77
|
+
files:
|
78
|
+
- .gitignore
|
79
|
+
- README.markdown
|
80
|
+
- Rakefile
|
81
|
+
- bin/twssbot
|
82
|
+
- twssbot.gemspec
|
83
|
+
has_rdoc: true
|
84
|
+
homepage: http://github.com/bvandenbos/twssbot
|
85
|
+
licenses: []
|
86
|
+
|
87
|
+
post_install_message:
|
88
|
+
rdoc_options:
|
89
|
+
- --charset=UTF-8
|
90
|
+
require_paths:
|
91
|
+
- lib
|
92
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
hash: 3
|
98
|
+
segments:
|
99
|
+
- 0
|
100
|
+
version: "0"
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
none: false
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
hash: 3
|
107
|
+
segments:
|
108
|
+
- 0
|
109
|
+
version: "0"
|
110
|
+
requirements: []
|
111
|
+
|
112
|
+
rubyforge_project:
|
113
|
+
rubygems_version: 1.3.7
|
114
|
+
signing_key:
|
115
|
+
specification_version: 3
|
116
|
+
summary: A that's-what-she-said IRCbot
|
117
|
+
test_files: []
|
118
|
+
|