mojodna-switchboard 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/switchboard/commands/pep/location.rb +6 -8
- data/lib/switchboard/commands/pep/tune.rb +2 -3
- data/lib/switchboard/core.rb +7 -5
- data/lib/switchboard/helpers/oauth_pubsub.rb +8 -3
- data/lib/switchboard/settings.rb +2 -0
- data/lib/switchboard/switchboard.rb +0 -1
- data/lib/switchboard/version.rb +1 -1
- data/switchboard.gemspec +2 -2
- metadata +2 -4
- data/lib/switchboard/oauth/request_proxy/mock_request.rb +0 -21
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'rubygems'
|
2
1
|
require 'xmpp4r/location'
|
3
2
|
|
4
3
|
module Switchboard
|
@@ -11,8 +10,8 @@ module Switchboard
|
|
11
10
|
begin
|
12
11
|
require 'fire_hydrant'
|
13
12
|
rescue LoadError => e
|
14
|
-
|
15
|
-
puts "
|
13
|
+
lib = e.message.split("--").last.strip
|
14
|
+
puts "#{lib} is required for this command to work."
|
16
15
|
exit 1
|
17
16
|
end
|
18
17
|
|
@@ -27,15 +26,14 @@ module Switchboard
|
|
27
26
|
end
|
28
27
|
|
29
28
|
switchboard.on_location_update do |user|
|
30
|
-
|
31
|
-
|
32
|
-
timestamp = Time.parse(user.locations[0].instance_eval { @doc.at("//located-at").innerText })
|
29
|
+
name = user.locations.first
|
30
|
+
timestamp = user.locations.first.located_at
|
33
31
|
|
34
32
|
area, postalcode, locality, region, country = nil
|
35
33
|
|
36
34
|
user.locations.each do |loc|
|
37
|
-
level = loc.
|
38
|
-
normal_name = loc.
|
35
|
+
level = loc.level_name
|
36
|
+
normal_name = loc.normal_name
|
39
37
|
case level
|
40
38
|
when "exact"
|
41
39
|
street = normal_name
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'rubygems'
|
2
1
|
require 'xmpp4r/tune'
|
3
2
|
|
4
3
|
module Switchboard
|
@@ -11,8 +10,8 @@ module Switchboard
|
|
11
10
|
begin
|
12
11
|
require 'appscript'
|
13
12
|
rescue LoadError => e
|
14
|
-
|
15
|
-
puts "
|
13
|
+
lib = e.message.split("--").last.strip
|
14
|
+
puts "#{lib} is required for this command to work."
|
16
15
|
exit 1
|
17
16
|
end
|
18
17
|
|
data/lib/switchboard/core.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
require 'rubygems'
|
2
1
|
begin
|
3
2
|
require 'xmpp4r'
|
4
3
|
rescue LoadError => e
|
5
|
-
|
6
|
-
puts "
|
4
|
+
lib = e.message.split("--").last.strip
|
5
|
+
puts "#{lib} is required."
|
7
6
|
exit 1
|
8
7
|
end
|
9
8
|
|
@@ -150,8 +149,11 @@ module Switchboard
|
|
150
149
|
|
151
150
|
shutdown!
|
152
151
|
|
153
|
-
|
154
|
-
|
152
|
+
if Thread.current != @main_thread
|
153
|
+
timeout(15) do
|
154
|
+
puts "Waiting for shutdown to complete."
|
155
|
+
sleep 0.1 until shutdown_complete?
|
156
|
+
end
|
155
157
|
end
|
156
158
|
|
157
159
|
rescue Timeout::Error
|
@@ -1,9 +1,14 @@
|
|
1
|
-
require 'rubygems'
|
2
1
|
begin
|
3
2
|
require 'oauth'
|
4
3
|
rescue LoadError => e
|
5
|
-
|
6
|
-
puts "
|
4
|
+
lib = e.message.split("--").last.strip
|
5
|
+
puts "#{lib} is required."
|
6
|
+
exit 1
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'oauth/version'
|
10
|
+
if OAuth::VERSION < "0.3.1.1"
|
11
|
+
puts "The OAuth library must be at least version 0.3.1.1."
|
7
12
|
exit 1
|
8
13
|
end
|
9
14
|
|
data/lib/switchboard/settings.rb
CHANGED
data/lib/switchboard/version.rb
CHANGED
data/switchboard.gemspec
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# this file is automatically generated
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = "switchboard"
|
4
|
-
s.version = "0.0.
|
4
|
+
s.version = "0.0.11"
|
5
5
|
s.summary = "XMPP toolkit."
|
6
6
|
s.description = "A toolkit for assembling XMPP clients and interacting with XMPP servers."
|
7
7
|
s.authors = ["Seth Fitzsimmons"]
|
8
8
|
s.email = ["seth@mojodna.net"]
|
9
9
|
|
10
|
-
s.files = ["bin/switchboard", "examples/election_results.rb", "lib/switchboard/client.rb", "lib/switchboard/colors.rb", "lib/switchboard/commands/command.rb", "lib/switchboard/commands/config/config.rb", "lib/switchboard/commands/config.rb", "lib/switchboard/commands/default.rb", "lib/switchboard/commands/disco/disco.rb", "lib/switchboard/commands/disco/info.rb", "lib/switchboard/commands/disco/items.rb", "lib/switchboard/commands/disco.rb", "lib/switchboard/commands/help/help.rb", "lib/switchboard/commands/help.rb", "lib/switchboard/commands/last/last.rb", "lib/switchboard/commands/last.rb", "lib/switchboard/commands/pep/location.rb", "lib/switchboard/commands/pep/pep.rb", "lib/switchboard/commands/pep/tune.rb", "lib/switchboard/commands/pep.rb", "lib/switchboard/commands/pubsub/affiliations.rb", "lib/switchboard/commands/pubsub/config.rb", "lib/switchboard/commands/pubsub/create.rb", "lib/switchboard/commands/pubsub/delete.rb", "lib/switchboard/commands/pubsub/info.rb", "lib/switchboard/commands/pubsub/items.rb", "lib/switchboard/commands/pubsub/listen.rb", "lib/switchboard/commands/pubsub/nodes.rb", "lib/switchboard/commands/pubsub/options.rb", "lib/switchboard/commands/pubsub/publish.rb", "lib/switchboard/commands/pubsub/pubsub.rb", "lib/switchboard/commands/pubsub/purge.rb", "lib/switchboard/commands/pubsub/retract.rb", "lib/switchboard/commands/pubsub/subscribe.rb", "lib/switchboard/commands/pubsub/subscriptions.rb", "lib/switchboard/commands/pubsub/unsubscribe.rb", "lib/switchboard/commands/pubsub.rb", "lib/switchboard/commands/register.rb", "lib/switchboard/commands/roster/add.rb", "lib/switchboard/commands/roster/list.rb", "lib/switchboard/commands/roster/online.rb", "lib/switchboard/commands/roster/remove.rb", "lib/switchboard/commands/roster/roster.rb", "lib/switchboard/commands/roster.rb", "lib/switchboard/commands/unregister.rb", "lib/switchboard/commands.rb", "lib/switchboard/component.rb", "lib/switchboard/core.rb", "lib/switchboard/ext/delegate.rb", "lib/switchboard/ext/instance_exec.rb", "lib/switchboard/helpers/oauth_pubsub.rb", "lib/switchboard/helpers/pubsub.rb", "lib/switchboard/jacks/auto_accept.rb", "lib/switchboard/jacks/debug.rb", "lib/switchboard/jacks/notify.rb", "lib/switchboard/jacks/oauth_pubsub.rb", "lib/switchboard/jacks/pubsub.rb", "lib/switchboard/jacks/roster_debug.rb", "lib/switchboard/jacks.rb", "lib/switchboard/
|
10
|
+
s.files = ["bin/switchboard", "examples/election_results.rb", "lib/switchboard/client.rb", "lib/switchboard/colors.rb", "lib/switchboard/commands/command.rb", "lib/switchboard/commands/config/config.rb", "lib/switchboard/commands/config.rb", "lib/switchboard/commands/default.rb", "lib/switchboard/commands/disco/disco.rb", "lib/switchboard/commands/disco/info.rb", "lib/switchboard/commands/disco/items.rb", "lib/switchboard/commands/disco.rb", "lib/switchboard/commands/help/help.rb", "lib/switchboard/commands/help.rb", "lib/switchboard/commands/last/last.rb", "lib/switchboard/commands/last.rb", "lib/switchboard/commands/pep/location.rb", "lib/switchboard/commands/pep/pep.rb", "lib/switchboard/commands/pep/tune.rb", "lib/switchboard/commands/pep.rb", "lib/switchboard/commands/pubsub/affiliations.rb", "lib/switchboard/commands/pubsub/config.rb", "lib/switchboard/commands/pubsub/create.rb", "lib/switchboard/commands/pubsub/delete.rb", "lib/switchboard/commands/pubsub/info.rb", "lib/switchboard/commands/pubsub/items.rb", "lib/switchboard/commands/pubsub/listen.rb", "lib/switchboard/commands/pubsub/nodes.rb", "lib/switchboard/commands/pubsub/options.rb", "lib/switchboard/commands/pubsub/publish.rb", "lib/switchboard/commands/pubsub/pubsub.rb", "lib/switchboard/commands/pubsub/purge.rb", "lib/switchboard/commands/pubsub/retract.rb", "lib/switchboard/commands/pubsub/subscribe.rb", "lib/switchboard/commands/pubsub/subscriptions.rb", "lib/switchboard/commands/pubsub/unsubscribe.rb", "lib/switchboard/commands/pubsub.rb", "lib/switchboard/commands/register.rb", "lib/switchboard/commands/roster/add.rb", "lib/switchboard/commands/roster/list.rb", "lib/switchboard/commands/roster/online.rb", "lib/switchboard/commands/roster/remove.rb", "lib/switchboard/commands/roster/roster.rb", "lib/switchboard/commands/roster.rb", "lib/switchboard/commands/unregister.rb", "lib/switchboard/commands.rb", "lib/switchboard/component.rb", "lib/switchboard/core.rb", "lib/switchboard/ext/delegate.rb", "lib/switchboard/ext/instance_exec.rb", "lib/switchboard/helpers/oauth_pubsub.rb", "lib/switchboard/helpers/pubsub.rb", "lib/switchboard/jacks/auto_accept.rb", "lib/switchboard/jacks/debug.rb", "lib/switchboard/jacks/notify.rb", "lib/switchboard/jacks/oauth_pubsub.rb", "lib/switchboard/jacks/pubsub.rb", "lib/switchboard/jacks/roster_debug.rb", "lib/switchboard/jacks.rb", "lib/switchboard/settings.rb", "lib/switchboard/switchboard.rb", "lib/switchboard/version.rb", "lib/switchboard/xmpp4r/location/helper/helper.rb", "lib/switchboard/xmpp4r/location/location.rb", "lib/switchboard/xmpp4r/location.rb", "lib/switchboard/xmpp4r/pubsub/helper/oauth_service_helper.rb", "lib/switchboard.rb", "Rakefile", "README.markdown", "switchboard.gemspec"]
|
11
11
|
s.executables = ["switchboard"]
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mojodna-switchboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Fitzsimmons
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-02-03 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -93,7 +93,6 @@ files:
|
|
93
93
|
- lib/switchboard/jacks/pubsub.rb
|
94
94
|
- lib/switchboard/jacks/roster_debug.rb
|
95
95
|
- lib/switchboard/jacks.rb
|
96
|
-
- lib/switchboard/oauth/request_proxy/mock_request.rb
|
97
96
|
- lib/switchboard/settings.rb
|
98
97
|
- lib/switchboard/switchboard.rb
|
99
98
|
- lib/switchboard/version.rb
|
@@ -104,7 +103,6 @@ files:
|
|
104
103
|
- lib/switchboard.rb
|
105
104
|
- Rakefile
|
106
105
|
- README.markdown
|
107
|
-
- switchboard-0.0.8.gem
|
108
106
|
- switchboard.gemspec
|
109
107
|
has_rdoc: false
|
110
108
|
homepage:
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'oauth/request_proxy/base'
|
2
|
-
|
3
|
-
module OAuth
|
4
|
-
module RequestProxy
|
5
|
-
class MockRequest < OAuth::RequestProxy::Base
|
6
|
-
proxies Hash
|
7
|
-
|
8
|
-
def parameters
|
9
|
-
@request["parameters"]
|
10
|
-
end
|
11
|
-
|
12
|
-
def method
|
13
|
-
@request["method"]
|
14
|
-
end
|
15
|
-
|
16
|
-
def uri
|
17
|
-
@request["uri"]
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|