Contributing to a gem on github

Hi, there is a gem I want to use (bones-extras), but the part I want to
use
doesn’t work on 1.9.2 since they removed “.” from the path (extremely
irritating, btw).

On my system, I can fix it, by editing the source to add “.” to the
beginning of the file path, but that doesn’t help anyone else, and it
doesn’t help me later if I try to work on my project on a different
computer.

I figure this is a good opportunity to help an open source project, but
I’m
not sure what to do. I know that I fork it on github, clone my fork,
make
the change, push it back up, then send a pull request. But is there a
blog
or anything that talks about the extra stuff? Do I change the version?
How
do I word my commit? Are there any expectations of me that I should take
care to observe? How long do I keep my fork?

I want to contribute to other projects out, but the process seems
undocumented, and I’m unsure of my obligations / expectations.

On Mon, Sep 27, 2010 at 10:32 AM, Josh C. [email protected]
wrote:

not sure what to do. I know that I fork it on github, clone my fork, make
the change, push it back up, then send a pull request. But is there a blog
or anything that talks about the extra stuff? Do I change the version? How
do I word my commit? Are there any expectations of me that I should take
care to observe? How long do I keep my fork?

I want to contribute to other projects out, but the process seems
undocumented, and I’m unsure of my obligations / expectations.

out of curiosity (google won’t tell me, and probably missed that
particular discussion on teh mailing list): why was ‘.’ removed from
the load path ?

as to the above question, my guess would be:
add
$: << “.”
where relevant. There might be a more elegant way, though.

On Mon, Sep 27, 2010 at 3:43 AM, elise huard [email protected]
wrote:

I want to contribute to other projects out, but the process seems
where relevant. There might be a more elegant way, though.

Thanks, Elise. I had tried placing that at the top of my Rakefile, and
it
did not work. It is unclear to me why not. The best ideas I can come up
with
are that $: might be a “local global” like Regexp matches, or that rake
somehow knows to load bones-extras before it looks at my Rakefile.

On Mon, Sep 27, 2010 at 3:46 AM, elise huard [email protected]
wrote:

or rather, require all the necessary files from the one loaded when
you load the gem.

Yes, I have a workaround similar to this that I am using. But as I said
above, it doesn’t help anyone else, and this seems like a good
opportunity
to learn how to contribute to OSS.

or rather, require all the necessary files from the one loaded when
you load the gem.

Josh C. [email protected] wrote:

Hi, there is a gem I want to use (bones-extras), but the part I want to use
doesn’t work on 1.9.2 since they removed “.” from the path (extremely
irritating, btw).

On my system, I can fix it, by editing the source to add “.” to the
beginning of the file path, […]

You should not use this fix, at least not for a public gem (as you are
not
only responsible for your own system). There are (security) issues with
having the current directory in the load path and . is removed with
intent.

Use require_relative or something similar to fix the gem.

I appreciate that you want to help the community, go on with that.

Klaus

The Answer is 42. And I am the Answer. Now I am looking for the
Question.

On Mon, Sep 27, 2010 at 4:55 AM, Klaus S. [email protected] wrote:

not
http://lapiz.istik.de/

The Answer is 42. And I am the Answer. Now I am looking for the Question.

The gem I was going to contribute to (bones-extras) has been deprecated,
so
this is no longer an issue.

But for the sake of clarity (because this has been messing with my brain
for
a while), require_relative requires relative to the current file’s dir,
not
relative to the working dir, so this would not work. (ruby-doc doesn’t
have
this listed, so I was never able to find it, but it is in the 1.9
Pickaxe)

In other words require_relative is equivalent to
require File.dirname(FILE)+‘/file’
And what I am doing is equivalent to
require Dir.pwd + ‘/file’

So require_relative is not a solution. (nevermind that I was using it in
a
FileList)

In fact, I expect that this misunderstanding means there is no problem
at
all, so I am going to operate on the assumption that when you want to
require things relative to the working directory, that you should
begin
the string with a dot. ie require './file' If this is not acceptable,
let
me know what is the proper way to do it. And if the reasoning is not
obvious, please explain it.