Skip to content

Proposal: adding a funding link to gemspec #22

@gjtorikian

Description

@gjtorikian

👋 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions