xmpp4r/xmpp4r — pull request #25 by whitehat101 (2014-05-08 07:03:04+00:00)
Title: Travis-CI, Test Updates, and Delay Stamp format

I went through the tests and fixed most failures. I also setup Travis-CI to test against 1.8.7, 1.9.3, 2.0.0, ruby-head, jRuby 1.8-mode, and jRuby 1.9-mode.

The tests pass ≈98% of the time. Some tests occasionally failed (testing threaded components is hard), but I was able to add a 100ms sleep or a `Thread::pass` or a `retry` to get the tests to pass nearly all the time.[Here is the CI build history](https://travis-ci.org/whitehat101/xmpp4r/builds). For one test that I was debugging, I ran the test in a bash loop. It failed 3 times out of the 127 trials I ran. I fixed that particular failure with a `retry`, but I just wanted to give an example of what I meant by *occasionally*.

In Issue #14, I asked about the delay stamp format. I found the specifications for that. It turns out that xmpp4r was using [XEP-0091](http://xmpp.org/extensions/xep-0091.html), "Legacy Delayed Delivery". That spec was marked obsolete in 2009. It was replaced by [XEP-0203](http://xmpp.org/extensions/xep-0203.html), "Delayed Delivery." Since it has been *5 years* since the previous specification was obsoleted, I think we can safely move on to the "Final" specification.

To help with travis, I added a Gemfile. I tried adding development dependencies to the gemspec in the Rakefile:
```ruby
s.add_development_dependency 'rake', '~> 10.0'
s.add_development_dependency 'rdoc', '~> 3.12'
```
However, the generated gemspec refused to bundle correctly. So, I added those gems into the `:test` group in the Gemfile. It's not quite the "modern" way that I'm used to, but it seems harmless and effective.

I set the gemspec's `s.required_ruby_version` to 1.8.7. I could not find an older ruby to test against.

The `tc_message.rb` test would fail when run with `rake`, but when the test was run by itself it passed. I found that the `xhtml/tc_html.rb` test broke the message test. Both tests pass when run individually. I disabled the xhtml test, as the message test seemed more core.

To maintain 1.8.7 compatibility, I think that the gemspec must be generated with a 1.8 ruby. I had no trouble using the gemspec with later rubies, but when I generated a gemspec with a later ruby, I had trouble installing in a 1.8 environment.