Ten Years of Seattle.rb

drbrain | Thu, 16 Feb 2012 21:39:01 GMT

We're throwing a part for the tenth anniversary of the Seattle Ruby Brigade

The party will be on February 28th from 7PM to 10PM at Substantial's offices. You can get your ticket for the low, low price of just $10 right here

If you would like to learn more about the history of Seattle.rb, check out Aaron's presentation from RubyConf 2008.

Posted in  | no comments | no trackbacks

net-http-pipeline 1.0

drbrain | Tue, 29 Mar 2011 21:58:26 GMT

An HTTP/1.1 pipelining implementation atop Net::HTTP. A pipelined connection sends multiple requests to the HTTP server without waiting for the responses. The server will respond in-order.

Example:

require 'net/http/pipeline'

Net::HTTP.start 'localhost' do |http|
  req1 = Net::HTTP::Get.new '/'
  req2 = Net::HTTP::Get.new '/'
  req3 = Net::HTTP::Get.new '/'

  http.pipeline [req1, req2, req3] do |res|
    puts res.code
    puts res.body[0..60].inspect
    puts
  end
end

1.0 / 2011-03-29

  • API change

    • Net::HTTP::Pipeline#pipeline requires an Array of Net::HTTPRequests now.

  • Major enhancement

    • If a sequence of requests contains a non-idempotent request #pipeline now waits for a response to the previous request.

  • Minor enhancements

    • Check for HTTP/1.1 and persistent connections before attempting pipelining

    • Added Net::HTTP#persistent= to avoid pipelining-capability check.

Posted in ,  | no comments | no trackbacks

pasteboard 1.0

drbrain | Mon, 28 Mar 2011 22:46:29 GMT

Pasteboard wraps the OS X system pasteboard. Pasteboard allows you to add and retrieve multiple items and multiple item flavors to the pasteboard unlike pbpaste and pbcopy which only allow text.

FEATURES/PROBLEMS:

  • Supports multiple pasteboards

  • Returns data with the proper encoding

  • Built in library of types in Pasteboard::Type

  • Does not understand type conformance (Pasteboard::Type::IMAGE will not retrieve a Pasteboard::Type::JPEG)

SYNOPSIS:

require 'pasteboard'

pasteboard = Pasteboard.new

Adding a URL to the clipboard:

pasteboard.put_url 'http://blog.segment7.net', 'my blog'

Adding a JPEG with URL to the clipboard:

pasteboard.put_jpeg_url jpeg, 'http://example', 'my cool jpeg'

Adding other data to the clipboard (TIFF + URL):

item = [
  [Pasteboard::Type::TIFF,     tiff],
  [Pasteboard::Type::URL,      url],
  [Pasteboard::Type::URL_NAME, url],
  [Pasteboard::Type::UTF_8,    url],
]

pasteboard.put item

Retrieving data from the clipboard:

require 'pasteboard'

pb = Pasteboard.new

pb.first # => all flavors, see Pasteboard#[]

pb.first Pasteboard::Type::TIFF # => TIFF data

See also sample/image.rb and sample/dump.rb

Posted in ,  | no comments | no trackbacks

net-http-persistent 1.6

drbrain | Wed, 02 Mar 2011 04:13:58 GMT

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

Changes:

  • Minor Engancement

    • Added Net::HTTP::Persistent#socket_options to set multiple socket options at socket startup.

Posted in ,  | no comments | no trackbacks

Launch 1.0

drbrain | Sun, 27 Feb 2011 23:06:27 GMT

Launch allows agents and daemons launched by launchd to retrieve their list of sockets. Launchd is an open source framework for launching and managing daemons, programs and scripts provided by Apple.

See the Launch documentation. There is also a WEBrick server wrapper for managing WEBrick with launch.

Posted in ,  | no comments | no trackbacks

net-http-persistent 1.5.1

drbrain | Fri, 11 Feb 2011 20:00:00 GMT

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

1.5.1 / 2011-02-10

  • Bug fix

    • Only set TCP_NODELAY at connection start. Reported by Brian Henderson.

Posted in ,  | no trackbacks

meme_generator 1.1

drbrain | Wed, 09 Feb 2011 22:29:36 GMT

github.com/drbrain/meme

  • docs.seattlerb.org/meme_generator

  • Generate meme images using memegenerator.net! Save yourself some time!

    1.1 / 2011-02-09

    • Minor enhancements

      • Added 13 new templates. Pull Request #4 by Josep M. Bach.

      • Meme::run now returns the link. Pull Request #2 by Josep M. Bach.

      • Better template lookup. Patch by James Tucker.

    Posted in ,  | no comments | no trackbacks

    net-http-persistent 1.1

    drbrain | Wed, 19 May 2010 03:56:11 GMT

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

    Documentation

    Changes

    • Minor Enhancements

      • Proxy support, see Net::HTTP::Persistent::new, Net::HTTP::Persistent#proxy_from_env

      • Added name parameter to Net::HTTP::Persistent::new for separation of connection pools.

      • Added Net::HTTP::Persistent#shutdown so you can clean up after yourself

      • Net::HTTP::Persistent now suppresses “peer certificate won’t be verified in this SSL session” warning.

    • Bug Fixes

      • Net::HTTP::Persistent retries requests in accordance with RFC 2616.

    Posted in , ,  | no comments

    imap_processor 1.3

    drbrain | Wed, 05 Aug 2009 02:38:30 GMT

    imap_processor documentation

    IMAPProcessor is a client for processing messages on an IMAP server. It
    provides some basic mechanisms for connecting to an IMAP server, determining
    capabilities and handling messages.

    IMAPProcessor ships with the executables imap_keywords which can query an IMAP
    server for keywords set on messages in mailboxes, imap_idle which can show new
    messages in a mailbox and imap_archive which will archive old messages to a
    new mailbox.

    Changes

    • IMAP IDLE support now matches ruby trunk’s support. See Net::IMAP#idle
      and Net::IMAP#idle_done

    Posted in ,  | no comments

    rc-rest 3.0.0

    drbrain | Fri, 10 Jul 2009 21:31:00 GMT

    Robot Co-op REST web services base class. This library makes it easy to implement REST-like web services APIs.

    Changes

    • Upgrade to Nokogiri from REXML. This is incompatible with 2.x and older. Thanks Aaron Patterson!

    Posted in ,  | no comments