<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -9,6 +9,12 @@ Install it:
 
     $ sudo gem install mojodna-switchboard -s http://gems.github.com
 
+Install optional dependencies for additional functionality:
+
+    $ sudo gem install oauth # (for OAuth PubSub support)
+    $ sudo gem install fire-hydrant # (for User Location support)
+    $ sudo gem install rb-appscript # (for User Tune support)
+
 Configure it:
 
     $ switchboard config jid jid@example.com</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,7 @@ require File.join(&quot;lib&quot;, &quot;switchboard&quot;, &quot;version&quot;)
 desc &quot;Generate the gemspec&quot;
 task :gemspec do
   gemspec =&lt;&lt;-EOF
+# this file is automatically generated
 Gem::Specification.new do |s|
   s.name = &quot;switchboard&quot;
   s.version = &quot;#{Switchboard::VERSION * &quot;.&quot;}&quot;
@@ -16,9 +17,6 @@ Gem::Specification.new do |s|
   s.require_paths = [&quot;lib&quot;]
 
   s.add_dependency(&quot;xmpp4r&quot;)
-  s.add_dependency(&quot;oauth&quot;)
-  s.add_dependency(&quot;rb-appscript&quot;)
-
 end
   EOF
 </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,4 @@
-begin
-  require 'fire_hydrant'
-rescue LoadError =&gt; e
-  gem = e.message.split(&quot;--&quot;).last.strip
-  puts &quot;The #{gem} gem is required.&quot;
-  exit 1
-end
-
+require 'rubygems'
 require 'xmpp4r/location'
 
 module Switchboard
@@ -15,6 +8,14 @@ module Switchboard
         description &quot;Broadcasting UserLocation (XEP-0080)&quot;
 
         def self.run!
+          begin
+            require 'fire_hydrant'
+          rescue LoadError =&gt; e
+            gem = e.message.split(&quot;--&quot;).last.strip
+            puts &quot;The #{gem} gem is required for this command to work.&quot;
+            exit 1
+          end
+
           switchboard = Switchboard::Client.new
           switchboard.plug!(AutoAcceptJack, FireEagleJack)
 </diff>
      <filename>lib/switchboard/commands/pep/location.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,4 @@
-begin
-  require 'appscript'
-rescue LoadError =&gt; e
-  gem = e.message.split(&quot;--&quot;).last.strip
-  puts &quot;The #{gem} gem is required.&quot;
-  exit 1
-end
+require 'rubygems'
 require 'xmpp4r/tune'
 
 module Switchboard
@@ -14,6 +8,14 @@ module Switchboard
         description &quot;Broadcasting UserTune (XEP-0118)&quot;
 
         def self.run!
+          begin
+            require 'appscript'
+          rescue LoadError =&gt; e
+            gem = e.message.split(&quot;--&quot;).last.strip
+            puts &quot;The #{gem} gem is required for this command to work.&quot;
+            exit 1
+          end
+
           switchboard = Switchboard::Client.new do
             @tune_helper = Jabber::UserTune::Helper.new(client, nil)
 </diff>
      <filename>lib/switchboard/commands/pep/tune.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ module Switchboard
             end
           end
 
-          if OPTIONS[&quot;oauth&quot;]
+          if defined?(OAuth) &amp;&amp; OPTIONS[&quot;oauth&quot;]
             switchboard.plug!(OAuthPubSubJack)
           else
             switchboard.plug!(PubSubJack)</diff>
      <filename>lib/switchboard/commands/pubsub/affiliations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,7 +29,7 @@ module Switchboard
             end
           end
 
-          if OPTIONS[&quot;oauth&quot;]
+          if defined?(OAuth) &amp;&amp; OPTIONS[&quot;oauth&quot;]
             switchboard.plug!(OAuthPubSubJack)
           else
             switchboard.plug!(PubSubJack)</diff>
      <filename>lib/switchboard/commands/pubsub/config.rb</filename>
    </modified>
    <modified>
      <diff>@@ -28,7 +28,7 @@ module Switchboard
             end
           end
 
-          if OPTIONS[&quot;oauth&quot;]
+          if defined?(OAuth) &amp;&amp; OPTIONS[&quot;oauth&quot;]
             switchboard.plug!(OAuthPubSubJack)
           else
             switchboard.plug!(PubSubJack)</diff>
      <filename>lib/switchboard/commands/pubsub/create.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,7 @@ module Switchboard
             end
           end
 
-          if OPTIONS[&quot;oauth&quot;]
+          if defined?(OAuth) &amp;&amp; OPTIONS[&quot;oauth&quot;]
             switchboard.plug!(OAuthPubSubJack)
           else
             switchboard.plug!(PubSubJack)</diff>
      <filename>lib/switchboard/commands/pubsub/delete.rb</filename>
    </modified>
    <modified>
      <diff>@@ -35,7 +35,7 @@ module Switchboard
             end
           end
 
-          if OPTIONS[&quot;oauth&quot;]
+          if defined?(OAuth) &amp;&amp; OPTIONS[&quot;oauth&quot;]
             switchboard.plug!(OAuthPubSubJack)
           else
             switchboard.plug!(PubSubJack)</diff>
      <filename>lib/switchboard/commands/pubsub/info.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@ module Switchboard
             end
           end
 
-          if OPTIONS[&quot;oauth&quot;]
+          if defined?(OAuth) &amp;&amp; OPTIONS[&quot;oauth&quot;]
             switchboard.plug!(OAuthPubSubJack)
           else
             switchboard.plug!(PubSubJack)</diff>
      <filename>lib/switchboard/commands/pubsub/items.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@ module Switchboard
             end
           end
 
-          if OPTIONS[&quot;oauth&quot;]
+          if defined?(OAuth) &amp;&amp; OPTIONS[&quot;oauth&quot;]
             switchboard.plug!(OAuthPubSubJack)
           else
             switchboard.plug!(PubSubJack)</diff>
      <filename>lib/switchboard/commands/pubsub/nodes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@ module Switchboard
             end
           end
 
-          if OPTIONS[&quot;oauth&quot;]
+          if defined?(OAuth) &amp;&amp; OPTIONS[&quot;oauth&quot;]
             switchboard.plug!(OAuthPubSubJack)
           else
             switchboard.plug!(PubSubJack)</diff>
      <filename>lib/switchboard/commands/pubsub/options.rb</filename>
    </modified>
    <modified>
      <diff>@@ -30,7 +30,7 @@ module Switchboard
             end
           end
 
-          if OPTIONS[&quot;oauth&quot;]
+          if defined?(OAuth) &amp;&amp; OPTIONS[&quot;oauth&quot;]
             switchboard.plug!(OAuthPubSubJack)
           else
             switchboard.plug!(PubSubJack)</diff>
      <filename>lib/switchboard/commands/pubsub/publish.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,11 +11,13 @@ module Switchboard
         super(opts)
         opts.on(&quot;--node=node&quot;, String, &quot;Specifies the PubSub node to use.&quot;) { |v| OPTIONS[&quot;pubsub.node&quot;] = v }
         opts.on(&quot;--server=server&quot;, String, &quot;Specifies the PubSub server to use.&quot;) { |v| OPTIONS[&quot;pubsub.server&quot;] = v }
-        opts.on(&quot;--oauth&quot;, &quot;Sign requests using OAuth.&quot;) { OPTIONS[&quot;oauth&quot;] = true }
-        opts.on(&quot;--oauth-consumer-key=key&quot;, String, &quot;Specifies the OAuth consumer key to use.&quot;) { |v| OPTIONS[&quot;oauth.consumer_key&quot;] = v }
-        opts.on(&quot;--oauth-consumer-secret=secret&quot;, String, &quot;Specifies the OAuth consumer secret to use.&quot;) { |v| OPTIONS[&quot;oauth.consumer_secret&quot;] = v }
-        opts.on(&quot;--oauth-token =oken&quot;, String, &quot;Specifies the OAuth token to use.&quot;) { |v| OPTIONS[&quot;oauth.token&quot;] = v }
-        opts.on(&quot;--oauth-token-secret=secret&quot;, String, &quot;Specifies the OAuth token secret to use.&quot;) { |v| OPTIONS[&quot;oauth.token_secret&quot;] = v }
+        if defined?(OAuth)
+          opts.on(&quot;--oauth&quot;, &quot;Sign requests using OAuth.&quot;) { OPTIONS[&quot;oauth&quot;] = true }
+          opts.on(&quot;--oauth-consumer-key=key&quot;, String, &quot;Specifies the OAuth consumer key to use.&quot;) { |v| OPTIONS[&quot;oauth.consumer_key&quot;] = v }
+          opts.on(&quot;--oauth-consumer-secret=secret&quot;, String, &quot;Specifies the OAuth consumer secret to use.&quot;) { |v| OPTIONS[&quot;oauth.consumer_secret&quot;] = v }
+          opts.on(&quot;--oauth-token =oken&quot;, String, &quot;Specifies the OAuth token to use.&quot;) { |v| OPTIONS[&quot;oauth.token&quot;] = v }
+          opts.on(&quot;--oauth-token-secret=secret&quot;, String, &quot;Specifies the OAuth token secret to use.&quot;) { |v| OPTIONS[&quot;oauth.token_secret&quot;] = v }
+        end
       end
     end
   end</diff>
      <filename>lib/switchboard/commands/pubsub/pubsub.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,7 @@ module Switchboard
             end
           end
 
-          if OPTIONS[&quot;oauth&quot;]
+          if defined?(OAuth) &amp;&amp; OPTIONS[&quot;oauth&quot;]
             switchboard.plug!(OAuthPubSubJack)
           else
             switchboard.plug!(PubSubJack)</diff>
      <filename>lib/switchboard/commands/pubsub/purge.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ module Switchboard
             end
           end
 
-          if OPTIONS[&quot;oauth&quot;]
+          if defined?(OAuth) &amp;&amp; OPTIONS[&quot;oauth&quot;]
             switchboard.plug!(OAuthPubSubJack)
           else
             switchboard.plug!(PubSubJack)</diff>
      <filename>lib/switchboard/commands/pubsub/subscribe.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,7 +22,7 @@ module Switchboard
             end
           end
 
-          if OPTIONS[&quot;oauth&quot;]
+          if defined?(OAuth) &amp;&amp; OPTIONS[&quot;oauth&quot;]
             switchboard.plug!(OAuthPubSubJack)
           else
             switchboard.plug!(PubSubJack)</diff>
      <filename>lib/switchboard/commands/pubsub/subscriptions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@ module Switchboard
             end
           end
 
-          if OPTIONS[&quot;oauth&quot;]
+          if defined?(OAuth) &amp;&amp; OPTIONS[&quot;oauth&quot;]
             switchboard.plug!(OAuthPubSubJack)
           else
             switchboard.plug!(PubSubJack)</diff>
      <filename>lib/switchboard/commands/pubsub/unsubscribe.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,7 @@
-require 'switchboard/helpers/oauth_pubsub'
-
-# TODO subclass PubSubJack
 class OAuthPubSubJack
   def self.connect(switchboard, settings)
+    require 'switchboard/helpers/oauth_pubsub'
+
     # TODO generalize this pattern for required settings
     unless settings[&quot;pubsub.server&quot;]
       puts &quot;A pubsub server must be specified.&quot;</diff>
      <filename>lib/switchboard/jacks/oauth_pubsub.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>98703a6d72d024af59d8e770387febd20952294b</id>
    </parent>
  </parents>
  <author>
    <name>Seth Fitzsimmons</name>
    <email>seth@mojodna.net</email>
  </author>
  <url>http://github.com/mojodna/switchboard/commit/5b3aac3bfcd61ff628bdf1d85cad6e5295f3e58e</url>
  <id>5b3aac3bfcd61ff628bdf1d85cad6e5295f3e58e</id>
  <committed-date>2008-11-23T11:09:12-08:00</committed-date>
  <authored-date>2008-11-23T11:09:12-08:00</authored-date>
  <message>removed strict dependencies on fire-hydrant, oauth, and rb-appscript</message>
  <tree>11745b29dfa979e4dbd7375e59992ff1374a3e66</tree>
  <committer>
    <name>Seth Fitzsimmons</name>
    <email>seth@mojodna.net</email>
  </committer>
</commit>
