raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / Atom feed
From: Brian Corrigan <brian@genexp.me>
To: raindrops@librelist.org
Subject: Re: [PATCH] Adds pathname support
Date: Tue, 5 Jun 2012 11:45:59 -0400
Message-ID: <CALO9HP2-G+Lvz+LqqBDNAk-yR+y6WSGybrWDHUwhA-QmtFFN9g@mail.gmail.com> (raw)
In-Reply-To: <20120605004738.GA11265@dcvr.yhbt.net>

Eric - Let's try this again with a new thread/  Thanks for the tips!!

On Mon, Jun 4, 2012 at 8:47 PM, Eric Wong <normalperson@yhbt.net> wrote:
> Brian Corrigan <bcorrigan78@gmail.com> wrote:
>> Hi Guys - I've never submitted a patch via email before.  Apologies if
>> I get this completely wrong (go easy!)
>
> Thanks.
>
> I prefer patches inline since it's easier to apply/review, but some mail
> clients mangle them.  git send-email comes with git and is a good way
> to send email if you're stuck on a mail client than mangles email.
>
> Also, don't include HTML parts/attachments to your email (ever :P).
>
>> Also, I had a problem getting
>> the tests to run on 1.9.3.  In any case, here goes..
>
> What was the error?  1.9.3 is my primary platform.
>
>
> I've inlined your patch below and have a few comments inline:
>
>> From fd82f8f1e0d8fa91b90235a066d1c5ad936cbc0d Mon Sep 17 00:00:00 2001
>> From: Brian Corrigan <brian@agoragames.com>
>> Date: Mon, 4 Jun 2012 16:50:07 -0400
>> Subject: [PATCH 1/2] Adds pathname support
>
> The commit message should explain why the change is necessary.
>
>> --- a/lib/raindrops/linux.rb
>> +++ b/lib/raindrops/linux.rb
>
> No require for 'pathname'?
>
>> @@ -41,6 +41,7 @@ module Raindrops::Linux
>>      else
>>        paths = paths.map do |path|
>>          path = path.dup
>> +        path = Pathname.new(path).realpath.to_s
>
> It should be possible to safely remove the "path = path.dup" line above.
>
>>          path.force_encoding(Encoding::BINARY) if defined?(Encoding)
>>          rv[path]
>>          Regexp.escape(path)
>> diff --git a/test/test_linux.rb b/test/test_linux.rb
>> index 65f25e0..953549e 100644
>> --- a/test/test_linux.rb
>> +++ b/test/test_linux.rb
>> @@ -1,6 +1,7 @@
>>  # -*- encoding: binary -*-
>>  require 'test/unit'
>>  require 'tempfile'
>> +require 'tmpdir'
>>  require 'raindrops'
>>  require 'socket'
>>  require 'pp'
>
> I noticed your second patch reverted this change.  Better to use
> "git commit --amend" to rewrite changes (especially trivial ones)
> before sending them so you don't propagate the noise going forward.

      reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CALO9HP2oBDPBaeKx8N_Lp9GbfTOoGTFkKXcyfZJaJm=E_ksLOA@mail.gmail.com>
2012-06-05  0:07 ` Brian Corrigan
2012-06-05  0:47   ` Eric Wong
2012-06-05 15:45     ` Brian Corrigan [this message]

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=CALO9HP2-G+Lvz+LqqBDNAk-yR+y6WSGybrWDHUwhA-QmtFFN9g@mail.gmail.com \
    --to=brian@genexp.me \
    --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

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