Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ponyboy47 committed Jan 27, 2012
0 parents commit 6dd3d08
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
*.gem
.bundle
Gemfile.lock
pkg/*
4 changes: 4 additions & 0 deletions Gemfile
@@ -0,0 +1,4 @@
source "http://rubygems.org"

# Specify your gem's dependencies in siriproxy-example.gemspec
gemspec
3 changes: 3 additions & 0 deletions README
@@ -0,0 +1,3 @@
This plugin is pretty simple and easy to use. Add the appropriate settings from the config-info.yml into your ~/.siriproxy/config.yml and bundle then start SiriProxy.
To start talking to Cleverbot just say "Talk to/with Cleverbot". Response is a little slow...it does have to post everything you say to the internet and then wait for Cleverbot to respond and then retrieve Cleverbot's response...so be patient.
To stop talking to Cleverbot all you do is say "Goodbye" for your next response.
1 change: 1 addition & 0 deletions Rakefile
@@ -0,0 +1 @@
require "bundler/gem_tasks"
10 changes: 10 additions & 0 deletions config-info.yml
@@ -0,0 +1,10 @@
# Example configuration options that can be placed in your main SiriProxy config.yml

############################################
# NOTICE: Modifying these options in this
# file has no effect. You must put
# them in SiriProxy's ~/.siriproxy/config.yml
############################################

- name: 'Cleverbot'
git: 'git://github.com/Ponyboy47/siriproxy-cleverbot.git'
21 changes: 21 additions & 0 deletions lib/siriproxy-cleverbot.rb
@@ -0,0 +1,21 @@
require 'cora'
require 'siri_objects'
require 'cleverbot'

#######
# Remember to add other plugins to the "config.yml" file if you create them!
######

class SiriProxy::Plugin::Cleverbot < SiriProxy::Plugin
def initialize(config)
end
listen_for /Talk (to|with) Clever bot/i do
hResponse = ask "What would you like to say to Cleverbot?"
until hResponse =~ /Goodbye/i do
@cleverbot = ::Cleverbot::Client.write hResponse
hResponse = ask "#{@cleverbot['message']}"
end
say "Goodbye then.."
request_completed
end
end
24 changes: 24 additions & 0 deletions siriproxy-cleverbot.gemspec
@@ -0,0 +1,24 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)

Gem::Specification.new do |s|
s.name = "siriproxy-cleverbot"
s.version = "0.0.1"
s.authors = ["Ponyboy47"]
s.email = ["ponyboy47@gmail.com"]
s.homepage = ""
s.summary = %q{Cleverbot Client}
s.description = %q{Talk to Cleverbot through Siri rather than having to type out everything}

s.rubyforge_project = "siriproxy-cleverbot"

s.files = `git ls-files 2> /dev/null`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/* 2> /dev/null`.split("\n")
s.executables = `git ls-files -- bin/* 2> /dev/null`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

# specify any dependencies here; for example:
# s.add_development_dependency "rspec"
# s.add_runtime_dependency "rest-client"
s.add_runtime_dependency "cleverbot"
end

0 comments on commit 6dd3d08

Please sign in to comment.