<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spec/client_shared_examples.rb</filename>
    </added>
    <added>
      <filename>spec/client_spec.rb</filename>
    </added>
    <added>
      <filename>spec/spec_helper.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -7,6 +7,8 @@
 * Cleanup of initializers, and provide Client accessors for reading values (for testing)
 * Removed test/test_url_* files as they only differed from the test_client.rb in their
   setup.  Super UnDry.  Added URL tests to cover stomp URL as param.
+* Created initial RSpec specs which stub/mock objects and should not require a running
+  Stomp server instance.
 
 == v1.0.5
 </diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,11 @@
 ==README
 
+===Git Fork Info
+
+This project is a (temporary?) fork of the original which can be found on the codehaus.org site below.  The intention is to get some good changes into this working copy and submit those back to the original project if they want them. I am eager to apply any code or documentation patches that you may have to enhance the Stomp Ruby library making it more reliable, performant, or user friendly.
+
+===Original Code
+
 An implementation of the Stomp protocol for Ruby.
 
 Project Source :</diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,7 @@ require 'rubygems'
 require 'rake/gempackagetask'
 require 'rake/testtask'
 require 'rake/rdoctask'
+require 'spec/rake/spectask'
 
 # read the contents of the gemspec, eval it, and assign it to 'spec'
 # this lets us maintain all gemspec info in one place.  Nice and DRY.
@@ -43,3 +44,9 @@ Rake::RDocTask.new do |rd|
   rd.options = spec.rdoc_options
 end
 
+desc &quot;RSpec : run all&quot;
+Spec::Rake::SpecTask.new('spec') do |t|
+  t.spec_files = FileList['spec/**/*.rb']
+  t.spec_opts = [&quot;--color&quot;, &quot;--format&quot;, &quot;specdoc&quot;]
+end
+</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -38,22 +38,26 @@ module Stomp
         @login = ''
         @passcode = ''
         @host = $1
-        @port = $2
+        @port = $2.to_i
         @reliable = false
-      when /stomp:\/\/([\w\.]+):(\w+)@(\w+):(\d+)/ # e.g. stomp://login:passcode@host:port
+      when /stomp:\/\/([\w\.]+):(\w+)@([\w\.]+):(\d+)/ # e.g. stomp://login:passcode@host:port
         @login = $1
         @passcode = $2
         @host = $3
-        @port = $4
+        @port = $4.to_i
         @reliable = false
       else
         @login = login
         @passcode = passcode
         @host = host
-        @port = port
+        @port = port.to_i
         @reliable = reliable
       end
 
+      raise ArgumentError if @host.nil? || @host.empty?
+      raise ArgumentError if @port.nil? || @port == '' || @port &lt; 1 || @port &gt; 65535
+      raise ArgumentError unless @reliable.is_a?(TrueClass) || @reliable.is_a?(FalseClass)
+
       @id_mutex = Mutex.new
       @ids = 1
       @connection = Connection.new(@login, @passcode, @host, @port, @reliable)</diff>
      <filename>lib/stomp/client.rb</filename>
    </modified>
    <modified>
      <diff>@@ -178,54 +178,5 @@ class TestClient &lt; Test::Unit::TestCase
     @client.commit 'tx2'
   end
 
-  def test_client_open?
-    assert_equal true , @client.open?
-    @client.close
-    assert_equal false, @client.open?
-  end
-
-  def test_client_closed?
-    assert_equal false, @client.closed?
-    @client.close
-    assert_equal true, @client.closed?
-  end
-
-  def test_client_initialized_with_url_host_port
-    @client = Stomp::Client.open(&quot;stomp://localhost:61613&quot;)
-    assert_equal '', @client.login
-    assert_equal '', @client.passcode
-    assert_equal 'localhost', @client.host
-    assert_equal '61613', @client.port
-    assert_equal false, @client.reliable
-  end
-
-# FIXME : I need to be mocked!
-#  def test_client_initialized_with_url_host_tld_port
-#    @client = Stomp::Client.open(&quot;stomp://foobar.com:61613&quot;)
-#    assert_equal '', @client.login
-#    assert_equal '', @client.passcode
-#    assert_equal 'foobar.com', @client.host
-#    assert_equal '61613', @client.port
-#    assert_equal false, @client.reliable
-#  end
-
-  def test_client_initialized_with_url_login_passcode_host_port
-    @client = Stomp::Client.open(&quot;stomp://testlogin:testpasscode@localhost:61613&quot;)
-    assert_equal 'testlogin', @client.login
-    assert_equal 'testpasscode', @client.passcode
-    assert_equal 'localhost', @client.host
-    assert_equal '61613', @client.port
-    assert_equal false, @client.reliable
-  end
-
-# FIXME : I am not being matched by the regex, so the entire URL is being stuffed into the @user.  Fix Regex to handle TLD
-#  def test_client_initialized_with_url_login_passcode_host_tld_port
-#    @client = Stomp::Client.open(&quot;stomp://testlogin:testpasscode@foobar.com:61613&quot;)
-#    assert_equal 'testlogin', @client.login
-#    assert_equal 'testpasscode', @client.passcode
-#    assert_equal 'foobar.com', @client.host
-#    assert_equal '61613', @client.port
-#    assert_equal false, @client.reliable
-#  end
 
 end</diff>
      <filename>test/test_client.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fab20505038fd9291f2e0e706e997a5fb2bc7831</id>
    </parent>
  </parents>
  <author>
    <name>Glenn Rempe</name>
    <email>glenn@rempe.us</email>
  </author>
  <url>http://github.com/js/stomp/commit/2c8f5e4cb98af6b34e9c83c8efb01626f4bd0db3</url>
  <id>2c8f5e4cb98af6b34e9c83c8efb01626f4bd0db3</id>
  <committed-date>2008-05-10T09:48:43-07:00</committed-date>
  <authored-date>2008-05-10T09:48:43-07:00</authored-date>
  <message>Added new RSpec specs.  Raise arg exceptions when bad args passed.  Fixed certain stomp URL's not being parsed.

The Rspec specs that were added are currently in addition to any existing test unit test cases.  The specs uses mocks/stubs to avoid calling collaborator classes directly, or outside services so no queue server need be running to test.  The ultimate intention would be to pull all test unit cases into specs and mock/stub all outside interactions.</message>
  <tree>7467567e313ff3a1277956fc5c5f9589001437be</tree>
  <committer>
    <name>Glenn Rempe</name>
    <email>glenn@rempe.us</email>
  </committer>
</commit>
