raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: raindrops@librelist.org
Subject: Re: [PATCH] Add method_missing to Raindrops::Middleware::Proxy
Date: Thu, 17 May 2012 19:35:08 -0700
Message-ID: <20120518023508.GA31625@dcvr.yhbt.net> (raw)
In-Reply-To: <CAO1NZApFZa_SQk12ZZOo1ZTukfnxMsZ=-NG7aZ8f1v8xL6quyA@mail.gmail.com>

Ben Somers <somers.ben@gmail.com> wrote:
> This enables it to behave more like a Rack
> BodyProxy would, delegating methods to its body
> object when it does not implement them itself.
> (Also includes  a minor grammar fix to a comment.)
> ---
> Here you go! Hopefully this is a patch format you appreciate?

Thanks!  (minor nits below)

> Guidelines are a little less clear than on unicorn :p.

Sorry :x  I try to follow the contribution guidelines as git itself and
I think the README makes that much clear.  Patches to clarify what you
think needs clarifying also appreciated :)

I tend to be less good (and less picky :) than Junio when it comes to
grammar, though.

> --- a/lib/raindrops/middleware/proxy.rb
> +++ b/lib/raindrops/middleware/proxy.rb
>    end
> +
> +  # Rack::BodyProxy objects use +method_missing+ to delegate methods
> +  # to their bodies

I don't think the comment makes sense without the context of this email
thread/commit message.  Perhaps the following?

   # Avoid breaking users of non-standard extensions (e.g. #body)
   # Rack::BodyProxy does the same.

> +  def method_missing(*args, &block)
> +    @body.send(*args, &block)
> +  end
> +
>  end

I don't think I usually add a blank line between after the last method
and the end of a class/module.  Trivial fix on my end.

Let me know if you think my comment for method_missing is better.
(often things I say which I /think/ makes sense... don't :D)


  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18  1:46 Ben Somers
2012-05-18  2:35 ` Eric Wong [this message]
2012-05-18  3:56   ` Ben Somers
2012-05-18  4:27     ` Eric Wong

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://bogomips.org/raindrops/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120518023508.GA31625@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=raindrops@librelist.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

raindrops RubyGem user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/raindrops-public
	git clone --mirror http://ou63pmih66umazou.onion/raindrops-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.raindrops
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.raindrops

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git