Skip to content
This repository was archived by the owner on Jan 28, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .rvmrc

This file was deleted.

28 changes: 28 additions & 0 deletions lib/siriproxy/command_line.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,34 @@ def initialize
end
end

def run(input)
load_code
init_plugins
# this is ugly, but works for now
SiriProxy::PluginManager.class_eval do
def respond(text, options={})
@response = text
end
def process(text)
super(text)
end
def send_request_complete_to_iphone
end
def no_matches
@response = "No plugin responded"
end
end
SiriProxy::Plugin.class_eval do
def last_ref_id
0
end
end

cora = SiriProxy::PluginManager.new
cora.process(input)
return cora.response
end

def run_console
load_code
init_plugins
Expand Down
2 changes: 1 addition & 1 deletion lib/siriproxy/plugin_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'pp'

class SiriProxy::PluginManager < Cora
attr_accessor :plugins, :iphone_conn, :guzzoni_conn
attr_accessor :plugins, :iphone_conn, :guzzoni_conn, :response

def initialize()
load_plugins()
Expand Down
2 changes: 1 addition & 1 deletion lib/siriproxy/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class SiriProxy
VERSION = "0.5.4"
VERSION = "0.5.5"
end