This project is archived and is in readonly mode.

#2152 ✓wontfix
Jordi Bunster

GitHub :author param to config.gem (Rails::GemDependency)

Reported by Jordi Bunster | March 6th, 2009 @ 03:08 PM | in 2.x

Lately my environment.rb is filled with GitHub gems. I suspect yours is too.

I got a bit tired of all the :source and :lib stuff, so I whipped this patch to allow me to pass :author => 'foo'. It then changes the defaults for :lib and :source (as well as changes the gem name), to fit what GitHub expects.


Comments and changes to this ticket

  • José Valim

    José Valim March 6th, 2009 @ 03:40 PM

    I've seen a similar patch about this around. If I'm sure it used config.gem 'gem', :github => 'author', but I like more yours. +1

  • Jordi Bunster

    Jordi Bunster March 6th, 2009 @ 04:05 PM


    I did a quick search for the one you mentioned but I couldn't find it here on Lighthouse. Is it here, do you know?

  • ronin-278 (at lighthouseapp)

    ronin-278 (at lighthouseapp) March 6th, 2009 @ 04:07 PM

    I would go with something like :github_author => 'foobar'. More explicit IMO.

  • Pratik

    Pratik March 6th, 2009 @ 04:08 PM

    • State changed from “new” to “wontfix”
    • Title changed from “[PATCH] GitHub :author param to config.gem (Rails::GemDependency)” to “GitHub :author param to config.gem (Rails::GemDependency)”

    Not sure I like the idea of having a service specific code in Rails. If it's in rubygems, that's cool.

    Will reopen if more ppl think otherwise.


  • Jordi Bunster

    Jordi Bunster March 6th, 2009 @ 04:14 PM

    Nicolás: yeah, I went for brevity, but I see your point. I wouldn't mind changing the syntax.

    Pratik: I thought about it, but the reality is that more and more people publish on GitHub only, which at the end of the day, is just service, not unlike RubyForge.

  • Damian Janowski

    Damian Janowski March 6th, 2009 @ 04:15 PM

    What about a :prepend option?

    config.gem 'will_paginate', :prepend => 'mislav'

    That way it's not service-specific.

  • Jordi Bunster

    Jordi Bunster March 6th, 2009 @ 04:19 PM


    I think the service-specific part is the fact that when you pass :author (or :prepend or :whatever_color_the_shed_is) we then assume :source => GitHub.

  • Pratik

    Pratik March 6th, 2009 @ 04:37 PM

    Hey Jordi,

    I really don't have a strong opinion about this. Will reopen if more people on the mailing list think this is a good feature. Please don't take "wontfix" the wrong way, just trying to do some LH gardening :)


  • Jordi Bunster

    Jordi Bunster March 6th, 2009 @ 04:43 PM

    Pratik: I know. I don't take it one way or another. Just trying to get the patch in. :P

  • Jordi Bunster

    Jordi Bunster March 12th, 2009 @ 08:18 PM

    This is a workaround to now having this in Rails:

    Sadly, I can't really make it a plugin, because of how early in the initialization it has to work.

  • Markús

    Markús March 12th, 2009 @ 10:39 PM


    I've started a ticket for something similar about one month ago, it's may be the one José Valim is talking about.

    There's an interesting answer by Matt Jones in my ticket about this concern. It's practically the same Pratik says in his comment, and I agree with them, perhaps it's better to leave the config.gem as it is right now (it makes sense since it's planned to make Rails as agnostic as possible in Rails 3).

    And think, we already have templates which make a lot of automatic work for us. For example, I've created a "templates_helper" with functions like this "github_gems" to easily add and remove gems from templates both for new or existing applications.

    By the way. I like your approach, it's more clear than mine.

    Cheers. Markus.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>