rubygems / rfcs

RubyGems + Bundler RFCs
45 stars 40 forks source link

Proposal: adding a `funding` link to gemspec #22

Closed gjtorikian closed 4 years ago

gjtorikian commented 4 years ago

šŸ‘‹ Hello there! Long time RubyGems user, first time contributor. šŸ˜ø

My current problem is that, as a Ruby open source developer, I would like to ensure that my projects are receiving funding, so that I can continue to make them available.

I noticed that late last year, npm discouraged the use of asking for funding in a post-install message, in favor of adding a funding option.

I would like to propose adding a similar option here, and, if it sounds good, would be more than happy to open an RFC, and then a PR, to implement ASAP. I am opening this issue to "get feedback on [my] concept before diving into the level of API design detail required for an RFC," as per the README.

Format

I imagine this proposal to add a new key, funding, to the Gem specification:

Gem::Specification.new do |gem|
  gem.name          = 'commonmarker'
  gem.funding       = 'https://github.com/sponsors/gjtorikian/'

  # ...
end

funding must be a URI, much like homepage.

Usage

After bundle update or bundle install (or really, wherever post_install_message is also shown), the following message should be printed:

4 gems are looking for funding
  run `bundle fund` for details

fund would be a new command. When a user types bundle fund, the following information should be shown as a bulleted list.

$ bundle fund
  * $GEM_NAME ($GEM_VERSION)
    Funding: <$FUNDING_URL>
  * commonmarker (0.20.2)
    Funding:  https://github.com/sponsors/gjtorikian/

As well, bundle info should also show this information:

$ bundle info commonmarker

  * commonmarker (0.20.2)
    Summary: CommonMark parser and renderer. Written in C, wrapped in Ruby.
    Homepage: https://github.com/gjtorikian/commonmarker
    Path: /Users/gjtorikian/Development/commonmarker
    Funding:  https://github.com/sponsors/gjtorikian/

(Of course, RubyGems.org should also prominently display this information, but that's a different PR for a different repo!)


What do you think?

arbonap commented 4 years ago

I think this is a rad idea! I believe people should be compensated for their open source work

mensfeld commented 4 years ago

I'm all in as well. Really good idea!

gjtorikian commented 4 years ago

I'm going to move this to writing up an RFC given the positive feedback.

Seems like https://github.com/rubygems/rubygems/pull/3060 wants to call this donation, which I feel like has less of an urgency than funding or sponsorship (sorry, English major). I'll try to coordinate on a name there with @colby-swandale.