Many updates and fixes
Hi, thanks for this useful library.
I made several changes and fixes so that I could use this program to export a large Campfire history:
- Bump gem dependencies for modern (> 2.0) Ruby versions (closes #25 and #21 re: "unable to modify frozen Fixnum")
- Add travis to test builds on multiple Ruby versions
- Remove support for deprecated Ruby 1.8.7 (which won't compile newer Nokogiri versions, and is deprecated anyway)
- Retry up to 5 times before giving up on a resource. Makes campfire_export usable for large exports. Fixes one of the issues raised in #23, "getting a timeout" (I had this problem as well, which is why I had to add retries to make this library useful for my own export)
- Fixes an unreported issue that I found where unicode caused many transcript exports to be verified incorrectly, since number of characters != bytes in String.
- Refactor classes to have their own files
- Add a default rake task to run specs
Note that after merging you should enable travis for this repo and change the README to point to your travis instance. Other than that there are no other changes that are specific to my configuration.
Please let me know if you feel ok making changes this large to the codebase and pushing a new gem. My only concern is that there isn't a ton of test support present, and my only testing of my changes is quickly visually inspecting that an export of > 1 GB looks pretty much ok.
If you're not comfortable merging this yet and pushing a new gem release, I can push this to another gem name temporarily, e.g., stackbuilders-campfire_export, and if there is some manually testing done by other users we can merge this into your main codebase, and push a new gem using your account when you feel comfortable that it has had enough testing. Let me know how you'd like to proceed, and thanks very much for your work on this gem which has been very useful to us @stackbuilders!
Please note that I did release my fork to RubyGems as stackbuilders-campfire_export so that it can be more broadly used and tested. I updated the documentation on our fork to describe the fixes that have been made, and how to install the updated gem from RubyGems.
If you decide to merge the changes from my fork and make a new release, I'll gladly point back to your original repo and yank my own published gem.
Thanks again for this gem, which helped us to export our 1.3 GB of data from Campfire. :)
Thanks for this fix. This is working well on Ruby 2.2.3 with El Capitan!
@jqr you're welcome. Glad to hear it was helpful. :)