<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -105,6 +105,19 @@ helper :network_page_for do |user|
   &quot;https://github.com/#{user}/#{project}/network&quot;
 end
 
+helper :has_launchy? do |blk|
+  begin
+    gem 'launchy'
+    require 'launchy'
+    blk.call
+  rescue Gem::LoadError
+    STDERR.puts &quot;Sorry, you need to install launchy: `gem install launchy`&quot;
+  end
+end
+
 helper :open do |url|
-  Launchy::Browser.new.visit url
+  has_launchy? proc {
+    Launchy::Browser.new.visit url
+  }
 end
+</diff>
      <filename>commands/helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,5 +21,5 @@ Gem::Specification.new do |s|
   s.rubygems_version = %q{1.1.1}
   s.summary = %q{The official `github` command line helper for simplifying your GitHub experience.}
 
-  s.add_dependency(%q&lt;launchy&gt;, [&quot;&gt;= 0&quot;])
+  # s.add_dependency(%q&lt;launchy&gt;, [&quot;&gt;= 0&quot;])
 end</diff>
      <filename>github-gem.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,6 @@ require 'extensions'
 require 'github/command'
 require 'github/helper'
 require 'rubygems'
-require 'launchy'
 
 ##
 # Starting simple.</diff>
      <filename>lib/github.rb</filename>
    </modified>
    <modified>
      <diff>@@ -191,11 +191,21 @@ remote.nex3.url git://github.com/nex3/github-gem.git
   end
 
   helper :open do
-    it &quot;should launch the URL&quot; do
-      Launchy::Browser.next_instance.tap do |browser|
-        browser.should_receive(:my_os_family).any_number_of_times.and_return :windows # avoid forking
-        browser.should_receive(:system).with(&quot;/usr/bin/open http://www.google.com&quot;)
+    it &quot;should launch the URL when Launchy is installed&quot; do
+      begin
+        require 'launchy'
+        @helper.should_receive(:gem).with('launchy')
+        # @helper.should_receive(:has_launchy?).and_return { |blk| blk.call }
+        Launchy::Browser.next_instance.should_receive(:visit).with(&quot;http://www.google.com&quot;)
+        @helper.open &quot;http://www.google.com&quot;
+      rescue LoadError
+        fail &quot;Launchy is required for this spec&quot;
       end
+    end
+
+    it &quot;should fail when Launchy is not installed&quot; do
+      @helper.should_receive(:gem).with('launchy').and_raise(Gem::LoadError)
+      STDERR.should_receive(:puts).with(&quot;Sorry, you need to install launchy: `gem install launchy`&quot;)
       @helper.open &quot;http://www.google.com&quot;
     end
   end</diff>
      <filename>spec/helper_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9f7f232c2e80513be39410da93392fc8b9d47461</id>
    </parent>
    <parent>
      <id>b8fb20e08848a6a5668c285aa032315ebfd4ff33</id>
    </parent>
  </parents>
  <author>
    <name>Kevin Ballard</name>
    <email>kevin@sb.org</email>
  </author>
  <url>http://github.com/mojombo/github-gem/commit/3ba039ba129c08e77f60e2940ad2763905383f7a</url>
  <id>3ba039ba129c08e77f60e2940ad2763905383f7a</id>
  <committed-date>2008-07-07T14:54:36-07:00</committed-date>
  <authored-date>2008-07-07T14:54:36-07:00</authored-date>
  <message>Merge commit 'snowblink/remove_launchy_requirement'

* commit 'snowblink/remove_launchy_requirement':
  Reverting change to spec/spec_helper.rb. The change was originally made so the tests could run on earlier version of rspec (&lt;1.1.4)
  Removing requirement for launchy. It will enable installation of gem with reduced functionality.</message>
  <tree>3eef890b253ca5c18e081b38b887c5bd12e60f9b</tree>
  <committer>
    <name>Kevin Ballard</name>
    <email>kevin@sb.org</email>
  </committer>
</commit>
