siriproxy 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/siriproxy/command_line.rb +15 -1
- data/lib/siriproxy/version.rb +1 -1
- data/siriproxy.gemspec +2 -1
- metadata +18 -2
@@ -9,6 +9,8 @@ class SiriProxy
|
|
9
9
|
end
|
10
10
|
|
11
11
|
class SiriProxy::CommandLine
|
12
|
+
$LOG_LEVEL = 0
|
13
|
+
|
12
14
|
BANNER = <<-EOS
|
13
15
|
Siri Proxy is a proxy server for Apple's Siri "assistant." The idea is to allow for the creation of custom handlers for different actions. This can allow developers to easily add functionality to Siri.
|
14
16
|
|
@@ -46,7 +48,8 @@ Options:
|
|
46
48
|
|
47
49
|
def run_console
|
48
50
|
load_code
|
49
|
-
|
51
|
+
init_plugins
|
52
|
+
|
50
53
|
# this is ugly, but works for now
|
51
54
|
SiriProxy::PluginManager.class_eval do
|
52
55
|
def respond(text, options={})
|
@@ -82,6 +85,7 @@ Options:
|
|
82
85
|
|
83
86
|
def run_server(subcommand='start')
|
84
87
|
load_code
|
88
|
+
init_plugins
|
85
89
|
start_server
|
86
90
|
# @todo: support for forking server into bg and start/stop/restart
|
87
91
|
# subcommand ||= 'start'
|
@@ -198,4 +202,14 @@ Options:
|
|
198
202
|
require 'siriproxy/plugin'
|
199
203
|
require 'siriproxy/plugin_manager'
|
200
204
|
end
|
205
|
+
|
206
|
+
def init_plugins
|
207
|
+
pManager = SiriProxy::PluginManager.new
|
208
|
+
pManager.plugins.each_with_index do |plugin, i|
|
209
|
+
if plugin.respond_to?('plugin_init')
|
210
|
+
$APP_CONFIG.plugins[i]['init'] = plugin.plugin_init
|
211
|
+
end
|
212
|
+
end
|
213
|
+
pManager = nil
|
214
|
+
end
|
201
215
|
end
|
data/lib/siriproxy/version.rb
CHANGED
data/siriproxy.gemspec
CHANGED
@@ -24,5 +24,6 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.add_runtime_dependency "eventmachine"
|
25
25
|
s.add_runtime_dependency "uuidtools"
|
26
26
|
s.add_runtime_dependency "cora", ">=0.0.4"
|
27
|
-
s.
|
27
|
+
s.add_runtime_dependency "bundler"
|
28
|
+
s.add_runtime_dependency "rake"
|
28
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: siriproxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -77,6 +77,22 @@ dependencies:
|
|
77
77
|
- - ! '>='
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: 0.0.4
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: bundler
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
type: :runtime
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
80
96
|
- !ruby/object:Gem::Dependency
|
81
97
|
name: rake
|
82
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -85,7 +101,7 @@ dependencies:
|
|
85
101
|
- - ! '>='
|
86
102
|
- !ruby/object:Gem::Version
|
87
103
|
version: '0'
|
88
|
-
type: :
|
104
|
+
type: :runtime
|
89
105
|
prerelease: false
|
90
106
|
version_requirements: !ruby/object:Gem::Requirement
|
91
107
|
none: false
|