net-http-persistent 1.9 and 2.0

drbrain | Sat, 27 Aug 2011 00:23:10 GMT

net-http-persistent versions 1.9 and 2.0 has been released!

Manages persistent connections using Net::HTTP plus a speed fix for Ruby 1.8. It’s thread-safe too!

Using persistent HTTP connections can dramatically increase the speed of HTTP. Creating a new HTTP connection for every request involves an extra TCP round-trip and causes TCP congestion avoidance negotiation to start over.

Net::HTTP supports persistent connections with some API methods but does not handle reconnection gracefully. net-http-persistent supports reconnection and retry according to RFC 2616.

Changes:

2.0 / 2011-08-26

  • Incompatibility

    • Net::HTTP::Persistent#verify_mode now defaults to OpenSSL::SSL::VERIFY_PEER. This may cause HTTPS request failures if your default certificate store lacks the correct certificates.

1.9 / 2011-08-26

  • Minor Enhancement

    • Added Net::HTTP::Persistent#cert_store to set an SSL certificate store which defaults to the OpenSSL default certificate store.

      HTTPS server certificates will be validated when this option is combined with setting Net::HTTP::Persistent#verify_mode to OpenSSL::SSL::VERIFY_PEER.

Posted in  | no comments | no trackbacks

RubyGems 1.8.9

drbrain | Tue, 23 Aug 2011 23:16:15 GMT

RubyGems is a package management framework for Ruby.

This gem is an update for the RubyGems software. You must have an installation of RubyGems before this update can be applied.

See Gem for information on RubyGems (or `ri Gem`)

To upgrade to the latest RubyGems, run:

$ gem update --system  # you might need to be an administrator or root

See UPGRADING.rdoc for more details and alternative instructions.


If you don’t have RubyGems installed, your can still do it manually:

  • Download from: rubygems.org/pages/download

  • Unpack into a directory and cd there

  • Install with: ruby setup.rb # you may need admin/root privilege

For more details and other options, see:

ruby setup.rb --help

1.8.9 / 2011-08-23

  • Bug fixes:

    • Fixed uninstalling multiple gems using `gem uninstall`

    • Gem.use_paths splatted to take multiple paths! Issue #148

Posted in ,  | no comments | no trackbacks

RubyGems 1.8.8

drbrain | Fri, 12 Aug 2011 00:52:21 GMT

RubyGems is a package management framework for Ruby.

This gem is an update for the RubyGems software. You must have an installation of RubyGems before this update can be applied.

See Gem for information on RubyGems (or `ri Gem`)

To upgrade to the latest RubyGems, run:

$ gem update --system  # you might need to be an administrator or root

See UPGRADING.rdoc for more details and alternative instructions.


If you don’t have RubyGems installed, your can still do it manually:

  • Download from: rubygems.org/pages/download

  • Unpack into a directory and cd there

  • Install with: ruby setup.rb # you may need admin/root privilege

For more details and other options, see:

ruby setup.rb --help

1.8.8 / 2011-08-11

  • Bug fix:

    • The encoding of a gem’s YAML spec is now UTF-8. Issue #149

Posted in ,  | no comments | no trackbacks

net-http-persistent 1.8.1

drbrain | Tue, 09 Aug 2011 01:05:59 GMT

Manages persistent connections using Net::HTTP plus a speed fix for Ruby 1.8. It’s thread-safe too!

Using persistent HTTP connections can dramatically increase the speed of HTTP. Creating a new HTTP connection for every request involves an extra TCP round-trip and causes TCP congestion avoidance negotiation to start over.

Net::HTTP supports persistent connections with some API methods but does not handle reconnection gracefully. net-http-persistent supports reconnection and retry according to RFC 2616.

1.8.1 / 2011-08-08

  • Bug Fix

    • Requests with OpenSSL errors are retried now. Pull Request #5 by James Tucker.

Posted in  | no comments | no trackbacks

marshal-structure 1.0

drbrain | Sat, 06 Aug 2011 00:51:59 GMT

This gem is part of #rbxday, but instead of contributing to Rubinius, it mostly takes from Rubinius!

marshal-structure dumps a tree based on the Marshal format. It supports the Marshal 4.8 format.

INSTALL

gem install marshal-structure

SYNOPSIS

From the command line:

ruby -rpp -rmarshal-structure \
  -e 'pp Marshal::Structure.load Marshal.dump "hello"'

Fancier usage:

require 'pp'
require 'marshal-structure'

ms = Marshal::Structure.new Marshal.dump %w[hello world]

# print the Marshal stream structure
pp ms.construct

# print ruby objects in Marshal stream
pp ms.objects

EXAMPLE

str =
  "\004\b{\006:\006a[\031c\006Bm\006C\"\006d/\006e\000i\006" \
  "f\0322.2999999999999998\000ff" \
  "l+\n\000\000\000\000\000\000\000\000\001\0000TF}\000i\000" \
  "S:\006S\006:\006fi\000o:\vObject\000@\017" \
  "U:\006M\"\021marshal_dump" \
  "Iu:\006U\n_dump\006" \
  ":\026@ivar_on_dump_str\"\036value on ivar on dump str" \
  ";\000e:\006Eo;\b\000" \
  "I\"\025string with ivar\006:\v@value\"\017some value" \
  "C:\016BenString\"\000"

structure = Marshal::Structure.load str

pp structure

Prints:

[:hash,
 0,
 1,
 [:symbol, 0, "a"],
 [:array,
  1,
  20,
  [:class, 2, "B"],
  [:module, 3, "C"],
  [:string, 4, "d"],
  [:regexp, 5, "e", 0],
  [:fixnum, 1],
  [:float, 6, "2.2999999999999998\u0000ff"],
  [:bignum, 7, 1, 10, 18446744073709551616],
  :nil,
  :true,
  :false,
  [:hash_default, 8, 0, [:fixnum, 0]],
  [:struct, 9, [:symbol, 1, "S"], 1, [:symbol, 2, "f"], [:fixnum, 0]],
  [:object, 10, [:symbol, 3, "Object"], [0]],
  [:link, 10],
  [:user_marshal, 11, [:symbol, 4, "M"], [:string, 12, "marshal_dump"]],
  [:instance_variables,
   [:user_defined, 13, [:symbol, 5, "U"], "_dump"],
   1,
   [:symbol, 6, "@ivar_on_dump_str"],
   [:string, 14, "value on ivar on dump str"]],
  [:symbol_link, 0],
  [:extended, [:symbol, 7, "E"], [:object, 15, [:symbol_link, 3], [0]]],
  [:instance_variables,
   [:string, 16, "string with ivar"],
   1,
   [:symbol, 8, "@value"],
   [:string, 17, "some value"]],
  [:user_class, [:symbol, 9, "BenString"], [:string, 18, ""]]]]

Posted in ,  | no comments | no trackbacks

RubyGems 1.8.7

drbrain | Fri, 05 Aug 2011 00:55:39 GMT

RubyGems is a package management framework for Ruby.

This gem is an update for the RubyGems software. You must have an installation of RubyGems before this update can be applied.

See Gem for information on RubyGems (or ri Gem)

To upgrade to the latest RubyGems, run:

$ gem update --system  # you might need to be an administrator or root

See UPGRADING.rdoc for more details and alternative instructions.


If you don’t have RubyGems installed, your can still do it manually:

  • Download from: rubygems.org/pages/download

  • Unpack into a directory and cd there

  • Install with: ruby setup.rb # you may need admin/root privilege

For more details and other options, see:

ruby setup.rb --help

1.8.7 / 2011-08-04

  • Bug fixes:

    • Added missing require for gem uninstall --format-executable

    • The correct name of the executable being uninstalled is now displayed with --format-executable

    • Fixed gem unpack uninstalled_gem default version picker

    • RubyGems no longer claims a nonexistent gem can be uninstalled

    • gem which no longer claims directories are requirable files

    • gem cleanup continues cleaning up gems if one can’t be uninstalled due to permissions. Issue #82

    • Gem repository directories are no longer created world-writable. Patch by Sakuro OZAWA. Ruby Bug #4930

Posted in ,  | 1 comment | no trackbacks

Ruby 1.9.3 preview 1

drbrain | Mon, 01 Aug 2011 19:28:36 GMT

Ruby 1.9.3 preview 1 has been released! Please install it and report bugs! The NEWS file contains the changes since Ruby 1.9.2 and the ChangeLog contains all the gory details.

If you're using RVM you can follow these instructions to install preview 1. If not, you can download the tarball, unpack it, then run configure; make; make install as you like.

Bug Reports

Ruby 1.9.3 preview 1 ships with RDoc, RubyGems and Rake. I can fix critical bugs in all of these before the final release. Please file bug reports for Ruby via redmine for any issue you find. You can also search for existing issues to avoid duplicate reports.

RDoc

The preview 1 release contains RDoc 3.8, but I've released RDoc 3.9.1 to fix a few additional bugs. Please install RDoc 3.9.1 atop the preview 1 release, or standalone on your main ruby. I prefer reports of RDoc issues via github.

RubyGems

The preview 1 release contains RubyGems 1.8.6.1 which is slightly newer than RubyGems 1.8.6. RubyGems 1.8.7 will be released shortly with the combined changes. I prefer reports of RubyGems issues via github.

Rake

The preview 1 release contains Rake 0.9.2.1 which is slightly newer than Rake 0.9.2. I prefer reports of Rake issues via github.

Posted in , ,  | no comments | no trackbacks

RDoc 3.9.1

drbrain | Mon, 01 Aug 2011 19:02:36 GMT

RDoc 3.9.1 will be included with Ruby 1.9.3 provided no show-stopping bugs are found. Please install RDoc and report any bugs you've found.

RDoc produces HTML and command-line documentation for Ruby projects. RDoc includes the rdoc and ri tools for generating and displaying online documentation.

See RDoc for a description of RDoc’s markup and basic use.

3.9.1

  • Bug fixes

    • Fix RDoc::Markup parser for a header followed by a non-text token. Issue #56 by Adam Tait

    • Fix RDoc::Markup::ToHtmlCrossref#gen_url for non-rdoc-ref links.

    • Fix bug report URL when rdoc crashes.

3.9

  • Minor enhancements

    • RDoc::Parser::C now supports :doc: and :nodoc: for class comments

    • Added the rdoc-ref: link scheme which links to a named reference. rdoc-ref: can resolve references to classes, modules, methods, files, etc. This can be used to create cross-generator named links unlike the link: scheme which is dependent upon the exact file name. Issue #53 by Simon Chiang

    • Pulled RDoc::CrossReference out of RDoc::Markup::ToHtmlCrossref. Cross-references can now be created easily for non-HTML formatters.

  • Bug fixes

    • `ri []` and other special methods now work properly. Issue #52 by ddebernardy.

    • `ri` now has space between class comments from multiple files.

    • :stopdoc: no longer creates Object references. Issue #55 by Simon Chiang

    • :nodoc: works on class aliases now. Issue #51 by Steven G. Harms

    • Remove tokenizer restriction on header lengths for verbatim sections. Issue #49 by trans

Posted in ,  | no comments | 1 trackback