cinch-cleverbot 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 +1 -0
- data/Gemfile +3 -0
- data/README.md +40 -0
- data/cinch-cleverbot.gemspec +18 -0
- data/lib/cinch/plugins/cleverbot.rb +25 -0
- metadata +82 -0
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.gem
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# Cinch-CleverBot
|
2
|
+
|
3
|
+
## Description
|
4
|
+
|
5
|
+
This very simple bot that gives Cinch IRC bots ability to respond as CleverBot when directly asked a question.
|
6
|
+
|
7
|
+
<user> MyBot: Hello, how are you?
|
8
|
+
<MyBot> user: Good you?
|
9
|
+
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
### RubyGems
|
14
|
+
|
15
|
+
You can install the latest Cinch-CleverBot gem using RubyGems
|
16
|
+
|
17
|
+
gem install cinch-cleverbot
|
18
|
+
|
19
|
+
### GitHub
|
20
|
+
|
21
|
+
Alternatively you can check out the latest code directly from Github
|
22
|
+
|
23
|
+
git clone http://github.com/caitlin/cinch-cleverbot.git
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
Install the gem and load it in your Cinch bot:
|
28
|
+
|
29
|
+
require "cinch"
|
30
|
+
require "cinch/plugins/cleverbot"
|
31
|
+
|
32
|
+
bot = Cinch::Bot.new do
|
33
|
+
configure do |c|
|
34
|
+
# add all required options here
|
35
|
+
c.plugins.plugins = [Cinch::Plugins::CleverBot] # optionally add more plugins
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
bot.start
|
40
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = "cinch-cleverbot"
|
5
|
+
s.version = "0.1"
|
6
|
+
s.platform = Gem::Platform::RUBY
|
7
|
+
s.authors = ["Caitlin Woodward"]
|
8
|
+
s.email = ["caitlin@caitlinwoodward.me"]
|
9
|
+
s.homepage = "https://github.com/caitlin/cinch-cleverbot"
|
10
|
+
s.summary = %q{Gives Cinch IRC bots ability to respond as CleverBot}
|
11
|
+
s.description = %q{Gives Cinch IRC bots ability to respond as CleverBot}
|
12
|
+
|
13
|
+
s.add_dependency("cinch", "~> 2.0.3")
|
14
|
+
s.add_dependency("cleverbot", "~> 0.1.1")
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'cinch'
|
2
|
+
|
3
|
+
module Cinch
|
4
|
+
module Plugins
|
5
|
+
require 'cleverbot'
|
6
|
+
|
7
|
+
class CleverBot
|
8
|
+
include Cinch::Plugin
|
9
|
+
|
10
|
+
match lambda { |m| /^#{m.bot.nick}: (.+)/i }, use_prefix: false
|
11
|
+
|
12
|
+
def initialize(*args)
|
13
|
+
super
|
14
|
+
|
15
|
+
@cleverbot = Cleverbot::Client.new
|
16
|
+
end
|
17
|
+
|
18
|
+
def execute(m, message)
|
19
|
+
msg_back = @cleverbot.write message
|
20
|
+
m.reply msg_back, true
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cinch-cleverbot
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.1'
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Caitlin Woodward
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-09-26 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: cinch
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 2.0.3
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 2.0.3
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: cleverbot
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 0.1.1
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.1.1
|
46
|
+
description: Gives Cinch IRC bots ability to respond as CleverBot
|
47
|
+
email:
|
48
|
+
- caitlin@caitlinwoodward.me
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- .gitignore
|
54
|
+
- Gemfile
|
55
|
+
- README.md
|
56
|
+
- cinch-cleverbot.gemspec
|
57
|
+
- lib/cinch/plugins/cleverbot.rb
|
58
|
+
homepage: https://github.com/caitlin/cinch-cleverbot
|
59
|
+
licenses: []
|
60
|
+
post_install_message:
|
61
|
+
rdoc_options: []
|
62
|
+
require_paths:
|
63
|
+
- lib
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
requirements: []
|
77
|
+
rubyforge_project:
|
78
|
+
rubygems_version: 1.8.24
|
79
|
+
signing_key:
|
80
|
+
specification_version: 3
|
81
|
+
summary: Gives Cinch IRC bots ability to respond as CleverBot
|
82
|
+
test_files: []
|